aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS104
-rw-r--r--classes/autotools.bbclass1
-rw-r--r--classes/base.bbclass6
-rw-r--r--classes/gnome.bbclass5
-rw-r--r--classes/image.bbclass42
-rw-r--r--classes/kernel.bbclass15
-rw-r--r--classes/lib_package.bbclass5
-rw-r--r--classes/lockdown.bbclass41
-rw-r--r--classes/nylon-image.bbclass3
-rw-r--r--classes/nylon-mirrors.bbclass8
-rw-r--r--classes/oestats-client.bbclass20
-rw-r--r--classes/package_ipk.bbclass9
-rw-r--r--classes/package_rpm.bbclass2
-rw-r--r--classes/packaged-staging.bbclass2
-rw-r--r--classes/qt4e.bbclass7
-rw-r--r--classes/recipe_sanity.bbclass188
-rw-r--r--classes/rootfs_deb.bbclass2
-rw-r--r--classes/rootfs_ipk.bbclass11
-rw-r--r--classes/seppuku.bbclass6
-rw-r--r--classes/siteinfo.bbclass3
-rw-r--r--classes/task.bbclass1
-rw-r--r--classes/tinderclient.bbclass24
-rw-r--r--classes/update-rc.d.bbclass2
-rw-r--r--classes/xfce.bbclass2
-rw-r--r--conf/bitbake.conf14
-rw-r--r--conf/checksums.ini754
-rw-r--r--conf/distro/angstrom-2008.1.conf23
-rw-r--r--conf/distro/include/angstrom-2008-preferred-versions.inc37
-rw-r--r--conf/distro/include/angstrom-eglibc.inc4
-rw-r--r--conf/distro/include/angstrom-glibc.inc6
-rw-r--r--conf/distro/include/angstrom-uclibc.inc4
-rw-r--r--conf/distro/include/angstrom-uclinux-uclibc.inc4
-rw-r--r--conf/distro/include/angstrom.inc15
-rw-r--r--conf/distro/include/eglibc.inc11
-rw-r--r--conf/distro/include/glibc.inc11
-rw-r--r--conf/distro/include/preferred-om-2008-versions.inc2
-rw-r--r--conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc2
-rw-r--r--conf/distro/include/preferred-xorg-versions-X11R7.4.inc2
-rw-r--r--conf/distro/include/sane-srcdates.inc10
-rw-r--r--conf/distro/include/sane-srcrevs.inc21
-rw-r--r--conf/distro/include/sane-toolchain-eglibc.inc1
-rw-r--r--conf/distro/include/sane-toolchain-glibc.inc1
-rw-r--r--conf/distro/include/sane-toolchain-uclibc.inc1
-rw-r--r--conf/distro/kaeilos.conf13
-rw-r--r--conf/distro/micro-uclibc.conf7
-rw-r--r--conf/distro/micro.conf21
-rw-r--r--conf/distro/minimal.conf7
-rw-r--r--conf/distro/nylon.conf142
-rw-r--r--conf/distro/sharprom-compatible.conf9
-rw-r--r--conf/licenses.conf5
-rw-r--r--conf/machine/akita.conf4
-rw-r--r--conf/machine/at2440evb.conf19
-rw-r--r--conf/machine/at91cap9adk.conf1
-rw-r--r--conf/machine/at91sam9260ek.conf3
-rw-r--r--conf/machine/at91sam9261ek.conf3
-rw-r--r--conf/machine/at91sam9263ek.conf1
-rw-r--r--conf/machine/at91sam9g20ek.conf4
-rw-r--r--conf/machine/at91sam9rlek.conf3
-rw-r--r--conf/machine/cm-x270.conf1
-rw-r--r--conf/machine/collie.conf24
-rw-r--r--conf/machine/davinci-dvevm.conf24
-rw-r--r--conf/machine/dm355-evm.conf7
-rw-r--r--conf/machine/dm355-leopard.conf8
-rw-r--r--conf/machine/dm357-evm.conf7
-rw-r--r--conf/machine/dm365-evm.conf7
-rw-r--r--conf/machine/dm6446-evm.conf7
-rw-r--r--conf/machine/dm6467-evm.conf7
-rw-r--r--conf/machine/ep93xx.conf10
-rw-r--r--conf/machine/geodegx.conf4
-rw-r--r--conf/machine/geodelx.conf15
-rw-r--r--conf/machine/include/davinci.inc25
-rw-r--r--conf/machine/include/initramfs-kexecboot.inc (renamed from conf/machine/include/kexecboot.inc)9
-rw-r--r--conf/machine/include/kirkwood.inc2
-rw-r--r--conf/machine/include/omap3.inc21
-rw-r--r--conf/machine/include/tune-ep9312.inc9
-rw-r--r--conf/machine/include/tune-geode.inc (renamed from conf/machine/include/tune-geodegx.inc)3
-rw-r--r--conf/machine/include/tune-geodelx.inc9
-rw-r--r--conf/machine/include/zaurus-2.6.inc28
-rw-r--r--conf/machine/include/zaurus-kernel.inc13
-rw-r--r--conf/machine/micro2440.conf20
-rw-r--r--conf/machine/mini2440.conf33
-rw-r--r--conf/machine/mpc8315e-rdb.conf6
-rw-r--r--conf/machine/mtx-1.conf2
-rw-r--r--conf/machine/mtx-2.conf2
-rw-r--r--conf/machine/mtx-3.conf15
-rw-r--r--conf/machine/mtx-3a.conf15
-rw-r--r--conf/machine/mx27ads.conf19
-rw-r--r--conf/machine/spitz.conf4
-rw-r--r--conf/machine/tosa.conf4
-rw-r--r--conf/machine/tqm8540.conf25
-rw-r--r--conf/machine/tx25.conf29
-rw-r--r--conf/machine/tx27.conf29
-rwxr-xr-xcontrib/angstrom/build-feeds.sh20
-rwxr-xr-xcontrib/angstrom/sort.sh9
-rw-r--r--contrib/angstrom/source-mirror.txt2
-rw-r--r--contrib/angstrom/upload-packages.sh4
-rwxr-xr-xcontrib/weekly-changelog-report.py2
-rw-r--r--docs/usermanual/chapters/getting_oe.xml2
-rw-r--r--docs/usermanual/reference/class_rootfs_ipkg.xml8
-rw-r--r--docs/usermanual/usermanual.xml2
-rw-r--r--files/device_table_add-s3c_serial.txt2
-rw-r--r--recipes/acpid/acpid/event.c.diff43
-rw-r--r--recipes/acpid/acpid/fixfd.diff12
-rw-r--r--recipes/acpid/acpid/netlink.diff2797
-rw-r--r--recipes/acpid/acpid_1.0.8.bb6
-rw-r--r--recipes/alsa/alsa-lib_1.0.19.bb48
-rw-r--r--recipes/alsa/alsa-lib_1.0.20.bb48
-rw-r--r--recipes/alsa/alsa-plugins_1.0.19.bb20
-rw-r--r--recipes/alsa/alsa-scenario_0.2.bb14
-rw-r--r--recipes/alsa/alsa-scenario_git.bb6
-rw-r--r--recipes/alsa/alsa-state.bb2
-rw-r--r--recipes/alsa/alsa-state/angstrom/asound.conf2
-rw-r--r--recipes/alsa/alsa-utils-1.0.19/alsa-utils-remove-xmlto.patch18
-rw-r--r--recipes/alsa/alsa-utils_1.0.18.bb3
-rw-r--r--recipes/alsa/alsa-utils_1.0.19.bb66
-rw-r--r--recipes/angstrom/angstrom-gpe-task-base.bb2
-rw-r--r--recipes/angstrom/angstrom-led-config.bb2
-rw-r--r--recipes/angstrom/angstrom-led-config/sheevaplug/leds2
-rw-r--r--recipes/angstrom/angstrom-x11-base-depends.bb3
-rw-r--r--recipes/angstrom/e-wm-config-angstrom.bb38
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/e.src903
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/icon.png (renamed from recipes/angstrom/e-wm-config-angstrom/icon.png)bin4645 -> 4645 bytes
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.battery.src7
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.cpufreq.src (renamed from recipes/angstrom/e-wm-config-angstrom/module.cpufreq.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.dropshadow.src7
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.fileman.src (renamed from recipes/angstrom/e-wm-config-angstrom/module.fileman.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.gadman.src9
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.ibar.src (renamed from recipes/angstrom/e-wm-config-angstrom/module.ibar.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.ibox.src (renamed from recipes/angstrom/e-wm-config-angstrom/module.ibox.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.illume.src18
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.mixer.src13
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.pager.src15
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.places.src25
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.temperature.src (renamed from recipes/angstrom/e-wm-config-angstrom/module.temperature.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/profile.desktop5
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/e.src2154
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/icon.pngbin0 -> 4645 bytes
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.battery.src (renamed from recipes/angstrom/e-wm-config-angstrom/module.battery.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.cpufreq.src6
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.dropshadow.src (renamed from recipes/angstrom/e-wm-config-angstrom/module.dropshadow.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.fileman.src28
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.ibar.src18
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.ibox.src20
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.pager.src (renamed from recipes/angstrom/e-wm-config-angstrom/module.pager.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.places.src25
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.temperature.src13
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/profile.desktop5
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/e.src (renamed from recipes/angstrom/e-wm-config-angstrom/e.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/icon.pngbin0 -> 4645 bytes
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.battery.src6
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.cpufreq.src6
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.dropshadow.src7
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.fileman.src28
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.ibar.src18
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.ibox.src20
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.pager.src15
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.places.src (renamed from recipes/angstrom/e-wm-config-angstrom/module.places.src)0
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.temperature.src13
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/configs/angstrom/profile.desktop5
-rw-r--r--recipes/angstrom/e-wm-config-angstrom/profile.desktop5
-rw-r--r--recipes/anki/anki.inc2
-rw-r--r--recipes/anki/anki_0.4.3.bb2
-rw-r--r--recipes/anki/libanki_0.4.3.bb2
-rw-r--r--recipes/atd/atd_0.70.bb4
-rw-r--r--recipes/atd/atd_0.80.bb4
-rw-r--r--recipes/autoconf/autoconf-2.63/autoconf-x.patch36
-rw-r--r--recipes/autoconf/autoconf-2.63/autoconf259-update-configscripts.patch393
-rw-r--r--recipes/autoconf/autoconf-2.63/autoheader-nonfatal-warnings.patch13
-rw-r--r--recipes/autoconf/autoconf-2.63/autoreconf-exclude.patch123
-rw-r--r--recipes/autoconf/autoconf-2.63/autoreconf-foreign.patch11
-rw-r--r--recipes/autoconf/autoconf-2.63/autoreconf-gnuconfigize.patch30
-rw-r--r--recipes/autoconf/autoconf-2.63/config-site.patch11
-rw-r--r--recipes/autoconf/autoconf-2.63/fix_path_xtra.patch113
-rw-r--r--recipes/autoconf/autoconf-2.63/path_prog_fixes.patch126
-rw-r--r--recipes/autoconf/autoconf-2.63/program_prefix.patch19
-rw-r--r--recipes/autoconf/autoconf-2.63/sizeof_types.patch87
-rw-r--r--recipes/autoconf/autoconf-native_2.63.bb11
-rw-r--r--recipes/autoconf/autoconf_2.63.bb16
-rw-r--r--recipes/avahi/avahi.inc2
-rw-r--r--recipes/avahi/avahi_0.6.24.bb2
-rw-r--r--recipes/base-files/base-files/mtx-2/fstab9
-rw-r--r--recipes/base-files/base-files/mtx-2/profile25
-rw-r--r--recipes/base-files/base-files/nylon/fstab (renamed from recipes/base-files/base-files/mtx-1/fstab)0
-rw-r--r--recipes/base-files/base-files/nylon/profile (renamed from recipes/base-files/base-files/mtx-1/profile)13
-rw-r--r--recipes/base-files/base-files/profile2
-rw-r--r--recipes/base-files/base-files_3.0.14.bb85
-rw-r--r--recipes/base-passwd/base-passwd_3.5.20.bb27
-rw-r--r--recipes/binutils/binutils-2.14.90.0.7/binutils-2.14.90.0.7-fix-broken-configure.patch78
-rw-r--r--recipes/binutils/binutils-2.19.51/110-arm-eabi-conf.patch22
-rw-r--r--recipes/binutils/binutils-2.19.51/binutils-2.16.1-e300c2c3.patch18
-rw-r--r--recipes/binutils/binutils-2.19.51/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch39
-rw-r--r--recipes/binutils/binutils-2.19.51/binutils-arm-pr7093.patch19
-rw-r--r--recipes/binutils/binutils-2.19.51/binutils-uclibc-100-uclibc-conf.patch34
-rw-r--r--recipes/binutils/binutils-2.19.51/binutils-uclibc-300-001_ld_makefile_patch.patch50
-rw-r--r--recipes/binutils/binutils-2.19.51/binutils-uclibc-300-006_better_file_error.patch43
-rw-r--r--recipes/binutils/binutils-2.19.51/binutils-uclibc-300-012_check_ldrunpath_length.patch47
-rw-r--r--recipes/binutils/binutils-2.19.51/binutils-uclibc-gas-needs-libm.patch38
-rw-r--r--recipes/binutils/binutils-2.19.51/binutils-x86_64_i386_biarch.patch26
-rw-r--r--recipes/binutils/binutils-2.19.51/ld-stub-crash.patch26
-rw-r--r--recipes/binutils/binutils-2.19.51/uclibc-segfault.patch23
-rw-r--r--recipes/binutils/binutils-cross-sdk.inc2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.14.90.0.6.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.14.90.0.7.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.15.94.0.1.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.16.91.0.6.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.16.91.0.7.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.17.50.0.12.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.18.50.0.7.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.18.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.19.1.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.19.51.0.3.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.19.bb2
-rw-r--r--recipes/binutils/binutils-cross-sdk_cvs.bb2
-rw-r--r--recipes/binutils/binutils-cross_2.18.50.0.7.bb1
-rw-r--r--recipes/binutils/binutils-cross_2.18.bb1
-rw-r--r--recipes/binutils/binutils-cross_2.19.1.bb1
-rw-r--r--recipes/binutils/binutils-cross_2.19.51.0.3.bb1
-rw-r--r--recipes/binutils/binutils-cross_2.19.51.bb4
-rw-r--r--recipes/binutils/binutils-cross_2.19.bb1
-rw-r--r--recipes/binutils/binutils_2.14.90.0.6.bb3
-rw-r--r--recipes/binutils/binutils_2.14.90.0.7.bb6
-rw-r--r--recipes/binutils/binutils_2.15.94.0.1.bb3
-rw-r--r--recipes/binutils/binutils_2.16.91.0.6.bb3
-rw-r--r--recipes/binutils/binutils_2.16.91.0.7.bb3
-rw-r--r--recipes/binutils/binutils_2.17.50.0.12.bb3
-rw-r--r--recipes/binutils/binutils_2.18.50.0.7.bb3
-rw-r--r--recipes/binutils/binutils_2.18.bb6
-rw-r--r--recipes/binutils/binutils_2.19.1.bb3
-rw-r--r--recipes/binutils/binutils_2.19.51.0.3.bb3
-rw-r--r--recipes/binutils/binutils_2.19.51.bb22
-rw-r--r--recipes/binutils/binutils_2.19.bb3
-rw-r--r--recipes/binutils/binutils_cvs.bb3
-rw-r--r--recipes/binutils/files/binutils-crunch.patch163
-rw-r--r--recipes/bluez/bluez-cups-backend_3.33.bb4
-rw-r--r--recipes/bluez/bluez-gstreamer-plugin_3.33.bb4
-rw-r--r--recipes/bluez/bluez-libs/avinfo-link.patch27
-rw-r--r--recipes/bluez/bluez-libs_4.42.bb4
-rw-r--r--recipes/bluez/bluez-utils-3.33/hciattach-ti-bts.patch3
-rw-r--r--recipes/bluez/bluez-utils-3.x/hciattach-ti-bts.patch3
-rw-r--r--recipes/bluez/bluez-utils-alsa_3.33.bb4
-rw-r--r--recipes/bluez/bluez-utils3.inc2
-rw-r--r--recipes/bluez/bluez-utils_3.33.bb4
-rw-r--r--recipes/bluez/bluez-utils_3.36.bb5
-rw-r--r--recipes/bluez/bluez4-libs.inc25
-rw-r--r--recipes/bluez/bluez4.inc68
-rw-r--r--recipes/bluez/bluez4_4.39.bb64
-rw-r--r--recipes/bluez/bluez4_4.41.bb4
-rw-r--r--recipes/bluez/bluez4_4.42.bb5
-rw-r--r--recipes/bluez/obexd_0.13.bb10
-rw-r--r--recipes/boost/boost-36.inc24
-rw-r--r--recipes/busybox/busybox-1.13.2/angstrom/defconfig4
-rw-r--r--recipes/busybox/busybox-1.13.2/defconfig2
-rw-r--r--recipes/busybox/busybox-1.13.2/micro/defconfig869
-rw-r--r--recipes/busybox/busybox-1.13.2/xargs-double-size.patch13
-rw-r--r--recipes/busybox/busybox-1.3.1/xargs-double-size.patch4
-rw-r--r--recipes/busybox/busybox-1.7.2/nylon/defconfig568
-rw-r--r--recipes/busybox/busybox-1.7.2/nylon/xargs-double-size.patch13
-rw-r--r--recipes/busybox/busybox-static_1.11.3.bb2
-rw-r--r--recipes/busybox/busybox.inc94
-rw-r--r--recipes/busybox/busybox_1.11.3.bb9
-rw-r--r--recipes/busybox/busybox_1.13.2.bb10
-rw-r--r--recipes/busybox/busybox_1.2.1.bb2
-rw-r--r--recipes/busybox/busybox_1.2.2.bb2
-rw-r--r--recipes/busybox/busybox_1.3.1.bb2
-rw-r--r--recipes/busybox/busybox_1.7.2.bb4
-rw-r--r--recipes/busybox/busybox_1.9.2.bb4
-rw-r--r--recipes/busybox/files/simple.script72
-rw-r--r--recipes/bwm-ng/bwm-ng_0.6.bb16
-rw-r--r--recipes/cellwriter/cellwriter_1.3.4.bb (renamed from recipes/cellwriter/cellwriter_1.3.3.bb)0
-rw-r--r--recipes/check/check_0.9.5.bb14
-rw-r--r--recipes/check/files/configure_fix.patch12
-rw-r--r--recipes/cherokee/cherokee-nossl_0.5.3.bb2
-rw-r--r--recipes/chromium/chromium_svn.bb2
-rw-r--r--recipes/clutter/clutter-0.9_git.bb21
-rw-r--r--recipes/clutter/clutter-gst-0.9_git.bb14
-rw-r--r--recipes/clutter/clutter-gst.inc6
-rw-r--r--recipes/clutter/clutter.inc9
-rw-r--r--recipes/clutter/clutter_0.8+git.bb7
-rw-r--r--recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch102
-rw-r--r--recipes/clutter/files/enable_tests.patch32
-rw-r--r--recipes/clutter/files/gtk-doc.make173
-rw-r--r--recipes/connman/connman.inc2
-rw-r--r--recipes/connman/connman_0.19.bb2
-rwxr-xr-xrecipes/connman/files/connman2
-rw-r--r--recipes/console-tools/console-tools_0.3.2.bb2
-rw-r--r--recipes/cppunit/cppunit_1.12.1.bb20
-rw-r--r--recipes/cups/cups.inc10
-rw-r--r--recipes/cups/cups_1.1.23.bb2
-rw-r--r--recipes/cups/cups_1.2.12.bb2
-rw-r--r--recipes/cups/cups_1.2.7.bb2
-rw-r--r--recipes/cups/cups_1.3.8.bb2
-rw-r--r--recipes/db/db3-native_3.2.9.bb1
-rw-r--r--recipes/dbus/dbus.inc2
-rw-r--r--recipes/dbus/dbus_1.2.1.bb2
-rw-r--r--recipes/device-mapper/device-mapper-1.02.28/devmap-mknod-busybox.patch9
-rw-r--r--recipes/device-mapper/device-mapper-1.02.28/remove_insanity.patch42
-rw-r--r--recipes/device-mapper/device-mapper_1.01.05.bb4
-rw-r--r--recipes/device-mapper/device-mapper_1.02.28.bb37
-rw-r--r--recipes/devicekit/devicekit-disks_004.bb18
-rw-r--r--recipes/devicekit/devicekit_003.bb14
-rw-r--r--recipes/devicekit/libatasmart_0.13.bb20
-rw-r--r--recipes/directfb/directfb-1.2.8/ts_lib_autotools.patch22
-rw-r--r--recipes/directfb/directfb_1.2.7.bb2
-rw-r--r--recipes/directfb/directfb_1.2.8.bb27
-rw-r--r--recipes/distcc/distcc_3.1.bb17
-rw-r--r--recipes/dsplink/gstreamer-ti_svn.bb57
-rw-r--r--recipes/dsplink/readme.txt10
-rw-r--r--recipes/dsplink/ti-codec-engine_2.23.bb394
-rw-r--r--recipes/dsplink/ti-dmai_svn.bb87
-rw-r--r--recipes/dvbtools/dvb-apps-1.1.1/makefile.patch89
-rw-r--r--recipes/dvbtools/dvb-apps-1.1.1/update-to-trunk.diff84310
-rw-r--r--recipes/dvbtools/dvb-apps_1.1.1.bb60
-rw-r--r--recipes/dvbtools/dvbstream_cvs.bb4
-rw-r--r--recipes/dvbtools/dvbtraffic.bb2
-rw-r--r--recipes/dvbtools/wscan_20080720.bb4
-rw-r--r--recipes/dvsdk/dsplink.inc (renamed from recipes/dsplink/dsplink.inc)0
-rwxr-xr-xrecipes/dvsdk/files/Makefile-dsplink-dsp (renamed from recipes/dsplink/files/Makefile-dsplink-dsp)0
-rwxr-xr-xrecipes/dvsdk/files/Makefile-dsplink-gpp (renamed from recipes/dsplink/files/Makefile-dsplink-gpp)0
-rw-r--r--recipes/dvsdk/files/cmem-class-device-27-and-sched-include-fix.patch (renamed from recipes/dsplink/files/cmem-class-device-27-and-sched-include-fix.patch)0
-rw-r--r--recipes/dvsdk/files/config.bld48
-rw-r--r--recipes/dvsdk/files/dm355mm_1_30.patch498
-rw-r--r--recipes/dvsdk/files/dmai-built-with-angstrom.patch (renamed from recipes/dsplink/files/dmai-built-with-angstrom.patch)0
-rw-r--r--recipes/dvsdk/files/dmai-do-not-panic-on-mixer-failure.patch (renamed from recipes/dsplink/files/dmai-do-not-panic-on-mixer-failure.patch)0
-rw-r--r--recipes/dvsdk/files/dmai-support-32bit-align.patch (renamed from recipes/dsplink/files/dmai-support-32bit-align.patch)0
-rw-r--r--recipes/dvsdk/files/dmai-update-cpu-name.patch (renamed from recipes/dsplink/files/dmai-update-cpu-name.patch)0
-rw-r--r--recipes/dvsdk/files/dmai-update-fb-display.patch (renamed from recipes/dsplink/files/dmai-update-fb-display.patch)0
-rw-r--r--recipes/dvsdk/files/dmai-update-v4l2-display.patch (renamed from recipes/dsplink/files/dmai-update-v4l2-display.patch)0
-rw-r--r--recipes/dvsdk/files/dsplink-128M.patch (renamed from recipes/dsplink/files/dsplink-128M.patch)0
-rw-r--r--recipes/dvsdk/files/dsplink-add-class-device-create-support.patch (renamed from recipes/dsplink/files/dsplink-add-class-device-create-support.patch)0
-rw-r--r--recipes/dvsdk/files/dsplink-semaphore-27.patch (renamed from recipes/dsplink/files/dsplink-semaphore-27.patch)0
-rw-r--r--recipes/dvsdk/files/dvsdk-rules/Makefile339
-rwxr-xr-xrecipes/dvsdk/files/dvsdk-rules/check.sh16
-rwxr-xr-xrecipes/dvsdk/files/dvsdk-rules/info.sh58
-rw-r--r--[-rwxr-xr-x]recipes/dvsdk/files/loadmodules-ti-codec-engine-apps.sh (renamed from recipes/dsplink/files/loadmodules-ti-codec-engine-apps.sh)0
-rwxr-xr-xrecipes/dvsdk/files/loadmodules-ti-dmai-apps.sh (renamed from recipes/dsplink/files/loadmodules-ti-dmai-apps.sh)0
-rwxr-xr-xrecipes/dvsdk/files/loadmodules-ti-dmai-dm355_al.sh23
-rwxr-xr-xrecipes/dvsdk/files/loadmodules-ti-dmai-dm6446_al.sh19
-rwxr-xr-xrecipes/dvsdk/files/loadmodules-ti-dmai-o3530_al.sh42
-rw-r--r--[-rwxr-xr-x]recipes/dvsdk/files/loadmodules-ti-dsplink-apps.sh (renamed from recipes/dsplink/files/loadmodules-ti-dsplink-apps.sh)0
-rw-r--r--recipes/dvsdk/files/lpm-device-create-and-semaphore-include-fix.patch (renamed from recipes/dsplink/files/lpm-device-create-and-semaphore-include-fix.patch)0
-rw-r--r--recipes/dvsdk/files/lpm-make-symbol-warnings-fix.patch (renamed from recipes/dsplink/files/lpm-make-symbol-warnings-fix.patch)0
-rwxr-xr-xrecipes/dvsdk/files/mapdmaqbin0 -> 7680 bytes
-rw-r--r--recipes/dvsdk/files/sdma-class-device-and-includes-fix.patch (renamed from recipes/dsplink/files/sdma-class-device-and-includes-fix.patch)0
-rw-r--r--[-rwxr-xr-x]recipes/dvsdk/files/unloadmodules-ti-codec-engine-apps.sh (renamed from recipes/dsplink/files/unloadmodules-ti-codec-engine-apps.sh)0
-rwxr-xr-xrecipes/dvsdk/files/unloadmodules-ti-dmai-apps.sh (renamed from recipes/dsplink/files/unloadmodules-ti-dmai-apps.sh)0
-rw-r--r--[-rwxr-xr-x]recipes/dvsdk/files/unloadmodules-ti-dsplink-apps.sh (renamed from recipes/dsplink/files/unloadmodules-ti-dsplink-apps.sh)0
-rw-r--r--recipes/dvsdk/gstreamer-ti/gst-buffsize.diff (renamed from recipes/dsplink/gstreamer-ti/gst-buffsize.diff)0
-rw-r--r--recipes/dvsdk/gstreamer-ti_svn.bb95
-rw-r--r--recipes/dvsdk/readme.txt5
-rw-r--r--recipes/dvsdk/ti-cgt6x-native_6.0.21.bb20
-rw-r--r--recipes/dvsdk/ti-cgt6x-sdk_6.0.21.bb26
-rw-r--r--recipes/dvsdk/ti-cgt6x.inc42
-rw-r--r--recipes/dvsdk/ti-cmem-module_2.23.1.bb67
-rw-r--r--recipes/dvsdk/ti-cmem-module_2.23.bb51
-rw-r--r--recipes/dvsdk/ti-codec-combo-dm355-sdk_1.13.bb34
-rw-r--r--recipes/dvsdk/ti-codec-combo-dm355.inc38
-rw-r--r--recipes/dvsdk/ti-codec-combo-dm355_1.13.bb35
-rw-r--r--recipes/dvsdk/ti-codec-combo-dm6446-sdk_2.05.bb31
-rw-r--r--recipes/dvsdk/ti-codec-combo-dm6446_2.05.bb32
-rw-r--r--recipes/dvsdk/ti-codec-combo-omap3530-sdk_3.16.1.bb35
-rw-r--r--recipes/dvsdk/ti-codec-combo-omap3530.inc46
-rw-r--r--recipes/dvsdk/ti-codec-combo-omap3530_3.16.1.bb57
-rw-r--r--recipes/dvsdk/ti-codec-combos_3.16.bb (renamed from recipes/dsplink/ti-codec-combos_3.16.bb)0
-rw-r--r--recipes/dvsdk/ti-codec-engine-sdk_2.23.1.bb50
-rw-r--r--recipes/dvsdk/ti-codec-engine_2.21.bb (renamed from recipes/dsplink/ti-codec-engine_2.21.bb)0
-rw-r--r--recipes/dvsdk/ti-codec-engine_2.23.1.bb30
-rw-r--r--recipes/dvsdk/ti-dm355mm-module_1.13.bb54
-rw-r--r--recipes/dvsdk/ti-dmai-sdk_svn.bb21
-rw-r--r--recipes/dvsdk/ti-dmai.inc16
-rw-r--r--recipes/dvsdk/ti-dmai_svn.bb105
-rw-r--r--recipes/dvsdk/ti-dspbios-native_5.33.02.bb19
-rw-r--r--recipes/dvsdk/ti-dspbios-sdk_5.33.02.bb26
-rw-r--r--recipes/dvsdk/ti-dspbios.inc40
-rw-r--r--recipes/dvsdk/ti-dsplink-module_1.61.3.bb156
-rw-r--r--recipes/dvsdk/ti-lpm-module_2.23.1.bb63
-rw-r--r--recipes/dvsdk/ti-paths.inc (renamed from recipes/dsplink/ti-paths.inc)4
-rw-r--r--recipes/dvsdk/ti-rules-make-sdk.bb63
-rw-r--r--recipes/dvsdk/ti-sdma-module_2.23.1.bb53
-rw-r--r--recipes/dvsdk/ti-xdctools-native_3.10.03.bb19
-rw-r--r--recipes/dvsdk/ti-xdctools-sdk_3.10.03.bb25
-rw-r--r--recipes/dvsdk/ti-xdctools.inc40
-rw-r--r--recipes/e17/bubble-keyboard_svn.bb11
-rw-r--r--recipes/e17/e-wm_svn.bb11
-rw-r--r--recipes/e17/essential-dialer_svn.bb3
-rw-r--r--recipes/e17/expedite_svn.bb4
-rw-r--r--recipes/e17/exquisite_svn.bb4
-rw-r--r--recipes/e17/gridpad_svn.bb11
-rw-r--r--recipes/e17/intuition_svn.bb11
-rw-r--r--recipes/e17/systray_svn.bb8
-rw-r--r--recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.35.bb1
-rw-r--r--recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.41.2.bb1
-rw-r--r--recipes/e2fsprogs-libs/e2fsprogs-libs.inc10
-rw-r--r--recipes/e2fsprogs-libs/e2fsprogs-libs_1.41.5.bb14
-rw-r--r--recipes/e2fsprogs-libs/files/mkinstalldirs.patch (renamed from recipes/e2fsprogs-libs/e2fsprogs-libs-1.41.2/mkinstalldirs.patch)0
-rw-r--r--recipes/e2fsprogs/e2fsprogs-native_1.38.bb2
-rw-r--r--recipes/e2fsprogs/e2fsprogs-native_1.41.2.bb9
-rw-r--r--recipes/e2fsprogs/e2fsprogs-native_1.41.5.bb18
-rw-r--r--recipes/e2fsprogs/e2fsprogs.inc5
-rw-r--r--recipes/e2fsprogs/e2fsprogs/mkinstalldirs.patch (renamed from recipes/e2fsprogs/e2fsprogs-1.41.4/mkinstalldirs.patch)0
-rw-r--r--recipes/e2fsprogs/e2fsprogs_1.41.5.bb125
-rw-r--r--recipes/e2tools/e2tools-native_0.0.16.bb1
-rw-r--r--recipes/efl1/ecore.inc2
-rw-r--r--recipes/efl1/edbus_svn.bb2
-rw-r--r--recipes/efl1/edje_svn.bb8
-rw-r--r--recipes/efl1/efreet_svn.bb2
-rw-r--r--recipes/efl1/eina_svn.bb7
-rw-r--r--recipes/efl1/embryo_svn.bb2
-rw-r--r--recipes/efl1/enhance_svn.bb2
-rw-r--r--recipes/efl1/evas.inc56
-rw-r--r--recipes/efl1/evolve_svn.bb2
-rw-r--r--recipes/efl1/ewl_svn.bb2
-rw-r--r--recipes/efl1/libefso_svn.bb3
-rw-r--r--recipes/eglibc/eglibc-initial.inc1
-rw-r--r--recipes/eglibc/eglibc-package.bbclass18
-rw-r--r--recipes/eglibc/eglibc.inc1
-rw-r--r--recipes/eglibc/eglibc_2.9.bb2
-rw-r--r--recipes/eglibc/eglibc_svn.bb2
-rw-r--r--recipes/ekiga/ekiga_3.2.4.bb18
-rw-r--r--recipes/ekiga/opal_3.6.2.bb29
-rw-r--r--recipes/ekiga/ptlib_2.6.2.bb30
-rw-r--r--recipes/elvis/elvis_2.2.0.bb3
-rw-r--r--recipes/emacs/emacs.inc21
-rw-r--r--recipes/emacs/emacs_22.3.bb2
-rw-r--r--recipes/enchant/enchant_1.3.0.bb7
-rw-r--r--recipes/fann/fann_2.0.0.bb11
-rw-r--r--recipes/fbprogress/fbprogress_1.1.bb19
-rw-r--r--recipes/ffmpeg/ffmpeg-0.5/ffmpeg-arm-update.diff495
-rw-r--r--recipes/ffmpeg/ffmpeg_0.5.bb3
-rw-r--r--recipes/ffmpeg/ffmpeg_git.bb2
-rw-r--r--recipes/ffmpeg/omapfbplay_git.bb4
-rw-r--r--recipes/figment/figment_0.3.5.bb3
-rw-r--r--recipes/flac/files/flac-gcc43-fixes.diff10
-rw-r--r--recipes/flac/files/flac-printf-format-fix.diff43
-rw-r--r--recipes/flac/flac.inc47
-rw-r--r--recipes/flac/flac_1.1.0.bb4
-rw-r--r--recipes/flac/flac_1.1.2.bb4
-rw-r--r--recipes/flac/flac_1.2.1.bb7
-rw-r--r--recipes/fltk/fltk_1.1.9.bb10
-rw-r--r--recipes/fontconfig/fontconfig_2.6.99.bb66
-rw-r--r--recipes/fping/files/sourceforge-truckload.patch257
-rw-r--r--recipes/fping/fping_2.3+2.4b2to.bb12
-rw-r--r--recipes/freesmartphone/frameworkd-devel_git.bb2
-rw-r--r--recipes/gammu/gammu-1.24.0/findmysql.patch35
-rw-r--r--recipes/gammu/gammu_1.24.0.bb42
-rw-r--r--recipes/gcc/gcc-3.3.4.inc2
-rw-r--r--recipes/gcc/gcc-3.4.3.inc2
-rw-r--r--recipes/gcc/gcc-3.4.4.inc2
-rw-r--r--recipes/gcc/gcc-4.1.0.inc2
-rw-r--r--recipes/gcc/gcc-4.1.1.inc2
-rw-r--r--recipes/gcc/gcc-4.1.2.inc2
-rw-r--r--recipes/gcc/gcc-4.2.1.inc1
-rw-r--r--recipes/gcc/gcc-4.2.1/fix-ICE-in-arm_unwind_emit_set.diff18
-rw-r--r--recipes/gcc/gcc-4.2.2.inc3
-rw-r--r--recipes/gcc/gcc-4.2.2/fix-ICE-in-arm_unwind_emit_set.diff18
-rw-r--r--recipes/gcc/gcc-4.2.3.inc3
-rw-r--r--recipes/gcc/gcc-4.2.3/fix-ICE-in-arm_unwind_emit_set.diff18
-rw-r--r--recipes/gcc/gcc-4.2.4.inc3
-rw-r--r--recipes/gcc/gcc-4.2.4/fix-ICE-in-arm_unwind_emit_set.diff18
-rw-r--r--recipes/gcc/gcc-4.3.1.inc3
-rw-r--r--recipes/gcc/gcc-4.3.1/fix-ICE-in-arm_unwind_emit_set.diff28
-rw-r--r--recipes/gcc/gcc-4.3.2.inc3
-rw-r--r--recipes/gcc/gcc-4.3.2/fix-ICE-in-arm_unwind_emit_set.diff28
-rw-r--r--recipes/gcc/gcc-4.3.2/zecke-no-host-includes.patch2
-rw-r--r--recipes/gcc/gcc-4.3.3.inc30
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/README11
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/URL1
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-20000320.patch13
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-arm_dbx_register_number.patch15
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-ccmav-mode.patch734
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cfcpy-with-cfsh64.patch27
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cftruncd32-attr.patch12
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cirrus-di-flag.patch248
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-disable-cmpdi.patch29
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-drop-thumb2.patch98
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch15
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch89
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-64bit-const-offsets.patch25
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-cirrus-reorg5.patch313
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-floatsi-no-scratch.patch35
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fp_consts.patch15
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-mieee.patch267
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-movsf-movdf-Uy.patch65
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-enable.patch31
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-protect.patch33
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-pipeline.patch461
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-readme.patch107
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-repair-truncxfsi.patch29
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-saveregs.patch88
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-scratch.patch27
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-prologue_use-length.patch10
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/arm-size-bugfix.patch33
-rw-r--r--recipes/gcc/gcc-4.3.3/ep93xx/series25
-rw-r--r--recipes/gcc/gcc-4.3.3/fix-ICE-in-arm_unwind_emit_set.diff28
-rw-r--r--recipes/gcc/gcc-4.3.3/zecke-no-host-includes.patch2
-rw-r--r--recipes/gcc/gcc-4.4.0.inc9
-rw-r--r--recipes/gcc/gcc-4.4.0/200-uclibc-locale.patch9
-rw-r--r--recipes/gcc/gcc-4.4.0/fix-ICE-in-arm_unwind_emit_set.diff28
-rw-r--r--recipes/gcc/gcc-4.4.0/zecke-no-host-includes.patch2
-rw-r--r--recipes/gcc/gcc-canadian-sdk_4.2.4.bb2
-rw-r--r--recipes/gcc/gcc-configure-common.inc3
-rw-r--r--recipes/gcc/gcc-cross-sdk_3.3.4.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_3.4.3.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_3.4.4.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.1.0.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.1.1.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.1.2.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.2.2.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.2.3.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.2.4.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.3.1.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.3.2.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.3.3.bb2
-rw-r--r--recipes/gcc/gcc-cross-sdk_4.4.0.bb2
-rw-r--r--recipes/gcc/gcc-cross_3.3.4.bb2
-rw-r--r--recipes/gcc/gcc-cross_3.4.3.bb2
-rw-r--r--recipes/gcc/gcc-cross_3.4.4.bb2
-rw-r--r--recipes/gcc/gcc-cross_4.1.0.bb2
-rw-r--r--recipes/gcc/gcc-cross_4.1.1.bb2
-rw-r--r--recipes/gcc/gcc-cross_4.1.2.bb2
-rw-r--r--recipes/gcc/gcc-cross_4.2.1.bb2
-rw-r--r--recipes/gcc/gcc-cross_4.2.2.bb2
-rw-r--r--recipes/gcc/gcc-cross_4.2.3.bb2
-rw-r--r--recipes/gcc/gcc-cross_4.3.1.bb2
-rw-r--r--recipes/gcc/gcc-cross_4.3.2.bb2
-rw-r--r--recipes/gcc/gcc-cross_4.4.0.bb2
-rw-r--r--recipes/gcc/gcc-native_3.4.4.bb2
-rw-r--r--recipes/gcc/gcc-package-cross.inc2
-rw-r--r--recipes/gcc/gcc-package-sdk.inc5
-rw-r--r--recipes/gcc/gcc_3.3.4.bb2
-rw-r--r--recipes/gcc/gcc_3.4.3.bb2
-rw-r--r--recipes/gcc/gcc_3.4.4.bb2
-rw-r--r--recipes/gcc/gcc_4.1.0.bb2
-rw-r--r--recipes/gcc/gcc_4.1.1.bb2
-rw-r--r--recipes/gcc/gcc_4.1.2.bb2
-rw-r--r--recipes/gcc/gcc_4.2.1.bb2
-rw-r--r--recipes/gcc/gcc_4.2.2.bb2
-rw-r--r--recipes/gcc/gcc_4.2.3.bb2
-rw-r--r--recipes/gcc/gcc_4.3.1.bb2
-rw-r--r--recipes/gcc/gcc_4.3.2.bb2
-rw-r--r--recipes/gcc/gcc_4.4.0.bb2
-rw-r--r--recipes/gdb/gdbserver.inc10
-rw-r--r--recipes/gdb/gdbserver_6.7.1.bb4
-rw-r--r--recipes/gdb/gdbserver_6.8.bb4
-rw-r--r--recipes/geda/geda-docs_1.4.3.bb (renamed from recipes/geda/geda-docs_1.4.1.bb)0
-rw-r--r--recipes/geda/geda-examples_1.4.3.bb (renamed from recipes/geda/geda-examples_1.4.1.bb)0
-rw-r--r--recipes/geda/geda-gattrib_1.4.3.bb (renamed from recipes/geda/geda-gattrib_1.4.1.bb)0
-rw-r--r--recipes/geda/geda-gnetlist_1.4.3.bb (renamed from recipes/geda/geda-gnetlist_1.4.1.bb)0
-rw-r--r--recipes/geda/geda-gschem_1.4.3.bb (renamed from recipes/geda/geda-gschem_1.4.1.bb)0
-rw-r--r--recipes/geda/geda-gsymcheck_1.4.3.bb (renamed from recipes/geda/geda-gsymcheck_1.4.1.bb)0
-rw-r--r--recipes/geda/geda-symbols_1.4.3.bb (renamed from recipes/geda/geda-symbols_1.4.1.bb)0
-rw-r--r--recipes/geda/geda-utils_1.4.3.bb (renamed from recipes/geda/geda-utils_1.4.1.bb)0
-rw-r--r--recipes/geda/geda_1.4.3.bb (renamed from recipes/geda/geda_1.4.1.bb)0
-rw-r--r--recipes/geda/libgeda_1.4.3.bb (renamed from recipes/geda/libgeda_1.4.1.bb)0
-rw-r--r--recipes/genext2fs/genext2fs-native_1.3.bb1
-rw-r--r--recipes/geoclue/files/gtk-doc.make173
-rw-r--r--recipes/geoclue/geoclue_git.bb37
-rw-r--r--recipes/gimp/gimp_2.6.3.bb2
-rw-r--r--recipes/glibc/files/arm-check-pf.patch14
-rw-r--r--recipes/glibc/files/arm-lowlevellock-include-tls.patch12
-rw-r--r--recipes/glibc/files/local-args6.diff12
-rw-r--r--recipes/glibc/glibc-2.3.2/allow-gcc.patch70
-rw-r--r--recipes/glibc/glibc-2.3.2/mips-abio32.patch12
-rw-r--r--recipes/glibc/glibc-2.3.3/allow-gcc.patch70
-rw-r--r--recipes/glibc/glibc-2.3.3/etc/ld.so.conf2
-rw-r--r--recipes/glibc/glibc-2.3.3/mips-abio32.patch12
-rw-r--r--recipes/glibc/glibc-2.4/glibc-crunch-eabi-force.patch133
-rw-r--r--recipes/glibc/glibc-2.4/glibc-crunch-eabi-fraiseexcpt.patch88
-rw-r--r--recipes/glibc/glibc-2.4/glibc-crunch-eabi-setjmp_longjmp.patch112
-rw-r--r--recipes/glibc/glibc-2.4/glibc-crunch-eabi-unwind.patch12
-rw-r--r--recipes/glibc/glibc-2.4/glibc-crunch-eabi.patch461
-rw-r--r--recipes/glibc/glibc-2.4/glibc-crunch-endian-bigword-littlebyte.patch40
-rw-r--r--recipes/glibc/glibc-2.4/glibc-crunch-endian-littleword-littlebyte.patch40
-rw-r--r--recipes/glibc/glibc-2.4/glibc-crunch-oabi.patch310
-rw-r--r--recipes/glibc/glibc-2.4/glibc-crunch-oabi2.patch18
-rw-r--r--recipes/glibc/glibc-cvs-2.3.5/etc/ld.so.conf2
-rw-r--r--recipes/glibc/glibc-initial.inc2
-rw-r--r--recipes/glibc/glibc-initial_2.2.5.bb1
-rw-r--r--recipes/glibc/glibc-initial_2.3.2+cvs20040726.bb1
-rw-r--r--recipes/glibc/glibc-initial_2.3.2.bb1
-rw-r--r--recipes/glibc/glibc-initial_2.3.6.bb2
-rw-r--r--recipes/glibc/glibc-initial_2.6.1.bb2
-rw-r--r--recipes/glibc/glibc-initial_cvs.bb3
-rw-r--r--recipes/glibc/glibc-package.bbclass29
-rw-r--r--recipes/glibc/glibc_2.3.2.bb5
-rw-r--r--recipes/glibc/glibc_2.3.3.bb5
-rw-r--r--recipes/glibc/glibc_2.3.5+cvs20050627.bb4
-rw-r--r--recipes/glibc/glibc_2.3.6.bb2
-rw-r--r--recipes/glibc/glibc_2.6.1.bb11
-rw-r--r--recipes/glibc/glibc_2.7.bb5
-rw-r--r--recipes/glibc/glibc_2.9.bb8
-rw-r--r--recipes/gnash/gnash-minimal.inc2
-rw-r--r--recipes/gnash/gnash.inc2
-rw-r--r--recipes/gnet/files/configure_fix.patch58
-rw-r--r--recipes/gnet/files/pkgconfig_fix.patch12
-rw-r--r--recipes/gnet/gnet_svn.bb15
-rw-r--r--recipes/gnome-mplayer/gnome-mplayer.inc11
-rw-r--r--recipes/gnome-mplayer/gnome-mplayer_0.5.3.bb15
-rw-r--r--recipes/gnome-mplayer/gnome-mplayer_0.9.5.bb3
-rw-r--r--recipes/gnome-mplayer/gnome-mplayer_cvs.bb23
-rw-r--r--recipes/gnome-mplayer/gnome-mplayer_svn.bb17
-rw-r--r--recipes/gnome/files/gtk-doc.make79
-rw-r--r--recipes/gnome/gnome-bluetooth_git.bb28
-rw-r--r--recipes/gnome/gnome-vfs_2.22.0.bb2
-rw-r--r--recipes/gnome/gnote_0.5.0.bb8
-rw-r--r--recipes/gnome/libgnomeprintui_2.18.3.bb3
-rw-r--r--recipes/gnome/libsoup-2.4_2.26.2.bb (renamed from recipes/gnome/libsoup-2.4_2.26.0.bb)2
-rw-r--r--recipes/gnome/zenity_2.26.0.bb11
-rw-r--r--recipes/gnumeric/gnumeric_1.8.2.bb31
-rw-r--r--recipes/gnumeric/gnumeric_1.8.4.bb (renamed from recipes/gnumeric/gnumeric_1.8.3.bb)2
-rw-r--r--recipes/gnuradio/gnuradio-3.1.2/gcc43.patch900
-rw-r--r--recipes/gnuradio/gnuradio-3.1.2/no-trellis-doc.patch20
-rw-r--r--recipes/gnuradio/gnuradio.inc39
-rw-r--r--recipes/gnuradio/gnuradio_3.0.4.bb8
-rw-r--r--recipes/gnuradio/gnuradio_3.1.2.bb10
-rw-r--r--recipes/gnuradio/gnuradio_3.1.3.bb7
-rw-r--r--recipes/gnuradio/gnuradio_3.2.0.bb22
-rw-r--r--recipes/gnuradio/gnuradio_svn.bb9
-rw-r--r--recipes/gnutls/gnutls.inc2
-rw-r--r--recipes/gpe-dm/gpe-dm_0.52.bb13
-rw-r--r--recipes/gpe-login/files/no-deprecated-sysfs.patch17
-rw-r--r--recipes/gpe-login/gpe-login_0.95.bb7
-rw-r--r--recipes/gpe-session-scripts/gpe-session-scripts_0.67.bb6
-rw-r--r--recipes/gpe-session-scripts/gpe-session-scripts_0.68.bb6
-rw-r--r--recipes/gpephone/libidn_0.5.19.bb8
-rw-r--r--recipes/gphoto2/ptp-gadget/0001-Fix-musb_hdrc-EP_STATUS_NAME.patch33
-rw-r--r--recipes/gphoto2/ptp-gadget_git.bb31
-rw-r--r--recipes/gpsbabel/gpsbabel-1.3.6/autotools.patch13
-rw-r--r--recipes/gpsbabel/gpsbabel_1.3.6.bb3
-rw-r--r--recipes/granule/granule.inc2
-rw-r--r--recipes/granule/granule_1.2.4.bb4
-rw-r--r--recipes/granule/granule_1.4.0.bb4
-rw-r--r--recipes/granule/libassa_3.5.0.bb (renamed from recipes/granule/libassa_3.4.2.bb)3
-rw-r--r--recipes/grub/grub-0.93/autohell.patch166
-rw-r--r--recipes/grub/grub-0.93/memcpy.patch13
-rw-r--r--recipes/grub/grub-0.93/reiserfs.patch11
-rw-r--r--recipes/grub/grub_0.93.bb15
-rw-r--r--recipes/grub/grub_0.97.bb36
-rw-r--r--recipes/gstreamer/gst-plugins-bad_0.10.11.bb12
-rw-r--r--recipes/gstreamer/gst-plugins-bad_0.10.6.bb3
-rw-r--r--recipes/gstreamer/gst-plugins-base_0.10.17.bb2
-rw-r--r--recipes/gstreamer/gst-plugins-base_0.10.22.bb2
-rw-r--r--recipes/gstreamer/gst-plugins-base_0.10.23.bb12
-rw-r--r--recipes/gstreamer/gst-plugins-good_0.10.13.bb2
-rw-r--r--recipes/gstreamer/gst-plugins-good_0.10.14.bb11
-rw-r--r--recipes/gstreamer/gst-plugins-ugly-sid_0.10.7.bb11
-rw-r--r--recipes/gstreamer/gst-plugins-ugly_0.10.10.bb10
-rw-r--r--recipes/gstreamer/gst-plugins-ugly_0.10.11.bb18
-rw-r--r--recipes/gstreamer/gst-plugins.inc6
-rw-r--r--recipes/gstreamer/gstreamer_0.10.23.bb6
-rw-r--r--recipes/gtk+/gtk+.inc1
-rw-r--r--recipes/gtk-engines/gtk-engines_2.18.1.bb34
-rw-r--r--recipes/gtk-webcore/midori_0.1.7.bb31
-rw-r--r--recipes/gtk-webcore/midori_git.bb11
-rw-r--r--recipes/gtksourceview/gtksourceview2_2.6.0.bb18
-rw-r--r--recipes/guile/guile-native.inc132
-rw-r--r--recipes/guile/guile-native_1.8.2.bb2
-rw-r--r--recipes/guile/guile-native_1.8.5.bb137
-rw-r--r--recipes/guile/guile-native_1.8.6.bb4
-rw-r--r--recipes/guile/guile.inc45
-rw-r--r--recipes/guile/guile_1.8.5.bb46
-rw-r--r--recipes/guile/guile_1.8.6.bb6
-rw-r--r--recipes/h2200-bootloader/h2200-bootloader.bb4
-rw-r--r--recipes/hal/consolekit_0.3.0.bb6
-rw-r--r--recipes/hal/hal-cups-utils_0.6.19.bb23
-rw-r--r--recipes/hal/hal-info_20090414.bb1
-rw-r--r--recipes/hal/hal.inc4
-rw-r--r--recipes/hal/hal_0.5.12.bb11
-rw-r--r--recipes/hostap/files/hostap-no-bsd.patch19
-rw-r--r--recipes/hostap/hostap-daemon_0.4.4.bb4
-rw-r--r--recipes/hostap/hostap-daemon_0.5.10.bb4
-rw-r--r--recipes/icu/files/rematch-gcc-bug.patch12
-rw-r--r--recipes/icu/icu_3.6.bb3
-rw-r--r--recipes/imagemagick/imagemagick_6.4.4-1.bb10
-rw-r--r--recipes/images/beagleboard-demo-image.bb2
-rw-r--r--recipes/images/micro-base-image.bb19
-rw-r--r--recipes/images/micro-image.bb4
-rw-r--r--recipes/images/nylon-image-base.bb27
-rw-r--r--recipes/images/nylon-image-extended.bb1
-rw-r--r--recipes/images/nylon-image-standard.bb12
-rw-r--r--recipes/images/opie-image.bb3
-rw-r--r--recipes/images/x11-jvm-image.bb41
-rw-r--r--recipes/initrdscripts/files/init.sh6
-rw-r--r--recipes/initrdscripts/initramfs-module-kexecboot_1.0.bb2
-rw-r--r--recipes/initrdscripts/initramfs-module-psplash_1.0.bb4
-rw-r--r--recipes/initrdscripts/initramfs-uniboot_1.0.bb2
-rw-r--r--recipes/initscripts/initscripts-1.0/banner16
-rwxr-xr-xrecipes/initscripts/initscripts-1.0/bootmisc.sh2
-rw-r--r--recipes/initscripts/initscripts-1.0/slugos/banner4
-rw-r--r--recipes/initscripts/initscripts-openprotium_1.0.bb2
-rw-r--r--recipes/initscripts/initscripts_1.0.bb2
-rw-r--r--recipes/iproute2/iproute2-2.6.29/compilation-fix.patch12
-rw-r--r--recipes/iproute2/iproute2-2.6.29/new-flex-fix.patch83
-rw-r--r--recipes/iproute2/iproute2_2.6.29.bb11
-rw-r--r--recipes/iptraf/iptraf-3.0.0/support-makefile.patch18
-rw-r--r--recipes/iptraf/iptraf_3.0.0.bb34
-rw-r--r--recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff18
-rw-r--r--recipes/iputils/iputils_20071127.bb8
-rw-r--r--recipes/irda-utils/irda-utils/sbindir.patch40
-rw-r--r--recipes/irda-utils/irda-utils_0.9.16.bb5
-rw-r--r--recipes/irssi/irssi_0.8.13.bb61
-rw-r--r--recipes/jamvm/jamvm-native_1.5.2.bb4
-rw-r--r--recipes/jamvm/jamvm-native_1.5.3.bb6
-rw-r--r--recipes/jards/jards_1.0.bb4
-rw-r--r--recipes/justreader/files/correct-settings-path.patch1
-rw-r--r--recipes/kakasi/kakasi-native_2.3.4.bb2
-rw-r--r--recipes/kanatest/kanatest.inc11
-rw-r--r--recipes/kanatest/kanatest_0.3.6.bb9
-rw-r--r--recipes/kanatest/kanatest_0.4.8.bb3
-rw-r--r--recipes/kexec/files/kexec2-klibc.patch21
-rw-r--r--recipes/kexec/kexec-tools-klibc-static_1.101.bb (renamed from recipes/kexec/kexec-tools-static_1.101.bb)7
-rw-r--r--recipes/kexec/kexec-tools-klibc-static_2.0.0.bb (renamed from recipes/kexec/kexec-tools-static_2.0.0.bb)6
-rw-r--r--recipes/kexecboot/kexecboot.inc2
-rw-r--r--recipes/kexecboot/kexecboot_0.4.bb2
-rw-r--r--recipes/kexecboot/kexecboot_0.5.bb2
-rw-r--r--recipes/kexecboot/linux-kexecboot-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch15
-rw-r--r--recipes/kexecboot/linux-kexecboot.inc4
-rw-r--r--recipes/kexecboot/linux-kexecboot_2.6.24.bb1
-rw-r--r--recipes/keymaps/keymaps_1.0.bb2
-rw-r--r--recipes/kismet/files/fix_strip.patch (renamed from recipes/kismet/kismet-2007-10-R1/fix_strip.patch)0
-rw-r--r--recipes/kismet/kismet-2007-10-R1/string_h.patch36
-rw-r--r--recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-crash.diff20
-rw-r--r--recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-fmt.diff11
-rw-r--r--recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-infinite-loop.diff20
-rw-r--r--recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-nonvoid.diff10
-rw-r--r--recipes/kismet/kismet_2007-10-R1.bb3
-rw-r--r--recipes/kismet/kismet_2008-05-R1.bb10
-rw-r--r--recipes/krb/files/copyperms.patch12
-rw-r--r--recipes/krb/krb5_1.6.3.bb8
-rw-r--r--recipes/libaio/libaio-oracle_0.3.0.bb4
-rw-r--r--recipes/libdlo/kernel-module-udlfb.bb19
-rw-r--r--recipes/libdlo/kernel-module-udlfb/Makefile15
-rw-r--r--recipes/libdlo/kernel-module-udlfb/udlfb.c938
-rw-r--r--recipes/libdlo/kernel-module-udlfb/udlfb.h225
-rw-r--r--recipes/libdlo/libdlo_git.bb21
-rw-r--r--recipes/libidn/libidn_1.15.bb19
-rw-r--r--recipes/libmicrohttpd/libmicrohttpd_0.4.2.bb15
-rw-r--r--recipes/libnl/files/netlink-local-fix.patch12
-rw-r--r--recipes/libnl/libnl_1.1.bb1
-rw-r--r--recipes/libnss-mdns/libnss-mdns_0.10.bb33
-rw-r--r--recipes/libopie/libopie2/rotate_fix.patch87
-rw-r--r--recipes/libopie/libopie2_1.2.4.bb5
-rw-r--r--recipes/libpcre/libpcre_7.6.bb21
-rw-r--r--recipes/librsvg/librsvg_2.26.0.bb33
-rw-r--r--recipes/libsamplerate/libsamplerate0_0.1.7.bb14
-rw-r--r--recipes/libsdl/libsdl-gfx_2.0.17.bb1
-rw-r--r--recipes/libsdl/libsdl-ttf_2.0.3.bb2
-rw-r--r--recipes/libsndfile/libsndfile1_1.0.20.bb21
-rw-r--r--recipes/libusb/libusb-compat-0.1.0/gcc-3-compatibility.patch22
-rw-r--r--recipes/libusb/libusb-compat_0.1.0.bb3
-rw-r--r--recipes/libusb/libusb1-1.0.0/gcc-3-compatibility.patch22
-rw-r--r--recipes/libusb/libusb1-1.0.1/gcc-3-compatibility.patch33
-rw-r--r--recipes/libusb/libusb1_1.0.0.bb2
-rw-r--r--recipes/libusb/libusb1_1.0.1.bb28
-rw-r--r--recipes/libxine/libxine_1.1.16.3.bb39
-rw-r--r--recipes/linphone/linphone_1.3.99.8.bb2
-rw-r--r--recipes/linux-firmware/linux-firmware_git.bb22
-rw-r--r--recipes/linux-firmware/zd1211-firmware_1.4.bb20
-rw-r--r--recipes/linux-hotplug/linux-hotplug-20040920/hotplug-binary-path.patch20
-rw-r--r--recipes/linux-hotplug/linux-hotplug_20040920.bb3
-rw-r--r--recipes/linux-libc-headers/linux-libc-headers_2.6.18+2.6.19-rc1.bb11
-rw-r--r--recipes/linux-libc-headers/linux-libc-headers_2.6.18.bb11
-rw-r--r--recipes/linux/c7x0-kernels-2.4-embedix.bb5
-rw-r--r--recipes/linux/collie-kernels-2.4-embedix.bb6
-rw-r--r--recipes/linux/corgi-kernel-2.4-embedix.bb2
-rw-r--r--recipes/linux/husky-kernel-2.4-embedix.bb2
-rw-r--r--recipes/linux/linux-2.6.28/tx27/defconfig1791
-rw-r--r--recipes/linux/linux-2.6.28/tx27/linux-2.6.28-karo4.diff40137
-rw-r--r--recipes/linux/linux-2.6.29/at2440evb/defconfig1565
-rw-r--r--recipes/linux/linux-2.6.29/tqm8540/defconfig1258
-rw-r--r--recipes/linux/linux-2.6.30/mpc8315e-rdb/defconfig1766
-rw-r--r--recipes/linux/linux-2.6.30/mpc8315e-rdb/mpc8315erdb-add-msi-to-dts.patch29
-rw-r--r--recipes/linux/linux-2.6.30/mx27ads/defconfig1105
-rw-r--r--recipes/linux/linux-2.6.30/tx25/defconfig1203
-rw-r--r--recipes/linux/linux-2.6.30/tx25/linux-2.6.30-rc4-karo.diff17631
-rw-r--r--recipes/linux/linux-davinci/dm355-evm/defconfig1223
-rw-r--r--recipes/linux/linux-davinci/dm355-leopard/defconfig544
-rw-r--r--recipes/linux/linux-davinci/dm6446-evm/defconfig1738
-rw-r--r--recipes/linux/linux-davinci/dm6467-evm/defconfig1241
-rw-r--r--recipes/linux/linux-davinci/update-mach-types.patch2
-rw-r--r--recipes/linux/linux-davinci_2.6.25.bb2
-rw-r--r--recipes/linux/linux-davinci_2.6.27.bb2
-rw-r--r--recipes/linux/linux-davinci_2.6.28.bb4
-rw-r--r--recipes/linux/linux-davinci_git.bb26
-rw-r--r--recipes/linux/linux-hackndev-2.6_git.bb5
-rw-r--r--recipes/linux/linux-handhelds-2.6-2.6.21/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch34
-rw-r--r--recipes/linux/linux-handhelds-2.6_2.6.21-hh20.bb3
-rw-r--r--recipes/linux/linux-kirkwood/0001--ARM-Kirkwood-CPU-idle-driver.patch162
-rw-r--r--recipes/linux/linux-kirkwood/0002--ARM-Kirkwood-peripherals-clock-gating-for-power-m.patch131
-rw-r--r--recipes/linux/linux-kirkwood/defconfig295
-rw-r--r--recipes/linux/linux-kirkwood_2.6.29.5.bb (renamed from recipes/linux/linux-kirkwood_2.6.29.2.bb)7
-rw-r--r--recipes/linux/linux-mini2440-2.6.29+git/defconfig-mini24402122
-rw-r--r--recipes/linux/linux-mini2440-2.6.30+git/defconfig-mini24402062
-rw-r--r--recipes/linux/linux-mini2440_2.6.29+git.bb25
-rw-r--r--recipes/linux/linux-mini2440_2.6.30+git.bb28
-rw-r--r--recipes/linux/linux-mtx-1-2.4.27/06-zboot-2.4.26.patch9
-rw-r--r--recipes/linux/linux-mtx-1-2.4.27/32-usbserial-stalled-hack.diff4
-rw-r--r--recipes/linux/linux-mtx-1-2.4.27/33-usbserial-bulk_in_size-4096.diff106
-rw-r--r--recipes/linux/linux-mtx-1-2.4.27/43-usbserial-27-32-backport.diff33
-rw-r--r--recipes/linux/linux-mtx-1-2.4.27/45-acm-tty-and-sb2.patch721
-rw-r--r--recipes/linux/linux-mtx-1_2.4.27.bb12
-rw-r--r--recipes/linux/linux-mtx-2-2.4.27/06-zboot-2.4.26.patch9
-rw-r--r--recipes/linux/linux-mtx-2_2.4.27.bb8
-rw-r--r--recipes/linux/linux-omap-2.6.29/0001-implement-TIF_RESTORE_SIGMASK-support-and-enable-the.patch287
-rw-r--r--recipes/linux/linux-omap-2.6.29/beagleboard/defconfig274
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch6
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch4
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch85
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch230
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch35
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch32
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch56
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch97
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch34
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch106
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch65
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch82
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch35
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch216
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch92
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch29
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch65
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch125
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0070-DSS2-fix-irq1.diff221
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0071-DSS2-fix-irq2.diff35
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/0124-leds-gpio-broken-with-current-git.patch79
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/beagleboard/defconfig2705
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/beagleboard/ehci.patch131
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/beagleboard/logo_linux_clut224.ppm73147
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch39
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch1297
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch14450
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch3403
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch396
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch1079
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch5691
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch39
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch778
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch28
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch37
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch65
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch41
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch51
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch68
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch58
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch103
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch40
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch183
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch79
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch96
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch27
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch214
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch48
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch28
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch78
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch324
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch236
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch61
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch29
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch33
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch35
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch82
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch135
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch66
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch118
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch150
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch56
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch59
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch97
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch71
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch34
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch170
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch76
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch48
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch26
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch44
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch123
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch101
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch53
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch170
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch34
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch41
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch85
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch230
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch35
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch32
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch56
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch97
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch34
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch106
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch65
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch82
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch35
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch216
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch92
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch29
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch65
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch125
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0070-DSS2-fix-irq1.diff221
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/0071-DSS2-fix-irq2.diff35
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/dss2/merge-fixups.diff49
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/ehci.patch0
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/evm-mcspi-ts.diff132
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/fix-audio-capture.patch51
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/fix-install.patch23
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/no-cortex-deadlock.patch77
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/no-empty-flash-warnings.patch15
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/omap1710h3/defconfig1224
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/omap2420h4/defconfig1119
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/omap2430sdp/defconfig1303
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/omap3-pandora/defconfig2186
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/omap3evm/defconfig2217
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/omap3evm/omap3evm-dss2.diff443
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/omap3evm/omap3evm-lcd-redtint.diff66
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/omap5912osk/defconfig1098
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/overo-cpufreq.diff25
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/overo/defconfig2250
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/overo/ehci.patch113
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/read_die_ids.patch23
-rw-r--r--recipes/linux/linux-omap-pm-2.6.29/register-all-OPPs.diff12
-rw-r--r--recipes/linux/linux-omap-pm/beagleboard/defconfig921
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0004-DSS2-OMAP-framebuffer-driver.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0005-DSS2-Add-panel-drivers.patch6
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0009-DSS2-Add-acx565akm-panel.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0012-DSS2-Fix-DMA-rotation.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0021-DSS2-Add-venc-register-dump.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0022-DSS2-FB-remove-unused-var-warning.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0033-DSS2-Prefer-3-tap-filter.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0045-DSS2-Fixed-line-endings-from-to.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch4
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0054-DSS2-DSI-more-error-handling.patch85
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0055-DSS2-Added-global-alpha-support.patch230
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch35
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch32
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch56
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch97
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch34
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0061-DSS2-VRFB-save-restore-context.patch106
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0062-DSS2-VRAM-Fix-indentation.patch65
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch82
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0064-VRFB-fix-debug-messages.patch35
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0065-VRFB-add-suspend-resume-functionality.patch216
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch92
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch29
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch65
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch125
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0070-DSS2-fix-irq1.diff221
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0071-DSS2-fix-irq2.diff35
-rw-r--r--recipes/linux/linux-omap-pm_2.6.29.bb113
-rw-r--r--recipes/linux/linux-omap-pm_git.bb24
-rw-r--r--recipes/linux/linux-omap_2.6.29.bb19
-rw-r--r--recipes/linux/linux-powerpc-fsl-git/mpc8315e-rdb/defconfig1766
-rw-r--r--recipes/linux/linux-powerpc-fsl-git/mpc8315e-rdb/mpc8315erdb-add-msi-to-dts.patch29
-rw-r--r--recipes/linux/linux-powerpc-fsl_git.bb20
-rw-r--r--recipes/linux/linux-rp-2.6.23/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch15
-rw-r--r--recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch15
-rw-r--r--recipes/linux/linux-rp.inc19
-rw-r--r--recipes/linux/linux-rp_2.6.23.bb3
-rw-r--r--recipes/linux/linux-rp_2.6.24.bb3
-rw-r--r--recipes/linux/linux.inc17
-rw-r--r--recipes/linux/linux_2.6.28.bb8
-rw-r--r--recipes/linux/linux_2.6.29.bb4
-rw-r--r--recipes/linux/linux_2.6.30.bb18
-rw-r--r--recipes/linux/openzaurus-pxa27x_2.4.20-rmk2-embedix20050602.bb7
-rw-r--r--recipes/linux/openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc7
-rw-r--r--recipes/linux/openzaurus-sa_2.4.18-rmk7-pxa3-embedix20030509.bb7
-rw-r--r--recipes/linux/poodle-kernel-2.4-embedix.bb2
-rw-r--r--recipes/linux/poodle-kernels-2.4-embedix.bb6
-rw-r--r--recipes/linux/poodle255-kernel-2.4-embedix.bb2
-rw-r--r--recipes/linux/shepherd-kernel-2.4-embedix.bb2
-rw-r--r--recipes/log4cxx/log4cxx/log4cxx097.patch48
-rw-r--r--recipes/log4cxx/log4cxx_0.9.7.bb19
-rw-r--r--recipes/logrotate-script/logrotate-script_cvs.bb2
-rw-r--r--recipes/lowpan-tools/lowpan-tools_git.bb (renamed from recipes/lowpan-utils/lowpan-utils_git.bb)16
-rw-r--r--recipes/madwifi/madwifi-ng_r.inc2
-rw-r--r--recipes/madwifi/madwifi-ng_r4029-20090525.bb21
-rw-r--r--recipes/man-pages/man-pages_3.21.bb (renamed from recipes/man-pages/man-pages_2.79.bb)2
-rw-r--r--recipes/meta/canadian-sdk.bb3
-rw-r--r--recipes/meta/meta-toolchain-qte.bb25
-rw-r--r--recipes/meta/meta-toolchain.bb14
-rw-r--r--recipes/meta/nylon-feed.inc4
-rw-r--r--recipes/meta/package-index.bb6
-rw-r--r--recipes/mgetty/mgetty-1.1.30/faxqhelper_ldflags.patch13
-rw-r--r--recipes/mgetty/mgetty-1.1.30/newslock_ldflags.patch13
-rw-r--r--recipes/mgetty/mgetty_1.1.30.bb8
-rw-r--r--recipes/mini-httpd/.mini-httpd_1.19.bb.swpbin12288 -> 0 bytes
-rw-r--r--recipes/minicom/minicom-2.3/rename-conflicting-functions.patch13
-rw-r--r--recipes/minicom/minicom_2.3.bb1
-rw-r--r--recipes/minilite/minilite.inc12
-rw-r--r--recipes/minilite/minilite_0.41.bb13
-rw-r--r--recipes/minilite/minilite_0.43.bb13
-rw-r--r--recipes/minilite/minilite_0.44.bb13
-rw-r--r--recipes/minilite/minilite_0.47.bb13
-rw-r--r--recipes/minilite/minilite_0.48.bb13
-rw-r--r--recipes/minilite/minilite_0.49.bb13
-rw-r--r--recipes/minilite/minilite_0.50.bb13
-rw-r--r--recipes/mobilemesh/mobilemesh_1.2.bb5
-rw-r--r--recipes/moblin/bickley_git.bb19
-rw-r--r--recipes/moblin/bognor-regis_git.bb15
-rw-r--r--recipes/moblin/hornsey/fix-api.patch2048
-rw-r--r--recipes/moblin/hornsey_git.bb19
-rw-r--r--recipes/moblin/json-glib_0.6.2.bb7
-rw-r--r--recipes/moblin/json-glib_git.bb16
-rw-r--r--recipes/moblin/libccss_git.bb14
-rw-r--r--recipes/moblin/librest_git.bb14
-rw-r--r--recipes/moblin/moblin-menus/configurefix.patch13
-rw-r--r--recipes/moblin/moblin-menus_git.bb11
-rw-r--r--recipes/moblin/mojito_git.bb29
-rw-r--r--recipes/moblin/nbtk_git.bb19
-rw-r--r--recipes/moblin/twitter-glib_git.bb16
-rw-r--r--recipes/mozilla/fennec/use-native-bpp.patch81
-rw-r--r--recipes/mozilla/fennec_hg.bb3
-rw-r--r--recipes/mozilla/files/use-native-bpp.patch37
-rw-r--r--recipes/mozilla/firefox_3.0.1.bb3
-rw-r--r--recipes/mtools/files/no-x11.patch19
-rw-r--r--recipes/mtools/files/plainio.patch13
-rw-r--r--recipes/mtools/files/use-sg_io.patch80
-rw-r--r--recipes/mtools/mtools-native_4.0.10.bb (renamed from recipes/mtools/mtools-native_3.9.11.bb)0
-rw-r--r--recipes/mtools/mtools_4.0.10.bb (renamed from recipes/mtools/mtools_3.9.11.bb)13
-rw-r--r--recipes/musicbrainz/files/libmusicbrainz-2.1.5-gcc43.patch58
-rw-r--r--recipes/musicbrainz/libmusicbrainz_2.1.5.bb4
-rw-r--r--recipes/musicpd/mpd-alsa_0.14.2.bb19
-rw-r--r--recipes/musicpd/mpd_0.14.2.bb5
-rw-r--r--recipes/mutt/mutt-1.5.19/makedoc.patch26
-rw-r--r--recipes/mutt/mutt-1.5.19/patch-1.5.19.sidebar.20090522.txt1792
-rw-r--r--recipes/mutt/mutt_1.5.19.bb25
-rw-r--r--recipes/mysql/mysql_4.1.22.bb2
-rw-r--r--recipes/nautilus/nautilus_2.26.1.bb2
-rw-r--r--recipes/nbench-byte/nbench-byte/nbench_32bits.patch18
-rw-r--r--recipes/nbench-byte/nbench-byte_2.2.3.bb22
-rw-r--r--recipes/netbase/netbase/mtx-1/interfaces33
-rw-r--r--recipes/netbase/netbase/mtx-2/interfaces33
-rw-r--r--recipes/netbase/netbase_4.21.bb4
-rw-r--r--recipes/netcat/netcat_0.7.1.bb13
-rw-r--r--recipes/netperf/netperf_2.4.4.bb2
-rw-r--r--recipes/netsurf/hubbub_0.0.1.bb28
-rw-r--r--recipes/netsurf/libnsbmp_0.0.1.bb24
-rw-r--r--recipes/netsurf/libnsgif_0.0.1.bb24
-rw-r--r--recipes/netsurf/libparserutils_0.0.1.bb36
-rw-r--r--recipes/netsurf/netsurf-2.1/Makefile.config9
-rw-r--r--recipes/netsurf/netsurf-2.1/debugxml_fix.patch64
-rw-r--r--recipes/netsurf/netsurf-2.1/fix_makefile.patch12
-rw-r--r--recipes/netsurf/netsurf-2.1/netsurf.desktop10
-rw-r--r--recipes/netsurf/netsurf-2.1/netsurf.pngbin0 -> 9329 bytes
-rw-r--r--recipes/netsurf/netsurf_2.1.bb32
-rw-r--r--recipes/nilfs-utils/files/no-ldconfig-during-install.patch10
-rw-r--r--recipes/nilfs-utils/nilfs-utils_2.0.12.bb23
-rw-r--r--recipes/nonworking/minisip/minisip-video_svn.bb (renamed from recipes/minisip/minisip-video_svn.bb)0
-rw-r--r--recipes/nunome/nunome_1.0.2.bb4
-rw-r--r--recipes/nylon/files/firewall-bash.diff8
-rw-r--r--recipes/nylon/files/simple-firewall-bash.diff8
-rw-r--r--recipes/nylon/nylon-config.bb41
-rw-r--r--recipes/nylon/nylon-scripts_cvs.bb6
-rw-r--r--recipes/nylon/nylon-statistics.bb5
-rw-r--r--recipes/nylon/simple-firewall.bb18
-rw-r--r--recipes/nylon/yamonenv.bb5
-rw-r--r--recipes/obexftp/obexftp_0.23.bb2
-rw-r--r--recipes/opencv/opencv-samples_svn.bb (renamed from recipes/opencv/opencv-samples_cvs.bb)17
-rw-r--r--recipes/opencv/opencv_svn.bb (renamed from recipes/opencv/opencv_cvs.bb)18
-rw-r--r--recipes/openmoko2/libjana_svn.bb11
-rw-r--r--recipes/openobex/openobex_1.5.bb2
-rw-r--r--recipes/openssh/openssh-5.2p1/openssh-5.2-sftp-server-nolibcrypto.patch13
-rw-r--r--recipes/openssh/openssh-5.2p1/ssh_config46
-rw-r--r--recipes/openssh/openssh-5.2p1/sshd_config119
-rw-r--r--recipes/openssh/openssh.inc106
-rw-r--r--recipes/openssh/openssh_4.6p1.bb115
-rw-r--r--recipes/openssh/openssh_5.2p1.bb9
-rw-r--r--recipes/openssl/openssl.inc8
-rw-r--r--recipes/openswan/openswan_2.2.0.bb2
-rw-r--r--recipes/openswan/openswan_2.4.7.bb2
-rw-r--r--recipes/opie-packagemanager/files/opkg.patch562
-rw-r--r--recipes/opie-packagemanager/files/split-config.patch334
-rw-r--r--recipes/opie-packagemanager/opie-packagemanager_1.2.4.bb9
-rw-r--r--recipes/opie-sheet/opie-sheet/different-arg-names.patch13
-rw-r--r--recipes/opie-sheet/opie-sheet_1.2.4.bb4
-rw-r--r--recipes/pango/pango-1.24.2/no-tests.patch10
-rw-r--r--recipes/pango/pango_1.24.2.bb2
-rw-r--r--recipes/pax-utils/pax-utils-native_0.1.13.bb2
-rw-r--r--recipes/pax-utils/pax-utils-native_0.1.19.bb2
-rw-r--r--recipes/pciutils/pciutils-3.1.2/gcc-3-compatibility.patch11
-rw-r--r--recipes/pciutils/pciutils_3.1.2.bb1
-rw-r--r--recipes/perl/perl-native_5.8.8.bb6
-rw-r--r--recipes/php/php_5.2.6.bb3
-rw-r--r--recipes/pidgin/pidgin.inc8
-rw-r--r--recipes/pkgconfig/pkgconfig-native_0.23.bb2
-rw-r--r--recipes/pkgconfig/pkgconfig-sdk_0.23.bb2
-rw-r--r--recipes/pkgconfig/pkgconfig.inc2
-rw-r--r--recipes/pkgconfig/pkgconfig_0.23.bb2
-rw-r--r--recipes/poboxserver/qpobox_0.5.4.bb4
-rw-r--r--recipes/pointercal/files/topas910/pointercal1
-rw-r--r--recipes/pointercal/pointercal_0.0.bb2
-rw-r--r--recipes/popt/popt_1.14.bb5
-rw-r--r--recipes/powervr-drivers/libgles-omap3.inc45
-rw-r--r--recipes/powervr-drivers/libgles-omap3/chameleonman.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/evilskull.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/fivespheres.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/lighting.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/mouse.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/particles.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/polybump.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/shaders.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/skybox.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/skybox2.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/trilinear.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3/vase.desktop8
-rw-r--r--recipes/powervr-drivers/libgles-omap3_3.00.00.08.bb11
-rw-r--r--recipes/ppp/ppp_2.4.3.bb3
-rw-r--r--recipes/procps/procps.inc2
-rw-r--r--recipes/psplash/files/bug/psplash-default4
-rw-r--r--recipes/psplash/psplash-zap_1.0.bb3
-rw-r--r--recipes/psplash/psplash.inc4
-rw-r--r--recipes/psplash/psplash_svn.bb2
-rw-r--r--recipes/pulseaudio/libcanberra_0.12.bb4
-rw-r--r--recipes/pulseaudio/pavucontrol_0.9.8.bb9
-rw-r--r--recipes/pulseaudio/pulseaudio-0.9.15/alsaerror.patch525
-rw-r--r--recipes/pulseaudio/pulseaudio-0.9.15/autoconf_version.patch13
-rw-r--r--recipes/pulseaudio/pulseaudio-0.9.15/buildfix.patch13
-rw-r--r--recipes/pulseaudio/pulseaudio-0.9.15/fallback.patch338
-rw-r--r--recipes/pulseaudio/pulseaudio-0.9.15/gcc4-compile-fix.patch18
-rw-r--r--recipes/pulseaudio/pulseaudio-0.9.15/periodfix.patch73
-rw-r--r--recipes/pulseaudio/pulseaudio-0.9.15/volatiles.04_pulse2
-rw-r--r--recipes/pulseaudio/pulseaudio.inc51
-rw-r--r--recipes/pulseaudio/pulseaudio_0.9.10.bb3
-rw-r--r--recipes/pulseaudio/pulseaudio_0.9.11.bb4
-rw-r--r--recipes/pulseaudio/pulseaudio_0.9.15.bb18
-rw-r--r--recipes/pulseaudio/pulseaudio_0.9.6.bb3
-rw-r--r--recipes/pulseaudio/pulseaudio_0.9.9.bb3
-rw-r--r--recipes/pwlib/pwlib.inc31
-rw-r--r--recipes/pwlib/pwlib_1.5.2.bb34
-rw-r--r--recipes/pwlib/pwlib_1.6.6.4.bb4
-rw-r--r--recipes/python/python-2.6.1/07-export-grammer.patch10
-rw-r--r--recipes/python/python-native_2.6.1.bb4
-rw-r--r--recipes/python/python-pycups_1.9.45.bb16
-rw-r--r--recipes/python/python_2.6.1.bb1
-rw-r--r--recipes/qemu/qemu-0.10.3/06_exit_segfault.patch45
-rw-r--r--recipes/qemu/qemu-0.10.3/11_signal_sigaction.patch21
-rw-r--r--recipes/qemu/qemu-0.10.3/22_net_tuntap_stall.patch13
-rw-r--r--recipes/qemu/qemu-0.10.3/31_syscalls.patch22
-rw-r--r--recipes/qemu/qemu-0.10.3/32_syscall_sysctl.patch55
-rw-r--r--recipes/qemu/qemu-0.10.3/52_ne2000_return.patch17
-rw-r--r--recipes/qemu/qemu-0.10.3/61_safe_64bit_int.patch27
-rw-r--r--recipes/qemu/qemu-0.10.3/63_sparc_build.patch18
-rw-r--r--recipes/qemu/qemu-0.10.3/64_ppc_asm_constraints.patch18
-rw-r--r--recipes/qemu/qemu-0.10.3/66_tls_ld.patch55
-rw-r--r--recipes/qemu/qemu-0.10.3/91-oh-sdl-cursor.patch18
-rw-r--r--recipes/qemu/qemu-0.10.3/fix_baum_c_compilation.patch30
-rw-r--r--recipes/qemu/qemu-0.10.3/fix_segfault.patch37
-rw-r--r--recipes/qemu/qemu-0.10.3/no-strip.patch26
-rw-r--r--recipes/qemu/qemu-native.inc3
-rw-r--r--recipes/qemu/qemu_0.10.3.bb17
-rw-r--r--recipes/qpf-fonts/qpf-qte_2.3.10.bb4
-rw-r--r--recipes/qpf-fonts/qpf-unifont_1.0.bb2
-rw-r--r--recipes/qpf-fonts/qpf-unismall_1.0.0.bb2
-rw-r--r--recipes/qt4/qt4-embedded-4.4.3/0003-no-tools.patch (renamed from recipes/qt4/files/0003-no-tools.patch)0
-rw-r--r--recipes/qt4/qt4-embedded-4.4.3/0006-freetype-host-includes.patch (renamed from recipes/qt4/files/0006-freetype-host-includes.patch)0
-rw-r--r--recipes/qt4/qt4-embedded-4.4.3/0007-openssl-host-includes.patch (renamed from recipes/qt4/files/0007-openssl-host-includes.patch)0
-rw-r--r--recipes/qt4/qt4-embedded-4.4.3/0008-qt-lib-infix.patch (renamed from recipes/qt4/files/0008-qt-lib-infix.patch)0
-rw-r--r--recipes/qt4/qt4-embedded-4.5.1/0003-no-tools.patch (renamed from recipes/qt4/files/4.5.1/0003-no-tools.patch)0
-rw-r--r--recipes/qt4/qt4-embedded-4.5.1/0006-freetype-host-includes.patch (renamed from recipes/qt4/files/4.5.1/0006-freetype-host-includes.patch)0
-rw-r--r--recipes/qt4/qt4-embedded-4.5.1/0007-openssl-host-includes.patch (renamed from recipes/qt4/files/4.5.1/0007-openssl-host-includes.patch)0
-rw-r--r--recipes/qt4/qt4-embedded-4.5.1/0008-qt-lib-infix.patch (renamed from recipes/qt4/files/4.5.1/0008-qt-lib-infix.patch)0
-rw-r--r--recipes/qt4/qt4-embedded-4.5.1/0010-no-simpledecoration-example.patch (renamed from recipes/qt4/files/4.5.1/0010-no-simpledecoration-example.patch)0
-rw-r--r--recipes/qt4/qt4-embedded.inc40
-rw-r--r--recipes/qt4/qt4-embedded_4.4.3.bb40
-rw-r--r--recipes/qt4/qt4-embedded_4.5.1.bb41
-rw-r--r--recipes/qt4/qt4-tools-native.inc8
-rw-r--r--recipes/qt4/qt4-tools-native_4.4.3.bb2
-rw-r--r--recipes/qt4/qt4-tools-native_4.5.1.bb2
-rw-r--r--recipes/qt4/qt4-tools-sdk_4.5.1.bb72
-rw-r--r--recipes/qt4/qt4-x11-free.inc34
-rw-r--r--recipes/qt4/qt4-x11-free/0003-no-tools.patch18
-rw-r--r--recipes/qt4/qt4-x11-free/0006-freetype-host-includes.patch20
-rw-r--r--recipes/qt4/qt4-x11-free/0007-openssl-host-includes.patch20
-rw-r--r--recipes/qt4/qt4-x11-free/0008-qt-lib-infix.patch34
-rw-r--r--recipes/qt4/qt4-x11-free_4.4.3.bb35
-rw-r--r--recipes/qt4/qt4-x11-free_4.5.1.bb33
-rw-r--r--recipes/qt4/qt4.inc138
-rw-r--r--recipes/qte/qte-2.3.10/disable-dup-rotation.patch2
-rw-r--r--recipes/qte/qte-mt_2.3.10.bb2
-rw-r--r--recipes/qte/qte_2.3.10.bb2
-rw-r--r--recipes/quake/files/quake3_makefile.patch29
-rw-r--r--recipes/quake/quake3-pandora-gles_git.bb39
-rw-r--r--recipes/recode/recode_3.6.bb7
-rw-r--r--recipes/redland/files/crosscompile.patch29
-rw-r--r--recipes/redland/files/sane_pkgconfig.patch126
-rw-r--r--recipes/redland/redland_1.0.8.bb19
-rw-r--r--recipes/rhythmbox/rhythmbox/ogg.m4102
-rw-r--r--recipes/rhythmbox/rhythmbox/omfmake.patch13
-rw-r--r--recipes/rhythmbox/rhythmbox/vorbis.m4122
-rw-r--r--recipes/rhythmbox/rhythmbox_0.12.1.bb26
-rw-r--r--recipes/rhythmbox/rhythmbox_0.8.5.bb29
-rw-r--r--recipes/rhythmbox/rhythmbox_0.8.7.bb28
-rw-r--r--recipes/rrdtool/rrdtool_1.0.49.bb9
-rw-r--r--recipes/rt2x00/rt61-firmware_1.2.bb2
-rw-r--r--recipes/ruby/ruby.inc3
-rw-r--r--recipes/samba/files/tdb.pc11
-rw-r--r--recipes/samba/files/tdbheaderfix.patch14
-rw-r--r--recipes/samba/samba.inc6
-rw-r--r--recipes/samba/samba_3.3.0.bb4
-rw-r--r--recipes/schroedinger/gst-plugin-schroedinger_1.0.5.bb14
-rw-r--r--recipes/schroedinger/schroedinger.inc10
-rw-r--r--recipes/schroedinger/schroedinger_1.0.5.bb20
-rw-r--r--recipes/sdr/dttsp_svn.bb13
-rw-r--r--recipes/sdr/fldigi_3.11.4.bb12
-rw-r--r--recipes/sdr/hamlib_1.2.9.bb47
-rw-r--r--recipes/sdr/sdrshell/gcc-43-fix.patch10
-rw-r--r--recipes/sdr/sdrshell_svn.bb30
-rw-r--r--recipes/ser/ser_0.9.0.bb2
-rw-r--r--recipes/slugimage/slugimage-native.bb2
-rw-r--r--recipes/slugtool/slugtool-native.bb1
-rw-r--r--recipes/snes9x/snes9x/configure.patch12
-rw-r--r--recipes/snes9x/snes9x/linkage.patch31
-rw-r--r--recipes/snes9x/snes9x_1.43-WIP1.bb6
-rw-r--r--recipes/squashfs-tools/squashfs-lzma-tools-native_3.1r2.bb2
-rw-r--r--recipes/squashfs-tools/squashfs-tools-native_2.0r2.bb2
-rw-r--r--recipes/squashfs-tools/squashfs-tools-native_2.2r2.bb1
-rw-r--r--recipes/squashfs-tools/squashfs-tools-native_3.1r2.bb1
-rw-r--r--recipes/squashfs-tools/squashfs-tools-native_3.3.bb1
-rw-r--r--recipes/squashfs-tools/squashfs-tools-native_4.0.bb1
-rw-r--r--recipes/startup-notification/startup-notification_0.9.bb13
-rw-r--r--recipes/swig/swig-native_1.3.39.bb7
-rw-r--r--recipes/swig/swig_1.3.39.bb16
-rw-r--r--recipes/sysklogd/sysklogd-1.5/no-strip-install.patch15
-rw-r--r--recipes/sysklogd/sysklogd.inc3
-rw-r--r--recipes/sysklogd/sysklogd_1.5.bb3
-rw-r--r--recipes/syslog-ng/syslog-ng_1.6.11.bb2
-rw-r--r--recipes/syslog-ng/syslog-ng_1.6.8.bb2
-rw-r--r--recipes/syslog-ng/syslog-ng_2.0.5.bb2
-rw-r--r--recipes/system-config-printer/system-config-printer_1.1.7.bb22
-rwxr-xr-xrecipes/sysvinit/sysvinit/rcS5
-rw-r--r--recipes/sysvinit/sysvinit_2.86.bb19
-rw-r--r--recipes/tango/tango-icon-theme_0.8.90.bb11
-rw-r--r--recipes/tangogps/tangogps_0.9.6.bb (renamed from recipes/tangogps/tangogps_0.9.3.bb)2
-rw-r--r--recipes/tasks/task-beagleboard-demo.bb12
-rw-r--r--recipes/tasks/task-gpe-settings.bb5
-rw-r--r--recipes/tasks/task-gpe.bb7
-rw-r--r--recipes/tasks/task-opie.bb8
-rw-r--r--recipes/tasks/task-proper-tools.bb35
-rw-r--r--recipes/tasks/task-qte-toolchain-host.bb7
-rw-r--r--recipes/tasks/task-qte-toolchain-target.bb8
-rw-r--r--recipes/tasks/task-sdk-extra.bb15
-rw-r--r--recipes/tcpdump/tcpdump_3.9.7.bb10
-rw-r--r--recipes/tcpdump/tcpdump_4.0.0.bb23
-rw-r--r--recipes/tftp-hpa/files/default3
-rw-r--r--recipes/tftp-hpa/files/init104
-rw-r--r--recipes/tftp-hpa/tftp-hpa_5.0.bb72
-rw-r--r--recipes/totem/totem-pl-parser_2.26.2.bb18
-rwxr-xr-xrecipes/transmission/files/init6
-rw-r--r--recipes/transmission/files/webupload.patch325
-rw-r--r--recipes/transmission/transmission_1.40.bb17
-rw-r--r--recipes/transmission/transmission_1.61.bb35
-rw-r--r--recipes/tslib/tslib.inc3
-rw-r--r--recipes/tslib/tslib_1.0.bb2
-rw-r--r--recipes/tslib/tslib_svn.bb2
-rw-r--r--recipes/ttf-fonts/ttf-arphic-uming_20080216.bb2
-rw-r--r--recipes/ttf-fonts/ttf-sazanami_20040629.bb2
-rw-r--r--recipes/tzdata/tzdata_2007k.bb13
-rw-r--r--recipes/u-boot/u-boot-git/leopardboard-support.patch365
-rw-r--r--recipes/u-boot/u-boot-omap2430sdp_1.1.4.bb1
-rw-r--r--recipes/u-boot/u-boot-omap3_git.bb1
-rw-r--r--recipes/u-boot/u-boot-omap3beagleboard_1.1.4.bb1
-rw-r--r--recipes/u-boot/u-boot.inc1
-rw-r--r--recipes/u-boot/u-boot_1.1.6.bb1
-rw-r--r--recipes/u-boot/u-boot_1.2.0.bb1
-rw-r--r--recipes/u-boot/u-boot_1.3.0.bb1
-rw-r--r--recipes/u-boot/u-boot_1.3.1.bb1
-rw-r--r--recipes/u-boot/u-boot_1.3.2.bb1
-rw-r--r--recipes/u-boot/u-boot_2009.01.bb5
-rw-r--r--recipes/u-boot/u-boot_2009.06.bb17
-rw-r--r--recipes/u-boot/u-boot_git.bb48
-rw-r--r--recipes/uclibc/bfin-uclibc_svn.bb2
-rw-r--r--recipes/uclibc/uclibc-initial_0.9.26.bb2
-rw-r--r--recipes/uclibc/uclibc-initial_0.9.27.bb2
-rw-r--r--recipes/uclibc/uclibc-initial_0.9.28.bb2
-rw-r--r--recipes/uclibc/uclibc-initial_0.9.29.bb2
-rw-r--r--recipes/uclibc/uclibc-initial_0.9.30.1.bb6
-rw-r--r--recipes/uclibc/uclibc-initial_0.9.30.bb2
-rw-r--r--recipes/uclibc/uclibc.inc36
-rw-r--r--recipes/uclibc/uclibc_0.9.30.1.bb2
-rw-r--r--recipes/uclibc/uclibc_nptl.bb2
-rw-r--r--recipes/uclibc/uclibc_svn.bb2
-rw-r--r--recipes/udev/udev-141/akita/default4
-rw-r--r--recipes/udev/udev-141/c7x0/default4
-rw-r--r--recipes/udev/udev-141/default4
-rw-r--r--recipes/udev/udev-141/init35
-rw-r--r--recipes/udev/udev-141/local.rules3
-rw-r--r--recipes/udev/udev-141/spitz/default4
-rw-r--r--recipes/udev/udev-141/tosa/default4
-rw-r--r--recipes/udev/udev_141.bb33
-rw-r--r--recipes/uim/uim-native_1.3.1.bb2
-rw-r--r--recipes/uim/uim_1.3.1.bb4
-rw-r--r--recipes/upnp/gssdp_0.6.3.bb6
-rw-r--r--recipes/upnp/gupnp-av_0.3.bb6
-rw-r--r--recipes/upnp/gupnp_0.12.5.bb14
-rw-r--r--recipes/usb-gadget-mode/files/beagleboard/usb-gadget.conf3
-rw-r--r--recipes/usb-gadget-mode/files/omap3-pandora/usb-gadget.conf3
-rwxr-xr-xrecipes/usb-gadget-mode/files/usb-gadget6
-rw-r--r--recipes/usb-gadget-mode/usb-gadget-mode.bb2
-rw-r--r--recipes/usbutils/usbutils_0.82.bb19
-rw-r--r--recipes/util-linux-ng/files/fix-make-c.patch41
-rw-r--r--recipes/util-linux-ng/files/optional-uuid.patch55
-rw-r--r--recipes/util-linux-ng/util-linux-ng.inc123
-rw-r--r--recipes/util-linux-ng/util-linux-ng_2.13.1.bb2
-rw-r--r--recipes/util-linux-ng/util-linux-ng_2.14.bb3
-rw-r--r--recipes/util-linux-ng/util-linux-ng_2.15.bb14
-rw-r--r--recipes/vim/gvim_7.0.bb4
-rw-r--r--recipes/vim/vim.inc9
-rw-r--r--recipes/vim/vim_6.4.bb2
-rw-r--r--recipes/vim/vim_7.0.bb2
-rw-r--r--recipes/vnc/x11vnc_0.9.7.bb10
-rw-r--r--recipes/webkit/webkit-gtk/GNUmakefile.am298
-rw-r--r--recipes/webkit/webkit-gtk/autogen.sh10
-rw-r--r--recipes/webkit/webkit-gtk/configure.ac53
-rw-r--r--recipes/webkit/webkit-gtk/unicode-fixes.diff22
-rw-r--r--recipes/webkit/webkit-gtk_svn.bb7
-rw-r--r--recipes/wget/wget.inc34
-rw-r--r--recipes/wget/wget_1.11.4.bb8
-rw-r--r--recipes/wget/wget_1.9.1.bb41
-rw-r--r--recipes/wlan-ng/wlan-ng-utils.inc7
-rw-r--r--recipes/xcb/libxcb.inc5
-rw-r--r--recipes/xcb/libxcb/configure.patch13
-rw-r--r--recipes/xdg-user-dirs/xdg-user-dirs/configurefix.patch18
-rw-r--r--recipes/xdg-user-dirs/xdg-user-dirs_0.10.bb11
-rw-r--r--recipes/xmms-embedded/xmms-embedded_20040327.bb2
-rw-r--r--recipes/xorg-driver/xf86-input-evdev_2.2.2.bb4
-rw-r--r--recipes/xorg-driver/xf86-input-evtouch_0.8.8.bb7
-rw-r--r--recipes/xorg-driver/xf86-input-keyboard_1.3.2.bb6
-rw-r--r--recipes/xorg-driver/xf86-input-mouse_1.4.0.bb4
-rw-r--r--recipes/xorg-driver/xf86-input-tslib/xserver16.patch26
-rw-r--r--recipes/xorg-driver/xf86-input-tslib_0.0.5.bb2
-rw-r--r--recipes/xorg-driver/xf86-video-displaylink_0.3.bb9
-rw-r--r--recipes/xorg-driver/xf86-video-geode/0001-probe-GPIO-device-before-asking-for-base_addr.patch30
-rw-r--r--recipes/xorg-driver/xf86-video-geode/0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch56
-rw-r--r--recipes/xorg-driver/xf86-video-geode_2.11.2.bb9
-rw-r--r--recipes/xorg-driver/xf86-video-nsc_2.8.2.bb1
-rw-r--r--recipes/xorg-driver/xf86-video-omapfb_git.bb15
-rw-r--r--recipes/xorg-driver/xf86-video-sisusb_0.9.1.bb6
-rw-r--r--recipes/xorg-driver/xorg-driver-common.inc2
-rw-r--r--recipes/xorg-lib/libx11-1.2/x11_disable_makekeys.patch23
-rw-r--r--recipes/xorg-lib/libx11-native_1.1.5.bb8
-rw-r--r--recipes/xorg-lib/libx11_1.1.4.bb1
-rw-r--r--recipes/xorg-lib/libx11_1.1.5.bb3
-rw-r--r--recipes/xorg-lib/libx11_1.2.bb36
-rw-r--r--recipes/xorg-lib/libx11_git.bb4
-rw-r--r--recipes/xorg-lib/libxext_1.0.5.bb8
-rw-r--r--recipes/xorg-lib/pixman/0041-Fix-filler-bug.patch25
-rw-r--r--recipes/xorg-lib/pixman/0042-Really-fix-filler-bug.patch35
-rw-r--r--recipes/xorg-lib/pixman_0.15.6.bb13
-rw-r--r--recipes/xorg-lib/pixman_git.bb10
-rw-r--r--recipes/xorg-lib/xtrans-native_1.2.1.bb5
-rw-r--r--recipes/xorg-lib/xtrans-native_1.2.3.bb5
-rw-r--r--recipes/xorg-lib/xtrans-sdk_1.2.3.bb5
-rw-r--r--recipes/xorg-lib/xtrans_1.2.3.bb14
-rw-r--r--recipes/xorg-proto/applewmproto_1.2.0.bb4
-rw-r--r--recipes/xorg-proto/dri2proto_2.0.bb3
-rw-r--r--recipes/xorg-proto/inputproto-native_1.5.0.bb7
-rw-r--r--recipes/xorg-proto/inputproto-sdk_1.5.0.bb3
-rw-r--r--recipes/xorg-proto/randrproto_1.3.0.bb7
-rw-r--r--recipes/xorg-proto/xextproto-native_7.0.3.bb7
-rw-r--r--recipes/xorg-proto/xextproto-native_7.0.5.bb9
-rw-r--r--recipes/xorg-proto/xextproto-sdk_7.0.5.bb3
-rw-r--r--recipes/xorg-proto/xextproto_7.0.5.bb3
-rw-r--r--recipes/xorg-proto/xorg-proto-common.inc2
-rw-r--r--recipes/xorg-proto/xproto-native_7.0.15.bb5
-rw-r--r--recipes/xorg-proto/xproto-sdk_7.0.15.bb3
-rw-r--r--recipes/xorg-proto/xproto_7.0.15.bb6
-rw-r--r--recipes/xorg-util/util-macros-1.2.1/cross-compiler-for-checking.patch11
-rw-r--r--recipes/xorg-util/util-macros-native_1.2.1.bb7
-rw-r--r--recipes/xorg-util/util-macros_1.2.1.bb12
-rw-r--r--recipes/xorg-xserver/files/xorg-avr32-support.diff2
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1.2.0/split_multiple_AC_SUBST.patch15
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1.3.0.0/autotools.patch13
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1.4.0.90/split_multiple_AC_SUBST.patch15
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1.4.0.90/w100-autofoo.patch2
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch2
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1.4.99.901/w100-autofoo.patch2
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1.4/w100-autofoo.patch2
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1.5.3/drmfix.patch2
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1.5.3/w100-autofoo.patch2
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-1300_1.3.0.0.bb10
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-common.inc117
-rw-r--r--recipes/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb5
-rw-r--r--recipes/xorg-xserver/xserver-kdrive/kmode-800_480.patch24
-rw-r--r--recipes/xorg-xserver/xserver-kdrive/w100-autofoo.patch2
-rw-r--r--recipes/xorg-xserver/xserver-kdrive_1.3.0.0.bb1
-rw-r--r--recipes/xorg-xserver/xserver-kdrive_1.4.0.90.bb3
-rw-r--r--recipes/xorg-xserver/xserver-xorg-1.3.0.0/drmfix.patch2
-rw-r--r--recipes/xorg-xserver/xserver-xorg-1.3.0.0/glyphstr.patch5
-rw-r--r--recipes/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch2
-rw-r--r--recipes/xorg-xserver/xserver-xorg-1.4/drmfix.patch2
-rw-r--r--recipes/xorg-xserver/xserver-xorg-1.5.1/drmfix.patch2
-rw-r--r--recipes/xorg-xserver/xserver-xorg-1.5.3/drmfix.patch2
-rw-r--r--recipes/xorg-xserver/xserver-xorg-1.6.1/drmfix.patch15
-rw-r--r--recipes/xorg-xserver/xserver-xorg/dri.patch4
-rw-r--r--recipes/xorg-xserver/xserver-xorg/drmfix.patch2
-rw-r--r--recipes/xorg-xserver/xserver-xorg/miext_layer_shadow_h.patch11
-rw-r--r--recipes/xorg-xserver/xserver-xorg/no-screen-blanking.patch2
-rw-r--r--recipes/xorg-xserver/xserver-xorg_1.6.1.bb13
-rw-r--r--recipes/xserver-common/files/89xdgautostart.sh9
-rw-r--r--recipes/xserver-common/files/avoid-rotated-server.patch72
-rw-r--r--recipes/xserver-common/xserver-common_1.24.bb7
-rw-r--r--recipes/xserver-common/xserver-common_1.25.bb21
-rw-r--r--recipes/xserver-kdrive-common/xserver-kdrive-common/89xTs_Calibrate (renamed from recipes/xserver-kdrive-common/xserver-kdrive-common/98xTs_Calibrate)0
-rw-r--r--recipes/xserver-kdrive-common/xserver-kdrive-common_0.1.bb4
-rw-r--r--recipes/zaurus-updater/zaurus-installer.bb11
-rw-r--r--recipes/zaurusd/files/add-poodle.patch35
-rw-r--r--recipes/zaurusd/files/alsa-6000x-default.state.patch325
-rw-r--r--recipes/zaurusd/files/alsa-cxx00-default.state.patch97
-rw-r--r--recipes/zaurusd/files/avoid-rotated-server.patch126
-rw-r--r--recipes/zaurusd/files/tslib-1.diff11
-rw-r--r--recipes/zaurusd/files/use-ts-symlink-instead-of-hardcoding.diff4
-rw-r--r--recipes/zaurusd/files/zaurus-hinge.matchbox-landscape4
-rw-r--r--recipes/zaurusd/files/zaurus-hinge.matchbox-portrait4
-rw-r--r--recipes/zaurusd/zaurusd_svn.bb8
-rw-r--r--recipes/zbar/zbar_0.8.bb25
-rw-r--r--recipes/zd1211/zd1211-firmware_1.3.bb16
-rw-r--r--recipes/zd1211/zd1211-firmware_1.4.bb16
-rw-r--r--recipes/zip/zip.inc4
-rw-r--r--recipes/zip/zip_2.32.bb2
-rw-r--r--recipes/zten/zten_1.6.2.bb3
-rw-r--r--recipes/zuc/zuc/fixed-include.patch11
-rw-r--r--recipes/zuc/zuc_1.1.2ern.bb6
1516 files changed, 324868 insertions, 6166 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 5086136aa3..6313ee7282 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -34,6 +34,11 @@ Person: Bernhard Guillon
Mail: Bernhard.Guillon@opensimpad.org
Machines: simpad
+Person: Christopher Larson
+Mail: clarson@kergoth.com
+Recipes: autoconf, automake, libtool, gnu-config
+Recipes: autoconf*.bbclass
+
Person: Cliff Brake
Mail: cbrake@bec-systems.com
Website: http://bec-systems.com
@@ -71,6 +76,11 @@ Recipes: mplayer, xmms, xmms-mad, xmms-tremor, dillo, links, links-x11
Recipes: epdfview, sylpheed-claws, sylpheed, gqview, tightvnc
Recipes: epdfview, gtk+_2.10.* openmoko2/*
+Person: Henning Heinold 'woglinde'
+Mail: heinold@inf.fu-berlin.de
+Machines: simpad
+Recipes: uclibc, gettext
+
Person: Holger Hans Peter Freyther
Mail: zecke@selfish.org
Website: http://www.openembedded.org/~zecke
@@ -157,6 +167,11 @@ Mail: liam.girdwood@wolfsonmicro.com
Machines: mx31ads
Recipes: mx31ads-kernel*
+Person: Lynn Lin
+Mail: Lin_Lynn@emc.com
+Interests: Linux,build system,python,git
+Recipes: mini-httpd,dmidecode,mktemp
+
Person: Marcin Juszkiewicz
Mail: marcin@juszkiewicz.com.pl
Website: http://marcin.juszkiewicz.com.pl/
@@ -183,12 +198,27 @@ Machines: om-gta01, om-gta02, om-3d7k, htcraphael, a780, a1200, a910
Interests: Core OE infrastructure, Python, EFL, Vala, Freesmartphone.org
Recipes: efl1/*, busybox/*, dbus/*, dropbear/*, freesmartphone/*, gstreamer/*, *python*, vala/
+Person: Øyvind Repvik
+Mail: nail@nslu2-linux.org
+Machines: nslu2, fsg3, ixp4xx, n2100, turbostation
+Distros: foonas, slugos
+Recipes: bwmon, watchdog, wakelan, libdvb, sane-backends, samba
+Recipes: ccxstream, eciadsl, ssmtp, ixp4xx-npe, joe
+Recipes: lcdproc, libol, mailx, mysql, musicpd, openntpd, qc-usb
+Recipes: radlib, scsi-idle, rng-tools, slugos-init, syslog-ng
+Recipes: vsftpd, zd1211
+
Person: Patrick Gfeller
Mail: gfellerpatrik@gmx.net
Website: www.codeomega.info
Interests: text-to-speech, vnc
Recipes: libvncserver, fbvncserver2
+Person: Paul Eggleton
+Mail: bluelightning@bluelightning.org
+Interests: PocketPC and Zaurus userland (especially Opie)
+Recipes: opie-*, qpe-*
+
Person: Paul Sokolovsky
Mail: pmiscml@gmail.com
Machines: h3900, h4000, hx4700
@@ -204,6 +234,13 @@ Interests: Software Defined Radio,
Interests: wireless networking (not necessarily wireless NIC's)
Recipes: omniorb, gnuradio
+Person: Philipp Zabel
+Mail: philipp.zabel@gmail.com
+Interests: Kernels, PXA, GTK+, gsmd
+Distros: Ångström
+Machines: hx4700, magician
+Recipes: avahi, libgsmd
+
Person: Philippe De Swert
Mail: philippedeswert@scarlet.be
Recipes: gpe-*_svn, libgpe*_svn, libgtkstylus_svn, libtododb_svn
@@ -226,6 +263,21 @@ Machines: akita
Recipes: aircrack-ng, kismet, lorcon, mdk, rfakeap, rglueap,
Recipes: rt2570-k2wrlz, void11
+Person: Robert Schuster 'thebohemian'
+Mail: robert.schuster@tarent.de, thebohemian@gmx.net
+Website: http://fsfe.org/en/fellows/robertschuster/weblog
+Interests: free software, java, games, packages/maemo4/*
+Distros: chinook-compat
+Recipes: jikes-native, jikes-initial, ecj-initial, ecj-bootstrap-native
+Recipes: classpath*, cacao*, jamvm*
+Recipes: miglayout, javasqlite*, sqlitejbdc
+Recipes: swt-gtk, rxtx, dbus-java, libmatthew, kxml2, xmlpull
+Recipes: woodstox2, phoneme-advanced-*
+Recipes: midpath*, logic-analyze
+Recipes: kobodeluxe, wesnoth
+Recipes: hildon-thumbnail, libhildon*, libosso*, mce-dev, libconic
+Recipes: libgpsbt, libgpsmgr, osso-gnome-vfs2, osso-gwconnect, osso-ic-oss
+
Person: Rodrigo 'vivijim' Vivi
Mail: rodrigo.vivi@openbossa.org
Website: http://blog.vivi.eng.br
@@ -243,6 +295,11 @@ Recipes: anthy, nunome, uim*, granule, qpobox*, qte-font-unifont*
Recipes: qpf-unismall, qpobox, poboxserver, imkit*, scim, zten
Recipes: eb*, tomoe, offline-wikipedia
+Person: Sergey Lapin
+Mail: slapin@ossfans.org
+Machines: palm*, afeb9260
+Recipes: at91bootstrap
+
Person: Shane Volpe
Mail: shanevolpe@gmail.com
Machines: logicpd-pxa270, at91-l9260
@@ -279,49 +336,4 @@ Person: Tim Sander
Mail: oe@iss.tu-darmstadt.de
Receipes: fxload
-Person: Øyvind Repvik
-Mail: nail@nslu2-linux.org
-Machines: nslu2, fsg3, ixp4xx, n2100, turbostation
-Distros: foonas, slugos
-Recipes: bwmon, watchdog, wakelan, libdvb, sane-backends, samba
-Recipes: ccxstream, eciadsl, ssmtp, ixp4xx-npe, joe
-Recipes: lcdproc, libol, mailx, mysql, musicpd, openntpd, qc-usb
-Recipes: radlib, scsi-idle, rng-tools, slugos-init, syslog-ng
-Recipes: vsftpd, zd1211
-
-Person: Henning Heinold 'woglinde'
-Mail: heinold@inf.fu-berlin.de
-Machines: simpad
-Recipes: uclibc, gettext
-
-Person: Philipp Zabel
-Mail: philipp.zabel@gmail.com
-Interests: Kernels, PXA, GTK+, gsmd
-Distros: Ångström
-Machines: hx4700, magician
-Recipes: avahi, libgsmd
-
-Person: Robert Schuster 'thebohemian'
-Mail: robert.schuster@tarent.de, thebohemian@gmx.net
-Website: http://fsfe.org/en/fellows/robertschuster/weblog
-Interests: free software, java, games, packages/maemo4/*
-Distros: chinook-compat
-Recipes: jikes-native, jikes-initial, ecj-initial, ecj-bootstrap-native
-Recipes: classpath*, cacao*, jamvm*
-Recipes: miglayout, javasqlite*, sqlitejbdc
-Recipes: swt-gtk, rxtx, dbus-java, libmatthew, kxml2, xmlpull
-Recipes: woodstox2, phoneme-advanced-*
-Recipes: midpath*, logic-analyze
-Recipes: kobodeluxe, wesnoth
-Recipes: hildon-thumbnail, libhildon*, libosso*, mce-dev, libconic
-Recipes: libgpsbt, libgpsmgr, osso-gnome-vfs2, osso-gwconnect, osso-ic-oss
-
-Person: Sergey Lapin
-Mail: slapin@ossfans.org
-Machines: palm*, afeb9260
-Recipes: at91bootstrap
-
-Person: Christopher Larson
-Mail: clarson@kergoth.com
-Recipes: autoconf, automake, libtool, gnu-config
-Recipes: autoconf*.bbclass
+NOTE: please read the first ten lines of this files before adding yourself down here!
diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index e43b289c56..8236a27c76 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -20,6 +20,7 @@ def autotools_dep_prepend(d):
deps += 'libtool-native '
if not bb.data.inherits_class('native', d) \
and not bb.data.inherits_class('cross', d) \
+ and not bb.data.inherits_class('sdk', d) \
and not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
deps += 'libtool-cross '
diff --git a/classes/base.bbclass b/classes/base.bbclass
index e622aeec51..bc50c67d4b 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -885,7 +885,7 @@ def base_get_metadata_svn_revision(path, d):
def base_get_metadata_git_branch(path, d):
import os
- branch = os.popen('cd %s; git symbolic-ref HEAD' % path).read().rstrip()
+ branch = os.popen('cd %s; PATH=%s git symbolic-ref HEAD 2>/dev/null' % (path, d.getVar("BBPATH", 1))).read().rstrip()
if len(branch) != 0:
return branch.replace("refs/heads/", "")
@@ -893,7 +893,7 @@ def base_get_metadata_git_branch(path, d):
def base_get_metadata_git_revision(path, d):
import os
- rev = os.popen("cd %s; git show-ref HEAD" % path).read().split(" ")[0].rstrip()
+ rev = os.popen("cd %s; PATH=%s git show-ref HEAD 2>/dev/null" % (path, d.getVar("BBPATH", 1))).read().split(" ")[0].rstrip()
if len(rev) != 0:
return rev
return "<unknown>"
@@ -923,7 +923,7 @@ python base_eventhandler() {
bb.data.setVar( 'BB_VERSION', bb.__version__, e.data )
statusvars = bb.data.getVar("BUILDCFG_VARS", e.data, 1).split()
statuslines = ["%-17s = \"%s\"" % (i, bb.data.getVar(i, e.data, 1) or '') for i in statusvars]
- statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines)
+ statusmsg = "\n%s\n%s\n" % (bb.data.getVar("BUILDCFG_HEADER", e.data, 1), "\n".join(statuslines))
print statusmsg
needed_vars = bb.data.getVar("BUILDCFG_NEEDEDVARS", e.data, 1).split()
diff --git a/classes/gnome.bbclass b/classes/gnome.bbclass
index 89fb3a19f8..da88884dde 100644
--- a/classes/gnome.bbclass
+++ b/classes/gnome.bbclass
@@ -20,3 +20,8 @@ AUTOTOOLS_STAGE_PKGCONFIG = "1"
gnome_stage_includes() {
autotools_stage_includes
}
+
+do_install_append() {
+ rm -rf ${D}${localstatedir}/lib/scrollkeeper/*
+}
+
diff --git a/classes/image.bbclass b/classes/image.bbclass
index 89d27120c1..864230bc91 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -17,6 +17,9 @@ IMAGE_INITSCRIPTS ?= "initscripts"
#
IMAGE_LOGIN_MANAGER ?= "tinylogin"
+IMAGE_KEEPROOTFS ?= ""
+IMAGE_KEEPROOTFS[doc] = "Set to non-empty to keep ${IMAGE_ROOTFS} around after image creation."
+
IMAGE_BOOT ?= "${IMAGE_INITSCRIPTS} \
${IMAGE_DEV_MANAGER} \
${IMAGE_INIT_MANAGER} \
@@ -133,6 +136,7 @@ fakeroot do_rootfs () {
${IMAGE_POSTPROCESS_COMMAND}
${MACHINE_POSTPROCESS_COMMAND}
+ ${@['rm -rf ${IMAGE_ROOTFS}', ''][bool(d.getVar("IMAGE_KEEPROOTFS", 1))]}
}
do_deploy_to[nostamp] = "1"
@@ -231,8 +235,44 @@ rootfs_update_timestamp () {
date "+%m%d%H%M%Y" >${IMAGE_ROOTFS}/etc/timestamp
}
+# Install locales into image for every entry in IMAGE_LINGUAS
+install_linguas() {
+if [ -e ${IMAGE_ROOTFS}/usr/bin/opkg-cl ] ; then
+ OPKG="opkg-cl ${IPKG_ARGS}"
+
+ ${OPKG} update
+ ${OPKG} list_installed | awk '{print $1}' |sort | uniq > /tmp/installed-packages
+
+ for i in $(cat /tmp/installed-packages | grep -v locale) ; do
+ for translation in ${IMAGE_LINGUAS} $(echo ${IMAGE_LINGUAS} | awk -F_ '{print $1}'); do
+ echo ${i}-locale-${translation}
+ done
+ done | sort | uniq > /tmp/wanted-locale-packages
+
+ ${OPKG} list | awk '{print $1}' |grep locale |sort | uniq > /tmp/available-locale-packages
+
+ cat /tmp/wanted-locale-packages /tmp/available-locale-packages | sort | uniq -d > /tmp/pending-locale-packages
+
+ cat /tmp/pending-locale-packages | xargs ${OPKG} -nodeps install
+ rm -f ${IMAGE_ROOTFS}${libdir}/opkg/lists/*
+
+ for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do
+ if [ -f $i ] && ! sh $i; then
+ opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
+ fi
+ done
+
+ for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.postinst; do
+ if [ -f $i ] && ! sh $i configure; then
+ opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
+ fi
+ done
+
+fi
+}
+
# export the zap_root_password, create_etc_timestamp and remote_init_link
-EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp
+EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp install_linguas
addtask rootfs after do_compile before do_install
addtask deploy_to after do_rootfs
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 1323228a74..ef16669c3d 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -20,6 +20,11 @@ python __anonymous () {
image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
if image != '' and image is not None:
bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
+
+ machine_kernel_pr = bb.data.getVar('MACHINE_KERNEL_PR', d, True)
+
+ if machine_kernel_pr:
+ bb.data.setVar('PR', machine_kernel_pr, d)
}
INITRAMFS_IMAGE ?= ""
@@ -64,10 +69,6 @@ export CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "tt
KERNEL_VERSION = "${@get_kernelversion('${S}')}"
KERNEL_MAJOR_VERSION = "${@get_kernelmajorversion('${KERNEL_VERSION}')}"
-# A machine.conf or local.conf can increase MACHINE_KERNEL_PR to force
-# rebuilds for kernel and external modules
-PR = "${MACHINE_KERNEL_PR}"
-
KERNEL_LOCALVERSION ?= ""
# kernels are generally machine specific
@@ -441,10 +442,14 @@ python populate_packages_prepend () {
postinst = bb.data.getVar('pkg_postinst_modules', d, 1)
postrm = bb.data.getVar('pkg_postrm_modules', d, 1)
+
+ maybe_update_modules = "update-modules "
+ if bb.data.getVar("ONLINE_PACKAGE_MANAGEMENT", d) == "none":
+ maybe_update_modules = ""
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
- do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % bb.data.getVar("KERNEL_VERSION", d, 1))
+ do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%skernel-%s' % (maybe_update_modules, bb.data.getVar("KERNEL_VERSION", d, 1)))
import re, os
metapkg = "kernel-modules"
diff --git a/classes/lib_package.bbclass b/classes/lib_package.bbclass
index 788b7bb0c4..82c93707ea 100644
--- a/classes/lib_package.bbclass
+++ b/classes/lib_package.bbclass
@@ -1,11 +1,8 @@
PACKAGES += "${PN}-bin"
-# NB: ${base_libdir}/*${SOLIBSDEV} is included here because the shared libraries
-# in ${base_libdir} do not follow the usual *.so.* naming convention, for instance
-# libproc-3.2.7.so
FILES_${PN} = "${libexecdir} ${libdir}/lib*${SOLIBS} \
${sysconfdir} ${sharedstatedir} ${localstatedir} \
- ${base_libdir}/*${SOLIBS} ${base_libdir}/*${SOLIBSDEV} \
+ ${base_libdir}/*${SOLIBS} \
${datadir}/${PN} ${libdir}/${PN}"
FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
${libdir}/*.a ${libdir}/pkgconfig /lib/*.a /lib/*.o \
diff --git a/classes/lockdown.bbclass b/classes/lockdown.bbclass
new file mode 100644
index 0000000000..45b9761b9c
--- /dev/null
+++ b/classes/lockdown.bbclass
@@ -0,0 +1,41 @@
+addtask show_versions before do_build
+do_show_versions[nostamp] = "1"
+python do_show_versions() {
+ import sys
+
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+
+ src_uri = bb.data.getVar('SRC_URI', localdata, 1)
+ if not src_uri:
+ return 1
+
+ try:
+ bb.fetch.init(src_uri.split(),d)
+ except bb.fetch.NoMethodError:
+ (type, value, traceback) = sys.exc_info()
+ raise bb.build.FuncFailed("No method: %s" % value)
+
+
+ src_uri = bb.data.getVar("SRC_URI", d, False)
+ pn = bb.data.getVar("PN", d, True)
+ src_revs = open("%s/src_revs.inc" % bb.data.getVar("TMPDIR", d, 1), "a")
+ src_dates = open("%s/src_dates.inc" % bb.data.getVar("TMPDIR", d, 1), "a")
+ pref_versions = open("%s/preferred_versions.inc" % bb.data.getVar("TMPDIR", d, 1), "a")
+ if "SRCREV" in bb.data.getVar("PV", d, False):
+ print >> src_revs, 'SRCREV_pn-%(pn)s ?= "%(rev)s"' % { 'pn' : pn, 'rev' : bb.data.getVar("SRCREV", d, True) }
+ elif "cvs://" in src_uri or "svn://" in src_uri or "git://" in src_uri:
+ print >> src_dates, 'SRCDATE_pn-%(pn)s ?= "%(date)s"' % { 'pn' : pn, 'date' : bb.data.getVar("SRCDATE", d, True) }
+
+ print >> pref_versions, 'PREFERRED_VERSION_%(pn)s = "%(version)s"' % { "pn" : pn, 'version' : bb.data.getVar("PV", d, True) }
+ src_revs.close()
+ src_dates.close()
+ pref_versions.close()
+}
+
+addtask lockdown
+do_lockdown[nostamp] = "1"
+do_lockdown[recrdeptask] = "do_show_versions"
+python do_lockdown() {
+}
+
diff --git a/classes/nylon-image.bbclass b/classes/nylon-image.bbclass
index 6d867eab48..e973bf7cf5 100644
--- a/classes/nylon-image.bbclass
+++ b/classes/nylon-image.bbclass
@@ -9,11 +9,10 @@ nylon_create_imgz() {
# copy the kernel (for mips on flash) into tmp
FLASH_BIN=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.bin
- test -f ${FLASH_BIN} && \
cp ${FLASH_BIN} ${DEPLOY_DIR_IMAGE}/tmp/zImage.flash
# copy rootfs.jffs (or so) into tmp
- cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/tmp/rootfs.${type}
+ cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${DEPLOY_DIR_IMAGE}/tmp/rootfs.jffs2
# make an imgz out of tmp
( cd ${DEPLOY_DIR_IMAGE}/tmp; tar cvzf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.imgz * )
diff --git a/classes/nylon-mirrors.bbclass b/classes/nylon-mirrors.bbclass
index 02fddc01ba..11cc45ca0c 100644
--- a/classes/nylon-mirrors.bbclass
+++ b/classes/nylon-mirrors.bbclass
@@ -1,6 +1,6 @@
MIRRORS_append () {
-ftp://.*/.* http://meshcube.org/nylon/stable/sources/
-https?://.*/.* http://meshcube.org/nylon/stable/sources/
-ftp://.*/.* http://meshcube.org/nylon/unstable/sources/
-https?://.*/.* http://meshcube.org/nylon/unstable/sources/
+ftp://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/
+http://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/
+ftp://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/unstable/sources/
+http://.*/.*/ http://download.berlin.freifunk.net/meshcube.org/nylon/unstable/sources/
} \ No newline at end of file
diff --git a/classes/oestats-client.bbclass b/classes/oestats-client.bbclass
index 6d348d3ded..8922496242 100644
--- a/classes/oestats-client.bbclass
+++ b/classes/oestats-client.bbclass
@@ -18,8 +18,9 @@ def oestats_getid(d):
f = file(bb.data.getVar('TMPDIR', d, True) + '/oestats.id', 'r')
return f.read()
-def oestats_send(server, action, vars = {}, files = {}):
+def oestats_send(d, server, action, vars = {}, files = {}):
import httplib
+ import bb
# build body
output = []
@@ -49,7 +50,16 @@ def oestats_send(server, action, vars = {}, files = {}):
"Content-length": str(len(body))}
# send request
- conn = httplib.HTTPConnection(server)
+ proxy = bb.data.getVar('HTTP_PROXY', d, True )
+ if (proxy):
+ if (proxy.endswith('/')):
+ proxy = proxy[:-1]
+ if (proxy.startswith('http://')):
+ proxy = proxy[7:]
+ conn = httplib.HTTPConnection(proxy)
+ action = "http://%s%s" %(server, action)
+ else:
+ conn = httplib.HTTPConnection(server)
conn.request("POST", action, body, headers)
response = conn.getresponse()
data = response.read()
@@ -64,7 +74,7 @@ def oestats_start(server, builder, d):
# send report
id = ""
try:
- data = oestats_send(server, "/builds/", {
+ data = oestats_send(d, server, "/builds/", {
'builder': builder,
'build_arch': bb.data.getVar('BUILD_ARCH', d, True),
'metadata_branch': bb.data.getVar('METADATA_BRANCH', d, True),
@@ -97,7 +107,7 @@ def oestats_stop(server, d, failures):
status = "Succeeded"
try:
- response = oestats_send(server, "/builds/%s/" % id, {
+ response = oestats_send(d, server, "/builds/%s/" % id, {
'status': status,
})
if status == 'Failed':
@@ -157,7 +167,7 @@ def oestats_task(server, d, task, status):
# send report
try:
- response = oestats_send(server, "/tasks/", vars, files)
+ response = oestats_send(d, server, "/tasks/", vars, files)
if status == 'Failed':
bb.note("oestats: task failed, see http://%s%s" % (server, response))
except:
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index d4cb3b62e2..1f1b5c9a79 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -67,10 +67,16 @@ python package_ipk_install () {
raise bb.build.FuncFailed
}
+do_package_update_index_ipk[lockfiles] = "${DEPLOY_DIR_IPK}.lock"
+do_package_update_index_ipk[nostamp] = "1"
+do_package_update_index_ipk[recrdeptask] += "do_package_write_ipk"
+do_package_update_index_ipk[recrdeptask] += "do_package_write_ipk"
+do_package_update_index_ipk[depends] += "ipkg-utils-native:do_populate_staging"
+
#
# Update the Packages index files in ${DEPLOY_DIR_IPK}
#
-package_update_index_ipk () {
+do_package_update_index_ipk () {
set -x
ipkgarchs="${PACKAGE_ARCHS}"
@@ -322,3 +328,4 @@ python do_package_write_ipk () {
}
do_package_write_ipk[dirs] = "${D}"
addtask package_write_ipk before do_package_write after do_package
+addtask package_update_index_ipk before do_rootfs
diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass
index 71fa76010f..0cebdea244 100644
--- a/classes/package_rpm.bbclass
+++ b/classes/package_rpm.bbclass
@@ -136,7 +136,7 @@ python write_specfile() {
bb.build.exec_func('BUILDSPEC', d)
# move the rpm into the pkgoutdir
- rpm = bb.data.expand('${RPMBUILDPATH}/RPMS/${TARGET_ARCH}/${PKG}-${RPMPV}-${PR}.${TARGET_ARCH}.rpm', d)
+ rpm = bb.data.expand('${RPMBUILDPATH}/RPMS/${TARGET_ARCH}/${PKG}-${RPMPV}-${PR}${DISTRO_PR}.${TARGET_ARCH}.rpm', d)
outrpm = bb.data.expand('${DEPLOY_DIR_RPM}/${PACKAGE_ARCH}/${PKG}-${RPMPV}-${PR}.${TARGET_ARCH}.rpm', d)
bb.movefile(rpm, outrpm)
}
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index bd7b9ea398..33acb90a2b 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -17,7 +17,7 @@ PSTAGE_EXTRAPATH ?= "/${OELAYOUT_ABI}/${DISTRO_PR}/"
PSTAGE_PKGPATH = "${DISTRO}${PSTAGE_EXTRAPATH}"
PSTAGE_PKGPN = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d).replace('_', '-')}"
PSTAGE_PKGNAME = "${PSTAGE_PKGPN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk"
-PSTAGE_PKG = "${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}"
+PSTAGE_PKG ?= "${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}"
PSTAGE_NATIVEDEPENDS = "\
shasum-native \
diff --git a/classes/qt4e.bbclass b/classes/qt4e.bbclass
index 445ecbaa6a..f72e06b6eb 100644
--- a/classes/qt4e.bbclass
+++ b/classes/qt4e.bbclass
@@ -2,15 +2,16 @@ DEPENDS_prepend = "${@["qt4-embedded ", ""][(bb.data.getVar('PN', d, 1) == 'qt4-
inherit qmake2
QT_DIR_NAME = "qtopia"
+QT_LIBINFIX = "E"
# override variables set by qmake-base to compile Qt/Embedded apps
#
-export QMAKESPEC = "${STAGING_DATADIR}/qtopia/mkspecs/${TARGET_OS}-oe-g++"
-export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qtopia"
+export QMAKESPEC = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++"
+export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/${QT_DIR_NAME}"
export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}"
export OE_QMAKE_LIBS_QT = "qt"
export OE_QMAKE_LIBS_X11 = ""
export OE_QMAKE_EXTRA_MODULES = "network"
-EXTRA_QMAKEVARS_PRE += " QT_LIBINFIX=E "
+EXTRA_QMAKEVARS_PRE += " QT_LIBINFIX=${QT_LIBINFIX} "
# Qt4 uses atomic instructions not supported in thumb mode
ARM_INSTRUCTION_SET = "arm"
diff --git a/classes/recipe_sanity.bbclass b/classes/recipe_sanity.bbclass
new file mode 100644
index 0000000000..29f4a8fada
--- /dev/null
+++ b/classes/recipe_sanity.bbclass
@@ -0,0 +1,188 @@
+def __note(msg, d):
+ import bb
+ bb.note("%s: recipe_sanity: %s" % (d.getVar("P", 1), msg))
+
+__recipe_sanity_badtargetvars = "RDEPENDS RPROVIDES"
+def bad_target_vars(cfgdata, d):
+ import bb.data
+ if bb.data.inherits_class("native", d) or \
+ bb.data.inherits_class("cross", d):
+ return
+
+ for var in d.getVar("__recipe_sanity_badtargetvars", 1).split():
+ val = d.getVar(var, 0)
+ if val and val != cfgdata.get(var):
+ __note("%s should not be set, but is set to '%s'" % (var, val), d)
+
+__recipe_sanity_reqvars = "DESCRIPTION"
+__recipe_sanity_reqdiffvars = "LICENSE"
+def req_vars(cfgdata, d):
+ for var in d.getVar("__recipe_sanity_reqvars", 1).split():
+ if not d.getVar(var, 0):
+ __note("%s should be set" % var, d)
+
+ for var in d.getVar("__recipe_sanity_reqdiffvars", 1).split():
+ val = d.getVar(var, 0)
+ cfgval = cfgdata.get(var)
+
+ # Hardcoding is bad, but I'm lazy. We don't care about license being
+ # unset if the recipe has no sources!
+ if var == "LICENSE" and d.getVar("SRC_URI", 1) == cfgdata.get("SRC_URI"):
+ continue
+
+ if not val:
+ __note("%s should be set" % var, d)
+ elif val == cfgval:
+ __note("%s should be defined to something other than default (%s)" % (var, cfgval), d)
+
+def var_renames_overwrite(cfgdata, d):
+ renames = d.getVar("__recipe_sanity_renames", 0)
+ if renames:
+ for (key, newkey, oldvalue, newvalue) in renames:
+ if oldvalue != newvalue and oldvalue != cfgdata.get(newkey):
+ __note("rename of variable '%s' to '%s' overwrote existing value '%s' with '%s'." % (key, newkey, oldvalue, newvalue), d)
+
+def incorrect_nonempty_PACKAGES(cfgdata, d):
+ import bb.data
+ if bb.data.inherits_class("native", d) or \
+ bb.data.inherits_class("cross", d):
+ if d.getVar("PACKAGES", 1):
+ return True
+
+def can_use_autotools_base(cfgdata, d):
+ import bb
+ cfg = d.getVar("do_configure", 1)
+ if not bb.data.inherits_class("autotools", d):
+ return False
+
+ for i in ["autoreconf"] + ["%s_do_configure" % cls for cls in ["gnome", "e", "autotools", "autotools_stage", "efl", "gpephone", "openmoko", "openmoko2", "xfce", "xlibs"]]:
+ if cfg.find(i) != -1:
+ return False
+
+ import os
+ for clsfile in d.getVar("__inherit_cache", 0):
+ (base, _) = os.path.splitext(os.path.basename(clsfile))
+ if cfg.find("%s_do_configure" % base) != -1:
+ __note("autotools_base usage needs verification, spotted %s_do_configure" % base, d)
+
+ return True
+
+def can_remove_FILESPATH(cfgdata, d):
+ import os
+ import bb
+ expected = cfgdata.get("FILESPATH")
+ #expected = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', 1).split(':') for p in d.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES', 1) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}:${FILESDIR}"
+ expectedpaths = bb.data.expand(expected, d)
+ unexpanded = d.getVar("FILESPATH", 0)
+ filespath = d.getVar("FILESPATH", 1).split(":")
+ filespath = [os.path.normpath(f) for f in filespath if os.path.exists(f)]
+ for fp in filespath:
+ if not fp in expectedpaths:
+ # __note("Path %s in FILESPATH not in the expected paths %s" %
+ # (fp, expectedpaths), d)
+ return False
+ return expected != unexpanded
+
+def can_remove_FILESDIR(cfgdata, d):
+ import os
+ import bb
+ expected = cfgdata.get("FILESDIR")
+ #expected = "${@bb.which(d.getVar('FILESPATH', 1), '.')}"
+ unexpanded = d.getVar("FILESDIR", 0)
+ if unexpanded is None:
+ return False
+
+ expanded = os.path.normpath(d.getVar("FILESDIR", 1))
+ filespath = d.getVar("FILESPATH", 1).split(":")
+ filespath = [os.path.normpath(f) for f in filespath if os.path.exists(f)]
+
+ return unexpanded != expected and \
+ os.path.exists(expanded) and \
+ (expanded in filespath or
+ expanded == bb.data.expand(expected, d))
+
+def can_remove_others(p, cfgdata, d):
+ import bb
+ for k in ["S", "PV", "PN", "DESCRIPTION", "LICENSE", "DEPENDS",
+ "SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]:
+ #for k in cfgdata:
+ unexpanded = d.getVar(k, 0)
+ cfgunexpanded = cfgdata.get(k)
+ if not cfgunexpanded:
+ continue
+
+ try:
+ expanded = d.getVar(k, 1)
+ cfgexpanded = bb.data.expand(cfgunexpanded, d)
+ except bb.fetch.ParameterError:
+ continue
+
+ if unexpanded != cfgunexpanded and \
+ cfgexpanded == expanded:
+ __note("candidate for removal of %s" % k, d)
+ bb.debug(1, "%s: recipe_sanity: cfg's '%s' and d's '%s' both expand to %s" %
+ (p, cfgunexpanded, unexpanded, expanded))
+
+python do_recipe_sanity () {
+ p = d.getVar("P", 1)
+ p = "%s %s %s" % (d.getVar("PN", 1), d.getVar("PV", 1), d.getVar("PR", 1))
+
+ sanitychecks = [
+ (can_remove_FILESDIR, "candidate for removal of FILESDIR"),
+ (can_remove_FILESPATH, "candidate for removal of FILESPATH"),
+ #(can_use_autotools_base, "candidate for use of autotools_base"),
+ (incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"),
+ ]
+ cfgdata = d.getVar("__recipe_sanity_cfgdata", 0)
+
+ for (func, msg) in sanitychecks:
+ if func(cfgdata, d):
+ __note(msg, d)
+
+ can_remove_others(p, cfgdata, d)
+ var_renames_overwrite(cfgdata, d)
+ req_vars(cfgdata, d)
+ bad_target_vars(cfgdata, d)
+}
+do_recipe_sanity[nostamp] = "1"
+#do_recipe_sanity[recrdeptask] = "do_recipe_sanity"
+addtask recipe_sanity
+
+do_recipe_sanity_all[nostamp] = "1"
+do_recipe_sanity_all[recrdeptask] = "do_recipe_sanity"
+do_recipe_sanity_all () {
+ :
+}
+addtask recipe_sanity_all after do_recipe_sanity
+
+python recipe_sanity_eh () {
+ from bb.event import getName
+
+ if getName(e) != "ConfigParsed":
+ return NotHandled
+
+ d = e.data
+
+ cfgdata = {}
+ for k in d.keys():
+ #for k in ["S", "PR", "PV", "PN", "DESCRIPTION", "LICENSE", "DEPENDS",
+ # "SECTION"]:
+ cfgdata[k] = d.getVar(k, 0)
+
+ d.setVar("__recipe_sanity_cfgdata", cfgdata)
+ #d.setVar("__recipe_sanity_cfgdata", d)
+
+ # Sick, very sick..
+ from bb.data_smart import DataSmart
+ old = DataSmart.renameVar
+ def myrename(self, key, newkey):
+ oldvalue = self.getVar(newkey, 0)
+ old(self, key, newkey)
+ newvalue = self.getVar(newkey, 0)
+ if oldvalue:
+ renames = self.getVar("__recipe_sanity_renames", 0) or set()
+ renames.add((key, newkey, oldvalue, newvalue))
+ self.setVar("__recipe_sanity_renames", renames)
+ DataSmart.renameVar = myrename
+}
+addhandler recipe_sanity_eh
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 82220661f3..dc2b2cb02c 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -44,6 +44,8 @@ fakeroot rootfs_deb_do_rootfs () {
cat "${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample" \
| sed -e 's#Architecture ".*";#Architecture "${DPKG_ARCH}";#' \
+ | sed -e 's#status ".*";#status "${IMAGE_ROOTFS}/var/dpkg/status";#' \
+ | sed -e 's#DPkg::Options {".*"};#DPkg::Options {"--root=${IMAGE_ROOTFS}";"--admindir=${IMAGE_ROOTFS}/var/dpkg";"--force-all";"--no-debsig"};#' \
> "${STAGING_ETCDIR_NATIVE}/apt/apt-rootfs.conf"
export APT_CONFIG="${STAGING_ETCDIR_NATIVE}/apt/apt-rootfs.conf"
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index f5714bd1a3..16dd511fcb 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -5,8 +5,7 @@
# See image.bbclass for a usage of this.
#
-do_rootfs[depends] += "opkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
-do_rootfs[recrdeptask] += "do_package_write_ipk"
+do_rootfs[depends] += "opkg-native:do_populate_staging"
IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
@@ -29,7 +28,6 @@ PACKAGE_INSTALL_append = " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "non
fakeroot rootfs_ipk_do_rootfs () {
set -x
- package_update_index_ipk
package_generate_ipkg_conf
mkdir -p ${T}
@@ -64,9 +62,8 @@ fakeroot rootfs_ipk_do_rootfs () {
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT}
- mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/opkg/
-
if [ "${ONLINE_PACKAGE_MANAGEMENT}" != "none" ]; then
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/opkg/
grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}${sysconfdir}/opkg/arch.conf
fi
@@ -97,6 +94,7 @@ fakeroot rootfs_ipk_do_rootfs () {
ln -s opkg ${IMAGE_ROOTFS}${libdir}/ipkg
else
rm -rf ${IMAGE_ROOTFS}${libdir}/opkg
+ rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg
fi
${ROOTFS_POSTPROCESS_COMMAND}
@@ -109,7 +107,8 @@ rootfs_ipk_log_check() {
lf_path="$2"
lf_txt="`cat $lf_path`"
- for keyword_die in "Cannot find package" "exit 1" ERR Fail
+ for keyword_die in "Cannot find package" "Cannot satisfy the following dependencies" \
+ "exit 1" ERR Fail
do
if (echo "$lf_txt" | grep -v log_check | grep -w "$keyword_die") >/dev/null 2>&1
then
diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass
index ab8096eb45..546738dde8 100644
--- a/classes/seppuku.bbclass
+++ b/classes/seppuku.bbclass
@@ -319,6 +319,12 @@ python seppuku_eventhandler() {
passw = bb.data.getVar("SEPPUKU_PASS", data, True)
product = bb.data.getVar("SEPPUKU_PRODUCT", data, True)
component = bb.data.getVar("SEPPUKU_COMPONENT", data, True)
+ proxy = bb.data.getVar('HTTP_PROXY', data, True )
+ if (proxy):
+ phl = urllib2.ProxyHandler({'http' : proxy})
+ poster.add_handler(phl)
+ opener.add_handler(phl)
+
# evil hack to figure out what is going on
debug_file = open(os.path.join(bb.data.getVar("TMPDIR", data, True),"..","seppuku-log"),"a")
diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass
index 0221b123f1..e51d7ab8a6 100644
--- a/classes/siteinfo.bbclass
+++ b/classes/siteinfo.bbclass
@@ -32,7 +32,7 @@ def get_siteinfo_list(d):
"arm-linux-uclibc": "endian-little bit-32 common-linux common-uclibc arm-common",\
"arm-linux-uclibcgnueabi": "endian-little bit-32 common-linux common-uclibc arm-common arm-linux-uclibc",\
"avr32-linux-uclibc": "endian-big bit-32 common-linux common-uclibc avr32-common",\
- "bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\
+ "bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\
"i386-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
"i486-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
"i586-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
@@ -64,6 +64,7 @@ def get_siteinfo_list(d):
"sh4-linux": "endian-little bit-32 common-linux common-glibc sh-common",\
"sh4-linux-uclibc": "endian-little bit-32 common-linux common-uclibc sh-common",\
"sparc-linux": "endian-big bit-32 common-linux common-glibc",\
+ "viac3-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
"x86_64-linux": "endian-little bit-64 common-linux common-glibc",\
"x86_64-linux-uclibc": "endian-little bit-64 common-linux common-uclibc"}
if target in targetinfo:
diff --git a/classes/task.bbclass b/classes/task.bbclass
index 4edd704829..f3287ebf73 100644
--- a/classes/task.bbclass
+++ b/classes/task.bbclass
@@ -17,6 +17,7 @@ PACKAGE_ARCH = "all"
# to the list. Their dependencies (RRECOMMENDS) are handled as usual
# by package_depchains in a following step.
python () {
+ import bb
packages = bb.data.getVar('PACKAGES', d, 1).split()
genpackages = []
for pkg in packages:
diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass
index 0b7fc1d843..d2b2b33898 100644
--- a/classes/tinderclient.bbclass
+++ b/classes/tinderclient.bbclass
@@ -1,10 +1,20 @@
-def tinder_http_post(server, selector, content_type, body):
+def tinder_http_post(d, server, selector, content_type, body):
import httplib
+ from bb import data
# now post it
for i in range(0,5):
try:
- h = httplib.HTTP(server)
- h.putrequest('POST', selector)
+ proxy = data.getVar('HTTP_PROXY', d, True )
+ if (proxy):
+ if (proxy.endswith('/')):
+ proxy = proxy[:-1]
+ if (proxy.startswith('http://')):
+ proxy = proxy[7:]
+ h = httplib.HTTP(proxy)
+ h.putrequest('POST', 'http://%s%s' % (server, selector))
+ else:
+ h = httplib.HTTP(server)
+ h.putrequest('POST', selector)
h.putheader('content-type', content_type)
h.putheader('content-length', str(len(body)))
h.endheaders()
@@ -12,8 +22,8 @@ def tinder_http_post(server, selector, content_type, body):
errcode, errmsg, headers = h.getreply()
#print errcode, errmsg, headers
return (errcode,errmsg, headers, h.file)
- except:
- print "Error sending the report!"
+ except Exception, e:
+ print "Error sending the report! ", e
# try again
pass
@@ -116,7 +126,7 @@ def tinder_build_start(d):
#print "selector %s and url %s" % (selector, url)
# now post it
- errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body)
+ errcode, errmsg, headers, h_file = tinder_http_post(d,server,selector,content_type, body)
#print errcode, errmsg, headers
report = h_file.read()
@@ -151,7 +161,7 @@ def tinder_send_http(d, status, _log):
new_log = _log
while len(new_log) > 0:
content_type, body = tinder_format_http_post(d,status,new_log[0:18000])
- errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body)
+ errcode, errmsg, headers, h_file = tinder_http_post(d,server,selector,content_type, body)
#print errcode, errmsg, headers
#print h.file.read()
new_log = new_log[18000:]
diff --git a/classes/update-rc.d.bbclass b/classes/update-rc.d.bbclass
index 6328193bb9..91af859392 100644
--- a/classes/update-rc.d.bbclass
+++ b/classes/update-rc.d.bbclass
@@ -1,5 +1,5 @@
DEPENDS_append = " update-rc.d"
-RDEPENDS_append = " update-rc.d"
+RDEPENDS_${PN}_append = " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
INITSCRIPT_PARAMS ?= "defaults"
diff --git a/classes/xfce.bbclass b/classes/xfce.bbclass
index 48e012e67e..b18313fa2a 100644
--- a/classes/xfce.bbclass
+++ b/classes/xfce.bbclass
@@ -5,7 +5,7 @@
# Global class to make it easier to maintain XFCE packages
HOMEPAGE = "http://www.xfce.org"
-LICENSE = "LGPL-2"
+LICENSE = "LGPLv2"
DEPENDS += "startup-notification"
XFCE_VERSION = ${PV}
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 95ee9c6136..8b6956453b 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -164,7 +164,7 @@ P = "${PN}-${PV}"
# Define a PR for kernels that machines can override so things like
# modules get rebuilt
-MACHINE_KERNEL_PR ?= "r0"
+MACHINE_KERNEL_PR = ""
# Base package name
# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
@@ -211,13 +211,10 @@ PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-locale"
PACKAGES_DYNAMIC = "${PN}-locale-*"
FILES = ""
-# NB: ${base_libdir}/*${SOLIBSDEV} is included here because the shared libraries
-# in ${base_libdir} do not follow the usual *.so.* naming convention, for instance
-# libproc-3.2.7.so
FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
${sysconfdir} ${sharedstatedir} ${localstatedir} \
${base_bindir}/* ${base_sbindir}/* \
- ${base_libdir}/*${SOLIBS} ${base_libdir}/*${SOLIBSDEV} \
+ ${base_libdir}/*${SOLIBS} \
${datadir}/${PN} ${libdir}/${PN}/* \
${datadir}/pixmaps ${datadir}/applications \
${datadir}/idl ${datadir}/omf ${datadir}/sounds \
@@ -322,7 +319,6 @@ SDK_PATH = "/usr/local/${SDK_NAME}"
# Kernel info.
##################################################################
-OLDEST_KERNEL = "2.4.0"
STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/kernel"
##################################################################
@@ -475,7 +471,7 @@ EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g"
SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"
-BUILD_OPTIMIZATION = "-O2"
+BUILD_OPTIMIZATION = "-O2 -g"
##################################################################
# Bootstrap stuff.
@@ -508,7 +504,7 @@ E_URI = "http://enlightenment.freedesktop.org/files"
FREEBSD_MIRROR = "ftp://ftp.freebsd.org/pub/FreeBSD/"
FREEDESKTOP_CVS = "cvs://anoncvs:anoncvs@anoncvs.freedesktop.org/cvs"
FREESMARTPHONE_GIT = "git://git.freesmartphone.org"
-GENTOO_MIRROR = "http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles"
+GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
GNOME_GIT = "git://git.gnome.org"
GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources"
GNU_MIRROR = "ftp://ftp.gnu.org/gnu"
@@ -612,6 +608,8 @@ AUTO_LIBNAME_PKGS = "${PACKAGES}"
ENTERPRISE_DISTRO ?= "0"
# Pre-build configuration output
+
+BUILDCFG_HEADER = "Build Configuration:"
BUILDCFG_VARS ?= "BB_VERSION METADATA_BRANCH METADATA_REVISION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION"
BUILDCFG_VARS_append_arm = " TARGET_FPU"
BUILDCFG_VARS_append_armeb = " TARGET_FPU"
diff --git a/conf/checksums.ini b/conf/checksums.ini
index aa5b5beaec..3d8c9d3dda 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -186,6 +186,10 @@ sha256=d392567cb39b4ea606c0e0acafd8ed72320311b995336ece5fcefcf9b150e9d7
md5=8b311547f4a2c8c6b6598e3318d66cd7
sha256=d2d21f995d1a152ca2d8beea6d37f31e48cca034b82ceb7322f39422e849e9cf
+[http://hal.freedesktop.org/releases/DeviceKit-disks-004.tar.gz]
+md5=1ed8e1931f56ad3fc53ba485391434b5
+sha256=e9cc2ed4db0f48a9fdb353f6774df585ac1bc3a0f7c77fcede1c1c27497882bd
+
[http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Digest-SHA1-2.11.tar.gz]
md5=2449bfe21d6589c96eebf94dae24df6b
sha256=3cebe0a6894daee3bfa5d9619fc90e7619cb6a77ac1b04d027341cd6033ae989
@@ -218,6 +222,14 @@ sha256=0875e553a17fe65e920ad810a67aa6faca582c53476d8dc75880a6b3da625d0b
md5=59ca16f600e96c8c104a485ff7c322c6
sha256=80ab8e34246a280bc380020cf331bcc0014cf816380cee3935ad455c108e661e
+[http://directfb.org/downloads/Old/DirectFB-1.2.7.tar.gz]
+md5=59ca16f600e96c8c104a485ff7c322c6
+sha256=80ab8e34246a280bc380020cf331bcc0014cf816380cee3935ad455c108e661e
+
+[http://directfb.org/downloads/Core/DirectFB-1.2/DirectFB-1.2.8.tar.gz]
+md5=ac13d21682aa368df4e177ae5b51ad2d
+sha256=cbf94eb10e9c305c81b24e298e55c7825df5ab9060d82443f7b9734f760f859d
+
[http://www.directfb.org/downloads/Extras/DirectFB-examples-0.9.25.tar.gz]
md5=835e850fddba8d8214d39ddd0646c3e8
sha256=f83af60d53ab4319e5d71a4459cc10464ffd683efabacd6bd773bb807f8771fa
@@ -1014,6 +1026,14 @@ sha256=6fd69febfd804437a9d5b610502c6d3c2caabef7a4832a3bcac2357515adaa71
md5=e65a007157e3e26807db52299497109d
sha256=e064a939bf7e37774b89a39515ecf96c4d19c81e050bcf0dae28d1eab4d86196
+[http://install.source.dir.com/TI-C6x-CGT-v6.0.16-eval.tar.gz]
+md5=152fdf383df154b33478a0312752bade
+sha256=0eb1d3af0a02179edb91b5468972265f13c3a89990549f289233c0784937ab9e
+
+[http://install.source.dir.com/TI-C6x-CGT-v6.0.21-eval.tar.gz]
+md5=65c8166ad0edb468c5327d1109d84229
+sha256=6011f7a10fa71a540503fc8d54140728022ec89eb8bc2ef344002bb11cf25667
+
[http://sdgsystems.com/pub/ipaq/hx4700/src/TIInit_3.2.26.bts]
md5=8741490a25b98230973446400971bba9
sha256=c1f29cfd31c335a409bdc530c2e68661d20a1e3c2e5d64454470b6700a40681e
@@ -1298,6 +1318,10 @@ sha256=aa3c42224ec702b6cdb69ca6501284cb6dacb87473a076d7337ee9635c96f160
md5=5c9b705700df51d232be223b6ab6414d
sha256=aa3c42224ec702b6cdb69ca6501284cb6dacb87473a076d7337ee9635c96f160
+[http://downloads.sourceforge.net/acpid/acpid-1.0.8.tar.gz]
+md5=1d9c52fe2c0b51f8463f357c2a3d3ddb
+sha256=d57ae5302c38c37d060a097fa51600fe06fbfffd575641d638407944f126b7b1
+
[http://ftp.gnu.org/gnu/classpathx/activation-1.1.1.tar.gz]
md5=de50d7728e8140eb404f2b4554321f8c
sha256=b1b5ef560d30fcb11fbf537246857d14110ce4eb2b200d4c54690472305d87b7
@@ -1398,6 +1422,14 @@ sha256=bc691463af8506c1c84db0edab727ee8f8ee4ecd1777b0e264db2525d4500833
md5=de60df7541fafe8c6a3397e0f105ff0e
sha256=c487645d32b8124b9ae224b8929e5aa45e581bd8d8c8da666add423cf927d1ea
+[ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.19.tar.bz2]
+md5=73db3666c211e5fb023bb77450cf430d
+sha256=32ee26d93a25963fdc49b4b5ccd014749d675e33f419022c646a61c31a4a2886
+
+[ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.20.tar.bz2]
+md5=6e9080ba1faa5d3739d14dd76c62d8dc
+sha256=15f8d0eef1da10c62136107e7b585bc8beb9c9e9b7ad177654097f8c15e57a63
+
[ftp://ftp.alsa-project.org/pub/oss-lib/alsa-oss-1.0.11.tar.bz2]
md5=3106c2d59a329263867fa3dd44133dda
sha256=6b688a3895a14945d0622e16cfdb9292ef9f953ab2d195b08595736f76e5a790
@@ -1426,6 +1458,10 @@ sha256=35a7e1411ab7b34353136ecfbd2267201d37b671f48b946bf238a6d1f7fdf560
md5=4a798b47ba10c17aed66dff234d31b24
sha256=deb7652a3c1360febbbffb5d0150e5ad8547063d37969ad24d13359f75a424ba
+[ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-1.0.19.tar.bz2]
+md5=29ae9cac05423cf6a49f66eeb1a79eb6
+sha256=67be087c24af9d2a380b29d6e90b7187b337a0c484c31438a0d38ff429c71100
+
[ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.11.tar.bz2]
md5=ba9b8010120701d0f6daf061d392cfa2
sha256=4b33229437ddab4196b8fd0bdfaf074314185a5afd3e24bbe28025022b42d01b
@@ -1450,6 +1486,10 @@ sha256=6a06f457d66eca75ac1ab065e64539e4ccf22ed4e53703a70194cb85203b3125
md5=0a6b26d27cc2adfd591d91d8c155fdb7
sha256=ea0ae914cc8d46254dc02ca2b227d379d0eb1d76a3960907e57f26f2ec584aef
+[ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.19.tar.bz2]
+md5=5ff0379c707c1a29083233edc9ab4e06
+sha256=1f4924f5ae7857ce64a3d6ecbeb98133c74ff1ead2b0f48187623d6e4b838cad
+
[http://www.panix.com/~gesslein/am.tgz]
md5=df7535050d4bbe57c5d1243c8ec2479e
sha256=13ab5d2045d902b627725e7cf4fc82df3ec2e714e85e42b93bd48af7af9bffdc
@@ -1538,6 +1578,10 @@ sha256=17da486f983597f28c0efadb261b76b733155be7451ef34eefc65cb4058d883d
md5=d5d7c69837cc7dcbf2aa181ff423ab20
sha256=a938c07ea331359f379802c50c33aa0307b913f742ad74087d45e7fb2a1f4d50
+[http://xorg.freedesktop.org/releases/individual/proto/applewmproto-1.2.0.tar.bz2]
+md5=44e18d01857f9dfeb8628e317e786f31
+sha256=4f549083df9db85e61d0b272645e3dc71bacde9b9156ca20a57440e794b71042
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/applewmproto-X11R7.0-1.0.3.tar.bz2]
md5=2acf46c814a27c40acd3e448ed17fee3
sha256=db738777fd573bede8e41f121f31692e8ec70bb822b5dcd263973533273fc5ec
@@ -2010,6 +2054,10 @@ sha256=f0cde70a8f135098a6a3e85869f2e1cc3f141beea766fa3d6636e086cd8b90a7
md5=36d3fe706ad0950f1be10c46a429efe0
sha256=93a2ceab963618b021db153f0c881a2de82455c1dc7422be436fcd5c554085a1
+[ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.63.tar.bz2]
+md5=7565809ed801bb5726da0631ceab3699
+sha256=264d7c1c0e268bc77fbe0f308e085545535edfe73f33e27c80219cc0c9c71246
+
[http://kernel.org//pub/linux/daemons/autofs/v3/autofs-3.1.7.tar.bz2]
md5=4f602f82442b48ce9c2e0005d59c3408
sha256=838c6e92c39827b54a37559a02c9b409a4f7ec3124cc6d20845aabfaabe2dd18
@@ -2614,6 +2662,10 @@ sha256=bd2ea10ffc2bf62a917b05f4fbe3d02212589c2bc177fa0c51a9c874d3da528a
md5=73e76bdd997fa945d71edcfbdd356c15
sha256=18f72b922a9a346f6c43b20fd86eba76cfd27a8d118ea32fa879050ddebe0267
+[http://install.source.dir.com/bios_setuplinux_5_33_02.bin]
+md5=64f61b08d091625c0912cb9de33242af
+sha256=506e07715028811b8d945c85c54ae07bc33bdd8afff1611cbb30d154ba86d04e
+
[ftp://ftp.gnu.org/gnu/bison/bison-2.0.tar.gz]
md5=c17f964fd5504b88b07a183420de25e3
sha256=31b816846903d319a6f6cd1c9aada5ff83914206cb7df69c235ae909785109a1
@@ -2750,6 +2802,18 @@ sha256=2bfc5db7703cbcaaa4be2576609136450e1dac5d4782707dd0dc81754e3c2489
md5=ba06291b737077332e914d6d653501c6
sha256=924dc4b8ae78da2c8f3af9c36ab85d08ee7f8ec0ae4dfe58840ae70041580063
+[http://www.kernel.org/pub/linux/bluetooth/bluez-4.40.tar.gz]
+md5=a25fa37c97c309338649f6a5fd4cea76
+sha256=1208d8e986f8b545659db21c8220ec28b48979627158123dd9018f9733d858d2
+
+[http://www.kernel.org/pub/linux/bluetooth/bluez-4.41.tar.gz]
+md5=4629236517df280be321f009917a52be
+sha256=0b22f518085528b71aa9eab8bbc44d2696458c85d902c6a6686076ae10d64549
+
+[http://www.kernel.org/pub/linux/bluetooth/bluez-4.42.tar.gz]
+md5=d24dfd3ca42847123e29f58b29af6948
+sha256=ed7631a6d22b456eb26b881bdbe46ea47f93d2f192da420408bad4bbc245f796
+
[http://www.kernel.org/pub/linux/bluetooth/bluez-4.7.tar.gz]
md5=2aa806940d2c841e57a9b2ab7302b750
sha256=ed384dea4f5f21157758fcd7db64db19ce0b410509c26630706e4a3c779287a0
@@ -3198,6 +3262,10 @@ sha256=c94dbfa293cbc61b8571d025e90fd1f06a34f8d4e5b11a59856bfc1f13014de3
md5=b9d77c57bda2e019207a1874d9bb4dea
sha256=c94dbfa293cbc61b8571d025e90fd1f06a34f8d4e5b11a59856bfc1f13014de3
+[http://downloads.sourceforge.net/bwmng/bwm-ng-0.6.tar.gz]
+md5=d3a02484fb7946371bfb4e10927cebfb
+sha256=c1134358e268329d438b0996399003b0f0b966034fb4b5b138761c2f3c62ffdd
+
[http://downloads.sourceforge.net/bwmon/bwmon-1.3.tar.gz]
md5=53c44b73aa67d5e0282adfe928f3ba44
sha256=624381208d0faae6c123bc6198a59d6c4316cd4fffb1ba5aca206374f5a42df6
@@ -3434,6 +3502,10 @@ sha256=73de81ea2de2eae64b888e1b2739ef643ccea13c79790569f8e6278369976a21
md5=09b2019e926d5ef42d52edb2dd33ceae
sha256=3fb7c11ec5d802338a0bf522b11702c37820597c9a2c36f89b52872c6571e602
+[http://pub.risujin.org/cellwriter/cellwriter-1.3.4.tar.gz]
+md5=72b4e552a32d6acd888da0b88aeebbdd
+sha256=6ab6fa697938af0fc8b587ccd7c5889087800569e558b97797963c6ee2fada0c
+
[http://centericq.de/archive/source/releases/centericq-4.11.0.tar.bz2]
md5=bed5e7eeb60b5ac0045f201f13130964
sha256=4f0f769a6e1cc7d76b527829deef34861ed8f79ae07e29d49566df3594308380
@@ -3482,6 +3554,10 @@ sha256=fbd7a0595eba5cf0cb168d9893e883f5cc7a68a7d6fec23cb3688508b247fa22
md5=9a4d5665b8be07513f5ac4e6eec537e6
sha256=fbd7a0595eba5cf0cb168d9893e883f5cc7a68a7d6fec23cb3688508b247fa22
+[http://downloads.sourceforge.net/check/check-0.9.5.tar.gz]
+md5=30143c7974b547a12a7da47809a90951
+sha256=961b3c66869018d02226bbbc394e79362cd898962ce810bce8417b3c497f7ad6
+
[http://handhelds.org/~zecke/oe_packages/checkers_V1.0.5ern.tar.gz]
md5=82b08b1980ec6fbfc83b4dc0e2df10f7
sha256=543435cb0988acc90a6e651e424eb331aba3f73361036d7af458bc1233973199
@@ -3742,6 +3818,10 @@ sha256=d391829686eb002ace3ffbfed75c35e877b42c1884c9359791634b5b57126797
md5=d8f3bbfbcc337d9776991d9561f451f3
sha256=773ce12045ce98c3be4b1845547435f1b7798996fa3170dea72c7c15aa5ca79d
+[http://install.source.dir.com/codec_engine_2_23_01.tar.gz]
+md5=581f548714a53d818ac355a1e4aacfa4
+sha256=32c96ec23642d827bcbc865ac490fe7f2eeec2e04448980c4eb70d0fb25f74d8
+
[http://install.tarball.in.source.dir/codec_engine_2_23_01.tar.gz]
md5=581f548714a53d818ac355a1e4aacfa4
sha256=32c96ec23642d827bcbc865ac490fe7f2eeec2e04448980c4eb70d0fb25f74d8
@@ -3914,6 +3994,10 @@ sha256=73f3b92c0f85ab2bf0f9bb18f928a8b84cacdbb459f3a530df540d4ddf134405
md5=7bc5c89870d47c88f407fcfd666c739d
sha256=102bb7a5d329dd6831bc8a923fa0b5d7634efa215e3d15377630d9b738df49da
+[http://www.kernel.org/pub/linux/network/connman/connman-0.18.tar.gz]
+md5=b58cb56d0403bfafb3972e82a339546c
+sha256=923ce04b8ff93aa9eec4df6c822f1c7d35e8aea1ab8680bd0d9a5e4d327dd3c6
+
[http://www.kernel.org/pub/linux/network/connman/connman-0.19.tar.gz]
md5=3d61c5db55d225c3efbf4c950dc0842f
sha256=cc4a4b73d8d7b0e19dd2dd274ba91acb67b14c84fc448a921d1359e25e4d2df0
@@ -3954,6 +4038,10 @@ sha256=d7acac8bc0a38dfcab098137a76f5e9f4ce30ca86e82b26540502658e6b4e4a7
md5=c9a3b384f080ed4cdf139ce9377ef2c8
sha256=d7acac8bc0a38dfcab098137a76f5e9f4ce30ca86e82b26540502658e6b4e4a7
+[http://www.kernel.org/pub/linux/network/connman/connman-gnome-0.5.tar.gz]
+md5=0e1c4c25d19cad9b08a216848a320716
+sha256=4d5fe481b444fc3e64fd9caa149dbcd76de166a25733f18fd93da01d2abf5d1c
+
[http://www.conserver.com/conserver-8.1.14.tar.gz]
md5=f7825728e5af8992ed4a99fb560a3df8
sha256=48a9e2f8a02054bc6740ae354433bfa1636a6e726f2d62af22752d7a6103410b
@@ -4054,6 +4142,10 @@ sha256=71b626958e3d8927d236f462b2becd192a113d1d6d38b8d567bdc181b5069ccf
md5=0bc06cd219410f7d4f6bbfc9bdd7c824
sha256=71b626958e3d8927d236f462b2becd192a113d1d6d38b8d567bdc181b5069ccf
+[http://downloads.sourceforge.net/cppunit/cppunit-1.12.1.tar.gz]
+md5=bd30e9cf5523cdfc019b94f5e1d7fd19
+sha256=ac28a04c8e6c9217d910b0ae7122832d28d9917fa668bcc9e0b8b09acb4ea44a
+
[http://pages.sbcglobal.net/redelm/cpuburn_1_4_tar.gz]
md5=f9bb5ff68afb6ccfca11718c90bcab68
sha256=1b2a1672f455545a28d0f038737e792e8c3b97789f2029f765847fc2a807244a
@@ -4526,6 +4618,10 @@ sha256=22b1f489afef6849919220591ffc51615b9cddbea61b66b43791fdeebb4dbe09
md5=78012718a15d43e2c4952db7409c9e7e
sha256=792776053c5842c4335d3f17d9f0c789063ad34c4fc0e2ccabbdefbd84f14726
+[http://arago-project.org/files/short-term/demo/demo-app-src.tar.gz]
+md5=92cea8c3ea5db7ad6073b0feb33cf911
+sha256=caf7aa9ea60947bf6fb03ecee8bf3ea2ddf250fe2486ae24b8349d6ff3b74d3d
+
[http://freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-0.14.tar.gz]
md5=e0b5057a4e3166f34635ac6f27c712c0
sha256=97856d2621d4e3273340b7f1172c2e074c74263629b05bde0f0f077425ec0699
@@ -4558,6 +4654,10 @@ sha256=49c8303f58abf3a0efbbd42decdc5968688df32c154cffb20a1c3c1ae8b92048
md5=074cf116cc2c7194f2d100bc5f743833
sha256=963cc8a1f7e73a0929b7b527f6b4cfc5f78c932d673b5c13c889108d3182811a
+[ftp://sources.redhat.com/pub/dm/device-mapper.1.02.28.tgz]
+md5=c9ae0776994a419f9e1ba842164bb626
+sha256=24c7887fe896325a6cdc86b8beeb0d9c2de8b1c4cb20f53c2dc8f90963fc39bf
+
[https://stage.maemo.org/svn/maemo/projects/haf/trunk/fontconfig/device_symbols.h]
md5=c0124afc760d4fe8c24ffcf15ba7f391
sha256=4e0c1726f9c565deec6d6af9eebda47ca6dea473f3280cc89beb321ae33ff962
@@ -4782,6 +4882,10 @@ sha256=d937528e10c16831d8df31893ee24da8ec2bfd9e9170671c482a1b1abfc5efc3
md5=4c6f3eb03ffbd067b6d2fe2344b0d9ad
sha256=39f80c1810be22c5ea7f6a44bbb449c3e29902895dcff9da6a8440891a67b8b4
+[http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/codecs/dm355_codecs_setuplinux_1_13_000.bin]
+md5=f6221188bea76b7aaf0c45e9bcf26329
+sha256=f1a6dea51be9798903a0543fb50f463b0594b1f11b897bc50e40825fb7527c61
+
[http://dmalloc.com/releases/dmalloc-5.5.2.tgz]
md5=f92e5606c23a8092f3d5694e8d1c932e
sha256=d3be5c6eec24950cb3bd67dbfbcdf036f1278fae5fd78655ef8cdf9e911e428a
@@ -4954,6 +5058,10 @@ sha256=545ce9830f0cf649e3b1b40d25d13989c23302623bf9b50f4c24402f63c82184
md5=1d70f0653b0b3a837853262dc5d34da4
sha256=69def6d1f64b3699ec9c729596d8b096623a62bdda6bbea78ed690421d174c11
+[http://xorg.freedesktop.org/releases/individual/proto/dri2proto-2.0.tar.bz2]
+md5=26f6515322ec50691584ac74291b4254
+sha256=1954a7e96d7fe70611c483836ed143e84a069eed6d3dab22c05a531bfb6da9e4
+
[http://www.ex-parrot.com/~chris/driftnet/driftnet-0.1.6.tar.gz]
md5=8e11d77770452f97bb3c23f510489815
sha256=dbdf7ead3ae14b109f88c86dedeb7524be8c257aa773a781891216f013373d6d
@@ -5078,6 +5186,10 @@ sha256=2cc10fee2b29add737e454eb634513135b34a638f7ca2b18364864fe089020dc
md5=59033388df36987d2b9c9bbf7e19bd57
sha256=2cc10fee2b29add737e454eb634513135b34a638f7ca2b18364864fe089020dc
+[http://downloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.5.tar.gz]
+md5=e218df6c84fc17c1126d31de9472a76c
+sha256=b3d7d0e1058a3740ddae83d47285bd9dce161eec9e299dde7996ed721da32198
+
[http://downloads.sourceforge.net/e2fsprogs/e2fsprogs-libs-1.33.tar.gz]
md5=c7545bb05e0c2fc59174f0dc455c6519
sha256=a65d064bee3e97c164d07a490692db0e73da8da10019ad9a89866706c93ae703
@@ -5122,6 +5234,10 @@ sha256=2de57ec75aca127ec70c2797c1a416fca43d78e6cb5c8ee4938864cb8eaafb56
md5=258d0a8277ace7fab06c55fdb2b249c4
sha256=2de57ec75aca127ec70c2797c1a416fca43d78e6cb5c8ee4938864cb8eaafb56
+[http://downloads.sourceforge.net/e2fsprogs/e2fsprogs-libs-1.41.5.tar.gz]
+md5=c75f112d24bdc39c76dbec61d59a4a91
+sha256=dc1eb1b7bbad2edc030e50e7506c79562d98098f99a5d6cb5db5aa5ca92ffe48
+
[http://www.pobox.com/~sheff/sw/e2tools/e2tools-0.0.16.tar.gz]
md5=1829b2b261e0e0d07566066769b5b28b
sha256=4e3c8e17786ccc03fc9fb4145724edf332bb50e1b3c91b6f33e0e3a54861949b
@@ -5274,6 +5390,10 @@ sha256=e0360be0eecee68649246c022825dd5422f895958ffa736886dd2a0b9ec7ebda
md5=01c4c944a1b900b5b3bfa95d3a820b22
sha256=998b50e3920546cb43cd281d519394a2db23f5bf10223cac49120296407b3c6d
+[http://ftp.gnome.org/pub/GNOME/sources/ekiga/3.2/ekiga-3.2.4.tar.bz2]
+md5=3009f30e124a2062370824bb307c5313
+sha256=21032e8a420365d0539c6356d220bb8634e9c1ee839bfcceb3c03d9e427cd397
+
[http://effbot.org/media/downloads/elementtree-1.2.7-20070827-preview.zip]
md5=30e2fe5edd143f347e03a8baf5d60f8a
sha256=5071431068c58c1f56dcc8fff37f8a213351f3b45c012d3adb640ec9418053ad
@@ -5830,6 +5950,10 @@ sha256=885ced3480aef3cee519a459a572e31cd2fd5e24bcd35b1d0c8833361699026e
md5=1bf3ae6c0c58d3201afc97c6a4834e39
sha256=1e0aa136693a3e9f4b43ebd71e7bd934cea31817a4a6cba2edc7aac353b8a93f
+[http://downloads.sourceforge.net/fann/fann-2.0.0.tar.bz2]
+md5=4224efa533265dcf39237667973d0e20
+sha256=762a1313a9b935300cb66ebf052d469d04823ca721fe6dd2a49c01e13e8ab30a
+
[http://telepathy.freedesktop.org/releases/farsight/farsight-0.1.5.tar.gz]
md5=2aaf871471a9ec037763c5dc7c193c57
sha256=6b9785167934948a582839f9723e37214cab1607a9764c35f10d555f8e662575
@@ -5986,6 +6110,10 @@ sha256=4fc8fbe0cf94a0d281ddc309fa91e2b6e2fb14f4cafe525d20635a196c2cc245
md5=a556eef04aeb574ac8ab0dd8c868fcab
sha256=ceaa67f19a1c5462f5e739fcd3b53dd42b0173d9deee579c55e5088801559e43
+[http://ftp.sh.cvut.cz/MIRRORS/rock/ROCK-2.0/gnome2/figment/figment-0.3.5.tar.bz2]
+md5=4b317749c7a75c4f283c6ef5aaad4146
+sha256=ebafecd9a34dbcb83bcbf69db3e9655e92af2eb0ede33d9f92d13ed5f2e7d8b2
+
[http://handhelds.org/~mallum/downloadables/figment/figment-0.3.5.tar.gz]
md5=e20c642ffe7c8a492c0ddc7ee3016f44
sha256=39fcbdea0c1e31338bca4ae60db700a3f0fce7b6cb75087abd559022e22a2927
@@ -6102,10 +6230,22 @@ sha256=ce4f7d11b3c04a7368c916ca4abc284dd0c0256f461dfb7f07df1ab445e7a5c0
md5=2bfc127cdda02834d0491ab531a20960
sha256=ce4f7d11b3c04a7368c916ca4abc284dd0c0256f461dfb7f07df1ab445e7a5c0
+[http://downloads.sourceforge.net/flac/flac-1.2.1.tar.gz]
+md5=153c8b15a54da428d1f0fadc756c22c7
+sha256=9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf
+
[http://fpdownload.macromedia.com/get/flashplayer/current//flash-plugin-10.0.12.36-release.i386.rpm]
md5=8845d4536fcd3a329690c93bce9bbf8e
sha256=c7345faf10b269b3556f2e1373c4afc35f08891f8bbd54e45d49151a8c8e4ac0
+[http://fpdownload.macromedia.com/get/flashplayer/current//flash-plugin-10.0.22.87-release.i386.rpm]
+md5=a3bb1f9a8e2b1238ffaf89193e60be02
+sha256=ec5ace49df7cfe69b7c02c8d1b6df8089f32076a390b931051feed2a9762d554
+
+[http://www.w1hkj.com/fldigi-distro/fldigi-3.11.4.tar.gz]
+md5=85457a57ac97210ee23299ccf25e5c60
+sha256=1614d6720994a5b794d50b05d95dfd1f1cc556fcd500352f0203daeae88be0dd
+
[http://downloads.sourceforge.net/flex/flex-2.5.31.tar.bz2]
md5=363dcc4afc917dc51306eb9d3de0152f
sha256=701353279a17655d78e3b3678ad78d0375f5bf45877ad8b3507d589c42427f26
@@ -6614,6 +6754,10 @@ sha256=bd54e294c056c6d52b2037e91d7b2782d6805b24a74923dc80e1c9107acac707
md5=6106c8d0aba37563b7ca9ccc94bc6c95
sha256=44b7e18ba9ae5667dd64c89f7b04627bda5807a3a90255a125702d63c0c4ee17
+[http://fping.sourceforge.net/download/fping.tar.gz]
+md5=d5e8be59e307cef76bc479e1684df705
+sha256=9f3b3ed7c9fffccefefa9af432eee7244a65592118851f75b5897814cb79b86f
+
[http://downloads.sourceforge.net/free42/free42.tgz]
md5=1fc21e04b3b77150846027dc7cb5210d
sha256=9d348a9d2d5bf8eabc7e7bb6f0907e611403e4abe6dc1e11b1b2ad1118b3088a
@@ -6982,6 +7126,10 @@ sha256=7848b7c1992ef202d54a5602904e7d7e190bce0195af69174baa79e741d07e87
md5=bc547e99535a5a05bb7093fa8b4f36a6
sha256=32ff5fed107ca5eb94976bf22bc5b82ff45c72b8e62f35dc6dba75a2f11e6425
+[http://dl.cihar.com/gammu/releases/gammu-1.24.0.tar.bz2]
+md5=f805d6d93ca7064f6d04eb3c6b24168f
+sha256=dbbacb5685b84d3ee181f9172e2818ebbb3b59b088149ebf320ce0c73e71ba1d
+
[ftp://ftp.gnu.org/gnu/gawk/gawk-3.1.4.tar.gz]
md5=3c8935efb9fdc7202720894279ad04a7
sha256=5cdfe0c0919895e2ec87773c583cc6ebf2b84cba7617d5ec6cfd0150749e190f
@@ -7274,14 +7422,26 @@ sha256=8e46a48d581f8b835f305bb17ffbb7776d53b9214113524819e96be842f9db98
md5=44009c42e98943fbb868638032d5c8d6
sha256=6b9c73f34f498b12851ac32e1225b72228e4ea629d321b0426d505ad18309e54
+[http://geda.seul.org/release/v1.4/1.4.3/geda-docs-1.4.3.tar.gz]
+md5=6305083c37a86f2353a8be40bcf70b99
+sha256=26e0d0aa9a24e75af57c27c5710521ed9005dcf4242d912ac0c497653b9a1959
+
[http://geda.seul.org/release/v1.4/1.4.1/geda-examples-1.4.1.tar.gz]
md5=9d3daac1be22186784929b56ea181738
sha256=29e3a1b65212b30847ac5c9f3d51a3add492a1597237085279b6ff82d1a1479f
+[http://geda.seul.org/release/v1.4/1.4.3/geda-examples-1.4.3.tar.gz]
+md5=923fe9d9cc843b5eb7b26c91ad0ef2d4
+sha256=38a7c6d39a8b298aa1baeadaf7a174ed2ae6397ef227f19cb0bee22757b6e553
+
[http://geda.seul.org/release/v1.4/1.4.1/geda-gattrib-1.4.1.tar.gz]
md5=0b8bc020cacda9c3fc21bb7f49332c85
sha256=e6ab108a7ec3b4431ffa1831a6c23937baf8a7815243d4c145e68f5ee8b11105
+[http://geda.seul.org/release/v1.4/1.4.3/geda-gattrib-1.4.3.tar.gz]
+md5=e1f68401e7ca5fff16292358f0dfd553
+sha256=5eb48772d374dad446bfcd69990231fa6c6b52ba9b30048991632557512a7565
+
[http://www.geda.seul.org/devel/20050820/geda-gattrib-20050820.tar.gz]
md5=6ff8e6343b621199dde7fcd9a7ff264a
sha256=c3b2751303d18c5d685b2d2c380065a93dab17a233657a6d1a09d9f2da64800f
@@ -7290,6 +7450,10 @@ sha256=c3b2751303d18c5d685b2d2c380065a93dab17a233657a6d1a09d9f2da64800f
md5=b9b8dcb2818eb1fcc51002921f32b203
sha256=66cff8c99bd0cd4d594b50c3d2cf7af35cc48adce23e6471f1926f3cc9b50d20
+[http://geda.seul.org/release/v1.4/1.4.3/geda-gnetlist-1.4.3.tar.gz]
+md5=ef31d47010108518c6d214516f3d0cad
+sha256=0793ec9d173dbe600c14a0a8cf8b89f418271176d75b5a02e0a840a55910c119
+
[http://www.geda.seul.org/devel/20050820/geda-gnetlist-20050820.tar.gz]
md5=94f2a666701e06438fda0a9ce00e5ae3
sha256=3df3a23c73df7a9c2cc553836e6df797d01da094f6a947049f9fcc182110ef43
@@ -7298,6 +7462,10 @@ sha256=3df3a23c73df7a9c2cc553836e6df797d01da094f6a947049f9fcc182110ef43
md5=065c22125b75269188321d315ccb64bc
sha256=6929dd56d14cfcc9fcbdd4dfc056ef8f0bab5ef72a01055fe6cda7280e59748e
+[http://geda.seul.org/release/v1.4/1.4.3/geda-gschem-1.4.3.tar.gz]
+md5=76eef656ba4e27c6083fa29b3a5dfb08
+sha256=6952601966e0f28b9436286178a488849a78da1581c282944d2be34e9a09eec7
+
[http://www.geda.seul.org/devel/20050820/geda-gschem-20050820.tar.gz]
md5=8ac2387999ec98016c3b004c95fab424
sha256=166abaa8b0c98e6c826a7c7273b7ddfb57f82be9929e4afbf00e0e3de5d45ef9
@@ -7306,6 +7474,10 @@ sha256=166abaa8b0c98e6c826a7c7273b7ddfb57f82be9929e4afbf00e0e3de5d45ef9
md5=1dc7c628acc946731b1e67fb2b910e52
sha256=15f99bb807dcf6116844847c72bcdde98c8c2232a0e0961cc2ff072a022ccfc6
+[http://geda.seul.org/release/v1.4/1.4.3/geda-gsymcheck-1.4.3.tar.gz]
+md5=764613c24a752281a4f5d5432e53d0d2
+sha256=e6d9517eaea4383e724502c607d720a3cd4bf560459f5f2196e19d0c5bb3da2c
+
[http://www.geda.seul.org/devel/20050820/geda-gsymcheck-20050820.tar.gz]
md5=c339abc4956987852b948c44118b2e2f
sha256=3526fd4c30f351c3d548cb2632eda150eb632846b1273349aa2061d0400f9816
@@ -7314,6 +7486,10 @@ sha256=3526fd4c30f351c3d548cb2632eda150eb632846b1273349aa2061d0400f9816
md5=a9dda9a87edefaac2a99b70a85d0fd1c
sha256=188d398c8e7a19bf4492419bbb44754451ebfa9f1810b0eb8b6eb84f708bf0f4
+[http://geda.seul.org/release/v1.4/1.4.3/geda-symbols-1.4.3.tar.gz]
+md5=e93f0c9747a66ce229702418b49e128f
+sha256=97c2dec953e21bfa2633077d084fc0b9aff0c79030f96680ebdef9f97e294cc7
+
[http://www.geda.seul.org/devel/20050820/geda-symbols-20050820.tar.gz]
md5=a05c9bb11a31c246be3c9a799685bb0e
sha256=0534ccda5d9136a120abd18ebe3bccd3dbcc6414ec321ad2fd5f9258389ae13d
@@ -7322,6 +7498,10 @@ sha256=0534ccda5d9136a120abd18ebe3bccd3dbcc6414ec321ad2fd5f9258389ae13d
md5=50d39c9af0577a42f3d769794930a74f
sha256=dfe4d3d3033e92254aa5e00fa7ab6921589747604269bc7b01e59ba9b630e82c
+[http://geda.seul.org/release/v1.4/1.4.3/geda-utils-1.4.3.tar.gz]
+md5=55ab23cad7aee2e65fcc742c424e68d4
+sha256=d4814c6c11b38a3cce88b193f7a6d18cba46c44f8226716fdde53f0ccc58de49
+
[http://www.geda.seul.org/devel/20050820/geda-utils-20050820.tar.gz]
md5=6555466492f3273dbefb772bd4ffd486
sha256=8140ff430e89c8564efabbc24da0d9b2858d5ac5e982dab9923eaf3b46a8aacb
@@ -8174,6 +8354,14 @@ sha256=74846344de2c24a76408ee9c598dbc75d6c33a02f888f8b5491cb1af9a097cb4
md5=37242776b08625fa10c73c18b790e552
sha256=e8ee6534bd142ee0ed55134a5eb95f6e7f4b8640df2d3669ebd202f6d82f9a0d
+[http://gnome-mplayer.googlecode.com/files/gnome-mplayer-0.5.3.tar.gz]
+md5=d4c9de56f77f5cd86ac67ab53e027181
+sha256=8823fe08890b287684c3c16fe06d1be4a3c299bd8bcd9a5ca49063ce8a88a9ef
+
+[http://gnome-mplayer.googlecode.com/files/gnome-mplayer-0.9.5.tar.gz]
+md5=02d01f1cca7ff3af511c59198f3c35a7
+sha256=4cefb2afa08d8e75c1273980e2cad0e13f4b872e2f90019f1ac0d75ec9fa41b7
+
[http://www.packagekit.org/releases/gnome-packagekit-0.2.3.tar.gz]
md5=eb12e6eea8413d35c033aedee61b89ee
sha256=015f415748fa90d51b2bfd2dd41906ee918eb4e5d900d7b6b3ac698e4016e5c0
@@ -8326,6 +8514,10 @@ sha256=77cb4bd39a4cec2aa3d61b0519134f9e4a65613960b3b3ee34dd2452d5e12ba7
md5=905a8df3513a519096bcf7d8efc35118
sha256=f08d0f214db875eac602bec37b20042f0ee4f14427f9559477a040ef39003538
+[http://ftp.gnome.org/pub/GNOME/sources/gnote/0.5/gnote-0.5.0.tar.bz2]
+md5=ca9e67a92945af7230eae72b2e8430ec
+sha256=19a1f79c42b37ee3c90ba6298442b52438f1c67d311ebd33db72210cee2d99d2
+
[ftp://ftp.gnu.org/gnu/ghostscript/gnu-ghostscript-8.16.tar.gz]
md5=c42dfaebc37fe81eab0b5676b124ab63
sha256=417922d35e66ee90cf93cf3e93fdf281ec6b92de4f7436c9c1a97c0cc35b94a8
@@ -8350,6 +8542,10 @@ sha256=8418ed3a2e8dad923a6626d22eaffe796aab9cbcf827a17ab95bf99956e22a6d
md5=3ce6ba6483ccd6fe9974cface582337a
sha256=173df749482f7391e50a6eb8339107b2b201582978637c63190c4a79f8e66d07
+[http://ftp.gnome.org/pub/GNOME/sources/gnumeric/1.8/gnumeric-1.8.4.tar.bz2]
+md5=338f0084f04a16f78797ad01f85d3251
+sha256=a3c7fdbbafa6c9cfee7f16c067b043c3041cd0240292aa92b653a2221ae04503
+
[ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.2.2.tar.bz2]
md5=c34736eb7cb687f9e5b6d4df48aaf7c8
sha256=174e7f78c670d76984c4c4bd6077a0b9fec7b4be700b9f3e40c6889b78110c57
@@ -8382,6 +8578,10 @@ sha256=f215b31c55da6f6111ab473565689eb3d0e23523a20a889efefe5ac612a8ceeb
md5=c1eb3de26b67ddc08a61a7c2fc636203
sha256=36480bce862b6d424f4b34bbfeed838b80bcbb484602dee43c412a7d0dc4b42b
+[ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.2.tar.gz]
+md5=9d91d0f8f2cb35bc86435784fa8e72d8
+sha256=a780490056b1f1f95c7bf91e175773e00f4be23e1b7e5147ccd507b6f32097af
+
[ftp://ftp.gnutls.org/pub/gnutls/gnutls-1.4.4.tar.bz2]
md5=de5e060eeb2da36654e9e8af6b8b012a
sha256=dfcdcd622b80b00d28ee40881ee56fec771213110b7fc07048bce07df7cec035
@@ -8718,6 +8918,10 @@ sha256=bc656eb1846509539bbfaf9269f07588f6f3c05c847b41b351a7571a252f6fee
md5=8064121d3b13ea34c5fb77d2907c78f1
sha256=4f7546bc5f8df7eb9511b919e34eb08945db4359fd3db07c555b83959923a1cf
+[http://gpe.linuxtogo.org/download/source/gpe-dm-0.52.tar.bz2]
+md5=ea157a2b47d932cea9738882df887ae1
+sha256=b2ef45fbe57bdc73a6a5fb244da782fc912c105453bf120128c93284fc05c4ce
+
[http://gpe.linuxtogo.org/download/source/gpe-edit-0.29.tar.gz]
md5=108d1739f06678d45d1529301de6a7c8
sha256=ec3805a8d7b1577f30379f8b3bd59f5f1e1786aa574f75aa254a30bc19b6b79e
@@ -9386,6 +9590,10 @@ sha256=300a3151efbd984fe51e7c230ae419efd197fa2aaa6b8791188aeab3917a505c
md5=7f4e11d04e369391de27fca82ee60f11
sha256=300a3151efbd984fe51e7c230ae419efd197fa2aaa6b8791188aeab3917a505c
+[http://downloads.sourceforge.net/granule/granule-1.4.0-7.tar.gz]
+md5=4e327db531133ffeb650392042341443
+sha256=356463f586b8b6147a05ab00ca8b5e7f8f85d2ec3981fbb9c0c0c2e2da6f58c9
+
[http://grass.osgeo.org/grass62/source/grass-6.2.3.tar.gz]
md5=75c8832f90e445ff361d767c8a2c3ece
sha256=a172d233fcbfc7f2c2de01af1f6fc7828e46867785dcaf861cf87238775e4a61
@@ -9542,6 +9750,14 @@ sha256=79e3618edd959e29c877b9f8b0c9156d8249d725096582dffdd5308ba6a0e645
md5=398729b82b911eebb14156c2fa02525b
sha256=05d83a609aaea44ea8c979897f336cb8b5537a39b271af2831e6cca3851d3007
+[http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.11.tar.bz2]
+md5=75a3359ece6a1c11a9e5463d79e274e8
+sha256=b50072ff6f36087b8ecebf509e6d44ab2e91292b1a3a5806a7f1437a382723e9
+
+[http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.12.tar.bz2]
+md5=63309cf0bb21f3efd4e43868c314f919
+sha256=18387f78b721ce6b56c02f886ec89774a4e58b7883c70ab2ae6c1af58f1661c9
+
[http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.3.tar.bz2]
md5=8545a02c408976c5e9f0c2cf3c6a362e
sha256=648f1ef813c64c7eedd45d164eb41ba21366bba8ec5fcbff3100458721be489e
@@ -9590,6 +9806,10 @@ sha256=673f4a45a0f3aa99606a58097bde02d09ad51d7b2e702f0d68eeb6db21d47e93
md5=5d0f1e07f8f6db564971b50f75261e8a
sha256=184c5aed03ebfe38a276fc03cb7d8685d9a6da5a48bf6a0565c83e11a29cd5f9
+[http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.23.tar.bz2]
+md5=641cc7def2d8667b9b4df15e69dba25f
+sha256=1c11d98eb9a1b1bc54becf465e74c2aa4019bb57a31dd70686269af6a9b9e93b
+
[http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.5.tar.bz2]
md5=2b5958fb0baaf8d1b4eae18f7b13d49b
sha256=fe2fb4fe446a1d3f8ccd4284ae7ffd25cb9f1b836b3d0e29d2494d10c1ae3eac
@@ -9614,6 +9834,10 @@ sha256=05323f065080e3df5f5c9cadceca977598ba106b3eebf2bbec46099becf796b1
md5=27f27151ccefad1157c9eaa322e14ac4
sha256=dfffb80ef01b8fee9af3576311e65b60c378d9985099dea532be090ede54ebaa
+[http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.14.tar.bz2]
+md5=a861ccbb90a176d1242608502f45f0ac
+sha256=12205d01cb99900ed6f936a09ac31b5849f8a7ff3c9a93e5857a76dc3e30788a
+
[http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.2.tar.bz2]
md5=03d3d0b5f19014fe0065234a3ea65ee6
sha256=dd92993d08930cca071893b5d3f5cb40a4498f3ddaf12da98c0bbe8c27605e81
@@ -9642,6 +9866,10 @@ sha256=077bb0e095e5dd6dd16d697efd8d51761f3b5418efc808ed6ca7c60b34df51f8
md5=031205d5599fce73fc36766f928b2515
sha256=ced80afedd105cb9b1b72749f8bda29c71fa9eda06120d6b07e7362f705c9987
+[http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-0.10.11.tar.bz2]
+md5=dfe2e201e066a3e86a9598b6769d9739
+sha256=681d3cf7ae124bff1949187db858e5439a41be162bdad59dd69b52b70fd62dfa
+
[http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-0.10.2.tar.bz2]
md5=cf604b6acd80b57dc5173db7e93fc116
sha256=c882c7485faec9803d2f61efbaedd02742e78d224a7d29d61a0a884cd962a09f
@@ -9714,6 +9942,10 @@ sha256=94c185a0452b5fcddb538f6b686ff959b7afca8340c48fdbe47c87a2a459c3d3
md5=35dd8598837af4074753afe5b59e8ef2
sha256=61489e0192b1362e6dc760154204c73c1edd9ad9d8c754535483ec00ad7e389e
+[http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.23.tar.bz2]
+md5=f7b2e300d2d85756407ec529424ab237
+sha256=cf750821040102d2c9fbfed56472a86fd0d8c24ada37901c41867c88438a776d
+
[http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.4.tar.bz2]
md5=263a7800ecf44d0f38d0cbc80bce65ff
sha256=7b8add7db1e0b0e3671f374469ef32b151fa96bc9eb2aa265eefd79548752ffc
@@ -9834,6 +10066,10 @@ sha256=15aa3a926307b4b3e40f3a9b05c604df6811eb48814b1534db32aed414aefb0c
md5=060ea25c471e5f4cf5c1baeac27d0345
sha256=0d8b6630c546327ddc67c700859731036eebdf77e51ad8b71e4d19d28ca2ff2c
+[http://ftp.gnome.org/pub/GNOME/sources/gtk-engines/2.18/gtk-engines-2.18.1.tar.bz2]
+md5=5dc748cfb0587bb412adc49b666fb6f8
+sha256=d7e2672fcf80f5c35d481c24e0ab5b7d0f6526dcc3d8821ab76468c1816dc3bc
+
[http://ftp.gnome.org/pub/GNOME/sources/gtk-engines/2.2/gtk-engines-2.2.0.tar.bz2]
md5=78e9276c28b509f3203de4873c20a263
sha256=140541cae8b003d2f7210e2ef060ac328d7e45a04e2cf5fa943fff73c9955dd6
@@ -9958,6 +10194,10 @@ sha256=c1c2e1fb0168ecb3a5e773ac0cd74a0e5caeaaf402f108479337794dab8aa75f
md5=a56ea78c74fe93a604357d7c555af0e5
sha256=38c238ec57bf22023bbc50f70ecbaee8c06b817b9e11f1a3a0ae7faf95cc1f26
+[http://ftp.gnome.org/pub/GNOME/sources/gtksourceview/2.6/gtksourceview-2.6.0.tar.bz2]
+md5=dd065ab2e96e51aade949249c5556439
+sha256=92ddd976721e26377eaa59fea07707a0caa85eb874500868c1e6fdd9a21fe0dd
+
[http://downloads.sourceforge.net/gtkterm/gtkterm2-0.2.3.tar.gz]
md5=a49f93d15909dbd2e7011428ae01f0f0
sha256=fb68b18d752ae2379f144186b94743be991af1a42c88bc1e6f0685e45cb1d573
@@ -9990,6 +10230,10 @@ sha256=1f7667c30228737e3cea58ff2b384bcc0eed8cb679392de827821e4d540c760e
md5=a3f8216544509a74a4441f689a0410d2
sha256=e2f63d2d445ffeb072638eab885b1a629e372d1db711c8afb26a62bc56096289
+[http://ftp.gnu.org/pub/gnu/guile/guile-1.8.6.tar.gz]
+md5=9e23d3dbea0e89bab8a9acc6880150de
+sha256=69a2f9491480ff756d1cc4c8ea2bdc13d40ea8ddc8f93f26957bade8219a1d86
+
[http://gupnp.org/sources/gupnp/gupnp-0.12.2.tar.gz]
md5=5350f5f28fb3742779702a496ab75d72
sha256=9e4edb3ca6d11e397d9f98537fa8954851dc044d13ecafd4f4547117cefbdd28
@@ -9998,10 +10242,18 @@ sha256=9e4edb3ca6d11e397d9f98537fa8954851dc044d13ecafd4f4547117cefbdd28
md5=91b4337d22f6dd931888a33553ab945a
sha256=f78e4b0a361b67805892c1a0e72f3cef92fbc96112157895660a478979ddeef4
+[http://gupnp.org/sources/gupnp/gupnp-0.12.5.tar.gz]
+md5=bfb12195c76bb6632bd917f2c2bc12d6
+sha256=241e416cbe2c02f413fde82a8587bfe2fe9915fbed3a6fb20c86520b8d7543ef
+
[http://gupnp.org/sources/gupnp-av/gupnp-av-0.2.tar.gz]
md5=ab485bf263d0a3d2f771817241c970b9
sha256=782e4e45abcba1b3fe34276580653f4dbfbe8a26eee69a290675dfa7faa309f8
+[http://gupnp.org/sources/gupnp-av/gupnp-av-0.3.tar.gz]
+md5=f6e813591ff89e8e61a46f416046450f
+sha256=34b6e104b480e501e430daa68fca63906a939a6cb02bc43814ed06d2856a72ac
+
[http://gupnp.org/sources/gupnp-tools/gupnp-tools-0.6.1.tar.gz]
md5=27d3a55eae2243661f49a7cf40e1e195
sha256=c4004de997674bb54d5844391dd824c6aee78184b075e7ea5d8f816e0d031e25
@@ -10030,6 +10282,10 @@ sha256=7249197b75a61c36398f7458f12c0318ccf03639ae8404771fb4ff414fa17683
md5=0d123f87e3e660271cd9d11b8c592c5a
sha256=67e7dd1dca32a99eb1102a853d2df1bac782d50a4361511409572cfe8ea51147
+[http://ftp.gnome.org/pub/GNOME/sources/gvfs/1.0/gvfs-1.0.2.tar.bz2]
+md5=04c44757a265f787d6606655b6bbc593
+sha256=f3606dc28b1fa140c7d0191478097a89f7ef7a3183a811a1410a230052b71eb4
+
[http://ftp.gnome.org/pub/GNOME/sources/gvfs/1.0/gvfs-1.0.3.tar.bz2]
md5=a41e8b7d99e390cef8312f7ce5f312a5
sha256=17eccded6e096208181e2c7625802526112af23f5b2c7b2a672ab9ccff3a55fd
@@ -10058,6 +10314,10 @@ sha256=631820e566353eafc4bdc0d9d8221c26c7ef6b5d10a254783dbe9bcac88caa07
md5=3d6c191dfd2bf307014b421c12dc8469
sha256=631820e566353eafc4bdc0d9d8221c26c7ef6b5d10a254783dbe9bcac88caa07
+[ftp://ftp.pl.debian.org/pub/debian/pool/main/g/gzip/gzip_1.3.5.orig.tar.gz]
+md5=3d6c191dfd2bf307014b421c12dc8469
+sha256=631820e566353eafc4bdc0d9d8221c26c7ef6b5d10a254783dbe9bcac88caa07
+
[ftp://ftp.us.debian.org/debian/pool/main/g/gzip/gzip_1.3.5.orig.tar.gz]
md5=3d6c191dfd2bf307014b421c12dc8469
sha256=631820e566353eafc4bdc0d9d8221c26c7ef6b5d10a254783dbe9bcac88caa07
@@ -10078,6 +10338,10 @@ sha256=b011f194e1ab90e753744405bb5b85949cdda1a02320cb174b8d4a8e5e182dc3
md5=750cf074e88b6fb7012f26d99cd39b9b
sha256=730a9f2340f789677eb0c3b0984bbaca3ede6c12d1e4b16bc7ea91f51d10ba90
+[http://hal.freedesktop.org/releases/hal-0.5.12.tar.gz]
+md5=bb7c36e142437f7363f9a80ae8391926
+sha256=c444e0485e4361eec0e6f06580c45b9fcf6f20a119634a5f0a5c13218cfdfd02
+
[http://freedesktop.org/~david/dist/hal-0.5.2.tar.gz]
md5=3b351822ba359669646026013a3d5a03
sha256=46d0a75f90058909269da4cc42986cd51d5163a6af669e9d7fb4a7d170217d17
@@ -10106,6 +10370,10 @@ sha256=65d8f8eeb61e7609a8c5001b6660d90e7a482c4b74b4e226d09b433dc1a80c9d
md5=a6f532770cf9286e1de38d6570cbc6bc
sha256=65d8f8eeb61e7609a8c5001b6660d90e7a482c4b74b4e226d09b433dc1a80c9d
+[https://fedorahosted.org/releases/h/a/hal-cups-utils/hal-cups-utils-0.6.19.tar.gz]
+md5=58e1c8f5597dd39e57dcf3c4aabe60f8
+sha256=f40a7ebd1453d471a8a6bfd8c635708dd739a6160bb661813f936d936ba85618
+
[http://hal.freedesktop.org/releases/hal-info-20070618.tar.gz]
md5=c7005ccb1765d8359fd2348350770495
sha256=bec1b0ad166b6c4d5269e7aa6d7bdbd0eb05c8f2c30042e4dca18993ba5682f0
@@ -10122,6 +10390,18 @@ sha256=120e6b8019b5d608038d8f9a5a14bb97c4162b803118bb8530d9735d65b553a9
md5=6fc99d15d38945c17a291ea93e664664
sha256=80655b3531ea56a5d64085e572dfb8d3ecabffd28af482cd130f72dfdd6254b0
+[http://hal.freedesktop.org/releases/hal-info-20090414.tar.gz]
+md5=ae7177ab8f0163d3ef2df71f0de2b357
+sha256=33dd87dc9452227375b8b9cdad940581714a55d55ff18ae2990905ac2f81fa0f
+
+[http://downloads.sourceforge.net/hamlib/hamlib-1.2.8.tar.gz]
+md5=74eaf1be4cf1cbdecee54808c6930788
+sha256=be81153a6e2830234d62818c8aa5658b1410b538a3676686a3f1373f03036b81
+
+[http://downloads.sourceforge.net/hamlib/hamlib-1.2.9.tar.gz]
+md5=9515288826284d6c8dd569354dacc8e0
+sha256=ba75e64e1b6d5ffaa41e2063e475eca5b35ad68cb4ee6e888e0fc73bd6fa9fba
+
[http://www.soft.uni-linz.ac.at/~vogl/bluez/handsfree-040326.tar.gz]
md5=488b0f2f346361bba7996b459c5d7b6f
sha256=dbd0c389a160c9f6dcd9eac81b6c4d5a02866968a33f06201556d6860012f6c3
@@ -10474,6 +10754,10 @@ sha256=bedfd45364948a08ecaa212c5eda6667a83ac8bb547e2eb8478ade885898cad7
md5=f720686c841e9fefc06db76458fd9908
sha256=1f8259a3a8ae583170816f5028329f3a7157f87f927da9c0a911a5fb9be263a1
+[http://www.netsurf-browser.org/projects/releases/hubbub-0.0.1-src.tar.gz]
+md5=58c6e2b5a5906f3f0bf136c0c71b5403
+sha256=3ba0bdf71376429bb3ce8ae51595fc25e6a5147cdcc26e47b6da17386eb78cdf
+
[http://cvs.haskell.org/Hugs/downloads/Nov2003/hugs98-Nov2003.tar.gz]
md5=e80a6739ead9a260087fe4d3fc6a8359
sha256=9f90613de73e1b8e90d9bbcb09046e83680f15a46fc630c3e26e9aa4ca0e6a1d
@@ -10702,6 +10986,10 @@ sha256=11a5f5084488c480f3ff5a24d64d7147bb64272bf60a0ba51330a56c5b50cab9
md5=82e7c8fdb6211839246b788c040a796b
sha256=a606e230b22d9d029998b84e5d6311a8ba35a304fe457e254eb5fd19943cd639
+[http://arago-project.org/files/short-term/demo/images.tar.bz2]
+md5=a080f5a4ed42c56767c07e55c1266727
+sha256=9c6f58c44051563a788f7e9202957d839822081d99ecb001314265166c20eb95
+
[http://xorg.freedesktop.org/releases/individual/util/imake-1.0.2.tar.gz]
md5=b5c3a719d60a14ca2378dc1259ee60df
sha256=8008b4366ab96abfdac2c91808b79ec2cc5649966b41cfb07b14b6fbd798651c
@@ -11006,6 +11294,10 @@ sha256=3b3960f867bf878a6561428a3c572e87dcccadb7123aa47d7aaca77b32adecc8
md5=20ef2767896a0f156b6fbabd47936f79
sha256=3c6b48af9e655e4f0a34c7718e288960a1dc84a3ac7eb726e855adb45fbd953a
+[http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.29.tar.bz2]
+md5=a3ecfaa091289656fae786b027b44eda
+sha256=ff7b78ebb112ebeb3901fe36823328c4af89040b890c25db43d8e35ccbc663b3
+
[http://downloads.sourceforge.net/ipsec-tools/ipsec-tools-0.5-rc1.tar.bz2]
md5=74fc66f01937076f65079e194dd2b0d0
sha256=325bfc9607ccf56e7de0e7973e18fac76678e50b8cf24d3818b4feb734a0e45d
@@ -11046,6 +11338,14 @@ sha256=84ac04a28ae41e17df0f181d8bc0049ae7a83baae07296e890ea5977a2952318
md5=0a9209f928002e5eee9cdff8fef4d4b3
sha256=c5c8a091ed9a1fa2dab86b4d87719064b50c202e8503046f50f299a361e6211c
+[ftp://ftp.debian.org/debian/pool/main/i/iptraf/iptraf_3.0.0-6.diff.gz]
+md5=fe0e2944addbd5803b42e91f7e4ec5d7
+sha256=5803c3f3653887896b75567daf617a8f200cecdd28beb870219b3954d9931efa
+
+[ftp://ftp.debian.org/debian/pool/main/i/iptraf/iptraf_3.0.0.orig.tar.gz]
+md5=377371c28ee3c21a76f7024920649ea8
+sha256=9ee433d95573d612539da4b452e6cdcbca6ab6674a88bfbf6eaf12d4902b5163
+
[http://downloads.sourceforge.net/iptstate/iptstate-2.2.1.tar.bz2]
md5=6b08f09b9917f644629efea1febec4b3
sha256=004f8358f4f84d90a260a76ac46ce8512126ac490d73460fcee6c11effd34362
@@ -11122,6 +11422,10 @@ sha256=47344b444d78ad5965eb40cc4c8df8450fdc54135e2b058710ee8c500b958d6c
md5=e407b557b3cfc7c91ce4de2571dd79cb
sha256=462d634bb509cc2bdd550ee5c7b269495f3173721b7404f162ad1f69b49bfff0
+[http://www.irssi.org/files/irssi-0.8.13.tar.bz2]
+md5=0d6fc2203832b514eff014fffd574664
+sha256=896541ac837421290934e2658ab364d4d3f0326259489a94a0cd166e2b05d735
+
[http://heanet.dl.sourceforge.net/iscsitarget/iscsitarget-0.4.16.tar.gz]
md5=c7ea3192f1717b40e4c483c9d630082d
sha256=e6605ae5f9ed2e2fdbe84df967236678579a4fbe536b75a93277cbb607bead7d
@@ -11182,26 +11486,6 @@ sha256=4c4f3c7c479994c3ce09f542d4fbdc03eed58a2d7f320d32f2baf238b5b6f566
md5=b941b8f4de297827f3211c2cb34af199
sha256=79e80af8cbeb68ddad75a1aa6244d7acd62176bfd69bcdc0640d11177dcde97d
-[http://downloads.sourceforge.net/jamvm/jamvm-1.3.0.tar.gz]
-md5=4f0af6c15f1b9fc50375d30a422bc88f
-sha256=445813850236d5ea54942df45046ee9414192b403fb8fb1b8e7cfce0f3ace761
-
-[http://downloads.sourceforge.net/jamvm/jamvm-1.3.1.tar.gz]
-md5=cceb887aec78fee99773949ede34759e
-sha256=3a089c19c49e0e29f319d60afac73708a80a22ac42a9728316193e680f4cec5d
-
-[http://downloads.sourceforge.net/jamvm/jamvm-1.3.2.tar.gz]
-md5=f63b7cf4b541a144c41f17fffb7cc869
-sha256=6740f2cef6a2620bc5959eb65562866ffb5c45050a04555aed244abcbe30f88d
-
-[http://downloads.sourceforge.net/jamvm/jamvm-1.4.1.tar.gz]
-md5=ed79d6b60e50b007614831f8c28321ac
-sha256=a73727c9c2e15d6302cf4f5d3aaf8378c5de9d60a302b9d5fa4ee5332341f867
-
-[http://downloads.sourceforge.net/jamvm/jamvm-1.4.2.tar.gz]
-md5=c7affcc61d4135ee838121a57b08de0f
-sha256=dae915b7f963762385df2f4660eaad497261fa72393ba69339530e5b0b5d8bc3
-
[http://downloads.sourceforge.net/jamvm/jamvm-1.4.5.tar.gz]
md5=3f538bab6e1c77aed331e5e71f754f5b
sha256=f329d1c8f42c06b53a3e82763d33900b100b8e9acd7afe02f7583c51253fd6e5
@@ -11230,6 +11514,10 @@ sha256=663895bd69caf3a1fda6af5eea8263d90a5fd35ca8f4c32e2210ac410788901a
md5=2a564045670b459e9aed857b5f8a3391
sha256=76c976616d344a3b1abd8896be6610c4d97a58af6960e1bc2f442b774bdda839
+[http://downloads.sourceforge.net/jamvm/jamvm-1.5.3.tar.gz]
+md5=ce886163658d748113b0570dfae12aea
+sha256=f2795ab62635df1c9bc6c4a7b90f53d0d846c0c26f5ec7b352f687506407ebd8
+
[http://downloads.sourceforge.net/gakusei/jards_gakusei.cvs.sourceforge.net__20070212.tar.gz]
md5=1282913edd226bc9e865f39d79573117
sha256=3c884982ebf40aade899379902ec92c41782d18c19506cf0ec40bcf6a7df8e3b
@@ -11274,6 +11562,10 @@ sha256=f24ae604a20da87e3716bb1d441c483e56479eaef4e99888f41be06059790bca
md5=4e979c0dda766ba1dd719905ca975c7b
sha256=202de62e2f3d0667cc464720d5897d0ccb29767ec24e0a4d4c5bd6c4d37425a4
+[http://download.java.net/dlj/binaries/jdk-6u10-dlj-linux-i586.bin]
+md5=b70924c697584ab7955050d7a9b4de57
+sha256=dae79e8c56090ac3fb4ac3fe0df9faf6a0c9694a89ef978dce0ab970557ad264
+
[http://www.jdom.org/dist/binary/jdom-1.1.tar.gz]
md5=22745cbaaddb12884ed8ee09083d8fe2
sha256=a13549087141be24ad176b659afdc2c675f1ffa5288ff999a193d6d44a282056
@@ -11386,6 +11678,14 @@ sha256=c272560f5c11fe45b011c4e26ada66218fb0109d5582c5876aa49c5e24718534
md5=cd1eb1ce62a52cf69f4df9041a886794
sha256=559c3d5e9336a56c9f83fcece75ab5211e62a1a868b3a6f539e9b7bd15f46576
+[http://clayo.org/kanatest/kanatest-0.4.8.tar.gz]
+md5=b97b0521314f634e454354cb7ba2013d
+sha256=a31682604bc6db9c0cb2e15429b8a5b64c04f1ed96df912cab71d4337567c513
+
+[ftp://ftp.debian.org/debian/pool/main/k/kanatest/kanatest_0.3.6.orig.tar.gz]
+md5=cd1eb1ce62a52cf69f4df9041a886794
+sha256=559c3d5e9336a56c9f83fcece75ab5211e62a1a868b3a6f539e9b7bd15f46576
+
[http://fishsoup.net/software/kanjipad/kanjipad-2.0.0.tar.gz]
md5=bdfe75534322840b3ff566e0a91c472d
sha256=28272f61ec09c607a3578e3626e9e4fd43d1d9d1e21cb64328745766d00ee9e1
@@ -11478,10 +11778,18 @@ sha256=280b34fefa12c3d7a3e432c3730fe5d0d56e8d169c28b695cce9ba6d8dbe6e38
md5=bf87c53f36b4454ad3cc50aa9c72faf3
sha256=f8244b8c4691faf0c9765ec3acba730a5620c8077f9bed667b9ac835dd959ba2
+[http://kexecboot.home.linuxtogo.org/kexecboot-0.3.tar.gz]
+md5=3c3b8edb739146183b3ddff3e0af5f1c
+sha256=61a918b38a4b0b97e1469cbe3d9c4307af956bd95abec2067aa2fd278739cd96
+
[http://projects.linuxtogo.org/frs/download.php/221/kexecboot-0.3.tar.gz]
md5=3c3b8edb739146183b3ddff3e0af5f1c
sha256=61a918b38a4b0b97e1469cbe3d9c4307af956bd95abec2067aa2fd278739cd96
+[http://kexecboot.home.linuxtogo.org/kexecboot-0.4.tar.gz]
+md5=b4a4509ca3f546cfedd23aa6f99ab81d
+sha256=b8c9d3a51f04bdecabbb4135079d408e02c98cdf3156bab8418a6830cb64b890
+
[http://projects.linuxtogo.org/frs/?group_id=50/kexecboot-0.4.tar.gz]
md5=b4a4509ca3f546cfedd23aa6f99ab81d
sha256=b8c9d3a51f04bdecabbb4135079d408e02c98cdf3156bab8418a6830cb64b890
@@ -11490,6 +11798,10 @@ sha256=b8c9d3a51f04bdecabbb4135079d408e02c98cdf3156bab8418a6830cb64b890
md5=b4a4509ca3f546cfedd23aa6f99ab81d
sha256=b8c9d3a51f04bdecabbb4135079d408e02c98cdf3156bab8418a6830cb64b890
+[http://kexecboot.home.linuxtogo.org/kexecboot-0.5.tar.gz]
+md5=a937303d7ef3fc645f9dccf89e1494e2
+sha256=49c95d62e32b66c9f97e791f667afa82f0714bc0a0e0ad48df010f4f36de42ab
+
[http://projects.linuxtogo.org/frs/?group_id=50/kexecboot-0.5.tar.gz]
md5=a937303d7ef3fc645f9dccf89e1494e2
sha256=49c95d62e32b66c9f97e791f667afa82f0714bc0a0e0ad48df010f4f36de42ab
@@ -11526,6 +11838,10 @@ sha256=1b998b34e2e9377f5ac7704295d64507234fe7656e49d384f8bf95604e97e05b
md5=2100c667e69db0cde35fa2d06c8516e2
sha256=023e7f47039c1ad8615052e464f76a3cd496a423449b931036d127c56d58b2b9
+[http://www.kismetwireless.net/code/kismet-2008-05-R1.tar.gz]
+md5=6ee365d36354b4dee4945e67f8149294
+sha256=a298d44f8a6ec977021cd492a720987ded81b5c4baf5f68b36f1282a23c9f7d3
+
[http://kernel.org//pub/linux/libs/klibc/Stable/klibc-0.190.tar.bz2]
md5=6c96f954676c7b898dfe230e0f2a1fb5
sha256=5767cbb094300c5e26eb0bab588ecdbf9e5db2a637e9ae73c2efb8a62e05217e
@@ -11626,6 +11942,10 @@ sha256=7a2162c783f98a2de9658a217cd0409a7bd16d40040c34a6077df376a2135aea
md5=56a9be3b788ad32a169069f332ebf0f3
sha256=cc1fc10fe3e8473efd3af315a47500d646665554fe6fe5993028adb1f189334b
+[http://www.latencytop.org/download/latencytop-0.4.tar.gz]
+md5=ad8d107699608b024d697c941371bb37
+sha256=4c5bb829390f266f6ba4430b725a4210d7e71d96168731dfd790c0f945c317b8
+
[http://downloads.sourceforge.net/lgames/lbreakout2-2.6beta.tar.gz]
md5=41d6e0be4654b1716b1b3f5b53abf014
sha256=3e406c76874827c236c7070c1349f8b4ee058aa664fc3066435c938bf6d5f0e8
@@ -11742,6 +12062,10 @@ sha256=463f0b46ce3a0fc09ef9ad7a5429959034d50a1eadbed5dfeae36c25dca31130
md5=48a403c45be2206ee900729ced3a0e62
sha256=ecd2ff407a418eb4ac673f48b4d0a9c5b6860a13cef7211a32fe8f3d3db0407e
+[http://xorg.freedesktop.org/releases/individual/lib/libAppleWM-1.2.0.tar.bz2]
+md5=d58b5a03ba36c661ff48f38048c2edd3
+sha256=82f9b9dff544fc3d8bcda5878930cdc3817d478f34b3790c599fe185c138f160
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libAppleWM-X11R7.0-1.0.0.tar.bz2]
md5=8af30932ebc278835375fca34a2790f5
sha256=66d5b9d53816cc158a0f241772cbde60a52aa0a722e28d3ef76a5eb6c82840d5
@@ -11850,6 +12174,14 @@ sha256=bdbd6d239435c1736f5c532b12e8078761db8db5f37ab3195fe11c3e5b692c1c
md5=d1512d65dadd4f48c779d4749e7753a8
sha256=da9272900e41615e9c5dc25d84730b8966da6f5c8f4c40418dca2ad040fc8b82
+[http://xorg.freedesktop.org/releases/individual/lib/libX11-1.2.1.tar.bz2]
+md5=2f2beb98e71f397e1209beaca4e97cb1
+sha256=d172e5a401a2607f4ff145db4e8e09c193a1980bbb2c5c7f824e61ee3fdfdff3
+
+[http://xorg.freedesktop.org/releases/individual/lib/libX11-1.2.tar.bz2]
+md5=c6265b59ea2b594fd68e33f9125b4d20
+sha256=e4863cdf5d471763806e9bcae25ea47606a56cd91a5546a34c093aa3de181051
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libX11-X11R7.0-1.0.0.tar.bz2]
md5=dcf59f148c978816ebbe3fbc5c9ef0e1
sha256=89a3c2d8324ff9d0d91682503407310f7df30a74915cd253be3a75247b044248
@@ -11906,6 +12238,10 @@ sha256=45ca55bdac904a07b8118618c65ddb5bf8826e626c4c927e3c2508c58e231514
md5=73671d8f1cf36fdd81395328cc3539c9
sha256=11f4ab184fb8dc853fd95238d4de7b251427dd036643d11fd2a669232fa35af9
+[http://xorg.freedesktop.org/releases/individual/lib/libXaw-1.0.5.tar.bz2]
+md5=64e7782db4653cb57c7f7e660b2431c3
+sha256=2503f3e3348ee3cf38368161dfab8112d3aea2a26deea34f3136898c13cfb88d
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXaw-X11R7.0-1.0.1.tar.bz2]
md5=ded3c7ed6d6ca2c5e257f60079a1a824
sha256=076ed9c4b07379b1a957753a3c8fd2a1d93ba460587d450787630f81a85f9741
@@ -11998,6 +12334,10 @@ sha256=2d706baf206d1cb422c8e0ceb6c5a8546bc3f0587cf090eba51e75a295d9c3f0
md5=a91f1f722ac80c597cf0b75dcb8b48c0
sha256=2dfd8eace1cafacc87b4055c57efeb771a740e24141d3f113de58c2a9eebd21f
+[http://xorg.freedesktop.org/releases/individual/lib/libXext-1.0.5.tar.bz2]
+md5=aa11d859cc8e9a0bad3bb55e1666547b
+sha256=1280af98466cb4484a89858ede3347ba9d7785baeb80b11f2066142dc2317d97
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXext-X11R7.0-1.0.0.tar.bz2]
md5=9e47f574ac747446ac58ff9f6f402ceb
sha256=5ccefe638c3dfc12fd8c2f2de38ec7e0e0b54bb271fa75f687e474a58edbad28
@@ -12046,6 +12386,10 @@ sha256=c167cfd529b7c67f496ee0bed3c0b43e0107de0f689d387c1c0e23ef7cf3d2f2
md5=4f174b9613f87cf00d731da428a1b194
sha256=6171e6bca4bd6333611bd9c63cccc8e8e412d876c72097f0dddc490a9df51d5a
+[http://xorg.freedesktop.org/releases/individual/lib/libXfont-1.4.0.tar.bz2]
+md5=3a8e06b25912ef339d70a8ba003da9b5
+sha256=eafff0157f2c7172214449d4b6b0c72328cad7026ecace226189b511791c5f75
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXfont-X11R7.0-1.0.0.tar.bz2]
md5=955c41694772c9fd214e3e206f5d2178
sha256=47d4de6986f6ca85bc48ecd76188d7f3f009e1aeb640008cab12ac5ca5896622
@@ -12098,6 +12442,10 @@ sha256=c77a5bbe97d0d0a6493adefcf1bd57aca91bc33279633b3f6cf1d2bb8812153f
md5=4b88e07d7dd77ca1e786f09066b58c02
sha256=7c0125ffb864e121ebfb5a20b1cfdff60562c2f2dfbb4e77c5eac81f36e15f3a
+[http://xorg.freedesktop.org/releases/individual/lib/libXi-1.2.1.tar.bz2]
+md5=cfb36307e8e7ffafe40848dba24e0b11
+sha256=a0cef8deaccedb877137782a7e77441c8231b2da848bd145788a12fe05034fc5
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXi-X11R7.0-1.0.0.tar.bz2]
md5=99503799b4d52ec0cac8e203341bb7b3
sha256=64e8ece13fc778b9dd86ef93c4b782de9a1176a005ed7d895552a73acb103d9b
@@ -12190,6 +12538,10 @@ sha256=206f8dc850f12b1213fb73dbef09fafa1bb8fb8c3ddfe4d39721c1e2dec12a98
md5=5cd67cc02a50c9644ba0a1846ea3b08e
sha256=f8edfe26b8c4c3677a3a949f81a8b09a5fad62972020bfd230401e11cc0ed267
+[http://xorg.freedesktop.org/releases/individual/lib/libXrandr-1.3.0.tar.bz2]
+md5=68eb59c3b7524db6ffd78746ee893d1d
+sha256=5961ce0f77c5173a8208b3ed669ac01719f2bf4a10517ffa6c33a5e064802e78
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXrandr-X11R7.0-1.1.0.2.tar.bz2]
md5=e10aed44c2e1e5d9e6848a62ff2c90c7
sha256=6b6a3fcf44621bf163ba2db6dbcc518bff4e8cf74695d1b86595387a3ff3c6fb
@@ -12398,6 +12750,10 @@ sha256=ae2d5d228a1251666f9f80248178b40fb22513597cf78b976e4c3f15d8fc260c
md5=f619b4f01aeda6d5f2679be9dcec5a51
sha256=ae2d5d228a1251666f9f80248178b40fb22513597cf78b976e4c3f15d8fc260c
+[http://downloads.sourceforge.net/libassa/libassa-3.5.0.tar.gz]
+md5=9b61dfd94bf4e083829ffb0231243d8b
+sha256=72a627c74e82ff679cb16ebe3a625b9032d8d1feed4c1da63ebb5106a80b1314
+
[ftp://ftp.gnupg.org/gcrypt/alpha/libassuan/libassuan-0.6.7.tar.gz]
md5=db4e6939fafbaae80cab11a67f28771d
sha256=c72dc7b2a3bb2945d1fb693b401ddff44f3eefbe248f2e6d29c86487b69c1dd4
@@ -12910,6 +13266,10 @@ sha256=7562042a6210947363bd6a9bbcdd03f8d02470c0347970b507f689d25a907844
md5=16f2e3176eb489838bad57c8728c7388
sha256=c0598428fc25e79b7ac1da35d44133e3fc50763b32fcdfffd5e6654f2f94682d
+[http://geda.seul.org/release/v1.4/1.4.3/libgeda-1.4.3.tar.gz]
+md5=f4254f345b5d1a1f3ae4e2e27ae38b0a
+sha256=f3687c7308231634619de278b5880cccd6b9b3fc04a4c1b1cf8b2e3131f6f158
+
[http://www.geda.seul.org/devel/20050820/libgeda-20050820.tar.gz]
md5=356182f379af726045a70de3024c7e6d
sha256=c2fdec2c186c11aac2f941dc238ee89f51412707bd7c952e02faefa70e38d700
@@ -13414,10 +13774,14 @@ sha256=63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151
md5=e5808ad997ba32c498803822078748c3
sha256=63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151
-[http://josefsson.org/libidn/releases/libidn-0.5.19.tar.gz]
+[http://alpha.gnu.org/gnu/libidn/libidn-0.5.19.tar.gz]
md5=440835808c577073db7d571357223dce
sha256=4f707c189259d7b3dda908d78a995366d388fe051aa3554b82cb324426997a23
+[ftp://ftp.gnu.org/gnu/libidn/libidn-1.15.tar.gz]
+md5=482a25b7b223e52f967fafd284a1a992
+sha256=db75022eff366bd5646ab1e6d7bcd1c2048473a7dbdf0cd0421de92c88bbdc18
+
[http://www.cpan.org/authors/id/G/GU/GUIDO/libintl-perl-1.16.tar.gz]
md5=7dfcd9ac3a4ff41038a2c67a733d42b9
sha256=1a64895c9a6cdbb5cdfff81f1520541fee28e85fb940d9b0484de656d69ae8f5
@@ -13514,6 +13878,10 @@ sha256=f7054f93c57ba6b758d0e4f47d4d2dd96a7fe487e1157eb70a4d642910275aea
md5=6a4db221129f230c64a0f937d00bb703
sha256=003c44be21859d1495c0571e249ce17edd5ac58636f67b6a8bc4f395a6c7e6a2
+[ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.4.2.tar.gz]
+md5=2853d8f32417e3c5f3b18fda38f96e52
+sha256=1e095469f7d159e5b9c91106484e10f0b3ce3265c55b9864407bd4ea5952111f
+
[http://mikmod.raphnet.net/files/libmikmod-3.1.11.tar.gz]
md5=705106da305e8de191549f1e7393185c
sha256=2d7598cd2a8c61c023f27c9c7c1aca8bbfd92aadbee2f98b7a6d421eae35c929
@@ -13686,6 +14054,14 @@ sha256=15b0492ac252f6e8ce57c106bda0722413196d16d198c97f20a05908d1b977af
md5=ba76f68b7e3bd284ac2c2a1b9c5ecb06
sha256=2389a9b8220f776033f728a8d46352cfee5c8705066e34887bfb188f9f0d3856
+[http://www.netsurf-browser.org/projects/releases/libnsbmp-0.0.1-src.tar.gz]
+md5=61e1e5703580c1bc7d950a1aacea7bad
+sha256=424d12aae7a6ea8c90438cf4ccff486dc01a3a2a7b68eb602ee2b8c28178b6d1
+
+[http://www.netsurf-browser.org/projects/releases/libnsgif-0.0.1-src.tar.gz]
+md5=a547da766fccacd00fd05190baf644da
+sha256=54f316f530caaacd55dc23f546537759382a45ac6378ead249b5a5d51cf4db52
+
[http://www2.autistici.org/bakunin/libnxml/libnxml-0.16.tar.gz]
md5=85b6a42a9e17a23c01b2f2ed0ece0563
sha256=6154872089834b0ffd34e92612d07e2d1ccec572698bd861da752eeeaab7ca78
@@ -13898,6 +14274,10 @@ sha256=7a61e8b686ae7d659835175018da3a1baa959329b77c18e6e9381a197937296f
md5=7075f580606a84e63b7d6d9fa3124c31
sha256=7ff5f355bb254a3d4ed4541377e6304432ee8678e7c9ec29e7d43488903004c9
+[http://www.netsurf-browser.org/projects/releases/libparserutils-0.0.1-src.tar.gz]
+md5=5999c2d52f8c07eeef2a8808fee4f858
+sha256=5aed4edfd2023ed3ccd566fe76131d10faf43c8c3efa2e90978eed37c5503165
+
[http://www.at.tcpdump.org/release/libpcap-0.9.3.tar.gz]
md5=0ad921c881fdd3d278046afcd352a151
sha256=f20d19b1f32e4ee465169ff1e17a3755bfda8c697cfed11fe36cbf6959c80441
@@ -13926,6 +14306,10 @@ sha256=a214c4e1d7e22a758f66fe1d08f0ce41c3ba801a4c13dd1188e1e38288ac73c0
md5=6d5468debf76fac84576ca26c9535821
sha256=2f609ad3b5688ae66dcd18d7cdd1fc6b68531a2a85f89798f6cfb5eda6d680dc
+[http://xorg.freedesktop.org/releases/individual/lib/libpciaccess-0.10.6.tar.bz2]
+md5=ba25eb7582f69428648e8c67564d68e5
+sha256=b9532db51a093221f82e6659ab2979d357eac770d6eb9e9361efead0aca709ce
+
[http://www.xmailserver.org/libpcl-1.4.tar.gz]
md5=6d63c462911349de80109c0161ed6d37
sha256=3c64155a9218c0367f3b0afd4bd8a4a46cc467ad6c85e98952a4ef517b183686
@@ -14026,6 +14410,10 @@ sha256=ff30a5f1a99c61caebcdce9f59417b3f7a0dbed15c6786368f4a4a1d05c67eb1
md5=aae602677ce201b1a0ed6a0c18c207f2
sha256=2bfc1853ecdc545bf3767ed92c93b8796f2075f522c8eab1693c96f11d55a59e
+[http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.26/librsvg-2.26.0.tar.bz2]
+md5=65dbd726a514fe8b797d26254b8efc1e
+sha256=fdcab5f0d86198d8cbd4ffe5b333076f75e707f6d7e4af5e87a8644ff7533bea
+
[http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.6/librsvg-2.6.5.tar.bz2]
md5=2d1d16f9493c80ce8214e585727334ae
sha256=11b97cbc654e366adedc28a93e334d34d46365b09a3adb028449119ab67cd643
@@ -14046,6 +14434,10 @@ sha256=6633e4605662763a03bb6388529cbdfd3b11a9ec55b8845351c1bd9a92bc41d6
md5=06861c2c6b8e5273c9b80cf736b9fd0e
sha256=98b8766323c78b7b718dfd4ef6b9292bbf0796b742abb2319b8278cbeee731d4
+[http://www.mega-nerd.com/SRC/libsamplerate-0.1.7.tar.gz]
+md5=ad093e60ec44f0a60de8e29983ddbc0f
+sha256=e0a646224a0323ac63f56ef009b2d7fee11452a7b8af139b19ae71d2890dbc9c
+
[http://gpe.linuxtogo.org/download/source/libschedule-0.14.tar.gz]
md5=f4fd8f525e2cd4100db89bd6b4f92934
sha256=d86d490bada35c041b1134b15f1abc94364c798dedc974d2c5ff2127d1b80487
@@ -14150,6 +14542,10 @@ sha256=79e305112a4d9598b93b614a7747604f9ef10d9a2dee52c5903b554bbeaedd7c
md5=2d126c35448503f6dbe33934d9581f6b
sha256=1792e4e60386b450ef8ec07c756e8f3ecfe96ebda7d0b09148da5f436d065ef2
+[http://www.mega-nerd.com/libsndfile/libsndfile-1.0.20.tar.gz]
+md5=e0553e12c7a467af44693e95e2eac668
+sha256=7517eb966579f8814b5efe307cb919c5b4e7b5c6729209ba1da95f31e8368dc7
+
[http://seafelt.unicity.com.au/downloads/libsnmp-0.1.1.tar.gz]
md5=752653ae88159a00c796c891af334f1b
sha256=13447233b19f7a9d4e14b362f28f1dbe4bb6652bdc182bba974234b0bc15e791
@@ -14194,6 +14590,10 @@ sha256=30055988d990f0f4db4dcffd5088115f1065a6fd7c22b555686449628375376b
md5=9df9d2b3304213641d3214a774d75ee1
sha256=47b749b20717df24393c83adcce9a3a10f0690517c18da8d0a1ddcb410a0ac1d
+[http://ftp.gnome.org/pub/GNOME/sources/libsoup/2.26/libsoup-2.26.2.tar.bz2]
+md5=61abd9bf1435e37def0956248a03832c
+sha256=afcedda15bde2395dec31a82a243871a0540ea2e13e7a14d15846ad0c1f09a7b
+
[http://ftp.gnome.org/pub/GNOME/sources/libsoup-2.4/2.4/libsoup-2.4.1.tar.bz2]
md5=d0fc91ccb9da401e9e40d2f4612bdac9
sha256=774094746748fb0c8985210de0994accdc7095c222fba42c5623e2137443b6cd
@@ -14458,6 +14858,10 @@ sha256=d112f79489d5deabc0cbb48c6192353d488d9e62c28752eda091f585f2e41176
md5=df2447c23750ef2b4a314200feacc2ee
sha256=c9bdc5820bc283dcfefba4d4f632c9083adffe5a06c21e089ee123209d229ecf
+[http://downloads.sourceforge.net/libusb/libusb-1.0.1.tar.bz2]
+md5=8fb0e066678a0d294894b5b2969cb4b3
+sha256=510b9c7339e878324066ec1cb74c0f67d5df858065155a3239999ff911257d45
+
[http://downloads.sourceforge.net/libusb/libusb-compat-0.1.0-beta1.tar.bz2]
md5=3d9f7c3966d24c6e2d58becac96e4e27
sha256=9365108d71cecb78055de4df6eeb2fadf0fe9143ef105bcb6934dcf391983a49
@@ -15074,6 +15478,10 @@ sha256=ae0d97c55efe7fce01273c97f8152af0deff5541e3bbf5b9ad98689112b54380
md5=64921b5ff5cdadbccfcd3820f03be7d8
sha256=58a5ea16d499fe06f90fcbf1d687d1235d2cb9bc28bf979867bd3faadf38fc3f
+[http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.tar.bz2]
+md5=7a80058a6382e5108cdb5554d1609615
+sha256=d7b9f19b92fd5c693c16cd62f441d051b699f28ec6a175d1b464e58bacd8c78f
+
[http://kernel.org//pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2]
md5=e921200f074ca97184e150ef5a4af825
sha256=f5dba6366e87e91234d1b0069cfea655b0a4cb37ea97f899226f16998e6ab9f1
@@ -15286,6 +15694,10 @@ sha256=138b70379317b4d2962694879c26f7579f7771256bd67d462012bed17f1fcba5
md5=9b9b6da3612b629f40b97d295c8854f0
sha256=aeab92eb4f81b3ae12a1d4e3d8d9b3650cc0f37ce7f9d1562c29364567d87acb
+[http://archive.apache.org/dist/logging/log4cxx/log4cxx-0.9.7.tar.gz]
+md5=fd09abc90b8c0c8af1d5146a75590792
+sha256=5b41b2fc267595bdb0fa4cd1152309413bc70e6d9196293113ebb82751eb7ec6
+
[ftp://ftp.logilab.fr/pub/common/logilab-common-0.37.1.tar.gz]
md5=39561a45c74f8ff11e2ddd872f4ee5bc
sha256=c5974c1e98bed62bb3153a8144069c43229c6b208ef599bc77c84fb493c2291b
@@ -15634,46 +16046,90 @@ sha256=847596646417abbdce9cfd0e1dca2cced29c6a8b814d1bd28d0c7301e9e4e9d8
md5=26c31e8e1528fd098e3aaa11c0d34d99
sha256=847596646417abbdce9cfd0e1dca2cced29c6a8b814d1bd28d0c7301e9e4e9d8
+[http://snapshots.madwifi-project.org/madwifi-ng/madwifi-ng-r1844-20061208.tar.gz]
+md5=9ab58ff1c9b3803f76b064eba3555679
+sha256=da423f508cc3624a1f510e9c153ebb7c5413e765546e9d44d55818358862cc64
+
[http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r1844-20061208.tar.gz]
md5=9ab58ff1c9b3803f76b064eba3555679
sha256=da423f508cc3624a1f510e9c153ebb7c5413e765546e9d44d55818358862cc64
+[http://snapshots.madwifi-project.org/madwifi-ng/madwifi-ng-r2100-20070210.tar.gz]
+md5=e7e0f50615b48c4ea70e6d219d141728
+sha256=49d42bcb9e13534f357240890c4e6b344e5f2fe951d5d39bc4caee55fdf3c5b7
+
[http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2100-20070210.tar.gz]
md5=e7e0f50615b48c4ea70e6d219d141728
sha256=49d42bcb9e13534f357240890c4e6b344e5f2fe951d5d39bc4caee55fdf3c5b7
+[http://snapshots.madwifi-project.org/madwifi-ng/madwifi-ng-r2156-20070225.tar.gz]
+md5=8cee25705f94e1ffcf84cc084d5a6996
+sha256=d609af1a5bb6ecf6b00ae89ef338c607ee7f9ddba693085c3b7773f9be00b2e0
+
[http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2156-20070225.tar.gz]
md5=8cee25705f94e1ffcf84cc084d5a6996
sha256=d609af1a5bb6ecf6b00ae89ef338c607ee7f9ddba693085c3b7773f9be00b2e0
+[http://snapshots.madwifi-project.org/madwifi-ng/madwifi-ng-r2182-20070308.tar.gz]
+md5=8e6f80c2e5cc828b6cceeda1c66c687d
+sha256=d509a0d9cb791c0633c35b48c502fc972990ba0dcb963690edbe3261704d0af0
+
[http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2182-20070308.tar.gz]
md5=8e6f80c2e5cc828b6cceeda1c66c687d
sha256=d509a0d9cb791c0633c35b48c502fc972990ba0dcb963690edbe3261704d0af0
+[http://snapshots.madwifi-project.org/madwifi-ng/madwifi-ng-r2187-20070309.tar.gz]
+md5=a43d24457cb99fcf4c32c31923be9b6a
+sha256=955d5382d079327679c3a601361fb752f1caf2f8a832f1c1bffe945708e37dca
+
[http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2187-20070309.tar.gz]
md5=a43d24457cb99fcf4c32c31923be9b6a
sha256=955d5382d079327679c3a601361fb752f1caf2f8a832f1c1bffe945708e37dca
+[http://snapshots.madwifi-project.org/madwifi-ng/madwifi-ng-r2702-20070903.tar.gz]
+md5=b65e6b712836cd0121bd1746e8920d10
+sha256=46a30f2cd62c66099d4b87a32fb82751598758c213a1486ec7f44c23a33f5529
+
[http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2702-20070903.tar.gz]
md5=b65e6b712836cd0121bd1746e8920d10
sha256=46a30f2cd62c66099d4b87a32fb82751598758c213a1486ec7f44c23a33f5529
+[http://snapshots.madwifi-project.org/madwifi-ng/madwifi-ng-r2826-20071105.tar.gz]
+md5=fe1758398de89fce57f05f9c1d1bb923
+sha256=70cfa5eacd27d46a5e6f562b01769c64794d20ce4636cf133def7db7f0715efb
+
[http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2826-20071105.tar.gz]
md5=fe1758398de89fce57f05f9c1d1bb923
sha256=70cfa5eacd27d46a5e6f562b01769c64794d20ce4636cf133def7db7f0715efb
+[http://snapshots.madwifi-project.org/madwifi-trunk/madwifi-ng-r3314-20080131.tar.gz]
+md5=2c7352cbbdac995de8c3bce5b80db5f2
+sha256=0599c75b95ba63bdc554cb8124192e62c75fbeb71b9e8a5a7bc351c8e0666758
+
[http://snapshots.madwifi.org/madwifi-trunk/madwifi-ng-r3314-20080131.tar.gz]
md5=2c7352cbbdac995de8c3bce5b80db5f2
sha256=0599c75b95ba63bdc554cb8124192e62c75fbeb71b9e8a5a7bc351c8e0666758
+[http://snapshots.madwifi-project.org/madwifi-trunk/madwifi-trunk-r3837-20080802.tar.gz]
+md5=d6e04fa7fb0bea5079f24a753633fb29
+sha256=d504e1e7b8f0d01b5441a86d1086aa4088c8896d87d8aabd6dabace76997467a
+
[http://snapshots.madwifi.org/madwifi-trunk/madwifi-trunk-r3837-20080802.tar.gz]
md5=d6e04fa7fb0bea5079f24a753633fb29
sha256=d504e1e7b8f0d01b5441a86d1086aa4088c8896d87d8aabd6dabace76997467a
+[http://snapshots.madwifi-project.org/madwifi-trunk/madwifi-trunk-r3878-20081204.tar.gz]
+md5=bf12d0f9f306dad91bf7530586712dee
+sha256=3b8ea233bee05edc346c66577b6beb5ccc81db9d9440982624d7b39aecc79c77
+
[http://snapshots.madwifi.org/madwifi-trunk/madwifi-trunk-r3878-20081204.tar.gz]
md5=bf12d0f9f306dad91bf7530586712dee
sha256=3b8ea233bee05edc346c66577b6beb5ccc81db9d9440982624d7b39aecc79c77
+[http://snapshots.madwifi-project.org/madwifi-trunk/madwifi-trunk-r4029-20090525.tar.gz]
+md5=aa88865c0fd11a0c0736af17a13c4f5a
+sha256=d42b59fdac3972a9b0876789ed61e78ea13c34fefe7d819ac0fbf748070fecef
+
[http://repository.maemo.org/pool/maemo4.1/free/m/maemo-af-desktop-l10n-public/maemo-af-desktop-l10n-public_5.0+r6160.tar.gz]
md5=5e13cc37619d6a79459ef1b36d671597
sha256=28d1dbeb0c6db7a4155fb87c838b0d814e583147fb0cc23bdf64691014f69add
@@ -15826,6 +16282,10 @@ sha256=bc9e3fe06a550d6eb48fd84eaf58415c78fbc29ba042e4a074adb62736f50760
md5=1775f4ab1529db175a95f83bacc562b0
sha256=e88295f9d6fe792784ea7dd546a12b0e7bb96b023d4248e728a43eb6ad885135
+[http://kernel.org/pub/linux/docs/man-pages/Archive/man-pages-3.21.tar.bz2]
+md5=14b3f971348f4d59ae8b8362d8eb15ff
+sha256=272ac90813e4301873d46229b216622bb7bc6a0b3adb15577b20b5083f92a169
+
[http://www.maradns.org/download/1.0/maradns-1.0.39.tar.bz2]
md5=5ac39978f55ecaf6e887cd5be027b1c3
sha256=4ac5940d25a9b5a52d0ff1f8223bb85462f9cfcceb4ac547e3ca9b6690aad394
@@ -16226,6 +16686,10 @@ sha256=cea3848006631801709588b8ae6808dbc768f62b6da4085073075f276309fd0d
md5=afed64074b2ed195aae171b2178650e1
sha256=e6cc1b6da8a7af99ba9298e0cb4aac790595f04e04497ea8c2bb4b48c44feb5f
+[http://goodies.xfce.org/releases/midori/midori-0.1.7.tar.bz2]
+md5=c6299ecf93417526f37bc0154c18b126
+sha256=9b74a776831c3680c10ad5c3d04985a1368c4fdf2f383a0e8efcc3cda925baaf
+
[http://git.xfce.org/kalikiana/midori/snapshot/midori-abbfc163a39d7f1f01725fe2cfe3df516f9fa0f4.tar.bz2]
md5=d50f0a9683dee60685bcd48e04970949
sha256=c5eb824148935697cf4fc36f11cfd7a05fbe6a3392d8f32e296e2cdfd21de3ee
@@ -16806,6 +17270,10 @@ sha256=af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e
md5=3e68b857b4e1f3a6521d1dfefbd30a36
sha256=af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e
+[http://ftp.gnu.org/gnu/mtools/mtools-4.0.10.tar.bz2]
+md5=750c2beba968a5d46dbaae24551a82b9
+sha256=860fee13acb39365bd28763070e24011ea55f381f96714d2841937525aa02ded
+
[http://downloads.sourceforge.net/mtpaint/mtpaint-3.02.tar.bz2]
md5=828013176f135fc24ffdf16a011c51e6
sha256=991a1376dc23d0663d45b3b395c0e5c5542fee3906a120889583d67f854f5206
@@ -16846,6 +17314,10 @@ sha256=636d816aa4c7e754496b9daec8a00d7e5f62b67d640440c91dea6d694c83c944
md5=b2c1eb45fd958f6589ee52a98f2a3ce1
sha256=03fa1f45d4743cd395b634d19aebbc2c1918cf6b683e0af51076ccc79f643a9a
+[ftp://ftp.mutt.org/mutt/devel/mutt-1.5.19.tar.gz]
+md5=73b3747bc7f7c805921e8d24ebac693f
+sha256=b160baedf2676a4c2c1a5c74049e2c63f00fccff43ee2594367087a08bfd63c8
+
[ftp://ftp.mutt.org/mutt/devel/mutt-1.5.4i.tar.gz]
md5=3d4088f25892af6d71148eef26604f33
sha256=f89af1816b839736eaf5fd188c4574fc52bdd37a7dabc465edafe6d8c3914847
@@ -16974,6 +17446,10 @@ sha256=a69d1690ad587d81b85c34d1ef9bf47abf0ba21dc96876d95dd6a9a193a859f1
md5=bc7995b4961385269abc645575bcaf4d
sha256=a69d1690ad587d81b85c34d1ef9bf47abf0ba21dc96876d95dd6a9a193a859f1
+[http://www.tux.org/~mayer/linux/nbench-byte-2.2.3.tar.gz]
+md5=285dfab361080759d477ea1fe7d3093a
+sha256=723dd073f80e9969639eb577d2af4b540fc29716b6eafdac488d8f5aed9101ac
+
[http://dev.yorhel.nl/download/ncdu-1.3.tar.gz]
md5=204bacb8376819059bec6c8287a87a67
sha256=f556a4b07c07bb66eabb5f2a20b3c52ea22020a68f2b5302d03e7b93b0ffee54
@@ -17106,7 +17582,7 @@ sha256=e42d3b3f30de0c1ad0a86aa039b35cf2bf64c7f64c29ee333cbf934784639973
md5=18ed6d0f1adf75a748df55d5e924fabb
sha256=e42d3b3f30de0c1ad0a86aa039b35cf2bf64c7f64c29ee333cbf934784639973
-[ftp://ftp.netperf.org/netperf/netperf-2.4.4.tar.bz2]
+[ftp://ftp.netperf.org/netperf/archive/netperf-2.4.4.tar.bz2]
md5=0e942f22864e601406a994420231075b
sha256=28e76af491ea3696885e4558ae2f5628a4b9ebdbefc2f1d9cf1b35db2813e497
@@ -17130,6 +17606,10 @@ sha256=844ba97e745a0b9f37afc7daa323cafcef00108cd0254667da0a00558eb323a7
md5=36f7b3120e00c9c74cb6619334de419f
sha256=6eed89b661ae9f2ac0d383414ca964abea8a115f8fba0f7ab37b49b565ffb2a8
+[http://www.netsurf-browser.org/downloads/releases/netsurf-2.1-src.tar.gz]
+md5=f0a34fd076b492c1a13b45432e8d7e49
+sha256=cda2cf41c852938c226c47c2b995d527387120141f68b416ea745e50a7165a81
+
[http://ftp.gnome.org/pub/GNOME/sources/network-manager-applet/0.6/network-manager-applet-0.6.5.tar.bz2]
md5=1c94a41e2399d261985a75f0cd3b895b
sha256=9cca3e34e23f00c82bc5e7237aa81639874e90d43a689e26fbfd938279ca31c9
@@ -17262,6 +17742,10 @@ sha256=58782b11423359f2a247f0217aab6fe041f32984aac1f411da6d43bd34cfd0db
md5=917f4e05f3982bd7fceaede197f0e1d4
sha256=d30a7470b82a73ed442525b365afaf00427204e3771edfeab05743acca97122b
+[http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.10.tar.gz]
+md5=03938f17646efbb50aa70ba5f99f51d7
+sha256=1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d
+
[http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.7.tar.gz]
md5=f384fb230145f90fb75df1e33062583f
sha256=3c45afef8390d8eae65e1415f7de159b7fdcef649218238a6cac8e9952fde7d5
@@ -17378,6 +17862,10 @@ sha256=aa567d986c74a4c8b4abb1cc454c099f67ab01b049b4c69aa6e703c7f18b594d
md5=b9fbc1386b24f59b36aeb9d764c11fb5
sha256=8ed452371010117e183ade4e1e3ae4b489485b792722bf3b97b817cf0ed66ac8
+[http://www.kernel.org/pub/linux/bluetooth/obexd-0.13.tar.gz]
+md5=8764dcbcd7b5ed80e17b1279a82701b0
+sha256=c986121e520897af6c326ece8a26eca87bdb4641a93913b63a5c29521cefaf66
+
[http://downloads.sourceforge.net/openobex/obexftp-0.20.tar.gz]
md5=085b9edc0504c0d79e7479a54e2018c5
sha256=7246fc75257afcd30ff16dc70185057157bcefc12fa9fba111b3b201577cc40e
@@ -17538,6 +18026,10 @@ sha256=908a69340b020f7d865acf70724e37837016a81a0cb499fb83441759cbef7616
md5=8347c8980ccf6cc46039ca75e8b0f543
sha256=f9bd3921377ab64138c7dd550d5753e3668e99de37d743cf112b88ad933d4420
+[http://software-dl.ti.com/sdo/sdo_apps_public_sw/omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa-3_16_01-Linux-x86.bin]
+md5=a231257e79fffbd4aa87dde13642df4c
+sha256=92ecc9be2c638220ebbd7de467a0944d49f1bef84b977421709afadd4508c2b9
+
[http://www.devzero.net/openmoko/dist/omext-0.2.tar.gz]
md5=3c1fcd85f0a0cd3ccc4d7b4f26996b47
sha256=3d3cc3e4f92f7e0b6a352c3f68a337a599a90f4e4b6e6743adc0c70b570639f5
@@ -17570,6 +18062,10 @@ sha256=c11daf4e0baf1bc70d30411944f9a3238d61e3c1972c33443dbe0cb078cfe2d7
md5=c2b4f12822cef2182267ea0d020bddf6
sha256=e6b48a294b35449c851c2a6ea6969041ed7f4148e92b3faa03a330b7bb5a59af
+[http://downloads.sourceforge.net/opalvoip/opal-3.6.2.tar.bz2]
+md5=88076eeadee1351704afb2aeb3532c17
+sha256=09ffe451256fafdd74d4dc35ed153b93c81328c397d36872cca1f0104877caca
+
[http://www.openal.org/openal_webstf/downloads/openal-0.0.8.tar.gz]
md5=641cf53761f35ee979f3e888614797a0
sha256=723e2c57c3cdffa7ff11f9b6b5478d6cb4af017e5a1ee7a56032969c39c1c2fe
@@ -17694,6 +18190,10 @@ sha256=4ba757d6c933e7d075b6424124d92d197eb5d91e4a58794596b67f5f0ca21d4f
md5=6a7fa99f44d9e1b5b04d15256e1405bb
sha256=7bbe277faa80c8d8d9cb96111db65fc0007d451784cc459207cd46b746a6f23a
+[ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-5.2p1.tar.gz]
+md5=ada79c7328a8551bdf55c95e631e7dad
+sha256=4023710c37d0b3d79e6299cb79b6de2a31db7d581fe59e775a5351784034ecae
+
[http://www.openssl.org/source/openssl-0.9.7e.tar.gz]
md5=a8777164bca38d84e5eb2b1535223474
sha256=25121b5dbd2b830929519325e033086ce45861cff2d0000d928f48261b1e0b7c
@@ -18126,6 +18626,10 @@ sha256=86f5a94bad18a24c32d6c95f4aad0de643189471825d07e1c1bcaf7cc5a8fab2
md5=37a185a3cb5c1a39ade7fdc3e6c75349
sha256=75fa65f965c8b9b80b1a0a270ad5dfbe71eaa980451790a0c86fdd19f55cd150
+[http://ftp.gnome.org/pub/GNOME/sources/pango/1.24/pango-1.24.2.tar.bz2]
+md5=7bc6c884d847cabc613e4c6d663771f5
+sha256=f3617f8f32c45c57f19c0aa1d7334e1dc979b9b54e5bb4e78fba8ec80193c23c
+
[ftp://ftp.gtk.org/pub/gtk/v2.4/pango-1.4.1.tar.bz2]
md5=39868e0da250fd4c00b2970e4eb84389
sha256=4f35ba6d3537c9386d6262bfe601a418bf34fe0be3bb0139ec2d3bd9435d4d3f
@@ -18450,6 +18954,10 @@ sha256=6e3549b8586d8ac3ae8b2251b6cff9065f12a5d648c9c464543988ddb670545b
md5=3aa902cb7a57a4aa09427de603ebf17b
sha256=3d087c88f6e2cc8fde8d2ab12ff2f85ca3ecb2c67754d0483d158f2e5802b015
+[http://0pointer.de/lennart/projects/pavucontrol/pavucontrol-0.9.8.tar.gz]
+md5=ec37148c658fa5110bc991ab17ea82f0
+sha256=e0ac5d5a0e936d564785270c6dab756d156c7d24d06a9ab71e1c87362b221447
+
[http://dev.gentoo.org/~solar/pax/pax-utils-0.1.13.tar.bz2]
md5=5f09df47a16e83462384b44b75310539
sha256=72f3cdad93b5436070dcc63b67764a06c594f324ccc001e8bfb974a8d1a86f36
@@ -18734,6 +19242,10 @@ sha256=2b16516ef147bb604e1cf50c883143a052a7ff92d2930b70e571da0603b7d9ce
md5=837df4a02c61a60a880644393b57faed
sha256=45d491879791140dc1f20287e6489f32dc59ae37628038d991d9511abede3fc2
+[http://cairographics.org/releases/pixman-0.15.6.tar.gz]
+md5=fe922698df46b21d7e19f28ded4ca100
+sha256=3438437c131c9847b34106225a728c11e522776ac454bb8740a9bc7aea409f22
+
[http://xorg.freedesktop.org/releases/individual/lib/pixman-0.9.4.tar.bz2]
md5=c354ab5b0da10227226d3ef604254875
sha256=261d239e9e3070a0a81e5b3eab92e6236c6295979bdae0a1ded05cbef93f67aa
@@ -19262,6 +19774,10 @@ sha256=6bca237485a352362133792e000a3c8e367a26b0312c5c607db7c2a97717d15f
md5=2e81938855cf5cc38856bd4a31d79a4c
sha256=a13c81897c94b3d6e705fc9da07c610492e28cf7abd5ff8e992f0ec95a269d62
+[http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.4/linux-i686/xpi/pt-BR.xpi]
+md5=29c672886aa9ca41428ba04196938545
+sha256=1474828a58f893bed20f0e0cd26bc310c7472d69bf7a1ae01c00a371de256b1a
+
[ftp://ftp.ossp.org/pkg/lib/pth/pth-2.0.0.tar.gz]
md5=f84a87295fef3b41499f3b728b1f0050
sha256=1935a06368c1555d5f80329ba1e53f5b1a7dd9efb7fc9354427f2d1a583c81a3
@@ -19290,6 +19806,10 @@ sha256=c99897464bd07c73dbb72095a9806ddc0c26141230e34b181d7e742e78259e4b
md5=122ab96fcc44110ce05153f259b3285a
sha256=b8301389c1ee9968df8075942061665e33198d3865f92d8fb26e519068517305
+[http://downloads.sourceforge.net/opalvoip/ptlib-2.6.2.tar.bz2]
+md5=d478121cfc82da7c0f0ce0e53fc7c2fd
+sha256=941ead5179f5bab8dd6e81806b6e52120dc5b98c6ced8128df24639af1eabedd
+
[http://pypi.python.org/packages/source/p/ptrace/ptrace-0.3.2.tar.gz]
md5=8108c2474bef16d126e956dce3c5073b
sha256=634fe75e195179adafb6218040724f38252bd0fc8f796bb3e3e9bdba065890c5
@@ -19306,6 +19826,10 @@ sha256=6cc4aff778275f087cfbd65d2040b1587cafc588749499a452eb496329505ab0
md5=0ed1115222d1d8c64cc14961cccb2eb0
sha256=e6129f9239235981d329de40eeffa55041e6815a93aaa994d1eae242ea7446b5
+[http://0pointer.de/lennart/projects/pulseaudio/pulseaudio-0.9.15.tar.gz]
+md5=4510364eeab219fd100bd1b373b1a002
+sha256=1e8ad5b7c5cf3485bd0738c296274ff2c99d26d12a25a225dc250eddea25b9f1
+
[http://0pointer.de/lennart/projects/pulseaudio/pulseaudio-0.9.5.tar.gz]
md5=99b5d9efd4fce35cabb4ae5d0ebb230d
sha256=cd82eabcf9fa310a64b58b621730cebe5d3edae7596a9c121155db455b1e58f6
@@ -19426,6 +19950,10 @@ sha256=61598c9e3a0f7eb2e7367d4ecc71522c4f16a7d41ed31db29e3afee8d9843454
md5=935aebcbe610fbc9de8125e7b7d71297
sha256=61598c9e3a0f7eb2e7367d4ecc71522c4f16a7d41ed31db29e3afee8d9843454
+[http://www.angstrom-distribution.org/unstable/sources/pwlib_1.5.2.tar.gz]
+md5=0fa33ba1b32b254abe0b731a52c0f2f9
+sha256=62b254548ad7a9e71231a160275827d67ff39022ee8e2854a7c9d9fe9a688e65
+
[http://www.openh323.org/bin/pwlib_1.5.2.tar.gz]
md5=0fa33ba1b32b254abe0b731a52c0f2f9
sha256=62b254548ad7a9e71231a160275827d67ff39022ee8e2854a7c9d9fe9a688e65
@@ -19610,6 +20138,10 @@ sha256=a6d7db68c87699e283a1f58b637a7e730c350899fd7b35b88e63caa0e85a9ab9
md5=4d5674f3898a573691ffb335e8d749cd
sha256=b08d4ed54c9403c77778a3803e53a4f33f359b42d94f6f3e14abb1bf4941e6ea
+[http://cyberelk.net/tim/data/pycups/pycups-1.9.45.tar.bz2]
+md5=ff634a6751f8a859ed26751bf03abef0
+sha256=ef6e576e5465da9c338ac8ff9f162825cfb7997359efc52e6a110c295a9f363b
+
[http://pycurl.sourceforge.net/download/pycurl-7.14.0.tar.gz]
md5=6f73d518fb520af14634a06ee1b7ddce
sha256=a60e08b01fc3355ec18ec0e447349b6f8bff3f9628eb42891cff1eb51b9618b1
@@ -20346,6 +20878,10 @@ sha256=9e1db25eec33ba1dff95010d6b8f1150ea40e7f953f1b6b7668a69a1171d23df
md5=e2e45564f8ce22e00e1360e79c8ccdeb
sha256=102fd42f8f2562450f4e45c28bfb0390c2d30ffa6a805eead15d67018930f654
+[http://xorg.freedesktop.org/releases/individual/proto/randrproto-1.3.0.tar.bz2]
+md5=a49416013fff33c853efb32f1926551e
+sha256=cfeb1429465e3c24debde1bf53ec35ef738fde5e80d2eed14f33e315e747bb8d
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/randrproto-X11R7.0-1.1.2.tar.bz2]
md5=bcf36d524f6f50aa16ee8e183350f7b8
sha256=7a5eb58f10d02f58c2f7fb153bb5dc6d72173d5fa3d317bdbd9674f4577e0ad0
@@ -20438,6 +20974,10 @@ sha256=080aecbaaa5ad81750541ed19fb5ea6ccb45e1c2a5a93e9a2878a42532e40ba5
md5=84c0a051ba5358546a9c0e393095ab91
sha256=7cf45008810ca894b085ae0eb1a0071f0cb6989dd9ce35cfcd617fedf7018c7f
+[http://download.librdf.org/source/redland-1.0.8.tar.gz]
+md5=ca66e26082cab8bb817185a116db809b
+sha256=8a77fcfd20fea2c6e53761d6dcbbee3fdb35e5308de36c1daa0d2014e5a96afe
+
[http://downloads.sourceforge.net/refdbg/refdbg-1.2.tar.gz]
md5=ed807a83455b8aaff5e894e94161a352
sha256=0b8591a646d214f0f959483dfcd9b9624996790d546982d814b47ca8fe4c5725
@@ -20574,6 +21114,10 @@ sha256=13cce714959056d41627ec9442342d46072f9d72ef57554b9d03ebfb353ed2d1
md5=613eed8201d37be201805e5048ebb0c3
sha256=084e250d2392369b2548b663e61bcf128baecb2f527e381e9ba89f0148db2c0d
+[http://ftp.gnome.org/pub/GNOME/sources/rhythmbox/0.12/rhythmbox-0.12.1.tar.bz2]
+md5=f17a72465dc43d554b11cf7b18776bff
+sha256=1f444b9cd74615831dab7ec8cd3c58c95d7436372df9a768bd701ab4321a8721
+
[http://ftp.gnome.org/pub/GNOME/sources/rhythmbox/0.8/rhythmbox-0.8.5.tar.gz]
md5=5ac4e1b5ff4f2fdada81c007ac599cb9
sha256=654d6b190f4644d82c10b4ce5645b72405c2e78ea346ce3d8eb385fc3f3732de
@@ -20754,7 +21298,7 @@ sha256=554456550ca6e792297d6d39367120af5b2bd6181d514a43faf4e2f565721908
md5=dc0f37d933b0b6c713ad617e09441f3b
sha256=257722380b39e84e700e9f2d2f6600ba724723f1ed59327bfce47a57d293eeee
-[ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz]
+[ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.5.tar.gz]
md5=3fbb02294a8ca33d4684055adba5ed6f
sha256=19590e972b80333e26a6514c34d976c2037138361481a16f27b75e5d33f33a58
@@ -20962,6 +21506,10 @@ sha256=2a11ba05f34b2978af3add623a641e0340d39322b4ca2bd26baae743c78de956
md5=953dc98dbd78fba3a80d554514581d26
sha256=0431955a17cd687a28c9b005a6afbc11d8db9348cd4ec91c5600f4f662819e07
+[http://slimlogic.co.uk/pub/downloads/libscenario/scenario-lib-0.2.0.tar.bz2]
+md5=18b370f6ff89546df66fe64a2efd676a
+sha256=d76d0e8267e781e4ed4a93c9f51b7ae1257bfb2fadb8d8f5b64414b5340b1239
+
[http://savannah.nongnu.org/download/scew/scew-0.3.1.tar.gz]
md5=e9a69f7014cad332cc78667b07eebbce
sha256=0e966359b9e1de31bf375b2a982b7f63cc6dd0c253bda480d1913c668791972a
@@ -21934,6 +22482,10 @@ sha256=ba8c492c1b2033d4e2131f05df9e3780d4bc35bea87aa32a6052dd53a814e288
md5=ef40944118841803391d212cb64d3c5b
sha256=ba8c492c1b2033d4e2131f05df9e3780d4bc35bea87aa32a6052dd53a814e288
+[http://downloads.sourceforge.net/strace/strace-4.5.18.tar.bz2]
+md5=e9449fcee97e6a8ed73934c883c870e0
+sha256=95e7b7470e04f22c3ec8dc6d0b1fdd8944306cb5313c84c4545cd83abada26d0
+
[http://downloads.sourceforge.net/streamripper/streamripper-1.61.10.tar.gz]
md5=2d62a4546521980e1ed705a5094a6ec3
sha256=08ca63620c1c071f4b2d42c5f63f38cee920aa57cde151ac3cfcf344437e3f11
@@ -22118,6 +22670,10 @@ sha256=c2ad63095e34b4a474e7ff4adb6ea8b7ab238bb5738d00a739102bb8bb71d805
md5=650c774917be49c526a4f8a3e733c898
sha256=e7cbddc8c68b1eccba1c82edd5427595397d9a483c8fb1184abc9303afe08045
+[http://downloads.sourceforge.net/swig/swig-1.3.39.tar.gz]
+md5=ac201d1b87f8659584534f9540d7ad24
+sha256=bb2d5d9373cf1fe03faaadb02de47af3b058b0300e0f58ece6a7212f0a2b11dc
+
[http://crosswire.org/ftpmirror/pub/sword/source/v1.5/sword-1.5.10.tar.gz]
md5=4c920f2a3ee72040df8a8e105ad840df
sha256=5fb3f030e9395e23a48c02bde6bc81ad42b1c4056a011d9ee15c4c85110eb847
@@ -22254,14 +22810,26 @@ sha256=c087b112da0afd1c50ba8a8a2727c4cabfb1e5a57f43701c5abdc05865072649
md5=ee6b84cc7b598b4e1a00a4a8c6676d4e
sha256=d4d17102e014d3183a11719896061dc464c3d9a836caaf47b3b57da4ac23b52d
+[http://www.balabit.com/downloads/files/syslog-ng/sources/1.6/src/syslog-ng-1.6.11.tar.gz]
+md5=8f9ca6140f428dc9adec9fa1c270a2dd
+sha256=dd37f1e280bd6c2d66c9a15aa3ee9e209a1b649e3b79e70fee58aea1cb0ea093
+
[http://www.balabit.com/downloads/syslog-ng/1.6/src/syslog-ng-1.6.11.tar.gz]
md5=8f9ca6140f428dc9adec9fa1c270a2dd
sha256=dd37f1e280bd6c2d66c9a15aa3ee9e209a1b649e3b79e70fee58aea1cb0ea093
+[http://www.balabit.com/downloads/files/syslog-ng/sources/1.6/src/syslog-ng-1.6.8.tar.gz]
+md5=ffbad7e8e6dcbe385820b8ffba23b622
+sha256=3c841fd89599ffb770cdf2844426980d75dc3dab12e0f707e4cbb51937f6125e
+
[http://www.balabit.com/downloads/syslog-ng/1.6/src/syslog-ng-1.6.8.tar.gz]
md5=ffbad7e8e6dcbe385820b8ffba23b622
sha256=3c841fd89599ffb770cdf2844426980d75dc3dab12e0f707e4cbb51937f6125e
+[http://www.balabit.com/downloads/files/syslog-ng/sources/2.0/src/syslog-ng-2.0.5.tar.gz]
+md5=c161eefc450fabc246c1a10997c6c6a5
+sha256=34862f87d9d404ad4874d95ee871334f5bc2acad65420f672ad2ee286ab660a1
+
[http://www.balabit.com/downloads/files/syslog-ng/sources/stable/src/syslog-ng-2.0.5.tar.gz]
md5=c161eefc450fabc246c1a10997c6c6a5
sha256=34862f87d9d404ad4874d95ee871334f5bc2acad65420f672ad2ee286ab660a1
@@ -22274,6 +22842,10 @@ sha256=26c05ef7666881eb1d60291a4293e67d75dbf048ca8a30f6b9eb3dc86ad1b6b0
md5=d7b8f27b83ff080ff824177d65a7dae0
sha256=0a63da1c99b6a9b6a93b6fd0a9391c7d8216f658d2bea0ba81999e261c6b6649
+[http://cyberelk.net/tim/data/system-config-printer/1.1/system-config-printer-1.1.7.tar.bz2]
+md5=a77bde5adc5ee8822b0764ff786ccc09
+sha256=fdd50cb114151c66b8180c0ce90ba0e99f77a69770ac21598a87be935eec2224
+
[ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-2.86.tar.gz]
md5=7d5d61c026122ab791ac04c8a84db967
sha256=035f98fae17d9cff002993c564ccc83dc4ed136127172caeff872b6abdb679d8
@@ -22314,6 +22886,10 @@ sha256=6b368373f9a01f3f33f77ac25c170cbd052b29d6910f72308e55dc0a39af7722
md5=32d5258f448b5982af9cfa4364f31d41
sha256=17e64f2f5d7d8a358136a7003604cb60acaef47b083123956b12eb0ed9293055
+[http://tango.freedesktop.org/releases/tango-icon-theme-0.8.90.tar.gz]
+md5=0795895d2f20eddcbd2bffe94ed431a6
+sha256=6e98d8032d57d818acc907ec47e6a718851ff251ae7c29aafb868743eb65c88e
+
[http://tango-project.org/releases/tango-icon-theme-extras-0.1.0.tar.gz]
md5=caaceaec7b61f1cbda0db9842f9db281
sha256=b9252179ea2c546e6bb065281d51373f0ae06081e5a98d4255249af4fa8b33db
@@ -22322,6 +22898,10 @@ sha256=b9252179ea2c546e6bb065281d51373f0ae06081e5a98d4255249af4fa8b33db
md5=4e6e4c1a5c1ee2e6026454083de3d5d5
sha256=d2a107e3a5ceaeeb15ab2e3d7cd308653b4ded8aaf8d3c0e0be3b64ba4e17cfc
+[http://www.tangogps.org/downloads/tangogps-0.9.6.tar.gz]
+md5=85755b15099f6071776d6feb67bdbca8
+sha256=e56a77325cdea8c274a39fcb79bd47919cbafa15d8009176538ec9a94f5e6e13
+
[http://downloads.sourceforge.net/tapioca-voip/tapioca-0.3.9.tar.gz]
md5=e88c400394c092c2688bb2d490c80ccb
sha256=fb89ac4e8578adc140e19cb4929b200d2898e5a8373230f500c16e59c803cba1
@@ -22602,6 +23182,10 @@ sha256=efcda677be7ef093757d965736dff3b5af8c9fd36b3e7d3db09289a4a1d5d013
md5=17f91175a32827e9c9f45dc7a20a0c2b
sha256=6ae8157bbec2b36957bbee6895b4cd3f82406fa90fa7d597235c58ea19307be7
+[http://kernel.org/pub/software/network/tftp/tftp-hpa-5.0.tar.bz2]
+md5=28beef704a4ef62bc2dead005198ef4c
+sha256=96309871519efcab829fdfcc1cca546d772ed6a0e214c9e99e77ca7aea29f734
+
[http://packetstorm.linuxsecurity.com/groups/thc/thcrut-1.2.5.tar.gz]
md5=190f08ce6839aecb0fa0ce8d5ddd09ee
sha256=b32f3d71ac540248b7643baa39d8ecfb75af493228caaeb64608e49f2f092473
@@ -22618,6 +23202,10 @@ sha256=11b067df2ce38baa36566bd29ab14bbf2f7c0fcc15e01a5be2a6a85000c39104
md5=e6388feb0ffcd189af779f165c124b4d
sha256=6b964fb220a46438adf6ec37082da66332a3ce74ca4913b863b17d9ab720681f
+[http://install.source.dir.com/ti_cgt_c6000_6.0.21_setup_linux_x86.bin]
+md5=5bfeaacb628b56005a8865a177af01e4
+sha256=fcfa98e2c8ff18e8e6d5b2ff5e94f20b719150fe7bb4a130cfa360e02df2156a
+
[http://www.openzaurus.org/download/3.5.4/sources/tickypip-0.1.2.tar.gz]
md5=5a085296b1147fe970a256a9b2d0f91f
sha256=f3b5722c145ebeee3523b4941afdaf75d03a56f1922a9d3662dc1715aa24ca34
@@ -22818,6 +23406,10 @@ sha256=5730611c42f8a8540343faa9512d9161073d2f882668c80dd0cf6a34c72daa75
md5=fa658ae2f20458d3c5d3effba3b2dd7e
sha256=3193c3446d211db2bd3c169c86f6d433666669336bd589a20c87f1483295cf2a
+[http://ftp.gnome.org/pub/GNOME/sources/totem-pl-parser/2.26/totem-pl-parser-2.26.2.tar.bz2]
+md5=daffda80cfead2a1473ca3ff71e1057b
+sha256=3a6dd0382fe074f23a747b08423fccb23fb38c25b1feddacbd4875d8b8c83743
+
[http://www.gnome.org/~jamiemcc/tracker/tracker-0.5.4.tar.gz]
md5=724208e1b2d235148499672b44181298
sha256=ad214a2692041f423d2150777c233b21cab2d108f849edc513192587ac63c9c2
@@ -22846,6 +23438,10 @@ sha256=404df2c479517020290be9847191523c1fcbd3e929e8bb1191a7832209d04af8
md5=490d13c141ba7b4a96582541ea83a461
sha256=944ab9cfcfc9a4bd7efeecf32ea609fa6517970a9708c44eee6d5750c4ff8e0c
+[http://mirrors.m0k.org/transmission/files/transmission-1.61.tar.bz2]
+md5=0b0428f4a6237a64dc8b7d378ace3f06
+sha256=3bc5bf49ed02a3d93b4b9b71c7814960e972c1bde4e9fb83b2cd500c83ae4a9a
+
[http://xorg.freedesktop.org/releases/individual/proto/trapproto-3.4.3.tar.bz2]
md5=3b713239e5e6b269b31cb665563358df
sha256=ff32a0d3bc696cadc3457be9c85e9818af2b6daa2f159188bb01aad7e932a0e1
@@ -23034,6 +23630,10 @@ sha256=4f32cfd01f0678080f8e98009ba99ce37f1261d842e3af9a6b3add22005a80ca
md5=f10b6954498bab5d08d0f50de381af50
sha256=4f32cfd01f0678080f8e98009ba99ce37f1261d842e3af9a6b3add22005a80ca
+[http://avr32linux.org/twiki/pub/Main/UbootPatches/u-boot-1.1.4-avr1.patch.bz2]
+md5=4508e9abd423a672763441d8535331c4
+sha256=b18d9f4e1fa5cf1f3d89640d6aa5067da150cebb822fdeb07222991f71684590
+
[ftp://ftp.denx.de/pub/u-boot/u-boot-1.1.4.tar.bz2]
md5=096cac66046326659b97eeded007ec73
sha256=1af9d68adfe044cb8fe1b3efa5b661c4cb57edf90f4a8daf38f0fc19692677a7
@@ -23082,6 +23682,10 @@ sha256=0c0afa2816482e087987f71958b656ff0c122032f5e3897a8d17daca5bc14115
md5=285e2184d2efef50e0fe43b71d2a7b11
sha256=a2889bee9c45575b284564dbc27cf3dc6cb9833d4ff643976a1b3dba2d763f86
+[ftp://ftp.denx.de/pub/u-boot/u-boot-2009.06.tar.bz2]
+md5=dfbe65c1e31bb7de5f5b03d50de192b5
+sha256=b0037cf21b67779ef5a0c585b32e46bde3b78df889484c78bb4318c9b448f560
+
[http://linux.omap.com/pub/bootloader/2430sdp/source/u-boot-SEP1106.tar.gz]
md5=49c07dec9e1be69fd01d46f47ec03731
sha256=a090786113b02647413ebc15888af269f2e6d50f73cbb94b0619cc1702911dae
@@ -23194,6 +23798,10 @@ sha256=001be4a8963c48e7debc82c6078562d087a2979da63e558a5e3613c03725c377
md5=2d7e548820d2ded5e183933cb701defb
sha256=da0ca1e821e3fa7cfbe73ddb1480b921002ee992f5e5fbc611422c103b907443
+[http://projects.unbit.it/downloads/udlfb-0.2.3_and_xf86-video-displaylink-0.3.tar.gz]
+md5=c2aedc8130c2e4d52e334b6804ab70da
+sha256=487a1d7bf4b896d9a4b9e7dd1bd293adcadde5684fe9fe32aa209761c3191b3e
+
[http://downloads.sourceforge.net/ufraw/ufraw-0.12.tar.gz]
md5=b2c104938c1c3eb47e7605432bbd3157
sha256=c750c8180057385eaa0844f1148d6f0223b986da322773195eab44b33b97c19f
@@ -23390,6 +23998,10 @@ sha256=00385353242173b878413e0423c1dddcbbb50a3cadc3bb9d0a6adcf335794423
md5=88978b4ad891f610620b1b8e5e0f43eb
sha256=2edc7cc98fd217f6980d8ba0b3792beed4695d4e8429a11c7237faab04ab47f4
+[http://downloads.sourceforge.net/linux-usb/usbutils-0.82.tar.gz]
+md5=6e393cc7423b5d228fa3d34c21481ae4
+sha256=9876b0e45a1bd3899222b916ab1d423e9efa3ad9374d55a6a301d5716f2d8a2f
+
[http://www.kroah.com/linux-usb/usbview-1.0.tar.gz]
md5=2ac1bdae03a858b965e895b211a75ad7
sha256=7a7add52242142f37a7d220c76dfe77090f6592eacdf796e3d07fa61415340fd
@@ -23454,6 +24066,10 @@ sha256=e67d86683adef0855220b6f5a4b7ca2c51a15faa142e2ecd69925ede76854a4d
md5=23f227da49df36f33fe47e917e332cd8
sha256=7736d8d7d3b39654e350416585b3e00af9f55670cce8b3dddd2c2494cbaae81c
+[http://kernel.org/pub/linux/utils/util-linux-ng/v2.15/util-linux-ng-2.15.tar.bz2]
+md5=71919b69eeecbba05612224d8f2c450f
+sha256=db4dcbf99d989a8f539d7521e9e64047367fa2ccdcbb91517cdec19693a41ffd
+
[http://xorg.freedesktop.org/releases/individual/util/util-macros-1.1.5.tar.bz2]
md5=51952682d8b42aeda3af5cee0133ce2c
sha256=75939790e16b8bcc122e83f3f060d6f000ed1a98e97b4972fac0903142f5651b
@@ -23466,6 +24082,10 @@ sha256=4f2a8a19e90ad82bc2da4eb52799a299a1c94bf5143bc2711e9e5d4cc5a7cdb4
md5=ea2d9cd33ca6fd05923f007bd74d7c37
sha256=97748154c41a1cd12635a79aee0c2846fd48ecb555fc8b54e3e5baec174e6e74
+[http://xorg.freedesktop.org/releases/individual/util/util-macros-1.2.1.tar.gz]
+md5=81b9746d6202ccf0b4a498cfd0731e71
+sha256=f3804f02f51a1be243ce7413dc67dca774f000686f8f2efedc77203a1962d401
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/util/util-macros-X11R7.0-1.0.1.tar.bz2]
md5=bc6be634532d4936eb753de54e1663d3
sha256=e95a45db65b33be472a3134492e348c4cd6edc200d02a85654ffe62bc2e6fdcd
@@ -23874,6 +24494,10 @@ sha256=b8e200ae66c20897c9aaa80b0044e638a0016d3bdb6e67560fd61f1ef162f305
md5=9e92234b29f062b3779750ba3cd0a71b
sha256=87caf592bd81922908e7ee6ff356c7d46cf5a2cbe46847df7d64aff537ca16b6
+[ftp://ftp.gnu.org/gnu/wget/wget-1.11.4.tar.gz]
+md5=69e8a7296c0e12c53bd9ffd786462e87
+sha256=7315963b6eefb7530b4a4f63a5d5ccdab30078784cf41ccb5297873f9adea2f3
+
[ftp://ftp.gnu.org/gnu/wget/wget-1.9.1.tar.gz]
md5=e6051f1e1487ec0ebfdbda72bedc70ad
sha256=69044b87c517b986dbc17a5f7e4de430cb56e605330c19c6bb0d384d5c37e638
@@ -24178,6 +24802,10 @@ sha256=e3f8a224af7a8df4defc2c0b3567e1a697486443a2e073fa56122c4a4e439d65
md5=0683a56108ca6d0c4329c7b9a5b7fbde
sha256=e3f8a224af7a8df4defc2c0b3567e1a697486443a2e073fa56122c4a4e439d65
+[http://downloads.sourceforge.net/libvncserver/x11vnc-0.9.7.tar.gz]
+md5=30a167577f657909b3355421e14e2ddb
+sha256=fd21224ec09ca5294ba0627433e4d2cb726d389c7818d162f152374e6d693342
+
[http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090127-2245.tar.bz2]
md5=25fcaa86a53333d416d5e837fb47ba7d
sha256=18b38aff8e019f35bfee810831535685e69dcf91283e50bc62efa82e3a8dbc21
@@ -24406,10 +25034,18 @@ sha256=74e882e9fee7ebeb274caf43071afff92531b8a41f34650376146a131166012d
md5=ceaccde801650ffbffc1e5b0657960d2
sha256=4511dc4df6ebb320a4a516b3b712c86f6924e5ee9832618f58ebba06c64712ea
+[http://install.source.dir.com/xdctools_setuplinux_3_10_03.bin]
+md5=8f0f8af016b97fb612ec11afaaf5a9e7
+sha256=d398bfb7a5d9657b802db835c28db892ec8fe54cf332420edef0b3ba1c231fcb
+
[http://gpe.linuxtogo.org/download/source/xdemineur-2.1.1.tar.bz2]
md5=b3884eaec59a63691f66bc29ce57a56d
sha256=75378ad3eacbe32c625de3b4af3e1f6fc9772ab45c1cd1393483d95ac4da3b22
+[http://user-dirs.freedesktop.org/releases/xdg-user-dirs-0.10.tar.gz]
+md5=6873f49ea7f568743621ed1e05e52dab
+sha256=169978c677db5c498f485e9896cd0ababae6b3a9d0bf640ffa719d5af2abca46
+
[http://xdiskusage.sourceforge.net/xdiskusage-1.48.tgz]
md5=a902aa9d73761ade98256c3cd5c1f533
sha256=7842aa42510bf52c367164d44a977915ad9f070864d5175157738f8d6894274b
@@ -24518,6 +25154,10 @@ sha256=53f3039ae769b08bd139d4474a7debe0b6f24048e7c514c835c8a1880f11e0d9
md5=3a2e0252e853ab30b3bff05ac92ec61c
sha256=3972428e3651c9159aff655c9c794728520c3ce3d66ac219ec5243d5d73d4db4
+[http://xorg.freedesktop.org/releases/individual/proto/xextproto-7.0.5.tar.bz2]
+md5=e6841018a7c64983b0954aa2c564d115
+sha256=d33e1f3c96daad78667b2dfc14a1ce2ee3bdce19409f82cd5ede6c696ca5b042
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/xextproto-X11R7.0-7.0.2.tar.bz2]
md5=c0e88fc3483d90a7fea6a399298d90ea
sha256=41c091d05943817c0b667192dab8c8f3a3a59c04a66dd311a9573f48a7b70b3b
@@ -24718,6 +25358,10 @@ sha256=825adcadaf4c90d4cb1d0bd21dcf67bf3b895f12f8e7bf186ed936445dc015ca
md5=a6070ead29b2d81b5b386a96df2661b8
sha256=45c4b6df8d1dbc4db8aa580be4f3c693ebba4eba4908d82489948827d3bed0e5
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-input-evdev-2.2.2.tar.bz2]
+md5=23341f098e7fe8ec13ef06ef784ac51a
+sha256=63606119e86c27b47bd7ec4b2b6048b76515df6755fc5dd8bcfc98f5fe53d994
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/driver/xf86-input-evdev-X11R7.0-1.0.0.5.tar.bz2]
md5=d982c6f185f4c75a4b65703ceed7be06
sha256=ba53e8ce6bfa01da7fa86a31853542a71722b41b511041bdb58cf66c10f3edb4
@@ -24726,6 +25370,10 @@ sha256=ba53e8ce6bfa01da7fa86a31853542a71722b41b511041bdb58cf66c10f3edb4
md5=6eba3b46ff77b99c44f93d2a08cc6935
sha256=e1e2b2ffe37e1c70829eef55f700cf3cffd49b3b3e0e2d3bb47c2cdd5db5adf6
+[http://www.conan.de/touchscreen/xf86-input-evtouch-0.8.8.tar.bz2]
+md5=4d8e092356d8353002f60a4907046c13
+sha256=eafc4a09729a4b2b6120430c71e1954c5cac299ad6adf2f9a40aee8a7b51e476
+
[http://xorg.freedesktop.org/releases/individual/driver/xf86-input-fpit-1.1.0.tar.bz2]
md5=a31066a2076d18619ceaea67f6d89698
sha256=8ee3b2df90516182460fbda025153aa7fb2c6ba343e4239d225963a287f694f8
@@ -24810,6 +25458,10 @@ sha256=c25b35524eaf00928d97bd0d8bf9e489d92993b133461b5f4d8d9655d37ec072
md5=ebe5dcf8eed819103909f18321fc3b9d
sha256=7b514715dfb5a2512dea3355bc3f09eb879d7184440c5525f0a9d29ec9f3be42
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-input-keyboard-1.3.2.tar.bz2]
+md5=d6fe929c4f6085d6dd67f197ae9c42f6
+sha256=33939ec65dbf56f49e1e7de854a1cf95446e40c533950431901567e67112aef2
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/driver/xf86-input-keyboard-X11R7.0-1.0.1.3.tar.bz2]
md5=8fb8a30fd9d7f152a1aef4eb8ef32b3f
sha256=e82d510157d13be37eed604cfb0d9355c054c4d3ac39bdef0c6ef320f2973d77
@@ -24890,6 +25542,10 @@ sha256=a07cb2169f43018c90b7889781c0db30cda0da03811edccb8c4db533166357ab
md5=31a51b0e5ddc4fac19754f48a3adf881
sha256=054b253f366795c2865714ce8bc545c79e59aa9ce1b7a9a4a05b9c674dff9dec
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-input-mouse-1.4.0.tar.bz2]
+md5=e7dc0759c14a9bfd373917a49e5f7c7d
+sha256=e6e1dbd64d41c826619a5881c5aeed46095bfdcb87c3e27d65292fc12a5bb7c7
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/driver/xf86-input-mouse-X11R7.0-1.0.3.1.tar.bz2]
md5=12a908e5a97b1b03e8717abf167f4f27
sha256=183c1cda6550c8821ef4b8d13e681a32813bcd32b6cf34a75d3870e399fa292d
@@ -25162,6 +25818,14 @@ sha256=6eb51d5d4489083c8a1eeabc1fbd22baeafe6486a7940516d1e2b741564acd06
md5=adb1e6346efd8dfe5dcccd47d46869cb
sha256=25ba42dedc297ca2a7257fdb4e050e8d61cdd6710c8adabdb3925908b09f9d02
+[http://projects.unbit.it/downloads/xf86-video-displaylink-0.1.tar.gz]
+md5=4faccf8ec4e5830ad87285317162c041
+sha256=6a1bb0297a24ad8da0466088d23cf10340f2a729f2a985712f4620a9a2dde675
+
+[http://projects.unbit.it/downloads/xf86-video-displaylink_and_udlfb.tar.gz]
+md5=9a10f8884e711cb0239a60aec721a594
+sha256=aa8c9dc0a156f25adcaec1a8749665996036251bc31d7a2501dbf895211f0951
+
[http://xorg.freedesktop.org/releases/individual/driver/xf86-video-dummy-0.2.0.tar.bz2]
md5=22b7cc20a33443cbd218bd2521850cfe
sha256=46013885696f3c1a5e05c5d503abc69e691443319a97cf2c6a01ec031e06c910
@@ -25198,6 +25862,10 @@ sha256=d03eb7e5b47e2f1e1a665700f4e22d15651dc949196b0ec880f0d63cafb6814c
md5=1dbede8f6393edfe6c1ecab2f754b3b2
sha256=d70c198cde981c3a53b1c41b717dea4bbf1d397d82957f584c641bb5fd02c82d
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-video-geode-2.11.2.tar.bz2]
+md5=4c652ecba772f705296b8e52d746857c
+sha256=2d252847a410636b55bf80900d9432ca438775f70377ce81311282a2d12853b5
+
[http://xorg.freedesktop.org/releases/individual/driver/xf86-video-geode-2.8.0.tar.bz2]
md5=a2b9c70a32b0a6436d837d67fa7aae18
sha256=f0b68171dd4256c927fbee91ecf84fa28c409b5b6b39cbf47eaa48fd73db305f
@@ -25538,6 +26206,10 @@ sha256=1596b79ab3e33263bde2d456cc0376808abee80b4cde059605f176d98bdb45cb
md5=7b1f5465f423a859f306f4f1d6306a1b
sha256=76b79c9b7d3b35b8e2e5354569bf0936c4afd39a9dcbdf66327714d75137930a
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-video-sisusb-0.9.1.tar.bz2]
+md5=42069e70578bf3fb353cdacad186f6c0
+sha256=b3ca934ce3e31f4a162bf263cad3913edccc46906d09132118b74a2095c157d9
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/driver/xf86-video-sisusb-X11R7.0-0.7.1.3.tar.bz2]
md5=781d726a0ca54b65521e383ab99043c8
sha256=6f972b126774d3d051b2f683e82661c07a1b4787b8ce04847eae80b283c5feb3
@@ -26170,10 +26842,18 @@ sha256=5e3db5f2387457f67798d664ed67c67337d2f84c45f15d986ee2f46f9b45d0d1
md5=d12efb18c7e3025c5e6a6f63144c2145
sha256=b968a10f52b0c5e807ec4c2c106f3aea301cf0ac00d04299b6961370c82c66d8
+[http://downloads.sourceforge.net/xine/xine-lib-1.1.0.tar.gz]
+md5=3537cfd58d253b4be20a4975e7086e38
+sha256=795085a067b3a11c1b3de48b4d07b01d8ffb6123bd188a73cb53b0605f875c64
+
[http://downloads.sourceforge.net/xine/xine-lib-1.1.16.tar.bz2]
md5=acd1a210c5a6444e8fd44696469352bb
sha256=27df9c8f962797b235d69154705cfdf18d3e325f028f54e3e804f6dadb8237be
+[http://downloads.sourceforge.net/xine/xine-lib-1.1.16.3.tar.bz2]
+md5=4f508abf088cf427a731f85634c8260d
+sha256=d25a241efa55dc7d8f482336efa8bb7b9bb9d69b6df8a8a37f2660948fd67b52
+
[http://folks.o-hand.com/dodji/0xdeadbabe/xine.tgz]
md5=8b78ce490cde6eb3c586656e9bc5ead8
sha256=86402c93b332c44b4e79c568137257d567de1f95cd5f6f6e5433b7e67b40050a
@@ -26566,6 +27246,10 @@ sha256=2f36880bffaee0a5b2b704376a02b22066b6842445e1d77da698854e5973eb21
md5=308971036e25250e7fe3cccfd5a120f8
sha256=a680174f54be7763819e5275c5d5d44fc9e9b6f8e9351dd45c150eb4c182d5bb
+[http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.6.1.tar.bz2]
+md5=ed0878bf32a24d4948c3b8a122a39eff
+sha256=0edbaa994797cb7944a4129d33b634ad99164b21ec32355d56996a178d38bfcf
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/xserver/xorg-server-X11R7.0-1.0.1.tar.bz2]
md5=0e7527480fb845a3c2e333bd0f47ff50
sha256=0419124e1bab473f8f9e2d7de1dba8bae2ed1375b72d55cdfb9471dac357ed47
@@ -26702,6 +27386,10 @@ sha256=bec5a98bbea56da069785784116261ec956df039fb07d0cdca53ae1ed03ebc0f
md5=7d26f45dca52632712a696e0631dc17b
sha256=6f6328922d69f5de29513a5baf1d010db2a7a54cb58a7a6cbbb1b25097ecd592
+[http://xorg.freedesktop.org/releases/individual/proto/xproto-7.0.15.tar.bz2]
+md5=1a2b31430d04340be2e49e8b6445e076
+sha256=fd8cd0bc3e94d7416e6af9eddfa909b0e64246e0d2bb41c00f4e02bd85c76bee
+
[http://xorg.freedesktop.org/releases/development/X11R7.2-RC3/proto/xproto-7.0.9.tar.gz]
md5=937c572775ff4a2edfbbf5568dc0e959
sha256=e68db1c55c1c6d398098d69096b3c3b35863b5d25ef216cb2d1d4364ab0000af
@@ -26842,6 +27530,10 @@ sha256=70a767f1109bf70353c58b0fb54626a1300fd0724017196bfd17d13a582ddd62
md5=6d7aaa9c267427ddb78faf008cf78187
sha256=8109646b77c08a0f269531ad42475782101a88681c2590453f4a5c9fe4681932
+[http://gpe.linuxtogo.org/download/source/xserver-common-1.25.tar.gz]
+md5=95faf3cc8c0a70352e9580fc873ca693
+sha256=f0391d08a6763598066e21d83460493973fe24fc65e3f0d2b534ef2497946a34
+
[http://gpe.linuxtogo.org/download/source/xserver-common-1.3.tar.gz]
md5=b55e9347b9aed725cc7baf91701cdd83
sha256=177b5a3e65d7a64b5a0fbbf1b10f8e3d020a20c823b1bb9f3269dc835df213e1
@@ -26966,6 +27658,10 @@ sha256=16bc4646f105efd3d0dd105899ac19035d67acf50950ca8c70cf68772508272d
md5=96e142331edd498a9364887b2548f1bb
sha256=9ff21a8d9ea524ca9b7cb6d6b4d522b4cb20b1c35edeb8995a9e9265a0df64bd
+[http://xorg.freedesktop.org/releases/individual/lib/xtrans-1.2.3.tar.bz2]
+md5=f9cf791dfad59cf044e276aab3a71e1d
+sha256=a67a8b09d9530021e2bd4b93136f385e72a8d8e4f2c26a99aeb169bee88facf0
+
[http://xorg.freedesktop.org/releases/individual/lib/xtrans-1.2.tar.bz2]
md5=a91fef8b932b21992af7dfff7b2643f3
sha256=d6c3cabd5ecd0183a8a9bc6b3471545df8e2c78956b4c4cfd48f0c545a88c9a4
@@ -27142,6 +27838,10 @@ sha256=f849da3eec59b22599a806d59e81729ba9234fc2318335804d45d9dce23fb532
md5=2caa84539d463743bbcbfb41b9ac6861
sha256=e145638ab4b0f267075b82db5ab9f7170ae2abf1fa1212d5175c31fe4bd28477
+[http://downloads.sourceforge.net/zbar/zbar-0.8.tar.bz2]
+md5=b5b0efd92af16230ce9952e7a9a671fd
+sha256=5415ffde882c7f7acee58e8a36aa65e732cfcfbbb582669480d6cf9549edfbbc
+
[http://downloads.sourceforge.net/bedic/zbedic_1.0-0.tgz]
md5=96eb282a1a3e4fea69b94f1db069f4e9
sha256=f218b25c4be2261c49b9c9e1f10c93b64eaf6132ace6bc4052cf0489e3ac56e8
@@ -27198,6 +27898,14 @@ sha256=78b013e2e0bb4c1af1adbd7acca4299cd3d83e96d8da2731f629f562b5f153a6
md5=791e8986c6e16dcd1c9878126725e06b
sha256=eba57692dadd21df8d4afaea4daf8db5179c7398e11cd019fd462aa6947f4119
+[http://ftp.gnome.org/pub/GNOME/sources/zenity/2.20/zenity-2.20.1.tar.bz2]
+md5=b9989582ea43f8fd58819d85ef9c9bc5
+sha256=cc3b203acbd745a7c3b6ea3d8e74d7fb07cf8f8aa92bcaa3b2edb023dee02a36
+
+[http://ftp.gnome.org/pub/GNOME/sources/zenity/2.26/zenity-2.26.0.tar.bz2]
+md5=6660ce6dac0a6ca495a0e954cb6b40a2
+sha256=fc619215ca90cab48efae7bdf524d1de690b75832f07f3cbcb6d5c3910d402a1
+
[http://www.progsoc.org/~wildfire/zeroconf/download/zeroconf-0.6.1.tar.gz]
md5=31ac40fdaf24b3e666ed83c1320dd7a5
sha256=3e93416ad44202c2952a1342dad12f2ad0e61dd3f1c59110d9ad8cb1d4c639e5
diff --git a/conf/distro/angstrom-2008.1.conf b/conf/distro/angstrom-2008.1.conf
index bb50220f29..f0b8a040ea 100644
--- a/conf/distro/angstrom-2008.1.conf
+++ b/conf/distro/angstrom-2008.1.conf
@@ -18,7 +18,9 @@
#DISTRO_VERSION = "2009.X"
DISTRO_VERSION = "2009.X-test-${DATE}"
DISTRO_REVISION = "2"
-DISTRO_PR = ".2"
+DISTRO_PR = ".3"
+
+OLDEST_KERNEL ?= "2.6.16"
#build staging from packages
INHERIT += "packaged-staging"
@@ -71,8 +73,8 @@ PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh20"
PREFERRED_VERSION_linux-libc-headers = "2.6.23"
#Prefer glibc 2.6 and uclibc 0.9.30, these have had the most testing.
-PREFERRED_VERSION_glibc ?= "2.6.1"
-PREFERRED_VERSION_glibc-initial ?= "2.6.1"
+PREFERRED_VERSION_glibc ?= "2.9"
+PREFERRED_VERSION_glibc-initial ?= "2.9"
PREFERRED_VERSION_uclibc ?= "0.9.30"
PREFERRED_VERSION_uclibc-initial ?= "0.9.30"
@@ -87,10 +89,6 @@ PREFERRED_PROVIDER_virtual/psplash ?= "psplash-angstrom"
PREFERRED_PROVIDER_avahi = "avahi"
-#Small machines prefer kdrive, but we might ship full Xorg in other images
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-kdrive"
-PREFERRED_PROVIDER_xserver ?= "xserver-kdrive"
-
#powerpc needs additional patches to gcc
ANGSTROM_GCC_VERSION_ppc405 ?= "4.1.1"
ANGSTROM_GCC_VERSION_xilinx-ml403 ?= "4.1.1"
@@ -121,11 +119,6 @@ PREFERRED_VERSION_gcc-cross-sdk ?= "${ANGSTROM_GCC_VERSION}"
PREFERRED_VERSION_gcc-cross-initial ?= "${ANGSTROM_GCC_VERSION}"
PREFERRED_VERSION_gcc-cross-intermediate ?= "${ANGSTROM_GCC_VERSION}"
-#Loads preferred versions from files, these have weak assigments (?=), so put them at the bottom
-require conf/distro/include/preferred-e-versions.inc
-require conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc
-require conf/distro/include/preferred-xorg-versions-X11R7.4.inc
-
#avr32 only has patches for binutils 2.17 in OE
PREFERRED_VERSION_binutils_avr32 = "2.17"
PREFERRED_VERSION_binutils-cross_avr32 = "2.17"
@@ -147,7 +140,6 @@ PREFERRED_PROVIDER_virtual/db ?= "db"
PREFERRED_PROVIDER_virtual/db-native ?= "db-native"
PREFERRED_PROVIDER_virtual/libsdl ?= "libsdl-x11"
PREFERRED_PROVIDER_virtual/libx11 ?= "libx11"
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-kdrive"
# Others:
PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"
@@ -196,6 +188,11 @@ require conf/distro/include/angstrom${ARM_ABI}.inc
# We also take this opportunity to inject angstrom-version and the feed configs into the rootfs
IPKG_VARIANT = "opkg-nogpg angstrom-version ${ANGSTROM_FEED_CONFIGS}"
+# Select xserver-xorg as default, since kdrive has been EOL'ed
+XSERVER ?= "xserver-xorg xf86-input-evdev xf86-input-keyboard xf86-input-mouse xf86-video-fbdev"
+PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
+PREFERRED_PROVIDER_xserver ?= "xserver-xorg"
+
# do some task-base stuff here
# Prefer bluez4, it's needed for things like connman. Bluez4 is also largely backward compatible with
diff --git a/conf/distro/include/angstrom-2008-preferred-versions.inc b/conf/distro/include/angstrom-2008-preferred-versions.inc
index a11c1d5691..28de7667d5 100644
--- a/conf/distro/include/angstrom-2008-preferred-versions.inc
+++ b/conf/distro/include/angstrom-2008-preferred-versions.inc
@@ -1,3 +1,5 @@
+PREFERRED_VERSION_autoconf = "2.63"
+PREFERRED_VERSION_autoconf-native = "2.63"
PREFERRED_VERSION_automake-native = "1.10.2"
PREFERRED_VERSION_busybox = "1.13.2"
PREFERRED_VERSION_cairo = "1.8.0"
@@ -11,6 +13,7 @@ PREFERRED_VERSION_glproto = "1.4.9"
PREFERRED_VERSION_gst-pulse = "0.9.7"
PREFERRED_VERSION_gtk+ = "2.16.0"
PREFERRED_VERSION_gtkmm = "2.14.1"
+PREFERRED_VERSION_hal = "0.5.12"
PREFERRED_VERSION_libgemwidget = "1.0"
PREFERRED_VERSION_libgpephone = "0.4"
PREFERRED_VERSION_libsdl-x11 = "1.2.11"
@@ -18,12 +21,40 @@ PREFERRED_VERSION_libtool = "2.2.4"
PREFERRED_VERSION_libtool-native = "2.2.4"
PREFERRED_VERSION_libtool-cross = "2.2.4"
PREFERRED_VERSION_libtool-sdk = "2.2.4"
-PREFERRED_VERSION_pango = "1.22.0"
+PREFERRED_VERSION_libx11 = "1.2"
+PREFERRED_VERSION_mesa = "7.2"
+PREFERRED_VERSION_pango = "1.24.2"
PREFERRED_VERSION_pixman = "0.13.2"
PREFERRED_VERSION_pkgconfig = "0.23"
PREFERRED_VERSION_pkgconfig-native = "0.23"
-PREFERRED_VERSION_pulseaudio = "0.9.10"
+PREFERRED_VERSION_pulseaudio = "0.9.15"
+PREFERRED_VERSION_samba = "3.3.0"
PREFERRED_VERSION_tiff = "3.8.2+4.0.0beta2"
-PREFERRED_VERSION_udev = "124"
+
+PREFERRED_VERSION_udev = "141"
+UDEV_GE_141 = "1"
+
+PREFERRED_VERSION_usbutils = "0.82"
+PREFERRED_VERSION_util-macros-native = "1.2.1"
+PREFERRED_VERSION_util-macros = "1.2.1"
PREFERRED_VERSION_wpa-supplicant = "0.6.7"
PREFERRED_VERSION_xserver-kdrive = "1.4.0.90"
+PREFERRED_VERSION_xserver-xorg = "1.6.1"
+
+#
+# meta-moblin package SRCREVs
+#
+SRCREV_pn-bickley ?= "de9431b7c6040bc3731157c05947159ad2c7a0a9"
+SRCREV_pn-json-glib ?= "930fdf4c4dff1f5310a946c2a9f5b6860f7c8ba8"
+SRCREV_pn-libccss ?= "92bc59e1d39302c8be500d53cb5dd8b05c2e4a15"
+SRCREV_pn-libgdbus ?= "aeab6e3c0185b271ca343b439470491b99cc587f"
+SRCREV_pn-librest ?= "14d35103d9649dc1e10c3e9ac2c690b3165c8184"
+SRCREV_pn-moblin-menus ?= "e1d63681739dd16195d005b3cf15752df294bd3c"
+SRCREV_pn-mojito ?= "0542c4b0e26c0e3b69c5ad1fa1898dc276fb9f48"
+SRCREV_pn-mozilla-headless-services ?= "c7873654894af6c7c6c01194d6185db46667b81f"
+SRCREV_pn-mutter ?= "aff4cf110307e149d3497d20543cde27b9699758"
+SRCREV_pn-twitter-glib ?= "849bec29292df88590e0b2898b50b9b8d766817e"
+SRCREV_pn-xf86-video-psb ?= "b6b3bba06fe5a3fe0b1bd6e31a7369dd83812bab"
+
+
+
diff --git a/conf/distro/include/angstrom-eglibc.inc b/conf/distro/include/angstrom-eglibc.inc
index 655cf9d50e..92e22332b7 100644
--- a/conf/distro/include/angstrom-eglibc.inc
+++ b/conf/distro/include/angstrom-eglibc.inc
@@ -10,11 +10,11 @@ TARGET_OS = "linux${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm'
# perl has some problems, see http://bugs.openembedded.net/show_bug.cgi?id=1616
# [23:00] oxo: glibc (any version) on sparc does not like (repeat me) "-Os"
-FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
+FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb3"
FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1"
FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
-BUILD_OPTIMIZATION = "-Os"
+BUILD_OPTIMIZATION = "-O2 -ggdb3"
BUILD_OPTIMIZATION_pn-perl = "-O1"
BUILD_OPTIMIZATION_sparc = "-O2"
diff --git a/conf/distro/include/angstrom-glibc.inc b/conf/distro/include/angstrom-glibc.inc
index 5df77d8c74..1f0967a42e 100644
--- a/conf/distro/include/angstrom-glibc.inc
+++ b/conf/distro/include/angstrom-glibc.inc
@@ -10,16 +10,18 @@ TARGET_OS = "linux${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm'
# perl has some problems, see http://bugs.openembedded.net/show_bug.cgi?id=1616
# [23:00] oxo: glibc (any version) on sparc does not like (repeat me) "-Os"
-FULL_OPTIMIZATION = "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2"
+FULL_OPTIMIZATION = "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb3"
FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1"
FULL_OPTIMIZATION_pn-glibc = "-fexpensive-optimizations -fomit-frame-pointer -O2"
FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
+FULL_OPTIMIZATION_ep9312 = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O -fno-signed-zeros"
-BUILD_OPTIMIZATION = "-O2"
+BUILD_OPTIMIZATION = "-O2 -ggdb3"
BUILD_OPTIMIZATION_pn-perl = "-O1"
BUILD_OPTIMIZATION_pn-glibc = "-O2"
BUILD_OPTIMIZATION_sparc = "-O2"
+BUILD_OPTIMIZATION_ep9312 = "-O"
TARGET_LINK_HASH_STYLE = "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH',d,1) in ['mips', 'mipsel']]}"
diff --git a/conf/distro/include/angstrom-uclibc.inc b/conf/distro/include/angstrom-uclibc.inc
index 3079e0d365..a60952ff06 100644
--- a/conf/distro/include/angstrom-uclibc.inc
+++ b/conf/distro/include/angstrom-uclibc.inc
@@ -14,8 +14,8 @@ TARGET_OS = "${@['${TARGET_OS_UC}', 'uclinux-uclibc'][bb.data.getVar('TARGET_ARC
#mess with compiler flags to use -Os instead of -O2
#Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info
-FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
-BUILD_OPTIMIZATION = "-Os"
+FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb3"
+BUILD_OPTIMIZATION = "-O2 -ggdb3"
#Gcc will die with 'internal consistency error when using the above optimizations
#with gcc-4.2.1-atmel.1.0.3 (and probably most other avr32 gcc ports).
diff --git a/conf/distro/include/angstrom-uclinux-uclibc.inc b/conf/distro/include/angstrom-uclinux-uclibc.inc
index c3f908c2c4..019f814b8f 100644
--- a/conf/distro/include/angstrom-uclinux-uclibc.inc
+++ b/conf/distro/include/angstrom-uclinux-uclibc.inc
@@ -10,8 +10,8 @@ TARGET_OS_UC = "uclinux${@['-uclibc','-uclibcgnueabi'][bb.data.getVar('TARGET_AR
#mess with compiler flags to use -Os instead of -O2
#Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info
-FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
-BUILD_OPTIMIZATION = "-Os"
+FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb3"
+BUILD_OPTIMIZATION = "-O2 -ggdb3"
#Gcc will die with 'internal consistency error when using the above optimizations
FULL_OPTIMIZATION_avr32 = ""
diff --git a/conf/distro/include/angstrom.inc b/conf/distro/include/angstrom.inc
index 7e921bf06a..525f949331 100644
--- a/conf/distro/include/angstrom.inc
+++ b/conf/distro/include/angstrom.inc
@@ -7,6 +7,8 @@ USERDISTRO := "${DISTRO}"
DISTRO = "angstrom"
DISTRO_NAME = "Angstrom"
+BUILDNAME = "Angstrom ${DISTRO_VERSION}"
+
TARGET_VENDOR = "-angstrom"
# Add FEED_ARCH to overrides
@@ -54,7 +56,7 @@ THUMB_INTERWORK = "yes"
#Use this variable in feeds and other parts that need a URI
ANGSTROM_URI ?= "http://www.angstrom-distribution.org"
-#Use this variable to select which recipe you want to use to get feed configs (/etc/ipkg/*, /etc/apt/sources.list)
+#Use this variable to select which recipe you want to use to get feed configs (/etc/ipkg/, /etc/apt/sources.list)
# usefull for derivative distros and local testing
# As this is runtime we can't and won't use virtual/feed-configs
ANGSTROM_FEED_CONFIGS ?= "angstrom-feed-configs"
@@ -78,6 +80,9 @@ INHERIT += "angstrom-mirrors"
INHERIT += "insane"
QA_LOG = "1"
+#run QA tests on recipes
+INHERIT += "recipe_sanity"
+
#save statistical info on images
INHERIT += "testlab"
@@ -99,10 +104,8 @@ ENABLE_BINARY_LOCALE_GENERATION ?= "1"
# We only want to build UTF8 locales
LOCALE_UTF8_ONLY = "1"
-#qemu doesn't like armv6/eabi/vfp
-ENABLE_BINARY_LOCALE_GENERATION_armv6 = "0"
-ENABLE_BINARY_LOCALE_GENERATION_armv6-novfp = "0"
-ENABLE_BINARY_LOCALE_GENERATION_armv7a = "0"
+#qemu doesn't like this fp
+ENABLE_BINARY_LOCALE_GENERATION_ep9312 = "0"
#qemu has taken a dislike to armeb as well
ENABLE_BINARY_LOCALE_GENERATION_armeb = "0"
@@ -193,7 +196,7 @@ SEPPUKU_AUTOBUILD = "1"
SEPPUKU_PRODUCT = "Openembedded"
SEPPUKU_COMPONENT = "org.openembedded.dev"
-OESTATS_SERVER ?= "tinderbox.openembedded.net"
+OESTATS_SERVER ?= "tinderbox.openembedded.org"
diff --git a/conf/distro/include/eglibc.inc b/conf/distro/include/eglibc.inc
index 0d2087ed4b..04431403e2 100644
--- a/conf/distro/include/eglibc.inc
+++ b/conf/distro/include/eglibc.inc
@@ -7,3 +7,14 @@ PREFERRED_PROVIDER_virtual/libintl ?= "eglibc"
PREFERRED_PROVIDER_virtual/libc = "eglibc"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "eglibc-initial"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "eglibc"
+
+# eglibc is configured for OLDEST_KERNEL kernel version, so we set minimal
+# sane versions there
+
+OLDEST_KERNEL ?= "2.4.0"
+
+# ARM OABI is fine with 2.4.0, EABI is not, so we override on "-gnueabi"
+# TARGET_OS here, not on architecture which is 'arm' in both cases
+OLDEST_KERNEL_linux-gnueabi ?= "2.6.16"
+OLDEST_KERNEL_sparc64 ?= "2.4.21"
+OLDEST_KERNEL_ppc64 ?= "2.4.21"
diff --git a/conf/distro/include/glibc.inc b/conf/distro/include/glibc.inc
index f9140ffa43..2cb6502322 100644
--- a/conf/distro/include/glibc.inc
+++ b/conf/distro/include/glibc.inc
@@ -7,3 +7,14 @@ PREFERRED_PROVIDER_virtual/libintl ?= "glibc"
PREFERRED_PROVIDER_virtual/libc = "glibc"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "glibc-initial"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "glibc"
+
+# glibc is configured for OLDEST_KERNEL kernel version, so we set minimal
+# sane versions there
+
+OLDEST_KERNEL ?= "2.4.0"
+
+# ARM OABI is fine with 2.4.0, EABI is not, so we override on "-gnueabi"
+# TARGET_OS here, not on architecture which is 'arm' in both cases
+OLDEST_KERNEL_linux-gnueabi ?= "2.6.14"
+OLDEST_KERNEL_sparc64 ?= "2.4.21"
+OLDEST_KERNEL_ppc64 ?= "2.4.21"
diff --git a/conf/distro/include/preferred-om-2008-versions.inc b/conf/distro/include/preferred-om-2008-versions.inc
index 8c5c4f7cb0..65676ec969 100644
--- a/conf/distro/include/preferred-om-2008-versions.inc
+++ b/conf/distro/include/preferred-om-2008-versions.inc
@@ -503,7 +503,7 @@ PREFERRED_VERSION_gnome-vfs ?= "2.22.0"
PREFERRED_VERSION_gnome-vfs-extras ?= "0.99.13"
PREFERRED_VERSION_gnome-vfs-obexftp ?= "0.4"
PREFERRED_VERSION_gnuchess ?= "5.05"
-PREFERRED_VERSION_gnumeric ?= "1.6.3"
+PREFERRED_VERSION_gnumeric ?= "1.8.4"
PREFERRED_VERSION_gnupg ?= "1.4.2.2"
PREFERRED_VERSION_gnuplot ?= "4.2.2"
PREFERRED_VERSION_gnuradio ?= "3.0.4"
diff --git a/conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc b/conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc
index 1f6076525f..6e42065aed 100644
--- a/conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc
+++ b/conf/distro/include/preferred-xorg-versions-X11R7.4-updates.inc
@@ -2,6 +2,6 @@
PREFERRED_VERSION_xserver-xorg ?= "1.5.3"
PREFERRED_VERSION_xf86-input-evdev ?= "2.1.0"
-PREFERRED_VERSION_xf86-video-geode ?= "2.11.0"
+PREFERRED_VERSION_xf86-video-geode ?= "2.11.2"
PREFERRED_VERSION_libxi ?= "1.2.0"
PREFERRED_VERSION_inputproto ?= "1.5.0"
diff --git a/conf/distro/include/preferred-xorg-versions-X11R7.4.inc b/conf/distro/include/preferred-xorg-versions-X11R7.4.inc
index 46fa8d496a..21f9758f0e 100644
--- a/conf/distro/include/preferred-xorg-versions-X11R7.4.inc
+++ b/conf/distro/include/preferred-xorg-versions-X11R7.4.inc
@@ -195,6 +195,7 @@ PREFERRED_VERSION_xtrans ?= "1.2.1"
# This should be here but is needed until bitbake can do
# versioned depends
PREFERRED_VERSION_mesa ?= "7.2"
+PREFERRED_VERSION_xtrans-native ?= "1.2.1"
# proto
PREFERRED_VERSION_applewmproto ?= "1.0.3"
@@ -218,6 +219,7 @@ PREFERRED_VERSION_videoproto ?= "2.2.2"
PREFERRED_VERSION_windowswmproto ?= "1.0.3"
PREFERRED_VERSION_xmiscproto ?= "1.1.2"
PREFERRED_VERSION_xextproto ?= "7.0.3"
+PREFERRED_VERSION_xextproto-native ?= "7.0.3"
PREFERRED_VERSION_xf86dgaproto ?= "2.0.3"
PREFERRED_VERSION_xf86driproto ?= "2.0.4"
PREFERRED_VERSION_xf86miscproto ?= "0.9.2"
diff --git a/conf/distro/include/sane-srcdates.inc b/conf/distro/include/sane-srcdates.inc
index 1be3dabc2b..422145c8c2 100644
--- a/conf/distro/include/sane-srcdates.inc
+++ b/conf/distro/include/sane-srcdates.inc
@@ -9,9 +9,9 @@ SRCDATE_prism54-module ?= "20060814"
SRCDATE_aufs ?= "20081203"
SRCDATE_avetanabt ?= "20060814"
SRCDATE_bl ?= "20060814"
-SRCDATE_dvbstream ?= "20060814"
-SRCDATE_dvbtraffic ?= "20060814"
-SRCDATE_dvbtune ?= "20060814"
+SRCDATE_dvbstream ?= "20090621"
+SRCDATE_dvbtraffic ?= "20090621"
+SRCDATE_dvbtune ?= "20090621"
SRCDATE_fdclock ?= "20060814"
SRCDATE_fltk ?= "20060814"
SRCDATE_gnuplot ?= "20080328"
@@ -46,8 +46,8 @@ SRCDATE_waimea ?= "20060814"
SRCDATE_xcompmgr ?= "20060814"
SRCDATE_xirssi ?= "20060814"
SRCDATE_xsvg ?= "20060814"
-SRCDATE_yamonenv ?= "20060814"
-SRCDATE_zaurusd ?= "20060628"
+SRCDATE_yamonenv ?= "20051022"
+SRCDATE_zaurusd ?= "20090501"
# Freedesktop.org
SRCDATE_poppler0.6 = "20070708"
diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-srcrevs.inc
index 1f97381738..470bace2b8 100644
--- a/conf/distro/include/sane-srcrevs.inc
+++ b/conf/distro/include/sane-srcrevs.inc
@@ -13,12 +13,13 @@
SRCREV_pn-accelges ?= "206"
SRCREV_pn-aircrack-ng ?= "802"
-SRCREV_pn-alsa-scenario ?= "633aaccc37f845146e490090dbd2a1ebb8064fd6"
+SRCREV_pn-alsa-scenario ?= "8bd7f83d847424eb44704cf1649974b2fda8d8f1"
SRCREV_pn-app-restarter ?= "4552"
SRCREV_pn-assassin ?= "268"
SRCREV_pn-assassin-thumbnail ?= "4690"
SRCREV_pn-bfin-uclibc ?= "1857"
SRCREV_pn-bootchart-lite ?= "4"
+SRCREV_pn-bubble-keyboard ?= "194"
SRCREV_pn-calibrateproto ?= "1da6fd1e2c7a49648245c98481fabea8b9690a8c"
SRCREV_pn-clutter-box2d ?= "3197"
SRCREV_pn-clutter-cairo ?= "3210"
@@ -42,7 +43,7 @@ SRCREV_pn-eds-dbus ?= "736"
SRCREV_pn-eglibc ?= "8139"
SRCREV_pn-eglibc-initial ?= "8139"
SRCREV_pn-enlazar ?= "37"
-SRCREV_pn-essential-dialer ?= "111"
+SRCREV_pn-essential-dialer ?= "194"
SRCREV_pn-exalt ?= "79"
SRCREV_pn-exalt-daemon ?= "78"
SRCREV_pn-exalt-module ?= "78"
@@ -74,22 +75,26 @@ SRCREV_pn-gcc-cross-initial ?= ${GCCREV}
SRCREV_pn-gcc-cross-intermediate ?= ${GCCREV}
SRCREV_pn-gcc-cross-sdk ?= ${GCCREV}
SRCREV_pn-gconf-dbus ?= "641"
+SRCREV_pn-gnet ?= "495"
SRCREV_pn-gnuradio ?= "10302"
SRCREV_pn-gpe-conf ?= "9900"
SRCREV_pn-gpe-contacts ?= "9312"
SRCREV_pn-gpe-gallery ?= "9376"
+SRCREV_pn-gpe-mini-browser2 ?= "9900"
SRCREV_pn-gpe-sketchbook ?= "9547"
+SRCREV_pn-gridpad ?= "194"
SRCREV_pn-gsmd2 ?= "963f34df8fa3ff4b301079dcf86e9acea6b6fe0f"
SRCREV_pn-gtkhtml2 ?= "1158"
SRCREV_pn-gypsy ?= "134"
SRCREV_pn-hildon-1 ?= "14429"
SRCREV_pn-illume-theme-asu ?= "4881"
SRCREV_pn-illume-theme-freesmartphone ?= "b1b0f6adc59e6f72a3929771058e3750bf181bc5"
+SRCREV_pn-intuition ?= "194"
SRCREV_pn-kismet ?= "2285"
SRCREV_pn-kismet-newcore ?= "2285"
SRCREV_pn-libcalenabler2 ?= "1410"
SRCREV_pn-libeflvala ?= "676c901eb57f653231fb4c9eeabc2ed3d1b0c072"
-SRCREV_pn-libefso ?= "111"
+SRCREV_pn-libefso ?= "194"
SRCREV_pn-libexalt ?= "78"
SRCREV_pn-libexalt-dbus ?= "76"
SRCREV_pn-libfakekey ?= "1455"
@@ -99,7 +104,7 @@ SRCREV_pn-libgsm0710 ?= "50079c58e6f4a21edd6ab33ef2365abb1f5441d2"
SRCREV_pn-libgsm0710mux ?= "114044266a094c61a2c25ee5a823635ae50a4e89"
SRCREV_pn-libgsmd ?= "4505"
SRCREV_pn-libiac ?= "1590"
-SRCREV_pn-libjana ?= "713"
+SRCREV_pn-libjana = "749"
SRCREV_pn-libmokogsmd2 ?= "4334"
SRCREV_pn-libmokojournal2 ?= "3473"
SRCREV_pn-libmokopanelui2 ?= "4568"
@@ -131,7 +136,7 @@ SRCREV_pn-matchbox-panel-2 ?= "1626"
SRCREV_pn-matchbox-stroke ?= "1820"
SRCREV_pn-mickeydbus ?= "f894801916cc4d0e912e4553490dc215276c52a9"
SRCREV_pn-mickeyterm ?= "f894801916cc4d0e912e4553490dc215276c52a9"
-SRCREV_pn-midori ?= "f30dff433056e239ca775d16f343bdb249f1a338"
+SRCREV_pn-midori ?= "3179a538a947cbd7612cac346e3e0c7c3d0e03cd"
SRCREV_pn-moblin-proto ?= "8f2cb524fe06555182c25b4ba3202d7b368ac0ce"
SRCREV_pn-moko-gtk-engine ?= "4734"
SRCREV_pn-mokoko ?= "127"
@@ -219,7 +224,7 @@ SRCREV_pn-python-pycrypto ?= "d087280d7e9643a3e3f68f209932119fe6738b3c"
SRCREV_pn-python-pyrtc ?= "eb39ce7fb81bfa64e1a9eb5f142ca3d1065be3fa"
SRCREV_pn-python-pyyaml ?= "344"
QEMUSRCREV ?= "4242"
-SRCREV_pn-tslib ?= "53"
+SRCREV_pn-tslib ?= "77"
SRCREV_pn-qemu-native ?= "${QEMUSRCREV}"
SRCREV_pn-qemu-sdk ?= "${QEMUSRCREV}"
SRCREV_pn-qemu ?= "${QEMUSRCREV}"
@@ -249,7 +254,7 @@ SRCREV_pn-usbpath-native ?= "3172"
SRCREV-pn-vala-dbus-binding-tool-native ?= "55a6bc5dd032731d89c238d274b2898ef02d12f8"
SRCREV_pn-vala-terminal ?= "94117f453ce884e9c30b611fae6fc19f85f98f2b"
SRCREV_pn-vala-native ?= "6cf030120cd7f6a76a5d766d7420aea847e02cfd"
-SRCREV_pn-webkit-gtk ?= "43635"
+SRCREV_pn-webkit-gtk ?= "44532"
SRCREV_pn-wlan-ng-modules ?= "1859"
SRCREV_pn-wlan-ng-utils ?= "1859"
SRCREV_pn-wmiconfig ?= "4522"
@@ -261,7 +266,7 @@ SRCREV_pn-zhone ?= "f38cc52fbf11f7fe945797a6b8ade29ed479d924"
# Enlightenment Foundation Libraries
# Caution: This is not alphabetically, but (roughly) dependency-sorted.
# Please leave it like that.
-EFL_SRCREV ?= "40247"
+EFL_SRCREV ?= "41038"
SRCREV_pn-edb-native ?= "${EFL_SRCREV}"
SRCREV_pn-edb ?= "${EFL_SRCREV}"
SRCREV_pn-eina-native ?= "${EFL_SRCREV}"
diff --git a/conf/distro/include/sane-toolchain-eglibc.inc b/conf/distro/include/sane-toolchain-eglibc.inc
index 1b0d49316d..4c5f44ff8e 100644
--- a/conf/distro/include/sane-toolchain-eglibc.inc
+++ b/conf/distro/include/sane-toolchain-eglibc.inc
@@ -7,7 +7,6 @@ FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-reg
FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1"
FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
-BUILD_OPTIMIZATION = "-Os"
BUILD_OPTIMIZATION_pn-perl = "-O1"
BUILD_OPTIMIZATION_sparc = "-O2"
diff --git a/conf/distro/include/sane-toolchain-glibc.inc b/conf/distro/include/sane-toolchain-glibc.inc
index b4da525fcf..f3da7c31a2 100644
--- a/conf/distro/include/sane-toolchain-glibc.inc
+++ b/conf/distro/include/sane-toolchain-glibc.inc
@@ -15,7 +15,6 @@ FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -fre
FULL_OPTIMIZATION_pn-glibc = "-fexpensive-optimizations -fomit-frame-pointer -O2"
FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
-BUILD_OPTIMIZATION = "-O2"
BUILD_OPTIMIZATION_pn-perl = "-O1"
BUILD_OPTIMIZATION_pn-glibc = "-O2"
BUILD_OPTIMIZATION_sparc = "-O2"
diff --git a/conf/distro/include/sane-toolchain-uclibc.inc b/conf/distro/include/sane-toolchain-uclibc.inc
index 394b52ae75..68e5031efc 100644
--- a/conf/distro/include/sane-toolchain-uclibc.inc
+++ b/conf/distro/include/sane-toolchain-uclibc.inc
@@ -16,7 +16,6 @@ TARGET_OS = "${@['${TARGET_OS_UC}', 'uclinux-uclibc'][bb.data.getVar('TARGET_ARC
#mess with compiler flags to use -Os instead of -O2
#Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
-BUILD_OPTIMIZATION = "-Os"
#Gcc will die with 'internal consistency error when using the above optimizations
#with gcc-4.2.1-atmel.1.0.3 (and probably most other avr32 gcc ports).
diff --git a/conf/distro/kaeilos.conf b/conf/distro/kaeilos.conf
index 718239bed8..b7add998c7 100644
--- a/conf/distro/kaeilos.conf
+++ b/conf/distro/kaeilos.conf
@@ -3,7 +3,7 @@
#@NAME: KaeilOS(R) - http://www.kaeilos.com
#@DESCRIPTION: KaeilOS Linux Distribution for Kernel 2.6 based devices
#@MAINTAINER: Marco Cavallini <m.cavallini@koansoftware.com>
-#@VERSION: 28-04-2009
+#@VERSION: 23-06-2009 - B
#
# Use this at your own risk, we welcome bugreports filed at
# http://bugs.openembedded.net
@@ -12,7 +12,7 @@
#DISTRO_VERSION = "2009.1"
DISTRO_VERSION = "2009.1-test-${DATE}"
DISTRO_REVISION = "1"
-DISTRO_PR = ".1"
+DISTRO_PR = ".2"
#build staging from packages
INHERIT += "packaged-staging"
@@ -42,6 +42,8 @@ DISTRO_TYPE ?= "debug"
# Also, it appears that no locales fit in 16Mb for now. "C" locale rules!
IMAGE_LINGUAS = '${@base_less_or_equal("ROOT_FLASH_SIZE", "16", "", "en-us", d)}'
+# increase inode/block ratio for ext2 filesystem
+EXTRA_IMAGECMD_ext2 = "-i 4096"
# set feed path variables
FEED_BASEPATH = "feeds/2008/${ANGSTROM_PKG_FORMAT}/${LIBC}/"
@@ -128,6 +130,9 @@ PREFERRED_VERSION_binutils_avr32 = "2.17"
PREFERRED_VERSION_binutils-cross_avr32 = "2.17"
PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17"
+#Other packages version
+PREFERRED_VERSION_classpath ?= "0.97.2"
+
# Virtuals:
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial"
@@ -209,12 +214,12 @@ DEBUG_APPS += '${@base_conditional("DISTRO_TYPE", "release", "", "strace procps"
# contains ipkg specific stuff as well :(
DISTRO_EXTRA_RDEPENDS += "\
update-modules \
- ${@base_contains("MACHINE_FEATURES", "screen", "psplash", "",d)} \
kaeilos-version \
opkg-nogpg opkg-collateral ${ANGSTROM_FEED_CONFIGS} \
util-linux-ng-mount util-linux-ng-umount \
${DEBUG_APPS} angstrom-libc-fixup-hack \
"
+# ${@base_contains("MACHINE_FEATURES", "screen", "psplash", "",d)} \
# This also hooks into task-base, but isn't mandatory.
# If you don't want parts of this in your task-base using images you can put this in the image recipe:
@@ -233,5 +238,7 @@ DISTRO_EXTRA_RRECOMMENDS += " \
openssh-sftp-server \
"
+SPLASH ?= "psplash"
+
ARM_INSTRUCTION_SET_pn-uclibc = "arm"
ARM_INSTRUCTION_SET_pn-uclibc-initial = "arm"
diff --git a/conf/distro/micro-uclibc.conf b/conf/distro/micro-uclibc.conf
index 82b78cbf79..f793d4a3c1 100644
--- a/conf/distro/micro-uclibc.conf
+++ b/conf/distro/micro-uclibc.conf
@@ -10,6 +10,9 @@
# Based on the Micro Linux distribution
require conf/distro/micro.conf
+# Use overrides for micro as well
+OVERRIDES .= ":micro"
+
#############################################################################
# DISTRO CONFIGURATION
#############################################################################
@@ -20,11 +23,12 @@ DISTRO_NAME = "micro-uclibc"
#############################################################################
# Use linux uclibc
TARGET_OS = "linux-uclibc"
+TARGET_OS_armeb = "linux-uclibcgnueabi"
#############################################################################
# TOOLCHAIN
#############################################################################
-PREFERRED_LIBC = "uclibc"
+LIBC = "uclibc"
#############################################################################
# PREFERRED PROVIDERS
@@ -34,6 +38,7 @@ PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "uclibc"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross"
PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"
PREFERRED_PROVIDER_virtual/libintl = "proxy-libintl"
+PREFERRED_PROVIDER_virtual/libiconv = "libiconv"
#############################################################################
# PREFERRED VERSIONS
diff --git a/conf/distro/micro.conf b/conf/distro/micro.conf
index bf4e5e1a82..c566d7502d 100644
--- a/conf/distro/micro.conf
+++ b/conf/distro/micro.conf
@@ -47,11 +47,11 @@ require conf/distro/include/sane-feed-${PREFERRED_PKG_FORMAT}.inc
# IMAGES
#############################################################################
# Name generated images
-IMAGE_NAME = "${DISTRO_NAME}-${IMAGE_BASENAME}-${PREFERRED_LIBC}-\
+IMAGE_NAME = "${DISTRO_NAME}-${IMAGE_BASENAME}-${LIBC}-\
${PREFERRED_PKG_FORMAT}-${DISTRO_VERSION}-${MACHINE}"
-CACHE ?= "${TMPDIR}/cache/${PREFERRED_LIBC}/${MACHINE}"
-DEPLOY_DIR ?= "${TMPDIR}/deploy/${PREFERRED_LIBC}"
+CACHE ?= "${TMPDIR}/cache/${LIBC}/${MACHINE}"
+DEPLOY_DIR ?= "${TMPDIR}/deploy/${LIBC}"
DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
# Image output types
@@ -66,7 +66,7 @@ MACHINE_KERNEL_VERSION = "2.6"
#############################################################################
# TOOLCHAIN
#############################################################################
-PREFERRED_LIBC = "glibc"
+LIBC = "glibc"
require conf/distro/include/sane-toolchain.inc
#############################################################################
@@ -98,3 +98,16 @@ USE_NLS_gcc-cross = "no"
# Disable binary locale generation
ENABLE_BINARY_LOCALE_GENERATION = "0"
+# Don't install useless symlinks to libraries
+PACKAGE_SNAP_LIB_SYMLINKS = "1"
+
+# Collapse /usr into /
+layout_prefix = ""
+layout_exec_prefix = ""
+
+# Don't install ldconfig and associated gubbins
+USE_LDCONFIG = "0"
+
+# Disable online package management
+ONLINE_PACKAGE_MANAGEMENT = "none"
+
diff --git a/conf/distro/minimal.conf b/conf/distro/minimal.conf
index f1f04e5e6a..8b834d0f4a 100644
--- a/conf/distro/minimal.conf
+++ b/conf/distro/minimal.conf
@@ -13,7 +13,7 @@
DISTRO_NAME ?= "minimal"
DISTRO_VERSION = ".dev-snapshot-${SRCDATE}"
#DISTRO_TYPE = "release"
-DISTRO_TYPE = "debug"
+DISTRO_TYPE ?= "debug"
# Ensure some form of release config, so error out if someone thinks he knows better
DISTRO_CHECK := "${@bb.data.getVar("DISTRO_VERSION",d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION")
@@ -24,7 +24,7 @@ DISTRO_CHECK := "${@bb.data.getVar("DISTRO_VERSION",d,1) or bb.fatal('Remove thi
# Use bluetooth 4.0
DISTRO_BLUETOOTH_MANAGER = "bluez4"
# We want images supporting the following features (for task-base)
-DISTRO_FEATURES = "nfs smbfs wifi ppp alsa bluetooth ext2 vfat pcmcia usbgadget usbhost pci"
+DISTRO_FEATURES = "nfs smbfs wifi ppp alsa ext2 vfat pcmcia usbgadget usbhost pci"
#############################################################################
# LIBRARY NAMES
@@ -61,6 +61,9 @@ CACHE ?= "${TMPDIR}/cache/${LIBC}/${MACHINE}"
DEPLOY_DIR ?= "${TMPDIR}/deploy/${LIBC}"
DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
+# increase inode/block ratio for ext2 filesystem
+EXTRA_IMAGECMD_ext2 = "-i 8192"
+
#############################################################################
# KERNEL
#############################################################################
diff --git a/conf/distro/nylon.conf b/conf/distro/nylon.conf
index 3670f725de..99cab2bcbb 100644
--- a/conf/distro/nylon.conf
+++ b/conf/distro/nylon.conf
@@ -1,40 +1,73 @@
+#############################################################################
#@TYPE: Distribution
#@NAME: Nylon Linux
#@DESCRIPTION: Distribution configuration for Nylon Mesh Linux distribution
+#############################################################################
-# this distribution is mainly for wireless networking devices and includes
-# packages necessary for wireless LAN access point, routing, encryption and
-# especially mesh routing applications
-#
-# it is primarily aimed at the 4G Systems MeshCube (mtx-1) and other
-# mipsel based platforms
-#
-# Bruno Randolf <bruno.randolf@4g-systems.biz>
+require conf/distro/angstrom-2008.1.conf
-TARGET_OS = "linux"
+#############################################################################
+# NAME and VERSION
+#############################################################################
+DISTRO_NAME = "nylon"
+DISTRO = ${DISTRO_NAME}
+DISTRO_VERSION = "${NYLON_VERSION}"
+BUILDNAME := "${NYLON_VERSION}"
+#DISTRO_TYPE = "release"
+DISTRO_TYPE = "debug"
+TARGET_FPU = "soft"
+SRCDATE := "20050527"
+TARGET_VENDOR = "-nylon"
+
+# Ensure some form of release config, so error out if someone thinks he knows better
+DISTRO_CHECK := "${@bb.data.getVar("DISTRO_VERSION",d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION")
+
+#############################################################################
+# PACKAGING
+#############################################################################
+# Chose the packaging system
+INHERIT += "nylon-mirrors"
+IMAGE_FSTYPES ?= "tar.gz jffs2"
+
+#############################################################################
+# IMAGES
+#############################################################################
+# Name the generated images in a sane way
+IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}_${BUILDNAME}"
+KERNEL_IMAGE_NAME = "kernel-${KERNEL_VERSION}-${MACHINE}_${BUILDNAME}"
-INHERIT += "package_ipk debian nylon-mirrors"
-INHERIT += "linux-kernel-base"
+#############################################################################
+# KERNEL
+#############################################################################
+KERNEL = "kernel24"
+MACHINE_KERNEL_VERSION = "2.4"
-LIBC = "glibc"
-require conf/distro/include/${LIBC}.inc
-PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
-PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-intermediate:gcc-cross-intermediate"
-PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
-PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
-PREFERRED_PROVIDERS += " virtual/libx11:diet-x11"
-PREFERRED_PROVIDERS += " python:python-curses"
-PREFERRED_PROVIDER_classpath = "classpath-minimal"
+#############################################################################
+# TOOLCHAIN
+#############################################################################
+fixedCxxflags = "${@bb.data.getVar('CXXFLAGS', d, 1).replace('-fvisibility-inlines-hidden','')}"
+CXXFLAGS := ${fixedCxxflags}
-TARGET_FPU = "soft"
+# we're not supporting pcmcia right now
+DISTRO_FEATURES = "nfs smbfs wifi pcmcia ppp ext2 vfat usbhost pci"
-SRCDATE := "20050527"
+# FIXME: cannot build linux-libc-headers unless this is set.
+IPKGBUILDCMD = "stage-manager-ipkg-build -o 0 -g 0"
+#############################################################################
+# PREFERRED VERSIONS
+#############################################################################
+PREFERRED_VERSION_busybox = "1.7.2"
PREFERRED_VERSION_glibc = "2.3.3"
+PREFERRED_VERSION_glibc-initial = "2.3.2"
PREFERRED_VERSION_shorewall = "2.0.9-monolithic"
PREFERRED_VERSION_ppp-dsl = "0.1-monolithic"
-PREFERRED_VERSION_mtd-utils = "0.0.0+cvs20060223"
+PREFERRED_VERSION_mtd-utils = "1.0.0+git"
PREFERRED_VERSION_kismet = "2005-01-R1"
+PREFERRED_VERSION_automake-native = "1.10"
+PREFERRED_VERSION_pkgconfig-native = "0.23"
+PREFERRED_VERSION_netperf = "2.3"
+PREFERRED_PROVIDER_hotplug = "linux-hotplug"
PREFERRED_VERSION_gcc-cross-initial = "3.3.4"
PREFERRED_VERSION_gcc-cross-intermediate = "3.3.4"
@@ -45,67 +78,8 @@ PREFERRED_VERSION_binutils-cross = "2.14.90.0.7"
PREFERRED_VERSION_binutils-cross-sdk = "2.14.90.0.7"
PREFERRED_VERSION_binutils = "2.16"
PREFERRED_VERSION_linux-libc-headers = "2.6.18"
-
PREFERRED_VERSION_prism54-firmware = "1.0.3.0"
-
-KERNEL_VERSION_mtx-1 = "2.4.27"
-KERNEL_VERSION_mtx-2 = "2.4.27"
-
-#PREFERRED_VERSION_glibc_mtx-3 = "2.3.5+cvs20050627"
-PREFERRED_VERSION_gcc-cross-initial_mtx-3 = "3.4.4"
-PREFERRED_VERSION_gcc-cross-intermediate_mtx-3 = "3.4.4"
-PREFERRED_VERSION_gcc-cross_mtx-3 = "3.4.4"
-PREFERRED_VERSION_gcc-cross-sdk_mtx-3 = "3.4.4"
-PREFERRED_VERSION_gcc_mtx-3 = "3.4.4"
-### did not compile with:
-#PREFERRED_VERSION_binutils-cross_mtx-3 = "2.16.91.0.7"
-#PREFERRED_VERSION_binutils-cross-sdk_mtx-3 = "2.16.91.0.7"
-### falling back to:
-PREFERRED_VERSION_binutils-cross_mtx-3 = "2.15.94.0.1"
-PREFERRED_VERSION_binutils-cross-sdk_mtx-3 = "2.15.94.0.1"
-PREFERRED_VERSION_binutils_mtx-3 = "2.16"
+#PREFERRED_VERSION_udev = "089"
+PREFERRED_VERSION_udev = "100"
PREFERRED_VERSION_madwifi-modules = "0.9.3"
PREFERRED_VERSION_madwifi-tools = "0.9.3"
-
-PREFERRED_VERSION_udev = "089"
-
-KERNEL_VERSION_mtx-3 = "2.6.15.4"
-PREFERRED_PROVIDER_virtual/kernel_mtx-3a = "linux-mtx-3a"
-
-
-#PREFERRED_VERSION_glibc_mtx-3a = "2.3.5+cvs20050627"
-PREFERRED_VERSION_gcc-cross-initial_mtx-3a = "3.4.4"
-PREFERRED_VERSION_gcc-cross-intermediate_mtx-3a = "3.4.4"
-PREFERRED_VERSION_gcc-cross_mtx-3a = "3.4.4"
-PREFERRED_VERSION_gcc-cross-sdk_mtx-3a = "3.4.4"
-PREFERRED_VERSION_gcc_mtx-3a = "3.4.4"
-### did not compile with:
-#PREFERRED_VERSION_binutils-cross_mtx-3a = "2.16.91.0.7"
-#PREFERRED_VERSION_binutils-cross-sdk_mtx-3a = "2.16.91.0.7"
-### falling back to:
-PREFERRED_VERSION_binutils-cross_mtx-3a = "2.15.94.0.1"
-PREFERRED_VERSION_binutils-cross-sdk_mtx-3a = "2.15.94.0.1"
-PREFERRED_VERSION_binutils_mtx-3a = "2.16"
-
-PREFERRED_VERSION_udev = "100"
-
-KERNEL_VERSION_mtx-3a = "2.6.16.6"
-
-
-# usually overrrided from local.conf
-NYLON_RELEASE = "unstable"
-
-# use meshcub.org mirrors for CVS sources
-CVS_TARBALL_STASH = "http://meshcube.org/nylon/${NYLON_RELEASE}/sources/"
-
-export FEED_URIS = " \
- nylon##http://meshcube.org/nylon/${NYLON_RELEASE}/feed \
- nylon-bin##http://meshcube.org/nylon/${NYLON_RELEASE}/binary-feed"
-
-# image names
-DISTRO_VERSION = "${NYLON_VERSION}"
-BUILDNAME := "${NYLON_VERSION}"
-#this does not work: ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-abiversion')}
-IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}_${BUILDNAME}"
-KERNEL_IMAGE_NAME = "kernel-${KERNEL_VERSION}-${MACHINE}_${BUILDNAME}"
-
diff --git a/conf/distro/sharprom-compatible.conf b/conf/distro/sharprom-compatible.conf
index 93077e1025..bd3b93ec17 100644
--- a/conf/distro/sharprom-compatible.conf
+++ b/conf/distro/sharprom-compatible.conf
@@ -25,6 +25,15 @@ export TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}/${layout_includedir}"
#DEBUG_OPTIMIZATION = "-O -g3"
#DEBUG_BUILD = "1"
+# We are still using 2.4 embedix kernels
+COMPATIBLE_MACHINE_pn-c7x0-kernels = "(c7x0|corgi|husky|shepherd)"
+COMPATIBLE_MACHINE_pn-collie-kernels = "collie"
+COMPATIBLE_MACHINE_pn-poodle-kernels = "(poodle|poodle255)"
+COMPATIBLE_MACHINE_pn-openzaurus-pxa27x = "(akita|spitz|borzoi)"
+COMPATIBLE_MACHINE_pn-openzaurus-pxa = "(c7x0|corgi|husky|shepherd|poodle|poodle255|tosa)"
+COMPATIBLE_MACHINE_pn-openzaurus-sa = "collie"
+
+
#
# Base
#
diff --git a/conf/licenses.conf b/conf/licenses.conf
index 01c4747167..3da47f9d00 100644
--- a/conf/licenses.conf
+++ b/conf/licenses.conf
@@ -1,6 +1,5 @@
SRC_DISTRIBUTE_LICENSES += "GPL GPLv2 GPLv3 LGPL LGPLv2.1 LGPLv3"
-SRC_DISTRIBUTE_LICENSES += "BSD Apache-2.0 QPL AFL"
+SRC_DISTRIBUTE_LICENSES += "BSD Apache-2.0 QPL AFL CUPS"
SRC_DISTRIBUTE_LICENSES += "MIT Sleepycat Classpath Perl PSF PD Artistic"
SRC_DISTRIBUTE_LICENSES += "bzip2 zlib ntp cron libpng netperf openssl"
-SRC_DISTRIBUTE_LICENSES += "Info-ZIP tcp-wrappers"
-
+SRC_DISTRIBUTE_LICENSES += "Info-ZIP tcp-wrappers Stanford"
diff --git a/conf/machine/akita.conf b/conf/machine/akita.conf
index 9930c89c6a..6f71787fa1 100644
--- a/conf/machine/akita.conf
+++ b/conf/machine/akita.conf
@@ -21,3 +21,7 @@ MACHINE_DISPLAY_PPI = "216"
UBOOT_MACHINE = "akita_config"
UBOOT_ENTRYPOINT = "0xA1000000"
UBOOT_LOADADDRESS = "${UBOOT_ENTRYPOINT}"
+
+# xserver-kdrive 1.3.0.0 is still the only working version:
+XSERVER = "xserver-kdrive-1300-fbdev"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive-1300"
diff --git a/conf/machine/at2440evb.conf b/conf/machine/at2440evb.conf
new file mode 100644
index 0000000000..f3fa5edfaf
--- /dev/null
+++ b/conf/machine/at2440evb.conf
@@ -0,0 +1,19 @@
+#@TYPE: Machine
+#@Name: Avantech AT2440EVB Dev Board
+#@DESCRIPTION: Machine configuration for Avantech AT2440EVB Dev Board
+
+
+TARGET_ARCH = "arm"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux"
+
+# used by sysvinit_2
+SERIAL_CONSOLE = "115200 ttySAC0"
+
+IMAGE_FSTYPES = "tar.gz"
+KERNEL_IMAGETYPE = "uImage"
+UBOOT_ENTRYPOINT = "30008000"
+
+MACHINE_FEATURES = "kernel26 screen touchscreen"
+
+require conf/machine/include/tune-arm920t.inc
diff --git a/conf/machine/at91cap9adk.conf b/conf/machine/at91cap9adk.conf
index 50549dabf6..87311e9be4 100644
--- a/conf/machine/at91cap9adk.conf
+++ b/conf/machine/at91cap9adk.conf
@@ -9,7 +9,6 @@ PREFERRED_VERSION_linux = "2.6.28"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
KERNEL_IMAGETYPE = "uImage"
-PREFERRED_VERSION_u-boot = "2009.01"
UBOOT_MACHINE = "at91cap9adk_config"
PREFERRED_VERSION_at91bootstrap = "2.10"
diff --git a/conf/machine/at91sam9260ek.conf b/conf/machine/at91sam9260ek.conf
index 3882c118fb..9a7ca9af62 100644
--- a/conf/machine/at91sam9260ek.conf
+++ b/conf/machine/at91sam9260ek.conf
@@ -10,8 +10,7 @@ PREFERRED_VERSION_linux = "2.6.28"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
KERNEL_IMAGETYPE = "uImage"
-PREFERRED_VERSION_u-boot = "2009.01"
-UBOOT_MACHINE = "at92sam9260ek_config"
+UBOOT_MACHINE = "at91sam9260ek_config"
PREFERRED_VERSION_at91bootstrap = "2.10"
diff --git a/conf/machine/at91sam9261ek.conf b/conf/machine/at91sam9261ek.conf
index a3a9be6dc1..79f275f483 100644
--- a/conf/machine/at91sam9261ek.conf
+++ b/conf/machine/at91sam9261ek.conf
@@ -10,8 +10,7 @@ PREFERRED_VERSION_linux = "2.6.28"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
KERNEL_IMAGETYPE = "uImage"
-PREFERRED_VERSION_u-boot = "2009.01"
-UBOOT_MACHINE = "at92sam9261ek_config"
+UBOOT_MACHINE = "at91sam9261ek_config"
PREFERRED_VERSION_at91bootstrap = "2.10"
diff --git a/conf/machine/at91sam9263ek.conf b/conf/machine/at91sam9263ek.conf
index e633148172..f052170aed 100644
--- a/conf/machine/at91sam9263ek.conf
+++ b/conf/machine/at91sam9263ek.conf
@@ -10,7 +10,6 @@ PREFERRED_VERSION_linux = "2.6.28"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
KERNEL_IMAGETYPE = "uImage"
-PREFERRED_VERSION_u-boot = "2009.01"
UBOOT_MACHINE = "at91sam9263ek_config"
PREFERRED_VERSION_at91bootstrap = "2.10"
diff --git a/conf/machine/at91sam9g20ek.conf b/conf/machine/at91sam9g20ek.conf
index 903e953b13..7dc6ba0d53 100644
--- a/conf/machine/at91sam9g20ek.conf
+++ b/conf/machine/at91sam9g20ek.conf
@@ -9,7 +9,6 @@ PREFERRED_VERSION_linux = "2.6.28"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
KERNEL_IMAGETYPE = "uImage"
-PREFERRED_VERSION_u-boot = "2009.01"
UBOOT_MACHINE = "at91sam9g20ek_config"
PREFERRED_VERSION_at91bootstrap = "2.10"
@@ -18,8 +17,7 @@ PREFERRED_VERSION_at91bootstrap = "2.10"
USE_VT = "0"
MACHINE_FEATURES = "kernel26 alsa ext2 usbhost usbgadget"
-#EXTRA_IMAGEDEPENDS += "u-boot"
-#EXTRA_IMAGEDEPENDS += "at91bootstrap"
+EXTRA_IMAGEDEPENDS += "at91bootstrap u-boot"
# used by sysvinit_2
SERIAL_CONSOLE = "115200 ttyS0"
diff --git a/conf/machine/at91sam9rlek.conf b/conf/machine/at91sam9rlek.conf
index ba19cb3e00..f7a78dcf75 100644
--- a/conf/machine/at91sam9rlek.conf
+++ b/conf/machine/at91sam9rlek.conf
@@ -10,8 +10,7 @@ PREFERRED_VERSION_linux = "2.6.28"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
KERNEL_IMAGETYPE = "uImage"
-PREFERRED_VERSION_u-boot = "2009.01"
-UBOOT_MACHINE = "at92sam9rlek_config"
+UBOOT_MACHINE = "at91sam9rlek_config"
PREFERRED_VERSION_at91bootstrap = "2.10"
diff --git a/conf/machine/cm-x270.conf b/conf/machine/cm-x270.conf
index 3c21c546b1..956e3f47b5 100644
--- a/conf/machine/cm-x270.conf
+++ b/conf/machine/cm-x270.conf
@@ -4,7 +4,6 @@
TARGET_ARCH = "arm"
GUI_MACHINE_CLASS ?= "bigscreen"
-
PREFERRED_PROVIDER_virtual/kernel = "linux"
PACKAGE_EXTRA_ARCHS = " iwmmxt"
diff --git a/conf/machine/collie.conf b/conf/machine/collie.conf
index 96f430f377..47f6e30dfd 100644
--- a/conf/machine/collie.conf
+++ b/conf/machine/collie.conf
@@ -2,35 +2,17 @@
#@NAME: Sharp Zaurus SL-5000, Sharp Zaurus SL-5500
#@DESCRIPTION: Machine configuration for the SA1100 based Sharp Zaurus SL-5000 and SL-5500 devices
-TARGET_ARCH = "arm"
+require conf/machine/include/zaurus-2.6.inc
require conf/machine/include/tune-strongarm.inc
-MACHINE_KERNEL_VERSION = "2.6"
-KERNEL_IMAGE_MAXSIZE = "1048576"
-KERNEL_IMAGETYPE = "zImage"
-SERIAL_CONSOLE = "115200 ttySA0"
-
ROOT_FLASH_SIZE = "14"
-# actually 14680064, see EXTRA_IMAGECMD
-
-PREFERRED_PROVIDER_virtual/kernel = "linux"
-PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
-
-XSERVER ?= "xserver-kdrive-fbdev"
-
+# actually 14680064
EXTRA_IMAGECMD_jffs2 = "--pad=14680064 --little-endian --eraseblock=0x20000 -n"
-IMAGE_LINGUAS ?= ""
-IMAGE_FSTYPES ?= "jffs2 tar.gz"
-
-PCMCIA_MANAGER ?= "pcmciautils"
-
-MACHINE_FEATURES = "kernel26 apm alsa pcmcia irda usbgadget keyboard touchscreen screen vfat"
+XSERVER = "xserver-kdrive-fbdev"
MACHINE_GUI_CLASS = "smallscreen"
MACHINE_DISPLAY_WIDTH_PIXELS = "240"
MACHINE_DISPLAY_HEIGHT_PIXELS = "320"
MACHINE_DISPLAY_ORIENTATION = "270"
MACHINE_DISPLAY_PPI = "114"
-
-require conf/machine/include/kexecboot.inc
diff --git a/conf/machine/davinci-dvevm.conf b/conf/machine/davinci-dvevm.conf
deleted file mode 100644
index f52efc2aab..0000000000
--- a/conf/machine/davinci-dvevm.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-#@TYPE: Machine
-#@NAME: DM6446 cpu on a Davinci EVM board
-#@DESCRIPTION: Machine configuration for the TI Davinci EVM board
-
-TARGET_ARCH = "arm"
-
-HOTPLUG = "udev"
-
-PREFERRED_PROVIDER_virtual/kernel = "linux-davinci"
-PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
-
-#PREFERRED_VERSION_u-boot = "1.3.2"
-UBOOT_MACHINE = "davinci_dvevm_config"
-UBOOT_ENTRYPOINT="0x80008000"
-
-SERIAL_CONSOLE ?= "115200 ttyS0"
-EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x20000 -n"
-
-#ROOT_FLASH_SIZE = "29"
-
-MACHINE_FEATURES = "kernel26 pcmcia usbhost alsa"
-
-require conf/machine/include/tune-arm926ejs.inc
-
diff --git a/conf/machine/dm355-evm.conf b/conf/machine/dm355-evm.conf
new file mode 100644
index 0000000000..9ef4ff7c7d
--- /dev/null
+++ b/conf/machine/dm355-evm.conf
@@ -0,0 +1,7 @@
+#@TYPE: Machine
+#@NAME: DM355 CPUs on a Davinci DM355 EVM board
+#@DESCRIPTION: Machine configuration for the TI Davinci DM355 EVM board
+
+require conf/machine/include/davinci.inc
+
+UBOOT_MACHINE = "davinci_dm355_evm_config"
diff --git a/conf/machine/dm355-leopard.conf b/conf/machine/dm355-leopard.conf
index 5131488577..a488e0b1c8 100644
--- a/conf/machine/dm355-leopard.conf
+++ b/conf/machine/dm355-leopard.conf
@@ -2,18 +2,14 @@
#@NAME: Leopard "beagle buddy" DM355 based IP cam board
#@DESCRIPTION: Machine configuration for the DM355 leopard board
+require conf/machine/include/davinci.inc
TARGET_ARCH = "arm"
-PREFERRED_PROVIDER_virtual/kernel = "linux-davinci"
-PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
-
PREFERRED_VERSION_u-boot = "1.2.0"
-UBOOT_MACHINE = "dm355_leopard_config"
+UBOOT_MACHINE = "davinci_leopard_config"
UBOOT_ENTRYPOINT = "0x80008000"
SERIAL_CONSOLE ?= "115200 ttyS0"
MACHINE_FEATURES = "kernel26 alsa ethernet usbhost usbgadget mmc"
-require conf/machine/include/tune-arm926ejs.inc
-
diff --git a/conf/machine/dm357-evm.conf b/conf/machine/dm357-evm.conf
new file mode 100644
index 0000000000..85e396ec1a
--- /dev/null
+++ b/conf/machine/dm357-evm.conf
@@ -0,0 +1,7 @@
+#@TYPE: Machine
+#@NAME: DM357 CPUs on a Davinci DM357 EVM board
+#@DESCRIPTION: Machine configuration for the TI Davinci DM357 EVM board
+
+require conf/machine/include/davinci.inc
+
+UBOOT_MACHINE = "davinci_dvevm_config"
diff --git a/conf/machine/dm365-evm.conf b/conf/machine/dm365-evm.conf
new file mode 100644
index 0000000000..de2cc4a759
--- /dev/null
+++ b/conf/machine/dm365-evm.conf
@@ -0,0 +1,7 @@
+#@TYPE: Machine
+#@NAME: DM365 CPUs on a Davinci DM365 EVM board
+#@DESCRIPTION: Machine configuration for the TI Davinci DM365 EVM board
+
+require conf/machine/include/davinci.inc
+
+UBOOT_MACHINE = "davinci_dm365_evm_config"
diff --git a/conf/machine/dm6446-evm.conf b/conf/machine/dm6446-evm.conf
new file mode 100644
index 0000000000..8b048a5474
--- /dev/null
+++ b/conf/machine/dm6446-evm.conf
@@ -0,0 +1,7 @@
+#@TYPE: Machine
+#@NAME: DM644x CPUs on a Davinci DM6446 EVM board
+#@DESCRIPTION: Machine configuration for the TI Davinci DM6446 EVM board
+
+require conf/machine/include/davinci.inc
+
+UBOOT_MACHINE = "davinci_dvevm_config"
diff --git a/conf/machine/dm6467-evm.conf b/conf/machine/dm6467-evm.conf
new file mode 100644
index 0000000000..a7596f17f8
--- /dev/null
+++ b/conf/machine/dm6467-evm.conf
@@ -0,0 +1,7 @@
+#@TYPE: Machine
+#@NAME: DM646x CPUs on a Davinci HD DM6467 EVM board
+#@DESCRIPTION: Machine configuration for the TI Davinci HD DM6467 EVM board
+
+require conf/machine/include/davinci.inc
+
+UBOOT_MACHINE = "davinci_dm6467_evm_config"
diff --git a/conf/machine/ep93xx.conf b/conf/machine/ep93xx.conf
index 268ed52b61..6b91d1b951 100644
--- a/conf/machine/ep93xx.conf
+++ b/conf/machine/ep93xx.conf
@@ -11,7 +11,7 @@ PREFERRED_PROVIDER_xserver = "xserver-kdrive"
#don't try to access tty1
USE_VT = "0"
-MACHINE_FEATURES = "kernel26 apm alsa ext2 pcmcia usbhost screen"
+MACHINE_FEATURES = "kernel26 apm alsa ext2 pcmcia usbhost screen maverick"
# used by sysvinit_2
SERIAL_CONSOLE = "57600 ttyAM0"
@@ -21,9 +21,11 @@ ROOT_FLASH_SIZE = "8"
#extra jffs2 tweaks
EXTRA_IMAGECMD_jffs2 = "--eraseblock=0x40000 --pad=0x500000 "
-#tune for ep93xx cpus
-#can be used for crunch support later on
+# tune for ep93xx cpus can be used for crunch support but it is not
+# recommended to build whole rootfs with it (it boots anyway)
+# better would be building separate applications/libraries which makes
+# use of floating point operations
+#
#require conf/machine/include/tune-ep9312.inc
-
require conf/machine/include/tune-arm920t.inc
diff --git a/conf/machine/geodegx.conf b/conf/machine/geodegx.conf
index 6fe6a830e6..0ec6782076 100644
--- a/conf/machine/geodegx.conf
+++ b/conf/machine/geodegx.conf
@@ -4,7 +4,7 @@
TARGET_ARCH = "i486"
-require conf/machine/include/tune-geodegx.inc
+require conf/machine/include/tune-geode.inc
PREFERRED_PROVIDER_virtual/kernel = "linux-geodegx"
BOOTSTRAP_EXTRA_RDEPENDS = "kernel pciutils udev kernel-modules"
@@ -14,4 +14,4 @@ udevdir = "/dev"
KERNEL_IMAGETYPE = "bzImage"
GLIBC_ADDONS = "nptl"
-GLIBC_EXTRA_OECONF = "--with-tls"
+GLIBC_EXTRA_OECONF = "--with-tls --with-cpu=geode"
diff --git a/conf/machine/geodelx.conf b/conf/machine/geodelx.conf
index de4d9ca16e..f8874fd966 100644
--- a/conf/machine/geodelx.conf
+++ b/conf/machine/geodelx.conf
@@ -1,14 +1,15 @@
-TARGET_ARCH = "i486"
+# Machine file for devices with the AMD Geode LX processor
+# Copyright (C) 2005, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
-require conf/machine/include/tune-geodelx.inc
+TARGET_ARCH = "i486"
-PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
+require conf/machine/include/tune-geode.inc
-PREFERRED_PROVIDER_virtual/kernel="linux-geodelx"
-
-SELECTED_OPTIMIZATION_glibc := "${@'${SELECTED_OPTIMIZATION}'.replace('-fomit-frame-pointer', '')}"
+PREFERRED_PROVIDER_virtual/kernel = "linux-geodelx"
KERNEL_IMAGETYPE = "bzImage"
GLIBC_ADDONS = "nptl"
-GLIBC_EXTRA_OECONF = "--with-tls"
+GLIBC_EXTRA_OECONF = "--with-tls --with-cpu=geode"
+SELECTED_OPTIMIZATION_pn-glibc := "${@'${SELECTED_OPTIMIZATION}'.replace('-fomit-frame-pointer', '')}"
diff --git a/conf/machine/include/davinci.inc b/conf/machine/include/davinci.inc
new file mode 100644
index 0000000000..af9dc0ff9c
--- /dev/null
+++ b/conf/machine/include/davinci.inc
@@ -0,0 +1,25 @@
+require conf/machine/include/tune-arm926ejs.inc
+
+# Increase this everytime you change something in the kernel
+MACHINE_KERNEL_PR = "r8"
+
+TARGET_ARCH = "arm"
+
+KERNEL_IMAGETYPE = "uImage"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-davinci"
+
+PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
+UBOOT_MACHINE = "davinci_dvevm_config"
+
+UBOOT_ENTRYPOINT = "0x80008000"
+UBOOT_LOADADDRESS = "0x80008000"
+
+#EXTRA_IMAGEDEPENDS += "u-boot ubl"
+
+SERIAL_CONSOLE ?= "115200 ttyS0"
+EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x20000 -n"
+
+#ROOT_FLASH_SIZE = "29"
+
+MACHINE_FEATURES = "kernel26 serial ethernet usbhost usbgadget mmc alsa"
diff --git a/conf/machine/include/kexecboot.inc b/conf/machine/include/initramfs-kexecboot.inc
index 1835af4727..6ee1ddc3fa 100644
--- a/conf/machine/include/kexecboot.inc
+++ b/conf/machine/include/initramfs-kexecboot.inc
@@ -1,16 +1,13 @@
-# kexecboot specific config options
-
-# NOTE: include this file after zaurus-2.6.inc for zaurus machines
+# initramfs-kexecboot specific config options
MACHINE_FEATURES_append = " kexecboot "
-IMAGE_FSTYPES += " tar.gz "
EXTRA_IMAGEDEPENDS += "linux-kexecboot"
-# Include Kernel image in kexecboot enabled images
+# Include kernel image in kexecboot enabled images
RDEPENDS_kernel-base = "kernel-image"
-# we store kernel images in rootfs and only a minimal initramfs kernel in mtd1 for booting other kernels
+# we store kernel images in rootfs and only a minimal initramfs kernel in nand for booting other kernels
DONT_CHECK_KERNELSIZE ?= "1"
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS_append = " kexecboot-cfg"
diff --git a/conf/machine/include/kirkwood.inc b/conf/machine/include/kirkwood.inc
index 3f0b8003f5..c185deb555 100644
--- a/conf/machine/include/kirkwood.inc
+++ b/conf/machine/include/kirkwood.inc
@@ -11,7 +11,7 @@ USE_DEVFS = "0"
PREFERRED_PROVIDER_virtual/bootloader = ""
PREFERRED_PROVIDER_virtual/kernel = "linux-kirkwood"
-MACHINE_KERNEL_PR = "r4"
+MACHINE_KERNEL_PR = "r8"
IMAGE_FSTYPES += "tar.gz ubi"
SERIAL_CONSOLE = "ttyS0 115200"
diff --git a/conf/machine/include/omap3.inc b/conf/machine/include/omap3.inc
index 9f48f750e7..8e90453d4c 100644
--- a/conf/machine/include/omap3.inc
+++ b/conf/machine/include/omap3.inc
@@ -1,13 +1,30 @@
require conf/machine/include/tune-cortexa8.inc
PREFERRED_PROVIDER_virtual/kernel = "linux-omap"
# Increase this everytime you change something in the kernel
-MACHINE_KERNEL_PR = "r33"
+MACHINE_KERNEL_PR = "r37"
KERNEL_IMAGETYPE = "uImage"
UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"
-EXTRA_IMAGEDEPENDS += "u-boot x-load"
+# Only build u-boot, xload is optional
+EXTRA_IMAGEDEPENDS += "u-boot"
MACHINE_EXTRA_RRECOMMENDS = " omap3-sgx-modules "
+
+# TI DVSDK stuff:
+CODEC_INSTALL_DIR ?= "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530"
+CODEC ?= "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530"
+DSPCFG ?= "OMAP3530SHMEM"
+DSPLINKDSPCFG ?= "OMAP3530SHMEM"
+DSPLINKGPPOS ?= "OMAPLSP"
+GPPOS ?= "OMAPLSP"
+DSPLINKPLATFORM ?= "OMAP3530"
+DSPLINKSOC ?= "3530"
+DSPPOWERSOC ?= "omap3530"
+LPMDSPPOWERSOC ?= "omap3530"
+PLATFORM ?= "omap3530"
+TARGET ?= "o3530_al"
+XDC_PLATFORM ?= ti.platforms.evm3530
+
diff --git a/conf/machine/include/tune-ep9312.inc b/conf/machine/include/tune-ep9312.inc
index cf3de9c56f..c8770e0783 100644
--- a/conf/machine/include/tune-ep9312.inc
+++ b/conf/machine/include/tune-ep9312.inc
@@ -1,11 +1,14 @@
-TARGET_CC_ARCH = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312"
-# add "-mfp=maverick" for newer gcc versions > 4.0
+TARGET_CC_ARCH = "-mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp"
#set arch to ep9312 for all generated packages
-PACKAGE_EXTRA_ARCHS += "armv4 armv4t ep9312"
+PACKAGE_EXTRA_ARCHS += "armv4t ep9312"
BASE_PACKAGE_ARCH = "ep9312"
FEED_ARCH = "ep9312"
# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish
require conf/machine/include/tune-thumb.inc
+FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O -fno-signed-zeros"
+DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g"
+SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"
+BUILD_OPTIMIZATION = "-O"
diff --git a/conf/machine/include/tune-geodegx.inc b/conf/machine/include/tune-geode.inc
index cae285a91c..eda332a74e 100644
--- a/conf/machine/include/tune-geodegx.inc
+++ b/conf/machine/include/tune-geode.inc
@@ -1,6 +1,5 @@
-TARGET_CC_ARCH = "-march=geode"
+TARGET_CC_ARCH = "-march=geode -mtune=geode"
BASE_PACKAGE_ARCH = "geode"
PACKAGE_EXTRA_ARCHS += "x86 i386 geode"
FEED_ARCH = "geode"
-
diff --git a/conf/machine/include/tune-geodelx.inc b/conf/machine/include/tune-geodelx.inc
deleted file mode 100644
index 63e6678947..0000000000
--- a/conf/machine/include/tune-geodelx.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-# Geode CPU has it's own target in GCC 4.3
-# in older versions k6-2 is closest
-#
-TARGET_CC_ARCH = "-march=geode"
-BASE_PACKAGE_ARCH = "geode"
-PACKAGE_EXTRA_ARCHS += "x86 i386 geode"
-
-FEED_ARCH = "geode"
-
diff --git a/conf/machine/include/zaurus-2.6.inc b/conf/machine/include/zaurus-2.6.inc
index c6dafc19d9..ba923f9515 100644
--- a/conf/machine/include/zaurus-2.6.inc
+++ b/conf/machine/include/zaurus-2.6.inc
@@ -1,10 +1,8 @@
-# Zaurus specific configuration for kernel 2.6
+# Zaurus common settings
# Additionally, clamshell specific stuff in zaurus-clamshell.inc
TARGET_ARCH = "arm"
-MACHINE_KERNEL_VERSION = "2.6"
-
ERASEBLOCKSIZE = "0x4000"
ERASEBLOCKSIZE_akita = "0x20000"
@@ -17,34 +15,38 @@ EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=${ERASEBLOCKSIZE} --pad --f
EXTRA_IMAGEDEPENDS += "zaurus-installer"
SERIAL_CONSOLE = "115200 ttyS0"
+SERIAL_CONSOLE_collie = "115200 ttySA0"
-PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
-PREFERRED_PROVIDER_virtual/kernel_tosa = "linux"
PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
PREFERRED_PROVIDER_virtual/xserver_c7x0 = "xserver-kdrive-imageon"
+PREFERRED_PROVIDER_virtual/xserver_collie = "xserver-kdrive-fbdev"
PCMCIA_MANAGER ?= "pcmciautils"
-IMAGE_FSTYPES += "jffs2"
+IMAGE_FSTYPES += "jffs2 tar.gz"
MACHINE_FEATURES = "kernel26 apm alsa pcmcia irda usbgadget keyboard touchscreen screen vfat ext2"
-MACHINE_FEATURES_append_tosa = " usbhost wifi "
MACHINE_FEATURES_append_akita = " usbhost "
MACHINE_FEATURES_append_spitz = " usbhost "
+MACHINE_FEATURES_append_tosa = " usbhost wifi "
MACHINE_EXTRA_RDEPENDS = "zaurusd mtd-utils nandlogical"
+MACHINE_EXTRA_RDEPENDS_collie = ""
-# Fixme ?
-#########
+# Fixme ? pcmcia and pxa2xx-cs are now compiled in kernel
# Here we just need snd modules
MACHINE_EXTRA_RRECOMMENDS_c7x0 = "kernel-module-snd-soc-corgi kernel-module-pxa2xx-cs kernel-module-pcmcia"
MACHINE_EXTRA_RRECOMMENDS_akita = "kernel-module-snd-soc-spitz kernel-module-pxa2xx-cs kernel-module-pcmcia"
MACHINE_EXTRA_RRECOMMENDS_spitz = "kernel-module-snd-soc-spitz kernel-module-pxa2xx-cs kernel-module-pcmcia"
MACHINE_EXTRA_RRECOMMENDS_poodle = "kernel-module-snd-soc-poodle kernel-module-pxa2xx-cs kernel-module-pcmcia"
-KERNEL_IMAGE_MAXSIZE = "1294336"
+# For tosa: OHCI suspend/resume fixup
+# wlan-ng is now in kernel (2.6.29)
+# Fixme ? module-snd for tosa
+MACHINE_EXTRA_RRECOMMENDS_tosa = "apm-tosa-suspendfix"
-ZAURUS_KERNEL_IMAGETYPE ?= "zImage"
-KERNEL_IMAGETYPE = "${ZAURUS_KERNEL_IMAGETYPE}"
+# Fixme ? module-snd for collie
+MACHINE_EXTRA_RRECOMMENDS_collie = ""
-require conf/machine/include/kexecboot.inc
+require conf/machine/include/zaurus-kernel.inc
+require conf/machine/include/initramfs-kexecboot.inc
diff --git a/conf/machine/include/zaurus-kernel.inc b/conf/machine/include/zaurus-kernel.inc
new file mode 100644
index 0000000000..d9f1c1ba85
--- /dev/null
+++ b/conf/machine/include/zaurus-kernel.inc
@@ -0,0 +1,13 @@
+# Zaurus common kernel settings
+
+MACHINE_KERNEL_VERSION = "2.6"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
+PREFERRED_PROVIDER_virtual/kernel_collie = "linux"
+PREFERRED_PROVIDER_virtual/kernel_tosa = "linux"
+
+KERNEL_IMAGE_MAXSIZE = "1294336"
+KERNEL_IMAGE_MAXSIZE_collie = "1048576"
+
+ZAURUS_KERNEL_IMAGETYPE ?= "zImage"
+KERNEL_IMAGETYPE = "${ZAURUS_KERNEL_IMAGETYPE}"
diff --git a/conf/machine/micro2440.conf b/conf/machine/micro2440.conf
index f46d4f5822..37311ad965 100644
--- a/conf/machine/micro2440.conf
+++ b/conf/machine/micro2440.conf
@@ -4,21 +4,35 @@
TARGET_ARCH = "arm"
-PREFERRED_PROVIDER_virtual/kernel = "linux"
-PREFERRED_VERSION_linux = "2.6.29"
+IMAGE_DEVICE_TABLES = "files/device_table-minimal.txt \
+ files/device_table_add-s3c_serial.txt"
+
+PREFERRED_VERSION_u-boot = "git"
+UBOOT_MACHINE = "mini2440_config"
+UBOOT_ENTRYPOINT = "30008000"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-mini2440"
+
+# This can be used as alternative, stable kernel
+# PREFERRED_PROVIDER_virtual/kernel = "linux"
+# PREFERRED_VERSION_linux = "2.6.29"
+
# This is not necessarily true, there is a 800x480 display as well
MACHINE_DISPLAY_WIDTH_PIXELS = "240"
MACHINE_DISPLAY_HEIGHT_PIXELS = "320"
MACHINE_DISPLAY_ORIENTATION = "0"
MACHINE_DISPLAY_PPI = "110"
+# used by matchbox-panel large icons look ok on both displays
+GUI_MACHINE_CLASS = "bigscreen"
# used by sysvinit
SERIAL_CONSOLE = "115200 ttySAC0"
IMAGE_FSTYPES = "jffs2 tar.gz"
-MACHINE_FEATURES = "kernel26 touchscreen screen usbhost usbgadget sound alsa ethernet"
+MACHINE_FEATURES = "kernel26 touchscreen screen usbhost usbgadget sound alsa ethernet mmc mmcroot i2c spi"
+MACHINE_EXTRA_RDEPENDS = "rt73-firmware"
require conf/machine/include/tune-arm920t.inc
diff --git a/conf/machine/mini2440.conf b/conf/machine/mini2440.conf
new file mode 100644
index 0000000000..f4fc17cdc6
--- /dev/null
+++ b/conf/machine/mini2440.conf
@@ -0,0 +1,33 @@
+#@TYPE: Machine
+#@Name: Samsung MINI2440 Dev Board
+#@DESCRIPTION: Machine configuration for MINI2440 Dev Board
+
+
+TARGET_ARCH = "arm"
+
+PREFERRED_VERSION_u-boot = "git"
+UBOOT_ENTRYPOINT = "30008000"
+PREFERRED_PROVIDER_virtual/kernel = "linux-mini2440"
+
+# used by sysvinit_2
+SERIAL_CONSOLE = "115200 ttySAC0"
+
+IMAGE_DEVICE_TABLES = "files/device_table-minimal.txt \
+ files/device_table_add-s3c_serial.txt"
+
+IMAGE_FSTYPES = "jffs2 ext3 tar.gz"
+
+MACHINE_FEATURES = "kernel26 uboot touchscreen screen lcd rgb16"
+MACHINE_FEATURES += "usbhost usbgadget"
+MACHINE_FEATURES += "i2c spi"
+MACHINE_FEATURES += "mmc mmcroot vfat"
+MACHINE_FEATURES += "ethernet"
+MACHINE_FEATURES += "sound alsa"
+
+KERNEL_IMAGETYPE = "uImage"
+
+require conf/machine/include/tune-arm920t.inc
+
+MACHINE_EXTRA_RDEPENDS = "rt73-firmware"
+EXTRA_IMAGEDEPENDS += "u-boot"
+EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --squash -s 0x200 -n -e 16KiB"
diff --git a/conf/machine/mpc8315e-rdb.conf b/conf/machine/mpc8315e-rdb.conf
index 7d3a93b815..d7e733bd66 100644
--- a/conf/machine/mpc8315e-rdb.conf
+++ b/conf/machine/mpc8315e-rdb.conf
@@ -2,8 +2,8 @@
#@Name: Freescale MPC8315E-RDB
#@DESCRIPTION: Machine configuration for the Freescale MPC8315E-RDB
-# Development board with low power PowerPC SoC with MMU/FPU and PCI,
-# PCI Express x1, 2x SATA.
+# Development board with low-power PowerPC SoC with MMU/FPU and PCI,
+# 2x PCI Express x1, 2x SATA.
TARGET_ARCH = "powerpc"
@@ -13,7 +13,7 @@ MACHINE_FEATURES = "kernel26 usbhost pci ext2 uboot"
KERNEL_IMAGETYPE = "uImage"
-PREFERRED_VERSION_u-boot ?= "1.3.2"
+PREFERRED_VERSION_u-boot ?= "2009.06"
UBOOT_MACHINE = "MPC8315ERDB_config"
UBOOT_ENTRYPOINT = "0"
UBOOT_LOADADDRESS = "0"
diff --git a/conf/machine/mtx-1.conf b/conf/machine/mtx-1.conf
index 33a69f45b3..7db19696fa 100644
--- a/conf/machine/mtx-1.conf
+++ b/conf/machine/mtx-1.conf
@@ -6,6 +6,8 @@ TARGET_ARCH = "mipsel"
PACKAGE_ARCHS = "all mipsel ${MACHINE}"
PREFERRED_PROVIDER_virtual/kernel = "linux-mtx-1"
+KERNEL_VERSION_mtx-1 = "2.4.27"
+MACHINE_FEATURES = "kernel24 usbhost vfat"
# md: is the --pad=.. necessary? I believe not.
# EXTRA_IMAGECMD_jffs2 = "--pad=0x1c00000 --little-endian --eraseblock=0x20000 -n"
diff --git a/conf/machine/mtx-2.conf b/conf/machine/mtx-2.conf
index 438c1fed79..67cc5bf185 100644
--- a/conf/machine/mtx-2.conf
+++ b/conf/machine/mtx-2.conf
@@ -6,6 +6,8 @@ TARGET_ARCH = "mipsel"
PACKAGE_ARCHS = "all mipsel ${MACHINE}"
PREFERRED_PROVIDER_virtual/kernel = "linux-mtx-2"
+KERNEL_VERSION_mtx-2 = "2.4.27"
+MACHINE_FEATURES = "kernel24 usbhost vfat"
EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 -n"
diff --git a/conf/machine/mtx-3.conf b/conf/machine/mtx-3.conf
index d6d14d86df..f6e9e8aad5 100644
--- a/conf/machine/mtx-3.conf
+++ b/conf/machine/mtx-3.conf
@@ -10,8 +10,21 @@
TARGET_ARCH = "arm"
require conf/machine/include/tune-arm926ejs.inc
-
+# begin overrides mtx-3
+#PREFERRED_VERSION_glibc_mtx-3 = "2.3.5+cvs20050627"
+PREFERRED_VERSION_gcc-cross-initial_mtx-3 = "3.4.4"
+PREFERRED_VERSION_gcc-cross-intermediate_mtx-3 = "3.4.4"
+PREFERRED_VERSION_gcc-cross_mtx-3 = "3.4.4"
+PREFERRED_VERSION_gcc-cross-sdk_mtx-3 = "3.4.4"
+PREFERRED_VERSION_gcc_mtx-3 = "3.4.4"
+PREFERRED_VERSION_binutils-cross_mtx-3 = "2.15.94.0.1"
+PREFERRED_VERSION_binutils-cross-sdk_mtx-3 = "2.15.94.0.1"
+PREFERRED_VERSION_binutils_mtx-3 = "2.16"
+
+KERNEL_VERSION_mtx-3 = "2.6.15.4"
PREFERRED_PROVIDER_virtual/kernel = "linux-mtx-3"
+PREFERRED_PROVIDER_hotplug_mtx-3 = "udev"
+MACHINE_FEATURES = "kernel26 usbhost vfat"
EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 -n"
diff --git a/conf/machine/mtx-3a.conf b/conf/machine/mtx-3a.conf
index cb1b129660..d3adce325b 100644
--- a/conf/machine/mtx-3a.conf
+++ b/conf/machine/mtx-3a.conf
@@ -4,8 +4,21 @@
include conf/machine/mtx-3.conf
-TARGET_ARCH = "arm"
+#PREFERRED_VERSION_glibc_mtx-3a = "2.3.5+cvs20050627"
+PREFERRED_VERSION_gcc-cross-initial_mtx-3a = "3.4.4"
+PREFERRED_VERSION_gcc-cross-intermediate_mtx-3a = "3.4.4"
+PREFERRED_VERSION_gcc-cross_mtx-3a = "3.4.4"
+PREFERRED_VERSION_gcc-cross-sdk_mtx-3a = "3.4.4"
+PREFERRED_VERSION_gcc_mtx-3a = "3.4.4"
+PREFERRED_VERSION_binutils-cross_mtx-3a = "2.15.94.0.1"
+PREFERRED_VERSION_binutils-cross-sdk_mtx-3a = "2.15.94.0.1"
+PREFERRED_VERSION_binutils_mtx-3a = "2.16"
+
PREFERRED_PROVIDER_virtual/kernel = "linux-mtx-3a"
+KERNEL_VERSION_mtx-3a = "2.6.16.6"
+PREFERRED_PROVIDER_hotplug_mtx-3a = "udev"
+
+TARGET_ARCH = "arm"
EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 -n"
USE_VT = "0"
SERIAL_CONSOLE = "115200 ttyS0 vt100"
diff --git a/conf/machine/mx27ads.conf b/conf/machine/mx27ads.conf
new file mode 100644
index 0000000000..d7e8782a50
--- /dev/null
+++ b/conf/machine/mx27ads.conf
@@ -0,0 +1,19 @@
+#@TYPE: Machine
+#@Name: Freescale MX27ADS
+#@DESCRIPTION: Machine configuration for Freescale MX27ADS
+
+TARGET_ARCH = "arm"
+
+MACHINE_FEATURES = "kernel26 apm alsa ext2 pcmcia usbhost usbgadget"
+
+GUI_MACHINE_CLASS = "smallscreen"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux"
+
+require conf/machine/include/tune-arm926ejs.inc
+
+# used by sysvinit_2
+SERIAL_CONSOLE = "115200 ttymxc0"
+
+# used by opie-collections.inc
+ROOT_FLASH_SIZE = "32"
diff --git a/conf/machine/spitz.conf b/conf/machine/spitz.conf
index 4fe62b5f43..dde1bd1499 100644
--- a/conf/machine/spitz.conf
+++ b/conf/machine/spitz.conf
@@ -27,3 +27,7 @@ MACHINE_DISPLAY_PPI = "216"
UBOOT_MACHINE = "akita_config"
UBOOT_ENTRYPOINT = "0xA1000000"
UBOOT_LOADADDRESS = "${UBOOT_ENTRYPOINT}"
+
+# xserver-kdrive 1.3.0.0 is still the only working version:
+XSERVER = "xserver-kdrive-1300-fbdev"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive-1300"
diff --git a/conf/machine/tosa.conf b/conf/machine/tosa.conf
index 87cfe4781a..fd1e477465 100644
--- a/conf/machine/tosa.conf
+++ b/conf/machine/tosa.conf
@@ -5,10 +5,6 @@
require conf/machine/include/zaurus-2.6.inc
require conf/machine/include/tune-xscale.inc
-# wlan-ng Modules
-# OHCI suspend/resume fixup
-MACHINE_EXTRA_RRECOMMENDS += "wlan-ng-modules-usb apm-tosa-suspendfix"
-
ROOT_FLASH_SIZE = "28"
MACHINE_GUI_CLASS = "bigscreen"
diff --git a/conf/machine/tqm8540.conf b/conf/machine/tqm8540.conf
new file mode 100644
index 0000000000..7595f8a5dc
--- /dev/null
+++ b/conf/machine/tqm8540.conf
@@ -0,0 +1,25 @@
+#@TYPE: Machine
+#@Name: TQM85xx
+#@DESCRIPTION: Machine configuration for the Ixxi TQ-Minimodule with MPC8540
+
+TARGET_ARCH = "powerpc"
+
+PREFERRED_PROVIDER_virtual/kernel ?= "linux"
+
+MACHINE_FEATURES = "kernel26 usbhost pci ext2 uboot jffs2"
+
+KERNEL_IMAGETYPE = "uImage"
+
+PREFERRED_VERSION_u-boot = "1.3.2"
+UBOOT_MACHINE = "TQM8540_config"
+
+EXTRA_IMAGECMD_jffs2 = "--pad --big-endian --eraseblock=0x20000"
+
+#don't try to access tty1
+USE_VT = "0"
+
+SERIAL_CONSOLE = "115200 ttyS0"
+
+#tune for the e500 core
+require conf/machine/include/tune-ppce500.inc
+
diff --git a/conf/machine/tx25.conf b/conf/machine/tx25.conf
new file mode 100644
index 0000000000..92a8fef3df
--- /dev/null
+++ b/conf/machine/tx25.conf
@@ -0,0 +1,29 @@
+#@TYPE: Machine
+#@Name: KARO TX25
+#@DESCRIPTION: Machine configuration for Freescale i.MX25 based Karo TX25 + baseboard
+
+TARGET_ARCH = "arm"
+
+MACHINE_FEATURES = "kernel26 apm alsa ext2 pcmcia usbhost usbgadget screen camera"
+
+GUI_MACHINE_CLASS = "bigscreen"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux"
+PREFERRED_VERSION_linux = "2.6.30"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
+XSERVER = "xserver-kdrive-fbdev"
+
+require conf/machine/include/tune-arm926ejs.inc
+
+# used by sysvinit_2
+SERIAL_CONSOLE = "115200 ttymxc0"
+
+ROOT_FLASH_SIZE = "128"
+
+IMAGE_FSTYPES ?= "jffs2"
+
+EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 -n \
+ --pad ; sumtool --eraseblock=0x20000 -n \
+ --littleendian --pad \
+ -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
+ -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2.summary"
diff --git a/conf/machine/tx27.conf b/conf/machine/tx27.conf
new file mode 100644
index 0000000000..a3e784c110
--- /dev/null
+++ b/conf/machine/tx27.conf
@@ -0,0 +1,29 @@
+#@TYPE: Machine
+#@Name: KARO TX27
+#@DESCRIPTION: Machine configuration for Freescale i.MX27 based Karo TX27 + baseboard
+
+TARGET_ARCH = "arm"
+
+MACHINE_FEATURES = "kernel26 apm alsa ext2 pcmcia usbhost usbgadget screen camera"
+
+GUI_MACHINE_CLASS = "bigscreen"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux"
+PREFERRED_VERSION_linux = "2.6.28"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
+XSERVER = "xserver-kdrive-fbdev"
+
+require conf/machine/include/tune-arm926ejs.inc
+
+# used by sysvinit_2
+SERIAL_CONSOLE = "115200 ttymxc0"
+
+ROOT_FLASH_SIZE = "128"
+
+IMAGE_FSTYPES ?= "jffs2"
+
+EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 -n \
+ --pad ; sumtool --eraseblock=0x20000 -n \
+ --littleendian --pad \
+ -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
+ -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2.summary"
diff --git a/contrib/angstrom/build-feeds.sh b/contrib/angstrom/build-feeds.sh
index e9026f77f8..cafce9f7d7 100755
--- a/contrib/angstrom/build-feeds.sh
+++ b/contrib/angstrom/build-feeds.sh
@@ -70,7 +70,7 @@ fi
for machine in ${ARCH_MACHINES}
do
BUILD_MACHINE=$machine
- BUILD_CLEAN="opkg-native qmake-native qmake2-native qt-x11-free python python-native python-pygtk gnome-icon-theme"
+ BUILD_CLEAN="qmake-native qmake2-native qt-x11-free python python-native python-pygtk gnome-icon-theme"
BUILD_TARGETS=" \
abiword \
aircrack-ng \
@@ -100,9 +100,14 @@ do
cvs \
cwiid \
dates \
+ dialog \
distcc \
dsniff \
duke3d \
+ dvb-apps \
+ dvbstream \
+ dvbtraffic \
+ dvbtune \
e-uae \
e-wm \
ekiga \
@@ -122,6 +127,7 @@ do
findutils \
firefox \
fish \
+ fldigi \
flex \
flite \
frameworkd \
@@ -171,6 +177,7 @@ do
gzip \
hal \
hexatrolic \
+ htop \
i2c-tools \
iaimaster \
icebloxx \
@@ -184,6 +191,7 @@ do
iscsi-target \
ivman \
jamvm \
+ kernel-module-udlfb \
kismet \
konqueror-embedded \
labyrinth \
@@ -233,6 +241,8 @@ do
openvpn \
opie-notes \
orage \
+ padevchooser \
+ pavucontrol \
palantir \
pairs \
pciutils \
@@ -306,6 +316,7 @@ do
tzdata \
ubahnnav \
ufraw \
+ unzip \
usbutils \
usbview \
ushare \
@@ -317,6 +328,7 @@ do
win4 \
wireshark \
wpa-gui \
+ wscan \
wt \
wt3 \
x11vnc \
@@ -325,7 +337,9 @@ do
xf86-input-mouse \
xf86-input-tslib \
xf86-video-ati \
+ xf86-video-displaylink \
xf86-video-fbdev \
+ xf86-video-sisusb \
xf86-video-vesa \
xfce-mcs-manager
xfce-mcs-manager \
@@ -347,8 +361,10 @@ do
xserver-xorg \
zauralign \
zddice \
+ zenity \
zgscore \
zhone \
+ zip \
ziq \
zlapspeed \
zrev7 \
@@ -371,7 +387,7 @@ fi
for machine in ${MACHINES}
do
BUILD_MACHINE=$machine
- BUILD_CLEAN="opkg-native qmake-native qmake2-native qt-x11-free python python-native python-pygtk gnome-icon-theme"
+ BUILD_CLEAN="qmake-native qmake2-native qt-x11-free python python-native python-pygtk gnome-icon-theme"
BUILD_TARGETS="task-base task-boot \
task-opie task-opie-all \
task-openmoko-base task-openmoko-debug task-openmoko-examples task-openmoko-linux task-openmoko-native-sdk task-openmoko-net task-openmoko-phone task-openmoko-pim task-openmoko-ui \
diff --git a/contrib/angstrom/sort.sh b/contrib/angstrom/sort.sh
index a1a4882480..bc5c88e938 100755
--- a/contrib/angstrom/sort.sh
+++ b/contrib/angstrom/sort.sh
@@ -48,7 +48,7 @@ case "$arch" in
"armv4t")
machines="micro2440 ep93xx h6300 om-gta01 om-gta02 fic-gta01 fic-gta02" ;;
"armv5te")
- machines="topas910 sheevaplug dm355-leopard n2100 dns323 mv2120 kuropro lspro tsx09 ts409 davinci-dvevm davinci-sffsdr neuros-osd neuros-osd2 gumstix-connex gumstix-verdex gumstix e680 a780 a1200 at91sam9263ek rokre6 rokre2 rokr-e2 akita c7x0 h2200 h3900 h4000 h5000 htcapache htctornado htcblueangel htcuniversal hx4700 nslu2le hx2000 ixp4xxle magician netbook-pro nokia770 palmt650 palmt680 palmld palmtx palmtt3 palmz72 qemuarm omap5912osk poodle spitz tosa" ;;
+ machines="htcalpine dm6446-evm dm6467-evm dm355-evm dm365-evm dm357-evm topas910 sheevaplug dm355-leopard n2100 dns323 mv2120 kuropro lspro tsx09 ts409 davinci-dvevm davinci-sffsdr neuros-osd neuros-osd2 gumstix-connex gumstix-verdex gumstix e680 a780 a1200 at91sam9263ek rokre6 rokre2 rokr-e2 akita c7x0 h2200 h3900 h4000 h5000 htcapache htctornado htcblueangel htcuniversal hx4700 nslu2le hx2000 ixp4xxle magician netbook-pro nokia770 palmt650 palmt680 palmld palmtx palmtt3 palmz72 qemuarm omap5912osk poodle spitz tosa mx27ads" ;;
"armv5teb")
machines="ixp4xxbe nslu2be" ;;
"armv6-novfp")
@@ -150,9 +150,10 @@ echo "Processing 'all' feed"
for i in `find . -name "*.ipk"| grep _all` ; do mkdir -p ../all/ || true ;mv $i ../all/ ; done
(mkdir -p ../all ; cd ../all && ipkg-make-index -p Packages -m . >& /dev/null ; touch Packages.sig )
-rm *x86_64*
+mkdir -p ../sdk ; mv *sdk.ipk ../sdk/ || true
+ (mkdir -p ../sdk ; cd ../sdk && ipkg-make-index -p Packages -m . >& /dev/null ; touch Packages.sig )
-for arch in arm-oabi armv4t armv5teb armv5te armv6-novfp armv6 armv7a armv7 avr32 bfin geode i486 i586 i686 iwmmxt ppc405 ppc603e sparc ; do
+for arch in arm-oabi armv4t armv5teb armv5te armv6-novfp armv6 armv7a armv7 avr32 bfin geode i486 i586 i686 iwmmxt ppc405 ppc603e sparc x86_64 ; do
do_sort
done
@@ -161,7 +162,7 @@ if [ "$1" != "--skip-sorted-list" ]; then
for i in $(find ../ -name "*.ipk"| grep -v unsorted) ; do basename $i ; done > files-sorted
fi
-( cd ~/website/repo-updater ; php update.php ; rm ../repo/feeds.db* ; cp feeds.db* ../repo )
+( cd ~/website/repo-updater ; rm -f feed.db* ; php update.php ; rm ../repo/feeds.db* ; cp feeds.db* ../repo )
echo -n "Stripping source lines from Package files"
for i in `find .. -name Packages` ; do grep -v ^Source: $i|gzip -c9>$i.gz ;gunzip -c $i.gz>$i ; touch $i.sig ; done
diff --git a/contrib/angstrom/source-mirror.txt b/contrib/angstrom/source-mirror.txt
index eb1f74ade1..7d068f5fea 100644
--- a/contrib/angstrom/source-mirror.txt
+++ b/contrib/angstrom/source-mirror.txt
@@ -10,7 +10,9 @@ rsync ~/OE/downloads/ angstrom@linuxtogo.org:~/website/unstable/sources/ -aPvz \
--exclude "umac.ko" \
--exclude "IPL_*.zip" \
--exclude "*.lock" \
+ --exclude "bios*" \
--exclude "codec_*" \
--exclude "dsplink*" \
--exclude "*GFX*" \
+ --exclude "TI-*" \
--exclude "*.bin"
diff --git a/contrib/angstrom/upload-packages.sh b/contrib/angstrom/upload-packages.sh
index 609f16a938..3978e8778f 100644
--- a/contrib/angstrom/upload-packages.sh
+++ b/contrib/angstrom/upload-packages.sh
@@ -32,11 +32,11 @@ cat files-remote files-local | sort | uniq -u >files-uniq
cat files-uniq files-local | sort | uniq -d > files-trans
# Remove SGX files
-rm -f upload-queue/ti*codec* upload-queue/*3.00.*
+rm -f upload-queue/bigbuck* upload-queue/*libgles* upload-queue/*3.00.*
# Copy over non-duplicate files
echo "Starting rsync..."
-rsync -vz --copy-links --progress --files-from=files-trans upload-queue/ $REMOTEM:$REMOTED/unsorted/
+rsync -vz --partial --copy-links --progress --files-from=files-trans upload-queue/ $REMOTEM:$REMOTED/unsorted/
# Clean up temporary files
echo "Removing upload queue"
diff --git a/contrib/weekly-changelog-report.py b/contrib/weekly-changelog-report.py
index 22535f32b1..902089bdad 100755
--- a/contrib/weekly-changelog-report.py
+++ b/contrib/weekly-changelog-report.py
@@ -23,7 +23,7 @@ start_day = end_day - datetime.timedelta(7)
print "OE weekly changelog %s to %s\n" % (start_day.isoformat(), end_day.isoformat())
-os.system("git-shortlog --since=%s --until=%s | grep -v \"Merge branch\" | grep -v \"Merge commit\"" % (start_day.isoformat(), end_day.isoformat()))
+os.system("git shortlog --since=%s --until=%s | grep -v 'Merge branch' | grep -v 'Merge commit'|sed -e 's/^ //g'|cut -b -78 " % (start_day.isoformat(), end_day.isoformat()))
os.system("wget 'http://bugs.openembedded.net/buglist.cgi?bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&bugidtype=include&chfieldfrom=7d&chfieldto=Now&chfieldvalue=&email1=&email2=&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=bug_status&field0-0-0=noop&known_name=1WFixed&long_desc=&long_desc_type=substring&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&type-1-0-0=anyexact&type0-0-0=noop&value-1-0-0=RESOLVED%2CVERIFIED%2CCLOSED&value0-0-0=&ctype=csv' -O resolved-bugs.csv >& /dev/null")
os.system("wget 'http://bugs.openembedded.net/buglist.cgi?bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=NEW&bugidtype=include&chfield=%5BBug%20creation%5D&chfieldfrom=7d&chfieldto=Now&chfieldvalue=&email1=&email2=&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=bug_status&field0-0-0=noop&long_desc=&long_desc_type=substring&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&type-1-0-0=anyexact&type0-0-0=noop&value-1-0-0=NEW&value0-0-0=&ctype=csv' -O new-bugs.csv &> /dev/null")
diff --git a/docs/usermanual/chapters/getting_oe.xml b/docs/usermanual/chapters/getting_oe.xml
index a04e233d36..83fbad1fab 100644
--- a/docs/usermanual/chapters/getting_oe.xml
+++ b/docs/usermanual/chapters/getting_oe.xml
@@ -244,7 +244,7 @@ MACHINE = "om-gta01"</screen>
<para>The primary interface to the build system is
the <command>bitbake</command> command (see
- the <ulink url="http://subversion.tigris.org/faq.html#proxy">BitBake
+ the <ulink url="http://bitbake.berlios.de/manual/">BitBake
users manual</ulink>). BitBake will download and patch files from the
internet, so it helps if you are on a well connected machine.
</para>
diff --git a/docs/usermanual/reference/class_rootfs_ipkg.xml b/docs/usermanual/reference/class_rootfs_ipkg.xml
index b60adf8e70..fde8a38c03 100644
--- a/docs/usermanual/reference/class_rootfs_ipkg.xml
+++ b/docs/usermanual/reference/class_rootfs_ipkg.xml
@@ -41,7 +41,7 @@
<listitem>
<para>Installs the list of requested <command>.ipkg</command> packages,
- <command>${IPKG_INSTALL}</command>;</para>
+ <command>${PACKAGE_INSTALL}</command>;</para>
</listitem>
<listitem>
@@ -89,7 +89,7 @@
<variablelist>
<varlistentry>
- <term>IPKG_INSTALL</term>
+ <term>PACKAGE_INSTALL</term>
<listitem>
<para>The list of packages which will be installed into the root
@@ -114,7 +114,7 @@
</varlistentry>
<varlistentry>
- <term>PACKAGE_ARCH</term>
+ <term>PACKAGE_ARCHS</term>
<listitem>
<para>Defines the list of architectures that are support by the target
@@ -212,4 +212,4 @@
which is executed without <xref linkend="fakeroot" /> and therefore can be
used from other classes, such as <xref linkend="image_class" />, that
are already running under the control of <xref linkend="fakeroot" />.</para>
-</section> \ No newline at end of file
+</section>
diff --git a/docs/usermanual/usermanual.xml b/docs/usermanual/usermanual.xml
index ca2e7a93ac..dc38abaa34 100644
--- a/docs/usermanual/usermanual.xml
+++ b/docs/usermanual/usermanual.xml
@@ -44,6 +44,8 @@
<year>2008</year>
+ <year>2009</year>
+
<holder>Holger Hans Peter Freyther</holder>
<holder>Koen Kooi</holder>
diff --git a/files/device_table_add-s3c_serial.txt b/files/device_table_add-s3c_serial.txt
new file mode 100644
index 0000000000..c053a01496
--- /dev/null
+++ b/files/device_table_add-s3c_serial.txt
@@ -0,0 +1,2 @@
+# Include nodes for the S3C24XX serial ports on Samsung SoC boards
+/dev/ttySAC c 640 0 5 204 64 0 1 3
diff --git a/recipes/acpid/acpid/event.c.diff b/recipes/acpid/acpid/event.c.diff
new file mode 100644
index 0000000000..4ef3bafd6b
--- /dev/null
+++ b/recipes/acpid/acpid/event.c.diff
@@ -0,0 +1,43 @@
+--- acpid-1.0.8.orig/event.c
++++ acpid-1.0.8/event.c
+@@ -23,6 +23,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/wait.h>
++#include <libgen.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <stdio.h>
+@@ -90,6 +91,8 @@
+ struct dirent *dirent;
+ char *file = NULL;
+ int nrules = 0;
++ char *basen = NULL;
++ regex_t preg;
+
+ lock_rules();
+
+@@ -139,10 +142,19 @@
+ continue; /* skip non-regular files */
+ }
+
+- r = parse_file(file);
+- if (r) {
+- enlist_rule(&cmd_list, r);
+- nrules++;
++ /* check for run-parts style filename */
++ basen = basename(file);
++ if (regcomp(&preg, "^[a-zA-Z0-9_-]+$", RULE_REGEX_FLAGS) == 0){
++ if (regexec(&preg, basen, 0, NULL, 0) == 0){
++ r = parse_file(file);
++ if (r) {
++ enlist_rule(&cmd_list, r);
++ nrules++;
++ }
++ } else {
++ acpid_log(LOG_DEBUG, "ignoring conf file %s\n", file);
++ }
++
+ }
+ free(file);
+ }
diff --git a/recipes/acpid/acpid/fixfd.diff b/recipes/acpid/acpid/fixfd.diff
new file mode 100644
index 0000000000..93ceb5cfea
--- /dev/null
+++ b/recipes/acpid/acpid/fixfd.diff
@@ -0,0 +1,12 @@
+diff -Nru a/acpid.c b/acpid.c
+--- a/acpid.c 2008-11-03 14:04:43.000000000 +0100
++++ b/acpid.c 2008-12-19 18:38:14.291127677 +0100
+@@ -456,7 +456,7 @@
+ int log_opts;
+
+ /* open /dev/null */
+- nullfd = open("/dev/null", O_RDONLY);
++ nullfd = open("/dev/null", O_RDWR);
+ if (nullfd < 0) {
+ fprintf(stderr, "%s: can't open %s: %s\n", progname,
+ "/dev/null", strerror(errno));
diff --git a/recipes/acpid/acpid/netlink.diff b/recipes/acpid/acpid/netlink.diff
new file mode 100644
index 0000000000..5dbbedd5a3
--- /dev/null
+++ b/recipes/acpid/acpid/netlink.diff
@@ -0,0 +1,2797 @@
+diff -ruN acpid-1.0.8.orig/acpid.8 acpid-1.0.8/acpid.8
+--- acpid-1.0.8.orig/acpid.8 2008-11-03 14:04:43.000000000 +0100
++++ acpid-1.0.8/acpid.8 2009-03-29 17:10:14.000000000 +0200
+@@ -10,11 +10,13 @@
+ \fBacpid\fP is designed to notify user-space programs of ACPI events.
+ \fBacpid\fP should be started during the system boot, and will run as a
+ background process, by default. It will open an events file
+-(\fI/proc/acpi/event\fP by default) and attempt to read whole lines. When
+-a line is received (an \fIevent\fP), \fBacpid\fP will examine a list of rules,
+-and execute the rules that match the event.
+-\fBacpid\fP will ignore all incoming ACPI events if a lock file exists
+-(\fI/var/lock/acpid\fP by default).
++(\fI/proc/acpi/event\fP by default) and attempt to read whole lines which
++represent ACPI events. If the events file does not exist, \fBacpid\fP will
++attempt to connect to the Linux kernel via the input layer and netlink. When an
++ACPI event is received from one of these sources, \fBacpid\fP will examine a
++list of rules, and execute the rules that match the event. \fBacpid\fP will
++ignore all incoming ACPI events if a lock file exists (\fI/var/lock/acpid\fP by
++default).
+ .PP
+ \fIRules\fP are defined by simple configuration files. \fBacpid\fP
+ will look in a configuration directory (\fI/etc/acpi/events\fP by default),
+@@ -69,6 +71,9 @@
+ This option changes the event file from which \fBacpid\fP reads events.
+ Default is \fI/proc/acpi/event\fP.
+ .TP
++.BI \-n "\fR, \fP" \--netlink
++This option forces \fBacpid\fP to use the Linux kernel input layer and netlink interface for ACPI events.
++.TP
+ .BI \-f "\fR, \fP" \--foreground
+ This option keeps \fBacpid\fP in the foreground by not forking at startup.
+ .TP
+@@ -122,6 +127,8 @@
+ .PD 0
+ .B /proc/acpi/event
+ .br
++.B /dev/input/event*
++.br
+ .B /etc/acpi/
+ .br
+ .B /var/run/acpid.socket
+diff -ruN acpid-1.0.8.orig/acpid.c acpid-1.0.8/acpid.c
+--- acpid-1.0.8.orig/acpid.c 2008-11-03 14:04:43.000000000 +0100
++++ acpid-1.0.8/acpid.c 2009-03-29 17:10:14.000000000 +0200
+@@ -20,23 +20,23 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+-#include <sys/types.h>
+-#include <sys/stat.h>
++#include <unistd.h>
+ #include <fcntl.h>
+ #include <signal.h>
+-#include <unistd.h>
++#include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <string.h>
+ #include <errno.h>
+ #include <getopt.h>
+-#include <time.h>
+-#include <sys/poll.h>
+-#include <grp.h>
+-#include <syslog.h>
++#include <stdarg.h>
+
+ #include "acpid.h"
+-#include "ud_socket.h"
++#include "event.h"
++#include "connection_list.h"
++#include "proc.h"
++#include "sock.h"
++#include "input_layer.h"
++#include "netlink.h"
+
+ static int handle_cmdline(int *argc, char ***argv);
+ static void close_fds(void);
+@@ -45,7 +45,6 @@
+ static int create_pidfile(void);
+ static void clean_exit(int sig);
+ static void reload_conf(int sig);
+-static char *read_line(int fd);
+
+ /* global debug level */
+ int acpid_debug;
+@@ -53,23 +52,18 @@
+ /* do we log event info? */
+ int logevents;
+
+-static const char *progname;
+-static const char *confdir = ACPID_CONFDIR;
+-static const char *eventfile = ACPID_EVENTFILE;
+-static const char *socketfile = ACPID_SOCKETFILE;
++const char *progname;
++
+ static const char *lockfile = ACPID_LOCKFILE;
++static const char *confdir = ACPID_CONFDIR;
+ static int nosocket;
+-static const char *socketgroup;
+-static mode_t socketmode = ACPID_SOCKETMODE;
+ static int foreground;
+ static const char *pidfile = ACPID_PIDFILE;
++static int netlink;
+
+ int
+ main(int argc, char **argv)
+ {
+- int event_fd;
+- int sock_fd = -1; /* init to avoid a compiler warning */
+-
+ /* learn who we really are */
+ progname = (const char *)strrchr(argv[0], '/');
+ progname = progname ? (progname + 1) : argv[0];
+@@ -80,14 +74,22 @@
+ /* close any extra file descriptors */
+ close_fds();
+
+- /* actually open the event file */
+- event_fd = open(eventfile, O_RDONLY);
+- if (event_fd < 0) {
+- fprintf(stderr, "%s: can't open %s: %s\n", progname,
+- eventfile, strerror(errno));
+- exit(EXIT_FAILURE);
++ if (!netlink)
++ {
++ /* open the acpi event file in the proc fs */
++ /* if the open fails, try netlink */
++ if (open_proc())
++ netlink = 1;
++ }
++
++ if (netlink)
++ {
++ /* open the input layer */
++ open_input();
++
++ /* open netlink */
++ open_netlink();
+ }
+- fcntl(event_fd, F_SETFD, FD_CLOEXEC);
+
+ /*
+ * if there is data, and the kernel is NOT broken, this eats 1 byte. We
+@@ -124,34 +126,7 @@
+
+ /* open our socket */
+ if (!nosocket) {
+- sock_fd = ud_create_socket(socketfile);
+- if (sock_fd < 0) {
+- fprintf(stderr, "%s: can't open socket %s: %s\n",
+- progname, socketfile, strerror(errno));
+- exit(EXIT_FAILURE);
+- }
+- fcntl(sock_fd, F_SETFD, FD_CLOEXEC);
+- chmod(socketfile, socketmode);
+- if (socketgroup) {
+- struct group *gr;
+- struct stat buf;
+- gr = getgrnam(socketgroup);
+- if (!gr) {
+- fprintf(stderr, "%s: group %s does not exist\n",
+- progname, socketgroup);
+- exit(EXIT_FAILURE);
+- }
+- if (stat(socketfile, &buf) < 0) {
+- fprintf(stderr, "%s: can't stat %s\n",
+- progname, socketfile);
+- exit(EXIT_FAILURE);
+- }
+- if (chown(socketfile, buf.st_uid, gr->gr_gid) < 0) {
+- fprintf(stderr, "%s: chown(): %s\n",
+- progname, strerror(errno));
+- exit(EXIT_FAILURE);
+- }
+- }
++ open_sock();
+ }
+
+ /* if we're running in foreground, we don't daemonize */
+@@ -164,7 +139,8 @@
+ if (open_log() < 0) {
+ exit(EXIT_FAILURE);
+ }
+- acpid_log(LOG_INFO, "starting up\n");
++ acpid_log(LOG_INFO, "starting up with %s\n",
++ netlink ? "netlink and the input layer" : "proc fs");
+
+ /* trap key signals */
+ signal(SIGHUP, reload_conf);
+@@ -183,109 +159,50 @@
+ exit(EXIT_FAILURE);
+ }
+
+- /* main loop */
+ acpid_log(LOG_INFO, "waiting for events: event logging is %s\n",
+ logevents ? "on" : "off");
+- while (1) {
+- struct pollfd ar[2];
+- int r;
+- int fds = 0;
+-
+- /* poll for the socket and the event file */
+- ar[0].fd = event_fd; ar[0].events = POLLIN; fds++;
+- if (!nosocket) {
+- ar[1].fd = sock_fd; ar[1].events = POLLIN; fds++;
+- }
+- r = poll(ar, fds, -1);
+
+- if (r < 0 && errno == EINTR) {
++ /* main loop */
++ while (1)
++ {
++ fd_set readfds;
++ int nready;
++ int i;
++ struct connection *p;
++
++ /* it's going to get clobbered, so use a copy */
++ readfds = *get_fdset();
++
++ /* wait on data */
++ nready = select(get_highestfd() + 1, &readfds, NULL, NULL, NULL);
++
++ if (nready < 0 && errno == EINTR) {
+ continue;
+- } else if (r < 0) {
+- acpid_log(LOG_ERR, "poll(): %s\n", strerror(errno));
++ } else if (nready < 0) {
++ acpid_log(LOG_ERR, "select(): %s\n", strerror(errno));
+ continue;
+ }
+
+- /* was it an event? */
+- if (ar[0].revents) {
+- char *event;
+- struct stat trash;
+- int fexists;
+-
+- /* check for existence of a lockfile */
+- fexists = (stat(lockfile, &trash) == 0);
+-
+- /* this shouldn't happen */
+- if (!ar[0].revents & POLLIN) {
+- acpid_log(LOG_DEBUG,
+- "odd, poll set flags 0x%x\n",
+- ar[0].revents);
+- continue;
+- }
++ /* for each connection */
++ for (i = 0; i <= get_number_of_connections(); ++i)
++ {
++ int fd;
+
+- /* read an event */
+- event = read_line(event_fd);
++ p = get_connection(i);
+
+- /* if we're locked, don't process the event */
+- if (fexists) {
+- if (logevents) {
+- acpid_log(LOG_INFO,
+- "lockfile present, not processing "
+- "event \"%s\"\n", event);
+- }
+- continue;
+- }
+-
+- /* handle the event */
+- if (event) {
+- if (logevents) {
+- acpid_log(LOG_INFO,
+- "received event \"%s\"\n", event);
+- }
+- acpid_handle_event(event);
+- if (logevents) {
+- acpid_log(LOG_INFO,
+- "completed event \"%s\"\n", event);
+- }
+- } else if (errno == EPIPE) {
+- acpid_log(LOG_WARNING,
+- "events file connection closed\n");
++ /* if this connection is invalid, bail */
++ if (!p)
+ break;
+- } else {
+- static int nerrs;
+- if (++nerrs >= ACPID_MAX_ERRS) {
+- acpid_log(LOG_ERR,
+- "too many errors reading "
+- "events file - aborting\n");
+- break;
+- }
+- }
+- }
+
+- /* was it a new connection? */
+- if (!nosocket && ar[1].revents) {
+- int cli_fd;
+- struct ucred creds;
+- char buf[32];
+-
+- /* this shouldn't happen */
+- if (!ar[1].revents & POLLIN) {
+- acpid_log(LOG_DEBUG,
+- "odd, poll set flags 0x%x\n",
+- ar[1].revents);
+- continue;
+- }
++ /* get the file descriptor */
++ fd = p->fd;
+
+- /* accept and add to our lists */
+- cli_fd = ud_accept(sock_fd, &creds);
+- if (cli_fd < 0) {
+- acpid_log(LOG_ERR, "can't accept client: %s\n",
+- strerror(errno));
+- continue;
++ /* if this file descriptor has data waiting */
++ if (FD_ISSET(fd, &readfds))
++ {
++ /* delegate to this connection's process function */
++ p->process(fd);
+ }
+- fcntl(cli_fd, F_SETFD, FD_CLOEXEC);
+- snprintf(buf, sizeof(buf)-1, "%d[%d:%d]",
+- creds.pid, creds.uid, creds.gid);
+- acpid_add_client(cli_fd, buf);
+ }
+ }
+
+@@ -312,6 +229,7 @@
+ {"nosocket", 1, 0, 'S'},
+ {"pidfile", 1, 0, 'p'},
+ {"lockfile", 1, 0, 'L'},
++ {"netlink", 0, 0, 'n'},
+ {"version", 0, 0, 'v'},
+ {"help", 0, 0, 'h'},
+ {NULL, 0, 0, 0},
+@@ -327,7 +245,8 @@
+ "Use the specified socket file.", /* socketfile */
+ "Do not listen on a UNIX socket (overrides -s).",/* nosocket */
+ "Use the specified PID file.", /* pidfile */
+- "Use the specified lockfile to stop processing.", /* pidfile */
++ "Use the specified lockfile to stop processing.", /* lockfile */
++ "Force netlink/input layer mode. (overrides -e)", /* netlink */
+ "Print version information.", /* version */
+ "Print this message.", /* help */
+ };
+@@ -338,7 +257,7 @@
+ for (;;) {
+ int i;
+ i = getopt_long(*argc, *argv,
+- "c:de:flg:m:s:Sp:L:vh", opts, NULL);
++ "c:de:flg:m:s:Sp:L:nvh", opts, NULL);
+ if (i == -1) {
+ break;
+ }
+@@ -377,6 +296,9 @@
+ case 'L':
+ lockfile = optarg;
+ break;
++ case 'n':
++ netlink = 1;
++ break;
+ case 'v':
+ printf(PACKAGE "-" VERSION "\n");
+ exit(EXIT_SUCCESS);
+@@ -550,54 +472,11 @@
+ return 0;
+ }
+
+-/*
+- * This depends on fixes in linux ACPI after 2.4.8
+- */
+-#define MAX_BUFLEN 1024
+-static char *
+-read_line(int fd)
++int
++locked()
+ {
+- static char *buf;
+- int buflen = 64;
+- int i = 0;
+- int r;
+- int searching = 1;
+-
+- while (searching) {
+- buf = realloc(buf, buflen);
+- if (!buf) {
+- acpid_log(LOG_ERR, "malloc(%d): %s\n",
+- buflen, strerror(errno));
+- return NULL;
+- }
+- memset(buf+i, 0, buflen-i);
+-
+- while (i < buflen) {
+- r = read(fd, buf+i, 1);
+- if (r < 0 && errno != EINTR) {
+- /* we should do something with the data */
+- acpid_log(LOG_ERR, "read(): %s\n",
+- strerror(errno));
+- return NULL;
+- } else if (r == 0) {
+- /* signal this in an almost standard way */
+- errno = EPIPE;
+- return NULL;
+- } else if (r == 1) {
+- /* scan for a newline */
+- if (buf[i] == '\n') {
+- searching = 0;
+- buf[i] = '\0';
+- break;
+- }
+- i++;
+- }
+- }
+- if (buflen >= MAX_BUFLEN) {
+- break;
+- }
+- buflen *= 2;
+- }
++ struct stat trash;
+
+- return buf;
++ /* check for existence of a lockfile */
++ return (stat(lockfile, &trash) == 0);
+ }
+diff -ruN acpid-1.0.8.orig/acpid.h acpid-1.0.8/acpid.h
+--- acpid-1.0.8.orig/acpid.h 2008-11-03 14:04:43.000000000 +0100
++++ acpid-1.0.8/acpid.h 2009-03-29 17:10:14.000000000 +0200
+@@ -23,11 +23,7 @@
+ #ifndef ACPID_H__
+ #define ACPID_H__
+
+-#include <unistd.h>
+ #include <syslog.h>
+-#include <stdarg.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+
+ #define ACPI_PROCDIR "/proc/acpi"
+ #define ACPID_EVENTFILE ACPI_PROCDIR "/event"
+@@ -40,19 +36,12 @@
+
+ #define PACKAGE "acpid"
+
+-/*
+- * acpid.c
+- */
+ extern int acpid_debug;
+ extern int logevents;
++extern const char *progname;
++
+ extern int acpid_log(int level, const char *fmt, ...);
+
+-/*
+- * event.c
+- */
+-extern int acpid_read_conf(const char *confdir);
+-extern int acpid_add_client(int client, const char *origin);
+-extern int acpid_cleanup_rules(int do_detach);
+-extern int acpid_handle_event(const char *event);
++extern int locked();
+
+ #endif /* ACPID_H__ */
+diff -ruN acpid-1.0.8.orig/acpi_genetlink.h acpid-1.0.8/acpi_genetlink.h
+--- acpid-1.0.8.orig/acpi_genetlink.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/acpi_genetlink.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,33 @@
++#ifndef __ACPI_GENETLINK_H__
++#define __ACPI_GENETLINK_H__ 1
++
++#include <linux/types.h>
++
++struct acpi_genl_event {
++ char device_class[20];
++ char bus_id[15];
++ __u32 type;
++ __u32 data;
++};
++
++/* attributes of acpi_genl_family */
++enum {
++ ACPI_GENL_ATTR_UNSPEC,
++ ACPI_GENL_ATTR_EVENT, /* ACPI event info needed by user space */
++ __ACPI_GENL_ATTR_MAX,
++};
++#define ACPI_GENL_ATTR_MAX (__ACPI_GENL_ATTR_MAX - 1)
++
++/* commands supported by the acpi_genl_family */
++enum {
++ ACPI_GENL_CMD_UNSPEC,
++ ACPI_GENL_CMD_EVENT, /* kernel->user notifications for ACPI events */ __ACPI_GENL_CMD_MAX,
++};
++#define ACPI_GENL_CMD_MAX (__ACPI_GENL_CMD_MAX - 1)
++#define GENL_MAX_FAM_OPS 256
++#define GENL_MAX_FAM_GRPS 256
++
++#define ACPI_EVENT_FAMILY_NAME "acpi_event"
++#define ACPI_EVENT_MCAST_GROUP_NAME "acpi_mc_group"
++
++#endif
+diff -ruN acpid-1.0.8.orig/acpi_ids.c acpid-1.0.8/acpi_ids.c
+--- acpid-1.0.8.orig/acpi_ids.c 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/acpi_ids.c 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,254 @@
++/*
++ * acpi_ids.c - ACPI Netlink Group and Family IDs
++ *
++ * Copyright (C) 2008 Ted Felix (www.tedfelix.com)
++ * Portions from acpi_genl Copyright (C) Zhang Rui <rui.zhang@intel.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 <stdio.h>
++/* needed by netlink.h, should be in there */
++#include <arpa/inet.h>
++#include <linux/types.h>
++#include <string.h>
++
++#include "genetlink.h"
++#include "libnetlink.h"
++
++#include "acpid.h"
++
++#define GENL_MAX_FAM_GRPS 256
++#define ACPI_EVENT_FAMILY_NAME "acpi_event"
++#define ACPI_EVENT_MCAST_GROUP_NAME "acpi_mc_group"
++
++static int initialized = 0;
++static __u16 acpi_event_family_id = 0;
++static __u32 acpi_event_mcast_group_id = 0;
++
++/*
++ * A CTRL_CMD_GETFAMILY message returns an attribute table that looks
++ * like this:
++ *
++ * CTRL_ATTR_FAMILY_ID Use this to make sure we get the proper msgs
++ * CTRL_ATTR_MCAST_GROUPS
++ * CTRL_ATTR_MCAST_GRP_NAME
++ * CTRL_ATTR_MCAST_GRP_ID Need this for the group mask
++ * ...
++ */
++
++static int
++get_ctrl_grp_id(struct rtattr *arg)
++{
++ struct rtattr *tb[CTRL_ATTR_MCAST_GRP_MAX + 1];
++ char *name;
++
++ if (arg == NULL)
++ return -1;
++
++ /* nested within the CTRL_ATTR_MCAST_GROUPS attribute are the */
++ /* group name and ID */
++ parse_rtattr_nested(tb, CTRL_ATTR_MCAST_GRP_MAX, arg);
++
++ /* if either of the entries needed cannot be found, bail */
++ if (!tb[CTRL_ATTR_MCAST_GRP_NAME] || !tb[CTRL_ATTR_MCAST_GRP_ID])
++ return -1;
++
++ /* get the name of this multicast group we've found */
++ name = RTA_DATA(tb[CTRL_ATTR_MCAST_GRP_NAME]);
++
++ /* if it does not match the ACPI event multicast group name, bail */
++ if (strcmp(name, ACPI_EVENT_MCAST_GROUP_NAME))
++ return -1;
++
++ /* At this point, we've found what we were looking for. We now */
++ /* have the multicast group ID for ACPI events over generic netlink. */
++ acpi_event_mcast_group_id =
++ *((__u32 *)RTA_DATA(tb[CTRL_ATTR_MCAST_GRP_ID]));
++
++ return 0;
++}
++
++/* n = the response to a CTRL_CMD_GETFAMILY message */
++static int
++genl_get_mcast_group_id(struct nlmsghdr *n)
++{
++ /*
++ * Attribute table. Note the type name "rtattr" which means "route
++ * attribute". This is a vestige of one of netlink's main uses:
++ * routing.
++ */
++ struct rtattr *tb[CTRL_ATTR_MAX + 1];
++ /* pointer to the generic netlink header in the incoming message */
++ struct genlmsghdr *ghdr = NLMSG_DATA(n);
++ /* length of the attribute and payload */
++ int len = n->nlmsg_len - NLMSG_LENGTH(GENL_HDRLEN);
++ /* Pointer to the attribute portion of the message */
++ struct rtattr *attrs;
++
++ if (len < 0) {
++ fprintf(stderr, "%s: netlink CTRL_CMD_GETFAMILY response, "
++ "wrong controller message len: %d\n", progname, len);
++ return -1;
++ }
++
++ if (n->nlmsg_type != GENL_ID_CTRL) {
++ fprintf(stderr, "%s: not a netlink controller message, "
++ "nlmsg_len=%d nlmsg_type=0x%x\n",
++ progname, n->nlmsg_len, n->nlmsg_type);
++ return 0;
++ }
++
++ if (ghdr->cmd != CTRL_CMD_GETFAMILY &&
++ ghdr->cmd != CTRL_CMD_DELFAMILY &&
++ ghdr->cmd != CTRL_CMD_NEWFAMILY &&
++ ghdr->cmd != CTRL_CMD_NEWMCAST_GRP &&
++ ghdr->cmd != CTRL_CMD_DELMCAST_GRP) {
++ fprintf(stderr, "%s: unknown netlink controller command %d\n",
++ progname, ghdr->cmd);
++ return 0;
++ }
++
++ /* set attrs to point to the attribute */
++ attrs = (struct rtattr *)((char *)ghdr + GENL_HDRLEN);
++ /* Read the table from the message into "tb". This actually just */
++ /* places pointers into the message into tb[]. */
++ parse_rtattr(tb, CTRL_ATTR_MAX, attrs, len);
++
++ /* if a family ID attribute is present, get it */
++ if (tb[CTRL_ATTR_FAMILY_ID])
++ {
++ acpi_event_family_id =
++ *((__u32 *)RTA_DATA(tb[CTRL_ATTR_FAMILY_ID]));
++ }
++
++ /* if a "multicast groups" attribute is present... */
++ if (tb[CTRL_ATTR_MCAST_GROUPS]) {
++ struct rtattr *tb2[GENL_MAX_FAM_GRPS + 1];
++ int i;
++
++ /* get the group table within this attribute */
++ parse_rtattr_nested(tb2, GENL_MAX_FAM_GRPS,
++ tb[CTRL_ATTR_MCAST_GROUPS]);
++
++ /* for each group */
++ for (i = 0; i < GENL_MAX_FAM_GRPS; i++)
++ /* if this group is valid */
++ if (tb2[i])
++ /* Parse the ID. If successful, we're done. */
++ if (!get_ctrl_grp_id(tb2[i]))
++ return 0;
++ }
++
++ return -1;
++}
++
++static int
++genl_get_ids(char *family_name)
++{
++ /* handle to the netlink connection */
++ struct rtnl_handle rth;
++ /* holds the request we are going to send and the reply */
++ struct {
++ struct nlmsghdr n;
++ char buf[4096]; /* ??? Is this big enough for all cases? */
++ } req;
++ /* pointer to the nlmsghdr in req */
++ struct nlmsghdr *nlh;
++ /* pointer to the generic netlink header in req */
++ struct genlmsghdr *ghdr;
++ /* return value */
++ int ret = -1;
++
++ /* clear out the request */
++ memset(&req, 0, sizeof(req));
++
++ /* set up nlh to point to the netlink header in req */
++ nlh = &req.n;
++ /* set up the netlink header */
++ nlh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
++ nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
++ nlh->nlmsg_type = GENL_ID_CTRL;
++
++ /* set up ghdr to point to the generic netlink header */
++ ghdr = NLMSG_DATA(&req.n);
++ /* set the command we want to run: "GETFAMILY" */
++ ghdr->cmd = CTRL_CMD_GETFAMILY;
++
++ /* the message payload is the family name */
++ addattr_l(nlh, 128, CTRL_ATTR_FAMILY_NAME,
++ family_name, strlen(family_name) + 1);
++
++ /* open a generic netlink connection */
++ if (rtnl_open_byproto(&rth, 0, NETLINK_GENERIC) < 0) {
++ fprintf(stderr, "%s: cannot open generic netlink socket\n",
++ progname);
++ return -1;
++ }
++
++ /*
++ * Send CTRL_CMD_GETFAMILY message (in nlh) to the generic
++ * netlink controller. Reply will be in nlh upon return.
++ */
++ if (rtnl_talk(&rth, nlh, 0, 0, nlh, NULL, NULL) < 0) {
++ fprintf(stderr, "%s: error talking to the kernel via netlink\n",
++ progname);
++ goto ctrl_done;
++ }
++
++ /* process the response */
++ if (genl_get_mcast_group_id(nlh) < 0) {
++ fprintf(stderr, "%s: failed to get acpi_event netlink "
++ "multicast group\n", progname);
++ goto ctrl_done;
++ }
++
++ ret = 0;
++
++ctrl_done:
++ rtnl_close(&rth);
++ return ret;
++}
++
++/* initialize the ACPI IDs */
++static void
++acpi_ids_init()
++{
++ genl_get_ids(ACPI_EVENT_FAMILY_NAME);
++
++ initialized = 1;
++}
++
++/* returns the netlink family ID for ACPI event messages */
++__u16
++acpi_ids_getfamily()
++{
++ /* if the IDs haven't been initialized, initialize them */
++ if (initialized == 0)
++ acpi_ids_init();
++
++ return acpi_event_family_id;
++}
++
++/* returns the netlink multicast group ID for ACPI event messages */
++__u32
++acpi_ids_getgroup()
++{
++ /* if the IDs haven't been initialized, initialize them */
++ if (initialized == 0)
++ acpi_ids_init();
++
++ return acpi_event_mcast_group_id;
++}
+diff -ruN acpid-1.0.8.orig/acpi_ids.h acpid-1.0.8/acpi_ids.h
+--- acpid-1.0.8.orig/acpi_ids.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/acpi_ids.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,30 @@
++/*
++ * acpi_ids.h - ACPI Netlink Group and Family IDs
++ *
++ * Copyright (C) 2008 Ted Felix (www.tedfelix.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 ACPI_IDS_H__
++#define ACPI_IDS_H__
++
++/* returns the netlink family ID for ACPI event messages */
++extern __u16 acpi_ids_getfamily();
++
++/* returns the netlink multicast group ID for ACPI event messages */
++extern __u32 acpi_ids_getgroup();
++
++#endif /* ACPI_IDS_H__ */
+diff -ruN acpid-1.0.8.orig/acpi_listen.c acpid-1.0.8/acpi_listen.c
+--- acpid-1.0.8.orig/acpi_listen.c 2008-11-03 14:04:43.000000000 +0100
++++ acpid-1.0.8/acpi_listen.c 2009-03-29 17:10:14.000000000 +0200
+@@ -42,8 +42,8 @@
+ static int handle_cmdline(int *argc, char ***argv);
+ static char *read_line(int fd);
+
+-static const char *progname;
+-static const char *socketfile = ACPID_SOCKETFILE;
++const char *progname;
++const char *socketfile = ACPID_SOCKETFILE;
+ static int max_events;
+
+ static void
+diff -ruN acpid-1.0.8.orig/connection_list.c acpid-1.0.8/connection_list.c
+--- acpid-1.0.8.orig/connection_list.c 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/connection_list.c 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,124 @@
++/*
++ * connection_list.c - ACPI daemon connection list
++ *
++ * Copyright (C) 2008, Ted Felix (www.tedfelix.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
++ *
++ * Tabs at 4
++ */
++
++#include <unistd.h>
++#include <stdio.h>
++#include <sys/select.h>
++
++#include "acpid.h"
++
++#include "connection_list.h"
++
++#define max(a, b) (((a)>(b))?(a):(b))
++
++/*---------------------------------------------------------------*/
++/* private objects */
++
++#define MAX_CONNECTIONS 10
++
++static struct connection connection_list[MAX_CONNECTIONS];
++
++static int nconnections = 0;
++
++/* fd_set containing all the fd's that come in */
++static fd_set allfds;
++
++/* highest fd that is opened */
++/* (-2 + 1) causes select() to return immediately */
++static int highestfd = -2;
++
++/*---------------------------------------------------------------*/
++/* public functions */
++
++void
++add_connection(struct connection *p)
++{
++ if (nconnections < 0)
++ return;
++ if (nconnections >= MAX_CONNECTIONS) {
++ acpid_log(LOG_ERR, "Too many connections.\n");
++ return;
++ }
++
++ if (nconnections == 0)
++ FD_ZERO(&allfds);
++
++ /* add the connection to the connection list */
++ connection_list[nconnections] = *p;
++ ++nconnections;
++
++ /* add to the fd set */
++ FD_SET(p->fd, &allfds);
++ highestfd = max(highestfd, p->fd);
++}
++
++/*---------------------------------------------------------------*/
++
++struct connection *
++find_connection(int fd)
++{
++ int i;
++
++ /* for each connection */
++ for (i = 0; i < nconnections; ++i) {
++ /* if the file descriptors match, return the connection */
++ if (connection_list[i].fd == fd)
++ return &connection_list[i];
++ }
++
++ return NULL;
++}
++
++/*---------------------------------------------------------------*/
++
++int
++get_number_of_connections()
++{
++ return nconnections;
++}
++
++/*---------------------------------------------------------------*/
++
++struct connection *
++get_connection(int i)
++{
++ if (i < 0 || i >= nconnections)
++ return NULL;
++
++ return &connection_list[i];
++}
++
++/*---------------------------------------------------------------*/
++
++const fd_set *
++get_fdset()
++{
++ return &allfds;
++}
++
++/*---------------------------------------------------------------*/
++
++int
++get_highestfd()
++{
++ return highestfd;
++}
+diff -ruN acpid-1.0.8.orig/connection_list.h acpid-1.0.8/connection_list.h
+--- acpid-1.0.8.orig/connection_list.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/connection_list.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,59 @@
++/*
++ * connection_list.h - ACPI daemon connection list
++ *
++ * Copyright (C) 2008, Ted Felix (www.tedfelix.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
++ *
++ * Tabs at 4
++ */
++
++#ifndef CONNECTION_LIST_H__
++#define CONNECTION_LIST_H__
++
++#include <sys/select.h>
++
++/*****************************************************************
++ * Connection List Public Members
++ *****************************************************************/
++
++struct connection
++{
++ /* file descriptor */
++ int fd;
++
++ /* process incoming data on the connection */
++ void (* process)(int fd);
++};
++
++/* add a connection to the list */
++extern void add_connection(struct connection *p);
++
++/* find a connection in the list by file descriptor */
++extern struct connection *find_connection(int fd);
++
++/* get the number of connections in the list */
++extern int get_number_of_connections();
++
++/* get a specific connection by index from the list */
++extern struct connection *get_connection(int i);
++
++/* get an fd_set with all the fd's that have been added to the list */
++extern const fd_set *get_fdset();
++
++/* get the highest fd that was added to the list */
++extern int get_highestfd();
++
++#endif /* CONNECTION_LIST_H__ */
+diff -ruN acpid-1.0.8.orig/event.c acpid-1.0.8/event.c
+--- acpid-1.0.8.orig/event.c 2008-11-03 14:04:43.000000000 +0100
++++ acpid-1.0.8/event.c 2009-03-29 17:10:14.000000000 +0200
+@@ -1,5 +1,5 @@
+ /*
+- * event.c - ACPI daemon
++ * event.c - ACPI daemon event handler
+ *
+ * Copyright (C) 2000 Andrew Henroid
+ * Copyright (C) 2001 Sun Microsystems (thockin@sun.com)
+diff -ruN acpid-1.0.8.orig/event.h acpid-1.0.8/event.h
+--- acpid-1.0.8.orig/event.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/event.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,31 @@
++/*
++ * event.h - ACPI daemon event handler
++ *
++ * Copyright (C) 1999-2000 Andrew Henroid
++ * Copyright (C) 2001 Sun Microsystems
++ * Portions Copyright (C) 2004 Tim Hockin (thockin@hockin.org)
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 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 EVENT_H__
++#define EVENT_H__
++
++extern int acpid_read_conf(const char *confdir);
++extern int acpid_add_client(int client, const char *origin);
++extern int acpid_cleanup_rules(int do_detach);
++extern int acpid_handle_event(const char *event);
++
++#endif /* EVENT_H__ */
+diff -ruN acpid-1.0.8.orig/genetlink.h acpid-1.0.8/genetlink.h
+--- acpid-1.0.8.orig/genetlink.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/genetlink.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,81 @@
++#ifndef __LINUX_GENERIC_NETLINK_H
++#define __LINUX_GENERIC_NETLINK_H
++
++#include <linux/netlink.h>
++
++#define GENL_NAMSIZ 16 /* length of family name */
++
++#define GENL_MIN_ID NLMSG_MIN_TYPE
++#define GENL_MAX_ID 1023
++
++struct genlmsghdr {
++ __u8 cmd;
++ __u8 version;
++ __u16 reserved;
++};
++
++#define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
++
++#define GENL_ADMIN_PERM 0x01
++#define GENL_CMD_CAP_DO 0x02
++#define GENL_CMD_CAP_DUMP 0x04
++#define GENL_CMD_CAP_HASPOL 0x08
++
++/*
++ * List of reserved static generic netlink identifiers:
++ */
++#define GENL_ID_GENERATE 0
++#define GENL_ID_CTRL NLMSG_MIN_TYPE
++
++/**************************************************************************
++ * Controller
++ **************************************************************************/
++
++enum {
++ CTRL_CMD_UNSPEC,
++ CTRL_CMD_NEWFAMILY,
++ CTRL_CMD_DELFAMILY,
++ CTRL_CMD_GETFAMILY,
++ CTRL_CMD_NEWOPS,
++ CTRL_CMD_DELOPS,
++ CTRL_CMD_GETOPS,
++ CTRL_CMD_NEWMCAST_GRP,
++ CTRL_CMD_DELMCAST_GRP,
++ CTRL_CMD_GETMCAST_GRP, /* unused */
++ __CTRL_CMD_MAX,
++};
++
++#define CTRL_CMD_MAX (__CTRL_CMD_MAX - 1)
++
++enum {
++ CTRL_ATTR_UNSPEC,
++ CTRL_ATTR_FAMILY_ID,
++ CTRL_ATTR_FAMILY_NAME,
++ CTRL_ATTR_VERSION,
++ CTRL_ATTR_HDRSIZE,
++ CTRL_ATTR_MAXATTR,
++ CTRL_ATTR_OPS,
++ CTRL_ATTR_MCAST_GROUPS,
++ __CTRL_ATTR_MAX,
++};
++
++#define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1)
++
++enum {
++ CTRL_ATTR_OP_UNSPEC,
++ CTRL_ATTR_OP_ID,
++ CTRL_ATTR_OP_FLAGS,
++ __CTRL_ATTR_OP_MAX,
++};
++
++#define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1)
++
++enum {
++ CTRL_ATTR_MCAST_GRP_UNSPEC,
++ CTRL_ATTR_MCAST_GRP_NAME,
++ CTRL_ATTR_MCAST_GRP_ID,
++ __CTRL_ATTR_MCAST_GRP_MAX,
++};
++#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
++
++#endif /* __LINUX_GENERIC_NETLINK_H */
+diff -ruN acpid-1.0.8.orig/input_layer.c acpid-1.0.8/input_layer.c
+--- acpid-1.0.8.orig/input_layer.c 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/input_layer.c 2009-03-29 17:11:58.000000000 +0200
+@@ -0,0 +1,262 @@
++/*
++ * input_layer - Kernel ACPI Event Input Layer Interface
++ *
++ * Handles the details of getting kernel ACPI events from the input
++ * layer (/dev/input/event*).
++ *
++ * Inspired by (and in some cases blatantly lifted from) Vojtech Pavlik's
++ * evtest.c.
++ *
++ * Copyright (C) 2008, Ted Felix (www.tedfelix.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
++ *
++ * (tabs at 4)
++ */
++
++/* system */
++#include <unistd.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <fcntl.h>
++#include <linux/input.h>
++#include <string.h>
++#include <errno.h>
++#include <malloc.h>
++#include <glob.h>
++
++/* local */
++#include "acpid.h"
++#include "connection_list.h"
++#include "event.h"
++
++#define DIM(a) (sizeof(a) / sizeof(a[0]))
++
++struct evtab_entry {
++ struct input_event event;
++ const char *str;
++};
++
++/* event table: events we are interested in and their strings */
++/* use evtest.c or acpi_genl to find new events to add to this table */
++static struct evtab_entry evtab[] = {
++ {{{0,0}, EV_KEY, KEY_POWER, 1}, "button/power PBTN 00000080 00000000"},
++ {{{0,0}, EV_KEY, KEY_SLEEP, 1}, "button/sleep SBTN 00000080 00000000"},
++ {{{0,0}, EV_KEY, KEY_SUSPEND, 1},
++ "button/suspend SUSP 00000080 00000000"},
++ {{{0,0}, EV_SW, SW_LID, 1}, "button/lid LID close"},
++ {{{0,0}, EV_SW, SW_LID, 0}, "button/lid LID open"}
++};
++
++/*----------------------------------------------------------------------*/
++/* Given an input event, returns the string corresponding to that event.
++ If there is no corresponding string, NULL is returned. */
++static const char *
++event_string(struct input_event event)
++{
++ unsigned i;
++
++ /* for each entry in the event table */
++ for (i = 0; i < DIM(evtab); ++i)
++ {
++ /* if this is a matching event, return its string */
++ if (event.type == evtab[i].event.type &&
++ event.code == evtab[i].event.code &&
++ event.value == evtab[i].event.value) {
++ return evtab[i].str;
++ }
++ }
++
++ return NULL;
++}
++
++/*-----------------------------------------------------------------*/
++/* returns non-zero if the event type/code is one we need */
++static int
++need_event(int type, int code)
++{
++ unsigned i;
++
++ /* for each entry in the event table */
++ for (i = 0; i < DIM(evtab); ++i) {
++ /* if we found a matching event */
++ if (type == evtab[i].event.type &&
++ code == evtab[i].event.code) {
++ return 1;
++ }
++ }
++
++ return 0;
++}
++
++/*-----------------------------------------------------------------*/
++/* called when an input layer event is received */
++void process_input(int fd)
++{
++ struct input_event event;
++ ssize_t nbytes;
++ const char *str;
++ static int nerrs;
++
++ nbytes = read(fd, &event, sizeof(event));
++
++ if (nbytes == 0) {
++ acpid_log(LOG_WARNING, "input layer connection closed\n");
++ exit(EXIT_FAILURE);
++ }
++
++ if (nbytes < 0) {
++ /* if it's a signal, bail */
++ if (errno == EINTR)
++ return;
++
++ acpid_log(LOG_ERR, "input layer read error: %s (%d)\n",
++ strerror(errno), errno);
++ if (++nerrs >= ACPID_MAX_ERRS) {
++ acpid_log(LOG_ERR,
++ "too many errors reading "
++ "input layer - aborting\n");
++ exit(EXIT_FAILURE);
++ }
++ return;
++ }
++
++ /* ??? Is it possible for a partial message to come across? */
++ /* If so, we've got more code to write... */
++
++ if (nbytes != sizeof(event)) {
++ acpid_log(LOG_WARNING, "input layer unexpected length: "
++ "%d expected: %d\n", nbytes, sizeof(event));
++ return;
++ }
++
++ /* convert the event into a string */
++ str = event_string(event);
++ /* if this is not an event we care about, bail */
++ if (str == NULL)
++ return;
++
++ /* if we're locked, don't process the event */
++ if (locked()) {
++ if (logevents) {
++ acpid_log(LOG_INFO,
++ "lockfile present, not processing "
++ "input layer event \"%s\"\n", str);
++ }
++ return;
++ }
++
++ if (logevents)
++ acpid_log(LOG_INFO,
++ "received input layer event \"%s\"\n", str);
++
++ /* send the event off to the handler */
++ acpid_handle_event(str);
++
++ if (logevents)
++ acpid_log(LOG_INFO,
++ "completed input layer event \"%s\"\n", str);
++}
++
++#define BITS_PER_LONG (sizeof(long) * 8)
++#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
++#define OFF(x) ((x)%BITS_PER_LONG)
++#define LONG(x) ((x)/BITS_PER_LONG)
++#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
++
++/*--------------------------------------------------------------------*/
++/* returns non-zero if the file descriptor supports one of the events */
++/* supported by event_string(). */
++static int
++has_event(int fd)
++{
++ int type, code;
++ unsigned long bit[EV_MAX][NBITS(KEY_MAX)];
++
++ memset(bit, 0, sizeof(bit));
++ /* get the event type bitmap */
++ ioctl(fd, EVIOCGBIT(0, sizeof(bit[0])), bit[0]);
++
++ /* for each event type */
++ for (type = 0; type < EV_MAX; type++) {
++ /* if this event type is supported */
++ if (test_bit(type, bit[0])) {
++ /* skip sync */
++ if (type == EV_SYN) continue;
++ /* get the event code mask */
++ ioctl(fd, EVIOCGBIT(type, sizeof(bit[type])), bit[type]);
++ /* for each event code */
++ for (code = 0; code < KEY_MAX; code++) {
++ /* if this event code is supported */
++ if (test_bit(code, bit[type])) {
++ /* if we need this event */
++ if (need_event(type, code) != 0)
++ return 1;
++ }
++ }
++ }
++ }
++ return 0;
++}
++
++/* ??? make this changeable by commandline option */
++#define INPUT_LAYER_FS "/dev/input/event*"
++
++/*-----------------------------------------------------------------*
++ * open each of the appropriate /dev/input/event* files for input */
++void open_input(void)
++{
++ char *filename = NULL;
++ glob_t globbuf;
++ unsigned i;
++ int fd;
++ int success = 0;
++ struct connection c;
++
++ /* get all the matching event filenames */
++ glob(INPUT_LAYER_FS, 0, NULL, &globbuf);
++
++ /* for each event file */
++ for (i = 0; i < globbuf.gl_pathc; ++i)
++ {
++ filename = globbuf.gl_pathv[i];
++
++ fd = open(filename, O_RDONLY | O_NONBLOCK);
++ if (fd >= 0) {
++ /* if this file doesn't have events we need, try the next */
++ if (!has_event(fd))
++ {
++ close(fd);
++ continue;
++ }
++
++ success = 1;
++
++ if (acpid_debug)
++ fprintf(stderr, "%s: input layer %s "
++ "opened successfully\n", progname, filename);
++
++ /* add a connection to the list */
++ c.fd = fd;
++ c.process = process_input;
++ add_connection(&c);
++ }
++ }
++
++ if (!success)
++ fprintf(stderr, "%s: cannot open input layer\n", progname);
++
++ globfree(&globbuf);
++}
+diff -ruN acpid-1.0.8.orig/input_layer.h acpid-1.0.8/input_layer.h
+--- acpid-1.0.8.orig/input_layer.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/input_layer.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,32 @@
++/*
++ * input_layer.h - Kernel ACPI Event Input Layer Interface
++ *
++ * Handles the details of getting kernel ACPI events from the input
++ * layer (/dev/input/event*).
++ *
++ * Copyright (C) 2008, Ted Felix (www.tedfelix.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
++ *
++ * (tabs at 4)
++ */
++
++#ifndef INPUT_LAYER_H__
++#define INPUT_LAYER_H__
++
++/* Open each of the appropriate /dev/input/event* files for input. */
++extern void open_input(void);
++
++#endif /* INPUT_LAYER_H__ */
+diff -ruN acpid-1.0.8.orig/libnetlink.c acpid-1.0.8/libnetlink.c
+--- acpid-1.0.8.orig/libnetlink.c 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/libnetlink.c 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,593 @@
++/*
++ * libnetlink.c RTnetlink service routines.
++ *
++ * 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.
++ *
++ * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
++ *
++ * Modified by Ted Felix (www.tedfelix.com) to fix warnings.
++ *
++ */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <syslog.h>
++#include <fcntl.h>
++#include <net/if_arp.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <string.h>
++#include <errno.h>
++#include <time.h>
++#include <sys/uio.h>
++
++#include "libnetlink.h"
++
++void rtnl_close(struct rtnl_handle *rth)
++{
++ if (rth->fd >= 0) {
++ close(rth->fd);
++ rth->fd = -1;
++ }
++}
++
++int rtnl_open_byproto(struct rtnl_handle *rth, unsigned subscriptions,
++ int protocol)
++{
++ socklen_t addr_len;
++ int sndbuf = 32768;
++ int rcvbuf = 32768;
++
++ memset(rth, 0, sizeof(rth));
++
++ rth->fd = socket(AF_NETLINK, SOCK_RAW, protocol);
++ if (rth->fd < 0) {
++ perror("Cannot open netlink socket");
++ return -1;
++ }
++
++ if (setsockopt(rth->fd,SOL_SOCKET,SO_SNDBUF,&sndbuf,sizeof(sndbuf)) < 0) {
++ perror("SO_SNDBUF");
++ return -1;
++ }
++
++ if (setsockopt(rth->fd,SOL_SOCKET,SO_RCVBUF,&rcvbuf,sizeof(rcvbuf)) < 0) {
++ perror("SO_RCVBUF");
++ return -1;
++ }
++
++ memset(&rth->local, 0, sizeof(rth->local));
++ rth->local.nl_family = AF_NETLINK;
++ rth->local.nl_groups = subscriptions;
++
++ if (bind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)) < 0) {
++ perror("Cannot bind netlink socket");
++ return -1;
++ }
++ addr_len = sizeof(rth->local);
++ if (getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len) < 0) {
++ perror("Cannot getsockname");
++ return -1;
++ }
++ if (addr_len != sizeof(rth->local)) {
++ fprintf(stderr, "Wrong address length %d\n", addr_len);
++ return -1;
++ }
++ if (rth->local.nl_family != AF_NETLINK) {
++ fprintf(stderr, "Wrong address family %d\n", rth->local.nl_family);
++ return -1;
++ }
++ rth->seq = time(NULL);
++ return 0;
++}
++
++int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions)
++{
++ return rtnl_open_byproto(rth, subscriptions, NETLINK_ROUTE);
++}
++
++int rtnl_wilddump_request(struct rtnl_handle *rth, int family, int type)
++{
++ struct {
++ struct nlmsghdr nlh;
++ struct rtgenmsg g;
++ } req;
++ struct sockaddr_nl nladdr;
++
++ memset(&nladdr, 0, sizeof(nladdr));
++ nladdr.nl_family = AF_NETLINK;
++
++ memset(&req, 0, sizeof(req));
++ req.nlh.nlmsg_len = sizeof(req);
++ req.nlh.nlmsg_type = type;
++ req.nlh.nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST;
++ req.nlh.nlmsg_pid = 0;
++ req.nlh.nlmsg_seq = rth->dump = ++rth->seq;
++ req.g.rtgen_family = family;
++
++ return sendto(rth->fd, (void*)&req, sizeof(req), 0,
++ (struct sockaddr*)&nladdr, sizeof(nladdr));
++}
++
++int rtnl_send(struct rtnl_handle *rth, const char *buf, int len)
++{
++ struct sockaddr_nl nladdr;
++
++ memset(&nladdr, 0, sizeof(nladdr));
++ nladdr.nl_family = AF_NETLINK;
++
++ return sendto(rth->fd, buf, len, 0, (struct sockaddr*)&nladdr, sizeof(nladdr));
++}
++
++int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len)
++{
++ struct nlmsghdr nlh;
++ struct sockaddr_nl nladdr;
++ struct iovec iov[2] = {
++ { .iov_base = &nlh, .iov_len = sizeof(nlh) },
++ { .iov_base = req, .iov_len = len }
++ };
++ struct msghdr msg = {
++ .msg_name = &nladdr,
++ .msg_namelen = sizeof(nladdr),
++ .msg_iov = iov,
++ .msg_iovlen = 2,
++ };
++
++ memset(&nladdr, 0, sizeof(nladdr));
++ nladdr.nl_family = AF_NETLINK;
++
++ nlh.nlmsg_len = NLMSG_LENGTH(len);
++ nlh.nlmsg_type = type;
++ nlh.nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST;
++ nlh.nlmsg_pid = 0;
++ nlh.nlmsg_seq = rth->dump = ++rth->seq;
++
++ return sendmsg(rth->fd, &msg, 0);
++}
++
++int rtnl_dump_filter(struct rtnl_handle *rth,
++ rtnl_filter_t filter,
++ void *arg1,
++ rtnl_filter_t junk,
++ void *arg2)
++{
++ struct sockaddr_nl nladdr;
++ struct iovec iov;
++ struct msghdr msg = {
++ .msg_name = &nladdr,
++ .msg_namelen = sizeof(nladdr),
++ .msg_iov = &iov,
++ .msg_iovlen = 1,
++ };
++ char buf[16384];
++
++ iov.iov_base = buf;
++ while (1) {
++ int status;
++ struct nlmsghdr *h;
++
++ iov.iov_len = sizeof(buf);
++ status = recvmsg(rth->fd, &msg, 0);
++
++ if (status < 0) {
++ if (errno == EINTR)
++ continue;
++ perror("OVERRUN");
++ continue;
++ }
++
++ if (status == 0) {
++ fprintf(stderr, "EOF on netlink\n");
++ return -1;
++ }
++
++ h = (struct nlmsghdr*)buf;
++ while (NLMSG_OK(h, (unsigned)status)) {
++ int err;
++
++ if (nladdr.nl_pid != 0 ||
++ h->nlmsg_pid != rth->local.nl_pid ||
++ h->nlmsg_seq != rth->dump) {
++ if (junk) {
++ err = junk(&nladdr, h, arg2);
++ if (err < 0)
++ return err;
++ }
++ goto skip_it;
++ }
++
++ if (h->nlmsg_type == NLMSG_DONE)
++ return 0;
++ if (h->nlmsg_type == NLMSG_ERROR) {
++ struct nlmsgerr *msgerr = (struct nlmsgerr*)NLMSG_DATA(h);
++ if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr))) {
++ fprintf(stderr, "ERROR truncated\n");
++ } else {
++ errno = -msgerr->error;
++ perror("RTNETLINK answers");
++ }
++ return -1;
++ }
++ err = filter(&nladdr, h, arg1);
++ if (err < 0)
++ return err;
++
++skip_it:
++ h = NLMSG_NEXT(h, status);
++ }
++ if (msg.msg_flags & MSG_TRUNC) {
++ fprintf(stderr, "Message truncated\n");
++ continue;
++ }
++ if (status) {
++ fprintf(stderr, "!!!Remnant of size %d\n", status);
++ exit(1);
++ }
++ }
++}
++
++int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer,
++ unsigned groups, struct nlmsghdr *answer,
++ rtnl_filter_t junk,
++ void *jarg)
++{
++ int status;
++ unsigned seq;
++ struct nlmsghdr *h;
++ struct sockaddr_nl nladdr;
++ struct iovec iov = {
++ .iov_base = (void*) n,
++ .iov_len = n->nlmsg_len
++ };
++ struct msghdr msg = {
++ .msg_name = &nladdr,
++ .msg_namelen = sizeof(nladdr),
++ .msg_iov = &iov,
++ .msg_iovlen = 1,
++ };
++ char buf[16384];
++
++ memset(&nladdr, 0, sizeof(nladdr));
++ nladdr.nl_family = AF_NETLINK;
++ nladdr.nl_pid = peer;
++ nladdr.nl_groups = groups;
++
++ n->nlmsg_seq = seq = ++rtnl->seq;
++
++ if (answer == NULL)
++ n->nlmsg_flags |= NLM_F_ACK;
++
++ status = sendmsg(rtnl->fd, &msg, 0);
++
++ if (status < 0) {
++ perror("Cannot talk to rtnetlink");
++ return -1;
++ }
++
++ memset(buf,0,sizeof(buf));
++
++ iov.iov_base = buf;
++
++ while (1) {
++ iov.iov_len = sizeof(buf);
++ status = recvmsg(rtnl->fd, &msg, 0);
++
++ if (status < 0) {
++ if (errno == EINTR)
++ continue;
++ perror("OVERRUN");
++ continue;
++ }
++ if (status == 0) {
++ fprintf(stderr, "EOF on netlink\n");
++ return -1;
++ }
++ if (msg.msg_namelen != sizeof(nladdr)) {
++ fprintf(stderr, "sender address length == %d\n", msg.msg_namelen);
++ exit(1);
++ }
++ for (h = (struct nlmsghdr*)buf; (unsigned)status >= sizeof(*h); ) {
++ int err;
++ int len = h->nlmsg_len;
++ int l = len - sizeof(*h);
++
++ if (l<0 || len>status) {
++ if (msg.msg_flags & MSG_TRUNC) {
++ fprintf(stderr, "Truncated message\n");
++ return -1;
++ }
++ fprintf(stderr, "!!!malformed message: len=%d\n", len);
++ exit(1);
++ }
++
++ if (nladdr.nl_pid != (unsigned)peer ||
++ h->nlmsg_pid != rtnl->local.nl_pid ||
++ h->nlmsg_seq != seq) {
++ if (junk) {
++ err = junk(&nladdr, h, jarg);
++ if (err < 0)
++ return err;
++ }
++ /* Don't forget to skip that message. */
++ status -= NLMSG_ALIGN(len);
++ h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len));
++ continue;
++ }
++
++ if (h->nlmsg_type == NLMSG_ERROR) {
++ struct nlmsgerr *msgerr = (struct nlmsgerr*)NLMSG_DATA(h);
++ if ((unsigned)l < sizeof(struct nlmsgerr)) {
++ fprintf(stderr, "ERROR truncated\n");
++ } else {
++ errno = -msgerr->error;
++ if (errno == 0) {
++ if (answer)
++ memcpy(answer, h, h->nlmsg_len);
++ return 0;
++ }
++ perror("RTNETLINK1 answers");
++ }
++ return -1;
++ }
++ if (answer) {
++ memcpy(answer, h, h->nlmsg_len);
++ return 0;
++ }
++
++ fprintf(stderr, "Unexpected reply!!!\n");
++
++ status -= NLMSG_ALIGN(len);
++ h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len));
++ }
++ if (msg.msg_flags & MSG_TRUNC) {
++ fprintf(stderr, "Message truncated\n");
++ continue;
++ }
++ if (status) {
++ fprintf(stderr, "!!!Remnant of size %d\n", status);
++ exit(1);
++ }
++ }
++}
++
++int rtnl_listen(struct rtnl_handle *rtnl,
++ rtnl_filter_t handler,
++ void *jarg)
++{
++ int status;
++ struct nlmsghdr *h;
++ struct sockaddr_nl nladdr;
++ struct iovec iov;
++ struct msghdr msg = {
++ .msg_name = &nladdr,
++ .msg_namelen = sizeof(nladdr),
++ .msg_iov = &iov,
++ .msg_iovlen = 1,
++ };
++ char buf[8192];
++
++ memset(&nladdr, 0, sizeof(nladdr));
++ nladdr.nl_family = AF_NETLINK;
++ nladdr.nl_pid = 0;
++ nladdr.nl_groups = 0;
++
++ iov.iov_base = buf;
++ while (1) {
++ iov.iov_len = sizeof(buf);
++ status = recvmsg(rtnl->fd, &msg, 0);
++
++ if (status < 0) {
++ if (errno == EINTR)
++ continue;
++ perror("OVERRUN");
++ continue;
++ }
++ if (status == 0) {
++ fprintf(stderr, "EOF on netlink\n");
++ return -1;
++ }
++ if (msg.msg_namelen != sizeof(nladdr)) {
++ fprintf(stderr, "Sender address length == %d\n", msg.msg_namelen);
++ exit(1);
++ }
++ for (h = (struct nlmsghdr*)buf; (unsigned)status >= sizeof(*h); ) {
++ int err;
++ int len = h->nlmsg_len;
++ int l = len - sizeof(*h);
++
++ if (l<0 || len>status) {
++ if (msg.msg_flags & MSG_TRUNC) {
++ fprintf(stderr, "Truncated message\n");
++ return -1;
++ }
++ fprintf(stderr, "!!!malformed message: len=%d\n", len);
++ exit(1);
++ }
++
++ err = handler(&nladdr, h, jarg);
++ if (err < 0)
++ return err;
++
++ status -= NLMSG_ALIGN(len);
++ h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len));
++ }
++ if (msg.msg_flags & MSG_TRUNC) {
++ fprintf(stderr, "Message truncated\n");
++ continue;
++ }
++ if (status) {
++ fprintf(stderr, "!!!Remnant of size %d\n", status);
++ exit(1);
++ }
++ }
++}
++
++int rtnl_from_file(FILE *rtnl, rtnl_filter_t handler,
++ void *jarg)
++{
++ int status;
++ struct sockaddr_nl nladdr;
++ char buf[8192];
++ struct nlmsghdr *h = (void*)buf;
++
++ memset(&nladdr, 0, sizeof(nladdr));
++ nladdr.nl_family = AF_NETLINK;
++ nladdr.nl_pid = 0;
++ nladdr.nl_groups = 0;
++
++ while (1) {
++ int err, len, type;
++ int l;
++
++ status = fread(&buf, 1, sizeof(*h), rtnl);
++
++ if (status < 0) {
++ if (errno == EINTR)
++ continue;
++ perror("rtnl_from_file: fread");
++ return -1;
++ }
++ if (status == 0)
++ return 0;
++
++ len = h->nlmsg_len;
++ type= h->nlmsg_type;
++ l = len - sizeof(*h);
++
++ if (l<0 || (unsigned)len>sizeof(buf)) {
++ fprintf(stderr, "!!!malformed message: len=%d @%lu\n",
++ len, ftell(rtnl));
++ return -1;
++ }
++
++ status = fread(NLMSG_DATA(h), 1, NLMSG_ALIGN(l), rtnl);
++
++ if (status < 0) {
++ perror("rtnl_from_file: fread");
++ return -1;
++ }
++ if (status < l) {
++ fprintf(stderr, "rtnl-from_file: truncated message\n");
++ return -1;
++ }
++
++ err = handler(&nladdr, h, jarg);
++ if (err < 0)
++ return err;
++ }
++}
++
++int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data)
++{
++ int len = RTA_LENGTH(4);
++ struct rtattr *rta;
++ if ((int)NLMSG_ALIGN(n->nlmsg_len) + len > maxlen) {
++ fprintf(stderr,"addattr32: Error! max allowed bound %d exceeded\n",maxlen);
++ return -1;
++ }
++ rta = NLMSG_TAIL(n);
++ rta->rta_type = type;
++ rta->rta_len = len;
++ memcpy(RTA_DATA(rta), &data, 4);
++ n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + len;
++ return 0;
++}
++
++int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data,
++ int alen)
++{
++ int len = RTA_LENGTH(alen);
++ struct rtattr *rta;
++
++ if ((int)NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len) > maxlen) {
++ fprintf(stderr, "addattr_l ERROR: message exceeded bound of %d\n",maxlen);
++ return -1;
++ }
++ rta = NLMSG_TAIL(n);
++ rta->rta_type = type;
++ rta->rta_len = len;
++ memcpy(RTA_DATA(rta), data, alen);
++ n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len);
++ return 0;
++}
++
++int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len)
++{
++ if ((int)NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) {
++ fprintf(stderr, "addraw_l ERROR: message exceeded bound of %d\n",maxlen);
++ return -1;
++ }
++
++ memcpy(NLMSG_TAIL(n), data, len);
++ memset((void *) NLMSG_TAIL(n) + len, 0, NLMSG_ALIGN(len) - len);
++ n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len);
++ return 0;
++}
++
++int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data)
++{
++ int len = RTA_LENGTH(4);
++ struct rtattr *subrta;
++
++ if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
++ fprintf(stderr,"rta_addattr32: Error! max allowed bound %d exceeded\n",maxlen);
++ return -1;
++ }
++ subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
++ subrta->rta_type = type;
++ subrta->rta_len = len;
++ memcpy(RTA_DATA(subrta), &data, 4);
++ rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len;
++ return 0;
++}
++
++int rta_addattr_l(struct rtattr *rta, int maxlen, int type,
++ const void *data, int alen)
++{
++ struct rtattr *subrta;
++ int len = RTA_LENGTH(alen);
++
++ if (RTA_ALIGN(rta->rta_len) + RTA_ALIGN(len) > maxlen) {
++ fprintf(stderr,"rta_addattr_l: Error! max allowed bound %d exceeded\n",maxlen);
++ return -1;
++ }
++ subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len));
++ subrta->rta_type = type;
++ subrta->rta_len = len;
++ memcpy(RTA_DATA(subrta), data, alen);
++ rta->rta_len = NLMSG_ALIGN(rta->rta_len) + RTA_ALIGN(len);
++ return 0;
++}
++
++int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len)
++{
++ memset(tb, 0, sizeof(struct rtattr *) * (max + 1));
++ while (RTA_OK(rta, len)) {
++ if (rta->rta_type <= max)
++ tb[rta->rta_type] = rta;
++ rta = RTA_NEXT(rta,len);
++ }
++ if (len)
++ fprintf(stderr, "!!!Deficit %d, rta_len=%d\n", len, rta->rta_len);
++ return 0;
++}
++
++int parse_rtattr_byindex(struct rtattr *tb[], int max, struct rtattr *rta, int len)
++{
++ int i = 0;
++
++ memset(tb, 0, sizeof(struct rtattr *) * max);
++ while (RTA_OK(rta, len)) {
++ if (rta->rta_type <= max && i < max)
++ tb[i++] = rta;
++ rta = RTA_NEXT(rta,len);
++ }
++ if (len)
++ fprintf(stderr, "!!!Deficit %d, rta_len=%d\n", len, rta->rta_len);
++ return i;
++}
+diff -ruN acpid-1.0.8.orig/libnetlink.h acpid-1.0.8/libnetlink.h
+--- acpid-1.0.8.orig/libnetlink.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/libnetlink.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,91 @@
++#ifndef __LIBNETLINK_H__
++#define __LIBNETLINK_H__ 1
++
++#include <asm/types.h>
++// needed by netlink.h, should be in there
++#include <arpa/inet.h>
++#include <linux/netlink.h>
++#include <linux/rtnetlink.h>
++
++struct rtnl_handle
++{
++ int fd;
++ struct sockaddr_nl local;
++ struct sockaddr_nl peer;
++ __u32 seq;
++ __u32 dump;
++};
++
++extern int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions);
++extern int rtnl_open_byproto(struct rtnl_handle *rth, unsigned subscriptions, int protocol);
++extern void rtnl_close(struct rtnl_handle *rth);
++extern int rtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type);
++extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len);
++
++typedef int (*rtnl_filter_t)(const struct sockaddr_nl *,
++ struct nlmsghdr *n, void *);
++extern int rtnl_dump_filter(struct rtnl_handle *rth, rtnl_filter_t filter,
++ void *arg1,
++ rtnl_filter_t junk,
++ void *arg2);
++extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer,
++ unsigned groups, struct nlmsghdr *answer,
++ rtnl_filter_t junk,
++ void *jarg);
++extern int rtnl_send(struct rtnl_handle *rth, const char *buf, int);
++
++
++extern int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data);
++extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data, int alen);
++extern int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len);
++extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data);
++extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, const void *data, int alen);
++
++extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len);
++extern int parse_rtattr_byindex(struct rtattr *tb[], int max, struct rtattr *rta, int len);
++
++#define parse_rtattr_nested(tb, max, rta) \
++ (parse_rtattr((tb), (max), RTA_DATA(rta), RTA_PAYLOAD(rta)))
++
++extern int rtnl_listen(struct rtnl_handle *, rtnl_filter_t handler,
++ void *jarg);
++extern int rtnl_from_file(FILE *, rtnl_filter_t handler,
++ void *jarg);
++
++#define NLMSG_TAIL(nmsg) \
++ ((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
++
++#ifndef IFA_RTA
++#define IFA_RTA(r) \
++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
++#endif
++#ifndef IFA_PAYLOAD
++#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
++#endif
++
++#ifndef IFLA_RTA
++#define IFLA_RTA(r) \
++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
++#endif
++#ifndef IFLA_PAYLOAD
++#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
++#endif
++
++#ifndef NDA_RTA
++#define NDA_RTA(r) \
++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
++#endif
++#ifndef NDA_PAYLOAD
++#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
++#endif
++
++#ifndef NDTA_RTA
++#define NDTA_RTA(r) \
++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg))))
++#endif
++#ifndef NDTA_PAYLOAD
++#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
++#endif
++
++#endif /* __LIBNETLINK_H__ */
++
+diff -ruN acpid-1.0.8.orig/Makefile acpid-1.0.8/Makefile
+--- acpid-1.0.8.orig/Makefile 2008-11-03 14:04:43.000000000 +0100
++++ acpid-1.0.8/Makefile 2009-03-29 17:10:14.000000000 +0200
+@@ -12,7 +12,8 @@
+ BIN_PROGS = acpi_listen
+ PROGS = $(SBIN_PROGS) $(BIN_PROGS)
+
+-acpid_SRCS = acpid.c event.c ud_socket.c
++acpid_SRCS = acpid.c acpi_ids.c connection_list.c event.c input_layer.c \
++ libnetlink.c netlink.c proc.c sock.c ud_socket.c
+ acpid_OBJS = $(acpid_SRCS:.c=.o)
+
+ acpi_listen_SRCS = acpi_listen.c ud_socket.c
+diff -ruN acpid-1.0.8.orig/netlink.c acpid-1.0.8/netlink.c
+--- acpid-1.0.8.orig/netlink.c 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/netlink.c 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,239 @@
++/*
++ * netlink.c - Kernel ACPI Event Netlink Interface
++ *
++ * Handles the details of getting kernel ACPI events from netlink.
++ *
++ * Inspired by (and in some cases blatantly lifted from) Zhang Rui's
++ * acpi_genl and Alexey Kuznetsov's libnetlink. Thanks also to Yi Yang
++ * at intel.
++ *
++ * Copyright (C) 2008, Ted Felix (www.tedfelix.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
++ *
++ * (tabs at 4)
++ */
++
++/* system */
++#include <unistd.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++
++/* local */
++#include "acpid.h"
++#include "event.h"
++
++#include "libnetlink.h"
++#include "genetlink.h"
++#include "acpi_genetlink.h"
++
++#include "acpi_ids.h"
++#include "connection_list.h"
++
++static void
++format_netlink(struct nlmsghdr *msg)
++{
++ struct rtattr *tb[ACPI_GENL_ATTR_MAX + 1];
++ struct genlmsghdr *ghdr = NLMSG_DATA(msg);
++ int len;
++ struct rtattr *attrs;
++
++ len = msg->nlmsg_len;
++
++ /* if this message doesn't have the proper family ID, drop it */
++ if (msg->nlmsg_type != acpi_ids_getfamily()) {
++ if (logevents) {
++ acpid_log(LOG_INFO, "wrong netlink family ID.\n");
++ }
++ return;
++ }
++
++ len -= NLMSG_LENGTH(GENL_HDRLEN);
++
++ if (len < 0) {
++ acpid_log(LOG_WARNING,
++ "wrong netlink controller message len: %d\n", len);
++ return;
++ }
++
++ attrs = (struct rtattr *)((char *)ghdr + GENL_HDRLEN);
++ /* parse the attributes in this message */
++ parse_rtattr(tb, ACPI_GENL_ATTR_MAX, attrs, len);
++
++ /* if there's an ACPI event attribute... */
++ if (tb[ACPI_GENL_ATTR_EVENT]) {
++ /* get the actual event struct */
++ struct acpi_genl_event *event =
++ RTA_DATA(tb[ACPI_GENL_ATTR_EVENT]);
++ char buf[64];
++
++ /* format it */
++ snprintf(buf, sizeof(buf), "%s %s %08x %08x",
++ event->device_class, event->bus_id, event->type, event->data);
++
++ /* if we're locked, don't process the event */
++ if (locked()) {
++ if (logevents) {
++ acpid_log(LOG_INFO,
++ "lockfile present, not processing "
++ "netlink event \"%s\"\n", buf);
++ }
++ return;
++ }
++
++ if (logevents)
++ acpid_log(LOG_INFO,
++ "received netlink event \"%s\"\n", buf);
++
++ /* send the event off to the handler */
++ acpid_handle_event(buf);
++
++ if (logevents)
++ acpid_log(LOG_INFO,
++ "completed netlink event \"%s\"\n", buf);
++ }
++}
++
++/* (based on rtnl_listen() in libnetlink.c) */
++void
++process_netlink(int fd)
++{
++ int status;
++ struct nlmsghdr *h;
++ /* the address for recvmsg() */
++ struct sockaddr_nl nladdr;
++ /* the io vector for recvmsg() */
++ struct iovec iov;
++ /* recvmsg() parameters */
++ struct msghdr msg = {
++ .msg_name = &nladdr,
++ .msg_namelen = sizeof(nladdr),
++ .msg_iov = &iov,
++ .msg_iovlen = 1,
++ };
++ /* buffer for the incoming data */
++ char buf[8192];
++ static int nerrs;
++
++ /* set up the netlink address */
++ memset(&nladdr, 0, sizeof(nladdr));
++ nladdr.nl_family = AF_NETLINK;
++ nladdr.nl_pid = 0;
++ nladdr.nl_groups = 0;
++
++ /* set up the I/O vector */
++ iov.iov_base = buf;
++ iov.iov_len = sizeof(buf);
++
++ /* read the data into the buffer */
++ status = recvmsg(fd, &msg, 0);
++
++ /* if there was a problem, print a message and keep trying */
++ if (status < 0) {
++ /* if we were interrupted by a signal, bail */
++ if (errno == EINTR)
++ return;
++
++ acpid_log(LOG_ERR, "netlink read error: %s (%d)\n",
++ strerror(errno), errno);
++ if (++nerrs >= ACPID_MAX_ERRS) {
++ acpid_log(LOG_ERR,
++ "too many errors reading via "
++ "netlink - aborting\n");
++ exit(EXIT_FAILURE);
++ }
++ return;
++ }
++ /* if an orderly shutdown has occurred, we're done */
++ if (status == 0) {
++ acpid_log(LOG_WARNING, "netlink connection closed\n");
++ exit(EXIT_FAILURE);
++ }
++ /* check to see if the address length has changed */
++ if (msg.msg_namelen != sizeof(nladdr)) {
++ acpid_log(LOG_WARNING, "netlink unexpected length: "
++ "%d expected: %d\n", msg.msg_namelen, sizeof(nladdr));
++ return;
++ }
++
++ /* for each message received */
++ for (h = (struct nlmsghdr*)buf; (unsigned)status >= sizeof(*h); ) {
++ int len = h->nlmsg_len;
++ int l = len - sizeof(*h);
++
++ if (l < 0 || len > status) {
++ if (msg.msg_flags & MSG_TRUNC) {
++ acpid_log(LOG_WARNING, "netlink msg truncated (1)\n");
++ return;
++ }
++ acpid_log(LOG_WARNING,
++ "malformed netlink msg, length %d\n", len);
++ return;
++ }
++
++ /* format the message */
++ format_netlink(h);
++
++ status -= NLMSG_ALIGN(len);
++ h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len));
++ }
++ if (msg.msg_flags & MSG_TRUNC) {
++ acpid_log(LOG_WARNING, "netlink msg truncated (2)\n");
++ return;
++ }
++ if (status) {
++ acpid_log(LOG_WARNING, "netlink remnant of size %d\n", status);
++ return;
++ }
++
++ return;
++}
++
++/* convert the netlink multicast group number into a bit map */
++/* (e.g. 4 => 16, 5 => 32) */
++static __u32
++nl_mgrp(__u32 group)
++{
++ if (group > 31) {
++ fprintf(stderr, "%s: unexpected group number %d\n",
++ progname, group);
++ return 0;
++ }
++ return group ? (1 << (group - 1)) : 0;
++}
++
++void open_netlink(void)
++{
++ struct rtnl_handle rth;
++ struct connection c;
++
++ /* open the appropriate netlink socket for input */
++ if (rtnl_open_byproto(
++ &rth, nl_mgrp(acpi_ids_getgroup()), NETLINK_GENERIC) < 0) {
++ fprintf(stderr, "%s: cannot open generic netlink socket\n",
++ progname);
++ return;
++ }
++
++ if (acpid_debug)
++ fprintf(stderr, "%s: netlink opened successfully\n", progname);
++
++ /* add a connection to the list */
++ c.fd = rth.fd;
++ c.process = process_netlink;
++ add_connection(&c);
++}
+diff -ruN acpid-1.0.8.orig/netlink.h acpid-1.0.8/netlink.h
+--- acpid-1.0.8.orig/netlink.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/netlink.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,31 @@
++/*
++ * netlink.h - Kernel ACPI Event Netlink Interface
++ *
++ * Handles the details of getting kernel ACPI events from netlink.
++ *
++ * Copyright (C) 2008, Ted Felix (www.tedfelix.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
++ *
++ * (tabs at 4)
++ */
++
++#ifndef NETLINK_H__
++#define NETLINK_H__
++
++/* open the netlink connection */
++extern void open_netlink(void);
++
++#endif /* NETLINK_H__ */
+diff -ruN acpid-1.0.8.orig/proc.c acpid-1.0.8/proc.c
+--- acpid-1.0.8.orig/proc.c 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/proc.c 2009-03-29 17:18:26.000000000 +0200
+@@ -0,0 +1,207 @@
++/*
++ * proc.c - ACPI daemon proc filesystem interface
++ *
++ * Portions Copyright (C) 2000 Andrew Henroid
++ * Portions Copyright (C) 2001 Sun Microsystems
++ * Portions Copyright (C) 2004 Tim Hockin (thockin@hockin.org)
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 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 <unistd.h>
++#include <fcntl.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++
++#include "acpid.h"
++#include "event.h"
++#include "connection_list.h"
++
++const char *eventfile = ACPID_EVENTFILE;
++
++static char *read_line(int fd);
++
++static void
++process_proc(int fd)
++{
++ char *event;
++
++ /* read an event */
++ event = read_line(fd);
++
++ /* if we're locked, don't process the event */
++ if (locked()) {
++ if (logevents && event != NULL) {
++ acpid_log(LOG_INFO,
++ "lockfile present, not processing "
++ "event \"%s\"\n", event);
++ }
++ return;
++ }
++
++ /* handle the event */
++ if (event) {
++ if (logevents) {
++ acpid_log(LOG_INFO,
++ "procfs received event \"%s\"\n", event);
++ }
++ acpid_handle_event(event);
++ if (logevents) {
++ acpid_log(LOG_INFO,
++ "procfs completed event \"%s\"\n", event);
++ }
++ } else if (errno == EPIPE) {
++ acpid_log(LOG_WARNING,
++ "events file connection closed\n");
++ exit(EXIT_FAILURE);
++ } else {
++ static int nerrs;
++ if (++nerrs >= ACPID_MAX_ERRS) {
++ acpid_log(LOG_ERR,
++ "too many errors reading "
++ "events file - aborting\n");
++ exit(EXIT_FAILURE);
++ }
++ }
++}
++
++int
++open_proc()
++{
++ int fd;
++ struct connection c;
++
++ fd = open(eventfile, O_RDONLY);
++ if (fd < 0) {
++ if (acpid_debug)
++ fprintf(stderr, "%s: can't open %s: %s\n", progname,
++ eventfile, strerror(errno));
++ return -1;
++ }
++ fcntl(fd, F_SETFD, FD_CLOEXEC);
++
++ if (acpid_debug)
++ fprintf(stderr, "%s: proc fs opened successfully\n", progname);
++
++ /* add a connection to the list */
++ c.fd = fd;
++ c.process = process_proc;
++ add_connection(&c);
++
++ return 0;
++}
++
++/*
++ * This depends on fixes in linux ACPI after 2.4.8
++ */
++#define BUFLEN 1024
++static char *
++read_line(int fd)
++{
++ static char buf[BUFLEN];
++ int i = 0;
++ int r;
++ int searching = 1;
++
++ while (searching) {
++ memset(buf+i, 0, BUFLEN-i);
++
++ /* only go to BUFLEN-1 so there will always be a 0 at the end */
++ while (i < BUFLEN-1) {
++ r = read(fd, buf+i, 1);
++ if (r < 0 && errno != EINTR) {
++ /* we should do something with the data */
++ acpid_log(LOG_ERR, "read(): %s\n",
++ strerror(errno));
++ return NULL;
++ } else if (r == 0) {
++ /* signal this in an almost standard way */
++ errno = EPIPE;
++ return NULL;
++ } else if (r == 1) {
++ /* scan for a newline */
++ if (buf[i] == '\n') {
++ searching = 0;
++ buf[i] = '\0';
++ break;
++ }
++ i++;
++ }
++ }
++ if (i >= BUFLEN - 1)
++ break;
++ }
++
++ return buf;
++}
++
++#if 0
++/* This version leaks memory. The above version is simpler and leak-free. */
++/* Downside is that the above version always uses 1k of RAM. */
++/*
++ * This depends on fixes in linux ACPI after 2.4.8
++ */
++#define MAX_BUFLEN 1024
++static char *
++read_line(int fd)
++{
++ static char *buf;
++ int buflen = 64;
++ int i = 0;
++ int r;
++ int searching = 1;
++
++ while (searching) {
++ /* ??? This memory is leaked since it is never freed */
++ buf = realloc(buf, buflen);
++ if (!buf) {
++ acpid_log(LOG_ERR, "malloc(%d): %s\n",
++ buflen, strerror(errno));
++ return NULL;
++ }
++ memset(buf+i, 0, buflen-i);
++
++ while (i < buflen) {
++ r = read(fd, buf+i, 1);
++ if (r < 0 && errno != EINTR) {
++ /* we should do something with the data */
++ acpid_log(LOG_ERR, "read(): %s\n",
++ strerror(errno));
++ return NULL;
++ } else if (r == 0) {
++ /* signal this in an almost standard way */
++ errno = EPIPE;
++ return NULL;
++ } else if (r == 1) {
++ /* scan for a newline */
++ if (buf[i] == '\n') {
++ searching = 0;
++ buf[i] = '\0';
++ break;
++ }
++ i++;
++ }
++ }
++ if (buflen >= MAX_BUFLEN) {
++ break;
++ }
++ buflen *= 2;
++ }
++
++ return buf;
++}
++#endif
+diff -ruN acpid-1.0.8.orig/proc.h acpid-1.0.8/proc.h
+--- acpid-1.0.8.orig/proc.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/proc.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,30 @@
++/*
++ * proc.h - ACPI daemon proc filesystem interface
++ *
++ * Portions Copyright (C) 2000 Andrew Henroid
++ * Portions Copyright (C) 2001 Sun Microsystems
++ * Portions Copyright (C) 2004 Tim Hockin (thockin@hockin.org)
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 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 PROC_H__
++#define PROC_H__
++
++extern const char *eventfile;
++
++extern int open_proc();
++
++#endif /* PROC_H__ */
+diff -ruN acpid-1.0.8.orig/sock.c acpid-1.0.8/sock.c
+--- acpid-1.0.8.orig/sock.c 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/sock.c 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,98 @@
++/*
++ * sock.c - ACPI daemon socket interface
++ *
++ * Portions Copyright (C) 2000 Andrew Henroid
++ * Portions Copyright (C) 2001 Sun Microsystems
++ * Portions Copyright (C) 2004 Tim Hockin (thockin@hockin.org)
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 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 <unistd.h>
++#include <fcntl.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <errno.h>
++#include <grp.h>
++
++#include "acpid.h"
++#include "event.h"
++#include "ud_socket.h"
++#include "connection_list.h"
++
++const char *socketfile = ACPID_SOCKETFILE;
++const char *socketgroup;
++mode_t socketmode = ACPID_SOCKETMODE;
++
++static void
++process_sock(int fd)
++{
++ int cli_fd;
++ struct ucred creds;
++ char buf[32];
++
++ /* accept and add to our lists */
++ cli_fd = ud_accept(fd, &creds);
++ if (cli_fd < 0) {
++ acpid_log(LOG_ERR, "can't accept client: %s\n",
++ strerror(errno));
++ return;
++ }
++ fcntl(cli_fd, F_SETFD, FD_CLOEXEC);
++ snprintf(buf, sizeof(buf)-1, "%d[%d:%d]",
++ creds.pid, creds.uid, creds.gid);
++ acpid_add_client(cli_fd, buf);
++}
++
++void
++open_sock()
++{
++ int fd;
++ struct connection c;
++
++ fd = ud_create_socket(socketfile);
++ if (fd < 0) {
++ fprintf(stderr, "%s: can't open socket %s: %s\n",
++ progname, socketfile, strerror(errno));
++ exit(EXIT_FAILURE);
++ }
++ fcntl(fd, F_SETFD, FD_CLOEXEC);
++ chmod(socketfile, socketmode);
++ if (socketgroup) {
++ struct group *gr;
++ struct stat buf;
++ gr = getgrnam(socketgroup);
++ if (!gr) {
++ fprintf(stderr, "%s: group %s does not exist\n",
++ progname, socketgroup);
++ exit(EXIT_FAILURE);
++ }
++ if (stat(socketfile, &buf) < 0) {
++ fprintf(stderr, "%s: can't stat %s\n",
++ progname, socketfile);
++ exit(EXIT_FAILURE);
++ }
++ if (chown(socketfile, buf.st_uid, gr->gr_gid) < 0) {
++ fprintf(stderr, "%s: chown(): %s\n",
++ progname, strerror(errno));
++ exit(EXIT_FAILURE);
++ }
++ }
++
++ /* add a connection to the list */
++ c.fd = fd;
++ c.process = process_sock;
++ add_connection(&c);
++}
+diff -ruN acpid-1.0.8.orig/sock.h acpid-1.0.8/sock.h
+--- acpid-1.0.8.orig/sock.h 1970-01-01 01:00:00.000000000 +0100
++++ acpid-1.0.8/sock.h 2009-03-29 17:10:14.000000000 +0200
+@@ -0,0 +1,32 @@
++/*
++ * sock.h - ACPI daemon socket interface
++ *
++ * Portions Copyright (C) 2000 Andrew Henroid
++ * Portions Copyright (C) 2001 Sun Microsystems
++ * Portions Copyright (C) 2004 Tim Hockin (thockin@hockin.org)
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 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 SOCK_H__
++#define SOCK_H__
++
++extern const char *socketfile;
++extern const char *socketgroup;
++extern mode_t socketmode;
++
++extern void open_sock();
++
++#endif /* SOCK_H__ */
diff --git a/recipes/acpid/acpid_1.0.8.bb b/recipes/acpid/acpid_1.0.8.bb
new file mode 100644
index 0000000000..98638e6d1a
--- /dev/null
+++ b/recipes/acpid/acpid_1.0.8.bb
@@ -0,0 +1,6 @@
+require acpid.inc
+
+SRC_URI_append = " file://event.c.diff;patch=1 \
+ file://fixfd.diff;patch=1 \
+ file://netlink.diff;patch=1"
+
diff --git a/recipes/alsa/alsa-lib_1.0.19.bb b/recipes/alsa/alsa-lib_1.0.19.bb
new file mode 100644
index 0000000000..eff114de4b
--- /dev/null
+++ b/recipes/alsa/alsa-lib_1.0.19.bb
@@ -0,0 +1,48 @@
+DESCRIPTION = "Alsa sound library"
+HOMEPAGE = "http://www.alsa-project.org"
+SECTION = "libs/multimedia"
+LICENSE = "LGPL"
+
+# configure.in sets -D__arm__ on the command line for any arm system
+# (not just those with the ARM instruction set), this should be removed,
+# (or replaced by a permitted #define).
+#FIXME: remove the following
+ARM_INSTRUCTION_SET = "arm"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
+ file://fix-tstamp-declaration.patch;patch=1 \
+ file://fix_libmath.patch;patch=1 \
+ "
+
+inherit autotools pkgconfig
+
+
+EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python"
+
+
+require alsa-fpu.inc
+EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
+
+
+require alsa-versym.inc
+EXTRA_OECONF += "${@get_alsa_versym_setting(bb, d)} "
+
+
+do_stage () {
+ autotools_stage_all
+}
+
+PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc alsa-dev"
+FILES_${PN}-dbg += "${libdir}/alsa-lib/*/.debu*"
+FILES_libasound = "${libdir}/libasound.so.*"
+FILES_alsa-server = "${bindir}/*"
+FILES_alsa-conf = "${datadir}/alsa/"
+FILES_alsa-dev += "${libdir}/pkgconfig/ /usr/include/ ${datadir}/aclocal/*"
+FILES_alsa-conf-base = "\
+${datadir}/alsa/alsa.conf \
+${datadir}/alsa/cards/aliases.conf \
+${datadir}/alsa/pcm/default.conf \
+${datadir}/alsa/pcm/dmix.conf \
+${datadir}/alsa/pcm/dsnoop.conf"
+
+RDEPENDS_libasound = "alsa-conf-base"
diff --git a/recipes/alsa/alsa-lib_1.0.20.bb b/recipes/alsa/alsa-lib_1.0.20.bb
new file mode 100644
index 0000000000..eff114de4b
--- /dev/null
+++ b/recipes/alsa/alsa-lib_1.0.20.bb
@@ -0,0 +1,48 @@
+DESCRIPTION = "Alsa sound library"
+HOMEPAGE = "http://www.alsa-project.org"
+SECTION = "libs/multimedia"
+LICENSE = "LGPL"
+
+# configure.in sets -D__arm__ on the command line for any arm system
+# (not just those with the ARM instruction set), this should be removed,
+# (or replaced by a permitted #define).
+#FIXME: remove the following
+ARM_INSTRUCTION_SET = "arm"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
+ file://fix-tstamp-declaration.patch;patch=1 \
+ file://fix_libmath.patch;patch=1 \
+ "
+
+inherit autotools pkgconfig
+
+
+EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python"
+
+
+require alsa-fpu.inc
+EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
+
+
+require alsa-versym.inc
+EXTRA_OECONF += "${@get_alsa_versym_setting(bb, d)} "
+
+
+do_stage () {
+ autotools_stage_all
+}
+
+PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc alsa-dev"
+FILES_${PN}-dbg += "${libdir}/alsa-lib/*/.debu*"
+FILES_libasound = "${libdir}/libasound.so.*"
+FILES_alsa-server = "${bindir}/*"
+FILES_alsa-conf = "${datadir}/alsa/"
+FILES_alsa-dev += "${libdir}/pkgconfig/ /usr/include/ ${datadir}/aclocal/*"
+FILES_alsa-conf-base = "\
+${datadir}/alsa/alsa.conf \
+${datadir}/alsa/cards/aliases.conf \
+${datadir}/alsa/pcm/default.conf \
+${datadir}/alsa/pcm/dmix.conf \
+${datadir}/alsa/pcm/dsnoop.conf"
+
+RDEPENDS_libasound = "alsa-conf-base"
diff --git a/recipes/alsa/alsa-plugins_1.0.19.bb b/recipes/alsa/alsa-plugins_1.0.19.bb
new file mode 100644
index 0000000000..b17a3265e8
--- /dev/null
+++ b/recipes/alsa/alsa-plugins_1.0.19.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "ALSA Plugins"
+HOMEPAGE = "http://www.alsa-project.org"
+SECTION = "multimedia/alsa/plugins"
+LICENSE = "GPL"
+DEPENDS = "alsa-lib pulseaudio"
+PR = "r0"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-${PV}.tar.bz2"
+
+inherit autotools
+
+PACKAGES_DYNAMIC = "libasound-module*"
+
+python populate_packages_prepend() {
+ plugindir = bb.data.expand('${libdir}/alsa-lib/', d)
+ do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='' )
+}
+
+FILES_${PN}-dev += "${libdir}/alsa-lib/libasound*.a ${libdir}/alsa-lib/libasound*.la"
+FILES_${PN}-dbg += "${libdir}/alsa-lib/.debug"
diff --git a/recipes/alsa/alsa-scenario_0.2.bb b/recipes/alsa/alsa-scenario_0.2.bb
new file mode 100644
index 0000000000..3b4cf79f93
--- /dev/null
+++ b/recipes/alsa/alsa-scenario_0.2.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "ALSA Scenario Library"
+HOMEPAGE = "http://opensource.wolfsonmicro.com/node/22"
+SECTION = "console/utils"
+LICENSE = "GPL"
+DEPENDS = "alsa-lib ncurses"
+
+PR = "r0"
+PE = "1"
+
+SRC_URI = "http://slimlogic.co.uk/pub/downloads/libscenario/scenario-lib-0.2.0.tar.bz2"
+
+S = "${WORKDIR}/scenario-lib-0.2.0"
+
+inherit autotools
diff --git a/recipes/alsa/alsa-scenario_git.bb b/recipes/alsa/alsa-scenario_git.bb
index 74c25c247e..edc77d2bbc 100644
--- a/recipes/alsa/alsa-scenario_git.bb
+++ b/recipes/alsa/alsa-scenario_git.bb
@@ -3,11 +3,13 @@ HOMEPAGE = "http://opensource.wolfsonmicro.com/node/22"
SECTION = "console/utils"
LICENSE = "GPL"
DEPENDS = "alsa-lib ncurses"
-PV = "0.1+gitr${SRCREV}"
+PV = "0.2+gitr${SRCREV}"
PR = "r0"
PE = "1"
-SRC_URI = "git://opensource.wolfsonmicro.com/alsa-scenario;branch=master;protocol=git"
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "git://slimlogic.co.uk/alsa-scenario;branch=master;protocol=git"
S = "${WORKDIR}/git"
inherit autotools
diff --git a/recipes/alsa/alsa-state.bb b/recipes/alsa/alsa-state.bb
index 9bb22e2aa7..0963cc4ff8 100644
--- a/recipes/alsa/alsa-state.bb
+++ b/recipes/alsa/alsa-state.bb
@@ -7,7 +7,7 @@
DESCRIPTION = "Alsa Scenario Files"
LICENSE = "MIT"
PV = "0.2.0"
-PR = "r8"
+PR = "r9"
SRC_URI = "\
file://asound.conf \
diff --git a/recipes/alsa/alsa-state/angstrom/asound.conf b/recipes/alsa/alsa-state/angstrom/asound.conf
new file mode 100644
index 0000000000..f7e0e4a763
--- /dev/null
+++ b/recipes/alsa/alsa-state/angstrom/asound.conf
@@ -0,0 +1,2 @@
+# default angstrom configuration
+
diff --git a/recipes/alsa/alsa-utils-1.0.19/alsa-utils-remove-xmlto.patch b/recipes/alsa/alsa-utils-1.0.19/alsa-utils-remove-xmlto.patch
new file mode 100644
index 0000000000..53ff95a886
--- /dev/null
+++ b/recipes/alsa/alsa-utils-1.0.19/alsa-utils-remove-xmlto.patch
@@ -0,0 +1,18 @@
+Index: alsa-utils-1.0.19/alsactl/Makefile.am
+===================================================================
+--- alsa-utils-1.0.19.orig/alsactl/Makefile.am 2009-06-24 01:08:16.000000000 -0400
++++ alsa-utils-1.0.19/alsactl/Makefile.am 2009-06-24 01:08:26.000000000 -0400
+@@ -2,13 +2,7 @@
+
+ sbin_PROGRAMS=alsactl
+ man_MANS=alsactl.1
+-if USE_XMLTO
+-man_MANS += alsactl_init.7
+-endif
+ EXTRA_DIST=alsactl.1 alsactl_init.xml
+
+ alsactl_SOURCES=alsactl.c state.c utils.c init_parse.c
+ noinst_HEADERS=alsactl.h list.h init_sysdeps.c init_utils_string.c init_utils_run.c init_sysfs.c
+-
+-%.7: %.xml
+- xmlto man $?
diff --git a/recipes/alsa/alsa-utils_1.0.18.bb b/recipes/alsa/alsa-utils_1.0.18.bb
index 2931545252..40718b5500 100644
--- a/recipes/alsa/alsa-utils_1.0.18.bb
+++ b/recipes/alsa/alsa-utils_1.0.18.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.alsa-project.org"
SECTION = "console/utils"
LICENSE = "GPL"
DEPENDS = "alsa-lib ncurses"
-PR = "r1"
+PR = "r2"
SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
file://alsa-utils-automake.patch;patch=1 \
@@ -20,6 +20,7 @@ inherit autotools
do_configure_append() {
for i in $(find ${S} -name Makefile) ; do
sed -i -e s:/usr/include/ncurses:${STAGING_INCDIR}/ncurses:g $i
+ sed -i -e 's:-L/usr/lib -lncurses:-L${STAGING_LIBDIR} -lncurses:g' $i
done
}
diff --git a/recipes/alsa/alsa-utils_1.0.19.bb b/recipes/alsa/alsa-utils_1.0.19.bb
new file mode 100644
index 0000000000..9ff129f233
--- /dev/null
+++ b/recipes/alsa/alsa-utils_1.0.19.bb
@@ -0,0 +1,66 @@
+DESCRIPTION = "ALSA Utilities"
+HOMEPAGE = "http://www.alsa-project.org"
+SECTION = "console/utils"
+LICENSE = "GPL"
+DEPENDS = "alsa-lib ncurses"
+PR = "r0"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
+ file://alsa-utils-remove-xmlto.patch;patch=1 \
+ "
+
+
+inherit autotools
+
+# This are all packages that we need to make. Also, the now empty alsa-utils
+# ipk depend on them.
+
+
+do_configure_append() {
+ for i in $(find ${S} -name Makefile) ; do
+ sed -i -e s:/usr/include/ncurses:${STAGING_INCDIR}/ncurses:g $i
+ sed -i -e 's:-L/usr/lib -lncurses:-L${STAGING_LIBDIR} -lncurses:g' $i
+ done
+}
+
+PACKAGES += "\
+ alsa-utils-alsamixer \
+ alsa-utils-midi \
+ alsa-utils-aplay \
+ alsa-utils-amixer \
+ alsa-utils-aconnect \
+ alsa-utils-iecset \
+ alsa-utils-speakertest \
+ alsa-utils-aseqnet \
+ alsa-utils-aseqdump \
+ alsa-utils-alsaconf \
+ alsa-utils-alsactl "
+
+# We omit alsaconf, because
+# a) this is a bash script
+# b) it creates config files not suitable for OE-based distros
+
+FILES_${PN} = ""
+FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord"
+FILES_alsa-utils-amixer = "${bindir}/amixer"
+FILES_alsa-utils-alsamixer = "${bindir}/alsamixer"
+FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/"
+FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
+FILES_alsa-utils-aconnect = "${bindir}/aconnect"
+FILES_alsa-utils-aseqnet = "${bindir}/aseqnet"
+FILES_alsa-utils-iecset = "${bindir}/iecset"
+FILES_alsa-utils-alsactl = "${sbindir}/alsactl"
+FILES_alsa-utils-aseqdump = "${bindir}/aseqdump"
+FILES_alsa-utils-alsaconf = "${sbindir}/alsaconf"
+
+DESCRIPTION_alsa-utils-aplay = "play (and record) sound files via ALSA"
+DESCRIPTION_alsa-utils-amixer = "command-line based control for ALSA mixer and settings"
+DESCRIPTION_alsa-utils-alsamixer = "ncurses based control for ALSA mixer and settings"
+DESCRIPTION_alsa-utils-speakertest = "ALSA surround speaker test utility"
+DESCRIPTION_alsa-utils-midi = "miscalleanous MIDI utilities for ALSA"
+DESCRIPTION_alsa-utils-aconnect = "ALSA sequencer connection manager"
+DESCRIPTION_alsa-utils-aseqnet = "network client/server on ALSA sequencer"
+DESCRIPTION_alsa-utils-alsactl = "saves/restores ALSA-settings in /etc/asound.state"
+DESCRIPTION_alsa-utils-alsaconf = "a bash script that creates ALSA configuration files"
+
+ALLOW_EMPTY_alsa-utils = "1"
diff --git a/recipes/angstrom/angstrom-gpe-task-base.bb b/recipes/angstrom/angstrom-gpe-task-base.bb
index 87da07c4f3..7e22295491 100644
--- a/recipes/angstrom/angstrom-gpe-task-base.bb
+++ b/recipes/angstrom/angstrom-gpe-task-base.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Task packages for the Angstrom distribution"
-PR = "r39"
+PR = "r40"
inherit task
diff --git a/recipes/angstrom/angstrom-led-config.bb b/recipes/angstrom/angstrom-led-config.bb
index 12cdb96d93..464979b39c 100644
--- a/recipes/angstrom/angstrom-led-config.bb
+++ b/recipes/angstrom/angstrom-led-config.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Configuration files for runtime LED configuration"
#PV = "${DISTRO_VERSION}"
-PR = "r4"
+PR = "r5"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit update-rc.d
diff --git a/recipes/angstrom/angstrom-led-config/sheevaplug/leds b/recipes/angstrom/angstrom-led-config/sheevaplug/leds
new file mode 100644
index 0000000000..d39426bd90
--- /dev/null
+++ b/recipes/angstrom/angstrom-led-config/sheevaplug/leds
@@ -0,0 +1,2 @@
+#file format: name trigger
+plug:green:health heartbeat
diff --git a/recipes/angstrom/angstrom-x11-base-depends.bb b/recipes/angstrom/angstrom-x11-base-depends.bb
index cbad108680..0395c62450 100644
--- a/recipes/angstrom/angstrom-x11-base-depends.bb
+++ b/recipes/angstrom/angstrom-x11-base-depends.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Task packages for the Angstrom distribution"
-PR = "r42"
+PR = "r43"
inherit task
@@ -15,4 +15,3 @@ RDEPENDS = "\
ttf-dejavu-sans \
ttf-dejavu-sans-mono \
"
-
diff --git a/recipes/angstrom/e-wm-config-angstrom.bb b/recipes/angstrom/e-wm-config-angstrom.bb
index 3117dd9366..5b3308811c 100644
--- a/recipes/angstrom/e-wm-config-angstrom.bb
+++ b/recipes/angstrom/e-wm-config-angstrom.bb
@@ -2,21 +2,16 @@ DESCRIPTION = "Enlightenment DR17 theme for Angstrom"
LICENSE = "MIT/BSD"
DEPENDS = "edje-native eet-native"
RDEPENDS = "e-wm"
-RRECOMMENDS_${PN} = "places systray"
+RRECOMMENDS = "places gnome-icon-theme"
-PR = "r6"
+PACKAGES_DYNAMIC = "e-wm-config-angstrom*"
+
+PR = "r11"
SRC_URI = " \
- file://e.src \
- file://icon.png \
- file://*.src \
- file://profile.desktop \
+ file://configs \
"
-S = "${WORKDIR}/angstrom"
-
-do_configure() {
- cp ${WORKDIR}/*.src ${WORKDIR}/*.desktop ${WORKDIR}/*.png ${S}/
-}
+S = "${WORKDIR}/configs"
# [09:16:17] * koen mumbles something about binary config file
# [09:16:19] <raster> eet -d e.cfg config e.src
@@ -25,20 +20,29 @@ do_configure() {
# [09:17:12] <raster> will re-encode
do_compile() {
+rm ${S}/patches -rf
+for dir in ${S}/* ; do
+ cd $dir
for i in *.src ; do
eet -e $(echo $i | sed s:src:cfg:g) config $i 1
done
+done
}
do_install() {
- install -d ${D}${datadir}/enlightenment/data/config/angstrom/
+ for i in ${WORKDIR}/configs/* ; do
+ install -d ${D}${datadir}/enlightenment/data/config/$(basename $i)/
- install -m 0644 ${S}/*.cfg ${D}${datadir}/enlightenment/data/config/angstrom/
- install -m 0644 ${S}/*.desktop ${D}${datadir}/enlightenment/data/config/angstrom/
- install -m 0644 ${S}/*.png ${D}${datadir}/enlightenment/data/config/angstrom/
+ install -m 0644 ${S}/$(basename $i)/*.cfg ${D}${datadir}/enlightenment/data/config/$(basename $i)/
+ install -m 0644 ${S}/$(basename $i)/*.desktop ${D}${datadir}/enlightenment/data/config/$(basename $i)/
+ install -m 0644 ${S}/$(basename $i)/*.png ${D}${datadir}/enlightenment/data/config/$(basename $i)/
+ done
}
-FILES_${PN} = "${datadir}/enlightenment"
+python populate_packages_prepend () {
+ angstrom_e_dir = bb.data.expand('${datadir}/enlightenment/data/config', d)
+ do_split_packages(d, angstrom_e_dir, '(.*)', 'e-wm-config-%s', 'E17 window manager %s config', extra_depends='', allow_links=True, allow_dirs=True)
+}
-PACKAGE_ARCH_${PN} = "all"
+PACKAGE_ARCH = "all"
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/e.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/e.src
new file mode 100644
index 0000000000..e4b6e130e2
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/e.src
@@ -0,0 +1,903 @@
+group "E_Config" struct {
+ value "config_version" int: 65843;
+ value "show_splash" int: 1;
+ value "init_default_theme" string: "default.edj";
+ value "desktop_default_name" string: "Desktop %i, %i";
+ value "menus_scroll_speed" double: 1000.0000000000000000000000000;
+ value "menus_fast_mouse_move_threshhold" double: 300.0000000000000000000000000;
+ value "menus_click_drag_timeout" double: 0.2500000000000000000000000;
+ value "border_shade_animate" int: 1;
+ value "border_shade_transition" int: 3;
+ value "border_shade_speed" double: 3000.0000000000000000000000000;
+ value "framerate" double: 25.0000000000000000000000000;
+ value "priority" int: 1;
+ value "image_cache" int: 2048;
+ value "font_cache" int: 512;
+ value "edje_cache" int: 8;
+ value "edje_collection_cache" int: 24;
+ value "zone_desks_x_count" int: 4;
+ value "zone_desks_y_count" int: 1;
+ value "use_virtual_roots" int: 0;
+ value "show_desktop_icons" int: 0;
+ value "edge_flip_dragging" int: 0;
+ value "evas_engine_default" int: 1;
+ value "evas_engine_container" int: 0;
+ value "evas_engine_init" int: 0;
+ value "evas_engine_menus" int: 0;
+ value "evas_engine_borders" int: 0;
+ value "evas_engine_errors" int: 0;
+ value "evas_engine_popups" int: 0;
+ value "evas_engine_drag" int: 0;
+ value "evas_engine_win" int: 0;
+ value "evas_engine_zone" int: 0;
+ value "use_composite" int: 0;
+ value "language" string: "en_US.UTF-8";
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "gadman";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 100;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "illume";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 1;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "start";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_desk";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_dialogs";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_imc";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_keybindings";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_intl";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_mouse_cursor";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_transitions";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_display";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_profiles";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_performance";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_fonts";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_engine";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_startup";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_theme";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_wallpaper";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "dropshadow";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_desks";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_scale";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "battery";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "mixer";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "clock";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "pager";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "syscon";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "cpufreq";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "systray";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "msgbus_lang";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "fileman";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "places";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "temperature";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_icon_theme";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_applications";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "themes" list {
+ group "E_Config_Theme" struct {
+ value "category" string: "theme";
+ value "file" string: "illume.edj";
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 0;
+ value "key" string: "Execute";
+ value "action" string: "delayed_action";
+ value "params" string: "[0.0 syscon] [2.0 halt_now]";
+ value "any_mod" uchar: 1;
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,[12]";
+ value "source" string: "e.event.close";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_close";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.titlebar";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_move";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,up,1";
+ value "source" string: "e.event.titlebar";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_move";
+ value "params" string: "end";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.tl";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "tl";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.t";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "t";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.tr";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "tr";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.r";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "r";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.br";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "br";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.b";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "b";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.bl";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "bl";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.l";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "l";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,up,1";
+ value "source" string: "e.event.resize.*";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "end";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,3";
+ value "source" string: "e.event.resize.*";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_move";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,up,3";
+ value "source" string: "e.event.resize.*";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_move";
+ value "params" string: "end";
+ }
+ }
+ value "window_placement_policy" int: 0;
+ value "focus_policy" int: 0;
+ value "focus_setting" int: 1;
+ value "pass_click_on" int: 1;
+ value "always_click_to_raise" int: 0;
+ value "always_click_to_focus" int: 0;
+ value "use_auto_raise" int: 0;
+ value "auto_raise_delay" double: 0.5000000000000000000000000;
+ value "use_resist" int: 1;
+ value "drag_resist" int: 16;
+ value "desk_resist" int: 32;
+ value "window_resist" int: 12;
+ value "gadget_resist" int: 32;
+ value "winlist_warp_while_selecting" int: 1;
+ value "winlist_warp_at_end" int: 1;
+ value "winlist_warp_speed" double: 0.1000000000000000055511151;
+ value "winlist_scroll_animate" int: 1;
+ value "winlist_scroll_speed" double: 0.1000000000000000055511151;
+ value "winlist_list_show_iconified" int: 1;
+ value "winlist_list_show_other_desk_iconified" int: 1;
+ value "winlist_list_show_other_screen_iconified" int: 0;
+ value "winlist_list_show_other_desk_windows" int: 0;
+ value "winlist_list_show_other_screen_windows" int: 0;
+ value "winlist_list_uncover_while_selecting" int: 0;
+ value "winlist_list_jump_desk_while_selecting" int: 0;
+ value "winlist_list_focus_while_selecting" int: 1;
+ value "winlist_list_raise_while_selecting" int: 1;
+ value "winlist_pos_align_x" double: 0.5000000000000000000000000;
+ value "winlist_pos_align_y" double: 0.5000000000000000000000000;
+ value "winlist_pos_size_w" double: 0.5000000000000000000000000;
+ value "winlist_pos_size_h" double: 0.5000000000000000000000000;
+ value "winlist_pos_min_w" int: 0;
+ value "winlist_pos_min_h" int: 0;
+ value "winlist_pos_max_w" int: 320;
+ value "winlist_pos_max_h" int: 320;
+ value "maximize_policy" int: 50;
+ value "allow_manip" int: 0;
+ value "border_fix_on_shelf_toggle" int: 0;
+ value "allow_above_fullscreen" int: 0;
+ value "kill_if_close_not_possible" int: 1;
+ value "kill_process" int: 1;
+ value "kill_timer_wait" double: 10.0000000000000000000000000;
+ value "ping_clients" int: 1;
+ value "transition_desk" string: "vswipe";
+ value "transition_change" string: "crossfade";
+ value "remember_internal_windows" int: 0;
+ value "move_info_follows" int: 1;
+ value "resize_info_follows" int: 1;
+ value "move_info_visible" int: 1;
+ value "resize_info_visible" int: 1;
+ value "focus_last_focused_per_desktop" int: 1;
+ value "focus_revert_on_hide_or_close" int: 1;
+ value "pointer_slide" int: 0;
+ value "use_e_cursor" int: 1;
+ value "cursor_size" int: 32;
+ value "menu_autoscroll_margin" int: 0;
+ value "menu_autoscroll_cursor_margin" int: 1;
+ value "transient.move" int: 1;
+ value "transient.resize" int: 0;
+ value "transient.raise" int: 1;
+ value "transient.lower" int: 1;
+ value "transient.layer" int: 1;
+ value "transient.desktop" int: 1;
+ value "transient.iconify" int: 1;
+ value "modal_windows" int: 1;
+ value "menu_eap_name_show" int: 1;
+ value "menu_eap_generic_show" int: 1;
+ value "menu_eap_comment_show" int: 0;
+ value "fullscreen_policy" int: 0;
+ value "exebuf_max_exe_list" int: 20;
+ value "exebuf_max_eap_list" int: 20;
+ value "exebuf_max_hist_list" int: 20;
+ value "exebuf_scroll_animate" int: 1;
+ value "exebuf_scroll_speed" double: 0.1000000000000000055511151;
+ value "exebuf_pos_align_x" double: 0.5000000000000000000000000;
+ value "exebuf_pos_align_y" double: 0.5000000000000000000000000;
+ value "exebuf_pos_size_w" double: 0.7500000000000000000000000;
+ value "exebuf_pos_size_h" double: 0.2500000000000000000000000;
+ value "exebuf_pos_min_w" int: 200;
+ value "exebuf_pos_min_h" int: 160;
+ value "exebuf_pos_max_w" int: 400;
+ value "exebuf_pos_max_h" int: 320;
+ value "exebuf_term_cmd" string: "xterm -hold -e";
+ value "use_app_icon" int: 0;
+ value "cnfmdlg_disabled" int: 0;
+ value "cfgdlg_auto_apply" int: 0;
+ value "cfgdlg_default_mode" int: 0;
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "slipshelf";
+ value "id" int: 0;
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "clock";
+ value "id" string: "clock";
+ value "geom.pos" int: 720;
+ value "geom.size" int: 42;
+ value "geom.res" int: 138;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 1;
+ value "state_info.flags" int: 1;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "battery";
+ value "id" string: "battery";
+ value "geom.pos" int: 720;
+ value "geom.size" int: 52;
+ value "geom.res" int: 142;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 4;
+ value "state_info.flags" int: 1;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "mixer";
+ value "id" string: "mixer.0";
+ value "geom.pos" int: 720;
+ value "geom.size" int: 80;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 5;
+ value "state_info.flags" int: 0;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "start";
+ value "id" string: "start";
+ value "geom.pos" int: 720;
+ value "geom.size" int: 80;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 6;
+ value "state_info.flags" int: 0;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ }
+ }
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "slipshelf_extra";
+ value "id" int: 0;
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "configuration";
+ value "id" string: "configuration";
+ value "geom.pos" int: 0;
+ value "geom.size" int: 32;
+ value "geom.res" int: 472;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 1;
+ value "state_info.flags" int: 1;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "pager";
+ value "id" string: "pager";
+ value "geom.pos" int: 376;
+ value "geom.size" int: 96;
+ value "geom.res" int: 472;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 4;
+ value "state_info.flags" int: 0;
+ value "style" string: "inset";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "systray";
+ value "id" string: "systray";
+ value "geom.pos" int: 720;
+ value "geom.size" int: 80;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 5;
+ value "state_info.flags" int: 0;
+ value "style" string: "inset";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ }
+ }
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "gadman";
+ value "id" int: 114;
+ }
+ }
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "gadman_top";
+ value "id" int: 115;
+ }
+ }
+ value "font_hinting" int: 0;
+ value "desklock_auth_method" int: 0;
+ value "desklock_login_box_zone" int: -1;
+ value "desklock_start_locked" int: 0;
+ value "desklock_autolock_screensaver" int: 0;
+ value "desklock_post_screensaver_time" double: 0.0000000000000000000000000;
+ value "desklock_autolock_idle" int: 0;
+ value "desklock_autolock_idle_timeout" double: 300.0000000000000000000000000;
+ value "desklock_use_custom_desklock" int: 0;
+ value "desklock_ask_presentation" uchar: 1;
+ value "desklock_ask_presentation_timeout" double: 30.0000000000000000000000000;
+ value "display_res_restore" int: 0;
+ value "display_res_width" int: 1;
+ value "display_res_height" int: 1;
+ value "display_res_hz" int: 0;
+ value "display_res_rotation" int: 0;
+ value "screensaver_enable" int: 1;
+ value "screensaver_timeout" int: 30;
+ value "screensaver_interval" int: 5;
+ value "screensaver_blanking" int: 2;
+ value "screensaver_expose" int: 2;
+ value "screensaver_ask_presentation" uchar: 1;
+ value "screensaver_ask_presentation_timeout" double: 30.0000000000000000000000000;
+ value "dpms_enable" int: 0;
+ value "dpms_standby_enable" int: 0;
+ value "dpms_suspend_enable" int: 0;
+ value "dpms_off_enable" int: 0;
+ value "dpms_standby_timeout" int: 0;
+ value "dpms_suspend_timeout" int: 0;
+ value "dpms_off_timeout" int: 0;
+ value "clientlist_group_by" int: 0;
+ value "clientlist_include_all_zones" int: 0;
+ value "clientlist_separate_with" int: 0;
+ value "clientlist_sort_by" int: 0;
+ value "clientlist_separate_iconified_apps" int: 0;
+ value "clientlist_warp_to_iconified_desktop" int: 0;
+ value "clientlist_limit_caption_len" int: 0;
+ value "clientlist_max_caption_len" int: 2;
+ value "mouse_hand" int: 1;
+ value "mouse_accel_numerator" int: 2;
+ value "mouse_accel_denominator" int: 1;
+ value "mouse_accel_threshold" int: 4;
+ value "border_raise_on_mouse_action" int: 1;
+ value "border_raise_on_focus" int: 1;
+ value "desk_flip_wrap" int: 0;
+ value "fullscreen_flip" int: 1;
+ value "icon_theme" string: "gnome";
+ value "icon_theme_overrides" uchar: 1;
+ value "desk_flip_animate_mode" int: 0;
+ value "desk_flip_animate_interpolation" int: 0;
+ value "desk_flip_animate_time" double: 0.2000000000000000111022302;
+ value "desk_flip_pan_bg" uchar: 0;
+ value "desk_flip_pan_x_axis_factor" double: 0.0000000000000000000000000;
+ value "desk_flip_pan_y_axis_factor" double: 0.0000000000000000000000000;
+ value "wallpaper_import_last_dev" string: "~/";
+ value "wallpaper_import_last_path" string: "/";
+ value "wallpaper_grad_c1_r" int: 0;
+ value "wallpaper_grad_c1_g" int: 0;
+ value "wallpaper_grad_c1_b" int: 0;
+ value "wallpaper_grad_c2_r" int: 255;
+ value "wallpaper_grad_c2_g" int: 255;
+ value "wallpaper_grad_c2_b" int: 255;
+ value "theme_default_border_style" string: "default";
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/jpeg";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/png";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/x-pixmap";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/x-xpixmap";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/svg+xml";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/gif";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/tiff";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "application/x-edje";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "application/x-desktop";
+ value "icon" string: "DESKTOP";
+ }
+ }
+ value "desk_auto_switch" int: 0;
+ value "thumb_nice" int: 0;
+ value "menu_favorites_show" int: 1;
+ value "menu_apps_show" int: 1;
+ value "ping_clients_interval" int: 128;
+ value "cache_flush_poll_interval" int: 512;
+ value "thumbscroll_enable" int: 1;
+ value "thumbscroll_threshhold" int: 36;
+ value "thumbscroll_momentum_threshhold" double: 100.0000000000000000000000000;
+ value "thumbscroll_friction" double: 1.0000000000000000000000000;
+ value "hal_desktop" int: 0;
+ value "hal_auto_mount" int: 1;
+ value "hal_auto_open" int: 1;
+ value "border_keyboard.timeout" double: 5.0000000000000000000000000;
+ value "border_keyboard.move.dx" uchar: 5;
+ value "border_keyboard.move.dy" uchar: 5;
+ value "border_keyboard.resize.dx" uchar: 5;
+ value "border_keyboard.resize.dy" uchar: 5;
+ value "scale.min" double: 0.9000000000000000222044605;
+ value "scale.max" double: 4.0000000000000000000000000;
+ value "scale.factor" double: 1.0000000000000000000000000;
+ value "scale.base_dpi" int: 142;
+ value "scale.use_dpi" uchar: 1;
+ value "scale.use_custom" uchar: 0;
+ value "show_cursor" uchar: 0;
+ value "idle_cursor" uchar: 0;
+ value "cfgdlg_normal_wins" uchar: 1;
+ value "syscon.main.icon_size" int: 64;
+ value "syscon.secondary.icon_size" int: 48;
+ value "syscon.extra.icon_size" int: 48;
+ value "syscon.timeout" double: 5.0000000000000000000000000;
+ value "syscon.do_input" uchar: 0;
+ group "syscon.actions" list {
+ group "E_Config_Syscon_Action" struct {
+ value "action" string: "suspend";
+ value "params" string: "now";
+ value "button" string: "button";
+ value "icon" string: "system-suspend";
+ value "is_main" int: 1;
+ }
+ }
+ group "syscon.actions" list {
+ group "E_Config_Syscon_Action" struct {
+ value "action" string: "desk_lock";
+ value "button" string: "button";
+ value "icon" string: "system-lock-screen";
+ value "is_main" int: 1;
+ }
+ }
+ group "syscon.actions" list {
+ group "E_Config_Syscon_Action" struct {
+ value "action" string: "halt";
+ value "params" string: "now";
+ value "button" string: "button";
+ value "icon" string: "system-shutdown";
+ value "is_main" int: 0;
+ }
+ }
+ value "mode.presentation" uchar: 0;
+ value "mode.offline" uchar: 0;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/icon.png b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/icon.png
index f6fa12f4ff..f6fa12f4ff 100644
--- a/recipes/angstrom/e-wm-config-angstrom/icon.png
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/icon.png
Binary files differ
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.battery.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.battery.src
new file mode 100644
index 0000000000..854be11b99
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.battery.src
@@ -0,0 +1,7 @@
+group "Battery_Config" struct {
+ value "poll_interval" int: 32;
+ value "alert" int: 10;
+ value "alert_p" int: 10;
+ value "alert_timeout" int: 0;
+ value "force_mode" int: 0;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/module.cpufreq.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.cpufreq.src
index c782ac20b5..c782ac20b5 100644
--- a/recipes/angstrom/e-wm-config-angstrom/module.cpufreq.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.cpufreq.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.dropshadow.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.dropshadow.src
new file mode 100644
index 0000000000..4c2af60659
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.dropshadow.src
@@ -0,0 +1,7 @@
+group "Dropshadow_Config" struct {
+ value "shadow_x" int: 0;
+ value "shadow_y" int: 0;
+ value "blur_size" int: 10;
+ value "quality" int: 4;
+ value "shadow_darkness" double: 0.5000000000000000000000000;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/module.fileman.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.fileman.src
index b40eec6129..b40eec6129 100644
--- a/recipes/angstrom/e-wm-config-angstrom/module.fileman.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.fileman.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.gadman.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.gadman.src
new file mode 100644
index 0000000000..a0da14be8b
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.gadman.src
@@ -0,0 +1,9 @@
+group "Gadman_Config" struct {
+ value "bg_type" int: 0;
+ value "color_r" int: 255;
+ value "color_g" int: 255;
+ value "color_b" int: 255;
+ value "color_a" int: 255;
+ value "anim_bg" int: 1;
+ value "anim_gad" int: 1;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/module.ibar.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.ibar.src
index 55757663d2..55757663d2 100644
--- a/recipes/angstrom/e-wm-config-angstrom/module.ibar.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.ibar.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/module.ibox.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.ibox.src
index 1126554a1b..1126554a1b 100644
--- a/recipes/angstrom/e-wm-config-angstrom/module.ibox.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.ibox.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.illume.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.illume.src
new file mode 100644
index 0000000000..0adf45b763
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.illume.src
@@ -0,0 +1,18 @@
+group "Illume_Cfg" struct {
+ value "config_version" int: 3;
+ value "launcher.mode" int: 1;
+ value "launcher.icon_size" int: 120;
+ value "launcher.single_click" int: 1;
+ value "power.auto_suspend" int: 1;
+ value "power.auto_suspend_delay" int: 1;
+ value "performance.cache_level" int: 3;
+ value "performance.fps" int: 25;
+ value "slipshelf.main_gadget_size" int: 56;
+ value "slipshelf.extra_gagdet_size" int: 48;
+ value "slipshelf.style" int: 1;
+ value "sliding.slipshelf.duration" int: 1000;
+ value "sliding.kbd.duration" int: 1000;
+ value "sliding.busywin.duration" int: 1000;
+ value "sliding.layout.duration" int: 1000;
+ value "kbd.use_internal" int: 1;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.mixer.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.mixer.src
new file mode 100644
index 0000000000..2647520e57
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.mixer.src
@@ -0,0 +1,13 @@
+group "Mixer_Module_Config" struct {
+ value "version" int: 3;
+ value "default_gc_id" string: "mixer.0";
+ group "gadgets" hash {
+ key "mixer.0";
+ group "Mixer_Gadget_Config" struct {
+ value "lock_sliders" int: 1;
+ value "show_locked" int: 0;
+ value "card" string: "hw:0";
+ value "channel_name" string: "Carkit";
+ }
+ }
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.pager.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.pager.src
new file mode 100644
index 0000000000..320830c222
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.pager.src
@@ -0,0 +1,15 @@
+group "Pager_Config" struct {
+ value "popup" uint: 1;
+ value "popup_speed" double: 1.0000000000000000000000000;
+ value "popup_urgent" uint: 0;
+ value "popup_urgent_stick" uint: 0;
+ value "popup_urgent_speed" double: 1.5000000000000000000000000;
+ value "show_desk_names" uint: 0;
+ value "popup_height" int: 60;
+ value "popup_act_height" int: 60;
+ value "drag_resist" uint: 3;
+ value "btn_drag" uchar: 1;
+ value "btn_noplace" uchar: 2;
+ value "btn_desk" uchar: 0;
+ value "flip_desk" uchar: 0;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.places.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.places.src
new file mode 100644
index 0000000000..5ec10776e7
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.places.src
@@ -0,0 +1,25 @@
+group "Config" struct {
+ value "version" int: 65679;
+ value "fm" string: "";
+ value "auto_mount" uchar: 1;
+ value "auto_open" uchar: 0;
+ group "conf_items" list {
+ group "Config_Item" struct {
+ value "id" string: "Places.1";
+ value "switch2" int: 0;
+ }
+ }
+ group "conf_items" list {
+ group "Config_Item" struct {
+ value "id" string: "Places.2";
+ value "switch2" int: 0;
+ }
+ }
+ value "show_menu" uchar: 1;
+ value "show_home" uchar: 1;
+ value "show_desk" uchar: 0;
+ value "show_trash" uchar: 0;
+ value "show_root" uchar: 1;
+ value "show_temp" uchar: 0;
+ value "show_bookm" uchar: 1;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/module.temperature.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.temperature.src
index dcad5332e1..dcad5332e1 100644
--- a/recipes/angstrom/e-wm-config-angstrom/module.temperature.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/module.temperature.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/profile.desktop b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/profile.desktop
new file mode 100644
index 0000000000..492f141057
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-touchscreen/profile.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Type=Link
+Name=Angstrom Touchscreen
+Icon=icon.png
+Comment=This is the Angstrom profile that is tweaked for touchscreen devices.
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/e.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/e.src
new file mode 100644
index 0000000000..704e00e0b1
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/e.src
@@ -0,0 +1,2154 @@
+group "E_Config" struct {
+ value "config_version" int: 65843;
+ value "show_splash" int: 0;
+ value "init_default_theme" string: "default.edj";
+ value "desktop_default_name" string: "Desktop %i, %i";
+ value "menus_scroll_speed" double: 1000.0000000000000000000000000;
+ value "menus_fast_mouse_move_threshhold" double: 300.0000000000000000000000000;
+ value "menus_click_drag_timeout" double: 0.2500000000000000000000000;
+ value "border_shade_animate" int: 1;
+ value "border_shade_transition" int: 3;
+ value "border_shade_speed" double: 3000.0000000000000000000000000;
+ value "framerate" double: 25.0000000000000000000000000;
+ value "priority" int: 0;
+ value "image_cache" int: 4096;
+ value "font_cache" int: 512;
+ value "edje_cache" int: 32;
+ value "edje_collection_cache" int: 64;
+ value "zone_desks_x_count" int: 4;
+ value "zone_desks_y_count" int: 1;
+ value "use_virtual_roots" int: 0;
+ value "show_desktop_icons" int: 1;
+ value "edge_flip_dragging" int: 1;
+ value "evas_engine_default" int: 1;
+ value "evas_engine_container" int: 0;
+ value "evas_engine_init" int: 0;
+ value "evas_engine_menus" int: 0;
+ value "evas_engine_borders" int: 0;
+ value "evas_engine_errors" int: 0;
+ value "evas_engine_popups" int: 0;
+ value "evas_engine_drag" int: 0;
+ value "evas_engine_win" int: 0;
+ value "evas_engine_zone" int: 0;
+ value "use_composite" int: 0;
+ value "language" string: "en_US.UTF-8";
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "gadman";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 100;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "systray";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "start";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "ibar";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "ibox";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "clock";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "cpufreq";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "pager";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "exebuf";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "winlist";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_applications";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_borders";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_clientlist";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_colors";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_desk";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_desklock";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_desks";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_dialogs";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_display";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_dpms";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_exebuf";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_fonts";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_icon_theme";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_imc";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_intl";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_keybindings";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_menus";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_mime";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_mouse";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_mousebindings";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_mouse_cursor";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_paths";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_performance";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_profiles";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_screensaver";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_shelves";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_startup";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_theme";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_transitions";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_wallpaper";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_window_display";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_window_focus";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_window_manipulation";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_winlist";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_engine";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "fileman";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_interaction";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_scale";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "conf_window_remembers";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "mixer";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "places";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "msgbus_lang";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 0;
+ value "priority" int: 0;
+ }
+ }
+ group "modules" list {
+ group "E_Config_Module" struct {
+ value "name" string: "syscon";
+ value "enabled" uchar: 1;
+ value "delayed" uchar: 1;
+ value "priority" int: 0;
+ }
+ }
+ group "font_defaults" list {
+ group "E_Font_Default" struct {
+ value "text_class" string: "default";
+ value "font" string: "Vera";
+ value "size" int: 10;
+ }
+ }
+ group "themes" list {
+ group "E_Config_Theme" struct {
+ value "category" string: "theme";
+ value "file" string: "default.edj";
+ }
+ }
+ group "mouse_bindings" list {
+ group "E_Config_Binding_Mouse" struct {
+ value "context" int: 2;
+ value "modifiers" int: 4;
+ value "action" string: "window_move";
+ value "button" uchar: 1;
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "mouse_bindings" list {
+ group "E_Config_Binding_Mouse" struct {
+ value "context" int: 2;
+ value "modifiers" int: 4;
+ value "action" string: "window_resize";
+ value "button" uchar: 2;
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "mouse_bindings" list {
+ group "E_Config_Binding_Mouse" struct {
+ value "context" int: 2;
+ value "modifiers" int: 4;
+ value "action" string: "window_menu";
+ value "button" uchar: 3;
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "mouse_bindings" list {
+ group "E_Config_Binding_Mouse" struct {
+ value "context" int: 3;
+ value "modifiers" int: 0;
+ value "action" string: "menu_show";
+ value "params" string: "main";
+ value "button" uchar: 1;
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "mouse_bindings" list {
+ group "E_Config_Binding_Mouse" struct {
+ value "context" int: 3;
+ value "modifiers" int: 0;
+ value "action" string: "menu_show";
+ value "params" string: "clients";
+ value "button" uchar: 2;
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "mouse_bindings" list {
+ group "E_Config_Binding_Mouse" struct {
+ value "context" int: 3;
+ value "modifiers" int: 0;
+ value "action" string: "menu_show";
+ value "params" string: "favorites";
+ value "button" uchar: 3;
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 5;
+ value "key" string: "Left";
+ value "action" string: "desk_flip_by";
+ value "params" string: "-1 0";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 5;
+ value "key" string: "Right";
+ value "action" string: "desk_flip_by";
+ value "params" string: "1 0";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 5;
+ value "key" string: "Up";
+ value "action" string: "desk_flip_by";
+ value "params" string: "0 -1";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 5;
+ value "key" string: "Down";
+ value "action" string: "desk_flip_by";
+ value "params" string: "0 1";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "Up";
+ value "action" string: "window_raise";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "Down";
+ value "action" string: "window_lower";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "x";
+ value "action" string: "window_close";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "k";
+ value "action" string: "window_kill";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "w";
+ value "action" string: "window_menu";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "s";
+ value "action" string: "window_sticky_toggle";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "i";
+ value "action" string: "window_iconic_toggle";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "f";
+ value "action" string: "window_maximized_toggle";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 1;
+ value "key" string: "F10";
+ value "action" string: "window_maximized_toggle";
+ value "params" string: "default vertical";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 5;
+ value "key" string: "F10";
+ value "action" string: "window_maximized_toggle";
+ value "params" string: "default horizontal";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "r";
+ value "action" string: "window_shaded_toggle";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "Left";
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "-1";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "Right";
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "1";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F1";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "0";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F2";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "1";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F3";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "2";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F4";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "3";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F5";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "4";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F6";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "5";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F7";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "6";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F8";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "7";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F9";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "8";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F10";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "9";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F11";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "10";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "F12";
+ value "action" string: "desk_linear_flip_to";
+ value "params" string: "11";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "m";
+ value "action" string: "menu_show";
+ value "params" string: "main";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "a";
+ value "action" string: "menu_show";
+ value "params" string: "favorites";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 0;
+ value "key" string: "Menu";
+ value "action" string: "menu_show";
+ value "params" string: "main";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 2;
+ value "key" string: "Menu";
+ value "action" string: "menu_show";
+ value "params" string: "clients";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "Menu";
+ value "action" string: "menu_show";
+ value "params" string: "favorites";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "Insert";
+ value "action" string: "exec";
+ value "params" string: "Eterm";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "Tab";
+ value "action" string: "winlist";
+ value "params" string: "next";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 5;
+ value "key" string: "Tab";
+ value "action" string: "winlist";
+ value "params" string: "prev";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "End";
+ value "action" string: "restart";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "Delete";
+ value "action" string: "logout";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 4;
+ value "key" string: "Escape";
+ value "action" string: "exebuf";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "l";
+ value "action" string: "desk_lock";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 6;
+ value "key" string: "d";
+ value "action" string: "desk_deskshow_toggle";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 3;
+ value "key" string: "Left";
+ value "action" string: "screen_send_by";
+ value "params" string: "-1";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 3;
+ value "key" string: "Right";
+ value "action" string: "screen_send_by";
+ value "params" string: "1";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 3;
+ value "key" string: "F1";
+ value "action" string: "screen_send_to";
+ value "params" string: "0";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 3;
+ value "key" string: "F2";
+ value "action" string: "screen_send_to";
+ value "params" string: "1";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 3;
+ value "key" string: "F3";
+ value "action" string: "screen_send_to";
+ value "params" string: "2";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "key_bindings" list {
+ group "E_Config_Binding_Key" struct {
+ value "context" int: 9;
+ value "modifiers" int: 3;
+ value "key" string: "F4";
+ value "action" string: "screen_send_to";
+ value "params" string: "3";
+ value "any_mod" uchar: 0;
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1,double";
+ value "source" string: "e.event.titlebar";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_shaded_toggle";
+ value "params" string: "up";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,2";
+ value "source" string: "e.event.titlebar";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_shaded_toggle";
+ value "params" string: "up";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,wheel,?,1";
+ value "source" string: "e.event.titlebar";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_shaded";
+ value "params" string: "0 up";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,wheel,?,-1";
+ value "source" string: "e.event.titlebar";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_shaded";
+ value "params" string: "1 up";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,3";
+ value "source" string: "e.event.titlebar";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_menu";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,?";
+ value "source" string: "e.event.icon";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_menu";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,[12]";
+ value "source" string: "e.event.close";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_close";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,3";
+ value "source" string: "e.event.close";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_kill";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,1";
+ value "source" string: "e.event.maximize";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_maximized_toggle";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,2";
+ value "source" string: "e.event.maximize";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_maximized_toggle";
+ value "params" string: "smart";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,3";
+ value "source" string: "e.event.maximize";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_maximized_toggle";
+ value "params" string: "expand";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,?";
+ value "source" string: "e.event.minimize";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_iconic_toggle";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,?";
+ value "source" string: "e.event.shade";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_shaded_toggle";
+ value "params" string: "up";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,clicked,?";
+ value "source" string: "e.event.lower";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_lower";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.icon";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_drag_icon";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.titlebar";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_move";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,up,1";
+ value "source" string: "e.event.titlebar";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_move";
+ value "params" string: "end";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.tl";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "tl";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.t";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "t";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.tr";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "tr";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.r";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "r";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.br";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "br";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.b";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "b";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.bl";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "bl";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,1";
+ value "source" string: "e.event.resize.l";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "l";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,up,1";
+ value "source" string: "e.event.resize.*";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_resize";
+ value "params" string: "end";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,down,3";
+ value "source" string: "e.event.resize.*";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_move";
+ }
+ }
+ group "signal_bindings" list {
+ group "E_Config_Binding_Signal" struct {
+ value "context" int: 2;
+ value "signal" string: "mouse,up,3";
+ value "source" string: "e.event.resize.*";
+ value "modifiers" int: 0;
+ value "any_mod" uchar: 1;
+ value "action" string: "window_move";
+ value "params" string: "end";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 4;
+ value "direction" int: 0;
+ value "z" int: -1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "-1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 4;
+ value "direction" int: 1;
+ value "z" int: -1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "-1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 4;
+ value "direction" int: 0;
+ value "z" int: 1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 4;
+ value "direction" int: 1;
+ value "z" int: 1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 2;
+ value "direction" int: 0;
+ value "z" int: -1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "-1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 2;
+ value "direction" int: 1;
+ value "z" int: -1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "-1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 2;
+ value "direction" int: 0;
+ value "z" int: 1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 2;
+ value "direction" int: 1;
+ value "z" int: 1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 8;
+ value "direction" int: 0;
+ value "z" int: -1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "-1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 8;
+ value "direction" int: 1;
+ value "z" int: -1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "-1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 8;
+ value "direction" int: 0;
+ value "z" int: 1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "1";
+ }
+ }
+ group "wheel_bindings" list {
+ group "E_Config_Binding_Wheel" struct {
+ value "context" int: 8;
+ value "direction" int: 1;
+ value "z" int: 1;
+ value "modifiers" int: 4;
+ value "any_mod" uchar: 0;
+ value "action" string: "desk_linear_flip_by";
+ value "params" string: "1";
+ }
+ }
+ value "window_placement_policy" int: 0;
+ value "focus_policy" int: 2;
+ value "focus_setting" int: 3;
+ value "pass_click_on" int: 1;
+ value "always_click_to_raise" int: 0;
+ value "always_click_to_focus" int: 0;
+ value "use_auto_raise" int: 0;
+ value "auto_raise_delay" double: 0.5000000000000000000000000;
+ value "use_resist" int: 1;
+ value "drag_resist" int: 16;
+ value "desk_resist" int: 32;
+ value "window_resist" int: 12;
+ value "gadget_resist" int: 32;
+ value "winlist_warp_while_selecting" int: 1;
+ value "winlist_warp_at_end" int: 1;
+ value "winlist_warp_speed" double: 0.1000000000000000055511151;
+ value "winlist_scroll_animate" int: 1;
+ value "winlist_scroll_speed" double: 0.1000000000000000055511151;
+ value "winlist_list_show_iconified" int: 1;
+ value "winlist_list_show_other_desk_iconified" int: 1;
+ value "winlist_list_show_other_screen_iconified" int: 0;
+ value "winlist_list_show_other_desk_windows" int: 0;
+ value "winlist_list_show_other_screen_windows" int: 0;
+ value "winlist_list_uncover_while_selecting" int: 0;
+ value "winlist_list_jump_desk_while_selecting" int: 0;
+ value "winlist_list_focus_while_selecting" int: 1;
+ value "winlist_list_raise_while_selecting" int: 1;
+ value "winlist_pos_align_x" double: 0.5000000000000000000000000;
+ value "winlist_pos_align_y" double: 0.5000000000000000000000000;
+ value "winlist_pos_size_w" double: 0.5000000000000000000000000;
+ value "winlist_pos_size_h" double: 0.5000000000000000000000000;
+ value "winlist_pos_min_w" int: 0;
+ value "winlist_pos_min_h" int: 0;
+ value "winlist_pos_max_w" int: 320;
+ value "winlist_pos_max_h" int: 320;
+ value "maximize_policy" int: 52;
+ value "allow_manip" int: 1;
+ value "border_fix_on_shelf_toggle" int: 1;
+ value "allow_above_fullscreen" int: 0;
+ value "kill_if_close_not_possible" int: 1;
+ value "kill_process" int: 1;
+ value "kill_timer_wait" double: 10.0000000000000000000000000;
+ value "ping_clients" int: 1;
+ value "transition_desk" string: "vswipe";
+ value "transition_change" string: "crossfade";
+ value "remember_internal_windows" int: 0;
+ value "move_info_follows" int: 1;
+ value "resize_info_follows" int: 1;
+ value "move_info_visible" int: 1;
+ value "resize_info_visible" int: 1;
+ value "focus_last_focused_per_desktop" int: 1;
+ value "focus_revert_on_hide_or_close" int: 1;
+ value "pointer_slide" int: 1;
+ value "use_e_cursor" int: 1;
+ value "cursor_size" int: 32;
+ value "menu_autoscroll_margin" int: 0;
+ value "menu_autoscroll_cursor_margin" int: 1;
+ value "transient.move" int: 1;
+ value "transient.resize" int: 0;
+ value "transient.raise" int: 1;
+ value "transient.lower" int: 1;
+ value "transient.layer" int: 1;
+ value "transient.desktop" int: 1;
+ value "transient.iconify" int: 1;
+ value "modal_windows" int: 1;
+ value "menu_eap_name_show" int: 1;
+ value "menu_eap_generic_show" int: 1;
+ value "menu_eap_comment_show" int: 0;
+ value "fullscreen_policy" int: 0;
+ value "exebuf_max_exe_list" int: 20;
+ value "exebuf_max_eap_list" int: 20;
+ value "exebuf_max_hist_list" int: 20;
+ value "exebuf_scroll_animate" int: 1;
+ value "exebuf_scroll_speed" double: 0.1000000000000000055511151;
+ value "exebuf_pos_align_x" double: 0.5000000000000000000000000;
+ value "exebuf_pos_align_y" double: 0.5000000000000000000000000;
+ value "exebuf_pos_size_w" double: 0.7500000000000000000000000;
+ value "exebuf_pos_size_h" double: 0.2500000000000000000000000;
+ value "exebuf_pos_min_w" int: 200;
+ value "exebuf_pos_min_h" int: 160;
+ value "exebuf_pos_max_w" int: 400;
+ value "exebuf_pos_max_h" int: 320;
+ value "exebuf_term_cmd" string: "xterm -hold -e";
+ value "use_app_icon" int: 1;
+ value "cnfmdlg_disabled" int: 0;
+ value "cfgdlg_auto_apply" int: 0;
+ value "cfgdlg_default_mode" int: 0;
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "shelf";
+ value "id" int: 1;
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "start";
+ value "id" string: "start";
+ value "geom.pos" int: 0;
+ value "geom.size" int: 34;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 1;
+ value "state_info.flags" int: 0;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "pager";
+ value "id" string: "pager";
+ value "geom.pos" int: 32;
+ value "geom.size" int: 10;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 2;
+ value "state_info.flags" int: 0;
+ value "style" string: "inset";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "ibox";
+ value "id" string: "ibox.1";
+ value "geom.pos" int: 152;
+ value "geom.size" int: 32;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 3;
+ value "state_info.flags" int: 0;
+ value "style" string: "inset";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "ibar";
+ value "id" string: "ibar.1";
+ value "geom.pos" int: 350;
+ value "geom.size" int: 200;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 4;
+ value "state_info.flags" int: 0;
+ value "style" string: "inset";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "temperature";
+ value "id" string: "temperature.1";
+ value "geom.pos" int: 672;
+ value "geom.size" int: 32;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 6;
+ value "state_info.flags" int: 0;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "cpufreq";
+ value "id" string: "cpufreq";
+ value "geom.pos" int: 704;
+ value "geom.size" int: 34;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 5;
+ value "state_info.flags" int: 0;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "clock";
+ value "id" string: "clock";
+ value "geom.pos" int: 768;
+ value "geom.size" int: 34;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 6;
+ value "state_info.flags" int: 0;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "systray";
+ value "id" string: "systray";
+ value "geom.pos" int: 720;
+ value "geom.size" int: 65;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 8;
+ value "state_info.flags" int: 0;
+ value "style" string: "inset";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "mixer";
+ value "id" string: "mixer.0";
+ value "geom.pos" int: 720;
+ value "geom.size" int: 34;
+ value "geom.res" int: 455;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 7;
+ value "state_info.flags" int: 1;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ }
+ }
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "shelf";
+ value "id" int: 2;
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "pager";
+ value "geom.pos" int: 0;
+ value "geom.size" int: 120;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 0;
+ value "state_info.flags" int: 0;
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "ibox";
+ value "geom.pos" int: 768;
+ value "geom.size" int: 32;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 0;
+ value "state_info.flags" int: 0;
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ }
+ }
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "shelf";
+ value "id" int: 3;
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "pager";
+ value "geom.pos" int: 0;
+ value "geom.size" int: 120;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 0;
+ value "state_info.flags" int: 0;
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "ibox";
+ value "geom.pos" int: 768;
+ value "geom.size" int: 32;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 0;
+ value "state_info.flags" int: 0;
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ }
+ }
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "shelf";
+ value "id" int: 4;
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "pager";
+ value "geom.pos" int: 0;
+ value "geom.size" int: 120;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 0;
+ value "state_info.flags" int: 0;
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "ibox";
+ value "geom.pos" int: 768;
+ value "geom.size" int: 32;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.0000000000000000000000000;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.0000000000000000000000000;
+ value "geom.size_h" double: 0.0000000000000000000000000;
+ value "state_info.seq" int: 0;
+ value "state_info.flags" int: 0;
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ }
+ }
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "gadman";
+ value "id" int: 114;
+ group "clients" list {
+ group "E_Config_Gadcon_Client" struct {
+ value "name" string: "Places";
+ value "id" string: "Places.2";
+ value "geom.pos" int: 720;
+ value "geom.size" int: 80;
+ value "geom.res" int: 800;
+ value "geom.pos_x" double: 0.6578125000000000222044605;
+ value "geom.pos_y" double: 0.0000000000000000000000000;
+ value "geom.size_w" double: 0.3125000000000000000000000;
+ value "geom.size_h" double: 0.3750000000000000000000000;
+ value "state_info.seq" int: 0;
+ value "state_info.flags" int: 0;
+ value "style" string: "plain";
+ value "orient" int: 0;
+ value "autoscroll" uchar: 0;
+ value "resizable" uchar: 0;
+ }
+ }
+ }
+ }
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "gadman_top";
+ value "id" int: 115;
+ }
+ }
+ group "gadcons" list {
+ group "E_Config_Gadcon" struct {
+ value "name" string: "toolbar";
+ value "id" int: 1;
+ }
+ }
+ group "shelves" list {
+ group "E_Config_Shelf" struct {
+ value "name" string: "shelf";
+ value "id" int: 1;
+ value "container" int: 0;
+ value "zone" int: 0;
+ value "layer" int: 0;
+ value "popup" uchar: 1;
+ value "orient" int: 4;
+ value "fit_along" uchar: 1;
+ value "fit_size" uchar: 0;
+ value "style" string: "default";
+ value "size" int: 40;
+ value "overlap" int: 1;
+ value "autohide" int: 0;
+ value "autohide_show_action" int: 0;
+ value "hide_timeout" float: 1.0000000000000000000000000;
+ value "hide_duration" float: 1.0000000000000000000000000;
+ value "desk_show_mode" int: 0;
+ }
+ }
+ group "shelves" list {
+ group "E_Config_Shelf" struct {
+ value "name" string: "shelf";
+ value "id" int: 2;
+ value "container" int: 1;
+ value "zone" int: 0;
+ value "layer" int: 200;
+ value "popup" uchar: 1;
+ value "orient" int: 6;
+ value "fit_along" uchar: 1;
+ value "fit_size" uchar: 0;
+ value "style" string: "default";
+ value "size" int: 40;
+ value "overlap" int: 0;
+ value "autohide" int: 0;
+ value "autohide_show_action" int: 0;
+ value "hide_timeout" float: 1.0000000000000000000000000;
+ value "hide_duration" float: 1.0000000000000000000000000;
+ value "desk_show_mode" int: 0;
+ group "desk_list" list {
+ group "E_Config_Shelf_Desk" struct {
+ value "x" int: 135642264;
+ value "y" int: 2;
+ }
+ }
+ }
+ }
+ group "shelves" list {
+ group "E_Config_Shelf" struct {
+ value "name" string: "shelf";
+ value "id" int: 3;
+ value "container" int: 2;
+ value "zone" int: 0;
+ value "layer" int: 200;
+ value "popup" uchar: 1;
+ value "orient" int: 6;
+ value "fit_along" uchar: 1;
+ value "fit_size" uchar: 0;
+ value "style" string: "default";
+ value "size" int: 40;
+ value "overlap" int: 0;
+ value "autohide" int: 0;
+ value "autohide_show_action" int: 0;
+ value "hide_timeout" float: 1.0000000000000000000000000;
+ value "hide_duration" float: 1.0000000000000000000000000;
+ value "desk_show_mode" int: 0;
+ group "desk_list" list {
+ group "E_Config_Shelf_Desk" struct {
+ value "x" int: 135642264;
+ value "y" int: 3;
+ }
+ }
+ }
+ }
+ group "shelves" list {
+ group "E_Config_Shelf" struct {
+ value "name" string: "shelf";
+ value "id" int: 4;
+ value "container" int: 3;
+ value "zone" int: 0;
+ value "layer" int: 200;
+ value "popup" uchar: 1;
+ value "orient" int: 6;
+ value "fit_along" uchar: 1;
+ value "fit_size" uchar: 0;
+ value "style" string: "default";
+ value "size" int: 40;
+ value "overlap" int: 0;
+ value "autohide" int: 0;
+ value "autohide_show_action" int: 0;
+ value "hide_timeout" float: 1.0000000000000000000000000;
+ value "hide_duration" float: 1.0000000000000000000000000;
+ value "desk_show_mode" int: 0;
+ group "desk_list" list {
+ group "E_Config_Shelf_Desk" struct {
+ value "x" int: 135642264;
+ value "y" int: 4;
+ }
+ }
+ }
+ }
+ value "font_hinting" int: 0;
+ value "desklock_auth_method" int: 0;
+ value "desklock_login_box_zone" int: -1;
+ value "desklock_start_locked" int: 0;
+ value "desklock_autolock_screensaver" int: 0;
+ value "desklock_post_screensaver_time" double: 0.0000000000000000000000000;
+ value "desklock_autolock_idle" int: 0;
+ value "desklock_autolock_idle_timeout" double: 300.0000000000000000000000000;
+ value "desklock_use_custom_desklock" int: 0;
+ value "desklock_ask_presentation" uchar: 0;
+ value "desklock_ask_presentation_timeout" double: 1.0000000000000000000000000;
+ value "display_res_restore" int: 0;
+ value "display_res_width" int: 1;
+ value "display_res_height" int: 1;
+ value "display_res_hz" int: 0;
+ value "display_res_rotation" int: 0;
+ value "screensaver_enable" int: 1;
+ value "screensaver_timeout" int: 0;
+ value "screensaver_interval" int: 31;
+ value "screensaver_blanking" int: 2;
+ value "screensaver_expose" int: 2;
+ value "screensaver_ask_presentation" uchar: 0;
+ value "screensaver_ask_presentation_timeout" double: 1.0000000000000000000000000;
+ value "dpms_enable" int: 1;
+ value "dpms_standby_enable" int: 1;
+ value "dpms_suspend_enable" int: 0;
+ value "dpms_off_enable" int: 0;
+ value "dpms_standby_timeout" int: 300;
+ value "dpms_suspend_timeout" int: 780;
+ value "dpms_off_timeout" int: 780;
+ value "clientlist_group_by" int: 0;
+ value "clientlist_include_all_zones" int: 0;
+ value "clientlist_separate_with" int: 0;
+ value "clientlist_sort_by" int: 0;
+ value "clientlist_separate_iconified_apps" int: 0;
+ value "clientlist_warp_to_iconified_desktop" int: 0;
+ value "clientlist_limit_caption_len" int: 0;
+ value "clientlist_max_caption_len" int: 2;
+ value "mouse_hand" int: 1;
+ value "mouse_accel_numerator" int: 2;
+ value "mouse_accel_denominator" int: 1;
+ value "mouse_accel_threshold" int: 4;
+ value "border_raise_on_mouse_action" int: 1;
+ value "border_raise_on_focus" int: 1;
+ value "desk_flip_wrap" int: 0;
+ value "fullscreen_flip" int: 0;
+ value "icon_theme" string: "gnome";
+ value "icon_theme_overrides" uchar: 1;
+ value "desk_flip_animate_mode" int: 1;
+ value "desk_flip_animate_interpolation" int: 0;
+ value "desk_flip_animate_time" double: 0.2000000000000000111022302;
+ value "desk_flip_pan_bg" uchar: 0;
+ value "desk_flip_pan_x_axis_factor" double: 0.0000000000000000000000000;
+ value "desk_flip_pan_y_axis_factor" double: 0.0000000000000000000000000;
+ value "wallpaper_import_last_dev" string: "~/";
+ value "wallpaper_import_last_path" string: "/";
+ value "wallpaper_grad_c1_r" int: 0;
+ value "wallpaper_grad_c1_g" int: 0;
+ value "wallpaper_grad_c1_b" int: 0;
+ value "wallpaper_grad_c2_r" int: 255;
+ value "wallpaper_grad_c2_g" int: 255;
+ value "wallpaper_grad_c2_b" int: 255;
+ value "theme_default_border_style" string: "default";
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/jpeg";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/png";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/x-pixmap";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/x-xpixmap";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/svg+xml";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/gif";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "image/tiff";
+ value "icon" string: "THUMB";
+ }
+ }
+ group "mime_icons" list {
+ group "E_Config_Mime_Icon" struct {
+ value "mime" string: "application/x-desktop";
+ value "icon" string: "DESKTOP";
+ }
+ }
+ value "desk_auto_switch" int: 0;
+ value "thumb_nice" int: 0;
+ value "menu_favorites_show" int: 1;
+ value "menu_apps_show" int: 1;
+ value "ping_clients_interval" int: 128;
+ value "cache_flush_poll_interval" int: 512;
+ value "thumbscroll_enable" int: 0;
+ value "thumbscroll_threshhold" int: 8;
+ value "thumbscroll_momentum_threshhold" double: 100.0000000000000000000000000;
+ value "thumbscroll_friction" double: 1.0000000000000000000000000;
+ value "hal_desktop" int: 1;
+ value "hal_auto_mount" int: 0;
+ value "hal_auto_open" int: 0;
+ value "border_keyboard.timeout" double: 5.0000000000000000000000000;
+ value "border_keyboard.move.dx" uchar: 5;
+ value "border_keyboard.move.dy" uchar: 5;
+ value "border_keyboard.resize.dx" uchar: 5;
+ value "border_keyboard.resize.dy" uchar: 5;
+ value "scale.min" double: 0.9000000000000000222044605;
+ value "scale.max" double: 4.0000000000000000000000000;
+ value "scale.factor" double: 1.0000000000000000000000000;
+ value "scale.base_dpi" int: 142;
+ value "scale.use_dpi" uchar: 1;
+ value "scale.use_custom" uchar: 0;
+ value "show_cursor" uchar: 1;
+ value "idle_cursor" uchar: 1;
+ value "cfgdlg_normal_wins" uchar: 0;
+ value "syscon.main.icon_size" int: 64;
+ value "syscon.secondary.icon_size" int: 48;
+ value "syscon.extra.icon_size" int: 48;
+ value "syscon.timeout" double: 5.0000000000000000000000000;
+ value "syscon.do_input" uchar: 1;
+ group "syscon.actions" list {
+ group "E_Config_Syscon_Action" struct {
+ value "action" string: "halt";
+ value "params" string: "now";
+ value "button" string: "button";
+ value "icon" string: "enlightenment/halt";
+ value "is_main" int: 1;
+ }
+ }
+ group "syscon.actions" list {
+ group "E_Config_Syscon_Action" struct {
+ value "action" string: "suspend";
+ value "params" string: "now";
+ value "button" string: "button";
+ value "icon" string: "enlightenment/suspend";
+ value "is_main" int: 1;
+ }
+ }
+ group "syscon.actions" list {
+ group "E_Config_Syscon_Action" struct {
+ value "action" string: "desk_lock";
+ value "button" string: "button";
+ value "icon" string: "enlightenment/desklock_menu";
+ value "is_main" int: 1;
+ }
+ }
+ group "syscon.actions" list {
+ group "E_Config_Syscon_Action" struct {
+ value "action" string: "reboot";
+ value "params" string: "now";
+ value "button" string: "button";
+ value "icon" string: "enlightenment/reboot";
+ value "is_main" int: 0;
+ }
+ }
+ group "syscon.actions" list {
+ group "E_Config_Syscon_Action" struct {
+ value "action" string: "hibernate";
+ value "params" string: "now";
+ value "button" string: "button";
+ value "icon" string: "enlightenment/hibernate";
+ value "is_main" int: 0;
+ }
+ }
+ group "syscon.actions" list {
+ group "E_Config_Syscon_Action" struct {
+ value "action" string: "logout";
+ value "params" string: "now";
+ value "button" string: "button";
+ value "icon" string: "enlightenment/logout";
+ value "is_main" int: 0;
+ }
+ }
+ value "mode.presentation" uchar: 0;
+ value "mode.offline" uchar: 0;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/icon.png b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/icon.png
new file mode 100644
index 0000000000..f6fa12f4ff
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/icon.png
Binary files differ
diff --git a/recipes/angstrom/e-wm-config-angstrom/module.battery.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.battery.src
index 50e2f972f3..50e2f972f3 100644
--- a/recipes/angstrom/e-wm-config-angstrom/module.battery.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.battery.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.cpufreq.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.cpufreq.src
new file mode 100644
index 0000000000..c782ac20b5
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.cpufreq.src
@@ -0,0 +1,6 @@
+group "Cpufreq_Config" struct {
+ value "config_version" int: 1;
+ value "poll_interval" int: 32;
+ value "restore_governor" int: 0;
+ value "auto_powersave" int: 1;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/module.dropshadow.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.dropshadow.src
index b6ee9b4006..b6ee9b4006 100644
--- a/recipes/angstrom/e-wm-config-angstrom/module.dropshadow.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.dropshadow.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.fileman.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.fileman.src
new file mode 100644
index 0000000000..b40eec6129
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.fileman.src
@@ -0,0 +1,28 @@
+group "Fileman_Config" struct {
+ value "config_version" int: 65793;
+ value "view.mode" int: 1;
+ value "view.open_dirs_in_place" uchar: 0;
+ value "view.selector" uchar: 0;
+ value "view.single_click" uchar: 0;
+ value "view.no_subdir_jump" uchar: 0;
+ value "view.no_subdir_drop" uchar: 0;
+ value "view.always_order" uchar: 0;
+ value "view.link_drop" uchar: 0;
+ value "view.fit_custom_pos" uchar: 0;
+ value "view.show_full_path" uchar: 0;
+ value "view.show_desktop_icons" uchar: 0;
+ value "view.show_toolbar" uchar: 1;
+ value "icon.icon.w" int: 48;
+ value "icon.icon.h" int: 48;
+ value "icon.list.w" int: 16;
+ value "icon.list.h" int: 16;
+ value "icon.fixed.w" uchar: 0;
+ value "icon.fixed.h" uchar: 0;
+ value "icon.extension.show" uchar: 1;
+ value "list.sort.no_case" uchar: 1;
+ value "list.sort.dirs.first" uchar: 1;
+ value "list.sort.dirs.last" uchar: 0;
+ value "selection.single" uchar: 0;
+ value "selection.windows_modifiers" uchar: 0;
+ value "theme.fixed" uchar: 0;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.ibar.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.ibar.src
new file mode 100644
index 0000000000..55757663d2
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.ibar.src
@@ -0,0 +1,18 @@
+group "IBar_Config" struct {
+ group "items" list {
+ group "IBar_Config_Item" struct {
+ value "id" string: "0";
+ value "dir" string: "default";
+ value "show_label" int: 1;
+ value "eap_label" int: 0;
+ }
+ }
+ group "items" list {
+ group "IBar_Config_Item" struct {
+ value "id" string: "ibar.1";
+ value "dir" string: "default";
+ value "show_label" int: 1;
+ value "eap_label" int: 0;
+ }
+ }
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.ibox.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.ibox.src
new file mode 100644
index 0000000000..1126554a1b
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.ibox.src
@@ -0,0 +1,20 @@
+group "IBox_Config" struct {
+ group "items" list {
+ group "IBox_Config_Item" struct {
+ value "id" string: "0";
+ value "show_label" int: 0;
+ value "show_zone" int: 1;
+ value "show_desk" int: 0;
+ value "icon_label" int: 0;
+ }
+ }
+ group "items" list {
+ group "IBox_Config_Item" struct {
+ value "id" string: "ibox.1";
+ value "show_label" int: 0;
+ value "show_zone" int: 1;
+ value "show_desk" int: 0;
+ value "icon_label" int: 0;
+ }
+ }
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/module.pager.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.pager.src
index 82a0a3ae99..82a0a3ae99 100644
--- a/recipes/angstrom/e-wm-config-angstrom/module.pager.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.pager.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.places.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.places.src
new file mode 100644
index 0000000000..01f63a6984
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.places.src
@@ -0,0 +1,25 @@
+group "Config" struct {
+ value "version" int: 65679;
+ value "fm" string: "";
+ value "auto_mount" uchar: 1;
+ value "auto_open" uchar: 1;
+ group "conf_items" list {
+ group "Config_Item" struct {
+ value "id" string: "Places.1";
+ value "switch2" int: 0;
+ }
+ }
+ group "conf_items" list {
+ group "Config_Item" struct {
+ value "id" string: "Places.2";
+ value "switch2" int: 0;
+ }
+ }
+ value "show_menu" uchar: 0;
+ value "show_home" uchar: 0;
+ value "show_desk" uchar: 0;
+ value "show_trash" uchar: 0;
+ value "show_root" uchar: 0;
+ value "show_temp" uchar: 0;
+ value "show_bookm" uchar: 0;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.temperature.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.temperature.src
new file mode 100644
index 0000000000..dcad5332e1
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/module.temperature.src
@@ -0,0 +1,13 @@
+group "Temperature_Config" struct {
+ group "faces" hash {
+ key "temperature.1";
+ group "Temperature_Config_Face" struct {
+ value "id" string: "temperature.1";
+ value "poll_interval" int: 128;
+ value "low" int: 30;
+ value "high" int: 80;
+ value "sensor_type" int: 0;
+ value "units" int: 0;
+ }
+ }
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/profile.desktop b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/profile.desktop
new file mode 100644
index 0000000000..8581c45294
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom-widescreen/profile.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Type=Link
+Name=Angstrom Widescreen
+Icon=icon.png
+Comment=This is the Angstrom profile that is tweaked for widescreen devices.
diff --git a/recipes/angstrom/e-wm-config-angstrom/e.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/e.src
index 67ba752c9c..67ba752c9c 100644
--- a/recipes/angstrom/e-wm-config-angstrom/e.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/e.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/icon.png b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/icon.png
new file mode 100644
index 0000000000..f6fa12f4ff
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/icon.png
Binary files differ
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.battery.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.battery.src
new file mode 100644
index 0000000000..50e2f972f3
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.battery.src
@@ -0,0 +1,6 @@
+group "Battery_Config" struct {
+ value "poll_interval" int: 512;
+ value "alert" int: 30;
+ value "alert_p" int: 10;
+ value "alert_timeout" int: 0;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.cpufreq.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.cpufreq.src
new file mode 100644
index 0000000000..c782ac20b5
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.cpufreq.src
@@ -0,0 +1,6 @@
+group "Cpufreq_Config" struct {
+ value "config_version" int: 1;
+ value "poll_interval" int: 32;
+ value "restore_governor" int: 0;
+ value "auto_powersave" int: 1;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.dropshadow.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.dropshadow.src
new file mode 100644
index 0000000000..b6ee9b4006
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.dropshadow.src
@@ -0,0 +1,7 @@
+group "Dropshadow_Config" struct {
+ value "shadow_x" int: 4;
+ value "shadow_y" int: 4;
+ value "blur_size" int: 10;
+ value "quality" int: 2;
+ value "shadow_darkness" double: 0.5000000000000000000000000;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.fileman.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.fileman.src
new file mode 100644
index 0000000000..b40eec6129
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.fileman.src
@@ -0,0 +1,28 @@
+group "Fileman_Config" struct {
+ value "config_version" int: 65793;
+ value "view.mode" int: 1;
+ value "view.open_dirs_in_place" uchar: 0;
+ value "view.selector" uchar: 0;
+ value "view.single_click" uchar: 0;
+ value "view.no_subdir_jump" uchar: 0;
+ value "view.no_subdir_drop" uchar: 0;
+ value "view.always_order" uchar: 0;
+ value "view.link_drop" uchar: 0;
+ value "view.fit_custom_pos" uchar: 0;
+ value "view.show_full_path" uchar: 0;
+ value "view.show_desktop_icons" uchar: 0;
+ value "view.show_toolbar" uchar: 1;
+ value "icon.icon.w" int: 48;
+ value "icon.icon.h" int: 48;
+ value "icon.list.w" int: 16;
+ value "icon.list.h" int: 16;
+ value "icon.fixed.w" uchar: 0;
+ value "icon.fixed.h" uchar: 0;
+ value "icon.extension.show" uchar: 1;
+ value "list.sort.no_case" uchar: 1;
+ value "list.sort.dirs.first" uchar: 1;
+ value "list.sort.dirs.last" uchar: 0;
+ value "selection.single" uchar: 0;
+ value "selection.windows_modifiers" uchar: 0;
+ value "theme.fixed" uchar: 0;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.ibar.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.ibar.src
new file mode 100644
index 0000000000..55757663d2
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.ibar.src
@@ -0,0 +1,18 @@
+group "IBar_Config" struct {
+ group "items" list {
+ group "IBar_Config_Item" struct {
+ value "id" string: "0";
+ value "dir" string: "default";
+ value "show_label" int: 1;
+ value "eap_label" int: 0;
+ }
+ }
+ group "items" list {
+ group "IBar_Config_Item" struct {
+ value "id" string: "ibar.1";
+ value "dir" string: "default";
+ value "show_label" int: 1;
+ value "eap_label" int: 0;
+ }
+ }
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.ibox.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.ibox.src
new file mode 100644
index 0000000000..1126554a1b
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.ibox.src
@@ -0,0 +1,20 @@
+group "IBox_Config" struct {
+ group "items" list {
+ group "IBox_Config_Item" struct {
+ value "id" string: "0";
+ value "show_label" int: 0;
+ value "show_zone" int: 1;
+ value "show_desk" int: 0;
+ value "icon_label" int: 0;
+ }
+ }
+ group "items" list {
+ group "IBox_Config_Item" struct {
+ value "id" string: "ibox.1";
+ value "show_label" int: 0;
+ value "show_zone" int: 1;
+ value "show_desk" int: 0;
+ value "icon_label" int: 0;
+ }
+ }
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.pager.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.pager.src
new file mode 100644
index 0000000000..82a0a3ae99
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.pager.src
@@ -0,0 +1,15 @@
+group "Pager_Config" struct {
+ value "popup" uint: 1;
+ value "popup_speed" double: 1.0000000000000000000000000;
+ value "popup_urgent" uint: 0;
+ value "popup_urgent_stick" uint: 0;
+ value "popup_urgent_speed" double: 1.5000000000000000000000000;
+ value "show_desk_names" uint: 1;
+ value "popup_height" int: 60;
+ value "popup_act_height" int: 60;
+ value "drag_resist" uint: 3;
+ value "btn_drag" uchar: 1;
+ value "btn_noplace" uchar: 2;
+ value "btn_desk" uchar: 0;
+ value "flip_desk" uchar: 0;
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/module.places.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.places.src
index 57e941fe1c..57e941fe1c 100644
--- a/recipes/angstrom/e-wm-config-angstrom/module.places.src
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.places.src
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.temperature.src b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.temperature.src
new file mode 100644
index 0000000000..dcad5332e1
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/module.temperature.src
@@ -0,0 +1,13 @@
+group "Temperature_Config" struct {
+ group "faces" hash {
+ key "temperature.1";
+ group "Temperature_Config_Face" struct {
+ value "id" string: "temperature.1";
+ value "poll_interval" int: 128;
+ value "low" int: 30;
+ value "high" int: 80;
+ value "sensor_type" int: 0;
+ value "units" int: 0;
+ }
+ }
+}
diff --git a/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/profile.desktop b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/profile.desktop
new file mode 100644
index 0000000000..2a8ad2ff8c
--- /dev/null
+++ b/recipes/angstrom/e-wm-config-angstrom/configs/angstrom/profile.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Type=Link
+Name=Angstrom
+Icon=icon.png
+Comment=This is the Angstrom profile that is universal for most systems. Choose this if you are not sure what to choose.
diff --git a/recipes/angstrom/e-wm-config-angstrom/profile.desktop b/recipes/angstrom/e-wm-config-angstrom/profile.desktop
deleted file mode 100644
index f85ac869d6..0000000000
--- a/recipes/angstrom/e-wm-config-angstrom/profile.desktop
+++ /dev/null
@@ -1,5 +0,0 @@
-[Desktop Entry]
-Type=Link
-Name=Angstrom
-Icon=icon.png
-Comment=This is the Angstrom<br>profile that is<br>universal for most<br>systems. Choose this<br>if you are not<br>sure what to choose.
diff --git a/recipes/anki/anki.inc b/recipes/anki/anki.inc
index e9a71c286b..d11457b0da 100644
--- a/recipes/anki/anki.inc
+++ b/recipes/anki/anki.inc
@@ -6,7 +6,7 @@ AUTHOR = "Damien Elmes"
PRIORITY = "optional"
LICENSE = "GPLv2"
RDEPENDS = "python-pyqt"
-RRECOMMENDS = "kakasi virtual/japanese-font"
+RRECOMMENDS = "kakasi virtual-japanese-font"
SRC_URI = "http://ichi2.net/anki/download/anki-${PV}.tgz"
diff --git a/recipes/anki/anki_0.4.3.bb b/recipes/anki/anki_0.4.3.bb
index f3a62f3323..38f05aeb3f 100644
--- a/recipes/anki/anki_0.4.3.bb
+++ b/recipes/anki/anki_0.4.3.bb
@@ -1,7 +1,7 @@
require anki.inc
RDEPENDS += "libanki"
-PR = "r1"
+PR = "r2"
export PV := "${PV}"
diff --git a/recipes/anki/libanki_0.4.3.bb b/recipes/anki/libanki_0.4.3.bb
index ac33833790..8e8b5b322d 100644
--- a/recipes/anki/libanki_0.4.3.bb
+++ b/recipes/anki/libanki_0.4.3.bb
@@ -1,5 +1,5 @@
require anki.inc
-PR = "r0"
+PR = "r1"
S = "${WORKDIR}/anki-${PV}/libanki"
diff --git a/recipes/atd/atd_0.70.bb b/recipes/atd/atd_0.70.bb
index 9862fac0dd..7f2193daca 100644
--- a/recipes/atd/atd_0.70.bb
+++ b/recipes/atd/atd_0.70.bb
@@ -1,10 +1,10 @@
DESCRIPTION = "Lightweight At Daemon"
SECTION = "base"
-LICENSE = "GPLV2"
+LICENSE = "GPLv2"
RCONFLICTS = "at"
RREPLACES = "at"
-PR = "r4"
+PR = "r5"
SRC_URI = "${HANDHELDS_CVS};module=apps/atd;tag=ATD-0_70 \
file://atd-startup.patch;patch=1;pnum=0"
diff --git a/recipes/atd/atd_0.80.bb b/recipes/atd/atd_0.80.bb
index f3adbd7cb3..23cf7c4f16 100644
--- a/recipes/atd/atd_0.80.bb
+++ b/recipes/atd/atd_0.80.bb
@@ -1,10 +1,10 @@
DESCRIPTION = "Lightweight At Daemon"
SECTION = "base"
-LICENSE = "GPLV2"
+LICENSE = "GPLv2"
RCONFLICTS = "at"
RREPLACES = "at"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://projects.linuxtogo.org/frs/download.php/222/${P}.tar.gz"
diff --git a/recipes/autoconf/autoconf-2.63/autoconf-x.patch b/recipes/autoconf/autoconf-2.63/autoconf-x.patch
new file mode 100644
index 0000000000..596535b7d6
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/autoconf-x.patch
@@ -0,0 +1,36 @@
+Index: lib/autoconf/libs.m4
+===================================================================
+RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/libs.m4,v
+retrieving revision 1.13
+diff -p -u -r1.13 libs.m4
+--- autoconf-2.59/lib/autoconf/libs.m4 6 Sep 2005 15:34:06 -0000 1.13
++++ autoconf-2.59/lib/autoconf/libs.m4 18 Sep 2005 17:09:58 -0000
+@@ -265,13 +265,13 @@ ac_x_header_dirs='
+ /usr/openwin/share/include'
+
+ if test "$ac_x_includes" = no; then
+- # Guess where to find include files, by looking for Intrinsic.h.
++ # Guess where to find include files, by looking for Xlib.h.
+ # First, try using that file with no special directory specified.
+- AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Intrinsic.h>])],
++ AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Xlib.h>])],
+ [# We can compile using X headers with no special include directory.
+ ac_x_includes=],
+ [for ac_dir in $ac_x_header_dirs; do
+- if test -r "$ac_dir/X11/Intrinsic.h"; then
++ if test -r "$ac_dir/X11/Xlib.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+@@ -284,9 +284,9 @@ if test "$ac_x_libraries" = no; then
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+- LIBS="-lXt $LIBS"
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Intrinsic.h>],
+- [XtMalloc (0)])],
++ LIBS="-lX11 $LIBS"
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Xlib.h>],
++ [XrmInitialize ()])],
+ [LIBS=$ac_save_LIBS
+ # We can link X programs with no special library path.
+ ac_x_libraries=],
diff --git a/recipes/autoconf/autoconf-2.63/autoconf259-update-configscripts.patch b/recipes/autoconf/autoconf-2.63/autoconf259-update-configscripts.patch
new file mode 100644
index 0000000000..2adda7403d
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/autoconf259-update-configscripts.patch
@@ -0,0 +1,393 @@
+--- autoconf-2.59/build-aux/config.guess.old 2003-10-23 10:28:51.000000000 -0400
++++ autoconf-2.59/build-aux/config.guess 2004-04-24 22:36:28.000000000 -0400
+@@ -3,7 +3,7 @@
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+-timestamp='2003-10-03'
++timestamp='2004-03-12'
+
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -197,12 +197,18 @@
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit 0 ;;
++ amd64:OpenBSD:*:*)
++ echo x86_64-unknown-openbsd${UNAME_RELEASE}
++ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
++ cats:OpenBSD:*:*)
++ echo arm-unknown-openbsd${UNAME_RELEASE}
++ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+@@ -221,6 +227,9 @@
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
++ pegasos:OpenBSD:*:*)
++ echo powerpc-unknown-openbsd${UNAME_RELEASE}
++ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+@@ -236,10 +245,24 @@
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
++ *:ekkoBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
++ exit 0 ;;
++ macppc:MirBSD:*:*)
++ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
++ exit 0 ;;
++ *:MirBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
++ exit 0 ;;
+ alpha:OSF1:*:*)
+- if test $UNAME_RELEASE = "V4.0"; then
++ case $UNAME_RELEASE in
++ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+- fi
++ ;;
++ *5.*)
++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++ ;;
++ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+@@ -277,11 +300,12 @@
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
++ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha*:OpenVMS:*:*)
+ echo alpha-hp-vms
+@@ -307,6 +331,9 @@
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
++ *:OS400:*:*)
++ echo powerpc-ibm-os400
++ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+@@ -399,6 +426,9 @@
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
++ m68k:machten:*:*)
++ echo m68k-apple-machten${UNAME_RELEASE}
++ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+@@ -742,6 +772,11 @@
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
++ 5000:UNIX_System_V:4.*:*)
++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+@@ -751,7 +786,7 @@
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+- *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
++ *:FreeBSD:*:*)
+ # Determine whether the default compiler uses glibc.
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+@@ -763,7 +798,7 @@
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+- # GNU/FreeBSD systems have a "k" prefix to indicate we are using
++ # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
+ # FreeBSD's kernel, but not the complete OS.
+ case ${LIBC} in gnu) kernel_only='k' ;; esac
+ echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+@@ -799,8 +834,13 @@
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
++ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
++ *:GNU/*:*:*)
++ # other systems with GNU libc and userland
++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
++ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+@@ -813,6 +853,9 @@
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
++ m32r*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+@@ -981,6 +1024,9 @@
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
++ i*86:syllable:*:*)
++ echo ${UNAME_MACHINE}-pc-syllable
++ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+@@ -1052,7 +1098,7 @@
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+@@ -1167,7 +1213,7 @@
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+- NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
++ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+@@ -1211,6 +1257,9 @@
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit 0 ;;
++ *:DragonFly:*:*)
++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
++ exit 0 ;;
+ esac
+
+ #echo '(No uname command or uname output not recognized.)' 1>&2
+--- autoconf-2.59/build-aux/config.sub.old 2003-10-23 10:28:51.000000000 -0400
++++ autoconf-2.59/build-aux/config.sub 2004-04-24 22:36:28.000000000 -0400
+@@ -3,7 +3,7 @@
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+-timestamp='2003-08-18'
++timestamp='2004-03-12'
+
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -118,7 +118,8 @@
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+- nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
++ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+@@ -236,7 +237,7 @@
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+- | m32r | m68000 | m68k | m88k | mcore \
++ | m32r | m32rle | m68000 | m68k | m88k | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+@@ -261,7 +262,7 @@
+ | pyramid \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
++ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+@@ -307,7 +308,7 @@
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+- | m32r-* \
++ | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+@@ -335,7 +336,7 @@
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
++ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+@@ -362,6 +363,9 @@
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
++ abacus)
++ basic_machine=abacus-unknown
++ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+@@ -379,6 +383,9 @@
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
++ amd64-*)
++ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+@@ -438,12 +445,20 @@
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
++ cr16c)
++ basic_machine=cr16c-unknown
++ os=-elf
++ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
++ crx)
++ basic_machine=crx-unknown
++ os=-elf
++ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+@@ -743,6 +758,10 @@
+ basic_machine=or32-unknown
+ os=-coff
+ ;;
++ os400)
++ basic_machine=powerpc-ibm
++ os=-os400
++ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+@@ -963,6 +982,10 @@
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
++ tpf)
++ basic_machine=s390x-ibm
++ os=-tpf
++ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+@@ -1058,7 +1081,7 @@
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+- sparc | sparcv9 | sparcv9b)
++ sparc | sparcv8 | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+@@ -1131,19 +1154,20 @@
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
+- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
++ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
++ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
++ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+- | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+@@ -1182,6 +1206,9 @@
+ -opened*)
+ os=-openedition
+ ;;
++ -os400*)
++ os=-os400
++ ;;
+ -wince*)
+ os=-wince
+ ;;
+@@ -1203,6 +1230,9 @@
+ -atheos*)
+ os=-atheos
+ ;;
++ -syllable*)
++ os=-syllable
++ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+@@ -1225,6 +1255,9 @@
+ -sinix*)
+ os=-sysv4
+ ;;
++ -tpf*)
++ os=-tpf
++ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+@@ -1473,9 +1506,15 @@
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
++ -os400*)
++ vendor=ibm
++ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
++ -tpf*)
++ vendor=ibm
++ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
diff --git a/recipes/autoconf/autoconf-2.63/autoheader-nonfatal-warnings.patch b/recipes/autoconf/autoconf-2.63/autoheader-nonfatal-warnings.patch
new file mode 100644
index 0000000000..1f18e04bba
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/autoheader-nonfatal-warnings.patch
@@ -0,0 +1,13 @@
+--- autoconf-2.59/bin/autoheader.in~ 2003-10-10 14:52:56.000000000 +0100
++++ autoconf-2.59/bin/autoheader.in 2004-05-03 01:36:45.000000000 +0100
+@@ -272,8 +272,8 @@
+ }
+
+ }
+- exit 1
+- if keys %symbol;
++# exit 1
++# if keys %symbol;
+ }
+
+ update_file ("$tmp/config.hin", "$config_h_in");
diff --git a/recipes/autoconf/autoconf-2.63/autoreconf-exclude.patch b/recipes/autoconf/autoconf-2.63/autoreconf-exclude.patch
new file mode 100644
index 0000000000..2eaf8d9016
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/autoreconf-exclude.patch
@@ -0,0 +1,123 @@
+--- /tmp/autoreconf.in 2009-06-02 11:59:05.000000000 +0200
++++ autoconf-2.63/bin/autoreconf.in 2009-06-02 12:09:03.000000000 +0200
+@@ -76,6 +76,7 @@
+ -i, --install copy missing auxiliary files
+ --no-recursive don't rebuild sub-packages
+ -s, --symlink with -i, install symbolic links instead of copies
++ -x, --exclude=STEPS steps we should not run
+ -m, --make when applicable, re-run ./configure && make
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
+
+@@ -136,6 +137,13 @@
+ # Recurse into subpackages
+ my $recursive = 1;
+
++# Steps to exclude
++my @exclude;
++my @ex;
++
++my $uses_gettext;
++my $configure_ac;
++
+ ## ---------- ##
+ ## Routines. ##
+ ## ---------- ##
+@@ -153,6 +161,7 @@
+ 'B|prepend-include=s' => \@prepend_include,
+ 'i|install' => \$install,
+ 's|symlink' => \$symlink,
++ 'x|exclude=s' => \@exclude,
+ 'm|make' => \$run_make,
+ 'recursive!' => \$recursive);
+
+@@ -162,6 +171,8 @@
+ parse_WARNINGS;
+ parse_warnings '--warnings', @warning;
+
++ @exclude = map { split /,/ } @exclude;
++
+ # Even if the user specified a configure.ac, trim to get the
+ # directory, and look for configure.ac again. Because (i) the code
+ # is simpler, and (ii) we are still able to diagnose simultaneous
+@@ -190,6 +201,7 @@
+ $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
+ $autoheader .= join (' --include=', '', map { shell_quote ($_) } @include);
+ $autoheader .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
++ $aclocal .= join (' -I ', '', @include);
+
+ # --install and --symlink;
+ if ($install)
+@@ -254,6 +266,11 @@
+ {
+ my ($aclocal, $flags) = @_;
+
++ @ex = grep (/^aclocal$/, @exclude);
++ if ($#ex != -1) {
++ return;
++ }
++
+ # aclocal 1.8+ does all this for free. It can be recognized by its
+ # --force support.
+ if ($aclocal_supports_force)
+@@ -367,8 +384,11 @@
+ }
+ else
+ {
+- xsystem_hint ("autopoint is needed because this package uses Gettext", "$autopoint");
+- }
++ @ex = grep (/^autopoint$/, @exclude);
++ if ($#ex == -1) {
++ xsystem_hint ("autopoint is needed because this package uses Gettext", "$autopoint");
++ }
++ }
+
+
+ # ----------------- #
+@@ -531,7 +551,10 @@
+ {
+ $libtoolize .= " --ltdl";
+ }
+- xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize);
++ @ex = grep (/^libtoolize$/, @exclude);
++ if ($#ex == -1) {
++ xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize);
++ }
+ $rerun_aclocal = 1;
+ }
+ else
+@@ -592,7 +615,10 @@
+ }
+ else
+ {
+- xsystem ($autoheader);
++ @ex = grep (/^autoheader$/, @exclude);
++ if ($#ex == -1) {
++ xsystem ("$autoheader");
++ }
+ }
+
+
+@@ -609,7 +635,10 @@
+ # We should always run automake, and let it decide whether it shall
+ # update the file or not. In fact, the effect of `$force' is already
+ # included in `$automake' via `--no-force'.
+- xsystem ($automake);
++ @ex = grep (/^automake$/, @exclude);
++ if ($#ex == -1) {
++ xsystem ("$automake");
++ }
+ }
+
+
+@@ -633,7 +662,10 @@
+ }
+ else
+ {
+- xsystem ("$make");
++ @ex = grep (/^make$/, @exclude);
++ if ($#ex == -1) {
++ xsystem ("make");
++ }
+ }
+ }
+ }
diff --git a/recipes/autoconf/autoconf-2.63/autoreconf-foreign.patch b/recipes/autoconf/autoconf-2.63/autoreconf-foreign.patch
new file mode 100644
index 0000000000..587a823826
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/autoreconf-foreign.patch
@@ -0,0 +1,11 @@
+--- autoconf-2.59/bin/autoreconf.in~autoreconf-foreign 2004-05-09 20:55:06.000000000 -0400
++++ autoconf-2.59/bin/autoreconf.in 2004-05-09 20:55:55.000000000 -0400
+@@ -184,6 +184,8 @@
+
+ $aclocal_supports_force = `$aclocal --help` =~ /--force/;
+
++ $automake .= ' --foreign';
++
+ # Dispatch autoreconf's option to the tools.
+ # --include;
+ $autoconf .= join (' --include=', '', @include);
diff --git a/recipes/autoconf/autoconf-2.63/autoreconf-gnuconfigize.patch b/recipes/autoconf/autoconf-2.63/autoreconf-gnuconfigize.patch
new file mode 100644
index 0000000000..beeb4c70c0
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/autoreconf-gnuconfigize.patch
@@ -0,0 +1,30 @@
+--- /tmp/autoreconf.in 2009-06-02 13:10:42.000000000 +0200
++++ autoconf-2.63/bin/autoreconf.in 2009-06-02 13:12:28.000000000 +0200
+@@ -58,7 +58,7 @@
+ $help = "Usage: $0 [OPTION]... [DIRECTORY]...
+
+ Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint'
+-(formerly `gettextize'), and `libtoolize' where appropriate)
++(formerly `gettextize'), `libtoolize', and `gnu-configize' where appropriate)
+ repeatedly to remake the GNU Build System files in specified
+ DIRECTORIES and their subdirectories (defaulting to `.').
+
+@@ -115,6 +115,7 @@
+ my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
+ my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint';
+ my $make = $ENV{'MAKE'} || 'make';
++my $gnuconfigize = $ENV{'GNUCONFIGIZE'} || 'gnu-configize';
+
+ # --install -- as --add-missing in other tools.
+ my $install = 0;
+@@ -643,6 +644,10 @@
+ }
+ }
+
++ @ex = grep (/^gnu-configize$/, @exclude);
++ if ($#ex == -1) {
++ xsystem ("$gnuconfigize");
++ }
+
+ # -------------- #
+ # Running make. #
diff --git a/recipes/autoconf/autoconf-2.63/config-site.patch b/recipes/autoconf/autoconf-2.63/config-site.patch
new file mode 100644
index 0000000000..0c66fe31b8
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/config-site.patch
@@ -0,0 +1,11 @@
+--- /tmp/general.m4 2009-06-02 15:14:15.000000000 +0200
++++ autoconf-2.63/lib/autoconf/general.m4 2009-06-02 15:14:42.000000000 +0200
+@@ -1848,7 +1848,7 @@
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+ fi
+-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
++for ac_site_file in $ac_site_file1 "$ac_site_file2"
+ do
+ test "x$ac_site_file" = xNONE && continue
+ if test -r "$ac_site_file"; then
diff --git a/recipes/autoconf/autoconf-2.63/fix_path_xtra.patch b/recipes/autoconf/autoconf-2.63/fix_path_xtra.patch
new file mode 100644
index 0000000000..3d653ff933
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/fix_path_xtra.patch
@@ -0,0 +1,113 @@
+We don't build xmkmf so any values returned from it are going to be wrong.
+Using any paths in /usr/ for x headers/libs is a bad idea when cross compiling.
+This patch removes them to stop any confusion.
+
+RP - 20071115
+
+--- /tmp/libs.m4 2009-06-02 13:15:54.000000000 +0200
++++ autoconf-2.63/lib/autoconf/libs.m4 2009-06-02 13:17:51.000000000 +0200
+@@ -179,54 +179,6 @@
+ # Checks for X window. #
+ # --------------------- #
+
+-
+-# _AC_PATH_X_XMKMF
+-# ----------------
+-# Internal subroutine of _AC_PATH_X.
+-# Set ac_x_includes and/or ac_x_libraries.
+-m4_define([_AC_PATH_X_XMKMF],
+-[AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl
+-rm -f -r conftest.dir
+-if mkdir conftest.dir; then
+- cd conftest.dir
+- cat >Imakefile <<'_ACEOF'
+-incroot:
+- @echo incroot='${INCROOT}'
+-usrlibdir:
+- @echo usrlibdir='${USRLIBDIR}'
+-libdir:
+- @echo libdir='${LIBDIR}'
+-_ACEOF
+- if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+- for ac_var in incroot usrlibdir libdir; do
+- eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+- done
+- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+- for ac_extension in a so sl dylib la dll; do
+- if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+- test -f "$ac_im_libdir/libX11.$ac_extension"; then
+- ac_im_usrlibdir=$ac_im_libdir; break
+- fi
+- done
+- # Screen out bogus values from the imake configuration. They are
+- # bogus both because they are the default anyway, and because
+- # using them would break gcc on systems where it needs fixed includes.
+- case $ac_im_incroot in
+- /usr/include) ac_x_includes= ;;
+- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+- esac
+- case $ac_im_usrlibdir in
+- /usr/lib | /usr/lib64 | /lib | /lib64) ;;
+- *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+- esac
+- fi
+- cd ..
+- rm -f -r conftest.dir
+-fi
+-])# _AC_PATH_X_XMKMF
+-
+-
+ # _AC_PATH_X_DIRECT
+ # -----------------
+ # Internal subroutine of _AC_PATH_X.
+@@ -234,40 +186,7 @@
+ m4_define([_AC_PATH_X_DIRECT],
+ [# Standard set of common directories for X headers.
+ # Check X11 before X11Rn because it is often a symlink to the current release.
+-ac_x_header_dirs='
+-/usr/X11/include
+-/usr/X11R6/include
+-/usr/X11R5/include
+-/usr/X11R4/include
+-
+-/usr/include/X11
+-/usr/include/X11R6
+-/usr/include/X11R5
+-/usr/include/X11R4
+-
+-/usr/local/X11/include
+-/usr/local/X11R6/include
+-/usr/local/X11R5/include
+-/usr/local/X11R4/include
+-
+-/usr/local/include/X11
+-/usr/local/include/X11R6
+-/usr/local/include/X11R5
+-/usr/local/include/X11R4
+-
+-/usr/X386/include
+-/usr/x386/include
+-/usr/XFree86/include/X11
+-
+-/usr/include
+-/usr/local/include
+-/usr/unsupported/include
+-/usr/athena/include
+-/usr/local/x11r5/include
+-/usr/lpp/Xamples/include
+-
+-/usr/openwin/include
+-/usr/openwin/share/include'
++ac_x_header_dirs=''
+
+ if test "$ac_x_includes" = no; then
+ # Guess where to find include files, by looking for Xlib.h.
+@@ -316,7 +235,6 @@
+ [AC_CACHE_VAL(ac_cv_have_x,
+ [# One or both of the vars are not set, and there is no cached value.
+ ac_x_includes=no ac_x_libraries=no
+-_AC_PATH_X_XMKMF
+ _AC_PATH_X_DIRECT
+ case $ac_x_includes,$ac_x_libraries in #(
+ no,* | *,no | *\'*)
diff --git a/recipes/autoconf/autoconf-2.63/path_prog_fixes.patch b/recipes/autoconf/autoconf-2.63/path_prog_fixes.patch
new file mode 100644
index 0000000000..5f0d055a48
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/path_prog_fixes.patch
@@ -0,0 +1,126 @@
+Index: autoconf-2.59/bin/autoheader.in
+===================================================================
+--- autoconf-2.59.orig/bin/autoheader.in 2005-03-09 16:27:17.933878952 -0500
++++ autoconf-2.59/bin/autoheader.in 2005-03-09 16:29:57.360642400 -0500
+@@ -1,8 +1,8 @@
+-#! @PERL@
++#! @bindir@/env perl
+ # -*- Perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @bindir@/env perl -S "$0" "$@";; esac'
+ if 0;
+
+ # autoheader -- create `config.h.in' from `configure.ac'
+Index: autoconf-2.59/bin/autom4te.in
+===================================================================
+--- autoconf-2.59.orig/bin/autom4te.in 2003-10-28 03:48:36.000000000 -0500
++++ autoconf-2.59/bin/autom4te.in 2005-03-09 16:30:14.957967200 -0500
+@@ -1,8 +1,10 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ # autom4te - Wrapper around M4 libraries.
+@@ -87,7 +89,7 @@
+ my $freeze = 0;
+
+ # $M4.
+-my $m4 = $ENV{"M4"} || '@M4@';
++my $m4 = $ENV{"M4"} || '@bindir@/env m4';
+ # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
+ fatal "need GNU m4 1.4 or later: $m4"
+ if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
+Index: autoconf-2.59/bin/autoreconf.in
+===================================================================
+--- autoconf-2.59.orig/bin/autoreconf.in 2005-03-09 16:27:17.354966960 -0500
++++ autoconf-2.59/bin/autoreconf.in 2005-03-09 16:31:19.572144352 -0500
+@@ -1,8 +1,10 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ # autoreconf - install the GNU Build System in a directory tree
+Index: autoconf-2.59/bin/autoscan.in
+===================================================================
+--- autoconf-2.59.orig/bin/autoscan.in 2003-09-26 08:57:49.000000000 -0400
++++ autoconf-2.59/bin/autoscan.in 2005-03-09 16:30:18.136483992 -0500
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # autoscan - Create configure.scan (a preliminary configure.ac) for a package.
+ # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
+@@ -21,7 +21,9 @@
+
+ # Written by David MacKenzie <djm@gnu.ai.mit.edu>.
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ BEGIN
+Index: autoconf-2.59/bin/autoupdate.in
+===================================================================
+--- autoconf-2.59.orig/bin/autoupdate.in 2003-08-27 07:26:32.000000000 -0400
++++ autoconf-2.59/bin/autoupdate.in 2005-03-09 16:30:19.912214040 -0500
+@@ -1,4 +1,4 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # autoupdate - modernize an Autoconf file.
+ # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
+@@ -22,7 +22,9 @@
+ # Originally written by David MacKenzie <djm@gnu.ai.mit.edu>.
+ # Rewritten by Akim Demaille <akim@freefriends.org>.
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ BEGIN
+@@ -54,7 +56,7 @@
+ my @include = ('@datadir@');
+ my $force = 0;
+ # m4.
+-my $m4 = $ENV{"M4"} || '@M4@';
++my $m4 = $ENV{"M4"} || '@bindir@/env m4';
+
+
+ # $HELP
+Index: autoconf-2.59/bin/ifnames.in
+===================================================================
+--- autoconf-2.59.orig/bin/ifnames.in 2003-10-10 09:52:56.000000000 -0400
++++ autoconf-2.59/bin/ifnames.in 2005-03-09 16:30:22.656796800 -0500
+@@ -1,8 +1,10 @@
+-#! @PERL@ -w
++#! @bindir@/env perl
+ # -*- perl -*-
+ # @configure_input@
+
+-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
++use warnings;
++
++eval 'case $# in 0) exec @bindir@/env perl -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
+ if 0;
+
+ # ifnames - print the identifiers used in C preprocessor conditionals
diff --git a/recipes/autoconf/autoconf-2.63/program_prefix.patch b/recipes/autoconf/autoconf-2.63/program_prefix.patch
new file mode 100644
index 0000000000..e6f4096a97
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/program_prefix.patch
@@ -0,0 +1,19 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- autoconf-2.57/lib/autoconf/general.m4~program_prefix
++++ autoconf-2.57/lib/autoconf/general.m4
+@@ -1676,8 +1676,9 @@
+ # The aliases save the names the user supplied, while $host etc.
+ # will get canonicalized.
+ test -n "$target_alias" &&
+- test "$program_prefix$program_suffix$program_transform_name" = \
+- NONENONEs,x,x, &&
++ test "$target_alias" != "$host_alias" &&
++ test "$program_prefix$program_suffix$program_transform_name" = \
++ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-[]dnl
+ ])# AC_CANONICAL_TARGET
+
diff --git a/recipes/autoconf/autoconf-2.63/sizeof_types.patch b/recipes/autoconf/autoconf-2.63/sizeof_types.patch
new file mode 100644
index 0000000000..30fd5c1926
--- /dev/null
+++ b/recipes/autoconf/autoconf-2.63/sizeof_types.patch
@@ -0,0 +1,87 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+Index: autoconf-2.59/lib/autoconf/types.m4
+===================================================================
+--- autoconf-2.59.orig/lib/autoconf/types.m4 2003-05-22 14:05:14.000000000 +0200
++++ autoconf-2.59/lib/autoconf/types.m4 2006-08-06 02:05:02.000000000 +0200
+@@ -380,26 +380,66 @@
+ # Generic checks. #
+ # ---------------- #
+
++# Backport of AC_CHECK_TARGET_TOOL from autoconf 2.60
++# AC_CHECK_TARGET_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH )
++# ------------------------------------------------------------------------
++# (Use different variables $1 and ac_ct_$1 so that cache vars don't conflict.)
++AC_DEFUN([AC_CHECK_TARGET_TOOL],
++[AC_BEFORE([$0], [AC_CANONICAL_TARGET])dnl
++AC_CHECK_PROG([$1], [$target_alias-$2], [$target_alias-$2], , [$4])
++if test -z "$ac_cv_prog_$1"; then
++ if test "$build" = "$target"; then
++ ac_ct_$1=$$1
++ AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4])
++ $1=ac_ct_$1
++ else
++ $1="$3"
++ fi
++else
++ $1="$ac_cv_prog_$1"
++fi
++])# AC_CHECK_TARGET_TOOL
++
++
++AC_DEFUN([AC_PROG_SIZE],
++[
++ AC_CHECK_TARGET_TOOL([SIZE], [size], [size], [$PATH])
++])
+
+ # AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES = DEFAULT-INCLUDES])
+ # ---------------------------------------------------------------
+ AC_DEFUN([AC_CHECK_SIZEOF],
+-[AS_LITERAL_IF([$1], [],
++[AC_REQUIRE([AC_PROG_SIZE])
++AC_REQUIRE([AC_PROG_AWK])
++ AS_LITERAL_IF([$1], [],
+ [AC_FATAL([$0: requires literal arguments])])dnl
+ AC_CHECK_TYPE([$1], [], [], [$3])
+ AC_CACHE_CHECK([size of $1], AS_TR_SH([ac_cv_sizeof_$1]),
+-[if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
+- # The cast to unsigned long works around a bug in the HP C Compiler
+- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+- # This bug is HP SR number 8606223364.
+- _AC_COMPUTE_INT([(long) (sizeof ($1))],
+- [AS_TR_SH([ac_cv_sizeof_$1])],
+- [AC_INCLUDES_DEFAULT([$3])],
+- [AC_MSG_FAILURE([cannot compute sizeof ($1), 77])])
++[
++if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
++ if test "$cross_compiling" = yes; then
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$3])],
++ [extern void dummy($1); static const $1 x[[256]]; dummy(x);])],
++ [
++ AS_TR_SH([ac_cv_sizeof_$1])=`$SIZE conftest.$ac_objext | tail -n 1 | $AWK '{print [$]3/256}'`
++ ],
++ [
++ AS_TR_SH([ac_cv_sizeof_$1])=0
++ ])
++ else
++ # The cast to unsigned long works around a bug in the HP C Compiler
++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++ # This bug is HP SR number 8606223364.
++ _AC_COMPUTE_INT([(long) (sizeof ($1))],
++ [AS_TR_SH([ac_cv_sizeof_$1])],
++ [AC_INCLUDES_DEFAULT([$3])],
++ [AC_MSG_FAILURE([cannot compute sizeof ($1), 77])])
++ fi
+ else
+ AS_TR_SH([ac_cv_sizeof_$1])=0
+-fi])dnl
++fi
++])dnl
+ AC_DEFINE_UNQUOTED(AS_TR_CPP(sizeof_$1), $AS_TR_SH([ac_cv_sizeof_$1]),
+ [The size of a `$1', as computed by sizeof.])
+ ])# AC_CHECK_SIZEOF
diff --git a/recipes/autoconf/autoconf-native_2.63.bb b/recipes/autoconf/autoconf-native_2.63.bb
new file mode 100644
index 0000000000..ad6cb79445
--- /dev/null
+++ b/recipes/autoconf/autoconf-native_2.63.bb
@@ -0,0 +1,11 @@
+require autoconf_${PV}.bb
+
+DEPENDS = "m4-native gnu-config-native"
+RDEPENDS_${PN} = "m4-native gnu-config-native"
+
+SRC_URI += "file://fix_path_xtra.patch;patch=1"
+
+S = "${WORKDIR}/autoconf-${PV}"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/autoconf-${PV}"
+
+inherit native
diff --git a/recipes/autoconf/autoconf_2.63.bb b/recipes/autoconf/autoconf_2.63.bb
new file mode 100644
index 0000000000..0230d790b1
--- /dev/null
+++ b/recipes/autoconf/autoconf_2.63.bb
@@ -0,0 +1,16 @@
+require autoconf.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+PARALLEL_MAKE = ""
+
+DEPENDS += "m4-native"
+RDEPENDS_${PN} = "m4 gnu-config"
+
+SRC_URI += " \
+ file://autoreconf-exclude.patch;patch=1 \
+ file://autoreconf-foreign.patch;patch=1 \
+ file://autoheader-nonfatal-warnings.patch;patch=1 \
+ file://autoreconf-gnuconfigize.patch;patch=1 \
+ file://config-site.patch;patch=1 \
+ ${@['file://path_prog_fixes.patch;patch=1', ''][bb.data.inherits_class('native', d)]}"
diff --git a/recipes/avahi/avahi.inc b/recipes/avahi/avahi.inc
index cbd6ac3d03..f5e68e26fe 100644
--- a/recipes/avahi/avahi.inc
+++ b/recipes/avahi/avahi.inc
@@ -7,7 +7,7 @@ LICENSE = "GPL"
DEPENDS = "expat virtual/libintl libdaemon dbus glib-2.0"
# uclibc has no nss
-RRECOMMENDS_avahi-daemon_append_linux = "libnss-mdns"
+RRECOMMENDS_avahi-daemon_append_libc-glibc = "libnss-mdns"
RDEPENDS_avahi-daemon += "sysvinit-pidof update-rc.d"
RDEPENDS_avahi-autoipd += "update-rc.d"
diff --git a/recipes/avahi/avahi_0.6.24.bb b/recipes/avahi/avahi_0.6.24.bb
index 15f56ffa95..61a62a54a4 100644
--- a/recipes/avahi/avahi_0.6.24.bb
+++ b/recipes/avahi/avahi_0.6.24.bb
@@ -1,5 +1,7 @@
require avahi.inc
+PR = "r1"
+
DEPENDS += "intltool-native"
PACKAGES =+ "libavahi-gobject"
diff --git a/recipes/base-files/base-files/mtx-2/fstab b/recipes/base-files/base-files/mtx-2/fstab
deleted file mode 100644
index 8b9ad0f308..0000000000
--- a/recipes/base-files/base-files/mtx-2/fstab
+++ /dev/null
@@ -1,9 +0,0 @@
-# /etc/fstab: static file system information. mtx-2
-#
-# <file system> <mount pt> <type> <options> <dump> <pass>
-rootfs / auto defaults 1 1
-tmpfs /var/volatile tmpfs mode=0755,size=10m 0 0
-proc /proc proc defaults 0 0
-devpts /dev/pts devpts mode=0620,gid=5 0 0
-tmpfs /dev/shm tmpfs mode=0777 0 0
-usbdevfs /proc/bus/usb usbdevfs noauto 0 0
diff --git a/recipes/base-files/base-files/mtx-2/profile b/recipes/base-files/base-files/mtx-2/profile
deleted file mode 100644
index bedf2fc7d8..0000000000
--- a/recipes/base-files/base-files/mtx-2/profile
+++ /dev/null
@@ -1,25 +0,0 @@
-# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
-# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
-
-PATH="/usr/local/bin:/usr/bin:/bin"
-
-if [ "`id -u`" -eq 0 ]; then
- PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:
-fi
-if [ "$PS1" ]; then
-# works for bash and ash (no other shells known to be in use here)
- PS1='\u@\h:\w\$ '
-fi
-
-if [ -d /etc/profile.d ]; then
- for i in `ls /etc/profile.d/`; do
- . /etc/profile.d/$i
- done
- unset i
-fi
-
-export PATH PS1
-
-umask 022
-
-alias ll="ls -lah" \ No newline at end of file
diff --git a/recipes/base-files/base-files/mtx-1/fstab b/recipes/base-files/base-files/nylon/fstab
index 5c0e2b39d5..5c0e2b39d5 100644
--- a/recipes/base-files/base-files/mtx-1/fstab
+++ b/recipes/base-files/base-files/nylon/fstab
diff --git a/recipes/base-files/base-files/mtx-1/profile b/recipes/base-files/base-files/nylon/profile
index bedf2fc7d8..04b6037ccf 100644
--- a/recipes/base-files/base-files/mtx-1/profile
+++ b/recipes/base-files/base-files/nylon/profile
@@ -8,7 +8,16 @@ if [ "`id -u`" -eq 0 ]; then
fi
if [ "$PS1" ]; then
# works for bash and ash (no other shells known to be in use here)
- PS1='\u@\h:\w\$ '
+ if [ "$UID" = "0" -o "$USER" = "root" ]; then
+ B='# '
+ else
+ B='$ '
+ fi
+ if [ -n "$BASH" ]; then
+ PS1="\u@\h:\w\$B"
+ else
+ PS1="$B"
+ fi
fi
if [ -d /etc/profile.d ]; then
@@ -22,4 +31,4 @@ export PATH PS1
umask 022
-alias ll="ls -lah" \ No newline at end of file
+alias ll="ls -lah"
diff --git a/recipes/base-files/base-files/profile b/recipes/base-files/base-files/profile
index 5797535093..b5ce69d9e6 100644
--- a/recipes/base-files/base-files/profile
+++ b/recipes/base-files/base-files/profile
@@ -12,7 +12,7 @@ if [ ! -e /etc/localtime ]; then
fi
if [ "`id -u`" -eq 0 ]; then
- PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:
+ PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
fi
if [ "$PS1" ]; then
# works for bash and ash (no other shells known to be in use here)
diff --git a/recipes/base-files/base-files_3.0.14.bb b/recipes/base-files/base-files_3.0.14.bb
index cc475f3bcb..5e78797e2a 100644
--- a/recipes/base-files/base-files_3.0.14.bb
+++ b/recipes/base-files/base-files_3.0.14.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Miscellaneous files for the base system."
SECTION = "base"
PRIORITY = "required"
-PR = "r86"
+PR = "r88"
LICENSE = "GPL"
SRC_URI = " \
@@ -45,6 +45,14 @@ dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
/mnt /media /media/card /media/cf /media/net /media/ram \
/media/union /media/realroot /media/hdd \
/media/mmc1"
+
+dirs755_micro = "/dev /proc /sys ${sysconfdir}"
+dirs2775_micro = ""
+dirs1777_micro = "/tmp"
+
+media = "card cf net ram"
+media_micro = ""
+
volatiles = "cache run log lock tmp"
conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
${sysconfdir}/inputrc ${sysconfdir}/issue /${sysconfdir}/issue.net \
@@ -71,9 +79,11 @@ do_install () {
install -m 2755 -d ${D}$d
done
for d in ${volatiles}; do
- ln -sf volatile/$d ${D}/${localstatedir}/$d
+ if [ -d ${D}${localstatedir}/volatile/$d ]; then
+ ln -sf volatile/$d ${D}/${localstatedir}/$d
+ fi
done
- for d in card cf net ram; do
+ for d in ${media}; do
ln -sf /media/$d ${D}/mnt/$d
done
@@ -83,40 +93,42 @@ do_install () {
echo ${hostname} > ${D}${sysconfdir}/hostname
fi
- install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
-
- if [ -n "${DISTRO_NAME}" ]; then
- echo -n "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
- echo -n "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
- if [ -n "${DISTRO_VERSION}" ]; then
- echo -n "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
- echo -n "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
- fi
- echo "\n \l" >> ${D}${sysconfdir}/issue
- echo >> ${D}${sysconfdir}/issue
- echo "%h" >> ${D}${sysconfdir}/issue.net
- echo >> ${D}${sysconfdir}/issue.net
- else
- install -m 0644 ${WORKDIR}/issue ${D}${sysconfdir}/issue
- install -m 0644 ${WORKDIR}/issue.net ${D}${sysconfdir}/issue.net
- fi
-
- install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab
- install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems
- install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
- install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
- install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
- install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
- install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
- install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf
- install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
- install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
-
- for license in BSD GPL-2 LGPL-2 LGPL-2.1 Artistic GPL-3 LGPL-3 GFDL-1.2; do
- install -m 0644 ${WORKDIR}/licenses/$license ${D}${datadir}/common-licenses/
- done
+ if [ "${DISTRO}" != "micro" -a "${DISTRO}" != "micro-uclibc" ]; then
+ install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
+
+ if [ -n "${DISTRO_NAME}" ]; then
+ echo -n "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
+ echo -n "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
+ if [ -n "${DISTRO_VERSION}" ]; then
+ echo -n "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
+ echo -n "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
+ fi
+ echo "\n \l" >> ${D}${sysconfdir}/issue
+ echo >> ${D}${sysconfdir}/issue
+ echo "%h" >> ${D}${sysconfdir}/issue.net
+ echo >> ${D}${sysconfdir}/issue.net
+ else
+ install -m 0644 ${WORKDIR}/issue ${D}${sysconfdir}/issue
+ install -m 0644 ${WORKDIR}/issue.net ${D}${sysconfdir}/issue.net
+ fi
+
+ install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab
+ install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems
+ install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
+ install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
+ install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
+ install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
+ install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
+ install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
+ for license in BSD GPL-2 LGPL-2 LGPL-2.1 Artistic GPL-3 LGPL-3 GFDL-1.2; do
+ install -m 0644 ${WORKDIR}/licenses/$license ${D}${datadir}/common-licenses/
+ done
+
+ ln -sf /proc/mounts ${D}${sysconfdir}/mtab
+ install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
+ fi
- ln -sf /proc/mounts ${D}${sysconfdir}/mtab
+ install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf
}
@@ -156,6 +168,7 @@ PACKAGE_ARCH_rt3000 = "rt3000"
PACKAGE_ARCH = "${MACHINE_ARCH}"
CONFFILES_${PN} = "${sysconfdir}/fstab ${sysconfdir}/hostname"
+CONFFILES_${PN}_micro = ""
CONFFILES_${PN}_nylon = "${sysconfdir}/resolv.conf ${sysconfdir}/fstab ${sysconfdir}/hostname"
CONFFILES_${PN}_slugos = "${sysconfdir}/resolv.conf ${sysconfdir}/fstab ${sysconfdir}/hostname"
diff --git a/recipes/base-passwd/base-passwd_3.5.20.bb b/recipes/base-passwd/base-passwd_3.5.20.bb
index 78079a0aa6..5305730a9f 100644
--- a/recipes/base-passwd/base-passwd_3.5.20.bb
+++ b/recipes/base-passwd/base-passwd_3.5.20.bb
@@ -1,6 +1,7 @@
DESCRIPTION = "Base system password/group files."
SECTION = "base"
LICENSE = "GPL"
+PR = "r1"
SRC_URI = "\
${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \
@@ -12,9 +13,7 @@ S = "${WORKDIR}/base-passwd"
inherit autotools
-do_install () {
- install -d -m 755 ${D}${sbindir}
- install -p -m 755 update-passwd ${D}${sbindir}/
+do_install_docs () {
install -d -m 755 \
${D}${mandir}/man8 ${D}${mandir}/pl/man8
install -p -m 644 man/update-passwd.8 \
@@ -23,11 +22,6 @@ do_install () {
${D}${mandir}/pl/man8/update-passwd.8
gzip -9 ${D}${mandir}/man8/* \
${D}${mandir}/pl/man8/*
- install -d -m 755 ${D}${datadir}/base-passwd
- install -p -m 644 passwd.master \
- ${D}${datadir}/base-passwd/
- install -p -m 644 group.master \
- ${D}${datadir}/base-passwd/
install -d -m 755 ${D}${docdir}/${PN}
install -p -m 644 debian/changelog ${D}${docdir}/${PN}/
@@ -36,6 +30,23 @@ do_install () {
install -p -m 644 debian/copyright ${D}${docdir}/${PN}/
}
+do_install () {
+ do_install_docs
+
+ install -d -m 755 ${D}${sbindir}
+ install -p -m 755 update-passwd ${D}${sbindir}/
+ install -d -m 755 ${D}${datadir}/base-passwd
+ install -p -m 644 passwd.master \
+ ${D}${datadir}/base-passwd/
+ install -p -m 644 group.master \
+ ${D}${datadir}/base-passwd/
+}
+
+do_install_micro () {
+ install -d -m 755 ${D}${sysconfdir}
+ install -p -m 644 passwd.master ${D}${sysconfdir}/passwd
+ install -p -m 644 group.master ${D}${sysconfdir}/group
+}
do_install_append_openmn() {
echo "0:Jn6tcg/qjqvUE:0:0:root:/root:/bin/sh" >>${D}${datadir}/base-passwd/passwd.master
diff --git a/recipes/binutils/binutils-2.14.90.0.7/binutils-2.14.90.0.7-fix-broken-configure.patch b/recipes/binutils/binutils-2.14.90.0.7/binutils-2.14.90.0.7-fix-broken-configure.patch
new file mode 100644
index 0000000000..30d4bcdf78
--- /dev/null
+++ b/recipes/binutils/binutils-2.14.90.0.7/binutils-2.14.90.0.7-fix-broken-configure.patch
@@ -0,0 +1,78 @@
+--- binutils-2.14.90.0.7/configure.in-orig 2009-03-30 13:12:57.000000000 +0200
++++ binutils-2.14.90.0.7/configure.in 2009-03-30 13:13:36.000000000 +0200
+@@ -1795,21 +1795,21 @@
+ # at the end of the argument list.
+ # These will be expanded by make, so quote '$'.
+ cat <<\EOF_SED > conftestsed
+-s/ --no[[^ ]]* / /
+-s/ --c[[a-z-]]*[[= ]][[^ ]]* / /
+-s/ --sr[[a-z-]]*[[= ]][[^ ]]* / /
+-s/ --ho[[a-z-]]*[[= ]][[^ ]]* / /
+-s/ --bu[[a-z-]]*[[= ]][[^ ]]* / /
+-s/ --t[[a-z-]]*[[= ]][[^ ]]* / /
+-s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / /
+-s/ -cache-file[[= ]][[^ ]]* / /
+-s/ -srcdir[[= ]][[^ ]]* / /
+-s/ -host[[= ]][[^ ]]* / /
+-s/ -build[[= ]][[^ ]]* / /
+-s/ -target[[= ]][[^ ]]* / /
+-s/ -program-prefix[[= ]][[^ ]]* / /
+-s/ -program-suffix[[= ]][[^ ]]* / /
+-s/ -program-transform-name[[= ]][[^ ]]* / /
++s/ --no[[^ ]]* / /g
++s/ --c[[a-z-]]*[[= ]][[^ ]]* / /g
++s/ --sr[[a-z-]]*[[= ]][[^ ]]* / /g
++s/ --ho[[a-z-]]*[[= ]][[^ ]]* / /g
++s/ --bu[[a-z-]]*[[= ]][[^ ]]* / /g
++s/ --t[[a-z-]]*[[= ]][[^ ]]* / /g
++s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / /g
++s/ -cache-file[[= ]][[^ ]]* / /g
++s/ -srcdir[[= ]][[^ ]]* / /g
++s/ -host[[= ]][[^ ]]* / /g
++s/ -build[[= ]][[^ ]]* / /g
++s/ -target[[= ]][[^ ]]* / /g
++s/ -program-prefix[[= ]][[^ ]]* / /g
++s/ -program-suffix[[= ]][[^ ]]* / /g
++s/ -program-transform-name[[= ]][[^ ]]* / /g
+ s/ [[^' -][^ ]*] / /
+ s/^ *//;s/ *$//
+ s,\$,$$,g
+--- binutils-2.14.90.0.7/configure-orig 2009-03-30 13:12:51.000000000 +0200
++++ binutils-2.14.90.0.7/configure 2009-03-30 13:13:25.000000000 +0200
+@@ -2556,21 +2556,21 @@
+ # at the end of the argument list.
+ # These will be expanded by make, so quote '$'.
+ cat <<\EOF_SED > conftestsed
+-s/ --no[^ ]* / /
+-s/ --c[a-z-]*[= ][^ ]* / /
+-s/ --sr[a-z-]*[= ][^ ]* / /
+-s/ --ho[a-z-]*[= ][^ ]* / /
+-s/ --bu[a-z-]*[= ][^ ]* / /
+-s/ --t[a-z-]*[= ][^ ]* / /
+-s/ --program-[pst][a-z-]*[= ][^ ]* / /
+-s/ -cache-file[= ][^ ]* / /
+-s/ -srcdir[= ][^ ]* / /
+-s/ -host[= ][^ ]* / /
+-s/ -build[= ][^ ]* / /
+-s/ -target[= ][^ ]* / /
+-s/ -program-prefix[= ][^ ]* / /
+-s/ -program-suffix[= ][^ ]* / /
+-s/ -program-transform-name[= ][^ ]* / /
++s/ --no[^ ]* / /g
++s/ --c[a-z-]*[= ][^ ]* / /g
++s/ --sr[a-z-]*[= ][^ ]* / /g
++s/ --ho[a-z-]*[= ][^ ]* / /g
++s/ --bu[a-z-]*[= ][^ ]* / /g
++s/ --t[a-z-]*[= ][^ ]* / /g
++s/ --program-[pst][a-z-]*[= ][^ ]* / /g
++s/ -cache-file[= ][^ ]* / /g
++s/ -srcdir[= ][^ ]* / /g
++s/ -host[= ][^ ]* / /g
++s/ -build[= ][^ ]* / /g
++s/ -target[= ][^ ]* / /g
++s/ -program-prefix[= ][^ ]* / /g
++s/ -program-suffix[= ][^ ]* / /g
++s/ -program-transform-name[= ][^ ]* / /g
+ s/ [^' -][^ ]* / /
+ s/^ *//;s/ *$//
+ s,\$,$$,g
diff --git a/recipes/binutils/binutils-2.19.51/110-arm-eabi-conf.patch b/recipes/binutils/binutils-2.19.51/110-arm-eabi-conf.patch
new file mode 100644
index 0000000000..2623301da0
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/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/recipes/binutils/binutils-2.19.51/binutils-2.16.1-e300c2c3.patch b/recipes/binutils/binutils-2.19.51/binutils-2.16.1-e300c2c3.patch
new file mode 100644
index 0000000000..dfe9b18e17
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/binutils-2.16.1-e300c2c3.patch
@@ -0,0 +1,18 @@
+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: binutils-2.19.51.0.3/opcodes/ppc-dis.c
+===================================================================
+--- binutils-2.19.51.0.3.orig/opcodes/ppc-dis.c 2009-04-16 00:38:45.000000000 -0700
++++ binutils-2.19.51.0.3/opcodes/ppc-dis.c 2009-04-16 00:43:56.000000000 -0700
+@@ -132,6 +132,8 @@
+ | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7 | PPC_OPCODE_ALTIVEC
+ | PPC_OPCODE_VSX),
+ 0 },
++ { "pmr", (PPC_OPCODE_PMR),
++ 0 },
+ { "ppc", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32),
+ 0 },
+ { "ppc32", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32),
diff --git a/recipes/binutils/binutils-2.19.51/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/recipes/binutils/binutils-2.19.51/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
new file mode 100644
index 0000000000..8df5b1fea0
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/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/recipes/binutils/binutils-2.19.51/binutils-arm-pr7093.patch b/recipes/binutils/binutils-2.19.51/binutils-arm-pr7093.patch
new file mode 100644
index 0000000000..ad4a556e0f
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/binutils-arm-pr7093.patch
@@ -0,0 +1,19 @@
+Index: binutils/bfd/elf32-arm.c
+===================================================================
+RCS file: /cvs/src/src/bfd/elf32-arm.c,v
+retrieving revision 1.162
+retrieving revision 1.163
+diff -u -r1.162 -r1.163
+--- binutils/bfd/elf32-arm.c 23 Dec 2008 09:01:45 -0000 1.162
++++ binutils/bfd/elf32-arm.c 23 Dec 2008 11:46:17 -0000 1.163
+@@ -4608,6 +4608,10 @@
+ Elf_Internal_Shdr *hdr;
+ unsigned int i, localsyms;
+
++ /* PR 7093: Make sure that we are dealing with an arm elf binary. */
++ if (! is_arm_elf (abfd))
++ return;
++
+ if ((abfd->flags & DYNAMIC) != 0)
+ return;
+
diff --git a/recipes/binutils/binutils-2.19.51/binutils-uclibc-100-uclibc-conf.patch b/recipes/binutils/binutils-2.19.51/binutils-uclibc-100-uclibc-conf.patch
new file mode 100644
index 0000000000..8de04e0fe0
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/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/recipes/binutils/binutils-2.19.51/binutils-uclibc-300-001_ld_makefile_patch.patch b/recipes/binutils/binutils-2.19.51/binutils-uclibc-300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000000..04a7e61e25
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/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/recipes/binutils/binutils-2.19.51/binutils-uclibc-300-006_better_file_error.patch b/recipes/binutils/binutils-2.19.51/binutils-uclibc-300-006_better_file_error.patch
new file mode 100644
index 0000000000..f337611edf
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/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/recipes/binutils/binutils-2.19.51/binutils-uclibc-300-012_check_ldrunpath_length.patch b/recipes/binutils/binutils-2.19.51/binutils-uclibc-300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000000..498651a90c
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/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/recipes/binutils/binutils-2.19.51/binutils-uclibc-gas-needs-libm.patch b/recipes/binutils/binutils-2.19.51/binutils-uclibc-gas-needs-libm.patch
new file mode 100644
index 0000000000..db838cf20c
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/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/recipes/binutils/binutils-2.19.51/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19.51/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000000..60544345dc
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+# Adapted to binutils 2.18.50.0.7
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
+ SHARABLE_SECTIONS=yes
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++ x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++ case "$EMULATION_NAME" in
++ *i386*) LIBPATH_SUFFIX=32 ;;
++ esac
++ ;;
++esac
diff --git a/recipes/binutils/binutils-2.19.51/ld-stub-crash.patch b/recipes/binutils/binutils-2.19.51/ld-stub-crash.patch
new file mode 100644
index 0000000000..1952649eb8
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/ld-stub-crash.patch
@@ -0,0 +1,26 @@
+Index: bfd/elf32-arm.c
+===================================================================
+RCS file: /cvs/src/src/bfd/elf32-arm.c,v
+retrieving revision 1.196
+diff -p -c -u -r1.196 elf32-arm.c
+--- bfd/elf32-arm.c 22 May 2009 11:58:44 -0000 1.196
++++ bfd/elf32-arm.c 12 Jun 2009 13:18:20 -0000
+@@ -3175,11 +3175,15 @@ arm_type_of_stub (struct bfd_link_info *
+
+ /* We have an extra 2-bytes reach because of
+ the mode change (bit 24 (H) of BLX encoding). */
++ /* A stub is needed only if this call is not throught a PLT
++ entry, because PLT stubs handle mode switching
++ already. */
+ if (branch_offset > (ARM_MAX_FWD_BRANCH_OFFSET + 2)
+ || (branch_offset < ARM_MAX_BWD_BRANCH_OFFSET)
+- || ((r_type == R_ARM_CALL) && !globals->use_blx)
+- || (r_type == R_ARM_JUMP24)
+- || (r_type == R_ARM_PLT32))
++ || ( (((r_type == R_ARM_CALL) && !globals->use_blx)
++ || (r_type == R_ARM_JUMP24)
++ || (r_type == R_ARM_PLT32))
++ && !use_plt))
+ {
+ stub_type = (info->shared | globals->pic_veneer)
+ /* PIC stubs. */
diff --git a/recipes/binutils/binutils-2.19.51/uclibc-segfault.patch b/recipes/binutils/binutils-2.19.51/uclibc-segfault.patch
new file mode 100644
index 0000000000..16a875f8eb
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51/uclibc-segfault.patch
@@ -0,0 +1,23 @@
+upstream: already committed
+
+--- clean/binutils-2.19.51/bfd/elf32-arm.c 2009-05-22 12:58:44.000000000 +0100
++++ binutils-2.19.51/bfd/elf32-arm.c 2009-06-08 21:29:49.000000000 +0100
+@@ -8960,7 +8964,7 @@ elf32_arm_fix_exidx_coverage (asection *
+ struct bfd_elf_section_data *elf_sec = elf_section_data (sec);
+ Elf_Internal_Shdr *hdr = &elf_sec->this_hdr;
+
+- if (hdr->sh_type != SHT_ARM_EXIDX)
++ if (!hdr || hdr->sh_type != SHT_ARM_EXIDX)
+ continue;
+
+ if (elf_sec->linked_to)
+--- clean/binutils-2.19.51/ld/emultempl/armelf.em 2009-05-22 12:58:45.000000000 +0100
++++ binutils-2.19.51/ld/emultempl/armelf.em 2009-06-08 21:26:34.000000000 +0100
+@@ -309,6 +309,7 @@ gld${EMULATION_NAME}_finish (void)
+ asection *out_sec = sec->output_section;
+
+ if (out_sec
++ && elf_section_data (sec)
+ && elf_section_type (sec) == SHT_PROGBITS
+ && (elf_section_flags (sec) & SHF_EXECINSTR) != 0
+ && (sec->flags & SEC_EXCLUDE) == 0
diff --git a/recipes/binutils/binutils-cross-sdk.inc b/recipes/binutils/binutils-cross-sdk.inc
index 6e9cda09b8..0ebe5147e6 100644
--- a/recipes/binutils/binutils-cross-sdk.inc
+++ b/recipes/binutils/binutils-cross-sdk.inc
@@ -17,7 +17,7 @@ do_install () {
rm ${D}${prefix}/${TARGET_SYS}/bin/.debug -Rf
rm ${D}${prefix}/${TARGET_SYS}/bin/*
for l in ${D}${bindir}/*; do
- ln -sf "../../${layout_base_bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
+ ln -sf "../../`basename ${bindir}`/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
done
# Install the libiberty header
diff --git a/recipes/binutils/binutils-cross-sdk_2.14.90.0.6.bb b/recipes/binutils/binutils-cross-sdk_2.14.90.0.6.bb
index f84a61d1f5..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.14.90.0.6.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.14.90.0.6.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r1"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.14.90.0.7.bb b/recipes/binutils/binutils-cross-sdk_2.14.90.0.7.bb
index f84a61d1f5..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.14.90.0.7.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.14.90.0.7.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r1"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.15.94.0.1.bb b/recipes/binutils/binutils-cross-sdk_2.15.94.0.1.bb
index 40e9889691..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.15.94.0.1.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.15.94.0.1.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r2"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.16.91.0.6.bb b/recipes/binutils/binutils-cross-sdk_2.16.91.0.6.bb
index f84a61d1f5..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.16.91.0.6.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.16.91.0.6.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r1"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.16.91.0.7.bb b/recipes/binutils/binutils-cross-sdk_2.16.91.0.7.bb
index cde4e42942..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.16.91.0.7.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.16.91.0.7.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r5"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.17.50.0.12.bb b/recipes/binutils/binutils-cross-sdk_2.17.50.0.12.bb
index cde4e42942..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.17.50.0.12.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.17.50.0.12.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r5"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.18.50.0.7.bb b/recipes/binutils/binutils-cross-sdk_2.18.50.0.7.bb
index cde4e42942..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.18.50.0.7.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.18.50.0.7.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r5"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.18.bb b/recipes/binutils/binutils-cross-sdk_2.18.bb
index cde4e42942..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.18.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.18.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r5"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.19.1.bb b/recipes/binutils/binutils-cross-sdk_2.19.1.bb
index f84a61d1f5..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.19.1.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.19.1.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r1"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.19.51.0.3.bb b/recipes/binutils/binutils-cross-sdk_2.19.51.0.3.bb
index 76dff5449f..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.19.51.0.3.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.19.51.0.3.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r0"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_2.19.bb b/recipes/binutils/binutils-cross-sdk_2.19.bb
index f84a61d1f5..2f13b264a1 100644
--- a/recipes/binutils/binutils-cross-sdk_2.19.bb
+++ b/recipes/binutils/binutils-cross-sdk_2.19.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-sdk.inc
-PR = "r1"
+PR = "${INC_PR}.1"
diff --git a/recipes/binutils/binutils-cross-sdk_cvs.bb b/recipes/binutils/binutils-cross-sdk_cvs.bb
index 94d2704a6f..b01afc4070 100644
--- a/recipes/binutils/binutils-cross-sdk_cvs.bb
+++ b/recipes/binutils/binutils-cross-sdk_cvs.bb
@@ -1,4 +1,4 @@
require binutils_cvs.bb
require binutils-cross-sdk.inc
-PR = "r5"
+PR = "${INC_PR}.1"
FILESPATHPKG .= ":binutils-cvs"
diff --git a/recipes/binutils/binutils-cross_2.18.50.0.7.bb b/recipes/binutils/binutils-cross_2.18.50.0.7.bb
index b78a30ac47..d245f7d11a 100644
--- a/recipes/binutils/binutils-cross_2.18.50.0.7.bb
+++ b/recipes/binutils/binutils-cross_2.18.50.0.7.bb
@@ -1,4 +1,3 @@
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
require binutils_${PV}.bb
require binutils-cross.inc
-
diff --git a/recipes/binutils/binutils-cross_2.18.bb b/recipes/binutils/binutils-cross_2.18.bb
index b78a30ac47..d245f7d11a 100644
--- a/recipes/binutils/binutils-cross_2.18.bb
+++ b/recipes/binutils/binutils-cross_2.18.bb
@@ -1,4 +1,3 @@
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
require binutils_${PV}.bb
require binutils-cross.inc
-
diff --git a/recipes/binutils/binutils-cross_2.19.1.bb b/recipes/binutils/binutils-cross_2.19.1.bb
index b78a30ac47..d245f7d11a 100644
--- a/recipes/binutils/binutils-cross_2.19.1.bb
+++ b/recipes/binutils/binutils-cross_2.19.1.bb
@@ -1,4 +1,3 @@
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
require binutils_${PV}.bb
require binutils-cross.inc
-
diff --git a/recipes/binutils/binutils-cross_2.19.51.0.3.bb b/recipes/binutils/binutils-cross_2.19.51.0.3.bb
index b78a30ac47..d245f7d11a 100644
--- a/recipes/binutils/binutils-cross_2.19.51.0.3.bb
+++ b/recipes/binutils/binutils-cross_2.19.51.0.3.bb
@@ -1,4 +1,3 @@
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
require binutils_${PV}.bb
require binutils-cross.inc
-
diff --git a/recipes/binutils/binutils-cross_2.19.51.bb b/recipes/binutils/binutils-cross_2.19.51.bb
new file mode 100644
index 0000000000..b78a30ac47
--- /dev/null
+++ b/recipes/binutils/binutils-cross_2.19.51.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/recipes/binutils/binutils-cross_2.19.bb b/recipes/binutils/binutils-cross_2.19.bb
index b78a30ac47..d245f7d11a 100644
--- a/recipes/binutils/binutils-cross_2.19.bb
+++ b/recipes/binutils/binutils-cross_2.19.bb
@@ -1,4 +1,3 @@
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
require binutils_${PV}.bb
require binutils-cross.inc
-
diff --git a/recipes/binutils/binutils_2.14.90.0.6.bb b/recipes/binutils/binutils_2.14.90.0.6.bb
index e3ab895446..ed12244bf9 100644
--- a/recipes/binutils/binutils_2.14.90.0.6.bb
+++ b/recipes/binutils/binutils_2.14.90.0.6.bb
@@ -2,7 +2,8 @@ SECTION = "devel"
LICENSE = "GPL"
inherit autotools gettext
-PR = "r5"
+INC_PR = "r5"
+PR = "${INC_PR}.1"
DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
diff --git a/recipes/binutils/binutils_2.14.90.0.7.bb b/recipes/binutils/binutils_2.14.90.0.7.bb
index b47c8e51b1..0d74328649 100644
--- a/recipes/binutils/binutils_2.14.90.0.7.bb
+++ b/recipes/binutils/binutils_2.14.90.0.7.bb
@@ -5,7 +5,8 @@ inherit autotools gettext
DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
LICENSE = "GPL"
-PR = "r6"
+INC_PR = "r6"
+PR = "${INC_PR}.1"
PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
@@ -48,7 +49,8 @@ SRC_URI = \
file://binutils-uclibc-210-cflags.patch;patch=1 \
file://binutils-100_cflags_for_build.patch;patch=1 \
file://plt32trunc.patch;patch=1 \
- file://600-arm-textrel.patch;patch=1"
+ file://600-arm-textrel.patch;patch=1 \
+ file://binutils-2.14.90.0.7-fix-broken-configure.patch;patch=1"
S = "${WORKDIR}/binutils-${PV}"
B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
diff --git a/recipes/binutils/binutils_2.15.94.0.1.bb b/recipes/binutils/binutils_2.15.94.0.1.bb
index 74a902b5e6..cdcf14534e 100644
--- a/recipes/binutils/binutils_2.15.94.0.1.bb
+++ b/recipes/binutils/binutils_2.15.94.0.1.bb
@@ -2,7 +2,8 @@ DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
-PR = "r5"
+INC_PR = "r5"
+PR = "${INC_PR}.1"
inherit autotools gettext
diff --git a/recipes/binutils/binutils_2.16.91.0.6.bb b/recipes/binutils/binutils_2.16.91.0.6.bb
index b2511492b3..3461c891ba 100644
--- a/recipes/binutils/binutils_2.16.91.0.6.bb
+++ b/recipes/binutils/binutils_2.16.91.0.6.bb
@@ -2,7 +2,8 @@ DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
-PR = "r3"
+INC_PR = "r3"
+PR = "${INC_PR}.1"
# glibc 2.3 has issues with this version
# of binutils.
diff --git a/recipes/binutils/binutils_2.16.91.0.7.bb b/recipes/binutils/binutils_2.16.91.0.7.bb
index 76c128583d..0fb1996ced 100644
--- a/recipes/binutils/binutils_2.16.91.0.7.bb
+++ b/recipes/binutils/binutils_2.16.91.0.7.bb
@@ -3,7 +3,8 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
DEFAULT_PREFERENCE = "-1"
-PR = "r2"
+INC_PR = "r5"
+PR = "${INC_PR}.1"
inherit autotools gettext
diff --git a/recipes/binutils/binutils_2.17.50.0.12.bb b/recipes/binutils/binutils_2.17.50.0.12.bb
index d24d24e1bc..d39ebc79b0 100644
--- a/recipes/binutils/binutils_2.17.50.0.12.bb
+++ b/recipes/binutils/binutils_2.17.50.0.12.bb
@@ -1,5 +1,6 @@
require binutils.inc
-PR = "r2"
+INC_PR = "r5"
+PR = "${INC_PR}.1"
SRC_URI = \
"${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
diff --git a/recipes/binutils/binutils_2.18.50.0.7.bb b/recipes/binutils/binutils_2.18.50.0.7.bb
index d2e3e3bcd8..2e2bb54d00 100644
--- a/recipes/binutils/binutils_2.18.50.0.7.bb
+++ b/recipes/binutils/binutils_2.18.50.0.7.bb
@@ -1,4 +1,5 @@
-PR = "r7"
+INC_PR = "r7"
+PR = "${INC_PR}.1"
require binutils.inc
LICENSE = "GPLv3"
diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
index 0155fb1151..87214644db 100644
--- a/recipes/binutils/binutils_2.18.bb
+++ b/recipes/binutils/binutils_2.18.bb
@@ -1,4 +1,5 @@
-PR = "r5"
+INC_PR = "r6"
+PR = "${INC_PR}.1"
require binutils.inc
LICENSE = "GPLv3"
@@ -18,3 +19,6 @@ SRC_URI = "\
# powerpc patches
SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
+
+# ep93xx crunch patches
+SRC_URI_append_ep9312 = " file://binutils-crunch.patch;patch=1"
diff --git a/recipes/binutils/binutils_2.19.1.bb b/recipes/binutils/binutils_2.19.1.bb
index 7ff6159c30..ea2de737ea 100644
--- a/recipes/binutils/binutils_2.19.1.bb
+++ b/recipes/binutils/binutils_2.19.1.bb
@@ -1,4 +1,5 @@
-PR = "r1"
+INC_PR = "r1"
+PR = "${INC_PR}.1"
require binutils.inc
LICENSE = "GPLv3"
diff --git a/recipes/binutils/binutils_2.19.51.0.3.bb b/recipes/binutils/binutils_2.19.51.0.3.bb
index 698ba2bc22..cf208b2ea9 100644
--- a/recipes/binutils/binutils_2.19.51.0.3.bb
+++ b/recipes/binutils/binutils_2.19.51.0.3.bb
@@ -1,4 +1,5 @@
-PR = "r1"
+INC_PR = "r1"
+PR = "${INC_PR}.1"
require binutils.inc
LICENSE = "GPLv3"
diff --git a/recipes/binutils/binutils_2.19.51.bb b/recipes/binutils/binutils_2.19.51.bb
new file mode 100644
index 0000000000..fe5491ee79
--- /dev/null
+++ b/recipes/binutils/binutils_2.19.51.bb
@@ -0,0 +1,22 @@
+PR = "r1"
+
+require binutils.inc
+LICENSE = "GPLv3"
+
+SRC_URI = "\
+ ftp://sourceware.org/pub/binutils/snapshots/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 \
+ file://binutils-arm-pr7093.patch;patch=1 \
+ file://uclibc-segfault.patch;patch=1 \
+ file://ld-stub-crash.patch;patch=1;pnum=0 \
+ "
+
+# powerpc patches
+SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
+
diff --git a/recipes/binutils/binutils_2.19.bb b/recipes/binutils/binutils_2.19.bb
index 652e705313..c1d821e11c 100644
--- a/recipes/binutils/binutils_2.19.bb
+++ b/recipes/binutils/binutils_2.19.bb
@@ -1,4 +1,5 @@
-PR = "r2"
+INC_PR = "r2"
+PR = "${INC_PR}.1"
require binutils.inc
LICENSE = "GPLv3"
diff --git a/recipes/binutils/binutils_cvs.bb b/recipes/binutils/binutils_cvs.bb
index 75c88867f1..f47de6f2ee 100644
--- a/recipes/binutils/binutils_cvs.bb
+++ b/recipes/binutils/binutils_cvs.bb
@@ -1,6 +1,7 @@
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "0.0+cvs${SRCDATE}"
-PR = "r0"
+INC_PR = "r5"
+PR = "${INC_PR}.1"
require binutils.inc
diff --git a/recipes/binutils/files/binutils-crunch.patch b/recipes/binutils/files/binutils-crunch.patch
new file mode 100644
index 0000000000..79771aad2c
--- /dev/null
+++ b/recipes/binutils/files/binutils-crunch.patch
@@ -0,0 +1,163 @@
+--- binutils-2.18-original/gas/config/tc-arm.c 2007-05-18 13:45:49.000000000 +1000
++++ binutils-2.18/gas/config/tc-arm.c 2008-04-03 12:38:28.000000000 +1000
+@@ -3573,6 +3575,140 @@
+ ignore_rest_of_line ();
+ }
+
++/* Parse a directive saving Maverick Crunch double registers. */
++
++static void
++s_arm_unwind_save_mvd (void)
++{
++ int reg;
++ int hi_reg;
++ int i;
++ unsigned mask = 0;
++ valueT op;
++
++ if (*input_line_pointer == '{')
++ input_line_pointer++;
++
++ do
++ {
++ reg = arm_reg_parse (&input_line_pointer, REG_TYPE_MVD);
++
++ if (reg == FAIL)
++ {
++ as_bad (_(reg_expected_msgs[REG_TYPE_MVD]));
++ goto error;
++ }
++
++ if (mask >> reg)
++ as_tsktsk (_("register list not in ascending order"));
++ mask |= 1 << reg;
++
++ if (*input_line_pointer == '-')
++ {
++ input_line_pointer++;
++ hi_reg = arm_reg_parse (&input_line_pointer, REG_TYPE_MVD);
++ if (hi_reg == FAIL)
++ {
++ as_bad (_(reg_expected_msgs[REG_TYPE_MVD]));
++ goto error;
++ }
++ else if (reg >= hi_reg)
++ {
++ as_bad (_("bad register range"));
++ goto error;
++ }
++ for (; reg < hi_reg; reg++)
++ mask |= 1 << reg;
++ }
++ }
++ while (skip_past_comma (&input_line_pointer) != FAIL);
++
++ if (*input_line_pointer == '}')
++ input_line_pointer++;
++
++ demand_empty_rest_of_line ();
++
++ /* Generate any deferred opcodes because we're going to be looking at
++ the list. */
++ flush_pending_unwind ();
++
++ for (i = 0; i < 16; i++)
++ {
++ if (mask & (1 << i))
++ unwind.frame_size += 8;
++ }
++
++ /* Attempt to combine with a previous opcode. We do this because gcc
++ likes to output separate unwind directives for a single block of
++ registers. */
++ if (unwind.opcode_count > 0)
++ {
++ i = unwind.opcodes[unwind.opcode_count - 1];
++ if ((i & 0xf8) == 0xd8)
++ {
++ i &= 7;
++ /* Only merge if the blocks are contiguous. */
++ if (i < 6)
++ {
++ if ((mask & 0xfe00) == (1 << 9))
++ {
++ mask |= ((1 << (i + 11)) - 1) & 0xfc00;
++ unwind.opcode_count--;
++ }
++ }
++ else if (i == 6 && unwind.opcode_count >= 2)
++ {
++ i = unwind.opcodes[unwind.opcode_count - 2];
++ reg = i >> 4;
++ i &= 0xf;
++
++ op = 0xffff << (reg - 1);
++ if (reg > 0
++ && ((mask & op) == (1u << (reg - 1))))
++ {
++ op = (1 << (reg + i + 1)) - 1;
++ op &= ~((1 << reg) - 1);
++ mask |= op;
++ unwind.opcode_count -= 2;
++ }
++ }
++ }
++ }
++
++ hi_reg = 15;
++ /* We want to generate opcodes in the order the registers have been
++ saved, ie. descending order. */
++ for (reg = 15; reg >= -1; reg--)
++ {
++ /* Save registers in blocks. */
++ if (reg < 0
++ || !(mask & (1 << reg)))
++ {
++ /* We found an unsaved reg. Generate opcodes to save the
++ preceeding block. */
++ if (reg != hi_reg)
++ {
++ if (reg == 9)
++ {
++ /* Short form. */
++ op = 0xd8 | (hi_reg - 10);
++ add_unwind_opcode (op, 1);
++ }
++ else
++ {
++ /* Long form. */
++ op = 0xde00 | ((reg + 1) << 4) | ((hi_reg - reg) - 1);
++ add_unwind_opcode (op, 2);
++ }
++ }
++ hi_reg = reg - 1;
++ }
++ }
++
++ return;
++error:
++ ignore_rest_of_line ();
++}
+
+ /* Parse an unwind_save directive.
+ If the argument is non-zero, this is a .vsave directive. */
+@@ -3624,6 +3760,8 @@
+ case REG_TYPE_MMXWR: s_arm_unwind_save_mmxwr (); return;
+ case REG_TYPE_MMXWCG: s_arm_unwind_save_mmxwcg (); return;
+
++ case REG_TYPE_MVD: s_arm_unwind_save_mvd (); return;
++
+ default:
+ as_bad (_(".unwind_save does not support this kind of register"));
+ ignore_rest_of_line ();
+@@ -14256,8 +14394,8 @@
+ REGDEF(FPSID,0,VFC), REGDEF(FPSCR,1,VFC), REGDEF(FPEXC,8,VFC),
+
+ /* Maverick DSP coprocessor registers. */
+- REGSET(mvf,MVF), REGSET(mvd,MVD), REGSET(mvfx,MVFX), REGSET(mvdx,MVDX),
+- REGSET(MVF,MVF), REGSET(MVD,MVD), REGSET(MVFX,MVFX), REGSET(MVDX,MVDX),
++ REGSET(mv,MVD), REGSET(mvf,MVF), REGSET(mvd,MVD), REGSET(mvfx,MVFX), REGSET(mvdx,MVDX),
++ REGSET(MV,MVD), REGSET(MVF,MVF), REGSET(MVD,MVD), REGSET(MVFX,MVFX), REGSET(MVDX,MVDX),
+
+ REGNUM(mvax,0,MVAX), REGNUM(mvax,1,MVAX),
+ REGNUM(mvax,2,MVAX), REGNUM(mvax,3,MVAX),
diff --git a/recipes/bluez/bluez-cups-backend_3.33.bb b/recipes/bluez/bluez-cups-backend_3.33.bb
index 40e099642a..f3601b424b 100644
--- a/recipes/bluez/bluez-cups-backend_3.33.bb
+++ b/recipes/bluez/bluez-cups-backend_3.33.bb
@@ -4,6 +4,10 @@ PR = "r1"
DEPENDS += "cups"
+# TI patch landed upstream sometime between 3.35 and 3.36,
+# albeit in a somewhat different form
+SRC_URI += "file://hciattach-ti-bts.patch;patch=1"
+
# see bluez-utils3.inc for the explanation of these option
EXTRA_OECONF = " \
--enable-bccmd \
diff --git a/recipes/bluez/bluez-gstreamer-plugin_3.33.bb b/recipes/bluez/bluez-gstreamer-plugin_3.33.bb
index 53b7eb86f2..f4e3ca4d83 100644
--- a/recipes/bluez/bluez-gstreamer-plugin_3.33.bb
+++ b/recipes/bluez/bluez-gstreamer-plugin_3.33.bb
@@ -4,6 +4,10 @@ PR = "r1"
DEPENDS += "gstreamer gst-plugins-base "
+# TI patch landed upstream sometime between 3.35 and 3.36,
+# albeit in a somewhat different form
+SRC_URI += "file://hciattach-ti-bts.patch;patch=1"
+
# see bluez-utils3.inc for the explanation of these option
EXTRA_OECONF = " \
--enable-bccmd \
diff --git a/recipes/bluez/bluez-libs/avinfo-link.patch b/recipes/bluez/bluez-libs/avinfo-link.patch
new file mode 100644
index 0000000000..9951b34bde
--- /dev/null
+++ b/recipes/bluez/bluez-libs/avinfo-link.patch
@@ -0,0 +1,27 @@
+upstream: not applicable
+comment from pb: not needed upstream, it's just a consequence of splitting the
+ package into -libs and -apps. But, equally, it wouldn't do any harm upstream
+ either. I might send it to them and see what they say.
+
+--- tools/Makefile.am.old 2009-05-22 11:27:06.000000000 +0100
++++ tools/Makefile.am 2009-05-22 11:27:29.000000000 +0100
+@@ -1,8 +1,10 @@
+
+ if TOOLS
+ tools_programs = hcitool l2ping sdptool ciptool
++avinfo_programs = avinfo
+ tools_manfiles = hcitool.1 l2ping.1 sdptool.1 ciptool.1
+ else
++avinfo_programs =
+ tools_programs =
+ tools_manfiles =
+ endif
+@@ -41,7 +43,7 @@
+
+ bin_PROGRAMS = $(tools_programs) $(dfutool_programs) $(dfubabel_programs)
+
+-noinst_PROGRAMS = hcieventmask hcisecfilter ppporc avinfo $(usb_programs)
++noinst_PROGRAMS = hcieventmask hcisecfilter ppporc $(avinfo_programs) $(usb_programs)
+
+ hcieventmask_LDADD = @BLUEZ_LIBS@
+
diff --git a/recipes/bluez/bluez-libs_4.42.bb b/recipes/bluez/bluez-libs_4.42.bb
new file mode 100644
index 0000000000..524b6643d6
--- /dev/null
+++ b/recipes/bluez/bluez-libs_4.42.bb
@@ -0,0 +1,4 @@
+require bluez4-libs.inc
+
+PR = "${INC_PR}.1"
+DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/bluez/bluez-utils-3.33/hciattach-ti-bts.patch b/recipes/bluez/bluez-utils-3.33/hciattach-ti-bts.patch
index 1b208f7979..3d84a4c20c 100644
--- a/recipes/bluez/bluez-utils-3.33/hciattach-ti-bts.patch
+++ b/recipes/bluez/bluez-utils-3.33/hciattach-ti-bts.patch
@@ -1,3 +1,6 @@
+upstream: accepted, this patch has landed upstream albeit in a different form
+sometime between 3.35 and 3.36. see the commit message in "git log e1d12d8bb5b40a6313cce52974f174fd76cbf32c"
+
--- 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 @@
diff --git a/recipes/bluez/bluez-utils-3.x/hciattach-ti-bts.patch b/recipes/bluez/bluez-utils-3.x/hciattach-ti-bts.patch
index 8fe37de9d3..f3a417dbc7 100644
--- a/recipes/bluez/bluez-utils-3.x/hciattach-ti-bts.patch
+++ b/recipes/bluez/bluez-utils-3.x/hciattach-ti-bts.patch
@@ -1,3 +1,6 @@
+upstream: accepted, this patch has landed upstream albeit in a different form
+sometime between 3.35 and 3.36. see the commit message in "git log e1d12d8bb5b40a6313cce52974f174fd76cbf32c"
+
--- bluez-utils-2.24/tools/hciattach.c.orig 2005-12-10 15:14:36.000000000 +0100
+++ bluez-utils-2.24/tools/hciattach.c 2006-01-22 13:56:13.000000000 +0100
@@ -57,6 +57,8 @@
diff --git a/recipes/bluez/bluez-utils-alsa_3.33.bb b/recipes/bluez/bluez-utils-alsa_3.33.bb
index a1e3e85818..2558b8728a 100644
--- a/recipes/bluez/bluez-utils-alsa_3.33.bb
+++ b/recipes/bluez/bluez-utils-alsa_3.33.bb
@@ -4,6 +4,10 @@ PR = "r1"
DEPENDS += "alsa-lib"
+# TI patch landed upstream sometime between 3.35 and 3.36,
+# albeit in a somewhat different form
+SRC_URI += "file://hciattach-ti-bts.patch;patch=1"
+
# see bluez-utils3.inc for the explanation of these option
EXTRA_OECONF = " \
--enable-bccmd \
diff --git a/recipes/bluez/bluez-utils3.inc b/recipes/bluez/bluez-utils3.inc
index 703788f0f8..5fab6e72c6 100644
--- a/recipes/bluez/bluez-utils3.inc
+++ b/recipes/bluez/bluez-utils3.inc
@@ -10,10 +10,8 @@ LICENSE = "GPL"
FILESPATH = "${FILE_DIRNAME}/bluez-utils-${PV}:${FILE_DIRNAME}/bluez-utils"
-# ti patch should be sent it upstream!
SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \
file://hcid.conf \
- file://hciattach-ti-bts.patch;patch=1 \
file://sbc-thumb.patch;patch=1"
diff --git a/recipes/bluez/bluez-utils_3.33.bb b/recipes/bluez/bluez-utils_3.33.bb
index dc098e3137..322f84114f 100644
--- a/recipes/bluez/bluez-utils_3.33.bb
+++ b/recipes/bluez/bluez-utils_3.33.bb
@@ -2,6 +2,10 @@ require bluez-utils3.inc
PR = "r3"
+# TI patch landed upstream sometime between 3.35 and 3.36,
+# albeit in a somewhat different form
+SRC_URI += "file://hciattach-ti-bts.patch;patch=1"
+
# see bluez-utils3.inc for the explanation of these option
EXTRA_OECONF = " \
--enable-bccmd \
diff --git a/recipes/bluez/bluez-utils_3.36.bb b/recipes/bluez/bluez-utils_3.36.bb
index bd319e85f2..20a9bad46c 100644
--- a/recipes/bluez/bluez-utils_3.36.bb
+++ b/recipes/bluez/bluez-utils_3.36.bb
@@ -2,11 +2,6 @@ require bluez-utils3.inc
PR = "r4"
-# removed hciattach-ti-bts.patch (landed upstream)
-SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \
- file://hcid.conf \
- file://sbc-thumb.patch;patch=1"
-
# see bluez-utils3.inc for the explanation of these option
EXTRA_OECONF = " \
--enable-bccmd \
diff --git a/recipes/bluez/bluez4-libs.inc b/recipes/bluez/bluez4-libs.inc
new file mode 100644
index 0000000000..4da389cdbb
--- /dev/null
+++ b/recipes/bluez/bluez4-libs.inc
@@ -0,0 +1,25 @@
+DESCRIPTION = "Linux Bluetooth Stack Userland libraries V4"
+SECTION = "libs"
+PRIORITY = "optional"
+HOMEPAGE = "http://www.bluez.org"
+LICENSE = "GPL"
+INC_PR = "r1"
+
+SRC_URI = "http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
+ file://avinfo-link.patch;patch=1;pnum=0"
+
+S = "${WORKDIR}/bluez-${PV}"
+
+inherit autotools_stage
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+EXTRA_OECONF = "\
+ --disable-tools \
+ --disable-audio \
+ --disable-network \
+ --disable-serial \
+ --disable-service \
+ --disable-usb \
+"
+
+FILES_${PN} = "${libdir}/libbluetooth.so.*"
diff --git a/recipes/bluez/bluez4.inc b/recipes/bluez/bluez4.inc
new file mode 100644
index 0000000000..f9a72a5345
--- /dev/null
+++ b/recipes/bluez/bluez4.inc
@@ -0,0 +1,68 @@
+DESCRIPTION = "Linux Bluetooth Stack Userland V4"
+SECTION = "libs"
+PRIORITY = "optional"
+DEPENDS = "gst-plugins-base alsa-lib libusb-compat dbus-glib"
+HOMEPAGE = "http://www.bluez.org"
+LICENSE = "GPL"
+INC_PR = "r1"
+
+# For angstrom we want this to replace at least bluez-libs
+PROVIDES_append_angstrom = " bluez-utils bluez-libs"
+
+SRC_URI = "\
+ http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
+ file://fix-dfutool-usb-declaration-mismatch.patch;patch=1 \
+ file://sbc-thumb.patch;patch=1 \
+ file://bluetooth.conf \
+"
+S = "${WORKDIR}/bluez-${PV}"
+
+inherit autotools_stage update-rc.d
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+EXTRA_OECONF = "\
+ --enable-gstreamer \
+ --enable-alsa \
+ --enable-usb \
+ --enable-netlink \
+ --enable-tools \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --enable-dfutool \
+ --enable-hidd \
+ --enable-pandd \
+ --enable-dund \
+ --disable-cups \
+ --enable-test \
+ --enable-manpages \
+ --enable-configfiles \
+ --enable-initscripts \
+ --disable-pcmciarules \
+"
+
+do_install_append() {
+ install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
+ install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
+ install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
+ # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
+ install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
+}
+
+INITSCRIPT_NAME = "bluetooth"
+INITSCRIPT_PARAMS = "defaults 23 19"
+
+PACKAGES =+ "gst-plugin-bluez libasound-module-bluez"
+
+FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so"
+FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so"
+FILES_${PN} += "${libdir}/bluetooth/plugins/*.so"
+FILES_${PN}-dev += "\
+ ${libdir}/bluetooth/plugins/*.la \
+ ${libdir}/alsa-lib/*.la \
+ ${libdir}/gstreamer-0.10/*.la \
+"
+
+FILES_${PN}-dbg += "\
+ ${libdir}/bluetooth/plugins/.debug \
+ ${libdir}/*/.debug \
+"
diff --git a/recipes/bluez/bluez4_4.39.bb b/recipes/bluez/bluez4_4.39.bb
index c28f260761..7a2968bda7 100644
--- a/recipes/bluez/bluez4_4.39.bb
+++ b/recipes/bluez/bluez4_4.39.bb
@@ -1,64 +1,4 @@
-DESCRIPTION = "Linux Bluetooth Stack Userland V4"
-SECTION = "libs"
-PRIORITY = "optional"
-DEPENDS = "gst-plugins-base alsa-lib libusb-compat dbus-glib"
-HOMEPAGE = "http://www.bluez.org"
-LICENSE = "GPL"
+require bluez4.inc
-# For angstrom we want this to replace at least bluez-libs
-PROVIDES_append_angstrom = " bluez-utils bluez-libs"
+PR = "${INC_PR}.1"
-SRC_URI = "\
- http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
- file://fix-dfutool-usb-declaration-mismatch.patch;patch=1 \
- file://sbc-thumb.patch;patch=1 \
- file://bluetooth.conf \
-"
-S = "${WORKDIR}/bluez-${PV}"
-
-inherit autotools_stage
-AUTOTOOLS_STAGE_PKGCONFIG = "1"
-
-EXTRA_OECONF = "\
- --enable-gstreamer \
- --enable-alsa \
- --enable-usb \
- --enable-netlink \
- --enable-tools \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-dfutool \
- --enable-hidd \
- --enable-pandd \
- --enable-dund \
- --disable-cups \
- --enable-test \
- --enable-manpages \
- --enable-configfiles \
- --enable-initscripts \
- --disable-pcmciarules \
-"
-
-do_install_append() {
- install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
- install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
- # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
- install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
-}
-
-PACKAGES =+ "gst-plugin-bluez libasound-module-bluez"
-
-FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so"
-FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so"
-FILES_${PN} += "${libdir}/bluetooth/plugins/*.so"
-FILES_${PN}-dev += "\
- ${libdir}/bluetooth/plugins/*.la \
- ${libdir}/alsa-lib/*.la \
- ${libdir}/gstreamer-0.10/*.la \
-"
-
-FILES_${PN}-dbg += "\
- ${libdir}/bluetooth/plugins/.debug \
- ${libdir}/*/.debug \
-"
diff --git a/recipes/bluez/bluez4_4.41.bb b/recipes/bluez/bluez4_4.41.bb
new file mode 100644
index 0000000000..7a2968bda7
--- /dev/null
+++ b/recipes/bluez/bluez4_4.41.bb
@@ -0,0 +1,4 @@
+require bluez4.inc
+
+PR = "${INC_PR}.1"
+
diff --git a/recipes/bluez/bluez4_4.42.bb b/recipes/bluez/bluez4_4.42.bb
new file mode 100644
index 0000000000..2d882759f9
--- /dev/null
+++ b/recipes/bluez/bluez4_4.42.bb
@@ -0,0 +1,5 @@
+require bluez4.inc
+
+DEPENDS += "libsndfile1"
+PR = "${INC_PR}.1"
+
diff --git a/recipes/bluez/obexd_0.13.bb b/recipes/bluez/obexd_0.13.bb
new file mode 100644
index 0000000000..e1cc6ce8ff
--- /dev/null
+++ b/recipes/bluez/obexd_0.13.bb
@@ -0,0 +1,10 @@
+DESCRIPTION = "OBEX Server and Client"
+DEPENDS = "openobex glib-2.0 dbus bluez4"
+
+LICENSE = "GPLv2"
+
+SRC_URI = "http://www.kernel.org/pub/linux/bluetooth/obexd-${PV}.tar.gz"
+
+inherit autotools_stage
+
+FILES_${PN} += "${datadir}/dbus-1/"
diff --git a/recipes/boost/boost-36.inc b/recipes/boost/boost-36.inc
index 5a4faaf1d6..4bd065f13a 100644
--- a/recipes/boost/boost-36.inc
+++ b/recipes/boost/boost-36.inc
@@ -43,18 +43,18 @@ S = "${WORKDIR}/${BOOST_P}"
# Make a package for each library, plus -dev
PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}"
python __anonymous () {
- import bb
-
- packages = []
- extras = []
- for lib in bb.data.getVar('BOOST_LIBS', d, 1).split( ):
- pkg = "boost-%s" % lib.replace("_", "-")
- extras.append("--with-%s" % lib)
- packages.append(pkg)
- if not bb.data.getVar("FILES_%s" % pkg, d, 1):
- bb.data.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so*" % lib, d)
- bb.data.setVar("BOOST_PACKAGES", " ".join(packages), d)
- bb.data.setVar("BJAM_EXTRA", " ".join(extras), d)
+ import bb
+
+ packages = []
+ extras = []
+ for lib in bb.data.getVar('BOOST_LIBS', d, 1).split( ):
+ pkg = "boost-%s" % lib.replace("_", "-")
+ extras.append("--with-%s" % lib)
+ packages.append(pkg)
+ if not bb.data.getVar("FILES_%s" % pkg, d, 1):
+ bb.data.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so*" % lib, d)
+ bb.data.setVar("BOOST_PACKAGES", " ".join(packages), d)
+ bb.data.setVar("BJAM_EXTRA", " ".join(extras), d)
}
# Override the contents of specific packages
diff --git a/recipes/busybox/busybox-1.13.2/angstrom/defconfig b/recipes/busybox/busybox-1.13.2/angstrom/defconfig
index 0db650fcf1..8934890ef4 100644
--- a/recipes/busybox/busybox-1.13.2/angstrom/defconfig
+++ b/recipes/busybox/busybox-1.13.2/angstrom/defconfig
@@ -214,8 +214,8 @@ CONFIG_SORT=y
CONFIG_FEATURE_SORT_BIG=y
# CONFIG_SPLIT is not set
# CONFIG_FEATURE_SPLIT_FANCY is not set
-# CONFIG_STAT is not set
-# CONFIG_FEATURE_STAT_FORMAT is not set
+CONFIG_STAT=y
+CONFIG_FEATURE_STAT_FORMAT=y
CONFIG_STTY=y
# CONFIG_SUM is not set
CONFIG_SYNC=y
diff --git a/recipes/busybox/busybox-1.13.2/defconfig b/recipes/busybox/busybox-1.13.2/defconfig
index 0db650fcf1..ddbaa0839d 100644
--- a/recipes/busybox/busybox-1.13.2/defconfig
+++ b/recipes/busybox/busybox-1.13.2/defconfig
@@ -720,7 +720,7 @@ CONFIG_FEATURE_UDHCPC_ARPING=y
# CONFIG_FEATURE_UDHCP_PORT is not set
# CONFIG_UDHCP_DEBUG is not set
# CONFIG_FEATURE_UDHCP_RFC3397 is not set
-CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+CONFIG_UDHCPC_DEFAULT_SCRIPT="@DATADIR@/udhcpc/default.script"
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
# CONFIG_VCONFIG is not set
CONFIG_WGET=y
diff --git a/recipes/busybox/busybox-1.13.2/micro/defconfig b/recipes/busybox/busybox-1.13.2/micro/defconfig
new file mode 100644
index 0000000000..8431d19702
--- /dev/null
+++ b/recipes/busybox/busybox-1.13.2/micro/defconfig
@@ -0,0 +1,869 @@
+#
+# Automatically generated make config: don't edit
+# Busybox version: 1.13.2
+# Mon Jun 15 17:33:00 2009
+#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+# CONFIG_DESKTOP is not set
+# CONFIG_EXTRA_COMPAT is not set
+CONFIG_FEATURE_ASSUME_UNICODE=y
+CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
+CONFIG_SHOW_USAGE=y
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+CONFIG_FEATURE_COMPRESS_USAGE=y
+# CONFIG_FEATURE_INSTALLER is not set
+CONFIG_LOCALE_SUPPORT=y
+CONFIG_GETOPT_LONG=y
+CONFIG_FEATURE_DEVPTS=y
+# CONFIG_FEATURE_CLEAN_UP is not set
+CONFIG_FEATURE_PIDFILE=y
+CONFIG_FEATURE_SUID=y
+CONFIG_FEATURE_SUID_CONFIG=y
+CONFIG_FEATURE_SUID_CONFIG_QUIET=y
+# CONFIG_SELINUX is not set
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+CONFIG_FEATURE_SYSLOG=y
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+# CONFIG_STATIC is not set
+# CONFIG_PIE is not set
+# CONFIG_NOMMU is not set
+# CONFIG_BUILD_LIBBUSYBOX is not set
+# CONFIG_FEATURE_INDIVIDUAL is not set
+# CONFIG_FEATURE_SHARED_BUSYBOX is not set
+CONFIG_LFS=y
+CONFIG_CROSS_COMPILER_PREFIX=""
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_PESSIMIZE is not set
+# CONFIG_WERROR is not set
+CONFIG_NO_DEBUG_LIB=y
+# CONFIG_DMALLOC is not set
+# CONFIG_EFENCE is not set
+# CONFIG_INCLUDE_SUSv2 is not set
+
+#
+# Installation Options
+#
+# CONFIG_INSTALL_NO_USR is not set
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+# CONFIG_INSTALL_APPLET_DONT is not set
+# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
+# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
+# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+CONFIG_PASSWORD_MINLEN=6
+CONFIG_MD5_SIZE_VS_SPEED=2
+CONFIG_FEATURE_FAST_TOP=y
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+CONFIG_FEATURE_EDITING=y
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+# CONFIG_FEATURE_EDITING_VI is not set
+CONFIG_FEATURE_EDITING_HISTORY=64
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+CONFIG_FEATURE_TAB_COMPLETION=y
+CONFIG_FEATURE_USERNAME_COMPLETION=y
+CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
+CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y
+CONFIG_FEATURE_COPYBUF_KB=4
+CONFIG_MONOTONIC_SYSCALL=y
+CONFIG_IOCTL_HEX2STR_ERROR=y
+# CONFIG_FEATURE_HWIB is not set
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+# CONFIG_FEATURE_SEAMLESS_LZMA is not set
+CONFIG_FEATURE_SEAMLESS_BZ2=y
+CONFIG_FEATURE_SEAMLESS_GZ=y
+CONFIG_FEATURE_SEAMLESS_Z=y
+CONFIG_AR=y
+# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
+CONFIG_BUNZIP2=y
+# CONFIG_BZIP2 is not set
+CONFIG_CPIO=y
+# CONFIG_FEATURE_CPIO_O is not set
+# CONFIG_DPKG is not set
+# CONFIG_DPKG_DEB is not set
+# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
+CONFIG_GUNZIP=y
+CONFIG_GZIP=y
+# CONFIG_RPM2CPIO is not set
+# CONFIG_RPM is not set
+CONFIG_TAR=y
+CONFIG_FEATURE_TAR_CREATE=y
+CONFIG_FEATURE_TAR_AUTODETECT=y
+CONFIG_FEATURE_TAR_FROM=y
+CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+CONFIG_FEATURE_TAR_LONG_OPTIONS=y
+CONFIG_FEATURE_TAR_UNAME_GNAME=y
+# CONFIG_UNCOMPRESS is not set
+# CONFIG_UNLZMA is not set
+# CONFIG_FEATURE_LZMA_FAST is not set
+CONFIG_UNZIP=y
+
+#
+# Coreutils
+#
+CONFIG_BASENAME=y
+# CONFIG_CAL is not set
+CONFIG_CAT=y
+# CONFIG_CATV is not set
+CONFIG_CHGRP=y
+CONFIG_CHMOD=y
+CONFIG_CHOWN=y
+CONFIG_CHROOT=y
+# CONFIG_CKSUM is not set
+# CONFIG_COMM is not set
+CONFIG_CP=y
+CONFIG_CUT=y
+CONFIG_DATE=y
+CONFIG_FEATURE_DATE_ISOFMT=y
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+CONFIG_DF=y
+CONFIG_FEATURE_DF_FANCY=y
+CONFIG_DIRNAME=y
+# CONFIG_DOS2UNIX is not set
+# CONFIG_UNIX2DOS is not set
+CONFIG_DU=y
+CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
+CONFIG_ECHO=y
+CONFIG_FEATURE_FANCY_ECHO=y
+CONFIG_ENV=y
+CONFIG_FEATURE_ENV_LONG_OPTIONS=y
+# CONFIG_EXPAND is not set
+# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
+CONFIG_EXPR=y
+# CONFIG_EXPR_MATH_SUPPORT_64 is not set
+CONFIG_FALSE=y
+# CONFIG_FOLD is not set
+CONFIG_HEAD=y
+CONFIG_FEATURE_FANCY_HEAD=y
+# CONFIG_HOSTID is not set
+CONFIG_ID=y
+# CONFIG_INSTALL is not set
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+# CONFIG_LENGTH is not set
+CONFIG_LN=y
+CONFIG_LOGNAME=y
+CONFIG_LS=y
+CONFIG_FEATURE_LS_FILETYPES=y
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_SORTFILES=y
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+CONFIG_FEATURE_LS_USERNAME=y
+# CONFIG_FEATURE_LS_COLOR is not set
+# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
+CONFIG_MD5SUM=y
+CONFIG_MKDIR=y
+CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
+CONFIG_MKFIFO=y
+CONFIG_MKNOD=y
+CONFIG_MV=y
+CONFIG_FEATURE_MV_LONG_OPTIONS=y
+CONFIG_NICE=y
+CONFIG_NOHUP=y
+CONFIG_OD=y
+# CONFIG_PRINTENV is not set
+CONFIG_PRINTF=y
+CONFIG_PWD=y
+CONFIG_READLINK=y
+CONFIG_FEATURE_READLINK_FOLLOW=y
+CONFIG_REALPATH=y
+CONFIG_RM=y
+CONFIG_RMDIR=y
+CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y
+CONFIG_SEQ=y
+# CONFIG_SHA1SUM is not set
+CONFIG_SLEEP=y
+CONFIG_FEATURE_FANCY_SLEEP=y
+CONFIG_FEATURE_FLOAT_SLEEP=y
+CONFIG_SORT=y
+CONFIG_FEATURE_SORT_BIG=y
+# CONFIG_SPLIT is not set
+# CONFIG_FEATURE_SPLIT_FANCY is not set
+# CONFIG_STAT is not set
+# CONFIG_FEATURE_STAT_FORMAT is not set
+CONFIG_STTY=y
+# CONFIG_SUM is not set
+CONFIG_SYNC=y
+# CONFIG_TAC is not set
+CONFIG_TAIL=y
+CONFIG_FEATURE_FANCY_TAIL=y
+CONFIG_TEE=y
+CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+CONFIG_TEST=y
+# CONFIG_FEATURE_TEST_64 is not set
+CONFIG_TOUCH=y
+CONFIG_TR=y
+CONFIG_FEATURE_TR_CLASSES=y
+# CONFIG_FEATURE_TR_EQUIV is not set
+CONFIG_TRUE=y
+CONFIG_TTY=y
+CONFIG_UNAME=y
+# CONFIG_UNEXPAND is not set
+# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
+CONFIG_UNIQ=y
+CONFIG_USLEEP=y
+# CONFIG_UUDECODE is not set
+# CONFIG_UUENCODE is not set
+CONFIG_WC=y
+# CONFIG_FEATURE_WC_LARGE is not set
+# CONFIG_WHO is not set
+CONFIG_WHOAMI=y
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
+
+#
+# Common options for ls, more and telnet
+#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+# CONFIG_FEATURE_HUMAN_READABLE is not set
+
+#
+# Common options for md5sum, sha1sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+CONFIG_CHVT=y
+CONFIG_CLEAR=y
+CONFIG_DEALLOCVT=y
+CONFIG_DUMPKMAP=y
+# CONFIG_KBD_MODE is not set
+# CONFIG_LOADFONT is not set
+CONFIG_LOADKMAP=y
+CONFIG_OPENVT=y
+CONFIG_RESET=y
+# CONFIG_RESIZE is not set
+# CONFIG_FEATURE_RESIZE_PRINT is not set
+CONFIG_SETCONSOLE=y
+# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
+# CONFIG_SETFONT is not set
+# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
+CONFIG_DEFAULT_SETFONT_DIR=""
+# CONFIG_SETKEYCODES is not set
+# CONFIG_SETLOGCONS is not set
+# CONFIG_SHOWKEY is not set
+
+#
+# Debian Utilities
+#
+CONFIG_MKTEMP=y
+# CONFIG_PIPE_PROGRESS is not set
+CONFIG_RUN_PARTS=y
+CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
+CONFIG_FEATURE_RUN_PARTS_FANCY=y
+CONFIG_START_STOP_DAEMON=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+CONFIG_AWK=y
+CONFIG_FEATURE_AWK_LIBM=y
+CONFIG_CMP=y
+CONFIG_DIFF=y
+CONFIG_FEATURE_DIFF_BINARY=y
+CONFIG_FEATURE_DIFF_DIR=y
+CONFIG_FEATURE_DIFF_MINIMAL=y
+# CONFIG_ED is not set
+CONFIG_PATCH=y
+CONFIG_SED=y
+CONFIG_VI=y
+CONFIG_FEATURE_VI_MAX_LEN=1024
+CONFIG_FEATURE_VI_8BIT=y
+CONFIG_FEATURE_VI_COLON=y
+CONFIG_FEATURE_VI_YANKMARK=y
+CONFIG_FEATURE_VI_SEARCH=y
+CONFIG_FEATURE_VI_USE_SIGNALS=y
+CONFIG_FEATURE_VI_DOT_CMD=y
+# CONFIG_FEATURE_VI_READONLY is not set
+# CONFIG_FEATURE_VI_SETOPTS is not set
+CONFIG_FEATURE_VI_SET=y
+CONFIG_FEATURE_VI_WIN_RESIZE=y
+CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+CONFIG_FIND=y
+CONFIG_FEATURE_FIND_PRINT0=y
+CONFIG_FEATURE_FIND_MTIME=y
+CONFIG_FEATURE_FIND_MMIN=y
+CONFIG_FEATURE_FIND_PERM=y
+CONFIG_FEATURE_FIND_TYPE=y
+CONFIG_FEATURE_FIND_XDEV=y
+CONFIG_FEATURE_FIND_MAXDEPTH=y
+CONFIG_FEATURE_FIND_NEWER=y
+CONFIG_FEATURE_FIND_INUM=y
+CONFIG_FEATURE_FIND_EXEC=y
+CONFIG_FEATURE_FIND_USER=y
+CONFIG_FEATURE_FIND_GROUP=y
+CONFIG_FEATURE_FIND_NOT=y
+CONFIG_FEATURE_FIND_DEPTH=y
+CONFIG_FEATURE_FIND_PAREN=y
+CONFIG_FEATURE_FIND_SIZE=y
+CONFIG_FEATURE_FIND_PRUNE=y
+CONFIG_FEATURE_FIND_DELETE=y
+CONFIG_FEATURE_FIND_PATH=y
+CONFIG_FEATURE_FIND_REGEX=y
+# CONFIG_FEATURE_FIND_CONTEXT is not set
+CONFIG_GREP=y
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_FEATURE_GREP_CONTEXT=y
+CONFIG_XARGS=y
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+# CONFIG_INIT is not set
+# CONFIG_FEATURE_USE_INITTAB is not set
+# CONFIG_FEATURE_KILL_REMOVED is not set
+CONFIG_FEATURE_KILL_DELAY=0
+# CONFIG_FEATURE_INIT_SCTTY is not set
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+# CONFIG_FEATURE_EXTRA_QUIET is not set
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+# CONFIG_FEATURE_INITRD is not set
+# CONFIG_HALT is not set
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+# CONFIG_FEATURE_SHADOWPASSWDS is not set
+# CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_USE_BB_SHADOW is not set
+CONFIG_USE_BB_CRYPT=y
+# CONFIG_ADDGROUP is not set
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+# CONFIG_DELGROUP is not set
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+# CONFIG_FEATURE_CHECK_NAMES is not set
+# CONFIG_ADDUSER is not set
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+# CONFIG_DELUSER is not set
+CONFIG_GETTY=y
+CONFIG_FEATURE_UTMP=y
+CONFIG_FEATURE_WTMP=y
+CONFIG_LOGIN=y
+# CONFIG_PAM is not set
+CONFIG_LOGIN_SCRIPTS=y
+CONFIG_FEATURE_NOLOGIN=y
+CONFIG_FEATURE_SECURETTY=y
+# CONFIG_PASSWD is not set
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+CONFIG_CRYPTPW=y
+# CONFIG_CHPASSWD is not set
+CONFIG_SU=y
+CONFIG_FEATURE_SU_SYSLOG=y
+CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+CONFIG_SULOGIN=y
+# CONFIG_VLOCK is not set
+
+#
+# Linux Ext2 FS Progs
+#
+CONFIG_CHATTR=y
+# CONFIG_FSCK is not set
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
+CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
+# CONFIG_MODPROBE_SMALL is not set
+# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
+# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
+CONFIG_INSMOD=y
+CONFIG_RMMOD=y
+CONFIG_LSMOD=y
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+CONFIG_MODPROBE=y
+CONFIG_FEATURE_MODPROBE_BLACKLIST=y
+# CONFIG_DEPMOD is not set
+
+#
+# Options common to multiple modutils
+#
+# CONFIG_FEATURE_2_4_MODULES is not set
+# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
+# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
+# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+CONFIG_FEATURE_MODUTILS_ALIAS=y
+CONFIG_FEATURE_MODUTILS_SYMBOLS=y
+
+#
+# Linux System Utilities
+#
+CONFIG_BLKID=y
+CONFIG_DMESG=y
+CONFIG_FEATURE_DMESG_PRETTY=y
+CONFIG_FBSET=y
+CONFIG_FEATURE_FBSET_FANCY=y
+CONFIG_FEATURE_FBSET_READMODE=y
+# CONFIG_FDFLUSH is not set
+# CONFIG_FDFORMAT is not set
+# CONFIG_FDISK is not set
+CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
+# CONFIG_FEATURE_FDISK_WRITABLE is not set
+# CONFIG_FEATURE_AIX_LABEL is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_SUN_LABEL is not set
+# CONFIG_FEATURE_OSF_LABEL is not set
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+# CONFIG_FINDFS is not set
+CONFIG_FREERAMDISK=y
+# CONFIG_FSCK_MINIX is not set
+# CONFIG_MKFS_MINIX is not set
+# CONFIG_FEATURE_MINIX2 is not set
+CONFIG_GETOPT=y
+CONFIG_HEXDUMP=y
+# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
+# CONFIG_HD is not set
+CONFIG_HWCLOCK=y
+CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
+CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
+# CONFIG_IPCRM is not set
+# CONFIG_IPCS is not set
+CONFIG_LOSETUP=y
+CONFIG_MDEV=y
+CONFIG_FEATURE_MDEV_CONF=y
+CONFIG_FEATURE_MDEV_RENAME=y
+CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
+CONFIG_FEATURE_MDEV_EXEC=y
+CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
+CONFIG_MKSWAP=y
+# CONFIG_FEATURE_MKSWAP_V0 is not set
+CONFIG_MORE=y
+CONFIG_FEATURE_USE_TERMIOS=y
+CONFIG_VOLUMEID=y
+# CONFIG_FEATURE_VOLUMEID_EXT is not set
+# CONFIG_FEATURE_VOLUMEID_REISERFS is not set
+# CONFIG_FEATURE_VOLUMEID_FAT is not set
+# CONFIG_FEATURE_VOLUMEID_HFS is not set
+# CONFIG_FEATURE_VOLUMEID_JFS is not set
+# CONFIG_FEATURE_VOLUMEID_XFS is not set
+# CONFIG_FEATURE_VOLUMEID_NTFS is not set
+# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set
+# CONFIG_FEATURE_VOLUMEID_UDF is not set
+# CONFIG_FEATURE_VOLUMEID_LUKS is not set
+# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set
+# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
+# CONFIG_FEATURE_VOLUMEID_ROMFS is not set
+# CONFIG_FEATURE_VOLUMEID_SYSV is not set
+# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set
+# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set
+CONFIG_MOUNT=y
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+CONFIG_FEATURE_MOUNT_VERBOSE=y
+CONFIG_FEATURE_MOUNT_HELPERS=y
+CONFIG_FEATURE_MOUNT_LABEL=y
+CONFIG_FEATURE_MOUNT_NFS=y
+CONFIG_FEATURE_MOUNT_CIFS=y
+CONFIG_FEATURE_MOUNT_FLAGS=y
+CONFIG_FEATURE_MOUNT_FSTAB=y
+CONFIG_PIVOT_ROOT=y
+CONFIG_RDATE=y
+CONFIG_RDEV=y
+CONFIG_READPROFILE=y
+CONFIG_RTCWAKE=y
+# CONFIG_SCRIPT is not set
+# CONFIG_SETARCH is not set
+CONFIG_SWAPONOFF=y
+# CONFIG_FEATURE_SWAPON_PRI is not set
+CONFIG_SWITCH_ROOT=y
+CONFIG_UMOUNT=y
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+CONFIG_FEATURE_MOUNT_LOOP=y
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+# CONFIG_ADJTIMEX is not set
+# CONFIG_BBCONFIG is not set
+# CONFIG_CHAT is not set
+# CONFIG_FEATURE_CHAT_NOFAIL is not set
+# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
+# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set
+# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set
+# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set
+# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set
+# CONFIG_FEATURE_CHAT_CLR_ABORT is not set
+# CONFIG_CHRT is not set
+# CONFIG_CROND is not set
+# CONFIG_FEATURE_CROND_D is not set
+# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
+# CONFIG_CRONTAB is not set
+CONFIG_DC=y
+CONFIG_FEATURE_DC_LIBM=y
+# CONFIG_DEVFSD is not set
+# CONFIG_DEVFSD_MODLOAD is not set
+# CONFIG_DEVFSD_FG_NP is not set
+# CONFIG_DEVFSD_VERBOSE is not set
+# CONFIG_FEATURE_DEVFS is not set
+# CONFIG_DEVMEM is not set
+# CONFIG_EJECT is not set
+# CONFIG_FEATURE_EJECT_SCSI is not set
+CONFIG_FBSPLASH=y
+# CONFIG_INOTIFYD is not set
+# CONFIG_LAST is not set
+# CONFIG_FEATURE_LAST_SMALL is not set
+# CONFIG_FEATURE_LAST_FANCY is not set
+CONFIG_LESS=y
+CONFIG_FEATURE_LESS_MAXLINES=9999999
+CONFIG_FEATURE_LESS_BRACKETS=y
+CONFIG_FEATURE_LESS_FLAGS=y
+# CONFIG_FEATURE_LESS_DASHCMD is not set
+# CONFIG_FEATURE_LESS_MARKS is not set
+# CONFIG_FEATURE_LESS_REGEXP is not set
+# CONFIG_FEATURE_LESS_LINENUMS is not set
+# CONFIG_FEATURE_LESS_WINCH is not set
+# CONFIG_HDPARM is not set
+# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
+# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
+# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
+CONFIG_MAKEDEVS=y
+# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
+CONFIG_FEATURE_MAKEDEVS_TABLE=y
+# CONFIG_MAN is not set
+# CONFIG_MICROCOM is not set
+# CONFIG_MOUNTPOINT is not set
+# CONFIG_MT is not set
+# CONFIG_RAIDAUTORUN is not set
+CONFIG_READAHEAD=y
+# CONFIG_RUNLEVEL is not set
+# CONFIG_RX is not set
+# CONFIG_SETSID is not set
+CONFIG_STRINGS=y
+# CONFIG_TASKSET is not set
+# CONFIG_FEATURE_TASKSET_FANCY is not set
+CONFIG_TIME=y
+# CONFIG_TTYSIZE is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+CONFIG_FEATURE_IPV6=y
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+# CONFIG_ARP is not set
+# CONFIG_ARPING is not set
+# CONFIG_BRCTL is not set
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+# CONFIG_FEATURE_BRCTL_SHOW is not set
+# CONFIG_DNSD is not set
+# CONFIG_ETHER_WAKE is not set
+# CONFIG_FAKEIDENTD is not set
+# CONFIG_FTPGET is not set
+# CONFIG_FTPPUT is not set
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+CONFIG_HOSTNAME=y
+# CONFIG_HTTPD is not set
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+# CONFIG_FEATURE_HTTPD_CGI is not set
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+# CONFIG_IFCONFIG is not set
+# CONFIG_FEATURE_IFCONFIG_STATUS is not set
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+# CONFIG_FEATURE_IFCONFIG_HW is not set
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+# CONFIG_IFENSLAVE is not set
+CONFIG_IFUPDOWN=y
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+CONFIG_FEATURE_IFUPDOWN_IP=y
+CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
+# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+CONFIG_FEATURE_IFUPDOWN_IPV6=y
+CONFIG_FEATURE_IFUPDOWN_MAPPING=y
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+# CONFIG_INETD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
+# CONFIG_FEATURE_INETD_RPC is not set
+CONFIG_IP=y
+CONFIG_FEATURE_IP_ADDRESS=y
+CONFIG_FEATURE_IP_LINK=y
+CONFIG_FEATURE_IP_ROUTE=y
+CONFIG_FEATURE_IP_TUNNEL=y
+# CONFIG_FEATURE_IP_RULE is not set
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_IPTUNNEL is not set
+# CONFIG_IPRULE is not set
+# CONFIG_IPCALC is not set
+# CONFIG_FEATURE_IPCALC_FANCY is not set
+# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
+# CONFIG_NAMEIF is not set
+# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
+CONFIG_NC=y
+CONFIG_NC_SERVER=y
+CONFIG_NC_EXTRA=y
+CONFIG_NETSTAT=y
+CONFIG_FEATURE_NETSTAT_WIDE=y
+CONFIG_FEATURE_NETSTAT_PRG=y
+CONFIG_NSLOOKUP=y
+CONFIG_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING=y
+# CONFIG_PSCAN is not set
+# CONFIG_ROUTE is not set
+# CONFIG_SLATTACH is not set
+# CONFIG_TELNET is not set
+# CONFIG_FEATURE_TELNET_TTYPE is not set
+# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
+# CONFIG_TELNETD is not set
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+CONFIG_TFTP=y
+# CONFIG_TFTPD is not set
+CONFIG_FEATURE_TFTP_GET=y
+CONFIG_FEATURE_TFTP_PUT=y
+# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
+# CONFIG_TFTP_DEBUG is not set
+CONFIG_TRACEROUTE=y
+CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
+CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE=y
+CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y
+CONFIG_APP_UDHCPD=y
+CONFIG_APP_DHCPRELAY=y
+CONFIG_APP_DUMPLEASES=y
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
+CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
+CONFIG_APP_UDHCPC=y
+CONFIG_FEATURE_UDHCPC_ARPING=y
+# CONFIG_FEATURE_UDHCP_PORT is not set
+# CONFIG_UDHCP_DEBUG is not set
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+CONFIG_UDHCPC_DEFAULT_SCRIPT="@DATADIR@/udhcpc/default.script"
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
+# CONFIG_VCONFIG is not set
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+CONFIG_ZCIP=y
+# CONFIG_TCPSVD is not set
+# CONFIG_UDPSVD is not set
+
+#
+# Print Utilities
+#
+# CONFIG_LPD is not set
+# CONFIG_LPR is not set
+# CONFIG_LPQ is not set
+
+#
+# Mail Utilities
+#
+# CONFIG_MAKEMIME is not set
+CONFIG_FEATURE_MIME_CHARSET=""
+# CONFIG_POPMAILDIR is not set
+# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set
+# CONFIG_REFORMIME is not set
+# CONFIG_FEATURE_REFORMIME_COMPAT is not set
+# CONFIG_SENDMAIL is not set
+# CONFIG_FEATURE_SENDMAIL_MAILX is not set
+# CONFIG_FEATURE_SENDMAIL_MAILXX is not set
+
+#
+# Process Utilities
+#
+CONFIG_FREE=y
+CONFIG_FUSER=y
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+CONFIG_KILLALL5=y
+# CONFIG_NMETER is not set
+# CONFIG_PGREP is not set
+CONFIG_PIDOF=y
+CONFIG_FEATURE_PIDOF_SINGLE=y
+CONFIG_FEATURE_PIDOF_OMIT=y
+# CONFIG_PKILL is not set
+CONFIG_PS=y
+CONFIG_FEATURE_PS_WIDE=y
+# CONFIG_FEATURE_PS_TIME is not set
+# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
+CONFIG_RENICE=y
+CONFIG_BB_SYSCTL=y
+CONFIG_TOP=y
+CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
+CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
+# CONFIG_FEATURE_TOP_SMP_CPU is not set
+# CONFIG_FEATURE_TOP_DECIMALS is not set
+# CONFIG_FEATURE_TOP_SMP_PROCESS is not set
+# CONFIG_FEATURE_TOPMEM is not set
+CONFIG_UPTIME=y
+# CONFIG_WATCH is not set
+
+#
+# Runit Utilities
+#
+# CONFIG_RUNSV is not set
+# CONFIG_RUNSVDIR is not set
+# CONFIG_FEATURE_RUNSVDIR_LOG is not set
+# CONFIG_SV is not set
+CONFIG_SV_DEFAULT_SERVICE_DIR=""
+# CONFIG_SVLOGD is not set
+# CONFIG_CHPST is not set
+# CONFIG_SETUIDGID is not set
+# CONFIG_ENVUIDGID is not set
+# CONFIG_ENVDIR is not set
+# CONFIG_SOFTLIMIT is not set
+# CONFIG_CHCON is not set
+# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
+# CONFIG_GETENFORCE is not set
+# CONFIG_GETSEBOOL is not set
+# CONFIG_LOAD_POLICY is not set
+# CONFIG_MATCHPATHCON is not set
+# CONFIG_RESTORECON is not set
+# CONFIG_RUNCON is not set
+# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
+# CONFIG_SELINUXENABLED is not set
+# CONFIG_SETENFORCE is not set
+# CONFIG_SETFILES is not set
+# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
+# CONFIG_SETSEBOOL is not set
+# CONFIG_SESTATUS is not set
+
+#
+# Shells
+#
+CONFIG_FEATURE_SH_IS_ASH=y
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+# CONFIG_FEATURE_SH_IS_MSH is not set
+# CONFIG_FEATURE_SH_IS_NONE is not set
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+CONFIG_ASH_BASH_COMPAT=y
+CONFIG_ASH_JOB_CONTROL=y
+CONFIG_ASH_READ_NCHARS=y
+CONFIG_ASH_READ_TIMEOUT=y
+CONFIG_ASH_ALIAS=y
+CONFIG_ASH_MATH_SUPPORT=y
+# CONFIG_ASH_MATH_SUPPORT_64 is not set
+CONFIG_ASH_GETOPTS=y
+CONFIG_ASH_BUILTIN_ECHO=y
+# CONFIG_ASH_BUILTIN_PRINTF is not set
+CONFIG_ASH_BUILTIN_TEST=y
+# CONFIG_ASH_CMDCMD is not set
+# CONFIG_ASH_MAIL is not set
+# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+CONFIG_ASH_EXPAND_PRMT=y
+# CONFIG_HUSH is not set
+# CONFIG_HUSH_HELP is not set
+# CONFIG_HUSH_INTERACTIVE is not set
+# CONFIG_HUSH_JOB is not set
+# CONFIG_HUSH_TICK is not set
+# CONFIG_HUSH_IF is not set
+# CONFIG_HUSH_LOOPS is not set
+# CONFIG_HUSH_CASE is not set
+# CONFIG_LASH is not set
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+CONFIG_FEATURE_SH_EXTRA_QUIET=y
+# CONFIG_FEATURE_SH_STANDALONE is not set
+# CONFIG_FEATURE_SH_NOFORK is not set
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+CONFIG_SYSLOGD=y
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_FEATURE_REMOTE_LOG=y
+CONFIG_FEATURE_SYSLOGD_DUP=y
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
+CONFIG_LOGREAD=y
+CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
+CONFIG_KLOGD=y
+CONFIG_LOGGER=y
diff --git a/recipes/busybox/busybox-1.13.2/xargs-double-size.patch b/recipes/busybox/busybox-1.13.2/xargs-double-size.patch
new file mode 100644
index 0000000000..df64554ffc
--- /dev/null
+++ b/recipes/busybox/busybox-1.13.2/xargs-double-size.patch
@@ -0,0 +1,13 @@
+--- busybox-1.2.1/findutils/xargs.c.org 2006-09-19 18:18:17.084592997 +0200
++++ busybox-1.2.1/findutils/xargs.c 2006-09-19 18:18:09.820275793 +0200
+@@ -466,8 +466,8 @@
+ have it at 1 meg). Things will work fine with a large ARG_MAX but it
+ will probably hurt the system more than it needs to; an array of this
+ size is allocated. */
+- if (orig_arg_max > 20 * 1024)
+- orig_arg_max = 20 * 1024;
++ if (orig_arg_max > 40 * 1024)
++ orig_arg_max = 40 * 1024;
+ n_max_chars = orig_arg_max;
+ }
+ max_chars = xmalloc(n_max_chars);
diff --git a/recipes/busybox/busybox-1.3.1/xargs-double-size.patch b/recipes/busybox/busybox-1.3.1/xargs-double-size.patch
index df64554ffc..ef1e5df7a1 100644
--- a/recipes/busybox/busybox-1.3.1/xargs-double-size.patch
+++ b/recipes/busybox/busybox-1.3.1/xargs-double-size.patch
@@ -1,5 +1,5 @@
---- busybox-1.2.1/findutils/xargs.c.org 2006-09-19 18:18:17.084592997 +0200
-+++ busybox-1.2.1/findutils/xargs.c 2006-09-19 18:18:09.820275793 +0200
+--- busybox-1.3.1/findutils/xargs.c.org 2006-09-19 18:18:17.084592997 +0200
++++ busybox-1.3.1/findutils/xargs.c 2006-09-19 18:18:09.820275793 +0200
@@ -466,8 +466,8 @@
have it at 1 meg). Things will work fine with a large ARG_MAX but it
will probably hurt the system more than it needs to; an array of this
diff --git a/recipes/busybox/busybox-1.7.2/nylon/defconfig b/recipes/busybox/busybox-1.7.2/nylon/defconfig
new file mode 100644
index 0000000000..271732f2d1
--- /dev/null
+++ b/recipes/busybox/busybox-1.7.2/nylon/defconfig
@@ -0,0 +1,568 @@
+#
+# Automatically generated make config: don't edit
+#
+HAVE_DOT_CONFIG=y
+
+#
+# General Configuration
+#
+# CONFIG_NITPICK is not set
+CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
+CONFIG_FEATURE_VERBOSE_USAGE=y
+# CONFIG_FEATURE_INSTALLER is not set
+# CONFIG_LOCALE_SUPPORT is not set
+CONFIG_FEATURE_DEVFS=y
+# CONFIG_EJECT is not set
+CONFIG_FEATURE_DEVPTS=y
+# CONFIG_FEATURE_CLEAN_UP is not set
+CONFIG_FEATURE_SUID=y
+CONFIG_FEATURE_SUID_CONFIG=y
+CONFIG_FEATURE_SUID_CONFIG_QUIET=y
+# CONFIG_SELINUX is not set
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+
+#
+# Build Options
+#
+# CONFIG_STATIC is not set
+# CONFIG_BUILD_LIBBUSYBOX is not set
+# CONFIG_LFS is not set
+# USING_CROSS_COMPILER is not set
+EXTRA_CFLAGS_OPTIONS=""
+# CONFIG_BUILD_AT_ONCE is not set
+
+#
+# Installation Options
+#
+# CONFIG_INSTALL_NO_USR is not set
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+# CONFIG_INSTALL_APPLET_DONT is not set
+PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+CONFIG_MD5_SIZE_VS_SPEED=2
+
+#
+# Archival Utilities
+#
+CONFIG_AR=y
+CONFIG_FEATURE_AR_LONG_FILENAMES=y
+CONFIG_BUNZIP2=y
+CONFIG_CPIO=y
+CONFIG_DPKG=y
+CONFIG_DPKG_DEB=y
+# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
+CONFIG_GUNZIP=y
+CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y
+CONFIG_GZIP=y
+# CONFIG_RPM2CPIO is not set
+# CONFIG_RPM is not set
+CONFIG_TAR=y
+CONFIG_FEATURE_TAR_CREATE=y
+# CONFIG_FEATURE_TAR_BZIP2 is not set
+CONFIG_FEATURE_TAR_FROM=y
+CONFIG_FEATURE_TAR_GZIP=y
+CONFIG_FEATURE_TAR_COMPRESS=y
+# CONFIG_FEATURE_TAR_LZMA is not set
+CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+CONFIG_FEATURE_TAR_LONG_OPTIONS=y
+CONFIG_UNCOMPRESS=y
+# CONFIG_UNLZMA is not set
+CONFIG_UNZIP=y
+
+#
+# Common options for cpio and tar
+#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+# CONFIG_FEATURE_DEB_TAR_LZMA is not set
+
+#
+# Common options for dpkg and dpkg_deb
+#
+CONFIG_FEATURE_DEB_TAR_GZ=y
+CONFIG_FEATURE_DEB_TAR_BZ2=y
+
+#
+# Coreutils
+#
+CONFIG_BASENAME=y
+CONFIG_CAL=y
+CONFIG_CAT=y
+# CONFIG_CATV is not set
+CONFIG_CHGRP=y
+CONFIG_CHMOD=y
+CONFIG_CHOWN=y
+CONFIG_CHROOT=y
+CONFIG_DIFF=y
+# CONFIG_FEATURE_DIFF_BINARY is not set
+CONFIG_FEATURE_DIFF_DIR=y
+# CONFIG_FEATURE_DIFF_MINIMAL is not set
+# CONFIG_COMM is not set
+# CONFIG_CKSUM is not set
+# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+CONFIG_CMP=y
+CONFIG_CP=y
+CONFIG_CUT=y
+CONFIG_DATE=y
+
+#
+# date (forced enabled for use with watch)
+#
+CONFIG_FEATURE_DATE_ISOFMT=y
+CONFIG_DD=y
+CONFIG_DF=y
+CONFIG_DIRNAME=y
+CONFIG_DOS2UNIX=y
+CONFIG_UNIX2DOS=y
+CONFIG_DU=y
+CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
+CONFIG_ECHO=y
+CONFIG_FEATURE_FANCY_ECHO=y
+CONFIG_ENV=y
+# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
+CONFIG_EXPR=y
+# CONFIG_EXPR_MATH_SUPPORT_64 is not set
+CONFIG_FALSE=y
+CONFIG_FOLD=y
+CONFIG_HEAD=y
+CONFIG_FEATURE_FANCY_HEAD=y
+CONFIG_HOSTID=y
+CONFIG_ID=y
+CONFIG_INSTALL=y
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+CONFIG_LENGTH=y
+CONFIG_LN=y
+CONFIG_LOGNAME=y
+CONFIG_LS=y
+CONFIG_FEATURE_LS_FILETYPES=y
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_SORTFILES=y
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+CONFIG_FEATURE_LS_USERNAME=y
+CONFIG_FEATURE_LS_COLOR=y
+CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+CONFIG_MD5SUM=y
+CONFIG_MKDIR=y
+# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
+CONFIG_MKFIFO=y
+CONFIG_MKNOD=y
+CONFIG_MV=y
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+CONFIG_NICE=y
+CONFIG_NOHUP=y
+CONFIG_OD=y
+# CONFIG_PRINTENV is not set
+CONFIG_PRINTF=y
+CONFIG_PWD=y
+CONFIG_REALPATH=y
+CONFIG_RM=y
+CONFIG_RMDIR=y
+CONFIG_SEQ=y
+CONFIG_SHA1SUM=y
+CONFIG_SLEEP=y
+CONFIG_FEATURE_FANCY_SLEEP=y
+CONFIG_SORT=y
+# CONFIG_FEATURE_SORT_BIG is not set
+CONFIG_STAT=y
+# CONFIG_FEATURE_STAT_FORMAT is not set
+CONFIG_STTY=y
+# CONFIG_SUM is not set
+CONFIG_SYNC=y
+CONFIG_TAIL=y
+CONFIG_FEATURE_FANCY_TAIL=y
+CONFIG_TEE=y
+CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+# CONFIG_TEST is not set
+CONFIG_TOUCH=y
+CONFIG_TR=y
+# CONFIG_FEATURE_TR_CLASSES is not set
+# CONFIG_FEATURE_TR_EQUIV is not set
+CONFIG_TRUE=y
+CONFIG_TTY=y
+CONFIG_UNAME=y
+CONFIG_UNIQ=y
+CONFIG_USLEEP=y
+CONFIG_UUDECODE=y
+CONFIG_UUENCODE=y
+CONFIG_WATCH=y
+CONFIG_WC=y
+CONFIG_WHO=y
+CONFIG_WHOAMI=y
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
+
+#
+# Common options for ls and more
+#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+# CONFIG_CHVT is not set
+CONFIG_CLEAR=y
+# CONFIG_DEALLOCVT is not set
+CONFIG_DUMPKMAP=y
+CONFIG_GETKEY=y
+# CONFIG_LOADFONT is not set
+CONFIG_LOADKMAP=y
+# CONFIG_OPENVT is not set
+CONFIG_RESET=y
+CONFIG_SETCONSOLE=y
+# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
+CONFIG_SETKEYCODES=y
+CONFIG_SETLOGCONS=n
+
+#
+# Debian Utilities
+#
+CONFIG_MKTEMP=y
+CONFIG_PIPE_PROGRESS=y
+CONFIG_READLINK=y
+CONFIG_FEATURE_READLINK_FOLLOW=y
+CONFIG_RUN_PARTS=y
+# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
+CONFIG_START_STOP_DAEMON=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+CONFIG_AWK=y
+CONFIG_FEATURE_AWK_MATH=y
+# CONFIG_ED is not set
+CONFIG_PATCH=y
+CONFIG_SED=y
+# CONFIG_VI is not set
+#CONFIG_FEATURE_VI_COLON=y
+#CONFIG_FEATURE_VI_YANKMARK=y
+#CONFIG_FEATURE_VI_SEARCH=y
+#CONFIG_FEATURE_VI_USE_SIGNALS=y
+#CONFIG_FEATURE_VI_DOT_CMD=y
+#CONFIG_FEATURE_VI_READONLY=y
+#CONFIG_FEATURE_VI_SETOPTS=y
+#CONFIG_FEATURE_VI_SET=y
+#CONFIG_FEATURE_VI_WIN_RESIZE=y
+#CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+
+#
+# Finding Utilities
+#
+CONFIG_FIND=y
+CONFIG_FEATURE_FIND_PRINT0=y
+CONFIG_FEATURE_FIND_MTIME=y
+CONFIG_FEATURE_FIND_MMIN=y
+CONFIG_FEATURE_FIND_PERM=y
+CONFIG_FEATURE_FIND_TYPE=y
+CONFIG_FEATURE_FIND_XDEV=y
+CONFIG_FEATURE_FIND_NEWER=y
+CONFIG_FEATURE_FIND_INUM=y
+CONFIG_FEATURE_FIND_EXEC=y
+CONFIG_GREP=y
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_FEATURE_GREP_CONTEXT=y
+CONFIG_XARGS=y
+CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+# CONFIG_INIT is not set
+# CONFIG_HALT is not set
+# CONFIG_POWEROFF is not set
+# CONFIG_REBOOT is not set
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+# CONFIG_FEATURE_SHADOWPASSWDS is not set
+# CONFIG_USE_BB_SHADOW is not set
+# CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_ADDGROUP is not set
+# CONFIG_DELGROUP is not set
+# CONFIG_ADDUSER is not set
+# CONFIG_DELUSER is not set
+# CONFIG_GETTY is not set
+CONFIG_FEATURE_U_W_TMP=y
+# CONFIG_LOGIN is not set
+# CONFIG_PASSWD is not set
+# CONFIG_SU is not set
+# CONFIG_SULOGIN is not set
+# CONFIG_VLOCK is not set
+
+#
+# Linux Ext2 FS Progs
+#
+# CONFIG_CHATTR is not set
+# CONFIG_E2FSCK is not set
+# CONFIG_FSCK is not set
+# CONFIG_LSATTR is not set
+# CONFIG_MKE2FS is not set
+# CONFIG_TUNE2FS is not set
+# CONFIG_E2LABEL is not set
+# CONFIG_FINDFS is not set
+
+#
+# Miscellaneous Utilities
+#
+# CONFIG_ADJTIMEX is not set
+# CONFIG_BBCONFIG is not set
+CONFIG_CROND=y
+# CONFIG_DEBUG_CROND_OPTION is not set
+# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
+CONFIG_CRONTAB=y
+CONFIG_DC=y
+# CONFIG_DEVFSD is not set
+# CONFIG_LAST is not set
+CONFIG_LESS=y
+# CONFIG_FEATURE_LESS_BRACKETS is not set
+# CONFIG_FEATURE_LESS_FLAGS is not set
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+# CONFIG_FEATURE_LESS_MARKS is not set
+# CONFIG_FEATURE_LESS_REGEXP is not set
+# CONFIG_HDPARM is not set
+# CONFIG_MAKEDEVS is not set
+# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
+# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
+# CONFIG_MOUNTPOINT is not set
+# CONFIG_MT is not set
+# CONFIG_RUNLEVEL is not set
+# CONFIG_RX is not set
+CONFIG_STRINGS=y
+# CONFIG_SETSID is not set
+# CONFIG_TASKSET is not set
+CONFIG_TIME=y
+CONFIG_WATCHDOG=y
+
+#
+# Linux Module Utilities
+#
+# CONFIG_INSMOD is not set
+# CONFIG_LSMOD is not set
+# CONFIG_MODPROBE is not set
+# CONFIG_RMMOD is not set
+
+#
+# Networking Utilities
+#
+CONFIG_FEATURE_IPV6=y
+CONFIG_ARPING=y
+# CONFIG_DNSD is not set
+# CONFIG_ETHER_WAKE is not set
+# CONFIG_FAKEIDENTD is not set
+# CONFIG_FTPGET is not set
+# CONFIG_FTPPUT is not set
+CONFIG_HOSTNAME=y
+CONFIG_HTTPD=y
+CONFIG_FEATURE_HTTPD_WITHOUT_INETD=y
+CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y
+# CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY is not set
+CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
+CONFIG_FEATURE_HTTPD_AUTH_MD5=y
+CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y
+CONFIG_FEATURE_HTTPD_SETUID=y
+CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES=y
+CONFIG_FEATURE_HTTPD_CGI=y
+CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
+CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
+CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
+CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
+CONFIG_IFCONFIG=y
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
+CONFIG_FEATURE_IFCONFIG_HW=y
+CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
+CONFIG_IFUPDOWN=y
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+CONFIG_FEATURE_IFUPDOWN_IPV6=y
+# CONFIG_FEATURE_IFUPDOWN_IPX is not set
+CONFIG_FEATURE_IFUPDOWN_MAPPING=y
+CONFIG_INETD=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
+# CONFIG_FEATURE_INETD_RPC is not set
+# CONFIG_IP is not set
+CONFIG_IPCALC=y
+CONFIG_FEATURE_IPCALC_FANCY=y
+# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_IPTUNNEL is not set
+CONFIG_NAMEIF=y
+CONFIG_NC=y
+# CONFIG_NC_GAPING_SECURITY_HOLE is not set
+CONFIG_NETSTAT=y
+CONFIG_NSLOOKUP=y
+CONFIG_PING=y
+CONFIG_FEATURE_FANCY_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING6=y
+CONFIG_ROUTE=y
+CONFIG_TELNET=y
+CONFIG_FEATURE_TELNET_TTYPE=y
+CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+# CONFIG_TELNETD is not set
+CONFIG_TFTP=y
+CONFIG_FEATURE_TFTP_GET=y
+CONFIG_FEATURE_TFTP_PUT=y
+CONFIG_FEATURE_TFTP_BLOCKSIZE=y
+# CONFIG_DEBUG_TFTP is not set
+CONFIG_TRACEROUTE=y
+CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
+CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE=y
+# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
+CONFIG_VCONFIG=y
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_IP6_LITERAL=y
+# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
+CONFIG_ZCIP=y
+
+#
+# udhcp Server/Client
+#
+CONFIG_APP_UDHCPD=y
+CONFIG_APP_UDHCPC=y
+CONFIG_APP_DUMPLEASES=y
+CONFIG_FEATURE_UDHCP_SYSLOG=y
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+
+#
+# Process Utilities
+#
+CONFIG_FREE=y
+# CONFIG_FUSER is not set
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+CONFIG_PIDOF=y
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+CONFIG_PS=y
+# CONFIG_FEATURE_PS_WIDE is not set
+CONFIG_RENICE=y
+CONFIG_BB_SYSCTL=y
+CONFIG_TOP=y
+CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
+FEATURE_CPU_USAGE_PERCENTAGE=y
+CONFIG_UPTIME=y
+CONFIG_SYSCTL=y
+
+#
+# Another Bourne-like Shell
+#
+# CONFIG_FEATURE_SH_IS_ASH is not set
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+# CONFIG_FEATURE_SH_IS_LASH is not set
+# CONFIG_FEATURE_SH_IS_MSH is not set
+CONFIG_FEATURE_SH_IS_NONE=y
+# CONFIG_ASH is not set
+# CONFIG_HUSH is not set
+# CONFIG_LASH is not set
+# CONFIG_MSH is not set
+
+#
+# System Logging Utilities
+#
+CONFIG_SYSLOGD=y
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_FEATURE_REMOTE_LOG=y
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
+CONFIG_LOGREAD=y
+# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
+CONFIG_KLOGD=y
+CONFIG_LOGGER=y
+
+#
+# Linux System Utilities
+#
+CONFIG_DMESG=y
+CONFIG_FBSET=y
+CONFIG_FEATURE_FBSET_FANCY=y
+CONFIG_FEATURE_FBSET_READMODE=y
+# CONFIG_FDFLUSH is not set
+# CONFIG_FDFORMAT is not set
+CONFIG_FDISK=y
+FDISK_SUPPORT_LARGE_DISKS=y
+CONFIG_FEATURE_FDISK_WRITABLE=y
+# CONFIG_FEATURE_AIX_LABEL is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_SUN_LABEL is not set
+# CONFIG_FEATURE_OSF_LABEL is not set
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+CONFIG_FREERAMDISK=y
+# CONFIG_FSCK_MINIX is not set
+# CONFIG_MKFS_MINIX is not set
+# CONFIG_GETOPT is not set
+CONFIG_HEXDUMP=y
+# CONFIG_HWCLOCK is not set
+# CONFIG_IPCRM is not set
+CONFIG_IPCS=y
+CONFIG_LOSETUP=y
+CONFIG_MDEV=y
+CONFIG_FEATURE_MDEV_CONF=y
+# CONFIG_FEATURE_MDEV_EXEC is not set
+CONFIG_MKSWAP=y
+# CONFIG_FEATURE_MKSWAP_V0 is not set
+# CONFIG_MORE is not set
+CONFIG_PIVOT_ROOT=y
+CONFIG_FEATURE_MOUNT_NFS=y
+# CONFIG_RDATE is not set
+# CONFIG_READPROFILE is not set
+# CONFIG_SETARCH is not set
+CONFIG_SWAPONOFF=y
+# CONFIG_SWITCH_ROOT is not set
+CONFIG_MOUNT=y
+CONFIG_UMOUNT=y
+CONFIG_FEATURE_MOUNT_FORCE=y
+# CONFIG_FEATURE_UMOUNT_ALL is not set
+
+#
+# Common options for mount/umount
+#
+CONFIG_FEATURE_MOUNT_LOOP=y
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+CONFIG_DEBUG_YANK_SUSv2=y
diff --git a/recipes/busybox/busybox-1.7.2/nylon/xargs-double-size.patch b/recipes/busybox/busybox-1.7.2/nylon/xargs-double-size.patch
new file mode 100644
index 0000000000..df64554ffc
--- /dev/null
+++ b/recipes/busybox/busybox-1.7.2/nylon/xargs-double-size.patch
@@ -0,0 +1,13 @@
+--- busybox-1.2.1/findutils/xargs.c.org 2006-09-19 18:18:17.084592997 +0200
++++ busybox-1.2.1/findutils/xargs.c 2006-09-19 18:18:09.820275793 +0200
+@@ -466,8 +466,8 @@
+ have it at 1 meg). Things will work fine with a large ARG_MAX but it
+ will probably hurt the system more than it needs to; an array of this
+ size is allocated. */
+- if (orig_arg_max > 20 * 1024)
+- orig_arg_max = 20 * 1024;
++ if (orig_arg_max > 40 * 1024)
++ orig_arg_max = 40 * 1024;
+ n_max_chars = orig_arg_max;
+ }
+ max_chars = xmalloc(n_max_chars);
diff --git a/recipes/busybox/busybox-static_1.11.3.bb b/recipes/busybox/busybox-static_1.11.3.bb
index 9529ab7b4b..6523fa90fe 100644
--- a/recipes/busybox/busybox-static_1.11.3.bb
+++ b/recipes/busybox/busybox-static_1.11.3.bb
@@ -1,5 +1,5 @@
require busybox_${PV}.bb
-PR = "r4"
+PR = "${INC_PR}.1"
FILESPATH = "${FILE_DIRNAME}/busybox-${PV}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
S = "${WORKDIR}/busybox-${PV}"
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index acf47f2178..0ff65a41bc 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,12 +11,14 @@ LICENSE = "GPL"
SECTION = "base"
PRIORITY = "required"
+INC_PR = "r22"
+
SRC_URI = "\
http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
file://busybox-cron \
file://busybox-httpd \
file://busybox-udhcpd \
- file://default.script \
+ file://default.script file://simple.script \
file://dhcp-hostname.patch;patch=1 \
file://hwclock.sh \
file://ifupdown-spurious-environ.patch;patch=1 \
@@ -31,30 +33,49 @@ SRC_URI_append_nylon = " file://xargs-double-size.patch;patch=1"
export EXTRA_CFLAGS = "${CFLAGS}"
EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}"
-PACKAGES =+ "${PN}-httpd ${PN}-udhcpd"
+PACKAGES =+ "${PN}-mountall ${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
+
# We need this RRECOMMENDS because libc dlopens libgcc
# and shlib mechanism can not detect it because its not
# listed in the NEEDED field.
RRECOMMENDS += "libgcc"
+
+FILES_${PN}-mountall = "${sysconfdir}/default/mountall"
+RDEPENDS_${PN} += "${PN}-mountall"
+
+# Make busybox recommend busybox-syslog for those images that expect it
+RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
+
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN} += "${datadir}/udhcpc"
-INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd"
+INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
+INITSCRIPT_NAME_${PN}-syslog = "syslog"
INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
-INITSCRIPT_NAME_${PN} = "syslog"
-CONFFILES_${PN} = "${sysconfdir}/syslog.conf"
+CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf"
# This disables the syslog startup links in slugos (see slugos-init)
-INITSCRIPT_PARAMS_${PN}_slugos = "start 20 ."
+INITSCRIPT_PARAMS_${PN}-syslog_slugos = "start 20 ."
+
+RDEPENDS_${PN}-httpd += "${PN}"
+RDEPENDS_${PN}-syslog += "${PN}"
+RDEPENDS_${PN}-udhcpd += "${PN}"
# Use gcc for linking so LDFLAGS actually makes sense
LD = "${CC} -nostdlib"
inherit cml1 update-rc.d
+do_configure () {
+ sed -e 's#@DATADIR@#${datadir}#g' \
+ < ${WORKDIR}/defconfig > ${S}/.config
+ cml1_do_configure
+}
+
do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS
base_do_compile
@@ -62,71 +83,44 @@ do_compile() {
do_install () {
oe_runmake busybox.links
- if [ "x${layout_prefix}" = "x" ]; then
- sed 's:^/usr/:/:' < busybox.links >busybox.links.new
+ if [ "${prefix}" != "/usr" ]; then
+ sed "s:^/usr/:${prefix}/:" busybox.links > busybox.links.new
mv busybox.links.new busybox.links
- elif [ "${layout_prefix}" != "/usr" ]; then
- echo "warning, busybox.links will lose with this prefix"
fi
- unset CFLAGS CPPFLAGS CXXFLAGS
+ if [ "${base_sbindir}" != "/sbin" ]; then
+ sed "s:^/sbin/:${base_sbindir}/:" busybox.links > busybox.links.new
+ mv busybox.links.new busybox.links
+ fi
+
install -d ${D}${sysconfdir}/init.d
- oe_runmake "PREFIX=${D}" install
- cp -pPR ${S}/_install/* ${D}/
-
- # Move everything to /busybox (not supposed to end up in any package)
- install -d ${D}/busybox
- ls ${D} -R
-
- for i in ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ; do
- if [ -d $i ]; then
- cp -dPr $i ${D}/busybox/
- fi
- done
- # Move the busybox binary back to /bin
+
+ # Install /bin/busybox, and the /bin/sh link so the postinst script
+ # can run. Let update-alternatives handle the rest.
install -d ${D}${base_bindir}
- mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
- # Move back the sh symlink
- test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
+ install -m 0755 ${S}/busybox ${D}${base_bindir}
+ ln -sf busybox ${D}${base_bindir}/sh
- install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
- install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+ if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+ fi
if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
- # Move crond back to /usr/sbin/crond
- install -d ${D}${sbindir}
- mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
-
install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
fi
if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
- # Move httpd back to /usr/sbin/httpd
- install -d ${D}${sbindir}
- mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
-
install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
install -d ${D}/srv/www
fi
if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then
- # Move udhcpd back to /usr/sbin/udhcpd
- install -d ${D}${sbindir}
- mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
-
install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
fi
if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
- # Move hwclock back to /sbin/hwclock
- install -d ${D}${base_sbindir}
- mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
-
install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
fi
if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
- # Move dhcpc back to /usr/sbin/udhcpc
- install -d ${D}${base_sbindir}
- mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
-
install -d ${D}${sysconfdir}/udhcpc.d
install -d ${D}${datadir}/udhcpc
- install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default
+ install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default
install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
fi
if grep "CONFIG_FEATURE_MOUNT_FSTAB=y" ${WORKDIR}/defconfig; then
diff --git a/recipes/busybox/busybox_1.11.3.bb b/recipes/busybox/busybox_1.11.3.bb
index bd03aa8cf6..293608bcb3 100644
--- a/recipes/busybox/busybox_1.11.3.bb
+++ b/recipes/busybox/busybox_1.11.3.bb
@@ -1,5 +1,5 @@
require busybox.inc
-PR = "r15"
+PR = "${INC_PR}.1"
SRC_URI = "\
http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
@@ -11,7 +11,7 @@ SRC_URI = "\
file://busybox-cron \
file://busybox-httpd \
file://busybox-udhcpd \
- file://default.script \
+ file://default.script file://simple.script \
file://hwclock.sh \
file://mount.busybox \
file://mountall \
@@ -25,11 +25,6 @@ SRC_URI = "\
EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
-do_configure () {
- install -m 0644 ${WORKDIR}/defconfig ${S}/.config
- cml1_do_configure
-}
-
do_install_append() {
install -m 0644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/
install -d ${D}${sysconfdir}/init.d/
diff --git a/recipes/busybox/busybox_1.13.2.bb b/recipes/busybox/busybox_1.13.2.bb
index 602e782d4d..18d49ba45a 100644
--- a/recipes/busybox/busybox_1.13.2.bb
+++ b/recipes/busybox/busybox_1.13.2.bb
@@ -1,5 +1,5 @@
require busybox.inc
-PR = "r18"
+PR = "${INC_PR}.1"
SRC_URI = "\
http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
@@ -25,7 +25,7 @@ SRC_URI = "\
file://busybox-cron \
file://busybox-httpd \
file://busybox-udhcpd \
- file://default.script \
+ file://default.script file://simple.script \
file://hwclock.sh \
file://mount.busybox \
file://mountall \
@@ -39,12 +39,10 @@ SRC_URI = "\
EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
-do_configure () {
- install -m 0644 ${WORKDIR}/defconfig ${S}/.config
+do_configure_prepend () {
if [ "${TARGET_ARCH}" = "avr32" ] ; then
- sed -i s:CONFIG_FEATURE_OSF_LABEL=y:CONFIG_FEATURE_OSF_LABEL=n: ${S}/.config
+ sed -i s:CONFIG_FEATURE_OSF_LABEL=y:CONFIG_FEATURE_OSF_LABEL=n: ${WORKDIR}/defconfig
fi
- cml1_do_configure
}
do_install_append() {
diff --git a/recipes/busybox/busybox_1.2.1.bb b/recipes/busybox/busybox_1.2.1.bb
index 63a93df36f..3630a4662b 100644
--- a/recipes/busybox/busybox_1.2.1.bb
+++ b/recipes/busybox/busybox_1.2.1.bb
@@ -1,6 +1,6 @@
require busybox.inc
-PR = "r19"
+PR = "${INC_PR}.1"
SRC_URI += "file://wget-long-options.patch;patch=1 \
file://df_rootfs.patch;patch=1 \
diff --git a/recipes/busybox/busybox_1.2.2.bb b/recipes/busybox/busybox_1.2.2.bb
index fe9d07e126..43a15d0f57 100644
--- a/recipes/busybox/busybox_1.2.2.bb
+++ b/recipes/busybox/busybox_1.2.2.bb
@@ -1,6 +1,6 @@
require busybox.inc
-PR = "r5"
+PR = "${INC_PR}.1"
DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/busybox/busybox_1.3.1.bb b/recipes/busybox/busybox_1.3.1.bb
index 2cdb81b311..e0fd63bf5f 100644
--- a/recipes/busybox/busybox_1.3.1.bb
+++ b/recipes/busybox/busybox_1.3.1.bb
@@ -1,6 +1,6 @@
require busybox.inc
-PR = "r5"
+PR = "${INC_PR}.1"
DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/busybox/busybox_1.7.2.bb b/recipes/busybox/busybox_1.7.2.bb
index 87d336b7ac..8ce081f82f 100644
--- a/recipes/busybox/busybox_1.7.2.bb
+++ b/recipes/busybox/busybox_1.7.2.bb
@@ -1,11 +1,11 @@
require busybox.inc
-PR = "r13"
+PR = "${INC_PR}.1"
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
file://busybox-cron \
file://busybox-httpd \
file://busybox-udhcpd \
- file://default.script \
+ file://default.script file://simple.script \
file://hwclock.sh \
file://mount.busybox \
file://mountall \
diff --git a/recipes/busybox/busybox_1.9.2.bb b/recipes/busybox/busybox_1.9.2.bb
index e9aa820498..cd9b6ab7a3 100644
--- a/recipes/busybox/busybox_1.9.2.bb
+++ b/recipes/busybox/busybox_1.9.2.bb
@@ -1,5 +1,5 @@
require busybox.inc
-PR = "r6"
+PR = "${INC_PR}.1"
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
file://udhcpscript.patch;patch=1 \
@@ -10,7 +10,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
file://busybox-cron \
file://busybox-httpd \
file://busybox-udhcpd \
- file://default.script \
+ file://default.script file://simple.script \
file://hwclock.sh \
file://mount.busybox \
file://mountall \
diff --git a/recipes/busybox/files/simple.script b/recipes/busybox/files/simple.script
new file mode 100644
index 0000000000..5cc21b9de2
--- /dev/null
+++ b/recipes/busybox/files/simple.script
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+# udhcpc script edited by Tim Riker <Tim@Rikers.org>
+
+[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
+
+RESOLV_CONF="/etc/resolv.conf"
+[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
+[ -n "$subnet" ] && NETMASK="netmask $subnet"
+
+# return 0 if root is mounted on a network filesystem
+root_is_nfs() {
+ grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
+}
+
+have_bin_ip=0
+if [ -x /bin/ip ]; then
+ have_bin_ip=1
+fi
+
+case "$1" in
+ deconfig)
+ if ! root_is_nfs ; then
+ if [ $have_bin_ip -eq 1 ]; then
+ ip addr flush dev $interface
+ ip link set dev $interface up
+ else
+ /sbin/ifconfig $interface 0.0.0.0
+ fi
+ fi
+ ;;
+
+ renew|bound)
+ if [ $have_bin_ip -eq 1 ]; then
+ ip addr add dev $interface local $ip/$mask $BROADCAST
+ else
+ /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
+ fi
+
+ if [ -n "$router" ] ; then
+ if ! root_is_nfs ; then
+ if [ $have_bin_ip -eq 1 ]; then
+ while ip route del default 2>/dev/null ; do
+ :
+ done
+ else
+ while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
+ :
+ done
+ fi
+ fi
+
+ metric=0
+ for i in $router ; do
+ if [ $have_bin_ip -eq 1 ]; then
+ ip route add default via $i metric $((metric++))
+ else
+ route add default gw $i dev $interface metric $((metric++)) 2>/dev/null
+ fi
+ done
+ fi
+
+ echo -n > $RESOLV_CONF
+ [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
+ for i in $dns ; do
+ echo adding dns $i
+ echo nameserver $i >> $RESOLV_CONF
+ done
+ ;;
+esac
+
+exit 0
diff --git a/recipes/bwm-ng/bwm-ng_0.6.bb b/recipes/bwm-ng/bwm-ng_0.6.bb
new file mode 100644
index 0000000000..5a2816248b
--- /dev/null
+++ b/recipes/bwm-ng/bwm-ng_0.6.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Lightweight console network and disk bandwidth monitor"
+LICENSE = "GPLv2"
+DEPENDS = "ncurses"
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/bwmng/bwm-ng-${PV}.tar.gz"
+
+inherit autotools
+
+# Use /proc/net/dev and /proc/diskstats rather than full libstatgrab.
+# Disable netstat -i parser as it's not compatible with busybox netstat.
+EXTRA_OECONF = " \
+ --with-procnetdev --with-diskstats \
+ --with-libstatgrab=no \
+ --with-netstatlinux=no \
+"
diff --git a/recipes/cellwriter/cellwriter_1.3.3.bb b/recipes/cellwriter/cellwriter_1.3.4.bb
index 12ec70a48f..12ec70a48f 100644
--- a/recipes/cellwriter/cellwriter_1.3.3.bb
+++ b/recipes/cellwriter/cellwriter_1.3.4.bb
diff --git a/recipes/check/check_0.9.5.bb b/recipes/check/check_0.9.5.bb
new file mode 100644
index 0000000000..45864ea4cb
--- /dev/null
+++ b/recipes/check/check_0.9.5.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "a unit test framework for C"
+LICENSE = "LGPL"
+PRIORITY = "optional"
+SECTION = "devel"
+
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/check/check-${PV}.tar.gz \
+ file://configure_fix.patch;patch=1"
+S = "${WORKDIR}/check-${PV}"
+
+inherit autotools_stage pkgconfig
+
+EXTRA_OECONF += "--enable-plain-docdir"
diff --git a/recipes/check/files/configure_fix.patch b/recipes/check/files/configure_fix.patch
new file mode 100644
index 0000000000..3e79319d80
--- /dev/null
+++ b/recipes/check/files/configure_fix.patch
@@ -0,0 +1,12 @@
+Index: check-0.9.5/configure.ac
+===================================================================
+--- check-0.9.5.orig/configure.ac 2008-10-29 04:09:50.000000000 +0000
++++ check-0.9.5/configure.ac 2008-10-29 04:10:06.000000000 +0000
+@@ -71,6 +71,7 @@
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_LIBTOOL
++AM_PROG_CC_C_O
+ if test -n "$GCC"; then
+ CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings"
+ fi
diff --git a/recipes/cherokee/cherokee-nossl_0.5.3.bb b/recipes/cherokee/cherokee-nossl_0.5.3.bb
index 409366004a..3ea9068456 100644
--- a/recipes/cherokee/cherokee-nossl_0.5.3.bb
+++ b/recipes/cherokee/cherokee-nossl_0.5.3.bb
@@ -2,7 +2,7 @@ require cherokee_${PV}.bb
DEPENDS = "libpcre"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/cherokee-${PV}', '${FILE_DIRNAME}/cherokee', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "cherokee-${PV}:cherokee:"
S = "${WORKDIR}/cherokee-${PV}"
diff --git a/recipes/chromium/chromium_svn.bb b/recipes/chromium/chromium_svn.bb
index 98f4f10881..ffeae9f15a 100644
--- a/recipes/chromium/chromium_svn.bb
+++ b/recipes/chromium/chromium_svn.bb
@@ -5,7 +5,7 @@ DEPENDS = "perl-native python-native flex-native gperf-native"
PV = "0.0+svnr${SRCREV}"
-SRCREV = "1665"
+SRCREV = "17935"
SRC_URI = "svn://src.chromium.org/svn/trunk/;module=src;proto=http"
S = "${WORKDIR}/src/chrome"
diff --git a/recipes/clutter/clutter-0.9_git.bb b/recipes/clutter/clutter-0.9_git.bb
new file mode 100644
index 0000000000..ed333cef07
--- /dev/null
+++ b/recipes/clutter/clutter-0.9_git.bb
@@ -0,0 +1,21 @@
+require clutter.inc
+
+SRCREV = "fdaaa8b6d701d2b43fd2750de1b018b5af5577ea"
+
+PV = "0.9.4"
+PR = "r0"
+PR_append = "+git${SRCREV}"
+
+SRC_URI = "git://git.clutter-project.org/clutter.git;protocol=git \
+ file://enable_tests.patch;patch=1 "
+S = "${WORKDIR}/git"
+
+BASE_CONF += "--disable-introspection"
+
+do_compile_prepend() {
+ for i in $(find ${S} -name Makefile) ; do
+ sed -i -e s:-Werror::g $i
+ done
+ ( cd clutter/cogl/gles ; for i in *.glsl ; do sh stringify.sh -h $i ; done )
+}
+
diff --git a/recipes/clutter/clutter-gst-0.9_git.bb b/recipes/clutter/clutter-gst-0.9_git.bb
new file mode 100644
index 0000000000..5a0b2cd18b
--- /dev/null
+++ b/recipes/clutter/clutter-gst-0.9_git.bb
@@ -0,0 +1,14 @@
+require clutter-gst.inc
+
+DEPENDS += "clutter-0.9"
+
+SRCREV = "487552b95f7ccce00118619d5b4256936621eb5e"
+PV = "0.9.0"
+PR = "r3"
+PR_append = "+git${SRCREV}"
+
+SRC_URI = "git://git.clutter-project.org/clutter-gst.git;protocol=git \
+ file://0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch;patch=1 \
+ file://gtk-doc.make"
+
+S = "${WORKDIR}/git"
diff --git a/recipes/clutter/clutter-gst.inc b/recipes/clutter/clutter-gst.inc
index caaa7559b8..fa8f810f65 100644
--- a/recipes/clutter/clutter-gst.inc
+++ b/recipes/clutter/clutter-gst.inc
@@ -10,7 +10,11 @@ FILES_${PN}-examples = "${bindir}/video-player ${bindir}/video-sink ${bindir}/au
inherit autotools pkgconfig
do_configure_prepend() {
- touch ${S}/gtk-doc.make
+ if [ -e ${WORKDIR}/gtk-doc.make ] ; then
+ cp ${WORKDIR}/gtk-doc.make ${S}/gtk-doc.make
+ else
+ touch ${S}/gtk-doc.make
+ fi
}
do_stage () {
diff --git a/recipes/clutter/clutter.inc b/recipes/clutter/clutter.inc
index e900c43209..4e2457946a 100644
--- a/recipes/clutter/clutter.inc
+++ b/recipes/clutter/clutter.inc
@@ -55,8 +55,13 @@ require clutter-fpu.inc
#Fix up some weirdness in the docs
do_configure_prepend() {
- sed -i s:doc/reference/Makefile::g ${S}/configure.ac
- sed -i s:doc::g ${S}/Makefile.am
+ if [ -e ${WORKDIR}/gtk-doc.make ] ; then
+ cp ${WORKDIR}/gtk-doc.make ${S}/gtk-doc.make
+ else
+ touch ${S}/gtk-doc.make
+ fi
+ sed -i s:doc/reference/Makefile::g ${S}/configure.ac
+ sed -i s:doc::g ${S}/Makefile.am
}
do_stage () {
diff --git a/recipes/clutter/clutter_0.8+git.bb b/recipes/clutter/clutter_0.8+git.bb
index b578cbe43d..e31e250431 100644
--- a/recipes/clutter/clutter_0.8+git.bb
+++ b/recipes/clutter/clutter_0.8+git.bb
@@ -1,9 +1,10 @@
require clutter.inc
-CLUTTER_REV = "7129ee4f1b86bfcb65b5fc39021b05b74168785d"
+CLUTTER_REV = "af16378899699376fe7e84c7c11eb3bb5c4668cd"
+
+PV = "0.8.8"
+PR_append = "+gitr${CLUTTER_REV}"
-PV = "0.8.7+gitr${CLUTTER_REV}"
-PR = "r0"
SRC_URI = "git://git.clutter-project.org/clutter.git;protocol=git;branch=clutter-0-8;rev=${CLUTTER_REV} \
file://enable-tests-r2990.patch;patch=1"
diff --git a/recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch b/recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch
new file mode 100644
index 0000000000..e373bca181
--- /dev/null
+++ b/recipes/clutter/files/0001-clutter-gst-videosink-guard-GL-calls-with-ifdef-CL.patch
@@ -0,0 +1,102 @@
+From 0677f1e6b5221caf78d50d94d2d0611e7f4b0abc Mon Sep 17 00:00:00 2001
+From: Damien Lespiau <damien.lespiau@intel.com>
+Date: Sun, 14 Jun 2009 15:30:04 +0100
+Subject: [PATCH] Fix compilation with OpenGL ES backends
+
+* Don't try to compile ARB fp1.0 shaders on non GL platforms,
+* Use CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS to query the number of
+ texture units one can use in a shader in a portable fashion.
+---
+ clutter-gst/clutter-gst-video-sink.c | 14 ++++++++++++--
+ 1 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
+index d6eb6a3..516a42c 100644
+--- a/clutter-gst/clutter-gst-video-sink.c
++++ b/clutter-gst/clutter-gst-video-sink.c
+@@ -236,6 +236,7 @@ _string_array_to_char_array (char *dst,
+ *dst = '\0';
+ }
+
++#ifdef CLUTTER_COGL_HAS_GL
+ static void
+ clutter_gst_video_sink_fp_paint (ClutterActor *actor,
+ ClutterGstVideoSink *sink)
+@@ -274,6 +275,7 @@ clutter_gst_video_sink_set_fp_shader (ClutterGstVideoSink *sink,
+ priv->shaders_init = TRUE;
+
+ }
++#endif
+
+ static void
+ clutter_gst_video_sink_paint (ClutterActor *actor,
+@@ -532,6 +534,7 @@ static ClutterGstRenderer yv12_glsl_renderer =
+ * 8 bit Y plane followed by 8 bit 2x2 subsampled V and U planes.
+ */
+
++#ifdef CLUTTER_COGL_HAS_GL
+ static void
+ clutter_gst_yv12_fp_init (ClutterActor *actor,
+ ClutterGstVideoSink *sink)
+@@ -573,6 +576,7 @@ static ClutterGstRenderer yv12_fp_renderer =
+ clutter_gst_yv12_paint,
+ clutter_gst_yv12_fp_post_paint,
+ };
++#endif
+
+ /*
+ * I420
+@@ -620,6 +624,7 @@ static ClutterGstRenderer i420_glsl_renderer =
+ * Basically the same as YV12, but with the 2 chroma planes switched.
+ */
+
++#ifdef CLUTTER_COGL_HAS_GL
+ static void
+ clutter_gst_i420_fp_init (ClutterActor *actor,
+ ClutterGstVideoSink *sink)
+@@ -646,6 +651,7 @@ static ClutterGstRenderer i420_fp_renderer =
+ clutter_gst_yv12_paint,
+ clutter_gst_yv12_fp_post_paint,
+ };
++#endif
+
+ /*
+ * AYUV
+@@ -707,9 +713,11 @@ clutter_gst_build_renderers_list (ClutterGstSymbols *syms)
+ &rgb24_renderer,
+ &rgb32_renderer,
+ &yv12_glsl_renderer,
+- &yv12_fp_renderer,
+ &i420_glsl_renderer,
++#ifdef CLUTTER_COGL_HAS_GL
++ &yv12_fp_renderer,
+ &i420_fp_renderer,
++#endif
+ &ayuv_glsl_renderer,
+ NULL
+ };
+@@ -717,11 +725,12 @@ clutter_gst_build_renderers_list (ClutterGstSymbols *syms)
+ /* get the features */
+ gl_extensions = (const gchar*) glGetString (GL_EXTENSIONS);
+
+- glGetIntegerv (GL_MAX_TEXTURE_UNITS, &nb_texture_units);
++ glGetIntegerv (CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &nb_texture_units);
+
+ if (nb_texture_units >= 3)
+ features |= CLUTTER_GST_MULTI_TEXTURE;
+
++#ifdef CLUTTER_COGL_HAS_GL
+ if (cogl_check_extension ("GL_ARB_fragment_program", gl_extensions))
+ {
+ /* the shaders we'll feed to the GPU are simple enough, we don't need
+@@ -741,6 +750,7 @@ clutter_gst_build_renderers_list (ClutterGstSymbols *syms)
+ features |= CLUTTER_GST_FP;
+ }
+ }
++#endif
+
+ if (cogl_features_available (COGL_FEATURE_SHADERS_GLSL))
+ features |= CLUTTER_GST_GLSL;
+--
+1.6.3
+
diff --git a/recipes/clutter/files/enable_tests.patch b/recipes/clutter/files/enable_tests.patch
new file mode 100644
index 0000000000..953edf6bbc
--- /dev/null
+++ b/recipes/clutter/files/enable_tests.patch
@@ -0,0 +1,32 @@
+---
+ tests/Makefile.am | 7 ++++++-
+ tests/test-actors.c | 2 +-
+ tests/test-text.c | 2 +-
+ 3 files changed, 8 insertions(+), 3 deletions(-)
+
+Index: git/tests/interactive/Makefile.am
+===================================================================
+--- git.orig/tests/interactive/Makefile.am 2009-03-12 11:01:36.000000000 +0000
++++ git/tests/interactive/Makefile.am 2009-03-12 11:04:12.000000000 +0000
+@@ -77,7 +77,7 @@
+ AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
+ AM_LDFLAGS = $(CLUTTER_LIBS)
+
+-noinst_PROGRAMS = test-interactive
++bin_PROGRAMS = test-interactive
+
+ test_interactive_SOURCES = \
+ test-main.c \
+Index: git/tests/interactive/test-actors.c
+===================================================================
+--- git.orig/tests/interactive/test-actors.c 2009-03-12 11:01:36.000000000 +0000
++++ git/tests/interactive/test-actors.c 2009-03-12 11:06:32.000000000 +0000
+@@ -182,7 +182,7 @@
+ oh->scaler_1 = clutter_behaviour_scale_new (alpha, 0.5, 0.5, 1.0, 1.0);
+ oh->scaler_2 = clutter_behaviour_scale_new (alpha, 1.0, 1.0, 0.5, 0.5);
+
+- real_hand = clutter_texture_new_from_file ("redhand.png", &error);
++ real_hand = clutter_texture_new_from_file ("/usr/share/clutter/redhand.png", &error);
+ if (real_hand == NULL)
+ {
+ g_error ("image load failed: %s", error->message);
diff --git a/recipes/clutter/files/gtk-doc.make b/recipes/clutter/files/gtk-doc.make
new file mode 100644
index 0000000000..354ffb7c66
--- /dev/null
+++ b/recipes/clutter/files/gtk-doc.make
@@ -0,0 +1,173 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST = \
+ $(content_files) \
+ $(HTML_IMAGES) \
+ $(DOC_MAIN_SGML_FILE) \
+ $(DOC_MODULE)-sections.txt \
+ $(DOC_MODULE)-overrides.txt
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
+ $(DOC_MODULE).hierarchy \
+ $(DOC_MODULE).interfaces \
+ $(DOC_MODULE).prerequisites \
+ $(DOC_MODULE).signals
+
+REPORT_FILES = \
+ $(DOC_MODULE)-undocumented.txt \
+ $(DOC_MODULE)-undeclared.txt \
+ $(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+else
+all-local:
+endif
+
+docs: html-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ @echo 'gtk-doc: Scanning header files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+ else \
+ cd $(srcdir) ; \
+ for i in $(SCANOBJ_FILES) ; do \
+ test -f $$i || touch $$i ; \
+ done \
+ fi
+ touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+ @true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+ @echo 'gtk-doc: Rebuilding template files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+ touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+ @true
+
+tmpl/*.sgml:
+ @true
+
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+ @echo 'gtk-doc: Building XML'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+ touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+ @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo 'gtk-doc: Building HTML'
+ @-chmod -R u+w $(srcdir)
+ rm -rf $(srcdir)/html
+ mkdir $(srcdir)/html
+ cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+ @echo 'gtk-doc: Fixing cross-references'
+ cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ touch html-build.stamp
+
+##############
+
+clean-local:
+ rm -f *~ *.bak
+ rm -rf .libs
+
+distclean-local:
+ cd $(srcdir) && \
+ rm -rf xml $(REPORT_FILES) \
+ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+maintainer-clean-local: clean
+ cd $(srcdir) && rm -rf xml html
+
+install-data-local:
+ -installfiles=`echo $(srcdir)/html/*`; \
+ if test "$$installfiles" = '$(srcdir)/html/*'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+ done; \
+ echo '-- Installing $(srcdir)/html/index.sgml' ; \
+ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+ which gtkdoc-rebase >/dev/null && \
+ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
+ fi
+
+
+uninstall-local:
+ rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+ @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+ mkdir $(distdir)/tmpl
+ mkdir $(distdir)/xml
+ mkdir $(distdir)/html
+ -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+ -cp $(srcdir)/xml/*.xml $(distdir)/xml
+ cp $(srcdir)/html/* $(distdir)/html
+ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+ cd $(distdir) && rm -f $(DISTCLEANFILES)
+ -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
diff --git a/recipes/connman/connman.inc b/recipes/connman/connman.inc
index c79c22cabb..516684daa3 100644
--- a/recipes/connman/connman.inc
+++ b/recipes/connman/connman.inc
@@ -14,7 +14,7 @@ EXTRA_OECONF += "\
"
INITSCRIPT_NAME = "connman"
-INITSCRIPT_PARAMS = "defaults 22"
+INITSCRIPT_PARAMS = "start 05 5 2 . stop 22 0 1 6 ."
PARALLEL_MAKE = ""
diff --git a/recipes/connman/connman_0.19.bb b/recipes/connman/connman_0.19.bb
index b8d86613b8..26b7b82798 100644
--- a/recipes/connman/connman_0.19.bb
+++ b/recipes/connman/connman_0.19.bb
@@ -1,5 +1,7 @@
require connman.inc
+PR = "r1"
+
EXTRA_OECONF += "\
--disable-gtk-doc \
--enable-debug \
diff --git a/recipes/connman/files/connman b/recipes/connman/files/connman
index 5e0f90e8cc..f8154f68f9 100755
--- a/recipes/connman/files/connman
+++ b/recipes/connman/files/connman
@@ -11,7 +11,7 @@ fi
set -e
do_start() {
- connmand
+ $DAEMON
}
do_stop() {
diff --git a/recipes/console-tools/console-tools_0.3.2.bb b/recipes/console-tools/console-tools_0.3.2.bb
index 46c8a28ffc..0a7b99a5d6 100644
--- a/recipes/console-tools/console-tools_0.3.2.bb
+++ b/recipes/console-tools/console-tools_0.3.2.bb
@@ -19,7 +19,7 @@ do_compile () {
oe_runmake 'SUBDIRS=${SUBDIRS}'
}
-inherit autotools
+inherit autotools gettext
acpaths = "-I ${WORKDIR}/config"
diff --git a/recipes/cppunit/cppunit_1.12.1.bb b/recipes/cppunit/cppunit_1.12.1.bb
new file mode 100644
index 0000000000..e4c146eede
--- /dev/null
+++ b/recipes/cppunit/cppunit_1.12.1.bb
@@ -0,0 +1,20 @@
+# cppunit OE build file
+# Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+DESCRIPTION = "Unit Testing Library for C++"
+HOMEPAGE = "http://cppunit.sourceforge.net/"
+LICENSE = "LGPL"
+SECTION = "devel"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/cppunit/cppunit-${PV}.tar.gz"
+
+inherit autotools binconfig
+
+CXXFLAGS_powerpc += "-lstdc++"
+
+do_stage () {
+ autotools_stage_includes
+ cd ./src/cppunit/.libs/
+ oe_libinstall -a -so libcppunit ${STAGING_LIBDIR}
+}
diff --git a/recipes/cups/cups.inc b/recipes/cups/cups.inc
index 8e2a7a8075..cbec781881 100644
--- a/recipes/cups/cups.inc
+++ b/recipes/cups/cups.inc
@@ -3,6 +3,8 @@ SECTION = "console/utils"
LICENSE = "GPL LGPL"
DEPENDS = "gnutls jpeg dbus dbus-glib libpng zlib fakeroot-native"
+INC_PR = "r7"
+
SRC_URI = "ftp://ftp.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2 \
"
@@ -62,6 +64,13 @@ python do_package_append() {
os.system('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir)
}
+do_stage_append() {
+ # Undo mangle of cups_datadir and cups_serverbin
+ sed -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:g' \
+ -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:g' \
+ -i ${STAGING_BINDIR_CROSS}/cups-config
+}
+
PACKAGES =+ "${PN}-lib ${PN}-libimage"
FILES_${PN}-lib = "${libdir}/libcups.so.*"
@@ -82,4 +91,3 @@ FILES_${PN} += "${datadir}/doc/cups/images \
${datadir}/doc/cups/*.css \
${datadir}/icons/ \
"
-
diff --git a/recipes/cups/cups_1.1.23.bb b/recipes/cups/cups_1.1.23.bb
index d6f0de8d7b..bc1053cd9e 100644
--- a/recipes/cups/cups_1.1.23.bb
+++ b/recipes/cups/cups_1.1.23.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "An Internet printing system for Unix."
SECTION = "console/utils"
LICENSE = "GPL LGPL"
DEPENDS = "openssl jpeg libpng zlib fakeroot-native"
-PR = "r6"
+PR = "${INC_PR}.1"
SRC_URI = "ftp://ftp3.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2 \
file://strftime_fix.patch;patch=1"
diff --git a/recipes/cups/cups_1.2.12.bb b/recipes/cups/cups_1.2.12.bb
index 4f7d0d49b6..773f97e101 100644
--- a/recipes/cups/cups_1.2.12.bb
+++ b/recipes/cups/cups_1.2.12.bb
@@ -1,2 +1,2 @@
require cups.inc
-PR = "r2"
+PR = "${INC_PR}.1"
diff --git a/recipes/cups/cups_1.2.7.bb b/recipes/cups/cups_1.2.7.bb
index 8559bfcf8e..7084032662 100644
--- a/recipes/cups/cups_1.2.7.bb
+++ b/recipes/cups/cups_1.2.7.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "An Internet printing system for Unix."
SECTION = "console/utils"
LICENSE = "GPL LGPL"
DEPENDS = "gnutls jpeg dbus dbus-glib libpng zlib fakeroot-native"
-PR = "r1"
+PR = "${INC_PR}.1"
SRC_URI = "ftp://ftp3.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2 \
"
diff --git a/recipes/cups/cups_1.3.8.bb b/recipes/cups/cups_1.3.8.bb
index 79cbc32715..c921133c5d 100644
--- a/recipes/cups/cups_1.3.8.bb
+++ b/recipes/cups/cups_1.3.8.bb
@@ -1,7 +1,7 @@
require cups.inc
SRC_URI += "file://use_echo_only_in_init.patch;patch=1"
-PR = "r2"
+PR = "${INC_PR}.1"
DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/db/db3-native_3.2.9.bb b/recipes/db/db3-native_3.2.9.bb
index 492f7407d1..f16b19f642 100644
--- a/recipes/db/db3-native_3.2.9.bb
+++ b/recipes/db/db3-native_3.2.9.bb
@@ -4,5 +4,4 @@ CONFLICTS = "db-native"
inherit native
require db3_${PV}.bb
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/db3-${PV}', '${FILE_DIRNAME}/db3', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
diff --git a/recipes/dbus/dbus.inc b/recipes/dbus/dbus.inc
index 2a4b19699f..0302cfe776 100644
--- a/recipes/dbus/dbus.inc
+++ b/recipes/dbus/dbus.inc
@@ -90,4 +90,4 @@ chmod u+s /usr/libexec/dbus-daemon-launch-helper
CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
INITSCRIPT_NAME = "dbus-1"
-INITSCRIPT_PARAMS = "defaults"
+INITSCRIPT_PARAMS = "start 02 5 2 . stop 20 0 1 6 ."
diff --git a/recipes/dbus/dbus_1.2.1.bb b/recipes/dbus/dbus_1.2.1.bb
index 7746c40062..9d6c4c1fe2 100644
--- a/recipes/dbus/dbus_1.2.1.bb
+++ b/recipes/dbus/dbus_1.2.1.bb
@@ -1,3 +1,3 @@
include dbus.inc
-PR = "r11"
+PR = "r12"
diff --git a/recipes/device-mapper/device-mapper-1.02.28/devmap-mknod-busybox.patch b/recipes/device-mapper/device-mapper-1.02.28/devmap-mknod-busybox.patch
new file mode 100644
index 0000000000..8b24f143dd
--- /dev/null
+++ b/recipes/device-mapper/device-mapper-1.02.28/devmap-mknod-busybox.patch
@@ -0,0 +1,9 @@
+--- device-mapper.1.01.05/scripts/devmap_mknod.sh 2002-07-23 05:50:13.000000000 -0700
++++ device-mapper.1.01.05/scripts/devmap_mknod.sh~ 2005-08-25 14:51:13.000000000 -0700
+@@ -37,5 +37,5 @@
+ test -e $CONTROL && rm -f $CONTROL
+
+ echo "Creating $CONTROL character device with major:$MAJOR minor:$MINOR."
+-mknod --mode=600 $CONTROL c $MAJOR $MINOR
++mknod -m 600 $CONTROL c $MAJOR $MINOR
+
diff --git a/recipes/device-mapper/device-mapper-1.02.28/remove_insanity.patch b/recipes/device-mapper/device-mapper-1.02.28/remove_insanity.patch
new file mode 100644
index 0000000000..f78c341c14
--- /dev/null
+++ b/recipes/device-mapper/device-mapper-1.02.28/remove_insanity.patch
@@ -0,0 +1,42 @@
+--- /tmp/Makefile.in 2009-05-21 13:45:20.000000000 +0200
++++ device-mapper.1.02.28/dmsetup/Makefile.in 2009-05-21 14:09:43.000000000 +0200
+@@ -31,12 +31,10 @@
+ include ../make.tmpl
+
+ dmsetup: $(OBJECTS) $(interfacedir)/libdevmapper.$(LIB_SUFFIX)
+- $(CC) -o $@ $(OBJECTS) $(CFLAGS) $(LDFLAGS) \
+- -L$(interfacedir) -L$(DESTDIR)/lib -ldevmapper $(LIBS)
++ $(CC) -o $@ $(OBJECTS) -L$(interfacedir) -ldevmapper $(LIBS) $(CFLAGS) $(LDFLAGS)
+
+ dmsetup.static: $(OBJECTS) $(interfacedir)/libdevmapper.a
+- $(CC) -o $@ $(OBJECTS) $(CFLAGS) $(LDFLAGS) -static \
+- -L$(interfacedir) -L$(DESTDIR)/lib -ldevmapper $(LIBS) \
++ $(CC) -o $@ $(OBJECTS) -L$(interfacedir) -ldevmapper $(LIBS) $(CFLAGS) $(LDFLAGS) -static \
+ $(LIB_PTHREAD)
+
+ install: $(INSTALL_TYPE)
+--- /tmp/make.tmpl.in 2009-05-21 14:24:02.000000000 +0200
++++ device-mapper.1.02.28/make.tmpl.in 2009-05-21 14:29:20.000000000 +0200
+@@ -151,19 +151,19 @@
+ $(TARGETS): $(OBJECTS)
+
+ %.o: %.c
+- $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $< -o $@
++ $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) ${LDFLAGS} $< -o $@
+
+ %.pot: %.c Makefile
+ $(CC) -E $(INCLUDES) -include $(top_srcdir)/include/pogen.h \
+ $(DEFS) $(CFLAGS) $< > $@
+
+ %.so: %.o
+- $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $< -o $@
++ $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) ${LDFLAGS} $< -o $@
+
+ ifeq ("@LIB_SUFFIX@","so")
+ $(LIB_SHARED): $(OBJECTS) $(LDDEPS)
+ $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
+- $(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
++ $(CFLAGS) $(CLDFLAGS) ${LDFLAGS} $(OBJECTS) $(LIBS) -o $@
+ endif
+
+ ifeq ("@LIB_SUFFIX@","dylib")
diff --git a/recipes/device-mapper/device-mapper_1.01.05.bb b/recipes/device-mapper/device-mapper_1.01.05.bb
index bc02e6a71f..2af9990839 100644
--- a/recipes/device-mapper/device-mapper_1.01.05.bb
+++ b/recipes/device-mapper/device-mapper_1.01.05.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "The Device-mapper is a new component of the linux kernel \
that supports logical volume management. It is required by LVM2 and EVMS. \
The original LVM (included in stock 2.4 kernels) does not use it."
LICENSE = "GPL"
-PR = "r3"
+PR = "r4"
S = "${WORKDIR}/${PN}.${PV}"
@@ -15,6 +15,8 @@ inherit autotools update-rc.d
# The install-script will fail without this.
EXTRA_OECONF="--with-user= --with-group= "
+TARGET_CC_ARCH += "${LDFLAGS}"
+
INITSCRIPT_NAME = "devmap_mknod.sh"
INITSCRIPT_PARAMS = "defaults"
diff --git a/recipes/device-mapper/device-mapper_1.02.28.bb b/recipes/device-mapper/device-mapper_1.02.28.bb
new file mode 100644
index 0000000000..bd97d15848
--- /dev/null
+++ b/recipes/device-mapper/device-mapper_1.02.28.bb
@@ -0,0 +1,37 @@
+SECTION = "libs"
+DESCRIPTION = "The Device-mapper is a new component of the linux kernel \
+that supports logical volume management. It is required by LVM2 and EVMS. \
+The original LVM (included in stock 2.4 kernels) does not use it."
+LICENSE = "GPL"
+
+S = "${WORKDIR}/${PN}.${PV}"
+
+SRC_URI = "ftp://sources.redhat.com/pub/dm/device-mapper.${PV}.tgz \
+ file://devmap-mknod-busybox.patch;patch=1 \
+ file://remove_insanity.patch;patch=1 "
+
+inherit autotools_stage update-rc.d
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+# The install-script will fail without this.
+EXTRA_OECONF="--with-user= --with-group= "
+
+INITSCRIPT_NAME = "devmap_mknod.sh"
+INITSCRIPT_PARAMS = "defaults"
+
+do_install_append() {
+ install -d ${D}/${libdir}/ioctl
+ install -m 755 ${S}/lib/ioctl/libdevmapper.a ${D}/${libdir}/ioctl/
+ install -D -m 755 ${S}/scripts/${INITSCRIPT_NAME} ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
+}
+
+FILES_${PN}-dev += "${libdir}/ioctl/*.a"
+
+do_stage_append() {
+ install -d ${STAGING_LIBDIR}/pkgconfig/
+ for pc in ${S}/*/*.pc ; do
+ cp $pc ${STAGING_LIBDIR}/pkgconfig/
+ cp $pc ${STAGING_LIBDIR}/pkgconfig/$(echo $(basename $pc) | sed s:lib::g)
+ done
+}
+
diff --git a/recipes/devicekit/devicekit-disks_004.bb b/recipes/devicekit/devicekit-disks_004.bb
new file mode 100644
index 0000000000..63df1e7361
--- /dev/null
+++ b/recipes/devicekit/devicekit-disks_004.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Block device part of devicekit"
+LICENSE = "GPLv2"
+DEPENDS = "devicekit zlib sqlite3 policykit parted device-mapper libatasmart udev dbus-glib glib-2.0"
+
+SRC_URI = "http://hal.freedesktop.org/releases/DeviceKit-disks-${PV}.tar.gz"
+S = "${WORKDIR}/DeviceKit-disks-${PV}"
+
+inherit autotools_stage
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+FILES_${PN} += "${datadir}/dbus-1/ \
+ ${datadir}/PolicyKit \
+ ${base_libdir}/udev/* \
+"
+
+FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
+
+
diff --git a/recipes/devicekit/devicekit_003.bb b/recipes/devicekit/devicekit_003.bb
new file mode 100644
index 0000000000..a57ca88675
--- /dev/null
+++ b/recipes/devicekit/devicekit_003.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "DeviceKit is a simple system service that a) can enumerate devices; b) emits signals when devices are added removed; c) provides a way to merge device information / quirks onto devices."
+LICENSE = "GPLv2"
+DEPENDS = "udev dbus-glib glib-2.0"
+
+SRC_URI = "http://hal.freedesktop.org/releases/DeviceKit-${PV}.tar.gz"
+S = "${WORKDIR}/DeviceKit-${PV}"
+
+inherit autotools_stage
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+FILES_${PN} += "${datadir}/dbus-1/"
+
+
+
diff --git a/recipes/devicekit/libatasmart_0.13.bb b/recipes/devicekit/libatasmart_0.13.bb
new file mode 100644
index 0000000000..31565f6cfb
--- /dev/null
+++ b/recipes/devicekit/libatasmart_0.13.bb
@@ -0,0 +1,20 @@
+LICENSE = "LGPL"
+
+SRCREV = "a80d7d5c25e88adea7b8e843cdb57143e6cfb46b"
+SRC_URI = "git://git.0pointer.de/libatasmart.git;protocol=git"
+
+S = "${WORKDIR}/git"
+
+inherit autotools_stage lib_package
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+do_compile_prepend() {
+ rm strpool -f
+ ${BUILD_CC} -o strpool strpool.c
+ chmod +x strpool
+}
+
+do_stage_append() {
+ sed -i -e s://:/:g -e s:${base_libdir}/libudev.la:-ludev:g ${STAGING_LIBDIR}/libatasmart.la
+}
+
diff --git a/recipes/directfb/directfb-1.2.8/ts_lib_autotools.patch b/recipes/directfb/directfb-1.2.8/ts_lib_autotools.patch
new file mode 100644
index 0000000000..7c34b567d9
--- /dev/null
+++ b/recipes/directfb/directfb-1.2.8/ts_lib_autotools.patch
@@ -0,0 +1,22 @@
+---
+ configure.in | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+Index: DirectFB-1.2.8/configure.in
+===================================================================
+--- DirectFB-1.2.8.orig/configure.in
++++ DirectFB-1.2.8/configure.in
+@@ -1288,8 +1288,11 @@ fi
+
+ enable_tslib=no
+ if test "$checkfor_tslib" = "yes"; then
+- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [enable_tslib=yes], [enable_tslib=no,
+- AC_MSG_WARN([*** no tslib -- tslib driver will not be built.])])
++ PKG_CHECK_MODULES([TSLIB], [tslib-1.0 >= 1.0.0], [enable_tslib=yes], [enable_tslib=no])
++ if test "$enable_tslib" = "no"; then
++ PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [enable_tslib=yes], [enable_tslib=no,
++ AC_MSG_WARN([*** no tslib -- tslib driver will not be built.])])
++ fi
+ fi
+
+ enable_ucb1x00_ts=no
diff --git a/recipes/directfb/directfb_1.2.7.bb b/recipes/directfb/directfb_1.2.7.bb
index be6a6daa52..6a01195502 100644
--- a/recipes/directfb/directfb_1.2.7.bb
+++ b/recipes/directfb/directfb_1.2.7.bb
@@ -6,7 +6,7 @@ PR = "r0"
DEPENDS += "sysfsutils"
SRC_URI = " \
- http://directfb.org/downloads/Core/DirectFB-${PV}.tar.gz \
+ http://directfb.org/downloads/Old/DirectFB-${PV}.tar.gz \
file://directfb-1.2.x-fix-pkgconfig-cflags.patch;patch=1 \
file://mkdfiff.patch;patch=1 \
file://dont-use-linux-config.patch;patch=1 \
diff --git a/recipes/directfb/directfb_1.2.8.bb b/recipes/directfb/directfb_1.2.8.bb
new file mode 100644
index 0000000000..4d3eb90893
--- /dev/null
+++ b/recipes/directfb/directfb_1.2.8.bb
@@ -0,0 +1,27 @@
+require directfb.inc
+
+RV = "1.2-0"
+
+DEPENDS += "sysfsutils"
+
+SRC_URI = " \
+ http://directfb.org/downloads/Core/DirectFB-1.2/DirectFB-${PV}.tar.gz \
+ file://directfb-1.2.x-fix-pkgconfig-cflags.patch;patch=1 \
+ file://mkdfiff.patch;patch=1 \
+ file://dont-use-linux-config.patch;patch=1 \
+ file://ts_lib_autotools.patch;patch=1 \
+"
+
+EXTRA_OECONF = "\
+ --enable-freetype=yes \
+ --enable-zlib \
+ --with-gfxdrivers=none \
+ --disable-libmpeg3 \
+ --disable-sdl \
+ --disable-vnc \
+ --disable-x11 \
+"
+
+LDFLAGS_append = ""
+
+LEAD_SONAME = "libdirectfb-1.2.so.0"
diff --git a/recipes/distcc/distcc_3.1.bb b/recipes/distcc/distcc_3.1.bb
index 879f676519..16e7184c61 100644
--- a/recipes/distcc/distcc_3.1.bb
+++ b/recipes/distcc/distcc_3.1.bb
@@ -3,6 +3,8 @@ compilation of C/C++/ObjC code across machines on a network."
SECTION = "devel"
LICENSE = "GPLv2"
+PR = "r1"
+
DEPENDS = "avahi gtk+"
RRECOMMENDS = "avahi-daemon"
@@ -44,3 +46,18 @@ CONFFILES_${PN} += "${sysconfdir}/default/distcc \
FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \
${datadir}/distcc"
+
+
+pkg_postinst_${PN} () {
+ # can't do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ grep "^distcc:" /etc/group > /dev/null || addgroup distcc
+ grep "^distcc:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/lib/distcc distcc --ingroup distcc -g "distcc daemon"
+}
+
+pkg_postrm_${PN} () {
+ deluser distcc || true
+ delgroup distcc || true
+}
diff --git a/recipes/dsplink/gstreamer-ti_svn.bb b/recipes/dsplink/gstreamer-ti_svn.bb
deleted file mode 100644
index 2e6faddf30..0000000000
--- a/recipes/dsplink/gstreamer-ti_svn.bb
+++ /dev/null
@@ -1,57 +0,0 @@
-DEPENDS = "ti-codec-engine ti-dmai gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly libid3tag liboil libmad"
-
-SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \
- "
-SRCREV = "189"
-
-PR = "${MACHINE_KERNEL_PR}"
-
-# Again, no '.' in PWD allowed :(
-PV = "0+svnr${SRCREV}"
-
-S = "${WORKDIR}/gstreamer_ti/ti_build/ticodecplugin"
-
-inherit autotools
-
-require ti-paths.inc
-
-export DMAI_INSTALL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai"
-export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine"
-export FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools"
-export CODEC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos"
-
-export XDC_TARGET = "gnu.targets.arm.GCArmv5T"
-
-XDC_PLATFORM = "foo"
-# Assume every TI armv7a cpu is a 3530
-XDC_PLATFORM_armv7a = "ti.platforms.evm3530"
-export XDC_PLATFORM
-
-# We need to add this to config.bld:
-#GCArmv5T.cc.$unseal("opts");
-#GCArmv5T.cc.opts = "SEDME_CCARCH";
-#GCArmv5T.cc.$seal("opts");
-
-do_configure_prepend() {
- for i in ${S}/src/*.cfg ; do
- sed -i -e s:\./encodeCombo.x64P:${datadir}/ti-codec-combos/encodeCombo.x64P:g \
- -e s:\./decodeCombo.x64P:${datadir}/ti-codec-combos/decodeCombo.x64P:g \
- $i
- done
-}
-
-do_compile_prepend() {
- for i in $(find ${S} -name "config.bld") ; do
- sed -i -e s:SEDME_CCARCH:'${TARGET_CCARCH}': $i
- done
-}
-
-CPPFLAGS_append = " -DPlatform_${PLATFORM}"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-RDEPENDS_${PN} = "ti-dmai"
-FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
-FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la"
-FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
-
diff --git a/recipes/dsplink/readme.txt b/recipes/dsplink/readme.txt
deleted file mode 100644
index 8dd71e6fee..0000000000
--- a/recipes/dsplink/readme.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-placeholder for readme
-
-todo with this package
-- rename top level dsplink directory
-- repartion code into different recipes - create codecengine-examples package
-/DONE - fix lpm build to pick up Module.symversion
-- cleanup device selection script - not good to just /d the targets - need cleaner solution
-- staging needs work
-
-- add ce 2.22
diff --git a/recipes/dsplink/ti-codec-engine_2.23.bb b/recipes/dsplink/ti-codec-engine_2.23.bb
deleted file mode 100644
index 2c4038d67f..0000000000
--- a/recipes/dsplink/ti-codec-engine_2.23.bb
+++ /dev/null
@@ -1,394 +0,0 @@
-DESCRIPTION = "Codec Engine for TI ARM/DSP processors"
-
-DEPENDS = "virtual/kernel perl-native"
-RDEPENDS = "update-modules"
-
-INSANE_SKIP_ti-codec-engine-apps = True
-INSANE_SKIP_ti-dsplink-apps = True
-INSANE_SKIP_${PN} = True
-
-inherit module
-
-# tconf from xdctools dislikes '.' in pwd :/
-PV = "223"
-
-# 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_23_01.tar.gz \
- file://loadmodules-ti-dsplink-apps.sh \
- file://unloadmodules-ti-dsplink-apps.sh \
- file://loadmodules-ti-codec-engine-apps.sh \
- file://unloadmodules-ti-codec-engine-apps.sh \
-"
-
-S = "${WORKDIR}/codec_engine_2_23_01"
-
-###########
-
-# To build the DSP applications you need to have DSP/BIOS, xdctools and codegen installed. Get these from:
-# TODO - update to bios 5.33.04.... (which is what CE was validated against)
-# https://www-a.ti.com/downloads/sds_support/targetcontent/bios/bios_5_33/bios_5_33_02/exports/bios_setuplinux_5_33_02.bin
-# https://www-a.ti.com/downloads/sds_support/targetcontent/rtsc/xdctools_3_10_03/exports/xdctools_setuplinux_3_10_03.bin
-# https://www-a.ti.com/downloads/sds_support/targetcontent/LinuxDspTools/download.html
-# Back link for above:
-# https://www-a.ti.com/downloads/sds_support/targetcontent/index.html
-
-# Path to the dir where the TI tools are unpacked
-TITOOLSDIR ?= "/OE/TI"
-TIBIOSDIR ?= "${TITOOLSDIR}/bios_5_33_02"
-TIXDCTOOLSDIR ?= "${TITOOLSDIR}/xdctools_3_10_03"
-TICGTOOLSDIR ?= "${TITOOLSDIR}/cg6x_6_0_16"
-
-# CODEC ENGINE - This tells codec engine which targets to build
-CEEXAMPLESDEVICES ?= "DM6446"
-CEEXAMPLESDEVICES_omap5912osk = "fixme-ti-paths.inc"
-CEEXAMPLESDEVICES_armv7a = "OMAP3530"
-CEEXAMPLESDEVICES_omap3evm = "OMAP3530"
-CEEXAMPLESDEVICES_beagleboard = "OMAP3530"
-CEEXAMPLESDEVICES_davinci-sffsdr = "DM6446"
-CEEXAMPLESDEVICES_davinci-dvevm = "DM6446"
-
-# DSPLINK - Config Variable for different platform
-DSPLINKPLATFORM ?= "DAVINCI"
-DSPLINKPLATFORM_omap5912osk = "OMAP"
-DSPLINKPLATFORM_armv7a = "OMAP3530"
-DSPLINKPLATFORM_beagleboard = "OMAP3530"
-DSPLINKPLATFORM_omap3evm = "OMAP3530"
-DSPLINKPLATFORM_davinci-sffsdr = "DAVINCI"
-DSPLINKPLATFORM_davinci-dvevm = "DAVINCI"
-
-DSPLINKDSPCFG ?= "DM6446GEMSHMEM"
-DSPLINKDSPCFG_armv7a ?= "OMAP3530SHMEM"
-DSPLINKDSPCFG_beagleboard ?= "OMAP3530SHMEM"
-DSPLINKDSPCFG_omap3evm ?= "OMAP3530SHMEM"
-
-DSPLINKGPPOS ?= "MVL5G"
-DSPLINKGPPOS_armv7a = "OMAPLSP"
-DSPLINKGPPOS_beagleboard = "OMAPLSP"
-DSPLINKGPPOS_omap3evm = "OMAPLSP"
-
-# LPM
-LPMDSPPOWERSOC ?= "dm6446"
-LPMDSPPOWERSOC_armv7a = "omap3530"
-LPMDSPPOWERSOC_beagleboard = "omap3530"
-LPMDSPPOWERSOC_omap3evm = "omap3530"
-
-############
-
-export DSPLINK="${S}/cetools/packages/dsplink"
-
-PARALLEL_MAKE = ""
-
-do_configure () {
- # Clean up stale binaries
- find ${S} -name "*.ko" -exec rm {} \; || true
- find ${S} -name "*.o" -exec rm {} \; || true
-
- # Run perl script to create appropriate makefiles (v1.60 and up)
- (
- cd ${DSPLINK}
- perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 --dspcfg_0=${DSPLINKDSPCFG} --dspos_0=DSPBIOS5XX --gppos=${DSPLINKGPPOS} --comps=ponslrm
- )
-}
-
-do_compile () {
- unset DISPLAY
-
-# DSPLINK
- # TODO :: KERNEL_CC, etc need replacing with user CC
- # TODO :: Need to understand why OBJDUMP is required for kernel module
-
- # Unset these since LDFLAGS gets picked up and used incorrectly.... need investigation
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
-
- # Build the gpp user space library
- cd ${DSPLINK}/gpp/src/api
- make \
- CROSS_COMPILE="${TARGET_PREFIX}" \
- CC="${KERNEL_CC}" \
- AR="${KERNEL_AR}" \
- LD="${KERNEL_LD}" \
- COMPILER="${KERNEL_CC}" \
- ARCHIVER="${KERNEL_AR}" \
- KERNEL_DIR="${STAGING_KERNEL_DIR}" \
- clean all
-
- # Build the gpp kernel space (debug and release)
- cd ${DSPLINK}/gpp/src
- make \
- OBJDUMP="${TARGET_PREFIX}objdump" \
- CROSS_COMPILE="${TARGET_PREFIX}" \
- CC="${KERNEL_CC}" \
- AR="${KERNEL_AR}" \
- LD="${KERNEL_LD}" \
- COMPILER="${KERNEL_CC}" \
- ARCHIVER="${KERNEL_AR}" \
- KERNEL_DIR="${STAGING_KERNEL_DIR}" \
- clean all
-
- # Build the gpp samples
- cd ${DSPLINK}/gpp/src/samples
- make \
- BASE_TOOLCHAIN="${CROSS_DIR}" \
- BASE_CGTOOLS="${BASE_TOOLCHAIN}/bin" \
- OSINC_PLATFORM="${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include" \
- OSINC_TARGET="${BASE_TOOLCHAIN}/target/usr/include" \
- CROSS_COMPILE="${TARGET_PREFIX}" \
- CC="${KERNEL_CC}" \
- AR="${KERNEL_AR}" \
- LD="${KERNEL_LD}" \
- COMPILER="${KERNEL_CC}" \
- LINKER="${KERNEL_CC}" \
- ARCHIVER="${KERNEL_AR}" \
- KERNEL_DIR="${STAGING_KERNEL_DIR}" \
- clean all
-
- # Build the dsp library (debug and release)
- cd ${DSPLINK}/dsp/src
- make \
- BASE_CGTOOLS="${TICGTOOLSDIR}" \
- BASE_SABIOS="${TIBIOSDIR}" \
- clean all
-
- # Build the dsp samples (debug and release)
- cd ${DSPLINK}/dsp/src/samples
- make \
- BASE_CGTOOLS="${TICGTOOLSDIR}" \
- BASE_SABIOS="${TIBIOSDIR}" \
- clean all
-
- # LPM - Build the DSP power manager kernel module
- cd ${S}/cetools/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm
- make \
- DSPLINK_REPO="${DSPLINK}/.." \
- LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
- MVTOOL_PREFIX="${TARGET_PREFIX}" \
- clean default
-
- # CMEM - Build the cmem kernel module and associated test apps
- # TODO - Still need to clean up UCTOOLs - don't really want to build UC here - it's not good to just build with MVTOOLS (GLIBC)
- # - note target default, doesn't get passed through to underlying makefiles
- cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
- make \
- LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
- MVTOOL_PREFIX="${TARGET_PREFIX}" \
- UCTOOL_PREFIX="${TARGET_PREFIX}" \
- clean debug release
-
- # SDMA - Build the sdma module
- cd ${S}/cetools/packages/ti/sdo/linuxutils/sdma
- make \
- LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
- MVTOOL_PREFIX="${TARGET_PREFIX}" \
- UCTOOL_PREFIX="${TARGET_PREFIX}" \
- clean debug release
-
- # TODO - add other modules here, like IRQ, etc for DM6446/DM355/etc
-
- # CE - EXAMPLES
- # Now build the CE examples
- cd ${S}/examples
-
- # Fix paths to arm crosstools, c6x codegen and x86 gcc
- # Also disable uclibc and x86 builds
- # Nasty replacement of 674x build - hard to sed this, since 2 entries similar, hence uses leading spaces...
- sed -i \
- -e s:/db/toolsrc/library/tools/vendors/cs/arm/arm-2007q3:${CROSS_DIR}:g \
- -e s:/db/toolsrc/library/tools/vendors/ti/c6x/6.0.16/Linux:${TICGTOOLSDIR}:g \
- -e s:/db/toolsrc/library/tools/vendors/opensource/gcc/4.1.0/Linux/gcc-4.1.0-glibc-2.3.6/i686-unknown-linux-gnu:/usr:g \
- -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g \
- -e 's:true, // build for uC Linux:false,:g' \
- -e 's:true, // build for PC Linux:false,:g' \
- -e 's: {doBuild\: true, // DSP builds: {doBuild\: false, // DSP builds:g' \
- ${S}/examples/user.bld
-
- # For now, remove all targets, except omap3530 - nasty way to configure targets...
- sed -i \
- -e '/evmDM357/d' \
- -e '/evmDM6446/d' \
- -e '/evmDM6467/d' \
- -e '/evmDM355/d' \
- -e '/evmDM6437/d' \
- -e '/evmDM648/d' \
- -e '/evmDM365/d' \
- -e '/evmOMAPL137/d' \
- -e '/sdp3430/d' \
- -e '/evm2530/d' \
- ${S}/examples/user.bld
-
- # Start building the CE examples: codecs, extensions, servers (codec bundles) and ARM side apps
- # TODO : Make clean doesn't do what you'd expect, it only cleans stuff you've enabled, so some cruft remains
- # TODO : Figure out how to pass PRODUCTS=... or alternative method, so that we don't build the 'local' versions
- for i in codecs extensions servers apps ; do
- make \
- DEVICES="${CEEXAMPLESDEVICES}" \
- CE_INSTALL_DIR="${S}" \
- XDC_INSTALL_DIR="${TIXDCTOOLSDIR}" \
- BIOS_INSTALL_DIR="${TIBIOSDIR}" \
- CC_V5T="bin/${TARGET_PREFIX}gcc" \
- CGTOOLS_V5T="${CROSS_DIR}" \
- CGTOOLS_C64P="${TICGTOOLSDIR}" \
- -C ${S}/examples/ti/sdo/ce/examples/$i \
- clean
-#all
- done
-}
-
-do_install () {
- # DSPLINK driver - kernel module
- install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
- cp ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/
-
- # DSPLINK library
- install -d ${D}/${libdir}
- install -m 0755 ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/dsplink.lib ${D}/${libdir}
-
- # DSPLINK sample apps
- install -d ${D}/${datadir}/ti-dsplink
- install ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/*gpp ${D}/${datadir}/ti-dsplink || true
- for i in $(find ${DSPLINK}/dsp/BUILD/ -name "*.out") ; do
- install ${i} ${D}/${datadir}/ti-dsplink
- done
-
- # DSPLINK test app module un/load scripts
- install ${WORKDIR}/loadmodules-ti-dsplink-apps.sh ${D}/${datadir}/ti-dsplink
- install ${WORKDIR}/unloadmodules-ti-dsplink-apps.sh ${D}/${datadir}/ti-dsplink
-
- # LPM/CMEM/SDMA drivers - kernel modules
- install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
- cp ${S}/cetools/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm/*.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true
- cp ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true
- cp ${S}/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true
-
- # CE sample apps - this is very 64x / v5T specific at the moment - we really need CE to give us this list...
- install -d ${D}/${datadir}/ti-codec-engine
-
- # we change pwd so that find gives us relative path to the files, which we use to create the same structure on the target
- cd ${S}/examples/ti/sdo/ce
-
- # first find all the app files named '.out'
- for i in $(find . -name "*.out") ; do
- # first create the directory
- install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}`
- # now copy the file
- install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}`
- done
-
- # next find all the app files named '.xv5T'
- for i in $(find . -name "*.xv5T") ; do
- # first create the directory
- install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}`
- # now copy the file
- install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}`
- done
-
- # then find all the app/server files named '.x64P'
- for i in $(find . -name "*.x64P") ; do
- # first create the directory
- install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}`
- # now copy the file
- install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}`
- done
-
- # finally find all the app files named '.dat'
- for i in $(find . -name "*.dat") ; do
- # first create the directory
- install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}`
- # now copy the file
- install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}`
- done
-
- # CE test app module un/load scripts
- install ${WORKDIR}/loadmodules-ti-codec-engine-apps.sh ${D}/${datadir}/ti-codec-engine
- install ${WORKDIR}/unloadmodules-ti-codec-engine-apps.sh ${D}/${datadir}/ti-codec-engine
-
- # we should install the CMEM apps as well here
- # - TODO...
-
- # finally, strip targets that we're not supporting here
- # - TODO...
-}
-
-# Codec Engine and friends need a complete tree, so stage it all - possibly could use repoman for this later
-do_stage() {
- install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}
- cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/
-}
-
-PACKAGES =+ "ti-dsplink-module ti-dsplink-apps"
-PACKAGES =+ "ti-lpm-module ti-cmem-module ti-sdma-module ti-codec-engine-apps"
-
-FILES_ti-dsplink-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/dsplinkk.ko"
-FILES_ti-dsplink-apps = "${datadir}/ti-dsplink/* ${libdir}/dsplink.lib"
-FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko"
-FILES_ti-cmem-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko"
-FILES_ti-sdma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdmak.ko"
-FILES_ti-codec-engine-apps = "${datadir}/ti-codec-engine/*"
-
-pkg_postinst_ti-dsplink-module () {
- if [ -n "$D" ]; then
- exit 1
- fi
- depmod -a
- update-modules || true
-}
-
-pkg_postrm_ti-dsplink-module () {
- update-modules || true
-}
-
-pkg_postinst_ti-lpm-module () {
- if [ -n "$D" ]; then
- exit 1
- fi
- depmod -a
- update-modules || true
-}
-
-pkg_postrm_ti-lpm-module () {
- update-modules || true
-}
-
-pkg_postinst_ti-cmem-module () {
- if [ -n "$D" ]; then
- exit 1
- fi
- depmod -a
- update-modules || true
-}
-
-pkg_postrm_ti-cmem-module () {
- update-modules || true
-}
-
-pkg_postinst_ti-sdma-module () {
- if [ -n "$D" ]; then
- exit 1
- fi
- depmod -a
- update-modules || true
-}
-
-pkg_postrm_ti-sdma-module () {
- update-modules || true
-}
-
-INHIBIT_PACKAGE_STRIP = "1"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-#legacy upgrade helpers
-RPROVIDES_ti-dsplink-module += "dsplink-module"
-RREPLACES_ti-dsplink-module += "dsplink-module"
-RPROVIDES_ti-dsplink-apps += "dsplink-apps"
-RREPLACES_ti_dsplink-apps += "dsplink-apps"
-RPROVIDES_ti-cmem-module += "ti-cmemk-module"
-RREPLACES_ti-cmem-module += "ti-cmemk-module"
-
-#run-time dependencies - note for kernel module we can only use RRECOMMENDS, since modules might be built into the kernel
-#and dependence on recipe version, so that we ensure apps and modules stay syncd
-RRECOMMENDS_ti-dsplink-apps += "ti-dsplink-module (>= ${PV}-${PR})"
-RRECOMMENDS_ti-codec-engine-apps += "ti-dsplink-module (>= ${PV}-${PR}) ti-lpm-module (>= ${PV}-${PR}) ti-cmem-module (>= ${PV}-${PR}) ti-sdma-module (>= ${PV}-${PR})"
-
-
diff --git a/recipes/dsplink/ti-dmai_svn.bb b/recipes/dsplink/ti-dmai_svn.bb
deleted file mode 100644
index b335c7b707..0000000000
--- a/recipes/dsplink/ti-dmai_svn.bb
+++ /dev/null
@@ -1,87 +0,0 @@
-DESCRIPTION = "Davinci (and OMAP) Multimedia Application Interface"
-DEPENDS = "virtual/kernel ti-codec-engine ti-codec-combos"
-LICENCE = "unknown"
-
-inherit module-base
-
-require ti-paths.inc
-
-INSANE_SKIP_${PN} = True
-INSANE_SKIP_${PN}-apps = True
-
-SRC_URI = "svn://gforge.ti.com/svn/dmai/branches;module=BRIJESH_GIT_022309;proto=https;user=anonymous;pswd='' \
- file://dmai-built-with-angstrom.patch;patch=1 \
- file://loadmodules-ti-dmai-apps.sh \
- file://unloadmodules-ti-dmai-apps.sh \
- "
-
-SRCREV = "120"
-
-S = "${WORKDIR}/BRIJESH_GIT_022309/davinci_multimedia_application_interface/dmai"
-# Yes, the xdc stuff still breaks with a '.' in PWD
-PV = "120+svnr${SRCREV}"
-
-TARGET = "all"
-TARGET_neuros-osd2 = " dm6446_al dm6446_db"
-
-TARGET_armv7a = " o3530_al"
-
-TARGET_beagleboard = " o3530_al"
-TARGET_omap3evm = " o3530_al"
-
-export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine"
-export FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools"
-export CODEC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos"
-
-do_compile() {
- if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 28 ] ; then
- sed -i -e s:mach/omapfb:linux/omapfb:g packages/ti/sdo/dmai/linux/Display_fbdev.c
- fi
-
- cd packages/ti/sdo/dmai
- oe_runmake clean
- oe_runmake ${TARGET} C_FLAGS="-O2 -I${STAGING_INCDIR}"
- cd apps
- oe_runmake clean
- oe_runmake ${TARGET}
-}
-
-do_install () {
- install -d ${D}/${datadir}/ti-dmai/apps
-
- export EXEC_DIR="${D}/${datadir}/ti-dmai/apps"
- oe_runmake install
-
- #test app module un/load scripts
- install ${WORKDIR}/loadmodules-ti-dmai-apps.sh ${D}/${datadir}/ti-dmai
- install ${WORKDIR}/unloadmodules-ti-dmai-apps.sh ${D}/${datadir}/ti-dmai
-}
-
-do_stage () {
- install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai
- cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai
-}
-
-PACKAGES =+ "ti-dmai-apps"
-
-ALLOW_EMPTY_${PN} = "1"
-RRECOMMENDS_${PN} = "ti-dmai-apps"
-
-FILES_ti-dmai-apps = "${datadir}/ti-dmai/*"
-
-pkg_postinst_ti-dmai-apps () {
- if [ -n "$D" ]; then
- exit 1
- fi
- ln -sf /usr/share/ti-codec-combos/* /usr/share/ti-dmai/apps
-}
-
-INHIBIT_PACKAGE_STRIP = "1"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-#add run-time dependencies - note for kernel module we can only use RRECOMMENDS, since modules might be built into the kernel
-# and for now we make codecs RRECOMMENDS as well, since not everyone will have them
-#RDEPENDS_ti-dmai-apps += "ti-codec-combos"
-RRECOMMENDS_ti-dmai-apps += "ti-cmem-module ti-lpm-module ti-dsplink-module ti-codec-combos"
-
diff --git a/recipes/dvbtools/dvb-apps-1.1.1/makefile.patch b/recipes/dvbtools/dvb-apps-1.1.1/makefile.patch
deleted file mode 100644
index d3acb45d05..0000000000
--- a/recipes/dvbtools/dvb-apps-1.1.1/makefile.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-Index: linuxtv-dvb-apps-1.1.1/test/Makefile
-===================================================================
---- linuxtv-dvb-apps-1.1.1.orig/test/Makefile 2004-01-17 17:59:46.000000000 +0100
-+++ linuxtv-dvb-apps-1.1.1/test/Makefile 2008-03-25 20:04:23.000000000 +0100
-@@ -1,6 +1,6 @@
- # Makefile for Linux DVB API Version 3 test programs
-
--CC = gcc
-+
- CFLAGS = -g -O2 -W -Wall -I../include
-
- TARGETS = \
-Index: linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/Makefile
-===================================================================
---- linuxtv-dvb-apps-1.1.1.orig/util/av7110_loadkeys/Makefile 2004-01-17 17:59:46.000000000 +0100
-+++ linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/Makefile 2008-03-25 20:04:23.000000000 +0100
-@@ -1,7 +1,6 @@
--CC = gcc
- CFLAGS = -g -Wall -O2
-
--all: av7110_loadkeys evtest
-+all: evtest
-
- av7110_loadkeys: av7110_loadkeys.o
-
-Index: linuxtv-dvb-apps-1.1.1/util/lib/Makefile
-===================================================================
---- linuxtv-dvb-apps-1.1.1.orig/util/lib/Makefile 2004-01-17 17:59:46.000000000 +0100
-+++ linuxtv-dvb-apps-1.1.1/util/lib/Makefile 2008-03-25 20:04:23.000000000 +0100
-@@ -1,5 +1,5 @@
-
--CC = gcc
-+
- CFLAGS = -MD -g -Wall -O2 -I../../include -I.
- LFLAGS = -g -Wall
-
-Index: linuxtv-dvb-apps-1.1.1/util/scan/Makefile
-===================================================================
---- linuxtv-dvb-apps-1.1.1.orig/util/scan/Makefile 2006-05-18 01:34:53.000000000 +0200
-+++ linuxtv-dvb-apps-1.1.1/util/scan/Makefile 2008-03-25 20:04:23.000000000 +0100
-@@ -1,5 +1,5 @@
-
--CC = gcc
-+
- CFLAGS = -MD -g -Wall -O2 -I../../include
- LFLAGS = -g -Wall
-
-Index: linuxtv-dvb-apps-1.1.1/util/szap/Makefile
-===================================================================
---- linuxtv-dvb-apps-1.1.1.orig/util/szap/Makefile 2006-05-18 01:31:54.000000000 +0200
-+++ linuxtv-dvb-apps-1.1.1/util/szap/Makefile 2008-03-25 20:04:23.000000000 +0100
-@@ -1,4 +1,4 @@
--CC = gcc
-+
- CFLAGS = -MD -Wall -g -O2 -I../../include -I../lib
- LFLAGS = -Wall -g -O2
- RM = rm -f
-Index: linuxtv-dvb-apps-1.1.1/util/dvbdate/Makefile
-===================================================================
---- linuxtv-dvb-apps-1.1.1.orig/util/dvbdate/Makefile 2004-01-17 17:59:46.000000000 +0100
-+++ linuxtv-dvb-apps-1.1.1/util/dvbdate/Makefile 2008-03-25 20:04:23.000000000 +0100
-@@ -1,5 +1,4 @@
-
--CC = gcc
- CFLAGS = -g -O2 -MD -Wall -I. -I../../include
- LFLAGS =
-
-Index: linuxtv-dvb-apps-1.1.1/util/dvbnet/Makefile
-===================================================================
---- linuxtv-dvb-apps-1.1.1.orig/util/dvbnet/Makefile 2004-01-17 17:59:46.000000000 +0100
-+++ linuxtv-dvb-apps-1.1.1/util/dvbnet/Makefile 2008-03-25 20:04:23.000000000 +0100
-@@ -1,5 +1,4 @@
-
--CC = gcc
- CFLAGS = -g -O2 -MD -Wall -I. -I../../include
- LFLAGS =
-
-Index: linuxtv-dvb-apps-1.1.1/util/dvbtraffic/Makefile
-===================================================================
---- linuxtv-dvb-apps-1.1.1.orig/util/dvbtraffic/Makefile 2004-01-19 18:10:16.000000000 +0100
-+++ linuxtv-dvb-apps-1.1.1/util/dvbtraffic/Makefile 2008-03-25 20:09:00.000000000 +0100
-@@ -1,6 +1,6 @@
-
- dvbtraffic: dvbtraffic.c
-- gcc -MD -g -O2 -Wall -I../../include $< -o $@
-+ $(CC) -MD -g -O2 -Wall -I../../include $< -o $@
-
- clean:
- rm -f *.o *.d dvbtraffic
diff --git a/recipes/dvbtools/dvb-apps-1.1.1/update-to-trunk.diff b/recipes/dvbtools/dvb-apps-1.1.1/update-to-trunk.diff
new file mode 100644
index 0000000000..6d4a66a501
--- /dev/null
+++ b/recipes/dvbtools/dvb-apps-1.1.1/update-to-trunk.diff
@@ -0,0 +1,84310 @@
+ COPYING | 339
+ COPYING.LGPL | 502 +
+ INSTALL | 26
+ Make.rules | 104
+ Makefile | 32
+ README | 46
+ TODO | 1
+ include/audio.h | 140
+ include/ca.h | 90
+ include/dmx.h | 154
+ include/frontend.h | 648 +
+ include/linux/dvb/audio.h | 125
+ include/linux/dvb/ca.h | 91
+ include/linux/dvb/dmx.h | 181
+ include/linux/dvb/frontend.h | 267
+ include/linux/dvb/net.h | 41
+ include/linux/dvb/osd.h | 111
+ include/linux/dvb/version.h | 29
+ include/linux/dvb/video.h | 199
+ include/net.h | 53
+ include/osd.h | 142
+ include/version.h | 29
+ include/video.h | 277
+ lib/Makefile | 11
+ lib/libdvbapi/Makefile | 25
+ lib/libdvbapi/dvbaudio.c | 50
+ lib/libdvbapi/dvbaudio.h | 55
+ lib/libdvbapi/dvbca.c | 159
+ lib/libdvbapi/dvbca.h | 135
+ lib/libdvbapi/dvbdemux.c | 255
+ lib/libdvbapi/dvbdemux.h | 204
+ lib/libdvbapi/dvbfe.c | 574 +
+ lib/libdvbapi/dvbfe.h | 333
+ lib/libdvbapi/dvbnet.c | 104
+ lib/libdvbapi/dvbnet.h | 87
+ lib/libdvbapi/dvbvideo.c | 46
+ lib/libdvbapi/dvbvideo.h | 46
+ lib/libdvbcfg/Makefile | 18
+ lib/libdvbcfg/dvbcfg_common.c | 136
+ lib/libdvbcfg/dvbcfg_common.h | 37
+ lib/libdvbcfg/dvbcfg_scanfile.c | 282
+ lib/libdvbcfg/dvbcfg_scanfile.h | 61
+ lib/libdvbcfg/dvbcfg_zapchannel.c | 384 +
+ lib/libdvbcfg/dvbcfg_zapchannel.h | 77
+ lib/libdvbcfg/zapchannel.txt | 72
+ lib/libdvben50221/Makefile | 49
+ lib/libdvben50221/asn_1.c | 83
+ lib/libdvben50221/asn_1.h | 41
+ lib/libdvben50221/en50221_app_ai.c | 191
+ lib/libdvben50221/en50221_app_ai.h | 136
+ lib/libdvben50221/en50221_app_auth.c | 180
+ lib/libdvben50221/en50221_app_auth.h | 123
+ lib/libdvben50221/en50221_app_ca.c | 631 +
+ lib/libdvben50221/en50221_app_ca.h | 264
+ lib/libdvben50221/en50221_app_datetime.c | 173
+ lib/libdvben50221/en50221_app_datetime.h | 119
+ lib/libdvben50221/en50221_app_dvb.c | 282
+ lib/libdvben50221/en50221_app_dvb.h | 176
+ lib/libdvben50221/en50221_app_epg.c | 167
+ lib/libdvben50221/en50221_app_epg.h | 138
+ lib/libdvben50221/en50221_app_lowspeed.c | 533 +
+ lib/libdvben50221/en50221_app_lowspeed.h | 219
+ lib/libdvben50221/en50221_app_mmi.c | 1397 +++
+ lib/libdvben50221/en50221_app_mmi.h | 618 +
+ lib/libdvben50221/en50221_app_rm.c | 307
+ lib/libdvben50221/en50221_app_rm.h | 187
+ lib/libdvben50221/en50221_app_smartcard.c | 296
+ lib/libdvben50221/en50221_app_smartcard.h | 200
+ lib/libdvben50221/en50221_app_tags.h | 104
+ lib/libdvben50221/en50221_app_teletext.c | 141
+ lib/libdvben50221/en50221_app_teletext.h | 107
+ lib/libdvben50221/en50221_app_utils.c | 38
+ lib/libdvben50221/en50221_app_utils.h | 112
+ lib/libdvben50221/en50221_errno.h | 49
+ lib/libdvben50221/en50221_session.c | 1055 ++
+ lib/libdvben50221/en50221_session.h | 232
+ lib/libdvben50221/en50221_stdcam.c | 54
+ lib/libdvben50221/en50221_stdcam.h | 102
+ lib/libdvben50221/en50221_stdcam_hlci.c | 216
+ lib/libdvben50221/en50221_stdcam_llci.c | 437 +
+ lib/libdvben50221/en50221_transport.c | 1296 +++
+ lib/libdvben50221/en50221_transport.h | 234
+ lib/libdvbmisc/dvbmisc.h | 72
+ lib/libdvbsec/Makefile | 17
+ lib/libdvbsec/dvbsec_api.c | 951 ++
+ lib/libdvbsec/dvbsec_api.h | 436 +
+ lib/libdvbsec/dvbsec_cfg.c | 366 +
+ lib/libdvbsec/dvbsec_cfg.h | 203
+ lib/libesg/Makefile | 27
+ lib/libesg/TODO | 18
+ lib/libesg/bootstrap/Makefile | 24
+ lib/libesg/bootstrap/access_descriptor.c | 115
+ lib/libesg/bootstrap/access_descriptor.h | 86
+ lib/libesg/bootstrap/provider_discovery_descriptor.c | 50
+ lib/libesg/bootstrap/provider_discovery_descriptor.h | 59
+ lib/libesg/encapsulation/Makefile | 28
+ lib/libesg/encapsulation/auxiliary_data.h | 62
+ lib/libesg/encapsulation/container.c | 206
+ lib/libesg/encapsulation/container.h | 94
+ lib/libesg/encapsulation/data_repository.c | 53
+ lib/libesg/encapsulation/data_repository.h | 59
+ lib/libesg/encapsulation/fragment_management_information.c | 118
+ lib/libesg/encapsulation/fragment_management_information.h | 96
+ lib/libesg/encapsulation/string_repository.c | 54
+ lib/libesg/encapsulation/string_repository.h | 60
+ lib/libesg/representation/Makefile | 26
+ lib/libesg/representation/bim_decoder_init.h | 40
+ lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h | 40
+ lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c | 70
+ lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h | 60
+ lib/libesg/representation/init_message.c | 112
+ lib/libesg/representation/init_message.h | 80
+ lib/libesg/representation/textual_decoder_init.c | 128
+ lib/libesg/representation/textual_decoder_init.h | 104
+ lib/libesg/transport/Makefile | 22
+ lib/libesg/transport/session_partition_declaration.c | 253
+ lib/libesg/transport/session_partition_declaration.h | 139
+ lib/libesg/types.c | 37
+ lib/libesg/types.h | 53
+ lib/libesg/xml/provider_discovery_descriptor.xsd | 22
+ lib/libucsi/Makefile | 34
+ lib/libucsi/atsc/Makefile | 55
+ lib/libucsi/atsc/ac3_descriptor.h | 112
+ lib/libucsi/atsc/atsc_text.c | 743 ++
+ lib/libucsi/atsc/caption_service_descriptor.h | 137
+ lib/libucsi/atsc/component_name_descriptor.h | 92
+ lib/libucsi/atsc/content_advisory_descriptor.h | 235
+ lib/libucsi/atsc/cvct_section.c | 77
+ lib/libucsi/atsc/cvct_section.h | 228
+ lib/libucsi/atsc/dcc_arriving_request_descriptor.h | 107
+ lib/libucsi/atsc/dcc_departing_request_descriptor.h | 108
+ lib/libucsi/atsc/dccsct_section.c | 109
+ lib/libucsi/atsc/dccsct_section.h | 327
+ lib/libucsi/atsc/dcct_section.c | 96
+ lib/libucsi/atsc/dcct_section.h | 380 +
+ lib/libucsi/atsc/descriptor.h | 68
+ lib/libucsi/atsc/eit_section.c | 71
+ lib/libucsi/atsc/eit_section.h | 191
+ lib/libucsi/atsc/ett_section.c | 42
+ lib/libucsi/atsc/ett_section.h | 91
+ lib/libucsi/atsc/extended_channel_name_descriptor.h | 92
+ lib/libucsi/atsc/genre_descriptor.h | 82
+ lib/libucsi/atsc/mgt_section.c | 76
+ lib/libucsi/atsc/mgt_section.h | 215
+ lib/libucsi/atsc/rc_descriptor.h | 83
+ lib/libucsi/atsc/rrt_section.c | 108
+ lib/libucsi/atsc/rrt_section.h | 379 +
+ lib/libucsi/atsc/section.h | 84
+ lib/libucsi/atsc/service_location_descriptor.h | 141
+ lib/libucsi/atsc/stt_section.c | 42
+ lib/libucsi/atsc/stt_section.h | 105
+ lib/libucsi/atsc/stuffing_descriptor.h | 82
+ lib/libucsi/atsc/time_shifted_service_descriptor.h | 136
+ lib/libucsi/atsc/tvct_section.c | 81
+ lib/libucsi/atsc/tvct_section.h | 227
+ lib/libucsi/atsc/types.c | 71
+ lib/libucsi/atsc/types.h | 227
+ lib/libucsi/crc32.c | 89
+ lib/libucsi/crc32.h | 58
+ lib/libucsi/descriptor.h | 129
+ lib/libucsi/dvb/Makefile | 123
+ lib/libucsi/dvb/ac3_descriptor.h | 88
+ lib/libucsi/dvb/adaptation_field_data_descriptor.h | 62
+ lib/libucsi/dvb/ait_application_descriptor.h | 204
+ lib/libucsi/dvb/ait_application_icons_descriptor.h | 157
+ lib/libucsi/dvb/ait_application_name_descriptor.h | 145
+ lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h | 125
+ lib/libucsi/dvb/ancillary_data_descriptor.h | 67
+ lib/libucsi/dvb/announcement_support_descriptor.h | 219
+ lib/libucsi/dvb/application_signalling_descriptor.h | 124
+ lib/libucsi/dvb/bat_section.c | 77
+ lib/libucsi/dvb/bat_section.h | 211
+ lib/libucsi/dvb/bouquet_name_descriptor.h | 82
+ lib/libucsi/dvb/ca_identifier_descriptor.h | 94
+ lib/libucsi/dvb/cable_delivery_descriptor.h | 70
+ lib/libucsi/dvb/cell_frequency_link_descriptor.h | 190
+ lib/libucsi/dvb/cell_list_descriptor.h | 201
+ lib/libucsi/dvb/component_descriptor.h | 147
+ lib/libucsi/dvb/content_descriptor.h | 116
+ lib/libucsi/dvb/content_identifier_descriptor.h | 233
+ lib/libucsi/dvb/country_availability_descriptor.h | 120
+ lib/libucsi/dvb/data_broadcast_descriptor.h | 139
+ lib/libucsi/dvb/data_broadcast_id_descriptor.h | 221
+ lib/libucsi/dvb/default_authority_descriptor.h | 82
+ lib/libucsi/dvb/descriptor.h | 230
+ lib/libucsi/dvb/dit_section.c | 32
+ lib/libucsi/dvb/dit_section.h | 54
+ lib/libucsi/dvb/dsng_descriptor.h | 80
+ lib/libucsi/dvb/eit_section.c | 63
+ lib/libucsi/dvb/eit_section.h | 160
+ lib/libucsi/dvb/extended_event_descriptor.h | 232
+ lib/libucsi/dvb/frequency_list_descriptor.h | 107
+ lib/libucsi/dvb/int_section.c | 79
+ lib/libucsi/dvb/int_section.h | 245
+ lib/libucsi/dvb/ip_mac_platform_name_descriptor.h | 87
+ lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h | 87
+ lib/libucsi/dvb/ip_mac_stream_location_descriptor.h | 73
+ lib/libucsi/dvb/linkage_descriptor.h | 480 +
+ lib/libucsi/dvb/local_time_offset_descriptor.h | 127
+ lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h | 110
+ lib/libucsi/dvb/mosaic_descriptor.h | 324
+ lib/libucsi/dvb/mpe_fec_section.h | 73
+ lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h | 145
+ lib/libucsi/dvb/multilingual_component_descriptor.h | 149
+ lib/libucsi/dvb/multilingual_network_name_descriptor.h | 145
+ lib/libucsi/dvb/multilingual_service_name_descriptor.h | 197
+ lib/libucsi/dvb/network_name_descriptor.h | 82
+ lib/libucsi/dvb/nit_section.c | 78
+ lib/libucsi/dvb/nit_section.h | 207
+ lib/libucsi/dvb/nvod_reference_descriptor.h | 125
+ lib/libucsi/dvb/parental_rating_descriptor.h | 135
+ lib/libucsi/dvb/partial_transport_stream_descriptor.h | 68
+ lib/libucsi/dvb/pdc_descriptor.h | 64
+ lib/libucsi/dvb/private_data_specifier_descriptor.h | 63
+ lib/libucsi/dvb/related_content_descriptor.h | 56
+ lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h | 110
+ lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h | 87
+ lib/libucsi/dvb/rnt_rnt_scan_descriptor.h | 125
+ lib/libucsi/dvb/rst_section.c | 47
+ lib/libucsi/dvb/rst_section.h | 110
+ lib/libucsi/dvb/s2_satellite_delivery_descriptor.h | 116
+ lib/libucsi/dvb/satellite_delivery_descriptor.h | 73
+ lib/libucsi/dvb/scrambling_descriptor.h | 61
+ lib/libucsi/dvb/sdt_section.c | 60
+ lib/libucsi/dvb/sdt_section.h | 157
+ lib/libucsi/dvb/section.h | 108
+ lib/libucsi/dvb/service_availability_descriptor.h | 98
+ lib/libucsi/dvb/service_descriptor.h | 163
+ lib/libucsi/dvb/service_identifier_descriptor.h | 82
+ lib/libucsi/dvb/service_list_descriptor.h | 122
+ lib/libucsi/dvb/service_move_descriptor.h | 67
+ lib/libucsi/dvb/short_event_descriptor.h | 135
+ lib/libucsi/dvb/short_smoothing_buffer_descriptor.h | 87
+ lib/libucsi/dvb/sit_section.c | 69
+ lib/libucsi/dvb/sit_section.h | 173
+ lib/libucsi/dvb/st_section.c | 29
+ lib/libucsi/dvb/st_section.h | 77
+ lib/libucsi/dvb/stream_identifier_descriptor.h | 61
+ lib/libucsi/dvb/stuffing_descriptor.h | 82
+ lib/libucsi/dvb/subtitling_descriptor.h | 126
+ lib/libucsi/dvb/target_ip_address_descriptor.h | 116
+ lib/libucsi/dvb/target_ip_slash_descriptor.h | 116
+ lib/libucsi/dvb/target_ip_source_slash_descriptor.h | 118
+ lib/libucsi/dvb/target_ipv6_address_descriptor.h | 116
+ lib/libucsi/dvb/target_ipv6_slash_descriptor.h | 116
+ lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h | 118
+ lib/libucsi/dvb/tdt_section.c | 33
+ lib/libucsi/dvb/tdt_section.h | 54
+ lib/libucsi/dvb/telephone_descriptor.h | 150
+ lib/libucsi/dvb/teletext_descriptor.h | 127
+ lib/libucsi/dvb/terrestrial_delivery_descriptor.h | 77
+ lib/libucsi/dvb/time_shifted_event_descriptor.h | 65
+ lib/libucsi/dvb/time_shifted_service_descriptor.h | 63
+ lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h | 94
+ lib/libucsi/dvb/tot_section.c | 50
+ lib/libucsi/dvb/tot_section.h | 97
+ lib/libucsi/dvb/transport_stream_descriptor.h | 82
+ lib/libucsi/dvb/tva_container_section.c | 33
+ lib/libucsi/dvb/tva_container_section.h | 90
+ lib/libucsi/dvb/tva_id_descriptor.h | 124
+ lib/libucsi/dvb/types.c | 270
+ lib/libucsi/dvb/types.h | 127
+ lib/libucsi/dvb/vbi_data_descriptor.h | 186
+ lib/libucsi/dvb/vbi_teletext_descriptor.h | 116
+ lib/libucsi/endianops.h | 128
+ lib/libucsi/mpeg/Makefile | 66
+ lib/libucsi/mpeg/audio_stream_descriptor.h | 65
+ lib/libucsi/mpeg/ca_descriptor.h | 91
+ lib/libucsi/mpeg/cat_section.c | 34
+ lib/libucsi/mpeg/cat_section.h | 94
+ lib/libucsi/mpeg/content_labelling_descriptor.h | 356 +
+ lib/libucsi/mpeg/copyright_descriptor.h | 89
+ lib/libucsi/mpeg/data_stream_alignment_descriptor.h | 73
+ lib/libucsi/mpeg/datagram_section.h | 81
+ lib/libucsi/mpeg/descriptor.h | 102
+ lib/libucsi/mpeg/external_es_id_descriptor.h | 63
+ lib/libucsi/mpeg/fmc_descriptor.h | 122
+ lib/libucsi/mpeg/fmxbuffer_size_descriptor.h | 83
+ lib/libucsi/mpeg/hierarchy_descriptor.h | 83
+ lib/libucsi/mpeg/ibp_descriptor.h | 65
+ lib/libucsi/mpeg/iod_descriptor.h | 87
+ lib/libucsi/mpeg/iso_639_language_descriptor.h | 124
+ lib/libucsi/mpeg/maximum_bitrate_descriptor.h | 64
+ lib/libucsi/mpeg/metadata_descriptor.h | 472 +
+ lib/libucsi/mpeg/metadata_pointer_descriptor.h | 360 +
+ lib/libucsi/mpeg/metadata_section.c | 27
+ lib/libucsi/mpeg/metadata_section.h | 122
+ lib/libucsi/mpeg/metadata_std_descriptor.h | 72
+ lib/libucsi/mpeg/mpeg4_audio_descriptor.h | 61
+ lib/libucsi/mpeg/mpeg4_video_descriptor.h | 61
+ lib/libucsi/mpeg/multiplex_buffer_descriptor.h | 65
+ lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h | 67
+ lib/libucsi/mpeg/muxcode_descriptor.h | 82
+ lib/libucsi/mpeg/odsmt_section.c | 80
+ lib/libucsi/mpeg/odsmt_section.h | 224
+ lib/libucsi/mpeg/pat_section.c | 46
+ lib/libucsi/mpeg/pat_section.h | 118
+ lib/libucsi/mpeg/pmt_section.c | 71
+ lib/libucsi/mpeg/pmt_section.h | 188
+ lib/libucsi/mpeg/private_data_indicator_descriptor.h | 63
+ lib/libucsi/mpeg/registration_descriptor.h | 91
+ lib/libucsi/mpeg/section.h | 60
+ lib/libucsi/mpeg/sl_descriptor.h | 63
+ lib/libucsi/mpeg/smoothing_buffer_descriptor.h | 66
+ lib/libucsi/mpeg/std_descriptor.h | 62
+ lib/libucsi/mpeg/system_clock_descriptor.h | 65
+ lib/libucsi/mpeg/target_background_grid_descriptor.h | 66
+ lib/libucsi/mpeg/tsdt_section.c | 34
+ lib/libucsi/mpeg/tsdt_section.h | 94
+ lib/libucsi/mpeg/types.h | 127
+ lib/libucsi/mpeg/video_stream_descriptor.h | 101
+ lib/libucsi/mpeg/video_window_descriptor.h | 64
+ lib/libucsi/section.h | 253
+ lib/libucsi/section_buf.c | 173
+ lib/libucsi/section_buf.h | 124
+ lib/libucsi/testrecord.txt | 146
+ lib/libucsi/transport_packet.c | 256
+ lib/libucsi/transport_packet.h | 195
+ lib/libucsi/types.h | 36
+ libdvb2/README | 23
+ test/Makefile | 64
+ test/README | 11
+ test/dia | 1
+ test/diseqc.c | 19
+ test/evtest.c | 251
+ test/hex_dump.c | 1
+ test/libdvbcfg/Makefile | 12
+ test/libdvbcfg/dvbcfg_test.c | 100
+ test/libdvbcfg/test_zapchannels.txt | 446 +
+ test/libdvben50221/Makefile | 14
+ test/libdvben50221/test-app.c | 854 ++
+ test/libdvben50221/test-session.c | 171
+ test/libdvben50221/test-transport.c | 144
+ test/libdvbsec/Makefile | 12
+ test/libdvbsec/dvbsec_test.c | 85
+ test/libdvbsec/test_sec.txt | 28
+ test/libesg/Makefile | 12
+ test/libesg/samples/ESGProviderDiscoveryDescriptor.xml | 13
+ test/libesg/testesg.c | 563 +
+ test/libucsi/Makefile | 13
+ test/libucsi/testucsi.c | 3528 ++++++++++
+ test/lnb.c | 101
+ test/lnb.h | 22
+ test/sendburst.c | 14
+ test/set22k.c | 18
+ test/setpid.c | 17
+ test/setvoltage.c | 18
+ test/szap2.c | 767 ++
+ test/test.c | 81
+ test/test_audio.c | 41
+ test/test_av.c | 100
+ test/test_av_play.c | 516 +
+ test/test_dvr.c | 3
+ test/test_dvr_play.c | 1
+ test/test_front.c | 37
+ test/test_sec_ne.c | 7
+ test/test_sections.c | 3
+ test/test_stc.c | 1
+ test/test_stillimage.c | 7
+ test/test_switch.c | 106
+ test/test_tt.c | 1
+ test/test_vevent.c | 6
+ test/test_video.c | 51
+ test/video.c | 42
+ util/Makefile | 25
+ util/atsc_epg/Makefile | 16
+ util/atsc_epg/README | 12
+ util/atsc_epg/atsc_epg.c | 1249 +++
+ util/av7110_loadkeys/Makefile | 53
+ util/av7110_loadkeys/README | 15
+ util/av7110_loadkeys/activy.rcmm | 1
+ util/av7110_loadkeys/av7110_loadkeys.c | 48
+ util/av7110_loadkeys/evtest.c | 177
+ util/av7110_loadkeys/galaxis.rcmm | 3
+ util/av7110_loadkeys/generate-keynames.sh | 37
+ util/av7110_loadkeys/hauppauge.rc5 | 1
+ util/av7110_loadkeys/hauppauge2.rc5 | 40
+ util/av7110_loadkeys/hauppauge_grey.rc5 | 1
+ util/av7110_loadkeys/input_fake.h | 15
+ util/av7110_loadkeys/philips1358.rc5 | 5
+ util/av7110_loadkeys/technotrend.rc5 | 41
+ util/dib3000-watch/Makefile | 13
+ util/dib3000-watch/README.dib3000-watch | 29
+ util/dib3000-watch/dib-i2c.h | 43
+ util/dib3000-watch/dib3000-watch.c | 296
+ util/dib3000-watch/dib3000-watch.h | 46
+ util/dib3000-watch/dib3000.h | 56
+ util/dib3000-watch/make-i2c-dev | 6
+ util/dst-utils/Makefile | 13
+ util/dst-utils/dst_test.c | 258
+ util/dvbdate/Makefile | 28
+ util/dvbdate/dvbdate.c | 282
+ util/dvbnet/Makefile | 32
+ util/dvbnet/dvbnet.c | 106
+ util/dvbnet/net_start.pl | 1
+ util/dvbnet/version.h.in | 1
+ util/dvbscan/Makefile | 22
+ util/dvbscan/dvbscan.c | 370 +
+ util/dvbscan/dvbscan.h | 136
+ util/dvbscan/dvbscan_atsc.c | 30
+ util/dvbscan/dvbscan_dvb.c | 30
+ util/dvbscan/dvbscan_structutils.c | 99
+ util/dvbtraffic/Makefile | 17
+ util/dvbtraffic/dvbtraffic.c | 110
+ util/femon/Makefile | 15
+ util/femon/femon.c | 175
+ util/gnutv/Makefile | 21
+ util/gnutv/gnutv.c | 375 +
+ util/gnutv/gnutv.h | 37
+ util/gnutv/gnutv_ca.c | 404 +
+ util/gnutv/gnutv_ca.h | 40
+ util/gnutv/gnutv_data.c | 483 +
+ util/gnutv/gnutv_data.h | 39
+ util/gnutv/gnutv_dvb.c | 376 +
+ util/gnutv/gnutv_dvb.h | 44
+ util/lib/Makefile | 20
+ util/lib/lnb.c | 101
+ util/lib/lnb.h | 24
+ util/scan/Makefile | 46
+ util/scan/README | 26
+ util/scan/atsc/us-ATSC-center-frequencies-8VSB | 1
+ util/scan/atsc/us-NTSC-center-frequencies-8VSB | 1
+ util/scan/atsc/us-NY-TWC-NYC | 53
+ util/scan/atsc_psip_section.c | 62
+ util/scan/atsc_psip_section.h | 60
+ util/scan/atsc_psip_section.pl | 76
+ util/scan/diseqc.c | 5
+ util/scan/diseqc.h | 1
+ util/scan/dump-vdr.c | 13
+ util/scan/dump-vdr.h | 1
+ util/scan/dump-zap.c | 1
+ util/scan/dump-zap.h | 1
+ util/scan/dvb-c/at-Innsbruck | 8
+ util/scan/dvb-c/at-KarrerNet | 18
+ util/scan/dvb-c/at-Liwest | 31
+ util/scan/dvb-c/at-SalzburgAG | 8
+ util/scan/dvb-c/be-IN.DI-Integan | 16
+ util/scan/dvb-c/ch-Rega-Sense | 34
+ util/scan/dvb-c/ch-Video2000 | 5
+ util/scan/dvb-c/ch-Zuerich-cablecom | 3
+ util/scan/dvb-c/cz-Moravianet | 24
+ util/scan/dvb-c/de-Berlin | 1
+ util/scan/dvb-c/de-Kabel_BW | 16
+ util/scan/dvb-c/de-Muenchen | 27
+ util/scan/dvb-c/de-Primacom | 23
+ util/scan/dvb-c/de-Unitymedia | 35
+ util/scan/dvb-c/de-iesy | 19
+ util/scan/dvb-c/de-neftv | 23
+ util/scan/dvb-c/dk-Copenhagen-AFDK | 11
+ util/scan/dvb-c/dk-Odense | 10
+ util/scan/dvb-c/es-Euskaltel | 19
+ util/scan/dvb-c/fi-3ktv | 23
+ util/scan/dvb-c/fi-HTV | 4
+ util/scan/dvb-c/fi-Joensuu-Tikka | 13
+ util/scan/dvb-c/fi-TTV | 4
+ util/scan/dvb-c/fi-Turku | 17
+ util/scan/dvb-c/fi-jkl | 10
+ util/scan/dvb-c/fi-sonera | 12
+ util/scan/dvb-c/fr-noos-numericable | 41
+ util/scan/dvb-c/lu-Ettelbruck-ACE | 20
+ util/scan/dvb-c/nl-Ziggo | 14
+ util/scan/dvb-c/nl-Ziggo-Zwolle | 26
+ util/scan/dvb-c/no-Oslo-CanalDigital | 13
+ util/scan/dvb-c/no-Oslo-Get | 22
+ util/scan/dvb-c/se-Gothnet | 23
+ util/scan/dvb-c/se-comhem | 3
+ util/scan/dvb-h/README | 3
+ util/scan/dvb-h/fi-Helsinki | 2
+ util/scan/dvb-h/fi-Oulu | 2
+ util/scan/dvb-h/fi-Oulu-Nokia-devel | 4
+ util/scan/dvb-h/fi-Turku | 2
+ util/scan/dvb-s/ABS1-75.0E | 10
+ util/scan/dvb-s/AMC1-103w | 5
+ util/scan/dvb-s/AMC2-85w | 6
+ util/scan/dvb-s/AMC3-87w | 10
+ util/scan/dvb-s/AMC4-101w | 10
+ util/scan/dvb-s/AMC5-79w | 5
+ util/scan/dvb-s/AMC6-72w | 44
+ util/scan/dvb-s/AMC9-83w | 18
+ util/scan/dvb-s/Amazonas-61.0W | 54
+ util/scan/dvb-s/Amos-4w | 48
+ util/scan/dvb-s/Anik-F1-107.3W | 7
+ util/scan/dvb-s/AsiaSat3S_C-105.5E | 122
+ util/scan/dvb-s/Astra-28.2E | 186
+ util/scan/dvb-s/Atlantic-Bird-1-12.5W | 30
+ util/scan/dvb-s/BrasilSat-B1-75.0W | 11
+ util/scan/dvb-s/BrasilSat-B2-65.0W | 34
+ util/scan/dvb-s/BrasilSat-B3-84.0W | 85
+ util/scan/dvb-s/BrasilSat-B4-70.0W | 39
+ util/scan/dvb-s/Estrela-do-Sul-63.0W | 27
+ util/scan/dvb-s/Eurobird1-28.5E | 5
+ util/scan/dvb-s/Eurobird9-9.0E | 16
+ util/scan/dvb-s/EutelsatW2-16E | 59
+ util/scan/dvb-s/Express-3A-11.0W | 4
+ util/scan/dvb-s/ExpressAM1-40.0E | 5
+ util/scan/dvb-s/ExpressAM2-80.0E | 35
+ util/scan/dvb-s/ExpressAM22-53.0E | 9
+ util/scan/dvb-s/Galaxy10R-123w | 10
+ util/scan/dvb-s/Galaxy11-91w | 49
+ util/scan/dvb-s/Galaxy25-97w | 19
+ util/scan/dvb-s/Galaxy26-93w | 58
+ util/scan/dvb-s/Galaxy27-129w | 4
+ util/scan/dvb-s/Galaxy28-89w | 41
+ util/scan/dvb-s/Galaxy3C-95w | 4
+ util/scan/dvb-s/Hispasat-30.0W | 37
+ util/scan/dvb-s/Hotbird-13.0E | 93
+ util/scan/dvb-s/IA5-97w | 18
+ util/scan/dvb-s/IA6-93w | 61
+ util/scan/dvb-s/IA7-129w | 4
+ util/scan/dvb-s/IA8-89w | 34
+ util/scan/dvb-s/Intel4-72.0E | 6
+ util/scan/dvb-s/Intel904-60.0E | 13
+ util/scan/dvb-s/Intelsat-1002-1.0W | 20
+ util/scan/dvb-s/Intelsat-11-43.0W | 4
+ util/scan/dvb-s/Intelsat-1R-45.0W | 44
+ util/scan/dvb-s/Intelsat-3R-43.0W | 35
+ util/scan/dvb-s/Intelsat-6B-43.0W | 17
+ util/scan/dvb-s/Intelsat-705-50.0W | 7
+ util/scan/dvb-s/Intelsat-707-53.0W | 5
+ util/scan/dvb-s/Intelsat-805-55.5W | 67
+ util/scan/dvb-s/Intelsat-9-58.0W | 58
+ util/scan/dvb-s/Intelsat-903-34.5W | 7
+ util/scan/dvb-s/Intelsat-905-24.5W | 9
+ util/scan/dvb-s/Intelsat-907-27.5W | 9
+ util/scan/dvb-s/NSS-10-37.5W | 12
+ util/scan/dvb-s/NSS-7-22.0W | 25
+ util/scan/dvb-s/NSS-806-40.5W | 108
+ util/scan/dvb-s/Nahuel-1-71.8W | 11
+ util/scan/dvb-s/Nilesat101+102-7.0W | 41
+ util/scan/dvb-s/OptusC1-156E | 20
+ util/scan/dvb-s/SBS6-74w | 4
+ util/scan/dvb-s/Satmex-5-116.8W | 72
+ util/scan/dvb-s/Satmex-6-113.0W | 19
+ util/scan/dvb-s/Sirius-5.0E | 57
+ util/scan/dvb-s/Telecom2-8.0W | 17
+ util/scan/dvb-s/Telstar12-15.0W | 26
+ util/scan/dvb-s/Thor-1.0W | 32
+ util/scan/dvb-s/Turksat-42.0E | 104
+ util/scan/dvb-s/Yamal201-90.0E | 48
+ util/scan/dvb-t/ad-Andorra | 6
+ util/scan/dvb-t/at-Official | 24
+ util/scan/dvb-t/au-Adelaide | 12
+ util/scan/dvb-t/au-Brisbane | 12
+ util/scan/dvb-t/au-Cairns | 12
+ util/scan/dvb-t/au-Canberra-Black-Mt | 12
+ util/scan/dvb-t/au-Coonabarabran | 16
+ util/scan/dvb-t/au-Darwin | 8
+ util/scan/dvb-t/au-GoldCoast | 21
+ util/scan/dvb-t/au-Hobart | 12
+ util/scan/dvb-t/au-Mackay | 14
+ util/scan/dvb-t/au-Melbourne | 12
+ util/scan/dvb-t/au-Melbourne-Upwey | 12
+ util/scan/dvb-t/au-MidNorthCoast | 22
+ util/scan/dvb-t/au-Newcastle | 12
+ util/scan/dvb-t/au-Perth | 12
+ util/scan/dvb-t/au-Perth_Roleystone | 12
+ util/scan/dvb-t/au-SpencerGulf | 8
+ util/scan/dvb-t/au-SunshineCoast | 12
+ util/scan/dvb-t/au-Sydney_Kings_Cross | 14
+ util/scan/dvb-t/au-Sydney_North_Shore | 16
+ util/scan/dvb-t/au-Tamworth | 38
+ util/scan/dvb-t/au-Townsville | 12
+ util/scan/dvb-t/au-WaggaWagga | 12
+ util/scan/dvb-t/au-Wollongong | 40
+ util/scan/dvb-t/au-canberra | 6
+ util/scan/dvb-t/au-sydney_north_shore | 12
+ util/scan/dvb-t/be-Brussels | 5
+ util/scan/dvb-t/be-Libramont | 10
+ util/scan/dvb-t/be-Schoten | 3
+ util/scan/dvb-t/be-St_Pieters_Leeuw | 3
+ util/scan/dvb-t/be-Tournai | 3
+ util/scan/dvb-t/ch-All | 31
+ util/scan/dvb-t/ch-Citycable | 18
+ util/scan/dvb-t/cz-Brno | 10
+ util/scan/dvb-t/cz-Domazlice | 3
+ util/scan/dvb-t/cz-Klet | 4
+ util/scan/dvb-t/cz-Ostrava | 3
+ util/scan/dvb-t/cz-Plzen | 8
+ util/scan/dvb-t/cz-Praha | 7
+ util/scan/dvb-t/de-Baden-Wuerttemberg | 20
+ util/scan/dvb-t/de-Bayern | 40
+ util/scan/dvb-t/de-Berlin | 12
+ util/scan/dvb-t/de-Brandenburg | 7
+ util/scan/dvb-t/de-Bremen | 9
+ util/scan/dvb-t/de-Hamburg | 16
+ util/scan/dvb-t/de-Hessen | 19
+ util/scan/dvb-t/de-Mecklenburg-Vorpommern | 12
+ util/scan/dvb-t/de-Niedersachsen | 40
+ util/scan/dvb-t/de-Nordrhein-Westfalen | 27
+ util/scan/dvb-t/de-Rheinland-Pfalz | 12
+ util/scan/dvb-t/de-Saarland | 7
+ util/scan/dvb-t/de-Sachsen | 12
+ util/scan/dvb-t/de-Sachsen-Anhalt | 12
+ util/scan/dvb-t/de-Schleswig-Holstein | 18
+ util/scan/dvb-t/de-Thueringen | 10
+ util/scan/dvb-t/dk-All | 17
+ util/scan/dvb-t/es-Albacete | 8
+ util/scan/dvb-t/es-Alfabia | 8
+ util/scan/dvb-t/es-Alicante | 9
+ util/scan/dvb-t/es-Alpicat | 8
+ util/scan/dvb-t/es-Asturias | 8
+ util/scan/dvb-t/es-Bilbao | 6
+ util/scan/dvb-t/es-Cadiz | 8
+ util/scan/dvb-t/es-Carceres | 10
+ util/scan/dvb-t/es-Collserola | 12
+ util/scan/dvb-t/es-Donostia | 14
+ util/scan/dvb-t/es-Huesca | 8
+ util/scan/dvb-t/es-Las_Palmas | 8
+ util/scan/dvb-t/es-Lugo | 9
+ util/scan/dvb-t/es-Madrid | 8
+ util/scan/dvb-t/es-Malaga | 9
+ util/scan/dvb-t/es-Muros-Noia | 9
+ util/scan/dvb-t/es-Mussara | 8
+ util/scan/dvb-t/es-Rocacorba | 6
+ util/scan/dvb-t/es-Santander | 7
+ util/scan/dvb-t/es-Santiago_de_Compostela | 9
+ util/scan/dvb-t/es-Sevilla | 8
+ util/scan/dvb-t/es-Valencia | 9
+ util/scan/dvb-t/es-Valladolid | 7
+ util/scan/dvb-t/es-Vilamarxant | 4
+ util/scan/dvb-t/es-Zaragoza | 7
+ util/scan/dvb-t/fi-Aanekoski | 6
+ util/scan/dvb-t/fi-Aanekoski_Konginkangas | 5
+ util/scan/dvb-t/fi-Ahtari | 4
+ util/scan/dvb-t/fi-Ala-Vuokki | 4
+ util/scan/dvb-t/fi-Alajarvi | 5
+ util/scan/dvb-t/fi-Ammansaari | 4
+ util/scan/dvb-t/fi-Anjalankoski | 6
+ util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama | 4
+ util/scan/dvb-t/fi-Espoo | 5
+ util/scan/dvb-t/fi-Eurajoki | 6
+ util/scan/dvb-t/fi-Fiskars | 6
+ util/scan/dvb-t/fi-Haapavesi | 6
+ util/scan/dvb-t/fi-Hameenkyro_Kyroskoski | 5
+ util/scan/dvb-t/fi-Hameenlinna_Painokangas | 5
+ util/scan/dvb-t/fi-Hanko | 5
+ util/scan/dvb-t/fi-Hartola | 4
+ util/scan/dvb-t/fi-Heinavesi | 4
+ util/scan/dvb-t/fi-Heinola | 6
+ util/scan/dvb-t/fi-Hetta | 4
+ util/scan/dvb-t/fi-Houtskari | 5
+ util/scan/dvb-t/fi-Hyrynsalmi | 4
+ util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara | 4
+ util/scan/dvb-t/fi-Hyrynsalmi_Paljakka | 4
+ util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto | 5
+ util/scan/dvb-t/fi-Ii_Raiskio | 4
+ util/scan/dvb-t/fi-Iisalmi | 4
+ util/scan/dvb-t/fi-Ikaalinen | 5
+ util/scan/dvb-t/fi-Ikaalinen_Riitiala | 5
+ util/scan/dvb-t/fi-Inari | 4
+ util/scan/dvb-t/fi-Inari_Janispaa | 4
+ util/scan/dvb-t/fi-Inari_Naatamo | 4
+ util/scan/dvb-t/fi-Ivalo_Saarineitamovaara | 4
+ util/scan/dvb-t/fi-Jalasjarvi | 5
+ util/scan/dvb-t/fi-Jamsa_Kaipola | 5
+ util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli | 5
+ util/scan/dvb-t/fi-Jamsa_Matkosvuori | 6
+ util/scan/dvb-t/fi-Jamsa_Ouninpohja | 4
+ util/scan/dvb-t/fi-Jamsankoski | 5
+ util/scan/dvb-t/fi-Joensuu_Vestinkallio | 4
+ util/scan/dvb-t/fi-Joroinen_Puukkola | 4
+ util/scan/dvb-t/fi-Joutsa_Lankia | 5
+ util/scan/dvb-t/fi-Joutseno | 6
+ util/scan/dvb-t/fi-Juntusranta | 4
+ util/scan/dvb-t/fi-Juupajoki_Kopsamo | 4
+ util/scan/dvb-t/fi-Jyvaskyla | 6
+ util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski | 4
+ util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti | 4
+ util/scan/dvb-t/fi-Kajaani_Pollyvaara | 4
+ util/scan/dvb-t/fi-Kalajoki | 4
+ util/scan/dvb-t/fi-Kangaslampi | 5
+ util/scan/dvb-t/fi-Kangasniemi_Turkinmaki | 5
+ util/scan/dvb-t/fi-Kankaanpaa | 5
+ util/scan/dvb-t/fi-Karigasniemi | 4
+ util/scan/dvb-t/fi-Karkkila | 6
+ util/scan/dvb-t/fi-Karstula | 4
+ util/scan/dvb-t/fi-Karvia | 5
+ util/scan/dvb-t/fi-Kaunispaa | 4
+ util/scan/dvb-t/fi-Kemijarvi_Suomutunturi | 4
+ util/scan/dvb-t/fi-Kerimaki | 6
+ util/scan/dvb-t/fi-Keuruu | 6
+ util/scan/dvb-t/fi-Keuruu_Haapamaki | 5
+ util/scan/dvb-t/fi-Kihnio | 5
+ util/scan/dvb-t/fi-Kiihtelysvaara | 4
+ util/scan/dvb-t/fi-Kilpisjarvi | 4
+ util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi | 4
+ util/scan/dvb-t/fi-Kolari_Vuolittaja | 4
+ util/scan/dvb-t/fi-Koli | 6
+ util/scan/dvb-t/fi-Korpilahti_Vaarunvuori | 5
+ util/scan/dvb-t/fi-Korppoo | 5
+ util/scan/dvb-t/fi-Kruunupyy | 6
+ util/scan/dvb-t/fi-Kuhmo_Iivantiira | 4
+ util/scan/dvb-t/fi-Kuhmo_Lentiira | 4
+ util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki | 4
+ util/scan/dvb-t/fi-Kuhmoinen | 5
+ util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi | 5
+ util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen | 4
+ util/scan/dvb-t/fi-Kuopio | 6
+ util/scan/dvb-t/fi-Kustavi_Viherlahti | 5
+ util/scan/dvb-t/fi-Kuttanen | 4
+ util/scan/dvb-t/fi-Kuusamo_Hamppulampi | 4
+ util/scan/dvb-t/fi-Kyyjarvi_Noposenaho | 4
+ util/scan/dvb-t/fi-Lahti | 6
+ util/scan/dvb-t/fi-Lapua | 6
+ util/scan/dvb-t/fi-Laukaa | 5
+ util/scan/dvb-t/fi-Laukaa_Vihtavuori | 5
+ util/scan/dvb-t/fi-Lavia_Lavianjarvi | 4
+ util/scan/dvb-t/fi-Lieksa_Vieki | 5
+ util/scan/dvb-t/fi-Lohja | 6
+ util/scan/dvb-t/fi-Loimaa | 5
+ util/scan/dvb-t/fi-Luhanka | 5
+ util/scan/dvb-t/fi-Luopioinen | 5
+ util/scan/dvb-t/fi-Mantta | 5
+ util/scan/dvb-t/fi-Mantyharju | 4
+ util/scan/dvb-t/fi-Mikkeli | 6
+ util/scan/dvb-t/fi-Muonio_Olostunturi | 4
+ util/scan/dvb-t/fi-Nilsia | 5
+ util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi | 4
+ util/scan/dvb-t/fi-Nilsia_Pisa | 4
+ util/scan/dvb-t/fi-Nokia | 6
+ util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori | 5
+ util/scan/dvb-t/fi-Nummi-Pusula_Hyonola | 5
+ util/scan/dvb-t/fi-Nurmes_Kortevaara | 4
+ util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen | 4
+ util/scan/dvb-t/fi-Oulu | 6
+ util/scan/dvb-t/fi-Padasjoki | 5
+ util/scan/dvb-t/fi-Padasjoki_Arrakoski | 5
+ util/scan/dvb-t/fi-Paltamo_Kivesvaara | 4
+ util/scan/dvb-t/fi-Parikkala | 5
+ util/scan/dvb-t/fi-Parkano | 5
+ util/scan/dvb-t/fi-Pello | 4
+ util/scan/dvb-t/fi-Pello_Ratasvaara | 4
+ util/scan/dvb-t/fi-Perho | 5
+ util/scan/dvb-t/fi-Pernaja | 5
+ util/scan/dvb-t/fi-Pieksamaki_Halkokumpu | 4
+ util/scan/dvb-t/fi-Pihtipudas | 5
+ util/scan/dvb-t/fi-Porvoo_Suomenkyla | 5
+ util/scan/dvb-t/fi-Posio | 4
+ util/scan/dvb-t/fi-Pudasjarvi | 4
+ util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote | 4
+ util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara | 4
+ util/scan/dvb-t/fi-Puolanka | 5
+ util/scan/dvb-t/fi-Pyhatunturi | 4
+ util/scan/dvb-t/fi-Pyhavuori | 5
+ util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi | 4
+ util/scan/dvb-t/fi-Raahe_Mestauskallio | 5
+ util/scan/dvb-t/fi-Raahe_Piehinki | 4
+ util/scan/dvb-t/fi-Ranua_Haasionmaa | 4
+ util/scan/dvb-t/fi-Ranua_Leppiaho | 4
+ util/scan/dvb-t/fi-Rautavaara_Angervikko | 5
+ util/scan/dvb-t/fi-Rautjarvi_Simpele | 4
+ util/scan/dvb-t/fi-Ristijarvi | 4
+ util/scan/dvb-t/fi-Rovaniemi | 5
+ util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki | 4
+ util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara | 4
+ util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi | 4
+ util/scan/dvb-t/fi-Rovaniemi_Marasenkallio | 4
+ util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka | 4
+ util/scan/dvb-t/fi-Rovaniemi_Sonka | 4
+ util/scan/dvb-t/fi-Ruka | 5
+ util/scan/dvb-t/fi-Ruovesi_Storminiemi | 5
+ util/scan/dvb-t/fi-Saarijarvi | 5
+ util/scan/dvb-t/fi-Saarijarvi_Kalmari | 4
+ util/scan/dvb-t/fi-Saarijarvi_Mahlu | 4
+ util/scan/dvb-t/fi-Salla_Hirvasvaara | 4
+ util/scan/dvb-t/fi-Salla_Ihistysjanka | 4
+ util/scan/dvb-t/fi-Salla_Naruska | 4
+ util/scan/dvb-t/fi-Salla_Sallatunturi | 4
+ util/scan/dvb-t/fi-Salla_Sarivaara | 4
+ util/scan/dvb-t/fi-Salo_Isokyla | 6
+ util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa | 4
+ util/scan/dvb-t/fi-Savukoski_Tanhua | 4
+ util/scan/dvb-t/fi-Siilinjarvi | 5
+ util/scan/dvb-t/fi-Sipoo_Norrkulla | 5
+ util/scan/dvb-t/fi-Sodankyla_Pittiovaara | 4
+ util/scan/dvb-t/fi-Sulkava_Vaatalanmaki | 4
+ util/scan/dvb-t/fi-Suomussalmi_Myllylahti | 4
+ util/scan/dvb-t/fi-Sysma_Liikola | 5
+ util/scan/dvb-t/fi-Taivalkoski | 4
+ util/scan/dvb-t/fi-Taivalkoski_Taivalvaara | 4
+ util/scan/dvb-t/fi-Tammela | 6
+ util/scan/dvb-t/fi-Tammisaari | 5
+ util/scan/dvb-t/fi-Tampere | 4
+ util/scan/dvb-t/fi-Tampere_Pyynikki | 6
+ util/scan/dvb-t/fi-Tervola | 5
+ util/scan/dvb-t/fi-Turku | 5
+ util/scan/dvb-t/fi-Utsjoki | 4
+ util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara | 4
+ util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja | 4
+ util/scan/dvb-t/fi-Utsjoki_Nuvvus | 4
+ util/scan/dvb-t/fi-Utsjoki_Outakoski | 4
+ util/scan/dvb-t/fi-Utsjoki_Polvarniemi | 4
+ util/scan/dvb-t/fi-Utsjoki_Rovisuvanto | 4
+ util/scan/dvb-t/fi-Utsjoki_Tenola | 4
+ util/scan/dvb-t/fi-Uusikaupunki_Orivo | 5
+ util/scan/dvb-t/fi-Vaala | 4
+ util/scan/dvb-t/fi-Vaasa | 5
+ util/scan/dvb-t/fi-Valtimo | 4
+ util/scan/dvb-t/fi-Vammala_Jyranvuori | 5
+ util/scan/dvb-t/fi-Vammala_Roismala | 4
+ util/scan/dvb-t/fi-Vammala_Savi | 4
+ util/scan/dvb-t/fi-Vantaa_Hakunila | 6
+ util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki | 5
+ util/scan/dvb-t/fi-Virrat_Lappavuori | 5
+ util/scan/dvb-t/fi-Vuokatti | 6
+ util/scan/dvb-t/fi-Vuotso | 4
+ util/scan/dvb-t/fi-Ylitornio_Ainiovaara | 5
+ util/scan/dvb-t/fi-Ylitornio_Raanujarvi | 4
+ util/scan/dvb-t/fi-Yllas | 4
+ util/scan/dvb-t/fr-Abbeville | 25
+ util/scan/dvb-t/fr-Agen | 25
+ util/scan/dvb-t/fr-Ajaccio | 25
+ util/scan/dvb-t/fr-Albi | 25
+ util/scan/dvb-t/fr-Alençon | 25
+ util/scan/dvb-t/fr-Ales | 25
+ util/scan/dvb-t/fr-Ales-Bouquet | 25
+ util/scan/dvb-t/fr-Amiens | 25
+ util/scan/dvb-t/fr-Angers | 25
+ util/scan/dvb-t/fr-Annecy | 25
+ util/scan/dvb-t/fr-Arcachon | 25
+ util/scan/dvb-t/fr-Argenton | 25
+ util/scan/dvb-t/fr-Aubenas | 25
+ util/scan/dvb-t/fr-Aurillac | 25
+ util/scan/dvb-t/fr-Autun | 25
+ util/scan/dvb-t/fr-Auxerre | 25
+ util/scan/dvb-t/fr-Avignon | 25
+ util/scan/dvb-t/fr-BarleDuc | 25
+ util/scan/dvb-t/fr-Bastia | 25
+ util/scan/dvb-t/fr-Bayonne | 25
+ util/scan/dvb-t/fr-Bergerac | 25
+ util/scan/dvb-t/fr-Besançon | 25
+ util/scan/dvb-t/fr-Bordeaux | 9
+ util/scan/dvb-t/fr-Bordeaux-Bouliac | 25
+ util/scan/dvb-t/fr-Bordeaux-Cauderan | 25
+ util/scan/dvb-t/fr-Boulogne | 25
+ util/scan/dvb-t/fr-Bourges | 25
+ util/scan/dvb-t/fr-Brest | 9
+ util/scan/dvb-t/fr-Brive | 25
+ util/scan/dvb-t/fr-Caen | 25
+ util/scan/dvb-t/fr-Caen-Pincon | 25
+ util/scan/dvb-t/fr-Cannes | 25
+ util/scan/dvb-t/fr-Carcassonne | 25
+ util/scan/dvb-t/fr-Chambery | 30
+ util/scan/dvb-t/fr-Chartres | 25
+ util/scan/dvb-t/fr-Chennevieres | 25
+ util/scan/dvb-t/fr-Cherbourg | 25
+ util/scan/dvb-t/fr-ClermontFerrand | 25
+ util/scan/dvb-t/fr-Cluses | 23
+ util/scan/dvb-t/fr-Dieppe | 25
+ util/scan/dvb-t/fr-Dijon | 28
+ util/scan/dvb-t/fr-Dunkerque | 30
+ util/scan/dvb-t/fr-Epinal | 25
+ util/scan/dvb-t/fr-Evreux | 25
+ util/scan/dvb-t/fr-Forbach | 30
+ util/scan/dvb-t/fr-Gex | 30
+ util/scan/dvb-t/fr-Grenoble | 25
+ util/scan/dvb-t/fr-Gueret | 25
+ util/scan/dvb-t/fr-Hirson | 30
+ util/scan/dvb-t/fr-Hyeres | 25
+ util/scan/dvb-t/fr-LaRochelle | 25
+ util/scan/dvb-t/fr-Laval | 25
+ util/scan/dvb-t/fr-LeCreusot | 25
+ util/scan/dvb-t/fr-LeHavre | 25
+ util/scan/dvb-t/fr-LeMans | 21
+ util/scan/dvb-t/fr-LePuyEnVelay | 25
+ util/scan/dvb-t/fr-Lille | 30
+ util/scan/dvb-t/fr-Lille-Lambersart | 25
+ util/scan/dvb-t/fr-LilleT2 | 13
+ util/scan/dvb-t/fr-Limoges | 25
+ util/scan/dvb-t/fr-Longwy | 30
+ util/scan/dvb-t/fr-Lorient | 25
+ util/scan/dvb-t/fr-Lyon-Fourviere | 18
+ util/scan/dvb-t/fr-Lyon-Pilat | 17
+ util/scan/dvb-t/fr-Macon | 30
+ util/scan/dvb-t/fr-Mantes | 25
+ util/scan/dvb-t/fr-Marseille | 6
+ util/scan/dvb-t/fr-Maubeuge | 30
+ util/scan/dvb-t/fr-Meaux | 25
+ util/scan/dvb-t/fr-Mende | 25
+ util/scan/dvb-t/fr-Menton | 25
+ util/scan/dvb-t/fr-Metz | 30
+ util/scan/dvb-t/fr-Mezieres | 30
+ util/scan/dvb-t/fr-Montbeliard | 18
+ util/scan/dvb-t/fr-Montlucon | 25
+ util/scan/dvb-t/fr-Montpellier | 25
+ util/scan/dvb-t/fr-Mulhouse | 26
+ util/scan/dvb-t/fr-Nancy | 25
+ util/scan/dvb-t/fr-Nantes | 8
+ util/scan/dvb-t/fr-NeufchatelEnBray | 25
+ util/scan/dvb-t/fr-Nice | 25
+ util/scan/dvb-t/fr-Niort | 7
+ util/scan/dvb-t/fr-Orleans | 17
+ util/scan/dvb-t/fr-Paris | 19
+ util/scan/dvb-t/fr-Parthenay | 25
+ util/scan/dvb-t/fr-Perpignan | 25
+ util/scan/dvb-t/fr-Poitiers | 25
+ util/scan/dvb-t/fr-Privas | 25
+ util/scan/dvb-t/fr-Reims | 25
+ util/scan/dvb-t/fr-Rennes | 7
+ util/scan/dvb-t/fr-Roanne | 25
+ util/scan/dvb-t/fr-Rouen | 8
+ util/scan/dvb-t/fr-SaintEtienne | 25
+ util/scan/dvb-t/fr-SaintRaphael | 25
+ util/scan/dvb-t/fr-Sannois | 25
+ util/scan/dvb-t/fr-Sarrebourg | 30
+ util/scan/dvb-t/fr-Sens | 25
+ util/scan/dvb-t/fr-Strasbourg | 18
+ util/scan/dvb-t/fr-Toulon | 25
+ util/scan/dvb-t/fr-Toulouse | 8
+ util/scan/dvb-t/fr-Toulouse-Midi | 25
+ util/scan/dvb-t/fr-Tours | 25
+ util/scan/dvb-t/fr-Troyes | 25
+ util/scan/dvb-t/fr-Ussel | 25
+ util/scan/dvb-t/fr-Valence | 25
+ util/scan/dvb-t/fr-Valenciennes | 30
+ util/scan/dvb-t/fr-Vannes | 7
+ util/scan/dvb-t/fr-Villebon | 22
+ util/scan/dvb-t/fr-Vittel | 30
+ util/scan/dvb-t/fr-Voiron | 30
+ util/scan/dvb-t/gr-Athens | 3
+ util/scan/dvb-t/hk-HongKong | 18
+ util/scan/dvb-t/hr-Zagreb | 3
+ util/scan/dvb-t/is-Reykjavik | 13
+ util/scan/dvb-t/it-Aosta | 21
+ util/scan/dvb-t/it-Bari | 18
+ util/scan/dvb-t/it-Bologna | 28
+ util/scan/dvb-t/it-Bolzano | 5
+ util/scan/dvb-t/it-Cagliari | 23
+ util/scan/dvb-t/it-Caivano | 17
+ util/scan/dvb-t/it-Catania | 27
+ util/scan/dvb-t/it-Conero | 8
+ util/scan/dvb-t/it-Firenze | 20
+ util/scan/dvb-t/it-Genova | 12
+ util/scan/dvb-t/it-Livorno | 15
+ util/scan/dvb-t/it-Milano | 15
+ util/scan/dvb-t/it-Pagnacco | 27
+ util/scan/dvb-t/it-Palermo | 23
+ util/scan/dvb-t/it-Pescara | 15
+ util/scan/dvb-t/it-Pisa | 18
+ util/scan/dvb-t/it-Roma | 16
+ util/scan/dvb-t/it-S-Stefano_al_mare | 19
+ util/scan/dvb-t/it-Sassari | 33
+ util/scan/dvb-t/it-Torino | 13
+ util/scan/dvb-t/it-Trieste | 23
+ util/scan/dvb-t/it-Varese | 16
+ util/scan/dvb-t/it-Venezia | 19
+ util/scan/dvb-t/it-Verona | 19
+ util/scan/dvb-t/lu-All | 5
+ util/scan/dvb-t/lv-Riga | 25
+ util/scan/dvb-t/nl-All | 42
+ util/scan/dvb-t/nl-AlphenaandenRijn | 7
+ util/scan/dvb-t/nl-Randstad | 7
+ util/scan/dvb-t/no-Trondelag_Stjordal | 7
+ util/scan/dvb-t/nz-Waiatarua | 13
+ util/scan/dvb-t/pl-Rzeszow | 3
+ util/scan/dvb-t/pl-Warszawa | 4
+ util/scan/dvb-t/pl-Wroclaw | 3
+ util/scan/dvb-t/se-Alvdalen_Brunnsberg | 3
+ util/scan/dvb-t/se-Alvdalsasen | 3
+ util/scan/dvb-t/se-Alvsbyn | 7
+ util/scan/dvb-t/se-Amot | 3
+ util/scan/dvb-t/se-Ange_Snoberg | 6
+ util/scan/dvb-t/se-Angebo | 3
+ util/scan/dvb-t/se-Angelholm_Vegeholm | 7
+ util/scan/dvb-t/se-Arvidsjaur_Jultrask | 6
+ util/scan/dvb-t/se-Aspeboda | 3
+ util/scan/dvb-t/se-Atvidaberg | 4
+ util/scan/dvb-t/se-Avesta_Krylbo | 4
+ util/scan/dvb-t/se-Backefors | 7
+ util/scan/dvb-t/se-Bankeryd | 4
+ util/scan/dvb-t/se-Bergsjo_Balleberget | 3
+ util/scan/dvb-t/se-Bergvik | 3
+ util/scan/dvb-t/se-Bollebygd | 4
+ util/scan/dvb-t/se-Bollnas | 6
+ util/scan/dvb-t/se-Boras_Dalsjofors | 7
+ util/scan/dvb-t/se-Boras_Sjobo | 4
+ util/scan/dvb-t/se-Borlange_Idkerberget | 6
+ util/scan/dvb-t/se-Borlange_Nygardarna | 4
+ util/scan/dvb-t/se-Bottnaryd_Ryd | 3
+ util/scan/dvb-t/se-Bromsebro | 4
+ util/scan/dvb-t/se-Bruzaholm | 3
+ util/scan/dvb-t/se-Byxelkrok | 4
+ util/scan/dvb-t/se-Dadran | 3
+ util/scan/dvb-t/se-Dalfors | 3
+ util/scan/dvb-t/se-Dalstuga | 3
+ util/scan/dvb-t/se-Degerfors | 6
+ util/scan/dvb-t/se-Delary | 3
+ util/scan/dvb-t/se-Djura | 3
+ util/scan/dvb-t/se-Drevdagen | 3
+ util/scan/dvb-t/se-Duvnas | 3
+ util/scan/dvb-t/se-Duvnas_Basna | 3
+ util/scan/dvb-t/se-Edsbyn | 3
+ util/scan/dvb-t/se-Emmaboda_Balshult | 6
+ util/scan/dvb-t/se-Enviken | 4
+ util/scan/dvb-t/se-Fagersta | 4
+ util/scan/dvb-t/se-Falerum_Centrum | 3
+ util/scan/dvb-t/se-Falun_Lovberget | 6
+ util/scan/dvb-t/se-Farila | 3
+ util/scan/dvb-t/se-Faro_Ajkerstrask | 4
+ util/scan/dvb-t/se-Farosund_Bunge | 7
+ util/scan/dvb-t/se-Filipstad_Klockarhojden | 6
+ util/scan/dvb-t/se-Finnveden | 6
+ util/scan/dvb-t/se-Fredriksberg | 3
+ util/scan/dvb-t/se-Fritsla | 3
+ util/scan/dvb-t/se-Furudal | 3
+ util/scan/dvb-t/se-Gallivare | 6
+ util/scan/dvb-t/se-Garpenberg_Kuppgarden | 3
+ util/scan/dvb-t/se-Gavle | 6
+ util/scan/dvb-t/se-Gavle_Skogmur | 6
+ util/scan/dvb-t/se-Gnarp | 3
+ util/scan/dvb-t/se-Gnesta | 4
+ util/scan/dvb-t/se-Gnosjo_Marieholm | 3
+ util/scan/dvb-t/se-Goteborg_Brudaremossen | 7
+ util/scan/dvb-t/se-Goteborg_Slattadamm | 7
+ util/scan/dvb-t/se-Gullbrandstorp | 3
+ util/scan/dvb-t/se-Gunnarsbo | 3
+ util/scan/dvb-t/se-Gusum | 3
+ util/scan/dvb-t/se-Hagfors_Varmullsasen | 6
+ util/scan/dvb-t/se-Hallaryd | 3
+ util/scan/dvb-t/se-Hallbo | 3
+ util/scan/dvb-t/se-Halmstad_Hamnen | 4
+ util/scan/dvb-t/se-Halmstad_Oskarstrom | 6
+ util/scan/dvb-t/se-Harnosand_Harnon | 6
+ util/scan/dvb-t/se-Hassela | 3
+ util/scan/dvb-t/se-Havdhem | 7
+ util/scan/dvb-t/se-Hedemora | 3
+ util/scan/dvb-t/se-Helsingborg_Olympia | 7
+ util/scan/dvb-t/se-Hennan | 3
+ util/scan/dvb-t/se-Hestra_Aspas | 3
+ util/scan/dvb-t/se-Hjo_Grevback | 3
+ util/scan/dvb-t/se-Hofors | 6
+ util/scan/dvb-t/se-Hogfors | 3
+ util/scan/dvb-t/se-Hogsby_Virstad | 4
+ util/scan/dvb-t/se-Holsbybrunn_Holsbyholm | 3
+ util/scan/dvb-t/se-Horby_Sallerup | 7
+ util/scan/dvb-t/se-Horken | 3
+ util/scan/dvb-t/se-Hudiksvall_Forsa | 6
+ util/scan/dvb-t/se-Hudiksvall_Galgberget | 4
+ util/scan/dvb-t/se-Huskvarna | 3
+ util/scan/dvb-t/se-Idre | 3
+ util/scan/dvb-t/se-Ingatorp | 3
+ util/scan/dvb-t/se-Ingvallsbenning | 3
+ util/scan/dvb-t/se-Irevik | 4
+ util/scan/dvb-t/se-Jamjo | 4
+ util/scan/dvb-t/se-Jarnforsen | 3
+ util/scan/dvb-t/se-Jarvso | 3
+ util/scan/dvb-t/se-Jokkmokk_Tjalmejaure | 6
+ util/scan/dvb-t/se-Jonkoping_Bondberget | 6
+ util/scan/dvb-t/se-Kalix | 6
+ util/scan/dvb-t/se-Karbole | 3
+ util/scan/dvb-t/se-Karlsborg_Vaberget | 3
+ util/scan/dvb-t/se-Karlshamn | 6
+ util/scan/dvb-t/se-Karlskrona_Vamo | 6
+ util/scan/dvb-t/se-Karlstad_Sormon | 9
+ util/scan/dvb-t/se-Kaxholmen_Vistakulle | 3
+ util/scan/dvb-t/se-Kinnastrom | 3
+ util/scan/dvb-t/se-Kiruna_Kirunavaara | 6
+ util/scan/dvb-t/se-Kisa | 7
+ util/scan/dvb-t/se-Knared | 3
+ util/scan/dvb-t/se-Kopmanholmen | 6
+ util/scan/dvb-t/se-Kopparberg | 4
+ util/scan/dvb-t/se-Kramfors_Lugnvik | 6
+ util/scan/dvb-t/se-Kristinehamn_Utsiktsberget | 6
+ util/scan/dvb-t/se-Kungsater | 3
+ util/scan/dvb-t/se-Kungsberget_GI | 3
+ util/scan/dvb-t/se-Langshyttan | 3
+ util/scan/dvb-t/se-Langshyttan_Engelsfors | 3
+ util/scan/dvb-t/se-Leksand_Karingberget | 3
+ util/scan/dvb-t/se-Lerdala | 3
+ util/scan/dvb-t/se-Lilltjara_Digerberget | 3
+ util/scan/dvb-t/se-Limedsforsen | 3
+ util/scan/dvb-t/se-Lindshammar_Ramkvilla | 3
+ util/scan/dvb-t/se-Linkoping_Vattentornet | 7
+ util/scan/dvb-t/se-Ljugarn | 4
+ util/scan/dvb-t/se-Loffstrand | 6
+ util/scan/dvb-t/se-Lonneberga | 4
+ util/scan/dvb-t/se-Lorstrand | 3
+ util/scan/dvb-t/se-Ludvika_Bjorkasen | 4
+ util/scan/dvb-t/se-Lumsheden_Trekanten | 3
+ util/scan/dvb-t/se-Lycksele_Knaften | 6
+ util/scan/dvb-t/se-Mahult | 3
+ util/scan/dvb-t/se-Malmo_Jagersro | 7
+ util/scan/dvb-t/se-Malung | 4
+ util/scan/dvb-t/se-Mariannelund | 3
+ util/scan/dvb-t/se-Markaryd_Hualtet | 4
+ util/scan/dvb-t/se-Matfors | 6
+ util/scan/dvb-t/se-Molnbo_Tallstugan | 2
+ util/scan/dvb-t/se-Molndal_Vasterberget | 7
+ util/scan/dvb-t/se-Mora_Eldris | 6
+ util/scan/dvb-t/se-Motala_Ervasteby | 7
+ util/scan/dvb-t/se-Mullsjo_Torestorp | 4
+ util/scan/dvb-t/se-Nassjo | 6
+ util/scan/dvb-t/se-Navekvarn | 3
+ util/scan/dvb-t/se-Norrahammar | 3
+ util/scan/dvb-t/se-Norrkoping_Krokek | 7
+ util/scan/dvb-t/se-Norrtalje_Sodra_Bergen | 7
+ util/scan/dvb-t/se-Nykoping | 3
+ util/scan/dvb-t/se-Orebro_Lockhyttan | 7
+ util/scan/dvb-t/se-Ornskoldsvik_As | 6
+ util/scan/dvb-t/se-Oskarshamn | 6
+ util/scan/dvb-t/se-Ostersund_Brattasen | 7
+ util/scan/dvb-t/se-Osthammar_Valo | 7
+ util/scan/dvb-t/se-Overkalix | 6
+ util/scan/dvb-t/se-Oxberg | 3
+ util/scan/dvb-t/se-Pajala | 6
+ util/scan/dvb-t/se-Paulistom | 3
+ util/scan/dvb-t/se-Rattvik | 3
+ util/scan/dvb-t/se-Rengsjo | 3
+ util/scan/dvb-t/se-Rorbacksnas | 3
+ util/scan/dvb-t/se-Sagmyra | 3
+ util/scan/dvb-t/se-Salen | 3
+ util/scan/dvb-t/se-Salfjallet | 3
+ util/scan/dvb-t/se-Sarna_Mickeltemplet | 3
+ util/scan/dvb-t/se-Satila | 3
+ util/scan/dvb-t/se-Saxdalen | 3
+ util/scan/dvb-t/se-Siljansnas_Uvberget | 3
+ util/scan/dvb-t/se-Skarstad | 3
+ util/scan/dvb-t/se-Skattungbyn | 3
+ util/scan/dvb-t/se-Skelleftea | 6
+ util/scan/dvb-t/se-Skene_Nycklarberget | 3
+ util/scan/dvb-t/se-Skovde | 7
+ util/scan/dvb-t/se-Smedjebacken_Uvberget | 6
+ util/scan/dvb-t/se-Soderhamn | 4
+ util/scan/dvb-t/se-Soderkoping | 4
+ util/scan/dvb-t/se-Sodertalje_Ragnhildsborg | 8
+ util/scan/dvb-t/se-Solleftea_Hallsta | 6
+ util/scan/dvb-t/se-Solleftea_Multra | 6
+ util/scan/dvb-t/se-Sorsjon | 3
+ util/scan/dvb-t/se-Stockholm_Marieberg | 7
+ util/scan/dvb-t/se-Stockholm_Nacka | 8
+ util/scan/dvb-t/se-Stora_Skedvi | 3
+ util/scan/dvb-t/se-Storfjaten | 3
+ util/scan/dvb-t/se-Storuman | 6
+ util/scan/dvb-t/se-Stromstad | 7
+ util/scan/dvb-t/se-Styrsjobo | 3
+ util/scan/dvb-t/se-Sundborn | 3
+ util/scan/dvb-t/se-Sundsbruk | 6
+ util/scan/dvb-t/se-Sundsvall_S_Stadsberget | 7
+ util/scan/dvb-t/se-Sunne_Blabarskullen | 6
+ util/scan/dvb-t/se-Svartnas | 3
+ util/scan/dvb-t/se-Sveg_Brickan | 6
+ util/scan/dvb-t/se-Taberg | 3
+ util/scan/dvb-t/se-Tandadalen | 3
+ util/scan/dvb-t/se-Tasjo | 6
+ util/scan/dvb-t/se-Tollsjo | 3
+ util/scan/dvb-t/se-Torsby_Bada | 6
+ util/scan/dvb-t/se-Tranas_Bredkarr | 4
+ util/scan/dvb-t/se-Tranemo | 3
+ util/scan/dvb-t/se-Transtrand_Bolheden | 4
+ util/scan/dvb-t/se-Traryd_Betas | 4
+ util/scan/dvb-t/se-Trollhattan | 7
+ util/scan/dvb-t/se-Trosa | 4
+ util/scan/dvb-t/se-Tystberga | 3
+ util/scan/dvb-t/se-Uddevalla_Herrestad | 7
+ util/scan/dvb-t/se-Ullared | 3
+ util/scan/dvb-t/se-Ulricehamn | 4
+ util/scan/dvb-t/se-Ulvshyttan_Porjus | 3
+ util/scan/dvb-t/se-Uppsala_Rickomberga | 3
+ util/scan/dvb-t/se-Uppsala_Vedyxa | 7
+ util/scan/dvb-t/se-Vaddo_Elmsta | 4
+ util/scan/dvb-t/se-Valdemarsvik | 4
+ util/scan/dvb-t/se-Vannas_Granlundsberget | 6
+ util/scan/dvb-t/se-Vansbro_Hummelberget | 3
+ util/scan/dvb-t/se-Varberg_Grimeton | 6
+ util/scan/dvb-t/se-Vasteras_Lillharad | 7
+ util/scan/dvb-t/se-Vastervik_Farhult | 6
+ util/scan/dvb-t/se-Vaxbo | 3
+ util/scan/dvb-t/se-Vessigebro | 3
+ util/scan/dvb-t/se-Vetlanda_Nye | 3
+ util/scan/dvb-t/se-Vikmanshyttan | 3
+ util/scan/dvb-t/se-Virserum | 6
+ util/scan/dvb-t/se-Visby_Follingbo | 7
+ util/scan/dvb-t/se-Visby_Hamnen | 7
+ util/scan/dvb-t/se-Visingso | 3
+ util/scan/dvb-t/se-Vislanda_Nydala | 6
+ util/scan/dvb-t/se-Voxna | 3
+ util/scan/dvb-t/se-Ystad_Metallgatan | 7
+ util/scan/dvb-t/se-Yttermalung | 3
+ util/scan/dvb-t/sk-BanskaBystrica | 4
+ util/scan/dvb-t/sk-Bratislava | 4
+ util/scan/dvb-t/sk-Kosice | 4
+ util/scan/dvb-t/tw-Kaohsiung | 6
+ util/scan/dvb-t/tw-Taipei | 7
+ util/scan/dvb-t/uk-Aberdare | 10
+ util/scan/dvb-t/uk-Angus | 10
+ util/scan/dvb-t/uk-BeaconHill | 10
+ util/scan/dvb-t/uk-Belmont | 10
+ util/scan/dvb-t/uk-Bilsdale | 10
+ util/scan/dvb-t/uk-BlackHill | 11
+ util/scan/dvb-t/uk-Blaenplwyf | 10
+ util/scan/dvb-t/uk-BluebellHill | 10
+ util/scan/dvb-t/uk-Bressay | 10
+ util/scan/dvb-t/uk-BrierleyHill | 10
+ util/scan/dvb-t/uk-BristolIlchesterCres | 10
+ util/scan/dvb-t/uk-BristolKingsWeston | 10
+ util/scan/dvb-t/uk-Bromsgrove | 10
+ util/scan/dvb-t/uk-BrougherMountain | 10
+ util/scan/dvb-t/uk-Caldbeck | 10
+ util/scan/dvb-t/uk-CaradonHill | 10
+ util/scan/dvb-t/uk-Carmel | 10
+ util/scan/dvb-t/uk-Chatton | 10
+ util/scan/dvb-t/uk-Chesterfield | 10
+ util/scan/dvb-t/uk-Craigkelly | 10
+ util/scan/dvb-t/uk-CrystalPalace | 11
+ util/scan/dvb-t/uk-Darvel | 10
+ util/scan/dvb-t/uk-Divis | 10
+ util/scan/dvb-t/uk-Dover | 14
+ util/scan/dvb-t/uk-Durris | 10
+ util/scan/dvb-t/uk-Eitshal | 10
+ util/scan/dvb-t/uk-EmleyMoor | 10
+ util/scan/dvb-t/uk-Fenham | 10
+ util/scan/dvb-t/uk-Fenton | 10
+ util/scan/dvb-t/uk-Ferryside | 8
+ util/scan/dvb-t/uk-Guildford | 10
+ util/scan/dvb-t/uk-Hannington | 9
+ util/scan/dvb-t/uk-Hastings | 10
+ util/scan/dvb-t/uk-Heathfield | 10
+ util/scan/dvb-t/uk-HemelHempstead | 10
+ util/scan/dvb-t/uk-HuntshawCross | 13
+ util/scan/dvb-t/uk-Idle | 10
+ util/scan/dvb-t/uk-KeelylangHill | 10
+ util/scan/dvb-t/uk-Keighley | 10
+ util/scan/dvb-t/uk-KilveyHill | 10
+ util/scan/dvb-t/uk-KnockMore | 10
+ util/scan/dvb-t/uk-Lancaster | 10
+ util/scan/dvb-t/uk-LarkStoke | 10
+ util/scan/dvb-t/uk-Limavady | 10
+ util/scan/dvb-t/uk-Llanddona | 10
+ util/scan/dvb-t/uk-Malvern | 10
+ util/scan/dvb-t/uk-Mendip | 10
+ util/scan/dvb-t/uk-Midhurst | 10
+ util/scan/dvb-t/uk-Moel-y-Parc | 10
+ util/scan/dvb-t/uk-Nottingham | 10
+ util/scan/dvb-t/uk-OliversMount | 10
+ util/scan/dvb-t/uk-Oxford | 11
+ util/scan/dvb-t/uk-PendleForest | 10
+ util/scan/dvb-t/uk-Plympton | 10
+ util/scan/dvb-t/uk-PontopPike | 11
+ util/scan/dvb-t/uk-Pontypool | 10
+ util/scan/dvb-t/uk-Presely | 10
+ util/scan/dvb-t/uk-Redruth | 9
+ util/scan/dvb-t/uk-Reigate | 11
+ util/scan/dvb-t/uk-RidgeHill | 10
+ util/scan/dvb-t/uk-Rosemarkie | 10
+ util/scan/dvb-t/uk-Rosneath | 10
+ util/scan/dvb-t/uk-Rowridge | 11
+ util/scan/dvb-t/uk-RumsterForest | 10
+ util/scan/dvb-t/uk-Saddleworth | 10
+ util/scan/dvb-t/uk-Salisbury | 10
+ util/scan/dvb-t/uk-SandyHeath | 11
+ util/scan/dvb-t/uk-Selkirk | 10
+ util/scan/dvb-t/uk-Sheffield | 10
+ util/scan/dvb-t/uk-StocklandHill | 10
+ util/scan/dvb-t/uk-Storeton | 9
+ util/scan/dvb-t/uk-Sudbury | 12
+ util/scan/dvb-t/uk-SuttonColdfield | 10
+ util/scan/dvb-t/uk-Tacolneston | 10
+ util/scan/dvb-t/uk-TheWrekin | 15
+ util/scan/dvb-t/uk-Torosay | 10
+ util/scan/dvb-t/uk-TunbridgeWells | 10
+ util/scan/dvb-t/uk-Waltham | 10
+ util/scan/dvb-t/uk-Wenvoe | 10
+ util/scan/dvb-t/uk-WhitehawkHill | 10
+ util/scan/dvb-t/uk-WinterHill | 14
+ util/scan/dvb-t/vn-Hanoi | 5
+ util/scan/list.h | 6
+ util/scan/lnb.c | 1
+ util/scan/lnb.h | 2
+ util/scan/scan.c | 62
+ util/scan/scan.h | 1
+ util/scan/section_generate.pl | 92
+ util/szap/Makefile | 39
+ util/szap/README | 23
+ util/szap/azap.c | 8
+ util/szap/channels-conf/atsc/make_atsc_chanconf.pl | 110
+ util/szap/channels-conf/atsc/us-Raleigh-Durham | 8
+ util/szap/channels-conf/dvb-c/de-Berlin | 171
+ util/szap/channels-conf/dvb-s/Astra-19.2E | 226
+ util/szap/channels-conf/dvb-s/Astra-28.2E | 522 +
+ util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W | 39
+ util/szap/channels-conf/dvb-t/au-Adelaide | 28
+ util/szap/channels-conf/dvb-t/au-Brisbane | 29
+ util/szap/channels-conf/dvb-t/au-Hobart | 18
+ util/szap/channels-conf/dvb-t/au-Melbourne | 17
+ util/szap/channels-conf/dvb-t/au-Sydney-NorthShore | 31
+ util/szap/channels-conf/dvb-t/cz-Praha | 16
+ util/szap/channels-conf/dvb-t/de-Berlin | 47
+ util/szap/channels-conf/dvb-t/de-Braunschweig | 25
+ util/szap/channels-conf/dvb-t/de-Bremen | 25
+ util/szap/channels-conf/dvb-t/de-Koeln-Bonn | 23
+ util/szap/channels-conf/dvb-t/de-Leipzig | 7
+ util/szap/channels-conf/dvb-t/de-Luebeck | 22
+ util/szap/channels-conf/dvb-t/de-Rhein-Main | 6
+ util/szap/channels-conf/dvb-t/de-Ruhrgebiet | 46
+ util/szap/channels-conf/dvb-t/es-Alpicat | 19
+ util/szap/channels-conf/dvb-t/es-Collserola | 19
+ util/szap/channels-conf/dvb-t/es-Madrid | 26
+ util/szap/channels-conf/dvb-t/es-Mussara | 19
+ util/szap/channels-conf/dvb-t/uk-Crystal-Palace | 67
+ util/szap/channels-conf/dvb-t/uk-Hannington | 28
+ util/szap/channels-conf/dvb-t/uk-Oxford | 41
+ util/szap/channels-conf/dvb-t/uk-Reigate | 51
+ util/szap/channels-conf/dvb-t/uk-Sandy-Heath | 12
+ util/szap/channels.conf-dvbc-berlin | 171
+ util/szap/channels.conf-dvbs-astra | 226
+ util/szap/channels.conf-dvbt-australia | 31
+ util/szap/channels.conf-dvbt-berlin | 51
+ util/szap/channels.conf-dvbt-collserola | 25
+ util/szap/channels.conf-dvbt-crystal-palace | 70
+ util/szap/channels.conf-dvbt-hannington | 28
+ util/szap/channels.conf-dvbt-madrid | 16
+ util/szap/channels.conf-dvbt-oxford | 41
+ util/szap/channels.conf-dvbt-reigate | 51
+ util/szap/channels.conf-dvbt-sandy_heath | 13
+ util/szap/czap.c | 145
+ util/szap/femon.c | 149
+ util/szap/lnb.c | 101
+ util/szap/lnb.h | 22
+ util/szap/szap.c | 220
+ util/szap/tzap.c | 344
+ util/ttusb_dec_reset/Makefile | 28
+ util/ttusb_dec_reset/ttusb_dec_reset.c | 4
+ util/zap/Makefile | 20
+ util/zap/zap.c | 226
+ util/zap/zap_ca.c | 198
+ util/zap/zap_ca.h | 37
+ util/zap/zap_dvb.c | 353 +
+ util/zap/zap_dvb.h | 41
+ 1328 files changed, 71527 insertions(+), 3595 deletions(-)
+diff -Nurd linuxtv-dvb-apps-1.1.1/COPYING dvb-apps/COPYING
+--- linuxtv-dvb-apps-1.1.1/COPYING 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/COPYING 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,339 @@
++ GNU GENERAL PUBLIC LICENSE
++ Version 2, June 1991
++
++ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ Everyone is permitted to copy and distribute verbatim copies
++ of this license document, but changing it is not allowed.
++
++ Preamble
++
++ The licenses for most software are designed to take away your
++freedom to share and change it. By contrast, the GNU General Public
++License is intended to guarantee your freedom to share and change free
++software--to make sure the software is free for all its users. This
++General Public License applies to most of the Free Software
++Foundation's software and to any other program whose authors commit to
++using it. (Some other Free Software Foundation software is covered by
++the GNU Lesser General Public License instead.) You can apply it to
++your programs, too.
++
++ When we speak of free software, we are referring to freedom, not
++price. Our General Public Licenses are designed to make sure that you
++have the freedom to distribute copies of free software (and charge for
++this service if you wish), that you receive source code or can get it
++if you want it, that you can change the software or use pieces of it
++in new free programs; and that you know you can do these things.
++
++ To protect your rights, we need to make restrictions that forbid
++anyone to deny you these rights or to ask you to surrender the rights.
++These restrictions translate to certain responsibilities for you if you
++distribute copies of the software, or if you modify it.
++
++ For example, if you distribute copies of such a program, whether
++gratis or for a fee, you must give the recipients all the rights that
++you have. You must make sure that they, too, receive or can get the
++source code. And you must show them these terms so they know their
++rights.
++
++ We protect your rights with two steps: (1) copyright the software, and
++(2) offer you this license which gives you legal permission to copy,
++distribute and/or modify the software.
++
++ Also, for each author's protection and ours, we want to make certain
++that everyone understands that there is no warranty for this free
++software. If the software is modified by someone else and passed on, we
++want its recipients to know that what they have is not the original, so
++that any problems introduced by others will not reflect on the original
++authors' reputations.
++
++ Finally, any free program is threatened constantly by software
++patents. We wish to avoid the danger that redistributors of a free
++program will individually obtain patent licenses, in effect making the
++program proprietary. To prevent this, we have made it clear that any
++patent must be licensed for everyone's free use or not licensed at all.
++
++ The precise terms and conditions for copying, distribution and
++modification follow.
++
++ GNU GENERAL PUBLIC LICENSE
++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
++
++ 0. This License applies to any program or other work which contains
++a notice placed by the copyright holder saying it may be distributed
++under the terms of this General Public License. The "Program", below,
++refers to any such program or work, and a "work based on the Program"
++means either the Program or any derivative work under copyright law:
++that is to say, a work containing the Program or a portion of it,
++either verbatim or with modifications and/or translated into another
++language. (Hereinafter, translation is included without limitation in
++the term "modification".) Each licensee is addressed as "you".
++
++Activities other than copying, distribution and modification are not
++covered by this License; they are outside its scope. The act of
++running the Program is not restricted, and the output from the Program
++is covered only if its contents constitute a work based on the
++Program (independent of having been made by running the Program).
++Whether that is true depends on what the Program does.
++
++ 1. You may copy and distribute verbatim copies of the Program's
++source code as you receive it, in any medium, provided that you
++conspicuously and appropriately publish on each copy an appropriate
++copyright notice and disclaimer of warranty; keep intact all the
++notices that refer to this License and to the absence of any warranty;
++and give any other recipients of the Program a copy of this License
++along with the Program.
++
++You may charge a fee for the physical act of transferring a copy, and
++you may at your option offer warranty protection in exchange for a fee.
++
++ 2. You may modify your copy or copies of the Program or any portion
++of it, thus forming a work based on the Program, and copy and
++distribute such modifications or work under the terms of Section 1
++above, provided that you also meet all of these conditions:
++
++ a) You must cause the modified files to carry prominent notices
++ stating that you changed the files and the date of any change.
++
++ b) You must cause any work that you distribute or publish, that in
++ whole or in part contains or is derived from the Program or any
++ part thereof, to be licensed as a whole at no charge to all third
++ parties under the terms of this License.
++
++ c) If the modified program normally reads commands interactively
++ when run, you must cause it, when started running for such
++ interactive use in the most ordinary way, to print or display an
++ announcement including an appropriate copyright notice and a
++ notice that there is no warranty (or else, saying that you provide
++ a warranty) and that users may redistribute the program under
++ these conditions, and telling the user how to view a copy of this
++ License. (Exception: if the Program itself is interactive but
++ does not normally print such an announcement, your work based on
++ the Program is not required to print an announcement.)
++
++These requirements apply to the modified work as a whole. If
++identifiable sections of that work are not derived from the Program,
++and can be reasonably considered independent and separate works in
++themselves, then this License, and its terms, do not apply to those
++sections when you distribute them as separate works. But when you
++distribute the same sections as part of a whole which is a work based
++on the Program, the distribution of the whole must be on the terms of
++this License, whose permissions for other licensees extend to the
++entire whole, and thus to each and every part regardless of who wrote it.
++
++Thus, it is not the intent of this section to claim rights or contest
++your rights to work written entirely by you; rather, the intent is to
++exercise the right to control the distribution of derivative or
++collective works based on the Program.
++
++In addition, mere aggregation of another work not based on the Program
++with the Program (or with a work based on the Program) on a volume of
++a storage or distribution medium does not bring the other work under
++the scope of this License.
++
++ 3. You may copy and distribute the Program (or a work based on it,
++under Section 2) in object code or executable form under the terms of
++Sections 1 and 2 above provided that you also do one of the following:
++
++ a) Accompany it with the complete corresponding machine-readable
++ source code, which must be distributed under the terms of Sections
++ 1 and 2 above on a medium customarily used for software interchange; or,
++
++ b) Accompany it with a written offer, valid for at least three
++ years, to give any third party, for a charge no more than your
++ cost of physically performing source distribution, a complete
++ machine-readable copy of the corresponding source code, to be
++ distributed under the terms of Sections 1 and 2 above on a medium
++ customarily used for software interchange; or,
++
++ c) Accompany it with the information you received as to the offer
++ to distribute corresponding source code. (This alternative is
++ allowed only for noncommercial distribution and only if you
++ received the program in object code or executable form with such
++ an offer, in accord with Subsection b above.)
++
++The source code for a work means the preferred form of the work for
++making modifications to it. For an executable work, complete source
++code means all the source code for all modules it contains, plus any
++associated interface definition files, plus the scripts used to
++control compilation and installation of the executable. However, as a
++special exception, the source code distributed need not include
++anything that is normally distributed (in either source or binary
++form) with the major components (compiler, kernel, and so on) of the
++operating system on which the executable runs, unless that component
++itself accompanies the executable.
++
++If distribution of executable or object code is made by offering
++access to copy from a designated place, then offering equivalent
++access to copy the source code from the same place counts as
++distribution of the source code, even though third parties are not
++compelled to copy the source along with the object code.
++
++ 4. You may not copy, modify, sublicense, or distribute the Program
++except as expressly provided under this License. Any attempt
++otherwise to copy, modify, sublicense or distribute the Program is
++void, and will automatically terminate your rights under this License.
++However, parties who have received copies, or rights, from you under
++this License will not have their licenses terminated so long as such
++parties remain in full compliance.
++
++ 5. You are not required to accept this License, since you have not
++signed it. However, nothing else grants you permission to modify or
++distribute the Program or its derivative works. These actions are
++prohibited by law if you do not accept this License. Therefore, by
++modifying or distributing the Program (or any work based on the
++Program), you indicate your acceptance of this License to do so, and
++all its terms and conditions for copying, distributing or modifying
++the Program or works based on it.
++
++ 6. Each time you redistribute the Program (or any work based on the
++Program), the recipient automatically receives a license from the
++original licensor to copy, distribute or modify the Program subject to
++these terms and conditions. You may not impose any further
++restrictions on the recipients' exercise of the rights granted herein.
++You are not responsible for enforcing compliance by third parties to
++this License.
++
++ 7. If, as a consequence of a court judgment or allegation of patent
++infringement or for any other reason (not limited to patent issues),
++conditions are imposed on you (whether by court order, agreement or
++otherwise) that contradict the conditions of this License, they do not
++excuse you from the conditions of this License. If you cannot
++distribute so as to satisfy simultaneously your obligations under this
++License and any other pertinent obligations, then as a consequence you
++may not distribute the Program at all. For example, if a patent
++license would not permit royalty-free redistribution of the Program by
++all those who receive copies directly or indirectly through you, then
++the only way you could satisfy both it and this License would be to
++refrain entirely from distribution of the Program.
++
++If any portion of this section is held invalid or unenforceable under
++any particular circumstance, the balance of the section is intended to
++apply and the section as a whole is intended to apply in other
++circumstances.
++
++It is not the purpose of this section to induce you to infringe any
++patents or other property right claims or to contest validity of any
++such claims; this section has the sole purpose of protecting the
++integrity of the free software distribution system, which is
++implemented by public license practices. Many people have made
++generous contributions to the wide range of software distributed
++through that system in reliance on consistent application of that
++system; it is up to the author/donor to decide if he or she is willing
++to distribute software through any other system and a licensee cannot
++impose that choice.
++
++This section is intended to make thoroughly clear what is believed to
++be a consequence of the rest of this License.
++
++ 8. If the distribution and/or use of the Program is restricted in
++certain countries either by patents or by copyrighted interfaces, the
++original copyright holder who places the Program under this License
++may add an explicit geographical distribution limitation excluding
++those countries, so that distribution is permitted only in or among
++countries not thus excluded. In such case, this License incorporates
++the limitation as if written in the body of this License.
++
++ 9. The Free Software Foundation may publish revised and/or new versions
++of the General Public License from time to time. Such new versions will
++be similar in spirit to the present version, but may differ in detail to
++address new problems or concerns.
++
++Each version is given a distinguishing version number. If the Program
++specifies a version number of this License which applies to it and "any
++later version", you have the option of following the terms and conditions
++either of that version or of any later version published by the Free
++Software Foundation. If the Program does not specify a version number of
++this License, you may choose any version ever published by the Free Software
++Foundation.
++
++ 10. If you wish to incorporate parts of the Program into other free
++programs whose distribution conditions are different, write to the author
++to ask for permission. For software which is copyrighted by the Free
++Software Foundation, write to the Free Software Foundation; we sometimes
++make exceptions for this. Our decision will be guided by the two goals
++of preserving the free status of all derivatives of our free software and
++of promoting the sharing and reuse of software generally.
++
++ NO WARRANTY
++
++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
++REPAIR OR CORRECTION.
++
++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGES.
++
++ END OF TERMS AND CONDITIONS
++
++ How to Apply These Terms to Your New Programs
++
++ If you develop a new program, and you want it to be of the greatest
++possible use to the public, the best way to achieve this is to make it
++free software which everyone can redistribute and change under these terms.
++
++ To do so, attach the following notices to the program. It is safest
++to attach them to the start of each source file to most effectively
++convey the exclusion of warranty; and each file should have at least
++the "copyright" line and a pointer to where the full notice is found.
++
++ <one line to give the program's name and a brief idea of what it does.>
++ Copyright (C) <year> <name of author>
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License along
++ with this program; if not, write to the Free Software Foundation, Inc.,
++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++
++Also add information on how to contact you by electronic and paper mail.
++
++If the program is interactive, make it output a short notice like this
++when it starts in an interactive mode:
++
++ Gnomovision version 69, Copyright (C) year name of author
++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
++ This is free software, and you are welcome to redistribute it
++ under certain conditions; type `show c' for details.
++
++The hypothetical commands `show w' and `show c' should show the appropriate
++parts of the General Public License. Of course, the commands you use may
++be called something other than `show w' and `show c'; they could even be
++mouse-clicks or menu items--whatever suits your program.
++
++You should also get your employer (if you work as a programmer) or your
++school, if any, to sign a "copyright disclaimer" for the program, if
++necessary. Here is a sample; alter the names:
++
++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
++ `Gnomovision' (which makes passes at compilers) written by James Hacker.
++
++ <signature of Ty Coon>, 1 April 1989
++ Ty Coon, President of Vice
++
++This General Public License does not permit incorporating your program into
++proprietary programs. If your program is a subroutine library, you may
++consider it more useful to permit linking proprietary applications with the
++library. If this is what you want to do, use the GNU Lesser General
++Public License instead of this License.
+diff -Nurd linuxtv-dvb-apps-1.1.1/COPYING.LGPL dvb-apps/COPYING.LGPL
+--- linuxtv-dvb-apps-1.1.1/COPYING.LGPL 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/COPYING.LGPL 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,502 @@
++ GNU LESSER GENERAL PUBLIC LICENSE
++ Version 2.1, February 1999
++
++ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ Everyone is permitted to copy and distribute verbatim copies
++ of this license document, but changing it is not allowed.
++
++[This is the first released version of the Lesser GPL. It also counts
++ as the successor of the GNU Library Public License, version 2, hence
++ the version number 2.1.]
++
++ Preamble
++
++ The licenses for most software are designed to take away your
++freedom to share and change it. By contrast, the GNU General Public
++Licenses are intended to guarantee your freedom to share and change
++free software--to make sure the software is free for all its users.
++
++ This license, the Lesser General Public License, applies to some
++specially designated software packages--typically libraries--of the
++Free Software Foundation and other authors who decide to use it. You
++can use it too, but we suggest you first think carefully about whether
++this license or the ordinary General Public License is the better
++strategy to use in any particular case, based on the explanations below.
++
++ When we speak of free software, we are referring to freedom of use,
++not price. Our General Public Licenses are designed to make sure that
++you have the freedom to distribute copies of free software (and charge
++for this service if you wish); that you receive source code or can get
++it if you want it; that you can change the software and use pieces of
++it in new free programs; and that you are informed that you can do
++these things.
++
++ To protect your rights, we need to make restrictions that forbid
++distributors to deny you these rights or to ask you to surrender these
++rights. These restrictions translate to certain responsibilities for
++you if you distribute copies of the library or if you modify it.
++
++ For example, if you distribute copies of the library, whether gratis
++or for a fee, you must give the recipients all the rights that we gave
++you. You must make sure that they, too, receive or can get the source
++code. If you link other code with the library, you must provide
++complete object files to the recipients, so that they can relink them
++with the library after making changes to the library and recompiling
++it. And you must show them these terms so they know their rights.
++
++ We protect your rights with a two-step method: (1) we copyright the
++library, and (2) we offer you this license, which gives you legal
++permission to copy, distribute and/or modify the library.
++
++ To protect each distributor, we want to make it very clear that
++there is no warranty for the free library. Also, if the library is
++modified by someone else and passed on, the recipients should know
++that what they have is not the original version, so that the original
++author's reputation will not be affected by problems that might be
++introduced by others.
++
++ Finally, software patents pose a constant threat to the existence of
++any free program. We wish to make sure that a company cannot
++effectively restrict the users of a free program by obtaining a
++restrictive license from a patent holder. Therefore, we insist that
++any patent license obtained for a version of the library must be
++consistent with the full freedom of use specified in this license.
++
++ Most GNU software, including some libraries, is covered by the
++ordinary GNU General Public License. This license, the GNU Lesser
++General Public License, applies to certain designated libraries, and
++is quite different from the ordinary General Public License. We use
++this license for certain libraries in order to permit linking those
++libraries into non-free programs.
++
++ When a program is linked with a library, whether statically or using
++a shared library, the combination of the two is legally speaking a
++combined work, a derivative of the original library. The ordinary
++General Public License therefore permits such linking only if the
++entire combination fits its criteria of freedom. The Lesser General
++Public License permits more lax criteria for linking other code with
++the library.
++
++ We call this license the "Lesser" General Public License because it
++does Less to protect the user's freedom than the ordinary General
++Public License. It also provides other free software developers Less
++of an advantage over competing non-free programs. These disadvantages
++are the reason we use the ordinary General Public License for many
++libraries. However, the Lesser license provides advantages in certain
++special circumstances.
++
++ For example, on rare occasions, there may be a special need to
++encourage the widest possible use of a certain library, so that it becomes
++a de-facto standard. To achieve this, non-free programs must be
++allowed to use the library. A more frequent case is that a free
++library does the same job as widely used non-free libraries. In this
++case, there is little to gain by limiting the free library to free
++software only, so we use the Lesser General Public License.
++
++ In other cases, permission to use a particular library in non-free
++programs enables a greater number of people to use a large body of
++free software. For example, permission to use the GNU C Library in
++non-free programs enables many more people to use the whole GNU
++operating system, as well as its variant, the GNU/Linux operating
++system.
++
++ Although the Lesser General Public License is Less protective of the
++users' freedom, it does ensure that the user of a program that is
++linked with the Library has the freedom and the wherewithal to run
++that program using a modified version of the Library.
++
++ The precise terms and conditions for copying, distribution and
++modification follow. Pay close attention to the difference between a
++"work based on the library" and a "work that uses the library". The
++former contains code derived from the library, whereas the latter must
++be combined with the library in order to run.
++
++ GNU LESSER GENERAL PUBLIC LICENSE
++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
++
++ 0. This License Agreement applies to any software library or other
++program which contains a notice placed by the copyright holder or
++other authorized party saying it may be distributed under the terms of
++this Lesser General Public License (also called "this License").
++Each licensee is addressed as "you".
++
++ A "library" means a collection of software functions and/or data
++prepared so as to be conveniently linked with application programs
++(which use some of those functions and data) to form executables.
++
++ The "Library", below, refers to any such software library or work
++which has been distributed under these terms. A "work based on the
++Library" means either the Library or any derivative work under
++copyright law: that is to say, a work containing the Library or a
++portion of it, either verbatim or with modifications and/or translated
++straightforwardly into another language. (Hereinafter, translation is
++included without limitation in the term "modification".)
++
++ "Source code" for a work means the preferred form of the work for
++making modifications to it. For a library, complete source code means
++all the source code for all modules it contains, plus any associated
++interface definition files, plus the scripts used to control compilation
++and installation of the library.
++
++ Activities other than copying, distribution and modification are not
++covered by this License; they are outside its scope. The act of
++running a program using the Library is not restricted, and output from
++such a program is covered only if its contents constitute a work based
++on the Library (independent of the use of the Library in a tool for
++writing it). Whether that is true depends on what the Library does
++and what the program that uses the Library does.
++
++ 1. You may copy and distribute verbatim copies of the Library's
++complete source code as you receive it, in any medium, provided that
++you conspicuously and appropriately publish on each copy an
++appropriate copyright notice and disclaimer of warranty; keep intact
++all the notices that refer to this License and to the absence of any
++warranty; and distribute a copy of this License along with the
++Library.
++
++ You may charge a fee for the physical act of transferring a copy,
++and you may at your option offer warranty protection in exchange for a
++fee.
++
++ 2. You may modify your copy or copies of the Library or any portion
++of it, thus forming a work based on the Library, and copy and
++distribute such modifications or work under the terms of Section 1
++above, provided that you also meet all of these conditions:
++
++ a) The modified work must itself be a software library.
++
++ b) You must cause the files modified to carry prominent notices
++ stating that you changed the files and the date of any change.
++
++ c) You must cause the whole of the work to be licensed at no
++ charge to all third parties under the terms of this License.
++
++ d) If a facility in the modified Library refers to a function or a
++ table of data to be supplied by an application program that uses
++ the facility, other than as an argument passed when the facility
++ is invoked, then you must make a good faith effort to ensure that,
++ in the event an application does not supply such function or
++ table, the facility still operates, and performs whatever part of
++ its purpose remains meaningful.
++
++ (For example, a function in a library to compute square roots has
++ a purpose that is entirely well-defined independent of the
++ application. Therefore, Subsection 2d requires that any
++ application-supplied function or table used by this function must
++ be optional: if the application does not supply it, the square
++ root function must still compute square roots.)
++
++These requirements apply to the modified work as a whole. If
++identifiable sections of that work are not derived from the Library,
++and can be reasonably considered independent and separate works in
++themselves, then this License, and its terms, do not apply to those
++sections when you distribute them as separate works. But when you
++distribute the same sections as part of a whole which is a work based
++on the Library, the distribution of the whole must be on the terms of
++this License, whose permissions for other licensees extend to the
++entire whole, and thus to each and every part regardless of who wrote
++it.
++
++Thus, it is not the intent of this section to claim rights or contest
++your rights to work written entirely by you; rather, the intent is to
++exercise the right to control the distribution of derivative or
++collective works based on the Library.
++
++In addition, mere aggregation of another work not based on the Library
++with the Library (or with a work based on the Library) on a volume of
++a storage or distribution medium does not bring the other work under
++the scope of this License.
++
++ 3. You may opt to apply the terms of the ordinary GNU General Public
++License instead of this License to a given copy of the Library. To do
++this, you must alter all the notices that refer to this License, so
++that they refer to the ordinary GNU General Public License, version 2,
++instead of to this License. (If a newer version than version 2 of the
++ordinary GNU General Public License has appeared, then you can specify
++that version instead if you wish.) Do not make any other change in
++these notices.
++
++ Once this change is made in a given copy, it is irreversible for
++that copy, so the ordinary GNU General Public License applies to all
++subsequent copies and derivative works made from that copy.
++
++ This option is useful when you wish to copy part of the code of
++the Library into a program that is not a library.
++
++ 4. You may copy and distribute the Library (or a portion or
++derivative of it, under Section 2) in object code or executable form
++under the terms of Sections 1 and 2 above provided that you accompany
++it with the complete corresponding machine-readable source code, which
++must be distributed under the terms of Sections 1 and 2 above on a
++medium customarily used for software interchange.
++
++ If distribution of object code is made by offering access to copy
++from a designated place, then offering equivalent access to copy the
++source code from the same place satisfies the requirement to
++distribute the source code, even though third parties are not
++compelled to copy the source along with the object code.
++
++ 5. A program that contains no derivative of any portion of the
++Library, but is designed to work with the Library by being compiled or
++linked with it, is called a "work that uses the Library". Such a
++work, in isolation, is not a derivative work of the Library, and
++therefore falls outside the scope of this License.
++
++ However, linking a "work that uses the Library" with the Library
++creates an executable that is a derivative of the Library (because it
++contains portions of the Library), rather than a "work that uses the
++library". The executable is therefore covered by this License.
++Section 6 states terms for distribution of such executables.
++
++ When a "work that uses the Library" uses material from a header file
++that is part of the Library, the object code for the work may be a
++derivative work of the Library even though the source code is not.
++Whether this is true is especially significant if the work can be
++linked without the Library, or if the work is itself a library. The
++threshold for this to be true is not precisely defined by law.
++
++ If such an object file uses only numerical parameters, data
++structure layouts and accessors, and small macros and small inline
++functions (ten lines or less in length), then the use of the object
++file is unrestricted, regardless of whether it is legally a derivative
++work. (Executables containing this object code plus portions of the
++Library will still fall under Section 6.)
++
++ Otherwise, if the work is a derivative of the Library, you may
++distribute the object code for the work under the terms of Section 6.
++Any executables containing that work also fall under Section 6,
++whether or not they are linked directly with the Library itself.
++
++ 6. As an exception to the Sections above, you may also combine or
++link a "work that uses the Library" with the Library to produce a
++work containing portions of the Library, and distribute that work
++under terms of your choice, provided that the terms permit
++modification of the work for the customer's own use and reverse
++engineering for debugging such modifications.
++
++ You must give prominent notice with each copy of the work that the
++Library is used in it and that the Library and its use are covered by
++this License. You must supply a copy of this License. If the work
++during execution displays copyright notices, you must include the
++copyright notice for the Library among them, as well as a reference
++directing the user to the copy of this License. Also, you must do one
++of these things:
++
++ a) Accompany the work with the complete corresponding
++ machine-readable source code for the Library including whatever
++ changes were used in the work (which must be distributed under
++ Sections 1 and 2 above); and, if the work is an executable linked
++ with the Library, with the complete machine-readable "work that
++ uses the Library", as object code and/or source code, so that the
++ user can modify the Library and then relink to produce a modified
++ executable containing the modified Library. (It is understood
++ that the user who changes the contents of definitions files in the
++ Library will not necessarily be able to recompile the application
++ to use the modified definitions.)
++
++ b) Use a suitable shared library mechanism for linking with the
++ Library. A suitable mechanism is one that (1) uses at run time a
++ copy of the library already present on the user's computer system,
++ rather than copying library functions into the executable, and (2)
++ will operate properly with a modified version of the library, if
++ the user installs one, as long as the modified version is
++ interface-compatible with the version that the work was made with.
++
++ c) Accompany the work with a written offer, valid for at
++ least three years, to give the same user the materials
++ specified in Subsection 6a, above, for a charge no more
++ than the cost of performing this distribution.
++
++ d) If distribution of the work is made by offering access to copy
++ from a designated place, offer equivalent access to copy the above
++ specified materials from the same place.
++
++ e) Verify that the user has already received a copy of these
++ materials or that you have already sent this user a copy.
++
++ For an executable, the required form of the "work that uses the
++Library" must include any data and utility programs needed for
++reproducing the executable from it. However, as a special exception,
++the materials to be distributed need not include anything that is
++normally distributed (in either source or binary form) with the major
++components (compiler, kernel, and so on) of the operating system on
++which the executable runs, unless that component itself accompanies
++the executable.
++
++ It may happen that this requirement contradicts the license
++restrictions of other proprietary libraries that do not normally
++accompany the operating system. Such a contradiction means you cannot
++use both them and the Library together in an executable that you
++distribute.
++
++ 7. You may place library facilities that are a work based on the
++Library side-by-side in a single library together with other library
++facilities not covered by this License, and distribute such a combined
++library, provided that the separate distribution of the work based on
++the Library and of the other library facilities is otherwise
++permitted, and provided that you do these two things:
++
++ a) Accompany the combined library with a copy of the same work
++ based on the Library, uncombined with any other library
++ facilities. This must be distributed under the terms of the
++ Sections above.
++
++ b) Give prominent notice with the combined library of the fact
++ that part of it is a work based on the Library, and explaining
++ where to find the accompanying uncombined form of the same work.
++
++ 8. You may not copy, modify, sublicense, link with, or distribute
++the Library except as expressly provided under this License. Any
++attempt otherwise to copy, modify, sublicense, link with, or
++distribute the Library is void, and will automatically terminate your
++rights under this License. However, parties who have received copies,
++or rights, from you under this License will not have their licenses
++terminated so long as such parties remain in full compliance.
++
++ 9. You are not required to accept this License, since you have not
++signed it. However, nothing else grants you permission to modify or
++distribute the Library or its derivative works. These actions are
++prohibited by law if you do not accept this License. Therefore, by
++modifying or distributing the Library (or any work based on the
++Library), you indicate your acceptance of this License to do so, and
++all its terms and conditions for copying, distributing or modifying
++the Library or works based on it.
++
++ 10. Each time you redistribute the Library (or any work based on the
++Library), the recipient automatically receives a license from the
++original licensor to copy, distribute, link with or modify the Library
++subject to these terms and conditions. You may not impose any further
++restrictions on the recipients' exercise of the rights granted herein.
++You are not responsible for enforcing compliance by third parties with
++this License.
++
++ 11. If, as a consequence of a court judgment or allegation of patent
++infringement or for any other reason (not limited to patent issues),
++conditions are imposed on you (whether by court order, agreement or
++otherwise) that contradict the conditions of this License, they do not
++excuse you from the conditions of this License. If you cannot
++distribute so as to satisfy simultaneously your obligations under this
++License and any other pertinent obligations, then as a consequence you
++may not distribute the Library at all. For example, if a patent
++license would not permit royalty-free redistribution of the Library by
++all those who receive copies directly or indirectly through you, then
++the only way you could satisfy both it and this License would be to
++refrain entirely from distribution of the Library.
++
++If any portion of this section is held invalid or unenforceable under any
++particular circumstance, the balance of the section is intended to apply,
++and the section as a whole is intended to apply in other circumstances.
++
++It is not the purpose of this section to induce you to infringe any
++patents or other property right claims or to contest validity of any
++such claims; this section has the sole purpose of protecting the
++integrity of the free software distribution system which is
++implemented by public license practices. Many people have made
++generous contributions to the wide range of software distributed
++through that system in reliance on consistent application of that
++system; it is up to the author/donor to decide if he or she is willing
++to distribute software through any other system and a licensee cannot
++impose that choice.
++
++This section is intended to make thoroughly clear what is believed to
++be a consequence of the rest of this License.
++
++ 12. If the distribution and/or use of the Library is restricted in
++certain countries either by patents or by copyrighted interfaces, the
++original copyright holder who places the Library under this License may add
++an explicit geographical distribution limitation excluding those countries,
++so that distribution is permitted only in or among countries not thus
++excluded. In such case, this License incorporates the limitation as if
++written in the body of this License.
++
++ 13. The Free Software Foundation may publish revised and/or new
++versions of the Lesser General Public License from time to time.
++Such new versions will be similar in spirit to the present version,
++but may differ in detail to address new problems or concerns.
++
++Each version is given a distinguishing version number. If the Library
++specifies a version number of this License which applies to it and
++"any later version", you have the option of following the terms and
++conditions either of that version or of any later version published by
++the Free Software Foundation. If the Library does not specify a
++license version number, you may choose any version ever published by
++the Free Software Foundation.
++
++ 14. If you wish to incorporate parts of the Library into other free
++programs whose distribution conditions are incompatible with these,
++write to the author to ask for permission. For software which is
++copyrighted by the Free Software Foundation, write to the Free
++Software Foundation; we sometimes make exceptions for this. Our
++decision will be guided by the two goals of preserving the free status
++of all derivatives of our free software and of promoting the sharing
++and reuse of software generally.
++
++ NO WARRANTY
++
++ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
++WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
++EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
++OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
++KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
++IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
++LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
++THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
++
++ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
++WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
++AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
++FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
++CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
++LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
++RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
++FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
++SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
++DAMAGES.
++
++ END OF TERMS AND CONDITIONS
++
++ How to Apply These Terms to Your New Libraries
++
++ If you develop a new library, and you want it to be of the greatest
++possible use to the public, we recommend making it free software that
++everyone can redistribute and change. You can do so by permitting
++redistribution under these terms (or, alternatively, under the terms of the
++ordinary General Public License).
++
++ To apply these terms, attach the following notices to the library. It is
++safest to attach them to the start of each source file to most effectively
++convey the exclusion of warranty; and each file should have at least the
++"copyright" line and a pointer to where the full notice is found.
++
++ <one line to give the library's name and a brief idea of what it does.>
++ Copyright (C) <year> <name of author>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++
++Also add information on how to contact you by electronic and paper mail.
++
++You should also get your employer (if you work as a programmer) or your
++school, if any, to sign a "copyright disclaimer" for the library, if
++necessary. Here is a sample; alter the names:
++
++ Yoyodyne, Inc., hereby disclaims all copyright interest in the
++ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
++
++ <signature of Ty Coon>, 1 April 1990
++ Ty Coon, President of Vice
++
++That's all there is to it!
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/audio.h dvb-apps/include/audio.h
+--- linuxtv-dvb-apps-1.1.1/include/audio.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/include/audio.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,140 @@
++/*
++ * audio.h
++ *
++ * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
++ * & Marcus Metzler <marcus@convergence.de>
++ * for convergence integrated media GmbH
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Lesser Public License
++ * as published by the Free Software Foundation; either version 2.1
++ * 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 Lesser 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 _DVBAUDIO_H_
++#define _DVBAUDIO_H_
++
++#ifdef __KERNEL__
++#include <linux/types.h>
++#else
++#include <stdint.h>
++#endif
++
++
++typedef enum {
++ AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
++ AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */
++} audio_stream_source_t;
++
++
++typedef enum {
++ AUDIO_STOPPED, /* Device is stopped */
++ AUDIO_PLAYING, /* Device is currently playing */
++ AUDIO_PAUSED /* Device is paused */
++} audio_play_state_t;
++
++
++typedef enum {
++ AUDIO_STEREO,
++ AUDIO_MONO_LEFT,
++ AUDIO_MONO_RIGHT,
++ AUDIO_MONO,
++ AUDIO_STEREO_SWAPPED
++} audio_channel_select_t;
++
++
++typedef struct audio_mixer {
++ unsigned int volume_left;
++ unsigned int volume_right;
++ // what else do we need? bass, pass-through, ...
++} audio_mixer_t;
++
++
++typedef struct audio_status {
++ int AV_sync_state; /* sync audio and video? */
++ int mute_state; /* audio is muted */
++ audio_play_state_t play_state; /* current playback state */
++ audio_stream_source_t stream_source; /* current stream source */
++ audio_channel_select_t channel_select; /* currently selected channel */
++ int bypass_mode; /* pass on audio data to */
++ audio_mixer_t mixer_state; /* current mixer state */
++} audio_status_t; /* separate decoder hardware */
++
++
++typedef
++struct audio_karaoke{ /* if Vocal1 or Vocal2 are non-zero, they get mixed */
++ int vocal1; /* into left and right t at 70% each */
++ int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
++ int melody; /* mixed into the left channel and */
++ /* Vocal2 into the right channel at 100% each. */
++ /* if Melody is non-zero, the melody channel gets mixed*/
++} audio_karaoke_t; /* into left and right */
++
++
++typedef uint16_t audio_attributes_t;
++/* bits: descr. */
++/* 15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, */
++/* 12 multichannel extension */
++/* 11-10 audio type (0=not spec, 1=language included) */
++/* 9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) */
++/* 7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit, */
++/* 5- 4 Sample frequency fs (0=48kHz, 1=96kHz) */
++/* 2- 0 number of audio channels (n+1 channels) */
++
++
++/* for GET_CAPABILITIES and SET_FORMAT, the latter should only set one bit */
++#define AUDIO_CAP_DTS 1
++#define AUDIO_CAP_LPCM 2
++#define AUDIO_CAP_MP1 4
++#define AUDIO_CAP_MP2 8
++#define AUDIO_CAP_MP3 16
++#define AUDIO_CAP_AAC 32
++#define AUDIO_CAP_OGG 64
++#define AUDIO_CAP_SDDS 128
++#define AUDIO_CAP_AC3 256
++
++#define AUDIO_STOP _IO('o', 1)
++#define AUDIO_PLAY _IO('o', 2)
++#define AUDIO_PAUSE _IO('o', 3)
++#define AUDIO_CONTINUE _IO('o', 4)
++#define AUDIO_SELECT_SOURCE _IO('o', 5)
++#define AUDIO_SET_MUTE _IO('o', 6)
++#define AUDIO_SET_AV_SYNC _IO('o', 7)
++#define AUDIO_SET_BYPASS_MODE _IO('o', 8)
++#define AUDIO_CHANNEL_SELECT _IO('o', 9)
++#define AUDIO_GET_STATUS _IOR('o', 10, audio_status_t)
++
++#define AUDIO_GET_CAPABILITIES _IOR('o', 11, unsigned int)
++#define AUDIO_CLEAR_BUFFER _IO('o', 12)
++#define AUDIO_SET_ID _IO('o', 13)
++#define AUDIO_SET_MIXER _IOW('o', 14, audio_mixer_t)
++#define AUDIO_SET_STREAMTYPE _IO('o', 15)
++#define AUDIO_SET_EXT_ID _IO('o', 16)
++#define AUDIO_SET_ATTRIBUTES _IOW('o', 17, audio_attributes_t)
++#define AUDIO_SET_KARAOKE _IOW('o', 18, audio_karaoke_t)
++
++/**
++ * AUDIO_GET_PTS
++ *
++ * Read the 33 bit presentation time stamp as defined
++ * in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
++ *
++ * The PTS should belong to the currently played
++ * frame if possible, but may also be a value close to it
++ * like the PTS of the last decoded frame or the last PTS
++ * extracted by the PES parser.
++ */
++#define AUDIO_GET_PTS _IOR('o', 19, __u64)
++#define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20)
++
++#endif /* _DVBAUDIO_H_ */
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/ca.h dvb-apps/include/ca.h
+--- linuxtv-dvb-apps-1.1.1/include/ca.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/include/ca.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,90 @@
++/*
++ * ca.h
++ *
++ * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
++ * & Marcus Metzler <marcus@convergence.de>
++ * for convergence integrated media GmbH
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Lesser Public License
++ * as published by the Free Software Foundation; either version 2.1
++ * 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 Lesser 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 _DVBCA_H_
++#define _DVBCA_H_
++
++/* slot interface types and info */
++
++typedef struct ca_slot_info {
++ int num; /* slot number */
++
++ int type; /* CA interface this slot supports */
++#define CA_CI 1 /* CI high level interface */
++#define CA_CI_LINK 2 /* CI link layer level interface */
++#define CA_CI_PHYS 4 /* CI physical layer level interface */
++#define CA_DESCR 8 /* built-in descrambler */
++#define CA_SC 128 /* simple smart card interface */
++
++ unsigned int flags;
++#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
++#define CA_CI_MODULE_READY 2
++} ca_slot_info_t;
++
++
++/* descrambler types and info */
++
++typedef struct ca_descr_info {
++ unsigned int num; /* number of available descramblers (keys) */
++ unsigned int type; /* type of supported scrambling system */
++#define CA_ECD 1
++#define CA_NDS 2
++#define CA_DSS 4
++} ca_descr_info_t;
++
++typedef struct ca_caps {
++ unsigned int slot_num; /* total number of CA card and module slots */
++ unsigned int slot_type; /* OR of all supported types */
++ unsigned int descr_num; /* total number of descrambler slots (keys) */
++ unsigned int descr_type; /* OR of all supported types */
++} ca_caps_t;
++
++/* a message to/from a CI-CAM */
++typedef struct ca_msg {
++ unsigned int index;
++ unsigned int type;
++ unsigned int length;
++ unsigned char msg[256];
++} ca_msg_t;
++
++typedef struct ca_descr {
++ unsigned int index;
++ unsigned int parity; /* 0 == even, 1 == odd */
++ unsigned char cw[8];
++} ca_descr_t;
++
++typedef struct ca_pid {
++ unsigned int pid;
++ int index; /* -1 == disable*/
++} ca_pid_t;
++
++#define CA_RESET _IO('o', 128)
++#define CA_GET_CAP _IOR('o', 129, ca_caps_t)
++#define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t)
++#define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t)
++#define CA_GET_MSG _IOR('o', 132, ca_msg_t)
++#define CA_SEND_MSG _IOW('o', 133, ca_msg_t)
++#define CA_SET_DESCR _IOW('o', 134, ca_descr_t)
++#define CA_SET_PID _IOW('o', 135, ca_pid_t)
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/dmx.h dvb-apps/include/dmx.h
+--- linuxtv-dvb-apps-1.1.1/include/dmx.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/include/dmx.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,154 @@
++/*
++ * dmx.h
++ *
++ * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
++ * & Ralph Metzler <ralph@convergence.de>
++ * for convergence integrated media GmbH
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public License
++ * as published by the Free Software Foundation; either version 2.1
++ * of the License, or (at your option) any later version.
++ *
++ * This 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 Lesser 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 _DVBDMX_H_
++#define _DVBDMX_H_
++
++#include <asm/types.h>
++#ifdef __KERNEL__
++#include <linux/time.h>
++#else
++#include <time.h>
++#endif
++
++
++#define DMX_FILTER_SIZE 16
++
++typedef enum
++{
++ DMX_OUT_DECODER, /* Streaming directly to decoder. */
++ DMX_OUT_TAP, /* Output going to a memory buffer */
++ /* (to be retrieved via the read command).*/
++ DMX_OUT_TS_TAP /* Output multiplexed into a new TS */
++ /* (to be retrieved by reading from the */
++ /* logical DVR device). */
++} dmx_output_t;
++
++
++typedef enum
++{
++ DMX_IN_FRONTEND, /* Input from a front-end device. */
++ DMX_IN_DVR /* Input from the logical DVR device. */
++} dmx_input_t;
++
++
++typedef enum
++{
++ DMX_PES_AUDIO0,
++ DMX_PES_VIDEO0,
++ DMX_PES_TELETEXT0,
++ DMX_PES_SUBTITLE0,
++ DMX_PES_PCR0,
++
++ DMX_PES_AUDIO1,
++ DMX_PES_VIDEO1,
++ DMX_PES_TELETEXT1,
++ DMX_PES_SUBTITLE1,
++ DMX_PES_PCR1,
++
++ DMX_PES_AUDIO2,
++ DMX_PES_VIDEO2,
++ DMX_PES_TELETEXT2,
++ DMX_PES_SUBTITLE2,
++ DMX_PES_PCR2,
++
++ DMX_PES_AUDIO3,
++ DMX_PES_VIDEO3,
++ DMX_PES_TELETEXT3,
++ DMX_PES_SUBTITLE3,
++ DMX_PES_PCR3,
++
++ DMX_PES_OTHER
++} dmx_pes_type_t;
++
++#define DMX_PES_AUDIO DMX_PES_AUDIO0
++#define DMX_PES_VIDEO DMX_PES_VIDEO0
++#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
++#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
++#define DMX_PES_PCR DMX_PES_PCR0
++
++
++typedef struct dmx_filter
++{
++ __u8 filter[DMX_FILTER_SIZE];
++ __u8 mask[DMX_FILTER_SIZE];
++ __u8 mode[DMX_FILTER_SIZE];
++} dmx_filter_t;
++
++
++struct dmx_sct_filter_params
++{
++ __u16 pid;
++ dmx_filter_t filter;
++ __u32 timeout;
++ __u32 flags;
++#define DMX_CHECK_CRC 1
++#define DMX_ONESHOT 2
++#define DMX_IMMEDIATE_START 4
++#define DMX_KERNEL_CLIENT 0x8000
++};
++
++
++struct dmx_pes_filter_params
++{
++ __u16 pid;
++ dmx_input_t input;
++ dmx_output_t output;
++ dmx_pes_type_t pes_type;
++ __u32 flags;
++};
++
++typedef struct dmx_caps {
++ __u32 caps;
++ int num_decoders;
++} dmx_caps_t;
++
++typedef enum {
++ DMX_SOURCE_FRONT0 = 0,
++ DMX_SOURCE_FRONT1,
++ DMX_SOURCE_FRONT2,
++ DMX_SOURCE_FRONT3,
++ DMX_SOURCE_DVR0 = 16,
++ DMX_SOURCE_DVR1,
++ DMX_SOURCE_DVR2,
++ DMX_SOURCE_DVR3
++} dmx_source_t;
++
++struct dmx_stc {
++ unsigned int num; /* input : which STC? 0..N */
++ unsigned int base; /* output: divisor for stc to get 90 kHz clock */
++ __u64 stc; /* output: stc in 'base'*90 kHz units */
++};
++
++
++#define DMX_START _IO('o', 41)
++#define DMX_STOP _IO('o', 42)
++#define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
++#define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params)
++#define DMX_SET_BUFFER_SIZE _IO('o', 45)
++#define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5])
++#define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t)
++#define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t)
++#define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
++
++#endif /*_DVBDMX_H_*/
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/frontend.h dvb-apps/include/frontend.h
+--- linuxtv-dvb-apps-1.1.1/include/frontend.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/include/frontend.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,648 @@
++/*
++ * frontend.h
++ *
++ * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
++ * Ralph Metzler <ralph@convergence.de>
++ * Holger Waechtler <holger@convergence.de>
++ * Andre Draszik <ad@convergence.de>
++ * for convergence integrated media GmbH
++ *
++ * Copyright (C) Manu Abraham <abraham.manu@gmail.com>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public License
++ * as published by the Free Software Foundation; either version 2.1
++ * of the License, or (at your option) any later version.
++ *
++ * This 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 Lesser 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 _DVBFRONTEND_H_
++#define _DVBFRONTEND_H_
++
++#include <asm/types.h>
++
++
++typedef enum fe_type {
++ FE_QPSK,
++ FE_QAM,
++ FE_OFDM,
++ FE_ATSC
++} fe_type_t;
++
++
++typedef enum fe_caps {
++ FE_IS_STUPID = 0,
++ FE_CAN_INVERSION_AUTO = 0x1,
++ FE_CAN_FEC_1_2 = 0x2,
++ FE_CAN_FEC_2_3 = 0x4,
++ FE_CAN_FEC_3_4 = 0x8,
++ FE_CAN_FEC_4_5 = 0x10,
++ FE_CAN_FEC_5_6 = 0x20,
++ FE_CAN_FEC_6_7 = 0x40,
++ FE_CAN_FEC_7_8 = 0x80,
++ FE_CAN_FEC_8_9 = 0x100,
++ FE_CAN_FEC_AUTO = 0x200,
++ FE_CAN_QPSK = 0x400,
++ FE_CAN_QAM_16 = 0x800,
++ FE_CAN_QAM_32 = 0x1000,
++ FE_CAN_QAM_64 = 0x2000,
++ FE_CAN_QAM_128 = 0x4000,
++ FE_CAN_QAM_256 = 0x8000,
++ FE_CAN_QAM_AUTO = 0x10000,
++ FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
++ FE_CAN_BANDWIDTH_AUTO = 0x40000,
++ FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
++ FE_CAN_HIERARCHY_AUTO = 0x100000,
++ FE_CAN_8VSB = 0x200000,
++ FE_CAN_16VSB = 0x400000,
++ FE_NEEDS_BENDING = 0x20000000, // not supported anymore, don't use (frontend requires frequency bending)
++ FE_CAN_RECOVER = 0x40000000, // frontend can recover from a cable unplug automatically
++ FE_CAN_MUTE_TS = 0x80000000 // frontend can stop spurious TS data output
++} fe_caps_t;
++
++
++struct dvb_frontend_info {
++ char name[128];
++ fe_type_t type;
++ __u32 frequency_min;
++ __u32 frequency_max;
++ __u32 frequency_stepsize;
++ __u32 frequency_tolerance;
++ __u32 symbol_rate_min;
++ __u32 symbol_rate_max;
++ __u32 symbol_rate_tolerance; /* ppm */
++ __u32 notifier_delay; /* DEPRECATED */
++ fe_caps_t caps;
++};
++
++
++/**
++ * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
++ * the meaning of this struct...
++ */
++struct dvb_diseqc_master_cmd {
++ __u8 msg [6]; /* { framing, address, command, data [3] } */
++ __u8 msg_len; /* valid values are 3...6 */
++};
++
++
++struct dvb_diseqc_slave_reply {
++ __u8 msg [4]; /* { framing, data [3] } */
++ __u8 msg_len; /* valid values are 0...4, 0 means no msg */
++ int timeout; /* return from ioctl after timeout ms with */
++}; /* errorcode when no message was received */
++
++
++typedef enum fe_sec_voltage {
++ SEC_VOLTAGE_13,
++ SEC_VOLTAGE_18,
++ SEC_VOLTAGE_OFF
++} fe_sec_voltage_t;
++
++
++typedef enum fe_sec_tone_mode {
++ SEC_TONE_ON,
++ SEC_TONE_OFF
++} fe_sec_tone_mode_t;
++
++
++typedef enum fe_sec_mini_cmd {
++ SEC_MINI_A,
++ SEC_MINI_B
++} fe_sec_mini_cmd_t;
++
++
++typedef enum fe_status {
++ FE_HAS_SIGNAL = 0x01, /* found something above the noise level */
++ FE_HAS_CARRIER = 0x02, /* found a DVB signal */
++ FE_HAS_VITERBI = 0x04, /* FEC is stable */
++ FE_HAS_SYNC = 0x08, /* found sync bytes */
++ FE_HAS_LOCK = 0x10, /* everything's working... */
++ FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */
++ FE_REINIT = 0x40 /* frontend was reinitialized, */
++} fe_status_t; /* application is recommended to reset */
++ /* DiSEqC, tone and parameters */
++
++typedef enum fe_spectral_inversion {
++ INVERSION_OFF,
++ INVERSION_ON,
++ INVERSION_AUTO
++} fe_spectral_inversion_t;
++
++
++typedef enum fe_code_rate {
++ FEC_NONE = 0,
++ FEC_1_2,
++ FEC_2_3,
++ FEC_3_4,
++ FEC_4_5,
++ FEC_5_6,
++ FEC_6_7,
++ FEC_7_8,
++ FEC_8_9,
++ FEC_AUTO
++} fe_code_rate_t;
++
++
++typedef enum fe_modulation {
++ QPSK,
++ QAM_16,
++ QAM_32,
++ QAM_64,
++ QAM_128,
++ QAM_256,
++ QAM_AUTO,
++ VSB_8,
++ VSB_16
++} fe_modulation_t;
++
++typedef enum fe_transmit_mode {
++ TRANSMISSION_MODE_2K,
++ TRANSMISSION_MODE_8K,
++ TRANSMISSION_MODE_AUTO
++} fe_transmit_mode_t;
++
++typedef enum fe_bandwidth {
++ BANDWIDTH_8_MHZ,
++ BANDWIDTH_7_MHZ,
++ BANDWIDTH_6_MHZ,
++ BANDWIDTH_AUTO
++} fe_bandwidth_t;
++
++
++typedef enum fe_guard_interval {
++ GUARD_INTERVAL_1_32,
++ GUARD_INTERVAL_1_16,
++ GUARD_INTERVAL_1_8,
++ GUARD_INTERVAL_1_4,
++ GUARD_INTERVAL_AUTO
++} fe_guard_interval_t;
++
++
++typedef enum fe_hierarchy {
++ HIERARCHY_NONE,
++ HIERARCHY_1,
++ HIERARCHY_2,
++ HIERARCHY_4,
++ HIERARCHY_AUTO
++} fe_hierarchy_t;
++
++
++struct dvb_qpsk_parameters {
++ __u32 symbol_rate; /* symbol rate in Symbols per second */
++ fe_code_rate_t fec_inner; /* forward error correction (see above) */
++};
++
++struct dvb_qam_parameters {
++ __u32 symbol_rate; /* symbol rate in Symbols per second */
++ fe_code_rate_t fec_inner; /* forward error correction (see above) */
++ fe_modulation_t modulation; /* modulation type (see above) */
++};
++
++struct dvb_vsb_parameters {
++ fe_modulation_t modulation; /* modulation type (see above) */
++};
++
++struct dvb_ofdm_parameters {
++ fe_bandwidth_t bandwidth;
++ fe_code_rate_t code_rate_HP; /* high priority stream code rate */
++ fe_code_rate_t code_rate_LP; /* low priority stream code rate */
++ fe_modulation_t constellation; /* modulation type (see above) */
++ fe_transmit_mode_t transmission_mode;
++ fe_guard_interval_t guard_interval;
++ fe_hierarchy_t hierarchy_information;
++};
++
++
++struct dvb_frontend_parameters {
++ __u32 frequency; /* (absolute) frequency in Hz for QAM/OFDM/ATSC */
++ /* intermediate frequency in kHz for QPSK */
++ fe_spectral_inversion_t inversion;
++ union {
++ struct dvb_qpsk_parameters qpsk;
++ struct dvb_qam_parameters qam;
++ struct dvb_ofdm_parameters ofdm;
++ struct dvb_vsb_parameters vsb;
++ } u;
++};
++
++
++/**
++ * When set, this flag will disable any zigzagging or other "normal" tuning
++ * behaviour. Additionally, there will be no automatic monitoring of the lock
++ * status, and hence no frontend events will be generated. If a frontend device
++ * is closed, this flag will be automatically turned off when the device is
++ * reopened read-write.
++ */
++#define FE_TUNE_MODE_ONESHOT 0x01
++
++
++#define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info)
++
++#define FE_DISEQC_RESET_OVERLOAD _IO('o', 62)
++#define FE_DISEQC_SEND_MASTER_CMD _IOW('o', 63, struct dvb_diseqc_master_cmd)
++#define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
++#define FE_DISEQC_SEND_BURST _IO('o', 65) /* fe_sec_mini_cmd_t */
++
++#define FE_SET_TONE _IO('o', 66) /* fe_sec_tone_mode_t */
++#define FE_SET_VOLTAGE _IO('o', 67) /* fe_sec_voltage_t */
++#define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */
++
++#define FE_READ_STATUS _IOR('o', 69, fe_status_t)
++#define FE_READ_BER _IOR('o', 70, __u32)
++#define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16)
++#define FE_READ_SNR _IOR('o', 72, __u16)
++#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
++
++#define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters)
++#define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters)
++#define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */
++
++#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
++
++/*
++ * References:
++ * DVB-S : EN 300 421
++ * DVB-S2: EN 302 307, TR 102 376, EN 301 210
++ * DVB-C : EN 300 429
++ * DVB-T : EN 300 744
++ * DVB-H : EN 300 304
++ * ATSC : A/53A
++ */
++
++/*
++ * Delivery Systems
++ * needs to set/queried for multistandard frontends
++ */
++enum dvbfe_delsys {
++ DVBFE_DELSYS_DVBS = (1 << 0),
++ DVBFE_DELSYS_DSS = (1 << 1),
++ DVBFE_DELSYS_DVBS2 = (1 << 2),
++ DVBFE_DELSYS_DVBC = (1 << 3),
++ DVBFE_DELSYS_DVBT = (1 << 4),
++ DVBFE_DELSYS_DVBH = (1 << 5),
++ DVBFE_DELSYS_ATSC = (1 << 6),
++ DVBFE_DELSYS_DUMMY = (1 << 31)
++};
++#define DVBFE_GET_DELSYS _IOR('o', 82, enum dvbfe_delsys)
++#define DVBFE_SET_DELSYS _IOW('o', 87, enum dvbfe_delsys)
++
++/* Modulation types */
++enum dvbfe_modulation {
++ DVBFE_MOD_NONE = (0 << 0),
++ DVBFE_MOD_BPSK = (1 << 0),
++ DVBFE_MOD_QPSK = (1 << 1),
++ DVBFE_MOD_OQPSK = (1 << 2),
++ DVBFE_MOD_8PSK = (1 << 3),
++ DVBFE_MOD_16APSK = (1 << 4),
++ DVBFE_MOD_32APSK = (1 << 5),
++ DVBFE_MOD_QAM4 = (1 << 6),
++ DVBFE_MOD_QAM16 = (1 << 7),
++ DVBFE_MOD_QAM32 = (1 << 8),
++ DVBFE_MOD_QAM64 = (1 << 9),
++ DVBFE_MOD_QAM128 = (1 << 10),
++ DVBFE_MOD_QAM256 = (1 << 11),
++ DVBFE_MOD_QAM512 = (1 << 12),
++ DVBFE_MOD_QAM1024 = (1 << 13),
++ DVBFE_MOD_QAMAUTO = (1 << 14),
++ DVBFE_MOD_OFDM = (1 << 15),
++ DVBFE_MOD_COFDM = (1 << 16),
++ DVBFE_MOD_VSB8 = (1 << 17),
++ DVBFE_MOD_VSB16 = (1 << 18),
++ DVBFE_MOD_AUTO = (1 << 31)
++};
++
++/*
++ * Convolution Code Rate (Viterbi Inner Code Rate)
++ * DVB-S2 uses LDPC. Information on LDPC can be found at
++ * http://www.ldpc-codes.com
++ */
++enum dvbfe_fec {
++ DVBFE_FEC_NONE = (0 << 0),
++ DVBFE_FEC_1_4 = (1 << 0),
++ DVBFE_FEC_1_3 = (1 << 1),
++ DVBFE_FEC_2_5 = (1 << 2),
++ DVBFE_FEC_1_2 = (1 << 3),
++ DVBFE_FEC_3_5 = (1 << 4),
++ DVBFE_FEC_2_3 = (1 << 5),
++ DVBFE_FEC_3_4 = (1 << 6),
++ DVBFE_FEC_4_5 = (1 << 7),
++ DVBFE_FEC_5_6 = (1 << 8),
++ DVBFE_FEC_6_7 = (1 << 9),
++ DVBFE_FEC_7_8 = (1 << 10),
++ DVBFE_FEC_8_9 = (1 << 11),
++ DVBFE_FEC_9_10 = (1 << 12),
++ DVBFE_FEC_AUTO = (1 << 31)
++};
++
++/* Frontend Inversion (I/Q Swap) */
++enum dvbfe_inversion {
++ DVBFE_INVERSION_OFF = 0,
++ DVBFE_INVERSION_ON = 1,
++ DVBFE_INVERSION_AUTO = 2
++};
++
++/* DVB-S parameters */
++struct dvbs_params {
++ __u32 symbol_rate;
++
++ enum dvbfe_modulation modulation;
++ enum dvbfe_fec fec;
++};
++
++/* DSS parameters */
++struct dss_params {
++ __u32 symbol_rate;
++
++ enum dvbfe_modulation modulation;
++ enum dvbfe_fec fec;
++};
++
++/*
++ * Rolloff Rate (Nyquist Filter Rolloff)
++ * NOTE: DVB-S2 has rates of 0.20, 0.25, 0.35
++ * Values are x100
++ * Applies to DVB-S2
++ */
++enum dvbfe_rolloff {
++ DVBFE_ROLLOFF_35 = 0,
++ DVBFE_ROLLOFF_25 = 1,
++ DVBFE_ROLLOFF_20 = 2,
++ DVBFE_ROLLOFF_UNKNOWN = 3
++};
++
++/* DVB-S2 parameters */
++struct dvbs2_params {
++ __u32 symbol_rate;
++
++ enum dvbfe_modulation modulation;
++ enum dvbfe_fec fec;
++
++ /* Informational fields only */
++ enum dvbfe_rolloff rolloff;
++
++ __u8 matype_1;
++ __u8 matype_2;
++ __u8 upl_1;
++ __u8 upl_2;
++ __u8 dfl_1;
++ __u8 dfl_2;
++ __u8 sync;
++ __u8 syncd_1;
++ __u8 syncd_2;
++
++ __u8 pad[32];
++};
++
++/* DVB-C parameters */
++struct dvbc_params {
++ __u32 symbol_rate;
++ enum dvbfe_modulation modulation;
++ enum dvbfe_fec fec;
++};
++
++/* DVB-T Channel bandwidth */
++enum dvbfe_bandwidth {
++ DVBFE_BANDWIDTH_8_MHZ = (1 << 0),
++ DVBFE_BANDWIDTH_7_MHZ = (1 << 1),
++ DVBFE_BANDWIDTH_6_MHZ = (1 << 2),
++ DVBFE_BANDWIDTH_5_MHZ = (1 << 3),
++ DVBFE_BANDWIDTH_AUTO = (1 << 31)
++};
++
++/* DVB-T/DVB-H transmission mode */
++enum dvbfe_transmission_mode {
++ DVBFE_TRANSMISSION_MODE_2K = (1 << 0),
++ DVBFE_TRANSMISSION_MODE_4K = (1 << 1),
++ DVBFE_TRANSMISSION_MODE_8K = (1 << 2),
++ DVBFE_TRANSMISSION_MODE_AUTO = (1 << 31)
++};
++
++/* DVB-T/DVB-H Guard interval */
++enum dvbfe_guard_interval {
++ DVBFE_GUARD_INTERVAL_1_32 = (1 << 1),
++ DVBFE_GUARD_INTERVAL_1_16 = (1 << 2),
++ DVBFE_GUARD_INTERVAL_1_8 = (1 << 3),
++ DVBFE_GUARD_INTERVAL_1_4 = (1 << 4),
++ DVBFE_GUARD_INTERVAL_AUTO = (1 << 31)
++};
++
++/* DVB-T/DVB-H Hierarchial modulation */
++enum dvbfe_hierarchy {
++ DVBFE_HIERARCHY_OFF = (1 << 0),
++ DVBFE_HIERARCHY_ON = (1 << 1),
++ DVBFE_HIERARCHY_AUTO = (1 << 2)
++};
++
++/* DVB-T/DVB-H Rolloff's */
++enum dvbfe_alpha {
++ DVBFE_ALPHA_1 = (1 << 0),
++ DVBFE_ALPHA_2 = (1 << 1),
++ DVBFE_ALPHA_4 = (1 << 2)
++};
++
++/* Stream priority (Hierachial coding) */
++enum dvbfe_stream_priority {
++ DVBFE_STREAM_PRIORITY_HP = (0 << 0),
++ DVBFE_STREAM_PRIORITY_LP = (1 << 0)
++};
++
++/* DVB-T parameters */
++struct dvbt_params {
++ enum dvbfe_modulation constellation;
++ enum dvbfe_bandwidth bandwidth;
++ enum dvbfe_fec code_rate_HP;
++ enum dvbfe_fec code_rate_LP;
++ enum dvbfe_transmission_mode transmission_mode;
++ enum dvbfe_guard_interval guard_interval;
++ enum dvbfe_hierarchy hierarchy;
++ enum dvbfe_alpha alpha;
++ enum dvbfe_stream_priority priority;
++
++ __u8 pad[32];
++};
++
++/* DVB-H Interleaver type */
++enum dvbfe_interleaver {
++ DVBFE_INTERLEAVER_NATIVE = (1 << 0),
++ DVBFE_INTERLEAVER_INDEPTH = (1 << 1),
++ DVBFE_INTERLEAVER_AUTO = (1 << 31)
++};
++
++/* DVB-H MPE-FEC Indicator */
++enum dvbfe_mpefec {
++ DVBFE_MPEFEC_OFF = (1 << 0),
++ DVBFE_MPEFEC_ON = (1 << 1)
++};
++
++/* DVB-H Timeslicing Indicator */
++enum dvbfe_timeslicing {
++ DVBFE_TIMESLICING_OFF = (1 << 0),
++ DVBFE_TIMESLICING_ON = (1 << 1)
++};
++
++/* DVB-H parameters */
++struct dvbh_params {
++ enum dvbfe_modulation constellation;
++ enum dvbfe_fec code_rate_HP;
++ enum dvbfe_fec code_rate_LP;
++ enum dvbfe_transmission_mode transmission_mode;
++ enum dvbfe_guard_interval guard_interval;
++ enum dvbfe_hierarchy hierarchy;
++ enum dvbfe_alpha alpha;
++ enum dvbfe_interleaver interleaver;
++ enum dvbfe_mpefec mpefec;
++ enum dvbfe_timeslicing timeslicing;
++ enum dvbfe_stream_priority priority;
++
++ __u32 bandwidth;
++ __u8 pad[32];
++};
++
++/* ATSC parameters */
++struct atsc_params {
++ enum dvbfe_modulation modulation;
++
++ __u8 pad[32];
++};
++
++/* DVB Frontend Tuning Parameters */
++struct dvbfe_params {
++ __u32 frequency;
++ enum fe_spectral_inversion inversion;
++ enum dvbfe_delsys delivery;
++
++ __u8 pad[32];
++
++ union {
++ struct dvbs_params dvbs;
++ struct dss_params dss;
++ struct dvbs2_params dvbs2;
++ struct dvbc_params dvbc;
++ struct dvbt_params dvbt;
++ struct dvbh_params dvbh;
++ struct atsc_params atsc;
++
++ __u8 pad[128];
++ } delsys;
++};
++#define DVBFE_SET_PARAMS _IOW('o', 83, struct dvbfe_params)
++#define DVBFE_GET_PARAMS _IOWR('o', 84, struct dvbfe_params)
++
++/* DVB-S capability bitfields */
++struct dvbfe_dvbs_info {
++ enum dvbfe_modulation modulation;
++ enum dvbfe_fec fec;
++};
++
++/* DSS capability bitfields */
++struct dvbfe_dss_info {
++ enum dvbfe_modulation modulation;
++ enum dvbfe_fec fec;
++};
++
++/* DVB-S2 capability bitfields */
++struct dvbfe_dvbs2_info {
++ enum dvbfe_modulation modulation;
++ enum dvbfe_fec fec;
++
++ __u8 pad[32];
++};
++
++/* DVB-C capability bitfields */
++struct dvbfe_dvbc_info {
++ enum dvbfe_modulation modulation;
++};
++
++/* DVB-T capability bitfields */
++struct dvbfe_dvbt_info {
++ enum dvbfe_modulation modulation;
++ enum dvbfe_stream_priority stream_priority;
++
++ __u8 pad[32];
++};
++
++/* DVB-H capability bitfields */
++struct dvbfe_dvbh_info {
++ enum dvbfe_modulation modulation;
++ enum dvbfe_stream_priority stream_priority;
++
++ __u8 pad[32];
++};
++
++/* ATSC capability bitfields */
++struct dvbfe_atsc_info {
++ enum dvbfe_modulation modulation;
++
++ __u8 pad[32];
++};
++
++/* DVB Frontend related Information */
++struct dvbfe_info {
++ char name[128];
++
++ union {
++ struct dvbfe_dvbs_info dvbs;
++ struct dvbfe_dss_info dss;
++ struct dvbfe_dvbs2_info dvbs2;
++ struct dvbfe_dvbc_info dvbc;
++ struct dvbfe_dvbt_info dvbt;
++ struct dvbfe_dvbh_info dvbh;
++ struct dvbfe_atsc_info atsc;
++
++ __u8 pad[128];
++ } delsys;
++
++ __u32 frequency_min;
++ __u32 frequency_max;
++ __u32 frequency_step;
++ __u32 frequency_tolerance;
++ __u32 symbol_rate_min;
++ __u32 symbol_rate_max;
++ __u32 symbol_rate_tolerance;
++
++ enum fe_spectral_inversion inversion;
++
++ __u8 pad[128];
++};
++#define DVBFE_GET_INFO _IOR('o', 85, struct dvbfe_info)
++
++enum dvbfe_status {
++ DVBFE_HAS_SIGNAL = (1 << 0), /* something above noise floor */
++ DVBFE_HAS_CARRIER = (1 << 1), /* Signal found */
++ DVBFE_HAS_VITERBI = (1 << 2), /* FEC is stable */
++ DVBFE_HAS_SYNC = (1 << 3), /* SYNC found */
++ DVBFE_HAS_LOCK = (1 << 4), /* OK .. */
++ DVBFE_TIMEDOUT = (1 << 5), /* no lock in last ~2 s */
++ DVBFE_STATUS_DUMMY = (1 << 31)
++};
++
++/* DVB Frontend events */
++struct dvbfe_events {
++ enum dvbfe_status status;
++
++ __u8 pad[32];
++};
++
++struct dvb_frontend_event {
++ fe_status_t status;
++ struct dvb_frontend_parameters parameters;
++};
++#define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event)
++
++struct dvbfe_event {
++ struct dvbfe_events fe_events;
++ struct dvbfe_params fe_params;
++};
++#define DVBFE_GET_EVENT _IOR('o', 86, struct dvbfe_event)
++
++#endif /*_DVBFRONTEND_H_*/
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/audio.h dvb-apps/include/linux/dvb/audio.h
+--- linuxtv-dvb-apps-1.1.1/include/linux/dvb/audio.h 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/include/linux/dvb/audio.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,125 +0,0 @@
+-/*
+- * audio.h
+- *
+- * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
+- * & Marcus Metzler <marcus@convergence.de>
+- for convergence integrated media GmbH
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Lesser Public License
+- * as published by the Free Software Foundation; either version 2.1
+- * 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 Lesser 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 _DVBAUDIO_H_
+-#define _DVBAUDIO_H_
+-
+-#ifdef __KERNEL__
+-#include <linux/types.h>
+-#else
+-#include <stdint.h>
+-#endif
+-
+-
+-typedef enum {
+- AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
+- AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */
+-} audio_stream_source_t;
+-
+-
+-typedef enum {
+- AUDIO_STOPPED, /* Device is stopped */
+- AUDIO_PLAYING, /* Device is currently playing */
+- AUDIO_PAUSED /* Device is paused */
+-} audio_play_state_t;
+-
+-
+-typedef enum {
+- AUDIO_STEREO,
+- AUDIO_MONO_LEFT,
+- AUDIO_MONO_RIGHT
+-} audio_channel_select_t;
+-
+-
+-typedef struct audio_mixer {
+- unsigned int volume_left;
+- unsigned int volume_right;
+- // what else do we need? bass, pass-through, ...
+-} audio_mixer_t;
+-
+-
+-typedef struct audio_status {
+- int AV_sync_state; /* sync audio and video? */
+- int mute_state; /* audio is muted */
+- audio_play_state_t play_state; /* current playback state */
+- audio_stream_source_t stream_source; /* current stream source */
+- audio_channel_select_t channel_select; /* currently selected channel */
+- int bypass_mode; /* pass on audio data to */
+- audio_mixer_t mixer_state; /* current mixer state */
+-} audio_status_t; /* separate decoder hardware */
+-
+-
+-typedef
+-struct audio_karaoke{ /* if Vocal1 or Vocal2 are non-zero, they get mixed */
+- int vocal1; /* into left and right t at 70% each */
+- int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
+- int melody; /* mixed into the left channel and */
+- /* Vocal2 into the right channel at 100% each. */
+- /* if Melody is non-zero, the melody channel gets mixed*/
+-} audio_karaoke_t; /* into left and right */
+-
+-
+-typedef uint16_t audio_attributes_t;
+-/* bits: descr. */
+-/* 15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, */
+-/* 12 multichannel extension */
+-/* 11-10 audio type (0=not spec, 1=language included) */
+-/* 9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) */
+-/* 7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit, */
+-/* 5- 4 Sample frequency fs (0=48kHz, 1=96kHz) */
+-/* 2- 0 number of audio channels (n+1 channels) */
+-
+-
+-/* for GET_CAPABILITIES and SET_FORMAT, the latter should only set one bit */
+-#define AUDIO_CAP_DTS 1
+-#define AUDIO_CAP_LPCM 2
+-#define AUDIO_CAP_MP1 4
+-#define AUDIO_CAP_MP2 8
+-#define AUDIO_CAP_MP3 16
+-#define AUDIO_CAP_AAC 32
+-#define AUDIO_CAP_OGG 64
+-#define AUDIO_CAP_SDDS 128
+-#define AUDIO_CAP_AC3 256
+-
+-#define AUDIO_STOP _IO('o', 1)
+-#define AUDIO_PLAY _IO('o', 2)
+-#define AUDIO_PAUSE _IO('o', 3)
+-#define AUDIO_CONTINUE _IO('o', 4)
+-#define AUDIO_SELECT_SOURCE _IO('o', 5)
+-#define AUDIO_SET_MUTE _IO('o', 6)
+-#define AUDIO_SET_AV_SYNC _IO('o', 7)
+-#define AUDIO_SET_BYPASS_MODE _IO('o', 8)
+-#define AUDIO_CHANNEL_SELECT _IO('o', 9)
+-#define AUDIO_GET_STATUS _IOR('o', 10, audio_status_t)
+-
+-#define AUDIO_GET_CAPABILITIES _IOR('o', 11, unsigned int)
+-#define AUDIO_CLEAR_BUFFER _IO('o', 12)
+-#define AUDIO_SET_ID _IO('o', 13)
+-#define AUDIO_SET_MIXER _IOW('o', 14, audio_mixer_t)
+-#define AUDIO_SET_STREAMTYPE _IO('o', 15)
+-#define AUDIO_SET_EXT_ID _IO('o', 16)
+-#define AUDIO_SET_ATTRIBUTES _IOW('o', 17, audio_attributes_t)
+-#define AUDIO_SET_KARAOKE _IOW('o', 18, audio_karaoke_t)
+-
+-#endif /* _DVBAUDIO_H_ */
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/ca.h dvb-apps/include/linux/dvb/ca.h
+--- linuxtv-dvb-apps-1.1.1/include/linux/dvb/ca.h 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/include/linux/dvb/ca.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,91 +0,0 @@
+-/*
+- * ca.h
+- *
+- * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
+- * & Marcus Metzler <marcus@convergence.de>
+- for convergence integrated media GmbH
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Lesser Public License
+- * as published by the Free Software Foundation; either version 2.1
+- * 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 Lesser 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 _DVBCA_H_
+-#define _DVBCA_H_
+-
+-/* slot interface types and info */
+-
+-typedef struct ca_slot_info {
+- int num; /* slot number */
+-
+- int type; /* CA interface this slot supports */
+-#define CA_CI 1 /* CI high level interface */
+-#define CA_CI_LINK 2 /* CI link layer level interface */
+-#define CA_CI_PHYS 4 /* CI physical layer level interface */
+-#define CA_DESCR 8 /* built-in descrambler */
+-#define CA_SC 128 /* simple smart card interface */
+-
+- unsigned int flags;
+-#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
+-#define CA_CI_MODULE_READY 2
+-} ca_slot_info_t;
+-
+-
+-/* descrambler types and info */
+-
+-typedef struct ca_descr_info {
+- unsigned int num; /* number of available descramblers (keys) */
+- unsigned int type; /* type of supported scrambling system */
+-#define CA_ECD 1
+-#define CA_NDS 2
+-#define CA_DSS 4
+-} ca_descr_info_t;
+-
+-typedef struct ca_caps {
+- unsigned int slot_num; /* total number of CA card and module slots */
+- unsigned int slot_type; /* OR of all supported types */
+- unsigned int descr_num; /* total number of descrambler slots (keys) */
+- unsigned int descr_type; /* OR of all supported types */
+-} ca_caps_t;
+-
+-/* a message to/from a CI-CAM */
+-typedef struct ca_msg {
+- unsigned int index;
+- unsigned int type;
+- unsigned int length;
+- unsigned char msg[256];
+-} ca_msg_t;
+-
+-typedef struct ca_descr {
+- unsigned int index;
+- unsigned int parity; /* 0 == even, 1 == odd */
+- unsigned char cw[8];
+-} ca_descr_t;
+-
+-typedef struct ca_pid {
+- unsigned int pid;
+- int index; /* -1 == disable*/
+-} ca_pid_t;
+-
+-#define CA_RESET _IO('o', 128)
+-#define CA_GET_CAP _IOR('o', 129, ca_caps_t)
+-#define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t)
+-#define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t)
+-#define CA_GET_MSG _IOR('o', 132, ca_msg_t)
+-#define CA_SEND_MSG _IOW('o', 133, ca_msg_t)
+-#define CA_SET_DESCR _IOW('o', 134, ca_descr_t)
+-#define CA_SET_PID _IOW('o', 135, ca_pid_t)
+-
+-#endif
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/dmx.h dvb-apps/include/linux/dvb/dmx.h
+--- linuxtv-dvb-apps-1.1.1/include/linux/dvb/dmx.h 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/include/linux/dvb/dmx.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,181 +0,0 @@
+-/*
+- * dmx.h
+- *
+- * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
+- * & Ralph Metzler <ralph@convergence.de>
+- for convergence integrated media GmbH
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public License
+- * as published by the Free Software Foundation; either version 2.1
+- * of the License, or (at your option) any later version.
+- *
+- * This 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 Lesser 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 _DVBDMX_H_
+-#define _DVBDMX_H_
+-
+-#include <asm/types.h>
+-#ifdef __KERNEL__
+-#include <linux/time.h>
+-#else
+-#include <time.h>
+-#endif
+-
+-
+-#define DMX_FILTER_SIZE 16
+-
+-typedef enum
+-{
+- DMX_OUT_DECODER, /* Streaming directly to decoder. */
+- DMX_OUT_TAP, /* Output going to a memory buffer */
+- /* (to be retrieved via the read command).*/
+- DMX_OUT_TS_TAP /* Output multiplexed into a new TS */
+- /* (to be retrieved by reading from the */
+- /* logical DVR device). */
+-} dmx_output_t;
+-
+-
+-typedef enum
+-{
+- DMX_IN_FRONTEND, /* Input from a front-end device. */
+- DMX_IN_DVR /* Input from the logical DVR device. */
+-} dmx_input_t;
+-
+-
+-typedef enum
+-{
+- DMX_PES_AUDIO0,
+- DMX_PES_VIDEO0,
+- DMX_PES_TELETEXT0,
+- DMX_PES_SUBTITLE0,
+- DMX_PES_PCR0,
+-
+- DMX_PES_AUDIO1,
+- DMX_PES_VIDEO1,
+- DMX_PES_TELETEXT1,
+- DMX_PES_SUBTITLE1,
+- DMX_PES_PCR1,
+-
+- DMX_PES_AUDIO2,
+- DMX_PES_VIDEO2,
+- DMX_PES_TELETEXT2,
+- DMX_PES_SUBTITLE2,
+- DMX_PES_PCR2,
+-
+- DMX_PES_AUDIO3,
+- DMX_PES_VIDEO3,
+- DMX_PES_TELETEXT3,
+- DMX_PES_SUBTITLE3,
+- DMX_PES_PCR3,
+-
+- DMX_PES_OTHER
+-} dmx_pes_type_t;
+-
+-#define DMX_PES_AUDIO DMX_PES_AUDIO0
+-#define DMX_PES_VIDEO DMX_PES_VIDEO0
+-#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
+-#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
+-#define DMX_PES_PCR DMX_PES_PCR0
+-
+-
+-typedef enum
+-{
+- DMX_SCRAMBLING_EV,
+- DMX_FRONTEND_EV
+-} dmx_event_t;
+-
+-
+-typedef enum
+-{
+- DMX_SCRAMBLING_OFF,
+- DMX_SCRAMBLING_ON
+-} dmx_scrambling_status_t;
+-
+-
+-typedef struct dmx_filter
+-{
+- __u8 filter[DMX_FILTER_SIZE];
+- __u8 mask[DMX_FILTER_SIZE];
+- __u8 mode[DMX_FILTER_SIZE];
+-} dmx_filter_t;
+-
+-
+-struct dmx_sct_filter_params
+-{
+- __u16 pid;
+- dmx_filter_t filter;
+- __u32 timeout;
+- __u32 flags;
+-#define DMX_CHECK_CRC 1
+-#define DMX_ONESHOT 2
+-#define DMX_IMMEDIATE_START 4
+-#define DMX_KERNEL_CLIENT 0x8000
+-};
+-
+-
+-struct dmx_pes_filter_params
+-{
+- __u16 pid;
+- dmx_input_t input;
+- dmx_output_t output;
+- dmx_pes_type_t pes_type;
+- __u32 flags;
+-};
+-
+-
+-struct dmx_event
+-{
+- dmx_event_t event;
+- time_t timeStamp;
+- union
+- {
+- dmx_scrambling_status_t scrambling;
+- } u;
+-};
+-
+-typedef struct dmx_caps {
+- __u32 caps;
+- int num_decoders;
+-} dmx_caps_t;
+-
+-typedef enum {
+- DMX_SOURCE_FRONT0 = 0,
+- DMX_SOURCE_FRONT1,
+- DMX_SOURCE_FRONT2,
+- DMX_SOURCE_FRONT3,
+- DMX_SOURCE_DVR0 = 16,
+- DMX_SOURCE_DVR1,
+- DMX_SOURCE_DVR2,
+- DMX_SOURCE_DVR3
+-} dmx_source_t;
+-
+-struct dmx_stc {
+- unsigned int num; /* input : which STC? 0..N */
+- unsigned int base; /* output: divisor for stc to get 90 kHz clock */
+- __u64 stc; /* output: stc in 'base'*90 kHz units */
+-};
+-
+-
+-#define DMX_START _IO('o', 41)
+-#define DMX_STOP _IO('o', 42)
+-#define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
+-#define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params)
+-#define DMX_SET_BUFFER_SIZE _IO('o', 45)
+-#define DMX_GET_EVENT _IOR('o', 46, struct dmx_event)
+-#define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5])
+-#define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t)
+-#define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t)
+-#define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
+-
+-#endif /*_DVBDMX_H_*/
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/frontend.h dvb-apps/include/linux/dvb/frontend.h
+--- linuxtv-dvb-apps-1.1.1/include/linux/dvb/frontend.h 2006-05-18 01:32:38.000000000 +0200
++++ dvb-apps/include/linux/dvb/frontend.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,267 +0,0 @@
+-/*
+- * frontend.h
+- *
+- * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
+- * Ralph Metzler <ralph@convergence.de>
+- * Holger Waechtler <holger@convergence.de>
+- * Andre Draszik <ad@convergence.de>
+- * for convergence integrated media GmbH
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public License
+- * as published by the Free Software Foundation; either version 2.1
+- * of the License, or (at your option) any later version.
+- *
+- * This 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 Lesser 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 _DVBFRONTEND_H_
+-#define _DVBFRONTEND_H_
+-
+-#include <asm/types.h>
+-
+-
+-typedef enum fe_type {
+- FE_QPSK,
+- FE_QAM,
+- FE_OFDM,
+- FE_ATSC
+-} fe_type_t;
+-
+-
+-typedef enum fe_caps {
+- FE_IS_STUPID = 0,
+- FE_CAN_INVERSION_AUTO = 0x1,
+- FE_CAN_FEC_1_2 = 0x2,
+- FE_CAN_FEC_2_3 = 0x4,
+- FE_CAN_FEC_3_4 = 0x8,
+- FE_CAN_FEC_4_5 = 0x10,
+- FE_CAN_FEC_5_6 = 0x20,
+- FE_CAN_FEC_6_7 = 0x40,
+- FE_CAN_FEC_7_8 = 0x80,
+- FE_CAN_FEC_8_9 = 0x100,
+- FE_CAN_FEC_AUTO = 0x200,
+- FE_CAN_QPSK = 0x400,
+- FE_CAN_QAM_16 = 0x800,
+- FE_CAN_QAM_32 = 0x1000,
+- FE_CAN_QAM_64 = 0x2000,
+- FE_CAN_QAM_128 = 0x4000,
+- FE_CAN_QAM_256 = 0x8000,
+- FE_CAN_QAM_AUTO = 0x10000,
+- FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
+- FE_CAN_BANDWIDTH_AUTO = 0x40000,
+- FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
+- FE_CAN_HIERARCHY_AUTO = 0x100000,
+- FE_CAN_8VSB = 0x200000,
+- FE_CAN_16VSB = 0x400000,
+- FE_NEEDS_BENDING = 0x20000000, // not supported anymore, don't use (frontend requires frequency bending)
+- FE_CAN_RECOVER = 0x40000000, // frontend can recover from a cable unplug automatically
+- FE_CAN_MUTE_TS = 0x80000000 // frontend can stop spurious TS data output
+-} fe_caps_t;
+-
+-
+-struct dvb_frontend_info {
+- char name[128];
+- fe_type_t type;
+- __u32 frequency_min;
+- __u32 frequency_max;
+- __u32 frequency_stepsize;
+- __u32 frequency_tolerance;
+- __u32 symbol_rate_min;
+- __u32 symbol_rate_max;
+- __u32 symbol_rate_tolerance; /* ppm */
+- __u32 notifier_delay; /* DEPRECATED */
+- fe_caps_t caps;
+-};
+-
+-
+-/**
+- * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
+- * the meaning of this struct...
+- */
+-struct dvb_diseqc_master_cmd {
+- __u8 msg [6]; /* { framing, address, command, data [3] } */
+- __u8 msg_len; /* valid values are 3...6 */
+-};
+-
+-
+-struct dvb_diseqc_slave_reply {
+- __u8 msg [4]; /* { framing, data [3] } */
+- __u8 msg_len; /* valid values are 0...4, 0 means no msg */
+- int timeout; /* return from ioctl after timeout ms with */
+-}; /* errorcode when no message was received */
+-
+-
+-typedef enum fe_sec_voltage {
+- SEC_VOLTAGE_13,
+- SEC_VOLTAGE_18,
+- SEC_VOLTAGE_OFF
+-} fe_sec_voltage_t;
+-
+-
+-typedef enum fe_sec_tone_mode {
+- SEC_TONE_ON,
+- SEC_TONE_OFF
+-} fe_sec_tone_mode_t;
+-
+-
+-typedef enum fe_sec_mini_cmd {
+- SEC_MINI_A,
+- SEC_MINI_B
+-} fe_sec_mini_cmd_t;
+-
+-
+-typedef enum fe_status {
+- FE_HAS_SIGNAL = 0x01, /* found something above the noise level */
+- FE_HAS_CARRIER = 0x02, /* found a DVB signal */
+- FE_HAS_VITERBI = 0x04, /* FEC is stable */
+- FE_HAS_SYNC = 0x08, /* found sync bytes */
+- FE_HAS_LOCK = 0x10, /* everything's working... */
+- FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */
+- FE_REINIT = 0x40 /* frontend was reinitialized, */
+-} fe_status_t; /* application is recommended to reset */
+- /* DiSEqC, tone and parameters */
+-
+-typedef enum fe_spectral_inversion {
+- INVERSION_OFF,
+- INVERSION_ON,
+- INVERSION_AUTO
+-} fe_spectral_inversion_t;
+-
+-
+-typedef enum fe_code_rate {
+- FEC_NONE = 0,
+- FEC_1_2,
+- FEC_2_3,
+- FEC_3_4,
+- FEC_4_5,
+- FEC_5_6,
+- FEC_6_7,
+- FEC_7_8,
+- FEC_8_9,
+- FEC_AUTO
+-} fe_code_rate_t;
+-
+-
+-typedef enum fe_modulation {
+- QPSK,
+- QAM_16,
+- QAM_32,
+- QAM_64,
+- QAM_128,
+- QAM_256,
+- QAM_AUTO,
+- VSB_8,
+- VSB_16
+-} fe_modulation_t;
+-
+-typedef enum fe_transmit_mode {
+- TRANSMISSION_MODE_2K,
+- TRANSMISSION_MODE_8K,
+- TRANSMISSION_MODE_AUTO
+-} fe_transmit_mode_t;
+-
+-typedef enum fe_bandwidth {
+- BANDWIDTH_8_MHZ,
+- BANDWIDTH_7_MHZ,
+- BANDWIDTH_6_MHZ,
+- BANDWIDTH_AUTO
+-} fe_bandwidth_t;
+-
+-
+-typedef enum fe_guard_interval {
+- GUARD_INTERVAL_1_32,
+- GUARD_INTERVAL_1_16,
+- GUARD_INTERVAL_1_8,
+- GUARD_INTERVAL_1_4,
+- GUARD_INTERVAL_AUTO
+-} fe_guard_interval_t;
+-
+-
+-typedef enum fe_hierarchy {
+- HIERARCHY_NONE,
+- HIERARCHY_1,
+- HIERARCHY_2,
+- HIERARCHY_4,
+- HIERARCHY_AUTO
+-} fe_hierarchy_t;
+-
+-
+-struct dvb_qpsk_parameters {
+- __u32 symbol_rate; /* symbol rate in Symbols per second */
+- fe_code_rate_t fec_inner; /* forward error correction (see above) */
+-};
+-
+-struct dvb_qam_parameters {
+- __u32 symbol_rate; /* symbol rate in Symbols per second */
+- fe_code_rate_t fec_inner; /* forward error correction (see above) */
+- fe_modulation_t modulation; /* modulation type (see above) */
+-};
+-
+-struct dvb_vsb_parameters {
+- fe_modulation_t modulation; /* modulation type (see above) */
+-};
+-
+-struct dvb_ofdm_parameters {
+- fe_bandwidth_t bandwidth;
+- fe_code_rate_t code_rate_HP; /* high priority stream code rate */
+- fe_code_rate_t code_rate_LP; /* low priority stream code rate */
+- fe_modulation_t constellation; /* modulation type (see above) */
+- fe_transmit_mode_t transmission_mode;
+- fe_guard_interval_t guard_interval;
+- fe_hierarchy_t hierarchy_information;
+-};
+-
+-
+-struct dvb_frontend_parameters {
+- __u32 frequency; /* (absolute) frequency in Hz for QAM/OFDM/ATSC */
+- /* intermediate frequency in kHz for QPSK */
+- fe_spectral_inversion_t inversion;
+- union {
+- struct dvb_qpsk_parameters qpsk;
+- struct dvb_qam_parameters qam;
+- struct dvb_ofdm_parameters ofdm;
+- struct dvb_vsb_parameters vsb;
+- } u;
+-};
+-
+-
+-struct dvb_frontend_event {
+- fe_status_t status;
+- struct dvb_frontend_parameters parameters;
+-};
+-
+-
+-
+-#define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info)
+-
+-#define FE_DISEQC_RESET_OVERLOAD _IO('o', 62)
+-#define FE_DISEQC_SEND_MASTER_CMD _IOW('o', 63, struct dvb_diseqc_master_cmd)
+-#define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
+-#define FE_DISEQC_SEND_BURST _IO('o', 65) /* fe_sec_mini_cmd_t */
+-
+-#define FE_SET_TONE _IO('o', 66) /* fe_sec_tone_mode_t */
+-#define FE_SET_VOLTAGE _IO('o', 67) /* fe_sec_voltage_t */
+-#define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */
+-
+-#define FE_READ_STATUS _IOR('o', 69, fe_status_t)
+-#define FE_READ_BER _IOR('o', 70, __u32)
+-#define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16)
+-#define FE_READ_SNR _IOR('o', 72, __u16)
+-#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
+-
+-#define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters)
+-#define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters)
+-#define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event)
+-
+-#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
+-
+-#endif /*_DVBFRONTEND_H_*/
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/net.h dvb-apps/include/linux/dvb/net.h
+--- linuxtv-dvb-apps-1.1.1/include/linux/dvb/net.h 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/include/linux/dvb/net.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,41 +0,0 @@
+-/*
+- * net.h
+- *
+- * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
+- * & Ralph Metzler <ralph@convergence.de>
+- for convergence integrated media GmbH
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public License
+- * as published by the Free Software Foundation; either version 2.1
+- * of the License, or (at your option) any later version.
+- *
+- * This 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 Lesser 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 _DVBNET_H_
+-#define _DVBNET_H_
+-
+-#include <asm/types.h>
+-
+-
+-struct dvb_net_if {
+- __u16 pid;
+- __u16 if_num;
+-};
+-
+-
+-#define NET_ADD_IF _IOWR('o', 52, struct dvb_net_if)
+-#define NET_REMOVE_IF _IO('o', 53)
+-#define NET_GET_IF _IOWR('o', 54, struct dvb_net_if)
+-
+-#endif /*_DVBNET_H_*/
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/osd.h dvb-apps/include/linux/dvb/osd.h
+--- linuxtv-dvb-apps-1.1.1/include/linux/dvb/osd.h 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/include/linux/dvb/osd.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,111 +0,0 @@
+-/*
+- * osd.h
+- *
+- * Copyright (C) 2001 Ralph Metzler <ralph@convergence.de>
+- * & Marcus Metzler <marcus@convergence.de>
+- for convergence integrated media GmbH
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Lesser Public License
+- * as published by the Free Software Foundation; either version 2.1
+- * 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 Lesser 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 _DVBOSD_H_
+-#define _DVBOSD_H_
+-
+-typedef enum {
+- // All functions return -2 on "not open"
+- OSD_Close=1, // ()
+- // Disables OSD and releases the buffers
+- // returns 0 on success
+- OSD_Open, // (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0))
+- // Opens OSD with this size and bit depth
+- // returns 0 on success, -1 on DRAM allocation error, -2 on "already open"
+- OSD_Show, // ()
+- // enables OSD mode
+- // returns 0 on success
+- OSD_Hide, // ()
+- // disables OSD mode
+- // returns 0 on success
+- OSD_Clear, // ()
+- // Sets all pixel to color 0
+- // returns 0 on success
+- OSD_Fill, // (color)
+- // Sets all pixel to color <col>
+- // returns 0 on success
+- OSD_SetColor, // (color,R{x0},G{y0},B{x1},opacity{y1})
+- // set palette entry <num> to <r,g,b>, <mix> and <trans> apply
+- // R,G,B: 0..255
+- // R=Red, G=Green, B=Blue
+- // opacity=0: pixel opacity 0% (only video pixel shows)
+- // opacity=1..254: pixel opacity as specified in header
+- // opacity=255: pixel opacity 100% (only OSD pixel shows)
+- // returns 0 on success, -1 on error
+- OSD_SetPalette, // (firstcolor{color},lastcolor{x0},data)
+- // Set a number of entries in the palette
+- // sets the entries "firstcolor" through "lastcolor" from the array "data"
+- // data has 4 byte for each color:
+- // R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel
+- OSD_SetTrans, // (transparency{color})
+- // Sets transparency of mixed pixel (0..15)
+- // returns 0 on success
+- OSD_SetPixel, // (x0,y0,color)
+- // sets pixel <x>,<y> to color number <col>
+- // returns 0 on success, -1 on error
+- OSD_GetPixel, // (x0,y0)
+- // returns color number of pixel <x>,<y>, or -1
+- OSD_SetRow, // (x0,y0,x1,data)
+- // fills pixels x0,y through x1,y with the content of data[]
+- // returns 0 on success, -1 on clipping all pixel (no pixel drawn)
+- OSD_SetBlock, // (x0,y0,x1,y1,increment{color},data)
+- // fills pixels x0,y0 through x1,y1 with the content of data[]
+- // inc contains the width of one line in the data block,
+- // inc<=0 uses blockwidth as linewidth
+- // returns 0 on success, -1 on clipping all pixel
+- OSD_FillRow, // (x0,y0,x1,color)
+- // fills pixels x0,y through x1,y with the color <col>
+- // returns 0 on success, -1 on clipping all pixel
+- OSD_FillBlock, // (x0,y0,x1,y1,color)
+- // fills pixels x0,y0 through x1,y1 with the color <col>
+- // returns 0 on success, -1 on clipping all pixel
+- OSD_Line, // (x0,y0,x1,y1,color)
+- // draw a line from x0,y0 to x1,y1 with the color <col>
+- // returns 0 on success
+- OSD_Query, // (x0,y0,x1,y1,xasp{color}}), yasp=11
+- // fills parameters with the picture dimensions and the pixel aspect ratio
+- // returns 0 on success
+- OSD_Test, // ()
+- // draws a test picture. for debugging purposes only
+- // returns 0 on success
+-// TODO: remove "test" in final version
+- OSD_Text, // (x0,y0,size,color,text)
+- OSD_SetWindow, // (x0) set window with number 0<x0<8 as current
+- OSD_MoveWindow, // move current window to (x0, y0)
+-} OSD_Command;
+-
+-typedef struct osd_cmd_s {
+- OSD_Command cmd;
+- int x0;
+- int y0;
+- int x1;
+- int y1;
+- int color;
+- void *data;
+-} osd_cmd_t;
+-
+-
+-#define OSD_SEND_CMD _IOW('o', 160, osd_cmd_t)
+-
+-#endif
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/version.h dvb-apps/include/linux/dvb/version.h
+--- linuxtv-dvb-apps-1.1.1/include/linux/dvb/version.h 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/include/linux/dvb/version.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,29 +0,0 @@
+-/*
+- * version.h
+- *
+- * Copyright (C) 2000 Holger Waechtler <holger@convergence.de>
+- * for convergence integrated media GmbH
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public License
+- * as published by the Free Software Foundation; either version 2.1
+- * of the License, or (at your option) any later version.
+- *
+- * This 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 Lesser 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 _DVBVERSION_H_
+-#define _DVBVERSION_H_
+-
+-#define DVB_API_VERSION 3
+-
+-#endif /*_DVBVERSION_H_*/
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/linux/dvb/video.h dvb-apps/include/linux/dvb/video.h
+--- linuxtv-dvb-apps-1.1.1/include/linux/dvb/video.h 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/include/linux/dvb/video.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,199 +0,0 @@
+-/*
+- * video.h
+- *
+- * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
+- * & Ralph Metzler <ralph@convergence.de>
+- for convergence integrated media GmbH
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public License
+- * as published by the Free Software Foundation; either version 2.1
+- * of the License, or (at your option) any later version.
+- *
+- * This 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 Lesser 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 _DVBVIDEO_H_
+-#define _DVBVIDEO_H_
+-
+-#ifdef __KERNEL__
+-#include <linux/types.h>
+-#else
+-#include <stdint.h>
+-#include <time.h>
+-#endif
+-
+-
+-typedef enum {
+- VIDEO_FORMAT_4_3, /* Select 4:3 format */
+- VIDEO_FORMAT_16_9, /* Select 16:9 format. */
+- VIDEO_FORMAT_221_1 /* 2.21:1 */
+-} video_format_t;
+-
+-
+-typedef enum {
+- VIDEO_SYSTEM_PAL,
+- VIDEO_SYSTEM_NTSC,
+- VIDEO_SYSTEM_PALN,
+- VIDEO_SYSTEM_PALNc,
+- VIDEO_SYSTEM_PALM,
+- VIDEO_SYSTEM_NTSC60,
+- VIDEO_SYSTEM_PAL60,
+- VIDEO_SYSTEM_PALM60
+-} video_system_t;
+-
+-
+-typedef enum {
+- VIDEO_PAN_SCAN, /* use pan and scan format */
+- VIDEO_LETTER_BOX, /* use letterbox format */
+- VIDEO_CENTER_CUT_OUT /* use center cut out format */
+-} video_displayformat_t;
+-
+-typedef struct {
+- int w;
+- int h;
+- video_format_t aspect_ratio;
+-} video_size_t;
+-
+-typedef enum {
+- VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
+- VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
+- comes from the user through the write
+- system call */
+-} video_stream_source_t;
+-
+-
+-typedef enum {
+- VIDEO_STOPPED, /* Video is stopped */
+- VIDEO_PLAYING, /* Video is currently playing */
+- VIDEO_FREEZED /* Video is freezed */
+-} video_play_state_t;
+-
+-
+-struct video_event {
+- int32_t type;
+-#define VIDEO_EVENT_SIZE_CHANGED 1
+- time_t timestamp;
+- union {
+- video_size_t size;
+- } u;
+-};
+-
+-
+-struct video_status {
+- int video_blank; /* blank video on freeze? */
+- video_play_state_t play_state; /* current state of playback */
+- video_stream_source_t stream_source; /* current source (demux/memory) */
+- video_format_t video_format; /* current aspect ratio of stream*/
+- video_displayformat_t display_format;/* selected cropping mode */
+-};
+-
+-
+-struct video_still_picture {
+- char *iFrame; /* pointer to a single iframe in memory */
+- int32_t size;
+-};
+-
+-
+-typedef
+-struct video_highlight {
+- int active; /* 1=show highlight, 0=hide highlight */
+- uint8_t contrast1; /* 7- 4 Pattern pixel contrast */
+- /* 3- 0 Background pixel contrast */
+- uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */
+- /* 3- 0 Emphasis pixel-1 contrast */
+- uint8_t color1; /* 7- 4 Pattern pixel color */
+- /* 3- 0 Background pixel color */
+- uint8_t color2; /* 7- 4 Emphasis pixel-2 color */
+- /* 3- 0 Emphasis pixel-1 color */
+- uint32_t ypos; /* 23-22 auto action mode */
+- /* 21-12 start y */
+- /* 9- 0 end y */
+- uint32_t xpos; /* 23-22 button color number */
+- /* 21-12 start x */
+- /* 9- 0 end x */
+-} video_highlight_t;
+-
+-
+-typedef struct video_spu {
+- int active;
+- int stream_id;
+-} video_spu_t;
+-
+-
+-typedef struct video_spu_palette { /* SPU Palette information */
+- int length;
+- uint8_t *palette;
+-} video_spu_palette_t;
+-
+-
+-typedef struct video_navi_pack {
+- int length; /* 0 ... 1024 */
+- uint8_t data[1024];
+-} video_navi_pack_t;
+-
+-
+-typedef uint16_t video_attributes_t;
+-/* bits: descr. */
+-/* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */
+-/* 13-12 TV system (0=525/60, 1=625/50) */
+-/* 11-10 Aspect ratio (0=4:3, 3=16:9) */
+-/* 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */
+-/* 7 line 21-1 data present in GOP (1=yes, 0=no) */
+-/* 6 line 21-2 data present in GOP (1=yes, 0=no) */
+-/* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */
+-/* 2 source letterboxed (1=yes, 0=no) */
+-/* 0 film/camera mode (0=camera, 1=film (625/50 only)) */
+-
+-
+-/* bit definitions for capabilities: */
+-/* can the hardware decode MPEG1 and/or MPEG2? */
+-#define VIDEO_CAP_MPEG1 1
+-#define VIDEO_CAP_MPEG2 2
+-/* can you send a system and/or program stream to video device?
+- (you still have to open the video and the audio device but only
+- send the stream to the video device) */
+-#define VIDEO_CAP_SYS 4
+-#define VIDEO_CAP_PROG 8
+-/* can the driver also handle SPU, NAVI and CSS encoded data?
+- (CSS API is not present yet) */
+-#define VIDEO_CAP_SPU 16
+-#define VIDEO_CAP_NAVI 32
+-#define VIDEO_CAP_CSS 64
+-
+-
+-#define VIDEO_STOP _IO('o', 21)
+-#define VIDEO_PLAY _IO('o', 22)
+-#define VIDEO_FREEZE _IO('o', 23)
+-#define VIDEO_CONTINUE _IO('o', 24)
+-#define VIDEO_SELECT_SOURCE _IO('o', 25)
+-#define VIDEO_SET_BLANK _IO('o', 26)
+-#define VIDEO_GET_STATUS _IOR('o', 27, struct video_status)
+-#define VIDEO_GET_EVENT _IOR('o', 28, struct video_event)
+-#define VIDEO_SET_DISPLAY_FORMAT _IO('o', 29)
+-#define VIDEO_STILLPICTURE _IOW('o', 30, struct video_still_picture)
+-#define VIDEO_FAST_FORWARD _IO('o', 31)
+-#define VIDEO_SLOWMOTION _IO('o', 32)
+-#define VIDEO_GET_CAPABILITIES _IOR('o', 33, unsigned int)
+-#define VIDEO_CLEAR_BUFFER _IO('o', 34)
+-#define VIDEO_SET_ID _IO('o', 35)
+-#define VIDEO_SET_STREAMTYPE _IO('o', 36)
+-#define VIDEO_SET_FORMAT _IO('o', 37)
+-#define VIDEO_SET_SYSTEM _IO('o', 38)
+-#define VIDEO_SET_HIGHLIGHT _IOW('o', 39, video_highlight_t)
+-#define VIDEO_SET_SPU _IOW('o', 50, video_spu_t)
+-#define VIDEO_SET_SPU_PALETTE _IOW('o', 51, video_spu_palette_t)
+-#define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t)
+-#define VIDEO_SET_ATTRIBUTES _IO('o', 53)
+-#define VIDEO_GET_SIZE _IOR('o', 55, video_size_t)
+-
+-#endif /*_DVBVIDEO_H_*/
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/net.h dvb-apps/include/net.h
+--- linuxtv-dvb-apps-1.1.1/include/net.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/include/net.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,53 @@
++/*
++ * net.h
++ *
++ * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
++ * & Ralph Metzler <ralph@convergence.de>
++ * for convergence integrated media GmbH
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public License
++ * as published by the Free Software Foundation; either version 2.1
++ * of the License, or (at your option) any later version.
++ *
++ * This 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 Lesser 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 _DVBNET_H_
++#define _DVBNET_H_
++
++#include <asm/types.h>
++
++
++struct dvb_net_if {
++ __u16 pid;
++ __u16 if_num;
++ __u8 feedtype;
++#define DVB_NET_FEEDTYPE_MPE 0 /* multi protocol encapsulation */
++#define DVB_NET_FEEDTYPE_ULE 1 /* ultra lightweight encapsulation */
++};
++
++
++#define NET_ADD_IF _IOWR('o', 52, struct dvb_net_if)
++#define NET_REMOVE_IF _IO('o', 53)
++#define NET_GET_IF _IOWR('o', 54, struct dvb_net_if)
++
++
++/* binary compatibility cruft: */
++struct __dvb_net_if_old {
++ __u16 pid;
++ __u16 if_num;
++};
++#define __NET_ADD_IF_OLD _IOWR('o', 52, struct __dvb_net_if_old)
++#define __NET_GET_IF_OLD _IOWR('o', 54, struct __dvb_net_if_old)
++
++
++#endif /*_DVBNET_H_*/
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/osd.h dvb-apps/include/osd.h
+--- linuxtv-dvb-apps-1.1.1/include/osd.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/include/osd.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,142 @@
++/*
++ * osd.h
++ *
++ * Copyright (C) 2001 Ralph Metzler <ralph@convergence.de>
++ * & Marcus Metzler <marcus@convergence.de>
++ * for convergence integrated media GmbH
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Lesser Public License
++ * as published by the Free Software Foundation; either version 2.1
++ * 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 Lesser 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 _DVBOSD_H_
++#define _DVBOSD_H_
++
++typedef enum {
++ // All functions return -2 on "not open"
++ OSD_Close=1, // ()
++ // Disables OSD and releases the buffers
++ // returns 0 on success
++ OSD_Open, // (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0))
++ // Opens OSD with this size and bit depth
++ // returns 0 on success, -1 on DRAM allocation error, -2 on "already open"
++ OSD_Show, // ()
++ // enables OSD mode
++ // returns 0 on success
++ OSD_Hide, // ()
++ // disables OSD mode
++ // returns 0 on success
++ OSD_Clear, // ()
++ // Sets all pixel to color 0
++ // returns 0 on success
++ OSD_Fill, // (color)
++ // Sets all pixel to color <col>
++ // returns 0 on success
++ OSD_SetColor, // (color,R{x0},G{y0},B{x1},opacity{y1})
++ // set palette entry <num> to <r,g,b>, <mix> and <trans> apply
++ // R,G,B: 0..255
++ // R=Red, G=Green, B=Blue
++ // opacity=0: pixel opacity 0% (only video pixel shows)
++ // opacity=1..254: pixel opacity as specified in header
++ // opacity=255: pixel opacity 100% (only OSD pixel shows)
++ // returns 0 on success, -1 on error
++ OSD_SetPalette, // (firstcolor{color},lastcolor{x0},data)
++ // Set a number of entries in the palette
++ // sets the entries "firstcolor" through "lastcolor" from the array "data"
++ // data has 4 byte for each color:
++ // R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel
++ OSD_SetTrans, // (transparency{color})
++ // Sets transparency of mixed pixel (0..15)
++ // returns 0 on success
++ OSD_SetPixel, // (x0,y0,color)
++ // sets pixel <x>,<y> to color number <col>
++ // returns 0 on success, -1 on error
++ OSD_GetPixel, // (x0,y0)
++ // returns color number of pixel <x>,<y>, or -1
++ OSD_SetRow, // (x0,y0,x1,data)
++ // fills pixels x0,y through x1,y with the content of data[]
++ // returns 0 on success, -1 on clipping all pixel (no pixel drawn)
++ OSD_SetBlock, // (x0,y0,x1,y1,increment{color},data)
++ // fills pixels x0,y0 through x1,y1 with the content of data[]
++ // inc contains the width of one line in the data block,
++ // inc<=0 uses blockwidth as linewidth
++ // returns 0 on success, -1 on clipping all pixel
++ OSD_FillRow, // (x0,y0,x1,color)
++ // fills pixels x0,y through x1,y with the color <col>
++ // returns 0 on success, -1 on clipping all pixel
++ OSD_FillBlock, // (x0,y0,x1,y1,color)
++ // fills pixels x0,y0 through x1,y1 with the color <col>
++ // returns 0 on success, -1 on clipping all pixel
++ OSD_Line, // (x0,y0,x1,y1,color)
++ // draw a line from x0,y0 to x1,y1 with the color <col>
++ // returns 0 on success
++ OSD_Query, // (x0,y0,x1,y1,xasp{color}}), yasp=11
++ // fills parameters with the picture dimensions and the pixel aspect ratio
++ // returns 0 on success
++ OSD_Test, // ()
++ // draws a test picture. for debugging purposes only
++ // returns 0 on success
++// TODO: remove "test" in final version
++ OSD_Text, // (x0,y0,size,color,text)
++ OSD_SetWindow, // (x0) set window with number 0<x0<8 as current
++ OSD_MoveWindow, // move current window to (x0, y0)
++ OSD_OpenRaw, // Open other types of OSD windows
++} OSD_Command;
++
++typedef struct osd_cmd_s {
++ OSD_Command cmd;
++ int x0;
++ int y0;
++ int x1;
++ int y1;
++ int color;
++ void *data;
++} osd_cmd_t;
++
++/* OSD_OpenRaw: set 'color' to desired window type */
++typedef enum {
++ OSD_BITMAP1, /* 1 bit bitmap */
++ OSD_BITMAP2, /* 2 bit bitmap */
++ OSD_BITMAP4, /* 4 bit bitmap */
++ OSD_BITMAP8, /* 8 bit bitmap */
++ OSD_BITMAP1HR, /* 1 Bit bitmap half resolution */
++ OSD_BITMAP2HR, /* 2 bit bitmap half resolution */
++ OSD_BITMAP4HR, /* 4 bit bitmap half resolution */
++ OSD_BITMAP8HR, /* 8 bit bitmap half resolution */
++ OSD_YCRCB422, /* 4:2:2 YCRCB Graphic Display */
++ OSD_YCRCB444, /* 4:4:4 YCRCB Graphic Display */
++ OSD_YCRCB444HR, /* 4:4:4 YCRCB graphic half resolution */
++ OSD_VIDEOTSIZE, /* True Size Normal MPEG Video Display */
++ OSD_VIDEOHSIZE, /* MPEG Video Display Half Resolution */
++ OSD_VIDEOQSIZE, /* MPEG Video Display Quarter Resolution */
++ OSD_VIDEODSIZE, /* MPEG Video Display Double Resolution */
++ OSD_VIDEOTHSIZE, /* True Size MPEG Video Display Half Resolution */
++ OSD_VIDEOTQSIZE, /* True Size MPEG Video Display Quarter Resolution*/
++ OSD_VIDEOTDSIZE, /* True Size MPEG Video Display Double Resolution */
++ OSD_VIDEONSIZE, /* Full Size MPEG Video Display */
++ OSD_CURSOR /* Cursor */
++} osd_raw_window_t;
++
++typedef struct osd_cap_s {
++ int cmd;
++#define OSD_CAP_MEMSIZE 1 /* memory size */
++ long val;
++} osd_cap_t;
++
++
++#define OSD_SEND_CMD _IOW('o', 160, osd_cmd_t)
++#define OSD_GET_CAPABILITY _IOR('o', 161, osd_cap_t)
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/version.h dvb-apps/include/version.h
+--- linuxtv-dvb-apps-1.1.1/include/version.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/include/version.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,29 @@
++/*
++ * version.h
++ *
++ * Copyright (C) 2000 Holger Waechtler <holger@convergence.de>
++ * for convergence integrated media GmbH
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public License
++ * as published by the Free Software Foundation; either version 2.1
++ * of the License, or (at your option) any later version.
++ *
++ * This 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 Lesser 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 _DVBVERSION_H_
++#define _DVBVERSION_H_
++
++#define DVB_API_VERSION 3
++#define DVB_API_VERSION_MINOR 3
++
++#endif /*_DVBVERSION_H_*/
+diff -Nurd linuxtv-dvb-apps-1.1.1/include/video.h dvb-apps/include/video.h
+--- linuxtv-dvb-apps-1.1.1/include/video.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/include/video.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,277 @@
++/*
++ * video.h
++ *
++ * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
++ * & Ralph Metzler <ralph@convergence.de>
++ * for convergence integrated media GmbH
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public License
++ * as published by the Free Software Foundation; either version 2.1
++ * of the License, or (at your option) any later version.
++ *
++ * This 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 Lesser 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 _DVBVIDEO_H_
++#define _DVBVIDEO_H_
++
++#ifdef __KERNEL__
++#include <linux/types.h>
++#else
++#include <asm/types.h>
++#include <stdint.h>
++#include <time.h>
++#endif
++
++
++typedef enum {
++ VIDEO_FORMAT_4_3, /* Select 4:3 format */
++ VIDEO_FORMAT_16_9, /* Select 16:9 format. */
++ VIDEO_FORMAT_221_1 /* 2.21:1 */
++} video_format_t;
++
++
++typedef enum {
++ VIDEO_SYSTEM_PAL,
++ VIDEO_SYSTEM_NTSC,
++ VIDEO_SYSTEM_PALN,
++ VIDEO_SYSTEM_PALNc,
++ VIDEO_SYSTEM_PALM,
++ VIDEO_SYSTEM_NTSC60,
++ VIDEO_SYSTEM_PAL60,
++ VIDEO_SYSTEM_PALM60
++} video_system_t;
++
++
++typedef enum {
++ VIDEO_PAN_SCAN, /* use pan and scan format */
++ VIDEO_LETTER_BOX, /* use letterbox format */
++ VIDEO_CENTER_CUT_OUT /* use center cut out format */
++} video_displayformat_t;
++
++typedef struct {
++ int w;
++ int h;
++ video_format_t aspect_ratio;
++} video_size_t;
++
++typedef enum {
++ VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
++ VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
++ comes from the user through the write
++ system call */
++} video_stream_source_t;
++
++
++typedef enum {
++ VIDEO_STOPPED, /* Video is stopped */
++ VIDEO_PLAYING, /* Video is currently playing */
++ VIDEO_FREEZED /* Video is freezed */
++} video_play_state_t;
++
++
++/* Decoder commands */
++#define VIDEO_CMD_PLAY (0)
++#define VIDEO_CMD_STOP (1)
++#define VIDEO_CMD_FREEZE (2)
++#define VIDEO_CMD_CONTINUE (3)
++
++/* Flags for VIDEO_CMD_FREEZE */
++#define VIDEO_CMD_FREEZE_TO_BLACK (1 << 0)
++
++/* Flags for VIDEO_CMD_STOP */
++#define VIDEO_CMD_STOP_TO_BLACK (1 << 0)
++#define VIDEO_CMD_STOP_IMMEDIATELY (1 << 1)
++
++/* Play input formats: */
++/* The decoder has no special format requirements */
++#define VIDEO_PLAY_FMT_NONE (0)
++/* The decoder requires full GOPs */
++#define VIDEO_PLAY_FMT_GOP (1)
++
++/* The structure must be zeroed before use by the application
++ This ensures it can be extended safely in the future. */
++struct video_command {
++ __u32 cmd;
++ __u32 flags;
++ union {
++ struct {
++ __u64 pts;
++ } stop;
++
++ struct {
++ /* 0 or 1000 specifies normal speed,
++ 1 specifies forward single stepping,
++ -1 specifies backward single stepping,
++ >1: playback at speed/1000 of the normal speed,
++ <-1: reverse playback at (-speed/1000) of the normal speed. */
++ __s32 speed;
++ __u32 format;
++ } play;
++
++ struct {
++ __u32 data[16];
++ } raw;
++ };
++};
++
++/* FIELD_UNKNOWN can be used if the hardware does not know whether
++ the Vsync is for an odd, even or progressive (i.e. non-interlaced)
++ field. */
++#define VIDEO_VSYNC_FIELD_UNKNOWN (0)
++#define VIDEO_VSYNC_FIELD_ODD (1)
++#define VIDEO_VSYNC_FIELD_EVEN (2)
++#define VIDEO_VSYNC_FIELD_PROGRESSIVE (3)
++
++struct video_event {
++ int32_t type;
++#define VIDEO_EVENT_SIZE_CHANGED 1
++#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
++#define VIDEO_EVENT_DECODER_STOPPED 3
++#define VIDEO_EVENT_VSYNC 4
++ time_t timestamp;
++ union {
++ video_size_t size;
++ unsigned int frame_rate; /* in frames per 1000sec */
++ unsigned char vsync_field; /* unknown/odd/even/progressive */
++ } u;
++};
++
++
++struct video_status {
++ int video_blank; /* blank video on freeze? */
++ video_play_state_t play_state; /* current state of playback */
++ video_stream_source_t stream_source; /* current source (demux/memory) */
++ video_format_t video_format; /* current aspect ratio of stream*/
++ video_displayformat_t display_format;/* selected cropping mode */
++};
++
++
++struct video_still_picture {
++ char *iFrame; /* pointer to a single iframe in memory */
++ int32_t size;
++};
++
++
++typedef
++struct video_highlight {
++ int active; /* 1=show highlight, 0=hide highlight */
++ uint8_t contrast1; /* 7- 4 Pattern pixel contrast */
++ /* 3- 0 Background pixel contrast */
++ uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */
++ /* 3- 0 Emphasis pixel-1 contrast */
++ uint8_t color1; /* 7- 4 Pattern pixel color */
++ /* 3- 0 Background pixel color */
++ uint8_t color2; /* 7- 4 Emphasis pixel-2 color */
++ /* 3- 0 Emphasis pixel-1 color */
++ uint32_t ypos; /* 23-22 auto action mode */
++ /* 21-12 start y */
++ /* 9- 0 end y */
++ uint32_t xpos; /* 23-22 button color number */
++ /* 21-12 start x */
++ /* 9- 0 end x */
++} video_highlight_t;
++
++
++typedef struct video_spu {
++ int active;
++ int stream_id;
++} video_spu_t;
++
++
++typedef struct video_spu_palette { /* SPU Palette information */
++ int length;
++ uint8_t *palette;
++} video_spu_palette_t;
++
++
++typedef struct video_navi_pack {
++ int length; /* 0 ... 1024 */
++ uint8_t data[1024];
++} video_navi_pack_t;
++
++
++typedef uint16_t video_attributes_t;
++/* bits: descr. */
++/* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */
++/* 13-12 TV system (0=525/60, 1=625/50) */
++/* 11-10 Aspect ratio (0=4:3, 3=16:9) */
++/* 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */
++/* 7 line 21-1 data present in GOP (1=yes, 0=no) */
++/* 6 line 21-2 data present in GOP (1=yes, 0=no) */
++/* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */
++/* 2 source letterboxed (1=yes, 0=no) */
++/* 0 film/camera mode (0=camera, 1=film (625/50 only)) */
++
++
++/* bit definitions for capabilities: */
++/* can the hardware decode MPEG1 and/or MPEG2? */
++#define VIDEO_CAP_MPEG1 1
++#define VIDEO_CAP_MPEG2 2
++/* can you send a system and/or program stream to video device?
++ (you still have to open the video and the audio device but only
++ send the stream to the video device) */
++#define VIDEO_CAP_SYS 4
++#define VIDEO_CAP_PROG 8
++/* can the driver also handle SPU, NAVI and CSS encoded data?
++ (CSS API is not present yet) */
++#define VIDEO_CAP_SPU 16
++#define VIDEO_CAP_NAVI 32
++#define VIDEO_CAP_CSS 64
++
++
++#define VIDEO_STOP _IO('o', 21)
++#define VIDEO_PLAY _IO('o', 22)
++#define VIDEO_FREEZE _IO('o', 23)
++#define VIDEO_CONTINUE _IO('o', 24)
++#define VIDEO_SELECT_SOURCE _IO('o', 25)
++#define VIDEO_SET_BLANK _IO('o', 26)
++#define VIDEO_GET_STATUS _IOR('o', 27, struct video_status)
++#define VIDEO_GET_EVENT _IOR('o', 28, struct video_event)
++#define VIDEO_SET_DISPLAY_FORMAT _IO('o', 29)
++#define VIDEO_STILLPICTURE _IOW('o', 30, struct video_still_picture)
++#define VIDEO_FAST_FORWARD _IO('o', 31)
++#define VIDEO_SLOWMOTION _IO('o', 32)
++#define VIDEO_GET_CAPABILITIES _IOR('o', 33, unsigned int)
++#define VIDEO_CLEAR_BUFFER _IO('o', 34)
++#define VIDEO_SET_ID _IO('o', 35)
++#define VIDEO_SET_STREAMTYPE _IO('o', 36)
++#define VIDEO_SET_FORMAT _IO('o', 37)
++#define VIDEO_SET_SYSTEM _IO('o', 38)
++#define VIDEO_SET_HIGHLIGHT _IOW('o', 39, video_highlight_t)
++#define VIDEO_SET_SPU _IOW('o', 50, video_spu_t)
++#define VIDEO_SET_SPU_PALETTE _IOW('o', 51, video_spu_palette_t)
++#define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t)
++#define VIDEO_SET_ATTRIBUTES _IO('o', 53)
++#define VIDEO_GET_SIZE _IOR('o', 55, video_size_t)
++#define VIDEO_GET_FRAME_RATE _IOR('o', 56, unsigned int)
++
++/**
++ * VIDEO_GET_PTS
++ *
++ * Read the 33 bit presentation time stamp as defined
++ * in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
++ *
++ * The PTS should belong to the currently played
++ * frame if possible, but may also be a value close to it
++ * like the PTS of the last decoded frame or the last PTS
++ * extracted by the PES parser.
++ */
++#define VIDEO_GET_PTS _IOR('o', 57, __u64)
++
++/* Read the number of displayed frames since the decoder was started */
++#define VIDEO_GET_FRAME_COUNT _IOR('o', 58, __u64)
++
++#define VIDEO_COMMAND _IOWR('o', 59, struct video_command)
++#define VIDEO_TRY_COMMAND _IOWR('o', 60, struct video_command)
++
++#endif /*_DVBVIDEO_H_*/
+diff -Nurd linuxtv-dvb-apps-1.1.1/INSTALL dvb-apps/INSTALL
+--- linuxtv-dvb-apps-1.1.1/INSTALL 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/INSTALL 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,26 @@
++Requirements:
++
++For ttusb_dec_reset, you will need libusb.
++
++Building:
++
++Simply type
++$ make
++
++Build options
++ static=1 - Build all applications statically.
++ V=1 - Verbose output during build.
++ ttusb_dec_reset=1 - Build the optional ttusb_dec_reset.
++
++Installing:
++
++Install libraries and utils to /usr/[bin,include,lib,share]
++$ make install
++
++Install options
++ prefix=<...> - basic installation dir [default: /usr]
++ bindir=<...> - installation dir for applications [default: $(prefix)/bin]
++ includedir=<...> - installation dir for include files [default: $(prefix)/include]
++ libdir=<...> - installation dir for applications [default: $(prefix)/lib]
++ sharedir=<...> - installation dir for shared data [default: $(prefix)/share]
++ DESTDIR=<...> - prefix for all files, useful for packaging
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbaudio.c dvb-apps/lib/libdvbapi/dvbaudio.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbaudio.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbaudio.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,50 @@
++/*
++ * libdvbnet - a DVB network support library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <sys/param.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <sys/ioctl.h>
++#include <linux/dvb/audio.h>
++#include <errno.h>
++#include "dvbaudio.h"
++
++int dvbaudio_open(int adapter, int audiodeviceid)
++{
++ char filename[PATH_MAX+1];
++ int fd;
++
++ sprintf(filename, "/dev/dvb/adapter%i/audio%i", adapter, audiodeviceid);
++ if ((fd = open(filename, O_RDWR)) < 0) {
++ // if that failed, try a flat /dev structure
++ sprintf(filename, "/dev/dvb%i.audio%i", adapter, audiodeviceid);
++ fd = open(filename, O_RDWR);
++ }
++
++ return fd;
++}
++
++int dvbaudio_set_bypass(int fd, int bypass)
++{
++ return ioctl(fd, AUDIO_SET_BYPASS_MODE, bypass);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbaudio.h dvb-apps/lib/libdvbapi/dvbaudio.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbaudio.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbaudio.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,55 @@
++/*
++ * libdvbnet - a DVB network support library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef LIBDVBAUDIO_H
++#define LIBDVBAUDIO_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * Open a DVB audio device.
++ *
++ * @param adapter DVB adapter ID.
++ * @param audiodeviceid Id of audio device of that adapter to open.
++ * @return A unix file descriptor on success, or -1 on failure.
++ */
++extern int dvbaudio_open(int adapter, int audiodeviceid);
++
++/**
++ * Control audio bypass - i.e. output decoded audio, or the raw bitstream (e.g. AC3).
++ *
++ * @param fd Audio device opened with dvbaudio_open().
++ * @param bypass 1=> enable bypass, 0=> disable.
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbaudio_set_bypass(int fd, int bypass);
++
++// FIXME: this is a stub library
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif // LIBDVBAUDIO_H
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbca.c dvb-apps/lib/libdvbapi/dvbca.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbca.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbca.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,159 @@
++/*
++ * libdvbca - interface onto raw CA devices
++ *
++ * Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <sys/param.h>
++#include <sys/ioctl.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <ctype.h>
++#include <errno.h>
++#include <linux/dvb/ca.h>
++#include "dvbca.h"
++
++
++int dvbca_open(int adapter, int cadevice)
++{
++ char filename[PATH_MAX+1];
++ int fd;
++
++ sprintf(filename, "/dev/dvb/adapter%i/ca%i", adapter, cadevice);
++ if ((fd = open(filename, O_RDWR)) < 0) {
++ // if that failed, try a flat /dev structure
++ sprintf(filename, "/dev/dvb%i.ca%i", adapter, cadevice);
++ fd = open(filename, O_RDWR);
++ }
++
++ return fd;
++}
++
++int dvbca_reset(int fd, uint8_t slot)
++{
++ return ioctl(fd, CA_RESET, (1 << slot));
++}
++
++int dvbca_get_interface_type(int fd, uint8_t slot)
++{
++ ca_slot_info_t info;
++
++ info.num = slot;
++ if (ioctl(fd, CA_GET_SLOT_INFO, &info))
++ return -1;
++
++ if (info.type & CA_CI_LINK)
++ return DVBCA_INTERFACE_LINK;
++ if (info.type & CA_CI)
++ return DVBCA_INTERFACE_HLCI;
++
++ return -1;
++}
++
++int dvbca_get_cam_state(int fd, uint8_t slot)
++{
++ ca_slot_info_t info;
++
++ info.num = slot;
++ if (ioctl(fd, CA_GET_SLOT_INFO, &info))
++ return -1;
++
++ if (info.flags == 0)
++ return DVBCA_CAMSTATE_MISSING;
++ if (info.flags & CA_CI_MODULE_READY)
++ return DVBCA_CAMSTATE_READY;
++ if (info.flags & CA_CI_MODULE_PRESENT)
++ return DVBCA_CAMSTATE_INITIALISING;
++
++ return -1;
++}
++
++int dvbca_link_write(int fd, uint8_t slot, uint8_t connection_id,
++ uint8_t *data, uint16_t data_length)
++{
++ uint8_t *buf = malloc(data_length + 2);
++ if (buf == NULL)
++ return -1;
++
++ buf[0] = slot;
++ buf[1] = connection_id;
++ memcpy(buf+2, data, data_length);
++
++ int result = write(fd, buf, data_length+2);
++ free(buf);
++ return result;
++}
++
++int dvbca_link_read(int fd, uint8_t *slot, uint8_t *connection_id,
++ uint8_t *data, uint16_t data_length)
++{
++ int size;
++
++ uint8_t *buf = malloc(data_length + 2);
++ if (buf == NULL)
++ return -1;
++
++ if ((size = read(fd, buf, data_length+2)) < 2)
++ return -1;
++
++ *slot = buf[0];
++ *connection_id = buf[1];
++ memcpy(data, buf+2, size-2);
++ free(buf);
++
++ return size - 2;
++}
++
++int dvbca_hlci_write(int fd, uint8_t *data, uint16_t data_length)
++{
++ struct ca_msg msg;
++
++ if (data_length > 256) {
++ return -1;
++ }
++ memset(&msg, 0, sizeof(msg));
++ msg.length = data_length;
++
++ memcpy(msg.msg, data, data_length);
++
++ return ioctl(fd, CA_SEND_MSG, &msg);
++}
++
++int dvbca_hlci_read(int fd, uint32_t app_tag, uint8_t *data,
++ uint16_t data_length)
++{
++ struct ca_msg msg;
++
++ if (data_length > 256) {
++ data_length = 256;
++ }
++ memset(&msg, 0, sizeof(msg));
++ msg.length = data_length;
++ msg.msg[0] = app_tag >> 16;
++ msg.msg[1] = app_tag >> 8;
++ msg.msg[2] = app_tag;
++
++ int status = ioctl(fd, CA_GET_MSG, &msg);
++ if (status < 0) return status;
++
++ if (msg.length > data_length) msg.length = data_length;
++ memcpy(data, msg.msg, msg.length);
++ return msg.length;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbca.h dvb-apps/lib/libdvbapi/dvbca.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbca.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbca.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,135 @@
++/*
++ * libdvbca - interface onto raw CA devices
++ *
++ * Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef LIBDVBCA_H
++#define LIBDVBCA_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * The types of CA interface we support.
++ */
++#define DVBCA_INTERFACE_LINK 0
++#define DVBCA_INTERFACE_HLCI 1
++
++/**
++ * States a CAM in a slot can be in.
++ */
++#define DVBCA_CAMSTATE_MISSING 0
++#define DVBCA_CAMSTATE_INITIALISING 1
++#define DVBCA_CAMSTATE_READY 2
++
++
++/**
++ * Open a CA device. Multiple CAMs can be accessed through a CA device.
++ *
++ * @param adapter Index of the DVB adapter.
++ * @param cadevice Index of the CA device on that adapter (usually 0).
++ * @return A unix file descriptor on success, or -1 on failure.
++ */
++extern int dvbca_open(int adapter, int cadevice);
++
++/**
++ * Reset a CAM.
++ *
++ * @param fd File handle opened with dvbca_open.
++ * @param slot Slot where the requested CAM is in.
++ * @return 0 on success, -1 on failure.
++ */
++extern int dvbca_reset(int fd, uint8_t slot);
++
++/**
++ * Get the interface type of a CAM.
++ *
++ * @param fd File handle opened with dvbca_open.
++ * @param slot Slot where the requested CAM is in.
++ * @return One of the DVBCA_INTERFACE_* values, or -1 on failure.
++ */
++extern int dvbca_get_interface_type(int fd, uint8_t slot);
++
++/**
++ * Get the state of a CAM.
++ *
++ * @param fd File handle opened with dvbca_open.
++ * @param slot Slot where the requested CAM is in.
++ * @return One of the DVBCA_CAMSTATE_* values, or -1 on failure.
++ */
++extern int dvbca_get_cam_state(int fd, uint8_t slot);
++
++/**
++ * Write a message to a CAM using a link-layer interface.
++ *
++ * @param fd File handle opened with dvbca_open.
++ * @param slot Slot where the requested CAM is in.
++ * @param connection_id Connection ID of the message.
++ * @param data Data to write.
++ * @param data_length Number of bytes to write.
++ * @return 0 on success, or -1 on failure.
++ */
++extern int dvbca_link_write(int fd, uint8_t slot, uint8_t connection_id,
++ uint8_t *data, uint16_t data_length);
++
++/**
++ * Read a message from a CAM using a link-layer interface.
++ *
++ * @param fd File handle opened with dvbca_open.
++ * @param slot Slot where the responding CAM is in.
++ * @param connection_id Destination for the connection ID the message came from.
++ * @param data Data that was read.
++ * @param data_length Max number of bytes to read.
++ * @return Number of bytes read on success, or -1 on failure.
++ */
++extern int dvbca_link_read(int fd, uint8_t *slot, uint8_t *connection_id,
++ uint8_t *data, uint16_t data_length);
++
++// FIXME how do we determine which CAM slot of a CA is meant?
++/**
++ * Write a message to a CAM using an HLCI interface.
++ *
++ * @param fd File handle opened with dvbca_open.
++ * @param data Data to write.
++ * @param data_length Number of bytes to write.
++ * @return 0 on success, or -1 on failure.
++ */
++extern int dvbca_hlci_write(int fd, uint8_t *data, uint16_t data_length);
++
++// FIXME how do we determine which CAM slot of a CA is meant?
++/**
++ * Read a message from a CAM using an HLCI interface.
++ *
++ * @param fd File handle opened with dvbca_open.
++ * @param app_tag Application layer tag giving the message type to read.
++ * @param data Data that was read.
++ * @param data_length Max number of bytes to read.
++ * @return Number of bytes read on success, or -1 on failure.
++ */
++extern int dvbca_hlci_read(int fd, uint32_t app_tag, uint8_t *data,
++ uint16_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif // LIBDVBCA_H
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbdemux.c dvb-apps/lib/libdvbapi/dvbdemux.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbdemux.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbdemux.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,255 @@
++/*
++ * libdvbdemux - a DVB demux library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <sys/param.h>
++#include <sys/ioctl.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <ctype.h>
++#include <errno.h>
++#include <linux/dvb/dmx.h>
++#include "dvbdemux.h"
++
++
++int dvbdemux_open_demux(int adapter, int demuxdevice, int nonblocking)
++{
++ char filename[PATH_MAX+1];
++ int flags = O_RDWR;
++ int fd;
++
++ if (nonblocking)
++ flags |= O_NONBLOCK;
++
++ sprintf(filename, "/dev/dvb/adapter%i/demux%i", adapter, demuxdevice);
++ if ((fd = open(filename, flags)) < 0) {
++ // if that failed, try a flat /dev structure
++ sprintf(filename, "/dev/dvb%i.demux%i", adapter, demuxdevice);
++ fd = open(filename, flags);
++ }
++
++ return fd;
++}
++
++int dvbdemux_open_dvr(int adapter, int dvrdevice, int readonly, int nonblocking)
++{
++ char filename[PATH_MAX+1];
++ int flags = O_RDWR;
++ int fd;
++
++ if (readonly)
++ flags = O_RDONLY;
++ if (nonblocking)
++ flags |= O_NONBLOCK;
++
++ sprintf(filename, "/dev/dvb/adapter%i/dvr%i", adapter, dvrdevice);
++ if ((fd = open(filename, flags)) < 0) {
++ // if that failed, try a flat /dev structure
++ sprintf(filename, "/dev/dvb%i.dvr%i", adapter, dvrdevice);
++ fd = open(filename, flags);
++ }
++
++ return fd;
++}
++
++int dvbdemux_set_section_filter(int fd, int pid,
++ uint8_t filter[18], uint8_t mask[18],
++ int start, int checkcrc)
++{
++ struct dmx_sct_filter_params sctfilter;
++
++ memset(&sctfilter, 0, sizeof(sctfilter));
++ sctfilter.pid = pid;
++ memcpy(sctfilter.filter.filter, filter, 1);
++ memcpy(sctfilter.filter.filter+1, filter+3, 15);
++ memcpy(sctfilter.filter.mask, mask, 1);
++ memcpy(sctfilter.filter.mask+1, mask+3, 15);
++ memset(sctfilter.filter.mode, 0, 16);
++ if (start)
++ sctfilter.flags |= DMX_IMMEDIATE_START;
++ if (checkcrc)
++ sctfilter.flags |= DMX_CHECK_CRC;
++
++ return ioctl(fd, DMX_SET_FILTER, &sctfilter);
++}
++
++int dvbdemux_set_pes_filter(int fd, int pid,
++ int input, int output,
++ int pestype,
++ int start)
++{
++ struct dmx_pes_filter_params filter;
++
++ memset(&filter, 0, sizeof(filter));
++ filter.pid = pid;
++
++ switch(input) {
++ case DVBDEMUX_INPUT_FRONTEND:
++ filter.input = DMX_IN_FRONTEND;
++ break;
++
++ case DVBDEMUX_INPUT_DVR:
++ filter.input = DMX_IN_DVR;
++ break;
++
++ default:
++ return -EINVAL;
++ }
++
++ switch(output) {
++ case DVBDEMUX_OUTPUT_DECODER:
++ filter.output = DMX_OUT_DECODER;
++ break;
++
++ case DVBDEMUX_OUTPUT_DEMUX:
++ filter.output = DMX_OUT_TAP;
++ break;
++
++ case DVBDEMUX_OUTPUT_DVR:
++ filter.output = DMX_OUT_TS_TAP;
++ break;
++
++#ifdef DMX_OUT_TSDEMUX_TAP
++ case DVBDEMUX_OUTPUT_TS_DEMUX:
++ filter.output = DMX_OUT_TSDEMUX_TAP;
++ break;
++#endif
++
++ default:
++ return -EINVAL;
++ }
++
++ switch(pestype) {
++ case DVBDEMUX_PESTYPE_AUDIO:
++ filter.pes_type = DMX_PES_AUDIO;
++ break;
++
++ case DVBDEMUX_PESTYPE_VIDEO:
++ filter.pes_type = DMX_PES_VIDEO;
++ break;
++
++ case DVBDEMUX_PESTYPE_TELETEXT:
++ filter.pes_type = DMX_PES_TELETEXT;
++ break;
++
++ case DVBDEMUX_PESTYPE_SUBTITLE:
++ filter.pes_type = DMX_PES_SUBTITLE;
++ break;
++
++ case DVBDEMUX_PESTYPE_PCR:
++ filter.pes_type = DMX_PES_PCR;
++ break;
++
++ default:
++ return -EINVAL;
++ }
++
++ if (start)
++ filter.flags |= DMX_IMMEDIATE_START;
++
++ return ioctl(fd, DMX_SET_PES_FILTER, &filter);
++}
++
++int dvbdemux_set_pid_filter(int fd, int pid,
++ int input, int output,
++ int start)
++{
++ struct dmx_pes_filter_params filter;
++
++ memset(&filter, 0, sizeof(filter));
++ if (pid == -1)
++ filter.pid = 0x2000;
++ else
++ filter.pid = pid;
++
++ switch(input) {
++ case DVBDEMUX_INPUT_FRONTEND:
++ filter.input = DMX_IN_FRONTEND;
++ break;
++
++ case DVBDEMUX_INPUT_DVR:
++ filter.input = DMX_IN_DVR;
++ break;
++
++ default:
++ return -EINVAL;
++ }
++
++ switch(output) {
++ case DVBDEMUX_OUTPUT_DECODER:
++ filter.output = DMX_OUT_DECODER;
++ break;
++
++ case DVBDEMUX_OUTPUT_DEMUX:
++ filter.output = DMX_OUT_TAP;
++ break;
++
++ case DVBDEMUX_OUTPUT_DVR:
++ filter.output = DMX_OUT_TS_TAP;
++ break;
++
++#ifdef DMX_OUT_TSDEMUX_TAP
++ case DVBDEMUX_OUTPUT_TS_DEMUX:
++ filter.output = DMX_OUT_TSDEMUX_TAP;
++ break;
++#endif
++
++ default:
++ return -EINVAL;
++ }
++
++ filter.pes_type = DMX_PES_OTHER;
++
++ if (start)
++ filter.flags |= DMX_IMMEDIATE_START;
++
++ return ioctl(fd, DMX_SET_PES_FILTER, &filter);
++}
++
++int dvbdemux_start(int fd)
++{
++ return ioctl(fd, DMX_START);
++}
++
++int dvbdemux_stop(int fd)
++{
++ return ioctl(fd, DMX_STOP);
++}
++
++int dvbdemux_get_stc(int fd, uint64_t *stc)
++{
++ struct dmx_stc _stc;
++ int result;
++
++ memset(stc, 0, sizeof(_stc));
++ if ((result = ioctl(fd, DMX_GET_STC, &_stc)) != 0) {
++ return result;
++ }
++
++ *stc = _stc.stc / _stc.base;
++ return 0;
++}
++
++int dvbdemux_set_buffer(int fd, int bufsize)
++{
++ return ioctl(fd, DMX_SET_BUFFER_SIZE, bufsize);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbdemux.h dvb-apps/lib/libdvbapi/dvbdemux.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbdemux.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbdemux.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,204 @@
++/*
++ * libdvbdemux - a DVB demux library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef LIBDVBDEMUX_H
++#define LIBDVBDEMUX_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * Source of the data to be demuxed.
++ *
++ * FRONTEND. The data will be read from the frontend on the adapter.
++ *
++ * DVR. The data will be read from the DVR device of the adapter (of course,
++ * you need to write data TO the DVR device as well).
++ */
++#define DVBDEMUX_INPUT_FRONTEND 0
++#define DVBDEMUX_INPUT_DVR 1
++
++/**
++ * Destination of the demuxed data.
++ *
++ * DECODER. Sends the data directly to a hardware decoder (if present).
++ *
++ * DEMUX. Sends the PID stream to the current demux file descriptor. HOWEVER, the
++ * data will be the payload *only* - transport stream headers will be stripped.
++ *
++ * DVR sends the data to the DVR device. The data will be the complete transport
++ * stream packets with headers intact. Note: if multiple filters specify
++ * DVBDEMUX_OUTPUT_DVR, the individual PID streams will be re-multiplexed
++ * together.
++ */
++#define DVBDEMUX_OUTPUT_DECODER 0
++#define DVBDEMUX_OUTPUT_DEMUX 1
++#define DVBDEMUX_OUTPUT_DVR 2
++#define DVBDEMUX_OUTPUT_TS_DEMUX 3
++
++/**
++ * PES types.
++ */
++#define DVBDEMUX_PESTYPE_AUDIO 0
++#define DVBDEMUX_PESTYPE_VIDEO 1
++#define DVBDEMUX_PESTYPE_TELETEXT 2
++#define DVBDEMUX_PESTYPE_SUBTITLE 3
++#define DVBDEMUX_PESTYPE_PCR 4
++
++
++/**
++ * Open a demux device. Can be called multiple times. These let you setup a
++ * single filter per FD. It can can also be read() from if you use a section
++ * filter, or create a pes_filter or raw_filter with output DVBDEMUX_OUTPUT_DEMUX.
++ *
++ * @param adapter Index of the DVB adapter.
++ * @param demuxdevice Index of the demux device on that adapter (usually 0).
++ * @param nonblocking If 1, frontend will be opened in nonblocking mode.
++ * @return A unix file descriptor on success, or -1 on failure.
++ */
++extern int dvbdemux_open_demux(int adapter, int demuxdevice, int nonblocking);
++
++/**
++ * Open a DVR device. May be opened for writing or reading once.
++ * It is used to either write() transport stream data to be demuxed
++ * (if input == DVBDEMUX_INPUT_DVR), or to read() a stream of demuxed data
++ * (if output == DVBDEMUX_OUTPUT_DVR).
++ *
++ * Note, all demux filters with output set to DVBDEMUX_OUTPUT_DVR will be
++ * multiplexed together and output their data on this device.
++ *
++ * @param adapter Index of the DVB adapter.
++ * @param dvrdevice Index of the dvr device on that adapter (usually 0)
++ * @param readonly If 1, frontend will be opened in readonly mode only.
++ * @param nonblocking If 1, frontend will be opened in nonblocking mode.
++ * @return A unix file descriptor on success, or -1 on failure.
++ */
++extern int dvbdemux_open_dvr(int adapter, int dvrdevice, int readonly, int nonblocking);
++
++/**
++ * Set filter for the first 18 bytes of decoded SI table sections. Note that
++ * bytes 1 and 2 are _not_ filtered since they contain the length field.
++ *
++ * Conceptually, the driver computes the following for each filtered bit.
++ *
++ * (filter[X].bit[Y] & mask[X].bit[Y]) == (header[X].bit[Y] & mask[X].bit[Y])
++ *
++ * Any sections which do not match this criteria for every bit will be discarded.
++ *
++ * The SI data is always read from the frontend, and is always returned by
++ * read()ing the demux fd. FIXME: check this statement!
++ *
++ * @param fd FD as opened with dvbdemux_open_demux() above.
++ * @param pid PID of the stream.
++ * @param filter The filter values of the first 18 bytes of the desired sections.
++ * @param mask Bitmask indicating which bits in the filter array should be tested
++ * (if a bit is 1, it will be tested).
++ * @param start If 1, the filter will be started immediately. Otherwise you must
++ * call dvbdemux_start() manually.
++ * @param checkcrc If 1, the driver will check the CRC on the table sections.
++ * Any bad sections will be dropped.
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbdemux_set_section_filter(int fd, int pid,
++ uint8_t filter[18], uint8_t mask[18],
++ int start, int checkcrc);
++
++/**
++ * Set filter for a stream of PES data. This call can only used for cards
++ * equipped with a hardware decoder.
++ *
++ * @param fd FD as opened with dvbdemux_open_demux() above.
++ * @param pid PID of the stream.
++ * @param input One of DVBDEMUX_INPUT_*.
++ * @param output One of DVBDEMUX_OUTPUT_*.
++ * @param pestype One of DVBDEMUX_PESTYPE_* - this tells the decoder the type
++ * of data in this stream.
++ * @param start If 1, the filter will be started immediately. Otherwise you must
++ * call dvbdemux_start() manually.
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbdemux_set_pes_filter(int fd, int pid,
++ int input, int output,
++ int pestype,
++ int start);
++
++/**
++ * Create a pid filter - this will extract transport stream packets for a
++ * specified PID.
++ *
++ * Note: The wildcard PID can only be used on "budget" cards.
++ *
++ * @param fd FD as opened with dvbdemux_open_demux() above.
++ * @param pid PID to retrieve, or use -1 as a wildcard for ALL PIDs.
++ * @param input One of DVBDEMUX_INPUT_*.
++ * @param output One of DVBDEMUX_OUTPUT_*.
++ * @param start If 1, the filter will be started immediately. Otherwise you must
++ * call dvbdemux_start() manually.
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbdemux_set_pid_filter(int fd, int pid,
++ int input, int output,
++ int start);
++
++/**
++ * Start a demux going.
++ *
++ * @param fd FD as opened with dvbdemux_open_demux() above.
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbdemux_start(int fd);
++
++/**
++ * Stop a demux.
++ *
++ * @param fd FD as opened with dvbdemux_open_demux() above.
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbdemux_stop(int fd);
++
++/**
++ * Retrieve the current STC from the demux. This call can only used for cards
++ * equipped with a hardware decoder.
++ *
++ * @param fd FD as opened with dvbdemux_open_demux() above.
++ * @param stc Where to put the retrieved STC value (in 90kHz clock).
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbdemux_get_stc(int fd, uint64_t *stc);
++
++/**
++ * Change the internal buffer size used by the demuxer. The default buffer size
++ * is 8192 bytes. Can only be used if the demux in question is stopped.
++ *
++ * @param fd FD as opened with dvbdemux_open_demux() above.
++ * @param bufsize New buffer size to use.
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbdemux_set_buffer(int fd, int bufsize);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif // LIBDVBDEMUX_H
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbfe.c dvb-apps/lib/libdvbapi/dvbfe.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbfe.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbfe.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,574 @@
++/*
++ * libdvbfe - a DVB frontend library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#define _GNU_SOURCE
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <sys/param.h>
++#include <sys/ioctl.h>
++#include <sys/time.h>
++#include <sys/poll.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <ctype.h>
++#include <errno.h>
++#include <linux/dvb/frontend.h>
++#include <libdvbmisc/dvbmisc.h>
++#include "dvbfe.h"
++
++int verbose = 0;
++
++static int dvbfe_spectral_inversion_to_kapi[][2] =
++{
++ { DVBFE_INVERSION_OFF, INVERSION_OFF },
++ { DVBFE_INVERSION_ON, INVERSION_ON },
++ { DVBFE_INVERSION_AUTO, INVERSION_AUTO },
++ { -1, -1 }
++};
++
++static int dvbfe_code_rate_to_kapi[][2] =
++{
++ { DVBFE_FEC_NONE, FEC_NONE },
++ { DVBFE_FEC_1_2, FEC_1_2 },
++ { DVBFE_FEC_2_3, FEC_2_3 },
++ { DVBFE_FEC_3_4, FEC_3_4 },
++ { DVBFE_FEC_4_5, FEC_4_5 },
++ { DVBFE_FEC_5_6, FEC_5_6 },
++ { DVBFE_FEC_6_7, FEC_6_7 },
++ { DVBFE_FEC_7_8, FEC_7_8 },
++ { DVBFE_FEC_8_9, FEC_8_9 },
++ { DVBFE_FEC_AUTO, FEC_AUTO },
++ { -1, -1 }
++};
++
++static int dvbfe_dvbt_const_to_kapi[][2] =
++{
++ { DVBFE_DVBT_CONST_QPSK, FE_QPSK },
++ { DVBFE_DVBT_CONST_QAM_16, QAM_16 },
++ { DVBFE_DVBT_CONST_QAM_32, QAM_32 },
++ { DVBFE_DVBT_CONST_QAM_64, QAM_64 },
++ { DVBFE_DVBT_CONST_QAM_128, QAM_128 },
++ { DVBFE_DVBT_CONST_QAM_256, QAM_256 },
++ { DVBFE_DVBT_CONST_AUTO, QAM_AUTO },
++ { -1, -1 }
++};
++
++static int dvbfe_dvbc_mod_to_kapi[][2] =
++{
++ { DVBFE_DVBC_MOD_QAM_16, QAM_16 },
++ { DVBFE_DVBC_MOD_QAM_32, QAM_32 },
++ { DVBFE_DVBC_MOD_QAM_64, QAM_64 },
++ { DVBFE_DVBC_MOD_QAM_128, QAM_128 },
++ { DVBFE_DVBC_MOD_QAM_256, QAM_256 },
++ { DVBFE_DVBC_MOD_AUTO, QAM_AUTO },
++ { -1, -1 }
++};
++
++static int dvbfe_atsc_mod_to_kapi[][2] =
++{
++ { DVBFE_ATSC_MOD_QAM_64, QAM_64 },
++ { DVBFE_ATSC_MOD_QAM_256, QAM_256 },
++ { DVBFE_ATSC_MOD_VSB_8, VSB_8 },
++ { DVBFE_ATSC_MOD_VSB_16, VSB_16 },
++ { DVBFE_ATSC_MOD_AUTO, QAM_AUTO },
++ { -1, -1 }
++};
++
++static int dvbfe_dvbt_transmit_mode_to_kapi[][2] =
++{
++ { DVBFE_DVBT_TRANSMISSION_MODE_2K, TRANSMISSION_MODE_2K },
++ { DVBFE_DVBT_TRANSMISSION_MODE_8K, TRANSMISSION_MODE_8K },
++ { DVBFE_DVBT_TRANSMISSION_MODE_AUTO, TRANSMISSION_MODE_AUTO },
++ { -1, -1 }
++};
++
++static int dvbfe_dvbt_bandwidth_to_kapi[][2] =
++{
++ { DVBFE_DVBT_BANDWIDTH_8_MHZ, BANDWIDTH_8_MHZ },
++ { DVBFE_DVBT_BANDWIDTH_7_MHZ, BANDWIDTH_7_MHZ },
++ { DVBFE_DVBT_BANDWIDTH_6_MHZ, BANDWIDTH_6_MHZ },
++ { DVBFE_DVBT_BANDWIDTH_AUTO, BANDWIDTH_AUTO },
++ { -1, -1 }
++};
++
++static int dvbfe_dvbt_guard_interval_to_kapi[][2] =
++{
++ { DVBFE_DVBT_GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_32},
++ { DVBFE_DVBT_GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_16},
++ { DVBFE_DVBT_GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_8},
++ { DVBFE_DVBT_GUARD_INTERVAL_1_4, GUARD_INTERVAL_1_4},
++ { DVBFE_DVBT_GUARD_INTERVAL_AUTO, GUARD_INTERVAL_AUTO},
++ { -1, -1 }
++};
++
++static int dvbfe_dvbt_hierarchy_to_kapi[][2] =
++{
++ { DVBFE_DVBT_HIERARCHY_NONE, HIERARCHY_NONE },
++ { DVBFE_DVBT_HIERARCHY_1, HIERARCHY_1 },
++ { DVBFE_DVBT_HIERARCHY_2, HIERARCHY_2 },
++ { DVBFE_DVBT_HIERARCHY_4, HIERARCHY_4 },
++ { DVBFE_DVBT_HIERARCHY_AUTO, HIERARCHY_AUTO },
++ { -1, -1 }
++};
++
++
++static int lookupval(int val, int reverse, int table[][2])
++{
++ int i =0;
++
++ while(table[i][0] != -1) {
++ if (!reverse) {
++ if (val == table[i][0]) {
++ return table[i][1];
++ }
++ } else {
++ if (val == table[i][1]) {
++ return table[i][0];
++ }
++ }
++ i++;
++ }
++
++ return -1;
++}
++
++
++struct dvbfe_handle {
++ int fd;
++ enum dvbfe_type type;
++ char *name;
++};
++
++struct dvbfe_handle *dvbfe_open(int adapter, int frontend, int readonly)
++{
++ char filename[PATH_MAX+1];
++ struct dvbfe_handle *fehandle;
++ int fd;
++ struct dvb_frontend_info info;
++
++ // flags
++ int flags = O_RDWR;
++ if (readonly) {
++ flags = O_RDONLY;
++ }
++
++ // open it (try normal /dev structure first)
++ sprintf(filename, "/dev/dvb/adapter%i/frontend%i", adapter, frontend);
++ if ((fd = open(filename, flags)) < 0) {
++ // if that failed, try a flat /dev structure
++ sprintf(filename, "/dev/dvb%i.frontend%i", adapter, frontend);
++ if ((fd = open(filename, flags)) < 0) {
++ return NULL;
++ }
++ }
++
++ // determine fe type
++ if (ioctl(fd, FE_GET_INFO, &info)) {
++ close(fd);
++ return NULL;
++ }
++
++ // setup structure
++ fehandle = (struct dvbfe_handle*) malloc(sizeof(struct dvbfe_handle));
++ memset(fehandle, 0, sizeof(struct dvbfe_handle));
++ fehandle->fd = fd;
++ switch(info.type) {
++ case FE_QPSK:
++ fehandle->type = DVBFE_TYPE_DVBS;
++ break;
++
++ case FE_QAM:
++ fehandle->type = DVBFE_TYPE_DVBC;
++ break;
++
++ case FE_OFDM:
++ fehandle->type = DVBFE_TYPE_DVBT;
++ break;
++
++ case FE_ATSC:
++ fehandle->type = DVBFE_TYPE_ATSC;
++ break;
++ }
++ fehandle->name = strndup(info.name, sizeof(info.name));
++
++ // done
++ return fehandle;
++}
++
++void dvbfe_close(struct dvbfe_handle *fehandle)
++{
++ close(fehandle->fd);
++ free(fehandle->name);
++ free(fehandle);
++}
++
++extern int dvbfe_get_info(struct dvbfe_handle *fehandle,
++ enum dvbfe_info_mask querymask,
++ struct dvbfe_info *result,
++ enum dvbfe_info_querytype querytype,
++ int timeout)
++{
++ int returnval = 0;
++ struct dvb_frontend_event kevent;
++ int ok = 0;
++
++ result->name = fehandle->name;
++ result->type = fehandle->type;
++
++ switch(querytype) {
++ case DVBFE_INFO_QUERYTYPE_IMMEDIATE:
++ if (querymask & DVBFE_INFO_LOCKSTATUS) {
++ if (!ioctl(fehandle->fd, FE_READ_STATUS, &kevent.status)) {
++ returnval |= DVBFE_INFO_LOCKSTATUS;
++ }
++ }
++ if (querymask & DVBFE_INFO_FEPARAMS) {
++ if (!ioctl(fehandle->fd, FE_GET_FRONTEND, &kevent.parameters)) {
++ returnval |= DVBFE_INFO_FEPARAMS;
++ }
++ }
++ break;
++
++ case DVBFE_INFO_QUERYTYPE_LOCKCHANGE:
++ {
++ struct pollfd pollfd;
++ pollfd.fd = fehandle->fd;
++ pollfd.events = POLLIN | POLLERR;
++
++ ok = 1;
++ if (poll(&pollfd, 1, timeout) < 0)
++ ok = 0;
++ if (pollfd.revents & POLLERR)
++ ok = 0;
++ if (!(pollfd.revents & POLLIN))
++ ok = 0;
++ }
++
++ if (ok &&
++ ((querymask & DVBFE_INFO_LOCKSTATUS) ||
++ (querymask & DVBFE_INFO_FEPARAMS))) {
++ if (!ioctl(fehandle->fd, FE_GET_EVENT, &kevent)) {
++ if (querymask & DVBFE_INFO_LOCKSTATUS)
++ returnval |= DVBFE_INFO_LOCKSTATUS;
++ if (querymask & DVBFE_INFO_FEPARAMS)
++ returnval |= DVBFE_INFO_FEPARAMS;
++ }
++ }
++ break;
++ }
++
++ if (returnval & DVBFE_INFO_LOCKSTATUS) {
++ result->signal = kevent.status & FE_HAS_SIGNAL ? 1 : 0;
++ result->carrier = kevent.status & FE_HAS_CARRIER ? 1 : 0;
++ result->viterbi = kevent.status & FE_HAS_VITERBI ? 1 : 0;
++ result->sync = kevent.status & FE_HAS_SYNC ? 1 : 0;
++ result->lock = kevent.status & FE_HAS_LOCK ? 1 : 0;
++ }
++
++ if (returnval & DVBFE_INFO_FEPARAMS) {
++ result->feparams.frequency = kevent.parameters.frequency;
++ result->feparams.inversion = lookupval(kevent.parameters.inversion, 1, dvbfe_spectral_inversion_to_kapi);
++ switch(fehandle->type) {
++ case FE_QPSK:
++ result->feparams.u.dvbs.symbol_rate = kevent.parameters.u.qpsk.symbol_rate;
++ result->feparams.u.dvbs.fec_inner =
++ lookupval(kevent.parameters.u.qpsk.fec_inner, 1, dvbfe_code_rate_to_kapi);
++ break;
++
++ case FE_QAM:
++ result->feparams.u.dvbc.symbol_rate = kevent.parameters.u.qam.symbol_rate;
++ result->feparams.u.dvbc.fec_inner =
++ lookupval(kevent.parameters.u.qam.fec_inner, 1, dvbfe_code_rate_to_kapi);
++ result->feparams.u.dvbc.modulation =
++ lookupval(kevent.parameters.u.qam.modulation, 1, dvbfe_dvbc_mod_to_kapi);
++ break;
++
++ case FE_OFDM:
++ result->feparams.u.dvbt.bandwidth =
++ lookupval(kevent.parameters.u.ofdm.bandwidth, 1, dvbfe_dvbt_bandwidth_to_kapi);
++ result->feparams.u.dvbt.code_rate_HP =
++ lookupval(kevent.parameters.u.ofdm.code_rate_HP, 1, dvbfe_code_rate_to_kapi);
++ result->feparams.u.dvbt.code_rate_LP =
++ lookupval(kevent.parameters.u.ofdm.code_rate_LP, 1, dvbfe_code_rate_to_kapi);
++ result->feparams.u.dvbt.constellation =
++ lookupval(kevent.parameters.u.ofdm.constellation, 1, dvbfe_dvbt_const_to_kapi);
++ result->feparams.u.dvbt.transmission_mode =
++ lookupval(kevent.parameters.u.ofdm.transmission_mode, 1, dvbfe_dvbt_transmit_mode_to_kapi);
++ result->feparams.u.dvbt.guard_interval =
++ lookupval(kevent.parameters.u.ofdm.guard_interval, 1, dvbfe_dvbt_guard_interval_to_kapi);
++ result->feparams.u.dvbt.hierarchy_information =
++ lookupval(kevent.parameters.u.ofdm.hierarchy_information, 1, dvbfe_dvbt_hierarchy_to_kapi);
++ break;
++
++ case FE_ATSC:
++ result->feparams.u.atsc.modulation =
++ lookupval(kevent.parameters.u.vsb.modulation, 1, dvbfe_atsc_mod_to_kapi);
++ break;
++ }
++ }
++
++ if (querymask & DVBFE_INFO_BER) {
++ if (!ioctl(fehandle->fd, FE_READ_BER, &result->ber))
++ returnval |= DVBFE_INFO_BER;
++ }
++ if (querymask & DVBFE_INFO_SIGNAL_STRENGTH) {
++ if (!ioctl(fehandle->fd, FE_READ_SIGNAL_STRENGTH, &result->signal_strength))
++ returnval |= DVBFE_INFO_SIGNAL_STRENGTH;
++ }
++ if (querymask & DVBFE_INFO_SNR) {
++ if (!ioctl(fehandle->fd, FE_READ_SNR, &result->snr))
++ returnval |= DVBFE_INFO_SNR;
++ }
++ if (querymask & DVBFE_INFO_UNCORRECTED_BLOCKS) {
++ if (!ioctl(fehandle->fd, FE_READ_UNCORRECTED_BLOCKS, &result->ucblocks))
++ returnval |= DVBFE_INFO_UNCORRECTED_BLOCKS;
++ }
++
++ // done
++ return returnval;
++}
++
++int dvbfe_set(struct dvbfe_handle *fehandle,
++ struct dvbfe_parameters *params,
++ int timeout)
++{
++ struct dvb_frontend_parameters kparams;
++ int res;
++ struct timeval endtime;
++ fe_status_t status;
++
++ kparams.frequency = params->frequency;
++ kparams.inversion = lookupval(params->inversion, 0, dvbfe_spectral_inversion_to_kapi);
++ switch(fehandle->type) {
++ case FE_QPSK:
++ kparams.u.qpsk.symbol_rate = params->u.dvbs.symbol_rate;
++ kparams.u.qpsk.fec_inner = lookupval(params->u.dvbs.fec_inner, 0, dvbfe_code_rate_to_kapi);
++ break;
++
++ case FE_QAM:
++ kparams.u.qam.symbol_rate = params->u.dvbc.symbol_rate;
++ kparams.u.qam.fec_inner = lookupval(params->u.dvbc.fec_inner, 0, dvbfe_code_rate_to_kapi);
++ kparams.u.qam.modulation = lookupval(params->u.dvbc.modulation, 0, dvbfe_dvbc_mod_to_kapi);
++ break;
++
++ case FE_OFDM:
++ kparams.u.ofdm.bandwidth = lookupval(params->u.dvbt.bandwidth, 0, dvbfe_dvbt_bandwidth_to_kapi);
++ kparams.u.ofdm.code_rate_HP = lookupval(params->u.dvbt.code_rate_HP, 0, dvbfe_code_rate_to_kapi);
++ kparams.u.ofdm.code_rate_LP = lookupval(params->u.dvbt.code_rate_LP, 0, dvbfe_code_rate_to_kapi);
++ kparams.u.ofdm.constellation = lookupval(params->u.dvbt.constellation, 0, dvbfe_dvbt_const_to_kapi);
++ kparams.u.ofdm.transmission_mode =
++ lookupval(params->u.dvbt.transmission_mode, 0, dvbfe_dvbt_transmit_mode_to_kapi);
++ kparams.u.ofdm.guard_interval =
++ lookupval(params->u.dvbt.guard_interval, 0, dvbfe_dvbt_guard_interval_to_kapi);
++ kparams.u.ofdm.hierarchy_information =
++ lookupval(params->u.dvbt.hierarchy_information, 0, dvbfe_dvbt_hierarchy_to_kapi);
++ break;
++
++ case FE_ATSC:
++ kparams.u.vsb.modulation = lookupval(params->u.atsc.modulation, 0, dvbfe_atsc_mod_to_kapi);
++ break;
++
++ default:
++ return -EINVAL;
++ }
++
++ // set it and check for error
++ res = ioctl(fehandle->fd, FE_SET_FRONTEND, &kparams);
++ if (res)
++ return res;
++
++ // 0 => return immediately
++ if (timeout == 0) {
++ return 0;
++ }
++
++ /* calculate timeout */
++ if (timeout > 0) {
++ gettimeofday(&endtime, NULL);
++ timeout *= 1000;
++ endtime.tv_sec += timeout / 1000000;
++ endtime.tv_usec += timeout % 1000000;
++ }
++
++ /* wait for a lock */
++ while(1) {
++ /* has it locked? */
++ if (!ioctl(fehandle->fd, FE_READ_STATUS, &status)) {
++ if (status & FE_HAS_LOCK) {
++ break;
++ }
++ }
++
++ /* check for timeout */
++ if (timeout > 0) {
++ struct timeval curtime;
++ gettimeofday(&curtime, NULL);
++ if ((curtime.tv_sec > endtime.tv_sec) ||
++ ((curtime.tv_sec == endtime.tv_sec) && (curtime.tv_usec >= endtime.tv_usec))) {
++ break;
++ }
++ }
++
++ /* delay for a bit */
++ usleep(100000);
++ }
++
++ /* exit */
++ if (status & FE_HAS_LOCK)
++ return 0;
++ return -ETIMEDOUT;
++}
++
++int dvbfe_get_pollfd(struct dvbfe_handle *handle)
++{
++ return handle->fd;
++}
++
++int dvbfe_set_22k_tone(struct dvbfe_handle *fehandle, enum dvbfe_sec_tone_mode tone)
++{
++ int ret = 0;
++
++ switch (tone) {
++ case DVBFE_SEC_TONE_OFF:
++ ret = ioctl(fehandle->fd, FE_SET_TONE, SEC_TONE_OFF);
++ break;
++ case DVBFE_SEC_TONE_ON:
++ ret = ioctl(fehandle->fd, FE_SET_TONE, SEC_TONE_ON);
++ break;
++ default:
++ print(verbose, ERROR, 1, "Invalid command !");
++ break;
++ }
++ if (ret == -1)
++ print(verbose, ERROR, 1, "IOCTL failed !");
++
++ return ret;
++}
++
++int dvbfe_set_tone_data_burst(struct dvbfe_handle *fehandle, enum dvbfe_sec_mini_cmd minicmd)
++{
++ int ret = 0;
++
++ switch (minicmd) {
++ case DVBFE_SEC_MINI_A:
++ ret = ioctl(fehandle->fd, FE_DISEQC_SEND_BURST, SEC_MINI_A);
++ break;
++ case DVBFE_SEC_MINI_B:
++ ret = ioctl(fehandle->fd, FE_DISEQC_SEND_BURST, SEC_MINI_B);
++ break;
++ default:
++ print(verbose, ERROR, 1, "Invalid command");
++ break;
++ }
++ if (ret == -1)
++ print(verbose, ERROR, 1, "IOCTL failed");
++
++ return ret;
++}
++
++int dvbfe_set_voltage(struct dvbfe_handle *fehandle, enum dvbfe_sec_voltage voltage)
++{
++ int ret = 0;
++
++ switch (voltage) {
++ case DVBFE_SEC_VOLTAGE_OFF:
++ ret = ioctl(fehandle->fd, FE_SET_VOLTAGE, SEC_VOLTAGE_OFF);
++ break;
++ case DVBFE_SEC_VOLTAGE_13:
++ ret = ioctl(fehandle->fd, FE_SET_VOLTAGE, SEC_VOLTAGE_13);
++ break;
++ case DVBFE_SEC_VOLTAGE_18:
++ ret = ioctl(fehandle->fd, FE_SET_VOLTAGE, SEC_VOLTAGE_18);
++ break;
++ default:
++ print(verbose, ERROR, 1, "Invalid command");
++ break;
++ }
++ if (ret == -1)
++ print(verbose, ERROR, 1, "IOCTL failed");
++
++ return ret;
++}
++
++int dvbfe_set_high_lnb_voltage(struct dvbfe_handle *fehandle, int on)
++{
++ switch (on) {
++ case 0:
++ ioctl(fehandle->fd, FE_ENABLE_HIGH_LNB_VOLTAGE, 0);
++ break;
++ default:
++ ioctl(fehandle->fd, FE_ENABLE_HIGH_LNB_VOLTAGE, 1);
++ break;
++ }
++ return 0;
++}
++
++int dvbfe_do_dishnetworks_legacy_command(struct dvbfe_handle *fehandle, unsigned int cmd)
++{
++ int ret = 0;
++
++ ret = ioctl(fehandle->fd, FE_DISHNETWORK_SEND_LEGACY_CMD, cmd);
++ if (ret == -1)
++ print(verbose, ERROR, 1, "IOCTL failed");
++
++ return ret;
++}
++
++int dvbfe_do_diseqc_command(struct dvbfe_handle *fehandle, uint8_t *data, uint8_t len)
++{
++ int ret = 0;
++ struct dvb_diseqc_master_cmd diseqc_message;
++
++ if (len > 6)
++ return -EINVAL;
++
++ diseqc_message.msg_len = len;
++ memcpy(diseqc_message.msg, data, len);
++
++ ret = ioctl(fehandle->fd, FE_DISEQC_SEND_MASTER_CMD, &diseqc_message);
++ if (ret == -1)
++ print(verbose, ERROR, 1, "IOCTL failed");
++
++ return ret;
++}
++
++int dvbfe_diseqc_read(struct dvbfe_handle *fehandle, int timeout, unsigned char *buf, unsigned int len)
++{
++ struct dvb_diseqc_slave_reply reply;
++ int result;
++
++ if (len > 4)
++ len = 4;
++
++ reply.timeout = timeout;
++ reply.msg_len = len;
++
++ if ((result = ioctl(fehandle->fd, FE_DISEQC_RECV_SLAVE_REPLY, reply)) != 0)
++ return result;
++
++ if (reply.msg_len < len)
++ len = reply.msg_len;
++ memcpy(buf, reply.msg, len);
++
++ return len;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbfe.h dvb-apps/lib/libdvbapi/dvbfe.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbfe.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbfe.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,333 @@
++/*
++ * libdvbfe - a DVB frontend library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef LIBDVBFE_H
++#define LIBDVBFE_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * The types of frontend we support.
++ */
++enum dvbfe_type {
++ DVBFE_TYPE_DVBS,
++ DVBFE_TYPE_DVBC,
++ DVBFE_TYPE_DVBT,
++ DVBFE_TYPE_ATSC,
++};
++
++enum dvbfe_spectral_inversion {
++ DVBFE_INVERSION_OFF,
++ DVBFE_INVERSION_ON,
++ DVBFE_INVERSION_AUTO
++};
++
++enum dvbfe_code_rate {
++ DVBFE_FEC_NONE,
++ DVBFE_FEC_1_2,
++ DVBFE_FEC_2_3,
++ DVBFE_FEC_3_4,
++ DVBFE_FEC_4_5,
++ DVBFE_FEC_5_6,
++ DVBFE_FEC_6_7,
++ DVBFE_FEC_7_8,
++ DVBFE_FEC_8_9,
++ DVBFE_FEC_AUTO
++};
++
++enum dvbfe_dvbt_const {
++ DVBFE_DVBT_CONST_QPSK,
++ DVBFE_DVBT_CONST_QAM_16,
++ DVBFE_DVBT_CONST_QAM_32,
++ DVBFE_DVBT_CONST_QAM_64,
++ DVBFE_DVBT_CONST_QAM_128,
++ DVBFE_DVBT_CONST_QAM_256,
++ DVBFE_DVBT_CONST_AUTO
++};
++
++enum dvbfe_dvbc_mod {
++ DVBFE_DVBC_MOD_QAM_16,
++ DVBFE_DVBC_MOD_QAM_32,
++ DVBFE_DVBC_MOD_QAM_64,
++ DVBFE_DVBC_MOD_QAM_128,
++ DVBFE_DVBC_MOD_QAM_256,
++ DVBFE_DVBC_MOD_AUTO,
++};
++
++enum dvbfe_atsc_mod {
++ DVBFE_ATSC_MOD_QAM_64,
++ DVBFE_ATSC_MOD_QAM_256,
++ DVBFE_ATSC_MOD_VSB_8,
++ DVBFE_ATSC_MOD_VSB_16,
++ DVBFE_ATSC_MOD_AUTO
++};
++
++enum dvbfe_dvbt_transmit_mode {
++ DVBFE_DVBT_TRANSMISSION_MODE_2K,
++ DVBFE_DVBT_TRANSMISSION_MODE_8K,
++ DVBFE_DVBT_TRANSMISSION_MODE_AUTO
++};
++
++enum dvbfe_dvbt_bandwidth {
++ DVBFE_DVBT_BANDWIDTH_8_MHZ,
++ DVBFE_DVBT_BANDWIDTH_7_MHZ,
++ DVBFE_DVBT_BANDWIDTH_6_MHZ,
++ DVBFE_DVBT_BANDWIDTH_AUTO
++};
++
++enum dvbfe_dvbt_guard_interval {
++ DVBFE_DVBT_GUARD_INTERVAL_1_32,
++ DVBFE_DVBT_GUARD_INTERVAL_1_16,
++ DVBFE_DVBT_GUARD_INTERVAL_1_8,
++ DVBFE_DVBT_GUARD_INTERVAL_1_4,
++ DVBFE_DVBT_GUARD_INTERVAL_AUTO
++};
++
++enum dvbfe_dvbt_hierarchy {
++ DVBFE_DVBT_HIERARCHY_NONE,
++ DVBFE_DVBT_HIERARCHY_1,
++ DVBFE_DVBT_HIERARCHY_2,
++ DVBFE_DVBT_HIERARCHY_4,
++ DVBFE_DVBT_HIERARCHY_AUTO
++};
++
++/**
++ * Structure used to store and communicate frontend parameters.
++ */
++struct dvbfe_parameters {
++ uint32_t frequency;
++ enum dvbfe_spectral_inversion inversion;
++ union {
++ struct {
++ uint32_t symbol_rate;
++ enum dvbfe_code_rate fec_inner;
++ } dvbs;
++
++ struct {
++ uint32_t symbol_rate;
++ enum dvbfe_code_rate fec_inner;
++ enum dvbfe_dvbc_mod modulation;
++ } dvbc;
++
++ struct {
++ enum dvbfe_dvbt_bandwidth bandwidth;
++ enum dvbfe_code_rate code_rate_HP;
++ enum dvbfe_code_rate code_rate_LP;
++ enum dvbfe_dvbt_const constellation;
++ enum dvbfe_dvbt_transmit_mode transmission_mode;
++ enum dvbfe_dvbt_guard_interval guard_interval;
++ enum dvbfe_dvbt_hierarchy hierarchy_information;
++ } dvbt;
++
++ struct {
++ enum dvbfe_atsc_mod modulation;
++ } atsc;
++ } u;
++};
++
++enum dvbfe_sec_voltage {
++ DVBFE_SEC_VOLTAGE_13,
++ DVBFE_SEC_VOLTAGE_18,
++ DVBFE_SEC_VOLTAGE_OFF
++};
++
++enum dvbfe_sec_tone_mode {
++ DVBFE_SEC_TONE_ON,
++ DVBFE_SEC_TONE_OFF
++};
++
++enum dvbfe_sec_mini_cmd {
++ DVBFE_SEC_MINI_A,
++ DVBFE_SEC_MINI_B
++};
++
++/**
++ * Mask of values used in the dvbfe_get_info() call.
++ */
++enum dvbfe_info_mask {
++ DVBFE_INFO_LOCKSTATUS = 0x01,
++ DVBFE_INFO_FEPARAMS = 0x02,
++ DVBFE_INFO_BER = 0x04,
++ DVBFE_INFO_SIGNAL_STRENGTH = 0x08,
++ DVBFE_INFO_SNR = 0x10,
++ DVBFE_INFO_UNCORRECTED_BLOCKS = 0x20,
++};
++
++/**
++ * Structure containing values used by the dvbfe_get_info() call.
++ */
++struct dvbfe_info {
++ enum dvbfe_type type; /* always retrieved */
++ const char *name; /* always retrieved */
++ unsigned int signal : 1; /* } DVBFE_INFO_LOCKSTATUS */
++ unsigned int carrier : 1; /* } */
++ unsigned int viterbi : 1; /* } */
++ unsigned int sync : 1; /* } */
++ unsigned int lock : 1; /* } */
++ struct dvbfe_parameters feparams; /* DVBFE_INFO_FEPARAMS */
++ uint32_t ber; /* DVBFE_INFO_BER */
++ uint16_t signal_strength; /* DVBFE_INFO_SIGNAL_STRENGTH */
++ uint16_t snr; /* DVBFE_INFO_SNR */
++ uint32_t ucblocks; /* DVBFE_INFO_UNCORRECTED_BLOCKS */
++};
++
++/**
++ * Possible types of query used in dvbfe_get_info.
++ *
++ * DVBFE_INFO_QUERYTYPE_IMMEDIATE - interrogate frontend for most up to date values.
++ * DVBFE_INFO_QUERYTYPE_LOCKCHANGE - return details from queued lock status
++ * change events, or wait for one to occur
++ * if none are queued.
++ */
++enum dvbfe_info_querytype {
++ DVBFE_INFO_QUERYTYPE_IMMEDIATE,
++ DVBFE_INFO_QUERYTYPE_LOCKCHANGE,
++};
++
++
++/**
++ * Frontend handle datatype.
++ */
++struct dvbfe_handle;
++
++/**
++ * Open a DVB frontend.
++ *
++ * @param adapter DVB adapter ID.
++ * @param frontend Frontend ID of that adapter to open.
++ * @param readonly If 1, frontend will be opened in readonly mode only.
++ * @return A handle on success, or NULL on failure.
++ */
++extern struct dvbfe_handle *dvbfe_open(int adapter, int frontend, int readonly);
++
++/**
++ * Close a DVB frontend.
++ *
++ * @param fehandle Handle opened with dvbfe_open().
++ */
++extern void dvbfe_close(struct dvbfe_handle *handle);
++
++/**
++ * Set the frontend tuning parameters.
++ *
++ * Note: this function provides only the basic tuning operation; you might want to
++ * investigate dvbfe_set_sec() in sec.h for a unified device tuning operation.
++ *
++ * @param fehandle Handle opened with dvbfe_open().
++ * @param params Params to set.
++ * @param timeout <0 => wait forever for lock. 0=>return immediately, >0=>
++ * number of milliseconds to wait for a lock.
++ * @return 0 on locked (or if timeout==0 and everything else worked), or
++ * nonzero on failure (including no lock).
++ */
++extern int dvbfe_set(struct dvbfe_handle *fehandle,
++ struct dvbfe_parameters *params,
++ int timeout);
++
++/**
++ * Retrieve information about the frontend.
++ *
++ * @param fehandle Handle opened with dvbfe_open().
++ * @param querymask ORed bitmask of desired DVBFE_INFO_* values.
++ * @param result Where to put the retrieved results.
++ * @param querytype Type of query requested.
++ * @param timeout Timeout in ms to use if querytype==lockchange (0=>no timeout, <0=> wait forever).
++ * @return ORed bitmask of DVBFE_INFO_* indicating which values were read successfully.
++ */
++extern int dvbfe_get_info(struct dvbfe_handle *fehandle,
++ enum dvbfe_info_mask querymask,
++ struct dvbfe_info *result,
++ enum dvbfe_info_querytype querytype,
++ int timeout);
++
++/**
++ * Get a file descriptor for polling for lock status changes.
++ *
++ * @param fehandle Handle opened with dvbfe_open().
++ * @return FD for polling.
++ */
++extern int dvbfe_get_pollfd(struct dvbfe_handle *handle);
++
++/**
++ * Tone/Data Burst control
++ * @param fehandle Handle opened with dvbfe_open().
++ * @param tone, SEC_TONE_ON/SEC_TONE_OFF
++ */
++extern int dvbfe_set_22k_tone(struct dvbfe_handle *handle, enum dvbfe_sec_tone_mode tone);
++
++/**
++ * 22khz Tone control
++ * @param fehandle Handle opened with dvbfe_open().
++ * @param adapter, minicmd, SEC_MINI_A/SEC_MINI_B
++ */
++extern int dvbfe_set_tone_data_burst(struct dvbfe_handle *handle, enum dvbfe_sec_mini_cmd minicmd);
++
++/**
++ * Voltage control
++ * @param fehandle Handle opened with dvbfe_open().
++ * @param polarization, SEC_VOLTAGE_13/SEC_VOLTAGE_18/SEC_VOLTAGE_OFF
++ */
++extern int dvbfe_set_voltage(struct dvbfe_handle *handle, enum dvbfe_sec_voltage voltage);
++
++/**
++ * High LNB voltage control (increases voltage by 1v to compensate for long cables)
++ * @param fehandle Handle opened with dvbfe_open().
++ * @param on 1 to enable, 0 to disable.
++ */
++extern int dvbfe_set_high_lnb_voltage(struct dvbfe_handle *fehandle, int on);
++
++/**
++ * Send a legacy Dish Networks command
++ * @param fehandle Handle opened with dvbfe_open().
++ * @param cmd, the command to send
++ */
++extern int dvbfe_do_dishnetworks_legacy_command(struct dvbfe_handle *handle, unsigned int cmd);
++
++/**
++ * Send a DiSEqC Command
++ * @param fehandle Handle opened with dvbfe_open().
++ * @param data, a pointer to am array containing the data to be sent.
++ * @param len Length of data in bytes, max 6 bytes.
++ */
++extern int dvbfe_do_diseqc_command(struct dvbfe_handle *handle, uint8_t *data, uint8_t len);
++
++/**
++ * Read a DISEQC response from the frontend.
++ *
++ * @param fehandle Handle opened with dvbfe_open().
++ * @param timeout Timeout for DISEQC response.
++ * @param buf Buffer to store response in.
++ * @param len Number of bytes in buffer.
++ * @return >= 0 on success (number of received bytes), <0 on failure.
++ */
++extern int dvbfe_diseqc_read(struct dvbfe_handle *fehandle, int timeout, unsigned char *buf, unsigned int len);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif // LIBDVBFE_H
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbnet.c dvb-apps/lib/libdvbapi/dvbnet.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbnet.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbnet.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,104 @@
++/*
++ * libdvbnet - a DVB network support library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <sys/param.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <sys/ioctl.h>
++#include <linux/dvb/net.h>
++#include <errno.h>
++#include "dvbnet.h"
++
++int dvbnet_open(int adapter, int netdeviceid)
++{
++ char filename[PATH_MAX+1];
++ int fd;
++
++ sprintf(filename, "/dev/dvb/adapter%i/net%i", adapter, netdeviceid);
++ if ((fd = open(filename, O_RDWR)) < 0) {
++ // if that failed, try a flat /dev structure
++ sprintf(filename, "/dev/dvb%i.net%i", adapter, netdeviceid);
++ fd = open(filename, O_RDWR);
++ }
++
++ return fd;
++}
++
++int dvbnet_add_interface(int fd, uint16_t pid, enum dvbnet_encap encapsulation)
++{
++ struct dvb_net_if params;
++ int status;
++
++ memset(&params, 0, sizeof(params));
++ params.pid = pid;
++
++ switch(encapsulation) {
++ case DVBNET_ENCAP_MPE:
++ params.feedtype = DVB_NET_FEEDTYPE_MPE;
++ break;
++
++ case DVBNET_ENCAP_ULE:
++ params.feedtype = DVB_NET_FEEDTYPE_ULE;
++ break;
++
++ default:
++ return -EINVAL;
++ }
++
++ status = ioctl(fd, NET_ADD_IF, &params);
++ if (status < 0)
++ return status;
++ return params.if_num;
++}
++
++int dvbnet_get_interface(int fd, int ifnum, uint16_t *pid, enum dvbnet_encap *encapsulation)
++{
++ struct dvb_net_if info;
++ int res;
++
++ memset(&info, 0, sizeof(struct dvb_net_if));
++ info.if_num = ifnum;
++
++ if ((res = ioctl(fd, NET_GET_IF, &info)) < 0)
++ return res;
++
++ *pid = info.pid;
++ switch(info.feedtype) {
++ case DVB_NET_FEEDTYPE_MPE:
++ *encapsulation = DVBNET_ENCAP_MPE;
++ break;
++
++ case DVB_NET_FEEDTYPE_ULE:
++ *encapsulation = DVBNET_ENCAP_ULE;
++ break;
++
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++int dvbnet_remove_interface(int fd, int ifnum)
++{
++ return ioctl(fd, NET_REMOVE_IF, ifnum);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbnet.h dvb-apps/lib/libdvbapi/dvbnet.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbnet.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbnet.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,87 @@
++/*
++ * libdvbnet - a DVB network support library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef LIBDVBNET_H
++#define LIBDVBNET_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * Possible encapsulations of data.
++ */
++enum dvbnet_encap {
++ DVBNET_ENCAP_MPE,
++ DVBNET_ENCAP_ULE,
++};
++
++/**
++ * The maximum allowed number of dvb network devices per adapter netdevice.
++ */
++#define DVBNET_MAX_INTERFACES 10
++
++/**
++ * Open a DVB net interface.
++ *
++ * @param adapter DVB adapter ID.
++ * @param netdeviceid Network control interface of that adapter to open.
++ * @return A unix file descriptor on success, or -1 on failure.
++ */
++extern int dvbnet_open(int adapter, int netdeviceid);
++
++/**
++ * Create a new DVBNET interface.
++ *
++ * @param fd FD opened with libdvbnet_open().
++ * @param pid PID of the stream containing the network data.
++ * @param encapsulation Encapsulation type of the stream (one of DVBNET_ENCAP_*).
++ * @return Index of new interface on success, < 0 on failure.
++ */
++extern int dvbnet_add_interface(int fd, uint16_t pid, enum dvbnet_encap encapsulation);
++
++/**
++ * Get details of a DVBNET interface.
++ *
++ * @param fd FD opened with libdvbnet_open().
++ * @param ifnum Index of interface to retrieve.
++ * @param pid The PID of the interface.
++ * @param encapsulation The encapsulation of the interface (DVBNET_ENCAP_*).
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbnet_get_interface(int fd, int ifnum, uint16_t *pid, enum dvbnet_encap *encapsulation);
++
++/**
++ * Remove a DVBNET interface.
++ *
++ * @param fd FD opened with libdvbnet_open().
++ * @param ifnum Index of interface to remove.
++ * @return 0 on success, nonzero on failure.
++ */
++extern int dvbnet_remove_interface(int fd, int ifnum);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif // LIBDVBNET_H
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbvideo.c dvb-apps/lib/libdvbapi/dvbvideo.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbvideo.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbvideo.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,46 @@
++/*
++ * libdvbnet - a DVB network support library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <sys/param.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <sys/ioctl.h>
++#include <linux/types.h>
++#include <linux/dvb/video.h>
++#include <errno.h>
++#include "dvbvideo.h"
++
++int dvbvideo_open(int adapter, int videodeviceid)
++{
++ char filename[PATH_MAX+1];
++ int fd;
++
++ sprintf(filename, "/dev/dvb/adapter%i/video%i", adapter, videodeviceid);
++ if ((fd = open(filename, O_RDWR)) < 0) {
++ // if that failed, try a flat /dev structure
++ sprintf(filename, "/dev/dvb%i.video%i", adapter, videodeviceid);
++ fd = open(filename, O_RDWR);
++ }
++
++ return fd;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbvideo.h dvb-apps/lib/libdvbapi/dvbvideo.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/dvbvideo.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/dvbvideo.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,46 @@
++/*
++ * libdvbnet - a DVB network support library
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef LIBDVBVIDEO_H
++#define LIBDVBVIDEO_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * Open a DVB video device.
++ *
++ * @param adapter DVB adapter ID.
++ * @param videodeviceid Id of video device of that adapter to open.
++ * @return A unix file descriptor on success, or -1 on failure.
++ */
++extern int dvbvideo_open(int adapter, int videodeviceid);
++
++// FIXME: this is a stub library
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif // LIBDVBVIDEO_H
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbapi/Makefile dvb-apps/lib/libdvbapi/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbapi/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbapi/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Makefile for linuxtv.org dvb-apps/lib/libdvbapi
++
++includes = dvbaudio.h \
++ dvbca.h \
++ dvbdemux.h \
++ dvbfe.h \
++ dvbnet.h \
++ dvbvideo.h
++
++objects = dvbaudio.o \
++ dvbca.o \
++ dvbdemux.o \
++ dvbfe.o \
++ dvbnet.o \
++ dvbvideo.o
++
++lib_name = libdvbapi
++
++CPPFLAGS += -I../../lib
++
++.PHONY: all
++
++all: library
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_common.c dvb-apps/lib/libdvbcfg/dvbcfg_common.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_common.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbcfg/dvbcfg_common.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,136 @@
++/*
++ * dvbcfg - support for linuxtv configuration files
++ * common functions
++ *
++ * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
++ * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdio.h>
++#include <string.h>
++#include <ctype.h>
++#include "dvbcfg_common.h"
++
++int dvbcfg_parse_int(char **text, char *tokens)
++{
++ char *start = *text;
++ char *stop = *text;
++ int value;
++
++ while (*stop != '\0') {
++ if (strchr(tokens, *stop) != NULL) {
++ *stop = '\0';
++ stop++;
++ break;
++ }
++ stop++;
++ }
++
++ if (sscanf(start, "%i", &value) == 1) {
++ *text = stop;
++ return value;
++ }
++
++ *text = NULL;
++ return -1;
++}
++
++int dvbcfg_parse_char(char **text, char *tokens)
++{
++ char *start = *text;
++ char *stop = *text;
++ char value;
++
++ while (*stop != '\0') {
++ if (strchr(tokens, *stop) != NULL) {
++ *stop = '\0';
++ stop++;
++ break;
++ }
++ stop++;
++ }
++
++ if (sscanf(start, "%c", &value) == 1) {
++ *text = stop;
++ return value;
++ }
++
++ *text = NULL;
++ return -1;
++}
++
++int dvbcfg_parse_setting(char **text, char *tokens, const struct dvbcfg_setting *settings)
++{
++ char *start = *text;
++ char *stop = *text;
++
++ while (*stop != '\0') {
++ if (strchr(tokens, *stop) != NULL) {
++ *stop = '\0';
++ stop++;
++ break;
++ }
++ stop++;
++ }
++
++ while (settings->name) {
++ if (strcmp(start, settings->name) == 0) {
++ *text = stop;
++ return settings->value;
++ }
++ settings++;
++ }
++
++ *text = NULL;
++ return -1;
++}
++
++void dvbcfg_parse_string(char **text, char *tokens, char *dest, unsigned long size)
++{
++ char *start = *text;
++ char *stop = *text;
++ unsigned long length;
++
++ while ((*stop != '\0') && (strchr(tokens, *stop) == NULL))
++ stop++;
++
++ length = (stop - start) + 1;
++
++ if (length <= size) {
++ if (strchr(tokens, *stop) != NULL) {
++ *stop = '\0';
++ *text = stop + 1;
++ } else
++ *text = stop;
++ memcpy(dest, start, length);
++ return;
++ }
++
++ *text = NULL;
++ return;
++}
++
++const char *dvbcfg_lookup_setting(unsigned int setting, const struct dvbcfg_setting *settings)
++{
++ while (settings->name) {
++ if (setting == settings->value)
++ return settings->name;
++ settings++;
++ }
++
++ return NULL;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_common.h dvb-apps/lib/libdvbcfg/dvbcfg_common.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_common.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbcfg/dvbcfg_common.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,37 @@
++/*
++ * dvbcfg - support for linuxtv configuration files
++ * common functions
++ *
++ * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
++ * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef DVBCFG_COMMON_H
++#define DVBCFG_COMMON_H 1
++
++struct dvbcfg_setting {
++ const char *name;
++ unsigned int value;
++};
++
++extern int dvbcfg_parse_int(char **text, char *tokens);
++extern int dvbcfg_parse_char(char **text, char *tokens);
++extern int dvbcfg_parse_setting(char **text, char *tokens, const struct dvbcfg_setting *settings);
++extern void dvbcfg_parse_string(char **text, char *tokens, char *dest, unsigned long size);
++extern const char *dvbcfg_lookup_setting(unsigned int setting, const struct dvbcfg_setting *settings);
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_scanfile.c dvb-apps/lib/libdvbcfg/dvbcfg_scanfile.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_scanfile.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbcfg/dvbcfg_scanfile.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,282 @@
++/*
++ * dvbcfg - support for linuxtv configuration files
++ * scan channel file support
++ *
++ * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
++ * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#define _GNU_SOURCE
++
++#include <malloc.h>
++#include <ctype.h>
++
++#include "dvbcfg_scanfile.h"
++#include "dvbcfg_common.h"
++
++static const struct dvbcfg_setting dvbcfg_fec_list[] = {
++ { "1/2", DVBFE_FEC_1_2 },
++ { "2/3", DVBFE_FEC_2_3 },
++ { "3/4", DVBFE_FEC_3_4 },
++ { "4/5", DVBFE_FEC_4_5 },
++ { "5/6", DVBFE_FEC_5_6 },
++ { "6/7", DVBFE_FEC_6_7 },
++ { "7/8", DVBFE_FEC_7_8 },
++ { "8/9", DVBFE_FEC_8_9 },
++ { "AUTO", DVBFE_FEC_AUTO },
++ { "NONE", DVBFE_FEC_NONE },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_dvbc_modulation_list[] = {
++ { "QAM16", DVBFE_DVBC_MOD_QAM_16 },
++ { "QAM32", DVBFE_DVBC_MOD_QAM_32 },
++ { "QAM64", DVBFE_DVBC_MOD_QAM_64 },
++ { "QAM128", DVBFE_DVBC_MOD_QAM_128 },
++ { "QAM256", DVBFE_DVBC_MOD_QAM_256 },
++ { "AUTO", DVBFE_DVBC_MOD_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_bandwidth_list[] = {
++ { "6MHz", DVBFE_DVBT_BANDWIDTH_6_MHZ },
++ { "7MHz", DVBFE_DVBT_BANDWIDTH_7_MHZ },
++ { "8MHz", DVBFE_DVBT_BANDWIDTH_8_MHZ },
++ { "AUTO", DVBFE_DVBT_BANDWIDTH_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_constellation_list[] = {
++ { "QAM16", DVBFE_DVBT_CONST_QAM_16 },
++ { "QAM32", DVBFE_DVBT_CONST_QAM_32 },
++ { "QAM64", DVBFE_DVBT_CONST_QAM_64 },
++ { "QAM128", DVBFE_DVBT_CONST_QAM_128 },
++ { "QAM256", DVBFE_DVBT_CONST_QAM_256 },
++ { "QPSK", DVBFE_DVBT_CONST_QPSK },
++ { "AUTO", DVBFE_DVBT_CONST_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_transmission_mode_list[] = {
++ { "2k", DVBFE_DVBT_TRANSMISSION_MODE_2K },
++ { "8k", DVBFE_DVBT_TRANSMISSION_MODE_8K },
++ { "AUTO", DVBFE_DVBT_TRANSMISSION_MODE_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_guard_interval_list[] = {
++ { "1/32", DVBFE_DVBT_GUARD_INTERVAL_1_32 },
++ { "1/16", DVBFE_DVBT_GUARD_INTERVAL_1_16 },
++ { "1/8", DVBFE_DVBT_GUARD_INTERVAL_1_8 },
++ { "1/4", DVBFE_DVBT_GUARD_INTERVAL_1_4 },
++ { "AUTO", DVBFE_DVBT_GUARD_INTERVAL_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_hierarchy_list[] = {
++ { "1", DVBFE_DVBT_HIERARCHY_1 },
++ { "2", DVBFE_DVBT_HIERARCHY_2 },
++ { "4", DVBFE_DVBT_HIERARCHY_4 },
++ { "AUTO", DVBFE_DVBT_HIERARCHY_AUTO },
++ { "NONE", DVBFE_DVBT_HIERARCHY_NONE },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_atsc_modulation_list[] = {
++ { "8VSB", DVBFE_ATSC_MOD_VSB_8 },
++ { "16VSB", DVBFE_ATSC_MOD_VSB_16 },
++ { "QAM64", DVBFE_ATSC_MOD_QAM_64 },
++ { "QAM256", DVBFE_ATSC_MOD_QAM_256 },
++ { NULL, 0 }
++};
++
++int dvbcfg_scanfile_parse(FILE *file, dvbcfg_scancallback callback, void *private_data)
++{
++ char *line_buf = NULL;
++ size_t line_size = 0;
++ int line_len = 0;
++ int ret_val = 0;
++
++ while ((line_len = getline(&line_buf, &line_size, file)) > 0) {
++ char *line_tmp = line_buf;
++ char *line_pos = line_buf;
++ struct dvbcfg_scanfile tmp;
++
++ /* remove newline and comments (started with hashes) */
++ while ((*line_tmp != '\0') && (*line_tmp != '\n') && (*line_tmp != '#'))
++ line_tmp++;
++ *line_tmp = '\0';
++
++ /* always use inversion auto */
++ tmp.fe_params.inversion = DVBFE_INVERSION_AUTO;
++
++ /* parse frontend type */
++ switch(dvbcfg_parse_char(&line_pos, " ")) {
++ case 'T':
++ tmp.fe_type = DVBFE_TYPE_DVBT;
++ break;
++ case 'C':
++ tmp.fe_type = DVBFE_TYPE_DVBC;
++ break;
++ case 'S':
++ tmp.fe_type = DVBFE_TYPE_DVBS;
++ break;
++ case 'A':
++ tmp.fe_type = DVBFE_TYPE_ATSC;
++ break;
++ default:
++ continue;
++ }
++
++ /* parse frontend specific settings */
++ switch (tmp.fe_type) {
++ case DVBFE_TYPE_ATSC:
++
++ /* parse frequency */
++ tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, " ");
++ if (!line_pos)
++ continue;
++
++ /* modulation */
++ tmp.fe_params.u.atsc.modulation =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_atsc_modulation_list);
++ if (!line_pos)
++ continue;
++
++ break;
++
++ case DVBFE_TYPE_DVBC:
++
++ /* parse frequency */
++ tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, " ");
++ if (!line_pos)
++ continue;
++
++ /* symbol rate */
++ tmp.fe_params.u.dvbc.symbol_rate = dvbcfg_parse_int(&line_pos, " ");
++ if (!line_pos)
++ continue;
++
++ /* fec */
++ tmp.fe_params.u.dvbc.fec_inner =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_fec_list);
++ if (!line_pos)
++ continue;
++
++ /* modulation */
++ tmp.fe_params.u.dvbc.modulation =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_dvbc_modulation_list);
++ if (!line_pos)
++ continue;
++
++ break;
++
++ case DVBFE_TYPE_DVBS:
++
++ /* parse frequency */
++ tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, " ");
++ if (!line_pos)
++ continue;
++
++ /* polarization */
++ tmp.polarization = tolower(dvbcfg_parse_char(&line_pos, " "));
++ if (!line_pos)
++ continue;
++ if ((tmp.polarization != 'h') &&
++ (tmp.polarization != 'v') &&
++ (tmp.polarization != 'l') &&
++ (tmp.polarization != 'r'))
++ continue;
++
++ /* symbol rate */
++ tmp.fe_params.u.dvbs.symbol_rate = dvbcfg_parse_int(&line_pos, " ");
++ if (!line_pos)
++ continue;
++
++ /* fec */
++ tmp.fe_params.u.dvbc.fec_inner =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_fec_list);
++ if (!line_pos)
++ continue;
++
++ break;
++
++ case DVBFE_TYPE_DVBT:
++
++ /* parse frequency */
++ tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, " ");
++ if (!line_pos)
++ continue;
++
++ /* bandwidth */
++ tmp.fe_params.u.dvbt.bandwidth =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_bandwidth_list);
++ if (!line_pos)
++ continue;
++
++ /* fec hp */
++ tmp.fe_params.u.dvbt.code_rate_HP =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_fec_list);
++ if (!line_pos)
++ continue;
++
++ /* fec lp */
++ tmp.fe_params.u.dvbt.code_rate_LP =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_fec_list);
++ if (!line_pos)
++ continue;
++
++ /* constellation */
++ tmp.fe_params.u.dvbt.constellation =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_constellation_list);
++ if (!line_pos)
++ continue;
++
++ /* transmission mode */
++ tmp.fe_params.u.dvbt.transmission_mode =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_transmission_mode_list);
++ if (!line_pos)
++ continue;
++
++ /* guard interval */
++ tmp.fe_params.u.dvbt.guard_interval =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_guard_interval_list);
++ if (!line_pos)
++ continue;
++
++ /* hierarchy */
++ tmp.fe_params.u.dvbt.hierarchy_information =
++ dvbcfg_parse_setting(&line_pos, " ", dvbcfg_hierarchy_list);
++ if (!line_pos)
++ continue;
++
++ break;
++ }
++
++ /* invoke callback */
++ if ((ret_val = callback(&tmp, private_data)) != 0) {
++ if (ret_val < 0)
++ ret_val = 0;
++ break;
++ }
++ }
++
++ if (line_buf)
++ free(line_buf);
++
++ return ret_val;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_scanfile.h dvb-apps/lib/libdvbcfg/dvbcfg_scanfile.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_scanfile.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbcfg/dvbcfg_scanfile.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,61 @@
++/*
++ * dvbcfg - support for linuxtv configuration files
++ * scan channel file support
++ *
++ * Copyright (C) 2006 Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef DVBCFG_SCANFILE_H
++#define DVBCFG_SCANFILE_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <libdvbapi/dvbfe.h>
++#include <stdio.h>
++
++struct dvbcfg_scanfile {
++ enum dvbfe_type fe_type;
++ struct dvbfe_parameters fe_params;
++ char polarization; /* l,r,v,h - only used for dvb-s */
++};
++
++/**
++ * Callback used in dvbcfg_scanfile_parse()
++ *
++ * @param channel Selected channel
++ * @param private_data Private data for the callback
++ * @return 0 to continue, other values to stop (values > 0 are forwarded; see below)
++ */
++typedef int (*dvbcfg_scancallback)(struct dvbcfg_scanfile *channel, void *private_data);
++
++/**
++ * Parse a linuxtv scan file
++ *
++ * @param file Linuxtv scan file
++ * @param callback Callback called for each scan entry
++ * @param private_data Private data for the callback
++ * @return on success 0 or value from the callback if it's > 0, error code on failure
++ */
++extern int dvbcfg_scanfile_parse(FILE *file, dvbcfg_scancallback callback, void *private_data);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* DVBCFG_SCANFILE_H */
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_zapchannel.c dvb-apps/lib/libdvbcfg/dvbcfg_zapchannel.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_zapchannel.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbcfg/dvbcfg_zapchannel.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,384 @@
++/*
++ * dvbcfg - support for linuxtv configuration files
++ * zap channel file support
++ *
++ * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
++ * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#define _GNU_SOURCE
++
++#include <malloc.h>
++#include <string.h>
++#include <ctype.h>
++
++#include "dvbcfg_zapchannel.h"
++#include "dvbcfg_common.h"
++
++static const struct dvbcfg_setting dvbcfg_inversion_list[] = {
++ { "INVERSION_ON", DVBFE_INVERSION_ON },
++ { "INVERSION_OFF", DVBFE_INVERSION_OFF },
++ { "INVERSION_AUTO", DVBFE_INVERSION_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_fec_list[] = {
++ { "FEC_1_2", DVBFE_FEC_1_2 },
++ { "FEC_2_3", DVBFE_FEC_2_3 },
++ { "FEC_3_4", DVBFE_FEC_3_4 },
++ { "FEC_4_5", DVBFE_FEC_4_5 },
++ { "FEC_5_6", DVBFE_FEC_5_6 },
++ { "FEC_6_7", DVBFE_FEC_6_7 },
++ { "FEC_7_8", DVBFE_FEC_7_8 },
++ { "FEC_8_9", DVBFE_FEC_8_9 },
++ { "FEC_AUTO", DVBFE_FEC_AUTO },
++ { "FEC_NONE", DVBFE_FEC_NONE },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_dvbc_modulation_list[] = {
++ { "QAM_16", DVBFE_DVBC_MOD_QAM_16 },
++ { "QAM_32", DVBFE_DVBC_MOD_QAM_32 },
++ { "QAM_64", DVBFE_DVBC_MOD_QAM_64 },
++ { "QAM_128", DVBFE_DVBC_MOD_QAM_128 },
++ { "QAM_256", DVBFE_DVBC_MOD_QAM_256 },
++ { "QAM_AUTO", DVBFE_DVBC_MOD_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_bandwidth_list[] = {
++ { "BANDWIDTH_6_MHZ", DVBFE_DVBT_BANDWIDTH_6_MHZ },
++ { "BANDWIDTH_7_MHZ", DVBFE_DVBT_BANDWIDTH_7_MHZ },
++ { "BANDWIDTH_8_MHZ", DVBFE_DVBT_BANDWIDTH_8_MHZ },
++ { "BANDWIDTH_AUTO", DVBFE_DVBT_BANDWIDTH_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_constellation_list[] = {
++ { "QAM_16", DVBFE_DVBT_CONST_QAM_16 },
++ { "QAM_32", DVBFE_DVBT_CONST_QAM_32 },
++ { "QAM_64", DVBFE_DVBT_CONST_QAM_64 },
++ { "QAM_128", DVBFE_DVBT_CONST_QAM_128 },
++ { "QAM_256", DVBFE_DVBT_CONST_QAM_256 },
++ { "QPSK", DVBFE_DVBT_CONST_QPSK },
++ { "QAM_AUTO", DVBFE_DVBT_CONST_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_transmission_mode_list[] = {
++ { "TRANSMISSION_MODE_2K", DVBFE_DVBT_TRANSMISSION_MODE_2K },
++ { "TRANSMISSION_MODE_8K", DVBFE_DVBT_TRANSMISSION_MODE_8K },
++ { "TRANSMISSION_MODE_AUTO", DVBFE_DVBT_TRANSMISSION_MODE_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_guard_interval_list[] = {
++ { "GUARD_INTERVAL_1_32", DVBFE_DVBT_GUARD_INTERVAL_1_32 },
++ { "GUARD_INTERVAL_1_16", DVBFE_DVBT_GUARD_INTERVAL_1_16 },
++ { "GUARD_INTERVAL_1_8", DVBFE_DVBT_GUARD_INTERVAL_1_8 },
++ { "GUARD_INTERVAL_1_4", DVBFE_DVBT_GUARD_INTERVAL_1_4 },
++ { "GUARD_INTERVAL_AUTO", DVBFE_DVBT_GUARD_INTERVAL_AUTO },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_hierarchy_list[] = {
++ { "HIERARCHY_1", DVBFE_DVBT_HIERARCHY_1 },
++ { "HIERARCHY_2", DVBFE_DVBT_HIERARCHY_2 },
++ { "HIERARCHY_4", DVBFE_DVBT_HIERARCHY_4 },
++ { "HIERARCHY_AUTO", DVBFE_DVBT_HIERARCHY_AUTO },
++ { "HIERARCHY_NONE", DVBFE_DVBT_HIERARCHY_NONE },
++ { NULL, 0 }
++};
++
++static const struct dvbcfg_setting dvbcfg_atsc_modulation_list[] = {
++ { "8VSB", DVBFE_ATSC_MOD_VSB_8 },
++ { "16VSB", DVBFE_ATSC_MOD_VSB_16 },
++ { "QAM_64", DVBFE_ATSC_MOD_QAM_64 },
++ { "QAM_256", DVBFE_ATSC_MOD_QAM_256 },
++ { NULL, 0 }
++};
++
++int dvbcfg_zapchannel_parse(FILE *file, dvbcfg_zapcallback callback, void *private_data)
++{
++ char *line_buf = NULL;
++ size_t line_size = 0;
++ int line_len = 0;
++ int ret_val = 0;
++
++ while ((line_len = getline(&line_buf, &line_size, file)) > 0) {
++ char *line_tmp = line_buf;
++ char *line_pos = line_buf;
++ struct dvbcfg_zapchannel tmp;
++
++ /* remove newline and comments (started with hashes) */
++ while ((*line_tmp != '\0') && (*line_tmp != '\n') && (*line_tmp != '#'))
++ line_tmp++;
++ *line_tmp = '\0';
++
++ /* parse name */
++ dvbcfg_parse_string(&line_pos, ":", tmp.name, sizeof(tmp.name));
++ if (!line_pos)
++ continue;
++
++ /* parse frequency */
++ tmp.fe_params.frequency = dvbcfg_parse_int(&line_pos, ":");
++ if (!line_pos)
++ continue;
++
++ /* try to determine frontend type */
++ if (strstr(line_pos, ":FEC_")) {
++ if (strstr(line_pos, ":HIERARCHY_"))
++ tmp.fe_type = DVBFE_TYPE_DVBT;
++ else
++ tmp.fe_type = DVBFE_TYPE_DVBC;
++ } else {
++ if (strstr(line_pos, "VSB:") || strstr(line_pos, "QAM_"))
++ tmp.fe_type = DVBFE_TYPE_ATSC;
++ else
++ tmp.fe_type = DVBFE_TYPE_DVBS;
++ }
++
++ /* parse frontend specific settings */
++ switch (tmp.fe_type) {
++ case DVBFE_TYPE_ATSC:
++ /* inversion */
++ tmp.fe_params.inversion = DVBFE_INVERSION_AUTO;
++
++ /* modulation */
++ tmp.fe_params.u.atsc.modulation =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_atsc_modulation_list);
++ if (!line_pos)
++ continue;
++
++ break;
++
++ case DVBFE_TYPE_DVBC:
++ /* inversion */
++ tmp.fe_params.inversion =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_inversion_list);
++ if (!line_pos)
++ continue;
++
++ /* symbol rate */
++ tmp.fe_params.u.dvbc.symbol_rate = dvbcfg_parse_int(&line_pos, ":");
++ if (!line_pos)
++ continue;
++
++ /* fec */
++ tmp.fe_params.u.dvbc.fec_inner =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_fec_list);
++ if (!line_pos)
++ continue;
++
++ /* modulation */
++ tmp.fe_params.u.dvbc.modulation =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_dvbc_modulation_list);
++ if (!line_pos)
++ continue;
++
++ break;
++
++ case DVBFE_TYPE_DVBS:
++ /* adjust frequency */
++ tmp.fe_params.frequency *= 1000;
++
++ /* inversion */
++ tmp.fe_params.inversion = DVBFE_INVERSION_AUTO;
++
++ /* fec */
++ tmp.fe_params.u.dvbs.fec_inner = DVBFE_FEC_AUTO;
++
++ /* polarization */
++ tmp.polarization = tolower(dvbcfg_parse_char(&line_pos, ":"));
++ if (!line_pos)
++ continue;
++ if ((tmp.polarization != 'h') &&
++ (tmp.polarization != 'v') &&
++ (tmp.polarization != 'l') &&
++ (tmp.polarization != 'r'))
++ continue;
++
++ /* satellite switch position */
++ tmp.diseqc_switch = dvbcfg_parse_int(&line_pos, ":");
++ if (!line_pos)
++ continue;
++
++ /* symbol rate */
++ tmp.fe_params.u.dvbs.symbol_rate =
++ dvbcfg_parse_int(&line_pos, ":") * 1000;
++ if (!line_pos)
++ continue;
++
++ break;
++
++ case DVBFE_TYPE_DVBT:
++ /* inversion */
++ tmp.fe_params.inversion =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_inversion_list);
++ if (!line_pos)
++ continue;
++
++ /* bandwidth */
++ tmp.fe_params.u.dvbt.bandwidth =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_bandwidth_list);
++ if (!line_pos)
++ continue;
++
++ /* fec hp */
++ tmp.fe_params.u.dvbt.code_rate_HP =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_fec_list);
++ if (!line_pos)
++ continue;
++
++ /* fec lp */
++ tmp.fe_params.u.dvbt.code_rate_LP =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_fec_list);
++ if (!line_pos)
++ continue;
++
++ /* constellation */
++ tmp.fe_params.u.dvbt.constellation =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_constellation_list);
++ if (!line_pos)
++ continue;
++
++ /* transmission mode */
++ tmp.fe_params.u.dvbt.transmission_mode =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_transmission_mode_list);
++ if (!line_pos)
++ continue;
++
++ /* guard interval */
++ tmp.fe_params.u.dvbt.guard_interval =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_guard_interval_list);
++ if (!line_pos)
++ continue;
++
++ /* hierarchy */
++ tmp.fe_params.u.dvbt.hierarchy_information =
++ dvbcfg_parse_setting(&line_pos, ":", dvbcfg_hierarchy_list);
++ if (!line_pos)
++ continue;
++
++ break;
++ }
++
++ /* parse video and audio pids and service id */
++ tmp.video_pid = dvbcfg_parse_int(&line_pos, ":");
++ if (!line_pos)
++ continue;
++ tmp.audio_pid = dvbcfg_parse_int(&line_pos, ":");
++ if (!line_pos)
++ continue;
++ tmp.service_id = dvbcfg_parse_int(&line_pos, ":");
++ if (!line_pos) /* old files don't have a service id */
++ tmp.service_id = 0;
++
++ /* invoke callback */
++ if ((ret_val = callback(&tmp, private_data)) != 0) {
++ if (ret_val < 0)
++ ret_val = 0;
++ break;
++ }
++ }
++
++ if (line_buf)
++ free(line_buf);
++
++ return ret_val;
++}
++
++int dvbcfg_zapchannel_save(FILE *file, dvbcfg_zapcallback callback, void *private_data)
++{
++ int ret_val = 0;
++ struct dvbcfg_zapchannel tmp;
++
++ while ((ret_val = callback(&tmp, private_data)) == 0) {
++ /* name */
++ if ((ret_val = fprintf(file, "%s:", tmp.name)) < 0)
++ return ret_val;
++
++ /* frontend specific settings */
++ switch (tmp.fe_type) {
++ case DVBFE_TYPE_ATSC:
++ if ((ret_val = fprintf(file, "%i:%s:",
++ tmp.fe_params.frequency,
++ dvbcfg_lookup_setting(tmp.fe_params.u.atsc.modulation,
++ dvbcfg_atsc_modulation_list))) < 0)
++ return ret_val;
++
++ break;
++
++ case DVBFE_TYPE_DVBC:
++ if ((ret_val = fprintf(file, "%i:%s:%i:%s:%s:",
++ tmp.fe_params.frequency,
++ dvbcfg_lookup_setting(tmp.fe_params.inversion,
++ dvbcfg_inversion_list),
++ tmp.fe_params.u.dvbc.symbol_rate,
++ dvbcfg_lookup_setting(tmp.fe_params.u.dvbc.fec_inner,
++ dvbcfg_fec_list),
++ dvbcfg_lookup_setting(tmp.fe_params.u.dvbc.modulation,
++ dvbcfg_dvbc_modulation_list))) < 0)
++ return ret_val;
++
++ break;
++
++ case DVBFE_TYPE_DVBS:
++ if ((ret_val = fprintf(file, "%i:%c:%i:%i:",
++ tmp.fe_params.frequency / 1000,
++ tolower(tmp.polarization),
++ tmp.diseqc_switch,
++ tmp.fe_params.u.dvbs.symbol_rate / 1000)) < 0)
++ return ret_val;
++
++ break;
++ case DVBFE_TYPE_DVBT:
++ if ((ret_val = fprintf(file, "%i:%s:%s:%s:%s:%s:%s:%s:%s:",
++ tmp.fe_params.frequency,
++ dvbcfg_lookup_setting(tmp.fe_params.inversion,
++ dvbcfg_inversion_list),
++ dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.bandwidth,
++ dvbcfg_bandwidth_list),
++ dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.code_rate_HP,
++ dvbcfg_fec_list),
++ dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.code_rate_LP,
++ dvbcfg_fec_list),
++ dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.constellation,
++ dvbcfg_constellation_list),
++ dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.transmission_mode,
++ dvbcfg_transmission_mode_list),
++ dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.guard_interval,
++ dvbcfg_guard_interval_list),
++ dvbcfg_lookup_setting(tmp.fe_params.u.dvbt.hierarchy_information,
++ dvbcfg_hierarchy_list))) < 0)
++ return ret_val;
++
++ break;
++ }
++
++ /* video and audio pids and service id */
++ if ((ret_val = fprintf(file, "%i:%i:%i\n",
++ tmp.video_pid, tmp.audio_pid, tmp.service_id)) < 0)
++ return ret_val;
++
++ }
++
++ if (ret_val < 0)
++ ret_val = 0;
++
++ return ret_val;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_zapchannel.h dvb-apps/lib/libdvbcfg/dvbcfg_zapchannel.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/dvbcfg_zapchannel.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbcfg/dvbcfg_zapchannel.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,77 @@
++/*
++ * dvbcfg - support for linuxtv configuration files
++ * zap channel file support
++ *
++ * Copyright (C) 2006 Christoph Pfister <christophpfister@gmail.com>
++ * Copyright (C) 2005 Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef DVBCFG_ZAPCHANNEL_H
++#define DVBCFG_ZAPCHANNEL_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <libdvbapi/dvbfe.h>
++#include <stdio.h>
++
++struct dvbcfg_zapchannel {
++ char name[128];
++ int video_pid;
++ int audio_pid;
++ int service_id;
++ enum dvbfe_type fe_type;
++ struct dvbfe_parameters fe_params;
++ char polarization; /* l,r,v,h - only used for dvb-s */
++ int diseqc_switch; /* only used for dvb-s */
++};
++
++/**
++ * Callback used in dvbcfg_zapchannel_parse() and dvbcfg_zapchannel_save()
++ *
++ * @param channel Selected channel
++ * @param private_data Private data for the callback
++ * @return 0 to continue, other values to stop (values > 0 are forwarded; see below)
++ */
++typedef int (*dvbcfg_zapcallback)(struct dvbcfg_zapchannel *channel, void *private_data);
++
++/**
++ * Parse a linuxtv channel file
++ *
++ * @param file Linuxtv channel file
++ * @param callback Callback called for each channel
++ * @param private_data Private data for the callback
++ * @return on success 0 or value from the callback if it's > 0, error code on failure
++ */
++extern int dvbcfg_zapchannel_parse(FILE *file, dvbcfg_zapcallback callback, void *private_data);
++
++/**
++ * Save to a linuxtv channel file
++ *
++ * @param file Linuxtv channel file
++ * @param callback Callback called for each channel
++ * @param private_data Private data for the callback
++ * @return on success 0 or value from the callback if it's > 0, error code on failure
++ */
++extern int dvbcfg_zapchannel_save(FILE *file, dvbcfg_zapcallback callback, void *private_data);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* DVBCFG_ZAPCHANNEL_H */
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/Makefile dvb-apps/lib/libdvbcfg/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbcfg/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# Makefile for linuxtv.org dvb-apps/lib/libdvbcfg
++
++includes = dvbcfg_zapchannel.h \
++ dvbcfg_scanfile.h
++
++objects = dvbcfg_zapchannel.o \
++ dvbcfg_scanfile.o \
++ dvbcfg_common.o
++
++lib_name = libdvbcfg
++
++CPPFLAGS += -I../../lib
++
++.PHONY: all
++
++all: library
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/zapchannel.txt dvb-apps/lib/libdvbcfg/zapchannel.txt
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbcfg/zapchannel.txt 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbcfg/zapchannel.txt 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,72 @@
++/**
++ * The zapchannel file format specifies tuning parameters for channels. Each line describes
++ * a single channel, and consists of multiple options separated by ':'. The exact
++ * format of each line depends on the DVB type of the channel (i.e. DVBS, DVBT, DVBC, or ATSC).
++ *
++ * Note: the lines have been split across multiple lines in the following due to length issues.
++ *
++ * The format for DVBT channels is:
++ *
++ * <name>:<frequency>:<inversion>:<bandwidth>:<fec_hp>:<fec_lp>:
++ * <constellation>:<transmission>:<guard_interval>:<hierarchy>:
++ * <video_pid>:<audio_pid>:<channel_number>
++ *
++ * name: name of the channel
++ * frequency: frequency in Hz
++ * inversion: one of INVERSION_OFF, INVERSION_ON, or INVERSION_AUTO.
++ * bandwidth: one of BANDWIDTH_6_MHZ, BANDWIDTH_7_MHZ, or BANDWIDTH_8_MHZ.
++ * fec_hp: FEC of the high priority stream, one of: FEC_1_2, FEC_2_3,
++ * FEC_3_4, FEC_4_5, FEC_5_6, FEC_6_7, FEC_7_8, FEC_8_9, or FEC_AUTO.
++ * fec_lp: FEC of the low priority stream, one of: FEC_1_2, FEC_2_3,
++ * FEC_3_4, FEC_4_5, FEC_5_6, FEC_6_7, FEC_7_8, FEC_8_9, FEC_AUTO, or FEC_NONE.
++ * constellation: one of QPSK, QAM_128, QAM_16, QAM_256, QAM_32, or QAM_64.
++ * transmission: one of TRANSMISSION_MODE_2K, or TRANSMISSION_MODE_8K.
++ * guard_interval: one of GUARD_INTERVAL_1_32, GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, or GUARD_INTERVAL_1_4.
++ * hierarchy: one of HIERARCHY_NONE, HIERARCHY_1, HIERARCHY_2, or HIERARCHY_4.
++ * video_pid: PID of the video stream.
++ * audio_pid: PID of the audio stream.
++ * channel_number: Transport stream channel number of the program.
++ *
++ * DVBC:
++ *
++ * <name>:<frequency>:<inversion>:<symbol_rate>:<fec>:
++ * <modulation>:<video_pid>:<audio_pid>:<channel_number>
++ *
++ * name: name of the channel
++ * frequency: frequency in Hz
++ * inversion: one of INVERSION_OFF, INVERSION_ON, or INVERSION_AUTO.
++ * symbol_rate: Symbol rate of the channel in ksyms.
++ * fec: One of: FEC_1_2, FEC_2_3, FEC_3_4, FEC_4_5, FEC_5_6, FEC_6_7,
++ * FEC_7_8, FEC_8_9, or FEC_AUTO.
++ * modulation: one of QAM_16, QAM_32, QAM_64, QAM_128, QAM_256, QAM_AUTO.
++ * video_pid: PID of the video stream.
++ * audio_pid: PID of the audio stream.
++ * channel_number: Transport stream channel number of the program.
++ *
++ * DVBS:
++ *
++ * <name>:<frequency>:<polarization>:<satellite_switches>:<symbol_rate>:<video_pid>:<audio_pid>:<channel_number>
++ *
++ * name: name of the channel
++ * frequency: frequency in kHz
++ * polarization: one of H,V,L, or R.
++ * satellite_switches: Treated as a 2 bit value controlling switches in SEC equipment:
++ * bit 0: controls "satellite switch", 0: A, 1: B
++ * bit 1: controls "switch option", 0: A, 1: B
++ * symbol_rate: Symbol rate of the channel in ksyms.
++ * video_pid: PID of the video stream.
++ * audio_pid: PID of the audio stream.
++ * channel_number: Transport stream channel number of the program.
++ *
++ * ATSC:
++ *
++ * <name>:<frequency>:<inversion>:<modulation>:<video_pid>:<audio_pid>:<channel_number>
++ *
++ * name: name of the channel
++ * frequency: frequency in GHz
++ * inversion: one of INVERSION_OFF, INVERSION_ON, or INVERSION_AUTO.
++ * modulation: one of 8VSB, 16VSB, QAM_64, or QAM_256.
++ * video_pid: PID of the video stream.
++ * audio_pid: PID of the audio stream.
++ * channel_number: Transport stream channel number of the program.
++ */
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/asn_1.c dvb-apps/lib/libdvben50221/asn_1.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/asn_1.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/asn_1.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,83 @@
++/*
++ ASN.1 routines, implementation for libdvben50221
++ an implementation for the High Level Common Interface
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include "asn_1.h"
++
++int asn_1_decode(uint16_t * length, uint8_t * asn_1_array,
++ uint32_t asn_1_array_len)
++{
++ uint8_t length_field;
++
++ if (asn_1_array_len < 1)
++ return -1;
++ length_field = asn_1_array[0];
++
++ if (length_field < 0x80) {
++ // there is only one word
++ *length = length_field & 0x7f;
++ return 1;
++ } else if (length_field == 0x81) {
++ if (asn_1_array_len < 2)
++ return -1;
++
++ *length = asn_1_array[1];
++ return 2;
++ } else if (length_field == 0x82) {
++ if (asn_1_array_len < 3)
++ return -1;
++
++ *length = (asn_1_array[1] << 8) | asn_1_array[2];
++ return 3;
++ }
++
++ return -1;
++}
++
++int asn_1_encode(uint16_t length, uint8_t * asn_1_array,
++ uint32_t asn_1_array_len)
++{
++ if (length < 0x80) {
++ if (asn_1_array_len < 1)
++ return -1;
++
++ asn_1_array[0] = length & 0x7f;
++ return 1;
++ } else if (length < 0x100) {
++ if (asn_1_array_len < 2)
++ return -1;
++
++ asn_1_array[0] = 0x81;
++ asn_1_array[1] = length;
++ return 2;
++ } else {
++ if (asn_1_array_len < 3)
++ return -1;
++
++ asn_1_array[0] = 0x82;
++ asn_1_array[1] = length >> 8;
++ asn_1_array[2] = length;
++ return 3;
++ }
++
++ // never reached
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/asn_1.h dvb-apps/lib/libdvben50221/asn_1.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/asn_1.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/asn_1.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,41 @@
++/*
++ ASN.1 routines, implementation for libdvben50221
++ an implementation for the High Level Common Interface
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __ASN_1_H__
++#define __ASN_1_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++
++int asn_1_decode(uint16_t * length, uint8_t * asn_1_array,
++ uint32_t asn_1_array_len);
++int asn_1_encode(uint16_t length, uint8_t * asn_1_array,
++ uint32_t asn_1_array_len);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ai.c dvb-apps/lib/libdvben50221/en50221_app_ai.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ai.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_ai.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,191 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include "en50221_app_ai.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_ai {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_ai_callback callback;
++ void *callback_arg;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_ai_parse_app_info(struct en50221_app_ai *ai,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++
++struct en50221_app_ai *en50221_app_ai_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_ai *ai = NULL;
++
++ // create structure and set it up
++ ai = malloc(sizeof(struct en50221_app_ai));
++ if (ai == NULL) {
++ return NULL;
++ }
++ ai->funcs = funcs;
++ ai->callback = NULL;
++
++ pthread_mutex_init(&ai->lock, NULL);
++
++ // done
++ return ai;
++}
++
++void en50221_app_ai_destroy(struct en50221_app_ai *ai)
++{
++ pthread_mutex_destroy(&ai->lock);
++ free(ai);
++}
++
++void en50221_app_ai_register_callback(struct en50221_app_ai *ai,
++ en50221_app_ai_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&ai->lock);
++ ai->callback = callback;
++ ai->callback_arg = arg;
++ pthread_mutex_unlock(&ai->lock);
++}
++
++int en50221_app_ai_enquiry(struct en50221_app_ai *ai,
++ uint16_t session_number)
++{
++ uint8_t data[4];
++
++ data[0] = (TAG_APP_INFO_ENQUIRY >> 16) & 0xFF;
++ data[1] = (TAG_APP_INFO_ENQUIRY >> 8) & 0xFF;
++ data[2] = TAG_APP_INFO_ENQUIRY & 0xFF;
++ data[3] = 0;
++
++ return ai->funcs->send_data(ai->funcs->arg, session_number, data, 4);
++}
++
++int en50221_app_ai_entermenu(struct en50221_app_ai *ai,
++ uint16_t session_number)
++{
++ uint8_t data[4];
++
++ data[0] = (TAG_ENTER_MENU >> 16) & 0xFF;
++ data[1] = (TAG_ENTER_MENU >> 8) & 0xFF;
++ data[2] = TAG_ENTER_MENU & 0xFF;
++ data[3] = 0;
++
++ return ai->funcs->send_data(ai->funcs->arg, session_number, data, 4);
++}
++
++int en50221_app_ai_message(struct en50221_app_ai *ai,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_APP_INFO:
++ return en50221_app_ai_parse_app_info(ai, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++
++
++
++
++
++static int en50221_app_ai_parse_app_info(struct en50221_app_ai *ai,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // parse the length field
++ int length_field_len;
++ uint16_t asn_data_length;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ return -1;
++ }
++ // check it
++ if (asn_data_length < 6) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t *app_info = data + length_field_len;
++
++ // parse the fields
++ uint8_t application_type = app_info[0];
++ uint16_t application_manufacturer = (app_info[1] << 8) | app_info[2];
++ uint16_t manufacturer_code = (app_info[3] << 8) | app_info[4];
++ uint8_t menu_string_length = app_info[5];
++ uint8_t *menu_string = app_info + 6;
++
++ // check the menu_string_length
++ if (menu_string_length > (asn_data_length - 6)) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received bad menu string length - adjusting\n");
++ menu_string_length = asn_data_length - 6;
++ }
++ // tell the app
++ pthread_mutex_lock(&ai->lock);
++ en50221_app_ai_callback cb = ai->callback;
++ void *cb_arg = ai->callback_arg;
++ pthread_mutex_unlock(&ai->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number,
++ application_type, application_manufacturer,
++ manufacturer_code, menu_string_length,
++ menu_string);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ai.h dvb-apps/lib/libdvben50221/en50221_app_ai.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ai.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_ai.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,136 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_AI_H__
++#define __EN50221_APPLICATION_AI_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++
++#define EN50221_APP_AI_RESOURCEID MKRID(2,1,1)
++
++#define APPLICATION_TYPE_CA 0x01
++#define APPLICATION_TYPE_EPG 0x02
++
++/**
++ * Type definition for application callback function - called when we receive
++ * an application info object.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Resource id concerned.
++ * @param application_type Type of application.
++ * @param application_manufacturer Manufacturer of application.
++ * @param manufacturer_code Manufacturer specific code.
++ * @param menu_string_length Length of menu string.
++ * @param menu_string The menu string itself.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_ai_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t application_type,
++ uint16_t application_manufacturer,
++ uint16_t manufacturer_code,
++ uint8_t menu_string_length,
++ uint8_t * menu_string);
++
++/**
++ * Opaque type representing an application information resource.
++ */
++struct en50221_app_ai;
++
++/**
++ * Create an instance of an application information resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_ai *en50221_app_ai_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of an application information resource.
++ *
++ * @param ai Instance to destroy.
++ */
++extern void en50221_app_ai_destroy(struct en50221_app_ai *ai);
++
++/**
++ * Register a callback for reception of application_info objects.
++ *
++ * @param ai Application information instance.
++ * @param callback Callback function.
++ * @param arg Private argument passed during calls to the callback.
++ */
++extern void en50221_app_ai_register_callback(struct en50221_app_ai *ai,
++ en50221_app_ai_callback,
++ void *arg);
++
++/**
++ * send a enquiry for the app_info provided by a module
++ *
++ * @param ai Application information instance.
++ * @param session_number Session to send on.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_ai_enquiry(struct en50221_app_ai *ai,
++ uint16_t session_number);
++
++/**
++ * send a enter_menu tag, this will make the application
++ * open a new MMI session to provide a Menu, or so.
++ *
++ * @param ai Application information instance.
++ * @param session_number Session to send on.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_ai_entermenu(struct en50221_app_ai *ai,
++ uint16_t session_number);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param ai Application information instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_ai_message(struct en50221_app_ai *ai,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t *data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_auth.c dvb-apps/lib/libdvben50221/en50221_app_auth.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_auth.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_auth.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,180 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include "en50221_app_auth.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_auth {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_auth_request_callback callback;
++ void *callback_arg;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_auth_parse_request(struct en50221_app_auth *private,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++
++struct en50221_app_auth *en50221_app_auth_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_auth *auth = NULL;
++
++ // create structure and set it up
++ auth = malloc(sizeof(struct en50221_app_auth));
++ if (auth == NULL) {
++ return NULL;
++ }
++ auth->funcs = funcs;
++ auth->callback = NULL;
++
++ pthread_mutex_init(&auth->lock, NULL);
++
++ // done
++ return auth;
++}
++
++void en50221_app_auth_destroy(struct en50221_app_auth *auth)
++{
++ pthread_mutex_destroy(&auth->lock);
++ free(auth);
++}
++
++void en50221_app_auth_register_request_callback(struct en50221_app_auth *auth,
++ en50221_app_auth_request_callback callback, void *arg)
++{
++ pthread_mutex_lock(&auth->lock);
++ auth->callback = callback;
++ auth->callback_arg = arg;
++ pthread_mutex_unlock(&auth->lock);
++}
++
++int en50221_app_auth_send(struct en50221_app_auth *auth,
++ uint16_t session_number,
++ uint16_t auth_protocol_id, uint8_t * auth_data,
++ uint32_t auth_data_length)
++{
++ uint8_t buf[10];
++
++ // the header
++ buf[0] = (TAG_AUTH_RESP >> 16) & 0xFF;
++ buf[1] = (TAG_AUTH_RESP >> 8) & 0xFF;
++ buf[2] = TAG_AUTH_RESP & 0xFF;
++
++ // encode the length field
++ int length_field_len;
++ if ((length_field_len = asn_1_encode(auth_data_length + 2, buf + 3, 3)) < 0) {
++ return -1;
++ }
++ // the phase_id
++ buf[3 + length_field_len] = auth_protocol_id >> 8;
++ buf[3 + length_field_len + 1] = auth_protocol_id;
++
++ // build the iovecs
++ struct iovec iov[2];
++ iov[0].iov_base = buf;
++ iov[0].iov_len = 3 + length_field_len + 2;
++ iov[1].iov_base = auth_data;
++ iov[1].iov_len = auth_data_length;
++
++ // sendit
++ return auth->funcs->send_datav(auth->funcs->arg, session_number,
++ iov, 2);
++}
++
++int en50221_app_auth_message(struct en50221_app_auth *auth,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_AUTH_REQ:
++ return en50221_app_auth_parse_request(auth, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++
++static int en50221_app_auth_parse_request(struct en50221_app_auth *auth,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length < 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t *auth_data = data + length_field_len;
++
++ // process it
++ uint16_t auth_protocol_id = (auth_data[0] << 8) | auth_data[1];
++
++ // tell the app
++ pthread_mutex_lock(&auth->lock);
++ en50221_app_auth_request_callback cb = auth->callback;
++ void *cb_arg = auth->callback_arg;
++ pthread_mutex_unlock(&auth->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number,
++ auth_protocol_id, auth_data + 2,
++ asn_data_length - 2);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_auth.h dvb-apps/lib/libdvben50221/en50221_app_auth.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_auth.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_auth.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,123 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_auth_H__
++#define __EN50221_APPLICATION_auth_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++
++#define EN50221_APP_AUTH_RESOURCEID MKRID(16,1,1)
++
++/**
++ * Type definition for request - called when we receive a auth request from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param auth_protocol_id Auth protocol id.
++ * @param auth_data Data for the request.
++ * @param auth_data_lenghth Number of bytes.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_auth_request_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint16_t auth_protcol_id,
++ uint8_t *auth_data,
++ uint32_t auth_data_length);
++
++/**
++ * Opaque type representing a auth resource.
++ */
++struct en50221_app_auth;
++
++/**
++ * Create an instance of the auth resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_auth *en50221_app_auth_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the auth resource.
++ *
++ * @param auth Instance to destroy.
++ */
++extern void en50221_app_auth_destroy(struct en50221_app_auth *auth);
++
++/**
++ * Register the callback for when we receive a request.
++ *
++ * @param auth auth resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_auth_register_request_callback(struct en50221_app_auth *auth,
++ en50221_app_auth_request_callback callback,
++ void *arg);
++
++/**
++ * Send an auth response to the CAM.
++ *
++ * @param auth auth resource instance.
++ * @param session_number Session number to send it on.
++ * @param auth_protocol_id Auth protocol id.
++ * @param auth_data Auth data.
++ * @param auth_data_length Number of bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_auth_send(struct en50221_app_auth *auth,
++ uint16_t session_number,
++ uint16_t auth_protocol_id,
++ uint8_t *auth_data,
++ uint32_t auth_data_length);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param auth Authentication instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_auth_message(struct en50221_app_auth *auth,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t *data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ca.c dvb-apps/lib/libdvben50221/en50221_app_ca.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ca.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_ca.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,631 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include <libucsi/mpeg/descriptor.h>
++#include "en50221_app_ca.h"
++#include "asn_1.h"
++
++// tags supported by this resource
++#define TAG_CA_INFO_ENQUIRY 0x9f8030
++#define TAG_CA_INFO 0x9f8031
++#define TAG_CA_PMT 0x9f8032
++#define TAG_CA_PMT_REPLY 0x9f8033
++
++struct en50221_app_ca {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_ca_info_callback ca_info_callback;
++ void *ca_info_callback_arg;
++
++ en50221_app_ca_pmt_reply_callback ca_pmt_reply_callback;
++ void *ca_pmt_reply_callback_arg;
++
++ pthread_mutex_t lock;
++};
++
++struct ca_pmt_descriptor {
++ uint8_t *descriptor;
++ uint16_t length;
++
++ struct ca_pmt_descriptor *next;
++};
++
++struct ca_pmt_stream {
++ uint8_t stream_type;
++ uint16_t pid;
++ struct ca_pmt_descriptor *descriptors;
++ uint32_t descriptors_length;
++ uint32_t descriptors_count;
++
++ struct ca_pmt_stream *next;
++};
++
++static int en50221_ca_extract_pmt_descriptors(struct mpeg_pmt_section *pmt,
++ struct ca_pmt_descriptor **outdescriptors);
++static int en50221_ca_extract_streams(struct mpeg_pmt_section *pmt,
++ struct ca_pmt_stream **outstreams);
++static void en50221_ca_try_move_pmt_descriptors(struct ca_pmt_descriptor **pmt_descriptors,
++ struct ca_pmt_stream **pmt_streams);
++static uint32_t en50221_ca_calculate_length(struct ca_pmt_descriptor *pmt_descriptors,
++ uint32_t *pmt_descriptors_length,
++ struct ca_pmt_stream *pmt_streams);
++static int en50221_app_ca_parse_info(struct en50221_app_ca *ca,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data, uint32_t data_length);
++static int en50221_app_ca_parse_reply(struct en50221_app_ca *ca,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++
++
++struct en50221_app_ca *en50221_app_ca_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_ca *ca = NULL;
++
++ // create structure and set it up
++ ca = malloc(sizeof(struct en50221_app_ca));
++ if (ca == NULL) {
++ return NULL;
++ }
++ ca->funcs = funcs;
++ ca->ca_info_callback = NULL;
++ ca->ca_pmt_reply_callback = NULL;
++
++ pthread_mutex_init(&ca->lock, NULL);
++
++ // done
++ return ca;
++}
++
++void en50221_app_ca_destroy(struct en50221_app_ca *ca)
++{
++ pthread_mutex_destroy(&ca->lock);
++ free(ca);
++}
++
++void en50221_app_ca_register_info_callback(struct en50221_app_ca *ca,
++ en50221_app_ca_info_callback
++ callback, void *arg)
++{
++ pthread_mutex_lock(&ca->lock);
++ ca->ca_info_callback = callback;
++ ca->ca_info_callback_arg = arg;
++ pthread_mutex_unlock(&ca->lock);
++}
++
++void en50221_app_ca_register_pmt_reply_callback(struct en50221_app_ca *ca,
++ en50221_app_ca_pmt_reply_callback
++ callback, void *arg)
++{
++ pthread_mutex_lock(&ca->lock);
++ ca->ca_pmt_reply_callback = callback;
++ ca->ca_pmt_reply_callback_arg = arg;
++ pthread_mutex_unlock(&ca->lock);
++}
++
++int en50221_app_ca_info_enq(struct en50221_app_ca *ca,
++ uint16_t session_number)
++{
++ uint8_t data[4];
++
++ data[0] = (TAG_CA_INFO_ENQUIRY >> 16) & 0xFF;
++ data[1] = (TAG_CA_INFO_ENQUIRY >> 8) & 0xFF;
++ data[2] = TAG_CA_INFO_ENQUIRY & 0xFF;
++ data[3] = 0;
++ return ca->funcs->send_data(ca->funcs->arg, session_number, data, 4);
++}
++
++int en50221_app_ca_pmt(struct en50221_app_ca *ca,
++ uint16_t session_number,
++ uint8_t * ca_pmt, uint32_t ca_pmt_length)
++{
++ uint8_t buf[10];
++
++ // set up the tag
++ buf[0] = (TAG_CA_PMT >> 16) & 0xFF;
++ buf[1] = (TAG_CA_PMT >> 8) & 0xFF;
++ buf[2] = TAG_CA_PMT & 0xFF;
++
++ // encode the length field
++ int length_field_len;
++ if ((length_field_len = asn_1_encode(ca_pmt_length, buf + 3, 3)) < 0) {
++ return -1;
++ }
++ // build the iovecs
++ struct iovec iov[2];
++ iov[0].iov_base = buf;
++ iov[0].iov_len = 3 + length_field_len;
++ iov[1].iov_base = ca_pmt;
++ iov[1].iov_len = ca_pmt_length;
++
++ // create the data and send it
++ return ca->funcs->send_datav(ca->funcs->arg, session_number, iov, 2);
++}
++
++int en50221_app_ca_message(struct en50221_app_ca *ca,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_CA_INFO:
++ return en50221_app_ca_parse_info(ca, slot_id,
++ session_number, data + 3,
++ data_length - 3);
++ case TAG_CA_PMT_REPLY:
++ return en50221_app_ca_parse_reply(ca, slot_id,
++ session_number, data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++int en50221_ca_format_pmt(struct mpeg_pmt_section *pmt, uint8_t * data,
++ uint32_t data_length, int move_ca_descriptors,
++ uint8_t ca_pmt_list_management,
++ uint8_t ca_pmt_cmd_id)
++{
++ struct ca_pmt_descriptor *pmt_descriptors = NULL;
++ uint32_t pmt_descriptors_length = 0;
++ struct ca_pmt_stream *pmt_streams = NULL;
++ uint32_t total_required_length = 0;
++ struct ca_pmt_descriptor *cur_d;
++ struct ca_pmt_stream *cur_s;
++ int result = -1;
++
++ // extract the descriptors and streams
++ if (en50221_ca_extract_pmt_descriptors(pmt, &pmt_descriptors))
++ goto cleanup;
++ if (en50221_ca_extract_streams(pmt, &pmt_streams))
++ goto cleanup;
++
++ // try and merge them if we have no PMT descriptors
++ if ((pmt_descriptors == NULL) && move_ca_descriptors) {
++ en50221_ca_try_move_pmt_descriptors(&pmt_descriptors,
++ &pmt_streams);
++ }
++ // calculate the length of all descriptors/streams and the total length required
++ total_required_length =
++ en50221_ca_calculate_length(pmt_descriptors,
++ &pmt_descriptors_length,
++ pmt_streams);
++
++ // ensure we were supplied with enough data
++ if (total_required_length > data_length) {
++ goto cleanup;
++ }
++ // format the start of the PMT
++ uint32_t data_pos = 0;
++ data[data_pos++] = ca_pmt_list_management;
++ data[data_pos++] = mpeg_pmt_section_program_number(pmt) >> 8;
++ data[data_pos++] = mpeg_pmt_section_program_number(pmt);
++ data[data_pos++] =
++ (pmt->head.version_number << 1) | pmt->head.
++ current_next_indicator;
++ data[data_pos++] = (pmt_descriptors_length >> 8) & 0x0f;
++ data[data_pos++] = pmt_descriptors_length;
++
++ // append the PMT descriptors
++ if (pmt_descriptors_length) {
++ data[data_pos++] = ca_pmt_cmd_id;
++ cur_d = pmt_descriptors;
++ while (cur_d) {
++ memcpy(data + data_pos, cur_d->descriptor,
++ cur_d->length);
++ data_pos += cur_d->length;
++ cur_d = cur_d->next;
++ }
++ }
++ // now, append the streams
++ cur_s = pmt_streams;
++ while (cur_s) {
++ data[data_pos++] = cur_s->stream_type;
++ data[data_pos++] = (cur_s->pid >> 8) & 0x1f;
++ data[data_pos++] = cur_s->pid;
++ data[data_pos++] = (cur_s->descriptors_length >> 8) & 0x0f;
++ data[data_pos++] = cur_s->descriptors_length;
++
++ // append the stream descriptors
++ if (cur_s->descriptors_length) {
++ data[data_pos++] = ca_pmt_cmd_id;
++ cur_d = cur_s->descriptors;
++ while (cur_d) {
++ memcpy(data + data_pos, cur_d->descriptor,
++ cur_d->length);
++ data_pos += cur_d->length;
++ cur_d = cur_d->next;
++ }
++ }
++ cur_s = cur_s->next;
++ }
++ result = data_pos;
++
++
++ cleanup:
++ // free the PMT descriptors
++ cur_d = pmt_descriptors;
++ while (cur_d) {
++ struct ca_pmt_descriptor *next = cur_d->next;
++ free(cur_d);
++ cur_d = next;
++ }
++
++ // free the streams
++ cur_s = pmt_streams;
++ while (cur_s) {
++ struct ca_pmt_stream *next_s = cur_s->next;
++
++ // free the stream descriptors
++ cur_d = cur_s->descriptors;
++ while (cur_d) {
++ struct ca_pmt_descriptor *next_d = cur_d->next;
++ free(cur_d);
++ cur_d = next_d;
++ }
++
++ free(cur_s);
++ cur_s = next_s;
++ }
++ return result;
++}
++
++
++
++
++
++
++
++static int en50221_ca_extract_pmt_descriptors(struct mpeg_pmt_section *pmt,
++ struct ca_pmt_descriptor **outdescriptors)
++{
++ struct ca_pmt_descriptor *descriptors = NULL;
++ struct ca_pmt_descriptor *descriptors_tail = NULL;
++ struct ca_pmt_descriptor *cur_d;
++
++ struct descriptor *cur_descriptor;
++ mpeg_pmt_section_descriptors_for_each(pmt, cur_descriptor) {
++ if (cur_descriptor->tag == dtag_mpeg_ca) {
++ // create a new structure for this one
++ struct ca_pmt_descriptor *new_d =
++ malloc(sizeof(struct ca_pmt_descriptor));
++ if (new_d == NULL) {
++ goto error_exit;
++ }
++ new_d->descriptor = (uint8_t *) cur_descriptor;
++ new_d->length = cur_descriptor->len + 2;
++ new_d->next = NULL;
++
++ // append it to the list
++ if (descriptors == NULL) {
++ descriptors = new_d;
++ } else {
++ descriptors_tail->next = new_d;
++ }
++ descriptors_tail = new_d;
++ }
++ }
++ *outdescriptors = descriptors;
++ return 0;
++
++error_exit:
++ cur_d = descriptors;
++ while (cur_d) {
++ struct ca_pmt_descriptor *next = cur_d->next;
++ free(cur_d);
++ cur_d = next;
++ }
++ return -1;
++}
++
++static int en50221_ca_extract_streams(struct mpeg_pmt_section *pmt,
++ struct ca_pmt_stream **outstreams)
++{
++ struct ca_pmt_stream *streams = NULL;
++ struct ca_pmt_stream *streams_tail = NULL;
++ struct mpeg_pmt_stream *cur_stream;
++ struct descriptor *cur_descriptor;
++ struct ca_pmt_stream *cur_s;
++
++ mpeg_pmt_section_streams_for_each(pmt, cur_stream) {
++ struct ca_pmt_descriptor *descriptors_tail = NULL;
++
++ // create a new structure
++ struct ca_pmt_stream *new_s =
++ malloc(sizeof(struct ca_pmt_stream));
++ if (new_s == NULL) {
++ goto exit_cleanup;
++ }
++ new_s->stream_type = cur_stream->stream_type;
++ new_s->pid = cur_stream->pid;
++ new_s->descriptors = NULL;
++ new_s->next = NULL;
++ new_s->descriptors_count = 0;
++
++ // append it to the list
++ if (streams == NULL) {
++ streams = new_s;
++ } else {
++ streams_tail->next = new_s;
++ }
++ streams_tail = new_s;
++
++ // now process the descriptors
++ mpeg_pmt_stream_descriptors_for_each(cur_stream,
++ cur_descriptor) {
++ if (cur_descriptor->tag == dtag_mpeg_ca) {
++ // create a new structure
++ struct ca_pmt_descriptor *new_d =
++ malloc(sizeof(struct ca_pmt_descriptor));
++ if (new_d == NULL) {
++ goto exit_cleanup;
++ }
++ new_d->descriptor =
++ (uint8_t *) cur_descriptor;
++ new_d->length = cur_descriptor->len + 2;
++ new_d->next = NULL;
++
++ // append it to the list
++ if (new_s->descriptors == NULL) {
++ new_s->descriptors = new_d;
++ } else {
++ descriptors_tail->next = new_d;
++ }
++ descriptors_tail = new_d;
++ new_s->descriptors_count++;
++ }
++ }
++ }
++ *outstreams = streams;
++ return 0;
++
++exit_cleanup:
++ // free the streams
++ cur_s = streams;
++ while (cur_s) {
++ struct ca_pmt_stream *next_s = cur_s->next;
++
++ // free the stream descriptors
++ struct ca_pmt_descriptor *cur_d = cur_s->descriptors;
++ while (cur_d) {
++ struct ca_pmt_descriptor *next_d = cur_d->next;
++ free(cur_d);
++ cur_d = next_d;
++ }
++
++ free(cur_s);
++ cur_s = next_s;
++ }
++ return -1;
++}
++
++static void en50221_ca_try_move_pmt_descriptors(struct ca_pmt_descriptor **pmt_descriptors,
++ struct ca_pmt_stream **pmt_streams)
++{
++ // get the first stream
++ struct ca_pmt_stream *first_stream = *pmt_streams;
++ if (first_stream == NULL)
++ return;
++
++ // Check that all the other streams with CA descriptors have exactly the same CA descriptors
++ struct ca_pmt_stream *cur_stream = first_stream->next;
++ while (cur_stream) {
++ // if there are differing numbers of descriptors, exit right now
++ if (cur_stream->descriptors_count != first_stream->descriptors_count)
++ return;
++
++ // now verify the descriptors match
++ struct ca_pmt_descriptor *cur_descriptor = cur_stream->descriptors;
++ struct ca_pmt_descriptor *first_cur_descriptor = first_stream->descriptors;
++ while (cur_descriptor) {
++ // check the descriptors are the same length
++ if (cur_descriptor->length != first_cur_descriptor->length)
++ return;
++
++ // check their contents match
++ if (memcmp(cur_descriptor->descriptor,
++ first_cur_descriptor->descriptor,
++ cur_descriptor->length)) {
++ return;
++ }
++ // move to next
++ cur_descriptor = cur_descriptor->next;
++ first_cur_descriptor = first_cur_descriptor->next;
++ }
++
++ // move to next
++ cur_stream = cur_stream->next;
++ }
++
++ // if we end up here, all descriptors in all streams matched
++
++ // hook the first stream's descriptors into the PMT's
++ *pmt_descriptors = first_stream->descriptors;
++ first_stream->descriptors = NULL;
++ first_stream->descriptors_count = 0;
++
++ // now free up all the descriptors in the other streams
++ cur_stream = first_stream->next;
++ while (cur_stream) {
++ struct ca_pmt_descriptor *cur_descriptor = cur_stream->descriptors;
++ while (cur_descriptor) {
++ struct ca_pmt_descriptor *next = cur_descriptor->next;
++ free(cur_descriptor);
++ cur_descriptor = next;
++ }
++ cur_stream->descriptors = NULL;
++ cur_stream->descriptors_count = 0;
++ cur_stream = cur_stream->next;
++ }
++}
++
++static uint32_t en50221_ca_calculate_length(struct ca_pmt_descriptor *pmt_descriptors,
++ uint32_t *pmt_descriptors_length,
++ struct ca_pmt_stream *pmt_streams)
++{
++ uint32_t total_required_length = 6; // header
++ struct ca_pmt_stream *cur_s;
++
++ // calcuate the PMT descriptors length
++ (*pmt_descriptors_length) = 0;
++ struct ca_pmt_descriptor *cur_d = pmt_descriptors;
++ while (cur_d) {
++ (*pmt_descriptors_length) += cur_d->length;
++ cur_d = cur_d->next;
++ }
++
++ // add on 1 byte for the ca_pmt_cmd_id if we have some descriptors.
++ if (*pmt_descriptors_length)
++ (*pmt_descriptors_length)++;
++
++ // update the total required length
++ total_required_length += *pmt_descriptors_length;
++
++ // calculate the length of descriptors in the streams
++ cur_s = pmt_streams;
++ while (cur_s) {
++ // calculate the size of descriptors in this stream
++ cur_s->descriptors_length = 0;
++ cur_d = cur_s->descriptors;
++ while (cur_d) {
++ cur_s->descriptors_length += cur_d->length;
++ cur_d = cur_d->next;
++ }
++
++ // add on 1 byte for the ca_pmt_cmd_id if we have some descriptors.
++ if (cur_s->descriptors_length)
++ cur_s->descriptors_length++;
++
++ // update the total required length;
++ total_required_length += 5 + cur_s->descriptors_length;
++
++ cur_s = cur_s->next;
++ }
++
++ // done
++ return total_required_length;
++}
++
++static int en50221_app_ca_parse_info(struct en50221_app_ca *ca,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data, uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ data += length_field_len;
++
++ // parse
++ uint32_t ca_id_count = asn_data_length / 2;
++
++ // byteswap the IDs
++ uint16_t *ids = (uint16_t *) data;
++ uint32_t i;
++ for (i = 0; i < ca_id_count; i++) {
++ bswap16(data);
++ data += 2;
++ }
++
++ // tell the app
++ pthread_mutex_lock(&ca->lock);
++ en50221_app_ca_info_callback cb = ca->ca_info_callback;
++ void *cb_arg = ca->ca_info_callback_arg;
++ pthread_mutex_unlock(&ca->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, ca_id_count,
++ ids);
++ }
++ return 0;
++}
++
++static int en50221_app_ca_parse_reply(struct en50221_app_ca *ca,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data, uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length < 4) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ data += length_field_len;
++ data_length -= length_field_len;
++
++ // process the reply table to fix endian issues
++ uint32_t pos = 4;
++ bswap16(data);
++ while (pos < asn_data_length) {
++ bswap16(data + pos);
++ pos += 3;
++ }
++
++ // tell the app
++ pthread_mutex_lock(&ca->lock);
++ en50221_app_ca_pmt_reply_callback cb = ca->ca_pmt_reply_callback;
++ void *cb_arg = ca->ca_pmt_reply_callback_arg;
++ pthread_mutex_unlock(&ca->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number,
++ (struct en50221_app_pmt_reply *) data,
++ asn_data_length);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ca.h dvb-apps/lib/libdvben50221/en50221_app_ca.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_ca.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_ca.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,264 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_ca_H__
++#define __EN50221_APPLICATION_ca_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++#include <libucsi/mpeg/pmt_section.h>
++#include <libucsi/dvb/descriptor.h>
++
++#define CA_LIST_MANAGEMENT_MORE 0x00
++#define CA_LIST_MANAGEMENT_FIRST 0x01
++#define CA_LIST_MANAGEMENT_LAST 0x02
++#define CA_LIST_MANAGEMENT_ONLY 0x03
++#define CA_LIST_MANAGEMENT_ADD 0x04
++#define CA_LIST_MANAGEMENT_UPDATE 0x05
++
++#define CA_PMT_CMD_ID_OK_DESCRAMBLING 0x01
++#define CA_PMT_CMD_ID_OK_MMI 0x02
++#define CA_PMT_CMD_ID_QUERY 0x03
++#define CA_PMT_CMD_ID_NOT_SELECTED 0x04
++
++#define CA_ENABLE_DESCRAMBLING_POSSIBLE 0x01
++#define CA_ENABLE_DESCRAMBLING_POSSIBLE_PURCHASE 0x02
++#define CA_ENABLE_DESCRAMBLING_POSSIBLE_TECHNICAL 0x03
++#define CA_ENABLE_DESCRAMBLING_NOT_POSSIBLE_NO_ENTITLEMENT 0x71
++#define CA_ENABLE_DESCRAMBLING_NOT_POSSIBLE_TECHNICAL 0x73
++
++
++#define EN50221_APP_CA_RESOURCEID MKRID(3,1,1)
++
++/**
++ * PMT reply structure.
++ */
++struct en50221_app_pmt_reply {
++ uint16_t program_number;
++ EBIT3(uint8_t reserved_1 : 2;,
++ uint8_t version_number : 5;,
++ uint8_t current_next_indicator : 1;);
++ EBIT2(uint8_t CA_enable_flag : 1;,
++ uint8_t CA_enable : 7;);
++ /* struct en50221_app_pmt_stream streams[] */
++} __attribute__ ((packed));
++
++/**
++ * A stream within a pmt reply structure.
++ */
++struct en50221_app_pmt_stream {
++ EBIT2(uint16_t reserved_1 : 3;,
++ uint16_t es_pid :13;);
++ EBIT2(uint8_t CA_enable_flag : 1;,
++ uint8_t CA_enable : 7;);
++} __attribute__ ((packed));
++
++/**
++ * Convenience iterator for the streams field of the en50221_app_pmt_reply structure.
++ *
++ * @param pmt Pointer to the en50221_app_pmt_reply structure.
++ * @param pos Variable holding a pointer to the current en50221_app_pmt_stream.
++ * @param size Total size of the PMT reply.
++ */
++#define en50221_app_pmt_reply_streams_for_each(pmt, pos, size) \
++ for ((pos) = en50221_app_pmt_reply_streams_first(pmt, size); \
++ (pos); \
++ (pos) = en50221_app_pmt_reply_streams_next(pmt, pos, size))
++
++
++/**
++ * Type definition for command - called when we receive a ca info response.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param ca_id_count Number of ca_system_ids.
++ * @param ca_ids Pointer to list of ca_system_ids.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_ca_info_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t ca_id_count,
++ uint16_t * ca_ids);
++
++/**
++ * Type definition for pmt_reply - called when we receive a pmt_reply.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param reply Pointer to a struct en50221_app_pmt_reply.
++ * @param reply_size Total size of the struct en50221_app_pmt_reply in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_ca_pmt_reply_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ struct en50221_app_pmt_reply *reply,
++ uint32_t reply_size);
++
++/**
++ * Opaque type representing a ca resource.
++ */
++struct en50221_app_ca;
++
++/**
++ * Create an instance of the ca resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_ca *en50221_app_ca_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the ca resource.
++ *
++ * @param ca Instance to destroy.
++ */
++extern void en50221_app_ca_destroy(struct en50221_app_ca *ca);
++
++/**
++ * Register the callback for when we receive a ca info.
++ *
++ * @param ca ca resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_ca_register_info_callback(struct en50221_app_ca *ca,
++ en50221_app_ca_info_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a pmt_reply.
++ *
++ * @param ca ca resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_ca_register_pmt_reply_callback(struct en50221_app_ca *ca,
++ en50221_app_ca_pmt_reply_callback callback,
++ void *arg);
++
++/**
++ * Send a ca_info_req to the CAM.
++ *
++ * @param ca ca resource instance.
++ * @param session_number Session number to send it on.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_ca_info_enq(struct en50221_app_ca *ca,
++ uint16_t session_number);
++
++/**
++ * Send a ca_pmt structure to the CAM.
++ *
++ * @param ca ca resource instance.
++ * @param session_number Session number to send it on.
++ * @param ca_pmt A ca_pmt structure formatted with the en50221_ca_format_pmt() function.
++ * @param ca_pmt_length Length of ca_pmt structure in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_ca_pmt(struct en50221_app_ca *ca,
++ uint16_t session_number,
++ uint8_t * ca_pmt,
++ uint32_t ca_pmt_length);
++
++/**
++ * Transform a libucsi PMT into a binary structure for sending to a CAM.
++ *
++ * @param pmt The source PMT structure.
++ * @param data Pointer to data buffer to write it to.
++ * @param data_length Number of bytes available in data buffer.
++ * @param move_ca_descriptors If non-zero, will attempt to move CA descriptors
++ * in order to reduce the size of the formatted CAPMT.
++ * @param ca_pmt_list_management One of the CA_LIST_MANAGEMENT_*.
++ * @param ca_pmt_cmd_id One of the CA_PMT_CMD_ID_*.
++ * @return Number of bytes used, or -1 on error.
++ */
++extern int en50221_ca_format_pmt(struct mpeg_pmt_section *pmt,
++ uint8_t * data,
++ uint32_t data_length,
++ int move_ca_descriptors,
++ uint8_t ca_pmt_list_management,
++ uint8_t ca_pmt_cmd_id);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param ca CA instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_ca_message(struct en50221_app_ca *ca,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t *data,
++ uint32_t data_length);
++
++
++
++
++static inline struct en50221_app_pmt_stream *
++ en50221_app_pmt_reply_streams_first(struct en50221_app_pmt_reply *reply,
++ uint32_t reply_size)
++{
++ uint32_t pos = sizeof(struct en50221_app_pmt_reply);
++
++ if (pos >= reply_size)
++ return NULL;
++
++ return (struct en50221_app_pmt_stream *) ((uint8_t *) reply + pos);
++}
++
++static inline struct en50221_app_pmt_stream *
++ en50221_app_pmt_reply_streams_next(struct en50221_app_pmt_reply *reply,
++ struct en50221_app_pmt_stream *pos,
++ uint32_t reply_size)
++{
++ uint8_t *end = (uint8_t *) reply + reply_size;
++ uint8_t *next =
++ (uint8_t *) pos +
++ sizeof(struct en50221_app_pmt_stream);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct en50221_app_pmt_stream *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_datetime.c dvb-apps/lib/libdvben50221/en50221_app_datetime.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_datetime.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_datetime.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,173 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include <libucsi/dvb/types.h>
++#include "en50221_app_datetime.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_datetime {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_datetime_enquiry_callback callback;
++ void *callback_arg;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_datetime_parse_enquiry(struct en50221_app_datetime *datetime,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++
++
++struct en50221_app_datetime *en50221_app_datetime_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_datetime *datetime = NULL;
++
++ // create structure and set it up
++ datetime = malloc(sizeof(struct en50221_app_datetime));
++ if (datetime == NULL) {
++ return NULL;
++ }
++ datetime->funcs = funcs;
++ datetime->callback = NULL;
++
++ pthread_mutex_init(&datetime->lock, NULL);
++
++ // done
++ return datetime;
++}
++
++void en50221_app_datetime_destroy(struct en50221_app_datetime *datetime)
++{
++ pthread_mutex_destroy(&datetime->lock);
++ free(datetime);
++}
++
++void en50221_app_datetime_register_enquiry_callback(struct en50221_app_datetime *datetime,
++ en50221_app_datetime_enquiry_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&datetime->lock);
++ datetime->callback = callback;
++ datetime->callback_arg = arg;
++ pthread_mutex_unlock(&datetime->lock);
++}
++
++int en50221_app_datetime_send(struct en50221_app_datetime *datetime,
++ uint16_t session_number,
++ time_t utc_time, int time_offset)
++{
++ uint8_t data[11];
++ int data_length;
++
++ data[0] = (TAG_DATE_TIME >> 16) & 0xFF;
++ data[1] = (TAG_DATE_TIME >> 8) & 0xFF;
++ data[2] = TAG_DATE_TIME & 0xFF;
++ if (time_offset != -1) {
++ data[3] = 7;
++ unixtime_to_dvbdate(utc_time, data + 4);
++ data[9] = time_offset >> 8;
++ data[10] = time_offset;
++ data_length = 11;
++ } else {
++ data[3] = 5;
++ unixtime_to_dvbdate(utc_time, data + 4);
++ data_length = 9;
++ }
++ return datetime->funcs->send_data(datetime->funcs->arg,
++ session_number, data,
++ data_length);
++}
++
++int en50221_app_datetime_message(struct en50221_app_datetime *datetime,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_DATE_TIME_ENQUIRY:
++ return en50221_app_datetime_parse_enquiry(datetime,
++ slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++
++
++
++
++
++
++
++
++static int en50221_app_datetime_parse_enquiry(struct en50221_app_datetime *datetime,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // validate data
++ if (data_length != 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] != 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t response_interval = data[1];
++
++ // tell the app
++ pthread_mutex_lock(&datetime->lock);
++ en50221_app_datetime_enquiry_callback cb = datetime->callback;
++ void *cb_arg = datetime->callback_arg;
++ pthread_mutex_unlock(&datetime->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number,
++ response_interval);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_datetime.h dvb-apps/lib/libdvben50221/en50221_app_datetime.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_datetime.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_datetime.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,119 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_DATETIME_H__
++#define __EN50221_APPLICATION_DATETIME_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++
++#define EN50221_APP_DATETIME_RESOURCEID MKRID(36,1,1)
++
++/**
++ * Type definition for enquiry - called when we receive a date/time enquiry from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param response_interval Response interval requested by CAM.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_datetime_enquiry_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t response_interval);
++
++/**
++ * Opaque type representing a datetime resource.
++ */
++struct en50221_app_datetime;
++
++/**
++ * Create an instance of the datetime resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_datetime
++ *en50221_app_datetime_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the datetime resource.
++ *
++ * @param datetime Instance to destroy.
++ */
++extern void en50221_app_datetime_destroy(struct en50221_app_datetime *datetime);
++
++/**
++ * Register the callback for when we receive a enquiry request.
++ *
++ * @param datetime datetime resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_datetime_register_enquiry_callback(struct en50221_app_datetime *datetime,
++ en50221_app_datetime_enquiry_callback callback,
++ void *arg);
++
++/**
++ * Send the time to the CAM.
++ *
++ * @param datetime datetime resource instance.
++ * @param session_number Session number to send it on.
++ * @param utc_time UTC time in unix time format.
++ * @param time_offset If -1, the field will not be transmitted, otherwise it is the offset between
++ * UTC and local time in minutes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_datetime_send(struct en50221_app_datetime *datetime,
++ uint16_t session_number,
++ time_t utc_time,
++ int time_offset);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param datetime datetime instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_datetime_message(struct en50221_app_datetime *datetime,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t *data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_dvb.c dvb-apps/lib/libdvben50221/en50221_app_dvb.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_dvb.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_dvb.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,282 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include "en50221_app_dvb.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_dvb {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_dvb_tune_callback tune_callback;
++ void *tune_callback_arg;
++
++ en50221_app_dvb_replace_callback replace_callback;
++ void *replace_callback_arg;
++
++ en50221_app_dvb_clear_replace_callback clear_replace_callback;
++ void *clear_replace_callback_arg;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_dvb_parse_tune(struct en50221_app_dvb *dvb,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++static int en50221_app_dvb_parse_replace(struct en50221_app_dvb *dvb,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++static int en50221_app_dvb_parse_clear_replace(struct en50221_app_dvb *dvb,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++
++
++struct en50221_app_dvb *en50221_app_dvb_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_dvb *dvb = NULL;
++
++ // create structure and set it up
++ dvb = malloc(sizeof(struct en50221_app_dvb));
++ if (dvb == NULL) {
++ return NULL;
++ }
++ dvb->funcs = funcs;
++ dvb->tune_callback = NULL;
++ dvb->replace_callback = NULL;
++ dvb->clear_replace_callback = NULL;
++
++ pthread_mutex_init(&dvb->lock, NULL);
++
++ // done
++ return dvb;
++}
++
++void en50221_app_dvb_destroy(struct en50221_app_dvb *dvb)
++{
++ pthread_mutex_destroy(&dvb->lock);
++ free(dvb);
++}
++
++void en50221_app_dvb_register_tune_callback(struct en50221_app_dvb *dvb,
++ en50221_app_dvb_tune_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&dvb->lock);
++ dvb->tune_callback = callback;
++ dvb->tune_callback_arg = arg;
++ pthread_mutex_unlock(&dvb->lock);
++}
++
++void en50221_app_dvb_register_replace_callback(struct en50221_app_dvb *dvb,
++ en50221_app_dvb_replace_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&dvb->lock);
++ dvb->replace_callback = callback;
++ dvb->replace_callback_arg = arg;
++ pthread_mutex_unlock(&dvb->lock);
++}
++
++void en50221_app_dvb_register_clear_replace_callback(struct en50221_app_dvb *dvb,
++ en50221_app_dvb_clear_replace_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&dvb->lock);
++ dvb->clear_replace_callback = callback;
++ dvb->clear_replace_callback_arg = arg;
++ pthread_mutex_unlock(&dvb->lock);
++}
++
++int en50221_app_dvb_ask_release(struct en50221_app_dvb *dvb,
++ uint16_t session_number)
++{
++ uint8_t data[4];
++
++ data[0] = (TAG_ASK_RELEASE >> 16) & 0xFF;
++ data[1] = (TAG_ASK_RELEASE >> 8) & 0xFF;
++ data[2] = TAG_ASK_RELEASE & 0xFF;
++ data[3] = 0;
++
++ return dvb->funcs->send_data(dvb->funcs->arg, session_number, data, 4);
++}
++
++int en50221_app_dvb_message(struct en50221_app_dvb *dvb,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_TUNE:
++ return en50221_app_dvb_parse_tune(dvb, slot_id,
++ session_number, data + 3,
++ data_length - 3);
++ case TAG_REPLACE:
++ return en50221_app_dvb_parse_replace(dvb, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_CLEAR_REPLACE:
++ return en50221_app_dvb_parse_clear_replace(dvb, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++
++
++
++
++
++
++
++
++static int en50221_app_dvb_parse_tune(struct en50221_app_dvb *dvb,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data, uint32_t data_length)
++{
++ // validate data
++ if (data_length < 9) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] != 8) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t *tune_data = data + 1;
++
++ // parse it
++ uint16_t network_id = (tune_data[0] << 8) | tune_data[1];
++ uint16_t original_network_id = (tune_data[2] << 8) | tune_data[3];
++ uint16_t transport_stream_id = (tune_data[4] << 8) | tune_data[5];
++ uint16_t service_id = (tune_data[6] << 8) | tune_data[7];
++
++ // tell the app
++ pthread_mutex_lock(&dvb->lock);
++ en50221_app_dvb_tune_callback cb = dvb->tune_callback;
++ void *cb_arg = dvb->tune_callback_arg;
++ pthread_mutex_unlock(&dvb->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, network_id,
++ original_network_id, transport_stream_id,
++ service_id);
++ }
++ return 0;
++}
++
++static int en50221_app_dvb_parse_replace(struct en50221_app_dvb *dvb,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // validate data
++ if (data_length < 6) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] != 5) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t *replace_data = data + 1;
++
++ // parse it
++ uint8_t replacement_ref = replace_data[0];
++ uint16_t replace_pid =
++ ((replace_data[1] & 0x1f) << 8) | replace_data[2];
++ uint16_t replacement_pid =
++ ((replace_data[3] & 0x1f) << 8) | replace_data[4];
++
++ // tell the app
++ pthread_mutex_lock(&dvb->lock);
++ en50221_app_dvb_replace_callback cb = dvb->replace_callback;
++ void *cb_arg = dvb->replace_callback_arg;
++ pthread_mutex_unlock(&dvb->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, replacement_ref,
++ replace_pid, replacement_pid);
++ }
++ return 0;
++}
++
++static int en50221_app_dvb_parse_clear_replace(struct en50221_app_dvb *dvb,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // validate data
++ if (data_length < 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] != 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t *replace_data = data + 1;
++
++ // parse it
++ uint8_t replacement_ref = replace_data[0];
++
++ // tell the app
++ pthread_mutex_lock(&dvb->lock);
++ en50221_app_dvb_clear_replace_callback cb =
++ dvb->clear_replace_callback;
++ void *cb_arg = dvb->clear_replace_callback_arg;
++ pthread_mutex_unlock(&dvb->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number,
++ replacement_ref);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_dvb.h dvb-apps/lib/libdvben50221/en50221_app_dvb.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_dvb.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_dvb.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,176 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_DVB_H__
++#define __EN50221_APPLICATION_DVB_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++
++#define EN50221_APP_DVB_RESOURCEID MKRID(32,1,1)
++
++
++/**
++ * Type definition for tune - called when we receive a tune request from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param network_id Network id requested by CAM.
++ * @param original_network_id Original Network id requested by CAM.
++ * @param transport_stream_id Transport stream id requested by CAM.
++ * @param service_id Service id requested by CAM.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_dvb_tune_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint16_t network_id,
++ uint32_t original_network_id,
++ uint16_t transport_stream_id,
++ uint16_t service_id);
++
++/**
++ * Type definition for replace - called when we receive a replace request from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param replacement_ref Replacement ref.
++ * @param replaced_pid PID to replace.
++ * @param replacement_pid PID to replace it with.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_dvb_replace_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t replacement_ref,
++ uint16_t replaced_pid,
++ uint16_t replacement_pid);
++
++
++/**
++ * Type definition for clear_replace - called when we receive a clear_replace request from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param replacement_ref Replacement ref.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_dvb_clear_replace_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t replacement_ref);
++
++
++/**
++ * Opaque type representing a dvb resource.
++ */
++struct en50221_app_dvb;
++
++/**
++ * Create an instance of the dvb resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_dvb *en50221_app_dvb_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the dvb resource.
++ *
++ * @param dvb Instance to destroy.
++ */
++extern void en50221_app_dvb_destroy(struct en50221_app_dvb *dvb);
++
++/**
++ * Register the callback for when we receive a tune request.
++ *
++ * @param dvb DVB resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_dvb_register_tune_callback(struct en50221_app_dvb *dvb,
++ en50221_app_dvb_tune_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a replace request.
++ *
++ * @param dvb DVB resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_dvb_register_replace_callback(struct en50221_app_dvb *dvb,
++ en50221_app_dvb_replace_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a clear replace request.
++ *
++ * @param dvb DVB resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_dvb_register_clear_replace_callback(struct en50221_app_dvb *dvb,
++ en50221_app_dvb_clear_replace_callback callback,
++ void *arg);
++
++/**
++ * Send an ask release request to the CAM.
++ *
++ * @param dvb DVB resource instance.
++ * @param session_number Session number to send it on.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_dvb_ask_release(struct en50221_app_dvb *dvb,
++ uint16_t session_number);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param dvb dvb instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_dvb_message(struct en50221_app_dvb *dvb,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t *data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_epg.c dvb-apps/lib/libdvben50221/en50221_app_epg.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_epg.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_epg.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,167 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include <libucsi/dvb/types.h>
++#include "en50221_app_epg.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_epg {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_epg_reply_callback callback;
++ void *callback_arg;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_epg_parse_reply(struct en50221_app_epg *private,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++
++
++struct en50221_app_epg *en50221_app_epg_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_epg *epg = NULL;
++
++ // create structure and set it up
++ epg = malloc(sizeof(struct en50221_app_epg));
++ if (epg == NULL) {
++ return NULL;
++ }
++ epg->funcs = funcs;
++ epg->callback = NULL;
++
++ pthread_mutex_init(&epg->lock, NULL);
++
++ // done
++ return epg;
++}
++
++void en50221_app_epg_destroy(struct en50221_app_epg *epg)
++{
++ pthread_mutex_destroy(&epg->lock);
++ free(epg);
++}
++
++void en50221_app_epg_register_enquiry_callback(struct en50221_app_epg *epg,
++ en50221_app_epg_reply_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&epg->lock);
++ epg->callback = callback;
++ epg->callback_arg = arg;
++ pthread_mutex_unlock(&epg->lock);
++}
++
++int en50221_app_epg_enquire(struct en50221_app_epg *epg,
++ uint16_t session_number,
++ uint8_t command_id,
++ uint16_t network_id,
++ uint16_t original_network_id,
++ uint16_t transport_stream_id,
++ uint16_t service_id, uint16_t event_id)
++{
++ uint8_t data[15];
++
++ data[0] = (TAG_EPG_ENQUIRY >> 16) & 0xFF;
++ data[1] = (TAG_EPG_ENQUIRY >> 8) & 0xFF;
++ data[2] = TAG_EPG_ENQUIRY & 0xFF;
++ data[3] = 11;
++ data[4] = command_id;
++ data[5] = network_id >> 8;
++ data[6] = network_id;
++ data[7] = original_network_id >> 8;
++ data[8] = original_network_id;
++ data[9] = transport_stream_id >> 8;
++ data[10] = transport_stream_id;
++ data[11] = service_id >> 8;
++ data[12] = service_id;
++ data[13] = event_id >> 8;
++ data[14] = event_id;
++ return epg->funcs->send_data(epg->funcs->arg, session_number, data, 15);
++}
++
++int en50221_app_epg_message(struct en50221_app_epg *epg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ struct en50221_app_epg *private = (struct en50221_app_epg *) epg;
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_EPG_REPLY:
++ return en50221_app_epg_parse_reply(private, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++
++static int en50221_app_epg_parse_reply(struct en50221_app_epg *epg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // validate data
++ if (data_length != 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] != 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t event_status = data[1];
++
++ // tell the app
++ pthread_mutex_lock(&epg->lock);
++ en50221_app_epg_reply_callback cb = epg->callback;
++ void *cb_arg = epg->callback_arg;
++ pthread_mutex_unlock(&epg->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, event_status);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_epg.h dvb-apps/lib/libdvben50221/en50221_app_epg.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_epg.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_epg.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,138 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_epg_H__
++#define __EN50221_APPLICATION_epg_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++
++#define EPG_COMMAND_ID_MMI 0x02
++#define EPG_COMMAND_ID_QUERY 0x03
++
++#define EPG_EVENTSTATUS_ENTITLEMENT_UNKNOWN 0x00
++#define EPG_EVENTSTATUS_ENTITLEMENT_AVAILABLE 0x01
++#define EPG_EVENTSTATUS_ENTITLEMENT_NOT_AVAILABLE 0x02
++#define EPG_EVENTSTATUS_MMI_DIALOGUE_REQUIRED 0x03
++#define EPG_EVENTSTATUS_MMI_COMPLETE_UNKNOWN 0x04
++#define EPG_EVENTSTATUS_MMI_COMPLETE_AVAILABLE 0x05
++#define EPG_EVENTSTATUS_MMI_COMPLETE_NOT_AVAILABLE 0x06
++
++#define EN50221_APP_EPG_RESOURCEID(INSTANCE_NUM) MKRID(120,(INSTANCE_NUM),1)
++
++
++
++/**
++ * Type definition for reply - called when we receive an EPG reply from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param event_status One of the EPG_EVENTSTATUS_* values.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_epg_reply_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t event_status);
++
++/**
++ * Opaque type representing a epg resource.
++ */
++struct en50221_app_epg;
++
++/**
++ * Create an instance of the epg resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_epg *en50221_app_epg_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the epg resource.
++ *
++ * @param epg Instance to destroy.
++ */
++extern void en50221_app_epg_destroy(struct en50221_app_epg *epg);
++
++/**
++ * Register the callback for when we receive a enquiry response.
++ *
++ * @param epg epg resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_epg_register_reply_callback(struct en50221_app_epg *epg,
++ en50221_app_epg_reply_callback callback,
++ void *arg);
++
++/**
++ * Enquire about the entitlement status for an EPG entry.
++ *
++ * @param epg epg resource instance.
++ * @param session_number Session number to send it on.
++ * @param command_id One of the EPG_COMMAND_ID_* fields.
++ * @param network_id Network ID concerned.
++ * @param original_network_id Original network ID concerned.
++ * @param transport_stream_id Transport stream ID concerned.
++ * @param service_id Service ID concerned.
++ * @param event_id Event ID concerned.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_epg_enquire(struct en50221_app_epg *epg,
++ uint16_t session_number,
++ uint8_t command_id,
++ uint16_t network_id,
++ uint16_t original_network_id,
++ uint16_t transport_stream_id,
++ uint16_t service_id,
++ uint16_t event_id);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param epg epg instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_epg_message(struct en50221_app_epg *epg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t *data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_lowspeed.c dvb-apps/lib/libdvben50221/en50221_app_lowspeed.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_lowspeed.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_lowspeed.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,533 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include "en50221_app_lowspeed.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_lowspeed_session {
++ uint16_t session_number;
++ uint8_t *block_chain;
++ uint32_t block_length;
++
++ struct en50221_app_lowspeed_session *next;
++};
++
++struct en50221_app_lowspeed {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_lowspeed_command_callback command_callback;
++ void *command_callback_arg;
++
++ en50221_app_lowspeed_send_callback send_callback;
++ void *send_callback_arg;
++
++ struct en50221_app_lowspeed_session *sessions;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_lowspeed_parse_connect_on_channel(struct en50221_app_lowspeed_command *command,
++ uint8_t *data,
++ int data_length);
++static int en50221_app_lowspeed_parse_command(struct en50221_app_lowspeed *lowspeed,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t *data,
++ uint32_t data_length);
++static int en50221_app_lowspeed_parse_send(struct en50221_app_lowspeed *lowspeed,
++ uint8_t slot_id,
++ uint16_t session_number,
++ int more_last,
++ uint8_t *data,
++ uint32_t data_length);
++
++
++
++struct en50221_app_lowspeed *en50221_app_lowspeed_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_lowspeed *lowspeed = NULL;
++
++ // create structure and set it up
++ lowspeed = malloc(sizeof(struct en50221_app_lowspeed));
++ if (lowspeed == NULL) {
++ return NULL;
++ }
++ lowspeed->funcs = funcs;
++ lowspeed->command_callback = NULL;
++ lowspeed->send_callback = NULL;
++ lowspeed->sessions = NULL;
++
++ pthread_mutex_init(&lowspeed->lock, NULL);
++
++ // done
++ return lowspeed;
++}
++
++void en50221_app_lowspeed_destroy(struct en50221_app_lowspeed *lowspeed)
++{
++ struct en50221_app_lowspeed_session *cur_s = lowspeed->sessions;
++ while (cur_s) {
++ struct en50221_app_lowspeed_session *next = cur_s->next;
++ if (cur_s->block_chain)
++ free(cur_s->block_chain);
++ free(cur_s);
++ cur_s = next;
++ }
++
++ pthread_mutex_destroy(&lowspeed->lock);
++ free(lowspeed);
++}
++
++void en50221_app_lowspeed_clear_session(struct en50221_app_lowspeed *lowspeed,
++ uint16_t session_number)
++{
++ pthread_mutex_lock(&lowspeed->lock);
++ struct en50221_app_lowspeed_session *cur_s = lowspeed->sessions;
++ struct en50221_app_lowspeed_session *prev_s = NULL;
++ while (cur_s) {
++ if (cur_s->session_number == session_number) {
++ if (cur_s->block_chain)
++ free(cur_s->block_chain);
++ if (prev_s) {
++ prev_s->next = cur_s->next;
++ } else {
++ lowspeed->sessions = cur_s->next;
++ }
++ free(cur_s);
++ return;
++ }
++
++ prev_s = cur_s;
++ cur_s = cur_s->next;
++ }
++ pthread_mutex_unlock(&lowspeed->lock);
++}
++
++void en50221_app_lowspeed_register_command_callback(struct en50221_app_lowspeed *lowspeed,
++ en50221_app_lowspeed_command_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&lowspeed->lock);
++ lowspeed->command_callback = callback;
++ lowspeed->command_callback_arg = arg;
++ pthread_mutex_unlock(&lowspeed->lock);
++}
++
++void en50221_app_lowspeed_register_send_callback(struct en50221_app_lowspeed *lowspeed,
++ en50221_app_lowspeed_send_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&lowspeed->lock);
++ lowspeed->send_callback = callback;
++ lowspeed->send_callback_arg = arg;
++ pthread_mutex_unlock(&lowspeed->lock);
++}
++
++int en50221_app_lowspeed_send_comms_reply(struct en50221_app_lowspeed *lowspeed,
++ uint16_t session_number,
++ uint8_t comms_reply_id,
++ uint8_t return_value)
++{
++ uint8_t data[6];
++
++ data[0] = (TAG_COMMS_REPLY >> 16) & 0xFF;
++ data[1] = (TAG_COMMS_REPLY >> 8) & 0xFF;
++ data[2] = TAG_COMMS_REPLY & 0xFF;
++ data[3] = 2;
++ data[4] = comms_reply_id;
++ data[5] = return_value;
++ return lowspeed->funcs->send_data(lowspeed->funcs->arg,
++ session_number, data, 6);
++}
++
++int en50221_app_lowspeed_send_comms_data(struct en50221_app_lowspeed *lowspeed,
++ uint16_t session_number,
++ uint8_t phase_id,
++ uint32_t tx_data_length,
++ uint8_t * tx_data)
++{
++ uint8_t buf[10];
++
++ // the spec defines this limit
++ if (tx_data_length > 254) {
++ return -1;
++ }
++ // set up the tag
++ buf[0] = (TAG_COMMS_RECV_LAST >> 16) & 0xFF;
++ buf[1] = (TAG_COMMS_RECV_LAST >> 8) & 0xFF;
++ buf[2] = TAG_COMMS_RECV_LAST & 0xFF;
++
++ // encode the length field
++ int length_field_len;
++ if ((length_field_len = asn_1_encode(tx_data_length + 1, buf + 3, 3)) < 0) {
++ return -1;
++ }
++ // the phase_id
++ buf[3 + length_field_len] = phase_id;
++
++ // build the iovecs
++ struct iovec iov[2];
++ iov[0].iov_base = buf;
++ iov[0].iov_len = 3 + length_field_len + 1;
++ iov[1].iov_base = tx_data;
++ iov[1].iov_len = tx_data_length;
++
++ // create the data and send it
++ return lowspeed->funcs->send_datav(lowspeed->funcs->arg,
++ session_number, iov, 2);
++}
++
++int en50221_app_lowspeed_message(struct en50221_app_lowspeed *lowspeed,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_COMMS_COMMAND:
++ return en50221_app_lowspeed_parse_command(lowspeed,
++ slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_COMMS_SEND_LAST:
++ return en50221_app_lowspeed_parse_send(lowspeed, slot_id,
++ session_number, 1,
++ data + 3,
++ data_length - 3);
++ case TAG_COMMS_SEND_MORE:
++ return en50221_app_lowspeed_parse_send(lowspeed, slot_id,
++ session_number, 0,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++
++static int en50221_app_lowspeed_parse_connect_on_channel(struct en50221_app_lowspeed_command *command,
++ uint8_t *data,
++ int data_length)
++{
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ // check the tag
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++ if (tag != TAG_CONNECTION_DESCRIPTOR) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received bad CONNECT_ON_CHANNEL\n");
++ return -1;
++ }
++ data += 3;
++ data_length -= 3;
++
++ // parse the descriptor-length-field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ data += length_field_len;
++ data_length -= length_field_len;
++
++ // check length field
++ if (asn_data_length > data_length) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (asn_data_length < 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ // get the descriptor type
++ command->u.connect_on_channel.descriptor_type = data[0];
++ data++;
++ data_length--;
++ asn_data_length--;
++
++ // deal with the descriptor itself
++ switch (command->u.connect_on_channel.descriptor_type) {
++ case CONNECTION_DESCRIPTOR_TYPE_TELEPHONE:
++ {
++ // get the raw descriptor and validate length
++ struct descriptor *d = (struct descriptor *) data;
++ if (asn_data_length < 2) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received short data\n");
++ return -1;
++ }
++ if (asn_data_length != (2 + d->len)) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received short data\n");
++ return -1;
++ }
++ if (d->tag != dtag_dvb_telephone) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received invalid telephone descriptor\n");
++ return -1;
++ }
++ // parse the telephone descriptor
++ command->u.connect_on_channel.descriptor.telephone = dvb_telephone_descriptor_codec(d);
++ if (command->u.connect_on_channel.descriptor.telephone == NULL) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received invalid telephone descriptor\n");
++ return -1;
++ }
++ data += 2 + d->len;
++ data_length -= 2 + d->len;
++ break;
++ }
++
++ case CONNECTION_DESCRIPTOR_TYPE_CABLE:
++ if (asn_data_length != 1) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received short data\n");
++ return -1;
++ }
++ command->u.connect_on_channel.descriptor.cable_channel_id = data[0];
++ data++;
++ data_length--;
++ break;
++ default:
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unknown connection descriptor %02x\n",
++ command->u.connect_on_channel.descriptor_type);
++ return -1;
++ }
++
++ // parse the last bit
++ if (data_length != 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ command->u.connect_on_channel.retry_count = data[0];
++ command->u.connect_on_channel.timeout = data[1];
++
++ // ok
++ return 0;
++}
++
++static int en50221_app_lowspeed_parse_command(struct en50221_app_lowspeed *lowspeed,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length < 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ data += length_field_len;
++
++ // get command id
++ uint8_t command_id = data[0];
++ data++;
++ asn_data_length--;
++
++ // parse the command
++ struct en50221_app_lowspeed_command command;
++ switch (command_id) {
++ case COMMS_COMMAND_ID_CONNECT_ON_CHANNEL:
++ if (en50221_app_lowspeed_parse_connect_on_channel
++ (&command, data, asn_data_length)) {
++ return -1;
++ }
++ break;
++ case COMMS_COMMAND_ID_SET_PARAMS:
++ if (asn_data_length != 2) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received short data\n");
++ return -1;
++ }
++ command.u.set_params.buffer_size = data[0];
++ command.u.set_params.timeout = data[1];
++ break;
++ case COMMS_COMMAND_ID_GET_NEXT_BUFFER:
++ if (asn_data_length != 1) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received short data\n");
++ return -1;
++ }
++ command.u.get_next_buffer.phase_id = data[0];
++ break;
++
++ case COMMS_COMMAND_ID_DISCONNECT_ON_CHANNEL:
++ case COMMS_COMMAND_ID_ENQUIRE_STATUS:
++ break;
++
++ default:
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected command_id %02x\n", command_id);
++ return -1;
++ }
++
++ // tell the app
++ pthread_mutex_lock(&lowspeed->lock);
++ en50221_app_lowspeed_command_callback cb = lowspeed->command_callback;
++ void *cb_arg = lowspeed->command_callback_arg;
++ pthread_mutex_unlock(&lowspeed->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, command_id,
++ &command);
++ }
++ return 0;
++}
++
++static int en50221_app_lowspeed_parse_send(struct en50221_app_lowspeed *lowspeed,
++ uint8_t slot_id,
++ uint16_t session_number,
++ int more_last,
++ uint8_t *data,
++ uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ // skip over the length field
++ data += length_field_len;
++
++ // find previous session
++ pthread_mutex_lock(&lowspeed->lock);
++ struct en50221_app_lowspeed_session *cur_s = lowspeed->sessions;
++ while (cur_s) {
++ if (cur_s->session_number == session_number)
++ break;
++ cur_s = cur_s->next;
++ }
++
++ // more data is still to come
++ if (!more_last) {
++ // if there was no previous session, create one
++ if (cur_s == NULL) {
++ cur_s = malloc(sizeof(struct en50221_app_lowspeed_session));
++ if (cur_s == NULL) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Ran out of memory\n");
++ pthread_mutex_unlock(&lowspeed->lock);
++ return -1;
++ }
++ cur_s->session_number = session_number;
++ cur_s->block_chain = NULL;
++ cur_s->block_length = 0;
++ cur_s->next = lowspeed->sessions;
++ lowspeed->sessions = cur_s;
++ }
++ // append the data
++ uint8_t *new_data = realloc(cur_s->block_chain,
++ cur_s->block_length + asn_data_length);
++ if (new_data == NULL) {
++ print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
++ pthread_mutex_unlock(&lowspeed->lock);
++ return -1;
++ }
++ memcpy(new_data + cur_s->block_length, data, asn_data_length);
++ cur_s->block_chain = new_data;
++ cur_s->block_length += asn_data_length;
++
++ // done
++ pthread_mutex_unlock(&lowspeed->lock);
++ return 0;
++ }
++ // we hit the last of a possible chain of fragments
++ int do_free = 0;
++ if (cur_s != NULL) {
++ // we have a preceding fragment - need to append
++ uint8_t *new_data = realloc(cur_s->block_chain,
++ cur_s->block_length + asn_data_length);
++ if (new_data == NULL) {
++ print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
++ pthread_mutex_unlock(&lowspeed->lock);
++ return -1;
++ }
++ memcpy(new_data + cur_s->block_length, data, asn_data_length);
++ asn_data_length = cur_s->block_length + asn_data_length;
++ data = new_data;
++ cur_s->block_chain = NULL;
++ cur_s->block_length = 0;
++ do_free = 1;
++ }
++ // check the reassembled data length
++ if (asn_data_length < 1) {
++ pthread_mutex_unlock(&lowspeed->lock);
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ if (do_free)
++ free(data);
++ return -1;
++ }
++ // now, parse the data
++ uint8_t phase_id = data[0];
++
++ // tell the app
++ en50221_app_lowspeed_send_callback cb = lowspeed->send_callback;
++ void *cb_arg = lowspeed->send_callback_arg;
++ pthread_mutex_unlock(&lowspeed->lock);
++ int cbstatus = 0;
++ if (cb) {
++ cbstatus =
++ cb(cb_arg, slot_id, session_number, phase_id, data + 1, asn_data_length - 1);
++ }
++ // done
++ if (do_free)
++ free(data);
++ return cbstatus;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_lowspeed.h dvb-apps/lib/libdvben50221/en50221_app_lowspeed.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_lowspeed.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_lowspeed.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,219 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_LOWSPEED_H__
++#define __EN50221_APPLICATION_LOWSPEED_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++#include <libucsi/dvb/descriptor.h>
++
++#define COMMS_COMMAND_ID_CONNECT_ON_CHANNEL 0x01
++#define COMMS_COMMAND_ID_DISCONNECT_ON_CHANNEL 0x02
++#define COMMS_COMMAND_ID_SET_PARAMS 0x03
++#define COMMS_COMMAND_ID_ENQUIRE_STATUS 0x04
++#define COMMS_COMMAND_ID_GET_NEXT_BUFFER 0x05
++
++#define CONNECTION_DESCRIPTOR_TYPE_TELEPHONE 0x01
++#define CONNECTION_DESCRIPTOR_TYPE_CABLE 0x02
++
++#define COMMS_REPLY_ID_CONNECT_ACK 0x01
++#define COMMS_REPLY_ID_DISCONNECT_ACK 0x02
++#define COMMS_REPLY_ID_SET_PARAMS_ACK 0x03
++#define COMMS_REPLY_ID_STATUS_REPLY 0x04
++#define COMMS_REPLY_ID_GET_NEXT_BUFFER_ACK 0x05
++#define COMMS_REPLY_ID_SEND_ACK 0x06
++
++#define EN50221_APP_LOWSPEED_RESOURCEID(DEVICE_TYPE, DEVICE_NUMBER) MKRID(96,((DEVICE_TYPE)<<2)|((DEVICE_NUMBER) & 0x03),1)
++
++
++/**
++ * Structure holding information on a received comms command.
++ */
++struct en50221_app_lowspeed_command {
++ union {
++ struct {
++ uint8_t descriptor_type; // CONNECTION_DESCRIPTOR_TYPE_*
++ uint8_t retry_count;
++ uint8_t timeout;
++ union {
++ struct dvb_telephone_descriptor *telephone;
++ uint8_t cable_channel_id;
++ } descriptor;
++ } connect_on_channel;
++
++ struct {
++ uint8_t buffer_size;
++ uint8_t timeout;
++ } set_params;
++
++ struct {
++ uint8_t phase_id;
++ } get_next_buffer;
++ } u;
++};
++
++/**
++ * Type definition for command - called when we receive a comms command.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param command_id One of the COMMS_COMMAND_ID_* values
++ * @param command Pointer to a lowspeed command structure containing the command data.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_lowspeed_command_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t command_id,
++ struct en50221_app_lowspeed_command *command);
++
++/**
++ * Type definition for send - called when we receive data to send. The block can be segmented into
++ * multiple pieces - last_more indicates the details of this.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param phase_id Comms phase id.
++ * @param data The data.
++ * @param length Number of bytes.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_lowspeed_send_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t phase_id,
++ uint8_t *data,
++ uint32_t length);
++
++/**
++ * Opaque type representing a lowspeed resource.
++ */
++struct en50221_app_lowspeed;
++
++/**
++ * Create an instance of the lowspeed resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_lowspeed *
++ en50221_app_lowspeed_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the lowspeed resource.
++ *
++ * @param lowspeed Instance to destroy.
++ */
++extern void en50221_app_lowspeed_destroy(struct en50221_app_lowspeed *lowspeed);
++
++/**
++ * Informs the lowspeed object that a session to it has been closed - cleans up internal state.
++ *
++ * @param lowspeed lowspeed resource instance.
++ * @param session_number The session concerned.
++ */
++extern void en50221_app_lowspeed_clear_session(struct en50221_app_lowspeed *lowspeed,
++ uint16_t session_number);
++
++/**
++ * Register the callback for when we receive a comms command.
++ *
++ * @param lowspeed lowspeed resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_lowspeed_register_command_callback(struct en50221_app_lowspeed *lowspeed,
++ en50221_app_lowspeed_command_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive data to send.
++ *
++ * @param lowspeed lowspeed resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_lowspeed_register_send_callback(struct en50221_app_lowspeed *lowspeed,
++ en50221_app_lowspeed_send_callback callback,
++ void *arg);
++
++/**
++ * Send a comms reply to the CAM.
++ *
++ * @param lowspeed lowspeed resource instance.
++ * @param session_number Session number to send it on.
++ * @param comms_reply_id One of the COMMS_REPLY_ID_* values.
++ * @param return_value Comms reply specific value.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_lowspeed_send_comms_reply(struct en50221_app_lowspeed *lowspeed,
++ uint16_t session_number,
++ uint8_t comms_reply_id,
++ uint8_t return_value);
++
++/**
++ * Send received data to the CAM.
++ *
++ * @param lowspeed lowspeed resource instance.
++ * @param session_number Session number to send it on.
++ * @param phase_id Comms phase id.
++ * @param tx_data_length Length of data in bytes (max 254 bytes as per spec).
++ * @param tx_data Data.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_lowspeed_send_comms_data(struct en50221_app_lowspeed *lowspeed,
++ uint16_t session_number,
++ uint8_t phase_id,
++ uint32_t tx_data_length,
++ uint8_t * tx_data);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param lowspeed lowspeed instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_lowspeed_message(struct en50221_app_lowspeed *lowspeed,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_mmi.c dvb-apps/lib/libdvben50221/en50221_app_mmi.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_mmi.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_mmi.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,1397 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include <libucsi/dvb/types.h>
++#include "en50221_app_mmi.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_mmi_session {
++ uint16_t session_number;
++
++ uint8_t *menu_block_chain;
++ uint32_t menu_block_length;
++
++ uint8_t *list_block_chain;
++ uint32_t list_block_length;
++
++ uint8_t *subtitlesegment_block_chain;
++ uint32_t subtitlesegment_block_length;
++
++ uint8_t *subtitledownload_block_chain;
++ uint32_t subtitledownload_block_length;
++
++ struct en50221_app_mmi_session *next;
++};
++
++struct en50221_app_mmi {
++ struct en50221_app_send_functions *funcs;
++ struct en50221_app_mmi_session *sessions;
++
++ en50221_app_mmi_close_callback closecallback;
++ void *closecallback_arg;
++
++ en50221_app_mmi_display_control_callback displaycontrolcallback;
++ void *displaycontrolcallback_arg;
++
++ en50221_app_mmi_keypad_control_callback keypadcontrolcallback;
++ void *keypadcontrolcallback_arg;
++
++ en50221_app_mmi_subtitle_segment_callback subtitlesegmentcallback;
++ void *subtitlesegmentcallback_arg;
++
++ en50221_app_mmi_scene_end_mark_callback sceneendmarkcallback;
++ void *sceneendmarkcallback_arg;
++
++ en50221_app_mmi_scene_control_callback scenecontrolcallback;
++ void *scenecontrolcallback_arg;
++
++ en50221_app_mmi_subtitle_download_callback subtitledownloadcallback;
++ void *subtitledownloadcallback_arg;
++
++ en50221_app_mmi_flush_download_callback flushdownloadcallback;
++ void *flushdownloadcallback_arg;
++
++ en50221_app_mmi_enq_callback enqcallback;
++ void *enqcallback_arg;
++
++ en50221_app_mmi_menu_callback menucallback;
++ void *menucallback_arg;
++
++ en50221_app_mmi_list_callback listcallback;
++ void *listcallback_arg;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_mmi_parse_close(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_mmi_parse_display_control(struct en50221_app_mmi
++ *mmi, uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_mmi_parse_keypad_control(struct en50221_app_mmi
++ *mmi, uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_mmi_parse_enq(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data, uint32_t data_length);
++static int en50221_app_mmi_parse_list_menu(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t tag_id, int more_last,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_mmi_parse_subtitle(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t tag_id, int more_last,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_mmi_parse_scene_end_mark(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_mmi_parse_scene_control(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_mmi_parse_subtitle(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t tag_id, int more_last,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_mmi_parse_flush_download(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_mmi_defragment(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint32_t tag_id, int more_last,
++ uint8_t * indata,
++ uint32_t indata_length,
++ uint8_t ** outdata,
++ uint32_t * outdata_length);
++static int en50221_app_mmi_defragment_text(uint8_t * data,
++ uint32_t data_length,
++ uint8_t ** outdata,
++ uint32_t * outdata_length,
++ uint32_t * outconsumed);
++
++
++
++struct en50221_app_mmi *en50221_app_mmi_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_mmi *mmi = NULL;
++
++ // create structure and set it up
++ mmi = malloc(sizeof(struct en50221_app_mmi));
++ if (mmi == NULL) {
++ return NULL;
++ }
++ mmi->funcs = funcs;
++ mmi->closecallback = NULL;
++ mmi->displaycontrolcallback = NULL;
++ mmi->keypadcontrolcallback = NULL;
++ mmi->subtitlesegmentcallback = NULL;
++ mmi->sceneendmarkcallback = NULL;
++ mmi->scenecontrolcallback = NULL;
++ mmi->subtitledownloadcallback = NULL;
++ mmi->flushdownloadcallback = NULL;
++ mmi->enqcallback = NULL;
++ mmi->menucallback = NULL;
++ mmi->listcallback = NULL;
++ mmi->sessions = NULL;
++
++ pthread_mutex_init(&mmi->lock, NULL);
++
++ // done
++ return mmi;
++}
++
++void en50221_app_mmi_destroy(struct en50221_app_mmi *mmi)
++{
++ struct en50221_app_mmi_session *cur_s = mmi->sessions;
++ while (cur_s) {
++ struct en50221_app_mmi_session *next = cur_s->next;
++ if (cur_s->menu_block_chain)
++ free(cur_s->menu_block_chain);
++ if (cur_s->list_block_chain)
++ free(cur_s->list_block_chain);
++ if (cur_s->subtitlesegment_block_chain)
++ free(cur_s->subtitlesegment_block_chain);
++ if (cur_s->subtitledownload_block_chain)
++ free(cur_s->subtitledownload_block_chain);
++ free(cur_s);
++ cur_s = next;
++ }
++
++ pthread_mutex_destroy(&mmi->lock);
++ free(mmi);
++}
++
++void en50221_app_mmi_clear_session(struct en50221_app_mmi *mmi,
++ uint16_t session_number)
++{
++ pthread_mutex_lock(&mmi->lock);
++ struct en50221_app_mmi_session *cur_s = mmi->sessions;
++ struct en50221_app_mmi_session *prev_s = NULL;
++ while (cur_s) {
++ if (cur_s->session_number == session_number) {
++ if (cur_s->menu_block_chain)
++ free(cur_s->menu_block_chain);
++ if (cur_s->list_block_chain)
++ free(cur_s->list_block_chain);
++ if (cur_s->subtitlesegment_block_chain)
++ free(cur_s->subtitlesegment_block_chain);
++ if (cur_s->subtitledownload_block_chain)
++ free(cur_s->subtitledownload_block_chain);
++ if (prev_s) {
++ prev_s->next = cur_s->next;
++ } else {
++ mmi->sessions = cur_s->next;
++ }
++ free(cur_s);
++ return;
++ }
++
++ prev_s = cur_s;
++ cur_s = cur_s->next;
++ }
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_close_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_close_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->closecallback = callback;
++ mmi->closecallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_display_control_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_display_control_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->displaycontrolcallback = callback;
++ mmi->displaycontrolcallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_keypad_control_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_keypad_control_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->keypadcontrolcallback = callback;
++ mmi->keypadcontrolcallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_subtitle_segment_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_subtitle_segment_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->subtitlesegmentcallback = callback;
++ mmi->subtitlesegmentcallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_scene_end_mark_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_scene_end_mark_callback callback, void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->sceneendmarkcallback = callback;
++ mmi->sceneendmarkcallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_scene_control_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_scene_control_callback callback, void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->scenecontrolcallback = callback;
++ mmi->scenecontrolcallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_subtitle_download_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_subtitle_download_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->subtitledownloadcallback = callback;
++ mmi->subtitledownloadcallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_flush_download_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_flush_download_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->flushdownloadcallback = callback;
++ mmi->flushdownloadcallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_enq_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_enq_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->enqcallback = callback;
++ mmi->enqcallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_menu_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_menu_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->menucallback = callback;
++ mmi->menucallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++void en50221_app_mmi_register_list_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_list_callback callback,
++ void *arg)
++{
++ pthread_mutex_lock(&mmi->lock);
++ mmi->listcallback = callback;
++ mmi->listcallback_arg = arg;
++ pthread_mutex_unlock(&mmi->lock);
++}
++
++int en50221_app_mmi_close(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t cmd_id, uint8_t delay)
++{
++ uint8_t data[6];
++ int data_length = 5;
++
++ data[0] = (TAG_CLOSE_MMI >> 16) & 0xFF;
++ data[1] = (TAG_CLOSE_MMI >> 8) & 0xFF;
++ data[2] = TAG_CLOSE_MMI & 0xFF;
++ data[3] = 1;
++ data[4] = cmd_id;
++ if (cmd_id == MMI_CLOSE_MMI_CMD_ID_DELAY) {
++ data[3] = 2;
++ data[5] = delay;
++ data_length = 6;
++ }
++ return mmi->funcs->send_data(mmi->funcs->arg, session_number, data,
++ data_length);
++}
++
++int en50221_app_mmi_display_reply(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t reply_id,
++ struct en50221_app_mmi_display_reply_details *details)
++{
++ uint8_t data[32];
++ struct iovec iov[2];
++ uint32_t iov_count;
++ int length_field_len;
++
++ // fill out the start of the header
++ data[0] = (TAG_DISPLAY_REPLY >> 16) & 0xFF;
++ data[1] = (TAG_DISPLAY_REPLY >> 8) & 0xFF;
++ data[2] = TAG_DISPLAY_REPLY & 0xFF;
++
++ switch (reply_id) {
++ case MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK:
++ data[3] = 2;
++ data[4] = reply_id;
++ data[5] = details->u.mode_ack.mmi_mode;
++ iov[0].iov_base = data;
++ iov[0].iov_len = 6;
++ iov_count = 1;
++ break;
++
++ case MMI_DISPLAY_REPLY_ID_LIST_DISPLAY_CHAR_TABLES:
++ case MMI_DISPLAY_REPLY_ID_LIST_INPUT_CHAR_TABLES:
++ if ((length_field_len =
++ asn_1_encode(details->u.char_table.table_length + 1, data + 3, 3)) < 0) {
++ return -1;
++ }
++ data[3 + length_field_len] = reply_id;
++ iov[0].iov_base = data;
++ iov[0].iov_len = 3 + length_field_len + 1;
++ iov[1].iov_base = details->u.char_table.table;
++ iov[1].iov_len = details->u.char_table.table_length;
++ iov_count = 2;
++ break;
++
++ case MMI_DISPLAY_REPLY_ID_LIST_OVERLAY_GFX_CHARACTERISTICS:
++ case MMI_DISPLAY_REPLY_ID_LIST_FULLSCREEN_GFX_CHARACTERISTICS:
++ {
++ if ((length_field_len =
++ asn_1_encode(1 + 9 + (details->u.gfx.num_pixel_depths * 2), data + 3, 3)) < 0) {
++ return -1;
++ }
++ data[3 + length_field_len] = reply_id;
++ data[3 + length_field_len + 1] = details->u.gfx.width >> 8;
++ data[3 + length_field_len + 2] = details->u.gfx.width;
++ data[3 + length_field_len + 3] = details->u.gfx.height >> 8;
++ data[3 + length_field_len + 4] = details->u.gfx.height;
++ data[3 + length_field_len + 5] =
++ ((details->u.gfx.aspect_ratio & 0x0f) << 4) |
++ ((details->u.gfx.gfx_relation_to_video & 0x07) << 1) |
++ (details->u.gfx.multiple_depths & 1);
++ data[3 + length_field_len + 6] = details->u.gfx.display_bytes >> 4;
++ data[3 + length_field_len + 7] =
++ ((details->u.gfx.display_bytes & 0x0f) << 4) |
++ ((details->u.gfx.composition_buffer_bytes & 0xf0) >> 4);
++ data[3 + length_field_len + 8] =
++ ((details->u.gfx.composition_buffer_bytes & 0x0f) << 4) |
++ ((details->u.gfx.object_cache_bytes & 0xf0) >> 4);
++ data[3 + length_field_len + 9] =
++ ((details->u.gfx.object_cache_bytes & 0x0f) << 4) |
++ (details->u.gfx.num_pixel_depths & 0x0f);
++
++ // render the pixel depths themselves
++ uint8_t *pixdepths =
++ alloca(details->u.gfx.num_pixel_depths * 2);
++ if (pixdepths == NULL) {
++ return -1;
++ }
++ uint32_t i;
++ for (i = 0; i < details->u.gfx.num_pixel_depths; i++) {
++ pixdepths[0] =
++ ((details->u.gfx.pixel_depths[i].display_depth & 0x07) << 5) |
++ ((details->u.gfx.pixel_depths[i].pixels_per_byte & 0x07) << 2);
++ pixdepths[1] =
++ details->u.gfx.pixel_depths[i].region_overhead;
++ pixdepths += 2;
++ }
++
++ // make up the iovs
++ iov[0].iov_base = data;
++ iov[0].iov_len = 3 + length_field_len + 10;
++ iov[1].iov_base = pixdepths;
++ iov[1].iov_len =
++ details->u.gfx.num_pixel_depths * 2;
++ iov_count = 2;
++ break;
++ }
++
++ default:
++ data[3] = 1;
++ data[4] = reply_id;
++ iov[0].iov_base = data;
++ iov[0].iov_len = 5;
++ iov_count = 1;
++ break;
++ }
++
++ // sendit
++ return mmi->funcs->send_datav(mmi->funcs->arg, session_number, iov, iov_count);
++}
++
++int en50221_app_mmi_keypress(struct en50221_app_mmi *mmi,
++ uint16_t session_number, uint8_t keycode)
++{
++ uint8_t data[5];
++
++ data[0] = (TAG_KEYPRESS >> 16) & 0xFF;
++ data[1] = (TAG_KEYPRESS >> 8) & 0xFF;
++ data[2] = TAG_KEYPRESS & 0xFF;
++ data[3] = 1;
++ data[4] = keycode;
++ return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 5);
++}
++
++int en50221_app_mmi_display_message(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t display_message_id)
++{
++ uint8_t data[5];
++
++ data[0] = (TAG_DISPLAY_MESSAGE >> 16) & 0xFF;
++ data[1] = (TAG_DISPLAY_MESSAGE >> 8) & 0xFF;
++ data[2] = TAG_DISPLAY_MESSAGE & 0xFF;
++ data[3] = 1;
++ data[4] = display_message_id;
++ return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 5);
++}
++
++int en50221_app_mmi_scene_done(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t decoder_continue,
++ uint8_t scene_reveal, uint8_t scene_tag)
++{
++ uint8_t data[5];
++
++ data[0] = (TAG_SCENE_DONE >> 16) & 0xFF;
++ data[1] = (TAG_SCENE_DONE >> 8) & 0xFF;
++ data[2] = TAG_SCENE_DONE & 0xFF;
++ data[3] = 1;
++ data[4] =
++ (decoder_continue ? 0x80 : 0x00) |
++ (scene_reveal ? 0x40 : 0x00) |
++ (scene_tag & 0x0f);
++ return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 5);
++}
++
++int en50221_app_mmi_download_reply(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint16_t object_id,
++ uint8_t download_reply_id)
++{
++ uint8_t data[7];
++
++ data[0] = (TAG_DOWNLOAD_REPLY >> 16) & 0xFF;
++ data[1] = (TAG_DOWNLOAD_REPLY >> 8) & 0xFF;
++ data[2] = TAG_DOWNLOAD_REPLY & 0xFF;
++ data[3] = 3;
++ data[4] = object_id >> 8;
++ data[5] = object_id;
++ data[6] = download_reply_id;
++ return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 7);
++}
++
++int en50221_app_mmi_answ(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t answ_id,
++ uint8_t * text, uint32_t text_count)
++{
++ uint8_t buf[10];
++
++ // set up the tag
++ buf[0] = (TAG_ANSWER >> 16) & 0xFF;
++ buf[1] = (TAG_ANSWER >> 8) & 0xFF;
++ buf[2] = TAG_ANSWER & 0xFF;
++
++ // encode the length field
++ struct iovec iov[2];
++ int length_field_len = 0;
++ int iov_count = 1;
++ if (answ_id == MMI_ANSW_ID_ANSWER) {
++ if ((length_field_len = asn_1_encode(text_count + 1, buf + 3, 3)) < 0) {
++ return -1;
++ }
++ buf[3 + length_field_len] = answ_id;
++
++ iov[0].iov_base = buf;
++ iov[0].iov_len = 3 + length_field_len + 1;
++ iov[1].iov_base = text;
++ iov[1].iov_len = text_count;
++ iov_count = 2;
++ } else {
++ buf[3] = 1;
++ buf[4] = answ_id;
++ iov[0].iov_base = buf;
++ iov[0].iov_len = 5;
++ iov_count = 1;
++ }
++
++ // create the data and send it
++ return mmi->funcs->send_datav(mmi->funcs->arg, session_number, iov,
++ iov_count);
++}
++
++int en50221_app_mmi_menu_answ(struct en50221_app_mmi *mmi,
++ uint16_t session_number, uint8_t choice_ref)
++{
++ uint8_t data[5];
++
++ data[0] = (TAG_MENU_ANSWER >> 16) & 0xFF;
++ data[1] = (TAG_MENU_ANSWER >> 8) & 0xFF;
++ data[2] = TAG_MENU_ANSWER & 0xFF;
++ data[3] = 1;
++ data[4] = choice_ref;
++ return mmi->funcs->send_data(mmi->funcs->arg, session_number, data, 5);
++}
++
++int en50221_app_mmi_message(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_CLOSE_MMI:
++ return en50221_app_mmi_parse_close(mmi, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_DISPLAY_CONTROL:
++ return en50221_app_mmi_parse_display_control(mmi, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_KEYPAD_CONTROL:
++ return en50221_app_mmi_parse_keypad_control(mmi, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_ENQUIRY:
++ return en50221_app_mmi_parse_enq(mmi, slot_id,
++ session_number, data + 3,
++ data_length - 3);
++ case TAG_MENU_LAST:
++ return en50221_app_mmi_parse_list_menu(mmi, slot_id,
++ session_number, tag,
++ 1, data + 3,
++ data_length - 3);
++ case TAG_MENU_MORE:
++ return en50221_app_mmi_parse_list_menu(mmi, slot_id,
++ session_number, tag,
++ 0, data + 3,
++ data_length - 3);
++ case TAG_LIST_LAST:
++ return en50221_app_mmi_parse_list_menu(mmi, slot_id,
++ session_number, tag,
++ 1, data + 3,
++ data_length - 3);
++ case TAG_LIST_MORE:
++ return en50221_app_mmi_parse_list_menu(mmi, slot_id,
++ session_number, tag,
++ 0, data + 3,
++ data_length - 3);
++ case TAG_SUBTITLE_SEGMENT_LAST:
++ return en50221_app_mmi_parse_subtitle(mmi, slot_id,
++ session_number, tag,
++ 1, data + 3,
++ data_length - 3);
++ case TAG_SUBTITLE_SEGMENT_MORE:
++ return en50221_app_mmi_parse_subtitle(mmi, slot_id,
++ session_number, tag,
++ 0, data + 3,
++ data_length - 3);
++ case TAG_SCENE_END_MARK:
++ return en50221_app_mmi_parse_scene_end_mark(mmi, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_SCENE_CONTROL:
++ return en50221_app_mmi_parse_scene_control(mmi, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_SUBTITLE_DOWNLOAD_LAST:
++ return en50221_app_mmi_parse_subtitle(mmi, slot_id,
++ session_number, tag,
++ 1, data + 3,
++ data_length - 3);
++ case TAG_SUBTITLE_DOWNLOAD_MORE:
++ return en50221_app_mmi_parse_subtitle(mmi, slot_id,
++ session_number, tag,
++ 0, data + 3,
++ data_length - 3);
++ case TAG_FLUSH_DOWNLOAD:
++ return en50221_app_mmi_parse_flush_download(mmi, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++
++
++
++static int en50221_app_mmi_parse_close(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // validate data
++ if (data_length < 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] > (data_length - 1)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t cmd_id = data[1];
++ uint8_t delay = 0;
++ if (cmd_id == MMI_CLOSE_MMI_CMD_ID_DELAY) {
++ if (data[0] != 2) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received short data\n");
++ return -1;
++ }
++ delay = data[2];
++ }
++ // tell the app
++ pthread_mutex_lock(&mmi->lock);
++ en50221_app_mmi_close_callback cb = mmi->closecallback;
++ void *cb_arg = mmi->closecallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, cmd_id, delay);
++ }
++ return 0;
++}
++
++static int en50221_app_mmi_parse_display_control(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t *data,
++ uint32_t data_length)
++{
++ // validate data
++ if (data_length < 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] > (data_length - 1)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t cmd_id = data[1];
++ uint8_t mmi_mode = 0;
++ if (cmd_id == MMI_DISPLAY_CONTROL_CMD_ID_SET_MMI_MODE) {
++ if (data[0] != 2) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received short data\n");
++ return -1;
++ }
++ mmi_mode = data[2];
++ }
++ // tell the app
++ pthread_mutex_lock(&mmi->lock);
++ en50221_app_mmi_display_control_callback cb = mmi->displaycontrolcallback;
++ void *cb_arg = mmi->displaycontrolcallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, cmd_id, mmi_mode);
++ }
++ return 0;
++}
++
++static int en50221_app_mmi_parse_keypad_control(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t *data,
++ uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (asn_data_length < 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ // skip over the length field
++ data += length_field_len;
++
++ // extract the information
++ uint8_t cmd_id = data[0];
++ uint8_t *keycodes = data + 1;
++
++ // tell the app
++ pthread_mutex_lock(&mmi->lock);
++ en50221_app_mmi_keypad_control_callback cb = mmi->keypadcontrolcallback;
++ void *cb_arg = mmi->keypadcontrolcallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, cmd_id,
++ keycodes, asn_data_length - 1);
++ }
++ return 0;
++}
++
++static int en50221_app_mmi_parse_enq(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data, uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (asn_data_length < 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ // skip over the length field
++ data += length_field_len;
++
++ // extract the information
++ uint8_t blind_answer = (data[0] & 0x01) ? 1 : 0;
++ uint8_t answer_length = data[1];
++ uint8_t *text = data + 2;
++
++ // tell the app
++ pthread_mutex_lock(&mmi->lock);
++ en50221_app_mmi_enq_callback cb = mmi->enqcallback;
++ void *cb_arg = mmi->enqcallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, blind_answer,
++ answer_length, text, asn_data_length - 2);
++ }
++ return 0;
++}
++
++static int en50221_app_mmi_parse_list_menu(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t tag_id, int more_last,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ int result = 0;
++ uint8_t *text_flags = NULL;
++ struct en50221_app_mmi_text *text_data = NULL;
++ uint32_t i;
++ uint8_t text_count = 0;
++
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ // skip over the length field
++ data += length_field_len;
++
++ // defragment
++ pthread_mutex_lock(&mmi->lock);
++ uint8_t *outdata;
++ uint32_t outdata_length;
++ int dfstatus =
++ en50221_app_mmi_defragment(mmi, session_number, tag_id,
++ more_last,
++ data, asn_data_length,
++ &outdata, &outdata_length);
++ if (dfstatus <= 0) {
++ pthread_mutex_unlock(&mmi->lock);
++ return dfstatus;
++ }
++ data = outdata;
++ data_length = outdata_length;
++
++ // check the reassembled data length
++ if (data_length < 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ pthread_mutex_unlock(&mmi->lock);
++ result = -1;
++ goto exit_cleanup;
++ }
++ // now, parse the data
++ uint8_t choice_nb = data[0];
++ text_count = choice_nb + 3;
++ if (choice_nb == 0xff)
++ text_count = 3;
++ data++;
++ data_length--;
++
++ // variables for extracted text state
++ text_flags = alloca(text_count);
++ if (text_flags == NULL) {
++ pthread_mutex_unlock(&mmi->lock);
++ result = -1;
++ goto exit_cleanup;
++ }
++ memset(text_flags, 0, text_count);
++ text_data = (struct en50221_app_mmi_text *)
++ alloca(sizeof(struct en50221_app_mmi_text) * text_count);
++ if (text_data == NULL) {
++ pthread_mutex_unlock(&mmi->lock);
++ result = -1;
++ goto exit_cleanup;
++ }
++ memset(text_data, 0,
++ sizeof(struct en50221_app_mmi_text) * text_count);
++
++ // extract the text!
++ for (i = 0; i < text_count; i++) {
++ uint32_t consumed = 0;
++ int cur_status =
++ en50221_app_mmi_defragment_text(data, data_length,
++ &text_data[i].text,
++ &text_data[i].text_length,
++ &consumed);
++ if (cur_status < 0) {
++ pthread_mutex_unlock(&mmi->lock);
++ result = -1;
++ goto exit_cleanup;
++ }
++
++ text_flags[i] = cur_status;
++ data += consumed;
++ data_length -= consumed;
++ }
++
++ // work out what to pass to the user
++ struct en50221_app_mmi_text *text_data_for_user = (struct en50221_app_mmi_text *)
++ alloca(sizeof(struct en50221_app_mmi_text) * text_count);
++ if (text_data_for_user == NULL) {
++ result = -1;
++ goto exit_cleanup;
++ }
++ memcpy(text_data_for_user, text_data,
++ sizeof(struct en50221_app_mmi_text) * text_count);
++ struct en50221_app_mmi_text *text_ptr = NULL;
++ if (text_count > 3) {
++ text_ptr = &text_data_for_user[3];
++ }
++ uint8_t *items_raw = NULL;
++ uint32_t items_raw_length = 0;
++ if (choice_nb == 0xff) {
++ items_raw = data;
++ items_raw_length = data_length;
++ }
++ // do callback
++ result = 0;
++ switch (tag_id) {
++ case TAG_MENU_LAST:
++ {
++ en50221_app_mmi_menu_callback cb = mmi->menucallback;
++ void *cb_arg = mmi->menucallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ result =
++ cb(cb_arg, slot_id, session_number,
++ &text_data_for_user[0],
++ &text_data_for_user[1],
++ &text_data_for_user[2],
++ text_count - 3, text_ptr,
++ items_raw_length, items_raw);
++ }
++ break;
++ }
++
++ case TAG_LIST_LAST:
++ {
++ en50221_app_mmi_list_callback cb = mmi->listcallback;
++ void *cb_arg = mmi->listcallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ result =
++ cb(cb_arg, slot_id, session_number,
++ &text_data_for_user[0],
++ &text_data_for_user[1],
++ &text_data_for_user[2],
++ text_count - 3, text_ptr,
++ items_raw_length, items_raw);
++ }
++ break;
++ }
++
++ default:
++ pthread_mutex_unlock(&mmi->lock);
++ break;
++ }
++
++exit_cleanup:
++ if ((dfstatus == 2) && outdata)
++ free(outdata);
++ if (text_flags && text_data) {
++ for (i = 0; i < text_count; i++) {
++ if ((text_flags[i] == 2) && text_data[i].text) {
++ free(text_data[i].text);
++ }
++ }
++ }
++ return result;
++}
++
++static int en50221_app_mmi_parse_subtitle(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t tag_id, int more_last,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ // skip over the length field
++ data += length_field_len;
++
++ // defragment
++ pthread_mutex_lock(&mmi->lock);
++ uint8_t *outdata;
++ uint32_t outdata_length;
++ int dfstatus =
++ en50221_app_mmi_defragment(mmi, session_number, tag_id,
++ more_last,
++ data, asn_data_length,
++ &outdata, &outdata_length);
++ if (dfstatus <= 0) {
++ pthread_mutex_unlock(&mmi->lock);
++ return dfstatus;
++ }
++ // do callback
++ int cbstatus = 0;
++ switch (tag_id) {
++ case TAG_SUBTITLE_SEGMENT_LAST:
++ {
++ en50221_app_mmi_subtitle_segment_callback cb =
++ mmi->subtitlesegmentcallback;
++ void *cb_arg = mmi->subtitlesegmentcallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ cbstatus =
++ cb(cb_arg, slot_id, session_number, outdata, outdata_length);
++ }
++ break;
++ }
++
++ case TAG_SUBTITLE_DOWNLOAD_LAST:
++ {
++ en50221_app_mmi_subtitle_download_callback cb =
++ mmi->subtitledownloadcallback;
++ void *cb_arg = mmi->subtitledownloadcallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ cbstatus =
++ cb(cb_arg, slot_id, session_number, outdata, outdata_length);
++ }
++ break;
++ }
++ }
++
++ // free the data returned by the defragment call if asked to
++ if (dfstatus == 2) {
++ free(outdata);
++ }
++ // done
++ return cbstatus;
++}
++
++static int en50221_app_mmi_parse_scene_end_mark(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // validate data
++ if (data_length != 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] != 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t flags = data[1];
++
++ // tell the app
++ pthread_mutex_lock(&mmi->lock);
++ en50221_app_mmi_scene_end_mark_callback cb =
++ mmi->sceneendmarkcallback;
++ void *cb_arg = mmi->sceneendmarkcallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number,
++ (flags & 0x80) ? 1 : 0,
++ (flags & 0x40) ? 1 : 0,
++ (flags & 0x20) ? 1 : 0, flags & 0x0f);
++ }
++ return 0;
++}
++
++static int en50221_app_mmi_parse_scene_control(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // validate data
++ if (data_length != 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] != 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t flags = data[1];
++
++ // tell the app
++ pthread_mutex_lock(&mmi->lock);
++ en50221_app_mmi_scene_control_callback cb = mmi->scenecontrolcallback;
++ void *cb_arg = mmi->scenecontrolcallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number,
++ (flags & 0x80) ? 1 : 0,
++ (flags & 0x40) ? 1 : 0, flags & 0x0f);
++ }
++ return 0;
++}
++
++static int en50221_app_mmi_parse_flush_download(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t *data,
++ uint32_t data_length)
++{
++ // validate data
++ if (data_length != 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] != 0) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ // tell the app
++ pthread_mutex_lock(&mmi->lock);
++ en50221_app_mmi_flush_download_callback cb = mmi->flushdownloadcallback;
++ void *cb_arg = mmi->flushdownloadcallback_arg;
++ pthread_mutex_unlock(&mmi->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number);
++ }
++ return 0;
++}
++
++static int en50221_app_mmi_defragment(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint32_t tag_id,
++ int more_last,
++ uint8_t * indata,
++ uint32_t indata_length,
++ uint8_t ** outdata,
++ uint32_t * outdata_length)
++{
++ struct en50221_app_mmi_session *cur_s = mmi->sessions;
++ while (cur_s) {
++ if (cur_s->session_number == session_number)
++ break;
++ cur_s = cur_s->next;
++ }
++
++ // more data is still to come
++ if (!more_last) {
++ // if there was no previous session, create one
++ if (cur_s == NULL) {
++ cur_s = malloc(sizeof(struct en50221_app_mmi_session));
++ if (cur_s == NULL) {
++ print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
++ return -1;
++ }
++ cur_s->session_number = session_number;
++ cur_s->menu_block_chain = NULL;
++ cur_s->menu_block_length = 0;
++ cur_s->list_block_chain = NULL;
++ cur_s->list_block_length = 0;
++ cur_s->subtitlesegment_block_chain = NULL;
++ cur_s->subtitlesegment_block_length = 0;
++ cur_s->subtitledownload_block_chain = NULL;
++ cur_s->subtitledownload_block_length = 0;
++ cur_s->next = mmi->sessions;
++ mmi->sessions = cur_s;
++ }
++ // find the block/block_length to use
++ uint8_t **block_chain;
++ uint32_t *block_length;
++ switch (tag_id) {
++ case TAG_MENU_LAST:
++ case TAG_MENU_MORE:
++ block_chain = &cur_s->menu_block_chain;
++ block_length = &cur_s->menu_block_length;
++ break;
++ case TAG_LIST_LAST:
++ case TAG_LIST_MORE:
++ block_chain = &cur_s->list_block_chain;
++ block_length = &cur_s->list_block_length;
++ break;
++ case TAG_SUBTITLE_SEGMENT_LAST:
++ case TAG_SUBTITLE_SEGMENT_MORE:
++ block_chain = &cur_s->subtitlesegment_block_chain;
++ block_length = &cur_s->subtitlesegment_block_length;
++ break;
++ case TAG_SUBTITLE_DOWNLOAD_LAST:
++ case TAG_SUBTITLE_DOWNLOAD_MORE:
++ block_chain = &cur_s->subtitledownload_block_chain;
++ block_length = &cur_s->subtitledownload_block_length;
++ break;
++ default:
++ return -1;
++ }
++
++ // append the data
++ uint8_t *new_data =
++ realloc(*block_chain, *block_length + indata_length);
++ if (new_data == NULL) {
++ print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
++ return -1;
++ }
++ memcpy(new_data + *block_length, indata, indata_length);
++ *block_chain = new_data;
++ *block_length += indata_length;
++
++ // success, but block not complete yet
++ return 0;
++ }
++ // we hit the last of a possible chain of fragments
++ if (cur_s != NULL) {
++ // find the block/block_length to use
++ uint8_t **block_chain;
++ uint32_t *block_length;
++ switch (tag_id) {
++ case TAG_MENU_LAST:
++ case TAG_MENU_MORE:
++ block_chain = &cur_s->menu_block_chain;
++ block_length = &cur_s->menu_block_length;
++ break;
++ case TAG_LIST_LAST:
++ case TAG_LIST_MORE:
++ block_chain = &cur_s->list_block_chain;
++ block_length = &cur_s->list_block_length;
++ break;
++ case TAG_SUBTITLE_SEGMENT_LAST:
++ case TAG_SUBTITLE_SEGMENT_MORE:
++ block_chain = &cur_s->subtitlesegment_block_chain;
++ block_length = &cur_s->subtitlesegment_block_length;
++ break;
++ case TAG_SUBTITLE_DOWNLOAD_LAST:
++ case TAG_SUBTITLE_DOWNLOAD_MORE:
++ block_chain = &cur_s->subtitledownload_block_chain;
++ block_length = &cur_s->subtitledownload_block_length;
++ break;
++ default:
++ return -1;
++ }
++
++ // we have a preceding fragment - need to append
++ uint8_t *new_data =
++ realloc(*block_chain, *block_length + indata_length);
++ if (new_data == NULL) {
++ print(LOG_LEVEL, ERROR, 1, "Ran out of memory\n");
++ return -1;
++ }
++ memcpy(new_data + *block_length, indata, indata_length);
++ *outdata_length = *block_length + indata_length;
++ *outdata = new_data;
++ *block_chain = NULL;
++ *block_length = 0;
++
++ // success, and indicate to free the block when done
++ return 2;
++ }
++ // success, but indicate it is not to be freed
++ *outdata_length = indata_length;
++ *outdata = indata;
++ return 1;
++}
++
++static int en50221_app_mmi_defragment_text(uint8_t * data,
++ uint32_t data_length,
++ uint8_t ** outdata,
++ uint32_t * outdata_length,
++ uint32_t * outconsumed)
++{
++ uint8_t *text = NULL;
++ uint32_t text_length = 0;
++ uint32_t consumed = 0;
++
++ while (1) {
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Short data\n");
++ if (text)
++ free(text);
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++ data += 3;
++ data_length -= 3;
++ consumed += 3;
++
++ // get the length of the data and adjust
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len =
++ asn_1_decode(&asn_data_length, data,
++ data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ if (text)
++ free(text);
++ return -1;
++ }
++ data += length_field_len;
++ data_length -= length_field_len;
++ consumed += length_field_len;
++
++ // deal with the tags
++ if (tag == TAG_TEXT_LAST) {
++ if (text == NULL) {
++ *outdata = data;
++ *outdata_length = asn_data_length;
++ *outconsumed = consumed + asn_data_length;
++ return 1;
++ } else {
++ // append the data
++ uint8_t *new_text = realloc(text,
++ text_length + asn_data_length);
++ if (new_text == NULL) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Ran out of memory\n");
++ if (text)
++ free(text);
++ return -1;
++ }
++ memcpy(new_text + text_length, data,
++ asn_data_length);
++ *outdata = new_text;
++ *outdata_length =
++ text_length + asn_data_length;
++ *outconsumed = consumed + asn_data_length;
++ return 2;
++ }
++
++ } else if (tag == TAG_TEXT_MORE) {
++ // append the data
++ uint8_t *new_text =
++ realloc(text, text_length + asn_data_length);
++ if (new_text == NULL) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Ran out of memory\n");
++ if (text)
++ free(text);
++ return -1;
++ }
++ memcpy(new_text + text_length, data,
++ asn_data_length);
++ text = new_text;
++ text_length += asn_data_length;
++
++ // consume the data
++ data += asn_data_length;
++ data_length -= asn_data_length;
++ consumed += asn_data_length;
++ } else {
++ // unknown tag
++ print(LOG_LEVEL, ERROR, 1,
++ "Unknown MMI text tag\n");
++ if (text)
++ free(text);
++ return -1;
++ }
++ }
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_mmi.h dvb-apps/lib/libdvben50221/en50221_app_mmi.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_mmi.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_mmi.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,618 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_mmi_H__
++#define __EN50221_APPLICATION_mmi_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++
++#define EN50221_APP_MMI_RESOURCEID MKRID(64,1,1)
++
++#define MMI_CLOSE_MMI_CMD_ID_IMMEDIATE 0x00
++#define MMI_CLOSE_MMI_CMD_ID_DELAY 0x01
++
++#define MMI_DISPLAY_CONTROL_CMD_ID_SET_MMI_MODE 0x01
++#define MMI_DISPLAY_CONTROL_CMD_ID_GET_DISPLAY_CHAR_TABLES 0x02
++#define MMI_DISPLAY_CONTROL_CMD_ID_GET_INPUT_CHAR_TABLES 0x03
++#define MMI_DISPLAY_CONTROL_CMD_ID_GET_OVERLAY_GFX_CHARACTERISTICS 0x04
++#define MMI_DISPLAY_CONTROL_CMD_ID_GET_FULLSCREEN_GFX_CHARACTERISTICS 0x05
++
++#define MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK 0x01
++#define MMI_DISPLAY_REPLY_ID_LIST_DISPLAY_CHAR_TABLES 0x02
++#define MMI_DISPLAY_REPLY_ID_LIST_INPUT_CHAR_TABLES 0x03
++#define MMI_DISPLAY_REPLY_ID_LIST_OVERLAY_GFX_CHARACTERISTICS 0x04
++#define MMI_DISPLAY_REPLY_ID_LIST_FULLSCREEN_GFX_CHARACTERISTICS 0x05
++#define MMI_DISPLAY_REPLY_ID_UNKNOWN_CMD_ID 0xF0
++#define MMI_DISPLAY_REPLY_ID_UNKNOWN_MMI_MODE 0xF1
++#define MMI_DISPLAY_REPLY_ID_UNKNOWN_CHAR_TABLE 0xF2
++
++#define MMI_MODE_HIGH_LEVEL 0x01
++#define MMI_MODE_LOW_LEVEL_OVERLAY_GFX 0x02
++#define MMI_MODE_LOW_LEVEL_FULLSCREEN_GFX 0x03
++
++#define MMI_KEYPAD_CONTROL_CMD_ID_INTERCEPT_ALL 0x01
++#define MMI_KEYPAD_CONTROL_CMD_ID_IGNORE_ALL 0x02
++#define MMI_KEYPAD_CONTROL_CMD_ID_INTERCEPT_SELECTED 0x03
++#define MMI_KEYPAD_CONTROL_CMD_ID_IGNORE_SELECTED 0x04
++#define MMI_KEYPAD_CONTROL_CMD_ID_REJECT_KEYPRESS 0x05
++
++#define MMI_GFX_VIDEO_RELATION_NONE 0x00
++#define MMI_GFX_VIDEO_RELATION_MATCHES_EXACTLY 0x07
++
++#define MMI_DISPLAY_MESSAGE_ID_OK 0x00
++#define MMI_DISPLAY_MESSAGE_ID_ERROR 0x01
++#define MMI_DISPLAY_MESSAGE_ID_OUT_OF_MEMORY 0x02
++#define MMI_DISPLAY_MESSAGE_ID_SUBTITLE_SYNTAX_ERROR 0x03
++#define MMI_DISPLAY_MESSAGE_ID_UNDEFINED_REGION 0x04
++#define MMI_DISPLAY_MESSAGE_ID_UNDEFINED_CLUT 0x05
++#define MMI_DISPLAY_MESSAGE_ID_UNDEFINED_OBJECT 0x06
++#define MMI_DISPLAY_MESSAGE_ID_INCOMPATABLE_OBJECT 0x07
++#define MMI_DISPLAY_MESSAGE_ID_UNKNOWN_CHARACTER 0x08
++#define MMI_DISPLAY_MESSAGE_ID_DISPLAY_CHANGED 0x09
++
++#define MMI_DOWNLOAD_REPLY_ID_OK 0x00
++#define MMI_DOWNLOAD_REPLY_ID_NOT_OBJECT_SEGMENT 0x01
++#define MMI_DOWNLOAD_REPLY_ID_OUT_OF_MEMORY 0x02
++
++#define MMI_ANSW_ID_CANCEL 0x00
++#define MMI_ANSW_ID_ANSWER 0x01
++
++/**
++ * A pixel depth as supplied with display_reply details
++ */
++struct en50221_app_mmi_pixel_depth {
++ uint8_t display_depth;
++ uint8_t pixels_per_byte;
++ uint8_t region_overhead;
++};
++
++/**
++ * Details returned with a display_reply
++ */
++struct en50221_app_mmi_display_reply_details {
++ union {
++ struct {
++ uint16_t width;
++ uint16_t height;
++ uint8_t aspect_ratio;
++ uint8_t gfx_relation_to_video; /* one of MMI_GFX_VIDEO_RELATION_* */
++ uint8_t multiple_depths;
++ uint16_t display_bytes;
++ uint8_t composition_buffer_bytes;
++ uint8_t object_cache_bytes;
++ uint8_t num_pixel_depths;
++ struct en50221_app_mmi_pixel_depth *pixel_depths;
++ } gfx; /* MMI_DISPLAY_REPLY_ID_LIST_OVERLAY_GFX_CHARACTERISTICS or
++ MMI_DISPLAY_REPLY_ID_LIST_FULLSCREEN_GFX_CHARACTERISTICS */
++
++ struct {
++ uint32_t table_length;
++ uint8_t *table;
++ } char_table; /* MMI_DISPLAY_REPLY_ID_LIST_DISPLAY_CHAR_TABLES or
++ MMI_DISPLAY_REPLY_ID_LIST_INPUT_CHAR_TABLES */
++
++ struct {
++ uint8_t mmi_mode; /* one of the MMI_MODE_* values */
++ } mode_ack; /* for MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK */
++ } u;
++};
++
++/**
++ * Pointer to a text string.
++ */
++struct en50221_app_mmi_text {
++ uint8_t *text;
++ uint32_t text_length;
++};
++
++/**
++ * Type definition for close - called when we receive an mmi_close from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param cmd_id One of the MMI_CLOSE_MMI_CMD_ID_* values.
++ * @param delay Delay supplied with MMI_CLOSE_MMI_CMD_ID_DELAY.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_close_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t cmd_id,
++ uint8_t delay);
++
++/**
++ * Type definition for display_control callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param cmd_id One of the MMI_DISPLAY_CONTROL_CMD_ID_* values.
++ * @param delay One of the MMI_MODE_* values.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_display_control_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t cmd_id,
++ uint8_t mmi_mode);
++
++/**
++ * Type definition for keypad_control callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param cmd_id One of the MMI_KEYPAD_CONTROL_CMD_ID_* values.
++ * @param key_codes Pointer to the key codes.
++ * @param key_codes_count Number of key codes.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_keypad_control_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t cmd_id,
++ uint8_t *key_codes,
++ uint32_t key_codes_count);
++
++/**
++ * Type definition for subtitle_segment callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param segment Pointer to the segment data.
++ * @param segment_size Size of segment data.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_subtitle_segment_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t *segment,
++ uint32_t segment_size);
++
++/**
++ * Type definition for scene_end_mark callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param decoder_continue_flag
++ * @param scene_reveal_flag
++ * @param send_scene_done
++ * @param scene_tag
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_scene_end_mark_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t decoder_continue_flag,
++ uint8_t scene_reveal_flag,
++ uint8_t send_scene_done,
++ uint8_t scene_tag);
++
++/**
++ * Type definition for scene_control callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param decoder_continue_flag
++ * @param scene_reveal_flag
++ * @param scene_tag
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_scene_control_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t decoder_continue_flag,
++ uint8_t scene_reveal_flag,
++ uint8_t scene_tag);
++
++/**
++ * Type definition for subtitle_download callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param segment Pointer to the segment data.
++ * @param segment_size Size of segment data.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_subtitle_download_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t *segment,
++ uint32_t segment_size);
++
++/**
++ * Type definition for flush_download callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_flush_download_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number);
++
++/**
++ * Type definition for enq callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param blind_answer 1=>Obscure text input in some manner,
++ * @param expected_answer_length Expected max number of characters to be returned.
++ * @param text Pointer to the text data.
++ * @param text_size Size of text data.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_enq_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t blind_answer,
++ uint8_t expected_answer_length,
++ uint8_t * text,
++ uint32_t text_size);
++
++/**
++ * Type definition for menu callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param title Title text.
++ * @param sub_title Sub-Title text.
++ * @param bottom Bottom text.
++ * @param item_count Number of text elements in items.
++ * @param items Pointer to array of en50221_app_mmi_text structures which are standard menu choices,
++ * @param item_raw_length Length of item raw data.
++ * @param items_raw If nonstandard items were supplied, pointer to their data.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_menu_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ struct en50221_app_mmi_text *title,
++ struct en50221_app_mmi_text *sub_title,
++ struct en50221_app_mmi_text *bottom,
++ uint32_t item_count,
++ struct en50221_app_mmi_text *items,
++ uint32_t item_raw_length,
++ uint8_t *items_raw);
++
++/**
++ * Type definition for list callback.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param title Title text.
++ * @param sub_title Sub-Title text.
++ * @param bottom Bottom text.
++ * @param item_count Number of text elements in items.
++ * @param items Pointer to array of en50221_app_mmi_text structures which are standard menu choices,
++ * @param item_raw_length Length of item raw data.
++ * @param items_raw If nonstandard items were supplied, pointer to their data.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_mmi_list_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ struct en50221_app_mmi_text *title,
++ struct en50221_app_mmi_text *sub_title,
++ struct en50221_app_mmi_text *bottom,
++ uint32_t item_count,
++ struct en50221_app_mmi_text *items,
++ uint32_t item_raw_length,
++ uint8_t *items_raw);
++
++/**
++ * Opaque type representing a mmi resource.
++ */
++struct en50221_app_mmi;
++
++/**
++ * Create an instance of the mmi resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_mmi *en50221_app_mmi_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the mmi resource.
++ *
++ * @param mmi Instance to destroy.
++ */
++extern void en50221_app_mmi_destroy(struct en50221_app_mmi *mmi);
++
++/**
++ * Informs the mmi object that a session to it has been closed - cleans up internal state.
++ *
++ * @param mmi mmi resource instance.
++ * @param session_number The session concerned.
++ */
++extern void en50221_app_mmi_clear_session(struct en50221_app_mmi *mmi,
++ uint16_t session_number);
++
++/**
++ * Register the callback for when we receive an mmi_close request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_close_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_close_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a display control request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_display_control_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_display_control_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a keypad control request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_keypad_control_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_keypad_control_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a subtitle segment request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_subtitle_segment_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_subtitle_segment_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a scene end mark request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_scene_end_mark_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_scene_end_mark_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a scene control request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_scene_control_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_scene_control_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a subtitle download request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_subtitle_download_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_subtitle_download_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a flush download request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_flush_download_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_flush_download_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive an enq request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_enq_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_enq_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a menu request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_menu_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_menu_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a list request.
++ *
++ * @param mmi mmi resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_mmi_register_list_callback(struct en50221_app_mmi *mmi,
++ en50221_app_mmi_list_callback callback,
++ void *arg);
++
++/**
++ * Send an mmi_close to the cam.
++ *
++ * @param mmi mmi resource instance.
++ * @param session_number Session number to send it on.
++ * @param cmd_id One of the MMI_CLOSE_MMI_CMD_ID_* values.
++ * @param delay Delay to use if MMI_CLOSE_MMI_CMD_ID_DELAY specified.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_mmi_close(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t cmd_id, uint8_t delay);
++
++/**
++ * Send a display_reply to the cam.
++ *
++ * @param mmi mmi resource instance.
++ * @param session_number Session number to send it on.
++ * @param reply_id One of the MMI_DISPLAY_REPLY_ID_* values.
++ * @param details The details of the reply - can be NULL if the chosen reply_id does not need it.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_mmi_display_reply(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t reply_id,
++ struct en50221_app_mmi_display_reply_details *details);
++
++/**
++ * Send a keypress to the cam.
++ *
++ * @param mmi mmi resource instance.
++ * @param session_number Session number to send it on.
++ * @param keycode The keycode.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_mmi_keypress(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t keycode);
++
++/**
++ * Send a display message to the cam.
++ *
++ * @param mmi mmi resource instance.
++ * @param session_number Session number to send it on.
++ * @param display_message_id One of the MMI_DISPLAY_MESSAGE_ID_* values.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_mmi_display_message(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t display_message_id);
++
++/**
++ * Send a scene done message to the cam.
++ *
++ * @param mmi mmi resource instance.
++ * @param session_number Session number to send it on.
++ * @param decoder_continue Copy of flag in scene_end_mark.
++ * @param scene_reveal Copy of flag in scene_end_mark.
++ * @param scene_tag Scene tag this responds to.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_mmi_scene_done(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t decoder_continue,
++ uint8_t scene_reveal,
++ uint8_t scene_tag);
++
++/**
++ * Send a download reply to the cam.
++ *
++ * @param mmi mmi resource instance.
++ * @param session_number Session number to send it on.
++ * @param object_id Object id.
++ * @param download_reply_id One of the MMI_DOWNLOAD_REPLY_ID_* values.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_mmi_download_reply(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint16_t object_id,
++ uint8_t download_reply_id);
++
++/**
++ * Send an answ to the cam.
++ *
++ * @param mmi mmi resource instance.
++ * @param session_number Session number to send it on.
++ * @param answ_id One of the MMI_ANSW_ID_* values.
++ * @param text The text if MMI_ANSW_ID_ANSWER.
++ * @param text_count Length of text.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_mmi_answ(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t answ_id,
++ uint8_t * text,
++ uint32_t text_count);
++
++/**
++ * Send a menu answ to the cam.
++ *
++ * @param mmi mmi resource instance.
++ * @param session_number Session number to send it on.
++ * @param choice_ref Option chosen by user (0=>canceled).
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_mmi_menu_answ(struct en50221_app_mmi *mmi,
++ uint16_t session_number,
++ uint8_t choice_ref);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param mmi mmi instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_mmi_message(struct en50221_app_mmi *mmi,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t *data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_rm.c dvb-apps/lib/libdvben50221/en50221_app_rm.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_rm.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_rm.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,307 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include <libucsi/endianops.h>
++#include "en50221_app_rm.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_rm {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_rm_enq_callback enqcallback;
++ void *enqcallback_arg;
++
++ en50221_app_rm_reply_callback replycallback;
++ void *replycallback_arg;
++
++ en50221_app_rm_changed_callback changedcallback;
++ void *changedcallback_arg;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_rm_parse_profile_enq(struct en50221_app_rm *rm,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_rm_parse_profile_reply(struct en50221_app_rm *rm,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_app_rm_parse_profile_change(struct en50221_app_rm *rm,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++
++struct en50221_app_rm *en50221_app_rm_create(struct
++ en50221_app_send_functions
++ *funcs)
++{
++ struct en50221_app_rm *rm = NULL;
++
++ // create structure and set it up
++ rm = malloc(sizeof(struct en50221_app_rm));
++ if (rm == NULL) {
++ return NULL;
++ }
++ rm->funcs = funcs;
++ rm->enqcallback = NULL;
++ rm->replycallback = NULL;
++ rm->changedcallback = NULL;
++
++ pthread_mutex_init(&rm->lock, NULL);
++
++ // done
++ return rm;
++}
++
++void en50221_app_rm_destroy(struct en50221_app_rm *rm)
++{
++ pthread_mutex_destroy(&rm->lock);
++ free(rm);
++}
++
++void en50221_app_rm_register_enq_callback(struct en50221_app_rm *rm,
++ en50221_app_rm_enq_callback
++ callback, void *arg)
++{
++ pthread_mutex_lock(&rm->lock);
++ rm->enqcallback = callback;
++ rm->enqcallback_arg = arg;
++ pthread_mutex_unlock(&rm->lock);
++}
++
++void en50221_app_rm_register_reply_callback(struct en50221_app_rm *rm,
++ en50221_app_rm_reply_callback
++ callback, void *arg)
++{
++ pthread_mutex_lock(&rm->lock);
++ rm->replycallback = callback;
++ rm->replycallback_arg = arg;
++ pthread_mutex_unlock(&rm->lock);
++}
++
++void en50221_app_rm_register_changed_callback(struct en50221_app_rm *rm,
++ en50221_app_rm_changed_callback
++ callback, void *arg)
++{
++ pthread_mutex_lock(&rm->lock);
++ rm->changedcallback = callback;
++ rm->changedcallback_arg = arg;
++ pthread_mutex_unlock(&rm->lock);
++}
++
++int en50221_app_rm_enq(struct en50221_app_rm *rm, uint16_t session_number)
++{
++ uint8_t buf[4];
++
++ // set up the tag
++ buf[0] = (TAG_PROFILE_ENQUIRY >> 16) & 0xFF;
++ buf[1] = (TAG_PROFILE_ENQUIRY >> 8) & 0xFF;
++ buf[2] = TAG_PROFILE_ENQUIRY & 0xFF;
++ buf[3] = 0;
++
++ // create the data and send it
++ return rm->funcs->send_data(rm->funcs->arg, session_number, buf, 4);
++}
++
++int en50221_app_rm_reply(struct en50221_app_rm *rm,
++ uint16_t session_number,
++ uint32_t resource_id_count,
++ uint32_t * resource_ids)
++{
++ uint8_t buf[10];
++
++ // set up the tag
++ buf[0] = (TAG_PROFILE >> 16) & 0xFF;
++ buf[1] = (TAG_PROFILE >> 8) & 0xFF;
++ buf[2] = TAG_PROFILE & 0xFF;
++
++ // encode the length field
++ int length_field_len;
++ if ((length_field_len = asn_1_encode(resource_id_count * 4, buf + 3, 3)) < 0) {
++ return -1;
++ }
++ // copy the data and byteswap it
++ uint32_t *copy_resource_ids = alloca(4 * resource_id_count);
++ if (copy_resource_ids == NULL) {
++ return -1;
++ }
++ uint8_t *data = (uint8_t *) copy_resource_ids;
++ memcpy(data, resource_ids, resource_id_count * 4);
++ uint32_t i;
++ for (i = 0; i < resource_id_count; i++) {
++ bswap32(data);
++ data += 4;
++ }
++
++ // build the iovecs
++ struct iovec iov[2];
++ iov[0].iov_base = buf;
++ iov[0].iov_len = 3 + length_field_len;
++ iov[1].iov_base = (uint8_t *) copy_resource_ids;
++ iov[1].iov_len = resource_id_count * 4;
++
++ // create the data and send it
++ return rm->funcs->send_datav(rm->funcs->arg, session_number, iov, 2);
++}
++
++int en50221_app_rm_changed(struct en50221_app_rm *rm,
++ uint16_t session_number)
++{
++ uint8_t buf[4];
++
++ // set up the tag
++ buf[0] = (TAG_PROFILE_CHANGE >> 16) & 0xFF;
++ buf[1] = (TAG_PROFILE_CHANGE >> 8) & 0xFF;
++ buf[2] = TAG_PROFILE_CHANGE & 0xFF;
++ buf[3] = 0;
++
++ // create the data and send it
++ return rm->funcs->send_data(rm->funcs->arg, session_number, buf, 4);
++}
++
++int en50221_app_rm_message(struct en50221_app_rm *rm,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ // dispatch it
++ switch (tag) {
++ case TAG_PROFILE_ENQUIRY:
++ return en50221_app_rm_parse_profile_enq(rm, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_PROFILE:
++ return en50221_app_rm_parse_profile_reply(rm, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_PROFILE_CHANGE:
++ return en50221_app_rm_parse_profile_change(rm, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++static int en50221_app_rm_parse_profile_enq(struct en50221_app_rm *rm,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ (void) data;
++ (void) data_length;
++
++ pthread_mutex_lock(&rm->lock);
++ en50221_app_rm_enq_callback cb = rm->enqcallback;
++ void *cb_arg = rm->enqcallback_arg;
++ pthread_mutex_unlock(&rm->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number);
++ }
++ return 0;
++}
++
++static int en50221_app_rm_parse_profile_reply(struct en50221_app_rm *rm,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t resources_count = asn_data_length / 4;
++ uint32_t *resource_ids = (uint32_t *) (data + length_field_len);
++ data += length_field_len;
++
++ // byteswap it
++ uint32_t i;
++ for (i = 0; i < resources_count; i++) {
++ bswap32(data);
++ data += 4;
++ }
++
++ // inform observer
++ pthread_mutex_lock(&rm->lock);
++ en50221_app_rm_reply_callback cb = rm->replycallback;
++ void *cb_arg = rm->replycallback_arg;
++ pthread_mutex_unlock(&rm->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, resources_count, resource_ids);
++ }
++ return 0;
++}
++
++static int en50221_app_rm_parse_profile_change(struct en50221_app_rm *rm,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ (void) data;
++ (void) data_length;
++
++ pthread_mutex_lock(&rm->lock);
++ en50221_app_rm_changed_callback cb = rm->changedcallback;
++ void *cb_arg = rm->changedcallback_arg;
++ pthread_mutex_unlock(&rm->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_rm.h dvb-apps/lib/libdvben50221/en50221_app_rm.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_rm.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_rm.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,187 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_RM_H__
++#define __EN50221_APPLICATION_RM_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++
++#define EN50221_APP_RM_RESOURCEID MKRID(1,1,1)
++
++/**
++ * Type definition for profile_enq callback function - called when we receive
++ * a profile_enq from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_rm_enq_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number);
++
++/**
++ * Type definition for profile_reply callback function - called when we receive
++ * a profile_reply from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id_count Number of resource_ids.
++ * @param resource_ids The resource ids themselves.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_rm_reply_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id_count,
++ uint32_t *resource_ids);
++/**
++ * Type definition for profile_changed callback function - called when we receive
++ * a profile_changed from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_rm_changed_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number);
++
++
++
++/**
++ * Opaque type representing a resource manager.
++ */
++struct en50221_app_rm;
++
++/**
++ * Create an instance of the resource manager.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_rm *en50221_app_rm_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the resource manager.
++ *
++ * @param rm Instance to destroy.
++ */
++extern void en50221_app_rm_destroy(struct en50221_app_rm *rm);
++
++/**
++ * Register the callback for when we receive a profile_enq from a CAM.
++ *
++ * @param rm Resource manager instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_rm_register_enq_callback(struct en50221_app_rm *rm,
++ en50221_app_rm_enq_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a profile_reply from a CAM.
++ *
++ * @param rm Resource manager instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_rm_register_reply_callback(struct en50221_app_rm *rm,
++ en50221_app_rm_reply_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive a profile_changed from a CAM.
++ *
++ * @param rm Resource manager instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_rm_register_changed_callback(struct en50221_app_rm *rm,
++ en50221_app_rm_changed_callback callback,
++ void *arg);
++
++/**
++ * Send a profile_enq to a CAM.
++ *
++ * @param rm Resource manager resource instance.
++ * @param session_number Session number to send it on.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_rm_enq(struct en50221_app_rm *rm, uint16_t session_number);
++
++/**
++ * Send a profile_reply to a CAM.
++ *
++ * @param rm Resource manager resource instance.
++ * @param session_number Session number to send it on.
++ * @param resource_id_count Number of resource ids.
++ * @param resource_ids The resource IDs themselves
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_rm_reply(struct en50221_app_rm *rm,
++ uint16_t session_number,
++ uint32_t resource_id_count,
++ uint32_t * resource_ids);
++
++/**
++ * Send a profile_changed to a CAM.
++ *
++ * @param rm Resource manager resource instance.
++ * @param session_number Session number to send it on.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_rm_changed(struct en50221_app_rm *rm, uint16_t session_number);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param rm rm instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_rm_message(struct en50221_app_rm *rm,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t *data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_smartcard.c dvb-apps/lib/libdvben50221/en50221_app_smartcard.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_smartcard.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_smartcard.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,296 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include "en50221_app_smartcard.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_smartcard {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_smartcard_command_callback command_callback;
++ void *command_callback_arg;
++
++ en50221_app_smartcard_send_callback send_callback;
++ void *send_callback_arg;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_smartcard_parse_command(struct en50221_app_smartcard *smartcard,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++static int en50221_app_smartcard_parse_send(struct en50221_app_smartcard *smartcard,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++
++struct en50221_app_smartcard *en50221_app_smartcard_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_smartcard *smartcard = NULL;
++
++ // create structure and set it up
++ smartcard = malloc(sizeof(struct en50221_app_smartcard));
++ if (smartcard == NULL) {
++ return NULL;
++ }
++ smartcard->funcs = funcs;
++ smartcard->command_callback = NULL;
++ smartcard->send_callback = NULL;
++
++ pthread_mutex_init(&smartcard->lock, NULL);
++
++ // done
++ return smartcard;
++}
++
++void en50221_app_smartcard_destroy(struct en50221_app_smartcard *smartcard)
++{
++ pthread_mutex_destroy(&smartcard->lock);
++ free(smartcard);
++}
++
++void en50221_app_smartcard_register_command_callback(struct en50221_app_smartcard *smartcard,
++ en50221_app_smartcard_command_callback callback, void *arg)
++{
++ pthread_mutex_lock(&smartcard->lock);
++ smartcard->command_callback = callback;
++ smartcard->command_callback_arg = arg;
++ pthread_mutex_unlock(&smartcard->lock);
++}
++
++void en50221_app_smartcard_register_send_callback(struct en50221_app_smartcard *smartcard,
++ en50221_app_smartcard_send_callback callback, void *arg)
++{
++ pthread_mutex_lock(&smartcard->lock);
++ smartcard->send_callback = callback;
++ smartcard->send_callback_arg = arg;
++ pthread_mutex_unlock(&smartcard->lock);
++}
++
++int en50221_app_smartcard_command_reply(struct en50221_app_smartcard *smartcard,
++ uint16_t session_number,
++ uint8_t reply_id, uint8_t status,
++ uint8_t *data,
++ uint32_t data_length)
++{
++ uint8_t hdr[10];
++ struct iovec iovec[2];
++ int iov_count = 0;
++
++ // the tag
++ hdr[0] = (TAG_SMARTCARD_REPLY >> 16) & 0xFF;
++ hdr[1] = (TAG_SMARTCARD_REPLY >> 8) & 0xFF;
++ hdr[2] = TAG_SMARTCARD_REPLY & 0xFF;
++
++ // the rest of the data
++ if (reply_id == SMARTCARD_REPLY_ID_ANSW_TO_RESET) {
++ // encode the length field
++ int length_field_len;
++ if ((length_field_len = asn_1_encode(data_length + 2, data + 3, 3)) < 0) {
++ return -1;
++ }
++ // the rest of the header
++ hdr[3 + length_field_len] = reply_id;
++ hdr[3 + length_field_len + 1] = status;
++ iovec[0].iov_base = hdr;
++ iovec[0].iov_len = 3 + length_field_len + 2;
++
++ // the data
++ iovec[1].iov_base = data;
++ iovec[1].iov_len = data_length;
++ iov_count = 2;
++ } else {
++ hdr[3] = 2;
++ hdr[4] = reply_id;
++ hdr[5] = status;
++ iovec[0].iov_base = data;
++ iovec[0].iov_len = 6;
++ iov_count = 1;
++ }
++
++ return smartcard->funcs->send_datav(smartcard->funcs->arg, session_number, iovec, iov_count);
++}
++
++int en50221_app_smartcard_receive(struct en50221_app_smartcard *smartcard,
++ uint16_t session_number,
++ uint8_t *data,
++ uint32_t data_length,
++ uint8_t SW1, uint8_t SW2)
++{
++ uint8_t buf[10];
++ uint8_t trailer[10];
++
++ // set up the tag
++ buf[0] = (TAG_SMARTCARD_RCV >> 16) & 0xFF;
++ buf[1] = (TAG_SMARTCARD_RCV >> 8) & 0xFF;
++ buf[2] = TAG_SMARTCARD_RCV & 0xFF;
++
++ // encode the length field
++ int length_field_len;
++ if ((length_field_len = asn_1_encode(data_length + 2, buf + 3, 3)) < 0) {
++ return -1;
++ }
++ // set up the trailer
++ trailer[0] = SW1;
++ trailer[1] = SW2;
++
++ // build the iovecs
++ struct iovec iov[3];
++ iov[0].iov_base = buf;
++ iov[0].iov_len = 3 + length_field_len;
++ iov[1].iov_base = data;
++ iov[1].iov_len = data_length;
++ iov[2].iov_base = trailer;
++ iov[2].iov_len = 2;
++
++ // create the data and send it
++ return smartcard->funcs->send_datav(smartcard->funcs->arg,
++ session_number, iov, 3);
++}
++
++int en50221_app_smartcard_message(struct en50221_app_smartcard *smartcard,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t *data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_SMARTCARD_COMMAND:
++ return en50221_app_smartcard_parse_command(smartcard,
++ slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ case TAG_SMARTCARD_SEND:
++ return en50221_app_smartcard_parse_send(smartcard, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++
++
++
++
++
++static int en50221_app_smartcard_parse_command(struct en50221_app_smartcard *smartcard,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ if (data_length != 2) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (data[0] != 1) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t command_id = data[1];
++
++ // tell the app
++ pthread_mutex_lock(&smartcard->lock);
++ en50221_app_smartcard_command_callback cb = smartcard->command_callback;
++ void *cb_arg = smartcard->command_callback_arg;
++ pthread_mutex_unlock(&smartcard->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, command_id);
++ }
++ return 0;
++}
++
++static int en50221_app_smartcard_parse_send(struct en50221_app_smartcard *smartcard,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++ // check it
++ if (asn_data_length < 8) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ data += length_field_len;
++
++ // parse
++ uint8_t CLA = data[0];
++ uint8_t INS = data[1];
++ uint8_t P1 = data[2];
++ uint8_t P2 = data[3];
++ uint16_t length_in = (data[4] << 8) | data[5];
++ uint8_t *data_in = data + 6;
++
++ // validate the length
++ if ((length_in + 8) != asn_data_length) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint16_t length_out =
++ (data[6 + length_in] << 8) | data[6 + length_in + 1];
++
++ // tell the app
++ pthread_mutex_lock(&smartcard->lock);
++ en50221_app_smartcard_send_callback cb = smartcard->send_callback;
++ void *cb_arg = smartcard->send_callback_arg;
++ pthread_mutex_unlock(&smartcard->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, CLA, INS, P1,
++ P2, data_in, length_in, length_out);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_smartcard.h dvb-apps/lib/libdvben50221/en50221_app_smartcard.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_smartcard.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_smartcard.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,200 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_smartcard_H__
++#define __EN50221_APPLICATION_smartcard_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++
++#define SMARTCARD_COMMAND_ID_CONNECT 0x01
++#define SMARTCARD_COMMAND_ID_DISCONNECT 0x02
++#define SMARTCARD_COMMAND_ID_POWERON_CARD 0x03
++#define SMARTCARD_COMMAND_ID_POWEROFF_CARD 0x04
++#define SMARTCARD_COMMAND_ID_RESET_CARD 0x05
++#define SMARTCARD_COMMAND_ID_RESET_STATUS 0x06
++#define SMARTCARD_COMMAND_ID_READ_ANSW_TO_RESET 0x07
++
++#define SMARTCARD_REPLY_ID_CONNECTED 0x01
++#define SMARTCARD_REPLY_ID_FREE 0x02
++#define SMARTCARD_REPLY_ID_BUSY 0x03
++#define SMARTCARD_REPLY_ID_ANSW_TO_RESET 0x04
++#define SMARTCARD_REPLY_ID_NO_ANSW_TO_RESET 0x05
++
++#define SMARTCARD_STATUS_CARD_INSERTED 0x01
++#define SMARTCARD_STATUS_CARD_REMOVED 0x02
++#define SMARTCARD_STATUS_CARD_IN_PLACE_POWEROFF 0x03
++#define SMARTCARD_STATUS_CARD_IN_PLACE_POWERON 0x04
++#define SMARTCARD_STATUS_CARD_NO_CARD 0x05
++#define SMARTCARD_STATUS_CARD_UNRESPONSIVE_CARD 0x06
++#define SMARTCARD_STATUS_CARD_REFUSED_CARD 0x07
++
++#define EN50221_APP_SMARTCARD_RESOURCEID(DEVICE_NUMBER) MKRID(112, ((DEVICE_NUMBER)& 0x0f), 1)
++
++
++
++/**
++ * Type definition for command - called when we receive a command.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param command_id One of the SMARTCARD_COMMAND_ID_* values
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_smartcard_command_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t command_id);
++
++/**
++ * Type definition for command - called when we receive a send command.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param CLA CLA value.
++ * @param INS INS value.
++ * @param P1 P1 value.
++ * @param P2 P2 value.
++ * @param in Data to send to the card
++ * @param in_length Number of bytes to send.
++ * @param out_length Number of bytes expected.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_smartcard_send_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t CLA,
++ uint8_t INS,
++ uint8_t P1,
++ uint8_t P2,
++ uint8_t *in,
++ uint32_t in_length,
++ uint32_t out_length);
++
++/**
++ * Opaque type representing a smartcard resource.
++ */
++struct en50221_app_smartcard;
++
++/**
++ * Create an instance of the smartcard resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_smartcard *
++ en50221_app_smartcard_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the smartcard resource.
++ *
++ * @param smartcard Instance to destroy.
++ */
++extern void en50221_app_smartcard_destroy(struct en50221_app_smartcard *smartcard);
++
++/**
++ * Register the callback for when we receive a comms command.
++ *
++ * @param smartcard smartcard resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_smartcard_register_command_callback(struct en50221_app_smartcard *smartcard,
++ en50221_app_smartcard_command_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for when we receive data to send.
++ *
++ * @param smartcard smartcard resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_smartcard_register_send_callback(struct en50221_app_smartcard *smartcard,
++ en50221_app_smartcard_send_callback callback,
++ void *arg);
++
++/**
++ * Send a command response to the CAM.
++ *
++ * @param smartcard smartcard resource instance.
++ * @param session_number Session number to send it on.
++ * @param reply_id One of the SMARTCARD_REPLY_ID_* values.
++ * @param status One of the SMARTCARD_STATUS_* values.
++ * @param data Data to send when it is a SMARTCARD_REPLY_ID_ANSW_TO_RESET.
++ * @param data_length Length of data to send.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_smartcard_command_reply(struct en50221_app_smartcard *smartcard,
++ uint16_t session_number,
++ uint8_t reply_id,
++ uint8_t status,
++ uint8_t * data,
++ uint32_t data_length);
++
++/**
++ * Send data received from a smartcart to the CAM.
++ *
++ * @param smartcard smartcard resource instance.
++ * @param session_number Session number to send it on.
++ * @param data Data to send when it is a SMARTCARD_REPLY_ID_ANSW_TO_RESET.
++ * @param data_length Length of data to send.
++ * @param SW1 SW1 value.
++ * @param SW2 SW2 value.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_smartcard_receive(struct en50221_app_smartcard *smartcard,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length,
++ uint8_t SW1, uint8_t SW2);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param smartcard smartcard instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_smartcard_message(struct en50221_app_smartcard *smartcard,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_tags.h dvb-apps/lib/libdvben50221/en50221_app_tags.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_tags.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_tags.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,104 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APP_TAGS_H__
++#define __EN50221_APP_TAGS_H__
++
++/* Resource Manager */
++#define TAG_PROFILE_ENQUIRY 0x9f8010
++#define TAG_PROFILE 0x9f8011
++#define TAG_PROFILE_CHANGE 0x9f8012
++
++/* Application Info */
++#define TAG_APP_INFO_ENQUIRY 0x9f8020
++#define TAG_APP_INFO 0x9f8021
++#define TAG_ENTER_MENU 0x9f8022
++
++/* CA Support */
++#define TAG_CA_INFO_ENQUIRY 0x9f8030
++#define TAG_CA_INFO 0x9f8031
++#define TAG_CA_PMT 0x9f8032
++#define TAG_CA_PMT_REPLY 0x9f8033
++
++/* Host Control */
++#define TAG_TUNE 0x9f8400
++#define TAG_REPLACE 0x9f8401
++#define TAG_CLEAR_REPLACE 0x9f8402
++#define TAG_ASK_RELEASE 0x9f8403
++
++/* Date and Time */
++#define TAG_DATE_TIME_ENQUIRY 0x9f8440
++#define TAG_DATE_TIME 0x9f8441
++
++/* Man Machine Interface (MMI) */
++#define TAG_CLOSE_MMI 0x9f8800
++#define TAG_DISPLAY_CONTROL 0x9f8801
++#define TAG_DISPLAY_REPLY 0x9f8802
++#define TAG_TEXT_LAST 0x9f8803
++#define TAG_TEXT_MORE 0x9f8804
++#define TAG_KEYPAD_CONTROL 0x9f8805
++#define TAG_KEYPRESS 0x9f8806
++#define TAG_ENQUIRY 0x9f8807
++#define TAG_ANSWER 0x9f8808
++#define TAG_MENU_LAST 0x9f8809
++#define TAG_MENU_MORE 0x9f880a
++#define TAG_MENU_ANSWER 0x9f880b
++#define TAG_LIST_LAST 0x9f880c
++#define TAG_LIST_MORE 0x9f880d
++#define TAG_SUBTITLE_SEGMENT_LAST 0x9f880e
++#define TAG_SUBTITLE_SEGMENT_MORE 0x9f880f
++#define TAG_DISPLAY_MESSAGE 0x9f8810
++#define TAG_SCENE_END_MARK 0x9f8811
++#define TAG_SCENE_DONE 0x9f8812
++#define TAG_SCENE_CONTROL 0x9f8813
++#define TAG_SUBTITLE_DOWNLOAD_LAST 0x9f8814
++#define TAG_SUBTITLE_DOWNLOAD_MORE 0x9f8815
++#define TAG_FLUSH_DOWNLOAD 0x9f8816
++#define TAG_DOWNLOAD_REPLY 0x9f8817
++
++/* Low Speed Communications */
++#define TAG_COMMS_COMMAND 0x9f8c00
++#define TAG_CONNECTION_DESCRIPTOR 0x9f8c01
++#define TAG_COMMS_REPLY 0x9f8c02
++#define TAG_COMMS_SEND_LAST 0x9f8c03
++#define TAG_COMMS_SEND_MORE 0x9f8c04
++#define TAG_COMMS_RECV_LAST 0x9f8c05
++#define TAG_COMMS_RECV_MORE 0x9f8c06
++
++/* Authentication */
++#define TAG_AUTH_REQ 0x9f8200
++#define TAG_AUTH_RESP 0x9f8201
++
++/* Teletext */
++#define TAG_TELETEXT_EBU 0x9f9000
++
++/* Smartcard */
++#define TAG_SMARTCARD_COMMAND 0x9f8e00
++#define TAG_SMARTCARD_REPLY 0x9f8e01
++#define TAG_SMARTCARD_SEND 0x9f8e02
++#define TAG_SMARTCARD_RCV 0x9f8e03
++
++/* EPG */
++#define TAG_EPG_ENQUIRY 0x9f8f00
++#define TAG_EPG_REPLY 0x9f8f01
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_teletext.c dvb-apps/lib/libdvben50221/en50221_app_teletext.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_teletext.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_teletext.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,141 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <string.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <pthread.h>
++#include "en50221_app_teletext.h"
++#include "en50221_app_tags.h"
++#include "asn_1.h"
++
++struct en50221_app_teletext {
++ struct en50221_app_send_functions *funcs;
++
++ en50221_app_teletext_callback callback;
++ void *callback_arg;
++
++ pthread_mutex_t lock;
++};
++
++static int en50221_app_teletext_parse_ebu(struct en50221_app_teletext *teletext,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t * data,
++ uint32_t data_length);
++
++
++
++struct en50221_app_teletext *
++ en50221_app_teletext_create(struct en50221_app_send_functions *funcs)
++{
++ struct en50221_app_teletext *teletext = NULL;
++
++ // create structure and set it up
++ teletext = malloc(sizeof(struct en50221_app_teletext));
++ if (teletext == NULL) {
++ return NULL;
++ }
++ teletext->funcs = funcs;
++ teletext->callback = NULL;
++
++ pthread_mutex_init(&teletext->lock, NULL);
++
++ // done
++ return teletext;
++}
++
++void en50221_app_teletext_destroy(struct en50221_app_teletext *teletext)
++{
++ pthread_mutex_destroy(&teletext->lock);
++ free(teletext);
++}
++
++void en50221_app_teletext_register_callback(struct en50221_app_teletext *teletext,
++ en50221_app_teletext_callback callback, void *arg)
++{
++ pthread_mutex_lock(&teletext->lock);
++ teletext->callback = callback;
++ teletext->callback_arg = arg;
++ pthread_mutex_unlock(&teletext->lock);
++}
++
++int en50221_app_teletext_message(struct en50221_app_teletext *teletext,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data, uint32_t data_length)
++{
++ (void) resource_id;
++
++ // get the tag
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint32_t tag = (data[0] << 16) | (data[1] << 8) | data[2];
++
++ switch (tag) {
++ case TAG_TELETEXT_EBU:
++ return en50221_app_teletext_parse_ebu(teletext, slot_id,
++ session_number,
++ data + 3,
++ data_length - 3);
++ }
++
++ print(LOG_LEVEL, ERROR, 1, "Received unexpected tag %x\n", tag);
++ return -1;
++}
++
++
++static int en50221_app_teletext_parse_ebu(struct en50221_app_teletext *teletext,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t *data,
++ uint32_t data_length)
++{
++ // first of all, decode the length field
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data, data_length)) < 0) {
++ print(LOG_LEVEL, ERROR, 1, "ASN.1 decode error\n");
++ return -1;
++ }
++
++ // check it
++ if (asn_data_length > (data_length - length_field_len)) {
++ print(LOG_LEVEL, ERROR, 1, "Received short data\n");
++ return -1;
++ }
++ uint8_t *teletext_data = data + length_field_len;
++
++ // tell the app
++ pthread_mutex_lock(&teletext->lock);
++ en50221_app_teletext_callback cb = teletext->callback;
++ void *cb_arg = teletext->callback_arg;
++ pthread_mutex_unlock(&teletext->lock);
++ if (cb) {
++ return cb(cb_arg, slot_id, session_number, teletext_data,
++ asn_data_length);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_teletext.h dvb-apps/lib/libdvben50221/en50221_app_teletext.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_teletext.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_teletext.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,107 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APPLICATION_teletext_H__
++#define __EN50221_APPLICATION_teletext_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_app_utils.h>
++
++#define EN50221_APP_TELETEXT_RESOURCEID MKRID(128, 1, 1)
++
++
++/**
++ * Type definition for request - called when we receive teletext from a CAM.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number concerned.
++ * @param teletext_data Data for the request.
++ * @param teletext_data_lenghth Number of bytes.
++ * @return 0 on success, -1 on failure.
++ */
++typedef int (*en50221_app_teletext_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint8_t *teletext_data,
++ uint32_t teletext_data_length);
++
++/**
++ * Opaque type representing a teletext resource.
++ */
++struct en50221_app_teletext;
++
++/**
++ * Create an instance of the teletext resource.
++ *
++ * @param funcs Send functions to use.
++ * @return Instance, or NULL on failure.
++ */
++extern struct en50221_app_teletext *
++ en50221_app_teletext_create(struct en50221_app_send_functions *funcs);
++
++/**
++ * Destroy an instance of the teletext resource.
++ *
++ * @param teletext Instance to destroy.
++ */
++extern void en50221_app_teletext_destroy(struct en50221_app_teletext *teletext);
++
++/**
++ * Register the callback for when we receive a request.
++ *
++ * @param teletext teletext resource instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_app_teletext_register_callback(struct en50221_app_teletext *teletext,
++ en50221_app_teletext_callback callback,
++ void *arg);
++
++/**
++ * Pass data received for this resource into it for parsing.
++ *
++ * @param teletext teletext instance.
++ * @param slot_id Slot ID concerned.
++ * @param session_number Session number concerned.
++ * @param resource_id Resource ID concerned.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, -1 on failure.
++ */
++extern int en50221_app_teletext_message(struct en50221_app_teletext *teletext,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data,
++ uint32_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_utils.c dvb-apps/lib/libdvben50221/en50221_app_utils.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_utils.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_utils.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,38 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include "en50221_app_utils.h"
++
++struct en50221_app_public_resource_id
++ *en50221_app_decode_public_resource_id(struct en50221_app_public_resource_id *idf,
++ uint32_t resource_id)
++{
++ // reject private resources
++ if ((resource_id & 0xc0000000) == 0xc0000000)
++ return NULL;
++
++ idf->resource_class = (resource_id >> 16) & 0xffff; // use the resource_id as the MSBs of class
++ idf->resource_type = (resource_id >> 6) & 0x3ff;
++ idf->resource_version = resource_id & 0x3f;
++ return idf;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_utils.h dvb-apps/lib/libdvben50221/en50221_app_utils.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_app_utils.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_app_utils.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,112 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef __EN50221_APP_UTILS_H__
++#define __EN50221_APP_UTILS_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <sys/uio.h>
++
++/**
++ * A decomposed public resource structure.
++ *
++ * we will ignore private resource (resource_id_type==3),
++ * because they are not used by any modules at all and
++ * would need special code for any private resource anyway.
++ */
++struct en50221_app_public_resource_id {
++ uint16_t resource_class;
++ uint16_t resource_type;
++ uint8_t resource_version;
++};
++
++typedef int (*en50221_send_data) (void *arg,
++ uint16_t session_number,
++ uint8_t * data,
++ uint16_t data_length);
++typedef int (*en50221_send_datav) (void *arg,
++ uint16_t session_number,
++ struct iovec * vector,
++ int iov_count);
++
++/**
++ * An abstraction away from hardcoded send functions so different layers may be
++ * slotted in under the application layer.
++ */
++struct en50221_app_send_functions {
++ /**
++ * Argument to pass to these functions.
++ */
++ void *arg;
++
++ /**
++ * Send data.
++ */
++ en50221_send_data send_data;
++
++ /**
++ * Send vector data.
++ */
++ en50221_send_datav send_datav;
++};
++
++/**
++ * Make a host-endian uint32_t formatted resource id.
++ *
++ * @param CLASS Class of resource.
++ * @param TYPE Type of resource.
++ * @param VERSION Version of resource.
++ * @return Formatted resource id.
++ */
++#define MKRID(CLASS, TYPE, VERSION) ((((CLASS)&0xffff)<<16) | (((TYPE)&0x3ff)<<6) | ((VERSION)&0x3f))
++
++/**
++ * Decode a host-endian public resource_id into an en50221_app_public_resource_id structure.
++ *
++ * @param idf Structure to write decoded resource_id into.
++ * @param resource_id ID to decode.
++ * @return Pointer to idf on success, or NULL if this is not a public resource.
++ */
++struct en50221_app_public_resource_id *
++ en50221_app_decode_public_resource_id(struct en50221_app_public_resource_id *idf,
++ uint32_t resource_id);
++
++/**
++ * Encode an en50221_app_public_resource_id structure into a host-endian uint32_t.
++ *
++ * @param idf Structure to encode.
++ * @return The encoded value
++ */
++static inline uint32_t en50221_app_encode_public_resource_id(struct en50221_app_public_resource_id *idf) {
++ return MKRID(idf->resource_class, idf->resource_type, idf->resource_version);
++}
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_errno.h dvb-apps/lib/libdvben50221/en50221_errno.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_errno.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_errno.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,49 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 session layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef EN50221_ERRNO
++#define EN50221_ERRNO 1
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#define EN50221ERR_CAREAD -1 /* error during read from CA device. */
++#define EN50221ERR_CAWRITE -2 /* error during write to CA device. */
++#define EN50221ERR_TIMEOUT -3 /* timeout occured waiting for a response from a device. */
++#define EN50221ERR_BADSLOTID -4 /* bad slot ID supplied by user - the offending slot_id will not be set. */
++#define EN50221ERR_BADCONNECTIONID -5 /* bad connection ID supplied by user. */
++#define EN50221ERR_BADSTATE -6 /* slot/connection in the wrong state. */
++#define EN50221ERR_BADCAMDATA -7 /* CAM supplied an invalid request. */
++#define EN50221ERR_OUTOFMEMORY -8 /* memory allocation failed. */
++#define EN50221ERR_ASNENCODE -9 /* ASN.1 encode failure - indicates library bug. */
++#define EN50221ERR_OUTOFCONNECTIONS -10 /* no more connections available. */
++#define EN50221ERR_OUTOFSLOTS -11 /* no more slots available - the offending slot_id will not be set. */
++#define EN50221ERR_IOVLIMIT -12 /* Too many struct iovecs were used. */
++#define EN50221ERR_BADSESSIONNUMBER -13 /* Bad session number suppplied by user. */
++#define EN50221ERR_OUTOFSESSIONS -14 /* no more sessions available. */
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_session.c dvb-apps/lib/libdvben50221/en50221_session.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_session.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_session.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,1055 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <string.h>
++#include <fcntl.h>
++#include <sys/ioctl.h>
++#include <time.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <sys/uio.h>
++#include <pthread.h>
++#include "en50221_transport.h"
++#include "en50221_session.h"
++#include "en50221_errno.h"
++#include "asn_1.h"
++
++
++// these are the possible session statuses
++#define S_STATUS_OPEN 0x00 // session is opened
++#define S_STATUS_CLOSE_NO_RES 0xF0 // could not open session, no proper resource available
++#define S_STATUS_CLOSE_RES_UNAVAILABLE 0xF1 // could not open session, resource unavailable
++#define S_STATUS_CLOSE_RES_LOW_VERSION 0xF2 // could not open session, resource version too low
++#define S_STATUS_CLOSE_RES_BUSY 0xF3 // could not open session, resource is busy
++
++#define ST_OPEN_SESSION_REQ 0x91 // h<--m
++#define ST_OPEN_SESSION_RES 0x92 // h-->m
++#define ST_CREATE_SESSION 0x93 // h-->m
++#define ST_CREATE_SESSION_RES 0x94 // h<--m
++#define ST_CLOSE_SESSION_REQ 0x95 // h<->m
++#define ST_CLOSE_SESSION_RES 0x96 // h<->m
++#define ST_SESSION_NUMBER 0x90 // h<->m
++
++#define S_STATE_IDLE 0x01 // this session is not in use
++#define S_STATE_ACTIVE 0x02 // this session is in use
++#define S_STATE_IN_CREATION 0x04 // this session waits for a ST_CREATE_SESSION_RES to become active
++#define S_STATE_IN_DELETION 0x08 // this session waits for ST_CLOSE_SESSION_RES to become idle again
++
++
++// for each session we store its identifier, the resource-id
++// it is linked to and the callback of the specific resource
++struct en50221_session {
++ uint8_t state;
++ uint32_t resource_id;
++ uint8_t slot_id;
++ uint8_t connection_id;
++
++ en50221_sl_resource_callback callback;
++ void *callback_arg;
++
++ pthread_mutex_t session_lock;
++};
++
++struct en50221_session_layer {
++ uint32_t max_sessions;
++ struct en50221_transport_layer *tl;
++
++ en50221_sl_lookup_callback lookup;
++ void *lookup_arg;
++
++ en50221_sl_session_callback session;
++ void *session_arg;
++
++ pthread_mutex_t global_lock;
++ pthread_mutex_t setcallback_lock;
++
++ int error;
++
++ struct en50221_session *sessions;
++};
++
++static void en50221_sl_transport_callback(void *arg, int reason,
++ uint8_t * data,
++ uint32_t data_length,
++ uint8_t slot_id,
++ uint8_t connection_id);
++static int en50221_sl_alloc_new_session(struct en50221_session_layer *sl,
++ uint32_t resource_id,
++ uint8_t slot_id,
++ uint8_t connection_id,
++ en50221_sl_resource_callback
++ callback, void *arg);
++
++
++
++
++struct en50221_session_layer *en50221_sl_create(struct en50221_transport_layer *tl,
++ uint32_t max_sessions)
++{
++ struct en50221_session_layer *sl = NULL;
++ uint32_t i;
++
++ // setup structure
++ sl = (struct en50221_session_layer *)
++ malloc(sizeof(struct en50221_session_layer));
++ if (sl == NULL)
++ goto error_exit;
++ sl->max_sessions = max_sessions;
++ sl->lookup = NULL;
++ sl->session = NULL;
++ sl->tl = tl;
++ sl->error = 0;
++
++ // init the mutex
++ pthread_mutex_init(&sl->global_lock, NULL);
++ pthread_mutex_init(&sl->setcallback_lock, NULL);
++
++ // create the slots
++ sl->sessions = malloc(sizeof(struct en50221_session) * max_sessions);
++ if (sl->sessions == NULL)
++ goto error_exit;
++
++ // set them up
++ for (i = 0; i < max_sessions; i++) {
++ sl->sessions[i].state = S_STATE_IDLE;
++ sl->sessions[i].callback = NULL;
++
++ pthread_mutex_init(&sl->sessions[i].session_lock, NULL);
++ }
++
++ // register ourselves with the transport layer
++ en50221_tl_register_callback(tl, en50221_sl_transport_callback, sl);
++
++ return sl;
++
++error_exit:
++ en50221_sl_destroy(sl);
++ return NULL;
++}
++
++void en50221_sl_destroy(struct en50221_session_layer *sl)
++{
++ uint32_t i;
++
++ if (sl) {
++ if (sl->sessions) {
++ for (i = 0; i < sl->max_sessions; i++) {
++ pthread_mutex_destroy(&sl->sessions[i].session_lock);
++ }
++ free(sl->sessions);
++ }
++
++ pthread_mutex_destroy(&sl->setcallback_lock);
++ pthread_mutex_destroy(&sl->global_lock);
++
++ free(sl);
++ }
++}
++
++int en50221_sl_get_error(struct en50221_session_layer *sl)
++{
++ return sl->error;
++}
++
++void en50221_sl_register_lookup_callback(struct en50221_session_layer *sl,
++ en50221_sl_lookup_callback
++ callback, void *arg)
++{
++ pthread_mutex_lock(&sl->setcallback_lock);
++ sl->lookup = callback;
++ sl->lookup_arg = arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++}
++
++void en50221_sl_register_session_callback(struct en50221_session_layer *sl,
++ en50221_sl_session_callback
++ callback, void *arg)
++{
++ pthread_mutex_lock(&sl->setcallback_lock);
++ sl->session = callback;
++ sl->session_arg = arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++}
++
++int en50221_sl_create_session(struct en50221_session_layer *sl,
++ int slot_id, uint8_t connection_id,
++ uint32_t resource_id,
++ en50221_sl_resource_callback callback,
++ void *arg)
++{
++ // lookup next free session_id:
++ pthread_mutex_lock(&sl->global_lock);
++ int session_number =
++ en50221_sl_alloc_new_session(sl, resource_id, slot_id,
++ connection_id, callback, arg);
++ if (session_number == -1) {
++ pthread_mutex_unlock(&sl->global_lock);
++ return -1;
++ }
++ pthread_mutex_unlock(&sl->global_lock);
++
++ // make up the header
++ uint8_t hdr[8];
++ hdr[0] = ST_CREATE_SESSION;
++ hdr[1] = 6;
++ hdr[2] = resource_id >> 24;
++ hdr[3] = resource_id >> 16;
++ hdr[4] = resource_id >> 8;
++ hdr[5] = resource_id;
++ hdr[6] = session_number >> 8;
++ hdr[7] = session_number;
++
++ // send this command
++ if (en50221_tl_send_data(sl->tl, slot_id, connection_id, hdr, 8)) {
++ pthread_mutex_lock(&sl->sessions[session_number].session_lock);
++ if (sl->sessions[session_number].state == S_STATE_IN_CREATION) {
++ sl->sessions[session_number].state = S_STATE_IDLE;
++ }
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++
++ sl->error = en50221_tl_get_error(sl->tl);
++ return -1;
++ }
++ // ok.
++ return session_number;
++}
++
++int en50221_sl_destroy_session(struct en50221_session_layer *sl,
++ uint16_t session_number)
++{
++ if (session_number >= sl->max_sessions) {
++ sl->error = EN50221ERR_BADSESSIONNUMBER;
++ return -1;
++ }
++
++ pthread_mutex_lock(&sl->sessions[session_number].session_lock);
++ if (!(sl->sessions[session_number].state & (S_STATE_ACTIVE | S_STATE_IN_DELETION))) {
++ sl->error = EN50221ERR_BADSESSIONNUMBER;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return -1;
++ }
++ // set the state
++ sl->sessions[session_number].state = S_STATE_IN_DELETION;
++
++ // get essential details
++ uint8_t slot_id = sl->sessions[session_number].slot_id;
++ uint8_t connection_id = sl->sessions[session_number].connection_id;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++
++ // sendit
++ uint8_t hdr[4];
++ hdr[0] = ST_CLOSE_SESSION_REQ;
++ hdr[1] = 2;
++ hdr[2] = session_number >> 8;
++ hdr[3] = session_number;
++ if (en50221_tl_send_data(sl->tl, slot_id, connection_id, hdr, 4)) {
++ pthread_mutex_lock(&sl->sessions[session_number].session_lock);
++ if (sl->sessions[session_number].state == S_STATE_IN_DELETION) {
++ sl->sessions[session_number].state = S_STATE_IDLE;
++ }
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++
++ sl->error = en50221_tl_get_error(sl->tl);
++ return -1;
++ }
++
++ return 0;
++}
++
++int en50221_sl_send_data(struct en50221_session_layer *sl,
++ uint16_t session_number,
++ uint8_t *data,
++ uint16_t data_length)
++{
++ if (session_number >= sl->max_sessions) {
++ sl->error = EN50221ERR_BADSESSIONNUMBER;
++ return -1;
++ }
++
++ pthread_mutex_lock(&sl->sessions[session_number].session_lock);
++ if (sl->sessions[session_number].state != S_STATE_ACTIVE) {
++ sl->error = EN50221ERR_BADSESSIONNUMBER;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return -1;
++ }
++ // get essential details
++ uint8_t slot_id = sl->sessions[session_number].slot_id;
++ uint8_t connection_id = sl->sessions[session_number].connection_id;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++
++ // sendit
++ struct iovec iov[2];
++ uint8_t hdr[4];
++ hdr[0] = ST_SESSION_NUMBER;
++ hdr[1] = 2;
++ hdr[2] = session_number >> 8;
++ hdr[3] = session_number;
++ iov[0].iov_base = hdr;
++ iov[0].iov_len = 4;
++ iov[1].iov_base = data;
++ iov[1].iov_len = data_length;
++ if (en50221_tl_send_datav(sl->tl, slot_id, connection_id, iov, 2)) {
++ sl->error = en50221_tl_get_error(sl->tl);
++ return -1;
++ }
++
++ return 0;
++}
++
++int en50221_sl_send_datav(struct en50221_session_layer *sl,
++ uint16_t session_number,
++ struct iovec *vector,
++ int iov_count)
++{
++ if (session_number >= sl->max_sessions) {
++ sl->error = EN50221ERR_BADSESSIONNUMBER;
++ return -1;
++ }
++
++ pthread_mutex_lock(&sl->sessions[session_number].session_lock);
++ if (sl->sessions[session_number].state != S_STATE_ACTIVE) {
++ sl->error = EN50221ERR_BADSESSIONNUMBER;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return -1;
++ }
++ if (iov_count > 9) {
++ sl->error = EN50221ERR_IOVLIMIT;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return -1;
++ }
++ uint8_t slot_id = sl->sessions[session_number].slot_id;
++ uint8_t connection_id = sl->sessions[session_number].connection_id;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++
++ // make up the header
++ struct iovec out_iov[10];
++ uint8_t hdr[4];
++ hdr[0] = ST_SESSION_NUMBER;
++ hdr[1] = 2;
++ hdr[2] = session_number >> 8;
++ hdr[3] = session_number;
++ out_iov[0].iov_base = hdr;
++ out_iov[0].iov_len = 4;
++
++ // make up the data
++ memcpy(&out_iov[1], vector, iov_count * sizeof(struct iovec));
++
++ // send this command
++ if (en50221_tl_send_datav(sl->tl, slot_id, connection_id, out_iov, iov_count + 1)) {
++ sl->error = en50221_tl_get_error(sl->tl);
++ return -1;
++ }
++ return 0;
++}
++
++int en50221_sl_broadcast_data(struct en50221_session_layer *sl,
++ int slot_id, uint32_t resource_id,
++ uint8_t *data, uint16_t data_length)
++{
++ uint32_t i;
++
++ for (i = 0; i < sl->max_sessions; i++) {
++ pthread_mutex_lock(&sl->sessions[i].session_lock);
++
++ if (sl->sessions[i].state != S_STATE_ACTIVE) {
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++ continue;
++ }
++ if ((slot_id != -1)
++ && (slot_id != sl->sessions[i].slot_id)) {
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++ continue;
++ }
++
++ if (sl->sessions[i].resource_id == resource_id) {
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++ en50221_sl_send_data(sl, i, data, data_length);
++ } else {
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++ }
++ }
++
++ return 0;
++}
++
++
++
++static void en50221_sl_handle_open_session_request(struct en50221_session_layer *sl,
++ uint8_t *data,
++ uint32_t data_length,
++ uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // check
++ if (data_length < 5) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ return;
++ }
++ if (data[0] != 4) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ return;
++ }
++ // get the resource id
++ uint32_t requested_resource_id =
++ (data[1] << 24) | (data[2] << 16) | (data[3] << 8) | data[4];
++
++ // get lookup callback details
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_lookup_callback lcb = sl->lookup;
++ void *lcb_arg = sl->lookup_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++
++ // first of all, lookup this resource id
++ int status = S_STATUS_CLOSE_NO_RES;
++ en50221_sl_resource_callback resource_callback = NULL;
++ void *resource_arg = NULL;
++ uint32_t connected_resource_id;
++ if (lcb) {
++ status =
++ lcb(lcb_arg, slot_id, requested_resource_id,
++ &resource_callback, &resource_arg,
++ &connected_resource_id);
++ switch (status) {
++ case 0:
++ status = S_STATUS_OPEN;
++ break;
++
++ case -1:
++ status = S_STATUS_CLOSE_NO_RES;
++ break;
++
++ case -2:
++ status = S_STATUS_CLOSE_RES_LOW_VERSION;
++ break;
++
++ case -3:
++ status = S_STATUS_CLOSE_RES_UNAVAILABLE;
++ break;
++ }
++ }
++ // if we found it, get a new session for it
++ int session_number = -1;
++ if (status == S_STATUS_OPEN) {
++ // lookup next free session_id:
++ pthread_mutex_lock(&sl->global_lock);
++ session_number =
++ en50221_sl_alloc_new_session(sl, connected_resource_id,
++ slot_id, connection_id,
++ resource_callback,
++ resource_arg);
++ pthread_mutex_unlock(&sl->global_lock);
++
++ if (session_number == -1) {
++ status = S_STATUS_CLOSE_NO_RES;
++ } else {
++ // inform upper layers/ check availability
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_session_callback cb = sl->session;
++ void *cb_arg = sl->session_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++ if (cb) {
++ if (cb(cb_arg, S_SCALLBACK_REASON_CAMCONNECTING,
++ slot_id, session_number,
++ connected_resource_id)) {
++ status = S_STATUS_CLOSE_RES_BUSY;
++ }
++ } else {
++ status = S_STATUS_CLOSE_RES_UNAVAILABLE;
++ }
++ }
++ }
++ // send response
++ uint8_t hdr[9];
++ hdr[0] = ST_OPEN_SESSION_RES;
++ hdr[1] = 7;
++ hdr[2] = status;
++ hdr[3] = connected_resource_id >> 24;
++ hdr[4] = connected_resource_id >> 16;
++ hdr[5] = connected_resource_id >> 8;
++ hdr[6] = connected_resource_id;
++ hdr[7] = session_number >> 8;
++ hdr[8] = session_number;
++ if (en50221_tl_send_data(sl->tl, slot_id, connection_id, hdr, 9)) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Transport layer error %i occurred\n",
++ en50221_tl_get_error(sl->tl));
++ status = S_STATUS_CLOSE_NO_RES;
++ // fallthrough
++ }
++ // inform upper layers what happened
++ if (session_number != -1) {
++ // setup session state apppropriately from upper layer response
++ pthread_mutex_lock(&sl->sessions[session_number].session_lock);
++ if (status != S_STATUS_OPEN) {
++ sl->sessions[session_number].state = S_STATE_IDLE;
++ } else {
++ sl->sessions[session_number].state = S_STATE_ACTIVE;
++ }
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++
++ // tell upper layers
++ if (sl->sessions[session_number].state == S_STATE_ACTIVE) {
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_session_callback cb = sl->session;
++ void *cb_arg = sl->session_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++
++ if (status == S_STATUS_OPEN) {
++ if (cb)
++ cb(cb_arg,
++ S_SCALLBACK_REASON_CAMCONNECTED,
++ slot_id, session_number,
++ connected_resource_id);
++ } else {
++ sl->sessions[session_number].state =
++ S_STATE_IDLE;
++ if (cb)
++ cb(cb_arg,
++ S_SCALLBACK_REASON_CAMCONNECTFAIL,
++ slot_id, session_number,
++ connected_resource_id);
++ }
++ }
++ }
++}
++
++static void en50221_sl_handle_close_session_request(struct en50221_session_layer *sl,
++ uint8_t * data,
++ uint32_t data_length,
++ uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // check
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ return;
++ }
++ if (data[0] != 2) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ return;
++ }
++ // extract session number
++ uint16_t session_number = (data[1] << 8) | data[2];
++
++ // check session number is ok
++ uint8_t code = 0x00;
++ uint32_t resource_id = 0;
++ if (session_number >= sl->max_sessions) {
++ code = 0xF0; // session close error
++ print(LOG_LEVEL, ERROR, 1, "Received bad session id %i\n",
++ slot_id);
++ } else {
++ pthread_mutex_lock(&sl->sessions[session_number].
++ session_lock);
++ if (slot_id != sl->sessions[session_number].slot_id) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ code = 0xF0; // session close error
++ }
++ if (connection_id != sl->sessions[session_number].connection_id) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ code = 0xF0; // session close error
++ }
++ if (!(sl->sessions[session_number].state & (S_STATE_ACTIVE | S_STATE_IN_DELETION))) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ code = 0xF0; // session close error
++ }
++
++ if (code == 0x00) {
++ sl->sessions[session_number].state = S_STATE_IDLE;
++ code = 0x00; // close ok
++ }
++ resource_id = sl->sessions[session_number].resource_id;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ }
++
++ // make up the response
++ uint8_t hdr[5];
++ hdr[0] = ST_CLOSE_SESSION_RES;
++ hdr[1] = 3;
++ hdr[2] = code;
++ hdr[3] = session_number >> 8;
++ hdr[4] = session_number;
++
++ // sendit
++ if (en50221_tl_send_data(sl->tl, slot_id, connection_id, hdr, 5)) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Transport layer reports error %i on slot %i\n",
++ en50221_tl_get_error(sl->tl), slot_id);
++ }
++ // callback to announce destruction to resource if it was ok
++ if (code == 0x00) {
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_session_callback cb = sl->session;
++ void *cb_arg = sl->session_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++
++ if (cb)
++ cb(cb_arg, S_SCALLBACK_REASON_CLOSE, slot_id,
++ session_number, resource_id);
++ }
++}
++
++static void en50221_sl_handle_create_session_response(struct en50221_session_layer *sl,
++ uint8_t * data,
++ uint32_t data_length,
++ uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // check
++ if (data_length < 8) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ return;
++ }
++ if (data[0] != 7) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ return;
++ }
++ // extract session number
++ uint16_t session_number = (data[5] << 8) | data[6];
++
++ // check session number is ok
++ if (session_number >= sl->max_sessions) {
++ print(LOG_LEVEL, ERROR, 1, "Received bad session id %i\n",
++ slot_id);
++ return;
++ }
++
++ pthread_mutex_lock(&sl->sessions[session_number].session_lock);
++ if (slot_id != sl->sessions[session_number].slot_id) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return;
++ }
++ if (connection_id != sl->sessions[session_number].connection_id) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return;
++ }
++ if (sl->sessions[session_number].state != S_STATE_IN_CREATION) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return;
++ }
++ // extract status
++ if (data[1] != S_STATUS_OPEN) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Session creation failed 0x%02x\n", data[1]);
++ sl->sessions[session_number].state = S_STATE_IDLE;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++
++ // inform upper layers
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_session_callback cb = sl->session;
++ void *cb_arg = sl->session_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++ if (cb)
++ cb(cb_arg, S_SCALLBACK_REASON_CONNECTFAIL, slot_id,
++ session_number,
++ sl->sessions[session_number].resource_id);
++ return;
++ }
++ // set it active
++ sl->sessions[session_number].state = S_STATE_ACTIVE;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++
++ // inform upper layers
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_session_callback cb = sl->session;
++ void *cb_arg = sl->session_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++ if (cb)
++ cb(cb_arg, S_SCALLBACK_REASON_CONNECTED, slot_id,
++ session_number,
++ sl->sessions[session_number].resource_id);
++}
++
++static void en50221_sl_handle_close_session_response(struct en50221_session_layer *sl,
++ uint8_t *data,
++ uint32_t data_length,
++ uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // check
++ if (data_length < 5) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ return;
++ }
++ if (data[0] != 4) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ return;
++ }
++ // extract session number
++ uint16_t session_number = (data[2] << 8) | data[3];
++
++ // check session number is ok
++ if (session_number >= sl->max_sessions) {
++ print(LOG_LEVEL, ERROR, 1, "Received bad session id %i\n", slot_id);
++ return;
++ }
++
++ pthread_mutex_lock(&sl->sessions[session_number].session_lock);
++ if (slot_id != sl->sessions[session_number].slot_id) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return;
++ }
++ if (connection_id != sl->sessions[session_number].connection_id) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return;
++ }
++ if (sl->sessions[session_number].state != S_STATE_IN_DELETION) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return;
++ }
++ // extract status
++ if (data[1] != 0x00) {
++ print(LOG_LEVEL, ERROR, 1, "Session close failed 0x%02x\n", data[1]);
++ // just fallthrough anyway
++ }
++ // completed
++ sl->sessions[session_number].state = S_STATE_IDLE;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++}
++
++static void en50221_sl_handle_session_package(struct en50221_session_layer *sl,
++ uint8_t *data,
++ uint32_t data_length,
++ uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // check
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %i\n",
++ slot_id);
++ return;
++ }
++ if (data[0] != 2) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %i\n",
++ slot_id);
++ return;
++ }
++ // get session number
++ uint16_t session_number = (data[1] << 8) | data[2];
++
++ // check it
++ if (session_number >= sl->max_sessions) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with bad session_number from module on slot %i\n",
++ slot_id);
++ return;
++ }
++
++ pthread_mutex_lock(&sl->sessions[session_number].session_lock);
++ if (slot_id != sl->sessions[session_number].slot_id) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return;
++ }
++ if (connection_id != sl->sessions[session_number].connection_id) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unexpected session on invalid slot %i\n",
++ slot_id);
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return;
++ }
++ if (sl->sessions[session_number].state != S_STATE_ACTIVE) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with bad session_number from module on slot %i\n",
++ slot_id);
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++ return;
++ }
++
++ en50221_sl_resource_callback cb = sl->sessions[session_number].callback;
++ void *cb_arg = sl->sessions[session_number].callback_arg;
++ uint32_t resource_id = sl->sessions[session_number].resource_id;
++ pthread_mutex_unlock(&sl->sessions[session_number].session_lock);
++
++ // there can be > 1 APDU following the package - all for the same session/resource_id tho.
++ data += 3;
++ data_length -= 3;
++ while (data_length) {
++ // check length field
++ if (data_length < 3) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received invalid sized session package from slot %i\n",
++ slot_id);
++ return;
++ }
++ // parse the APDU's length field
++ int length_field_len;
++ uint16_t asn_data_length;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data + 3, data_length - 3)) < 0) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received invalid sized session package from slot %i\n",
++ slot_id);
++ return;
++ }
++ uint32_t apdu_length = 3 + length_field_len + asn_data_length;
++
++ // check there is enough data
++ if (apdu_length > data_length) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received invalid sized session package from slot %i\n",
++ slot_id);
++ return;
++ }
++ // pass the APDU up to the higher layers
++ if (cb)
++ cb(cb_arg, slot_id, session_number, resource_id, data, apdu_length);
++
++ // next!
++ data += apdu_length;
++ data_length -= apdu_length;
++ }
++
++}
++
++static void en50221_sl_transport_callback(void *arg, int reason,
++ uint8_t *data,
++ uint32_t data_length,
++ uint8_t slot_id,
++ uint8_t connection_id)
++{
++ struct en50221_session_layer *sl =
++ (struct en50221_session_layer *) arg;
++ uint32_t i;
++
++ // deal with the reason for this callback
++ switch (reason) {
++ case T_CALLBACK_REASON_DATA:
++ // fallthrough into rest of this function
++ break;
++
++ case T_CALLBACK_REASON_CONNECTIONOPEN:
++ {
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_session_callback cb = sl->session;
++ void *cb_arg = sl->session_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++
++ if (cb)
++ cb(cb_arg, S_SCALLBACK_REASON_TC_CONNECT,
++ slot_id, connection_id, 0);
++ return;
++ }
++
++ case T_CALLBACK_REASON_CAMCONNECTIONOPEN:
++ {
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_session_callback cb = sl->session;
++ void *cb_arg = sl->session_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++
++ if (cb)
++ cb(cb_arg,
++ S_SCALLBACK_REASON_TC_CAMCONNECT,
++ slot_id, connection_id, 0);
++ return;
++ }
++
++ case T_CALLBACK_REASON_CONNECTIONCLOSE:
++ {
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_session_callback cb = sl->session;
++ void *cb_arg = sl->session_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++
++ for (i = 0; i < sl->max_sessions; i++) {
++ pthread_mutex_lock(&sl->sessions[i].session_lock);
++
++ if (sl->sessions[i].state == S_STATE_IDLE) {
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++ continue;
++ }
++ if (sl->sessions[i].connection_id != connection_id) {
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++ continue;
++ }
++
++ sl->sessions[i].state = S_STATE_IDLE;
++
++ uint8_t _slot_id = sl->sessions[i].slot_id;
++ uint32_t resource_id = sl->sessions[i].resource_id;
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++
++ if (cb)
++ cb(cb_arg, S_SCALLBACK_REASON_CLOSE, _slot_id, i, resource_id);
++ }
++ return;
++ }
++
++ case T_CALLBACK_REASON_SLOTCLOSE:
++ {
++ pthread_mutex_lock(&sl->setcallback_lock);
++ en50221_sl_session_callback cb = sl->session;
++ void *cb_arg = sl->session_arg;
++ pthread_mutex_unlock(&sl->setcallback_lock);
++
++ for (i = 0; i < sl->max_sessions; i++) {
++ pthread_mutex_lock(&sl->sessions[i].session_lock);
++
++ if (sl->sessions[i].state == S_STATE_IDLE) {
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++ continue;
++ }
++ if (sl->sessions[i].slot_id != slot_id) {
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++ continue;
++ }
++ sl->sessions[i].state = S_STATE_IDLE;
++
++ uint32_t resource_id = sl->sessions[i].resource_id;
++ pthread_mutex_unlock(&sl->sessions[i].session_lock);
++
++ if (cb)
++ cb(cb_arg, S_SCALLBACK_REASON_CLOSE, slot_id, i, resource_id);
++
++ }
++ return;
++ }
++ }
++
++ // sanity check data length
++ if (data_length < 1) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %i\n",
++ slot_id);
++ return;
++ }
++ // deal with the data
++ uint8_t spdu_tag = data[0];
++ switch (spdu_tag) {
++ case ST_OPEN_SESSION_REQ:
++ en50221_sl_handle_open_session_request(sl, data + 1,
++ data_length - 1,
++ slot_id,
++ connection_id);
++ break;
++
++ case ST_CLOSE_SESSION_REQ:
++ en50221_sl_handle_close_session_request(sl, data + 1,
++ data_length - 1,
++ slot_id,
++ connection_id);
++ break;
++
++ case ST_SESSION_NUMBER:
++ en50221_sl_handle_session_package(sl, data + 1,
++ data_length - 1, slot_id,
++ connection_id);
++ break;
++
++ case ST_CREATE_SESSION_RES:
++ en50221_sl_handle_create_session_response(sl, data + 1,
++ data_length - 1,
++ slot_id,
++ connection_id);
++ break;
++
++ case ST_CLOSE_SESSION_RES:
++ en50221_sl_handle_close_session_response(sl, data + 1,
++ data_length - 1,
++ slot_id,
++ connection_id);
++ break;
++
++ default:
++ print(LOG_LEVEL, ERROR, 1,
++ "Received unknown session tag %02x from module on slot %i",
++ spdu_tag, slot_id);
++ break;
++ }
++}
++
++static int en50221_sl_alloc_new_session(struct en50221_session_layer *sl,
++ uint32_t resource_id,
++ uint8_t slot_id,
++ uint8_t connection_id,
++ en50221_sl_resource_callback
++ callback, void *arg)
++{
++ int session_number = -1;
++ uint32_t i;
++ for (i = 1; i < sl->max_sessions; i++) {
++ if (sl->sessions[i].state == S_STATE_IDLE) {
++ session_number = i;
++ break;
++ }
++ }
++ if (session_number == -1) {
++ sl->error = EN50221ERR_OUTOFSESSIONS;
++ return -1;
++ }
++ // setup the session
++ sl->sessions[session_number].state = S_STATE_IN_CREATION;
++ sl->sessions[session_number].resource_id = resource_id;
++ sl->sessions[session_number].slot_id = slot_id;
++ sl->sessions[session_number].connection_id = connection_id;
++ sl->sessions[session_number].callback = callback;
++ sl->sessions[session_number].callback_arg = arg;
++
++ // ok
++ return session_number;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_session.h dvb-apps/lib/libdvben50221/en50221_session.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_session.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_session.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,232 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 session layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian@jusst.de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++
++#ifndef __EN50221_SESSION_H__
++#define __EN50221_SESSION_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <libdvben50221/en50221_transport.h>
++
++#define S_SCALLBACK_REASON_CAMCONNECTING 0x00 // CAM originated session connecting to resource (check for availability)
++#define S_SCALLBACK_REASON_CAMCONNECTED 0x01 // CAM originated session connection established succesfully
++#define S_SCALLBACK_REASON_CAMCONNECTFAIL 0x02 // CAM originated session connection failed
++#define S_SCALLBACK_REASON_CONNECTED 0x03 // Host originated session ACKed by CAM.
++#define S_SCALLBACK_REASON_CONNECTFAIL 0x04 // Host originated session NACKed by CAM.
++#define S_SCALLBACK_REASON_CLOSE 0x05 // Session closed
++#define S_SCALLBACK_REASON_TC_CONNECT 0x06 // A host originated transport connection has been established.
++#define S_SCALLBACK_REASON_TC_CAMCONNECT 0x07 // A CAM originated transport connection has been established.
++
++
++/**
++ * Opaque type representing a session layer.
++ */
++struct en50221_session_layer;
++
++/**
++ * Type definition for resource callback function - called by session layer when data
++ * arrives for a particular resource.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number.
++ * @param resource_id Resource id.
++ * @param data The data.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, or -1 on failure.
++ */
++typedef int (*en50221_sl_resource_callback) (void *arg,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id,
++ uint8_t * data,
++ uint32_t data_length);
++
++/**
++ * Type definition for resource lookup callback function - used by the session layer to
++ * look up requested resources.
++ *
++ * @param arg Private argument.
++ * @param slot_id Slot id the request came from.
++ * @param requested_resource_id Resource id requested.
++ * @param callback_out Output parameter for pointer to resource callback function.
++ * @param arg_out Output parameter for arg to pass to resource callback.
++ * @param resource_id_out Set this to the resource_id connected to (e.g. may differ from resource_id due to versions).
++ * @return 0 on success,
++ * -1 if the resource was not found,
++ * -2 if it exists, but had a lower version, or
++ * -3 if it exists, but was unavailable.
++ */
++typedef int (*en50221_sl_lookup_callback) (void *arg,
++ uint8_t slot_id,
++ uint32_t requested_resource_id,
++ en50221_sl_resource_callback * callback_out,
++ void **arg_out,
++ uint32_t *resource_id_out);
++
++
++/**
++ * Type definition for session callback function - used to inform top level code when a CAM
++ * modifies a session to a resource.
++ *
++ * @param arg Private argument.
++ * @param reason One of the S_CCALLBACK_REASON_* values above.
++ * @param slot_id Slot id concerned.
++ * @param session_number Session number.
++ * @param resource_id Resource id.
++ * @return 0 on sucess, or -1 on error.
++ */
++typedef int (*en50221_sl_session_callback) (void *arg, int reason,
++ uint8_t slot_id,
++ uint16_t session_number,
++ uint32_t resource_id);
++
++/**
++ * Construct a new instance of the session layer.
++ *
++ * @param tl The en50221_transport_layer instance to use.
++ * @param max_sessions Maximum number of sessions supported.
++ * @return The en50221_session_layer instance, or NULL on error.
++ */
++extern struct en50221_session_layer *en50221_sl_create(struct en50221_transport_layer *tl,
++ uint32_t max_sessions);
++
++/**
++ * Destroy an instance of the session layer.
++ *
++ * @param tl The en50221_session_layer instance.
++ */
++extern void en50221_sl_destroy(struct en50221_session_layer *sl);
++
++/**
++ * Gets the last error.
++ *
++ * @param tl The en50221_session_layer instance.
++ * @return One of the EN50221ERR_* values.
++ */
++extern int en50221_sl_get_error(struct en50221_session_layer *tl);
++
++/**
++ * Register the callback for resource lookup.
++ *
++ * @param sl The en50221_session_layer instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_sl_register_lookup_callback(struct en50221_session_layer *sl,
++ en50221_sl_lookup_callback callback,
++ void *arg);
++
++/**
++ * Register the callback for informing about session from a cam.
++ *
++ * @param sl The en50221_session_layer instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_sl_register_session_callback(struct en50221_session_layer *sl,
++ en50221_sl_session_callback callback,
++ void *arg);
++
++/**
++ * Create a new session to a module in a slot.
++ *
++ * @param sl The en50221_session_layer instance.
++ * @param slot The slot to connect to.
++ * @param resource_id The resource_id to connect to.
++ * @param callback The callback for received data.
++ * @param arg Argument to pass to the callback.
++ * @return The new session_number, or -1 on error.
++ */
++extern int en50221_sl_create_session(struct en50221_session_layer *sl, int slot_id,
++ uint8_t connection_id,
++ uint32_t resource_id,
++ en50221_sl_resource_callback callback,
++ void *arg);
++
++/**
++ * Destroy a session.
++ *
++ * @param sl The en50221_session_layer instance.
++ * @param session_number The session to destroy.
++ * @return 0 on success, or -1 on error.
++ */
++extern int en50221_sl_destroy_session(struct en50221_session_layer *sl,
++ uint16_t session_number);
++
++/**
++ * this function is used to take a data-block, pack into
++ * into a SPDU (SESSION_NUMBER) and send it to the transport layer
++ *
++ * @param sl The en50221_session_layer instance to use.
++ * @param session_number Session number concerned.
++ * @param data Data to send.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, or -1 on error.
++ */
++extern int en50221_sl_send_data(struct en50221_session_layer *sl,
++ uint16_t session_number,
++ uint8_t * data,
++ uint16_t data_length);
++
++/**
++ * this function is used to take a data-block, pack into
++ * into a SPDU (SESSION_NUMBER) and send it to the transport layer
++ *
++ * @param sl The en50221_session_layer instance to use.
++ * @param session_number Session number concerned.
++ * @param vector IOVEC to send.
++ * @param iov_count Number of elements in io vector.
++ * @return 0 on success, or -1 on error.
++ */
++extern int en50221_sl_send_datav(struct en50221_session_layer *sl,
++ uint16_t session_number,
++ struct iovec *vector,
++ int iov_count);
++
++/**
++ * this is used to send a message to all sessions, linked
++ * to resource res
++ *
++ * @param tl The en50221_session_layer instance to use.
++ * @param slot_id Set to -1 to send to any slot. Other values will send to only that slot.
++ * @param resource_id Resource id concerned.
++ * @param data Data to send.
++ * @param data_length Length of data in bytes.
++ * @return 0 on success, or -1 on error.
++ */
++extern int en50221_sl_broadcast_data(struct en50221_session_layer *sl,
++ int slot_id,
++ uint32_t resource_id,
++ uint8_t * data,
++ uint16_t data_length);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam.c dvb-apps/lib/libdvben50221/en50221_stdcam.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_stdcam.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,54 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <limits.h>
++#include <string.h>
++#include <errno.h>
++#include <libdvbapi/dvbca.h>
++#include "en50221_stdcam.h"
++
++struct en50221_stdcam *en50221_stdcam_create(int adapter, int slotnum,
++ struct en50221_transport_layer *tl,
++ struct en50221_session_layer *sl)
++{
++ struct en50221_stdcam *result = NULL;
++
++ int cafd = dvbca_open(adapter, 0);
++ if (cafd == -1)
++ return NULL;
++
++ int ca_type = dvbca_get_interface_type(cafd, slotnum);
++ switch(ca_type) {
++ case DVBCA_INTERFACE_LINK:
++ result = en50221_stdcam_llci_create(cafd, slotnum, tl, sl);
++ break;
++
++ case DVBCA_INTERFACE_HLCI:
++ result = en50221_stdcam_hlci_create(cafd, slotnum);
++ break;
++ }
++
++ if (result == NULL)
++ close(cafd);
++ return result;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam.h dvb-apps/lib/libdvben50221/en50221_stdcam.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_stdcam.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,102 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef EN50221_STDCAM_H
++#define EN50221_STDCAM_H 1
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <libdvben50221/en50221_app_ai.h>
++#include <libdvben50221/en50221_app_ca.h>
++#include <libdvben50221/en50221_app_mmi.h>
++#include <libdvben50221/en50221_session.h>
++#include <libdvben50221/en50221_transport.h>
++
++enum en50221_stdcam_status {
++ EN50221_STDCAM_CAM_NONE,
++ EN50221_STDCAM_CAM_INRESET,
++ EN50221_STDCAM_CAM_OK,
++ EN50221_STDCAM_CAM_BAD,
++};
++
++struct en50221_stdcam {
++ /* one of more of the following may be NULL if a CAM does not support it */
++ struct en50221_app_ai *ai_resource;
++ struct en50221_app_ca *ca_resource;
++ struct en50221_app_mmi *mmi_resource;
++
++ /* if any of these are -1, no connection is in place to this resource yet */
++ int ai_session_number;
++ int ca_session_number;
++ int mmi_session_number;
++
++ /* poll the stdcam instance */
++ enum en50221_stdcam_status (*poll)(struct en50221_stdcam *stdcam);
++
++ /* inform the stdcam of the current DVB time */
++ void (*dvbtime)(struct en50221_stdcam *stdcam, time_t dvbtime);
++
++ /* destroy the stdcam instance */
++ void (*destroy)(struct en50221_stdcam *stdcam, int closefd);
++};
++
++/**
++ * Create an instance of the STDCAM for an LLCI interface.
++ *
++ * @param cafd FD of the CA device.
++ * @param slotnum Slotnum on that CA device.
++ * @param tl Transport layer instance to use.
++ * @param sl Session layer instance to use.
++ * @return en50221_stdcam instance, or NULL on error.
++ */
++extern struct en50221_stdcam *en50221_stdcam_llci_create(int cafd, int slotnum,
++ struct en50221_transport_layer *tl,
++ struct en50221_session_layer *sl);
++
++/**
++ * Create an instance of the STDCAM for an HLCI interface.
++ *
++ * @param cafd FD of the CA device.
++ * @param slotnum Slotnum on that CA device.
++ * @return en50221_stdcam instance, or NULL on error.
++ */
++extern struct en50221_stdcam *en50221_stdcam_hlci_create(int cafd, int slotnum);
++
++/**
++ * Convenience method to create a STDCAM interface for a ca device on a particular adapter.
++ *
++ * @param adapter The DVB adapter concerned.
++ * @param slotnum The ca slot number on that adapter.
++ * @param tl Transport layer instance to use (unused for HLCI cams).
++ * @param sl Session layer instance to use (unused for HLCI cams).
++ * @return en50221_stdcam instance, or NULL on error.
++ */
++extern struct en50221_stdcam *en50221_stdcam_create(int adapter, int slotnum,
++ struct en50221_transport_layer *tl,
++ struct en50221_session_layer *sl);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam_hlci.c dvb-apps/lib/libdvben50221/en50221_stdcam_hlci.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam_hlci.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_stdcam_hlci.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,216 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <limits.h>
++#include <string.h>
++#include <errno.h>
++#include <libdvbapi/dvbca.h>
++#include "en50221_app_utils.h"
++#include "en50221_app_tags.h"
++#include "en50221_stdcam.h"
++
++
++struct en50221_stdcam_hlci {
++ struct en50221_stdcam stdcam;
++
++ int cafd;
++ int slotnum;
++ int initialised;
++ struct en50221_app_send_functions sendfuncs;
++};
++
++static void en50221_stdcam_hlci_destroy(struct en50221_stdcam *stdcam, int closefd);
++static enum en50221_stdcam_status en50221_stdcam_hlci_poll(struct en50221_stdcam *stdcam);
++static int hlci_cam_added(struct en50221_stdcam_hlci *hlci);
++static int hlci_send_data(void *arg, uint16_t session_number,
++ uint8_t * data, uint16_t data_length);
++static int hlci_send_datav(void *arg, uint16_t session_number,
++ struct iovec *vector, int iov_count);
++
++
++
++
++struct en50221_stdcam *en50221_stdcam_hlci_create(int cafd, int slotnum)
++{
++ // try and allocate space for the HLCI stdcam
++ struct en50221_stdcam_hlci *hlci =
++ malloc(sizeof(struct en50221_stdcam_hlci));
++ if (hlci == NULL) {
++ return NULL;
++ }
++ memset(hlci, 0, sizeof(struct en50221_stdcam_hlci));
++
++ // create the sendfuncs
++ hlci->sendfuncs.arg = hlci;
++ hlci->sendfuncs.send_data = hlci_send_data;
++ hlci->sendfuncs.send_datav = hlci_send_datav;
++
++ // create the resources (NOTE: we just use fake session numbers here)
++ hlci->stdcam.ai_resource = en50221_app_ai_create(&hlci->sendfuncs);
++ hlci->stdcam.ai_session_number = 0;
++ hlci->stdcam.ca_resource = en50221_app_ca_create(&hlci->sendfuncs);
++ hlci->stdcam.ca_session_number = 1;
++// hlci->stdcam.mmi_resource = en50221_app_mmi_create(&hlci->sendfuncs);
++ hlci->stdcam.mmi_session_number = -1;
++
++ // done
++ hlci->stdcam.destroy = en50221_stdcam_hlci_destroy;
++ hlci->stdcam.poll = en50221_stdcam_hlci_poll;
++ hlci->slotnum = slotnum;
++ hlci->cafd = cafd;
++ return &hlci->stdcam;
++}
++
++static void en50221_stdcam_hlci_destroy(struct en50221_stdcam *stdcam, int closefd)
++{
++ struct en50221_stdcam_hlci *hlci = (struct en50221_stdcam_hlci *) stdcam;
++
++ if (hlci->stdcam.ai_resource)
++ en50221_app_ai_destroy(hlci->stdcam.ai_resource);
++ if (hlci->stdcam.ca_resource)
++ en50221_app_ca_destroy(hlci->stdcam.ca_resource);
++ if (hlci->stdcam.mmi_resource)
++ en50221_app_mmi_destroy(hlci->stdcam.mmi_resource);
++
++ if (closefd)
++ close(hlci->cafd);
++
++ free(hlci);
++}
++
++static enum en50221_stdcam_status en50221_stdcam_hlci_poll(struct en50221_stdcam *stdcam)
++{
++ struct en50221_stdcam_hlci *hlci = (struct en50221_stdcam_hlci *) stdcam;
++
++ switch(dvbca_get_cam_state(hlci->cafd, hlci->slotnum)) {
++ case DVBCA_CAMSTATE_MISSING:
++ hlci->initialised = 0;
++ break;
++
++ case DVBCA_CAMSTATE_READY:
++ case DVBCA_CAMSTATE_INITIALISING:
++ if (!hlci->initialised)
++ hlci_cam_added(hlci);
++ break;
++ }
++
++ // delay to prevent busy loop
++ usleep(10);
++
++ if (!hlci->initialised) {
++ return EN50221_STDCAM_CAM_NONE;
++ }
++ return EN50221_STDCAM_CAM_OK;
++}
++
++
++
++static int hlci_cam_added(struct en50221_stdcam_hlci *hlci)
++{
++ uint8_t buf[256];
++ int size;
++
++ // get application information
++ if (en50221_app_ai_enquiry(hlci->stdcam.ai_resource, 0)) {
++ return -EIO;
++ }
++ if ((size = dvbca_hlci_read(hlci->cafd, TAG_APP_INFO, buf, sizeof(buf))) < 0) {
++ return size;
++ }
++ if (en50221_app_ai_message(hlci->stdcam.ai_resource, 0, 0, EN50221_APP_AI_RESOURCEID, buf, size)) {
++ return -EIO;
++ }
++
++ // we forge a fake CA_INFO here so the main app works - since it will expect a CA_INFO
++ // this will be replaced with a proper call (below) when the driver support is there
++ buf[0] = TAG_CA_INFO >> 16;
++ buf[1] = (uint8_t) (TAG_CA_INFO >> 8);
++ buf[2] = (uint8_t) TAG_CA_INFO;
++ buf[3] = 0;
++ if (en50221_app_ca_message(hlci->stdcam.ca_resource, 0, 0, EN50221_APP_CA_RESOURCEID, buf, 4)) {
++ return -EIO;
++ }
++
++ /*
++ // get CA information
++ if (en50221_app_ca_info_enq(ca_resource, 0)) {
++ fprintf(stderr, "Failed to send CA INFO enquiry\n");
++ cafd = -1;
++ return -1;
++ }
++ if ((size = dvbca_hlci_read(cafd, TAG_CA_INFO, buf, sizeof(buf))) < 0) {
++ fprintf(stderr, "Failed to read CA INFO\n");
++ cafd = -1;
++ return -1;
++ }
++ if (en50221_app_ca_message(ca_resource, 0, 0, EN50221_APP_CA_RESOURCEID, buf, size)) {
++ fprintf(stderr, "Failed to parse CA INFO\n");
++ cafd = -1;
++ return -1;
++ }
++ */
++
++ // done
++ hlci->initialised = 1;
++ return 0;
++}
++
++static int hlci_send_data(void *arg, uint16_t session_number,
++ uint8_t * data, uint16_t data_length)
++{
++ (void) session_number;
++ struct en50221_stdcam_hlci *hlci = arg;
++
++ return dvbca_hlci_write(hlci->cafd, data, data_length);
++}
++
++static int hlci_send_datav(void *arg, uint16_t session_number,
++ struct iovec *vector, int iov_count)
++{
++ (void) session_number;
++ struct en50221_stdcam_hlci *hlci = arg;
++
++ // calculate the total length of the data to send
++ uint32_t data_size = 0;
++ int i;
++ for (i = 0; i < iov_count; i++) {
++ data_size += vector[i].iov_len;
++ }
++
++ // allocate memory for it
++ uint8_t *buf = malloc(data_size);
++ if (buf == NULL) {
++ return -1;
++ }
++ // merge the iovecs
++ uint32_t pos = 0;
++ for (i = 0; i < iov_count; i++) {
++ memcpy(buf + pos, vector[i].iov_base, vector[i].iov_len);
++ pos += vector[i].iov_len;
++ }
++
++ // sendit and cleanup
++ int status = dvbca_hlci_write(hlci->cafd, buf, data_size);
++ free(buf);
++ return status;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam_llci.c dvb-apps/lib/libdvben50221/en50221_stdcam_llci.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_stdcam_llci.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_stdcam_llci.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,437 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <limits.h>
++#include <string.h>
++#include <errno.h>
++#include <libdvbapi/dvbca.h>
++#include <libdvbmisc/dvbmisc.h>
++#include "en50221_app_rm.h"
++#include "en50221_app_datetime.h"
++#include "en50221_app_utils.h"
++#include "en50221_app_tags.h"
++#include "en50221_stdcam.h"
++
++#define LLCI_RESPONSE_TIMEOUT_MS 1000
++#define LLCI_POLL_DELAY_MS 100
++
++/* resource IDs we support */
++static uint32_t resource_ids[] =
++{ EN50221_APP_RM_RESOURCEID,
++ EN50221_APP_CA_RESOURCEID,
++ EN50221_APP_AI_RESOURCEID,
++ EN50221_APP_MMI_RESOURCEID,
++ EN50221_APP_DATETIME_RESOURCEID,
++};
++#define RESOURCE_IDS_COUNT sizeof(resource_ids)/4
++
++struct llci_resource {
++ struct en50221_app_public_resource_id resid;
++ uint32_t binary_resource_id;
++ en50221_sl_resource_callback callback;
++ void *arg;
++};
++
++struct en50221_stdcam_llci {
++ struct en50221_stdcam stdcam;
++
++ int cafd;
++ int slotnum;
++ int state;
++
++ struct llci_resource resources[RESOURCE_IDS_COUNT];
++
++ struct en50221_transport_layer *tl;
++ struct en50221_session_layer *sl;
++ struct en50221_app_send_functions sendfuncs;
++ int tl_slot_id;
++
++ struct en50221_app_rm *rm_resource;
++
++ struct en50221_app_datetime *datetime_resource;
++ int datetime_session_number;
++ uint8_t datetime_response_interval;
++ time_t datetime_next_send;
++ time_t datetime_dvbtime;
++};
++
++static enum en50221_stdcam_status en50221_stdcam_llci_poll(struct en50221_stdcam *stdcam);
++static void en50221_stdcam_llci_dvbtime(struct en50221_stdcam *stdcam, time_t dvbtime);
++static void en50221_stdcam_llci_destroy(struct en50221_stdcam *stdcam, int closefd);
++static void llci_cam_added(struct en50221_stdcam_llci *llci);
++static void llci_cam_in_reset(struct en50221_stdcam_llci *llci);
++static void llci_cam_removed(struct en50221_stdcam_llci *llci);
++
++
++static int llci_lookup_callback(void *arg, uint8_t _slot_id, uint32_t requested_resource_id,
++ en50221_sl_resource_callback *callback_out, void **arg_out,
++ uint32_t *connected_resource_id);
++static int llci_session_callback(void *arg, int reason, uint8_t _slot_id, uint16_t session_number, uint32_t resource_id);
++static int llci_rm_enq_callback(void *arg, uint8_t _slot_id, uint16_t session_number);
++static int llci_rm_reply_callback(void *arg, uint8_t _slot_id, uint16_t session_number, uint32_t resource_id_count, uint32_t *_resource_ids);
++static int llci_rm_changed_callback(void *arg, uint8_t _slot_id, uint16_t session_number);
++
++static int llci_datetime_enquiry_callback(void *arg, uint8_t _slot_id, uint16_t session_number, uint8_t response_interval);
++
++
++struct en50221_stdcam *en50221_stdcam_llci_create(int cafd, int slotnum,
++ struct en50221_transport_layer *tl,
++ struct en50221_session_layer *sl)
++{
++ // try and allocate space for the LLCI stdcam
++ struct en50221_stdcam_llci *llci =
++ malloc(sizeof(struct en50221_stdcam_llci));
++ if (llci == NULL) {
++ return NULL;
++ }
++ memset(llci, 0, sizeof(struct en50221_stdcam_llci));
++
++ // create the sendfuncs
++ llci->sendfuncs.arg = sl;
++ llci->sendfuncs.send_data = (en50221_send_data) en50221_sl_send_data;
++ llci->sendfuncs.send_datav = (en50221_send_datav) en50221_sl_send_datav;
++
++ // create the resource manager resource
++ int resource_idx = 0;
++ llci->rm_resource = en50221_app_rm_create(&llci->sendfuncs);
++ en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_RM_RESOURCEID);
++ llci->resources[resource_idx].binary_resource_id = EN50221_APP_RM_RESOURCEID;
++ llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_rm_message;
++ llci->resources[resource_idx].arg = llci->rm_resource;
++ en50221_app_rm_register_enq_callback(llci->rm_resource, llci_rm_enq_callback, llci);
++ en50221_app_rm_register_reply_callback(llci->rm_resource, llci_rm_reply_callback, llci);
++ en50221_app_rm_register_changed_callback(llci->rm_resource, llci_rm_changed_callback, llci);
++ resource_idx++;
++
++ // create the datetime resource
++ llci->datetime_resource = en50221_app_datetime_create(&llci->sendfuncs);
++ en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_DATETIME_RESOURCEID);
++ llci->resources[resource_idx].binary_resource_id = EN50221_APP_DATETIME_RESOURCEID;
++ llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_datetime_message;
++ llci->resources[resource_idx].arg = llci->datetime_resource;
++ en50221_app_datetime_register_enquiry_callback(llci->datetime_resource, llci_datetime_enquiry_callback, llci);
++ resource_idx++;
++ llci->datetime_session_number = -1;
++ llci->datetime_response_interval = 0;
++ llci->datetime_next_send = 0;
++ llci->datetime_dvbtime = 0;
++
++ // create the application information resource
++ llci->stdcam.ai_resource = en50221_app_ai_create(&llci->sendfuncs);
++ en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_AI_RESOURCEID);
++ llci->resources[resource_idx].binary_resource_id = EN50221_APP_AI_RESOURCEID;
++ llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_ai_message;
++ llci->resources[resource_idx].arg = llci->stdcam.ai_resource;
++ llci->stdcam.ai_session_number = -1;
++ resource_idx++;
++
++ // create the CA resource
++ llci->stdcam.ca_resource = en50221_app_ca_create(&llci->sendfuncs);
++ en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_CA_RESOURCEID);
++ llci->resources[resource_idx].binary_resource_id = EN50221_APP_CA_RESOURCEID;
++ llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_ca_message;
++ llci->resources[resource_idx].arg = llci->stdcam.ca_resource;
++ llci->stdcam.ca_session_number = -1;
++ resource_idx++;
++
++ // create the MMI resource
++ llci->stdcam.mmi_resource = en50221_app_mmi_create(&llci->sendfuncs);
++ en50221_app_decode_public_resource_id(&llci->resources[resource_idx].resid, EN50221_APP_MMI_RESOURCEID);
++ llci->resources[resource_idx].binary_resource_id = EN50221_APP_MMI_RESOURCEID;
++ llci->resources[resource_idx].callback = (en50221_sl_resource_callback) en50221_app_mmi_message;
++ llci->resources[resource_idx].arg = llci->stdcam.mmi_resource;
++ llci->stdcam.mmi_session_number = -1;
++ resource_idx++;
++
++ // register session layer callbacks
++ en50221_sl_register_lookup_callback(sl, llci_lookup_callback, llci);
++ en50221_sl_register_session_callback(sl, llci_session_callback, llci);
++
++ // done
++ llci->stdcam.destroy = en50221_stdcam_llci_destroy;
++ llci->stdcam.poll = en50221_stdcam_llci_poll;
++ llci->stdcam.dvbtime = en50221_stdcam_llci_dvbtime;
++ llci->cafd = cafd;
++ llci->slotnum = slotnum;
++ llci->tl = tl;
++ llci->sl = sl;
++ llci->tl_slot_id = -1;
++ llci->state = EN50221_STDCAM_CAM_NONE;
++ return &llci->stdcam;
++}
++
++static void en50221_stdcam_llci_dvbtime(struct en50221_stdcam *stdcam, time_t dvbtime)
++{
++ struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) stdcam;
++
++ llci->datetime_dvbtime = dvbtime;
++}
++
++static void en50221_stdcam_llci_destroy(struct en50221_stdcam *stdcam, int closefd)
++{
++ struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) stdcam;
++
++ // "remove" the cam
++ llci_cam_removed(llci);
++
++ // destroy resources
++ if (llci->rm_resource)
++ en50221_app_rm_destroy(llci->rm_resource);
++ if (llci->datetime_resource)
++ en50221_app_datetime_destroy(llci->datetime_resource);
++ if (llci->stdcam.ai_resource)
++ en50221_app_ai_destroy(llci->stdcam.ai_resource);
++ if (llci->stdcam.ca_resource)
++ en50221_app_ca_destroy(llci->stdcam.ca_resource);
++ if (llci->stdcam.mmi_resource)
++ en50221_app_mmi_destroy(llci->stdcam.mmi_resource);
++
++ if (closefd)
++ close(llci->cafd);
++
++ free(llci);
++}
++
++
++
++
++static enum en50221_stdcam_status en50221_stdcam_llci_poll(struct en50221_stdcam *stdcam)
++{
++ struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) stdcam;
++
++ switch(dvbca_get_cam_state(llci->cafd, llci->slotnum)) {
++ case DVBCA_CAMSTATE_MISSING:
++ if (llci->state != EN50221_STDCAM_CAM_NONE)
++ llci_cam_removed(llci);
++ break;
++
++ case DVBCA_CAMSTATE_READY:
++ if (llci->state == EN50221_STDCAM_CAM_NONE)
++ llci_cam_added(llci);
++ else if (llci->state == EN50221_STDCAM_CAM_INRESET)
++ llci_cam_in_reset(llci);
++ break;
++ }
++
++ // poll the stack
++ int error;
++ if ((error = en50221_tl_poll(llci->tl)) != 0) {
++ print(LOG_LEVEL, ERROR, 1, "Error reported by stack:%i\n", en50221_tl_get_error(llci->tl));
++ }
++
++ // send date/time response
++ if (llci->datetime_session_number != -1) {
++ time_t cur_time = time(NULL);
++ if (llci->datetime_response_interval && (cur_time > llci->datetime_next_send)) {
++ en50221_app_datetime_send(llci->datetime_resource,
++ llci->datetime_session_number,
++ llci->datetime_dvbtime, 0);
++ llci->datetime_next_send = cur_time + llci->datetime_response_interval;
++ }
++ }
++
++ return llci->state;
++}
++
++static void llci_cam_added(struct en50221_stdcam_llci *llci)
++{
++ // clear down any old structures
++ if (llci->tl_slot_id != -1) {
++ llci_cam_removed(llci);
++ }
++
++ // reset the CAM
++ dvbca_reset(llci->cafd, llci->slotnum);
++ llci->state = EN50221_STDCAM_CAM_INRESET;
++}
++
++static void llci_cam_in_reset(struct en50221_stdcam_llci *llci)
++{
++ if (dvbca_get_cam_state(llci->cafd, llci->slotnum) != DVBCA_CAMSTATE_READY) {
++ return;
++ }
++
++ // register the slot
++ if ((llci->tl_slot_id = en50221_tl_register_slot(llci->tl, llci->cafd, llci->slotnum,
++ LLCI_RESPONSE_TIMEOUT_MS, LLCI_POLL_DELAY_MS)) < 0) {
++ llci->state = EN50221_STDCAM_CAM_BAD;
++ return;
++ }
++
++ // create a new connection on the slot
++ if (en50221_tl_new_tc(llci->tl, llci->tl_slot_id) < 0) {
++ llci->state = EN50221_STDCAM_CAM_BAD;
++ llci->tl_slot_id = -1;
++ en50221_tl_destroy_slot(llci->tl, llci->tl_slot_id);
++ return;
++ }
++
++ llci->state = EN50221_STDCAM_CAM_OK;
++}
++
++static void llci_cam_removed(struct en50221_stdcam_llci *llci)
++{
++ if (llci->tl_slot_id != -1) {
++ en50221_tl_destroy_slot(llci->tl, llci->tl_slot_id);
++ llci->tl_slot_id = -1;
++ llci->datetime_session_number = -1;
++ llci->stdcam.ai_session_number = -1;
++ llci->stdcam.ca_session_number = -1;
++ llci->stdcam.mmi_session_number = -1;
++ }
++ llci->state = EN50221_STDCAM_CAM_NONE;
++}
++
++
++
++static int llci_lookup_callback(void *arg, uint8_t _slot_id, uint32_t requested_resource_id,
++ en50221_sl_resource_callback *callback_out, void **arg_out,
++ uint32_t *connected_resource_id)
++{
++ struct en50221_app_public_resource_id resid;
++ struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
++ (void) _slot_id;
++
++ // decode the resource id
++ if (!en50221_app_decode_public_resource_id(&resid, requested_resource_id)) {
++ return -1;
++ }
++
++ // try and find an instance of the resource
++ uint32_t i;
++ for(i=0; i<RESOURCE_IDS_COUNT; i++) {
++ if ((resid.resource_class == llci->resources[i].resid.resource_class) &&
++ (resid.resource_type == llci->resources[i].resid.resource_type)) {
++
++ // limit sessions to certain resources
++ switch(requested_resource_id) {
++ case EN50221_APP_DATETIME_RESOURCEID:
++ if (llci->datetime_session_number != -1)
++ return -3;
++ break;
++ case EN50221_APP_AI_RESOURCEID:
++ if (llci->stdcam.ai_session_number != -1)
++ return -3;
++ break;
++ case EN50221_APP_CA_RESOURCEID:
++ if (llci->stdcam.ca_session_number != -1)
++ return -3;
++ break;
++ case EN50221_APP_MMI_RESOURCEID:
++ if (llci->stdcam.mmi_session_number != -1)
++ return -3;
++ break;
++ }
++
++ // resource is ok.
++ *callback_out = llci->resources[i].callback;
++ *arg_out = llci->resources[i].arg;
++ *connected_resource_id = llci->resources[i].binary_resource_id;
++ return 0;
++ }
++ }
++
++ return -1;
++}
++
++static int llci_session_callback(void *arg, int reason, uint8_t _slot_id, uint16_t session_number, uint32_t resource_id)
++{
++ struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
++ (void) _slot_id;
++
++ switch(reason) {
++ case S_SCALLBACK_REASON_CAMCONNECTED:
++ if (resource_id == EN50221_APP_RM_RESOURCEID) {
++ en50221_app_rm_enq(llci->rm_resource, session_number);
++ } else if (resource_id == EN50221_APP_DATETIME_RESOURCEID) {
++ llci->datetime_session_number = session_number;
++ } else if (resource_id == EN50221_APP_AI_RESOURCEID) {
++ en50221_app_ai_enquiry(llci->stdcam.ai_resource, session_number);
++ llci->stdcam.ai_session_number = session_number;
++ } else if (resource_id == EN50221_APP_CA_RESOURCEID) {
++ en50221_app_ca_info_enq(llci->stdcam.ca_resource, session_number);
++ llci->stdcam.ca_session_number = session_number;
++ } else if (resource_id == EN50221_APP_MMI_RESOURCEID) {
++ llci->stdcam.mmi_session_number = session_number;
++ }
++
++ break;
++ case S_SCALLBACK_REASON_CLOSE:
++ if (resource_id == EN50221_APP_MMI_RESOURCEID) {
++ llci->stdcam.mmi_session_number = -1;
++ }
++
++ break;
++ }
++ return 0;
++}
++
++static int llci_rm_enq_callback(void *arg, uint8_t _slot_id, uint16_t session_number)
++{
++ struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
++ (void) _slot_id;
++
++ if (en50221_app_rm_reply(llci->rm_resource, session_number, RESOURCE_IDS_COUNT, resource_ids)) {
++ print(LOG_LEVEL, ERROR, 1, "Failed to send RM ENQ on slot %02x\n", _slot_id);
++ }
++ return 0;
++}
++
++static int llci_rm_reply_callback(void *arg, uint8_t _slot_id, uint16_t session_number, uint32_t resource_id_count, uint32_t *_resource_ids)
++{
++ struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
++ (void) _slot_id;
++ (void) resource_id_count;
++ (void) _resource_ids;
++
++ if (en50221_app_rm_changed(llci->rm_resource, session_number)) {
++ print(LOG_LEVEL, ERROR, 1, "Failed to send RM REPLY on slot %02x\n", _slot_id);
++ }
++ return 0;
++}
++
++static int llci_rm_changed_callback(void *arg, uint8_t _slot_id, uint16_t session_number)
++{
++ struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
++ (void) _slot_id;
++
++ if (en50221_app_rm_enq(llci->rm_resource, session_number)) {
++ print(LOG_LEVEL, ERROR, 1, "Failed to send RM CHANGED on slot %02x\n", _slot_id);
++ }
++ return 0;
++}
++
++static int llci_datetime_enquiry_callback(void *arg, uint8_t _slot_id, uint16_t session_number, uint8_t response_interval)
++{
++ struct en50221_stdcam_llci *llci = (struct en50221_stdcam_llci *) arg;
++ (void) _slot_id;
++
++ llci->datetime_response_interval = response_interval;
++ llci->datetime_next_send = 0;
++ if (response_interval) {
++ llci->datetime_next_send = time(NULL) + response_interval;
++ }
++ en50221_app_datetime_send(llci->datetime_resource, session_number, llci->datetime_dvbtime, 0);
++
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_transport.c dvb-apps/lib/libdvben50221/en50221_transport.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_transport.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_transport.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,1296 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <string.h>
++#include <pthread.h>
++#include <fcntl.h>
++#include <sys/ioctl.h>
++#include <sys/poll.h>
++#include <time.h>
++#include <libdvbmisc/dvbmisc.h>
++#include <libdvbapi/dvbca.h>
++#include "en50221_errno.h"
++#include "en50221_transport.h"
++#include "asn_1.h"
++
++// these are the Transport Tags, like
++// described in EN50221, Annex A.4.1.13 (pg70)
++#define T_SB 0x80 // sb primitive h<--m
++#define T_RCV 0x81 // receive primitive h-->m
++#define T_CREATE_T_C 0x82 // create transport connection primitive h-->m
++#define T_C_T_C_REPLY 0x83 // ctc reply primitive h<--m
++#define T_DELETE_T_C 0x84 // delete tc primitive h<->m
++#define T_D_T_C_REPLY 0x85 // dtc reply primitive h<->m
++#define T_REQUEST_T_C 0x86 // request transport connection primitive h<--m
++#define T_NEW_T_C 0x87 // new tc / reply to t_request primitive h-->m
++#define T_T_C_ERROR 0x77 // error creating tc primitive h-->m
++#define T_DATA_LAST 0xA0 // convey data from higher constructed h<->m
++ // layers
++#define T_DATA_MORE 0xA1 // convey data from higher constructed h<->m
++ // layers
++
++struct en50221_message {
++ struct en50221_message *next;
++ uint32_t length;
++ uint8_t data[0];
++};
++
++struct en50221_connection {
++ uint32_t state; // the current state: idle/in_delete/in_create/active
++ struct timeval tx_time; // time last request was sent from host->module, or 0 if ok
++ struct timeval last_poll_time; // time of last poll transmission
++ uint8_t *chain_buffer; // used to save parts of chained packets
++ uint32_t buffer_length;
++
++ struct en50221_message *send_queue;
++ struct en50221_message *send_queue_tail;
++};
++
++struct en50221_slot {
++ int ca_hndl;
++ uint8_t slot; // CAM slot
++ struct en50221_connection *connections;
++
++ pthread_mutex_t slot_lock;
++
++ uint32_t response_timeout;
++ uint32_t poll_delay;
++};
++
++struct en50221_transport_layer {
++ uint8_t max_slots;
++ uint8_t max_connections_per_slot;
++ struct en50221_slot *slots;
++ struct pollfd *slot_pollfds;
++ int slots_changed;
++
++ pthread_mutex_t global_lock;
++ pthread_mutex_t setcallback_lock;
++
++ int error;
++ int error_slot;
++
++ en50221_tl_callback callback;
++ void *callback_arg;
++};
++
++static int en50221_tl_process_data(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t * data,
++ uint32_t data_length);
++static int en50221_tl_poll_tc(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id);
++static int en50221_tl_alloc_new_tc(struct en50221_transport_layer *tl,
++ uint8_t slot_id);
++static void queue_message(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id,
++ struct en50221_message *msg);
++static int en50221_tl_handle_create_tc_reply(struct en50221_transport_layer
++ *tl, uint8_t slot_id,
++ uint8_t connection_id);
++static int en50221_tl_handle_delete_tc(struct en50221_transport_layer *tl,
++ uint8_t slot_id,
++ uint8_t connection_id);
++static int en50221_tl_handle_delete_tc_reply(struct en50221_transport_layer
++ *tl, uint8_t slot_id,
++ uint8_t connection_id);
++static int en50221_tl_handle_request_tc(struct en50221_transport_layer *tl,
++ uint8_t slot_id,
++ uint8_t connection_id);
++static int en50221_tl_handle_data_more(struct en50221_transport_layer *tl,
++ uint8_t slot_id,
++ uint8_t connection_id,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_tl_handle_data_last(struct en50221_transport_layer *tl,
++ uint8_t slot_id,
++ uint8_t connection_id,
++ uint8_t * data,
++ uint32_t data_length);
++static int en50221_tl_handle_sb(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id,
++ uint8_t * data, uint32_t data_length);
++
++
++struct en50221_transport_layer *en50221_tl_create(uint8_t max_slots,
++ uint8_t
++ max_connections_per_slot)
++{
++ struct en50221_transport_layer *tl = NULL;
++ int i;
++ int j;
++
++ // setup structure
++ tl = (struct en50221_transport_layer *)
++ malloc(sizeof(struct en50221_transport_layer));
++ if (tl == NULL)
++ goto error_exit;
++ tl->max_slots = max_slots;
++ tl->max_connections_per_slot = max_connections_per_slot;
++ tl->slots = NULL;
++ tl->slot_pollfds = NULL;
++ tl->slots_changed = 1;
++ tl->callback = NULL;
++ tl->callback_arg = NULL;
++ tl->error_slot = 0;
++ tl->error = 0;
++ pthread_mutex_init(&tl->global_lock, NULL);
++ pthread_mutex_init(&tl->setcallback_lock, NULL);
++
++ // create the slots
++ tl->slots = malloc(sizeof(struct en50221_slot) * max_slots);
++ if (tl->slots == NULL)
++ goto error_exit;
++
++ // set them up
++ for (i = 0; i < max_slots; i++) {
++ tl->slots[i].ca_hndl = -1;
++
++ // create the connections for this slot
++ tl->slots[i].connections =
++ malloc(sizeof(struct en50221_connection) * max_connections_per_slot);
++ if (tl->slots[i].connections == NULL)
++ goto error_exit;
++
++ // create a mutex for the slot
++ pthread_mutex_init(&tl->slots[i].slot_lock, NULL);
++
++ // set them up
++ for (j = 0; j < max_connections_per_slot; j++) {
++ tl->slots[i].connections[j].state = T_STATE_IDLE;
++ tl->slots[i].connections[j].tx_time.tv_sec = 0;
++ tl->slots[i].connections[j].last_poll_time.tv_sec = 0;
++ tl->slots[i].connections[j].last_poll_time.tv_usec = 0;
++ tl->slots[i].connections[j].chain_buffer = NULL;
++ tl->slots[i].connections[j].buffer_length = 0;
++ tl->slots[i].connections[j].send_queue = NULL;
++ tl->slots[i].connections[j].send_queue_tail = NULL;
++ }
++ }
++
++ // create the pollfds
++ tl->slot_pollfds = malloc(sizeof(struct pollfd) * max_slots);
++ if (tl->slot_pollfds == NULL) {
++ goto error_exit;
++ }
++ memset(tl->slot_pollfds, 0, sizeof(struct pollfd) * max_slots);
++
++ return tl;
++
++ error_exit:
++ en50221_tl_destroy(tl);
++ return NULL;
++}
++
++// Destroy an instance of the transport layer
++void en50221_tl_destroy(struct en50221_transport_layer *tl)
++{
++ int i, j;
++
++ if (tl) {
++ if (tl->slots) {
++ for (i = 0; i < tl->max_slots; i++) {
++ if (tl->slots[i].connections) {
++ for (j = 0; j < tl->max_connections_per_slot; j++) {
++ if (tl->slots[i].connections[j].chain_buffer) {
++ free(tl->slots[i].connections[j].chain_buffer);
++ }
++
++ struct en50221_message *cur_msg =
++ tl->slots[i].connections[j].send_queue;
++ while (cur_msg) {
++ struct en50221_message *next_msg = cur_msg->next;
++ free(cur_msg);
++ cur_msg = next_msg;
++ }
++ tl->slots[i].connections[j].send_queue = NULL;
++ tl->slots[i].connections[j].send_queue_tail = NULL;
++ }
++ free(tl->slots[i].connections);
++ pthread_mutex_destroy(&tl->slots[i].slot_lock);
++ }
++ }
++ free(tl->slots);
++ }
++ if (tl->slot_pollfds) {
++ free(tl->slot_pollfds);
++ }
++ pthread_mutex_destroy(&tl->setcallback_lock);
++ pthread_mutex_destroy(&tl->global_lock);
++ free(tl);
++ }
++}
++
++// this can be called from the user-space app to
++// register new slots that we should work with
++int en50221_tl_register_slot(struct en50221_transport_layer *tl,
++ int ca_hndl, uint8_t slot,
++ uint32_t response_timeout,
++ uint32_t poll_delay)
++{
++ // lock
++ pthread_mutex_lock(&tl->global_lock);
++
++ // we browse through the array of slots
++ // to look for the first unused one
++ int i;
++ int16_t slot_id = -1;
++ for (i = 0; i < tl->max_slots; i++) {
++ if (tl->slots[i].ca_hndl == -1) {
++ slot_id = i;
++ break;
++ }
++ }
++ if (slot_id == -1) {
++ tl->error = EN50221ERR_OUTOFSLOTS;
++ pthread_mutex_unlock(&tl->global_lock);
++ return -1;
++ }
++ // set up the slot struct
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ tl->slots[slot_id].ca_hndl = ca_hndl;
++ tl->slots[slot_id].slot = slot;
++ tl->slots[slot_id].response_timeout = response_timeout;
++ tl->slots[slot_id].poll_delay = poll_delay;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++
++ tl->slots_changed = 1;
++ pthread_mutex_unlock(&tl->global_lock);
++ return slot_id;
++}
++
++void en50221_tl_destroy_slot(struct en50221_transport_layer *tl,
++ uint8_t slot_id)
++{
++ int i;
++
++ if (slot_id >= tl->max_slots)
++ return;
++
++ // lock
++ pthread_mutex_lock(&tl->global_lock);
++
++ // clear the slot
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ tl->slots[slot_id].ca_hndl = -1;
++ for (i = 0; i < tl->max_connections_per_slot; i++) {
++ tl->slots[slot_id].connections[i].state = T_STATE_IDLE;
++ tl->slots[slot_id].connections[i].tx_time.tv_sec = 0;
++ tl->slots[slot_id].connections[i].last_poll_time.tv_sec = 0;
++ tl->slots[slot_id].connections[i].last_poll_time.tv_usec = 0;
++ if (tl->slots[slot_id].connections[i].chain_buffer) {
++ free(tl->slots[slot_id].connections[i].
++ chain_buffer);
++ }
++ tl->slots[slot_id].connections[i].chain_buffer = NULL;
++ tl->slots[slot_id].connections[i].buffer_length = 0;
++
++ struct en50221_message *cur_msg =
++ tl->slots[slot_id].connections[i].send_queue;
++ while (cur_msg) {
++ struct en50221_message *next_msg = cur_msg->next;
++ free(cur_msg);
++ cur_msg = next_msg;
++ }
++ tl->slots[slot_id].connections[i].send_queue = NULL;
++ tl->slots[slot_id].connections[i].send_queue_tail = NULL;
++ }
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++
++ // tell upper layers
++ pthread_mutex_lock(&tl->setcallback_lock);
++ en50221_tl_callback cb = tl->callback;
++ void *cb_arg = tl->callback_arg;
++ pthread_mutex_unlock(&tl->setcallback_lock);
++ if (cb)
++ cb(cb_arg, T_CALLBACK_REASON_SLOTCLOSE, NULL, 0, slot_id, 0);
++
++ tl->slots_changed = 1;
++ pthread_mutex_unlock(&tl->global_lock);
++}
++
++int en50221_tl_poll(struct en50221_transport_layer *tl)
++{
++ uint8_t data[4096];
++ int slot_id;
++ int j;
++
++ // make up pollfds if the slots have changed
++ pthread_mutex_lock(&tl->global_lock);
++ if (tl->slots_changed) {
++ for (slot_id = 0; slot_id < tl->max_slots; slot_id++) {
++ if (tl->slots[slot_id].ca_hndl != -1) {
++ tl->slot_pollfds[slot_id].fd = tl->slots[slot_id].ca_hndl;
++ tl->slot_pollfds[slot_id].events = POLLIN | POLLPRI | POLLERR;
++ tl->slot_pollfds[slot_id].revents = 0;
++ } else {
++ tl->slot_pollfds[slot_id].fd = 0;
++ tl->slot_pollfds[slot_id].events = 0;
++ tl->slot_pollfds[slot_id].revents = 0;
++ }
++ }
++ tl->slots_changed = 0;
++ }
++ pthread_mutex_unlock(&tl->global_lock);
++
++ // anything happened?
++ if (poll(tl->slot_pollfds, tl->max_slots, 10) < 0) {
++ tl->error_slot = -1;
++ tl->error = EN50221ERR_CAREAD;
++ return -1;
++ }
++ // go through all slots (even though poll may not have reported any events
++ for (slot_id = 0; slot_id < tl->max_slots; slot_id++) {
++
++ // check if this slot is still used and get its handle
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ if (tl->slots[slot_id].ca_hndl == -1) {
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ continue;
++ }
++ int ca_hndl = tl->slots[slot_id].ca_hndl;
++
++ if (tl->slot_pollfds[slot_id].revents & (POLLPRI | POLLIN)) {
++ // read data
++ uint8_t r_slot_id;
++ uint8_t connection_id;
++ int readcnt = dvbca_link_read(ca_hndl, &r_slot_id,
++ &connection_id,
++ data, sizeof(data));
++ if (readcnt < 0) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_CAREAD;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // process it if we got some
++ if (readcnt > 0) {
++ if (tl->slots[slot_id].slot != r_slot_id) {
++ // this message is for an other CAM of the same CA
++ int new_slot_id;
++ for (new_slot_id = 0; new_slot_id < tl->max_slots; new_slot_id++) {
++ if ((tl->slots[new_slot_id].ca_hndl == ca_hndl) &&
++ (tl->slots[new_slot_id].slot == r_slot_id))
++ break;
++ }
++ if (new_slot_id != tl->max_slots) {
++ // we found the requested CAM
++ pthread_mutex_lock(&tl->slots[new_slot_id].slot_lock);
++ if (en50221_tl_process_data(tl, new_slot_id, data, readcnt)) {
++ pthread_mutex_unlock(&tl->slots[new_slot_id].slot_lock);
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ pthread_mutex_unlock(&tl->slots[new_slot_id].slot_lock);
++ } else {
++ tl->error = EN50221ERR_BADSLOTID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ } else
++ if (en50221_tl_process_data(tl, slot_id, data, readcnt)) {
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ }
++ } else if (tl->slot_pollfds[slot_id].revents & POLLERR) {
++ // an error was reported
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_CAREAD;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // poll the connections on this slot + check for timeouts
++ for (j = 0; j < tl->max_connections_per_slot; j++) {
++ // ignore connection if idle
++ if (tl->slots[slot_id].connections[j].state == T_STATE_IDLE) {
++ continue;
++ }
++ // send queued data
++ if (tl->slots[slot_id].connections[j].state &
++ (T_STATE_IN_CREATION | T_STATE_ACTIVE | T_STATE_ACTIVE_DELETEQUEUED)) {
++ // send data if there is some to go and we're not waiting for a response already
++ if (tl->slots[slot_id].connections[j].send_queue &&
++ (tl->slots[slot_id].connections[j].tx_time.tv_sec == 0)) {
++
++ // get the message
++ struct en50221_message *msg =
++ tl->slots[slot_id].connections[j].send_queue;
++ if (msg->next != NULL) {
++ tl->slots[slot_id].connections[j].send_queue = msg->next;
++ } else {
++ tl->slots[slot_id].connections[j].send_queue = NULL;
++ tl->slots[slot_id].connections[j].send_queue_tail = NULL;
++ }
++
++ // send the message
++ if (dvbca_link_write(tl->slots[slot_id].ca_hndl,
++ tl->slots[slot_id].slot,
++ j,
++ msg->data, msg->length) < 0) {
++ free(msg);
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_CAWRITE;
++ print(LOG_LEVEL, ERROR, 1, "CAWrite failed");
++ return -1;
++ }
++ gettimeofday(&tl->slots[slot_id].connections[j].tx_time, 0);
++
++ // fixup connection state for T_DELETE_T_C
++ if (msg->length && (msg->data[0] == T_DELETE_T_C)) {
++ tl->slots[slot_id].connections[j].state = T_STATE_IN_DELETION;
++ if (tl->slots[slot_id].connections[j].chain_buffer) {
++ free(tl->slots[slot_id].connections[j].chain_buffer);
++ }
++ tl->slots[slot_id].connections[j].chain_buffer = NULL;
++ tl->slots[slot_id].connections[j].buffer_length = 0;
++ }
++
++ free(msg);
++ }
++ }
++ // poll it if we're not expecting a reponse and the poll time has elapsed
++ if (tl->slots[slot_id].connections[j].state & T_STATE_ACTIVE) {
++ if ((tl->slots[slot_id].connections[j].tx_time.tv_sec == 0) &&
++ (time_after(tl->slots[slot_id].connections[j].last_poll_time,
++ tl->slots[slot_id].poll_delay))) {
++
++ gettimeofday(&tl->slots[slot_id].connections[j].last_poll_time, 0);
++ if (en50221_tl_poll_tc(tl, slot_id, j)) {
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ }
++ }
++
++ // check for timeouts - in any state
++ if (tl->slots[slot_id].connections[j].tx_time.tv_sec &&
++ (time_after(tl->slots[slot_id].connections[j].tx_time,
++ tl->slots[slot_id].response_timeout))) {
++
++ if (tl->slots[slot_id].connections[j].state &
++ (T_STATE_IN_CREATION |T_STATE_IN_DELETION)) {
++ tl->slots[slot_id].connections[j].state = T_STATE_IDLE;
++ } else if (tl->slots[slot_id].connections[j].state &
++ (T_STATE_ACTIVE | T_STATE_ACTIVE_DELETEQUEUED)) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_TIMEOUT;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ }
++ }
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ }
++
++ return 0;
++}
++
++void en50221_tl_register_callback(struct en50221_transport_layer *tl,
++ en50221_tl_callback callback, void *arg)
++{
++ pthread_mutex_lock(&tl->setcallback_lock);
++ tl->callback = callback;
++ tl->callback_arg = arg;
++ pthread_mutex_unlock(&tl->setcallback_lock);
++}
++
++int en50221_tl_get_error_slot(struct en50221_transport_layer *tl)
++{
++ return tl->error_slot;
++}
++
++int en50221_tl_get_error(struct en50221_transport_layer *tl)
++{
++ return tl->error;
++}
++
++int en50221_tl_send_data(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id,
++ uint8_t * data, uint32_t data_size)
++{
++#ifdef DEBUG_TXDATA
++ printf("[[[[[[[[[[[[[[[[[[[[\n");
++ uint32_t ii = 0;
++ for (ii = 0; ii < data_size; ii++) {
++ printf("%02x: %02x\n", ii, data[ii]);
++ }
++ printf("]]]]]]]]]]]]]]]]]]]]\n");
++#endif
++
++ if (slot_id >= tl->max_slots) {
++ tl->error = EN50221ERR_BADSLOTID;
++ return -1;
++ }
++
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ if (tl->slots[slot_id].ca_hndl == -1) {
++ tl->error = EN50221ERR_BADSLOTID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ if (connection_id >= tl->max_connections_per_slot) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCONNECTIONID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
++ tl->error = EN50221ERR_BADCONNECTIONID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // allocate msg structure
++ struct en50221_message *msg =
++ malloc(sizeof(struct en50221_message) + data_size + 10);
++ if (msg == NULL) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_OUTOFMEMORY;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // make up data to send
++ int length_field_len;
++ msg->data[0] = T_DATA_LAST;
++ if ((length_field_len = asn_1_encode(data_size + 1, msg->data + 1, 3)) < 0) {
++ free(msg);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_ASNENCODE;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ msg->data[1 + length_field_len] = connection_id;
++ memcpy(msg->data + 1 + length_field_len + 1, data, data_size);
++ msg->length = 1 + length_field_len + 1 + data_size;
++
++ // queue it for transmission
++ queue_message(tl, slot_id, connection_id, msg);
++
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return 0;
++}
++
++int en50221_tl_send_datav(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id,
++ struct iovec *vector, int iov_count)
++{
++#ifdef DEBUG_TXDATA
++ printf("[[[[[[[[[[[[[[[[[[[[\n");
++ uint32_t ii = 0;
++ uint32_t iipos = 0;
++ for (ii = 0; ii < (uint32_t) iov_count; ii++) {
++ uint32_t jj;
++ for (jj = 0; jj < vector[ii].iov_len; jj++) {
++ printf("%02x: %02x\n", jj + iipos,
++ *((uint8_t *) (vector[ii].iov_base) + jj));
++ }
++ iipos += vector[ii].iov_len;
++ }
++ printf("]]]]]]]]]]]]]]]]]]]]\n");
++#endif
++
++ if (slot_id >= tl->max_slots) {
++ tl->error = EN50221ERR_BADSLOTID;
++ return -1;
++ }
++
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ if (tl->slots[slot_id].ca_hndl == -1) {
++ tl->error = EN50221ERR_BADSLOTID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ if (connection_id >= tl->max_connections_per_slot) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCONNECTIONID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
++ tl->error = EN50221ERR_BADCONNECTIONID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // calculate the total length of the data to send
++ uint32_t data_size = 0;
++ int i;
++ for (i = 0; i < iov_count; i++) {
++ data_size += vector[i].iov_len;
++ }
++
++ // allocate msg structure
++ struct en50221_message *msg =
++ malloc(sizeof(struct en50221_message) + data_size + 10);
++ if (msg == NULL) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_OUTOFMEMORY;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // make up data to send
++ int length_field_len;
++ msg->data[0] = T_DATA_LAST;
++ if ((length_field_len = asn_1_encode(data_size + 1, msg->data + 1, 3)) < 0) {
++ free(msg);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_ASNENCODE;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ msg->data[1 + length_field_len] = connection_id;
++ msg->length = 1 + length_field_len + 1 + data_size;
++ msg->next = NULL;
++
++ // merge the iovecs
++ uint32_t pos = 1 + length_field_len + 1;
++ for (i = 0; i < iov_count; i++) {
++ memcpy(msg->data + pos, vector[i].iov_base,
++ vector[i].iov_len);
++ pos += vector[i].iov_len;
++ }
++
++ // queue it for transmission
++ queue_message(tl, slot_id, connection_id, msg);
++
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return 0;
++}
++
++int en50221_tl_new_tc(struct en50221_transport_layer *tl, uint8_t slot_id)
++{
++ // check
++ if (slot_id >= tl->max_slots) {
++ tl->error = EN50221ERR_BADSLOTID;
++ return -1;
++ }
++
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ if (tl->slots[slot_id].ca_hndl == -1) {
++ tl->error = EN50221ERR_BADSLOTID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // allocate a new connection if possible
++ int conid = en50221_tl_alloc_new_tc(tl, slot_id);
++ if (conid == -1) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_OUTOFCONNECTIONS;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // allocate msg structure
++ struct en50221_message *msg =
++ malloc(sizeof(struct en50221_message) + 3);
++ if (msg == NULL) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_OUTOFMEMORY;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // make up the data to send
++ msg->data[0] = T_CREATE_T_C;
++ msg->data[1] = 1;
++ msg->data[2] = conid;
++ msg->length = 3;
++ msg->next = NULL;
++
++ // queue it for transmission
++ queue_message(tl, slot_id, conid, msg);
++
++ // done
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return conid;
++}
++
++int en50221_tl_del_tc(struct en50221_transport_layer *tl, uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // check
++ if (slot_id >= tl->max_slots) {
++ tl->error = EN50221ERR_BADSLOTID;
++ return -1;
++ }
++
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ if (tl->slots[slot_id].ca_hndl == -1) {
++ tl->error = EN50221ERR_BADSLOTID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ if (connection_id >= tl->max_connections_per_slot) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCONNECTIONID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ if (!(tl->slots[slot_id].connections[connection_id].state &
++ (T_STATE_ACTIVE | T_STATE_IN_DELETION))) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADSTATE;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // allocate msg structure
++ struct en50221_message *msg =
++ malloc(sizeof(struct en50221_message) + 3);
++ if (msg == NULL) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_OUTOFMEMORY;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ // make up the data to send
++ msg->data[0] = T_DELETE_T_C;
++ msg->data[1] = 1;
++ msg->data[2] = connection_id;
++ msg->length = 3;
++ msg->next = NULL;
++
++ // queue it for transmission
++ queue_message(tl, slot_id, connection_id, msg);
++ tl->slots[slot_id].connections[connection_id].state =
++ T_STATE_ACTIVE_DELETEQUEUED;
++
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return 0;
++}
++
++int en50221_tl_get_connection_state(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id)
++{
++ if (slot_id >= tl->max_slots) {
++ tl->error = EN50221ERR_BADSLOTID;
++ return -1;
++ }
++
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ if (tl->slots[slot_id].ca_hndl == -1) {
++ tl->error = EN50221ERR_BADSLOTID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ if (connection_id >= tl->max_connections_per_slot) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCONNECTIONID;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++ return -1;
++ }
++ int state = tl->slots[slot_id].connections[connection_id].state;
++ pthread_mutex_unlock(&tl->slots[slot_id].slot_lock);
++
++ return state;
++}
++
++
++
++
++// ask the module for new data
++static int en50221_tl_poll_tc(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id)
++{
++ gettimeofday(&tl->slots[slot_id].connections[connection_id].
++ tx_time, 0);
++
++ // send command
++ uint8_t hdr[3];
++ hdr[0] = T_DATA_LAST;
++ hdr[1] = 1;
++ hdr[2] = connection_id;
++ if (dvbca_link_write(tl->slots[slot_id].ca_hndl,
++ tl->slots[slot_id].slot,
++ connection_id, hdr, 3) < 0) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_CAWRITE;
++ return -1;
++ }
++ return 0;
++}
++
++// handle incoming data
++static int en50221_tl_process_data(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t * data,
++ uint32_t data_length)
++{
++ int result;
++
++#ifdef DEBUG_RXDATA
++ printf("-------------------\n");
++ uint32_t ii = 0;
++ for (ii = 0; ii < data_length; ii++) {
++ printf("%02x: %02x\n", ii, data[ii]);
++ }
++ printf("+++++++++++++++++++\n");
++#endif
++
++ // process the received data
++ while (data_length) {
++ // parse the header
++ uint8_t tpdu_tag = data[0];
++ uint16_t asn_data_length;
++ int length_field_len;
++ if ((length_field_len = asn_1_decode(&asn_data_length, data + 1, data_length - 1)) < 0) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid asn from module on slot %02x\n",
++ slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++ if ((asn_data_length < 1) ||
++ (asn_data_length > (data_length - (1 + length_field_len)))) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received data with invalid length from module on slot %02x\n",
++ slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++ uint8_t connection_id = data[1 + length_field_len];
++ data += 1 + length_field_len + 1;
++ data_length -= (1 + length_field_len + 1);
++ asn_data_length--;
++
++ // check the connection_id
++ if (connection_id >= tl->max_connections_per_slot) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received bad connection id %02x from module on slot %02x\n",
++ connection_id, slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCONNECTIONID;
++ return -1;
++ }
++ // process the TPDUs
++ switch (tpdu_tag) {
++ case T_C_T_C_REPLY:
++ if ((result = en50221_tl_handle_create_tc_reply(tl, slot_id, connection_id)) < 0) {
++ return -1;
++ }
++ break;
++ case T_DELETE_T_C:
++ if ((result = en50221_tl_handle_delete_tc(tl, slot_id, connection_id)) < 0) {
++ return -1;
++ }
++ break;
++ case T_D_T_C_REPLY:
++ if ((result = en50221_tl_handle_delete_tc_reply(tl, slot_id, connection_id)) < 0) {
++ return -1;
++ }
++ break;
++ case T_REQUEST_T_C:
++ if ((result = en50221_tl_handle_request_tc(tl, slot_id, connection_id)) < 0) {
++ return -1;
++ }
++ break;
++ case T_DATA_MORE:
++ if ((result = en50221_tl_handle_data_more(tl, slot_id,
++ connection_id,
++ data,
++ asn_data_length)) < 0) {
++ return -1;
++ }
++ break;
++ case T_DATA_LAST:
++ if ((result = en50221_tl_handle_data_last(tl, slot_id,
++ connection_id,
++ data,
++ asn_data_length)) < 0) {
++ return -1;
++ }
++ break;
++ case T_SB:
++ if ((result = en50221_tl_handle_sb(tl, slot_id,
++ connection_id,
++ data,
++ asn_data_length)) < 0) {
++ return -1;
++ }
++ break;
++ default:
++ print(LOG_LEVEL, ERROR, 1,
++ "Recieved unexpected TPDU tag %02x from module on slot %02x\n",
++ tpdu_tag, slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++
++ // skip over the consumed data
++ data += asn_data_length;
++ data_length -= asn_data_length;
++ }
++
++ return 0;
++}
++
++static int en50221_tl_handle_create_tc_reply(struct en50221_transport_layer
++ *tl, uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // set this connection to state active
++ if (tl->slots[slot_id].connections[connection_id].state == T_STATE_IN_CREATION) {
++ tl->slots[slot_id].connections[connection_id].state = T_STATE_ACTIVE;
++ tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
++
++ // tell upper layers
++ pthread_mutex_lock(&tl->setcallback_lock);
++ en50221_tl_callback cb = tl->callback;
++ void *cb_arg = tl->callback_arg;
++ pthread_mutex_unlock(&tl->setcallback_lock);
++ if (cb)
++ cb(cb_arg, T_CALLBACK_REASON_CONNECTIONOPEN, NULL, 0, slot_id, connection_id);
++ } else {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received T_C_T_C_REPLY for connection not in "
++ "T_STATE_IN_CREATION from module on slot %02x\n",
++ slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++
++ return 0;
++}
++
++static int en50221_tl_handle_delete_tc(struct en50221_transport_layer *tl,
++ uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // immediately delete this connection and send D_T_C_REPLY
++ if (tl->slots[slot_id].connections[connection_id].state &
++ (T_STATE_ACTIVE | T_STATE_IN_DELETION)) {
++ // clear down the slot
++ tl->slots[slot_id].connections[connection_id].state = T_STATE_IDLE;
++ if (tl->slots[slot_id].connections[connection_id].chain_buffer) {
++ free(tl->slots[slot_id].connections[connection_id].chain_buffer);
++ }
++ tl->slots[slot_id].connections[connection_id].chain_buffer = NULL;
++ tl->slots[slot_id].connections[connection_id].buffer_length = 0;
++
++ // send the reply
++ uint8_t hdr[3];
++ hdr[0] = T_D_T_C_REPLY;
++ hdr[1] = 1;
++ hdr[2] = connection_id;
++ if (dvbca_link_write(tl->slots[slot_id].ca_hndl,
++ tl->slots[slot_id].slot,
++ connection_id, hdr, 3) < 0) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_CAWRITE;
++ return -1;
++ }
++ // tell upper layers
++ pthread_mutex_lock(&tl->setcallback_lock);
++ en50221_tl_callback cb = tl->callback;
++ void *cb_arg = tl->callback_arg;
++ pthread_mutex_unlock(&tl->setcallback_lock);
++ if (cb)
++ cb(cb_arg, T_CALLBACK_REASON_CONNECTIONCLOSE, NULL, 0, slot_id, connection_id);
++ } else {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received T_DELETE_T_C for inactive connection from module on slot %02x\n",
++ slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++
++ return 0;
++}
++
++static int en50221_tl_handle_delete_tc_reply(struct en50221_transport_layer
++ *tl, uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // delete this connection, should be in T_STATE_IN_DELETION already
++ if (tl->slots[slot_id].connections[connection_id].state == T_STATE_IN_DELETION) {
++ tl->slots[slot_id].connections[connection_id].state = T_STATE_IDLE;
++ } else {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received T_D_T_C_REPLY received for connection not in "
++ "T_STATE_IN_DELETION from module on slot %02x\n",
++ slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++
++ return 0;
++}
++
++static int en50221_tl_handle_request_tc(struct en50221_transport_layer *tl,
++ uint8_t slot_id,
++ uint8_t connection_id)
++{
++ // allocate a new connection if possible
++ int conid = en50221_tl_alloc_new_tc(tl, slot_id);
++ int ca_hndl = tl->slots[slot_id].ca_hndl;
++ if (conid == -1) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Too many connections requested by module on slot %02x\n",
++ slot_id);
++
++ // send the error
++ uint8_t hdr[4];
++ hdr[0] = T_T_C_ERROR;
++ hdr[1] = 2;
++ hdr[2] = connection_id;
++ hdr[3] = 1;
++ if (dvbca_link_write(ca_hndl, tl->slots[slot_id].slot, connection_id, hdr, 4) < 0) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_CAWRITE;
++ return -1;
++ }
++ tl->slots[slot_id].connections[connection_id].tx_time.
++ tv_sec = 0;
++ } else {
++ // send the NEW_T_C on the connection we received it on
++ uint8_t hdr[4];
++ hdr[0] = T_NEW_T_C;
++ hdr[1] = 2;
++ hdr[2] = connection_id;
++ hdr[3] = conid;
++ if (dvbca_link_write(ca_hndl, tl->slots[slot_id].slot, connection_id, hdr, 4) < 0) {
++ tl->slots[slot_id].connections[conid].state = T_STATE_IDLE;
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_CAWRITE;
++ return -1;
++ }
++ tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
++
++ // send the CREATE_T_C on the new connnection
++ hdr[0] = T_CREATE_T_C;
++ hdr[1] = 1;
++ hdr[2] = conid;
++ if (dvbca_link_write(ca_hndl, tl->slots[slot_id].slot, conid, hdr, 3) < 0) {
++ tl->slots[slot_id].connections[conid].state = T_STATE_IDLE;
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_CAWRITE;
++ return -1;
++ }
++ gettimeofday(&tl->slots[slot_id].connections[conid].tx_time, 0);
++
++ // tell upper layers
++ pthread_mutex_lock(&tl->setcallback_lock);
++ en50221_tl_callback cb = tl->callback;
++ void *cb_arg = tl->callback_arg;
++ pthread_mutex_unlock(&tl->setcallback_lock);
++ if (cb)
++ cb(cb_arg, T_CALLBACK_REASON_CAMCONNECTIONOPEN, NULL, 0, slot_id, conid);
++ }
++
++ return 0;
++}
++
++static int en50221_tl_handle_data_more(struct en50221_transport_layer *tl,
++ uint8_t slot_id,
++ uint8_t connection_id,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // connection in correct state?
++ if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received T_DATA_MORE for connection not in "
++ "T_STATE_ACTIVE from module on slot %02x\n",
++ slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++ // a chained data packet is coming in, save
++ // it to the buffer and wait for more
++ tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
++ int new_data_length =
++ tl->slots[slot_id].connections[connection_id].buffer_length + data_length;
++ uint8_t *new_data_buffer =
++ realloc(tl->slots[slot_id].connections[connection_id].chain_buffer, new_data_length);
++ if (new_data_buffer == NULL) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_OUTOFMEMORY;
++ return -1;
++ }
++ tl->slots[slot_id].connections[connection_id].chain_buffer = new_data_buffer;
++
++ memcpy(tl->slots[slot_id].connections[connection_id].chain_buffer +
++ tl->slots[slot_id].connections[connection_id].buffer_length,
++ data, data_length);
++ tl->slots[slot_id].connections[connection_id].buffer_length = new_data_length;
++
++ return 0;
++}
++
++static int en50221_tl_handle_data_last(struct en50221_transport_layer *tl,
++ uint8_t slot_id,
++ uint8_t connection_id,
++ uint8_t * data,
++ uint32_t data_length)
++{
++ // connection in correct state?
++ if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received T_DATA_LAST received for connection not in "
++ "T_STATE_ACTIVE from module on slot %02x\n",
++ slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++ // last package of a chain or single package comes in
++ tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
++ if (tl->slots[slot_id].connections[connection_id].chain_buffer == NULL) {
++ // single package => dispatch immediately
++ pthread_mutex_lock(&tl->setcallback_lock);
++ en50221_tl_callback cb = tl->callback;
++ void *cb_arg = tl->callback_arg;
++ pthread_mutex_unlock(&tl->setcallback_lock);
++
++ if (cb && data_length) {
++ pthread_mutex_unlock(&tl->slots[slot_id].
++ slot_lock);
++ cb(cb_arg, T_CALLBACK_REASON_DATA, data, data_length, slot_id, connection_id);
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ }
++ } else {
++ int new_data_length =
++ tl->slots[slot_id].connections[connection_id].buffer_length + data_length;
++ uint8_t *new_data_buffer =
++ realloc(tl->slots[slot_id].connections[connection_id].chain_buffer, new_data_length);
++ if (new_data_buffer == NULL) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_OUTOFMEMORY;
++ return -1;
++ }
++
++ memcpy(new_data_buffer +
++ tl->slots[slot_id].connections[connection_id].
++ buffer_length, data, data_length);
++
++ // clean the buffer position
++ tl->slots[slot_id].connections[connection_id].chain_buffer = NULL;
++ tl->slots[slot_id].connections[connection_id].buffer_length = 0;
++
++ // tell the upper layers
++ pthread_mutex_lock(&tl->setcallback_lock);
++ en50221_tl_callback cb = tl->callback;
++ void *cb_arg = tl->callback_arg;
++ pthread_mutex_unlock(&tl->setcallback_lock);
++ if (cb && data_length) {
++ pthread_mutex_unlock(&tl->slots[slot_id].
++ slot_lock);
++ cb(cb_arg, T_CALLBACK_REASON_DATA, new_data_buffer,
++ new_data_length, slot_id, connection_id);
++ pthread_mutex_lock(&tl->slots[slot_id].slot_lock);
++ }
++
++ free(new_data_buffer);
++ }
++
++ return 0;
++}
++
++static int en50221_tl_handle_sb(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id,
++ uint8_t * data, uint32_t data_length)
++{
++ // is the connection id ok?
++ if (tl->slots[slot_id].connections[connection_id].state != T_STATE_ACTIVE) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Received T_SB for connection not in T_STATE_ACTIVE from module on slot %02x\n",
++ slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++ // did we get enough data in the T_SB?
++ if (data_length != 1) {
++ print(LOG_LEVEL, ERROR, 1,
++ "Recieved T_SB with invalid length from module on slot %02x\n",
++ slot_id);
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_BADCAMDATA;
++ return -1;
++ }
++ // tell it to send the data if it says there is some
++ if (data[0] & 0x80) {
++ int ca_hndl = tl->slots[slot_id].ca_hndl;
++
++ // send the RCV
++ uint8_t hdr[3];
++ hdr[0] = T_RCV;
++ hdr[1] = 1;
++ hdr[2] = connection_id;
++ if (dvbca_link_write(ca_hndl, tl->slots[slot_id].slot, connection_id, hdr, 3) < 0) {
++ tl->error_slot = slot_id;
++ tl->error = EN50221ERR_CAWRITE;
++ return -1;
++ }
++ gettimeofday(&tl->slots[slot_id].connections[connection_id].tx_time, 0);
++
++ } else {
++ // no data - indicate not waiting for anything now
++ tl->slots[slot_id].connections[connection_id].tx_time.tv_sec = 0;
++ }
++
++ return 0;
++}
++
++static int en50221_tl_alloc_new_tc(struct en50221_transport_layer *tl,
++ uint8_t slot_id)
++{
++ // we browse through the array of connection
++ // types, to look for the first unused one
++ int i, conid = -1;
++ for (i = 1; i < tl->max_connections_per_slot; i++) {
++ if (tl->slots[slot_id].connections[i].state == T_STATE_IDLE) {
++ conid = i;
++ break;
++ }
++ }
++ if (conid == -1) {
++ print(LOG_LEVEL, ERROR, 1,
++ "CREATE_T_C failed: no more connections available\n");
++ return -1;
++ }
++ // set up the connection struct
++ tl->slots[slot_id].connections[conid].state = T_STATE_IN_CREATION;
++ tl->slots[slot_id].connections[conid].chain_buffer = NULL;
++ tl->slots[slot_id].connections[conid].buffer_length = 0;
++
++ return conid;
++}
++
++static void queue_message(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id,
++ struct en50221_message *msg)
++{
++ msg->next = NULL;
++ if (tl->slots[slot_id].connections[connection_id].send_queue_tail) {
++ tl->slots[slot_id].connections[connection_id].send_queue_tail->next = msg;
++ tl->slots[slot_id].connections[connection_id].send_queue_tail = msg;
++ } else {
++ tl->slots[slot_id].connections[connection_id].send_queue = msg;
++ tl->slots[slot_id].connections[connection_id].send_queue_tail = msg;
++ }
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_transport.h dvb-apps/lib/libdvben50221/en50221_transport.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/en50221_transport.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/en50221_transport.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,234 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 session layer
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++
++#ifndef __EN50221_TRANSPORT_H__
++#define __EN50221_TRANSPORT_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <stdlib.h>
++#include <stdint.h>
++#include <sys/uio.h>
++
++/**
++ * Callback reasons.
++ */
++#define T_CALLBACK_REASON_CONNECTIONOPEN 0x00 // A connection we opened _to_ the cam has been ACKed
++#define T_CALLBACK_REASON_CAMCONNECTIONOPEN 0x01 // The cam has opened a connection to _us_.
++#define T_CALLBACK_REASON_DATA 0x02 // Data received
++#define T_CALLBACK_REASON_CONNECTIONCLOSE 0x03 // The cam has told us to close a connection.
++#define T_CALLBACK_REASON_SLOTCLOSE 0x04 // The cam in the supplied slot id has been removed.
++
++// these are the states a TC can be in
++#define T_STATE_IDLE 0x01 // this transport connection is not in use
++#define T_STATE_ACTIVE 0x02 // this transport connection is in use
++#define T_STATE_ACTIVE_DELETEQUEUED 0x04 // this transport connection is about to be deleted
++#define T_STATE_IN_CREATION 0x08 // this transport waits for a T_C_T_C_REPLY to become active
++#define T_STATE_IN_DELETION 0x10 // this transport waits for T_D_T_C_REPLY to become idle again
++
++/**
++ * Opaque type representing a transport layer.
++ */
++struct en50221_transport_layer;
++
++/**
++ * Type definition for callback function - used when events are received from a module.
++ *
++ * **IMPORTANT** For all callback reasons except T_CALLBACK_REASON_DATA, an internal lock is held in the
++ * transport layer. Therefore, to avoid deadlock, you *must not* call back into the transport layer for
++ * these reasons.
++ *
++ * However, for T_CALLBACK_REASON_DATA, the internal lock is not held, so calling back into the transport
++ * layer is fine in this case.
++ *
++ * @param arg Private data.
++ * @param reason One of the T_CALLBACK_REASON_* values.
++ * @param data The data.
++ * @param data_length Length of the data.
++ * @param slot_id Slot_id the data was received from.
++ * @param connection_id Connection_id the data was received from.
++ */
++typedef void (*en50221_tl_callback) (void *arg, int reason,
++ uint8_t * data,
++ uint32_t data_length,
++ uint8_t slot_id,
++ uint8_t connection_id);
++
++
++/**
++ * Construct a new instance of the transport layer.
++ *
++ * @param max_slots Maximum number of slots to support.
++ * @param max_connections_per_slot Maximum connections per slot.
++ * @return The en50221_transport_layer instance, or NULL on error.
++ */
++extern struct en50221_transport_layer *en50221_tl_create(uint8_t max_slots,
++ uint8_t max_connections_per_slot);
++
++/**
++ * Destroy an instance of the transport layer.
++ *
++ * @param tl The en50221_transport_layer instance.
++ */
++extern void en50221_tl_destroy(struct en50221_transport_layer *tl);
++
++/**
++ * Register a new slot with the library.
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @param ca_hndl FD for talking to the slot.
++ * @param slot CAM slot where the requested CAM of the CA is in.
++ * @param response_timeout Maximum timeout in ms to a response we send before signalling a timeout.
++ * @param poll_delay Interval between polls in ms.
++ * @return slot_id on sucess, or -1 on error.
++ */
++extern int en50221_tl_register_slot(struct en50221_transport_layer *tl,
++ int ca_hndl, uint8_t slot,
++ uint32_t response_timeout,
++ uint32_t poll_delay);
++
++/**
++ * Destroy a registered slot - e.g. if a CAM is removed, or an error occurs. Does
++ * not attempt to reset the CAM.
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @param slot_id Slot to destroy.
++ */
++extern void en50221_tl_destroy_slot(struct en50221_transport_layer *tl, uint8_t slot_id);
++
++/**
++ * Performs one iteration of the transport layer poll -
++ * checking for incoming data furthermore it will handle
++ * the timeouts of certain commands like T_DELETE_T_C it
++ * should be called by the application regularly, generally
++ * faster than the poll delay.
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @return 0 on succes, or -1 if there was an error of some sort.
++ */
++extern int en50221_tl_poll(struct en50221_transport_layer *tl);
++
++/**
++ * Register the callback for data reception.
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @param callback The callback. Set to NULL to remove the callback completely.
++ * @param arg Private data passed as arg0 of the callback.
++ */
++extern void en50221_tl_register_callback(struct en50221_transport_layer *tl,
++ en50221_tl_callback callback, void *arg);
++
++/**
++ * Gets the ID of the slot an error occurred on.
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @return The offending slot id.
++ */
++extern int en50221_tl_get_error_slot(struct en50221_transport_layer *tl);
++
++/**
++ * Gets the last error.
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @return One of the EN50221ERR_* values.
++ */
++extern int en50221_tl_get_error(struct en50221_transport_layer *tl);
++
++/**
++ * This function is used to take a data-block, pack into
++ * into a TPDU (DATA_LAST) and send it to the device
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @param slot_id ID of the slot.
++ * @param connection_id Connection id.
++ * @param data Data to send.
++ * @param data_length Number of bytes to send.
++ * @return 0 on success, or -1 on error.
++ */
++extern int en50221_tl_send_data(struct en50221_transport_layer *tl,
++ uint8_t slot_id,
++ uint8_t connection_id,
++ uint8_t * data,
++ uint32_t data_length);
++
++/**
++ * This function is used to take a data-block, pack into
++ * into a TPDU (DATA_LAST) and send it to the device
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @param slot_id ID of the slot.
++ * @param connection_id Connection id.
++ * @param vector iov to send.
++ * @param io_count Number of elements in vector.
++ * @return 0 on success, or -1 on error.
++ */
++extern int en50221_tl_send_datav(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id,
++ struct iovec *vector, int iov_count);
++
++/**
++ * Create a new transport connection to the cam.
++ *
++ * **IMPORTANT** When this function returns, it means the request to create a connection
++ * has been submitted. You will need to poll using en50221_tl_get_connection_state() to find out
++ * if/when the connection is established. A callback with T_CALLBACK_REASON_CONNECTIONOPEN reason
++ * will also be sent when it is acked by the CAM.
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @param slot_id ID of the slot.
++ * @return The allocated connection id on success, or -1 on error.
++ */
++extern int en50221_tl_new_tc(struct en50221_transport_layer *tl, uint8_t slot_id);
++
++/**
++ * Deallocates a transport connection.
++ *
++ * **IMPORTANT** When this function returns, it means the request to destroy a connection
++ * has been submitted. You will need to poll using en50221_tl_get_connection_state() to find out
++ * if/when the connection is destroyed.
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @param slot_id ID of the slot.
++ * @param connection_id Connection id to send the request _on_.
++ * @return 0 on success, or -1 on error.
++ */
++extern int en50221_tl_del_tc(struct en50221_transport_layer *tl, uint8_t slot_id, uint8_t connection_id);
++
++/**
++ * Checks the state of a connection.
++ *
++ * @param tl The en50221_transport_layer instance.
++ * @param slot_id ID of the slot.
++ * @param connection_id Connection id to send the request _on_.
++ * @return One of the T_STATE_* values.
++ */
++extern int en50221_tl_get_connection_state(struct en50221_transport_layer *tl,
++ uint8_t slot_id, uint8_t connection_id);
++
++#ifdef __cplusplus
++}
++#endif
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvben50221/Makefile dvb-apps/lib/libdvben50221/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libdvben50221/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvben50221/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,49 @@
++# Makefile for linuxtv.org dvb-apps/lib/libdvben50221
++
++includes = asn_1.h \
++ en50221_app_ai.h \
++ en50221_app_auth.h \
++ en50221_app_ca.h \
++ en50221_app_datetime.h \
++ en50221_app_dvb.h \
++ en50221_app_epg.h \
++ en50221_app_lowspeed.h \
++ en50221_app_mmi.h \
++ en50221_app_rm.h \
++ en50221_app_smartcard.h \
++ en50221_app_tags.h \
++ en50221_app_teletext.h \
++ en50221_app_utils.h \
++ en50221_errno.h \
++ en50221_session.h \
++ en50221_stdcam.h \
++ en50221_transport.h
++
++objects = asn_1.o \
++ en50221_app_ai.o \
++ en50221_app_auth.o \
++ en50221_app_ca.o \
++ en50221_app_datetime.o \
++ en50221_app_dvb.o \
++ en50221_app_epg.o \
++ en50221_app_lowspeed.o \
++ en50221_app_mmi.o \
++ en50221_app_rm.o \
++ en50221_app_smartcard.o \
++ en50221_app_teletext.o \
++ en50221_app_utils.o \
++ en50221_session.o \
++ en50221_stdcam.o \
++ en50221_stdcam_hlci.o \
++ en50221_stdcam_llci.o \
++ en50221_transport.o
++
++lib_name = libdvben50221
++
++CPPFLAGS += -I../../lib -DLOG_LEVEL=1 # FIXME
++
++.PHONY: all
++
++all: library
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbmisc/dvbmisc.h dvb-apps/lib/libdvbmisc/dvbmisc.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbmisc/dvbmisc.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbmisc/dvbmisc.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,72 @@
++/*
++ libdvbmisc - DVB miscellaneous library
++
++ Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++*/
++
++#ifndef DVB_MISC_H
++#define DVB_MISC_H
++
++#include <stdarg.h>
++#include <stdint.h>
++#include <stdio.h>
++#include <sys/time.h>
++
++#define ERROR 0
++#define NOTICE 1
++#define INFO 2
++#define DEBUG 3
++
++#define print(x, y, z, fmt, arg...) do { \
++ if (z) { \
++ if ((x > ERROR) && (x > y)) \
++ vprint("%s: " fmt "\n", __func__ , ##arg); \
++ else if ((x > NOTICE) && (x > y)) \
++ vprint("%s: " fmt "\n",__func__ , ##arg); \
++ else if ((x > INFO) && (x > y)) \
++ vprint("%s: " fmt "\n", __func__ , ##arg); \
++ else if ((x > DEBUG) && (x > y)) \
++ vprint("%s: " fmt "\n", __func__ , ##arg); \
++ } else { \
++ if (x > y) \
++ vprint(fmt, ##arg); \
++ } \
++} while(0)
++
++static inline void vprint(char *fmt, ...)
++{
++ va_list args;
++
++ va_start(args, fmt);
++ vfprintf(stderr, fmt, args);
++ va_end(args);
++}
++
++static inline int time_after(struct timeval oldtime, uint32_t delta_ms)
++{
++ // calculate the oldtime + add on the delta
++ uint64_t oldtime_ms = (oldtime.tv_sec * 1000) + (oldtime.tv_usec / 1000);
++ oldtime_ms += delta_ms;
++
++ // calculate the nowtime
++ struct timeval nowtime;
++ gettimeofday(&nowtime, 0);
++ uint64_t nowtime_ms = (nowtime.tv_sec * 1000) + (nowtime.tv_usec / 1000);
++
++ // check
++ return nowtime_ms > oldtime_ms;
++}
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_api.c dvb-apps/lib/libdvbsec/dvbsec_api.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_api.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbsec/dvbsec_api.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,951 @@
++/*
++ libdvbsec - an SEC library
++
++ Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey <adq_dvb@lidskialf.net>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++*/
++
++#include <stdlib.h>
++#include <unistd.h>
++#include <errno.h>
++#include <string.h>
++#include <stdio.h>
++#include <ctype.h>
++#include <linux/types.h>
++#include <libdvbapi/dvbfe.h>
++#include "dvbsec_api.h"
++
++// uncomment this to make dvbsec_command print out debug instead of talking to a frontend
++// #define TEST_SEC_COMMAND 1
++
++int dvbsec_set(struct dvbfe_handle *fe,
++ struct dvbsec_config *sec_config,
++ enum dvbsec_diseqc_polarization polarization,
++ enum dvbsec_diseqc_switch sat_pos,
++ enum dvbsec_diseqc_switch switch_option,
++ struct dvbfe_parameters *params,
++ int timeout)
++{
++ int tmp;
++ struct dvbfe_parameters localparams;
++ struct dvbfe_parameters *topass = params;
++
++ // perform SEC
++ if (sec_config != NULL) {
++ switch(sec_config->config_type) {
++ case DVBSEC_CONFIG_NONE:
++ break;
++
++ case DVBSEC_CONFIG_POWER:
++ dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_13);
++ break;
++
++ case DVBSEC_CONFIG_STANDARD:
++ {
++ // calculate the correct oscillator value
++ enum dvbsec_diseqc_oscillator osc = DISEQC_OSCILLATOR_LOW;
++ if (sec_config->switch_frequency && (sec_config->switch_frequency < params->frequency))
++ osc = DISEQC_OSCILLATOR_HIGH;
++
++ if ((tmp = dvbsec_std_sequence(fe,
++ osc,
++ polarization,
++ sat_pos,
++ switch_option)) < 0)
++ return tmp;
++ break;
++ }
++
++ case DVBSEC_CONFIG_ADVANCED:
++ {
++ // are we high or not?
++ int high = 0;
++ if (sec_config->switch_frequency && (sec_config->switch_frequency < params->frequency))
++ high = 1;
++
++ // determine correct string
++ char *cmd = NULL;
++ switch(polarization) {
++ case DISEQC_POLARIZATION_H:
++ if (!high)
++ cmd = sec_config->adv_cmd_lo_h;
++ else
++ cmd = sec_config->adv_cmd_hi_h;
++ break;
++ case DISEQC_POLARIZATION_V:
++ if (!high)
++ cmd = sec_config->adv_cmd_lo_v;
++ else
++ cmd = sec_config->adv_cmd_hi_v;
++ break;
++ case DISEQC_POLARIZATION_L:
++ if (!high)
++ cmd = sec_config->adv_cmd_lo_l;
++ else
++ cmd = sec_config->adv_cmd_hi_l;
++ break;
++ case DISEQC_POLARIZATION_R:
++ if (!high)
++ cmd = sec_config->adv_cmd_lo_r;
++ else
++ cmd = sec_config->adv_cmd_hi_r;
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ // do it
++ if (cmd)
++ if ((tmp = dvbsec_command(fe, cmd)) < 0)
++ return tmp;
++ break;
++ }
++ }
++
++ // work out the correct LOF value
++ uint32_t lof = 0;
++ if ((sec_config->switch_frequency == 0) || (params->frequency < sec_config->switch_frequency)) {
++ // LOW band
++ switch(polarization) {
++ case DISEQC_POLARIZATION_H:
++ lof = sec_config->lof_lo_h;
++ break;
++ case DISEQC_POLARIZATION_V:
++ lof = sec_config->lof_lo_v;
++ break;
++ case DISEQC_POLARIZATION_L:
++ lof = sec_config->lof_lo_l;
++ break;
++ case DISEQC_POLARIZATION_R:
++ lof = sec_config->lof_lo_r;
++ break;
++ case DISEQC_POLARIZATION_UNCHANGED:
++ break;
++ }
++ } else {
++ // HIGH band
++ switch(polarization) {
++ case DISEQC_POLARIZATION_H:
++ lof = sec_config->lof_hi_h;
++ break;
++ case DISEQC_POLARIZATION_V:
++ lof = sec_config->lof_hi_v;
++ break;
++ case DISEQC_POLARIZATION_L:
++ lof = sec_config->lof_hi_l;
++ break;
++ case DISEQC_POLARIZATION_R:
++ lof = sec_config->lof_hi_r;
++ break;
++ case DISEQC_POLARIZATION_UNCHANGED:
++ break;
++ }
++ }
++
++ // do frequency adjustment
++ if (lof) {
++ memcpy(&localparams, params, sizeof(struct dvbfe_parameters));
++ int tmpfreq = localparams.frequency - lof;
++
++ if (tmpfreq < 0)
++ tmpfreq *= -1;
++ localparams.frequency = (uint32_t) tmpfreq;
++ topass = &localparams;
++ }
++ }
++
++ // set the frontend!
++ return dvbfe_set(fe, topass, timeout);
++}
++
++int dvbsec_std_sequence(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_oscillator oscillator,
++ enum dvbsec_diseqc_polarization polarization,
++ enum dvbsec_diseqc_switch sat_pos,
++ enum dvbsec_diseqc_switch switch_option)
++{
++ dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_OFF);
++
++ switch(polarization) {
++ case DISEQC_POLARIZATION_V:
++ case DISEQC_POLARIZATION_R:
++ dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_13);
++ break;
++ case DISEQC_POLARIZATION_H:
++ case DISEQC_POLARIZATION_L:
++ dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_18);
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ dvbsec_diseqc_set_committed_switches(fe,
++ DISEQC_ADDRESS_ANY_DEVICE,
++ oscillator,
++ polarization,
++ sat_pos,
++ switch_option);
++
++ usleep(15000);
++
++ switch(sat_pos) {
++ case DISEQC_SWITCH_A:
++ dvbfe_set_tone_data_burst(fe, DVBFE_SEC_MINI_A);
++ break;
++ case DISEQC_SWITCH_B:
++ dvbfe_set_tone_data_burst(fe, DVBFE_SEC_MINI_B);
++ break;
++ default:
++ break;
++ }
++
++ if (sat_pos != DISEQC_SWITCH_UNCHANGED)
++ usleep(15000);
++
++ switch(oscillator) {
++ case DISEQC_OSCILLATOR_LOW:
++ dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_OFF);
++ break;
++ case DISEQC_OSCILLATOR_HIGH:
++ dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_ON);
++ break;
++ default:
++ break;
++ }
++
++ return 0;
++}
++
++int dvbsec_diseqc_set_reset(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_reset state)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x00 };
++
++ if (state == DISEQC_RESET_CLEAR)
++ data[2] = 0x01;
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_set_power(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_power state)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x02 };
++
++ if (state == DISEQC_POWER_ON)
++ data[2] = 0x03;
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_set_listen(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_listen state)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x30 };
++
++ if (state == DISEQC_LISTEN_AWAKE)
++ data[2] = 0x31;
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_set_committed_switches(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_oscillator oscillator,
++ enum dvbsec_diseqc_polarization polarization,
++ enum dvbsec_diseqc_switch sat_pos,
++ enum dvbsec_diseqc_switch switch_option)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x38, 0x00 };
++
++ switch(oscillator) {
++ case DISEQC_OSCILLATOR_LOW:
++ data[3] |= 0x10;
++ break;
++ case DISEQC_OSCILLATOR_HIGH:
++ data[3] |= 0x11;
++ break;
++ case DISEQC_OSCILLATOR_UNCHANGED:
++ break;
++ }
++ switch(polarization) {
++ case DISEQC_POLARIZATION_V:
++ case DISEQC_POLARIZATION_R:
++ data[3] |= 0x20;
++ break;
++ case DISEQC_POLARIZATION_H:
++ case DISEQC_POLARIZATION_L:
++ data[3] |= 0x22;
++ break;
++ default:
++ break;
++ }
++ switch(sat_pos) {
++ case DISEQC_SWITCH_A:
++ data[3] |= 0x40;
++ break;
++ case DISEQC_SWITCH_B:
++ data[3] |= 0x44;
++ break;
++ case DISEQC_SWITCH_UNCHANGED:
++ break;
++ }
++ switch(switch_option) {
++ case DISEQC_SWITCH_A:
++ data[3] |= 0x80;
++ break;
++ case DISEQC_SWITCH_B:
++ data[3] |= 0x88;
++ break;
++ case DISEQC_SWITCH_UNCHANGED:
++ break;
++ }
++
++ if (data[3] == 0)
++ return 0;
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_set_uncommitted_switches(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_switch s1,
++ enum dvbsec_diseqc_switch s2,
++ enum dvbsec_diseqc_switch s3,
++ enum dvbsec_diseqc_switch s4)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x39, 0x00 };
++
++ switch(s1) {
++ case DISEQC_SWITCH_A:
++ data[3] |= 0x10;
++ break;
++ case DISEQC_SWITCH_B:
++ data[3] |= 0x11;
++ break;
++ case DISEQC_SWITCH_UNCHANGED:
++ break;
++ }
++ switch(s2) {
++ case DISEQC_SWITCH_A:
++ data[3] |= 0x20;
++ break;
++ case DISEQC_SWITCH_B:
++ data[3] |= 0x22;
++ break;
++ case DISEQC_SWITCH_UNCHANGED:
++ break;
++ }
++ switch(s3) {
++ case DISEQC_SWITCH_A:
++ data[3] |= 0x40;
++ break;
++ case DISEQC_SWITCH_B:
++ data[3] |= 0x44;
++ break;
++ case DISEQC_SWITCH_UNCHANGED:
++ break;
++ }
++ switch(s4) {
++ case DISEQC_SWITCH_A:
++ data[3] |= 0x80;
++ break;
++ case DISEQC_SWITCH_B:
++ data[3] |= 0x88;
++ break;
++ case DISEQC_SWITCH_UNCHANGED:
++ break;
++ }
++
++ if (data[3] == 0)
++ return 0;
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_set_analog_value(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_analog_id id,
++ uint8_t value)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x48, value };
++
++ if (id == DISEQC_ANALOG_ID_A1)
++ data[2] = 0x49;
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_set_frequency(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ uint32_t frequency)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x58, 0x00, 0x00, 0x00 };
++ int len = 5;
++
++ uint32_t bcdval = 0;
++ int i;
++ for(i=0; i<=24;i+=4) {
++ bcdval |= ((frequency % 10) << i);
++ frequency /= 10;
++ }
++
++ data[3] = bcdval >> 16;
++ data[4] = bcdval >> 8;
++ if (bcdval & 0xff) {
++ data[5] = bcdval;
++ len++;
++ }
++
++ return dvbfe_do_diseqc_command(fe, data, len);
++}
++
++int dvbsec_diseqc_set_channel(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ uint16_t channel)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x59, 0x00, 0x00};
++
++ data[3] = channel >> 8;
++ data[4] = channel;
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_halt_satpos(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x60};
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_disable_satpos_limits(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x63};
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_set_satpos_limit(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_direction direction)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x66};
++
++ if (direction == DISEQC_DIRECTION_WEST)
++ data[2] = 0x67;
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_drive_satpos_motor(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_direction direction,
++ enum dvbsec_diseqc_drive_mode mode,
++ uint8_t value)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x68, 0x00};
++
++ if (direction == DISEQC_DIRECTION_WEST)
++ data[2] = 0x69;
++
++ switch(mode) {
++ case DISEQC_DRIVE_MODE_STEPS:
++ data[3] = (value & 0x7f) | 0x80;
++ break;
++ case DISEQC_DRIVE_MODE_TIMEOUT:
++ data[3] = value & 0x7f;
++ break;
++ }
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_store_satpos_preset(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ uint8_t id)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x6A, id};
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_goto_satpos_preset(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ uint8_t id)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x6B, id};
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++int dvbsec_diseqc_recalculate_satpos_positions(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ int val1,
++ int val2)
++{
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x6F, 0x00, 0x00};
++ int len = 3;
++
++ if (val1 != -1) {
++ data[3] = val1;
++ len++;
++ }
++ if (val2 != -1) {
++ data[4] = val2;
++ len = 5;
++ }
++
++ return dvbfe_do_diseqc_command(fe, data, len);
++}
++
++int dvbsec_diseqc_goto_rotator_bearing(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ float angle)
++{
++ int integer = (int) angle;
++ uint8_t data[] = { DISEQC_FRAMING_MASTER_NOREPLY, address, 0x6e, 0x00, 0x00};
++
++ // transform the fraction into the correct representation
++ int fraction = (int) (((angle - integer) * 16.0) + 0.9) & 0x0f;
++ switch(fraction) {
++ case 1:
++ case 4:
++ case 7:
++ case 9:
++ case 12:
++ case 15:
++ fraction--;
++ break;
++ }
++
++ // generate the command
++ if (integer < -256) {
++ return -EINVAL;
++ } else if (integer < 0) {
++ integer = -integer;
++ data[3] = 0xf0;
++ } else if (integer < 256) {
++ data[3] = 0x00;
++ } else if (integer < 512) {
++ integer -= 256;
++ data[3] = 0x10;
++ } else {
++ return -EINVAL;
++ }
++ data[3] |= ((integer / 16) & 0x0f);
++ integer = integer % 16;
++ data[4] |= ((integer & 0x0f) << 4) | fraction;
++
++ return dvbfe_do_diseqc_command(fe, data, sizeof(data));
++}
++
++static int skipwhite(char **line, char *end)
++{
++ while(**line) {
++ if (end && (*line >= end))
++ return -1;
++ if (!isspace(**line))
++ return 0;
++ (*line)++;
++ }
++
++ return -1;
++}
++
++static int getstringupto(char **line, char *end, char *matches, char **ptrdest, int *ptrlen)
++{
++ char *start = *line;
++
++ while(**line) {
++ if (end && (*line >= end))
++ break;
++ if (strchr(matches, **line)) {
++ *ptrdest = start;
++ *ptrlen = *line - start;
++ return 0;
++ }
++ (*line)++;
++ }
++
++ *ptrdest = start;
++ *ptrlen = *line - start;
++ return 0;
++}
++
++static int parsefunction(char **line,
++ char **nameptr, int *namelen,
++ char **argsptr, int *argslen)
++{
++ if (skipwhite(line, NULL))
++ return -1;
++
++ if (getstringupto(line, NULL, "(", nameptr, namelen))
++ return -1;
++ if ((*line) == 0)
++ return -1;
++ (*line)++; // skip the '('
++ if (getstringupto(line, NULL, ")", argsptr, argslen))
++ return -1;
++ if ((*line) == 0)
++ return -1;
++ (*line)++; // skip the ')'
++
++ return 0;
++}
++
++static int parseintarg(char **args, char *argsend, int *result)
++{
++ char tmp[32];
++ char *arg;
++ int arglen;
++
++ // skip whitespace
++ if (skipwhite(args, argsend))
++ return -1;
++
++ // get the arg
++ if (getstringupto(args, argsend, ",", &arg, &arglen))
++ return -1;
++ if ((**args) == ',')
++ (*args)++; // skip the ',' if present
++ if (arglen > 31)
++ arglen = 31;
++ strncpy(tmp, arg, arglen);
++ tmp[arglen] = 0;
++
++ if (sscanf(tmp, "%i", result) != 1)
++ return -1;
++
++ return 0;
++}
++
++static int parsechararg(char **args, char *argsend, int *result)
++{
++ char *arg;
++ int arglen;
++
++ // skip whitespace
++ if (skipwhite(args, argsend))
++ return -1;
++
++ // get the arg
++ if (getstringupto(args, argsend, ",", &arg, &arglen))
++ return -1;
++ if ((**args) == ',')
++ (*args)++; // skip the ',' if present
++ if (arglen > 0)
++ *result = arg[0];
++
++ return 0;
++}
++
++static int parsefloatarg(char **args, char *argsend, float *result)
++{
++ char tmp[32];
++ char *arg;
++ int arglen;
++
++ // skip whitespace
++ if (skipwhite(args, argsend))
++ return -1;
++
++ // get the arg
++ if (getstringupto(args, argsend, ",", &arg, &arglen))
++ return -1;
++ if ((**args) == ',')
++ (*args)++; // skip the ',' if present
++ if (arglen > 31)
++ arglen = 31;
++ strncpy(tmp, arg, arglen);
++ arg[arglen] = 0;
++
++ if (sscanf(tmp, "%f", result) != 1)
++ return -1;
++
++ return 0;
++}
++
++static enum dvbsec_diseqc_switch parse_switch(int c)
++{
++ switch(toupper(c)) {
++ case 'A':
++ return DISEQC_SWITCH_A;
++ case 'B':
++ return DISEQC_SWITCH_B;
++ default:
++ return DISEQC_SWITCH_UNCHANGED;
++ }
++}
++
++int dvbsec_command(struct dvbfe_handle *fe, char *command)
++{
++ char *name;
++ char *args;
++ int namelen;
++ int argslen;
++ int address;
++ int iarg;
++ int iarg2;
++ int iarg3;
++ int iarg4;
++ float farg;
++
++ while(!parsefunction(&command, &name, &namelen, &args, &argslen)) {
++ char *argsend = args+argslen;
++
++ if (!strncasecmp(name, "tone", namelen)) {
++ if (parsechararg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("tone: %c\n", iarg);
++#else
++ if (toupper(iarg) == 'B') {
++ dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_ON);
++ } else {
++ dvbfe_set_22k_tone(fe, DVBFE_SEC_TONE_OFF);
++ }
++#endif
++ } else if (!strncasecmp(name, "voltage", namelen)) {
++ if (parseintarg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("voltage: %i\n", iarg);
++#else
++ switch(iarg) {
++ case 0:
++ dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_OFF);
++ break;
++ case 13:
++ dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_13);
++ break;
++ case 18:
++ dvbfe_set_voltage(fe, DVBFE_SEC_VOLTAGE_18);
++ break;
++ default:
++ return -1;
++ }
++#endif
++ } else if (!strncasecmp(name, "toneburst", namelen)) {
++ if (parsechararg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("toneburst: %c\n", iarg);
++#else
++ if (toupper(iarg) == 'B') {
++ dvbfe_set_tone_data_burst(fe, DVBFE_SEC_MINI_B);
++ } else {
++ dvbfe_set_tone_data_burst(fe, DVBFE_SEC_MINI_A);
++ }
++#endif
++ } else if (!strncasecmp(name, "highvoltage", namelen)) {
++ if (parseintarg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("highvoltage: %i\n", iarg);
++#else
++ dvbfe_set_high_lnb_voltage(fe, iarg ? 1 : 0);
++#endif
++ } else if (!strncasecmp(name, "dishnetworks", namelen)) {
++ if (parseintarg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("dishnetworks: %i\n", iarg);
++#else
++ dvbfe_do_dishnetworks_legacy_command(fe, iarg);
++#endif
++ } else if (!strncasecmp(name, "wait", namelen)) {
++ if (parseintarg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("wait: %i\n", iarg);
++#else
++ if (iarg)
++ usleep(iarg * 1000);
++#endif
++ } else if (!strncasecmp(name, "Dreset", namelen)) {
++ if (parseintarg(&args, argsend, &address))
++ return -1;
++ if (parseintarg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("Dreset: %i %i\n", address, iarg);
++#else
++ if (iarg) {
++ dvbsec_diseqc_set_reset(fe, address, DISEQC_RESET);
++ } else {
++ dvbsec_diseqc_set_reset(fe, address, DISEQC_RESET_CLEAR);
++ }
++#endif
++ } else if (!strncasecmp(name, "Dpower", namelen)) {
++ if (parseintarg(&args, argsend, &address))
++ return -1;
++ if (parseintarg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("Dpower: %i %i\n", address, iarg);
++#else
++ if (iarg) {
++ dvbsec_diseqc_set_power(fe, address, DISEQC_POWER_ON);
++ } else {
++ dvbsec_diseqc_set_power(fe, address, DISEQC_POWER_OFF);
++ }
++#endif
++ } else if (!strncasecmp(name, "Dcommitted", namelen)) {
++ if (parseintarg(&args, argsend, &address))
++ return -1;
++ if (parsechararg(&args, argsend, &iarg))
++ return -1;
++ if (parsechararg(&args, argsend, &iarg2))
++ return -1;
++ if (parsechararg(&args, argsend, &iarg3))
++ return -1;
++ if (parsechararg(&args, argsend, &iarg4))
++ return -1;
++
++ enum dvbsec_diseqc_oscillator oscillator;
++ switch(toupper(iarg)) {
++ case 'H':
++ oscillator = DISEQC_OSCILLATOR_HIGH;
++ break;
++ case 'L':
++ oscillator = DISEQC_OSCILLATOR_LOW;
++ break;
++ default:
++ oscillator = DISEQC_OSCILLATOR_UNCHANGED;
++ break;
++ }
++
++ int polarization = -1;
++ switch(toupper(iarg2)) {
++ case 'H':
++ polarization = DISEQC_POLARIZATION_H;
++ break;
++ case 'V':
++ polarization = DISEQC_POLARIZATION_V;
++ break;
++ case 'L':
++ polarization = DISEQC_POLARIZATION_L;
++ break;
++ case 'R':
++ polarization = DISEQC_POLARIZATION_R;
++ break;
++ default:
++ polarization = -1;
++ break;
++ }
++
++#ifdef TEST_SEC_COMMAND
++ printf("Dcommitted: %i %i %i %i %i\n", address,
++ oscillator,
++ polarization,
++ parse_switch(iarg3),
++ parse_switch(iarg4));
++#else
++ dvbsec_diseqc_set_committed_switches(fe, address,
++ oscillator,
++ polarization,
++ parse_switch(iarg3),
++ parse_switch(iarg4));
++#endif
++ } else if (!strncasecmp(name, "Duncommitted", namelen)) {
++ if (parsechararg(&args, argsend, &address))
++ return -1;
++ if (parsechararg(&args, argsend, &iarg))
++ return -1;
++ if (parsechararg(&args, argsend, &iarg2))
++ return -1;
++ if (parsechararg(&args, argsend, &iarg3))
++ return -1;
++ if (parsechararg(&args, argsend, &iarg4))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("Duncommitted: %i %i %i %i %i\n", address,
++ parse_switch(iarg),
++ parse_switch(iarg2),
++ parse_switch(iarg3),
++ parse_switch(iarg4));
++#else
++ dvbsec_diseqc_set_uncommitted_switches(fe, address,
++ parse_switch(iarg),
++ parse_switch(iarg2),
++ parse_switch(iarg3),
++ parse_switch(iarg4));
++#endif
++ } else if (!strncasecmp(name, "Dfrequency", namelen)) {
++ if (parseintarg(&args, argsend, &address))
++ return -1;
++ if (parseintarg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("Dfrequency: %i %i\n", address, iarg);
++#else
++ dvbsec_diseqc_set_frequency(fe, address, iarg);
++#endif
++ } else if (!strncasecmp(name, "Dchannel", namelen)) {
++ if (parseintarg(&args, argsend, &address))
++ return -1;
++ if (parseintarg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("Dchannel: %i %i\n", address, iarg);
++#else
++ dvbsec_diseqc_set_channel(fe, address, iarg);
++#endif
++ } else if (!strncasecmp(name, "Dgotopreset", namelen)) {
++ if (parseintarg(&args, argsend, &address))
++ return -1;
++ if (parseintarg(&args, argsend, &iarg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("Dgotopreset: %i %i\n", address, iarg);
++#else
++ dvbsec_diseqc_goto_satpos_preset(fe, address, iarg);
++#endif
++ } else if (!strncasecmp(name, "Dgotobearing", namelen)) {
++ if (parseintarg(&args, argsend, &address))
++ return -1;
++ if (parsefloatarg(&args, argsend, &farg))
++ return -1;
++
++#ifdef TEST_SEC_COMMAND
++ printf("Dgotobearing: %i %f\n", address, farg);
++#else
++ dvbsec_diseqc_goto_rotator_bearing(fe, address, farg);
++#endif
++ } else {
++ return -1;
++ }
++ }
++
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_api.h dvb-apps/lib/libdvbsec/dvbsec_api.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_api.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbsec/dvbsec_api.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,436 @@
++/*
++ libdvbsec - an SEC library
++
++ Copyright (C) 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey <adq_dvb@lidskialf.net>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++*/
++
++#ifndef DVBSEC_API_H
++#define DVBSEC_API_H 1
++
++#include <stdint.h>
++
++struct dvbfe_handle;
++struct dvbfe_parameters;
++
++enum dvbsec_diseqc_framing {
++ DISEQC_FRAMING_MASTER_NOREPLY = 0xE0,
++ DISEQC_FRAMING_MASTER_NOREPLY_REPEAT = 0xE1,
++ DISEQC_FRAMING_MASTER_REPLY = 0xE2,
++ DISEQC_FRAMING_MASTER_REPLY_REPEAT = 0xE3,
++ DISEQC_FRAMING_SLAVE_OK = 0xE4,
++ DISEQC_FRAMING_SLAVE_UNSUPPORTED = 0xE5,
++ DISEQC_FRAMING_SLAVE_PARITY_ERROR = 0xE6,
++ DISEQC_FRAMING_SLAVE_UNRECOGNISED = 0xE7,
++};
++
++enum dvbsec_diseqc_address {
++ DISEQC_ADDRESS_ANY_DEVICE = 0x00,
++
++ DISEQC_ADDRESS_ANY_LNB_SWITCHER_SMATV = 0x10,
++ DISEQC_ADDRESS_LNB = 0x11,
++ DISEQC_ADDRESS_LNB_WITH_LOOP = 0x12,
++ DISEQC_ADDRESS_SWITCHER = 0x14,
++ DISEQC_ADDRESS_SWITCHER_WITH_LOOP = 0x15,
++ DISEQC_ADDRESS_SMATV = 0x18,
++
++ DISEQC_ADDRESS_ANY_POLARISER = 0x20,
++ DISEQC_ADDRESS_LINEAR_POLARISER = 0x21,
++
++ DISEQC_ADDRESS_ANY_POSITIONER = 0x30,
++ DISEQC_ADDRESS_POLAR_AZIMUTH_POSITIONER = 0x31,
++ DISEQC_ADDRESS_ELEVATION_POSITIONER = 0x32,
++
++ DISEQC_ADDRESS_ANY_INSTALLER_AID = 0x40,
++ DISEQC_ADDRESS_SIGNAL_STRENGTH = 0x41,
++
++ DISEQC_ADDRESS_ANY_INTERFACE = 0x70,
++ DISEQC_ADDRESS_HEADEND_INTERFACE = 0x71,
++
++ DISEQC_ADDRESS_REALLOC_BASE = 0x60,
++ DISEQC_ADDRESS_OEM_BASE = 0xf0,
++};
++
++enum dvbsec_diseqc_reset {
++ DISEQC_RESET,
++ DISEQC_RESET_CLEAR,
++};
++
++enum dvbsec_diseqc_power {
++ DISEQC_POWER_OFF,
++ DISEQC_POWER_ON,
++};
++
++enum dvbsec_diseqc_listen {
++ DISEQC_LISTEN_SLEEP,
++ DISEQC_LISTEN_AWAKE,
++};
++
++enum dvbsec_diseqc_polarization {
++ DISEQC_POLARIZATION_UNCHANGED = 0,
++ DISEQC_POLARIZATION_H = 'h',
++ DISEQC_POLARIZATION_V = 'v',
++ DISEQC_POLARIZATION_L = 'l',
++ DISEQC_POLARIZATION_R = 'r',
++};
++
++enum dvbsec_diseqc_oscillator {
++ DISEQC_OSCILLATOR_UNCHANGED = 0,
++ DISEQC_OSCILLATOR_LOW,
++ DISEQC_OSCILLATOR_HIGH,
++};
++
++enum dvbsec_diseqc_switch {
++ DISEQC_SWITCH_UNCHANGED = 0,
++ DISEQC_SWITCH_A,
++ DISEQC_SWITCH_B,
++};
++
++enum dvbsec_diseqc_analog_id {
++ DISEQC_ANALOG_ID_A0,
++ DISEQC_ANALOG_ID_A1,
++};
++
++enum dvbsec_diseqc_drive_mode {
++ DISEQC_DRIVE_MODE_STEPS,
++ DISEQC_DRIVE_MODE_TIMEOUT,
++};
++
++enum dvbsec_diseqc_direction {
++ DISEQC_DIRECTION_EAST,
++ DISEQC_DIRECTION_WEST,
++};
++
++enum dvbsec_config_type {
++ DVBSEC_CONFIG_NONE = 0,
++ DVBSEC_CONFIG_POWER,
++ DVBSEC_CONFIG_STANDARD,
++ DVBSEC_CONFIG_ADVANCED,
++};
++
++
++#define MAX_SEC_CMD_LEN 100
++
++struct dvbsec_config
++{
++ char id[32]; /* ID of this SEC config structure */
++ uint32_t switch_frequency; /* switching frequency - supply 0 for none. */
++ uint32_t lof_lo_v; /* frequency to subtract for V + LOW band channels - or for switch_frequency == 0 */
++ uint32_t lof_lo_h; /* frequency to subtract for H + LOW band channels - or for switch_frequency == 0 */
++ uint32_t lof_lo_l; /* frequency to subtract for L + LOW band channels - or for switch_frequency == 0 */
++ uint32_t lof_lo_r; /* frequency to subtract for R + LOW band channels - or for switch_frequency == 0 */
++ uint32_t lof_hi_v; /* frequency to subtract for V + HIGH band channels */
++ uint32_t lof_hi_h; /* frequency to subtract for H + HIGH band channels */
++ uint32_t lof_hi_l; /* frequency to subtract for L + HIGH band channels */
++ uint32_t lof_hi_r; /* frequency to subtract for R + HIGH band channels */
++
++ /**
++ * The SEC control to be used depends on the type:
++ *
++ * NONE - no SEC commands will be issued. (Frequency adjustment will still be performed).
++ *
++ * POWER - only the SEC power will be turned on.
++ *
++ * STANDARD - the standard DISEQC back compatable sequence is used.
++ *
++ * ADVANCED - SEC strings are supplied by the user describing the exact sequence
++ * of operations to use.
++ */
++ enum dvbsec_config_type config_type;
++
++ /* stuff for type == dvbsec_config_ADVANCED */
++ char adv_cmd_lo_h[MAX_SEC_CMD_LEN]; /* ADVANCED SEC command to use for LOW/H. */
++ char adv_cmd_lo_v[MAX_SEC_CMD_LEN]; /* ADVANCED SEC command to use for LOW/V. */
++ char adv_cmd_lo_l[MAX_SEC_CMD_LEN]; /* ADVANCED SEC command to use for LOW/L. */
++ char adv_cmd_lo_r[MAX_SEC_CMD_LEN]; /* ADVANCED SEC command to use for LOW/R. */
++ char adv_cmd_hi_h[MAX_SEC_CMD_LEN]; /* ADVANCED SEC command to use for HI/H. */
++ char adv_cmd_hi_v[MAX_SEC_CMD_LEN]; /* ADVANCED SEC command to use for HI/V. */
++ char adv_cmd_hi_l[MAX_SEC_CMD_LEN]; /* ADVANCED SEC command to use for HI/L. */
++ char adv_cmd_hi_r[MAX_SEC_CMD_LEN]; /* ADVANCED SEC command to use for HI/R. */
++};
++
++/**
++ * Helper function for tuning adapters with SEC support. This function will do
++ * everything required, including frequency adjustment based on the parameters
++ * in sec_config.
++ *
++ * Note: Since the SEC configuration structure can be set to disable any SEC
++ * operations, this function can be reused for ALL DVB style devices (just
++ * set all LOF=0,type=dvbsec_config_NONE for devices which do not require
++ * SEC control).
++ *
++ * The sec configuration structures can be looked up using the dvbcfg_sec library.
++ *
++ * @param fe Frontend concerned.
++ * @param sec_config SEC configuration structure. May be NULL to disable SEC/frequency adjustment.
++ * @param polarization Polarization of signal.
++ * @param sat_pos Satellite position - only used if type == DISEQC_SEC_CONFIG_STANDARD.
++ * @param switch_option Switch option - only used if type == DISEQC_SEC_CONFIG_STANDARD.
++ * @param params Tuning parameters.
++ * @param timeout <0 => wait forever for lock. 0=>return immediately, >0=>
++ * number of milliseconds to wait for a lock.
++ * @return 0 on locked (or if timeout==0 and everything else worked), or
++ * nonzero on failure (including no lock).
++ */
++extern int dvbsec_set(struct dvbfe_handle *fe,
++ struct dvbsec_config *sec_config,
++ enum dvbsec_diseqc_polarization polarization,
++ enum dvbsec_diseqc_switch sat_pos,
++ enum dvbsec_diseqc_switch switch_option,
++ struct dvbfe_parameters *params,
++ int timeout);
++
++/**
++ * This will issue the standardised back-compatable DISEQC/SEC command
++ * sequence as defined in the DISEQC spec:
++ *
++ * i.e. tone off, set voltage, wait15, DISEQC, wait15, toneburst, wait15, set tone.
++ *
++ * @param fe Frontend concerned.
++ * @param oscillator Value to set the lo/hi switch to.
++ * @param polarization Value to set the polarisation switch to.
++ * @param sat_pos Value to set the satellite position switch to.
++ * @param switch_option Value to set the "swtch option" switch to.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_std_sequence(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_oscillator oscillator,
++ enum dvbsec_diseqc_polarization polarization,
++ enum dvbsec_diseqc_switch sat_pos,
++ enum dvbsec_diseqc_switch switch_option);
++
++/**
++ * Execute an SEC command string on the provided frontend. Please see the documentation
++ * in dvbsec_cfg.h on the command format,
++ *
++ * @param fe Frontend concerned.
++ * @param command The command to execute.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_command(struct dvbfe_handle *fe, char *command);
++
++/**
++ * Control the reset status of an attached DISEQC device.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param state The state to set.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_set_reset(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_reset state);
++
++/**
++ * Control the power status of an attached DISEQC peripheral.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param state The state to set.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_set_power(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_power state);
++
++/**
++ * Control the listening status of an attached DISEQC peripheral.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param state The state to set.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_set_listen(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_listen state);
++
++/**
++ * Set the state of the committed switches of a DISEQC device.
++ * These are switches which are defined to have a standard name.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param oscillator Value to set the lo/hi switch to.
++ * @param polarization Value to set the polarization switch to.
++ * @param sat_pos Value to set the satellite position switch to.
++ * @param switch_option Value to set the switch option switch to.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_set_committed_switches(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_oscillator oscillator,
++ enum dvbsec_diseqc_polarization polarization,
++ enum dvbsec_diseqc_switch sat_pos,
++ enum dvbsec_diseqc_switch switch_option);
++
++/**
++ * Set the state of the uncommitted switches of a DISEQC device.
++ * These provide another four switching possibilities.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param s1 Value to set the S1 switch to.
++ * @param s2 Value to set the S2 switch to.
++ * @param s3 Value to set the S3 switch to.
++ * @param s3 Value to set the S4 switch to.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_set_uncommitted_switches(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_switch s1,
++ enum dvbsec_diseqc_switch s2,
++ enum dvbsec_diseqc_switch s3,
++ enum dvbsec_diseqc_switch s4);
++
++/**
++ * Set an analogue value.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param id The id of the analogue value to set.
++ * @param value The value to set.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_set_analog_value(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_analog_id id,
++ uint8_t value);
++
++/**
++ * Set the desired frequency.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param frequency The frequency to set in GHz.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_set_frequency(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ uint32_t frequency);
++
++/**
++ * Set the desired channel.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param channel ID of the channel to set.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_set_channel(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ uint16_t channel);
++
++/**
++ * Halt the satellite positioner.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_halt_satpos(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address);
++
++/**
++ * Disable satellite positioner limits.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_disable_satpos_limits(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address);
++
++/**
++ * Set satellite positioner limits.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_set_satpos_limit(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_direction direction);
++
++/**
++ * Drive satellite positioner motor.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param direction Direction to drive in.
++ * @param mode Drive mode to use
++ * (TIMEOUT=>value is a timeout in seconds, or STEPS=>value is a count of steps to use)
++ * @param value Value associated with the drive mode (range 0->127)
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_drive_satpos_motor(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ enum dvbsec_diseqc_direction direction,
++ enum dvbsec_diseqc_drive_mode mode,
++ uint8_t value);
++
++/**
++ * Store satellite positioner preset id at current position.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param id ID of the preset.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_store_satpos_preset(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ uint8_t id);
++
++/**
++ * Send a satellite positioner to a pre-set position.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param id ID of the preset.
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_goto_satpos_preset(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ uint8_t id);
++
++/**
++ * Recalculate satellite positions based on the current position, using
++ * magic positioner specific values.
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param val1 value1 (range 0->255, pass -1 to ignore).
++ * @param val2 value2 (range 0->255, pass -1 to ignore).
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_recalculate_satpos_positions(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ int val1,
++ int val2);
++
++/**
++ * Send a terrestrial aerial rotator to a particular bearing
++ * (0 degrees = north, fractional angles allowed).
++ *
++ * @param fe Frontend concerned.
++ * @param address Address of the device.
++ * @param angle Angle to rotate to (-256.0 -> 512.0)
++ * @return 0 on success, or nonzero on error.
++ */
++extern int dvbsec_diseqc_goto_rotator_bearing(struct dvbfe_handle *fe,
++ enum dvbsec_diseqc_address address,
++ float angle);
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_cfg.c dvb-apps/lib/libdvbsec/dvbsec_cfg.c
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_cfg.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbsec/dvbsec_cfg.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,366 @@
++/**
++ * dvbsec_cfg (i.e. linuxtv sec format) configuration file support.
++ *
++ * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ *
++ * This library is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License as
++ * published by the Free Software Foundation; either version 2.1 of
++ * the License, or (at your option) any later version.
++ *
++ * This 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 Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#define _GNU_SOURCE
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <ctype.h>
++#include <errno.h>
++#include <linux/types.h>
++#include "dvbsec_cfg.h"
++
++int dvbcfg_issection(char* line, char* sectionname)
++{
++ int len;
++
++ len = strlen(line);
++ if (len < 2)
++ return 0;
++
++ if ((line[0] != '[') || (line[len-1] != ']'))
++ return 0;
++
++ line++;
++ while(isspace(*line))
++ line++;
++
++ if (strncmp(line, sectionname, strlen(sectionname)))
++ return 0;
++
++ return 1;
++}
++
++char* dvbcfg_iskey(char* line, char* keyname)
++{
++ int len = strlen(keyname);
++
++ /* does the key match? */
++ if (strncmp(line, keyname, len))
++ return NULL;
++
++ /* skip keyname & any whitespace */
++ line += len;
++ while(isspace(*line))
++ line++;
++
++ /* should be the '=' sign */
++ if (*line != '=')
++ return 0;
++
++ /* more whitespace skipping */
++ line++;
++ while(isspace(*line))
++ line++;
++
++ /* finally, return the value */
++ return line;
++}
++
++int dvbsec_cfg_load(FILE *f,
++ void *arg,
++ dvbsec_cfg_callback cb)
++{
++ struct dvbsec_config tmpsec;
++ char *linebuf = NULL;
++ size_t line_size = 0;
++ int len;
++ int insection = 0;
++ char *value;
++
++ /* process each line */
++ while((len = getline(&linebuf, &line_size, f)) > 0) {
++ char *line = linebuf;
++
++ /* chop any comments */
++ char *hashpos = strchr(line, '#');
++ if (hashpos)
++ *hashpos = 0;
++ char *lineend = line + strlen(line);
++
++ /* trim the line */
++ while(*line && isspace(*line))
++ line++;
++ while((lineend != line) && isspace(*(lineend-1)))
++ lineend--;
++ *lineend = 0;
++
++ /* skip blank lines */
++ if (*line == 0)
++ continue;
++
++ if (dvbcfg_issection(line, "sec")) {
++ if (insection) {
++ if (cb(arg, &tmpsec))
++ return 0;
++ }
++ insection = 1;
++ memset(&tmpsec, 0, sizeof(tmpsec));
++
++ } else if ((value = dvbcfg_iskey(line, "name")) != NULL) {
++ strncpy(tmpsec.id, value, sizeof(tmpsec.id));
++ } else if ((value = dvbcfg_iskey(line, "switch-frequency")) != NULL) {
++ tmpsec.switch_frequency = atoi(value);
++ } else if ((value = dvbcfg_iskey(line, "lof-lo-v")) != NULL) {
++ tmpsec.lof_lo_v = atoi(value);
++ } else if ((value = dvbcfg_iskey(line, "lof-lo-h")) != NULL) {
++ tmpsec.lof_lo_h = atoi(value);
++ } else if ((value = dvbcfg_iskey(line, "lof-lo-l")) != NULL) {
++ tmpsec.lof_lo_l = atoi(value);
++ } else if ((value = dvbcfg_iskey(line, "lof-lo-r")) != NULL) {
++ tmpsec.lof_lo_r = atoi(value);
++ } else if ((value = dvbcfg_iskey(line, "lof-hi-v")) != NULL) {
++ tmpsec.lof_hi_v = atoi(value);
++ } else if ((value = dvbcfg_iskey(line, "lof-hi-h")) != NULL) {
++ tmpsec.lof_hi_h = atoi(value);
++ } else if ((value = dvbcfg_iskey(line, "lof-hi-l")) != NULL) {
++ tmpsec.lof_hi_l = atoi(value);
++ } else if ((value = dvbcfg_iskey(line, "lof-hi-r")) != NULL) {
++ tmpsec.lof_hi_r = atoi(value);
++ } else if ((value = dvbcfg_iskey(line, "config-type")) != NULL) {
++ if (!strcasecmp(value, "none")) {
++ tmpsec.config_type = DVBSEC_CONFIG_NONE;
++ } else if (!strcasecmp(value, "power")) {
++ tmpsec.config_type = DVBSEC_CONFIG_POWER;
++ } else if (!strcasecmp(value, "standard")) {
++ tmpsec.config_type = DVBSEC_CONFIG_STANDARD;
++ } else if (!strcasecmp(value, "advanced")) {
++ tmpsec.config_type = DVBSEC_CONFIG_ADVANCED;
++ } else {
++ insection = 0;
++ }
++ } else if ((value = dvbcfg_iskey(line, "cmd-lo-v")) != NULL) {
++ strncpy(tmpsec.adv_cmd_lo_v, value, sizeof(tmpsec.adv_cmd_lo_v));
++ } else if ((value = dvbcfg_iskey(line, "cmd-lo-h")) != NULL) {
++ strncpy(tmpsec.adv_cmd_lo_h, value, sizeof(tmpsec.adv_cmd_lo_h));
++ } else if ((value = dvbcfg_iskey(line, "cmd-lo-r")) != NULL) {
++ strncpy(tmpsec.adv_cmd_lo_r, value, sizeof(tmpsec.adv_cmd_lo_r));
++ } else if ((value = dvbcfg_iskey(line, "cmd-lo-l")) != NULL) {
++ strncpy(tmpsec.adv_cmd_lo_l, value, sizeof(tmpsec.adv_cmd_lo_l));
++ } else if ((value = dvbcfg_iskey(line, "cmd-hi-v")) != NULL) {
++ strncpy(tmpsec.adv_cmd_hi_v, value, sizeof(tmpsec.adv_cmd_hi_v));
++ } else if ((value = dvbcfg_iskey(line, "cmd-hi-h")) != NULL) {
++ strncpy(tmpsec.adv_cmd_hi_h, value, sizeof(tmpsec.adv_cmd_hi_h));
++ } else if ((value = dvbcfg_iskey(line, "cmd-hi-r")) != NULL) {
++ strncpy(tmpsec.adv_cmd_hi_r, value, sizeof(tmpsec.adv_cmd_hi_r));
++ } else if ((value = dvbcfg_iskey(line, "cmd-hi-l")) != NULL) {
++ strncpy(tmpsec.adv_cmd_hi_l, value, sizeof(tmpsec.adv_cmd_hi_l));
++ } else {
++ insection = 0;
++ }
++ }
++
++ // output the final section if there is one
++ if (insection) {
++ if (cb(arg, &tmpsec))
++ return 0;
++ }
++
++ if (linebuf)
++ free(linebuf);
++ return 0;
++}
++
++static int dvbsec_cfg_find_callback(void *arg, struct dvbsec_config *sec);
++static int dvbsec_cfg_find_default(const char *sec_id, struct dvbsec_config *sec);
++
++struct findparams {
++ const char *sec_id;
++ struct dvbsec_config *sec_dest;
++};
++
++int dvbsec_cfg_find(const char *config_file,
++ const char *sec_id,
++ struct dvbsec_config *sec)
++{
++ struct findparams findp;
++
++ // clear the structure
++ memset(sec, 0, sizeof(struct dvbsec_config));
++
++ // open the file
++ if (config_file != NULL) {
++ FILE *f = fopen(config_file, "r");
++ if (f == NULL)
++ return -EIO;
++
++ // parse each entry
++ findp.sec_id = sec_id;
++ findp.sec_dest = sec;
++ dvbsec_cfg_load(f, &findp, dvbsec_cfg_find_callback);
++
++ // done
++ fclose(f);
++
++ // find it?
++ if (sec->id[0])
++ return 0;
++ }
++
++ return dvbsec_cfg_find_default(sec_id, sec);
++}
++
++static int dvbsec_cfg_find_callback(void *arg, struct dvbsec_config *sec)
++{
++ struct findparams *findp = arg;
++
++ if (strcmp(findp->sec_id, sec->id))
++ return 0;
++
++ memcpy(findp->sec_dest, sec, sizeof(struct dvbsec_config));
++ return 1;
++}
++
++int dvbsec_cfg_save(FILE *f,
++ struct dvbsec_config *secs,
++ int count)
++{
++ int i;
++
++ for(i=0; i<count; i++) {
++ char *config_type = "";
++ switch(secs[i].config_type) {
++ case DVBSEC_CONFIG_NONE:
++ config_type = "none";
++ break;
++ case DVBSEC_CONFIG_POWER:
++ config_type = "power";
++ break;
++ case DVBSEC_CONFIG_STANDARD:
++ config_type = "standard";
++ break;
++ case DVBSEC_CONFIG_ADVANCED:
++ config_type = "advanced";
++ break;
++ }
++
++ fprintf(f, "[lnb]\n");
++ fprintf(f, "switch-frequency=%i\n", secs[i].switch_frequency);
++ if (secs[i].lof_lo_v)
++ fprintf(f, "lof-lo-v=%i\n", secs[i].lof_lo_v);
++ if (secs[i].lof_lo_h)
++ fprintf(f, "lof-lo-h=%i\n", secs[i].lof_lo_h);
++ if (secs[i].lof_lo_l)
++ fprintf(f, "lof-lo-l=%i\n", secs[i].lof_lo_l);
++ if (secs[i].lof_lo_r)
++ fprintf(f, "lof-lo-r=%i\n", secs[i].lof_lo_r);
++ if (secs[i].lof_hi_v)
++ fprintf(f, "lof-hi-v=%i\n", secs[i].lof_hi_v);
++ if (secs[i].lof_hi_h)
++ fprintf(f, "lof-hi-h=%i\n", secs[i].lof_hi_h);
++ if (secs[i].lof_hi_l)
++ fprintf(f, "lof-hi-l=%i\n", secs[i].lof_hi_l);
++ if (secs[i].lof_hi_r)
++ fprintf(f, "lof-hi-r=%i\n", secs[i].lof_hi_r);
++ fprintf(f, "config-type=%s\n", config_type);
++
++ if (secs[i].config_type == DVBSEC_CONFIG_ADVANCED) {
++ if (secs[i].adv_cmd_lo_h[0])
++ fprintf(f, "cmd-lo-h=%s\n", secs[i].adv_cmd_lo_h);
++ if (secs[i].adv_cmd_lo_v[0])
++ fprintf(f, "cmd-lo-v=%s\n", secs[i].adv_cmd_lo_v);
++ if (secs[i].adv_cmd_lo_r[0])
++ fprintf(f, "cmd-lo-r=%s\n", secs[i].adv_cmd_lo_r);
++ if (secs[i].adv_cmd_lo_l[0])
++ fprintf(f, "cmd-lo-l=%s\n", secs[i].adv_cmd_lo_l);
++ if (secs[i].adv_cmd_hi_h[0])
++ fprintf(f, "cmd-hi-h=%s\n", secs[i].adv_cmd_hi_h);
++ if (secs[i].adv_cmd_hi_v[0])
++ fprintf(f, "cmd-hi-v=%s\n", secs[i].adv_cmd_hi_v);
++ if (secs[i].adv_cmd_hi_r[0])
++ fprintf(f, "cmd-hi-r=%s\n", secs[i].adv_cmd_hi_r);
++ if (secs[i].adv_cmd_hi_l[0])
++ fprintf(f, "cmd-hi-l=%s\n", secs[i].adv_cmd_hi_l);
++ }
++
++ fprintf(f, "\n");
++ }
++
++ return 0;
++}
++
++static struct dvbsec_config defaults[] = {
++
++ {
++ .id = "NULL",
++ .config_type = DVBSEC_CONFIG_STANDARD,
++ },
++ {
++ .id = "UNIVERSAL",
++ .switch_frequency = 11700000,
++ .lof_lo_v = 9750000,
++ .lof_lo_h = 9750000,
++ .lof_hi_v = 10600000,
++ .lof_hi_h = 10600000,
++ .config_type = DVBSEC_CONFIG_STANDARD,
++ },
++ {
++ .id = "DBS",
++ .switch_frequency = 0,
++ .lof_lo_v = 11250000,
++ .lof_lo_h = 11250000,
++ .config_type = DVBSEC_CONFIG_STANDARD,
++ },
++ {
++ .id = "STANDARD",
++ .switch_frequency = 0,
++ .lof_lo_v = 10000000,
++ .lof_lo_h = 10000000,
++ .config_type = DVBSEC_CONFIG_STANDARD,
++ },
++ {
++ .id = "ENHANCED",
++ .switch_frequency = 0,
++ .lof_lo_v = 9750000,
++ .lof_lo_h = 9750000,
++ .config_type = DVBSEC_CONFIG_STANDARD,
++ },
++ {
++ .id = "C-BAND",
++ .switch_frequency = 0,
++ .lof_lo_v = 5150000,
++ .lof_lo_h = 5150000,
++ .config_type = DVBSEC_CONFIG_POWER,
++ },
++ {
++ .id = "C-MULTI",
++ .switch_frequency = 0,
++ .lof_lo_v = 5150000,
++ .lof_lo_h = 5750000,
++ .config_type = DVBSEC_CONFIG_POWER,
++ },
++};
++#define defaults_count (sizeof(defaults) / sizeof(struct dvbsec_config))
++
++static int dvbsec_cfg_find_default(const char *sec_id,
++ struct dvbsec_config *sec)
++{
++ unsigned int i;
++
++ for(i=0; i< defaults_count; i++) {
++ if (!strncmp(sec_id, defaults[i].id, sizeof(defaults[i].id))) {
++ memcpy(sec, &defaults[i], sizeof(struct dvbsec_config));
++ return 0;
++ }
++ }
++
++ return -1;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_cfg.h dvb-apps/lib/libdvbsec/dvbsec_cfg.h
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/dvbsec_cfg.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbsec/dvbsec_cfg.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,203 @@
++/**
++ * dvbsec_cfg (i.e. linuxtv SEC format) configuration file support.
++ *
++ * Copyright (c) 2006 by Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License as
++ * published by the Free Software Foundation; either version 2.1 of
++ * the License, or (at your option) any later version.
++ *
++ * This 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 Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++/**
++ * This library allows SEC (Satellite Equipment Control) configurations
++ * to be retrieved. Each configuration is identified by a unique satellite_id.
++ *
++ * In order to make things as easy as possible for users, there are a set of
++ * defaults hardcoded into the library covering the majority of LNB types. When
++ * these are used, the standard back-compatable sequence defined in the DISEQC
++ * standard will be used - this will suffice for _most_ situations.
++ *
++ * UNIVERSAL - Europe, 10800 to 11800 MHz and 11600 to 12700 Mhz, Dual LO, loband 9750, hiband 10600 MHz.
++ * DBS - Expressvu, North America, 12200 to 12700 MHz, Single LO, 11250 MHz.
++ * STANDARD - 10945 to 11450 Mhz, Single LO, 10000Mhz.
++ * ENHANCED - Astra, 10700 to 11700 MHz, Single LO, 9750MHz.
++ * C-BAND - Big Dish, 3700 to 4200 MHz, Single LO, 5150Mhz.
++ * C-MULTI - Big Dish - Multipoint LNBf, 3700 to 4200 MHz, Dual LO, H:5150MHz, V:5750MHz.
++ *
++ * However, for the power user with a more complex setup, these simple defaults
++ * are not enough. Therefore, it is also possible to define additional SEC
++ * configurations in an external configuration file. This file consists of multiple
++ * entries in the following format:
++ *
++ * [sec]
++ * name=<sec_id>
++ * switch-frequency=<switching frequency (SLOF)>
++ * lof-lo-v=<low band + V + frequency>
++ * lof-lo-h=<low band + H + frequency>
++ * lof-lo-l=<low band + L + frequency>
++ * lof-lo-r=<low band + R + frequency>
++ * lof-hi-v=<high band + V + frequency>
++ * lof-hi-h=<high band + H + frequency>
++ * lof-hi-l=<high band + L + frequency>
++ * lof-hi-r=<high band + R + frequency>
++ * config-type=<none|power|standard|advanced>
++ * cmd-lo-v=<sec sequence>
++ * cmd-lo-h=<sec sequence>
++ * cmd-lo-r=<sec sequence>
++ * cmd-lo-l=<sec sequence>
++ * cmd-hi-v=<sec sequence>
++ * cmd-hi-h=<sec sequence>
++ * cmd-hi-r=<sec sequence>
++ * cmd-hi-l=<sec sequence>
++ *
++ * The sec_id is whatever unique value you wish. If it is the same as one of the hardcoded defaults, the configuration
++ * details from the file will be used instead of the hardcoded ones.
++ * The switch-frequency (or SLOF) indicates the point seperating low band frequencies from high band frequencies.
++ * Set this value to 0 if there is only one frequency band.
++ * The lof-lo-v is the frequency adjustment for V + low band (i.e. less than SLOF), or is used if switch-frequency==0.
++ * The lof-lo-h is the frequency adjustment for H + low band (i.e. less than SLOF), or is used if switch-frequency==0.
++ * The lof-lo-l is the frequency adjustment for L + low band (i.e. less than SLOF), or is used if switch-frequency==0.
++ * The lof-lo-r is the frequency adjustment for R + low band (i.e. less than SLOF), or is used if switch-frequency==0.
++ * The lof-hi-v is the frequency adjustment for V + high band (unused if switch-frequency==0).
++ * The lof-hi-h is the frequency adjustment for H + high band (unused if switch-frequency==0).
++ * The lof-hi-l is the frequency adjustment for L + high band (unused if switch-frequency==0).
++ * The lof-hi-r is the frequency adjustment for R + high band (unused if switch-frequency==0).
++ *
++ * config-type indicates the desired type of SEC command to use, it may be:
++ * none - No SEC commands will be issued (frequency adjustment will still be performed).
++ * power - Only the SEC power is turned on.
++ * standard - The standard DISEQC back compatable sequence will be issued.
++ * advanced - The DISEQC sequence described in the appropriate sec cmd string will be used.
++ *
++ * The cmd-<lo|hi>-<v|h|l|r> describes the SEC cmd string to use in advanced mode for each of the possible combinations of
++ * frequency band and polarisation. If a certain combination is not required, it may be omitted. It consists of a
++ * space seperated combination of commands - those available are as follows:
++ *
++ * tone(<0|1>) - control the 22kHz tone 0:off, 1:on
++ * voltage(<0|13|18>) - control the LNB voltage 0v, 13v, or 18v
++ * toneburst(<a|b>) - issue a toneburst (mini command) for position A or B.
++ * highvoltage(<0|1>) - control high lnb voltage for long cable runs 0: normal, 1:add 1v to LNB voltage.
++ * dishnetworks(<integer>) - issue a dishnetworks legacy command.
++ * wait(<integer>) - wait for the given number of milliseconds.
++ * Dreset(<address>, <0|1>) - control the reset state of a DISEC device, 0:disable reset, 1:enable reset.
++ * Dpower(<address>, <0|1>) - control the power of a DISEC device, 0:off, 1:on.
++ * Dcommitted(<address>, <h|l|x>, <v|h|l|r|x>, <a|b|x>, <a|b|x>) - Write to the committed switches of a DISEC device.
++ * The parameters are for band, polarisation, satelliteposition, switchoption:
++ * band - h:high band, l:low band
++ * polarisation - v: vertical, h:horizontal,r:right,l:left
++ * satelliteposition - a:position A, b: position B
++ * switchoption - a:position A, b: position B
++ * The special value 'x' means "no change to this switch".
++ *
++ * Duncommitted(<address>, <a|b|x>, <a|b|x>, <a|b|x>, <a|b|x>) - Write to the uncommitted switches of the a DISEC device.
++ * The parameters are for switch1, switch2, switch3, switch4, and may be set to position a or b.
++ * The special value 'x' means "no change to this switch".
++ *
++ * Dfrequency(<address>, <frequency in GHz>) - set the frequency of a DISEC device.
++ * Dchannel(<address>, <channel id>) - set the desired channel id of a DISEC device.
++ * Dgotopreset(<address>, <preset id>) - tell a DISEC satellite positioner to move to the given preset id.
++ * Dgotobearing(<address>, <bearing in degrees>) - tell a DISEQC terrestrial rotator to go to the
++ * given bearing (range -256.0 -> 512.0 degrees, fractions allowed).
++ *
++ * In the above DISEQC commands, <address> is the integer (normally in hex format) address of the
++ * diseqc device to communicate with. A list of possiblities is as follows:
++ *
++ * DISEQC_ADDRESS_ANY_DEVICE = 0x00
++ *
++ * DISEQC_ADDRESS_ANY_LNB_SWITCHER_SMATV = 0x10
++ * DISEQC_ADDRESS_LNB = 0x11
++ * DISEQC_ADDRESS_LNB_WITH_LOOP = 0x12
++ * DISEQC_ADDRESS_SWITCHER = 0x14
++ * DISEQC_ADDRESS_SWITCHER_WITH_LOOP = 0x15
++ * DISEQC_ADDRESS_SMATV = 0x18
++ *
++ * DISEQC_ADDRESS_ANY_POLARISER = 0x20
++ * DISEQC_ADDRESS_LINEAR_POLARISER = 0x21
++ *
++ * DISEQC_ADDRESS_ANY_POSITIONER = 0x30
++ * DISEQC_ADDRESS_POLAR_AZIMUTH_POSITIONER = 0x31
++ * DISEQC_ADDRESS_ELEVATION_POSITIONER = 0x32
++ *
++ * DISEQC_ADDRESS_ANY_INSTALLER_AID = 0x40
++ * DISEQC_ADDRESS_SIGNAL_STRENGTH = 0x41
++ *
++ * DISEQC_ADDRESS_ANY_INTERFACE = 0x70
++ * DISEQC_ADDRESS_HEADEND_INTERFACE = 0x71
++ *
++ * DISEQC_ADDRESS_REALLOC_BASE = 0x60
++ * DISEQC_ADDRESS_OEM_BASE = 0xf0
++ */
++
++#ifndef DVBSEC_CFG_H
++#define DVBSEC_CFG_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdio.h>
++#include <stdint.h>
++#include <libdvbsec/dvbsec_api.h>
++
++/**
++ * Callback function used in dvbsec_cfg_load().
++ *
++ * @param arg Private information to caller.
++ * @param channel The current channel details.
++ * @return 0 to continue, 1 to stop loading.
++ */
++typedef int (*dvbsec_cfg_callback)(void *arg, struct dvbsec_config *sec);
++
++/**
++ * Load an SEC file.
++ *
++ * @param f File to load from.
++ * @param arg Value to pass to 'arg' in callback above.
++ * @param cb Callback function called for each sec loaded from the file.
++ * @return 0 on success, or nonzero error code on failure.
++ */
++extern int dvbsec_cfg_load(FILE *f, void *arg,
++ dvbsec_cfg_callback cb);
++
++/**
++ * Convenience function to parse an SEC config file. This will also consult the set
++ * of hardcoded defaults if no config file was supplied, or a match was not found in
++ * the config file.
++ *
++ * @param config_file Config filename to load, or NULL to just check defaults.
++ * @param sec_id ID of SEC configuration.
++ * @param sec Where to put the details if found.
++ * @return 0 on success, nonzero on error.
++ */
++extern int dvbsec_cfg_find(const char *config_file,
++ const char *sec_id,
++ struct dvbsec_config *sec);
++
++/**
++ * Save SEC format config file.
++ *
++ * @param f File to save to.
++ * @param secs Pointer to array of SECs to save.
++ * @param count Number of entries in the above array.
++ * @return 0 on success, or nonzero error code on failure.
++ */
++extern int dvbsec_cfg_save(FILE *f,
++ struct dvbsec_config *secs,
++ int count);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libdvbsec/Makefile dvb-apps/lib/libdvbsec/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libdvbsec/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libdvbsec/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,17 @@
++# Makefile for linuxtv.org dvb-apps/lib/libdvbsec
++
++includes = dvbsec_api.h \
++ dvbsec_cfg.h
++
++objects = dvbsec_api.o \
++ dvbsec_cfg.o
++
++lib_name = libdvbsec
++
++CPPFLAGS += -I../../lib
++
++.PHONY: all
++
++all: library
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/access_descriptor.c dvb-apps/lib/libesg/bootstrap/access_descriptor.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/access_descriptor.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/bootstrap/access_descriptor.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,115 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/bootstrap/access_descriptor.h>
++
++struct esg_access_descriptor *esg_access_descriptor_decode(uint8_t *buffer, uint32_t size) {
++ uint32_t pos;
++ struct esg_access_descriptor *access_descriptor;
++ struct esg_entry *entry;
++ struct esg_entry *last_entry;
++ uint32_t entry_length;
++ uint16_t entry_index;
++ uint8_t ip_index;
++
++ if ((buffer == NULL) || (size <= 2)) {
++ return NULL;
++ }
++
++ pos = 0;
++
++ access_descriptor = (struct esg_access_descriptor *) malloc(sizeof(struct esg_access_descriptor));
++ memset(access_descriptor, 0, sizeof(struct esg_access_descriptor));
++ access_descriptor->entry_list = NULL;
++
++ access_descriptor->n_o_entries = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++
++ last_entry = NULL;
++ for (entry_index = 0; entry_index < access_descriptor->n_o_entries; entry_index++) {
++ entry = (struct esg_entry *) malloc(sizeof(struct esg_entry));
++ memset(entry, 0, sizeof(struct esg_entry));
++ entry->_next = NULL;
++
++ if (last_entry == NULL) {
++ access_descriptor->entry_list = entry;
++ } else {
++ last_entry->_next = entry;
++ }
++ last_entry = entry;
++
++ entry->version = buffer[pos];
++ pos += 1;
++
++ pos += vluimsbf8(buffer + pos, size - pos, &entry_length);
++
++ if (size < pos + entry_length) {
++ esg_access_descriptor_free(access_descriptor);
++ return NULL;
++ }
++
++ entry->multiple_stream_transport = (buffer[pos] & 0x80) ? 1 : 0;
++ entry->ip_version_6 = (buffer[pos] & 0x40) ? 1 : 0;
++ pos += 1;
++
++ entry->provider_id = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++
++ if (entry->ip_version_6) {
++ for (ip_index = 0; ip_index < 16; ip_index++) {
++ entry->source_ip.ipv6[ip_index] = buffer[pos+ip_index];
++ entry->destination_ip.ipv6[ip_index] = buffer[pos+16+ip_index];
++ }
++ pos += 32;
++ } else {
++ for (ip_index = 0; ip_index < 4; ip_index++) {
++ entry->source_ip.ipv4[ip_index] = buffer[pos+ip_index];
++ entry->destination_ip.ipv4[ip_index] = buffer[pos+4+ip_index];
++ }
++ pos += 8;
++ }
++ entry->port = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++
++ entry->tsi = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++ }
++
++ return access_descriptor;
++}
++
++void esg_access_descriptor_free(struct esg_access_descriptor *access_descriptor) {
++ struct esg_entry *entry;
++ struct esg_entry *next_entry;
++
++ if (access_descriptor == NULL) {
++ return;
++ }
++
++ for(entry = access_descriptor->entry_list; entry; entry = next_entry) {
++ next_entry = entry->_next;
++ free(entry);
++ }
++
++ free(access_descriptor);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/access_descriptor.h dvb-apps/lib/libesg/bootstrap/access_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/access_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/bootstrap/access_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,86 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_BOOTSTRAP_ACCESS_DESCRIPTOR_H
++#define _ESG_BOOTSTRAP_ACCESS_DESCRIPTOR_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libesg/types.h>
++
++/**
++ * esg_entry structure.
++ */
++struct esg_entry {
++ uint8_t version;
++ uint8_t multiple_stream_transport;
++ uint8_t ip_version_6;
++ uint16_t provider_id;
++ union esg_ip_address source_ip;
++ union esg_ip_address destination_ip;
++ uint16_t port;
++ uint16_t tsi;
++
++ struct esg_entry *_next;
++};
++
++/**
++ * esg_access_descriptor structure.
++ */
++struct esg_access_descriptor {
++ uint16_t n_o_entries;
++ struct esg_entry *entry_list;
++};
++
++/**
++ * Process an esg_access_descriptor.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_access_descriptor structure, or NULL on error.
++ */
++extern struct esg_access_descriptor *esg_access_descriptor_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_access_descriptor.
++ *
++ * @param esg Pointer to an esg_access_descriptor structure.
++ */
++extern void esg_access_descriptor_free(struct esg_access_descriptor *access_descriptor);
++
++/**
++ * Convenience iterator for esg_entry_list field of an esg_access_descriptor.
++ *
++ * @param access_descriptor The esg_access_descriptor pointer.
++ * @param entry Variable holding a pointer to the current esg_entry.
++ */
++#define esg_access_descriptor_entry_list_for_each(access_descriptor, entry) \
++ for ((entry) = (access_descriptor)->entry_list; \
++ (entry); \
++ (entry) = (entry)->_next)
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/Makefile dvb-apps/lib/libesg/bootstrap/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/bootstrap/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,24 @@
++# Makefile for linuxtv.org dvb-apps/lib/libesg/bootstrap
++
++.PHONY: sub-error-bootstrap
++
++sub-error-bootstrap:
++ $(error You can't use this makefile directly.)
++
++ifneq ($(lib_name),)
++
++objects += bootstrap/access_descriptor.o \
++ bootstrap/provider_discovery_descriptor.o
++
++sub-install += bootstrap
++
++else
++
++includes = access_descriptor.h \
++ provider_discovery_descriptor.h
++
++include ../../../Make.rules
++
++lib_name = libesg/bootstrap
++
++endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/provider_discovery_descriptor.c dvb-apps/lib/libesg/bootstrap/provider_discovery_descriptor.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/provider_discovery_descriptor.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/bootstrap/provider_discovery_descriptor.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,50 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/bootstrap/provider_discovery_descriptor.h>
++
++struct esg_provider_discovery_descriptor *esg_esg_provider_discovery_descriptor_decode(uint8_t *buffer, uint32_t size) {
++ struct esg_provider_discovery_descriptor *provider;
++
++ provider = (struct esg_provider_discovery_descriptor *) malloc(sizeof(struct esg_provider_discovery_descriptor));
++ memset(provider, 0, sizeof(struct esg_provider_discovery_descriptor));
++
++ provider->xml = (uint8_t *) malloc(size);
++ memcpy(provider->xml, buffer, size);
++
++ provider->size = size;
++
++ return provider;
++}
++
++void esg_provider_discovery_descriptor_free(struct esg_provider_discovery_descriptor *provider) {
++ if (provider == NULL) {
++ return;
++ }
++
++ if (provider->xml) {
++ free(provider->xml);
++ }
++
++ free(provider);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/provider_discovery_descriptor.h dvb-apps/lib/libesg/bootstrap/provider_discovery_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/bootstrap/provider_discovery_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/bootstrap/provider_discovery_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,59 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_BOOTSTRAP_PROVIDER_DISCOVERY_DESCRIPTOR_H
++#define _ESG_BOOTSTRAP_PROVIDER_DISCOVERY_DESCRIPTOR_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_provider_discovery_descriptor structure.
++ */
++struct esg_provider_discovery_descriptor {
++ uint8_t *xml;
++ uint32_t size;
++};
++
++/**
++ * Process an esg_provider_discovery_descriptor.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_provider_discovery_descriptor structure, or NULL on error.
++ */
++extern struct esg_provider_discovery_descriptor *esg_esg_provider_discovery_descriptor_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_provider_discovery_descriptor.
++ *
++ * @param esg Pointer to an esg_provider_discovery_descriptor structure.
++ */
++extern void esg_provider_discovery_descriptor_free(struct esg_provider_discovery_descriptor *provider);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/auxiliary_data.h dvb-apps/lib/libesg/encapsulation/auxiliary_data.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/auxiliary_data.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/auxiliary_data.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,62 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_ENCAPSULATION_AUXILIARY_DATA_H
++#define _ESG_ENCAPSULATION_AUXILIARY_DATA_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_any_attribute structure.
++ */
++struct esg_any_attribute {
++ uint8_t version_id;
++ uint8_t *extension;
++
++ struct esg_any_attribure *_next;
++};
++
++/**
++ * esg_binary_header structure.
++ */
++struct esg_binary_header {
++ uint16_t encoding_metadatauri_mimetype;
++ struct esg_any_attribute *any_attribute_list;
++};
++
++/**
++ * esg_encapsulated_aux_data struct.
++ */
++struct esg_encapsulated_aux_data {
++ struct esg_binary_header *binary_header;
++ uint32_t aux_data_length;
++ uint8_t aux_data;
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/container.c dvb-apps/lib/libesg/encapsulation/container.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/container.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/container.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,206 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/encapsulation/container.h>
++#include <libesg/encapsulation/fragment_management_information.h>
++#include <libesg/encapsulation/data_repository.h>
++#include <libesg/encapsulation/string_repository.h>
++#include <libesg/representation/init_message.h>
++#include <libesg/transport/session_partition_declaration.h>
++
++struct esg_container *esg_container_decode(uint8_t *buffer, uint32_t size) {
++ uint32_t pos;
++ struct esg_container *container;
++ struct esg_container_structure *structure;
++ struct esg_container_structure *last_structure;
++ uint8_t structure_index;
++
++ if ((buffer == NULL) || (size <= 1)) {
++ return NULL;
++ }
++
++ pos = 0;
++
++ container = (struct esg_container *) malloc(sizeof(struct esg_container));
++ memset(container, 0, sizeof(struct esg_container));
++
++ // Container header
++ container->header = (struct esg_container_header *) malloc(sizeof(struct esg_container_header));
++ memset(container->header, 0, sizeof(struct esg_container_header));
++
++ container->header->num_structures = buffer[pos];
++ pos += 1;
++
++ if (size < pos + (container->header->num_structures * 8)) {
++ esg_container_free(container);
++ return NULL;
++ }
++
++ last_structure = NULL;
++ for (structure_index = 0; structure_index < container->header->num_structures; structure_index++) {
++ structure = (struct esg_container_structure *) malloc(sizeof(struct esg_container_structure));
++ memset(structure, 0, sizeof(struct esg_container_structure));
++ structure->_next = NULL;
++
++ if (last_structure == NULL) {
++ container->header->structure_list = structure;
++ } else {
++ last_structure->_next = structure;
++ }
++ last_structure = structure;
++
++ structure->type = buffer[pos];
++ pos += 1;
++
++ structure->id = buffer[pos];
++ pos += 1;
++
++ structure->ptr = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
++ pos += 3;
++
++ structure->length = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
++ pos += 3;
++
++ if (size < (structure->ptr + structure->length)) {
++ esg_container_free(container);
++ return NULL;
++ }
++
++ // Decode structure
++ switch (structure->type) {
++ case 0x01: {
++ switch (structure->id) {
++ case 0x00: {
++ structure->data = (void *) esg_encapsulation_structure_decode(buffer + structure->ptr, structure->length);
++ break;
++ }
++ default: {
++ esg_container_free(container);
++ return NULL;
++ }
++ }
++ break;
++ }
++ case 0x02: {
++ switch (structure->id) {
++ case 0x00: {
++ structure->data = (void *) esg_string_repository_decode(buffer + structure->ptr, structure->length);
++ break;
++ }
++ default: {
++ esg_container_free(container);
++ return NULL;
++ }
++ }
++ break;
++ }
++ case 0x03: {
++ //TODO
++ break;
++ }
++ case 0x04: {
++ //TODO
++ break;
++ }
++ case 0x05: {
++ //TODO
++ break;
++ }
++ case 0xE0: {
++ switch (structure->id) {
++ case 0x00: {
++ structure->data = (void *) esg_data_repository_decode(buffer + structure->ptr, structure->length);
++ break;
++ }
++ default: {
++ esg_container_free(container);
++ return NULL;
++ }
++ }
++ break;
++ }
++ case 0xE1: {
++ switch (structure->id) {
++ case 0xFF: {
++ structure->data = (void *) esg_session_partition_declaration_decode(buffer + structure->ptr, structure->length);
++ break;
++ }
++ default: {
++ esg_container_free(container);
++ return NULL;
++ }
++ }
++ break;
++ }
++ case 0xE2: {
++ switch (structure->id) {
++ case 0x00: {
++ structure->data = (void *) esg_init_message_decode(buffer + structure->ptr, structure->length);
++ break;
++ }
++ default: {
++ esg_container_free(container);
++ return NULL;
++ }
++ }
++ break;
++ }
++ default: {
++ esg_container_free(container);
++ return NULL;
++ }
++ }
++ }
++
++ // Container structure body
++ container->structure_body_ptr = pos;
++ container->structure_body_length = size - pos;
++ container->structure_body = (uint8_t *) malloc(size - pos);
++ memcpy(container->structure_body, buffer + pos, size - pos);
++
++ return container;
++}
++
++void esg_container_free(struct esg_container *container) {
++ struct esg_container_structure *structure;
++ struct esg_container_structure *next_structure;
++
++ if (container == NULL) {
++ return;
++ }
++
++ if (container->header) {
++ for(structure = container->header->structure_list; structure; structure = next_structure) {
++ next_structure = structure->_next;
++ free(structure);
++ }
++
++ free(container->header);
++ }
++
++ if (container->structure_body) {
++ free(container->structure_body);
++ }
++
++ free(container);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/container.h dvb-apps/lib/libesg/encapsulation/container.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/container.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/container.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,94 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_ENCAPSULATION_CONTAINER_H
++#define _ESG_ENCAPSULATION_CONTAINER_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_container_structure structure.
++ */
++struct esg_container_structure {
++ uint8_t type;
++ uint8_t id;
++ uint32_t ptr;
++ uint32_t length;
++
++ void *data;
++
++ struct esg_container_structure *_next;
++};
++
++/**
++ * esg_container_header structure.
++ */
++struct esg_container_header {
++ uint8_t num_structures;
++ struct esg_container_structure *structure_list;
++};
++
++/**
++ * esg_container structure
++ */
++struct esg_container {
++ struct esg_container_header *header;
++ uint32_t structure_body_ptr;
++ uint32_t structure_body_length;
++ uint8_t *structure_body;
++};
++
++/**
++ * Process an esg_container.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_container structure, or NULL on error.
++ */
++extern struct esg_container *esg_container_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_container.
++ *
++ * @param container Pointer to an esg_container structure.
++ */
++extern void esg_container_free(struct esg_container *container);
++
++/**
++ * Convenience iterator for structure_list field of an esg_container_header.
++ *
++ * @param container The esg_container_header pointer.
++ * @param structure Variable holding a pointer to the current esg_container_structure.
++ */
++#define esg_container_header_structure_list_for_each(header, structure) \
++ for ((structure) = (header)->structure_list; \
++ (structure); \
++ (structure) = (structure)->_next)
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/data_repository.c dvb-apps/lib/libesg/encapsulation/data_repository.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/data_repository.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/data_repository.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,53 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/encapsulation/data_repository.h>
++
++struct esg_data_repository *esg_data_repository_decode(uint8_t *buffer, uint32_t size) {
++ struct esg_data_repository *data_repository;
++
++ if ((buffer == NULL) || (size <= 0)) {
++ return NULL;
++ }
++
++ data_repository = (struct esg_data_repository *) malloc(sizeof(struct esg_data_repository));
++ memset(data_repository, 0, sizeof(struct esg_data_repository));
++
++ data_repository->length = size;
++ data_repository->data = (uint8_t *) malloc(size);
++ memcpy(data_repository->data, buffer, size);
++
++ return data_repository;
++}
++
++void esg_data_repository_free(struct esg_data_repository *data_repository) {
++ if (data_repository == NULL) {
++ return;
++ }
++
++ if (data_repository->data) {
++ free(data_repository->data);
++ }
++
++ free(data_repository);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/data_repository.h dvb-apps/lib/libesg/encapsulation/data_repository.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/data_repository.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/data_repository.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,59 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_ENCAPSULATION_DATA_REPOSITORY_H
++#define _ESG_ENCAPSULATION_DATA_REPOSITORY_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_data_repository structure.
++ */
++struct esg_data_repository {
++ uint32_t length;
++ uint8_t *data;
++};
++
++/**
++ * Process an esg_data_repository.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_data_repository structure, or NULL on error.
++ */
++extern struct esg_data_repository *esg_data_repository_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_data_repository.
++ *
++ * @param data_repository Pointer to an esg_data_repository structure.
++ */
++extern void esg_data_repository_free(struct esg_data_repository *data_repository);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/fragment_management_information.c dvb-apps/lib/libesg/encapsulation/fragment_management_information.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/fragment_management_information.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/fragment_management_information.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,118 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/encapsulation/fragment_management_information.h>
++
++struct esg_encapsulation_structure *esg_encapsulation_structure_decode(uint8_t *buffer, uint32_t size) {
++ uint32_t pos;
++ struct esg_encapsulation_structure *structure;
++ struct esg_encapsulation_entry *entry;
++ struct esg_encapsulation_entry *last_entry;
++
++ if ((buffer == NULL) || (size <= 2)) {
++ return NULL;
++ }
++
++ pos = 0;
++
++ structure = (struct esg_encapsulation_structure *) malloc(sizeof(struct esg_encapsulation_structure));
++ memset(structure, 0, sizeof(struct esg_encapsulation_structure));
++ structure->entry_list = NULL;
++
++ // Encapsulation header
++ structure->header = (struct esg_encapsulation_header *) malloc(sizeof(struct esg_encapsulation_header));
++ // buffer[pos] reserved
++ structure->header->fragment_reference_format = buffer[pos+1];
++ pos += 2;
++
++ // Encapsulation entry list
++ last_entry = NULL;
++ while (size > pos) {
++ entry = (struct esg_encapsulation_entry *) malloc(sizeof(struct esg_encapsulation_entry));
++ memset(entry, 0, sizeof(struct esg_encapsulation_entry));
++ entry->_next = NULL;
++
++ if (last_entry == NULL) {
++ structure->entry_list = entry;
++ } else {
++ last_entry->_next = entry;
++ }
++ last_entry = entry;
++
++ // Fragment reference
++ switch (structure->header->fragment_reference_format) {
++ case 0x21: {
++ entry->fragment_reference = (struct esg_fragment_reference *) malloc(sizeof(struct esg_fragment_reference));
++ memset(entry->fragment_reference, 0, sizeof(struct esg_fragment_reference));
++
++ entry->fragment_reference->fragment_type = buffer[pos];
++ pos += 1;
++
++ entry->fragment_reference->data_repository_offset = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
++ pos += 3;
++
++ break;
++ }
++ default: {
++ esg_encapsulation_structure_free(structure);
++ return NULL;
++ }
++ }
++
++ // Fragment version & id
++ entry->fragment_version = buffer[pos];
++ pos += 1;
++
++ entry->fragment_id = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
++ pos += 3;
++ }
++
++ return structure;
++}
++
++void esg_encapsulation_structure_free(struct esg_encapsulation_structure *structure) {
++ struct esg_encapsulation_entry *entry;
++ struct esg_encapsulation_entry *next_entry;
++
++ if (structure == NULL) {
++ return;
++ }
++
++ if (structure->header) {
++ free(structure->header);
++ }
++
++ if (structure->entry_list) {
++ for(entry = structure->entry_list; entry; entry = next_entry) {
++ next_entry = entry->_next;
++ if (entry->fragment_reference) {
++ free(entry->fragment_reference);
++ }
++ free(entry);
++ }
++
++ free(structure->entry_list);
++ }
++
++ free(structure);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/fragment_management_information.h dvb-apps/lib/libesg/encapsulation/fragment_management_information.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/fragment_management_information.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/fragment_management_information.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,96 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_ENCAPSULATION_FRAGMENT_MANAGEMENT_INFORMATION_H
++#define _ESG_ENCAPSULATION_FRAGMENT_MANAGEMENT_INFORMATION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_encapsulation_header structure.
++ */
++struct esg_encapsulation_header {
++ uint8_t fragment_reference_format;
++};
++
++/**
++ * esg_fragment_reference structure.
++ */
++struct esg_fragment_reference {
++ uint8_t fragment_type;
++ uint32_t data_repository_offset;
++};
++
++/**
++ * esg_encapsulation_entry structure.
++ */
++struct esg_encapsulation_entry {
++ struct esg_fragment_reference *fragment_reference;
++ uint8_t fragment_version;
++ uint32_t fragment_id;
++
++ struct esg_encapsulation_entry *_next;
++};
++
++/**
++ * esg_encapsulation_structure structure.
++ */
++struct esg_encapsulation_structure {
++ struct esg_encapsulation_header *header;
++ struct esg_encapsulation_entry *entry_list;
++};
++
++/**
++ * Process an esg_encapsulation_structure.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_encapsulation_structure structure, or NULL on error.
++ */
++extern struct esg_encapsulation_structure *esg_encapsulation_structure_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_encapsulation_structure.
++ *
++ * @param container Pointer to an esg_container structure.
++ */
++extern void esg_encapsulation_structure_free(struct esg_encapsulation_structure *structure);
++
++/**
++ * Convenience iterator for entry_list field of an esg_encapsulation_structure.
++ *
++ * @param structure The esg_encapsulation_structure pointer.
++ * @param entry Variable holding a pointer to the current esg_encapsulation_entry.
++ */
++#define esg_encapsulation_structure_entry_list_for_each(structure, entry) \
++ for ((entry) = (structure)->entry_list; \
++ (entry); \
++ (entry) = (entry)->_next)
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/Makefile dvb-apps/lib/libesg/encapsulation/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,28 @@
++# Makefile for linuxtv.org dvb-apps/lib/libesg/encapsulation
++
++.PHONY: sub-error-encapsulation
++
++sub-error-encapsulation:
++ $(error You can't use this makefile directly.)
++
++ifneq ($(lib_name),)
++
++objects += encapsulation/container.o \
++ encapsulation/fragment_management_information.o \
++ encapsulation/data_repository.o \
++ encapsulation/string_repository.o
++
++sub-install += encapsulation
++
++else
++
++includes = container.h \
++ fragment_management_information.h \
++ data_repository.h \
++ string_repository.h
++
++include ../../../Make.rules
++
++lib_name = libesg/encapsulation
++
++endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/string_repository.c dvb-apps/lib/libesg/encapsulation/string_repository.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/string_repository.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/string_repository.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,54 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/encapsulation/string_repository.h>
++
++struct esg_string_repository *esg_string_repository_decode(uint8_t *buffer, uint32_t size) {
++ struct esg_string_repository *string_repository;
++
++ if ((buffer == NULL) || (size <= 1)) {
++ return NULL;
++ }
++
++ string_repository = (struct esg_string_repository *) malloc(sizeof(struct esg_string_repository));
++ memset(string_repository, 0, sizeof(struct esg_string_repository));
++
++ string_repository->encoding_type = buffer[0];
++ string_repository->length = size-1;
++ string_repository->data = (uint8_t *) malloc(size-1);
++ memcpy(string_repository->data, buffer+1, size-1);
++
++ return string_repository;
++}
++
++void esg_string_repository_free(struct esg_string_repository *string_repository) {
++ if (string_repository == NULL) {
++ return;
++ }
++
++ if (string_repository->data) {
++ free(string_repository->data);
++ }
++
++ free(string_repository);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/string_repository.h dvb-apps/lib/libesg/encapsulation/string_repository.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/encapsulation/string_repository.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/encapsulation/string_repository.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,60 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_ENCAPSULATION_STRING_REPOSITORY_H
++#define _ESG_ENCAPSULATION_STRING_REPOSITORY_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_string_repository structure.
++ */
++struct esg_string_repository {
++ uint8_t encoding_type;
++ uint32_t length;
++ uint8_t *data;
++};
++
++/**
++ * Process an esg_string_repository.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_string_repository structure, or NULL on error.
++ */
++extern struct esg_string_repository *esg_string_repository_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_string_repository.
++ *
++ * @param data_repository Pointer to an esg_string_repository structure.
++ */
++extern void esg_string_repository_free(struct esg_string_repository *string_repository);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/Makefile dvb-apps/lib/libesg/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,27 @@
++# Makefile for linuxtv.org dvb-apps/lib/libesg
++
++includes = types.h
++
++objects = types.o
++
++lib_name = libesg
++
++CPPFLAGS += -I../../lib
++
++.PHONY: all
++
++all: library
++
++include bootstrap/Makefile
++include encapsulation/Makefile
++include representation/Makefile
++include transport/Makefile
++
++.PHONY: $(sub-install)
++
++install:: $(sub-install)
++
++$(sub-install):
++ $(MAKE) -C $@ install
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/bim_decoder_init.h dvb-apps/lib/libesg/representation/bim_decoder_init.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/bim_decoder_init.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/representation/bim_decoder_init.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,40 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_REPRESENTATION_BIM_DECODER_INIT_H
++#define _ESG_REPRESENTATION_BIM_DECODER_INIT_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++/**
++ * esg_bim_decoder_init structure.
++ */
++struct esg_bim_decoder_init {
++// TODO
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h dvb-apps/lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/representation/encapsulated_bim_esg_xml_fragment.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,40 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_REPRESENTATION_ENCAPSULATED_BIM_ESG_XML_FRAGMENT_H
++#define _ESG_REPRESENTATION_ENCAPSULATED_BIM_ESG_XML_FRAGMENT_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++/**
++ * esg_encapsulated_bim_esg_xml_fragment structure.
++ */
++struct esg_encapsulated_bim_esg_xml_fragment {
++ //TODO
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c dvb-apps/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,70 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/types.h>
++#include <libesg/representation/encapsulated_textual_esg_xml_fragment.h>
++
++struct esg_encapsulated_textual_esg_xml_fragment *esg_encapsulated_textual_esg_xml_fragment_decode(uint8_t *buffer, uint32_t size) {
++ struct esg_encapsulated_textual_esg_xml_fragment *esg_xml_fragment;
++ uint32_t pos;
++ uint32_t length;
++ uint8_t offset_pos;
++
++ if ((buffer == NULL) || (size <= 0)) {
++ return NULL;
++ }
++
++ pos = 0;
++
++ esg_xml_fragment = (struct esg_encapsulated_textual_esg_xml_fragment *) malloc(sizeof(struct esg_encapsulated_textual_esg_xml_fragment));
++ memset(esg_xml_fragment, 0, sizeof(struct esg_encapsulated_textual_esg_xml_fragment));
++
++ offset_pos = vluimsbf8(buffer+pos+2, size-pos-2, &length);
++
++ if (size-pos-2 < offset_pos+length) {
++ esg_encapsulated_textual_esg_xml_fragment_free(esg_xml_fragment);
++ return NULL;
++ }
++
++ esg_xml_fragment->esg_xml_fragment_type = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2+offset_pos;
++
++ esg_xml_fragment->data_length = length;
++ esg_xml_fragment->data = (uint8_t *) malloc(length);
++ memcpy(esg_xml_fragment->data, buffer+pos, length);
++ pos += length;
++
++ return esg_xml_fragment;
++}
++
++void esg_encapsulated_textual_esg_xml_fragment_free(struct esg_encapsulated_textual_esg_xml_fragment *esg_xml_fragment) {
++ if (esg_xml_fragment == NULL) {
++ return;
++ }
++
++ if (esg_xml_fragment->data) {
++ free(esg_xml_fragment->data);
++ }
++
++ free(esg_xml_fragment);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h dvb-apps/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/representation/encapsulated_textual_esg_xml_fragment.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,60 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_REPRESENTATION_ENCAPSULATED_TEXTUAL_ESG_XML_FRAGMENT_H
++#define _ESG_REPRESENTATION_ENCAPSULATED_TEXTUAL_ESG_XML_FRAGMENT_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_encapsulated_textual_esg_xml_fragment structure.
++ */
++struct esg_encapsulated_textual_esg_xml_fragment {
++ uint16_t esg_xml_fragment_type;
++ uint32_t data_length;
++ uint8_t *data;
++};
++
++/**
++ * Process an esg_encapsulated_textual_esg_xml_fragment.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_encapsulated_textual_esg_xml_fragment structure, or NULL on error.
++ */
++extern struct esg_encapsulated_textual_esg_xml_fragment *esg_encapsulated_textual_esg_xml_fragment_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_encapsulated_textual_esg_xml_fragment.
++ *
++ * @param data_repository Pointer to an esg_encapsulated_textual_esg_xml_fragment structure.
++ */
++extern void esg_encapsulated_textual_esg_xml_fragment_free(struct esg_encapsulated_textual_esg_xml_fragment *esg_xml_fragment);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/init_message.c dvb-apps/lib/libesg/representation/init_message.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/init_message.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/representation/init_message.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,112 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/representation/init_message.h>
++#include <libesg/representation/textual_decoder_init.h>
++#include <libesg/representation/bim_decoder_init.h>
++
++struct esg_init_message *esg_init_message_decode(uint8_t *buffer, uint32_t size) {
++ uint32_t pos;
++ struct esg_init_message *init_message;
++
++ if ((buffer == NULL) || (size <= 3)) {
++ return NULL;
++ }
++
++ pos = 0;
++
++ init_message = (struct esg_init_message *) malloc(sizeof(struct esg_init_message));
++ memset(init_message, 0, sizeof(struct esg_init_message));
++
++ init_message->encoding_version = buffer[pos];
++ pos += 1;
++
++ init_message->indexing_flag = (buffer[pos] & 0x80) >> 7;
++ pos += 1;
++
++ init_message->decoder_init_ptr = buffer[pos];
++ pos += 1;
++
++ if (init_message->indexing_flag) {
++ init_message->indexing_version = buffer[pos];
++ pos += 1;
++ }
++
++ switch (init_message->encoding_version) {
++ case 0xF1: {
++ struct esg_bim_encoding_parameters *encoding_parameters = (struct esg_bim_encoding_parameters *) malloc(sizeof(struct esg_bim_encoding_parameters));
++ memset(encoding_parameters, 0, sizeof(struct esg_bim_encoding_parameters));
++ init_message->encoding_parameters = (void *) encoding_parameters;
++
++ encoding_parameters->buffer_size_flag = (buffer[pos] & 0x80) >> 7;
++ encoding_parameters->position_code_flag = (buffer[pos] & 0x40) >> 6;
++ pos += 1;
++
++ encoding_parameters->character_encoding = buffer[pos];
++ pos += 1;
++
++ if (encoding_parameters->buffer_size_flag) {
++ encoding_parameters->buffer_size = (buffer[pos] << 16) | (buffer[pos+1] << 8) | buffer[pos+2];
++ pos += 3;
++ }
++
++// TODO
++// init_message->decoder_init = (void *) esg_bim_decoder_init_decode(buffer + init_message->decoder_init_ptr, size - init_message->decoder_init_ptr);
++ break;
++ }
++ case 0xF2:
++ case 0xF3: {
++ struct esg_textual_encoding_parameters *encoding_parameters = (struct esg_textual_encoding_parameters *) malloc(sizeof(struct esg_textual_encoding_parameters));
++ memset(encoding_parameters, 0, sizeof(struct esg_textual_encoding_parameters));
++ init_message->encoding_parameters = (void *) encoding_parameters;
++
++ encoding_parameters->character_encoding = buffer[pos];
++ pos += 1;
++
++ init_message->decoder_init = (void *) esg_textual_decoder_init_decode(buffer + init_message->decoder_init_ptr, size - init_message->decoder_init_ptr);
++ break;
++ }
++ default: {
++ esg_init_message_free(init_message);
++ return NULL;
++ }
++ }
++
++ return init_message;
++}
++
++void esg_init_message_free(struct esg_init_message *init_message) {
++ if (init_message == NULL) {
++ return;
++ }
++
++ if (init_message->encoding_parameters) {
++ free(init_message->encoding_parameters);
++ }
++
++ if (init_message->decoder_init) {
++ free(init_message->decoder_init);
++ }
++
++ free(init_message);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/init_message.h dvb-apps/lib/libesg/representation/init_message.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/init_message.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/representation/init_message.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,80 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_REPRESENTATION_INIT_MESSAGE_H
++#define _ESG_REPRESENTATION_INIT_MESSAGE_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_textual_encoding_parameters structure.
++ */
++struct esg_textual_encoding_parameters {
++ uint8_t character_encoding;
++};
++
++/**
++ * esg_bim_encoding_parameters structure.
++ */
++struct esg_bim_encoding_parameters {
++ uint8_t buffer_size_flag;
++ uint8_t position_code_flag;
++ uint8_t character_encoding;
++ uint32_t buffer_size; // if buffer_size_flag
++};
++
++/**
++ * esg_init_message structure.
++ */
++struct esg_init_message {
++ uint8_t encoding_version;
++ uint8_t indexing_flag;
++ uint8_t decoder_init_ptr;
++ uint8_t indexing_version; // if indexing_flag
++ void *encoding_parameters;
++ void *decoder_init;
++};
++
++/**
++ * Process an esg_init_message.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_string_repository structure, or NULL on error.
++ */
++extern struct esg_init_message *esg_init_message_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_init_message.
++ *
++ * @param init_message Pointer to an esg_init_message structure.
++ */
++extern void esg_init_message_free(struct esg_init_message *init_message);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/Makefile dvb-apps/lib/libesg/representation/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/representation/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,26 @@
++# Makefile for linuxtv.org dvb-apps/lib/libesg/representation
++
++.PHONY: sub-error-representation
++
++sub-error-representation:
++ $(error You can't use this makefile directly.)
++
++ifneq ($(lib_name),)
++
++objects += representation/encapsulated_textual_esg_xml_fragment.o \
++ representation/init_message.o \
++ representation/textual_decoder_init.o
++
++sub-install += representation
++
++else
++
++includes = encapsulated_textual_esg_xml_fragment.h \
++ init_message.h \
++ textual_decoder_init.h
++
++include ../../../Make.rules
++
++lib_name = libesg/representation
++
++endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/textual_decoder_init.c dvb-apps/lib/libesg/representation/textual_decoder_init.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/textual_decoder_init.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/representation/textual_decoder_init.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,128 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/types.h>
++#include <libesg/representation/textual_decoder_init.h>
++
++struct esg_textual_decoder_init *esg_textual_decoder_init_decode(uint8_t *buffer, uint32_t size) {
++ uint32_t pos;
++ struct esg_textual_decoder_init *decoder_init;
++ struct esg_namespace_prefix *namespace_prefix;
++ struct esg_namespace_prefix *last_namespace_prefix;
++ struct esg_xml_fragment_type *xml_fragment_type;
++ struct esg_xml_fragment_type *last_xml_fragment_type;
++ uint32_t decoder_init_length;
++ uint8_t num_index;
++
++ if ((buffer == NULL) || (size <= 1)) {
++ return NULL;
++ }
++
++ pos = 0;
++
++ decoder_init = (struct esg_textual_decoder_init *) malloc(sizeof(struct esg_textual_decoder_init));
++ memset(decoder_init, 0, sizeof(struct esg_textual_decoder_init));
++ decoder_init->namespace_prefix_list = NULL;
++ decoder_init->xml_fragment_type_list = NULL;
++
++ decoder_init->version = buffer[pos];
++ pos += 1;
++
++ pos += vluimsbf8(buffer+pos, size-pos, &decoder_init_length);
++
++ if (size < pos + decoder_init_length) {
++ esg_textual_decoder_init_free(decoder_init);
++ return NULL;
++ }
++
++ decoder_init->num_namespace_prefixes = buffer[pos];
++ pos += 1;
++
++ last_namespace_prefix = NULL;
++ for (num_index = 0; num_index < decoder_init->num_namespace_prefixes; num_index++) {
++ namespace_prefix = (struct esg_namespace_prefix *) malloc(sizeof(struct esg_namespace_prefix));
++ memset(namespace_prefix, 0, sizeof(struct esg_namespace_prefix));
++ namespace_prefix->_next = NULL;
++
++ if (last_namespace_prefix == NULL) {
++ decoder_init->namespace_prefix_list = namespace_prefix;
++ } else {
++ last_namespace_prefix->_next = namespace_prefix;
++ }
++ last_namespace_prefix = namespace_prefix;
++
++ namespace_prefix->prefix_string_ptr = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++
++ namespace_prefix->namespace_uri_ptr = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++ }
++
++ decoder_init->num_fragment_types = buffer[pos];
++ pos += 1;
++
++ last_xml_fragment_type = NULL;
++ for (num_index = 0; num_index < decoder_init->num_fragment_types; num_index++) {
++ xml_fragment_type = (struct esg_xml_fragment_type *) malloc(sizeof(struct esg_xml_fragment_type));
++ memset(xml_fragment_type, 0, sizeof(struct esg_xml_fragment_type));
++ xml_fragment_type->_next = NULL;
++
++ if (last_xml_fragment_type == NULL) {
++ decoder_init->xml_fragment_type_list = xml_fragment_type;
++ } else {
++ last_xml_fragment_type->_next = xml_fragment_type;
++ }
++ last_xml_fragment_type = xml_fragment_type;
++
++ xml_fragment_type->xpath_ptr = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++
++ xml_fragment_type->xml_fragment_type = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++ }
++
++ return decoder_init;
++}
++
++void esg_textual_decoder_init_free(struct esg_textual_decoder_init *decoder_init) {
++ struct esg_namespace_prefix *namespace_prefix;
++ struct esg_namespace_prefix *next_namespace_prefix;
++ struct esg_xml_fragment_type *xml_fragment_type;
++ struct esg_xml_fragment_type *next_xml_fragment_type;
++
++ if (decoder_init == NULL) {
++ return;
++ }
++
++ for(namespace_prefix = decoder_init->namespace_prefix_list; namespace_prefix; namespace_prefix = next_namespace_prefix) {
++ next_namespace_prefix = namespace_prefix->_next;
++ free(namespace_prefix);
++ }
++
++ for(xml_fragment_type = decoder_init->xml_fragment_type_list; xml_fragment_type; xml_fragment_type = next_xml_fragment_type) {
++ next_xml_fragment_type = xml_fragment_type->_next;
++ free(xml_fragment_type);
++ }
++
++ free(decoder_init);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/representation/textual_decoder_init.h dvb-apps/lib/libesg/representation/textual_decoder_init.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/representation/textual_decoder_init.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/representation/textual_decoder_init.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,104 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_REPRESENTATION_TEXTUAL_DECODER_INIT_H
++#define _ESG_REPRESENTATION_TEXTUAL_DECODER_INIT_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_namespace_prefix structure.
++ */
++struct esg_namespace_prefix {
++ uint16_t prefix_string_ptr;
++ uint16_t namespace_uri_ptr;
++
++ struct esg_namespace_prefix *_next;
++};
++
++/**
++ * esg_fragment_type structure.
++ */
++struct esg_xml_fragment_type {
++ uint16_t xpath_ptr;
++ uint16_t xml_fragment_type;
++
++ struct esg_xml_fragment_type *_next;
++};
++
++/**
++ * esg_textual_decoder_init structure.
++ */
++struct esg_textual_decoder_init {
++ uint8_t version;
++ uint8_t num_namespace_prefixes;
++ struct esg_namespace_prefix *namespace_prefix_list;
++ uint8_t num_fragment_types;
++ struct esg_xml_fragment_type *xml_fragment_type_list;
++};
++
++/**
++ * Process an esg_textual_decoder_init.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_textual_decoder_init structure, or NULL on error.
++ */
++extern struct esg_textual_decoder_init *esg_textual_decoder_init_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_textual_decoder_init.
++ *
++ * @param decoder_init Pointer to an esg_textual_decoder_init structure.
++ */
++extern void esg_textual_decoder_init_free(struct esg_textual_decoder_init *decoder_init);
++
++/**
++ * Convenience iterator for namespace_prefix_list field of an esg_textual_decoder_init.
++ *
++ * @param decoder_init The esg_textual_decoder_init pointer.
++ * @param namespace_prefix Variable holding a pointer to the current esg_namespace_prefix.
++ */
++#define esg_textual_decoder_namespace_prefix_list_for_each(decoder_init, namespace_prefix) \
++ for ((namespace_prefix) = (decoder_init)->namespace_prefix_list; \
++ (namespace_prefix); \
++ (namespace_prefix) = (namespace_prefix)->_next)
++
++/**
++ * Convenience iterator for xml_fragment_type_list field of an esg_textual_decoder_init.
++ *
++ * @param decoder_init The esg_textual_decoder_init pointer.
++ * @param xml_fragment_type Variable holding a pointer to the current esg_xml_fragment_type.
++ */
++#define esg_textual_decoder_xml_fragment_type_list_for_each(decoder_init, xml_fragment_type) \
++ for ((xml_fragment_type) = (decoder_init)->xml_fragment_type_list; \
++ (xml_fragment_type); \
++ (xml_fragment_type) = (xml_fragment_type)->_next)
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/TODO dvb-apps/lib/libesg/TODO
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/TODO 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/TODO 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++*** General
++- Add enums for constants
++
++*** EncodingVersion
++- GZIP : use zlib
++- BiM : ???
++
++*** BOOTSTRAP
++- ESGProviderDiscoveryDescriptor : XML parsing with libexpat ?
++
++*** TRANSPORT
++- Indexation
++
++*** ENCAPSULATION
++- Auxiliary Data
++
++*** REPRESENTATION
++- BiM Decoder Init
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/transport/Makefile dvb-apps/lib/libesg/transport/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/transport/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/transport/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,22 @@
++# Makefile for linuxtv.org dvb-apps/lib/libesg/transport
++
++.PHONY: sub-error-transport
++
++sub-error-transport:
++ $(error You can't use this makefile directly.)
++
++ifneq ($(lib_name),)
++
++objects += transport/session_partition_declaration.o
++
++sub-install += transport
++
++else
++
++includes = session_partition_declaration.h
++
++include ../../../Make.rules
++
++lib_name = libesg/transport
++
++endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/transport/session_partition_declaration.c dvb-apps/lib/libesg/transport/session_partition_declaration.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/transport/session_partition_declaration.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/transport/session_partition_declaration.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,253 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include <libesg/transport/session_partition_declaration.h>
++
++struct esg_session_partition_declaration *esg_session_partition_declaration_decode(uint8_t *buffer, uint32_t size) {
++ uint32_t pos;
++ struct esg_session_partition_declaration *partition;
++ struct esg_session_field *field;
++ struct esg_session_field *last_field;
++ uint8_t field_index;
++ struct esg_session_ip_stream *ip_stream;
++ struct esg_session_ip_stream *last_ip_stream;
++ uint8_t ip_stream_index;
++ uint8_t ip_index;
++ struct esg_session_ip_stream_field *ip_stream_field;
++ struct esg_session_ip_stream_field *last_ip_stream_field;
++ uint8_t *field_buffer;
++ uint32_t field_length;
++ union esg_session_ip_stream_field_value *field_value;
++
++ if ((buffer == NULL) || (size <= 2)) {
++ return NULL;
++ }
++
++ pos = 0;
++
++ partition = (struct esg_session_partition_declaration *) malloc(sizeof(struct esg_session_partition_declaration));
++ memset(partition, 0, sizeof(struct esg_session_partition_declaration));
++ partition->field_list = NULL;
++ partition->ip_stream_list = NULL;
++
++ partition->num_fields = buffer[pos];
++ pos += 1;
++
++ partition->overlapping = (buffer[pos] & 0x80) ? 1 : 0;
++ pos += 1;
++
++ if (size < (pos + 5*(partition->num_fields))) {
++ esg_session_partition_declaration_free(partition);
++ return NULL;
++ }
++
++ last_field = NULL;
++ for (field_index = 0; field_index < partition->num_fields; field_index++) {
++ field = (struct esg_session_field *) malloc(sizeof(struct esg_session_field));
++ memset(field, 0, sizeof(struct esg_session_field));
++ field->_next = NULL;
++
++ if (last_field == NULL) {
++ partition->field_list = field;
++ } else {
++ last_field->_next = field;
++ }
++ last_field = field;
++
++ field->identifier = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++
++ field->encoding = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++
++ field->length = buffer[pos];
++ pos += 1;
++ }
++
++ partition->n_o_ip_streams = buffer[pos];
++ pos += 1;
++
++ partition->ip_version_6 = (buffer[pos] & 0x80) ? 1 : 0;
++ pos += 1;
++
++ last_ip_stream = NULL;
++ for (ip_stream_index = 0; ip_stream_index < partition->n_o_ip_streams; ip_stream_index++) {
++ ip_stream = (struct esg_session_ip_stream *) malloc(sizeof(struct esg_session_ip_stream));
++ memset(ip_stream, 0, sizeof(struct esg_session_ip_stream));
++ ip_stream->_next = NULL;
++
++ if (last_ip_stream == NULL) {
++ partition->ip_stream_list = ip_stream;
++ } else {
++ last_ip_stream->_next = ip_stream;
++ }
++ last_ip_stream = ip_stream;
++
++ ip_stream->id = buffer[pos];
++ pos += 1;
++
++ if (partition->ip_version_6) {
++ for (ip_index = 0; ip_index < 16; ip_index++) {
++ ip_stream->source_ip.ipv6[ip_index] = buffer[pos+ip_index];
++ ip_stream->destination_ip.ipv6[ip_index] = buffer[pos+16+ip_index];
++ }
++ pos += 32;
++ } else {
++ for (ip_index = 0; ip_index < 4; ip_index++) {
++ ip_stream->source_ip.ipv4[ip_index] = buffer[pos+ip_index];
++ ip_stream->destination_ip.ipv4[ip_index] = buffer[pos+4+ip_index];
++ }
++ pos += 8;
++ }
++ ip_stream->port = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++
++ ip_stream->session_id = (buffer[pos] << 8) | buffer[pos+1];
++ pos += 2;
++
++ last_ip_stream_field = NULL;
++ esg_session_partition_declaration_field_list_for_each(partition, field) {
++ ip_stream_field = (struct esg_session_ip_stream_field *) malloc(sizeof(struct esg_session_ip_stream_field));
++ memset(ip_stream_field, 0, sizeof(struct esg_session_ip_stream_field));
++ ip_stream_field->_next = NULL;
++ ip_stream_field->start_field_value = NULL;
++ ip_stream_field->end_field_value = NULL;
++
++ if (last_ip_stream_field == NULL) {
++ ip_stream->field_list = ip_stream_field;
++ } else {
++ last_ip_stream_field->_next = ip_stream_field;
++ }
++ last_ip_stream_field = ip_stream_field;
++
++ field_length = field->length;
++ if (field->length != 0) {
++ field_length = field->length;
++ } else {
++ pos += vluimsbf8(buffer + pos, size - pos, &field_length);
++ }
++
++ switch (field->encoding) {
++ case 0x0000: {
++ if (partition->overlapping == 1) {
++ field_value = (union esg_session_ip_stream_field_value *) malloc(sizeof(union esg_session_ip_stream_field_value));
++ memset(field_value, 0, sizeof(union esg_session_ip_stream_field_value));
++ ip_stream_field->start_field_value = field_value;
++
++ field_buffer = (uint8_t *) malloc(field_length);
++ memset(field_buffer, 0, field_length);
++ memcpy(field_buffer, buffer + pos, field_length);
++
++ ip_stream_field->start_field_value->string = field_buffer;
++ pos += field_length;
++ }
++ field_value = (union esg_session_ip_stream_field_value *) malloc(sizeof(union esg_session_ip_stream_field_value));
++ memset(field_value, 0, sizeof(union esg_session_ip_stream_field_value));
++ ip_stream_field->end_field_value = field_value;
++
++ field_buffer = (uint8_t *) malloc(field_length);
++ memset(field_buffer, 0, field_length);
++ memcpy(field_buffer, buffer + pos, field_length);
++
++ ip_stream_field->end_field_value->string = field_buffer;
++ pos += field_length;
++
++ break;
++ }
++ case 0x0101: {
++ if (partition->overlapping == 1) {
++ field_value = (union esg_session_ip_stream_field_value *) malloc(sizeof(union esg_session_ip_stream_field_value));
++ memset(field_value, 0, sizeof(union esg_session_ip_stream_field_value));
++ ip_stream_field->start_field_value = field_value;
++
++ ip_stream_field->start_field_value->unsigned_short = (buffer[pos] << 8) | buffer[pos+1];
++ pos += field_length;
++ }
++ field_value = (union esg_session_ip_stream_field_value *) malloc(sizeof(union esg_session_ip_stream_field_value));
++ memset(field_value, 0, sizeof(union esg_session_ip_stream_field_value));
++ ip_stream_field->end_field_value = field_value;
++
++ ip_stream_field->end_field_value->unsigned_short = (buffer[pos] << 8) | buffer[pos+1];
++ pos += field_length;
++
++ break;
++ }
++ default: {
++ esg_session_partition_declaration_free(partition);
++ return NULL;
++ }
++ }
++ }
++ }
++
++ return partition;
++}
++
++void esg_session_partition_declaration_free(struct esg_session_partition_declaration *partition) {
++ struct esg_session_field *field;
++ struct esg_session_field *next_field;
++ struct esg_session_ip_stream *ip_stream;
++ struct esg_session_ip_stream *next_ip_stream;
++ struct esg_session_ip_stream_field *ip_stream_field;
++ struct esg_session_ip_stream_field *next_ip_stream_field;
++
++ if (partition == NULL) {
++ return;
++ }
++
++ for(ip_stream = partition->ip_stream_list; ip_stream; ip_stream = next_ip_stream) {
++ next_ip_stream = ip_stream->_next;
++
++ field = partition->field_list;
++ for(ip_stream_field = next_ip_stream->field_list; ip_stream_field; ip_stream_field = next_ip_stream_field) {
++ next_ip_stream_field = ip_stream_field->_next;
++
++ switch (field->encoding) {
++ case 0x0000: {
++ if (ip_stream_field->start_field_value != NULL) {
++ free(ip_stream_field->start_field_value->string);
++ }
++ free(ip_stream_field->end_field_value->string);
++ break;
++ }
++ case 0x0101: {
++ // Nothing to free
++ break;
++ }
++ }
++
++ free(ip_stream_field);
++
++ field = field->_next;
++ }
++
++ free(ip_stream);
++ }
++
++ for(field = partition->field_list; field; field = next_field) {
++ next_field = field->_next;
++ free(field);
++ }
++
++ free(partition);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/transport/session_partition_declaration.h dvb-apps/lib/libesg/transport/session_partition_declaration.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/transport/session_partition_declaration.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/transport/session_partition_declaration.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,139 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_TRANSPORT_SESSION_PARTITION_DECLARATION_H
++#define _ESG_TRANSPORT_SESSION_PARTITION_DECLARATION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libesg/types.h>
++
++/**
++ * esg_session_field structure.
++ */
++struct esg_session_field {
++ uint16_t identifier;
++ uint16_t encoding;
++ uint8_t length;
++
++ struct esg_session_field *_next;
++};
++
++/**
++ * esg_session_ip_stream_field_value union.
++ */
++union esg_session_ip_stream_field_value {
++ uint8_t *string;
++ uint16_t unsigned_short;
++};
++
++/**
++ * esg_session_ip_stream_field structure.
++ */
++struct esg_session_ip_stream_field {
++ union esg_session_ip_stream_field_value *start_field_value;
++ union esg_session_ip_stream_field_value *end_field_value;
++
++ struct esg_session_ip_stream_field *_next;
++};
++
++/**
++ * esg_session_ip_stream structure.
++ */
++struct esg_session_ip_stream {
++ uint8_t id;
++ union esg_ip_address source_ip;
++ union esg_ip_address destination_ip;
++ uint16_t port;
++ uint16_t session_id;
++ struct esg_session_ip_stream_field *field_list;
++
++ struct esg_session_ip_stream *_next;
++};
++
++/**
++ * esg_session_partition_declaration structure.
++ */
++struct esg_session_partition_declaration {
++ uint8_t num_fields;
++ uint8_t overlapping;
++ struct esg_session_field *field_list;
++ uint8_t n_o_ip_streams;
++ uint8_t ip_version_6;
++ struct esg_session_ip_stream *ip_stream_list;
++};
++
++/**
++ * Process an esg_session_partition_declaration.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @return Pointer to an esg_session_partition_declaration structure, or NULL on error.
++ */
++extern struct esg_session_partition_declaration *esg_session_partition_declaration_decode(uint8_t *buffer, uint32_t size);
++
++/**
++ * Free an esg_session_partition_declaration.
++ *
++ * @param esg Pointer to an esg_session_partition_declaration structure.
++ */
++extern void esg_session_partition_declaration_free(struct esg_session_partition_declaration *partition);
++
++/**
++ * Convenience iterator for field_list field of an esg_session_partition_declaration.
++ *
++ * @param partition The esg_session_partition_declaration pointer.
++ * @param field Variable holding a pointer to the current esg_session_field.
++ */
++#define esg_session_partition_declaration_field_list_for_each(partition, field) \
++ for ((field) = (partition)->field_list; \
++ (field); \
++ (field) = (field)->_next)
++
++/**
++ * Convenience iterator for ip_stream_list field of an esg_session_partition_declaration.
++ *
++ * @param partition The esg_session_partition_declaration pointer.
++ * @param ip_stream Variable holding a pointer to the current esg_session_ip_stream.
++ */
++#define esg_session_partition_declaration_ip_stream_list_for_each(partition, ip_stream) \
++ for ((ip_stream) = (partition)->ip_stream_list; \
++ (ip_stream); \
++ (ip_stream) = (ip_stream)->_next)
++
++/**
++ * Convenience iterator for field_list field of an esg_session_ip_stream.
++ *
++ * @param ip_stream The esg_session_ip_stream pointer.
++ * @param field Variable holding a pointer to the current esg_session_ip_stream.
++ */
++#define esg_session_ip_stream_field_list_for_each(ip_stream, field) \
++ for ((field) = (ip_stream)->field_list; \
++ (field); \
++ (field) = (field)->_next)
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/types.c dvb-apps/lib/libesg/types.c
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/types.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/types.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,37 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libesg/types.h>
++
++uint8_t vluimsbf8(uint8_t *buffer, uint32_t size, uint32_t *length) {
++ uint8_t offset = 0;
++ *length = 0;
++
++ do {
++ if (size < offset) {
++ offset = 0;
++ *length = 0;
++ break;
++ }
++ *length = (*length << 7) + (buffer[offset] & 0x7F);
++ } while (buffer[offset++] & 0x80);
++
++ return offset;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/types.h dvb-apps/lib/libesg/types.h
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/types.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/types.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,53 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _ESG_TYPES_H
++#define _ESG_TYPES_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++/**
++ * esg_ip_address
++ */
++union esg_ip_address {
++ uint8_t ipv4[4];
++ uint8_t ipv6[16];
++};
++
++/**
++ * Process a vluimsbf8 length.
++ *
++ * @param buffer Binary buffer to decode.
++ * @param size Binary buffer size.
++ * @param length Read length value
++ * @return vluimsbf8 size
++ */
++extern uint8_t vluimsbf8(uint8_t *buffer, uint32_t size, uint32_t *length);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libesg/xml/provider_discovery_descriptor.xsd dvb-apps/lib/libesg/xml/provider_discovery_descriptor.xsd
+--- linuxtv-dvb-apps-1.1.1/lib/libesg/xml/provider_discovery_descriptor.xsd 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libesg/xml/provider_discovery_descriptor.xsd 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,22 @@
++<schema targetNamespace="urn:dvb:ipdc:esgbs:2005" xmlns:bs="urn:dvb:ipdc:esgbs:2005"
++ xmlns:mpeg7="urn:mpeg:mpeg7:schema:2001" xmlns="http://www.w3.org/2001/XMLSchema"
++ elementFormDefault="qualified" attributeFormDefault="unqualified">
++ <import namespace="urn:mpeg:mpeg7:schema:2001" />
++ <complexType name="ESGProviderType">
++ <sequence>
++ <element name="ProviderURI" type="anyURI"/>
++ <element name="ProviderName" type="mpeg7:TextualType"/>
++ <element name="ProviderLogo" type="mpeg7:TitleMediaType" minOccurs="0"/>
++ <element name="ProviderID" type="positiveInteger"/>
++ <element name="ProviderInformationURL" type="anyURI" minOccurs="0"/>
++ <element name="PrivateAuxiliaryData" type="anyType" minOccurs="0"/>
++ </sequence>
++ </complexType>
++ <element name="ESGProviderDiscovery">
++ <complexType>
++ <sequence>
++ <element name="ServiceProvider" type="bs:ESGProviderType" maxOccurs="unbounded"/>
++ </sequence>
++ </complexType>
++ </element>
++</schema>
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ac3_descriptor.h dvb-apps/lib/libucsi/atsc/ac3_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ac3_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/ac3_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,112 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_atsc@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_AC3_DESCRIPTOR
++#define _UCSI_ATSC_AC3_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++enum atsc_ac3_channels {
++ ATSC_AC3_CHANNELS_1_PLUS_1 = 0x0,
++ ATSC_AC3_CHANNELS_1_0 = 0x1,
++ ATSC_AC3_CHANNELS_2_0 = 0x2,
++ ATSC_AC3_CHANNELS_3_0 = 0x3,
++ ATSC_AC3_CHANNELS_2_1 = 0x4,
++ ATSC_AC3_CHANNELS_3_1 = 0x5,
++ ATSC_AC3_CHANNELS_2_2 = 0x6,
++ ATSC_AC3_CHANNELS_3_2 = 0x7,
++ ATSC_AC3_CHANNELS_1 = 0x8,
++ ATSC_AC3_CHANNELS_LTEQ_2 = 0x9,
++ ATSC_AC3_CHANNELS_LTEQ_3 = 0xa,
++ ATSC_AC3_CHANNELS_LTEQ_4 = 0xb,
++ ATSC_AC3_CHANNELS_LTEQ_5 = 0xc,
++ ATSC_AC3_CHANNELS_LTEQ_6 = 0xd,
++};
++
++/**
++ * atsc_ac3_descriptor structure.
++ */
++struct atsc_ac3_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t sample_rate_code : 3; ,
++ uint8_t bsid : 5; );
++ EBIT2(uint8_t bit_rate_code : 6; ,
++ uint8_t surround_mode : 2; );
++ EBIT3(uint8_t bsmod : 3; ,
++ uint8_t num_channels : 4; ,
++ uint8_t full_svc : 1; );
++ /* uint8_t additional_info[] */
++} __ucsi_packed;
++
++/**
++ * Process an atsc_ac3_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return atsc_ac3_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_ac3_descriptor*
++ atsc_ac3_descriptor_codec(struct descriptor* d)
++{
++ int pos = 0;
++
++ if (d->len < (pos+4))
++ return NULL;
++ pos += 4;
++
++ return (struct atsc_ac3_descriptor*) d;
++}
++
++/**
++ * Retrieve pointer to additional_info field of a atsc_ac3_descriptor.
++ *
++ * @param d atsc_ac3_descriptor pointer.
++ * @return Pointer to additional_info field.
++ */
++static inline uint8_t *atsc_ac3_descriptor_additional_info(struct atsc_ac3_descriptor *d)
++{
++ int pos = sizeof(struct atsc_ac3_descriptor);
++
++ return ((uint8_t *) d) + pos;
++}
++
++/**
++ * Determine length of additional_info field of a atsc_ac3_descriptor.
++ *
++ * @param d atsc_ac3_descriptor pointer.
++ * @return Length of field in bytes.
++ */
++static inline int atsc_ac3_descriptor_additional_info_length(struct atsc_ac3_descriptor* d)
++{
++ return d->d.len - 3;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/atsc_text.c dvb-apps/lib/libucsi/atsc/atsc_text.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/atsc_text.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/atsc_text.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,743 @@
++/*
++* section and descriptor parser
++*
++* Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++*
++* This library is free software; you can redistribute it and/or
++* modify it under the terms of the GNU Lesser General Public
++* License as published by the Free Software Foundation; either
++* version 2.1 of the License, or (at your option) any later version.
++*
++* This library is distributed in the hope that it will be useful,
++* but WITHOUT ANY WARRANTY; without even the implied warranty of
++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++* Lesser General Public License for more details.
++*
++* You should have received a copy of the GNU Lesser General Public
++* License along with this library; if not, write to the Free Software
++* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++*/
++
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++#include "libucsi/endianops.h"
++#include "libucsi/atsc/types.h"
++
++#define HUFFTREE_LITERAL_MASK 0x80
++#define HUFFSTRING_END 0x00
++#define HUFFSTRING_ESCAPE 0x1b
++
++#define DEST_ALLOC_DELTA 20
++
++struct hufftree_entry {
++ uint8_t left_idx;
++ uint8_t right_idx;
++} __ucsi_packed;
++
++struct huffbuff {
++ uint8_t *buf;
++ uint32_t buf_len;
++
++ uint32_t cur_byte;
++ uint8_t cur_bit;
++};
++
++
++static struct hufftree_entry program_description_hufftree[][128] = {
++ { {0x14, 0x15}, {0x9b, 0xd6}, {0xc9, 0xcf}, {0xd7, 0xc7}, {0x01, 0xa2},
++ {0xce, 0xcb}, {0x02, 0x03}, {0xc5, 0xcc}, {0xc6, 0xc8}, {0x04, 0xc4},
++ {0x05, 0xc2}, {0x06, 0xc3}, {0xd2, 0x07}, {0xd3, 0x08}, {0xca, 0xd4},
++ {0x09, 0xcd}, {0xd0, 0x0a}, {0xc1, 0x0b}, {0x0c, 0x0d}, {0x0e, 0x0f},
++ {0x10, 0x11}, {0x12, 0x13}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x38, 0x39}, {0xad, 0xaf}, {0xb7, 0xda}, {0xa8, 0xb3}, {0xb5, 0x01},
++ {0x02, 0x9b}, {0xb4, 0xf1}, {0xa2, 0xd5}, {0xd6, 0xd9}, {0x03, 0x04},
++ {0x05, 0xcf}, {0x06, 0xc9}, {0xf9, 0xea}, {0xeb, 0xf5}, {0xf6, 0x07},
++ {0x08, 0x09}, {0xb2, 0xc5}, {0xc6, 0xb1}, {0x0a, 0xee}, {0xcb, 0x0b},
++ {0xd4, 0x0c}, {0xc4, 0xc8}, {0xd2, 0x0d}, {0x0e, 0x0f}, {0xc7, 0xca},
++ {0xce, 0xd0}, {0xd7, 0x10}, {0xc2, 0x11}, {0xcc, 0xec}, {0xe5, 0xe7},
++ {0x12, 0xcd}, {0x13, 0x14}, {0xc3, 0x15}, {0x16, 0x17}, {0xed, 0x18},
++ {0x19, 0xf2}, {0x1a, 0xd3}, {0x1b, 0x1c}, {0xe4, 0x1d}, {0xc1, 0xe3},
++ {0x1e, 0xe9}, {0xf0, 0xe2}, {0xf7, 0x1f}, {0xf3, 0xe6}, {0x20, 0x21},
++ {0x22, 0xe8}, {0xef, 0x23}, {0x24, 0x25}, {0x26, 0x27}, {0x28, 0x29},
++ {0x2a, 0xf4}, {0x2b, 0x2c}, {0x2d, 0x2e}, {0x2f, 0xe1}, {0x30, 0x31},
++ {0x32, 0x33}, {0x34, 0x35}, {0x36, 0x37}, },
++ { {0x9b, 0x9b}, },
++ { {0x03, 0x04}, {0x80, 0xae}, {0xc8, 0xd4}, {0x01, 0x02}, {0x9b, 0xa0}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x02, 0xf3}, {0xa0, 0xf4}, {0x9b, 0x01}, },
++ { {0x9b, 0x9b}, },
++ { {0xac, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x01, 0xa0}, {0x9b, 0xa2}, },
++ { {0x07, 0x08}, {0xe2, 0xe4}, {0xe5, 0xe6}, {0xa0, 0xf2}, {0xe1, 0x01},
++ {0x02, 0xf3}, {0xe3, 0x03}, {0x04, 0x05}, {0x9b, 0x06}, },
++ { {0x04, 0x80}, {0xca, 0xd3}, {0xa2, 0x01}, {0x9b, 0x02}, {0x03, 0xa0}, },
++ { {0x9b, 0xa0}, },
++ { {0x03, 0x04}, {0x9b, 0xb7}, {0xf4, 0xa0}, {0xb0, 0xf3}, {0x01, 0x02}, },
++ { {0xb9, 0x02}, {0xb8, 0x9b}, {0xa0, 0x01}, },
++ { {0xae, 0x02}, {0xb6, 0x9b}, {0x01, 0xa0}, },
++ { {0xa0, 0x01}, {0x9b, 0xb0}, },
++ { {0xae, 0x01}, {0x9b, 0xa0}, },
++ { {0xae, 0x01}, {0xa0, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x01}, {0xac, 0xae}, },
++ { {0x9b, 0x9b}, },
++ { {0x02, 0x03}, {0x9b, 0xa0}, {0xb5, 0xb6}, {0xb8, 0x01}, },
++ { {0x9b, 0xa0}, },
++ { {0x9b, 0xa0}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0xa0}, },
++ { {0x9b, 0x9b}, },
++ { {0x08, 0x09}, {0xe6, 0xf5}, {0xf3, 0xf4}, {0x9b, 0xe4}, {0x01, 0xed},
++ {0x02, 0x03}, {0x04, 0xf2}, {0x05, 0x06}, {0xec, 0xee}, {0x07, 0xa0}, },
++ { {0x05, 0x06}, {0x9b, 0xec}, {0xf5, 0x01}, {0x02, 0xe1}, {0xef, 0xe5},
++ {0xe9, 0xf2}, {0x03, 0x04}, },
++ { {0x06, 0x07}, {0x9b, 0xe9}, {0xf9, 0xf2}, {0xf5, 0x01}, {0x02, 0x03},
++ {0xec, 0xef}, {0xe1, 0x04}, {0xe8, 0x05}, },
++ { {0x05, 0x06}, {0xf9, 0xf2}, {0xf5, 0x9b}, {0xe5, 0xef}, {0x01, 0x02},
++ {0xe9, 0xe1}, {0x03, 0x04}, },
++ { {0x06, 0x07}, {0xe1, 0xe9}, {0xee, 0xf6}, {0xe4, 0xec}, {0xf3, 0x01},
++ {0x02, 0xf2}, {0x03, 0x04}, {0x9b, 0x05}, },
++ { {0x02, 0x03}, {0xe5, 0xec}, {0x9b, 0xef}, {0x01, 0xf2}, },
++ { {0x05, 0x06}, {0xf5, 0xef}, {0x9b, 0xec}, {0xe9, 0x01}, {0xe1, 0xf2},
++ {0x02, 0xe5}, {0x03, 0x04}, },
++ { {0x03, 0x04}, {0x9b, 0xe5}, {0xe9, 0xf5}, {0xe1, 0x01}, {0xef, 0x02}, },
++ { {0x04, 0x05}, {0xa0, 0xc9}, {0xf3, 0x9b}, {0xae, 0xf2}, {0x01, 0x02},
++ {0x03, 0xee}, },
++ { {0xef, 0x05}, {0x9b, 0xae}, {0xe9, 0xe5}, {0x01, 0xf5}, {0x02, 0xe1},
++ {0x03, 0x04}, },
++ { {0xe5, 0x03}, {0xe1, 0xe9}, {0xf2, 0x9b}, {0x01, 0x02}, },
++ { {0x03, 0x04}, {0x9b, 0xe9}, {0xf5, 0x01}, {0xe5, 0x02}, {0xef, 0xe1}, },
++ { {0xe1, 0x05}, {0x9b, 0xe3}, {0xef, 0x01}, {0xf5, 0xe5}, {0x02, 0x03},
++ {0xe9, 0x04}, },
++ { {0xe5, 0x03}, {0x9b, 0xe9}, {0x01, 0xe1}, {0xef, 0x02}, },
++ { {0x03, 0x04}, {0xa7, 0xee}, {0xec, 0xf2}, {0xf3, 0x01}, {0x9b, 0x02}, },
++ { {0xe1, 0x06}, {0x9b, 0xe8}, {0xe9, 0x01}, {0xf2, 0xec}, {0x02, 0xef},
++ {0x03, 0xe5}, {0x04, 0x05}, },
++ { {0x9b, 0x9b}, },
++ { {0x03, 0x04}, {0x9b, 0xae}, {0x01, 0xe9}, {0x02, 0xe1}, {0xe5, 0xef}, },
++ { {0x09, 0x0a}, {0xf6, 0xf9}, {0x01, 0xae}, {0xe3, 0xe9}, {0xf5, 0x9b},
++ {0xe5, 0xef}, {0x02, 0x03}, {0xe1, 0x04}, {0xe8, 0x05}, {0x06, 0xf4},
++ {0x07, 0x08}, },
++ { {0xe8, 0x07}, {0xe5, 0xf7}, {0xd6, 0xe1}, {0x9b, 0xe9}, {0xf2, 0x01},
++ {0x02, 0x03}, {0x04, 0xef}, {0x05, 0x06}, },
++ { {0xae, 0x01}, {0x9b, 0xee}, },
++ { {0xe9, 0x02}, {0xe5, 0x9b}, {0xa0, 0x01}, },
++ { {0x03, 0x04}, {0x9b, 0xe8}, {0xe5, 0xe1}, {0xef, 0x01}, {0xe9, 0x02}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0xef}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x18, 0x19}, {0xe8, 0xef}, {0xf8, 0x9b}, {0xa7, 0xf7}, {0xfa, 0x01},
++ {0x02, 0x03}, {0x04, 0xe5}, {0xae, 0x05}, {0xe6, 0xe2}, {0x06, 0xf6},
++ {0xeb, 0xf5}, {0xe9, 0x07}, {0xf0, 0xf9}, {0xe7, 0x08}, {0x09, 0xe4},
++ {0x0a, 0xe3}, {0x0b, 0xed}, {0x0c, 0xf3}, {0x0d, 0x0e}, {0x0f, 0xec},
++ {0x10, 0xf4}, {0x11, 0x12}, {0xf2, 0xa0}, {0x13, 0x14}, {0x15, 0xee},
++ {0x16, 0x17}, },
++ { {0x0b, 0x0c}, {0xe4, 0xf3}, {0x9b, 0xae}, {0xe2, 0x01}, {0x02, 0x03},
++ {0xec, 0xa0}, {0x04, 0xe9}, {0xf2, 0xf5}, {0x05, 0xf9}, {0xe1, 0x06},
++ {0xef, 0x07}, {0xe5, 0x08}, {0x09, 0x0a}, },
++ { {0x0f, 0x10}, {0xf1, 0xae}, {0xc4, 0xf9}, {0xac, 0x01}, {0xe3, 0x02},
++ {0x9b, 0xf2}, {0x03, 0x04}, {0xa0, 0xec}, {0xf5, 0x05}, {0x06, 0xe9},
++ {0x07, 0xeb}, {0x08, 0xf4}, {0x09, 0xe5}, {0x0a, 0xef}, {0xe1, 0xe8},
++ {0x0b, 0x0c}, {0x0d, 0x0e}, },
++ { {0x13, 0x14}, {0xa7, 0xbb}, {0xe6, 0xed}, {0xf7, 0xe7}, {0xf6, 0x01},
++ {0x02, 0x9b}, {0xee, 0x03}, {0x04, 0xec}, {0x05, 0xf5}, {0x06, 0xac},
++ {0xe4, 0xf9}, {0xf2, 0x07}, {0x08, 0x09}, {0xae, 0x0a}, {0xef, 0x0b},
++ {0xe1, 0xf3}, {0x0c, 0xe9}, {0x0d, 0x0e}, {0x0f, 0x10}, {0xe5, 0x11},
++ {0x12, 0xa0}, },
++ { {0x1d, 0x1e}, {0xa9, 0xe8}, {0xf5, 0x9b}, {0x01, 0xad}, {0xbb, 0xeb},
++ {0xfa, 0x02}, {0xa7, 0xe6}, {0xe2, 0xe7}, {0x03, 0x04}, {0x05, 0x06},
++ {0xe9, 0xf8}, {0x07, 0xac}, {0xef, 0xf0}, {0x08, 0xed}, {0xf6, 0xf9},
++ {0x09, 0xf7}, {0x0a, 0x0b}, {0xae, 0x0c}, {0xe3, 0x0d}, {0xe5, 0xf4},
++ {0x0e, 0x0f}, {0xe4, 0x10}, {0xec, 0x11}, {0xe1, 0x12}, {0x13, 0x14},
++ {0x15, 0x16}, {0xee, 0xf3}, {0x17, 0x18}, {0xf2, 0xa0}, {0x19, 0x1a},
++ {0x1b, 0x1c}, },
++ { {0x09, 0x0a}, {0xae, 0x9b}, {0xec, 0x01}, {0xf5, 0x02}, {0xf4, 0xe6},
++ {0x03, 0xe1}, {0xe5, 0xe9}, {0x04, 0xf2}, {0xef, 0x05}, {0x06, 0x07},
++ {0xa0, 0x08}, },
++ { {0x0e, 0x0f}, {0xad, 0xe7}, {0x9b, 0xa7}, {0xf9, 0x01}, {0xec, 0x02},
++ {0xac, 0xf2}, {0x03, 0xae}, {0xf3, 0xf5}, {0x04, 0x05}, {0xef, 0x06},
++ {0x07, 0xe9}, {0xe1, 0x08}, {0x09, 0xe8}, {0x0a, 0x0b}, {0xe5, 0x0c},
++ {0xa0, 0x0d}, },
++ { {0x0d, 0x0e}, {0xa7, 0xac}, {0xf3, 0xad}, {0x01, 0x02}, {0x9b, 0xf9},
++ {0xf5, 0xae}, {0x03, 0xee}, {0x04, 0xf2}, {0x05, 0x06}, {0xf4, 0x07},
++ {0x08, 0x09}, {0xef, 0xe1}, {0xa0, 0x0a}, {0xe9, 0x0b}, {0x0c, 0xe5}, },
++ { {0x14, 0x15}, {0xac, 0xe2}, {0xf8, 0x9b}, {0xae, 0xfa}, {0x01, 0xeb},
++ {0x02, 0xa0}, {0x03, 0x04}, {0xf0, 0x05}, {0x06, 0xe6}, {0xf6, 0x07},
++ {0xe4, 0xed}, {0xe7, 0x08}, {0xe1, 0xef}, {0xf2, 0x09}, {0x0a, 0x0b},
++ {0xec, 0x0c}, {0xe5, 0xe3}, {0x0d, 0xf4}, {0x0e, 0xf3}, {0x0f, 0x10},
++ {0x11, 0xee}, {0x12, 0x13}, },
++ { {0x03, 0xef}, {0x9b, 0xe1}, {0xe5, 0xf5}, {0x01, 0x02}, },
++ { {0x08, 0x09}, {0xec, 0xf9}, {0xa7, 0xee}, {0x01, 0xac}, {0x9b, 0xae},
++ {0x02, 0x03}, {0x04, 0xf3}, {0x05, 0xe9}, {0x06, 0xa0}, {0x07, 0xe5}, },
++ { {0x16, 0x17}, {0xa7, 0xad}, {0xee, 0xe3}, {0xeb, 0xf2}, {0x9b, 0xe2},
++ {0x01, 0x02}, {0xf5, 0x03}, {0xf4, 0xac}, {0x04, 0x05}, {0xe6, 0xed},
++ {0xf6, 0x06}, {0xae, 0xf0}, {0x07, 0x08}, {0xf3, 0x09}, {0x0a, 0xe4},
++ {0x0b, 0x0c}, {0xf9, 0x0d}, {0xef, 0x0e}, {0xe1, 0x0f}, {0x10, 0xe9},
++ {0xec, 0x11}, {0xa0, 0xe5}, {0x12, 0x13}, {0x14, 0x15}, },
++ { {0x0c, 0x0d}, {0xa7, 0xbb}, {0x9b, 0x01}, {0xf9, 0xae}, {0xe2, 0x02},
++ {0xed, 0xf3}, {0x03, 0xf5}, {0xef, 0xf0}, {0x04, 0x05}, {0xe9, 0x06},
++ {0x07, 0x08}, {0x09, 0xa0}, {0xe1, 0xe5}, {0x0a, 0x0b}, },
++ { {0x19, 0x1a}, {0xad, 0xbb}, {0xe2, 0xea}, {0xed, 0xf2}, {0xfa, 0xe6},
++ {0xec, 0x01}, {0x02, 0x03}, {0x9b, 0xf5}, {0x04, 0xa7}, {0xf6, 0xf9},
++ {0x05, 0x06}, {0xeb, 0xef}, {0x07, 0x08}, {0x09, 0x0a}, {0xac, 0x0b},
++ {0x0c, 0xe3}, {0xae, 0x0d}, {0xee, 0xe9}, {0x0e, 0xe1}, {0x0f, 0xf3},
++ {0x10, 0x11}, {0xf4, 0x12}, {0xe7, 0xe5}, {0x13, 0x14}, {0xe4, 0x15},
++ {0x16, 0x17}, {0xa0, 0x18}, },
++ { {0x1a, 0x1b}, {0xc2, 0x9b}, {0xad, 0xac}, {0xf8, 0x01}, {0xae, 0x02},
++ {0x03, 0xe5}, {0xe7, 0xe8}, {0xf9, 0xe9}, {0xeb, 0x04}, {0xe3, 0xe1},
++ {0x05, 0xf6}, {0x06, 0xe4}, {0x07, 0xe2}, {0xf0, 0x08}, {0x09, 0xf3},
++ {0xf4, 0xf7}, {0xef, 0x0a}, {0x0b, 0x0c}, {0x0d, 0xec}, {0x0e, 0x0f},
++ {0x10, 0xf5}, {0xed, 0x11}, {0xe6, 0xa0}, {0x12, 0xf2}, {0x13, 0x14},
++ {0x15, 0xee}, {0x16, 0x17}, {0x18, 0x19}, },
++ { {0x0e, 0x0f}, {0xad, 0xed}, {0xf9, 0x9b}, {0xae, 0x01}, {0xf3, 0x02},
++ {0x03, 0xf5}, {0xf4, 0xf0}, {0x04, 0xef}, {0x05, 0xe9}, {0x06, 0xe8},
++ {0xa0, 0xe1}, {0xec, 0x07}, {0xf2, 0x08}, {0xe5, 0x09}, {0x0a, 0x0b},
++ {0x0c, 0x0d}, },
++ { {0x9b, 0xf5}, },
++ { {0x19, 0x1a}, {0xa9, 0xbb}, {0xf6, 0xe6}, {0x01, 0x9b}, {0xad, 0xe2},
++ {0xf0, 0x02}, {0xa7, 0x03}, {0x04, 0x05}, {0xf5, 0xe3}, {0xac, 0xe7},
++ {0xf2, 0x06}, {0xeb, 0x07}, {0xec, 0xed}, {0xee, 0xf9}, {0x08, 0xae},
++ {0x09, 0x0a}, {0xe4, 0x0b}, {0x0c, 0xf4}, {0x0d, 0xf3}, {0x0e, 0x0f},
++ {0x10, 0xe1}, {0xef, 0x11}, {0xe9, 0x12}, {0x13, 0xe5}, {0x14, 0xa0},
++ {0x15, 0x16}, {0x17, 0x18}, },
++ { {0xa0, 0x16}, {0xa2, 0xa7}, {0xe2, 0xeb}, {0xed, 0xee}, {0x9b, 0xf7},
++ {0x01, 0x02}, {0x03, 0xbb}, {0xf9, 0xf0}, {0x04, 0x05}, {0xec, 0x06},
++ {0x07, 0x08}, {0xf5, 0xe1}, {0x09, 0xac}, {0xe3, 0x0a}, {0xe8, 0x0b},
++ {0xe9, 0x0c}, {0xef, 0xf3}, {0xae, 0x0d}, {0x0e, 0xe5}, {0x0f, 0x10},
++ {0x11, 0xf4}, {0x12, 0x13}, {0x14, 0x15}, },
++ { {0x14, 0x15}, {0xbb, 0xe2}, {0xad, 0xed}, {0x01, 0x9b}, {0xa7, 0xe3},
++ {0xac, 0xec}, {0xee, 0x02}, {0xf7, 0x03}, {0x04, 0xf9}, {0x05, 0x06},
++ {0x07, 0x08}, {0xf4, 0xae}, {0xf5, 0x09}, {0x0a, 0xf2}, {0xe1, 0xf3},
++ {0x0b, 0x0c}, {0x0d, 0xe9}, {0x0e, 0x0f}, {0xef, 0xe5}, {0x10, 0xa0},
++ {0xe8, 0x11}, {0x12, 0x13}, },
++ { {0x11, 0x12}, {0xef, 0xf6}, {0x9b, 0xeb}, {0xf9, 0x01}, {0xa0, 0xe2},
++ {0x02, 0xe1}, {0x03, 0xed}, {0x04, 0xe3}, {0xe9, 0x05}, {0xe4, 0xe5},
++ {0xe7, 0x06}, {0xec, 0xf0}, {0x07, 0x08}, {0x09, 0x0a}, {0x0b, 0xf3},
++ {0x0c, 0xf4}, {0xee, 0x0d}, {0xf2, 0x0e}, {0x0f, 0x10}, },
++ { {0x05, 0xe5}, {0xf3, 0xf9}, {0x9b, 0x01}, {0xef, 0x02}, {0x03, 0xe1},
++ {0x04, 0xe9}, },
++ { {0x0a, 0x0b}, {0xae, 0x9b}, {0xec, 0xed}, {0x01, 0x02}, {0xf3, 0xee},
++ {0xf2, 0x03}, {0xe5, 0x04}, {0xe8, 0xa0}, {0xe1, 0x05}, {0xef, 0x06},
++ {0x07, 0x08}, {0xe9, 0x09}, },
++ { {0x05, 0x06}, {0xa0, 0xac}, {0xad, 0xf4}, {0xe9, 0x01}, {0x02, 0xe1},
++ {0xe5, 0x03}, {0x9b, 0x04}, },
++ { {0x11, 0xa0}, {0xbf, 0xe1}, {0xe2, 0xe6}, {0xed, 0xe4}, {0xe9, 0xf7},
++ {0xa7, 0x01}, {0x02, 0xbb}, {0x03, 0x04}, {0xec, 0x05}, {0x9b, 0xee},
++ {0x06, 0xef}, {0x07, 0xac}, {0xe5, 0xf3}, {0x08, 0x09}, {0x0a, 0xae},
++ {0x0b, 0x0c}, {0x0d, 0x0e}, {0x0f, 0x10}, },
++ { {0x06, 0x07}, {0xa0, 0xae}, {0xe1, 0xe5}, {0xec, 0xfa}, {0x9b, 0xef},
++ {0xe9, 0x01}, {0x02, 0x03}, {0x04, 0x05}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++};
++
++static struct hufftree_entry program_title_hufftree[][128] = {
++ { {0x1b, 0x1c}, {0xb4, 0xa4}, {0xb2, 0xb7}, {0xda, 0x01}, {0xd1, 0x02},
++ {0x03, 0x9b}, {0x04, 0xd5}, {0xd9, 0x05}, {0xcb, 0xd6}, {0x06, 0xcf},
++ {0x07, 0x08}, {0xca, 0x09}, {0xc9, 0xc5}, {0xc6, 0x0a}, {0xd2, 0xc4},
++ {0xc7, 0xcc}, {0xd0, 0xc8}, {0xd7, 0xce}, {0x0b, 0xc1}, {0x0c, 0xc2},
++ {0xcd, 0xc3}, {0x0d, 0x0e}, {0x0f, 0x10}, {0xd3, 0x11}, {0xd4, 0x12},
++ {0x13, 0x14}, {0x15, 0x16}, {0x17, 0x18}, {0x19, 0x1a}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x29, 0x2a}, {0xd8, 0xe5}, {0xb9, 0x01}, {0xa7, 0xb1}, {0xec, 0xd1},
++ {0x02, 0xad}, {0xb2, 0xda}, {0xe3, 0xb3}, {0x03, 0xe4}, {0xe6, 0x04},
++ {0x9b, 0xe2}, {0x05, 0x06}, {0x07, 0x08}, {0x09, 0xd5}, {0x0a, 0xd6},
++ {0x0b, 0xd9}, {0x0c, 0xa6}, {0xe9, 0xcb}, {0xc5, 0xcf}, {0x0d, 0x0e},
++ {0xca, 0xc9}, {0x0f, 0xc7}, {0x10, 0x11}, {0xe1, 0x12}, {0x13, 0xc6},
++ {0xd2, 0xc8}, {0xce, 0xc1}, {0xc4, 0xd0}, {0xcc, 0x14}, {0x15, 0xef},
++ {0xc2, 0xd7}, {0x16, 0xcd}, {0x17, 0xf4}, {0xd4, 0x18}, {0x19, 0x1a},
++ {0xc3, 0xd3}, {0x1b, 0x1c}, {0x1d, 0x1e}, {0x1f, 0x20}, {0x21, 0x22},
++ {0x23, 0x24}, {0x25, 0x26}, {0x27, 0x28}, },
++ { {0x01, 0x80}, {0xa0, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0xb1, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0xa0}, },
++ { {0x04, 0xf3}, {0xe4, 0xb9}, {0x01, 0xf4}, {0xa0, 0x9b}, {0x02, 0x03}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x01, 0x02}, {0x9b, 0xc1}, {0xc8, 0xd3}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0xa0}, },
++ { {0x07, 0x08}, {0xb1, 0xd2}, {0xd3, 0xd4}, {0xd5, 0xad}, {0xcd, 0xc1},
++ {0x01, 0x02}, {0x03, 0xa0}, {0x04, 0x9b}, {0x05, 0x06}, },
++ { {0xa0, 0x05}, {0xc9, 0xd7}, {0xd3, 0x01}, {0x02, 0x9b}, {0xae, 0x80},
++ {0x03, 0x04}, },
++ { {0x9b, 0x9b}, },
++ { {0x02, 0x03}, {0xad, 0x9b}, {0x01, 0x80}, {0xa0, 0xb0}, },
++ { {0x04, 0x05}, {0x80, 0x9b}, {0xb1, 0xb2}, {0xa0, 0xb0}, {0xb9, 0x01},
++ {0x02, 0x03}, },
++ { {0x02, 0x03}, {0xb1, 0xba}, {0x01, 0xb0}, {0x9b, 0x80}, },
++ { {0x80, 0x01}, {0xb0, 0x9b}, },
++ { {0x9b, 0xb8}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0xb0}, },
++ { {0x9b, 0xa0}, },
++ { {0x02, 0x03}, {0xb1, 0xb3}, {0xb9, 0xb0}, {0x01, 0x9b}, },
++ { {0x9b, 0xa0}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x80}, },
++ { {0x9b, 0x9b}, },
++ { {0x13, 0x14}, {0xaa, 0xad}, {0xae, 0xf6}, {0xe7, 0xf4}, {0xe2, 0xe9},
++ {0x01, 0x02}, {0xc2, 0xf0}, {0x9b, 0xf3}, {0xe3, 0xe6}, {0xf7, 0x03},
++ {0xf5, 0x04}, {0x05, 0x06}, {0xf2, 0x07}, {0x08, 0x09}, {0x0a, 0x0b},
++ {0x0c, 0xe4}, {0xa0, 0x0d}, {0xec, 0xee}, {0x0e, 0xed}, {0x0f, 0x10},
++ {0x11, 0x12}, },
++ { {0x08, 0x09}, {0xc1, 0xd3}, {0x9b, 0x01}, {0xc3, 0x02}, {0xe9, 0xec},
++ {0x03, 0xf2}, {0xf5, 0x04}, {0xef, 0xe1}, {0x05, 0xe5}, {0x06, 0x07}, },
++ { {0x0b, 0x0c}, {0xc1, 0xf9}, {0x01, 0xc2}, {0xcf, 0xe5}, {0xf5, 0x9b},
++ {0xe9, 0x02}, {0xa0, 0x03}, {0x04, 0x05}, {0xf2, 0x06}, {0xec, 0x07},
++ {0xe1, 0x08}, {0x09, 0xe8}, {0x0a, 0xef}, },
++ { {0x05, 0x06}, {0xf9, 0x9b}, {0x01, 0xf5}, {0x02, 0xf2}, {0xe9, 0xe5},
++ {0xef, 0x03}, {0xe1, 0x04}, },
++ { {0x0a, 0x0b}, {0xf1, 0xf5}, {0xf3, 0x01}, {0xed, 0xf9}, {0xc3, 0x02},
++ {0xec, 0xee}, {0xe4, 0xf8}, {0x03, 0x9b}, {0xf6, 0x04}, {0x05, 0xe1},
++ {0x06, 0x07}, {0x08, 0x09}, },
++ { {0x07, 0x08}, {0xa0, 0x9b}, {0xcc, 0x01}, {0xe5, 0x02}, {0xec, 0xf5},
++ {0xef, 0x03}, {0xe9, 0xf2}, {0x04, 0x05}, {0xe1, 0x06}, },
++ { {0x09, 0x0a}, {0xae, 0xec}, {0xf9, 0xc1}, {0xe8, 0x01}, {0x9b, 0x02},
++ {0x03, 0x04}, {0xe1, 0xf5}, {0xe9, 0x05}, {0xe5, 0x06}, {0xf2, 0xef},
++ {0x07, 0x08}, },
++ { {0xef, 0x05}, {0x80, 0x9b}, {0xf5, 0x01}, {0x02, 0xe9}, {0xe1, 0x03},
++ {0xe5, 0x04}, },
++ { {0xee, 0x0b}, {0xba, 0xd4}, {0xae, 0xf2}, {0xe3, 0x01}, {0xa0, 0x02},
++ {0x80, 0x9b}, {0xed, 0x03}, {0xc9, 0xf3}, {0xf4, 0x04}, {0x05, 0x06},
++ {0x07, 0x08}, {0x09, 0x0a}, },
++ { {0x02, 0x03}, {0x9b, 0xf5}, {0x01, 0xe1}, {0xef, 0xe5}, },
++ { {0x05, 0xe9}, {0xe1, 0xef}, {0xf5, 0xee}, {0x9b, 0xe5}, {0x01, 0x02},
++ {0x03, 0x04}, },
++ { {0x04, 0x05}, {0xa0, 0x9b}, {0x01, 0xf5}, {0x02, 0xe5}, {0xef, 0x03},
++ {0xe1, 0xe9}, },
++ { {0x08, 0x09}, {0xaa, 0xd4}, {0x01, 0x9b}, {0xe3, 0x02}, {0xf2, 0x03},
++ {0xe5, 0x04}, {0xf5, 0xf9}, {0xe9, 0x05}, {0xef, 0x06}, {0x07, 0xe1}, },
++ { {0xe5, 0x08}, {0xce, 0xa0}, {0xc6, 0xf5}, {0x01, 0x02}, {0x9b, 0xc2},
++ {0x03, 0xe1}, {0x04, 0xef}, {0x05, 0xe9}, {0x06, 0x07}, },
++ { {0x09, 0x0a}, {0xe4, 0xf3}, {0xe6, 0xf6}, {0xf7, 0xf0}, {0xf2, 0x01},
++ {0xec, 0x02}, {0x03, 0xa0}, {0x9b, 0x04}, {0x05, 0xf5}, {0x06, 0x07},
++ {0xee, 0x08}, },
++ { {0x0b, 0x0c}, {0xa0, 0xf3}, {0xf9, 0xae}, {0xd2, 0xc7}, {0x01, 0x9b},
++ {0x02, 0xf5}, {0x03, 0x04}, {0x05, 0xe9}, {0xec, 0x06}, {0xe5, 0x07},
++ {0xef, 0x08}, {0xe1, 0x09}, {0xf2, 0x0a}, },
++ { {0x01, 0xf5}, {0x9b, 0xd6}, },
++ { {0x04, 0x05}, {0xe8, 0x9b}, {0x01, 0xf5}, {0x02, 0xe1}, {0xe9, 0xef},
++ {0x03, 0xe5}, },
++ { {0x10, 0x11}, {0xaa, 0xec}, {0xf1, 0xae}, {0xa0, 0xf7}, {0xed, 0xee},
++ {0x01, 0x02}, {0x9b, 0xeb}, {0x03, 0x04}, {0x05, 0x06}, {0xe3, 0x07},
++ {0xef, 0x08}, {0xe9, 0xf5}, {0x09, 0xe1}, {0xe5, 0xf0}, {0xe8, 0x0a},
++ {0x0b, 0x0c}, {0x0d, 0xf4}, {0x0e, 0x0f}, },
++ { {0xe8, 0x0a}, {0xad, 0xce}, {0x9b, 0x01}, {0xd6, 0x02}, {0xf5, 0xf7},
++ {0x03, 0x04}, {0xe1, 0xe5}, {0xe9, 0x05}, {0xf2, 0x06}, {0xef, 0x07},
++ {0x08, 0x09}, },
++ { {0xee, 0x03}, {0xec, 0xae}, {0x01, 0x9b}, {0x02, 0xf0}, },
++ { {0x06, 0xe9}, {0xa0, 0xc3}, {0xef, 0x9b}, {0xe5, 0x01}, {0x80, 0x02},
++ {0x03, 0xe1}, {0x04, 0x05}, },
++ { {0x06, 0x07}, {0xc6, 0xd7}, {0x01, 0x9b}, {0xf2, 0x02}, {0x03, 0xe8},
++ {0xe5, 0xe1}, {0x04, 0xe9}, {0xef, 0x05}, },
++ { {0x9b, 0x9b}, },
++ { {0x02, 0xef}, {0xe1, 0x9b}, {0x01, 0xe5}, },
++ { {0x01, 0xef}, {0x9b, 0xe1}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x19, 0x1a}, {0x9b, 0xba}, {0xe5, 0xea}, {0xf8, 0x01}, {0x02, 0xe6},
++ {0xa7, 0x03}, {0xfa, 0xe8}, {0x04, 0xf7}, {0x05, 0xf5}, {0xe2, 0x06},
++ {0xeb, 0x07}, {0xf0, 0x08}, {0x80, 0xf6}, {0xe7, 0x09}, {0xe4, 0x0a},
++ {0xa0, 0xe9}, {0x0b, 0xe3}, {0xf9, 0x0c}, {0x0d, 0xed}, {0x0e, 0x0f},
++ {0xf3, 0x10}, {0x11, 0xec}, {0x12, 0xf4}, {0xf2, 0x13}, {0xee, 0x14},
++ {0x15, 0x16}, {0x17, 0x18}, },
++ { {0x0a, 0x0b}, {0xf3, 0x9b}, {0xf5, 0xe2}, {0x01, 0x80}, {0xa0, 0x02},
++ {0xe5, 0xf2}, {0xe9, 0x03}, {0xec, 0x04}, {0xf9, 0x05}, {0xef, 0x06},
++ {0xe1, 0x07}, {0x08, 0x09}, },
++ { {0x10, 0x11}, {0xc3, 0xcc}, {0xc7, 0x9b}, {0xe3, 0x01}, {0x80, 0xec},
++ {0xf9, 0x02}, {0xf3, 0x03}, {0xf5, 0x04}, {0x05, 0xf2}, {0x06, 0xe9},
++ {0xa0, 0x07}, {0x08, 0xef}, {0xf4, 0x09}, {0x0a, 0xe1}, {0x0b, 0xe8},
++ {0xeb, 0xe5}, {0x0c, 0x0d}, {0x0e, 0x0f}, },
++ { {0x0e, 0x0f}, {0xae, 0xf5}, {0xf7, 0x01}, {0xec, 0x02}, {0xe4, 0xe7},
++ {0xf2, 0x03}, {0x9b, 0xef}, {0x04, 0xf6}, {0x05, 0x06}, {0xf9, 0xf3},
++ {0x07, 0xe9}, {0xe1, 0x08}, {0x09, 0x80}, {0x0a, 0x0b}, {0xe5, 0x0c},
++ {0x0d, 0xa0}, },
++ { {0x1e, 0x1f}, {0x9b, 0xa1}, {0xad, 0xe8}, {0xea, 0xf1}, {0xf5, 0xfa},
++ {0x01, 0x02}, {0x03, 0x04}, {0xba, 0xf8}, {0xa7, 0xe2}, {0xe9, 0x05},
++ {0x06, 0x07}, {0xe6, 0xed}, {0xe7, 0xeb}, {0x08, 0x09}, {0xf6, 0xf0},
++ {0x0a, 0xef}, {0x0b, 0xe3}, {0x0c, 0x0d}, {0x0e, 0xf9}, {0x0f, 0xe4},
++ {0xec, 0x10}, {0xe5, 0x11}, {0xf4, 0xf7}, {0x12, 0x13}, {0xe1, 0x14},
++ {0x15, 0x16}, {0xee, 0xf3}, {0x17, 0x80}, {0x18, 0x19}, {0xf2, 0x1a},
++ {0x1b, 0xa0}, {0x1c, 0x1d}, },
++ { {0xa0, 0x0b}, {0xf5, 0x9b}, {0x01, 0xec}, {0xf3, 0xf2}, {0x80, 0xe1},
++ {0x02, 0x03}, {0xf4, 0xe9}, {0xef, 0xe6}, {0x04, 0x05}, {0x06, 0x07},
++ {0xe5, 0x08}, {0x09, 0x0a}, },
++ { {0x0f, 0x10}, {0xba, 0xf9}, {0xa7, 0xf4}, {0x9b, 0x01}, {0xe7, 0xec},
++ {0x02, 0xee}, {0x03, 0xef}, {0xf5, 0x04}, {0xf2, 0x05}, {0x06, 0xe9},
++ {0x07, 0xf3}, {0xe1, 0x08}, {0x09, 0x0a}, {0x0b, 0xe5}, {0x80, 0x0c},
++ {0xe8, 0xa0}, {0x0d, 0x0e}, },
++ { {0xe5, 0x0d}, {0xe2, 0xf5}, {0xf7, 0x9b}, {0xec, 0x01}, {0xf9, 0xee},
++ {0x02, 0x03}, {0x04, 0xf2}, {0x05, 0x80}, {0x06, 0xa0}, {0xe1, 0xef},
++ {0x07, 0xf4}, {0xe9, 0x08}, {0x09, 0x0a}, {0x0b, 0x0c}, },
++ { {0x15, 0x16}, {0xa1, 0xf8}, {0xe9, 0xeb}, {0x01, 0x80}, {0x9b, 0xfa},
++ {0xe2, 0x02}, {0x03, 0x04}, {0xa0, 0xf0}, {0x05, 0x06}, {0x07, 0xe1},
++ {0x08, 0xe6}, {0xf2, 0xed}, {0xf6, 0x09}, {0xe4, 0x0a}, {0xef, 0xf4},
++ {0xec, 0xf3}, {0xe7, 0xe5}, {0x0b, 0xe3}, {0x0c, 0x0d}, {0x0e, 0x0f},
++ {0x10, 0x11}, {0x12, 0x13}, {0xee, 0x14}, },
++ { {0xef, 0x01}, {0x9b, 0xe1}, },
++ { {0x0b, 0x0c}, {0xd4, 0xef}, {0xe6, 0xec}, {0xf7, 0xe1}, {0x01, 0xba},
++ {0x02, 0x9b}, {0xf9, 0x03}, {0x04, 0x05}, {0xf3, 0x06}, {0x07, 0x08},
++ {0xe9, 0xa0}, {0x09, 0x80}, {0xe5, 0x0a}, },
++ { {0x15, 0x16}, {0xa7, 0xba}, {0xe3, 0xf7}, {0xf2, 0xad}, {0xe2, 0x01},
++ {0x02, 0x9b}, {0xe6, 0x03}, {0xed, 0xf6}, {0x04, 0xeb}, {0x05, 0xf4},
++ {0x06, 0x07}, {0x08, 0xf3}, {0x09, 0xf5}, {0x0a, 0xef}, {0x0b, 0x0c},
++ {0x80, 0xf9}, {0xe1, 0x0d}, {0xe4, 0xe9}, {0xa0, 0x0e}, {0x0f, 0xec},
++ {0xe5, 0x10}, {0x11, 0x12}, {0x13, 0x14}, },
++ { {0x0a, 0x0b}, {0xf9, 0x9b}, {0xf5, 0xf3}, {0x01, 0x02}, {0xe2, 0xed},
++ {0x80, 0x03}, {0xf0, 0xef}, {0x04, 0xa0}, {0x05, 0xe9}, {0x06, 0xe1},
++ {0x07, 0x08}, {0x09, 0xe5}, },
++ { {0x18, 0x19}, {0xe2, 0xea}, {0xf2, 0xe8}, {0xec, 0xed}, {0xfa, 0x9b},
++ {0x01, 0xf5}, {0x02, 0x03}, {0xf6, 0x04}, {0xba, 0xe6}, {0x05, 0x06},
++ {0xeb, 0xef}, {0x07, 0xa7}, {0xf9, 0x08}, {0x09, 0x0a}, {0x0b, 0xe3},
++ {0x0c, 0xee}, {0xe1, 0x0d}, {0xf3, 0x0e}, {0xe9, 0x0f}, {0x10, 0xf4},
++ {0x80, 0xe4}, {0xe5, 0x11}, {0x12, 0xe7}, {0xa0, 0x13}, {0x14, 0x15},
++ {0x16, 0x17}, },
++ { {0x1b, 0x1c}, {0xae, 0xfa}, {0xbf, 0x01}, {0xa7, 0x9b}, {0x02, 0xe9},
++ {0xf8, 0xf9}, {0x03, 0xe5}, {0xe8, 0x04}, {0xe1, 0xeb}, {0x05, 0xe2},
++ {0x06, 0x07}, {0xe3, 0x08}, {0xe7, 0xf4}, {0x09, 0x80}, {0xf6, 0xf0},
++ {0x0a, 0xe4}, {0x0b, 0xf3}, {0xf7, 0x0c}, {0x0d, 0xef}, {0xec, 0xa0},
++ {0x0e, 0x0f}, {0xed, 0xe6}, {0x10, 0xf5}, {0x11, 0x12}, {0x13, 0x14},
++ {0x15, 0xf2}, {0x16, 0xee}, {0x17, 0x18}, {0x19, 0x1a}, },
++ { {0x0e, 0x0f}, {0xed, 0xa7}, {0x9b, 0xe4}, {0x01, 0xf9}, {0xf3, 0xf2},
++ {0xf4, 0x02}, {0xe8, 0x03}, {0xec, 0xf0}, {0x04, 0xe1}, {0xe9, 0x05},
++ {0x06, 0x80}, {0xa0, 0x07}, {0x08, 0x09}, {0x0a, 0xe5}, {0xef, 0x0b},
++ {0x0c, 0x0d}, },
++ { {0x9b, 0xf5}, },
++ { {0x18, 0x19}, {0xba, 0xac}, {0xf6, 0x9b}, {0xf0, 0xe2}, {0x01, 0xe6},
++ {0x02, 0xa7}, {0xae, 0xe7}, {0x03, 0xe3}, {0xf5, 0x04}, {0xed, 0x05},
++ {0x06, 0x07}, {0xeb, 0x08}, {0x09, 0xee}, {0xf2, 0x0a}, {0xe4, 0x0b},
++ {0xf9, 0xec}, {0x0c, 0x0d}, {0xf4, 0x80}, {0x0e, 0xef}, {0xf3, 0xa0},
++ {0xe1, 0x0f}, {0xe9, 0x10}, {0x11, 0xe5}, {0x12, 0x13}, {0x14, 0x15},
++ {0x16, 0x17}, },
++ { {0x19, 0x1a}, {0xa7, 0xac}, {0xbf, 0xc3}, {0xc8, 0xe4}, {0xe6, 0xed},
++ {0xf2, 0xae}, {0xec, 0xee}, {0xf9, 0x01}, {0x02, 0x03}, {0x04, 0xba},
++ {0x05, 0x9b}, {0xf5, 0x06}, {0x07, 0x08}, {0x09, 0xeb}, {0xf0, 0x0a},
++ {0x0b, 0x0c}, {0xe1, 0xe3}, {0x0d, 0xe8}, {0x0e, 0x0f}, {0xef, 0x10},
++ {0x11, 0xf3}, {0x12, 0xe9}, {0x13, 0xe5}, {0x14, 0x15}, {0xf4, 0x16},
++ {0x17, 0xa0}, {0x18, 0x80}, },
++ { {0x14, 0x15}, {0xba, 0xbf}, {0xe4, 0xf7}, {0x9b, 0xa7}, {0x01, 0xee},
++ {0x02, 0x03}, {0x04, 0xe3}, {0xe2, 0xed}, {0x05, 0xf9}, {0x06, 0xf4},
++ {0x07, 0xec}, {0x08, 0xf5}, {0xf2, 0x09}, {0xe1, 0xf3}, {0x0a, 0xef},
++ {0x0b, 0x0c}, {0x0d, 0xe9}, {0x80, 0xe5}, {0x0e, 0xa0}, {0x0f, 0xe8},
++ {0x10, 0x11}, {0x12, 0x13}, },
++ { {0x11, 0x12}, {0xeb, 0xfa}, {0x80, 0xe6}, {0x9b, 0x01}, {0xa0, 0x02},
++ {0x03, 0xe9}, {0xe1, 0x04}, {0xe4, 0xf0}, {0xed, 0xe2}, {0xe3, 0xe7},
++ {0xec, 0x05}, {0xe5, 0x06}, {0x07, 0x08}, {0x09, 0xf4}, {0x0a, 0x0b},
++ {0x0c, 0xf3}, {0xee, 0x0d}, {0x0e, 0xf2}, {0x0f, 0x10}, },
++ { {0x04, 0xe5}, {0xf3, 0xef}, {0x9b, 0x01}, {0xe1, 0x02}, {0x03, 0xe9}, },
++ { {0x0b, 0x0c}, {0xa7, 0xe2}, {0xec, 0xe3}, {0xf2, 0x01}, {0x9b, 0x02},
++ {0x03, 0x04}, {0xe9, 0xef}, {0xee, 0xe5}, {0xe1, 0x80}, {0x05, 0xa0},
++ {0x06, 0x07}, {0x08, 0x09}, {0xf3, 0x0a}, },
++ { {0x05, 0x06}, {0x9b, 0xa0}, {0xe1, 0xe5}, {0xe9, 0x01}, {0x80, 0xf0},
++ {0x02, 0xf4}, {0x03, 0x04}, },
++ { {0xa0, 0x13}, {0xe3, 0xad}, {0xe4, 0xe9}, {0xee, 0xef}, {0xf0, 0xf4},
++ {0xf6, 0xa1}, {0xe1, 0xed}, {0x01, 0xe2}, {0x02, 0x03}, {0x04, 0xa7},
++ {0x05, 0x06}, {0xf7, 0x07}, {0x9b, 0xec}, {0x08, 0xe5}, {0x09, 0x0a},
++ {0x0b, 0x0c}, {0x0d, 0x0e}, {0xf3, 0x0f}, {0x10, 0x11}, {0x80, 0x12}, },
++ { {0x05, 0x06}, {0xe5, 0xfa}, {0xa0, 0xf9}, {0x9b, 0x01}, {0x80, 0xe9},
++ {0x02, 0xe1}, {0x03, 0x04}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++ { {0x9b, 0x9b}, },
++};
++
++
++
++static inline void huffbuff_init(struct huffbuff *hbuf, uint8_t *buf, uint32_t buf_len)
++{
++ memset(hbuf, 0, sizeof(struct huffbuff));
++ hbuf->buf = buf;
++ hbuf->buf_len = buf_len;
++}
++
++static inline int huffbuff_bits(struct huffbuff *hbuf, uint8_t nbits)
++{
++ uint8_t result = 0;
++
++ if (nbits > 8)
++ return -1;
++
++ while(nbits--) {
++ if (hbuf->cur_byte >= hbuf->buf_len) {
++ return -1;
++ }
++
++ result <<= 1;
++ if (hbuf->buf[hbuf->cur_byte] & (0x80 >> hbuf->cur_bit))
++ result |= 1;
++
++ if (++hbuf->cur_bit > 7) {
++ hbuf->cur_byte++;
++ hbuf->cur_bit = 0;
++ }
++ }
++
++ return result;
++}
++
++static inline int append_unicode_char(uint8_t **destbuf, size_t *destbuflen, size_t *destbufpos,
++ uint32_t c)
++{
++ uint8_t tmp[3];
++ int tmplen = 0;
++
++ // encode the unicode character first of all
++ if (c < 0x80) {
++ tmp[0] = c;
++ tmplen = 1;
++ } else if (c < 0x800) {
++ tmp[0] = 0xc0 | ((c >> 6) & 0x1f);
++ tmp[1] = 0x80 | (c & 0x3f);
++ tmplen = 2;
++ } else if (c < 0x10000) {
++ tmp[0] = 0xe0 | ((c >> 12) & 0x0f);
++ tmp[1] = 0x80 | ((c >> 6) & 0x3f);
++ tmp[2] = 0x80 | (c & 0x3f);
++ tmplen = 3;
++ } else {
++ return -1;
++ }
++
++ // do we have enough buffer space?
++ if ((*destbufpos + tmplen) >= *destbuflen) {
++ uint8_t *new_dest = realloc(*destbuf, *destbuflen + DEST_ALLOC_DELTA);
++ if (new_dest == NULL)
++ return -ENOMEM;
++ *destbuf = new_dest;
++ *destbuflen += DEST_ALLOC_DELTA;
++ }
++
++ // copy it into position
++ memcpy(*destbuf + *destbufpos, tmp, tmplen);
++ *destbufpos += tmplen;
++
++ return 0;
++}
++
++static inline int unicode_decode(uint8_t *srcbuf, size_t srcbuflen, int mode,
++ uint8_t **destbuf, size_t *destbuflen, size_t *destbufpos)
++{
++ size_t i;
++ uint32_t msb = mode << 8;
++
++ for(i=0; i< srcbuflen; i++) {
++ if (append_unicode_char(destbuf, destbuflen, destbufpos, msb + srcbuf[i]))
++ return -1;
++ }
++
++ return *destbufpos;
++}
++
++static int huffman_decode_uncompressed(struct huffbuff *hbuf,
++ uint8_t **destbuf, size_t *destbuflen, size_t *destbufpos)
++{
++ int c;
++
++ while(hbuf->cur_byte < hbuf->buf_len) {
++ // get next byte
++ if ((c = huffbuff_bits(hbuf, 8)) < 0)
++ return -1;
++
++ switch(c) {
++ case HUFFSTRING_END:
++ return 0;
++
++ case HUFFSTRING_ESCAPE:
++ return HUFFSTRING_ESCAPE;
++
++ default:
++ if (append_unicode_char(destbuf, destbuflen, destbufpos, c))
++ return -1;
++
++ // if it is 7 bit, we swap back to the compressed context
++ if ((c & 0x80) == 0)
++ return c;
++
++ // characters following an 8 bit uncompressed char are uncompressed as well
++ break;
++ }
++ }
++
++ // ran out of string; pretend we saw an end of string char
++ return HUFFSTRING_END;
++}
++
++static int huffman_decode(uint8_t *src, size_t srclen,
++ uint8_t **destbuf, size_t *destbuflen, size_t *destbufpos,
++ struct hufftree_entry hufftree[][128])
++{
++ struct huffbuff hbuf;
++ int bit;
++ struct hufftree_entry *tree = hufftree[0];
++ uint8_t treeidx = 0;
++ uint8_t treeval;
++ int tmp;
++
++ huffbuff_init(&hbuf, src, srclen);
++
++ while(hbuf.cur_byte < hbuf.buf_len) {
++ // get the next bit
++ if ((bit = huffbuff_bits(&hbuf, 1)) < 0)
++ return *destbufpos;
++
++ if (!bit) {
++ treeval = tree[treeidx].left_idx;
++ } else {
++ treeval = tree[treeidx].right_idx;
++ }
++
++ if (treeval & HUFFTREE_LITERAL_MASK) {
++ switch(treeval & ~HUFFTREE_LITERAL_MASK) {
++ case HUFFSTRING_END:
++ return 0;
++
++ case HUFFSTRING_ESCAPE:
++ if ((tmp =
++ huffman_decode_uncompressed(&hbuf,
++ destbuf, destbuflen, destbufpos)) < 0)
++ return tmp;
++ if (tmp == 0)
++ return *destbufpos;
++
++ tree = hufftree[tmp];
++ treeidx = 0;
++ break;
++
++ default:
++ // stash it
++ if (append_unicode_char(destbuf, destbuflen, destbufpos,
++ treeval & ~HUFFTREE_LITERAL_MASK))
++ return -1;
++ tree = hufftree[treeval & ~HUFFTREE_LITERAL_MASK];
++ treeidx = 0;
++ break;
++ }
++ } else {
++ treeidx = treeval;
++ }
++ }
++
++ return *destbufpos;
++}
++
++int atsc_text_segment_decode(struct atsc_text_string_segment *segment,
++ uint8_t **destbuf, size_t *destbufsize, size_t *destbufpos)
++{
++ if (segment->mode > ATSC_TEXT_SEGMENT_MODE_UNICODE_RANGE_MAX)
++ return -1;
++
++ // mode==0 MUST be used for compressed text
++ if ((segment->mode) && (segment->compression_type))
++ return -1;
++
++ uint8_t *buf = atsc_text_string_segment_bytes(segment);
++
++ switch(segment->compression_type) {
++ case ATSC_TEXT_COMPRESS_NONE:
++ return unicode_decode(buf, segment->number_bytes, segment->mode,
++ destbuf, destbufsize, destbufpos);
++
++ case ATSC_TEXT_COMPRESS_PROGRAM_TITLE:
++ return huffman_decode(buf, segment->number_bytes,
++ destbuf, destbufsize, destbufpos,
++ program_title_hufftree);
++
++ case ATSC_TEXT_COMPRESS_PROGRAM_DESCRIPTION:
++ return huffman_decode(buf, segment->number_bytes,
++ destbuf, destbufsize, destbufpos,
++ program_description_hufftree);
++ }
++
++ return -1;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/caption_service_descriptor.h dvb-apps/lib/libucsi/atsc/caption_service_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/caption_service_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/caption_service_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,137 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_CAPTION_SERVICE_DESCRIPTOR
++#define _UCSI_ATSC_CAPTION_SERVICE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * atsc_caption_service_descriptor structure.
++ */
++struct atsc_caption_service_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t reserved : 3; ,
++ uint8_t number_of_services : 5; );
++ /* struct atsc_caption_service_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the entries field of a atsc_caption_service_descriptor.
++ */
++struct atsc_caption_service_entry {
++ iso639lang_t language_code;
++ EBIT3(uint8_t digital_cc : 1; ,
++ uint8_t reserved : 1; ,
++ uint8_t value : 6; );
++ EBIT3(uint16_t easy_reader : 1; ,
++ uint16_t wide_aspect_ratio : 1; ,
++ uint16_t reserved1 :14; );
++} __ucsi_packed;
++
++/**
++ * Process an atsc_caption_service_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_caption_service_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_caption_service_descriptor*
++ atsc_caption_service_descriptor_codec(struct descriptor* d)
++{
++ struct atsc_caption_service_descriptor *ret =
++ (struct atsc_caption_service_descriptor *) d;
++ uint8_t *buf = (uint8_t*) d + 2;
++ int pos = 0;
++ int idx;
++
++ if (d->len < 1)
++ return NULL;
++ pos++;
++
++ for(idx = 0; idx < ret->number_of_services; idx++) {
++ if (d->len < (pos + sizeof(struct atsc_caption_service_entry)))
++ return NULL;
++
++ bswap16(buf+pos+4);
++
++ pos += sizeof(struct atsc_caption_service_entry);
++ }
++
++ return (struct atsc_caption_service_descriptor*) d;
++}
++
++/**
++ * Iterator for entries field of a atsc_caption_service_descriptor.
++ *
++ * @param d atsc_caption_service_descriptor pointer.
++ * @param pos Variable holding a pointer to the current atsc_caption_service_entry.
++ * @param idx Field iterator integer.
++ */
++#define atsc_caption_service_descriptor_entries_for_each(d, pos, idx) \
++ for ((pos) = atsc_caption_service_descriptor_entries_first(d), idx=0; \
++ (pos); \
++ (pos) = atsc_caption_service_descriptor_entries_next(d, pos, ++idx))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_caption_service_entry*
++ atsc_caption_service_descriptor_entries_first(struct atsc_caption_service_descriptor *d)
++{
++ if (d->number_of_services == 0)
++ return NULL;
++
++ return (struct atsc_caption_service_entry *)
++ ((uint8_t*) d + sizeof(struct atsc_caption_service_descriptor));
++}
++
++static inline struct atsc_caption_service_entry*
++ atsc_caption_service_descriptor_entries_next(struct atsc_caption_service_descriptor *d,
++ struct atsc_caption_service_entry *pos,
++ int idx)
++{
++ if (idx >= d->number_of_services)
++ return NULL;
++
++ return (struct atsc_caption_service_entry *)
++ ((uint8_t *) pos + sizeof(struct atsc_caption_service_entry));
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/component_name_descriptor.h dvb-apps/lib/libucsi/atsc/component_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/component_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/component_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,92 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_COMPONENT_NAME_DESCRIPTOR
++#define _UCSI_ATSC_COMPONENT_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++#include <libucsi/atsc/types.h>
++
++/**
++ * atsc_component_name_descriptor structure.
++ */
++struct atsc_component_name_descriptor {
++ struct descriptor d;
++
++ /* struct atsc_text text[] */
++} __ucsi_packed;
++
++/**
++ * Process an atsc_component_name_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_component_name_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_component_name_descriptor*
++ atsc_component_name_descriptor_codec(struct descriptor* d)
++{
++ uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_component_name_descriptor);
++
++ if (atsc_text_validate(txt, d->len))
++ return NULL;
++
++ return (struct atsc_component_name_descriptor*) d;
++}
++
++/**
++ * Accessor for the text field of an atsc_component_name_descriptor.
++ *
++ * @param d atsc_component_name_descriptor pointer.
++ * @return Pointer to the atsc_text data, or NULL on error.
++ */
++static inline struct atsc_text*
++ atsc_component_name_descriptor_text(struct atsc_component_name_descriptor *d)
++{
++ uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_component_name_descriptor);
++
++ return (struct atsc_text*) txt;
++}
++
++/**
++ * Accessor for the length of the text field of an atsc_component_name_descriptor_text.
++ *
++ * @param d atsc_component_name_descriptor pointer.
++ * @return The length in bytes.
++ */
++static inline int
++ atsc_component_name_descriptor_text_length(struct atsc_component_name_descriptor *d)
++{
++ return d->d.len;
++}
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/content_advisory_descriptor.h dvb-apps/lib/libucsi/atsc/content_advisory_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/content_advisory_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/content_advisory_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,235 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_CONTENT_ADVISORY_DESCRIPTOR
++#define _UCSI_ATSC_CONTENT_ADVISORY_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * atsc_content_advisory_descriptor structure.
++ */
++struct atsc_content_advisory_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t reserved : 2; ,
++ uint8_t rating_region_count : 6; );
++ /* struct atsc_content_advisory_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the entries field of a atsc_content_advisory_descriptor.
++ */
++struct atsc_content_advisory_entry {
++ uint8_t rating_region;
++ uint8_t rated_dimensions;
++ /* struct atsc_content_advisory_entry_dimension dimensions[] */
++ /* struct atsc_content_advisory_entry_part2 part2 */
++} __ucsi_packed;
++
++/**
++ * An entry in the entries field of a atsc_content_advisory_descriptor.
++ */
++struct atsc_content_advisory_entry_dimension {
++ uint8_t rating_dimension_j;
++ EBIT2(uint8_t reserved : 4; ,
++ uint8_t rating_value : 4; );
++} __ucsi_packed;
++
++/**
++ * Part2 of an atsc_content_advisory_entry.
++ */
++struct atsc_content_advisory_entry_part2 {
++ uint8_t rating_description_length;
++ /* struct atsc_text description */
++} __ucsi_packed;
++
++/**
++ * Process an atsc_content_advisory_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_content_advisory_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_content_advisory_descriptor*
++ atsc_content_advisory_descriptor_codec(struct descriptor* d)
++{
++ struct atsc_content_advisory_descriptor *ret =
++ (struct atsc_content_advisory_descriptor *) d;
++ uint8_t *buf = (uint8_t*) d + 2;
++ int pos = 0;
++ int idx;
++
++ if (d->len < 1)
++ return NULL;
++ pos++;
++
++ for(idx = 0; idx < ret->rating_region_count; idx++) {
++ if (d->len < (pos + sizeof(struct atsc_content_advisory_entry)))
++ return NULL;
++ struct atsc_content_advisory_entry *entry =
++ (struct atsc_content_advisory_entry *) (buf + pos);
++ pos += sizeof(struct atsc_content_advisory_entry);
++
++ if (d->len < (pos + (sizeof(struct atsc_content_advisory_entry_dimension) *
++ entry->rated_dimensions)))
++ return NULL;
++ pos += sizeof(struct atsc_content_advisory_entry_dimension) * entry->rated_dimensions;
++
++ if (d->len < (pos + sizeof(struct atsc_content_advisory_entry_part2)))
++ return NULL;
++ struct atsc_content_advisory_entry_part2 *part2 =
++ (struct atsc_content_advisory_entry_part2 *) (buf + pos);
++ pos += sizeof(struct atsc_content_advisory_entry_part2);
++
++ if (d->len < (pos + part2->rating_description_length))
++ return NULL;
++
++ if (atsc_text_validate(buf+pos, part2->rating_description_length))
++ return NULL;
++
++ pos += part2->rating_description_length;
++ }
++
++ return (struct atsc_content_advisory_descriptor*) d;
++}
++
++/**
++ * Iterator for entries field of a atsc_content_advisory_descriptor.
++ *
++ * @param d atsc_content_advisory_descriptor pointer.
++ * @param pos Variable holding a pointer to the current atsc_content_advisory_entry.
++ * @param idx Integer used to count which entry we are in.
++ */
++#define atsc_content_advisory_descriptor_entries_for_each(d, pos, idx) \
++ for ((pos) = atsc_content_advisory_descriptor_entries_first(d), idx=0; \
++ (pos); \
++ (pos) = atsc_content_advisory_descriptor_entries_next(d, pos, ++idx))
++
++/**
++ * Iterator for dimensions field of a atsc_content_advisory_entry.
++ *
++ * @param d atsc_content_advisory_entry pointer.
++ * @param pos Variable holding a pointer to the current atsc_content_advisory_entry_dimension.
++ * @param idx Integer used to count which dimension we are in.
++ */
++#define atsc_content_advisory_entry_dimensions_for_each(d, pos, idx) \
++ for ((pos) = atsc_content_advisory_entry_dimensions_first(d), idx=0; \
++ (pos); \
++ (pos) = atsc_content_advisory_entry_dimensions_next(d, pos, ++idx))
++
++/**
++ * Accessor for the part2 field of an atsc_content_advisory_entry.
++ *
++ * @param entry atsc_content_advisory_entry pointer.
++ * @return struct atsc_content_advisory_entry_part2 pointer.
++ */
++static inline struct atsc_content_advisory_entry_part2 *
++ atsc_content_advisory_entry_part2(struct atsc_content_advisory_entry *entry)
++{
++ int pos = sizeof(struct atsc_content_advisory_entry);
++ pos += entry->rated_dimensions * sizeof(struct atsc_content_advisory_entry_dimension);
++
++ return (struct atsc_content_advisory_entry_part2 *) (((uint8_t*) entry) + pos);
++}
++
++
++/**
++ * Accessor for the description field of an atsc_content_advisory_entry_part2.
++ *
++ * @param part2 atsc_content_advisory_entry_part2 pointer.
++ * @return Pointer to the atsc_text data, or NULL on error.
++ */
++static inline struct atsc_text*
++ atsc_content_advisory_entry_part2_description(struct atsc_content_advisory_entry_part2 *part2)
++{
++ uint8_t *txt = ((uint8_t*) part2) + sizeof(struct atsc_content_advisory_entry_part2);
++
++ return (struct atsc_text *) txt;
++}
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_content_advisory_entry*
++ atsc_content_advisory_descriptor_entries_first(struct atsc_content_advisory_descriptor *d)
++{
++ if (d->rating_region_count == 0)
++ return NULL;
++
++ return (struct atsc_content_advisory_entry *)
++ ((uint8_t*) d + sizeof(struct atsc_content_advisory_descriptor));
++}
++
++static inline struct atsc_content_advisory_entry*
++ atsc_content_advisory_descriptor_entries_next(struct atsc_content_advisory_descriptor *d,
++ struct atsc_content_advisory_entry *pos,
++ int idx)
++{
++ if (idx >= d->rating_region_count)
++ return NULL;
++ struct atsc_content_advisory_entry_part2 *part2 =
++ atsc_content_advisory_entry_part2(pos);
++
++ return (struct atsc_content_advisory_entry *)
++ ((uint8_t *) part2 +
++ sizeof(struct atsc_content_advisory_entry_part2) +
++ part2->rating_description_length);
++}
++
++static inline struct atsc_content_advisory_entry_dimension*
++ atsc_content_advisory_entry_dimensions_first(struct atsc_content_advisory_entry *e)
++{
++ if (e->rated_dimensions == 0)
++ return NULL;
++
++ return (struct atsc_content_advisory_entry_dimension *)
++ ((uint8_t*) e + sizeof(struct atsc_content_advisory_entry));
++}
++
++static inline struct atsc_content_advisory_entry_dimension*
++ atsc_content_advisory_entry_dimensions_next(struct atsc_content_advisory_entry *e,
++ struct atsc_content_advisory_entry_dimension *pos,
++ int idx)
++{
++ uint8_t *next = (uint8_t *) pos + sizeof(struct atsc_content_advisory_entry_dimension);
++
++ if (idx >= e->rated_dimensions)
++ return NULL;
++ return (struct atsc_content_advisory_entry_dimension *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/cvct_section.c dvb-apps/lib/libucsi/atsc/cvct_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/cvct_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/cvct_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,77 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/atsc/cvct_section.h>
++
++struct atsc_cvct_section *atsc_cvct_section_codec(struct atsc_section_psip *psip)
++{
++ uint8_t * buf = (uint8_t *) psip;
++ size_t pos = sizeof(struct atsc_section_psip);
++ size_t len = section_ext_length(&(psip->ext_head));
++ int idx;
++
++ if (len < sizeof(struct atsc_cvct_section))
++ return NULL;
++ struct atsc_cvct_section *cvct = (struct atsc_cvct_section *) psip;
++
++ pos++;
++ for(idx =0; idx < cvct->num_channels_in_section; idx++) {
++ if ((pos + sizeof(struct atsc_cvct_channel)) > len)
++ return NULL;
++ struct atsc_cvct_channel *channel = (struct atsc_cvct_channel *) (buf+pos);
++
++ pos += 7*2;
++
++ bswap32(buf+pos);
++ bswap32(buf+pos+4);
++ bswap16(buf+pos+8);
++ bswap16(buf+pos+10);
++ bswap16(buf+pos+12);
++ bswap16(buf+pos+14);
++ bswap16(buf+pos+16);
++ pos+=18;
++
++ if ((pos + channel->descriptors_length) > len)
++ return NULL;
++ if (verify_descriptors(buf + pos, channel->descriptors_length))
++ return NULL;
++
++ pos += channel->descriptors_length;
++ }
++
++ if ((pos + sizeof(struct atsc_cvct_section_part2)) > len)
++ return NULL;
++ struct atsc_cvct_section_part2 *part2 = (struct atsc_cvct_section_part2 *) (buf+pos);
++
++ bswap16(buf+pos);
++ pos+=2;
++
++ if ((pos + part2->descriptors_length) > len)
++ return NULL;
++ if (verify_descriptors(buf + pos, part2->descriptors_length))
++ return NULL;
++
++ pos += part2->descriptors_length;
++ if (pos != len)
++ return NULL;
++
++ return (struct atsc_cvct_section *) psip;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/cvct_section.h dvb-apps/lib/libucsi/atsc/cvct_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/cvct_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/cvct_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,228 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_CVCT_SECTION_H
++#define _UCSI_ATSC_CVCT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/atsc/section.h>
++
++/**
++ * atsc_cvct_section structure.
++ */
++struct atsc_cvct_section {
++ struct atsc_section_psip head;
++
++ uint8_t num_channels_in_section;
++ /* struct atsc_cvct_channel channels[] */
++ /* struct atsc_cvct_channel_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_cvct_channel {
++ uint16_t short_name[7]; // UTF-16 network ordered
++ EBIT4(uint32_t reserved : 4; ,
++ uint32_t major_channel_number :10; ,
++ uint32_t minor_channel_number :10; ,
++ uint32_t modulation_mode : 8; );
++ uint32_t carrier_frequency;
++ uint16_t channel_TSID;
++ uint16_t program_number;
++ EBIT8(uint16_t ETM_location : 2; ,
++ uint16_t access_controlled : 1; ,
++ uint16_t hidden : 1; ,
++ uint16_t path_select : 1; ,
++ uint16_t out_of_band : 1; ,
++ uint16_t hide_guide : 1; ,
++ uint16_t reserved2 : 3; ,
++ uint16_t service_type : 6; );
++ uint16_t source_id;
++ EBIT2(uint16_t reserved3 : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++struct atsc_cvct_section_part2 {
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++static inline struct atsc_cvct_channel *atsc_cvct_section_channels_first(struct atsc_cvct_section *cvct);
++static inline struct atsc_cvct_channel *
++ atsc_cvct_section_channels_next(struct atsc_cvct_section *cvct, struct atsc_cvct_channel *pos, int idx);
++
++/**
++ * Process a atsc_cvct_section.
++ *
++ * @param section Pointer to anj atsc_section_psip structure.
++ * @return atsc_cvct_section pointer, or NULL on error.
++ */
++struct atsc_cvct_section *atsc_cvct_section_codec(struct atsc_section_psip *section);
++
++/**
++ * Accessor for the transport_stream_id field of a CVCT.
++ *
++ * @param cvdt CVDT pointer.
++ * @return The transport_stream_id.
++ */
++static inline uint16_t atsc_cvct_section_transport_stream_id(struct atsc_cvct_section *cvct)
++{
++ return cvct->head.ext_head.table_id_ext;
++}
++
++/**
++ * Iterator for the tables field in an atsc_cvct_section.
++ *
++ * @param mgt atsc_cvct_section pointer.
++ * @param pos Variable containing a pointer to the current atsc_cvct_channel.
++ * @param idx Integer used to count which table we in.
++ */
++#define atsc_cvct_section_channels_for_each(mgt, pos, idx) \
++ for ((pos) = atsc_cvct_section_channels_first(mgt), idx=0; \
++ (pos); \
++ (pos) = atsc_cvct_section_channels_next(mgt, pos, ++idx))
++
++/**
++ * Iterator for the descriptors field in a atsc_cvct_channel structure.
++ *
++ * @param table atsc_cvct_channel pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_cvct_channel_descriptors_for_each(table, pos) \
++ for ((pos) = atsc_cvct_channel_descriptors_first(table); \
++ (pos); \
++ (pos) = atsc_cvct_channel_descriptors_next(table, pos))
++
++/**
++ * Accessor for the second part of an atsc_cvct_section.
++ *
++ * @param mgt atsc_cvct_section pointer.
++ * @return atsc_cvct_section_part2 pointer.
++ */
++static inline struct atsc_cvct_section_part2 *
++ atsc_cvct_section_part2(struct atsc_cvct_section *mgt)
++{
++ int pos = sizeof(struct atsc_cvct_section);
++
++ struct atsc_cvct_channel *cur_table;
++ int idx;
++ atsc_cvct_section_channels_for_each(mgt, cur_table, idx) {
++ pos += sizeof(struct atsc_cvct_channel);
++ pos += cur_table->descriptors_length;
++ }
++
++ return (struct atsc_cvct_section_part2 *) (((uint8_t*) mgt) + pos);
++}
++
++/**
++ * Iterator for the descriptors field in a atsc_cvct_section structure.
++ *
++ * @param part2 atsc_cvct_section_part2 pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_cvct_section_part2_descriptors_for_each(part2, pos) \
++ for ((pos) = atsc_cvct_section_part2_descriptors_first(part2); \
++ (pos); \
++ (pos) = atsc_cvct_section_part2_descriptors_next(part2, pos))
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_cvct_channel *
++ atsc_cvct_section_channels_first(struct atsc_cvct_section *cvct)
++{
++ size_t pos = sizeof(struct atsc_cvct_section);
++
++ if (cvct->num_channels_in_section == 0)
++ return NULL;
++
++ return (struct atsc_cvct_channel*) (((uint8_t *) cvct) + pos);
++}
++
++static inline struct atsc_cvct_channel *
++ atsc_cvct_section_channels_next(struct atsc_cvct_section *cvct,
++ struct atsc_cvct_channel *pos,
++ int idx)
++{
++ if (idx >= cvct->num_channels_in_section)
++ return NULL;
++
++ return (struct atsc_cvct_channel *)
++ (((uint8_t*) pos) + sizeof(struct atsc_cvct_channel) + pos->descriptors_length);
++}
++
++static inline struct descriptor *
++ atsc_cvct_channel_descriptors_first(struct atsc_cvct_channel *table)
++{
++ size_t pos = sizeof(struct atsc_cvct_channel);
++
++ if (table->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) table) + pos);
++}
++
++static inline struct descriptor *
++ atsc_cvct_channel_descriptors_next(struct atsc_cvct_channel *table,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) table + sizeof(struct atsc_cvct_channel),
++ table->descriptors_length,
++ pos);
++}
++
++static inline struct descriptor *
++ atsc_cvct_section_part2_descriptors_first(struct atsc_cvct_section_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_cvct_section_part2);
++
++ if (part2->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct descriptor *
++ atsc_cvct_section_part2_descriptors_next(struct atsc_cvct_section_part2 *part2,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_cvct_section_part2),
++ part2->descriptors_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcc_arriving_request_descriptor.h dvb-apps/lib/libucsi/atsc/dcc_arriving_request_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcc_arriving_request_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/dcc_arriving_request_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,107 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_DCC_ARRIVING_REQUEST_DESCRIPTOR
++#define _UCSI_ATSC_DCC_ARRIVING_REQUEST_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++enum atsc_dcc_arriving_request_type {
++ DCC_ARRIVAL_TYPE_DEFER_10SEC = 0x01,
++ DCC_ARRIVAL_TYPE_DEFER = 0x02,
++};
++
++/**
++ * atsc_dcc_arriving_request_descriptor structure.
++ */
++struct atsc_dcc_arriving_request_descriptor {
++ struct descriptor d;
++
++ uint8_t dcc_arriving_request_type;
++ uint8_t dcc_arriving_request_text_length;
++ /* struct atsc_text text[] */
++} __ucsi_packed;
++
++/**
++ * Process an atsc_dcc_arriving_request_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_dcc_arriving_request_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_dcc_arriving_request_descriptor*
++ atsc_dcc_arriving_request_descriptor_codec(struct descriptor* d)
++{
++ struct atsc_dcc_arriving_request_descriptor *ret =
++ (struct atsc_dcc_arriving_request_descriptor *) d;
++
++ if (d->len < 2)
++ return NULL;
++
++ if (d->len != 2 + ret->dcc_arriving_request_text_length)
++ return NULL;
++
++ if (atsc_text_validate((uint8_t*) d + sizeof(struct atsc_dcc_arriving_request_descriptor),
++ ret->dcc_arriving_request_text_length))
++ return NULL;
++
++ return (struct atsc_dcc_arriving_request_descriptor*) d;
++}
++
++/**
++ * Accessor for the text field of an atsc_dcc_arriving_request_descriptor.
++ *
++ * @param d atsc_dcc_arriving_request_descriptor pointer.
++ * @return Pointer to the atsc_text data, or NULL on error.
++ */
++static inline struct atsc_text*
++ atsc_dcc_arriving_request_descriptor_text(struct atsc_dcc_arriving_request_descriptor *d)
++{
++ uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_dcc_arriving_request_descriptor);
++
++ return (struct atsc_text*) txt;
++}
++
++/**
++ * Accessor for the length of the text field of an atsc_dcc_arriving_request_descriptor.
++ *
++ * @param d atsc_dcc_arriving_request_descriptor pointer.
++ * @return The length in bytes.
++ */
++static inline int
++ atsc_dcc_arriving_request_descriptor_text_length(struct
++ atsc_dcc_arriving_request_descriptor *d)
++{
++ return d->d.len - 2;
++}
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcc_departing_request_descriptor.h dvb-apps/lib/libucsi/atsc/dcc_departing_request_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcc_departing_request_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/dcc_departing_request_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,108 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_DCC_DEPARTING_REQUEST_DESCRIPTOR
++#define _UCSI_ATSC_DCC_DEPARTING_REQUEST_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++enum atsc_dcc_departing_request_type {
++ DCC_DEPART_TYPE_IMMEDIATE = 0x01,
++ DCC_DEPART_TYPE_DEFER_10SEC = 0x02,
++ DCC_DEPART_TYPE_DEFER = 0x03,
++};
++
++/**
++ * atsc_dcc_departing_request_descriptor structure.
++ */
++struct atsc_dcc_departing_request_descriptor {
++ struct descriptor d;
++
++ uint8_t dcc_departing_request_type;
++ uint8_t dcc_departing_request_text_length;
++ /* struct atsc_text text[] */
++} __ucsi_packed;
++
++/**
++ * Process an atsc_dcc_departing_request_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_dcc_departing_request_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_dcc_departing_request_descriptor*
++ atsc_dcc_departing_request_descriptor_codec(struct descriptor* d)
++{
++ struct atsc_dcc_departing_request_descriptor *ret =
++ (struct atsc_dcc_departing_request_descriptor *) d;
++
++ if (d->len < 2)
++ return NULL;
++
++ if (d->len != 2 + ret->dcc_departing_request_text_length)
++ return NULL;
++
++ if (atsc_text_validate(((uint8_t*) d) + sizeof(struct atsc_dcc_departing_request_descriptor),
++ ret->dcc_departing_request_text_length))
++ return NULL;
++
++ return (struct atsc_dcc_departing_request_descriptor*) d;
++}
++
++/**
++ * Accessor for the text field of an atsc_dcc_departing_request_descriptor.
++ *
++ * @param d atsc_dcc_departing_request_descriptor pointer.
++ * @return Pointer to the atsc_text data, or NULL on error.
++ */
++static inline struct atsc_text*
++ atsc_dcc_departing_request_descriptor_text(struct atsc_dcc_departing_request_descriptor *d)
++{
++ uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_dcc_departing_request_descriptor);
++
++ return (struct atsc_text*) txt;
++}
++
++/**
++ * Accessor for the length of the text field of an atsc_dcc_departing_request_descriptor.
++ *
++ * @param d atsc_dcc_departing_request_descriptor pointer.
++ * @return The length in bytes.
++ */
++static inline int
++ atsc_dcc_departing_request_descriptor_text_length(struct
++ atsc_dcc_departing_request_descriptor *d)
++{
++ return d->d.len - 2;
++}
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dccsct_section.c dvb-apps/lib/libucsi/atsc/dccsct_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dccsct_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/dccsct_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,109 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/atsc/dccsct_section.h>
++
++struct atsc_dccsct_section *atsc_dccsct_section_codec(struct atsc_section_psip *psip)
++{
++ uint8_t * buf = (uint8_t *) psip;
++ size_t pos = 0;
++ size_t len = section_ext_length(&(psip->ext_head));
++ int idx;
++
++ if (len < sizeof(struct atsc_dccsct_section))
++ return NULL;
++ struct atsc_dccsct_section *dccsct = (struct atsc_dccsct_section *) psip;
++
++ pos += sizeof(struct atsc_dccsct_section);
++ for(idx =0; idx < dccsct->updates_defined; idx++) {
++ if (len < (pos + sizeof(struct atsc_dccsct_update)))
++ return NULL;
++ struct atsc_dccsct_update *update = (struct atsc_dccsct_update *) (buf+pos);
++
++ pos += sizeof(struct atsc_dccsct_update);
++ if (len < (pos + update->update_data_length))
++ return NULL;
++
++ switch(update->update_type) {
++ case ATSC_DCCST_UPDATE_NEW_GENRE: {
++ int sublen = sizeof(struct atsc_dccsct_update_new_genre);
++ if (update->update_data_length < sublen)
++ return NULL;
++
++ if (atsc_text_validate(buf+pos+sublen, update->update_data_length - sublen))
++ return NULL;
++ break;
++ }
++ case ATSC_DCCST_UPDATE_NEW_STATE: {
++ int sublen = sizeof(struct atsc_dccsct_update_new_state);
++ if (update->update_data_length < sublen)
++ return NULL;
++
++ if (atsc_text_validate(buf+pos+sublen, update->update_data_length - sublen))
++ return NULL;
++ break;
++ }
++ case ATSC_DCCST_UPDATE_NEW_COUNTY: {
++ int sublen = sizeof(struct atsc_dccsct_update_new_county);
++ if (update->update_data_length < sublen)
++ return NULL;
++ bswap16(buf+pos+1);
++
++ if (atsc_text_validate(buf+pos+sublen, update->update_data_length - sublen))
++ return NULL;
++ break;
++ }
++ }
++
++ pos += update->update_data_length;
++ if (len < (pos + sizeof(struct atsc_dccsct_update_part2)))
++ return NULL;
++ struct atsc_dccsct_update_part2 *part2 = (struct atsc_dccsct_update_part2 *) buf + pos;
++
++ bswap16(buf+pos);
++
++ pos += sizeof(struct atsc_dccsct_update_part2);
++ if (len < (pos + part2->descriptors_length))
++ return NULL;
++ if (verify_descriptors(buf + pos, part2->descriptors_length))
++ return NULL;
++
++ pos += part2->descriptors_length;
++ }
++
++ if (len < (pos + sizeof(struct atsc_dccsct_section_part2)))
++ return NULL;
++ struct atsc_dccsct_section_part2 *part2 = (struct atsc_dccsct_section_part2 *) (buf+pos);
++
++ bswap16(buf+pos);
++
++ pos += sizeof(struct atsc_dccsct_section_part2);
++ if (len < (pos + part2->descriptors_length))
++ return NULL;
++ if (verify_descriptors(buf + pos, part2->descriptors_length))
++ return NULL;
++
++ pos += part2->descriptors_length;
++ if (pos != len)
++ return NULL;
++
++ return (struct atsc_dccsct_section *) psip;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dccsct_section.h dvb-apps/lib/libucsi/atsc/dccsct_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dccsct_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/dccsct_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,327 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_DCCSCT_SECTION_H
++#define _UCSI_ATSC_DCCSCT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/atsc/section.h>
++#include <libucsi/atsc/types.h>
++
++enum atsc_dccst_update_types {
++ ATSC_DCCST_UPDATE_NEW_GENRE = 0x01,
++ ATSC_DCCST_UPDATE_NEW_STATE = 0x02,
++ ATSC_DCCST_UPDATE_NEW_COUNTY = 0x03,
++};
++
++/**
++ * atsc_dccsct_section structure.
++ */
++struct atsc_dccsct_section {
++ struct atsc_section_psip head;
++
++ uint8_t updates_defined;
++ /* struct atsc_dccsct_update updates */
++ /* struct atsc_dccsct_section_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_dccsct_update {
++ uint8_t update_type;
++ uint8_t update_data_length;
++ /* struct atsc_dccsct_update_XXX data -- depends on update_type */
++ /* struct atsc_dccsct_update_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_dccsct_update_new_genre {
++ uint8_t genre_category_code;
++ /* atsc_text name */
++} __ucsi_packed;
++
++struct atsc_dccsct_update_new_state {
++ uint8_t dcc_state_location_code;
++ /* atsc_text name */
++} __ucsi_packed;
++
++struct atsc_dccsct_update_new_county {
++ uint8_t state_code;
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t dcc_county_location_code :10; );
++ /* atsc_text name */
++} __ucsi_packed;
++
++struct atsc_dccsct_update_part2 {
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++struct atsc_dccsct_section_part2 {
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process an atsc_dccsct_section.
++ *
++ * @param section Pointer to an atsc_section_psip structure.
++ * @return atsc_dccsct_section pointer, or NULL on error.
++ */
++struct atsc_dccsct_section *atsc_dccsct_section_codec(struct atsc_section_psip *section);
++
++/**
++ * Accessor for the dccsct_type field of a dccsct.
++ *
++ * @param dccsct dccsct pointer.
++ * @return The dccsct_type.
++ */
++static inline uint16_t atsc_dccsct_section_dccsct_type(struct atsc_dccsct_section *dccsct)
++{
++ return dccsct->head.ext_head.table_id_ext;
++}
++
++/**
++ * Iterator for the updates field in an atsc_dccsct_section.
++ *
++ * @param dccsct atsc_dccsct_section pointer.
++ * @param pos Variable containing a pointer to the current atsc_dccsct_update.
++ * @param idx Integer used to count which test we are in.
++ */
++#define atsc_dccsct_section_updates_for_each(dccsct, pos, idx) \
++ for ((pos) = atsc_dccsct_section_updates_first(dccsct), idx=0; \
++ (pos); \
++ (pos) = atsc_dccsct_section_updates_next(dccsct, pos, ++idx))
++
++/**
++ * Accessor for the data field of a new genre atsc_dccsct_update.
++ *
++ * @param update atsc_dccsct_update pointer.
++ * @return struct atsc_dccsct_update_new_genre pointer.
++ */
++static inline struct atsc_dccsct_update_new_genre *atsc_dccsct_update_new_genre(struct atsc_dccsct_update *update)
++{
++ if (update->update_type != ATSC_DCCST_UPDATE_NEW_GENRE)
++ return NULL;
++
++ return (struct atsc_dccsct_update_new_genre *)
++ (((uint8_t*) update) + sizeof(struct atsc_dccsct_update));
++}
++
++/**
++ * Accessor for the name field of an atsc_dccsct_update_new_genre.
++ *
++ * @param update atsc_dccsct_update_new_genre pointer.
++ * @return text pointer.
++ */
++static inline struct atsc_text *atsc_dccsct_update_new_genre_name(struct atsc_dccsct_update *update)
++{
++ if ((update->update_data_length - 1) == 0)
++ return NULL;
++
++ return (struct atsc_text *)
++ (((uint8_t*) update) + sizeof(struct atsc_dccsct_update_new_genre));
++}
++
++/**
++ * Accessor for the data field of a new state atsc_dccsct_update.
++ *
++ * @param update atsc_dccsct_update pointer.
++ * @return struct atsc_dccsct_update_new_state pointer.
++ */
++static inline struct atsc_dccsct_update_new_state *
++ atsc_dccsct_update_new_state(struct atsc_dccsct_update *update)
++{
++ if (update->update_type != ATSC_DCCST_UPDATE_NEW_STATE)
++ return NULL;
++
++ return (struct atsc_dccsct_update_new_state *)
++ (((uint8_t*) update) + sizeof(struct atsc_dccsct_update));
++}
++
++/**
++ * Accessor for the name field of an atsc_dccsct_update_new_state.
++ *
++ * @param update atsc_dccsct_update_new_state pointer.
++ * @return text pointer.
++ */
++static inline struct atsc_text *atsc_dccsct_update_new_state_name(struct atsc_dccsct_update *update)
++{
++ if ((update->update_data_length - 1) == 0)
++ return NULL;
++
++ return (struct atsc_text *)
++ (((uint8_t*) update) + sizeof(struct atsc_dccsct_update_new_state));
++}
++
++/**
++ * Accessor for the data field of a new county atsc_dccsct_update.
++ *
++ * @param update atsc_dccsct_update pointer.
++ * @return struct atsc_dccsct_update_new_county pointer.
++ */
++static inline struct atsc_dccsct_update_new_county *
++ atsc_dccsct_update_new_county(struct atsc_dccsct_update *update)
++{
++ if (update->update_type != ATSC_DCCST_UPDATE_NEW_COUNTY)
++ return NULL;
++
++ return (struct atsc_dccsct_update_new_county *)
++ (((uint8_t*) update) + sizeof(struct atsc_dccsct_update));
++}
++
++/**
++ * Accessor for the name field of an atsc_dccsct_update_new_county.
++ *
++ * @param update atsc_dccsct_update_new_county pointer.
++ * @return text pointer.
++ */
++static inline struct atsc_text *atsc_dccsct_update_new_county_name(struct atsc_dccsct_update *update)
++{
++ if ((update->update_data_length - 3) == 0)
++ return NULL;
++
++ return (struct atsc_text*)
++ (((uint8_t*) update) + sizeof(struct atsc_dccsct_update_new_county));
++}
++
++/**
++ * Accessor for the part2 field of an atsc_dccsct_update.
++ *
++ * @param update atsc_dccsct_update pointer.
++ * @return struct atsc_dccsct_test_part2 pointer.
++ */
++static inline struct atsc_dccsct_update_part2 *atsc_dccsct_update_part2(struct atsc_dccsct_update *update)
++{
++ int pos = sizeof(struct atsc_dccsct_update);
++ pos += update->update_data_length;
++
++ return (struct atsc_dccsct_update_part2 *) (((uint8_t*) update) + pos);
++}
++
++/**
++ * Iterator for the descriptors field in an atsc_dccsct_update_part2 structure.
++ *
++ * @param part2 atsc_dccsct_update_part2 pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_dccsct_update_part2_descriptors_for_each(part2, pos) \
++ for ((pos) = atsc_dccsct_update_part2_descriptors_first(part2); \
++ (pos); \
++ (pos) = atsc_dccsct_update_part2_descriptors_next(part2, pos))
++
++/**
++ * Iterator for the descriptors field in a atsc_dccsct_section_part2 structure.
++ *
++ * @param part2 atsc_dccsct_section_part2 pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_dccsct_section_part2_descriptors_for_each(part2, pos) \
++ for ((pos) = atsc_dccsct_section_part2_descriptors_first(part2); \
++ (pos); \
++ (pos) = atsc_dccsct_section_part2_descriptors_next(part2, pos))
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_dccsct_update *
++ atsc_dccsct_section_updates_first(struct atsc_dccsct_section *dccsct)
++{
++ size_t pos = sizeof(struct atsc_dccsct_section);
++
++ if (dccsct->updates_defined == 0)
++ return NULL;
++
++ return (struct atsc_dccsct_update*) (((uint8_t *) dccsct) + pos);
++}
++
++static inline struct atsc_dccsct_update*
++ atsc_dccsct_section_updates_next(struct atsc_dccsct_section *dccsct,
++ struct atsc_dccsct_update *pos,
++ int idx)
++{
++ if (idx >= dccsct->updates_defined)
++ return NULL;
++
++ struct atsc_dccsct_update_part2 *part2 = atsc_dccsct_update_part2(pos);
++ int len = sizeof(struct atsc_dccsct_update_part2);
++ len += part2->descriptors_length;
++
++ return (struct atsc_dccsct_update *) (((uint8_t*) part2) + len);
++}
++
++static inline struct descriptor *
++ atsc_dccsct_update_part2_descriptors_first(struct atsc_dccsct_update_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_dccsct_update_part2);
++
++ if (part2->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct descriptor *
++ atsc_dccsct_update_part2_descriptors_next(struct atsc_dccsct_update_part2 *part2,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_dccsct_update_part2),
++ part2->descriptors_length,
++ pos);
++}
++
++static inline struct descriptor *
++ atsc_dccsct_section_part2_descriptors_first(struct atsc_dccsct_section_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_dccsct_section_part2);
++
++ if (part2->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct descriptor *
++ atsc_dccsct_section_part2_descriptors_next(struct atsc_dccsct_section_part2 *part2,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_dccsct_section_part2),
++ part2->descriptors_length,
++ pos);
++}
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcct_section.c dvb-apps/lib/libucsi/atsc/dcct_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcct_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/dcct_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,96 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/atsc/dcct_section.h>
++
++struct atsc_dcct_section *atsc_dcct_section_codec(struct atsc_section_psip *psip)
++{
++ uint8_t * buf = (uint8_t *) psip;
++ size_t pos = 0;
++ size_t len = section_ext_length(&(psip->ext_head));
++ int testidx;
++ int termidx;
++
++ if (len < sizeof(struct atsc_dcct_section))
++ return NULL;
++ struct atsc_dcct_section *dcct = (struct atsc_dcct_section *) psip;
++
++ pos += sizeof(struct atsc_dcct_section);
++ for(testidx =0; testidx < dcct->dcc_test_count; testidx++) {
++ if (len < (pos + sizeof(struct atsc_dcct_test)))
++ return NULL;
++ struct atsc_dcct_test *test = (struct atsc_dcct_test *) (buf+pos);
++
++ bswap24(buf+pos);
++ bswap24(buf+pos+3);
++ bswap32(buf+pos+6);
++ bswap32(buf+pos+10);
++
++ pos += sizeof(struct atsc_dcct_test);
++ for(termidx =0; termidx < test->dcc_term_count; termidx++) {
++ if (len < (pos + sizeof(struct atsc_dcct_term)))
++ return NULL;
++ struct atsc_dcct_term *term = (struct atsc_dcct_term *) (buf+pos);
++
++ bswap64(buf+pos+1);
++ bswap16(buf+pos+9);
++
++ pos += sizeof(struct atsc_dcct_term);
++ if (len < (pos + term->descriptors_length))
++ return NULL;
++ if (verify_descriptors(buf + pos, term->descriptors_length))
++ return NULL;
++
++ pos += term->descriptors_length;
++ }
++
++ if (len < (pos + sizeof(struct atsc_dcct_test_part2)))
++ return NULL;
++ struct atsc_dcct_test_part2 *part2 = (struct atsc_dcct_test_part2 *) (buf+pos);
++
++ bswap16(buf+pos);
++
++ pos += sizeof(struct atsc_dcct_test_part2);
++ if (len < (pos + part2->descriptors_length))
++ return NULL;
++ if (verify_descriptors(buf + pos, part2->descriptors_length))
++ return NULL;
++ pos += part2->descriptors_length;
++ }
++
++ if (len < (pos + sizeof(struct atsc_dcct_section_part2)))
++ return NULL;
++ struct atsc_dcct_section_part2 *part2 = (struct atsc_dcct_section_part2 *) (buf+pos);
++
++ bswap16(buf+pos);
++
++ pos += sizeof(struct atsc_dcct_section_part2);
++ if (len < (pos + part2->descriptors_length))
++ return NULL;
++ if (verify_descriptors(buf + pos, part2->descriptors_length))
++ return NULL;
++
++ pos += part2->descriptors_length;
++ if (pos != len)
++ return NULL;
++
++ return (struct atsc_dcct_section *) psip;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcct_section.h dvb-apps/lib/libucsi/atsc/dcct_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/dcct_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/dcct_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,380 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_DCCT_SECTION_H
++#define _UCSI_ATSC_DCCT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/atsc/section.h>
++#include <libucsi/atsc/types.h>
++
++enum atsc_dcc_context {
++ ATSC_DCC_CONTEXT_TEMPORARY_RETUNE = 0,
++ ATSC_DCC_CONTEXT_CHANNEL_REDIRECT = 1,
++};
++
++enum atsc_dcc_selection_type {
++ ATSC_DCC_SELECTION_UNCONDITIONAL_CHANNEL_CHANGE = 0x00,
++ ATSC_DCC_SELECTION_NUMERIC_POSTAL_CODE_INCLUSION = 0x01,
++ ATSC_DCC_SELECTION_ALPHANUMERIC_POSTAL_CODE_INCLUSION = 0x02,
++ ATSC_DCC_SELECTION_DEMOGRAPHIC_CATEGORY_ONE_OR_MORE = 0x05,
++ ATSC_DCC_SELECTION_DEMOGRAPHIC_CATEGORY_ALL = 0x06,
++ ATSC_DCC_SELECTION_GENRE_CATEGORY_ONE_OR_MORE = 0x07,
++ ATSC_DCC_SELECTION_GENRE_CATEGORY_ALL = 0x08,
++ ATSC_DCC_SELECTION_CANNOT_BE_AUTHORIZED = 0x09,
++ ATSC_DCC_SELECTION_GEOGRAPHIC_LOCATION_INCLUSION = 0x0c,
++ ATSC_DCC_SELECTION_RATING_BLOCKED = 0x0d,
++ ATSC_DCC_SELECTION_RETURN_TO_ORIGINAL_CHANNEL = 0x0f,
++ ATSC_DCC_SELECTION_NUMERIC_POSTAL_CODE_EXCLUSION = 0x11,
++ ATSC_DCC_SELECTION_ALPHANUMERIC_POSTAL_CODE_EXCLUSION = 0x12,
++ ATSC_DCC_SELECTION_DEMOGRAPHIC_CATEGORY_NOT_ONE_OR_MORE = 0x15,
++ ATSC_DCC_SELECTION_DEMOGRAPHIC_CATEGORY_NOT_ALL = 0x16,
++ ATSC_DCC_SELECTION_GENRE_CATEGORY_NOT_ONE_OR_MORE = 0x17,
++ ATSC_DCC_SELECTION_GENRE_CATEGORY_NOT_ALL = 0x18,
++ ATSC_DCC_SELECTION_GEOGRAPHIC_LOCATION_EXCLUSION = 0x1c,
++ ATSC_DCC_SELECTION_VIEWER_DIRECT_SELECT_A = 0x20,
++ ATSC_DCC_SELECTION_VIEWER_DIRECT_SELECT_B = 0x21,
++ ATSC_DCC_SELECTION_VIEWER_DIRECT_SELECT_C = 0x22,
++ ATSC_DCC_SELECTION_VIEWER_DIRECT_SELECT_D = 0x23,
++};
++
++/**
++ * atsc_dcct_section structure.
++ */
++struct atsc_dcct_section {
++ struct atsc_section_psip head;
++
++ uint8_t dcc_test_count;
++ /* struct atsc_dcct_test tests */
++ /* struct atsc_dcct_section_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_dcct_test {
++ EBIT4(uint32_t dcc_context : 1; ,
++ uint32_t reserved : 3; ,
++ uint32_t dcc_from_major_channel_number :10; ,
++ uint32_t dcc_from_minor_channel_number :10; );
++ EBIT3(uint32_t reserved1 : 4; ,
++ uint32_t dcc_to_major_channel_number :10; ,
++ uint32_t dcc_to_minor_channel_number :10; );
++ atsctime_t start_time;
++ atsctime_t end_time;
++ uint8_t dcc_term_count;
++ /* struct atsc_dcct_term terms */
++ /* struct atsc_dcct_test_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_dcct_term {
++ uint8_t dcc_selection_type;
++ uint64_t dcc_selection_id;
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++struct atsc_dcct_test_part2 {
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++struct atsc_dcct_section_part2 {
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++static inline struct atsc_dcct_test *
++ atsc_dcct_section_tests_first(struct atsc_dcct_section *dcct);
++static inline struct atsc_dcct_test *
++ atsc_dcct_section_tests_next(struct atsc_dcct_section *dcct,
++ struct atsc_dcct_test *pos,
++ int idx);
++static inline struct atsc_dcct_term *
++ atsc_dcct_test_terms_first(struct atsc_dcct_test *test);
++static inline struct atsc_dcct_term *
++ atsc_dcct_test_terms_next(struct atsc_dcct_test *test,
++ struct atsc_dcct_term *pos,
++ int idx);
++
++
++/**
++ * Process an atsc_dcct_section.
++ *
++ * @param section Pointer to an atsc_section_psip structure.
++ * @return atsc_dcct_section pointer, or NULL on error.
++ */
++struct atsc_dcct_section *atsc_dcct_section_codec(struct atsc_section_psip *section);
++
++/**
++ * Accessor for the dcc_subtype field of a dcct.
++ *
++ * @param dcct dcct pointer.
++ * @return The dcc_subtype.
++ */
++static inline uint8_t atsc_dcct_section_dcc_subtype(struct atsc_dcct_section *dcct)
++{
++ return dcct->head.ext_head.table_id_ext >> 8;
++}
++
++/**
++ * Accessor for the dcc_id field of a dcct.
++ *
++ * @param dcct dcct pointer.
++ * @return The dcc_id.
++ */
++static inline uint8_t atsc_dcct_section_dcc_id(struct atsc_dcct_section *dcct)
++{
++ return dcct->head.ext_head.table_id_ext & 0xff;
++}
++
++/**
++ * Iterator for the tests field in an atsc_dcct_section.
++ *
++ * @param dcct atsc_dcct_section pointer.
++ * @param pos Variable containing a pointer to the current atsc_dcct_test.
++ * @param idx Integer used to count which test we are in.
++ */
++#define atsc_dcct_section_tests_for_each(dcct, pos, idx) \
++ for ((pos) = atsc_dcct_section_tests_first(dcct), idx=0; \
++ (pos); \
++ (pos) = atsc_dcct_section_tests_next(dcct, pos, ++idx))
++
++/**
++ * Iterator for the terms field in an atsc_dcct_test.
++ *
++ * @param test atsc_dcct_test pointer.
++ * @param pos Variable containing a pointer to the current atsc_dcct_term.
++ * @param idx Integer used to count which test we are in.
++ */
++#define atsc_dcct_test_terms_for_each(test, pos, idx) \
++ for ((pos) = atsc_dcct_test_terms_first(test), idx=0; \
++ (pos); \
++ (pos) = atsc_dcct_test_terms_next(test, pos, ++idx))
++
++/**
++ * Iterator for the descriptors field in a atsc_dcct_term structure.
++ *
++ * @param term atsc_dcct_term pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_dcct_term_descriptors_for_each(term, pos) \
++ for ((pos) = atsc_dcct_term_descriptors_first(term); \
++ (pos); \
++ (pos) = atsc_dcct_term_descriptors_next(term, pos))
++
++/**
++ * Accessor for the part2 field of an atsc_dcct_test.
++ *
++ * @param test atsc_dcct_test pointer.
++ * @return struct atsc_dcct_test_part2 pointer.
++ */
++static inline struct atsc_dcct_test_part2 *atsc_dcct_test_part2(struct atsc_dcct_test *test)
++{
++ int pos = sizeof(struct atsc_dcct_test);
++
++ struct atsc_dcct_term *cur_term;
++ int idx;
++ atsc_dcct_test_terms_for_each(test, cur_term, idx) {
++ pos += sizeof(struct atsc_dcct_term);
++ pos += cur_term->descriptors_length;
++ }
++
++ return (struct atsc_dcct_test_part2 *) (((uint8_t*) test) + pos);
++}
++
++/**
++ * Iterator for the descriptors field in a atsc_dcct_test_part2 structure.
++ *
++ * @param term atsc_dcct_test_part2 pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_dcct_test_part2_descriptors_for_each(part2, pos) \
++ for ((pos) = atsc_dcct_test_part2_descriptors_first(part2); \
++ (pos); \
++ (pos) = atsc_dcct_test_part2_descriptors_next(part2, pos))
++
++/**
++ * Accessor for the part2 field of an atsc_dcct_section.
++ *
++ * @param dcct atsc_dcct_section pointer.
++ * @return struct atsc_dcct_section_part2 pointer.
++ */
++static inline struct atsc_dcct_section_part2 *atsc_dcct_section_part2(struct atsc_dcct_section *dcct)
++{
++ int pos = sizeof(struct atsc_dcct_section);
++
++ struct atsc_dcct_test *cur_test;
++ int testidx;
++ atsc_dcct_section_tests_for_each(dcct, cur_test, testidx) {
++ struct atsc_dcct_test_part2 *part2 = atsc_dcct_test_part2(cur_test);
++ pos += ((uint8_t*) part2 - (uint8_t*) cur_test);
++
++ pos += sizeof(struct atsc_dcct_test_part2);
++ pos += part2->descriptors_length;
++ }
++
++ return (struct atsc_dcct_section_part2 *) (((uint8_t*) dcct) + pos);
++}
++
++/**
++ * Iterator for the descriptors field in a atsc_dcct_section_part2 structure.
++ *
++ * @param part2 atsc_dcct_section_part2 pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_dcct_section_part2_descriptors_for_each(part2, pos) \
++ for ((pos) = atsc_dcct_section_part2_descriptors_first(part2); \
++ (pos); \
++ (pos) = atsc_dcct_section_part2_descriptors_next(part2, pos))
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_dcct_test *
++ atsc_dcct_section_tests_first(struct atsc_dcct_section *dcct)
++{
++ size_t pos = sizeof(struct atsc_dcct_section);
++
++ if (dcct->dcc_test_count == 0)
++ return NULL;
++
++ return (struct atsc_dcct_test*) (((uint8_t *) dcct) + pos);
++}
++
++static inline struct atsc_dcct_test *
++ atsc_dcct_section_tests_next(struct atsc_dcct_section *dcct,
++ struct atsc_dcct_test *pos,
++ int idx)
++{
++ if (idx >= dcct->dcc_test_count)
++ return NULL;
++
++ struct atsc_dcct_test_part2 *part2 = atsc_dcct_test_part2(pos);
++ int len = sizeof(struct atsc_dcct_test_part2);
++ len += part2->descriptors_length;
++
++ return (struct atsc_dcct_test *) (((uint8_t*) part2) + len);
++}
++
++static inline struct atsc_dcct_term *
++ atsc_dcct_test_terms_first(struct atsc_dcct_test *test)
++{
++ size_t pos = sizeof(struct atsc_dcct_test);
++
++ if (test->dcc_term_count == 0)
++ return NULL;
++
++ return (struct atsc_dcct_term*) (((uint8_t *) test) + pos);
++}
++
++static inline struct atsc_dcct_term *
++ atsc_dcct_test_terms_next(struct atsc_dcct_test *test,
++ struct atsc_dcct_term *pos,
++ int idx)
++{
++ if (idx >= test->dcc_term_count)
++ return NULL;
++
++ int len = sizeof(struct atsc_dcct_term);
++ len += pos->descriptors_length;
++
++ return (struct atsc_dcct_term *) (((uint8_t*) pos) + len);
++}
++
++static inline struct descriptor *
++ atsc_dcct_term_descriptors_first(struct atsc_dcct_term *term)
++{
++ size_t pos = sizeof(struct atsc_dcct_term);
++
++ if (term->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) term) + pos);
++}
++
++static inline struct descriptor *
++ atsc_dcct_term_descriptors_next(struct atsc_dcct_term *term,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) term + sizeof(struct atsc_dcct_term),
++ term->descriptors_length,
++ pos);
++}
++
++static inline struct descriptor *
++ atsc_dcct_test_part2_descriptors_first(struct atsc_dcct_test_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_dcct_test_part2);
++
++ if (part2->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct descriptor *
++ atsc_dcct_test_part2_descriptors_next(struct atsc_dcct_test_part2 *part2,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_dcct_test_part2),
++ part2->descriptors_length,
++ pos);
++}
++
++static inline struct descriptor *
++ atsc_dcct_section_part2_descriptors_first(struct atsc_dcct_section_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_dcct_section_part2);
++
++ if (part2->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct descriptor *
++ atsc_dcct_section_part2_descriptors_next(struct atsc_dcct_section_part2 *part2,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_dcct_section_part2),
++ part2->descriptors_length,
++ pos);
++}
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/descriptor.h dvb-apps/lib/libucsi/atsc/descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,68 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_DESCRIPTOR_H
++#define _UCSI_ATSC_DESCRIPTOR_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/endianops.h>
++#include <libucsi/atsc/stuffing_descriptor.h>
++#include <libucsi/atsc/ac3_descriptor.h>
++#include <libucsi/atsc/caption_service_descriptor.h>
++#include <libucsi/atsc/component_name_descriptor.h>
++#include <libucsi/atsc/content_advisory_descriptor.h>
++#include <libucsi/atsc/dcc_arriving_request_descriptor.h>
++#include <libucsi/atsc/dcc_departing_request_descriptor.h>
++#include <libucsi/atsc/extended_channel_name_descriptor.h>
++#include <libucsi/atsc/genre_descriptor.h>
++#include <libucsi/atsc/rc_descriptor.h>
++#include <libucsi/atsc/service_location_descriptor.h>
++#include <libucsi/atsc/time_shifted_service_descriptor.h>
++
++/**
++ * Enumeration of ATSC descriptor tags.
++ */
++enum atsc_descriptor_tag {
++ dtag_atsc_stuffing = 0x80,
++ dtag_atsc_ac3_audio = 0x81,
++ dtag_atsc_caption_service = 0x86,
++ dtag_atsc_content_advisory = 0x87,
++ dtag_atsc_extended_channel_name = 0xa0,
++ dtag_atsc_service_location = 0xa1,
++ dtag_atsc_time_shifted_service = 0xa2,
++ dtag_atsc_component_name = 0xa3,
++ dtag_atsc_dcc_departing_request = 0xa8,
++ dtag_atsc_dcc_arriving_request = 0xa9,
++ dtag_atsc_redistribution_control = 0xaa,
++ dtag_atsc_private_information = 0xad,
++ dtag_atsc_content_identifier = 0xb6,
++ dtag_atsc_genre = 0xab,
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/eit_section.c dvb-apps/lib/libucsi/atsc/eit_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/eit_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/eit_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,71 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/atsc/eit_section.h>
++
++struct atsc_eit_section *atsc_eit_section_codec(struct atsc_section_psip *psip)
++{
++ uint8_t * buf = (uint8_t *) psip;
++ size_t pos = 0;
++ size_t len = section_ext_length(&(psip->ext_head));
++ int idx;
++
++ if (len < sizeof(struct atsc_eit_section))
++ return NULL;
++ struct atsc_eit_section *eit = (struct atsc_eit_section *) psip;
++
++ pos += sizeof(struct atsc_eit_section);
++ for(idx =0; idx < eit->num_events_in_section; idx++) {
++ if (len < (pos + sizeof(struct atsc_eit_event)))
++ return NULL;
++ struct atsc_eit_event *event = (struct atsc_eit_event *) (buf+pos);
++
++ bswap16(buf+pos);
++ bswap32(buf+pos+2);
++ bswap32(buf+pos+6);
++
++ pos += sizeof(struct atsc_eit_event);
++ if (len < (pos + event->title_length))
++ return NULL;
++ if (atsc_text_validate(buf+pos, event->title_length))
++ return NULL;
++
++ pos += event->title_length;
++ if (len < (pos + sizeof(struct atsc_eit_event_part2)))
++ return NULL;
++ struct atsc_eit_event_part2 *part2 = (struct atsc_eit_event_part2 *) (buf+pos);
++
++ bswap16(buf+pos);
++
++ pos += sizeof(struct atsc_eit_event_part2);
++ if (len < (pos + part2->descriptors_length))
++ return NULL;
++
++ if (verify_descriptors(buf + pos, part2->descriptors_length))
++ return NULL;
++ pos += part2->descriptors_length;
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return (struct atsc_eit_section *) psip;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/eit_section.h dvb-apps/lib/libucsi/atsc/eit_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/eit_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/eit_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,191 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_EIT_SECTION_H
++#define _UCSI_ATSC_EIT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/atsc/section.h>
++#include <libucsi/atsc/types.h>
++
++/**
++ * atsc_eit_section structure.
++ */
++struct atsc_eit_section {
++ struct atsc_section_psip head;
++
++ uint8_t num_events_in_section;
++ /* struct atsc_eit_event events[] */
++} __ucsi_packed;
++
++struct atsc_eit_event {
++ EBIT2(uint16_t reserved : 2; ,
++ uint16_t event_id :14; );
++ atsctime_t start_time;
++ EBIT4(uint32_t reserved1 : 2; ,
++ uint32_t ETM_location : 2; ,
++ uint32_t length_in_seconds :20; ,
++ uint32_t title_length : 8; );
++ /* struct atsc_text title_text */
++ /* struct atsc_eit_event_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_eit_event_part2 {
++ EBIT2(uint16_t reserved : 4; ,
++ uint16_t descriptors_length :12; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++
++/**
++ * Process a atsc_eit_section.
++ *
++ * @param section Pointer to an atsc_section_psip structure.
++ * @return atsc_eit_section pointer, or NULL on error.
++ */
++struct atsc_eit_section *atsc_eit_section_codec(struct atsc_section_psip *section);
++
++/**
++ * Accessor for the source_id field of an EIT.
++ *
++ * @param eit EIT pointer.
++ * @return The source_id .
++ */
++static inline uint16_t atsc_eit_section_source_id(struct atsc_eit_section *eit)
++{
++ return eit->head.ext_head.table_id_ext;
++}
++
++/**
++ * Iterator for the events field in an atsc_eit_section.
++ *
++ * @param eit atsc_eit_section pointer.
++ * @param pos Variable containing a pointer to the current atsc_eit_event.
++ * @param idx Integer used to count which event we are in.
++ */
++#define atsc_eit_section_events_for_each(eit, pos, idx) \
++ for ((pos) = atsc_eit_section_events_first(eit), idx=0; \
++ (pos); \
++ (pos) = atsc_eit_section_events_next(eit, pos, ++idx))
++
++/**
++ * Accessor for the title_text field of an atsc_eit_event.
++ *
++ * @param event atsc_eit_event pointer.
++ * @return struct atsc_text pointer, or NULL on error.
++ */
++static inline struct atsc_text *atsc_eit_event_name_title_text(struct atsc_eit_event *event)
++{
++ if (event->title_length == 0)
++ return NULL;
++
++ return (struct atsc_text*)(((uint8_t*) event) + sizeof(struct atsc_eit_event));
++}
++
++/**
++ * Accessor for the part2 field of an atsc_eit_event.
++ *
++ * @param event atsc_eit_event pointer.
++ * @return struct atsc_eit_event_part2 pointer.
++ */
++static inline struct atsc_eit_event_part2 *atsc_eit_event_part2(struct atsc_eit_event *event)
++{
++ return (struct atsc_eit_event_part2 *)
++ (((uint8_t*) event) + sizeof(struct atsc_eit_event) + event->title_length);
++}
++
++/**
++ * Iterator for the descriptors field in a atsc_eit_section structure.
++ *
++ * @param part2 atsc_eit_event_part2 pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_eit_event_part2_descriptors_for_each(part2, pos) \
++ for ((pos) = atsc_eit_event_part2_descriptors_first(part2); \
++ (pos); \
++ (pos) = atsc_eit_event_part2_descriptors_next(part2, pos))
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_eit_event *
++ atsc_eit_section_events_first(struct atsc_eit_section *eit)
++{
++ size_t pos = sizeof(struct atsc_eit_section);
++
++ if (eit->num_events_in_section == 0)
++ return NULL;
++
++ return (struct atsc_eit_event*) (((uint8_t *) eit) + pos);
++}
++
++static inline struct atsc_eit_event *
++ atsc_eit_section_events_next(struct atsc_eit_section *eit,
++ struct atsc_eit_event *pos,
++ int idx)
++{
++ if (idx >= eit->num_events_in_section)
++ return NULL;
++
++ struct atsc_eit_event_part2 *part2 = atsc_eit_event_part2(pos);
++ int len = sizeof(struct atsc_eit_event_part2);
++ len += part2->descriptors_length;
++
++ return (struct atsc_eit_event *) (((uint8_t*) part2) + len);
++}
++
++static inline struct descriptor *
++ atsc_eit_event_part2_descriptors_first(struct atsc_eit_event_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_eit_event_part2);
++
++ if (part2->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct descriptor *
++ atsc_eit_event_part2_descriptors_next(struct atsc_eit_event_part2 *part2,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_eit_event_part2),
++ part2->descriptors_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ett_section.c dvb-apps/lib/libucsi/atsc/ett_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ett_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/ett_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,42 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/atsc/ett_section.h>
++#include <libucsi/atsc/types.h>
++
++struct atsc_ett_section *atsc_ett_section_codec(struct atsc_section_psip *psip)
++{
++ uint8_t * buf = (uint8_t *) psip;
++ size_t pos = sizeof(struct atsc_section_psip);
++ size_t len = section_ext_length(&(psip->ext_head));
++
++ if (len < sizeof(struct atsc_ett_section))
++ return NULL;
++
++ bswap32(buf + pos);
++ pos += 4;
++
++ if (atsc_text_validate(buf + pos,
++ section_ext_length(&psip->ext_head) - sizeof(struct atsc_ett_section)))
++ return NULL;
++
++ return (struct atsc_ett_section *) psip;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ett_section.h dvb-apps/lib/libucsi/atsc/ett_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/ett_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/ett_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,91 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_ETT_SECTION_H
++#define _UCSI_ATSC_ETT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/atsc/section.h>
++
++enum atsc_etm_type {
++ ATSC_ETM_CHANNEL = 0x00,
++ ATSC_ETM_EVENT = 0x02,
++};
++
++/**
++ * atsc_ett_section structure.
++ */
++struct atsc_ett_section {
++ struct atsc_section_psip head;
++
++ EBIT3(uint32_t ETM_source_id :16; ,
++ uint32_t ETM_sub_id :14; ,
++ uint32_t ETM_type : 2; );
++ /* struct atsc_text extended_text_message */
++} __ucsi_packed;
++
++/**
++ * Process a atsc_ett_section.
++ *
++ * @param section Pointer to an atsc_section_psip structure.
++ * @return atsc_ett_section pointer, or NULL on error.
++ */
++struct atsc_ett_section *atsc_ett_section_codec(struct atsc_section_psip *section);
++
++/**
++ * Accessor for the extended_text_message part of an atsc_ett_section.
++ *
++ * @param ett atsc_ett_section pointer.
++ * @return atsc_text pointer, or NULL on error.
++ */
++static inline struct atsc_text*
++ atsc_ett_section_extended_text_message(struct atsc_ett_section *ett)
++{
++ int pos = sizeof(struct atsc_ett_section);
++ int len = section_ext_length(&ett->head.ext_head) - sizeof(struct atsc_ett_section);
++
++ if (len == 0)
++ return NULL;
++
++ return (struct atsc_text*)(((uint8_t*) ett) + pos);
++}
++
++/**
++ * Accessor for the extended_text_message part of an atsc_ett_section.
++ *
++ * @param ett atsc_ett_section pointer.
++ * @return The length.
++ */
++static inline int
++ atsc_ett_section_extended_text_message_length(struct atsc_ett_section *ett)
++{
++ return section_ext_length(&ett->head.ext_head) - sizeof(struct atsc_ett_section);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/extended_channel_name_descriptor.h dvb-apps/lib/libucsi/atsc/extended_channel_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/extended_channel_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/extended_channel_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,92 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_EXTENDED_CHANNEL_NAME_DESCRIPTOR
++#define _UCSI_ATSC_EXTENDED_CHANNEL_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++#include <libucsi/atsc/types.h>
++
++/**
++ * atsc_extended_channel_name_descriptor structure.
++ */
++struct atsc_extended_channel_name_descriptor {
++ struct descriptor d;
++
++ /* struct atsc_text text[] */
++} __ucsi_packed;
++
++/**
++ * Process an atsc_extended_channel_name_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_extended_channel_name_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_extended_channel_name_descriptor*
++ atsc_extended_channel_name_descriptor_codec(struct descriptor* d)
++{
++ if (atsc_text_validate(((uint8_t*) d) + sizeof(struct atsc_extended_channel_name_descriptor),
++ d->len))
++ return NULL;
++
++ return (struct atsc_extended_channel_name_descriptor*) d;
++}
++
++/**
++ * Accessor for the text field of an atsc_extended_channel_name_descriptor.
++ *
++ * @param d atsc_extended_channel_name_descriptor pointer.
++ * @return Pointer to the atsc_text data, or NULL on error.
++ */
++static inline struct atsc_text*
++ atsc_extended_channel_name_descriptor_text(struct atsc_extended_channel_name_descriptor *d)
++{
++ uint8_t *txt = ((uint8_t*) d) + sizeof(struct atsc_extended_channel_name_descriptor);
++
++ return (struct atsc_text*) txt;
++}
++
++/**
++ * Accessor for the length of the text field of an atsc_extended_channel_name_descriptor.
++ *
++ * @param d atsc_extended_channel_name_descriptor pointer.
++ * @return The length in bytes.
++ */
++static inline int
++ atsc_extended_channel_name_descriptor_text_length(struct
++ atsc_extended_channel_name_descriptor *d)
++{
++ return d->d.len;
++}
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/genre_descriptor.h dvb-apps/lib/libucsi/atsc/genre_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/genre_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/genre_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,82 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_GENRE_DESCRIPTOR
++#define _UCSI_ATSC_GENRE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * atsc_genre_descriptor structure.
++ */
++struct atsc_genre_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t reserved : 3; ,
++ uint8_t attribute_count : 5; );
++ /* uint8_t attributes[] */
++} __ucsi_packed;
++
++/**
++ * Process an atsc_genre_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_genre_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_genre_descriptor*
++ atsc_genre_descriptor_codec(struct descriptor* d)
++{
++ struct atsc_genre_descriptor *ret =
++ (struct atsc_genre_descriptor *) d;
++
++ if (d->len < 1)
++ return NULL;
++
++ if (d->len != (1 + ret->attribute_count))
++ return NULL;
++
++ return (struct atsc_genre_descriptor*) d;
++}
++
++/**
++ * Accessor for the attributes field of an atsc_genre_descriptor.
++ *
++ * @param d atsc_genre_descriptor pointer.
++ * @return Pointer to the attributes.
++ */
++static inline uint8_t*
++ atsc_genre_descriptor_attributes(struct atsc_genre_descriptor *d)
++{
++ return ((uint8_t*) d) + sizeof(struct atsc_genre_descriptor);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/Makefile dvb-apps/lib/libucsi/atsc/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,55 @@
++# Makefile for linuxtv.org dvb-apps/lib/libucsi/atsc
++
++.PHONY: sub-error-atsc
++
++sub-error-atsc:
++ $(error You can't use this makefile directly.)
++
++ifneq ($(lib_name),)
++
++objects += atsc/atsc_text.o \
++ atsc/cvct_section.o \
++ atsc/dccsct_section.o \
++ atsc/dcct_section.o \
++ atsc/eit_section.o \
++ atsc/ett_section.o \
++ atsc/mgt_section.o \
++ atsc/rrt_section.o \
++ atsc/stt_section.o \
++ atsc/tvct_section.o \
++ atsc/types.o
++
++sub-install += atsc
++
++else
++
++includes = ac3_descriptor.h \
++ caption_service_descriptor.h \
++ component_name_descriptor.h \
++ content_advisory_descriptor.h \
++ cvct_section.h \
++ dcc_arriving_request_descriptor.h \
++ dcc_departing_request_descriptor.h \
++ dccsct_section.h \
++ dcct_section.h \
++ descriptor.h \
++ eit_section.h \
++ ett_section.h \
++ extended_channel_name_descriptor.h \
++ genre_descriptor.h \
++ mgt_section.h \
++ rc_descriptor.h \
++ rrt_section.h \
++ section.h \
++ service_location_descriptor.h \
++ stt_section.h \
++ stuffing_descriptor.h \
++ time_shifted_service_descriptor.h \
++ tvct_section.h \
++ types.h
++
++include ../../../Make.rules
++
++lib_name = libucsi/atsc
++
++endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/mgt_section.c dvb-apps/lib/libucsi/atsc/mgt_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/mgt_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/mgt_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,76 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/atsc/mgt_section.h>
++
++struct atsc_mgt_section *atsc_mgt_section_codec(struct atsc_section_psip *psip)
++{
++ uint8_t * buf = (uint8_t *) psip;
++ size_t pos = sizeof(struct atsc_section_psip);
++ size_t len = section_ext_length(&(psip->ext_head));
++ struct atsc_mgt_section *mgt = (struct atsc_mgt_section *) psip;
++ int i;
++
++ if (len < sizeof(struct atsc_mgt_section))
++ return NULL;
++
++ bswap16(buf + pos);
++ pos += 2;
++
++ // we cannot use the tables_defined value here because of the braindead ATSC spec!
++ for(i=0; i < mgt->tables_defined; i++) {
++ // we think we're still in the tables - process as normal
++ if ((pos + sizeof(struct atsc_mgt_table)) > len)
++ return NULL;
++ struct atsc_mgt_table *table = (struct atsc_mgt_table *) (buf+pos);
++
++ bswap16(buf+pos);
++ bswap16(buf+pos+2);
++ bswap32(buf+pos+5);
++ bswap16(buf+pos+9);
++
++ pos += sizeof(struct atsc_mgt_table);
++ if ((pos + table->table_type_descriptors_length) > len)
++ return NULL;
++ if (verify_descriptors(buf + pos, table->table_type_descriptors_length))
++ return NULL;
++
++ pos += table->table_type_descriptors_length;
++ }
++
++ if ((pos + sizeof(struct atsc_mgt_section_part2)) > len)
++ return NULL;
++ struct atsc_mgt_section_part2 *part2 = (struct atsc_mgt_section_part2 *) (buf+pos);
++
++ bswap16(buf+pos);
++
++ pos += sizeof(struct atsc_mgt_section_part2);
++ if ((pos + part2->descriptors_length) > len)
++ return NULL;
++ if (verify_descriptors(buf + pos, part2->descriptors_length))
++ return NULL;
++ pos += part2->descriptors_length;
++
++ if (pos != len)
++ return NULL;
++
++ return (struct atsc_mgt_section *) psip;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/mgt_section.h dvb-apps/lib/libucsi/atsc/mgt_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/mgt_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/mgt_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,215 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_MGT_SECTION_H
++#define _UCSI_ATSC_MGT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/atsc/section.h>
++
++enum atsc_mgt_section_table_type {
++ ATSC_MGT_TABLE_TYPE_TVCT_CURRENT = 0,
++ ATSC_MGT_TABLE_TYPE_TVCT_NEXT = 1,
++ ATSC_MGT_TABLE_TYPE_CVCT_CURRENT = 2,
++ ATSC_MGT_TABLE_TYPE_CVCT_NEXT = 3,
++ ATSC_MGT_TABLE_TYPE_CHANNEL_ETT = 4,
++ ATSC_MGT_TABLE_TYPE_DCCSCT = 5,
++};
++
++/**
++ * atsc_mgt_section structure.
++ */
++struct atsc_mgt_section {
++ struct atsc_section_psip head;
++
++ uint16_t tables_defined;
++ /* struct atsc_mgt_table tables[] */
++ /* struct atsc_mgt_section_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_mgt_table {
++ uint16_t table_type;
++ EBIT2(uint16_t reserved : 3; ,
++ uint16_t table_type_PID :13; );
++ EBIT2(uint8_t reserved1 : 3; ,
++ uint8_t table_type_version_number : 5; );
++ uint32_t number_bytes;
++ EBIT2(uint16_t reserved2 : 4; ,
++ uint16_t table_type_descriptors_length :12; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++struct atsc_mgt_section_part2 {
++ EBIT2(uint16_t reserved : 4; ,
++ uint16_t descriptors_length :12; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++static inline struct atsc_mgt_table * atsc_mgt_section_tables_first(struct atsc_mgt_section *mgt);
++static inline struct atsc_mgt_table *
++ atsc_mgt_section_tables_next(struct atsc_mgt_section *mgt, struct atsc_mgt_table *pos, int idx);
++
++/**
++ * Process a atsc_mgt_section.
++ *
++ * @param section Pointer to an atsc_section_psip structure.
++ * @return atsc_mgt_section pointer, or NULL on error.
++ */
++struct atsc_mgt_section *atsc_mgt_section_codec(struct atsc_section_psip *section);
++
++/**
++ * Iterator for the tables field in an atsc_mgt_section.
++ *
++ * @param mgt atsc_mgt_section pointer.
++ * @param pos Variable containing a pointer to the current atsc_mgt_table.
++ * @param idx Integer used to count which table we in.
++ */
++#define atsc_mgt_section_tables_for_each(mgt, pos, idx) \
++ for ((pos) = atsc_mgt_section_tables_first(mgt), idx=0; \
++ (pos); \
++ (pos) = atsc_mgt_section_tables_next(mgt, pos, ++idx))
++
++/**
++ * Iterator for the descriptors field in a atsc_mgt_table structure.
++ *
++ * @param table atsc_mgt_table pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_mgt_table_descriptors_for_each(table, pos) \
++ for ((pos) = atsc_mgt_table_descriptors_first(table); \
++ (pos); \
++ (pos) = atsc_mgt_table_descriptors_next(table, pos))
++
++/**
++ * Accessor for the second part of an atsc_mgt_section.
++ *
++ * @param mgt atsc_mgt_section pointer.
++ * @return atsc_mgt_section_part2 pointer.
++ */
++static inline struct atsc_mgt_section_part2 *
++ atsc_mgt_section_part2(struct atsc_mgt_section *mgt)
++{
++ int pos = sizeof(struct atsc_mgt_section);
++
++ struct atsc_mgt_table *cur_table;
++ int idx;
++ atsc_mgt_section_tables_for_each(mgt, cur_table, idx) {
++ pos += sizeof(struct atsc_mgt_table);
++ pos += cur_table->table_type_descriptors_length;
++ }
++
++ return (struct atsc_mgt_section_part2 *) (((uint8_t*) mgt) + pos);
++}
++
++/**
++ * Iterator for the descriptors field in a atsc_mgt_section structure.
++ *
++ * @param part2 atsc_mgt_section_part2 pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_mgt_section_part2_descriptors_for_each(part2, pos) \
++ for ((pos) = atsc_mgt_section_part2_descriptors_first(part2); \
++ (pos); \
++ (pos) = atsc_mgt_section_part2_descriptors_next(part2, pos))
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_mgt_table *
++ atsc_mgt_section_tables_first(struct atsc_mgt_section *mgt)
++{
++ size_t pos = sizeof(struct atsc_mgt_section);
++
++ if (mgt->tables_defined == 0)
++ return NULL;
++
++ return (struct atsc_mgt_table*) (((uint8_t *) mgt) + pos);
++}
++
++static inline struct atsc_mgt_table *
++ atsc_mgt_section_tables_next(struct atsc_mgt_section *mgt,
++ struct atsc_mgt_table *pos,
++ int idx)
++{
++ if (idx >= mgt->tables_defined)
++ return NULL;
++
++ return (struct atsc_mgt_table *)
++ (((uint8_t*) pos) + sizeof(struct atsc_mgt_table) + pos->table_type_descriptors_length);
++}
++
++static inline struct descriptor *
++ atsc_mgt_table_descriptors_first(struct atsc_mgt_table *table)
++{
++ size_t pos = sizeof(struct atsc_mgt_table);
++
++ if (table->table_type_descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) table) + pos);
++}
++
++static inline struct descriptor *
++ atsc_mgt_table_descriptors_next(struct atsc_mgt_table *table,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) table + sizeof(struct atsc_mgt_table),
++ table->table_type_descriptors_length,
++ pos);
++}
++
++static inline struct descriptor *
++ atsc_mgt_section_part2_descriptors_first(struct atsc_mgt_section_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_mgt_section_part2);
++
++ if (part2->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct descriptor *
++ atsc_mgt_section_part2_descriptors_next(struct atsc_mgt_section_part2 *part2,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_mgt_section_part2),
++ part2->descriptors_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rc_descriptor.h dvb-apps/lib/libucsi/atsc/rc_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rc_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/rc_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,83 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_RC_DESCRIPTOR
++#define _UCSI_ATSC_RC_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * atsc_rc_descriptor structure.
++ */
++struct atsc_rc_descriptor {
++ struct descriptor d;
++
++ /* uint8_t info[] */
++} __ucsi_packed;
++
++/**
++ * Process an atsc_rc_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_rc_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_rc_descriptor*
++ atsc_rc_descriptor_codec(struct descriptor* d)
++{
++ return (struct atsc_rc_descriptor*) d;
++}
++
++/**
++ * Accessor for the info field of an atsc_rc_descriptor.
++ *
++ * @param d atsc_rc_descriptor pointer.
++ * @return Pointer to the atsc_text data.
++ */
++static inline uint8_t*
++ atsc_rc_descriptor_info(struct atsc_rc_descriptor *d)
++{
++ return ((uint8_t*) d) + sizeof(struct atsc_rc_descriptor);
++}
++
++/**
++ * Accessor for the length of the info field of an atsc_rc_descriptor.
++ *
++ * @param d atsc_rc_descriptor pointer.
++ * @return The length
++ */
++static inline int
++ atsc_rc_descriptor_info_length(struct atsc_rc_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rrt_section.c dvb-apps/lib/libucsi/atsc/rrt_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rrt_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/rrt_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,108 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/atsc/rrt_section.h>
++
++struct atsc_rrt_section *atsc_rrt_section_codec(struct atsc_section_psip *psip)
++{
++ uint8_t * buf = (uint8_t *) psip;
++ size_t pos = 0;
++ size_t len = section_ext_length(&(psip->ext_head));
++ int idx;
++ int vidx;
++ struct atsc_rrt_section *rrt = (struct atsc_rrt_section *) psip;
++
++ if (len < sizeof(struct atsc_rrt_section))
++ return NULL;
++ pos += sizeof(struct atsc_rrt_section);
++
++ if (len < (pos + rrt->rating_region_name_length))
++ return NULL;
++ if (atsc_text_validate(buf+pos, rrt->rating_region_name_length))
++ return NULL;
++
++ pos += rrt->rating_region_name_length;
++ if (len < (pos + sizeof(struct atsc_rrt_section_part2)))
++ return NULL;
++ struct atsc_rrt_section_part2 *rrtpart2 = (struct atsc_rrt_section_part2 *) (buf+pos);
++
++ pos += sizeof(struct atsc_rrt_section_part2);
++ for(idx =0; idx < rrtpart2->dimensions_defined; idx++) {
++ if (len < (pos + sizeof(struct atsc_rrt_dimension)))
++ return NULL;
++ struct atsc_rrt_dimension *dimension = (struct atsc_rrt_dimension *) (buf+pos);
++
++ pos += sizeof(struct atsc_rrt_dimension);
++ if (len < (pos + dimension->dimension_name_length))
++ return NULL;
++ if (atsc_text_validate(buf+pos, dimension->dimension_name_length))
++ return NULL;
++
++ pos += dimension->dimension_name_length;
++ if (len < (pos + sizeof(struct atsc_rrt_dimension_part2)))
++ return NULL;
++ struct atsc_rrt_dimension_part2 *dpart2 = (struct atsc_rrt_dimension_part2 *) (buf+pos);
++
++ pos += sizeof(struct atsc_rrt_dimension_part2);
++ for(vidx =0; vidx < dpart2->values_defined; vidx++) {
++ if (len < (pos + sizeof(struct atsc_rrt_dimension_value)))
++ return NULL;
++ struct atsc_rrt_dimension_value *value = (struct atsc_rrt_dimension_value *) (buf+pos);
++
++ pos += sizeof(struct atsc_rrt_dimension_value);
++ if (len < (pos + value->abbrev_rating_value_length))
++ return NULL;
++ if (atsc_text_validate(buf+pos, value->abbrev_rating_value_length))
++ return NULL;
++
++ pos += value->abbrev_rating_value_length;
++ if (len < (pos + sizeof(struct atsc_rrt_dimension_value_part2)))
++ return NULL;
++ struct atsc_rrt_dimension_value_part2 *vpart2 =
++ (struct atsc_rrt_dimension_value_part2 *) (buf+pos);
++
++ pos += sizeof(struct atsc_rrt_dimension_value_part2);
++ if (len < (pos + vpart2->rating_value_length))
++ return NULL;
++ if (atsc_text_validate(buf+pos, vpart2->rating_value_length))
++ return NULL;
++
++ pos+= vpart2->rating_value_length;
++ }
++ }
++
++ if (len < (pos + sizeof(struct atsc_rrt_section_part3)))
++ return NULL;
++ struct atsc_rrt_section_part3 *part3 = (struct atsc_rrt_section_part3 *) (buf+pos);
++
++ pos += sizeof(struct atsc_rrt_section_part3);
++ if (len < (pos + part3->descriptors_length))
++ return NULL;
++
++ if (verify_descriptors(buf + pos, part3->descriptors_length))
++ return NULL;
++
++ pos += part3->descriptors_length;
++ if (pos != len)
++ return NULL;
++
++ return (struct atsc_rrt_section *) psip;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rrt_section.h dvb-apps/lib/libucsi/atsc/rrt_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/rrt_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/rrt_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,379 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_RRT_SECTION_H
++#define _UCSI_ATSC_RRT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/atsc/section.h>
++#include <libucsi/atsc/types.h>
++
++/**
++ * atsc_rrt_section structure.
++ */
++struct atsc_rrt_section {
++ struct atsc_section_psip head;
++
++ uint8_t rating_region_name_length;
++ /* struct atsc_text rating_region_name_text */
++ /* struct atsc_rrt_section_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_rrt_section_part2 {
++ uint8_t dimensions_defined;
++ /* struct atsc_rrt_dimension dimensions[] */
++ /* struct atsc_rrt_section_part3 part3 */
++} __ucsi_packed;
++
++struct atsc_rrt_dimension {
++ uint8_t dimension_name_length;
++ /* struct atsc_text dimension_name_text */
++ /* struct atsc_rrt_dimension_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_rrt_dimension_part2 {
++ EBIT3(uint8_t reserved : 3; ,
++ uint8_t graduated_scale : 1; ,
++ uint8_t values_defined : 4; );
++ /* struct atsc_rrt_dimension_value values[] */
++} __ucsi_packed;
++
++struct atsc_rrt_dimension_value {
++ uint8_t abbrev_rating_value_length;
++ /* struct atsc_text abbrev_rating_value_text */
++ /* struct atsc_rrt_dimension_value_part2 */
++} __ucsi_packed;
++
++struct atsc_rrt_dimension_value_part2 {
++ uint8_t rating_value_length;
++ /* struct atsc_text rating_value_text */
++} __ucsi_packed;
++
++struct atsc_rrt_section_part3 {
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++
++static inline struct atsc_rrt_dimension *
++ atsc_rrt_section_dimensions_first(struct atsc_rrt_section_part2 *part2);
++static inline struct atsc_rrt_dimension *
++ atsc_rrt_section_dimensions_next(struct atsc_rrt_section_part2 *part2,
++ struct atsc_rrt_dimension *pos,
++ int idx);
++static inline struct atsc_rrt_dimension_value *
++ atsc_rrt_dimension_part2_values_first(struct atsc_rrt_dimension_part2 *part2);
++static inline struct atsc_rrt_dimension_value *
++ atsc_rrt_dimension_part2_values_next(struct atsc_rrt_dimension_part2 *part2,
++ struct atsc_rrt_dimension_value *pos,
++ int idx);
++
++/**
++ * Process a atsc_rrt_section.
++ *
++ * @param section Pointer to anj atsc_section_psip structure.
++ * @return atsc_rrt_section pointer, or NULL on error.
++ */
++struct atsc_rrt_section *atsc_rrt_section_codec(struct atsc_section_psip *section);
++
++/**
++ * Accessor for the rating_region field of an RRT.
++ *
++ * @param rrt RRT pointer.
++ * @return The transport_stream_id.
++ */
++static inline uint8_t atsc_rrt_section_rating_region(struct atsc_rrt_section *rrt)
++{
++ return rrt->head.ext_head.table_id_ext & 0xff;
++}
++
++/**
++ * Accessor for the rating_region_name_text field of an RRT.
++ *
++ * @param rrt RRT pointer.
++ * @return struct atsc_text pointer, or NULL.
++ */
++static inline struct atsc_text *atsc_rrt_section_rating_region_name_text(struct atsc_rrt_section *rrt)
++{
++ if (rrt->rating_region_name_length == 0)
++ return NULL;
++
++ return (struct atsc_text*)(((uint8_t*) rrt) + sizeof(struct atsc_rrt_section));
++}
++
++/**
++ * Accessor for the part2 field of an RRT.
++ *
++ * @param rrt RRT pointer.
++ * @return struct atsc_rrt_section_part2 pointer.
++ */
++static inline struct atsc_rrt_section_part2 *atsc_rrt_section_part2(struct atsc_rrt_section *rrt)
++{
++ return (struct atsc_rrt_section_part2 *)
++ (((uint8_t*) rrt) + sizeof(struct atsc_rrt_section) +
++ rrt->rating_region_name_length);
++}
++
++/**
++ * Iterator for the dimensions field in an atsc_rrt_section_part2.
++ *
++ * @param rrt atsc_rrt_section pointer.
++ * @param pos Variable containing a pointer to the current atsc_rrt_dimension.
++ * @param idx Integer used to count which dimension we are in.
++ */
++#define atsc_rrt_section_dimensions_for_each(rrt, pos, idx) \
++ for ((pos) = atsc_rrt_section_dimensions_first(rrt), idx=0; \
++ (pos); \
++ (pos) = atsc_rrt_section_dimensions_next(rrt, pos, ++idx))
++
++/**
++ * Accessor for the dimension_name_text field of an atsc_rrt_dimension.
++ *
++ * @param dimension atsc_rrt_dimension pointer.
++ * @return struct atsc_text pointer, or NULL on error.
++ */
++static inline struct atsc_text *atsc_rrt_dimension_name_text(struct atsc_rrt_dimension *dimension)
++{
++ if (dimension->dimension_name_length == 0)
++ return NULL;
++
++ return (struct atsc_text*)(((uint8_t*) dimension) + sizeof(struct atsc_rrt_dimension));
++}
++
++/**
++ * Accessor for the part2 field of an atsc_rrt_dimension.
++ *
++ * @param dimension atsc_rrt_dimension pointer.
++ * @return struct atsc_rrt_dimension_part2 pointer.
++ */
++static inline struct atsc_rrt_dimension_part2 *atsc_rrt_dimension_part2(struct atsc_rrt_dimension *dimension)
++{
++ return (struct atsc_rrt_dimension_part2 *)
++ (((uint8_t*) dimension) +
++ sizeof(struct atsc_rrt_dimension) +
++ dimension->dimension_name_length);
++}
++
++/**
++ * Iterator for the values field in a atsc_rrt_dimension_part2 structure.
++ *
++ * @param part2 atsc_rrt_dimension_part2 pointer.
++ * @param pos Variable containing a pointer to the current value.
++ * @param idx Integer used to count which value we are in
++ */
++#define atsc_rrt_dimension_part2_values_for_each(part2, pos, idx) \
++ for ((pos) = atsc_rrt_dimension_part2_values_first(part2), idx=0; \
++ (pos); \
++ (pos) = atsc_rrt_dimension_part2_values_next(part2, pos, ++idx))
++
++/**
++ * Accessor for the dimension_name_text field of an atsc_rrt_dimension.
++ *
++ * @param dimension atsc_rrt_dimension pointer.
++ * @return struct atsc_text pointer.
++ */
++static inline struct atsc_text *
++ atsc_rrt_dimension_value_abbrev_rating_value_text(struct atsc_rrt_dimension_value *value)
++{
++ if (value->abbrev_rating_value_length == 0)
++ return NULL;
++
++ return (struct atsc_text*)(((uint8_t*) value) + sizeof(struct atsc_rrt_dimension_value));
++}
++
++/**
++ * Accessor for the part2 field of an atsc_rrt_dimension_value.
++ *
++ * @param value atsc_rrt_dimension_value pointer.
++ * @return struct atsc_rrt_dimension_value_part2 pointer.
++ */
++static inline struct atsc_rrt_dimension_value_part2 *atsc_rrt_dimension_value_part2(struct atsc_rrt_dimension_value *value)
++{
++ return (struct atsc_rrt_dimension_value_part2 *)
++ (((uint8_t*) value) +
++ sizeof(struct atsc_rrt_dimension_value) +
++ value->abbrev_rating_value_length);
++}
++
++/**
++ * Accessor for the rating_value_text field of an atsc_rrt_dimension_value_part2.
++ *
++ * @param part2 atsc_rrt_dimension_value_part2 pointer.
++ * @return struct atsc_text pointer.
++ */
++static inline struct atsc_text *atsc_rrt_dimension_value_part2_rating_value_text(struct atsc_rrt_dimension_value_part2 *part2)
++{
++ if (part2->rating_value_length == 0)
++ return NULL;
++
++ return (struct atsc_text*)(((uint8_t*) part2) + sizeof(struct atsc_rrt_dimension_value_part2));
++}
++
++/**
++ * Accessor for the third part of an atsc_rrt_section.
++ *
++ * @param part2 atsc_rrt_section_part2 pointer.
++ * @return atsc_rrt_section_part3 pointer.
++ */
++static inline struct atsc_rrt_section_part3 *
++ atsc_rrt_section_part3(struct atsc_rrt_section_part2 *part2)
++{
++ int pos = sizeof(struct atsc_rrt_section_part2);
++
++ struct atsc_rrt_dimension *cur_dimension;
++ int idx;
++ atsc_rrt_section_dimensions_for_each(part2, cur_dimension, idx) {
++ pos += sizeof(struct atsc_rrt_dimension);
++ pos += cur_dimension->dimension_name_length;
++ pos += sizeof(struct atsc_rrt_dimension_part2);
++
++ // now we need to iterate over the values. yuck
++ struct atsc_rrt_dimension_part2 *dpart2 = atsc_rrt_dimension_part2(cur_dimension);
++ struct atsc_rrt_dimension_value *cur_value;
++ int vidx;
++ atsc_rrt_dimension_part2_values_for_each(dpart2, cur_value, vidx) {
++ pos += sizeof(struct atsc_rrt_dimension_value);
++ pos += cur_value->abbrev_rating_value_length;
++
++ struct atsc_rrt_dimension_value_part2 *vpart2 = atsc_rrt_dimension_value_part2(cur_value);
++ pos += sizeof(struct atsc_rrt_dimension_value_part2);
++ pos += vpart2->rating_value_length;
++ }
++ }
++
++ return (struct atsc_rrt_section_part3 *) (((uint8_t*) part2) + pos);
++}
++
++/**
++ * Iterator for the descriptors field in a atsc_rrt_section structure.
++ *
++ * @param part3 atsc_rrt_section_part3 pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_rrt_section_part3_descriptors_for_each(part3, pos) \
++ for ((pos) = atsc_rrt_section_part3_descriptors_first(part3); \
++ (pos); \
++ (pos) = atsc_rrt_section_part3_descriptors_next(part3, pos))
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_rrt_dimension *
++ atsc_rrt_section_dimensions_first(struct atsc_rrt_section_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_rrt_section_part2);
++
++ if (part2->dimensions_defined == 0)
++ return NULL;
++
++ return (struct atsc_rrt_dimension*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct atsc_rrt_dimension *
++ atsc_rrt_section_dimensions_next(struct atsc_rrt_section_part2 *part2,
++ struct atsc_rrt_dimension *pos,
++ int idx)
++{
++ if (idx >= part2->dimensions_defined)
++ return NULL;
++
++ struct atsc_rrt_dimension_part2 *dpart2 = atsc_rrt_dimension_part2(pos);
++ int len = sizeof(struct atsc_rrt_dimension_part2);
++
++ // now we need to iterate over the values. yuck
++ struct atsc_rrt_dimension_value *cur_value;
++ int vidx;
++ atsc_rrt_dimension_part2_values_for_each(dpart2, cur_value, vidx) {
++ len += sizeof(struct atsc_rrt_dimension_value);
++ len += cur_value->abbrev_rating_value_length;
++
++ struct atsc_rrt_dimension_value_part2 *vpart2 = atsc_rrt_dimension_value_part2(cur_value);
++ len += sizeof(struct atsc_rrt_dimension_value_part2);
++ len += vpart2->rating_value_length;
++ }
++
++ return (struct atsc_rrt_dimension *) (((uint8_t*) dpart2) + len);
++}
++
++static inline struct atsc_rrt_dimension_value *
++ atsc_rrt_dimension_part2_values_first(struct atsc_rrt_dimension_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_rrt_dimension_part2);
++
++ if (part2->values_defined == 0)
++ return NULL;
++
++ return (struct atsc_rrt_dimension_value*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct atsc_rrt_dimension_value *
++ atsc_rrt_dimension_part2_values_next(struct atsc_rrt_dimension_part2 *part2,
++ struct atsc_rrt_dimension_value *pos,
++ int idx)
++{
++ if (idx >= part2->values_defined)
++ return NULL;
++
++ struct atsc_rrt_dimension_value_part2 *vpart2 = atsc_rrt_dimension_value_part2(pos);
++ int len = sizeof(struct atsc_rrt_dimension_value_part2);
++ len += vpart2->rating_value_length;
++
++ return (struct atsc_rrt_dimension_value *) (((uint8_t*) vpart2) + len);
++}
++
++static inline struct descriptor *
++ atsc_rrt_section_part3_descriptors_first(struct atsc_rrt_section_part3 *part3)
++{
++ size_t pos = sizeof(struct atsc_rrt_section_part3);
++
++ if (part3->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) part3) + pos);
++}
++
++static inline struct descriptor *
++ atsc_rrt_section_part3_descriptors_next(struct atsc_rrt_section_part3 *part3,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) part3 + sizeof(struct atsc_rrt_section_part3),
++ part3->descriptors_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/section.h dvb-apps/lib/libucsi/atsc/section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,84 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/section.h>
++#include <libucsi/atsc/mgt_section.h>
++#include <libucsi/atsc/tvct_section.h>
++#include <libucsi/atsc/cvct_section.h>
++#include <libucsi/atsc/rrt_section.h>
++#include <libucsi/atsc/eit_section.h>
++#include <libucsi/atsc/ett_section.h>
++#include <libucsi/atsc/stt_section.h>
++#include <libucsi/atsc/dcct_section.h>
++#include <libucsi/atsc/dccsct_section.h>
++
++#ifndef _UCSI_ATSC_SECTION_H
++#define _UCSI_ATSC_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#define ATSC_BASE_PID 0x1ffb
++
++/**
++ * Enumeration of ATSC section tags.
++ */
++enum atsc_section_tag {
++ stag_atsc_master_guide = 0xc7,
++ stag_atsc_terrestrial_virtual_channel = 0xc8,
++ stag_atsc_cable_virtual_channel = 0xc9,
++ stag_atsc_rating_region = 0xca,
++ stag_atsc_event_information = 0xcb,
++ stag_atsc_extended_text = 0xcc,
++ stag_atsc_system_time = 0xcd,
++};
++
++/**
++ * ATSC specific PSIP section structure.
++ */
++struct atsc_section_psip {
++ struct section_ext ext_head;
++ uint8_t protocol_version;
++} __ucsi_packed;
++
++/**
++ * Decode a PSIP section structure.
++ *
++ * @param section_ext Pointer to the processed section_ext structure.
++ * @return Pointer to the parsed section_psip structure, or NULL if invalid.
++ */
++static inline struct atsc_section_psip *atsc_section_psip_decode(struct section_ext *section_ext)
++{
++ size_t len = section_ext_length(section_ext);
++ if (len < sizeof(struct atsc_section_psip)) {
++ return NULL;
++ }
++
++ return (struct atsc_section_psip *) section_ext;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/service_location_descriptor.h dvb-apps/lib/libucsi/atsc/service_location_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/service_location_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/service_location_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,141 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_SERVICE_LOCATION_DESCRIPTOR
++#define _UCSI_ATSC_SERVICE_LOCATION_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++enum atsc_stream_types {
++ ATSC_STREAM_TYPE_VIDEO = 0x02,
++ ATSC_STREAM_TYPE_AUDIO = 0x81,
++};
++
++/**
++ * atsc_service_location_descriptor structure.
++ */
++struct atsc_service_location_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint16_t reserved : 3; ,
++ uint16_t PCR_PID :13; );
++ uint8_t number_elements;
++ /* struct atsc_service_location_element elements[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the elements field of an atsc_service_location_descriptor.
++ */
++struct atsc_caption_service_location_element {
++ uint8_t stream_type;
++ EBIT2(uint16_t reserved : 3; ,
++ uint16_t elementary_PID :13; );
++ iso639lang_t language_code;
++} __ucsi_packed;
++
++/**
++ * Process an atsc_service_location_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_service_location_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_service_location_descriptor*
++ atsc_service_location_descriptor_codec(struct descriptor* d)
++{
++ struct atsc_service_location_descriptor *ret =
++ (struct atsc_service_location_descriptor *) d;
++ uint8_t *buf = (uint8_t*) d + 2;
++ int pos = 0;
++ int idx;
++
++ if (d->len < 3)
++ return NULL;
++ bswap16(buf + pos);
++ pos+=3;
++
++ for(idx = 0; idx < ret->number_elements; idx++) {
++ if (d->len < (pos + sizeof(struct atsc_caption_service_entry)))
++ return NULL;
++
++ bswap16(buf+pos+1);
++
++ pos += sizeof(struct atsc_caption_service_entry);
++ }
++
++ return (struct atsc_service_location_descriptor*) d;
++}
++
++/**
++ * Iterator for elements field of a atsc_service_location_descriptor.
++ *
++ * @param d atsc_service_location_descriptor pointer.
++ * @param pos Variable holding a pointer to the current atsc_service_location_element.
++ * @param idx Integer used to count which dimension we are in.
++ */
++#define atsc_service_location_descriptor_elements_for_each(d, pos, idx) \
++ for ((pos) = atsc_service_location_descriptor_elements_first(d), idx=0; \
++ (pos); \
++ (pos) = atsc_service_location_descriptor_elements_next(d, pos, ++idx))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_caption_service_location_element*
++ atsc_service_location_descriptor_elements_first(struct atsc_service_location_descriptor *d)
++{
++ if (d->number_elements == 0)
++ return NULL;
++
++ return (struct atsc_caption_service_location_element *)
++ ((uint8_t*) d + sizeof(struct atsc_service_location_descriptor));
++}
++
++static inline struct atsc_caption_service_location_element*
++ atsc_service_location_descriptor_elements_next(struct atsc_service_location_descriptor *d,
++ struct atsc_caption_service_location_element *pos,
++ int idx)
++{
++ uint8_t *next = (uint8_t *) pos + sizeof(struct atsc_caption_service_location_element);
++
++ if (idx >= d->number_elements)
++ return NULL;
++ return (struct atsc_caption_service_location_element *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stt_section.c dvb-apps/lib/libucsi/atsc/stt_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stt_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/stt_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,42 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/atsc/stt_section.h>
++
++struct atsc_stt_section *atsc_stt_section_codec(struct atsc_section_psip *psip)
++{
++ uint8_t *buf = (uint8_t *) psip;
++ size_t pos = sizeof(struct atsc_section_psip);
++ size_t len = section_ext_length(&(psip->ext_head));
++
++ if (len < sizeof(struct atsc_stt_section))
++ return NULL;
++
++ bswap32(buf + pos);
++ pos += 5;
++ bswap16(buf + pos);
++ pos += 2;
++
++ if (verify_descriptors(buf + pos, len - sizeof(struct atsc_stt_section)))
++ return NULL;
++
++ return (struct atsc_stt_section *) psip;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stt_section.h dvb-apps/lib/libucsi/atsc/stt_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stt_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/stt_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,105 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_STT_SECTION_H
++#define _UCSI_ATSC_STT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/atsc/section.h>
++#include <libucsi/atsc/types.h>
++
++/**
++ * atsc_stt_section structure.
++ */
++struct atsc_stt_section {
++ struct atsc_section_psip head;
++
++ atsctime_t system_time;
++ uint8_t gps_utc_offset;
++ EBIT4(uint16_t DS_status : 1; ,
++ uint16_t reserved : 2; ,
++ uint16_t DS_day_of_month : 5; ,
++ uint16_t DS_hour : 8; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process a atsc_stt_section.
++ *
++ * @param section Pointer to an atsc_section_psip structure.
++ * @return atsc_stt_section pointer, or NULL on error.
++ */
++struct atsc_stt_section *atsc_stt_section_codec(struct atsc_section_psip *section);
++
++/**
++ * Iterator for the services field in a atsc_stt_section.
++ *
++ * @param stt atsc_stt_section pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_stt_section_descriptors_for_each(stt, pos) \
++ for ((pos) = atsc_stt_section_descriptors_first(stt); \
++ (pos); \
++ (pos) = atsc_stt_section_descriptors_next(stt, pos))
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct descriptor *
++ atsc_stt_section_descriptors_first(struct atsc_stt_section *stt)
++{
++ size_t pos = sizeof(struct atsc_stt_section);
++
++ if (pos >= section_ext_length(&stt->head.ext_head))
++ return NULL;
++
++ return (struct descriptor*) ((uint8_t *) stt + pos);
++}
++
++static inline struct descriptor *
++ atsc_stt_section_descriptors_next(struct atsc_stt_section *stt,
++ struct descriptor *pos)
++{
++ int len = section_ext_length(&stt->head.ext_head);
++ len -= sizeof(struct atsc_stt_section);
++
++ return next_descriptor((uint8_t*) stt + sizeof(struct atsc_stt_section),
++ len,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stuffing_descriptor.h dvb-apps/lib/libucsi/atsc/stuffing_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/stuffing_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/stuffing_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,82 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_atsc@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_STUFFING_DESCRIPTOR
++#define _UCSI_ATSC_STUFFING_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * atsc_stuffing_descriptor.
++ */
++struct atsc_stuffing_descriptor {
++ struct descriptor d;
++
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Process a atsc_stuffing_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return atsc_stuffing_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_stuffing_descriptor*
++ atsc_stuffing_descriptor_codec(struct descriptor* d)
++{
++ return (struct atsc_stuffing_descriptor*) d;
++}
++
++/**
++ * Retrieve a pointer to the data field of a atsc_stuffing_descriptor.
++ *
++ * @param d atsc_stuffing_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ atsc_stuffing_descriptor_data(struct atsc_stuffing_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct atsc_stuffing_descriptor);
++}
++
++/**
++ * Calculate length of the data field of a atsc_stuffing_descriptor.
++ *
++ * @param d atsc_stuffing_descriptor pointer.
++ * @return The length in bytes.
++ */
++static inline int
++ atsc_stuffing_descriptor_data_length(struct atsc_stuffing_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/time_shifted_service_descriptor.h dvb-apps/lib/libucsi/atsc/time_shifted_service_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/time_shifted_service_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/time_shifted_service_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,136 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_TIME_SHIFTED_SERVICE_DESCRIPTOR
++#define _UCSI_ATSC_TIME_SHIFTED_SERVICE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * atsc_time_shifted_service_descriptor structure.
++ */
++struct atsc_time_shifted_service_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t reserved : 3; ,
++ uint8_t number_of_services : 5; );
++ /* struct atsc_time_shifted_service services[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the services field of an atsc_time_shifted_service_descriptor.
++ */
++struct atsc_time_shifted_service {
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t time_shift :10; );
++ EBIT3(uint32_t reserved2 : 4; ,
++ uint32_t major_channel_number :10; ,
++ uint32_t minor_channel_number :10; );
++} __ucsi_packed;
++
++/**
++ * Process an atsc_time_shifted_service_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return atsc_time_shifted_service_descriptor pointer, or NULL on error.
++ */
++static inline struct atsc_time_shifted_service_descriptor*
++ atsc_time_shifted_service_descriptor_codec(struct descriptor* d)
++{
++ struct atsc_time_shifted_service_descriptor *ret =
++ (struct atsc_time_shifted_service_descriptor *) d;
++ uint8_t *buf = (uint8_t*) d + 2;
++ int pos = 0;
++ int idx;
++
++ if (d->len < 1)
++ return NULL;
++ pos++;
++
++ for(idx = 0; idx < ret->number_of_services; idx++) {
++ if (d->len < (pos + sizeof(struct atsc_time_shifted_service)))
++ return NULL;
++
++ bswap16(buf+pos);
++ bswap24(buf+pos+2);
++
++ pos += sizeof(struct atsc_time_shifted_service);
++ }
++
++ return (struct atsc_time_shifted_service_descriptor*) d;
++}
++
++/**
++ * Iterator for services field of a atsc_time_shifted_service_descriptor.
++ *
++ * @param d atsc_time_shifted_service_descriptor pointer.
++ * @param pos Variable holding a pointer to the current atsc_service_location_element.
++ * @param idx Integer used to count which service we are in.
++ */
++#define atsc_time_shifted_service_descriptor_services_for_each(d, pos, idx) \
++ for ((pos) = atsc_time_shifted_service_descriptor_services_first(d), idx=0; \
++ (pos); \
++ (pos) = atsc_time_shifted_service_descriptor_services_next(d, pos, ++idx))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_time_shifted_service*
++ atsc_time_shifted_service_descriptor_services_first(struct atsc_time_shifted_service_descriptor *d)
++{
++ if (d->number_of_services == 0)
++ return NULL;
++
++ return (struct atsc_time_shifted_service *)
++ ((uint8_t*) d + sizeof(struct atsc_time_shifted_service_descriptor));
++}
++
++static inline struct atsc_time_shifted_service*
++ atsc_time_shifted_service_descriptor_services_next(struct atsc_time_shifted_service_descriptor *d,
++ struct atsc_time_shifted_service *pos,
++ int idx)
++{
++ uint8_t *next = (uint8_t *) pos + sizeof(struct atsc_time_shifted_service);
++
++ if (idx >= d->number_of_services)
++ return NULL;
++ return (struct atsc_time_shifted_service *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/tvct_section.c dvb-apps/lib/libucsi/atsc/tvct_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/tvct_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/tvct_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,81 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/atsc/tvct_section.h>
++
++struct atsc_tvct_section *atsc_tvct_section_codec(struct atsc_section_psip *psip)
++{
++ uint8_t * buf = (uint8_t *) psip;
++ size_t pos = sizeof(struct atsc_section_psip);
++ size_t len = section_ext_length(&(psip->ext_head));
++ int idx;
++ struct atsc_tvct_section *tvct = (struct atsc_tvct_section *) psip;
++
++ if (len < sizeof(struct atsc_tvct_section))
++ return NULL;
++
++ pos++;
++
++ for(idx =0; idx < tvct->num_channels_in_section; idx++) {
++
++ if ((pos + sizeof(struct atsc_tvct_channel)) > len)
++ return NULL;
++ struct atsc_tvct_channel *channel = (struct atsc_tvct_channel *) (buf+pos);
++
++ pos += 7*2;
++
++ bswap32(buf+pos);
++ bswap32(buf+pos+4);
++ bswap16(buf+pos+8);
++ bswap16(buf+pos+10);
++ bswap16(buf+pos+12);
++ bswap16(buf+pos+14);
++ bswap16(buf+pos+16);
++ pos+=18;
++
++ if ((pos + channel->descriptors_length) > len)
++ return NULL;
++ if (verify_descriptors(buf + pos, channel->descriptors_length))
++ return NULL;
++
++ pos += channel->descriptors_length;
++ }
++
++ if ((pos + sizeof(struct atsc_tvct_section_part2)) > len)
++ return NULL;
++ struct atsc_tvct_section_part2 *part2 = (struct atsc_tvct_section_part2 *) (buf+pos);
++
++ bswap16(buf+pos);
++ pos+=2;
++
++ if ((pos + part2->descriptors_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, part2->descriptors_length))
++ return NULL;
++
++ pos += part2->descriptors_length;
++
++ if (pos != len)
++ return NULL;
++
++ return (struct atsc_tvct_section *) psip;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/tvct_section.h dvb-apps/lib/libucsi/atsc/tvct_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/tvct_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/tvct_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,227 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_TVCT_SECTION_H
++#define _UCSI_ATSC_TVCT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/atsc/section.h>
++
++/**
++ * atsc_tvct_section structure.
++ */
++struct atsc_tvct_section {
++ struct atsc_section_psip head;
++
++ uint8_t num_channels_in_section;
++ /* struct atsc_tvct_channel channels[] */
++ /* struct atsc_tvct_channel_part2 part2 */
++} __ucsi_packed;
++
++struct atsc_tvct_channel {
++ uint16_t short_name[7]; // UTF-16 network ordered
++ EBIT4(uint32_t reserved : 4; ,
++ uint32_t major_channel_number :10; ,
++ uint32_t minor_channel_number :10; ,
++ uint32_t modulation_mode : 8; );
++ uint32_t carrier_frequency;
++ uint16_t channel_TSID;
++ uint16_t program_number;
++ EBIT7(uint16_t ETM_location : 2; ,
++ uint16_t access_controlled : 1; ,
++ uint16_t hidden : 1; ,
++ uint16_t reserved1 : 2; ,
++ uint16_t hide_guide : 1; ,
++ uint16_t reserved2 : 3; ,
++ uint16_t service_type : 6; );
++ uint16_t source_id;
++ EBIT2(uint16_t reserved3 : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++struct atsc_tvct_section_part2 {
++ EBIT2(uint16_t reserved : 6; ,
++ uint16_t descriptors_length :10; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++static inline struct atsc_tvct_channel *atsc_tvct_section_channels_first(struct atsc_tvct_section *tvct);
++static inline struct atsc_tvct_channel *
++ atsc_tvct_section_channels_next(struct atsc_tvct_section *tvct, struct atsc_tvct_channel *pos, int idx);
++
++/**
++ * Process a atsc_tvct_section.
++ *
++ * @param section Pointer to an atsc_section_psip structure.
++ * @return atsc_tvct_section pointer, or NULL on error.
++ */
++struct atsc_tvct_section *atsc_tvct_section_codec(struct atsc_section_psip *section);
++
++/**
++ * Accessor for the transport_stream_id field of a TVCT.
++ *
++ * @param tvct TVCT pointer.
++ * @return The transport_stream_id.
++ */
++static inline uint16_t atsc_tvct_section_transport_stream_id(struct atsc_tvct_section *tvct)
++{
++ return tvct->head.ext_head.table_id_ext;
++}
++
++/**
++ * Iterator for the channels field in an atsc_tvct_section.
++ *
++ * @param mgt atsc_tvct_section pointer.
++ * @param pos Variable containing a pointer to the current atsc_tvct_channel.
++ * @param idx Integer used to count which channel we in.
++ */
++#define atsc_tvct_section_channels_for_each(mgt, pos, idx) \
++ for ((pos) = atsc_tvct_section_channels_first(mgt), idx=0; \
++ (pos); \
++ (pos) = atsc_tvct_section_channels_next(mgt, pos, ++idx))
++
++/**
++ * Iterator for the descriptors field in a atsc_tvct_channel structure.
++ *
++ * @param channel atsc_tvct_channel pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_tvct_channel_descriptors_for_each(channel, pos) \
++ for ((pos) = atsc_tvct_channel_descriptors_first(channel); \
++ (pos); \
++ (pos) = atsc_tvct_channel_descriptors_next(channel, pos))
++
++/**
++ * Accessor for the second part of an atsc_tvct_section.
++ *
++ * @param mgt atsc_tvct_section pointer.
++ * @return atsc_tvct_section_part2 pointer.
++ */
++static inline struct atsc_tvct_section_part2 *
++ atsc_tvct_section_part2(struct atsc_tvct_section *mgt)
++{
++ int pos = sizeof(struct atsc_tvct_section);
++
++ struct atsc_tvct_channel *cur_channel;
++ int idx;
++ atsc_tvct_section_channels_for_each(mgt, cur_channel, idx) {
++ pos += sizeof(struct atsc_tvct_channel);
++ pos += cur_channel->descriptors_length;
++ }
++
++ return (struct atsc_tvct_section_part2 *) (((uint8_t*) mgt) + pos);
++}
++
++/**
++ * Iterator for the descriptors field in a atsc_tvct_section structure.
++ *
++ * @param part2 atsc_tvct_section_part2 pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define atsc_tvct_section_part2_descriptors_for_each(part2, pos) \
++ for ((pos) = atsc_tvct_section_part2_descriptors_first(part2); \
++ (pos); \
++ (pos) = atsc_tvct_section_part2_descriptors_next(part2, pos))
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_tvct_channel *
++ atsc_tvct_section_channels_first(struct atsc_tvct_section *tvct)
++{
++ size_t pos = sizeof(struct atsc_tvct_section);
++
++ if (tvct->num_channels_in_section == 0)
++ return NULL;
++
++ return (struct atsc_tvct_channel*) (((uint8_t *) tvct) + pos);
++}
++
++static inline struct atsc_tvct_channel *
++ atsc_tvct_section_channels_next(struct atsc_tvct_section *tvct,
++ struct atsc_tvct_channel *pos,
++ int idx)
++{
++ if (idx >= tvct->num_channels_in_section)
++ return NULL;
++
++ return (struct atsc_tvct_channel *)
++ (((uint8_t*) pos) + sizeof(struct atsc_tvct_channel) + pos->descriptors_length);
++}
++
++static inline struct descriptor *
++ atsc_tvct_channel_descriptors_first(struct atsc_tvct_channel *channel)
++{
++ size_t pos = sizeof(struct atsc_tvct_channel);
++
++ if (channel->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) channel) + pos);
++}
++
++static inline struct descriptor *
++ atsc_tvct_channel_descriptors_next(struct atsc_tvct_channel *channel,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) channel + sizeof(struct atsc_tvct_channel),
++ channel->descriptors_length,
++ pos);
++}
++
++static inline struct descriptor *
++ atsc_tvct_section_part2_descriptors_first(struct atsc_tvct_section_part2 *part2)
++{
++ size_t pos = sizeof(struct atsc_tvct_section_part2);
++
++ if (part2->descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor*) (((uint8_t *) part2) + pos);
++}
++
++static inline struct descriptor *
++ atsc_tvct_section_part2_descriptors_next(struct atsc_tvct_section_part2 *part2,
++ struct descriptor *pos)
++{
++ return next_descriptor((uint8_t*) part2 + sizeof(struct atsc_tvct_section_part2),
++ part2->descriptors_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/types.c dvb-apps/lib/libucsi/atsc/types.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/types.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/types.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,71 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <string.h>
++#include "libucsi/atsc/types.h"
++
++/* GPS epoch == unix time_t at 06/Jan/1980 */
++#define GPS_EPOCH 315964800
++
++
++int atsc_text_validate(uint8_t *buf, int len)
++{
++ int i;
++ int j;
++ int number_strings;
++ int number_segments;
++ int number_bytes;
++ int pos = 0;
++
++ if (len == 0)
++ return 0;
++ number_strings = buf[pos];
++ pos++;
++
++ for(i=0; i< number_strings; i++) {
++ if (len < (pos+4))
++ return -1;
++ number_segments = buf[pos+3];
++ pos+=4;
++
++ for(j=0; j < number_segments; j++) {
++ if (len < (pos+3))
++ return -1;
++ number_bytes = buf[pos+2];
++ pos+=3;
++
++ if (len < (pos + number_bytes))
++ return -1;
++ pos += number_bytes;
++ }
++ }
++
++ return 0;
++}
++
++time_t atsctime_to_unixtime(atsctime_t atsc)
++{
++ return atsc + GPS_EPOCH;
++}
++
++atsctime_t unixtime_to_atsctime(time_t t)
++{
++ return t - GPS_EPOCH;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/types.h dvb-apps/lib/libucsi/atsc/types.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/atsc/types.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/atsc/types.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,227 @@
++ /*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_ATSC_TYPES_H
++#define _UCSI_ATSC_TYPES_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++#include <time.h>
++#include <libucsi/types.h>
++
++enum atsc_vct_modulation {
++ ATSC_VCT_MODULATION_ANALOG = 0x01,
++ ATSC_VCT_MODULATION_SCTE_MODE1 = 0x02,
++ ATSC_VCT_MODULATION_SCTE_MODE2 = 0x03,
++ ATSC_VCT_MODULATION_8VSB = 0x04,
++ ATSC_VCT_MODULATION_16VSB = 0x05,
++};
++
++enum atsc_vct_service_type {
++ ATSC_VCT_SERVICE_TYPE_ANALOG = 0x01,
++ ATSC_VCT_SERVICE_TYPE_TV = 0x02,
++ ATSC_VCT_SERVICE_TYPE_AUDIO = 0x03,
++ ATSC_VCT_SERVICE_TYPE_DATA = 0x04,
++};
++
++enum atsc_etm_location {
++ ATSC_VCT_ETM_NONE = 0x00,
++ ATSC_VCT_ETM_IN_THIS_PTC = 0x01,
++ ATSC_VCT_ETM_IN_CHANNEL_TSID = 0x02,
++};
++
++enum atsc_text_compress_type {
++ ATSC_TEXT_COMPRESS_NONE = 0x00,
++ ATSC_TEXT_COMPRESS_PROGRAM_TITLE = 0x01,
++ ATSC_TEXT_COMPRESS_PROGRAM_DESCRIPTION = 0x02,
++};
++
++enum atsc_text_segment_mode {
++ ATSC_TEXT_SEGMENT_MODE_UNICODE_RANGE_MIN = 0x00,
++ ATSC_TEXT_SEGMENT_MODE_UNICODE_RANGE_MAX = 0x33,
++ ATSC_TEXT_SEGMENT_MODE_SCSU = 0x3e,
++ ATSC_TEXT_SEGMENT_MODE_UTF16 = 0x3f,
++ ATSC_TEXT_SEGMENT_MODE_TAIWAN_BITMAP = 0x40,
++ ATSC_TEXT_SEGMENT_MODE_TAIWAN_CODEWORD_BITMAP = 0x41,
++};
++
++typedef uint32_t atsctime_t;
++
++struct atsc_text {
++ uint8_t number_strings;
++ /* struct atsc_text_string strings[] */
++};
++
++struct atsc_text_string {
++ iso639lang_t language_code;
++ uint8_t number_segments;
++ /* struct atsc_text_string_segment segments[] */
++};
++
++struct atsc_text_string_segment {
++ uint8_t compression_type;
++ uint8_t mode;
++ uint8_t number_bytes;
++ /* uint8_t bytes[] */
++};
++
++/**
++ * Iterator for strings field of an atsc_text structure.
++ *
++ * @param txt atsc_text pointer.
++ * @param pos Variable holding a pointer to the current atsc_text_string.
++ * @param idx Iterator variable.
++ */
++#define atsc_text_strings_for_each(txt, pos, idx) \
++ for ((pos) = atsc_text_strings_first(txt), idx=0; \
++ (pos); \
++ (pos) = atsc_text_strings_next(txt, pos, ++idx))
++
++/**
++ * Iterator for segments field of an atsc_text_string structure.
++ *
++ * @param str atsc_text_string pointer.
++ * @param pos Variable holding a pointer to the current atsc_text_string_segment.
++ * @param idx Iterator variable.
++ */
++#define atsc_text_string_segments_for_each(str, pos, idx) \
++ for ((pos) = atsc_text_string_segments_first(str), idx=0; \
++ (pos); \
++ (pos) = atsc_text_string_segments_next(str, pos, ++idx))
++
++/**
++ * Accessor for the bytes field of an atsc_text_string_segment.
++ *
++ * @param seg atsc_text_string_segment pointer.
++ * @return Pointer to the bytes.
++ */
++static inline uint8_t*
++ atsc_text_string_segment_bytes(struct atsc_text_string_segment *d)
++{
++ return ((uint8_t*) d) + sizeof(struct atsc_text_string_segment);
++}
++
++/**
++ * Validate a buffer containing an atsc_text structure.
++ *
++ * @param buf Start of the atsc_text structure.
++ * @param len Length in bytes of the buffer.
++ * @return 0 if valid, nonzero if not.
++ */
++extern int atsc_text_validate(uint8_t *buf, int len);
++
++/**
++ * Decodes an atsc_text_segment with mode < 0x3e. Decompression of the ATSC text encoding IS
++ * supported. The output text will be in the UTF-8 encoding.
++ *
++ * @param segment Pointer to the segment to decode.
++ * @param destbuf Pointer to the malloc()ed buffer to append text to (pass NULL if none).
++ * @param destbufsize Size of destbuf in bytes.
++ * @param destbufpos Position within destbuf. This will be updated to point after the end of the
++ * string on exit.
++ * @return New value of destbufpos, or < 0 on error.
++ */
++extern int atsc_text_segment_decode(struct atsc_text_string_segment *segment,
++ uint8_t **destbuf, size_t *destbufsize, size_t *destbufpos);
++
++/**
++ * Convert from ATSC time to unix time_t.
++ *
++ * @param atsc ATSC time.
++ * @return The time value.
++ */
++extern time_t atsctime_to_unixtime(atsctime_t atsc);
++
++/**
++ * Convert from unix time_t to atsc time.
++ *
++ * @param t unix time_t.
++ * @return The atsc time value.
++ */
++extern atsctime_t unixtime_to_atsctime(time_t t);
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct atsc_text_string*
++ atsc_text_strings_first(struct atsc_text *txt)
++{
++ if (txt->number_strings == 0)
++ return NULL;
++
++ return (struct atsc_text_string *)
++ ((uint8_t*) txt + sizeof(struct atsc_text));
++}
++
++static inline struct atsc_text_string*
++ atsc_text_strings_next(struct atsc_text *txt, struct atsc_text_string *pos, int idx)
++{
++ int i;
++ uint8_t *buf;
++
++ if (idx >= txt->number_strings)
++ return NULL;
++
++ buf = ((uint8_t*) pos) + sizeof(struct atsc_text_string);
++ for(i=0; i < pos->number_segments; i++) {
++ struct atsc_text_string_segment *seg =
++ (struct atsc_text_string_segment *) buf;
++
++ buf += sizeof(struct atsc_text_string_segment);
++ buf += seg->number_bytes;
++ }
++
++ return (struct atsc_text_string *) buf;
++}
++
++static inline struct atsc_text_string_segment*
++ atsc_text_string_segments_first(struct atsc_text_string *str)
++{
++ if (str->number_segments == 0)
++ return NULL;
++
++ return (struct atsc_text_string_segment *)
++ ((uint8_t*) str + sizeof(struct atsc_text_string));
++}
++
++static inline struct atsc_text_string_segment*
++ atsc_text_string_segments_next(struct atsc_text_string *str,
++ struct atsc_text_string_segment *pos, int idx)
++{
++ if (idx >= str->number_segments)
++ return NULL;
++
++ return (struct atsc_text_string_segment *)
++ (((uint8_t*) pos) + sizeof(struct atsc_text_string_segment) + pos->number_bytes);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/crc32.c dvb-apps/lib/libucsi/crc32.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/crc32.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/crc32.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,89 @@
++/**
++ * crc32 calculation routines.
++ *
++ * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdint.h>
++
++uint32_t crc32tbl[] =
++{
++ 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
++ 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
++ 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
++ 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
++ 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
++ 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
++ 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
++ 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
++ 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
++ 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
++ 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
++ 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
++ 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
++ 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
++ 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
++ 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
++ 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
++ 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
++ 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
++ 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
++ 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
++ 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
++ 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
++ 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
++ 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
++ 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
++ 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
++ 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
++ 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
++ 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
++ 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
++ 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
++ 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
++ 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
++ 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
++ 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
++ 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
++ 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
++ 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
++ 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
++ 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
++ 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
++ 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
++ 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
++ 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
++ 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
++ 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
++ 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
++ 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
++ 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
++ 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
++ 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
++ 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
++ 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
++ 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
++ 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
++ 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
++ 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
++ 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
++ 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
++ 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
++ 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
++ 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
++ 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
++};
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/crc32.h dvb-apps/lib/libucsi/crc32.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/crc32.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/crc32.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,58 @@
++/**
++ * crc32 calculation routines.
++ *
++ * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_CRC32_H
++#define _UCSI_CRC32_H 1
++
++#include <stdint.h>
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#define CRC32_INIT (~0)
++
++extern uint32_t crc32tbl[];
++
++/**
++ * Calculate a CRC32 over a piece of data.
++ *
++ * @param crc Current CRC value (use CRC32_INIT for first call).
++ * @param buf Buffer to calculate over.
++ * @param len Number of bytes.
++ * @return Calculated CRC.
++ */
++static inline uint32_t crc32(uint32_t crc, uint8_t* buf, size_t len)
++{
++ size_t i;
++
++ for (i=0; i< len; i++) {
++ crc = (crc << 8) ^ crc32tbl[((crc >> 24) ^ buf[i]) & 0xff];
++ }
++
++ return crc;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/descriptor.h dvb-apps/lib/libucsi/descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,129 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DESCRIPTOR_H
++#define _UCSI_DESCRIPTOR_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/endianops.h>
++#include <stdint.h>
++#include <stdlib.h>
++
++/**
++ * Generic descriptor header.
++ */
++struct descriptor {
++ uint8_t tag;
++ uint8_t len;
++} __ucsi_packed;
++
++/**
++ * Retreive pointer to the next descriptor structure.
++ *
++ * @param buf The buffer of descriptors.
++ * @param len Size of the buffer.
++ * @param pos Current descriptor.
++ * @return Pointer to next descriptor, or NULL if there are none.
++ */
++static inline struct descriptor *
++ next_descriptor(uint8_t * buf, size_t len, struct descriptor * pos)
++{
++ uint8_t* next;
++
++ if (pos == NULL)
++ return NULL;
++
++ next = (uint8_t*) pos + 2 + pos->len;
++ if (next >= buf + len)
++ return NULL;
++
++ return (struct descriptor *) next;
++}
++
++
++/**
++ * The unknown descriptor.
++ */
++struct unknown_descriptor {
++ struct descriptor d;
++
++ /* uint8_t data [] */
++} __ucsi_packed;
++
++/**
++ * Retrieve pointer to the unknown descriptor's data field.
++ *
++ * @param d The descriptor.
++ * @return Pointer to the data field.
++ */
++static inline uint8_t *
++ unknown_descriptor_data(struct unknown_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct unknown_descriptor);
++}
++
++/**
++ * Retrieve size of unknown descriptor's data field.
++ *
++ * @param d The descriptor.
++ * @return Size of data field in bytes.
++ */
++static inline int
++ unknown_descriptor_data_size(struct unknown_descriptor *d)
++{
++ return d->d.len;
++}
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline int verify_descriptors(uint8_t * buf, size_t len)
++{
++ size_t pos = 0;
++
++ while (pos < len) {
++ if ((pos + 2) > len)
++ return -1;
++
++ pos += 2 + buf[pos+1];
++ }
++
++ if (pos != len)
++ return -1;
++
++ return 0;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ac3_descriptor.h dvb-apps/lib/libucsi/dvb/ac3_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ac3_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ac3_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,88 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_AC3_DESCRIPTOR
++#define _UCSI_DVB_AC3_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_ac3_descriptor structure.
++ */
++struct dvb_ac3_descriptor {
++ struct descriptor d;
++
++ EBIT5(uint8_t ac3_type_flag : 1; ,
++ uint8_t bsid_flag : 1; ,
++ uint8_t mainid_flag : 1; ,
++ uint8_t asvc_flag : 1; ,
++ uint8_t reserved : 4; );
++ /* uint8_t additional_info[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ac3_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_ac3_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ac3_descriptor*
++ dvb_ac3_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct dvb_ac3_descriptor) - 2))
++ return NULL;
++
++ return (struct dvb_ac3_descriptor*) d;
++}
++
++/**
++ * Retrieve pointer to additional_info field of a dvb_ac3_descriptor.
++ *
++ * @param d dvb_ac3_descriptor pointer.
++ * @return Pointer to additional_info field.
++ */
++static inline uint8_t *dvb_ac3_descriptor_additional_info(struct dvb_ac3_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_ac3_descriptor);
++}
++
++/**
++ * Determine length of additional_info field of a dvb_ac3_descriptor.
++ *
++ * @param d dvb_ac3_descriptor pointer.
++ * @return Length of field in bytes.
++ */
++static inline int dvb_ac3_descriptor_additional_info_length(struct dvb_ac3_descriptor *d)
++{
++ return d->d.len - 1;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/adaptation_field_data_descriptor.h dvb-apps/lib/libucsi/dvb/adaptation_field_data_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/adaptation_field_data_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/adaptation_field_data_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,62 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_ADAPTATION_FIELD_DATA_DESCRIPTOR
++#define _UCSI_DVB_ADAPTATION_FIELD_DATA_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_adaptation_field_data_descriptor structure.
++ */
++struct dvb_adaptation_field_data_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t reserved : 7; ,
++ uint8_t announcement_switching_data : 1; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_adaptation_field_data_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to dvb_adaptation_field_data_descriptor, or NULL on error.
++ */
++static inline struct dvb_adaptation_field_data_descriptor*
++ dvb_adaptation_field_data_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_adaptation_field_data_descriptor) - 2))
++ return NULL;
++
++ return (struct dvb_adaptation_field_data_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_descriptor.h dvb-apps/lib/libucsi/dvb/ait_application_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ait_application_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,204 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_AIT_APPLICATION_DESCRIPTOR
++#define _UCSI_DVB_AIT_APPLICATION_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Possible values for the visibility field.
++ */
++enum {
++ AVB_AIT_APPLICATION_VISIBILITY_HIDDEN = 0x00,
++ AVB_AIT_APPLICATION_VISIBILITY_APPSONLY = 0x01,
++ AVB_AIT_APPLICATION_VISIBILITY_VISIBLE = 0x03,
++};
++
++/**
++ * dvb_ait_application_descriptor structure.
++ */
++struct dvb_ait_application_descriptor {
++ struct descriptor d;
++
++ uint8_t application_profiles_length;
++ /* struct dvb_ait_application_profile profiles [] */
++ /* struct dvb_ait_application_descriptor_part2 part2 */
++} __ucsi_packed;
++
++/**
++ * An entry in the profiles field of a dvb_ait_application_descriptor.
++ */
++struct dvb_ait_application_profile {
++ uint16_t application_profile;
++ uint8_t version_major;
++ uint8_t version_minor;
++ uint8_t version_micro;
++} __ucsi_packed;
++
++/**
++ * Second part of a dvb_ait_application_descriptor structure.
++ */
++struct dvb_ait_application_descriptor_part2 {
++ EBIT3(uint8_t service_bound_flag : 1; ,
++ uint8_t visibility : 2; ,
++ uint8_t reserved : 5; );
++ uint8_t application_priority;
++ /* uint8_t transport_protocol_label[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ait_application_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_ait_application_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ait_application_descriptor*
++ dvb_ait_application_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint32_t pos2 = 0;
++ uint32_t len = d->len + 2;
++ uint8_t* buf = (uint8_t*) d;
++ struct dvb_ait_application_descriptor *ret =
++ (struct dvb_ait_application_descriptor*) d;
++
++ if (len < sizeof(struct dvb_ait_application_descriptor))
++ return NULL;
++
++ if (len < (sizeof(struct dvb_ait_application_descriptor) + ret->application_profiles_length))
++ return NULL;
++
++ if (ret->application_profiles_length % sizeof(struct dvb_ait_application_profile))
++ return NULL;
++
++ pos += sizeof(struct dvb_ait_application_descriptor);
++ pos2 = 0;
++ while(pos2 < ret->application_profiles_length) {
++ bswap16(buf + pos + pos2);
++ pos2 += sizeof(struct dvb_ait_application_descriptor);
++ }
++ pos += pos2;
++
++ if (len < (pos + sizeof(struct dvb_ait_application_descriptor_part2)))
++ return NULL;
++
++ return ret;
++}
++
++/**
++ * Iterator for the profiles field of a dvb_ait_application_descriptor.
++ *
++ * @param d dvb_ait_application_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_ait_application_profile.
++ */
++#define dvb_ait_application_descriptor_profiles_for_each(d, pos) \
++ for ((pos) = dvb_ait_application_descriptor_profiles_first(d); \
++ (pos); \
++ (pos) = dvb_ait_application_descriptor_profiles_next(d, pos))
++
++/**
++ * Accessor for the part2 field of a dvb_ait_application_descriptor.
++ *
++ * @param d dvb_ait_application_descriptor pointer.
++ * @return dvb_ait_application_descriptor_part2 pointer.
++ */
++static inline struct dvb_ait_application_descriptor_part2*
++ dvb_ait_application_descriptor_part2(struct dvb_ait_application_descriptor* d)
++{
++ return (struct dvb_ait_application_descriptor_part2*)
++ ((uint8_t*) d +
++ sizeof(struct dvb_ait_application_descriptor) +
++ d->application_profiles_length);
++}
++
++/**
++ * Accessor for the transport_protocol_label field of a dvb_ait_application_descriptor_part2.
++ *
++ * @param d dvb_ait_application_descriptor_part2 pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ dvb_ait_application_descriptor_part2_transport_protocol_label(struct dvb_ait_application_descriptor_part2* d)
++{
++ return (uint8_t*) d +
++ sizeof(struct dvb_ait_application_descriptor_part2);
++}
++
++/**
++ * Calculate the number of bytes in the transport_protocol_label field of a dvb_ait_application_descriptor_part2.
++ *
++ * @param d dvb_ait_application_descriptor pointer.
++ * @param part2 dvb_ait_application_descriptor_part2 pointer.
++ * @return Number of bytes.
++ */
++static inline int
++ dvb_ait_application_descriptor_part2_transport_protocol_label_length(struct dvb_ait_application_descriptor *d,
++ struct dvb_ait_application_descriptor_part2* part2)
++{
++ uint8_t *ptr = (uint8_t*) part2 + sizeof(struct dvb_ait_application_descriptor_part2);
++ uint8_t *end = (uint8_t*) d + d->d.len + 2;
++
++ return (int) (end - ptr);
++}
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ait_application_profile*
++ dvb_ait_application_descriptor_profiles_first(struct dvb_ait_application_descriptor *d)
++{
++ if (d->application_profiles_length == 0)
++ return NULL;
++
++ return (struct dvb_ait_application_profile *)
++ ((uint8_t*) d + sizeof(struct dvb_ait_application_descriptor));
++}
++
++static inline struct dvb_ait_application_profile*
++ dvb_ait_application_descriptor_profiles_next(struct dvb_ait_application_descriptor *d,
++ struct dvb_ait_application_profile *pos)
++{
++ uint8_t *end = (uint8_t*) d +
++ sizeof(struct dvb_ait_application_descriptor) +
++ d->application_profiles_length;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ait_application_profile);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_ait_application_profile *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_icons_descriptor.h dvb-apps/lib/libucsi/dvb/ait_application_icons_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_icons_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ait_application_icons_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,157 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_AIT_APPLICATION_ICONS_DESCRIPTOR
++#define _UCSI_DVB_AIT_APPLICATION_ICONS_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * Possible values for the icon_flags field.
++ */
++enum {
++ AIT_APPLICATION_ICON_FLAG_32_32 = 0x001,
++ AIT_APPLICATION_ICON_FLAG_32_32_43 = 0x002,
++ AIT_APPLICATION_ICON_FLAG_24_32_169 = 0x004,
++
++ AIT_APPLICATION_ICON_FLAG_64_64 = 0x008,
++ AIT_APPLICATION_ICON_FLAG_64_64_43 = 0x010,
++ AIT_APPLICATION_ICON_FLAG_48_64_169 = 0x020,
++
++ AIT_APPLICATION_ICON_FLAG_128_128 = 0x040,
++ AIT_APPLICATION_ICON_FLAG_128_128_43 = 0x080,
++ AIT_APPLICATION_ICON_FLAG_96_128_169 = 0x100,
++};
++
++/**
++ * dvb_ait_application_icons_descriptor structure.
++ */
++struct dvb_ait_application_icons_descriptor {
++ struct descriptor d;
++
++ uint8_t icon_locator_length;
++ /* uint8_t icon_locator[] */
++ /* struct dvb_ait_application_icons_descriptor_part2 */
++} __ucsi_packed;
++
++/**
++ * Second part of a dvb_ait_application_icons_descriptor.
++ */
++struct dvb_ait_application_icons_descriptor_part2 {
++ uint16_t icon_flags;
++ /* uint8_t reserved[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ait_application_icons_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_ait_application_icons_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ait_application_icons_descriptor*
++ dvb_ait_application_icons_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d;
++ uint32_t pos = 0;
++ uint32_t len = d->len + 2;
++ struct dvb_ait_application_icons_descriptor *ret =
++ (struct dvb_ait_application_icons_descriptor *) d;
++
++ if (len < sizeof(struct dvb_ait_application_icons_descriptor))
++ return NULL;
++ if (len < (sizeof(struct dvb_ait_application_icons_descriptor) + ret->icon_locator_length))
++ return NULL;
++
++ pos += sizeof(struct dvb_ait_application_icons_descriptor) + ret->icon_locator_length;
++
++ if ((len - pos) < sizeof(struct dvb_ait_application_icons_descriptor_part2))
++ return NULL;
++ bswap16(buf + pos);
++
++ return ret;
++}
++/**
++ * Accessor for the icon_locator field of a dvb_ait_application_icons_descriptor.
++ *
++ * @param e dvb_ait_application_icons_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_ait_application_icons_descriptor_icon_locator(struct dvb_ait_application_icons_descriptor *e)
++{
++ return (uint8_t *) e + sizeof(struct dvb_ait_application_icons_descriptor);
++}
++
++/**
++ * Accessor for the part2 field of a dvb_ait_application_icons_descriptor.
++ *
++ * @param e dvb_ait_application_icons_descriptor Pointer.
++ * @return dvb_ait_application_icons_descriptor_part2 pointer.
++ */
++static inline struct dvb_ait_application_icons_descriptor_part2 *
++ dvb_ait_application_icons_descriptor_part2(struct dvb_ait_application_icons_descriptor *e)
++{
++ return (struct dvb_ait_application_icons_descriptor_part2 *)
++ ((uint8_t *) e + sizeof(struct dvb_ait_application_icons_descriptor) +
++ e->icon_locator_length);
++}
++
++/**
++ * Accessor for the reserved field of a dvb_ait_application_icons_descriptor_part2.
++ *
++ * @param e dvb_ait_application_icons_part2 pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_ait_application_icons_descriptor_part2_reserved(struct dvb_ait_application_icons_descriptor_part2 *e)
++{
++ return (uint8_t *) e + sizeof(struct dvb_ait_application_icons_descriptor_part2);
++}
++
++/**
++ * Calculate the number of bytes in the reserved field of a dvb_ait_application_icons_descriptor_part2.
++ *
++ * @param d dvb_ait_application_icons_descriptorpointer.
++ * @param part2 dvb_ait_application_icons_descriptor_part2 pointer.
++ * @return Number of bytes.
++ */
++static inline int
++ dvb_ait_application_icons_descriptor_part2_reserved_length(struct dvb_ait_application_icons_descriptor *d,
++ struct dvb_ait_application_icons_descriptor_part2* part2)
++{
++ uint8_t *ptr = (uint8_t*) part2 + sizeof(struct dvb_ait_application_icons_descriptor_part2);
++ uint8_t *end = (uint8_t*) d + d->d.len + 2;
++
++ return (int) (end - ptr);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_name_descriptor.h dvb-apps/lib/libucsi/dvb/ait_application_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_application_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ait_application_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,145 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_AIT_APPLICATION_NAME_DESCRIPTOR
++#define _UCSI_DVB_AIT_APPLICATION_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_ait_application_name_descriptor structure.
++ */
++struct dvb_ait_application_name_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_ait_application_name names[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the names field of a dvb_ait_application_name_descriptor.
++ */
++struct dvb_ait_application_name {
++ iso639lang_t language_code;
++ uint8_t application_name_length;
++ /* uint8_t name[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ait_application_name_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_ait_application_name_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ait_application_name_descriptor*
++ dvb_ait_application_name_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++
++ while(pos < len) {
++ struct dvb_ait_application_name *e =
++ (struct dvb_ait_application_name*) (buf + pos);
++
++ pos += sizeof(struct dvb_ait_application_name);
++
++ if (pos > len)
++ return NULL;
++
++ pos += e->application_name_length;
++
++ if (pos > len)
++ return NULL;
++ }
++
++ return (struct dvb_ait_application_name_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the names field of a dvb_ait_application_name_descriptor.
++ *
++ * @param d dvb_ait_application_name_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_ait_application_name.
++ */
++#define dvb_ait_application_name_descriptor_names_for_each(d, pos) \
++ for ((pos) = dvb_ait_application_name_descriptor_names_first(d); \
++ (pos); \
++ (pos) = dvb_ait_application_name_descriptor_names_next(d, pos))
++
++/**
++ * Accessor for the name field of a dvb_ait_application_name.
++ *
++ * @param e dvb_ait_application_name pointer.
++ * @return Pointer to the name field.
++ */
++static inline uint8_t *
++ dvb_ait_application_name_name(struct dvb_ait_application_name *e)
++{
++ return (uint8_t *) e + sizeof(struct dvb_ait_application_name);
++}
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ait_application_name*
++ dvb_ait_application_name_descriptor_names_first(struct dvb_ait_application_name_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_ait_application_name *)
++ ((uint8_t*) d + sizeof(struct dvb_ait_application_name_descriptor));
++}
++
++static inline struct dvb_ait_application_name*
++ dvb_ait_application_name_descriptor_names_next(struct dvb_ait_application_name_descriptor *d,
++ struct dvb_ait_application_name *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_ait_application_name) +
++ pos->application_name_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_ait_application_name *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h dvb-apps/lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ait_external_application_authorisation_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,125 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_AIT_EXTERNAL_APPLICATION_AUTHORISATION_DESCRIPTOR
++#define _UCSI_DVB_AIT_EXTERNAL_APPLICATION_AUTHORISATION_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_ait_external_application_authorisation_descriptor structure.
++ */
++struct dvb_ait_external_application_authorisation_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_ait_external_application_authorisation auths[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the auths field of a dvb_ait_external_application_authorisation_descriptor.
++ */
++struct dvb_ait_external_application_authorisation {
++ uint32_t organization_id;
++ uint16_t application_id;
++ uint8_t application_priority;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ait_external_application_authorisation_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_ait_external_application_authorisation_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ait_external_application_authorisation_descriptor*
++ dvb_ait_external_application_authorisation_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++
++ if (len % sizeof(struct dvb_ait_external_application_authorisation))
++ return NULL;
++
++ while(pos < len) {
++ bswap32(buf + pos);
++ bswap32(buf + pos + 4);
++ pos += sizeof(struct dvb_ait_external_application_authorisation);
++ }
++
++ return (struct dvb_ait_external_application_authorisation_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the auths field of a dvb_ait_external_application_authorisation_descriptor.
++ *
++ * @param d dvb_ait_external_application_authorisation_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_ait_external_application_authorisation.
++ */
++#define dvb_ait_external_application_authorisation_descriptor_auths_for_each(d, pos) \
++ for ((pos) = dvb_ait_external_application_authorisation_descriptor_auths_first(d); \
++ (pos); \
++ (pos) = dvb_ait_external_application_authorisation_descriptor_auths_next(d, pos))
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ait_external_application_authorisation*
++ dvb_ait_external_application_authorisation_descriptor_auths_first(struct dvb_ait_external_application_authorisation_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_ait_external_application_authorisation *)
++ ((uint8_t*) d + sizeof(struct dvb_ait_external_application_authorisation_descriptor));
++}
++
++static inline struct dvb_ait_external_application_authorisation*
++ dvb_ait_external_application_authorisation_descriptor_auths_next(struct dvb_ait_external_application_authorisation_descriptor *d,
++ struct dvb_ait_external_application_authorisation *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_ait_external_application_authorisation);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_ait_external_application_authorisation *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ancillary_data_descriptor.h dvb-apps/lib/libucsi/dvb/ancillary_data_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ancillary_data_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ancillary_data_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,67 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_ANCILLARY_DATA_DESCRIPTOR
++#define _UCSI_DVB_ANCILLARY_DATA_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_ancillary_data_descriptor structure.
++ */
++struct dvb_ancillary_data_descriptor {
++ struct descriptor d;
++ EBIT8(uint8_t reserved : 1; ,
++ uint8_t rds_via_udcp : 1; ,
++ uint8_t mpeg4_ancillary_data : 1; ,
++ uint8_t scale_factor_error_check : 1; ,
++ uint8_t dab_ancillary_data : 1; ,
++ uint8_t announcement_switching_data : 1; ,
++ uint8_t extended_ancillary_data : 1; ,
++ uint8_t dvd_video_ancillary_data : 1; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ancillary_data_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_ancillary_data_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ancillary_data_descriptor*
++ dvb_ancillary_data_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_ancillary_data_descriptor) - 2))
++ return NULL;
++
++ return (struct dvb_ancillary_data_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/announcement_support_descriptor.h dvb-apps/lib/libucsi/dvb/announcement_support_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/announcement_support_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/announcement_support_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,219 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_ANNOUNCEMENT_SUPPORT_DESCRIPTOR
++#define _UCSI_DVB_ANNOUNCEMENT_SUPPORT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Possible values for announcement_support_indicator.
++ */
++enum {
++ DVB_ANNOUNCEMENT_SUPPORT_EMERGENCY = 0x01,
++ DVB_ANNOUNCEMENT_SUPPORT_ROAD_TRAFFIC_FLASH = 0x02,
++ DVB_ANNOUNCEMENT_SUPPORT_PUBLIC_TRANSPORT_FLASH = 0x04,
++ DVB_ANNOUNCEMENT_SUPPORT_WARNING_MESSAGE = 0x08,
++ DVB_ANNOUNCEMENT_SUPPORT_NEWS_FLASH = 0x10,
++ DVB_ANNOUNCEMENT_SUPPORT_WEATHER_FLASH = 0x20,
++ DVB_ANNOUNCEMENT_SUPPORT_EVENT_ANNOUNCEMENT = 0x40,
++ DVB_ANNOUNCEMENT_SUPPORT_PERSONAL_CALL = 0x80,
++};
++
++/**
++ * Possible values for announcement_type.
++ */
++enum {
++ DVB_ANNOUNCEMENT_TYPE_EMERGENCY = 0x00,
++ DVB_ANNOUNCEMENT_TYPE_ROAD_TRAFFIC_FLASH = 0x01,
++ DVB_ANNOUNCEMENT_TYPE_PUBLIC_TRANSPORT_FLASH = 0x02,
++ DVB_ANNOUNCEMENT_TYPE_WARNING_MESSAGE = 0x03,
++ DVB_ANNOUNCEMENT_TYPE_NEWS_FLASH = 0x04,
++ DVB_ANNOUNCEMENT_TYPE_WEATHER_FLASH = 0x05,
++ DVB_ANNOUNCEMENT_TYPE_EVENT_ANNOUNCEMENT = 0x06,
++ DVB_ANNOUNCEMENT_TYPE_PERSONAL_CALL = 0x07,
++};
++
++/**
++ * Possible values for reference_type.
++ */
++enum {
++ DVB_REFERENCE_TYPE_AUDIO = 0x00,
++ DVB_REFERENCE_TYPE_OTHER_AUDIO = 0x01,
++ DVB_REFERENCE_TYPE_OTHER_SERVICE = 0x02,
++ DVB_REFERENCE_TYPE_OTHER_TS = 0x03,
++};
++
++/**
++ * dvb_announcement_support_descriptor structure.
++ */
++struct dvb_announcement_support_descriptor {
++ struct descriptor d;
++ uint16_t announcement_support_indicator;
++ /* struct dvb_announcement_support_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the entries field of a dvb_announcement_support_descriptor.
++ */
++struct dvb_announcement_support_entry {
++ EBIT3(uint8_t announcement_type : 4; ,
++ uint8_t reserved : 1; ,
++ uint8_t reference_type : 3; );
++ /* Only if reference_type == 1, 2 or 3:
++ * struct dvb_announcement_support_reference reference */
++} __ucsi_packed;
++
++/**
++ * The optional reference field only present in a dvb_announcement_support_descriptor if
++ * its reference_type field is 1,2 or 3.
++ */
++struct dvb_announcement_support_reference {
++ uint16_t original_network_id;
++ uint16_t transport_stream_id;
++ uint16_t service_id;
++ uint8_t component_tag;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_announcement_support_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_announcement_support_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_announcement_support_descriptor*
++ dvb_announcement_support_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t len = d->len;
++
++ if (len < (sizeof(struct dvb_announcement_support_descriptor) - 2))
++ return NULL;
++
++ bswap16(buf+pos);
++
++ pos += 2;
++
++ while(pos < len) {
++ struct dvb_announcement_support_entry *e =
++ (struct dvb_announcement_support_entry*) (buf+pos);
++
++ pos += sizeof(struct dvb_announcement_support_entry);
++
++ if (pos > len)
++ return NULL;
++
++ if ((e->reference_type == 1) ||
++ (e->reference_type == 2) ||
++ (e->reference_type == 3)) {
++ if ((pos + sizeof(struct dvb_announcement_support_reference)) > len)
++ return NULL;
++
++ bswap16(buf+pos);
++ bswap16(buf+pos+2);
++ bswap16(buf+pos+4);
++
++ pos += sizeof(struct dvb_announcement_support_reference);
++ }
++ }
++
++ return (struct dvb_announcement_support_descriptor*) d;
++}
++
++/**
++ * Iterator for the entries field of a dvb_announcement_support_descriptor.
++ *
++ * @param d dvb_announcement_support_descriptor pointer.
++ * @param pod Variable holding a pointer to the current dvb_announcement_support_entry.
++ */
++#define dvb_announcement_support_descriptor_entries_for_each(d, pos) \
++ for ((pos) = dvb_announcement_support_descriptor_entries_first(d); \
++ (pos); \
++ (pos) = dvb_announcement_support_descriptor_entries_next(d, pos))
++
++/**
++ * Accessor for the reference field of a dvb_announcement_support_entry if present.
++ *
++ * @param entry dvb_announcement_support_entry pointer.
++ * @return dvb_announcement_support_reference pointer, or NULL on error.
++ */
++static inline struct dvb_announcement_support_reference*
++ dvb_announcement_support_entry_reference(struct dvb_announcement_support_entry* entry)
++{
++ if ((entry->reference_type != 0x01) &&
++ (entry->reference_type != 0x02) &&
++ (entry->reference_type != 0x03))
++ return NULL;
++
++ return (struct dvb_announcement_support_reference*)
++ ((uint8_t*) entry + sizeof(struct dvb_announcement_support_entry));
++}
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_announcement_support_entry*
++ dvb_announcement_support_descriptor_entries_first(struct dvb_announcement_support_descriptor *d)
++{
++ if (d->d.len == 2)
++ return NULL;
++
++ return (struct dvb_announcement_support_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_announcement_support_descriptor));
++}
++
++static inline struct dvb_announcement_support_entry*
++ dvb_announcement_support_descriptor_entries_next(struct dvb_announcement_support_descriptor *d,
++ struct dvb_announcement_support_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t* next = (uint8_t*) pos + sizeof(struct dvb_announcement_support_entry);
++ struct dvb_announcement_support_reference* reference =
++ dvb_announcement_support_entry_reference(pos);
++
++ if (reference)
++ next += sizeof(struct dvb_announcement_support_reference);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_announcement_support_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/application_signalling_descriptor.h dvb-apps/lib/libucsi/dvb/application_signalling_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/application_signalling_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/application_signalling_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,124 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_APPLICATION_SIGNALLING_DESCRIPTOR
++#define _UCSI_DVB_APPLICATION_SIGNALLING_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_application_signalling_descriptor structure.
++ */
++struct dvb_application_signalling_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_application_signalling_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the entries field of a dvb_application_signalling_descriptor.
++ */
++struct dvb_application_signalling_entry {
++ uint16_t application_type;
++ EBIT2(uint8_t reserved : 3; ,
++ uint8_t AIT_version_number : 5; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_application_signalling_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_application_signalling_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_application_signalling_descriptor*
++ dvb_application_signalling_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++ uint8_t* buf = (uint8_t*) d + 2;
++
++ pos += sizeof(struct dvb_application_signalling_descriptor) - 2;
++ if (len % sizeof(struct dvb_application_signalling_entry))
++ return NULL;
++
++ while(pos < len) {
++ bswap16(buf+pos);
++ pos+=3;
++ }
++
++ return (struct dvb_application_signalling_descriptor*) d;
++}
++
++/**
++ * Iterator for the entries field of a dvb_application_signalling_descriptor.
++ *
++ * @param d dvb_application_signalling_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_application_signalling_entry.
++ */
++#define dvb_application_signalling_descriptor_entries_for_each(d, pos) \
++ for ((pos) = dvb_application_signalling_descriptor_entries_first(d); \
++ (pos); \
++ (pos) = dvb_application_signalling_descriptor_entries_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_application_signalling_entry*
++ dvb_application_signalling_descriptor_entries_first(struct dvb_application_signalling_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_application_signalling_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_application_signalling_descriptor));
++}
++
++static inline struct dvb_application_signalling_entry*
++ dvb_application_signalling_descriptor_entries_next(struct dvb_application_signalling_descriptor *d,
++ struct dvb_application_signalling_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_application_signalling_entry);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_application_signalling_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bat_section.c dvb-apps/lib/libucsi/dvb/bat_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bat_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/bat_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,77 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/bat_section.h>
++
++struct dvb_bat_section * dvb_bat_section_codec(struct section_ext * ext)
++{
++ uint8_t * buf = (uint8_t *) ext;
++ size_t pos = sizeof(struct section_ext);
++ size_t len = section_ext_length(ext);
++ struct dvb_bat_section * ret = (struct dvb_bat_section *) ext;
++
++ if (len < sizeof(struct dvb_bat_section))
++ return NULL;
++
++ bswap16(buf + pos);
++ pos += 2;
++
++ if ((pos + ret->bouquet_descriptors_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, ret->bouquet_descriptors_length))
++ return NULL;
++ pos += ret->bouquet_descriptors_length;
++
++ if ((pos + sizeof(struct dvb_bat_section_part2)) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++ pos += sizeof(struct dvb_bat_section_part2);
++
++ while (pos < len) {
++ struct dvb_bat_transport * transport =
++ (struct dvb_bat_transport *) (buf + pos);
++
++ if ((pos + sizeof(struct dvb_bat_transport)) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++ bswap16(buf + pos + 2);
++ bswap16(buf + pos + 4);
++
++ pos += sizeof(struct dvb_bat_transport);
++
++ if ((pos + transport->transport_descriptors_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos,
++ transport->transport_descriptors_length))
++ return NULL;
++
++ pos += transport->transport_descriptors_length;
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return ret;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bat_section.h dvb-apps/lib/libucsi/dvb/bat_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bat_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/bat_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,211 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_BAT_SECTION_H
++#define _UCSI_DVB_BAT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * dvb_bat_section structure.
++ */
++struct dvb_bat_section {
++ struct section_ext head;
++
++ EBIT2(uint16_t reserved_1 : 4; ,
++ uint16_t bouquet_descriptors_length :12; );
++ /* struct descriptor descriptors[] */
++ /* struct dvb_bat_section_part2 part2 */
++};
++
++/**
++ * Second part of a dvb_bat_section, following the variable length descriptors field.
++ */
++struct dvb_bat_section_part2 {
++ EBIT2(uint16_t reserved_2 : 4; ,
++ uint16_t transport_stream_loop_length :12; );
++ /* struct dvb_bat_transport transports[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the transports field of a dvb_bat_section_part2.
++ */
++struct dvb_bat_transport {
++ uint16_t transport_stream_id;
++ uint16_t original_network_id;
++ EBIT2(uint16_t reserved : 4; ,
++ uint16_t transport_descriptors_length :12; );
++ /* struct descriptor descriptors[] */
++};
++
++/**
++ * Process a dvb_bat_section.
++ *
++ * @param section Generic section pointer.
++ * @return dvb_bat_section pointer, or NULL on error.
++ */
++struct dvb_bat_section *dvb_bat_section_codec(struct section_ext *section);
++
++/**
++ * Accessor for the bouquet_id field of a BAT.
++ *
++ * @param bat BAT pointer.
++ * @return The bouquet_id.
++ */
++static inline uint16_t dvb_bat_section_bouquet_id(struct dvb_bat_section *bat)
++{
++ return bat->head.table_id_ext;
++}
++
++/**
++ * Iterator for the descriptors field in a dvb_bat_section.
++ *
++ * @param bat dvb_bat_section pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define dvb_bat_section_descriptors_for_each(bat, pos) \
++ for ((pos) = dvb_bat_section_descriptors_first(bat); \
++ (pos); \
++ (pos) = dvb_bat_section_descriptors_next(bat, pos))
++
++/**
++ * Accessor for the second part of a dvb_bat_section.
++ *
++ * @param bat dvb_bat_section pointer.
++ * @return dvb_bat_section_part2 pointer.
++ */
++static inline struct dvb_bat_section_part2 *
++ dvb_bat_section_part2(struct dvb_bat_section *bat)
++{
++ return (struct dvb_bat_section_part2 *)
++ ((uint8_t*) bat +
++ sizeof(struct dvb_bat_section) +
++ bat->bouquet_descriptors_length);
++
++}
++
++/**
++ * Iterator for the transports field of a dvb_bat_section_part2.
++ *
++ * @param part2 dvb_bat_section_part2 pointer.
++ * @param pos Variable containing a pointer to the current dvb_bat_transport.
++ */
++#define dvb_bat_section_transports_for_each(part2, pos) \
++ for ((pos) = dvb_bat_section_transports_first(part2); \
++ (pos); \
++ (pos) = dvb_bat_section_transports_next(part2, pos))
++
++/**
++ * Iterator for the descriptors field of a dvb_bat_transport.
++ *
++ * @param transport dvb_bat_transport pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define dvb_bat_transport_descriptors_for_each(transport, pos) \
++ for ((pos) = dvb_bat_transport_descriptors_first(transport); \
++ (pos); \
++ (pos) = dvb_bat_transport_descriptors_next(transport, pos))
++
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct descriptor *
++ dvb_bat_section_descriptors_first(struct dvb_bat_section *bat)
++{
++ if (bat->bouquet_descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) bat + sizeof(struct dvb_bat_section));
++}
++
++static inline struct descriptor *
++ dvb_bat_section_descriptors_next(struct dvb_bat_section *bat,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) bat + sizeof(struct dvb_bat_section),
++ bat->bouquet_descriptors_length,
++ pos);
++}
++
++static inline struct dvb_bat_transport *
++ dvb_bat_section_transports_first(struct dvb_bat_section_part2 *part2)
++{
++ if (part2->transport_stream_loop_length == 0)
++ return NULL;
++
++ return (struct dvb_bat_transport *)
++ ((uint8_t *) part2 + sizeof(struct dvb_bat_section_part2));
++}
++
++static inline struct dvb_bat_transport *
++ dvb_bat_section_transports_next(struct dvb_bat_section_part2 *part2,
++ struct dvb_bat_transport *pos)
++{
++ uint8_t *end = (uint8_t*) part2 + sizeof(struct dvb_bat_section_part2) +
++ part2->transport_stream_loop_length;
++ uint8_t *next = (uint8_t*) pos + sizeof(struct dvb_bat_transport) +
++ pos->transport_descriptors_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_bat_transport *) next;
++}
++
++static inline struct descriptor *
++ dvb_bat_transport_descriptors_first(struct dvb_bat_transport *t)
++{
++ if (t->transport_descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t*)t + sizeof(struct dvb_bat_transport));
++}
++
++static inline struct descriptor *
++ dvb_bat_transport_descriptors_next(struct dvb_bat_transport *t,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) t + sizeof(struct dvb_bat_transport),
++ t->transport_descriptors_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bouquet_name_descriptor.h dvb-apps/lib/libucsi/dvb/bouquet_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/bouquet_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/bouquet_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,82 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_BOUQUET_NAME_DESCRIPTOR
++#define _UCSI_DVB_BOUQUET_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_bouquet_name_descriptor structure.
++ */
++struct dvb_bouquet_name_descriptor {
++ struct descriptor d;
++
++ /* uint8_t name[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_bouquet_name_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_bouquet_name_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_bouquet_name_descriptor*
++ dvb_bouquet_name_descriptor_codec(struct descriptor* d)
++{
++ return (struct dvb_bouquet_name_descriptor*) d;
++}
++
++/**
++ * Accessor for the name field of a dvb_bouquet_name_descriptor.
++ *
++ * @param d dvb_bouquet_name_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_bouquet_name_descriptor_name(struct dvb_bouquet_name_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_bouquet_name_descriptor);
++}
++
++/**
++ * Determine the length of the name field of a dvb_bouquet_name_descriptor in bytes.
++ *
++ * @param d dvb_bouquet_name_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_bouquet_name_descriptor_name_length(struct dvb_bouquet_name_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cable_delivery_descriptor.h dvb-apps/lib/libucsi/dvb/cable_delivery_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cable_delivery_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/cable_delivery_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,70 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_CABLE_DELIVERY_DESCRIPTOR
++#define _UCSI_DVB_CABLE_DELIVERY_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_cable_delivery_descriptor structure.
++ */
++struct dvb_cable_delivery_descriptor {
++ struct descriptor d;
++
++ uint32_t frequency; // BCD, units 100Hz
++ EBIT2(uint16_t reserved : 12; ,
++ uint16_t fec_outer : 4; );
++ uint8_t modulation;
++ EBIT2(uint32_t symbol_rate : 28; , // BCD, units 100Hz
++ uint32_t fec_inner : 4; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_cable_delivery_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_cable_delivery_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_cable_delivery_descriptor*
++ dvb_cable_delivery_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_cable_delivery_descriptor) - 2))
++ return NULL;
++
++ bswap32((uint8_t*) d + 2);
++ bswap16((uint8_t*) d + 6);
++ bswap32((uint8_t*) d + 9);
++
++ return (struct dvb_cable_delivery_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ca_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/ca_identifier_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ca_identifier_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ca_identifier_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,94 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_CA_IDENTIFIER_DESCRIPTOR
++#define _UCSI_DVB_CA_IDENTIFIER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_ca_identifier_descriptor structure.
++ */
++struct dvb_ca_identifier_descriptor {
++ struct descriptor d;
++
++ /* uint16_t ca_system_ids[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ca_identifier_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_ca_identifier_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ca_identifier_descriptor*
++ dvb_ca_identifier_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len;
++ uint8_t *buf = (uint8_t*) d + 2;
++ uint32_t pos = 0;
++
++ if (len % 2)
++ return NULL;
++
++ while(pos < len) {
++ bswap16(buf+pos);
++ pos+=2;
++ }
++
++ return (struct dvb_ca_identifier_descriptor*) d;
++}
++
++/**
++ * Accessor for the ca_system_ids field of a dvb_ca_identifier_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint16_t *
++ dvb_ca_identifier_descriptor_ca_system_ids(struct dvb_ca_identifier_descriptor *d)
++{
++ return (uint16_t *) ((uint8_t *) d + sizeof(struct dvb_ca_identifier_descriptor));
++}
++
++/**
++ * Calculate the number of entries in the ca_system_ids field of a dvb_ca_identifier_descriptor.
++ *
++ * @param d dvb_ca_identifier_descriptor pointer.
++ * @return Number of entries.
++ */
++static inline int
++ dvb_ca_identifier_descriptor_ca_system_ids_count(struct dvb_ca_identifier_descriptor *d)
++{
++ return d->d.len >> 1;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cell_frequency_link_descriptor.h dvb-apps/lib/libucsi/dvb/cell_frequency_link_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cell_frequency_link_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/cell_frequency_link_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,190 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_CELL_FREQUENCY_LINK_DESCRIPTOR
++#define _UCSI_DVB_CELL_FREQUENCY_LINK_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_cell_frequency_link_descriptor structure.
++ */
++struct dvb_cell_frequency_link_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_cell_frequency_link_cell cells[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the cells field of a dvb_cell_frequency_link_descriptor.
++ */
++struct dvb_cell_frequency_link_cell {
++ uint16_t cell_id;
++ uint32_t frequency;
++ uint8_t subcell_loop_info_length;
++ /* struct dvb_cell_frequency_link_subcell subcells[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the subcells field of a dvb_cell_frequency_link_cell.
++ */
++struct dvb_cell_frequency_link_cell_subcell {
++ uint8_t cell_id_extension;
++ uint32_t transposer_frequency;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_cell_frequency_link_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_cell_frequency_link_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_cell_frequency_link_descriptor*
++ dvb_cell_frequency_link_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint32_t pos2 = 0;
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t len = d->len;
++
++ while(pos < len) {
++ struct dvb_cell_frequency_link_cell *e =
++ (struct dvb_cell_frequency_link_cell*) (buf+pos);
++
++ if ((pos + sizeof(struct dvb_cell_frequency_link_cell)) > len)
++ return NULL;
++
++ bswap16(buf+pos);
++ bswap32(buf+pos+2);
++
++ pos += sizeof(struct dvb_cell_frequency_link_cell);
++
++ if ((pos + e->subcell_loop_info_length) > len)
++ return NULL;
++
++ if (e->subcell_loop_info_length % sizeof(struct dvb_cell_frequency_link_cell_subcell))
++ return NULL;
++
++ pos2 = 0;
++ while(pos2 < e->subcell_loop_info_length) {
++ bswap32(buf+pos+pos2+1);
++
++ pos2 += sizeof(struct dvb_cell_frequency_link_cell_subcell);
++ }
++
++ pos += e->subcell_loop_info_length;
++ }
++
++ return (struct dvb_cell_frequency_link_descriptor*) d;
++}
++
++/**
++ * Iterator for the cells field of a dvb_cell_frequency_link_descriptor.
++ *
++ * @param d dvb_cell_frequency_link_descriptor pointer.
++ * @param pos Variable holding a pointer to the current dvb_cell_frequency_link_cell.
++ */
++#define dvb_cell_frequency_link_descriptor_cells_for_each(d, pos) \
++ for ((pos) = dvb_cell_frequency_link_descriptor_cells_first(d); \
++ (pos); \
++ (pos) = dvb_cell_frequency_link_descriptor_cells_next(d, pos))
++
++/**
++ * Iterator for the subcells field of a dvb_cell_frequency_link_cell.
++ *
++ * @param cell dvb_cell_frequency_link_cell pointer.
++ * @param pos Variable holding a pointer to the current dvb_cell_frequency_link_cell_subcell.
++ */
++#define dvb_cell_frequency_link_cell_subcells_for_each(cell, pos) \
++ for ((pos) = dvb_cell_frequency_link_cell_subcells_first(cell); \
++ (pos); \
++ (pos) = dvb_cell_frequency_link_cell_subcells_next(cell, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_cell_frequency_link_cell*
++ dvb_cell_frequency_link_descriptor_cells_first(struct dvb_cell_frequency_link_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_cell_frequency_link_cell *)
++ ((uint8_t*) d + sizeof(struct dvb_cell_frequency_link_descriptor));
++}
++
++static inline struct dvb_cell_frequency_link_cell*
++ dvb_cell_frequency_link_descriptor_cells_next(struct dvb_cell_frequency_link_descriptor *d,
++ struct dvb_cell_frequency_link_cell *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_cell_frequency_link_cell) +
++ pos->subcell_loop_info_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_cell_frequency_link_cell *) next;
++}
++
++static inline struct dvb_cell_frequency_link_cell_subcell*
++ dvb_cell_frequency_link_cell_subcells_first(struct dvb_cell_frequency_link_cell *d)
++{
++ if (d->subcell_loop_info_length == 0)
++ return NULL;
++
++ return (struct dvb_cell_frequency_link_cell_subcell*)
++ ((uint8_t*) d + sizeof(struct dvb_cell_frequency_link_cell));
++}
++
++static inline struct dvb_cell_frequency_link_cell_subcell*
++ dvb_cell_frequency_link_cell_subcells_next(struct dvb_cell_frequency_link_cell *cell,
++ struct dvb_cell_frequency_link_cell_subcell *pos)
++{
++ uint8_t *end = (uint8_t*) cell + cell->subcell_loop_info_length;
++ uint8_t *next = (uint8_t*) pos +
++ sizeof(struct dvb_cell_frequency_link_cell_subcell);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_cell_frequency_link_cell_subcell *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cell_list_descriptor.h dvb-apps/lib/libucsi/dvb/cell_list_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/cell_list_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/cell_list_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,201 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_CELL_LIST_DESCRIPTOR
++#define _UCSI_DVB_CELL_LIST_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_cell_list_descriptor structure.
++ */
++struct dvb_cell_list_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_cell_list_entry cells[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the cells field of a dvb_cell_list_descriptor.
++ */
++struct dvb_cell_list_entry {
++ uint16_t cell_id;
++ uint16_t cell_latitude;
++ uint16_t cell_longitude;
++ EBIT3(uint32_t cell_extend_of_latitude :12; ,
++ uint32_t cell_extend_of_longitude :12; ,
++ uint32_t subcell_info_loop_length : 8; );
++ /* struct dvb_subcell_list_entry subcells[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the subcells field of a dvb_cell_list_entry.
++ */
++struct dvb_subcell_list_entry {
++ uint8_t cell_id_extension;
++ uint16_t subcell_latitude;
++ uint16_t subcell_longitude;
++ EBIT2(uint32_t subcell_extend_of_latitude :12; ,
++ uint32_t subcell_extend_of_longitude :12; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_cell_list_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_cell_list_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_cell_list_descriptor*
++ dvb_cell_list_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint32_t pos2 = 0;
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t len = d->len;
++
++ while(pos < len) {
++ struct dvb_cell_list_entry *e =
++ (struct dvb_cell_list_entry*) (buf+pos);
++
++ if ((pos + sizeof(struct dvb_cell_list_entry)) > len)
++ return NULL;
++
++ bswap16(buf+pos);
++ bswap16(buf+pos+2);
++ bswap16(buf+pos+4);
++ bswap32(buf+pos+6);
++
++ pos += sizeof(struct dvb_cell_list_entry);
++
++ if ((pos + e->subcell_info_loop_length) > len)
++ return NULL;
++
++ if (e->subcell_info_loop_length % sizeof(struct dvb_subcell_list_entry))
++ return NULL;
++
++ pos2 = 0;
++ while(pos2 < e->subcell_info_loop_length) {
++ bswap16(buf+pos+pos2+1);
++ bswap16(buf+pos+pos2+3);
++ bswap24(buf+pos+pos2+5);
++
++ pos2 += sizeof(struct dvb_subcell_list_entry);
++ }
++
++ pos += e->subcell_info_loop_length;
++ }
++
++ return (struct dvb_cell_list_descriptor*) d;
++}
++
++/**
++ * Iterator for the cells field of a dvb_cell_list_descriptor.
++ *
++ * @param d dvb_cell_list_descriptor pointer.
++ * @param pos Variable holding a pointer to the current dvb_cell_list_entry.
++ */
++#define dvb_cell_list_descriptor_cells_for_each(d, pos) \
++ for ((pos) = dvb_cell_list_descriptor_cells_first(d); \
++ (pos); \
++ (pos) = dvb_cell_list_descriptor_cells_next(d, pos))
++
++/**
++ * Iterator for the subcells field of a dvb_cell_list_entry.
++ *
++ * @param cell dvb_cell_list_entry pointer.
++ * @param pos Variable holding a pointer to the current dvb_subcell_list_entry.
++ */
++#define dvb_cell_list_entry_subcells_for_each(cell, pos) \
++ for ((pos) = dvb_cell_list_entry_subcells_first(cell); \
++ (pos); \
++ (pos) = dvb_cell_list_entry_subcells_next(cell, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_cell_list_entry*
++ dvb_cell_list_descriptor_cells_first(struct dvb_cell_list_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_cell_list_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_cell_list_descriptor));
++}
++
++static inline struct dvb_cell_list_entry*
++ dvb_cell_list_descriptor_cells_next(struct dvb_cell_list_descriptor *d,
++ struct dvb_cell_list_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_cell_list_entry) +
++ pos->subcell_info_loop_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_cell_list_entry *) next;
++}
++
++static inline struct dvb_subcell_list_entry*
++ dvb_cell_list_entry_subcells_first(struct dvb_cell_list_entry *d)
++{
++ if (d->subcell_info_loop_length == 0)
++ return NULL;
++
++ return (struct dvb_subcell_list_entry*)
++ ((uint8_t*) d + sizeof(struct dvb_cell_list_entry));
++}
++
++static inline struct dvb_subcell_list_entry*
++ dvb_cell_list_entry_subcells_next(struct dvb_cell_list_entry *d,
++ struct dvb_subcell_list_entry *pos)
++{
++ uint8_t *next = (uint8_t*) pos + sizeof(struct dvb_subcell_list_entry);
++ uint8_t *end = (uint8_t*) d +
++ sizeof(struct dvb_cell_list_entry) +
++ d->subcell_info_loop_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_subcell_list_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/component_descriptor.h dvb-apps/lib/libucsi/dvb/component_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/component_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/component_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,147 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_COMPONENT_DESCRIPTOR
++#define _UCSI_DVB_COMPONENT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * Possible values for stream_content.
++ */
++enum {
++ DVB_STREAM_CONTENT_VIDEO = 0x01,
++ DVB_STREAM_CONTENT_AUDIO = 0x02,
++ DVB_STREAM_CONTENT_SUBTITLE = 0x03,
++ DVB_STREAM_CONTENT_AC3 = 0x04,
++};
++
++/**
++ * Possible values for component_type.
++ */
++enum {
++ DVB_COMPONENT_TYPE_VIDEO_43_25Hz = 0x01,
++ DVB_COMPONENT_TYPE_VIDEO_169_PAN_25Hz = 0x02,
++ DVB_COMPONENT_TYPE_VIDEO_169_NOPAN_25Hz = 0x03,
++ DVB_COMPONENT_TYPE_VIDEO_GT169_25Hz = 0x04,
++
++ DVB_COMPONENT_TYPE_VIDEO_43_30Hz = 0x05,
++ DVB_COMPONENT_TYPE_VIDEO_169_PAN_30Hz = 0x06,
++ DVB_COMPONENT_TYPE_VIDEO_169_NOPAN_30Hz = 0x07,
++ DVB_COMPONENT_TYPE_VIDEO_GT169_30Hz = 0x08,
++
++ DVB_COMPONENT_TYPE_HDVIDEO_43_25Hz = 0x09,
++ DVB_COMPONENT_TYPE_HDVIDEO_169_PAN_25Hz = 0x0a,
++ DVB_COMPONENT_TYPE_HDVIDEO_169_NOPAN_25Hz = 0x0b,
++ DVB_COMPONENT_TYPE_HDVIDEO_GT169_25Hz = 0x0c,
++
++ DVB_COMPONENT_TYPE_HDVIDEO_43_30Hz = 0x0d,
++ DVB_COMPONENT_TYPE_HDVIDEO_169_PAN_30Hz = 0x0e,
++ DVB_COMPONENT_TYPE_HDVIDEO_169_NOPAN_30Hz = 0x0f,
++ DVB_COMPONENT_TYPE_HDVIDEO_GT169_30Hz = 0x10,
++
++ DVB_COMPONENT_TYPE_AUDIO_SINGLE_MONO = 0x01,
++ DVB_COMPONENT_TYPE_AUDIO_DUAL_MONO = 0x02,
++ DVB_COMPONENT_TYPE_AUDIO_STEREO = 0x03,
++ DVB_COMPONENT_TYPE_AUDIO_MULTI_LINGUAL_MULTI_CHAN= 0x04,
++ DVB_COMPONENT_TYPE_AUDIO_SURROUND = 0x05,
++ DVB_COMPONENT_TYPE_AUDIO_VISUAL_IMPAIRED = 0x40,
++ DVB_COMPONENT_TYPE_AUDIO_HARDHEAR = 0x41,
++ DVB_COMPONENT_TYPE_AUDIO_SUPPLEMENTARY = 0x42,
++
++ DVB_COMPONENT_TYPE_SUBTITLE_TELETEXT = 0x01,
++ DVB_COMPONENT_TYPE_SUBTITLE_ASSOC_TELETEXT = 0x02,
++ DVB_COMPONENT_TYPE_SUBTITLE_VBI = 0x03,
++ DVB_COMPONENT_TYPE_SUBTITLE_DVB = 0x10,
++ DVB_COMPONENT_TYPE_SUBTITLE_DVB_43 = 0x11,
++ DVB_COMPONENT_TYPE_SUBTITLE_DVB_169 = 0x12,
++ DVB_COMPONENT_TYPE_SUBTITLE_DVB_2211 = 0x13,
++ DVB_COMPONENT_TYPE_SUBTITLE_DVB_HARDHEAR = 0x20,
++ DVB_COMPONENT_TYPE_SUBTITLE_DVB_HARDHEAR_43 = 0x21,
++ DVB_COMPONENT_TYPE_SUBTITLE_DVB_HARDHEAR_169 = 0x22,
++ DVB_COMPONENT_TYPE_SUBTITLE_DVB_HARDHEAR_2211 = 0x23,
++};
++
++/**
++ * dvb_component_descriptor structure.
++ */
++struct dvb_component_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t reserved : 4; ,
++ uint8_t stream_content : 4; );
++ uint8_t component_type;
++ uint8_t component_tag;
++ iso639lang_t language_code;
++ /* uint8_t text[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_component_descriptor.
++ *
++ * @param d Pointer to a generic descriptor.
++ * @return dvb_component_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_component_descriptor*
++ dvb_component_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct dvb_component_descriptor) - 2))
++ return NULL;
++
++ return (struct dvb_component_descriptor*) d;
++}
++
++/**
++ * Accessor for the text field of a dvb_component_descriptor.
++ *
++ * @param d dvb_component_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_component_descriptor_text(struct dvb_component_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_component_descriptor);
++}
++
++/**
++ * Determine the length of the text field of a dvb_component_descriptor.
++ *
++ * @param d dvb_component_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_component_descriptor_text_length(struct dvb_component_descriptor *d)
++{
++ return d->d.len - 6;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/content_descriptor.h dvb-apps/lib/libucsi/dvb/content_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/content_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/content_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_CONTENT_DESCRIPTOR
++#define _UCSI_DVB_CONTENT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++// FIXME: the nibbles
++
++/**
++ * dvb_content_descriptor structure.
++ */
++struct dvb_content_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_content_nibble nibbles[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the nibbles field of a dvb_content_descriptor.
++ */
++struct dvb_content_nibble {
++ EBIT2(uint8_t content_nibble_level_1 : 4; ,
++ uint8_t content_nibble_level_2 : 4; );
++ EBIT2(uint8_t user_nibble_1 : 4; ,
++ uint8_t user_nibble_2 : 4; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_content_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_content_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_content_descriptor*
++ dvb_content_descriptor_codec(struct descriptor* d)
++{
++ if (d->len % sizeof(struct dvb_content_nibble))
++ return NULL;
++
++ return (struct dvb_content_descriptor*) d;
++}
++
++/**
++ * Iterator for the nibbles field of a dvb_content_descriptor.
++ *
++ * @param d dvb_content_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_content_nibble.
++ */
++#define dvb_content_descriptor_nibbles_for_each(d, pos) \
++ for ((pos) = dvb_content_descriptor_nibbles_first(d); \
++ (pos); \
++ (pos) = dvb_content_descriptor_nibbles_next(d, pos))
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_content_nibble*
++ dvb_content_descriptor_nibbles_first(struct dvb_content_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_content_nibble *)
++ ((uint8_t*) d + sizeof(struct dvb_content_descriptor));
++}
++
++static inline struct dvb_content_nibble*
++ dvb_content_descriptor_nibbles_next(struct dvb_content_descriptor *d,
++ struct dvb_content_nibble *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_content_nibble);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_content_nibble *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/content_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/content_identifier_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/content_identifier_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/content_identifier_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,233 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_CONTENT_IDENTIFIER_DESCRIPTOR
++#define _UCSI_DVB_CONTENT_IDENTIFIER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++
++/**
++ * Possible values for the crid_type.
++ */
++enum {
++ DVB_CRID_TYPE_NONE = 0x00,
++ DVB_CRID_TYPE_ITEM = 0x01,
++ DVB_CRID_TYPE_SERIES = 0x02,
++ DVB_CRID_TYPE_RECOMMENDATION = 0x03,
++};
++
++/**
++ * Possible values for the crid_location.
++ */
++enum {
++ DVB_CRID_LOCATION_THIS_DESCRIPTOR = 0x00,
++ DVB_CRID_LOCATION_CIT = 0x01,
++};
++
++/**
++ * dvb_content_identifier_descriptor structure.
++ */
++struct dvb_content_identifier_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_content_identifier_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the entries field of a dvb_content_identifier_descriptor.
++ */
++struct dvb_content_identifier_entry {
++ EBIT2(uint8_t crid_type : 6; ,
++ uint8_t crid_location : 2; );
++ /* struct dvb_content_identifier_data_00 data0 */
++ /* struct dvb_content_identifier_data_01 data1 */
++} __ucsi_packed;
++
++/**
++ * The data if crid_location == 0
++ */
++struct dvb_content_identifier_entry_data_0 {
++ uint8_t crid_length;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * The data if crid_location == 1
++ */
++struct dvb_content_identifier_entry_data_1 {
++ uint16_t crid_ref;
++} __ucsi_packed;
++
++
++/**
++ * Process a dvb_content_identifier_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return dvb_content_identifier_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_content_identifier_descriptor*
++ dvb_content_identifier_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len + 2;
++ uint32_t pos = 2;
++ uint8_t *buf = (uint8_t*) d;
++
++ while(pos < len) {
++ struct dvb_content_identifier_entry *e =
++ (struct dvb_content_identifier_entry*) (buf + pos);
++
++ if (len < (pos+1))
++ return NULL;
++ pos++;
++
++ switch(e->crid_location) {
++ case 0:
++ if (len < (pos + 1))
++ return NULL;
++ if (len < (pos + 1 + buf[pos]))
++ return NULL;
++ pos += 1 + buf[pos];
++ break;
++
++ case 1:
++ if (len < (pos+2))
++ return NULL;
++ bswap16(buf+pos);
++ break;
++ }
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return (struct dvb_content_identifier_descriptor*) d;
++}
++
++/**
++ * Iterator for entries field of a dvb_content_identifier_descriptor.
++ *
++ * @param d dvb_content_identifier_descriptor pointer.
++ * @param pos Variable holding a pointer to the current dvb_content_identifier_entry.
++ */
++#define dvb_content_identifier_descriptor_entries_for_each(d, pos) \
++ for ((pos) = dvb_content_identifier_descriptor_entries_first(d); \
++ (pos); \
++ (pos) = dvb_content_identifier_descriptor_entries_next(d, pos))
++
++/**
++ * Accessor for the data0 field of a dvb_content_identifier_entry.
++ *
++ * @param d dvb_content_identifier_entry pointer.
++ * @return Pointer, or NULL on error.
++ */
++static inline struct dvb_content_identifier_entry_data_0*
++ dvb_content_identifier_entry_data_0(struct dvb_content_identifier_entry *d)
++{
++ if (d->crid_location != 0)
++ return NULL;
++ return (struct dvb_content_identifier_entry_data_0*)
++ ((uint8_t*) d + sizeof(struct dvb_content_identifier_entry));
++}
++/**
++ * Accessor for the data field of a dvb_content_identifier_entry_data_0.
++ *
++ * @param d dvb_content_identifier_entry_data_0 pointer.
++ * @return Pointer, or NULL on error.
++ */
++static inline uint8_t*
++ dvb_content_identifier_entry_data_0_data(struct dvb_content_identifier_entry_data_0 *d)
++{
++ return ((uint8_t*) d + sizeof(struct dvb_content_identifier_entry_data_0));
++}
++
++/**
++ * Accessor for the data1 field of a dvb_content_identifier_entry.
++ *
++ * @param d dvb_content_identifier_entry pointer.
++ * @return Pointer, or NULL on error.
++ */
++static inline struct dvb_content_identifier_entry_data_1*
++ dvb_content_identifier_entry_data_1(struct dvb_content_identifier_entry *d)
++{
++ if (d->crid_location != 1)
++ return NULL;
++ return (struct dvb_content_identifier_entry_data_1*)
++ ((uint8_t*) d + sizeof(struct dvb_content_identifier_entry));
++}
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_content_identifier_entry*
++ dvb_content_identifier_descriptor_entries_first(struct dvb_content_identifier_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_content_identifier_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_content_identifier_descriptor));
++}
++
++static inline struct dvb_content_identifier_entry*
++ dvb_content_identifier_descriptor_entries_next(struct dvb_content_identifier_descriptor *d,
++ struct dvb_content_identifier_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_content_identifier_entry);
++
++ if (next >= end)
++ return NULL;
++
++ switch(pos->crid_location) {
++ case 0:
++ if ((next+2) >= end)
++ return NULL;
++ if ((next+2+next[1]) >= end)
++ return NULL;
++ break;
++
++ case 1:
++ if ((next+3) >= end)
++ return NULL;
++ break;
++ }
++
++ return (struct dvb_content_identifier_entry*) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/country_availability_descriptor.h dvb-apps/lib/libucsi/dvb/country_availability_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/country_availability_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/country_availability_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,120 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_COUNTRY_AVAILABILITY_DESCRIPTOR
++#define _UCSI_DVB_COUNTRY_AVAILABILITY_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_country_availability_descriptor structure.
++ */
++struct dvb_country_availability_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t country_availability_flag : 1; ,
++ uint8_t reserved : 7; );
++ /* struct dvb_country_availability_entry countries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the countries field of a dvb_country_availability_descriptor.
++ */
++struct dvb_country_availability_entry {
++ iso639country_t country_code;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_country_availability_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_country_availability_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_country_availability_descriptor*
++ dvb_country_availability_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len;
++
++ if (len < (sizeof(struct dvb_country_availability_descriptor) - 2))
++ return NULL;
++
++ if ((len - 1) % sizeof(struct dvb_country_availability_entry))
++ return NULL;
++
++ return (struct dvb_country_availability_descriptor*) d;
++}
++
++/**
++ * Iterator for the countries field of a dvb_country_availability_descriptor.
++ *
++ * @param d dvb_country_availability_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_country_availability_entry.
++ */
++#define dvb_country_availability_descriptor_countries_for_each(d, pos) \
++ for ((pos) = dvb_country_availability_descriptor_countries_first(d); \
++ (pos); \
++ (pos) = dvb_country_availability_descriptor_countries_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_country_availability_entry*
++ dvb_country_availability_descriptor_countries_first(struct dvb_country_availability_descriptor *d)
++{
++ if (d->d.len == 1)
++ return NULL;
++
++ return (struct dvb_country_availability_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_country_availability_descriptor));
++}
++
++static inline struct dvb_country_availability_entry*
++ dvb_country_availability_descriptor_countries_next(struct dvb_country_availability_descriptor *d,
++ struct dvb_country_availability_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_country_availability_entry);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_country_availability_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/data_broadcast_descriptor.h dvb-apps/lib/libucsi/dvb/data_broadcast_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/data_broadcast_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/data_broadcast_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,139 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_DATA_BROADCAST_DESCRIPTOR
++#define _UCSI_DVB_DATA_BROADCAST_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_data_broadcast_descriptor structure.
++ */
++struct dvb_data_broadcast_descriptor {
++ struct descriptor d;
++
++ uint16_t data_broadcast_id;
++ uint8_t component_tag;
++ uint8_t selector_length;
++ /* uint8_t selector[] */
++ /* struct dvb_data_broadcast_descriptor_part2 part2 */
++} __ucsi_packed;
++
++/**
++ * Second part of a dvb_data_broadcast_descriptor following the variable length selector field.
++ */
++struct dvb_data_broadcast_descriptor_part2 {
++ iso639lang_t language_code;
++ uint8_t text_length;
++ /* uint8_t text[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_data_broadcast_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_data_broadcast_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_data_broadcast_descriptor*
++ dvb_data_broadcast_descriptor_codec(struct descriptor* d)
++{
++ struct dvb_data_broadcast_descriptor *p =
++ (struct dvb_data_broadcast_descriptor *) d;
++ struct dvb_data_broadcast_descriptor_part2 *p2;
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t pos = sizeof(struct dvb_data_broadcast_descriptor) - 2;
++ uint32_t len = d->len;
++
++ if (pos > len)
++ return NULL;
++
++ bswap16(buf + 2);
++
++ pos += p->selector_length;
++
++ if (pos > len)
++ return NULL;
++
++ p2 = (struct dvb_data_broadcast_descriptor_part2*) (buf + 2 + pos);
++
++ pos += sizeof(struct dvb_data_broadcast_descriptor_part2);
++
++ if (pos > len)
++ return NULL;
++
++ pos += p2->text_length;
++
++ if (pos != len)
++ return NULL;
++
++ return p;
++}
++
++/**
++ * Accessor for the selector field of a dvb_data_broadcast_descriptor.
++ *
++ * @param d dvb_data_broadcast_descriptor pointer.
++ * @return pointer to the field.
++ */
++static inline uint8_t *
++ dvb_data_broadcast_descriptor_selector(struct dvb_data_broadcast_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_data_broadcast_descriptor);
++}
++
++/**
++ * Accessor for the second part of a dvb_data_broadcast_descriptor.
++ *
++ * @param d dvb_data_broadcast_descriptor pointer.
++ * @return dvb_data_broadcast_descriptor_part2 pointer.
++ */
++static inline struct dvb_data_broadcast_descriptor_part2 *
++ dvb_data_broadcast_descriptor_part2(struct dvb_data_broadcast_descriptor *d)
++{
++ return (struct dvb_data_broadcast_descriptor_part2*)
++ ((uint8_t*) d + sizeof(struct dvb_data_broadcast_descriptor) +
++ d->selector_length);
++}
++
++/**
++ * Accessor for the text field in a dvb_data_broadcast_descriptor_part2.
++ *
++ * @param d dvb_data_broadcast_descriptor_part2 pointer.
++ * @return pointer to the field.
++ */
++static inline uint8_t *
++ dvb_data_broadcast_descriptor_part2_text(struct dvb_data_broadcast_descriptor_part2 *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_data_broadcast_descriptor_part2);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/data_broadcast_id_descriptor.h dvb-apps/lib/libucsi/dvb/data_broadcast_id_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/data_broadcast_id_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/data_broadcast_id_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,221 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_DATA_BROADCAST_ID_DESCRIPTOR
++#define _UCSI_DVB_DATA_BROADCAST_ID_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Possible values for data_broadcast_id.
++ */
++enum {
++ DVB_BROADCAST_ID_DATA_PIPE = 0X0001,
++ DVB_BROADCAST_ID_ASYNCHRONOUS_DATA_STREAM = 0X0002,
++ DVB_BROADCAST_ID_SYNCHRONOUS_DATA_STREAM = 0X0003,
++ DVB_BROADCAST_ID_SYNCHRONISED_DATA_STREAM = 0X0004,
++ DVB_BROADCAST_ID_MULTI_PROTOCOL_ENCAPSULATION = 0X0005,
++ DVB_BROADCAST_ID_DATA_CAROUSEL = 0X0006,
++ DVB_BROADCAST_ID_OBJECT_CAROUSEL = 0X0007,
++ DVB_BROADCAST_ID_DVB_ATM_STREAMS = 0X0008,
++ DVB_BROADCAST_ID_HIGHER_PROTOCOLS = 0X0009,
++ DVB_BROADCAST_ID_SOFTWARE_UPDATE = 0x000A,
++ DVB_BROADCAST_ID_IP_MAC_NOTIFICATION_TABLE = 0x000B,
++};
++
++/**
++ * dvb_data_broadcast_id_descriptor structure.
++ */
++struct dvb_data_broadcast_id_descriptor {
++ struct descriptor d;
++
++ uint16_t data_broadcast_id;
++ /* uint8_t id_selector_byte[] */
++} __ucsi_packed;
++
++/**
++ * id_selector_byte for 0x000b data_broadcast_id (IP/MAC Notification Table).
++ */
++struct dvb_id_selector_byte_000b {
++ uint8_t platform_id_data_length;
++ /* struct dvb_ip_mac_notification_info infos[] */
++ /* uint8_t private_data[] */
++} __ucsi_packed;
++
++/**
++ * Entries in the infos field of a dvb_id_selector_byte_0b.
++ */
++struct dvb_ip_mac_notification_info {
++ EBIT2(uint32_t platform_id : 24; ,
++ uint8_t action_type : 8; );
++ EBIT3(uint8_t reserved : 2; ,
++ uint8_t INT_versioning_flag : 1; ,
++ uint8_t INT_version : 5; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_data_broadcast_id_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_data_broadcast_id_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_data_broadcast_id_descriptor*
++ dvb_data_broadcast_id_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct dvb_data_broadcast_id_descriptor) - 2))
++ return NULL;
++
++ bswap16((uint8_t*) d + 2);
++
++ return (struct dvb_data_broadcast_id_descriptor*) d;
++}
++
++/**
++ * Accessor for the selector_byte field of a dvb_data_broadcast_id_descriptor.
++ *
++ * @param d dvb_data_broadcast_id_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_data_broadcast_id_descriptor_id_selector_byte(struct dvb_data_broadcast_id_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_data_broadcast_id_descriptor);
++}
++
++/**
++ * Determine the length of the selector_byte field of a dvb_data_broadcast_id_descriptor.
++ *
++ * @param d dvb_data_broadcast_id_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_data_broadcast_id_descriptor_id_selector_byte_length(struct dvb_data_broadcast_id_descriptor *d)
++{
++ return d->d.len - 2;
++}
++
++/**
++ * Accessor for a dvb_id_selector_byte_000b pointer.
++ *
++ * @param d dvb_data_broadcast_id_descriptor pointer.
++ * @return Pointer to the data field.
++ */
++static inline struct dvb_id_selector_byte_000b *
++ dvb_id_selector_byte_000b(struct dvb_data_broadcast_id_descriptor *d)
++{
++ if (d->data_broadcast_id != DVB_BROADCAST_ID_IP_MAC_NOTIFICATION_TABLE)
++ return NULL;
++ return (struct dvb_id_selector_byte_000b *) dvb_data_broadcast_id_descriptor_id_selector_byte(d);
++}
++
++/**
++ * Iterator for the dvb_ip_mac_notification_info field of a dvb_id_selector_byte_000b.
++ *
++ * @param id_selector_byte dvb_id_selector_byte_000b pointer.
++ * @param pos Variable containing a pointer to the current dvb_ip_mac_notification_info.
++ */
++#define dvb_id_selector_byte_000b_ip_mac_notification_info_for_each(id_selector_byte, pos) \
++ for ((pos) = dvb_ip_mac_notification_info_first(id_selector_byte); \
++ (pos); \
++ (pos) = dvb_ip_mac_notification_info_next(id_selector_byte, pos))
++
++/**
++ * Length of the private_data field of a dvb_id_selector_byte_000b.
++ *
++ * @param d descriptor pointer.
++ * @param i dvb_id_selector_byte_000b pointer.
++ * @return Length of the field.
++ */
++static inline uint8_t
++ dvb_id_selector_byte_000b_private_data_length(struct descriptor *d,
++ struct dvb_id_selector_byte_000b *i)
++{
++ return (uint8_t) (d->len -
++ sizeof(struct descriptor) -
++ i->platform_id_data_length -
++ sizeof(struct dvb_id_selector_byte_000b));
++}
++
++/**
++ * Accessor for the private_data field of a dvb_id_selector_byte_000b.
++ *
++ * @param d descriptor pointer.
++ * @param i dvb_id_selector_byte_000b pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_id_selector_byte_000b_private_data(struct descriptor *d,
++ struct dvb_id_selector_byte_000b *i)
++{
++ if (dvb_id_selector_byte_000b_private_data_length(d, i) <= 0)
++ return NULL;
++
++ return (uint8_t *) i + i->platform_id_data_length + sizeof(struct dvb_id_selector_byte_000b);
++}
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ip_mac_notification_info *
++ dvb_ip_mac_notification_info_first(struct dvb_id_selector_byte_000b *d)
++{
++ if (d->platform_id_data_length == 0)
++ return NULL;
++
++ bswap32((uint8_t *) d + sizeof(struct dvb_id_selector_byte_000b));
++
++ return (struct dvb_ip_mac_notification_info *) ((uint8_t *) d + sizeof(struct dvb_id_selector_byte_000b));
++}
++
++static inline struct dvb_ip_mac_notification_info *
++ dvb_ip_mac_notification_info_next(struct dvb_id_selector_byte_000b *d,
++ struct dvb_ip_mac_notification_info *pos)
++{
++ uint8_t *end = (uint8_t *) d + d->platform_id_data_length;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_id_selector_byte_000b) +
++ sizeof(struct dvb_ip_mac_notification_info);
++
++ if (next >= end)
++ return NULL;
++
++ bswap32(next);
++
++ return (struct dvb_ip_mac_notification_info *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
++
++#include <libucsi/dvb/mhp_data_broadcast_id_descriptor.h>
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/default_authority_descriptor.h dvb-apps/lib/libucsi/dvb/default_authority_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/default_authority_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/default_authority_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,82 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_DEFAULT_AUTHORITY_DESCRIPTOR
++#define _UCSI_DVB_DEFAULT_AUTHORITY_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_default_authority_descriptor structure.
++ */
++struct dvb_default_authority_descriptor {
++ struct descriptor d;
++
++ /* char name[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_default_authority_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_default_authority_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_default_authority_descriptor*
++ dvb_default_authority_descriptor_codec(struct descriptor* d)
++{
++ return (struct dvb_default_authority_descriptor*) d;
++}
++
++/**
++ * Accessor for the name field in a dvb_default_authority_descriptor.
++ *
++ * @param d dvb_default_authority_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_default_authority_descriptor_name(struct dvb_default_authority_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_default_authority_descriptor);
++}
++
++/**
++ * Calculate the length of the name field in a dvb_default_authority_descriptor.
++ *
++ * @param d dvb_default_authority_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_default_authority_descriptor_name_length(struct dvb_default_authority_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/descriptor.h dvb-apps/lib/libucsi/dvb/descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,230 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_DESCRIPTOR_H
++#define _UCSI_DVB_DESCRIPTOR_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/dvb/ac3_descriptor.h>
++#include <libucsi/dvb/adaptation_field_data_descriptor.h>
++#include <libucsi/dvb/ancillary_data_descriptor.h>
++#include <libucsi/dvb/announcement_support_descriptor.h>
++#include <libucsi/dvb/application_signalling_descriptor.h>
++#include <libucsi/dvb/bouquet_name_descriptor.h>
++#include <libucsi/dvb/ca_identifier_descriptor.h>
++#include <libucsi/dvb/cable_delivery_descriptor.h>
++#include <libucsi/dvb/cell_frequency_link_descriptor.h>
++#include <libucsi/dvb/cell_list_descriptor.h>
++#include <libucsi/dvb/component_descriptor.h>
++#include <libucsi/dvb/content_descriptor.h>
++#include <libucsi/dvb/content_identifier_descriptor.h>
++#include <libucsi/dvb/country_availability_descriptor.h>
++#include <libucsi/dvb/data_broadcast_descriptor.h>
++#include <libucsi/dvb/data_broadcast_id_descriptor.h>
++#include <libucsi/dvb/default_authority_descriptor.h>
++#include <libucsi/dvb/dsng_descriptor.h>
++#include <libucsi/dvb/extended_event_descriptor.h>
++#include <libucsi/dvb/frequency_list_descriptor.h>
++#include <libucsi/dvb/ip_mac_platform_name_descriptor.h>
++#include <libucsi/dvb/ip_mac_platform_provider_name_descriptor.h>
++#include <libucsi/dvb/ip_mac_stream_location_descriptor.h>
++#include <libucsi/dvb/linkage_descriptor.h>
++#include <libucsi/dvb/local_time_offset_descriptor.h>
++#include <libucsi/dvb/mosaic_descriptor.h>
++#include <libucsi/dvb/multilingual_bouquet_name_descriptor.h>
++#include <libucsi/dvb/multilingual_component_descriptor.h>
++#include <libucsi/dvb/multilingual_network_name_descriptor.h>
++#include <libucsi/dvb/multilingual_service_name_descriptor.h>
++#include <libucsi/dvb/network_name_descriptor.h>
++#include <libucsi/dvb/nvod_reference_descriptor.h>
++#include <libucsi/dvb/parental_rating_descriptor.h>
++#include <libucsi/dvb/partial_transport_stream_descriptor.h>
++#include <libucsi/dvb/pdc_descriptor.h>
++#include <libucsi/dvb/private_data_specifier_descriptor.h>
++#include <libucsi/dvb/related_content_descriptor.h>
++#include <libucsi/dvb/satellite_delivery_descriptor.h>
++#include <libucsi/dvb/s2_satellite_delivery_descriptor.h>
++#include <libucsi/dvb/scrambling_descriptor.h>
++#include <libucsi/dvb/service_availability_descriptor.h>
++#include <libucsi/dvb/service_descriptor.h>
++#include <libucsi/dvb/service_identifier_descriptor.h>
++#include <libucsi/dvb/service_list_descriptor.h>
++#include <libucsi/dvb/service_move_descriptor.h>
++#include <libucsi/dvb/short_event_descriptor.h>
++#include <libucsi/dvb/short_smoothing_buffer_descriptor.h>
++#include <libucsi/dvb/stream_identifier_descriptor.h>
++#include <libucsi/dvb/stuffing_descriptor.h>
++#include <libucsi/dvb/subtitling_descriptor.h>
++#include <libucsi/dvb/target_ip_address_descriptor.h>
++#include <libucsi/dvb/target_ipv6_address_descriptor.h>
++#include <libucsi/dvb/target_ip_slash_descriptor.h>
++#include <libucsi/dvb/target_ip_source_slash_descriptor.h>
++#include <libucsi/dvb/target_ipv6_slash_descriptor.h>
++#include <libucsi/dvb/target_ipv6_source_slash_descriptor.h>
++#include <libucsi/dvb/telephone_descriptor.h>
++#include <libucsi/dvb/teletext_descriptor.h>
++#include <libucsi/dvb/terrestrial_delivery_descriptor.h>
++#include <libucsi/dvb/time_shifted_event_descriptor.h>
++#include <libucsi/dvb/time_shifted_service_descriptor.h>
++#include <libucsi/dvb/time_slice_fec_identifier_descriptor.h>
++#include <libucsi/dvb/transport_stream_descriptor.h>
++#include <libucsi/dvb/tva_id_descriptor.h>
++#include <libucsi/dvb/vbi_data_descriptor.h>
++#include <libucsi/dvb/vbi_teletext_descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * The following are disabled because support is incomplete just now.
++ */
++/*
++#include <libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h>
++#include <libucsi/dvb/rnt_rar_over_ip_descriptor.h>
++#include <libucsi/dvb/rnt_rnt_scan_descriptor.h>
++#include <libucsi/dvb/ait_application_descriptor.h>
++#include <libucsi/dvb/ait_application_name_descriptor.h>
++#include <libucsi/dvb/ait_external_application_authorisation_descriptor.h>
++#include <libucsi/dvb/ait_application_icons_descriptor.h>
++*/
++
++/**
++ * The following are not implemented just now
++ */
++/*
++#include <libucsi/dvb/ait_transport_protocol_descriptor.h>
++#include <libucsi/dvb/ait_dvb_j_application_descriptor.h>
++#include <libucsi/dvb/ait_dvb_j_application_location_descriptor.h>
++#include <libucsi/dvb/ait_dvb_html_application_descriptor.h>
++#include <libucsi/dvb/ait_dvb_html_application_location_descriptor.h>
++#include <libucsi/dvb/ait_dvb_html_application_boundary_descriptor.h>
++#include <libucsi/dvb/ait_prefetch_descriptor.h>
++#include <libucsi/dvb/ait_dii_location_descriptor.h>
++#include <libucsi/dvb/ait_ip_signalling_descriptor.h>
++*/
++
++/**
++ * Enumeration of DVB descriptor tags.
++ */
++enum dvb_descriptor_tag {
++ dtag_dvb_network_name = 0x40,
++ dtag_dvb_service_list = 0x41,
++ dtag_dvb_stuffing = 0x42,
++ dtag_dvb_satellite_delivery_system = 0x43,
++ dtag_dvb_cable_delivery_system = 0x44,
++ dtag_dvb_vbi_data = 0x45,
++ dtag_dvb_vbi_teletext = 0x46,
++ dtag_dvb_bouquet_name = 0x47,
++ dtag_dvb_service = 0x48,
++ dtag_dvb_country_availability = 0x49,
++ dtag_dvb_linkage = 0x4a,
++ dtag_dvb_nvod_reference = 0x4b,
++ dtag_dvb_time_shifted_service = 0x4c,
++ dtag_dvb_short_event = 0x4d,
++ dtag_dvb_extended_event = 0x4e,
++ dtag_dvb_time_shifted_event = 0x4f,
++ dtag_dvb_component = 0x50,
++ dtag_dvb_mosaic = 0x51,
++ dtag_dvb_stream_identifier = 0x52,
++ dtag_dvb_ca_identifier = 0x53,
++ dtag_dvb_content = 0x54,
++ dtag_dvb_parental_rating = 0x55,
++ dtag_dvb_teletext = 0x56,
++ dtag_dvb_telephone = 0x57,
++ dtag_dvb_local_time_offset = 0x58,
++ dtag_dvb_subtitling = 0x59,
++ dtag_dvb_terrestial_delivery_system = 0x5a,
++ dtag_dvb_multilingual_network_name = 0x5b,
++ dtag_dvb_multilingual_bouquet_name = 0x5c,
++ dtag_dvb_multilingual_service_name = 0x5d,
++ dtag_dvb_multilingual_component = 0x5e,
++ dtag_dvb_private_data_specifier = 0x5f,
++ dtag_dvb_service_move = 0x60,
++ dtag_dvb_short_smoothing_buffer = 0x61,
++ dtag_dvb_frequency_list = 0x62,
++ dtag_dvb_partial_transport_stream = 0x63,
++ dtag_dvb_data_broadcast = 0x64,
++ dtag_dvb_scrambling = 0x65,
++ dtag_dvb_data_broadcast_id = 0x66,
++ dtag_dvb_transport_stream = 0x67,
++ dtag_dvb_dsng = 0x68,
++ dtag_dvb_pdc = 0x69,
++ dtag_dvb_ac3 = 0x6a,
++ dtag_dvb_ancillary_data = 0x6b,
++ dtag_dvb_cell_list = 0x6c,
++ dtag_dvb_cell_frequency_link = 0x6d,
++ dtag_dvb_announcement_support = 0x6e,
++ dtag_dvb_application_signalling = 0x6f,
++ dtag_dvb_adaptation_field_data = 0x70,
++ dtag_dvb_service_identifier = 0x71,
++ dtag_dvb_service_availability = 0x72,
++ dtag_dvb_default_authority = 0x73,
++ dtag_dvb_related_content = 0x74,
++ dtag_dvb_tva_id = 0x75,
++ dtag_dvb_content_identifier = 0x76,
++ dtag_dvb_time_slice_fec_identifier = 0x77,
++ dtag_dvb_ecm_repetition_rate = 0x78,
++ dtag_dvb_s2_satellite_delivery_descriptor= 0x79,
++ dtag_dvb_enhanced_ac3_descriptor = 0x7a,
++ dtag_dvb_dts_descriptor = 0x7b,
++ dtag_dvb_aac_descriptor = 0x7c,
++ dtag_dvb_extension_descriptor = 0x7f,
++
++ /* descriptors which may only appear in an RNT */
++ dtag_dvb_rnt_rar_over_dvb_stream = 0x40,
++ dtag_dvb_rnt_rar_over_ip = 0x41,
++ dtag_dvb_rnt_rnt_scan = 0x42,
++
++ /* descriptors which may only appear in an AIT */
++ dtag_dvb_ait_application = 0x00,
++ dtag_dvb_ait_application_name = 0x01,
++ dtag_dvb_ait_transport_protocol = 0x02,
++ dtag_dvb_ait_dvb_j_application = 0x03,
++ dtag_dvb_ait_dvb_j_application_location = 0x04,
++ dtag_dvb_ait_external_application_authorisation = 0x05,
++ dtag_dvb_ait_dvb_html_application = 0x08,
++ dtag_dvb_ait_dvb_html_application_location = 0x09,
++ dtab_dvb_ait_dvb_html_application_boundary = 0x0a,
++ dtag_dvb_ait_application_icons = 0x0b,
++ dtag_dvb_ait_prefetch = 0x0c,
++ dtag_dvb_ait_dii_location = 0x0d,
++ dtag_dvb_ait_ip_signalling = 0x11,
++
++ /* descriptors which may only appear in INT */
++ dtag_dvb_target_ip_address = 0x09,
++ dtag_dvb_target_ipv6_address = 0x0a,
++ dtag_dvb_ip_mac_platform_name = 0x0c,
++ dtag_dvb_ip_mac_platform_provider_name = 0x0d,
++ dtag_dvb_target_ip_slash = 0x0f,
++ dtag_dvb_target_ip_source_slash = 0x10,
++ dtag_dvb_target_ipv6_slash = 0x11,
++ dtag_dvb_target_ipv6_source_slash = 0x12,
++ dtag_dvb_ip_mac_stream_location = 0x13,
++
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dit_section.c dvb-apps/lib/libucsi/dvb/dit_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dit_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/dit_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,32 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/dit_section.h>
++
++struct dvb_dit_section * dvb_dit_section_codec(struct section * section)
++{
++ struct dvb_dit_section * ret = (struct dvb_dit_section *)section;
++
++ if (section->length < 1)
++ return NULL;
++
++ return ret;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dit_section.h dvb-apps/lib/libucsi/dvb/dit_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dit_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/dit_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,54 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_DIT_SECTION_H
++#define _UCSI_DVB_DIT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * dvb_dit_section structure.
++ */
++struct dvb_dit_section {
++ struct section head;
++
++ EBIT2(uint8_t transition_flag : 1; ,
++ uint8_t reserved : 7; );
++};
++
++/**
++ * Process a dvb_dit_section.
++ *
++ * @param section Pointer to a generic section header.
++ * @return Pointer to a dvb_dit_section, or NULL on error.
++ */
++struct dvb_dit_section * dvb_dit_section_codec(struct section *section);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dsng_descriptor.h dvb-apps/lib/libucsi/dvb/dsng_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/dsng_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/dsng_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,80 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_DSNG_DESCRIPTOR
++#define _UCSI_DVB_DSNG_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_dsng_descriptor structure.
++ */
++struct dvb_dsng_descriptor {
++ struct descriptor d;
++
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_dsng_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to a dvb_dsng_descriptor, or NULL on error.
++ */
++static inline struct dvb_dsng_descriptor*
++ dvb_dsng_descriptor_codec(struct descriptor* d)
++{
++ return (struct dvb_dsng_descriptor*) d;
++}
++
++/**
++ * Accessor for the data field in a dvb_dsng_descriptor.
++ *
++ * @param d dvb_dsng_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *dvb_dsng_descriptor_data(struct dvb_dsng_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_dsng_descriptor);
++}
++
++/**
++ * Determine the length of the data field in a dvb_dsng_descriptor.
++ *
++ * @param d dvb_dsng_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int dvb_dsng_descriptor_data_length(struct dvb_dsng_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/eit_section.c dvb-apps/lib/libucsi/dvb/eit_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/eit_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/eit_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,63 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/eit_section.h>
++
++struct dvb_eit_section *dvb_eit_section_codec(struct section_ext * ext)
++{
++ uint8_t * buf = (uint8_t *) ext;
++ size_t pos = sizeof(struct section_ext);
++ size_t len = section_ext_length(ext);
++
++ if (len < sizeof(struct dvb_eit_section))
++ return NULL;
++
++ bswap16(buf + pos);
++ pos += 2;
++ bswap16(buf + pos);
++ pos += 4;
++
++ while (pos < len) {
++ struct dvb_eit_event * event =
++ (struct dvb_eit_event *) (buf + pos);
++
++ if ((pos + sizeof(struct dvb_eit_event)) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++ bswap16(buf + pos + 10);
++
++ pos += sizeof(struct dvb_eit_event);
++
++ if ((pos + event->descriptors_loop_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, event->descriptors_loop_length))
++ return NULL;
++
++ pos += event->descriptors_loop_length;
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return (struct dvb_eit_section *) ext;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/eit_section.h dvb-apps/lib/libucsi/dvb/eit_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/eit_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/eit_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,160 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_EIT_SECTION_H
++#define _UCSI_DVB_EIT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++#include <libucsi/dvb/types.h>
++
++
++/**
++ * dvb_eit_section structure.
++ */
++struct dvb_eit_section {
++ struct section_ext head;
++
++ uint16_t transport_stream_id;
++ uint16_t original_network_id;
++ uint8_t segment_last_section_number;
++ uint8_t last_table_id;
++ /* struct eit_event events[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the events field of a dvb_eit_section.
++ */
++struct dvb_eit_event {
++ uint16_t event_id;
++ dvbdate_t start_time;
++ dvbduration_t duration;
++ EBIT3(uint16_t running_status : 3; ,
++ uint16_t free_ca_mode : 1; ,
++ uint16_t descriptors_loop_length:12; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_eit_section.
++ *
++ * @param section Pointer to a generic section_ext structure.
++ * @return Pointer to a dvb_eit_section, or NULL on error.
++ */
++struct dvb_eit_section *dvb_eit_section_codec(struct section_ext *section);
++
++/**
++ * Accessor for the service_id field of an EIT.
++ *
++ * @param eit EIT pointer.
++ * @return The service_id.
++ */
++static inline uint16_t dvb_eit_section_service_id(struct dvb_eit_section *eit)
++{
++ return eit->head.table_id_ext;
++}
++
++/**
++ * Iterator for the events field of a dvb_eit_section.
++ *
++ * @param eit dvb_eit_section pointer.
++ * @param pos Variable containing a pointer to the current dvb_eit_event.
++ */
++#define dvb_eit_section_events_for_each(eit, pos) \
++ for ((pos) = dvb_eit_section_events_first(eit); \
++ (pos); \
++ (pos) = dvb_eit_section_events_next(eit, pos))
++
++/**
++ * Iterator for the descriptors field of a dvb_eit_event.
++ *
++ * @param eit dvb_eit_event pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define dvb_eit_event_descriptors_for_each(event, pos) \
++ for ((pos) = dvb_eit_event_descriptors_first(event); \
++ (pos); \
++ (pos) = dvb_eit_event_descriptors_next(event, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_eit_event *
++ dvb_eit_section_events_first(struct dvb_eit_section *eit)
++{
++ size_t pos = sizeof(struct dvb_eit_section);
++
++ if (pos >= section_ext_length(&eit->head))
++ return NULL;
++
++ return (struct dvb_eit_event*) ((uint8_t *) eit + pos);
++}
++
++static inline struct dvb_eit_event *
++ dvb_eit_section_events_next(struct dvb_eit_section *eit,
++ struct dvb_eit_event *pos)
++{
++ uint8_t *end = (uint8_t*) eit + section_ext_length(&eit->head);
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_eit_event) +
++ pos->descriptors_loop_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_eit_event *) next;
++}
++
++static inline struct descriptor *
++ dvb_eit_event_descriptors_first(struct dvb_eit_event * t)
++{
++ if (t->descriptors_loop_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) t + sizeof(struct dvb_eit_event));
++}
++
++static inline struct descriptor *
++ dvb_eit_event_descriptors_next(struct dvb_eit_event * t,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) t + sizeof(struct dvb_eit_event),
++ t->descriptors_loop_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/extended_event_descriptor.h dvb-apps/lib/libucsi/dvb/extended_event_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/extended_event_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/extended_event_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,232 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_EXTENDED_EVENT_DESCRIPTOR
++#define _UCSI_DVB_EXTENDED_EVENT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_extended_event_descriptor structure.
++ */
++struct dvb_extended_event_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t descriptor_number : 4; ,
++ uint8_t last_descriptor_number : 4; );
++ iso639lang_t language_code;
++ uint8_t length_of_items;
++ /* struct dvb_extended_event_item items[] */
++ /* struct dvb_extended_event_descriptor_part2 part2 */
++} __ucsi_packed;
++
++/**
++ * An entry in the items field of a dvb_extended_event_descriptor.
++ */
++struct dvb_extended_event_item {
++ uint8_t item_description_length;
++ /* uint8_t item_description[] */
++ /* struct dvb_extended_event_item_part2 part2 */
++} __ucsi_packed;
++
++/**
++ * The second part of a dvb_extended_event_item, following the variable length
++ * description field.
++ */
++struct dvb_extended_event_item_part2 {
++ uint8_t item_length;
++ /* uint8_t item[] */
++} __ucsi_packed;
++
++/**
++ * The second part of a dvb_extended_event_descriptor, following the variable
++ * length items field.
++ */
++struct dvb_extended_event_descriptor_part2 {
++ uint8_t text_length;
++ /* uint8_t text[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_extended_event_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_extended_event_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_extended_event_descriptor*
++ dvb_extended_event_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++ struct dvb_extended_event_descriptor * p =
++ (struct dvb_extended_event_descriptor *) d;
++ struct dvb_extended_event_descriptor_part2 *p2;
++
++ pos += sizeof(struct dvb_extended_event_descriptor) - 2;
++
++ if (pos > len)
++ return NULL;
++
++ pos += p->length_of_items;
++
++ if (pos > len)
++ return NULL;
++
++ p2 = (struct dvb_extended_event_descriptor_part2*) (buf+pos);
++
++ pos += sizeof(struct dvb_extended_event_descriptor_part2);
++
++ if (pos > len)
++ return NULL;
++
++ pos += p2->text_length;
++
++ if (pos != len)
++ return NULL;
++
++ return p;
++}
++
++/**
++ * Iterator for the items field of a dvb_extended_event_descriptor.
++ *
++ * @param d dvb_extended_event_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_extended_event_item.
++ */
++#define dvb_extended_event_descriptor_items_for_each(d, pos) \
++ for ((pos) = dvb_extended_event_descriptor_items_first(d); \
++ (pos); \
++ (pos) = dvb_extended_event_descriptor_items_next(d, pos))
++
++/**
++ * Accessor for the description field of a dvb_extended_event_item.
++ *
++ * @param d dvb_extended_event_item pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ dvb_extended_event_item_description(struct dvb_extended_event_item *d)
++{
++ return (uint8_t*) d + sizeof(struct dvb_extended_event_item);
++}
++
++/**
++ * Accessor for the second part of a dvb_extended_event_item.
++ *
++ * @param dvb_extended_event_item pointer.
++ * @return dvb_extended_event_item_part2 pointer.
++ */
++static inline struct dvb_extended_event_item_part2*
++ dvb_extended_event_item_part2(struct dvb_extended_event_item *d)
++{
++ return (struct dvb_extended_event_item_part2*)
++ ((uint8_t*) d + sizeof(struct dvb_extended_event_item) +
++ d->item_description_length);
++}
++
++/**
++ * Accessor for the item field of a dvb_extended_event_item_part2.
++ *
++ * @param d dvb_extended_event_item_part2 pointer.
++ * @return Pointer to the item field.
++ */
++static inline uint8_t*
++ dvb_extended_event_item_part2_item(struct dvb_extended_event_item_part2 *d)
++{
++ return (uint8_t*) d + sizeof(struct dvb_extended_event_item_part2);
++}
++
++/**
++ * Accessor for the second part of a dvb_extended_event_descriptor.
++ *
++ * @param d dvb_extended_event_descriptor pointer.
++ * @return dvb_extended_event_descriptor_part2 pointer.
++ */
++static inline struct dvb_extended_event_descriptor_part2*
++ dvb_extended_event_descriptor_part2(struct dvb_extended_event_descriptor *d)
++{
++ return (struct dvb_extended_event_descriptor_part2*)
++ ((uint8_t*) d + sizeof(struct dvb_extended_event_descriptor) +
++ d->length_of_items);
++}
++
++/**
++ * Accessor for the text field of an dvb_extended_event_descriptor_part2.
++ *
++ * @param d dvb_extended_event_descriptor_part2 pointer.
++ * @return Pointer to the text field.
++ */
++static inline uint8_t*
++ dvb_extended_event_descriptor_part2_text(struct dvb_extended_event_descriptor_part2 *d)
++{
++ return (uint8_t*)
++ ((uint8_t*) d + sizeof(struct dvb_extended_event_descriptor_part2));
++}
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_extended_event_item*
++ dvb_extended_event_descriptor_items_first(struct dvb_extended_event_descriptor *d)
++{
++ if (d->length_of_items == 0)
++ return NULL;
++
++ return (struct dvb_extended_event_item *)
++ ((uint8_t*) d + sizeof(struct dvb_extended_event_descriptor));
++}
++
++static inline struct dvb_extended_event_item*
++ dvb_extended_event_descriptor_items_next(struct dvb_extended_event_descriptor *d,
++ struct dvb_extended_event_item *pos)
++{
++ struct dvb_extended_event_item_part2* part2 =
++ dvb_extended_event_item_part2(pos);
++ uint8_t *end = (uint8_t*) d + sizeof(struct dvb_extended_event_descriptor) + d->length_of_items;
++ uint8_t *next = (uint8_t *) part2 +
++ sizeof(struct dvb_extended_event_item_part2) +
++ part2->item_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_extended_event_item *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/frequency_list_descriptor.h dvb-apps/lib/libucsi/dvb/frequency_list_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/frequency_list_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/frequency_list_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,107 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_FREQUENCY_LIST_DESCRIPTOR
++#define _UCSI_DVB_FREQUENCY_LIST_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Possible values for coding_type.
++ */
++enum {
++ DVB_CODING_TYPE_SATELLITE = 0x01,
++ DVB_CODING_TYPE_CABLE = 0x02,
++ DVB_CODING_TYPE_TERRESTRIAL = 0x03,
++};
++
++/**
++ * dvb_frequency_list_descriptor structure.
++ */
++struct dvb_frequency_list_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t reserved : 6; ,
++ uint8_t coding_type : 2; );
++ /* uint32_t centre_frequencies [] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_frequency_list_descriptor.
++ *
++ * @param d Pointer to a generic descriptor structure.
++ * @return dvb_frequency_list_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_frequency_list_descriptor*
++ dvb_frequency_list_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t len = d->len;
++
++ pos += sizeof(struct dvb_frequency_list_descriptor) - 2;
++
++ if ((len - pos) % 4)
++ return NULL;
++
++ while(pos < len) {
++ bswap32(buf+pos);
++ pos += 4;
++ }
++
++ return (struct dvb_frequency_list_descriptor*) d;
++}
++
++/**
++ * Accessor for the centre_frequencies field of a dvb_frequency_list_descriptor.
++ *
++ * @param d dvb_frequency_list_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint32_t *
++ dvb_frequency_list_descriptor_centre_frequencies(struct dvb_frequency_list_descriptor *d)
++{
++ return (uint32_t *) ((uint8_t *) d + sizeof(struct dvb_frequency_list_descriptor));
++}
++
++/**
++ * Determine the number of entries in the centre_frequencies field of a dvb_frequency_list_descriptor.
++ *
++ * @param d dvb_frequency_list_descriptor pointer.
++ * @return The number of entries.
++ */
++static inline int
++ dvb_frequency_list_descriptor_centre_frequencies_count(struct dvb_frequency_list_descriptor *d)
++{
++ return (d->d.len - 1) >> 2;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/int_section.c dvb-apps/lib/libucsi/dvb/int_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/int_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/int_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,79 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2005 Patrick Boettcher (pb@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/int_section.h>
++
++struct dvb_int_section * dvb_int_section_codec(struct section_ext *ext)
++{
++ uint8_t *buf = (uint8_t *) ext;
++ struct dvb_int_section *in = (struct dvb_int_section *) ext;
++ size_t pos = sizeof(struct section_ext);
++ size_t len = section_ext_length(ext);
++
++ if (len < sizeof(struct dvb_int_section))
++ return NULL;
++
++ bswap32(buf+8);
++ bswap16(buf+12);
++ pos += 6;
++
++ if (len - pos < in->platform_descriptors_length)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, in->platform_descriptors_length))
++ return NULL;
++
++ pos += in->platform_descriptors_length;
++
++ while (pos < len) {
++ struct dvb_int_target *s2 = (struct dvb_int_target *) (buf + pos);
++ struct dvb_int_operational_loop *s3;
++
++ bswap16(buf + pos); /* target_descriptor_loop_length swap */
++
++ if (len - pos < s2->target_descriptors_length)
++ return NULL;
++
++ pos += sizeof(struct dvb_int_target);
++
++ if (verify_descriptors(buf + pos, s2->target_descriptors_length))
++ return NULL;
++
++ pos += s2->target_descriptors_length;
++
++ s3 = (struct dvb_int_operational_loop *) (buf + pos);
++
++ bswap16(buf + pos); /* operational_descriptor_loop_length swap */
++
++ if (len - pos < s3->operational_descriptors_length)
++ return NULL;
++
++ pos += sizeof(struct dvb_int_operational_loop);
++
++ if (verify_descriptors(buf + pos, s3->operational_descriptors_length))
++ return NULL;
++
++ pos += s3->operational_descriptors_length;
++ }
++
++ return (struct dvb_int_section *) ext;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/int_section.h dvb-apps/lib/libucsi/dvb/int_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/int_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/int_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,245 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2005 Patrick Boettcher (pb@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++#ifndef _UCSI_DVB_INT_SECTION_H
++#define _UCSI_DVB_INT_SECTION_H
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * dvb_int_section structure - IP/MAC notification section.
++ */
++struct dvb_int_section {
++ struct section_ext head;
++
++ EBIT2(uint32_t platform_id :24; ,
++ uint32_t processing_order : 8; );
++ EBIT2(uint16_t reserved2 : 4; ,
++ uint16_t platform_descriptors_length :12; );
++ /* struct descriptor platform_descriptors[] */
++ /* struct dvb_int_target target_loop[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the target_loop field of a dvb_int_section.
++ */
++struct dvb_int_target {
++ EBIT2(uint16_t reserved3 : 4; ,
++ uint16_t target_descriptors_length :12; );
++ /* struct descriptor target_descriptors[] */
++ /* struct dvb_int_operational_loop operational_loop */
++} __ucsi_packed;
++
++/**
++ * The operational_loop field in a dvb_int_target.
++ */
++struct dvb_int_operational_loop {
++ EBIT2(uint16_t reserved4 : 4; ,
++ uint16_t operational_descriptors_length :12; );
++ /* struct descriptor operational_descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_int_section.
++ *
++ * @param section Generic section_ext pointer.
++ * @return dvb_int_section pointer, or NULL on error.
++ */
++extern struct dvb_int_section * dvb_int_section_codec(struct section_ext *section);
++
++/**
++ * Accessor for the action_type field of an INT.
++ *
++ * @param intp INT pointer.
++ * @return The action_type.
++ */
++static inline uint8_t dvb_int_section_action_type(struct dvb_int_section *intp)
++{
++ return intp->head.table_id_ext >> 8;
++}
++
++/**
++ * Accessor for the platform_id_hash field of an INT.
++ *
++ * @param intp INT pointer.
++ * @return The platform_id_hash.
++ */
++static inline uint8_t dvb_int_section_platform_id_hash(struct dvb_int_section *intp)
++{
++ return intp->head.table_id_ext & 0xff;
++}
++
++/**
++ * Iterator for platform_descriptors field in a dvb_int_section.
++ *
++ * @param intp dvb_int_section pointer.
++ * @param pos Variable holding a pointer to the current descriptor.
++ */
++#define dvb_int_section_platform_descriptors_for_each(intp, pos) \
++ for ((pos) = dvb_int_section_platform_descriptors_first(intp); \
++ (pos); \
++ (pos) = dvb_int_section_platform_descriptors_next(intp, pos))
++
++/**
++ * Iterator for the target_loop field in a dvb_int_section.
++ *
++ * @param intp dvb_int_section pointer.
++ * @param pos Variable holding a pointer to the current dvb_int_target.
++ */
++#define dvb_int_section_target_loop_for_each(intp,pos) \
++ for ((pos) = dvb_int_section_target_loop_first(intp); \
++ (pos); \
++ (pos) = dvb_int_section_target_loop_next(intp, pos))
++
++/**
++ * Iterator for the target_descriptors field in a dvb_int_target.
++ *
++ * @param target dvb_int_target pointer.
++ * @param pos Variable holding a pointer to the current descriptor.
++ */
++#define dvb_int_target_target_descriptors_for_each(target, pos) \
++ for ((pos) = dvb_int_target_target_descriptors_first(target); \
++ (pos); \
++ (pos) = dvb_int_target_target_descriptors_next(target, pos))
++
++/**
++ * Accessor for the operational_loop field of a dvb_int_target.
++ *
++ * @param target dvb_int_target pointer.
++ * @return Pointer to a dvb_int_operational_loop.
++ */
++static inline struct dvb_int_operational_loop *
++ dvb_int_target_operational_loop(struct dvb_int_target *target)
++{
++ return (struct dvb_int_operational_loop *)
++ ((uint8_t *) target + sizeof(struct dvb_int_target) + target->target_descriptors_length);
++}
++
++/**
++ * Iterator for the operational_descriptors field in a dvb_int_operational_loop.
++ *
++ * @param oploop dvb_int_operational_loop pointer.
++ * @param pos Variable holding a pointer to the current descriptor.
++ */
++#define dvb_int_operational_loop_operational_descriptors_for_each(oploop, pos) \
++ for ((pos) = dvb_int_operational_loop_operational_descriptors_first(oploop); \
++ (pos); \
++ (pos) = dvb_int_operational_loop_operational_descriptors_next(oploop, pos))
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct descriptor *
++ dvb_int_section_platform_descriptors_first(struct dvb_int_section *in)
++{
++ if (in->platform_descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) in + sizeof(struct dvb_int_section));
++}
++
++static inline struct descriptor *
++ dvb_int_section_platform_descriptors_next(struct dvb_int_section *in,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) in + sizeof(struct dvb_int_section),
++ in->platform_descriptors_length,
++ pos);
++}
++
++static inline struct dvb_int_target *
++ dvb_int_section_target_loop_first(struct dvb_int_section *in)
++{
++ if (sizeof(struct dvb_int_section) + in->platform_descriptors_length >= (uint32_t) section_ext_length((struct section_ext *) in))
++ return NULL;
++
++ return (struct dvb_int_target *)
++ ((uint8_t *) in + sizeof(struct dvb_int_section) + in->platform_descriptors_length);
++}
++
++static inline struct dvb_int_target *
++ dvb_int_section_target_loop_next(struct dvb_int_section *in,
++ struct dvb_int_target *pos)
++{
++ struct dvb_int_operational_loop *ol = dvb_int_target_operational_loop(pos);
++ struct dvb_int_target *next =
++ (struct dvb_int_target *) ( (uint8_t *) pos +
++ sizeof(struct dvb_int_target) + pos->target_descriptors_length +
++ sizeof(struct dvb_int_operational_loop) + ol->operational_descriptors_length);
++ struct dvb_int_target *end =
++ (struct dvb_int_target *) ((uint8_t *) in + section_ext_length((struct section_ext *) in) );
++
++ if (next >= end)
++ return 0;
++ return next;
++}
++
++static inline struct descriptor *
++ dvb_int_target_target_descriptors_first(struct dvb_int_target *tl)
++{
++ if (tl->target_descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) tl + sizeof(struct dvb_int_target));
++}
++
++static inline struct descriptor *
++ dvb_int_target_target_descriptors_next(struct dvb_int_target *tl,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) tl + sizeof(struct dvb_int_target),
++ tl->target_descriptors_length,
++ pos);
++}
++
++static inline struct descriptor *
++ dvb_int_operational_loop_operational_descriptors_first(struct dvb_int_operational_loop *ol)
++{
++ if (ol->operational_descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) ol + sizeof(struct dvb_int_operational_loop));
++}
++
++static inline struct descriptor *
++ dvb_int_operational_loop_operational_descriptors_next(struct dvb_int_operational_loop *ol,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) ol + sizeof(struct dvb_int_operational_loop),
++ ol->operational_descriptors_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_platform_name_descriptor.h dvb-apps/lib/libucsi/dvb/ip_mac_platform_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_platform_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ip_mac_platform_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,87 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_IP_MAC_PLATFORM_NAME_DESCRIPTOR
++#define _UCSI_DVB_IP_MAC_PLATFORM_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_ip_platform_name_descriptor structure.
++ */
++struct dvb_ip_platform_name_descriptor {
++ struct descriptor d;
++
++ iso639lang_t language_code;
++ /* uint8_t text[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ip_platform_name_descriptor.
++ *
++ * @param d Pointer to a generic descriptor.
++ * @return dvb_ip_platform_name_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ip_platform_name_descriptor*
++ dvb_ip_platform_name_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct dvb_ip_platform_name_descriptor) - 2))
++ return NULL;
++
++ return (struct dvb_ip_platform_name_descriptor*) d;
++}
++
++/**
++ * Accessor for the text field of a dvb_ip_platform_name_descriptor.
++ *
++ * @param d dvb_ip_platform_name_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_ip_platform_name_descriptor_text(struct dvb_ip_platform_name_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_ip_platform_name_descriptor);
++}
++
++/**
++ * Determine the length of the text field of a dvb_ip_platform_name_descriptor.
++ *
++ * @param d dvb_ip_platform_name_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_ip_platform_name_descriptor_text_length(struct dvb_ip_platform_name_descriptor *d)
++{
++ return d->d.len - 3;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h dvb-apps/lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ip_mac_platform_provider_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,87 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_IP_MAC_PLATFORM_PROVIDER_NAME_DESCRIPTOR
++#define _UCSI_DVB_IP_MAC_PLATFORM_PROVIDER_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_ip_platform_provider_name_descriptor structure.
++ */
++struct dvb_ip_platform_provider_name_descriptor {
++ struct descriptor d;
++
++ iso639lang_t language_code;
++ /* uint8_t text[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ip_platform_provider_name_descriptor.
++ *
++ * @param d Pointer to a generic descriptor.
++ * @return dvb_ip_platform_provider_name_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ip_platform_provider_name_descriptor*
++ dvb_ip_platform_provider_name_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct dvb_ip_platform_provider_name_descriptor) - 2))
++ return NULL;
++
++ return (struct dvb_ip_platform_provider_name_descriptor*) d;
++}
++
++/**
++ * Accessor for the text field of a dvb_ip_platform_provider_name_descriptor.
++ *
++ * @param d dvb_ip_platform_provider_name_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_ip_platform_provider_name_descriptor_text(struct dvb_ip_platform_provider_name_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_ip_platform_provider_name_descriptor);
++}
++
++/**
++ * Determine the length of the text field of a dvb_ip_platform_provider_name_descriptor.
++ *
++ * @param d dvb_ip_platform_provider_name_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_ip_platform_provider_name_descriptor_text_length(struct dvb_ip_platform_provider_name_descriptor *d)
++{
++ return d->d.len - 3;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_stream_location_descriptor.h dvb-apps/lib/libucsi/dvb/ip_mac_stream_location_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/ip_mac_stream_location_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/ip_mac_stream_location_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,73 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_IP_MAC_STREAM_LOCATION_DESCRIPTOR
++#define _UCSI_DVB_IP_MAC_PLATFORM_PROVIDER_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_ip_mac_stream_location_descriptor structure.
++ */
++struct dvb_ip_mac_stream_location_descriptor {
++ struct descriptor d;
++
++ uint16_t network_id;
++ uint16_t original_network_id;
++ uint16_t transport_stream_id;
++ uint16_t service_id;
++ uint8_t component_tag;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_ip_mac_stream_location_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_ip_mac_stream_location_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_ip_mac_stream_location_descriptor*
++ dvb_ip_mac_stream_location_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++
++ if (d->len != (sizeof(struct dvb_ip_mac_stream_location_descriptor) - 2))
++ return NULL;
++
++ bswap16(buf);
++ bswap16(buf+2);
++ bswap16(buf+4);
++ bswap16(buf+6);
++
++ return (struct dvb_ip_mac_stream_location_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/linkage_descriptor.h dvb-apps/lib/libucsi/dvb/linkage_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/linkage_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/linkage_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,480 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_LINKAGE_DESCRIPTOR
++#define _UCSI_DVB_LINKAGE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * Possible values for linkage_type.
++ */
++enum {
++ DVB_LINKAGE_TYPE_INFORMATION = 0x01,
++ DVB_LINKAGE_TYPE_EPG = 0x02,
++ DVB_LINKAGE_TYPE_CA_REPLACEMENT = 0x03,
++ DVB_LINKAGE_TYPE_TS_WITH_BAT_NIT = 0x04,
++ DVB_LINKAGE_TYPE_SERVICE_REPLACMENT = 0x05,
++ DVB_LINKAGE_TYPE_DATA_BCAST = 0x06,
++ DVB_LINKAGE_TYPE_RCS_MAP = 0x07,
++ DVB_LINKAGE_TYPE_MOBILE_HANDOVER = 0x08,
++ DVB_LINKAGE_TYPE_SOFTWARE_UPDATE = 0x09,
++ DVB_LINKAGE_TYPE_TS_WITH_SSU_BAT_NIT = 0x0a,
++ DVB_LINKAGE_TYPE_IP_MAC_NOTIFICATION = 0x0b,
++ DVB_LINKAGE_TYPE_TS_WITH_INT_BAT_NIT = 0x0c,
++};
++
++/**
++ * Possible values for hand_over_type.
++ */
++enum {
++ DVB_HAND_OVER_TYPE_IDENTICAL_NEIGHBOURING_COUNTRY = 0x01,
++ DVB_HAND_OVER_TYPE_LOCAL_VARIATION = 0x02,
++ DVB_HAND_OVER_TYPE_ASSOCIATED_SERVICE = 0x03,
++};
++
++/**
++ * Possible values for origin_type.
++ */
++enum {
++ DVB_ORIGIN_TYPE_NIT = 0x00,
++ DVB_ORIGIN_TYPE_SDT = 0x01,
++};
++
++/**
++ * dvb_linkage_descriptor structure.
++ */
++struct dvb_linkage_descriptor {
++ struct descriptor d;
++
++ uint16_t transport_stream_id;
++ uint16_t original_network_id;
++ uint16_t service_id;
++ uint8_t linkage_type;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Data for a linkage_type of 0x08.
++ */
++struct dvb_linkage_data_08 {
++ EBIT3(uint8_t hand_over_type : 4; ,
++ uint8_t reserved : 3; ,
++ uint8_t origin_type : 1; );
++ /* uint16_t network_id if hand_over_type == 1,2,3 */
++ /* uint16_t initial_service_id if origin_type = 0 */
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Data for an linkage_type of 0x0b (IP/MAC Notification Table).
++ */
++struct dvb_linkage_data_0b {
++ uint8_t platform_id_data_length;
++ /* struct platform_id ids[] */
++} __ucsi_packed;
++
++/**
++ * Entries in the ids field of a dvb_linkage_data_0b.
++ */
++struct dvb_platform_id {
++ EBIT2(uint32_t platform_id : 24; ,
++ uint8_t platform_name_loop_length : 8; );
++ /* struct platform_name names[] */
++} __ucsi_packed;
++
++/**
++ * Entries in the names field of a dvb_platform_id.
++ */
++struct dvb_platform_name {
++ iso639lang_t language_code;
++ uint8_t platform_name_length;
++ /* uint8_t text[] */
++} __ucsi_packed;
++
++/**
++ * Data for a linkage_type of 0x0c (IP/MAC Notification Table).
++ */
++struct dvb_linkage_data_0c {
++ uint8_t table_type;
++ /* uint16_t bouquet_id if table_type == 0x02 */
++} __ucsi_packed;
++
++
++/**
++ * Process a dvb_linkage_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_linkage_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_linkage_descriptor*
++ dvb_linkage_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t len = d->len;
++ struct dvb_linkage_descriptor *p =
++ (struct dvb_linkage_descriptor*) d;
++
++ if (len < (sizeof(struct dvb_linkage_descriptor) - 2))
++ return NULL;
++
++ bswap16(buf);
++ bswap16(buf+2);
++ bswap16(buf+4);
++
++ pos += sizeof(struct dvb_linkage_descriptor) - 2;
++
++ if (p->linkage_type == 0x08) {
++ struct dvb_linkage_data_08 *d08;
++
++ if ((len - pos) < sizeof(struct dvb_linkage_data_08))
++ return NULL;
++ d08 = (struct dvb_linkage_data_08 *) (buf+pos);
++ pos += sizeof(struct dvb_linkage_data_08);
++
++ switch(d08->hand_over_type) {
++ case 1:
++ case 2:
++ case 3:
++ if ((len - pos) < 2)
++ return NULL;
++ bswap16(buf+pos);
++ pos += 2;
++ break;
++ }
++ if (d08->origin_type == 0) {
++ if ((len - pos) < 2)
++ return NULL;
++ bswap16(buf+pos);
++ pos+=2;
++ }
++
++ } else if (p->linkage_type == 0x0b) {
++ uint32_t pos2=0;
++ struct dvb_linkage_data_0b *l_0b = (struct dvb_linkage_data_0b *) (buf + pos);
++
++ if ((len - pos) < sizeof(struct dvb_linkage_data_0b))
++ return NULL;
++
++ pos += sizeof(struct dvb_linkage_data_0b);
++ if ((len - pos) < l_0b->platform_id_data_length)
++ return NULL;
++
++ while (pos2 < l_0b->platform_id_data_length) {
++ bswap32(buf + pos + pos2);
++
++ struct dvb_platform_id *p_id = (struct dvb_platform_id *) (buf + pos + pos2);
++ if ((len - pos - pos2) < p_id->platform_name_loop_length)
++ return NULL;
++
++ pos2 += sizeof(struct dvb_platform_id) + p_id->platform_name_loop_length;
++ }
++
++ pos += pos2;
++ } else if (p->linkage_type == 0x0c) {
++ struct dvb_linkage_data_0c *l_0c = (struct dvb_linkage_data_0c *) (buf + pos);
++
++ if ((len - pos) < sizeof(struct dvb_linkage_data_0c))
++ return NULL;
++ pos += sizeof(struct dvb_linkage_data_0c);
++
++ if (l_0c->table_type == 0x02) {
++ if ((len - pos) < 2)
++ return NULL;
++ bswap16(buf+pos);
++ }
++ }
++
++ return (struct dvb_linkage_descriptor*) d;
++}
++
++/**
++ * Accessor for the data field of a dvb_linkage_descriptor.
++ *
++ * @param d dvb_linkage_descriptor pointer.
++ * @return Pointer to the data field.
++ */
++static inline uint8_t *
++ dvb_linkage_descriptor_data(struct dvb_linkage_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_linkage_descriptor);
++}
++
++/**
++ * Determine the length of the data field of a dvb_linkage_descriptor.
++ *
++ * @param d dvb_linkage_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_linkage_descriptor_data_length(struct dvb_linkage_descriptor *d)
++{
++ return d->d.len - 7;
++}
++
++/**
++ * Accessor for a dvb_linkage_data_08 pointer.
++ *
++ * @param d dvb_linkage_descriptor pointer.
++ * @return Pointer to the data field.
++ */
++static inline struct dvb_linkage_data_08 *
++ dvb_linkage_data_08(struct dvb_linkage_descriptor *d)
++{
++ if (d->linkage_type != 0x08)
++ return NULL;
++ return (struct dvb_linkage_data_08 *) dvb_linkage_descriptor_data(d);
++}
++
++/**
++ * Accessor for the network_id field of a dvb_linkage_data_08.
++ *
++ * @param d dvb_linkage_descriptor pointer
++ * @param d08 dvb_linkage_data_08 pointer.
++ * @return network_id, or -1 if not present
++ */
++static inline int
++ dvb_linkage_data_08_network_id(struct dvb_linkage_descriptor *d, struct dvb_linkage_data_08 *d08)
++{
++ if (d->linkage_type != 0x08)
++ return -1;
++
++ switch(d08->hand_over_type) {
++ case 1:
++ case 2:
++ case 3:
++ return *((uint16_t*) ((uint8_t*) d08 + sizeof(struct dvb_linkage_data_08)));
++ }
++
++ return -1;
++}
++
++/**
++ * Accessor for the initial_service_id field of a dvb_linkage_data_08.
++ *
++ * @param d dvb_linkage_descriptor pointer
++ * @param d08 dvb_linkage_data_08 pointer.
++ * @return initial_service_id, or -1 if not present
++ */
++static inline int
++ dvb_linkage_data_08_initial_service_id(struct dvb_linkage_descriptor *d, struct dvb_linkage_data_08 *d08)
++{
++ uint8_t *pos;
++
++ if (d->linkage_type != 0x08)
++ return -1;
++ if (d08->origin_type != 0)
++ return -1;
++
++ pos = ((uint8_t*) d08) + sizeof(struct dvb_linkage_data_08);
++ switch(d08->hand_over_type) {
++ case 1:
++ case 2:
++ case 3:
++ pos +=2;
++ break;
++ }
++
++ return *((uint16_t*) pos);
++}
++
++/**
++ * Accessor for the data field of a dvb_linkage_data_08.
++ *
++ * @param d dvb_linkage_descriptor pointer
++ * @param d08 dvb_linkage_data_08 pointer.
++ * @param length Pointer to int destination for data length.
++ * @return Pointer to the data field, or NULL if invalid
++ */
++static inline uint8_t *
++ dvb_linkage_data_08_data(struct dvb_linkage_descriptor *d, struct dvb_linkage_data_08 *d08, int *length)
++{
++ uint8_t *pos;
++ int used = 0;
++
++ if (d->linkage_type != 0x08) {
++ *length = 0;
++ return NULL;
++ }
++
++ pos = ((uint8_t*) d08) + sizeof(struct dvb_linkage_data_08);
++ switch(d08->hand_over_type) {
++ case 1:
++ case 2:
++ case 3:
++ pos += 2;
++ used += 2;
++ break;
++ }
++ if (d08->origin_type == 0) {
++ pos+=2;
++ used+=2;
++ }
++
++ *length = dvb_linkage_descriptor_data_length(d) - (sizeof(struct dvb_linkage_data_08) + used);
++ return pos;
++}
++
++/**
++ * Accessor for a dvb_linkage_data_0b pointer.
++ *
++ * @param d dvb_linkage_descriptor pointer.
++ * @return Pointer to the data field.
++ */
++static inline struct dvb_linkage_data_0b *
++ dvb_linkage_data_0b(struct dvb_linkage_descriptor *d)
++{
++ if (d->linkage_type != 0x0b)
++ return NULL;
++ return (struct dvb_linkage_data_0b *) dvb_linkage_descriptor_data(d);
++}
++
++/**
++ * Iterator for the platform_id field of a dvb_linkage_data_0b.
++ *
++ * @param linkage dvb_linkage_data_0b pointer.
++ * @param pos Variable containing a pointer to the current dvb_platform_id.
++ */
++#define dvb_linkage_data_0b_platform_id_for_each(linkage, pos) \
++ for ((pos) = dvb_platform_id_first(linkage); \
++ (pos); \
++ (pos) = dvb_platform_id_next(linkage, pos))
++
++/**
++ * Iterator for the platform_name field of a dvb_platform_id.
++ *
++ * @param platid dvb_platform_id pointer.
++ * @param pos Variable containing a pointer to the current dvb_platform_name.
++ */
++#define dvb_platform_id_platform_name_for_each(platid, pos) \
++ for ((pos) = dvb_platform_name_first(platid); \
++ (pos); \
++ (pos) = dvb_platform_name_next(platid, pos))
++
++/**
++ * Accessor for the text field of a dvb_platform_name.
++ *
++ * @param p dvb_platform_name pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_platform_name_text(struct dvb_platform_name *p)
++{
++ return (uint8_t *) p + sizeof(struct dvb_platform_name);
++}
++
++/**
++ * Accessor for a dvb_linkage_data_0c pointer.
++ *
++ * @param d dvb_linkage_descriptor pointer.
++ * @return Pointer to the data field.
++ */
++static inline struct dvb_linkage_data_0c *
++ dvb_linkage_data_0c(struct dvb_linkage_descriptor *d)
++{
++ if (d->linkage_type != 0x0c)
++ return NULL;
++ return (struct dvb_linkage_data_0c *) dvb_linkage_descriptor_data(d);
++}
++
++/**
++ * Accessor for the bouquet_id field of a dvb_linkage_data_0c if table_id == 0x02.
++ *
++ * @param l_0c dvb_linkage_data_0c pointer.
++ * @return The bouquet field, or -1 on error.
++ */
++static inline int
++ dvb_linkage_data_0c_bouquet_id(struct dvb_linkage_data_0c *l_0c)
++{
++ if (l_0c->table_type != 0x02)
++ return -1;
++
++ return *((uint16_t *) ((uint8_t*) l_0c + 1));
++}
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_platform_id *
++ dvb_platform_id_first(struct dvb_linkage_data_0b *d)
++{
++ if (d->platform_id_data_length == 0)
++ return NULL;
++
++ return (struct dvb_platform_id *) ((uint8_t *) d + sizeof(struct dvb_linkage_data_0b));
++}
++
++static inline struct dvb_platform_id *
++ dvb_platform_id_next(struct dvb_linkage_data_0b *d,
++ struct dvb_platform_id *pos)
++{
++ uint8_t *end = (uint8_t *) d + d->platform_id_data_length;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_platform_id) +
++ pos->platform_name_loop_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_platform_id *) next;
++}
++
++static inline struct dvb_platform_name *
++ dvb_platform_name_first(struct dvb_platform_id *p)
++{
++ if (p->platform_name_loop_length == 0)
++ return NULL;
++
++ return (struct dvb_platform_name *) ((uint8_t *) p + sizeof(struct dvb_platform_id));
++}
++
++static inline struct dvb_platform_name *
++ dvb_platform_name_next(struct dvb_platform_id *p,
++ struct dvb_platform_name *pos)
++{
++ uint8_t *end = (uint8_t *) p + p->platform_name_loop_length;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_platform_name) +
++ pos->platform_name_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_platform_name *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/local_time_offset_descriptor.h dvb-apps/lib/libucsi/dvb/local_time_offset_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/local_time_offset_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/local_time_offset_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,127 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_LOCAL_TIME_OFFSET_DESCRIPTOR
++#define _UCSI_DVB_LOCAL_TIME_OFFSET_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++#include <libucsi/dvb/types.h>
++
++/**
++ * dvb_local_time_offset_descriptor parameter.
++ */
++struct dvb_local_time_offset_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_local_time_offset offsets[] */
++} __ucsi_packed;
++
++/**
++ * Entry in the offsets field of dvb_local_time_offset_descriptor.
++ */
++struct dvb_local_time_offset {
++ iso639country_t country_code;
++ EBIT3(uint8_t country_region_id : 6; ,
++ uint8_t reserved : 1; ,
++ uint8_t local_time_offset_polarity : 1; );
++ dvbhhmm_t local_time_offset;
++ dvbdate_t time_of_change;
++ dvbhhmm_t next_time_offset;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_local_time_offset_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_local_time_offset_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_local_time_offset_descriptor*
++ dvb_local_time_offset_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len;
++ uint32_t pos = 0;
++
++ if (len % sizeof(struct dvb_local_time_offset))
++ return NULL;
++
++ while(pos < len) {
++ pos += sizeof(struct dvb_local_time_offset);
++ }
++
++ return (struct dvb_local_time_offset_descriptor*) d;
++}
++
++/**
++ * Iterator for the offsets field of a dvb_local_time_offset_descriptor.
++ *
++ * @param d dvb_local_time_offset_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_local_time_offset.
++ */
++#define dvb_local_time_offset_descriptor_offsets_for_each(d, pos) \
++ for ((pos) = dvb_local_time_offset_descriptor_offsets_first(d); \
++ (pos); \
++ (pos) = dvb_local_time_offset_descriptor_offsets_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_local_time_offset*
++ dvb_local_time_offset_descriptor_offsets_first(struct dvb_local_time_offset_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_local_time_offset *)
++ ((uint8_t*) d + sizeof(struct dvb_local_time_offset_descriptor));
++}
++
++static inline struct dvb_local_time_offset*
++ dvb_local_time_offset_descriptor_offsets_next(struct dvb_local_time_offset_descriptor *d,
++ struct dvb_local_time_offset *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_local_time_offset);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_local_time_offset *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/Makefile dvb-apps/lib/libucsi/dvb/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,123 @@
++# Makefile for linuxtv.org dvb-apps/lib/libucsi/dvb
++
++.PHONY: sub-error-dvb
++
++sub-error-dvb:
++ $(error You can't use this makefile directly.)
++
++ifneq ($(lib_name),)
++
++objects += dvb/bat_section.o \
++ dvb/dit_section.o \
++ dvb/eit_section.o \
++ dvb/int_section.o \
++ dvb/nit_section.o \
++ dvb/rst_section.o \
++ dvb/sdt_section.o \
++ dvb/sit_section.o \
++ dvb/st_section.o \
++ dvb/tdt_section.o \
++ dvb/tot_section.o \
++ dvb/tva_container_section.o \
++ dvb/types.o
++
++sub-install += dvb
++
++else
++
++includes = ac3_descriptor.h \
++ adaptation_field_data_descriptor.h \
++ ait_application_descriptor.h \
++ ait_application_icons_descriptor.h \
++ ait_application_name_descriptor.h \
++ ait_external_application_authorisation_descriptor.h \
++ ancillary_data_descriptor.h \
++ announcement_support_descriptor.h \
++ application_signalling_descriptor.h \
++ bat_section.h \
++ bouquet_name_descriptor.h \
++ ca_identifier_descriptor.h \
++ cable_delivery_descriptor.h \
++ cell_frequency_link_descriptor.h \
++ cell_list_descriptor.h \
++ component_descriptor.h \
++ content_descriptor.h \
++ content_identifier_descriptor.h \
++ country_availability_descriptor.h \
++ data_broadcast_descriptor.h \
++ data_broadcast_id_descriptor.h \
++ default_authority_descriptor.h \
++ descriptor.h \
++ dit_section.h \
++ dsng_descriptor.h \
++ eit_section.h \
++ extended_event_descriptor.h \
++ frequency_list_descriptor.h \
++ int_section.h \
++ ip_mac_platform_name_descriptor.h \
++ ip_mac_platform_provider_name_descriptor.h \
++ ip_mac_stream_location_descriptor.h \
++ linkage_descriptor.h \
++ local_time_offset_descriptor.h \
++ mhp_data_broadcast_id_descriptor.h \
++ mosaic_descriptor.h \
++ mpe_fec_section.h \
++ multilingual_bouquet_name_descriptor.h \
++ multilingual_component_descriptor.h \
++ multilingual_network_name_descriptor.h \
++ multilingual_service_name_descriptor.h \
++ network_name_descriptor.h \
++ nit_section.h \
++ nvod_reference_descriptor.h \
++ parental_rating_descriptor.h \
++ partial_transport_stream_descriptor.h \
++ pdc_descriptor.h \
++ private_data_specifier_descriptor.h \
++ related_content_descriptor.h \
++ rnt_rar_over_dvb_stream_descriptor.h \
++ rnt_rar_over_ip_descriptor.h \
++ rnt_rnt_scan_descriptor.h \
++ rst_section.h \
++ s2_satellite_delivery_descriptor.h \
++ satellite_delivery_descriptor.h \
++ scrambling_descriptor.h \
++ sdt_section.h \
++ section.h \
++ service_availability_descriptor.h \
++ service_descriptor.h \
++ service_identifier_descriptor.h \
++ service_list_descriptor.h \
++ service_move_descriptor.h \
++ short_event_descriptor.h \
++ short_smoothing_buffer_descriptor.h \
++ sit_section.h \
++ st_section.h \
++ stream_identifier_descriptor.h \
++ stuffing_descriptor.h \
++ subtitling_descriptor.h \
++ target_ip_address_descriptor.h \
++ target_ipv6_address_descriptor.h \
++ target_ip_slash_descriptor.h \
++ target_ip_source_slash_descriptor.h \
++ target_ipv6_slash_descriptor.h \
++ target_ipv6_source_slash_descriptor.h \
++ tdt_section.h \
++ telephone_descriptor.h \
++ teletext_descriptor.h \
++ terrestrial_delivery_descriptor.h \
++ time_shifted_event_descriptor.h \
++ time_shifted_service_descriptor.h \
++ time_slice_fec_identifier_descriptor.h \
++ tot_section.h \
++ transport_stream_descriptor.h \
++ tva_container_section.h \
++ tva_id_descriptor.h \
++ types.h \
++ vbi_data_descriptor.h \
++ vbi_teletext_descriptor.h
++
++include ../../../Make.rules
++
++lib_name = libucsi/dvb
++
++endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h dvb-apps/lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/mhp_data_broadcast_id_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,110 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_MHP_DATA_BROADCAST_ID_DESCRIPTOR
++#define _UCSI_DVB_MHP_DATA_BROADCAST_ID_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#ifndef _UCSI_DVB_DATA_BROADCAST_ID_DESCRIPTOR
++#error Must include dvb/data_broadcast_id_descriptor.h first
++#endif
++
++/**
++ * Broadcast IDs for MHP.
++ */
++enum {
++ DVB_BROADCAST_ID_MHP_OBJECT_CAROUSEL = 0x00f0,
++ DVB_BROADCAST_ID_MHP_MPE = 0x00f1,
++};
++
++/**
++ * dvb_mhp_data_broadcast_id_descriptor structure.
++ */
++struct dvb_mhp_data_broadcast_id_descriptor {
++ struct dvb_data_broadcast_id_descriptor d;
++ /* uint16_t application_type[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_mhp_data_broadcast_id_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_mhp_data_broadcast_id_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_mhp_data_broadcast_id_descriptor*
++ dvb_mhp_data_broadcast_id_descriptor_codec(struct dvb_data_broadcast_id_descriptor* d)
++{
++ uint8_t * buf;
++ int len;
++ int pos = 0;
++ struct dvb_mhp_data_broadcast_id_descriptor *res =
++ (struct dvb_mhp_data_broadcast_id_descriptor *) d;
++
++ if ((res->d.data_broadcast_id < 0xf0) || (res->d.data_broadcast_id > 0xfe))
++ return NULL;
++
++ buf = dvb_data_broadcast_id_descriptor_id_selector_byte(d);
++ len = dvb_data_broadcast_id_descriptor_id_selector_byte_length(d);
++
++ if (len % 2)
++ return NULL;
++
++ while(pos < len) {
++ bswap16(buf+pos);
++ pos+=2;
++ }
++
++ return res;
++}
++
++/**
++ * Accessor for the application_type field of a dvb_mhp_data_broadcast_id_descriptor.
++ *
++ * @param d dvb_mhp_data_broadcast_id_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint16_t *
++ dvb_mhp_data_broadcast_id_descriptor_id_application_type(struct dvb_mhp_data_broadcast_id_descriptor *d)
++{
++ return (uint16_t *) dvb_data_broadcast_id_descriptor_id_selector_byte((struct dvb_data_broadcast_id_descriptor*) d);
++}
++
++/**
++ * Determine the number of entries in the application_type field of a dvb_mhp_data_broadcast_id_descriptor.
++ *
++ * @param d dvb_data_broadcast_id_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_mhp_data_broadcast_id_descriptor_id_application_type_count(struct dvb_mhp_data_broadcast_id_descriptor *d)
++{
++ return dvb_data_broadcast_id_descriptor_id_selector_byte_length((struct dvb_data_broadcast_id_descriptor*) d) >> 1;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mosaic_descriptor.h dvb-apps/lib/libucsi/dvb/mosaic_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mosaic_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/mosaic_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,324 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_MOSAIC_DESCRIPTOR
++#define _UCSI_DVB_MOSAIC_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_mosaic_descriptor structure.
++ */
++struct dvb_mosaic_descriptor {
++ struct descriptor d;
++
++ EBIT4(uint8_t mosaic_entry_point : 1; ,
++ uint8_t number_of_horiz_elementary_cells: 3; ,
++ uint8_t reserved : 1; ,
++ uint8_t number_of_vert_elementary_cells : 3; );
++ /* struct dvb_mosaic_info infos[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the infos field of a dvb_mosaic_descriptor.
++ */
++struct dvb_mosaic_info {
++ EBIT3(uint16_t logical_cell_id : 6; ,
++ uint16_t reserved : 7; ,
++ uint16_t logical_cell_presentation_info : 3; );
++ uint8_t elementary_cell_field_length;
++ /* struct dvb_mosaic_elementary_cell_field fields[] */
++ /* struct dvb_mosaic_info_part2 part2 */
++ /* struct dvb_mosaic_linkage linkage */
++} __ucsi_packed;
++
++/**
++ * An entry in the fields field of a dvb_mosaic_info.
++ */
++struct dvb_mosaic_elementary_cell_field {
++ EBIT2(uint8_t reserved : 2; ,
++ uint8_t elementary_cell_id : 6; );
++} __ucsi_packed;
++
++/**
++ * Part2 of dvb_mosaic_info, following the variable length fields field.
++ */
++struct dvb_mosaic_info_part2 {
++ uint8_t cell_linkage_info;
++} __ucsi_packed;
++
++struct dvb_mosaic_linkage_01 {
++ uint16_t bouquet_id;
++} __ucsi_packed;
++
++struct dvb_mosaic_linkage_02 {
++ uint16_t original_network_id;
++ uint16_t transport_stream_id;
++ uint16_t service_id;
++} __ucsi_packed;
++
++struct dvb_mosaic_linkage_03 {
++ uint16_t original_network_id;
++ uint16_t transport_stream_id;
++ uint16_t service_id;
++} __ucsi_packed;
++
++struct dvb_mosaic_linkage_04 {
++ uint16_t original_network_id;
++ uint16_t transport_stream_id;
++ uint16_t service_id;
++ uint16_t event_id;
++} __ucsi_packed;
++
++/**
++ * Structure describing the linkage field of a dvb_mosaic_info
++ */
++struct dvb_mosaic_linkage {
++ union {
++ struct dvb_mosaic_linkage_01 linkage_01;
++ struct dvb_mosaic_linkage_02 linkage_02;
++ struct dvb_mosaic_linkage_03 linkage_03;
++ struct dvb_mosaic_linkage_04 linkage_04;
++ } u;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_mosaic_descriptor.
++ *
++ * @param d Pointer to a generic descriptor structure.
++ */
++static inline struct dvb_mosaic_descriptor*
++ dvb_mosaic_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++ struct dvb_mosaic_descriptor * p =
++ (struct dvb_mosaic_descriptor *) d;
++
++ pos += (sizeof(struct dvb_mosaic_descriptor) - 2);
++
++ if (pos > len)
++ return NULL;
++
++ while(pos < len) {
++ struct dvb_mosaic_info *e =
++ (struct dvb_mosaic_info*) (buf+pos);
++ struct dvb_mosaic_info_part2 *e2;
++ struct dvb_mosaic_linkage *linkage;
++
++ if ((pos + sizeof(struct dvb_mosaic_info)) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++
++ pos += sizeof(struct dvb_mosaic_info) +
++ e->elementary_cell_field_length;
++
++ if (pos > len)
++ return NULL;
++
++ e2 = (struct dvb_mosaic_info_part2*) (buf+pos);
++
++ pos += sizeof(struct dvb_mosaic_info_part2);
++
++ if (pos > len)
++ return NULL;
++
++ linkage = (struct dvb_mosaic_linkage*) (buf+pos);
++
++ switch(e2->cell_linkage_info) {
++ case 0x01:
++ if ((pos + sizeof(struct dvb_mosaic_linkage_01)) > len)
++ return NULL;
++ bswap16(buf+pos);
++ pos += sizeof(struct dvb_mosaic_linkage_01);
++ break;
++
++ case 0x02:
++ if ((pos + sizeof(struct dvb_mosaic_linkage_02)) > len)
++ return NULL;
++ bswap16(buf+pos);
++ bswap16(buf+pos+2);
++ bswap16(buf+pos+4);
++ pos += sizeof(struct dvb_mosaic_linkage_02);
++ break;
++
++ case 0x03:
++ if ((pos + sizeof(struct dvb_mosaic_linkage_03)) > len)
++ return NULL;
++ bswap16(buf+pos);
++ bswap16(buf+pos+2);
++ bswap16(buf+pos+4);
++ pos += sizeof(struct dvb_mosaic_linkage_03);
++ break;
++
++ case 0x04:
++ if ((pos + sizeof(struct dvb_mosaic_linkage_04)) > len)
++ return NULL;
++ bswap16(buf+pos);
++ bswap16(buf+pos+2);
++ bswap16(buf+pos+4);
++ bswap16(buf+pos+6);
++ pos += sizeof(struct dvb_mosaic_linkage_04);
++ break;
++ }
++ }
++
++ return p;
++}
++
++/**
++ * Iterator over the infos field of a dvb_mosaic_descriptor.
++ *
++ * @param d dvb_mosaic_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_mosaic_info.
++ */
++#define dvb_mosaic_descriptor_infos_for_each(d, pos) \
++ for ((pos) = dvb_mosaic_descriptor_infos_first(d); \
++ (pos); \
++ (pos) = dvb_mosaic_descriptor_infos_next(d, pos))
++
++/**
++ * Iterator over the fields field of a dvb_mosaic_info.
++ *
++ * @param info dvb_mosaic_info pointer.
++ * @param pos Variable containing a pointer to the current dvb_mosaic_elementary_cell_field.
++ */
++#define dvb_mosaic_info_fields_for_each(info, pos) \
++ for ((pos) = dvb_mosaic_info_fields_first(info); \
++ (pos); \
++ (pos) = dvb_mosaic_info_fields_next(info, pos))
++
++/**
++ * Accessor for the second part of the dvb_mosaic_info structure.
++ *
++ * @param entry dvb_mosaic_info pointer.
++ * @return dvb_mosaic_info_part2 pointer.
++ */
++static inline struct dvb_mosaic_info_part2*
++ dvb_mosaic_info_part2(struct dvb_mosaic_info* entry)
++{
++ return (struct dvb_mosaic_info_part2*)
++ ((uint8_t*) entry + sizeof(struct dvb_mosaic_info) +
++ entry->elementary_cell_field_length);
++}
++
++/**
++ * Accessor for the linkage field a dvb_mosaic_info structure.
++ *
++ * @param entry dvb_mosaic_info_part2 pointer.
++ * @return dvb_mosaic_linkage pointer, or NULL on error.
++ */
++static inline struct dvb_mosaic_linkage*
++ dvb_mosaic_linkage(struct dvb_mosaic_info_part2* entry)
++{
++ if ((entry->cell_linkage_info != 0x01) &&
++ (entry->cell_linkage_info != 0x02) &&
++ (entry->cell_linkage_info != 0x03) &&
++ (entry->cell_linkage_info != 0x04))
++ return NULL;
++
++ return (struct dvb_mosaic_linkage*)
++ ((uint8_t*) entry + sizeof(struct dvb_mosaic_info_part2));
++}
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_mosaic_info*
++ dvb_mosaic_descriptor_infos_first(struct dvb_mosaic_descriptor *d)
++{
++ if (d->d.len == 1)
++ return NULL;
++
++ return (struct dvb_mosaic_info *)
++ ((uint8_t*) d + sizeof(struct dvb_mosaic_descriptor));
++}
++
++static inline struct dvb_mosaic_info*
++ dvb_mosaic_descriptor_infos_next(struct dvb_mosaic_descriptor *d,
++ struct dvb_mosaic_info *pos)
++{
++ struct dvb_mosaic_info_part2* part2 = dvb_mosaic_info_part2(pos);
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_mosaic_info) +
++ pos->elementary_cell_field_length +
++ sizeof(struct dvb_mosaic_info_part2);
++
++ if (part2->cell_linkage_info == 0x01)
++ next += sizeof(struct dvb_mosaic_linkage_01);
++ else if (part2->cell_linkage_info == 0x02)
++ next += sizeof(struct dvb_mosaic_linkage_02);
++ else if (part2->cell_linkage_info == 0x03)
++ next += sizeof(struct dvb_mosaic_linkage_03);
++ else if (part2->cell_linkage_info == 0x04)
++ next += sizeof(struct dvb_mosaic_linkage_04);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_mosaic_info *) next;
++}
++
++static inline struct dvb_mosaic_elementary_cell_field*
++ dvb_mosaic_info_fields_first(struct dvb_mosaic_info *d)
++{
++ if (d->elementary_cell_field_length == 0)
++ return NULL;
++
++ return (struct dvb_mosaic_elementary_cell_field*)
++ ((uint8_t*) d + sizeof(struct dvb_mosaic_info));
++}
++
++static inline struct dvb_mosaic_elementary_cell_field*
++ dvb_mosaic_info_fields_next(struct dvb_mosaic_info *d,
++ struct dvb_mosaic_elementary_cell_field* pos)
++{
++ uint8_t *end = (uint8_t*) d + sizeof(struct dvb_mosaic_info) +
++ d->elementary_cell_field_length;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_mosaic_elementary_cell_field);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_mosaic_elementary_cell_field *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mpe_fec_section.h dvb-apps/lib/libucsi/dvb/mpe_fec_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/mpe_fec_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/mpe_fec_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,73 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2008 Patrick Boettcher (pb@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_MPE_FEC_SECTION_H
++#define _UCSI_DVB_MPE_FEC_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/mpeg/section.h>
++
++/**
++ * mpe_fec_section structure. TODO
++ */
++struct mpe_fec_section {
++ struct section head;
++};
++
++
++/**
++ * real_time_paramters
++ * can also be found in datagram_section in MAC4-1-bytes */
++struct real_time_parameters {
++ EBIT4(uint32_t delta_t : 12; ,
++ uint32_t table_boundary : 1; ,
++ uint32_t frame_boundary : 1; ,
++ uint32_t address : 18; )
++};
++
++
++static inline struct real_time_parameters * datagram_section_real_time_parameters_codec(struct datagram_section *d)
++{
++ struct real_time_parameters *rt = (struct real_time_parameters *) &d->MAC_address_4;
++ uint8_t b[4];
++ b[0] = d->MAC_address_4;
++ b[1] = d->MAC_address_3;
++ b[2] = d->MAC_address_2;
++ b[3] = d->MAC_address_1;
++
++ rt->delta_t = (b[0] << 4) | ((b[1] >> 4) & 0x0f);
++ rt->table_boundary = (b[1] >> 3) & 0x1;
++ rt->frame_boundary = (b[1] >> 2) & 0x1;
++ rt->address = ((b[1] & 0x3) << 16) | (b[2] << 8) | b[3];
++
++ return rt;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h dvb-apps/lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/multilingual_bouquet_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,145 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_MULTILINGUAL_BOUQUET_NAME_DESCRIPTOR
++#define _UCSI_DVB_MULTILINGUAL_BOUQUET_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_multilingual_bouquet_name_descriptor structure.
++ */
++struct dvb_multilingual_bouquet_name_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_multilingual_bouquet_name names[]*/
++} __ucsi_packed;
++
++/**
++ * An entry in the names field of a dvb_multilingual_bouquet_name_descriptor.
++ */
++struct dvb_multilingual_bouquet_name {
++ iso639lang_t language_code;
++ uint8_t bouquet_name_length;
++ /* uint8_t name[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_multilingual_bouquet_name_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_multilingual_bouquet_name_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_multilingual_bouquet_name_descriptor*
++ dvb_multilingual_bouquet_name_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++
++ while(pos < len) {
++ struct dvb_multilingual_bouquet_name *e =
++ (struct dvb_multilingual_bouquet_name*) (buf+pos);
++
++ pos += sizeof(struct dvb_multilingual_bouquet_name);
++
++ if (pos > len)
++ return NULL;
++
++ pos += e->bouquet_name_length;
++
++ if (pos > len)
++ return NULL;
++ }
++
++ return (struct dvb_multilingual_bouquet_name_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the names field of a dvb_multilingual_bouquet_name_descriptor.
++ *
++ * @param d dvb_multilingual_bouquet_name_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_multilingual_bouquet_name.
++ */
++#define dvb_multilingual_bouquet_name_descriptor_names_for_each(d, pos) \
++ for ((pos) = dvb_multilingual_bouquet_name_descriptor_names_first(d); \
++ (pos); \
++ (pos) = dvb_multilingual_bouquet_name_descriptor_names_next(d, pos))
++
++/**
++ * Accessor for the name field of a dvb_multilingual_bouquet_name.
++ *
++ * @param e dvb_multilingual_bouquet_name pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_multilingual_bouquet_name_name(struct dvb_multilingual_bouquet_name *e)
++{
++ return (uint8_t *) e + sizeof(struct dvb_multilingual_bouquet_name);
++}
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_multilingual_bouquet_name*
++ dvb_multilingual_bouquet_name_descriptor_names_first(struct dvb_multilingual_bouquet_name_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_multilingual_bouquet_name *)
++ ((uint8_t*) d + sizeof(struct dvb_multilingual_bouquet_name_descriptor));
++}
++
++static inline struct dvb_multilingual_bouquet_name*
++ dvb_multilingual_bouquet_name_descriptor_names_next(struct dvb_multilingual_bouquet_name_descriptor *d,
++ struct dvb_multilingual_bouquet_name *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_multilingual_bouquet_name) +
++ pos->bouquet_name_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_multilingual_bouquet_name *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_component_descriptor.h dvb-apps/lib/libucsi/dvb/multilingual_component_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_component_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/multilingual_component_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,149 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_MULTILINGUAL_COMPONENT_DESCRIPTOR
++#define _UCSI_DVB_MULTILINGUAL_COMPONENT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_multilingual_component_descriptor structure.
++ */
++struct dvb_multilingual_component_descriptor {
++ struct descriptor d;
++
++ uint8_t component_tag;
++ /* struct dvb_multilingual_component components[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the components field of a dvb_multilingual_component_descriptor.
++ */
++struct dvb_multilingual_component {
++ iso639lang_t language_code;
++ uint8_t text_description_length;
++ /* uint8_t text_char[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_multilingual_component_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_multilingual_component_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_multilingual_component_descriptor*
++ dvb_multilingual_component_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t pos = sizeof(struct dvb_multilingual_component_descriptor) - 2;
++ uint32_t len = d->len;
++
++ if (pos > len)
++ return NULL;
++
++ while(pos < len) {
++ struct dvb_multilingual_component *e =
++ (struct dvb_multilingual_component*) (buf+pos);
++
++ pos += sizeof(struct dvb_multilingual_component);
++
++ if (pos > len)
++ return NULL;
++
++ pos += e->text_description_length;
++
++ if (pos > len)
++ return NULL;
++ }
++
++ return (struct dvb_multilingual_component_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the components field of a dvb_multilingual_component_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_multilingual_component.
++ */
++#define dvb_multilingual_component_descriptor_components_for_each(d, pos) \
++ for ((pos) = dvb_multilingual_component_descriptor_components_first(d); \
++ (pos); \
++ (pos) = dvb_multilingual_component_descriptor_components_next(d, pos))
++
++/**
++ * Accessor for the text_char field in a dvb_multilingual_component.
++ *
++ * @param e dvb_multilingual_component pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_multilingual_component_text_char(struct dvb_multilingual_component *e)
++{
++ return (uint8_t *) e + sizeof(struct dvb_multilingual_component);
++}
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_multilingual_component*
++ dvb_multilingual_component_descriptor_components_first(struct dvb_multilingual_component_descriptor *d)
++{
++ if (d->d.len == 1)
++ return NULL;
++
++ return (struct dvb_multilingual_component *)
++ ((uint8_t*) d + sizeof(struct dvb_multilingual_component_descriptor));
++}
++
++static inline struct dvb_multilingual_component*
++ dvb_multilingual_component_descriptor_components_next(struct dvb_multilingual_component_descriptor *d,
++ struct dvb_multilingual_component *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_multilingual_component) +
++ pos->text_description_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_multilingual_component *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_network_name_descriptor.h dvb-apps/lib/libucsi/dvb/multilingual_network_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_network_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/multilingual_network_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,145 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_MULTILINGUAL_NETWORK_NAME_DESCRIPTOR
++#define _UCSI_DVB_MULTILINGUAL_NETWORK_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_multilingual_network_name_descriptor structure.
++ */
++struct dvb_multilingual_network_name_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_multilingual_network_name names[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the names field of a dvb_multilingual_network_name_descriptor.
++ */
++struct dvb_multilingual_network_name {
++ iso639lang_t language_code;
++ uint8_t network_name_length;
++ /* uint8_t name[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_multilingual_network_name_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_multilingual_network_name_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_multilingual_network_name_descriptor*
++ dvb_multilingual_network_name_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++
++ while(pos < len) {
++ struct dvb_multilingual_network_name *e =
++ (struct dvb_multilingual_network_name*) (buf + pos);
++
++ pos += sizeof(struct dvb_multilingual_network_name);
++
++ if (pos > len)
++ return NULL;
++
++ pos += e->network_name_length;
++
++ if (pos > len)
++ return NULL;
++ }
++
++ return (struct dvb_multilingual_network_name_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the names field of a dvb_multilingual_network_name_descriptor.
++ *
++ * @param d dvb_multilingual_network_name_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_multilingual_network_name.
++ */
++#define dvb_multilingual_network_name_descriptor_names_for_each(d, pos) \
++ for ((pos) = dvb_multilingual_network_name_descriptor_names_first(d); \
++ (pos); \
++ (pos) = dvb_multilingual_network_name_descriptor_names_next(d, pos))
++
++/**
++ * Accessor for the name field of a dvb_multilingual_network_name.
++ *
++ * @param e dvb_multilingual_network_name pointer.
++ * @return Pointer to the name field.
++ */
++static inline uint8_t *
++ dvb_multilingual_network_name_name(struct dvb_multilingual_network_name *e)
++{
++ return (uint8_t *) e + sizeof(struct dvb_multilingual_network_name);
++}
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_multilingual_network_name*
++ dvb_multilingual_network_name_descriptor_names_first(struct dvb_multilingual_network_name_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_multilingual_network_name *)
++ ((uint8_t*) d + sizeof(struct dvb_multilingual_network_name_descriptor));
++}
++
++static inline struct dvb_multilingual_network_name*
++ dvb_multilingual_network_name_descriptor_names_next(struct dvb_multilingual_network_name_descriptor *d,
++ struct dvb_multilingual_network_name *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos +
++ sizeof(struct dvb_multilingual_network_name) +
++ pos->network_name_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_multilingual_network_name *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_service_name_descriptor.h dvb-apps/lib/libucsi/dvb/multilingual_service_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/multilingual_service_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/multilingual_service_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,197 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_MULTILINGUAL_SERVICE_NAME_DESCRIPTOR
++#define _UCSI_DVB_MULTILINGUAL_SERVICE_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_multilingual_service_name_descriptor structure.
++ */
++struct dvb_multilingual_service_name_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_multilingual_service_name names[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the service_names field of a dvb_multilingual_service_name_descriptor.
++ */
++struct dvb_multilingual_service_name {
++ iso639lang_t language_code;
++ uint8_t service_provider_name_length;
++ /* uint8_t service_provider_name[] */
++ /* struct dvb_multilingual_service_name_part2 part2 */
++} __ucsi_packed;
++
++/**
++ * Second part of a dvb_multilingual_service_name following the variable length
++ * service_provider_name.
++ */
++struct dvb_multilingual_service_name_part2 {
++ uint8_t service_name_length;
++ /* uint8_t service_name[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_multilingual_service_name_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_multilingual_service_name_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_multilingual_service_name_descriptor*
++ dvb_multilingual_service_name_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++
++ while(pos < len) {
++ struct dvb_multilingual_service_name *e =
++ (struct dvb_multilingual_service_name*) (buf+pos);
++ struct dvb_multilingual_service_name_part2 *e2;
++
++ pos += sizeof(struct dvb_multilingual_service_name);
++
++ if (pos > len)
++ return NULL;
++
++ pos += e->service_provider_name_length;
++
++ if (pos > len)
++ return NULL;
++
++ e2 = (struct dvb_multilingual_service_name_part2*) (buf+pos);
++
++ pos += sizeof(struct dvb_multilingual_service_name_part2);
++
++ if (pos > len)
++ return NULL;
++
++ pos += e2->service_name_length;
++
++ if (pos > len)
++ return NULL;
++ }
++
++ return (struct dvb_multilingual_service_name_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the service_name field of a dvb_multilingual_service_name_descriptor.
++ *
++ * @param d dvb_multilingual_service_name_descriptor pointer,
++ * @param pos Variable containing pointer to the current dvb_multilingual_service_name.
++ */
++#define dvb_multilingual_service_name_descriptor_names_for_each(d, pos) \
++ for ((pos) = dvb_multilingual_service_name_descriptor_names_first(d); \
++ (pos); \
++ (pos) = dvb_multilingual_service_name_descriptor_names_next(d, pos))
++
++/**
++ * Accessor for the service_provider_name field of a dvb_multilingual_service_name.
++ *
++ * @param e dvb_multilingual_service_name pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_multilingual_service_name_service_provider_name(struct dvb_multilingual_service_name *e)
++{
++ return (uint8_t *) e + sizeof(struct dvb_multilingual_service_name);
++}
++
++/**
++ * Accessor for the dvb_multilingual_service_name_part2 - second part of a
++ * dvb_multilingual_service_name following the service_name field.
++ *
++ * @param e dvb_multilingual_service_name Pointer.
++ * @return dvb_multilingual_service_name_part2 pointer.
++ */
++static inline struct dvb_multilingual_service_name_part2 *
++ dvb_multilingual_service_name_part2(struct dvb_multilingual_service_name *e)
++{
++ return (struct dvb_multilingual_service_name_part2 *)
++ ((uint8_t *) e + sizeof(struct dvb_multilingual_service_name) +
++ e->service_provider_name_length);
++}
++
++/**
++ * Accessor for the service_name field of a dvb_multilingual_service_name_part2.
++ *
++ * @param e dvb_multilingual_service_name_part2 pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_multilingual_service_name_service_name(struct dvb_multilingual_service_name_part2 *e)
++{
++ return (uint8_t *) e + sizeof(struct dvb_multilingual_service_name_part2);
++}
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_multilingual_service_name*
++ dvb_multilingual_service_name_descriptor_names_first(struct dvb_multilingual_service_name_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_multilingual_service_name *)
++ ((uint8_t*) d + sizeof(struct dvb_multilingual_service_name_descriptor));
++}
++
++static inline struct dvb_multilingual_service_name*
++ dvb_multilingual_service_name_descriptor_names_next(struct dvb_multilingual_service_name_descriptor *d,
++ struct dvb_multilingual_service_name *pos)
++{
++ struct dvb_multilingual_service_name_part2 * part2 =
++ dvb_multilingual_service_name_part2(pos);
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) part2+
++ sizeof(struct dvb_multilingual_service_name_part2) +
++ part2->service_name_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_multilingual_service_name *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/network_name_descriptor.h dvb-apps/lib/libucsi/dvb/network_name_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/network_name_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/network_name_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,82 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_NETWORK_NAME_DESCRIPTOR
++#define _UCSI_DVB_NETWORK_NAME_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_network_name_descriptor structure.
++ */
++struct dvb_network_name_descriptor {
++ struct descriptor d;
++
++ /* char name[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_network_name_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_network_name_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_network_name_descriptor*
++ dvb_network_name_descriptor_codec(struct descriptor* d)
++{
++ return (struct dvb_network_name_descriptor*) d;
++}
++
++/**
++ * Accessor for the name field in a dvb_network_name_descriptor.
++ *
++ * @param d dvb_network_name_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_network_name_descriptor_name(struct dvb_network_name_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_network_name_descriptor);
++}
++
++/**
++ * Calculate the length of the name field in a dvb_network_name_descriptor.
++ *
++ * @param d dvb_network_name_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_network_name_descriptor_name_length(struct dvb_network_name_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nit_section.c dvb-apps/lib/libucsi/dvb/nit_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nit_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/nit_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,78 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/nit_section.h>
++
++struct dvb_nit_section *dvb_nit_section_codec(struct section_ext * ext)
++{
++ uint8_t * buf = (uint8_t *) ext;
++ struct dvb_nit_section * ret = (struct dvb_nit_section *) ext;
++ size_t pos = sizeof(struct section_ext);
++ size_t len = section_ext_length(ext);
++
++ if (len < sizeof(struct dvb_nit_section))
++ return NULL;
++
++ bswap16(buf + pos);
++ pos += 2;
++
++ if ((pos + ret->network_descriptors_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, ret->network_descriptors_length))
++ return NULL;
++
++ pos += ret->network_descriptors_length;
++
++ if ((pos + sizeof(struct dvb_nit_section_part2)) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++ pos += 2;
++
++ while (pos < len) {
++ struct dvb_nit_transport *transport =
++ (struct dvb_nit_transport *)(buf + pos);
++
++ if ((pos + sizeof(struct dvb_nit_transport)) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++ bswap16(buf + pos + 2);
++ bswap16(buf + pos + 4);
++
++ pos += sizeof(struct dvb_nit_transport);
++
++ if ((pos + transport->transport_descriptors_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos,
++ transport->transport_descriptors_length))
++ return NULL;
++
++ pos += transport->transport_descriptors_length;
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return ret;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nit_section.h dvb-apps/lib/libucsi/dvb/nit_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nit_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/nit_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,207 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_NIT_SECTION_H
++#define _UCSI_DVB_NIT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * dvb_nit_section structure.
++ */
++struct dvb_nit_section {
++ struct section_ext head;
++
++ EBIT2(uint16_t reserved_1 : 4; ,
++ uint16_t network_descriptors_length :12; );
++ /* struct descriptor descriptors[] */
++ /* struct dvb_nit_section_part2 part2 */
++};
++
++/**
++ * Second part of a dvb_nit_section, following the variable length descriptors field.
++ */
++struct dvb_nit_section_part2 {
++ EBIT2(uint16_t reserved_2 : 4; ,
++ uint16_t transport_stream_loop_length :12; );
++ /* struct dvb_nit_transport transports[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the transports field of a dvb_nit_section_part2
++ */
++struct dvb_nit_transport {
++ uint16_t transport_stream_id;
++ uint16_t original_network_id;
++ EBIT2(uint16_t reserved : 4; ,
++ uint16_t transport_descriptors_length :12; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_nit_section.
++ *
++ * @param section Generic section_ext pointer.
++ * @return dvb_nit_section pointer, or NULL on error.
++ */
++struct dvb_nit_section * dvb_nit_section_codec(struct section_ext *section);
++
++/**
++ * Accessor for the network_id field of a NIT.
++ *
++ * @param nit NIT pointer.
++ * @return The network_id.
++ */
++static inline uint16_t dvb_nit_section_network_id(struct dvb_nit_section *nit)
++{
++ return nit->head.table_id_ext;
++}
++
++/**
++ * Iterator over the descriptors field in a dvb_nit_section.
++ *
++ * @param nit dvb_nit_section pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define dvb_nit_section_descriptors_for_each(nit, pos) \
++ for ((pos) = dvb_nit_section_descriptors_first(nit); \
++ (pos); \
++ (pos) = dvb_nit_section_descriptors_next(nit, pos))
++
++/**
++ * Accessor for a pointer to the dvb_nit_section_part2 structure.
++ *
++ * @param nit dvb_nit_section pointer.
++ * @return dvb_nit_section_part2 pointer.
++ */
++static inline struct dvb_nit_section_part2 *dvb_nit_section_part2(struct dvb_nit_section * nit)
++{
++ return (struct dvb_nit_section_part2 *)
++ ((uint8_t*) nit + sizeof(struct dvb_nit_section) +
++ nit->network_descriptors_length);
++}
++
++/**
++ * Iterator over the transports field in a dvb_nit_section_part2.
++ *
++ * @param nit dvb_nit_section pointer.
++ * @param part2 dvb_nit_section_part2 pointer.
++ * @param pos Pointer to the current dvb_nit_transport.
++ */
++#define dvb_nit_section_transports_for_each(nit, part2, pos) \
++ for ((pos) = dvb_nit_section_transports_first(part2); \
++ (pos); \
++ (pos) = dvb_nit_section_transports_next(part2, pos))
++
++/**
++ * Iterator over the descriptors field in a dvb_nit_transport.
++ *
++ * @param transport dvb_nit_transport pointer.
++ * @param pos Pointer to the current descriptor.
++ */
++#define dvb_nit_transport_descriptors_for_each(transport, pos) \
++ for ((pos) = dvb_nit_transport_descriptors_first(transport); \
++ (pos); \
++ (pos) = dvb_nit_transport_descriptors_next(transport, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct descriptor *
++ dvb_nit_section_descriptors_first(struct dvb_nit_section * nit)
++{
++ if (nit->network_descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) nit + sizeof(struct dvb_nit_section));
++}
++
++static inline struct descriptor *
++ dvb_nit_section_descriptors_next(struct dvb_nit_section * nit,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) nit + sizeof(struct dvb_nit_section),
++ nit->network_descriptors_length,
++ pos);
++}
++
++static inline struct dvb_nit_transport *
++ dvb_nit_section_transports_first(struct dvb_nit_section_part2 *part2)
++{
++ if (part2->transport_stream_loop_length == 0)
++ return NULL;
++
++ return (struct dvb_nit_transport *)
++ ((uint8_t *)part2 + sizeof(struct dvb_nit_section_part2));
++}
++
++static inline struct dvb_nit_transport *
++ dvb_nit_section_transports_next(struct dvb_nit_section_part2 *part2,
++ struct dvb_nit_transport *pos)
++{
++ uint8_t *end = (uint8_t*) part2 + sizeof(struct dvb_nit_section_part2) +
++ part2->transport_stream_loop_length;
++ uint8_t *next = (uint8_t*) pos + sizeof(struct dvb_nit_transport) +
++ pos->transport_descriptors_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_nit_transport *) next;
++}
++
++static inline struct descriptor *
++ dvb_nit_transport_descriptors_first(struct dvb_nit_transport *t)
++{
++ if (t->transport_descriptors_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t*) t + sizeof(struct dvb_nit_transport));
++}
++
++static inline struct descriptor *
++ dvb_nit_transport_descriptors_next(struct dvb_nit_transport *t,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) t + sizeof(struct dvb_nit_transport),
++ t->transport_descriptors_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nvod_reference_descriptor.h dvb-apps/lib/libucsi/dvb/nvod_reference_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/nvod_reference_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/nvod_reference_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,125 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_NVOD_REFERENCE_DESCRIPTOR
++#define _UCSI_DVB_NVOD_REFERENCE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_nvod_reference_descriptor structure.
++ */
++struct dvb_nvod_reference_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_nvod_reference references[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the references field of a dvb_nvod_reference_descriptor.
++ */
++struct dvb_nvod_reference {
++ uint16_t transport_stream_id;
++ uint16_t original_network_id;
++ uint16_t service_id;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_nvod_reference_descriptor.
++ *
++ * @param d Pointer to a generic descriptor structure pointer.
++ * @return dvb_nvod_reference_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_nvod_reference_descriptor*
++ dvb_nvod_reference_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t len = d->len;
++
++ if (len % sizeof(struct dvb_nvod_reference))
++ return NULL;
++
++ while(pos < len) {
++ bswap16(buf+pos);
++ bswap16(buf+pos+2);
++ bswap16(buf+pos+4);
++ pos += sizeof(struct dvb_nvod_reference);
++ }
++
++ return (struct dvb_nvod_reference_descriptor*) d;
++}
++
++/**
++ * Iterator over the references field in a dvb_nvod_reference_descriptor.
++ *
++ * @param d dvb_nvod_reference_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_nvod_reference.
++ */
++#define dvb_nvod_reference_descriptor_references_for_each(d, pos) \
++ for ((pos) = dvb_nvod_reference_descriptor_references_first(d); \
++ (pos); \
++ (pos) = dvb_nvod_reference_descriptor_references_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_nvod_reference*
++ dvb_nvod_reference_descriptor_references_first(struct dvb_nvod_reference_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_nvod_reference *)
++ ((uint8_t*) d + sizeof(struct dvb_nvod_reference_descriptor));
++}
++
++static inline struct dvb_nvod_reference*
++ dvb_nvod_reference_descriptor_references_next(struct dvb_nvod_reference_descriptor *d,
++ struct dvb_nvod_reference *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_nvod_reference);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_nvod_reference *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/parental_rating_descriptor.h dvb-apps/lib/libucsi/dvb/parental_rating_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/parental_rating_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/parental_rating_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,135 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_PARENTAL_RATING_DESCRIPTOR
++#define _UCSI_DVB_PARENTAL_RATING_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * Defined values for the rating field.
++ */
++enum {
++ DVB_PARENTAL_RATING_MIN_3YEARS = 0x01,
++ DVB_PARENTAL_RATING_MIN_4YEARS = 0x02,
++ DVB_PARENTAL_RATING_MIN_5YEARS = 0x03,
++ DVB_PARENTAL_RATING_MIN_6YEARS = 0x04,
++ DVB_PARENTAL_RATING_MIN_7YEARS = 0x05,
++ DVB_PARENTAL_RATING_MIN_8YEARS = 0x06,
++ DVB_PARENTAL_RATING_MIN_9YEARS = 0x07,
++ DVB_PARENTAL_RATING_MIN_10YEARS = 0x08,
++ DVB_PARENTAL_RATING_MIN_11YEARS = 0x09,
++ DVB_PARENTAL_RATING_MIN_12YEARS = 0x0a,
++ DVB_PARENTAL_RATING_MIN_13YEARS = 0x0b,
++ DVB_PARENTAL_RATING_MIN_14YEARS = 0x0c,
++ DVB_PARENTAL_RATING_MIN_15YEARS = 0x0d,
++ DVB_PARENTAL_RATING_MIN_16YEARS = 0x0e,
++ DVB_PARENTAL_RATING_MIN_17YEARS = 0x0f,
++};
++
++/**
++ * dvb_parental_rating_descriptor structure.
++ */
++struct dvb_parental_rating_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_parental_rating ratings[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the ratings field of a dvb_parental_rating_descriptor.
++ */
++struct dvb_parental_rating {
++ iso639country_t country_code;
++ uint8_t rating;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_parental_rating_descriptor.
++ *
++ * @param d Generic descriptor structure pointer.
++ * @return dvb_parental_rating_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_parental_rating_descriptor*
++ dvb_parental_rating_descriptor_codec(struct descriptor* d)
++{
++ if (d->len % sizeof(struct dvb_parental_rating))
++ return NULL;
++
++ return (struct dvb_parental_rating_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the ratings field of a dvb_parental_rating_descriptor.
++ *
++ * @param d dvb_parental_rating_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_parental_rating.
++ */
++#define dvb_parental_rating_descriptor_ratings_for_each(d, pos) \
++ for ((pos) = dvb_parental_rating_descriptor_ratings_first(d); \
++ (pos); \
++ (pos) = dvb_parental_rating_descriptor_ratings_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_parental_rating*
++ dvb_parental_rating_descriptor_ratings_first(struct dvb_parental_rating_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_parental_rating *)
++ ((uint8_t*) d + sizeof(struct dvb_parental_rating_descriptor));
++}
++
++static inline struct dvb_parental_rating*
++ dvb_parental_rating_descriptor_ratings_next(struct dvb_parental_rating_descriptor *d,
++ struct dvb_parental_rating *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_parental_rating);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_parental_rating *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/partial_transport_stream_descriptor.h dvb-apps/lib/libucsi/dvb/partial_transport_stream_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/partial_transport_stream_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/partial_transport_stream_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,68 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_PARTIAL_TRANSPORT_STREAM_DESCRIPTOR
++#define _UCSI_DVB_PARTIAL_TRANSPORT_STREAM_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_partial_transport_stream_descriptor structure.
++ */
++struct dvb_partial_transport_stream_descriptor {
++ struct descriptor d;
++
++ EBIT6(uint64_t reserved : 2; ,
++ uint64_t peak_rate :22; ,
++ uint64_t reserved_2 : 2; ,
++ uint64_t minimum_overall_smoothing_rate :22; ,
++ uint64_t reserved_3 : 2; ,
++ uint64_t maximum_overall_smoothing_rate :14; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_partial_transport_stream_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_partial_transport_stream_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_partial_transport_stream_descriptor*
++ dvb_partial_transport_stream_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_partial_transport_stream_descriptor) - 2))
++ return NULL;
++
++ bswap64((uint8_t*) d + 2);
++
++ return (struct dvb_partial_transport_stream_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/pdc_descriptor.h dvb-apps/lib/libucsi/dvb/pdc_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/pdc_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/pdc_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,64 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_PDC_DESCRIPTOR
++#define _UCSI_DVB_PDC_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_pdc_descriptor structure.
++ */
++struct dvb_pdc_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint32_t reserved : 4; ,
++ uint32_t programme_id_label :20; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_pdc_descriptor.
++ *
++ * @param d Pointer to a generic descriptor structure.
++ * @return dvb_pdc_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_pdc_descriptor*
++ dvb_pdc_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_pdc_descriptor) - 2))
++ return NULL;
++
++ bswap24((uint8_t*) d + 2);
++
++ return (struct dvb_pdc_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/private_data_specifier_descriptor.h dvb-apps/lib/libucsi/dvb/private_data_specifier_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/private_data_specifier_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/private_data_specifier_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,63 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_PRIVATE_DATA_SPECIFIER_DESCRIPTOR
++#define _UCSI_DVB_PRIVATE_DATA_SPECIFIER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_private_data_specifier_descriptor structure.
++ */
++struct dvb_private_data_specifier_descriptor {
++ struct descriptor d;
++
++ uint32_t private_data_specifier;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_private_data_specifier_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_private_data_specifier_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_private_data_specifier_descriptor*
++ dvb_private_data_specifier_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_private_data_specifier_descriptor) - 2))
++ return NULL;
++
++ bswap32((uint8_t*) d + 2);
++
++ return (struct dvb_private_data_specifier_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/related_content_descriptor.h dvb-apps/lib/libucsi/dvb/related_content_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/related_content_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/related_content_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,56 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_RELATED_CONTENT_DESCRIPTOR
++#define _UCSI_DVB_RELATED_CONTENT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_related_content_descriptor structure.
++ */
++struct dvb_related_content_descriptor {
++ struct descriptor d;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_related_content_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_related_content_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_related_content_descriptor*
++ dvb_related_content_descriptor_codec(struct descriptor* d)
++{
++ return (struct dvb_related_content_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h dvb-apps/lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/rnt_rar_over_dvb_stream_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,110 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_RNT_RAR_OVER_DVB_STREAM_DESCRIPTOR
++#define _UCSI_DVB_RNT_RAR_OVER_DVB_STREAM_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_rnt_rar_over_dvb_stream_descriptor structure.
++ */
++struct dvb_rnt_rar_over_dvb_stream_descriptor {
++ struct descriptor d;
++
++ dvbdate_t first_valid_date;
++ dvbdate_t last_valid_date;
++ EBIT3(uint8_t weighting : 6; ,
++ uint8_t complete_flag : 1; ,
++ uint8_t scheduled_flag : 1; );
++ uint16_t transport_stream_id;
++ uint16_t original_network_id;
++ uint16_t service_id;
++ uint8_t component_tag;
++ /* struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info scheduled_info */
++} __ucsi_packed;
++
++/**
++ * The scheduled_info field of a dvb_rnt_rar_over_dvb_stream_descriptor (only appears
++ * if scheduled_flag = 1).
++ */
++struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info {
++ dvbdate_t download_start_time;
++ uint8_t download_period_duration;
++ uint8_t download_cycle_time;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_rnt_rar_over_dvb_stream_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_rnt_rar_over_dvb_stream_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_rnt_rar_over_dvb_stream_descriptor*
++ dvb_rnt_rar_over_dvb_stream_descriptor_codec(struct descriptor* d)
++{
++ uint8_t *buf = (uint8_t*) d;
++ uint32_t len = d->len + 2;
++ struct dvb_rnt_rar_over_dvb_stream_descriptor *ret =
++ (struct dvb_rnt_rar_over_dvb_stream_descriptor *) buf;
++
++ if (len < sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor))
++ return NULL;
++
++ bswap16(buf + 13);
++ bswap16(buf + 15);
++ bswap16(buf + 17);
++
++ if (ret->scheduled_flag == 1) {
++ if (len < (sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor)+
++ sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info)))
++ return NULL;
++ }
++
++ return ret;
++}
++
++/**
++ * Accessor for the scheduled_info field of a dvb_rnt_rar_over_dvb_stream_descriptor.
++ *
++ * @param d dvb_rnt_rar_over_dvb_stream_descriptor pointer.
++ * @return Pointer, or NULL on error.
++ */
++static inline struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info*
++ dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info(struct dvb_rnt_rar_over_dvb_stream_descriptor *d)
++{
++ if (d->scheduled_flag != 1)
++ return NULL;
++ return (struct dvb_rnt_rar_over_dvb_stream_descriptor_scheduled_info*)
++ ((uint8_t*) d + sizeof(struct dvb_rnt_rar_over_dvb_stream_descriptor));
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h dvb-apps/lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/rnt_rar_over_ip_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,87 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_RNT_RAR_OVER_IP_DESCRIPTOR
++#define _UCSI_DVB_RNT_RAR_OVER_IP_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_rnt_rar_over_ip_descriptor structure.
++ */
++struct dvb_rnt_rar_over_ip_descriptor {
++ struct descriptor d;
++
++ dvbdate_t first_valid_date;
++ dvbdate_t last_valid_date;
++ EBIT3(uint8_t weighting : 6; ,
++ uint8_t complete_flag : 1; ,
++ uint8_t reserved : 1; );
++ uint8_t url_length;
++ /* uint8_t url[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_rnt_rar_over_ip_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_rnt_rar_over_ip_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_rnt_rar_over_ip_descriptor*
++ dvb_rnt_rar_over_ip_descriptor_codec(struct descriptor* d)
++{
++ uint8_t *buf = (uint8_t*) d;
++ uint32_t len = d->len + 2;
++ struct dvb_rnt_rar_over_ip_descriptor *ret =
++ (struct dvb_rnt_rar_over_ip_descriptor *) buf;
++
++ if (len < sizeof(struct dvb_rnt_rar_over_ip_descriptor))
++ return NULL;
++ if (len < (sizeof(struct dvb_rnt_rar_over_ip_descriptor) + buf[13]))
++ return NULL;
++
++ return ret;
++}
++
++/**
++ * Accessor for the url field of a dvb_rnt_rar_over_ip_descriptor.
++ *
++ * @param d dvb_rnt_rar_over_ip_descriptor pointer.
++ * @return Pointer.
++ */
++static inline uint8_t*
++ dvb_rnt_rar_over_ip_descriptor_url(struct dvb_rnt_rar_over_ip_descriptor *d)
++{
++ return (uint8_t*)
++ ((uint8_t*) d + sizeof(struct dvb_rnt_rar_over_ip_descriptor));
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rnt_scan_descriptor.h dvb-apps/lib/libucsi/dvb/rnt_rnt_scan_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rnt_rnt_scan_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/rnt_rnt_scan_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,125 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_RNT_RNT_SCAN_DESCRIPTOR
++#define _UCSI_DVB_RNT_RNT_SCAN_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_rnt_rnt_scan_descriptor structure.
++ */
++struct dvb_rnt_rnt_scan_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_rnt_rnt_scan_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the entries field of a dvb_rnt_rnt_scan_descriptor.
++ */
++struct dvb_rnt_rnt_scan_entry {
++ uint16_t transport_stream_id;
++ uint16_t original_network_id;
++ uint8_t scan_weighting;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_rnt_rnt_scan_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return dvb_rnt_rnt_scan_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_rnt_rnt_scan_descriptor*
++ dvb_rnt_rnt_scan_descriptor_codec(struct descriptor* d)
++{
++ uint8_t *buf = (uint8_t*) d;
++ uint32_t len = d->len +2;
++ uint32_t pos = 2;
++
++ if ((len-2) % sizeof(struct dvb_rnt_rnt_scan_entry))
++ return NULL;
++
++ while(pos < len) {
++ bswap16(buf+pos);
++ bswap16(buf+pos+2);
++ pos += sizeof(struct dvb_rnt_rnt_scan_entry);
++ }
++
++ return (struct dvb_rnt_rnt_scan_descriptor*) d;
++}
++
++/**
++ * Iterator for entries field of a dvb_rnt_rnt_scan_descriptor.
++ *
++ * @param d dvb_rnt_rnt_scan_descriptor pointer.
++ * @param pos Variable holding a pointer to the current dvb_rnt_rnt_scan_entry.
++ */
++#define dvb_rnt_rnt_scan_descriptor_entries_for_each(d, pos) \
++ for ((pos) = dvb_rnt_rnt_scan_descriptor_entries_first(d); \
++ (pos); \
++ (pos) = dvb_rnt_rnt_scan_descriptor_entries_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_rnt_rnt_scan_entry*
++ dvb_rnt_rnt_scan_descriptor_entries_first(struct dvb_rnt_rnt_scan_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_rnt_rnt_scan_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_rnt_rnt_scan_descriptor));
++}
++
++static inline struct dvb_rnt_rnt_scan_entry*
++ dvb_rnt_rnt_scan_descriptor_entries_next(struct dvb_rnt_rnt_scan_descriptor *d,
++ struct dvb_rnt_rnt_scan_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_rnt_rnt_scan_entry);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_rnt_rnt_scan_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rst_section.c dvb-apps/lib/libucsi/dvb/rst_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rst_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/rst_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,47 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/rst_section.h>
++
++struct dvb_rst_section * dvb_rst_section_codec(struct section *section)
++{
++ uint8_t * buf = (uint8_t *) section;
++ size_t pos = sizeof(struct section);
++ size_t len = section_length(section);
++ struct dvb_rst_section * ret = (struct dvb_rst_section *) section;
++
++ while (pos < len) {
++ if ((pos + sizeof(struct dvb_rst_status)) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++ bswap16(buf + pos + 2);
++ bswap16(buf + pos + 4);
++ bswap16(buf + pos + 6);
++
++ pos += sizeof(struct dvb_rst_status);
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return ret;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rst_section.h dvb-apps/lib/libucsi/dvb/rst_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/rst_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/rst_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,110 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_RST_SECTION_H
++#define _UCSI_DVB_RST_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * dvb_rst_section structure.
++ */
++struct dvb_rst_section {
++ struct section head;
++
++ /* struct dvb_rst_status statuses[] */
++};
++
++/**
++ * An entry in the statuses field of a dvb_rst_section structure.
++ */
++struct dvb_rst_status {
++ uint16_t transport_stream_id;
++ uint16_t original_network_id;
++ uint16_t service_id;
++ uint16_t event_id;
++ EBIT2(uint8_t reserved : 5; ,
++ uint8_t running_status : 3; );
++};
++
++/**
++ * Process a dvb_rst_section.
++ *
++ * @param section Pointer to a generic section strcuture.
++ * @return dvb_rst_section pointer, or NULL on error.
++ */
++struct dvb_rst_section *dvb_rst_section_codec(struct section *section);
++
++/**
++ * Iterator for entries in the statuses field of a dvb_rst_section.
++ *
++ * @param rst dvb_rst_section pointer.
++ * @param pos Variable containing a pointer to the current dvb_rst_status.
++ */
++#define dvb_rst_section_statuses_for_each(rst, pos) \
++ for ((pos) = dvb_rst_section_statuses_first(rst); \
++ (pos); \
++ (pos) = dvb_rst_section_statuses_next(rst, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_rst_status *
++ dvb_rst_section_statuses_first(struct dvb_rst_section *rst)
++{
++ size_t pos = sizeof(struct dvb_rst_section);
++
++ if (pos >= section_length(&rst->head))
++ return NULL;
++
++ return (struct dvb_rst_status*) ((uint8_t *) rst + pos);
++}
++
++static inline struct dvb_rst_status *
++ dvb_rst_section_statuses_next(struct dvb_rst_section * rst,
++ struct dvb_rst_status * pos)
++{
++ uint8_t *end = (uint8_t*) rst + section_length(&rst->head);
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_rst_status);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_rst_status *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/s2_satellite_delivery_descriptor.h dvb-apps/lib/libucsi/dvb/s2_satellite_delivery_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/s2_satellite_delivery_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/s2_satellite_delivery_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_S2_SATELLITE_DELIVERY_DESCRIPTOR
++#define _UCSI_DVB_S2_SATELLITE_DELIVERY_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_s2_satellite_delivery_descriptor structure.
++ */
++struct dvb_s2_satellite_delivery_descriptor {
++ struct descriptor d;
++
++ EBIT4(uint8_t scrambling_sequence_selector : 1; ,
++ uint8_t multiple_input_stream : 1; ,
++ uint8_t backwards_compatability : 1; ,
++ uint8_t reserved : 5; );
++ /* uint32_t scrambling_sequence_index if scrambling_sequence_selector = 1 */
++ /* uint8_t input_stream_id if multiple_input_stream = 1 */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_s2_satellite_delivery_descriptor.
++ *
++ * @param d Pointer to a generic descriptor structure.
++ * @return dvb_s2_satellite_delivery_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_s2_satellite_delivery_descriptor*
++ dvb_s2_satellite_delivery_descriptor_codec(struct descriptor* d)
++{
++ struct dvb_s2_satellite_delivery_descriptor *s2 =
++ (struct dvb_s2_satellite_delivery_descriptor*) d;
++
++ if (d->len < (sizeof(struct dvb_s2_satellite_delivery_descriptor) - 2))
++ return NULL;
++
++ int len = sizeof(struct dvb_s2_satellite_delivery_descriptor);
++ if (s2->scrambling_sequence_selector) {
++ len += 3;
++ }
++ if (s2->multiple_input_stream) {
++ len += 1;
++ }
++
++ if (d->len < len)
++ return NULL;
++
++ return s2;
++}
++
++/**
++ * Accessor for the scrambling_sequence_index field of a dvb_s2_satellite_delivery_descriptor.
++ *
++ * @param s2 dvb_s2_satellite_delivery_descriptor pointer.
++ * @return The scrambling_sequence_index.
++ */
++static inline uint32_t dvb_s2_satellite_delivery_descriptor_scrambling_sequence_index(struct dvb_s2_satellite_delivery_descriptor *s2)
++{
++ uint8_t *tmp = (uint8_t*) s2;
++
++ if (s2->scrambling_sequence_selector) {
++ return ((tmp[4] & 0x03) << 16) | (tmp[5] << 8) | tmp[6];
++ }
++ return 0;
++}
++
++/**
++ * Accessor for the input_stream_id field of a dvb_s2_satellite_delivery_descriptor.
++ *
++ * @param s2 dvb_s2_satellite_delivery_descriptor pointer.
++ * @return The input_stream_id.
++ */
++static inline uint8_t dvb_s2_satellite_delivery_descriptor_input_stream_id(struct dvb_s2_satellite_delivery_descriptor *s2)
++{
++ uint8_t *tmp = (uint8_t*) s2;
++
++ if (!s2->multiple_input_stream)
++ return 0;
++
++ int off = 3;
++ if (s2->scrambling_sequence_selector) {
++ off += 3;
++ }
++ return tmp[off];
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/satellite_delivery_descriptor.h dvb-apps/lib/libucsi/dvb/satellite_delivery_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/satellite_delivery_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/satellite_delivery_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,73 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SATELLITE_DELIVERY_DESCRIPTOR
++#define _UCSI_DVB_SATELLITE_DELIVERY_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_satellite_delivery_descriptor structure.
++ */
++struct dvb_satellite_delivery_descriptor {
++ struct descriptor d;
++
++ uint32_t frequency; // BCD, units 10kHz
++ uint16_t orbital_position;
++ EBIT5(uint8_t west_east_flag : 1; ,
++ uint8_t polarization : 2; ,
++ uint8_t roll_off : 2; ,
++ uint8_t modulation_system : 1; ,
++ uint8_t modulation_type : 2; );
++ EBIT2(uint32_t symbol_rate : 28; , // BCD, units 100Hz
++ uint32_t fec_inner : 4; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_satellite_delivery_descriptor.
++ *
++ * @param d Pointer to a generic descriptor structure.
++ * @return dvb_satellite_delivery_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_satellite_delivery_descriptor*
++ dvb_satellite_delivery_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct dvb_satellite_delivery_descriptor) - 2))
++ return NULL;
++
++ bswap32((uint8_t*) d + 2);
++ bswap16((uint8_t*) d + 6);
++ bswap32((uint8_t*) d + 9);
++
++ return (struct dvb_satellite_delivery_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/scrambling_descriptor.h dvb-apps/lib/libucsi/dvb/scrambling_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/scrambling_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/scrambling_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,61 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SCRAMBLING_DESCRIPTOR
++#define _UCSI_DVB_SCRAMBLING_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_scrambling_descriptor structure.
++ */
++struct dvb_scrambling_descriptor {
++ struct descriptor d;
++
++ uint8_t scrambling_mode;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_scrambling_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to dvb_scrambling_descriptor, or NULL on error.
++ */
++static inline struct dvb_scrambling_descriptor*
++ dvb_scrambling_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_scrambling_descriptor) - 2))
++ return NULL;
++
++ return (struct dvb_scrambling_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sdt_section.c dvb-apps/lib/libucsi/dvb/sdt_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sdt_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/sdt_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,60 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/sdt_section.h>
++
++struct dvb_sdt_section * dvb_sdt_section_codec(struct section_ext * ext)
++{
++ uint8_t * buf = (uint8_t *) ext;
++ size_t pos = sizeof(struct section_ext);
++ size_t len = section_ext_length(ext);
++
++ if (len < sizeof(struct dvb_sdt_section))
++ return NULL;
++
++ bswap16(buf + pos);
++ pos += 3;
++
++ while (pos < len) {
++ struct dvb_sdt_service * service =
++ (struct dvb_sdt_service *)(buf + pos);
++
++ if ((pos + sizeof(struct dvb_sdt_service)) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++ bswap16(buf + pos + 3);
++ pos += sizeof(struct dvb_sdt_service);
++
++ if ((pos + service->descriptors_loop_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, service->descriptors_loop_length))
++ return NULL;
++
++ pos += service->descriptors_loop_length;
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return (struct dvb_sdt_section *) ext;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sdt_section.h dvb-apps/lib/libucsi/dvb/sdt_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sdt_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/sdt_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,157 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SDT_SECTION_H
++#define _UCSI_DVB_SDT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * dvb_sdt_section structure.
++ */
++struct dvb_sdt_section {
++ struct section_ext head;
++
++ uint16_t original_network_id;
++ uint8_t reserved;
++ /* struct dvb_sdt_service services[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the services field of a dvb_sdt_section.
++ */
++struct dvb_sdt_service {
++ uint16_t service_id;
++ EBIT3(uint8_t reserved : 6; ,
++ uint8_t eit_schedule_flag : 1; ,
++ uint8_t eit_present_following_flag : 1; );
++ EBIT3(uint16_t running_status : 3; ,
++ uint16_t free_ca_mode : 1; ,
++ uint16_t descriptors_loop_length :12; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_sdt_section.
++ *
++ * @param section Pointer to a generic section_ext structure.
++ * @return dvb_sdt_section pointer, or NULL on error.
++ */
++struct dvb_sdt_section * dvb_sdt_section_codec(struct section_ext *section);
++
++/**
++ * Accessor for the transport_stream_id field of an SDT.
++ *
++ * @param sdt SDT pointer.
++ * @return The transport_stream_id.
++ */
++static inline uint16_t dvb_sdt_section_transport_stream_id(struct dvb_sdt_section *sdt)
++{
++ return sdt->head.table_id_ext;
++}
++
++/**
++ * Iterator for the services field in a dvb_sdt_section.
++ *
++ * @param sdt dvb_sdt_section pointer.
++ * @param pos Variable containing a pointer to the current dvb_sdt_service.
++ */
++#define dvb_sdt_section_services_for_each(sdt, pos) \
++ for ((pos) = dvb_sdt_section_services_first(sdt); \
++ (pos); \
++ (pos) = dvb_sdt_section_services_next(sdt, pos))
++
++/**
++ * Iterator for the descriptors field in a dvb_sdt_service.
++ *
++ * @param service dvb_sdt_service pointer.
++ * @param pos Variable containing a pointer to the current descriptor.
++ */
++#define dvb_sdt_service_descriptors_for_each(service, pos) \
++ for ((pos) = dvb_sdt_service_descriptors_first(service); \
++ (pos); \
++ (pos) = dvb_sdt_service_descriptors_next(service, pos))
++
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_sdt_service *
++ dvb_sdt_section_services_first(struct dvb_sdt_section * sdt)
++{
++ size_t pos = sizeof(struct dvb_sdt_section);
++
++ if (pos >= section_ext_length(&sdt->head))
++ return NULL;
++
++ return (struct dvb_sdt_service*) ((uint8_t *) sdt + pos);
++}
++
++static inline struct dvb_sdt_service *
++ dvb_sdt_section_services_next(struct dvb_sdt_section * sdt,
++ struct dvb_sdt_service * pos)
++{
++ uint8_t *end = (uint8_t*) sdt + section_ext_length(&sdt->head);
++ uint8_t *next = (uint8_t*) pos + sizeof(struct dvb_sdt_service) +
++ pos->descriptors_loop_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_sdt_service *) next;
++}
++
++static inline struct descriptor *
++ dvb_sdt_service_descriptors_first(struct dvb_sdt_service *svc)
++{
++ if (svc->descriptors_loop_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t*) svc + sizeof(struct dvb_sdt_service));
++}
++
++static inline struct descriptor *
++ dvb_sdt_service_descriptors_next(struct dvb_sdt_service *svc,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) svc + sizeof(struct dvb_sdt_service),
++ svc->descriptors_loop_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/section.h dvb-apps/lib/libucsi/dvb/section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,108 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SECTION_H
++#define _UCSI_DVB_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/dvb/bat_section.h>
++#include <libucsi/dvb/dit_section.h>
++#include <libucsi/dvb/eit_section.h>
++#include <libucsi/dvb/nit_section.h>
++#include <libucsi/dvb/rst_section.h>
++#include <libucsi/dvb/sdt_section.h>
++#include <libucsi/dvb/sit_section.h>
++#include <libucsi/dvb/st_section.h>
++#include <libucsi/dvb/tdt_section.h>
++#include <libucsi/dvb/tot_section.h>
++#include <libucsi/dvb/tva_container_section.h>
++#include <libucsi/dvb/int_section.h>
++#include <libucsi/dvb/mpe_fec_section.h>
++
++/**
++ * The following are not implemented just now.
++ */
++/*
++#include <libucsi/dvb/tva_related_content_section.h>
++#include <libucsi/dvb/tva_content_identifier_section.h>
++#include <libucsi/dvb/tva_resolution_provider_notification_section.h>
++#include <libucsi/dvb/ait_section.h>
++#include <libucsi/dvb/cit_section.h>
++#include <libucsi/dvb/rct_section.h>
++#include <libucsi/dvb/rnt_section.h>
++*/
++
++#define TRANSPORT_NIT_PID 0x10
++#define TRANSPORT_SDT_PID 0x11
++#define TRANSPORT_BAT_PID 0x11
++#define TRANSPORT_EIT_PID 0x12
++#define TRANSPORT_CIT_PID 0x12
++#define TRANSPORT_RST_PID 0x13
++#define TRANSPORT_TDT_PID 0x14
++#define TRANSPORT_TOT_PID 0x14
++#define TRANSPORT_RNT_PID 0x16
++#define TRANSPORT_DIT_PID 0x1e
++#define TRANSPORT_SIT_PID 0x1f
++
++/**
++ * Enumeration of DVB section tags.
++ */
++enum dvb_section_tag {
++ stag_dvb_network_information_actual = 0x40,
++ stag_dvb_network_information_other = 0x41,
++
++ stag_dvb_service_description_actual = 0x42,
++ stag_dvb_service_description_other = 0x46,
++
++ stag_dvb_bouquet_association = 0x4a,
++ stag_dvb_update_notification = 0x4b, /* same syntax as IP_MAC */
++ stag_dvb_ip_mac_notification = 0x4c,
++
++ stag_dvb_event_information_nownext_actual = 0x4e,
++ stag_dvb_event_information_nownext_other = 0x4f,
++ stag_dvb_event_information_schedule_actual = 0x50, /* 0x50->0x5f */
++ stag_dvb_event_information_schedule_other = 0x60, /* 0x60->0x6f */
++
++ stag_dvb_time_date = 0x70,
++ stag_dvb_running_status = 0x71,
++ stag_dvb_stuffing = 0x72,
++ stag_dvb_time_offset = 0x73,
++ stag_dvb_application_information = 0x74,
++ stag_dvb_tva_container = 0x75,
++ stag_dvb_tva_related_content = 0x76,
++ stag_dvb_tva_content_identifier = 0x77,
++ stag_dvb_mpe_fec = 0x78,
++ stag_dvb_tva_resolution_provider_notification = 0x79,
++
++ stag_dvb_discontinuity_information = 0x7e,
++ stag_dvb_selection_information = 0x7f,
++
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_availability_descriptor.h dvb-apps/lib/libucsi/dvb/service_availability_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_availability_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/service_availability_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,98 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SERVICE_AVAILABILITY_DESCRIPTOR
++#define _UCSI_DVB_SERVICE_AVAILABILITY_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_service_availability_descriptor structure.
++ */
++struct dvb_service_availability_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t availability_flag : 1; ,
++ uint8_t reserved : 7; );
++ /* uint16_t cell_ids[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_service_availability_descriptor.
++ *
++ * @param d Pointer to a generic descriptor structure.
++ * @return dvb_service_availability_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_service_availability_descriptor*
++ dvb_service_availability_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint8_t* buf = (uint8_t*) d + 2;
++ uint32_t len = d->len;
++
++ pos += sizeof(struct dvb_service_availability_descriptor) - 2;
++
++ if ((len - pos) % 2)
++ return NULL;
++
++ while(pos < len) {
++ bswap16(buf+pos);
++ pos += 2;
++ }
++
++ return (struct dvb_service_availability_descriptor*) d;
++}
++
++/**
++ * Accessor for the cell_ids field of a dvb_service_availability_descriptor.
++ *
++ * @param d dvb_service_availability_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint16_t *
++ dvb_service_availability_descriptor_cell_ids(struct dvb_service_availability_descriptor *d)
++{
++ return (uint16_t *) ((uint8_t *) d + sizeof(struct dvb_service_availability_descriptor));
++}
++
++/**
++ * Determine the number of entries in the cell_ids field of a dvb_service_availability_descriptor.
++ *
++ * @param d dvb_service_availability_descriptor pointer.
++ * @return The number of entries.
++ */
++static inline int
++ dvb_service_availability_descriptor_cell_ids_count(struct dvb_service_availability_descriptor *d)
++{
++ return (d->d.len - 1) >> 1;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_descriptor.h dvb-apps/lib/libucsi/dvb/service_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/service_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,163 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SERVICE_DESCRIPTOR
++#define _UCSI_DVB_SERVICE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Possible values for service_type.
++ */
++enum {
++ DVB_SERVICE_TYPE_DIGITAL_TV = 0x01,
++ DVB_SERVICE_TYPE_DIGITAL_RADIO = 0x02,
++ DVB_SERVICE_TYPE_TELETEXT = 0x03,
++ DVB_SERVICE_TYPE_NVOD_REF = 0x04,
++ DVB_SERVICE_TYPE_NVOD_TIMESHIFT = 0x05,
++ DVB_SERVICE_TYPE_MOSAIC = 0x06,
++ DVB_SERVICE_TYPE_PAL = 0x07,
++ DVB_SERVICE_TYPE_SECAM = 0x08,
++ DVB_SERVICE_TYPE_D_D2_MAC = 0x09,
++ DVB_SERVICE_TYPE_FM_RADIO = 0x0a,
++ DVB_SERVICE_TYPE_NTSC = 0x0b,
++ DVB_SERVICE_TYPE_DATA_BCAST = 0x0c,
++ DVB_SERVICE_TYPE_EN50221 = 0x0d,
++ DVB_SERVICE_TYPE_RCS_MAP = 0x0e,
++ DVB_SERVICE_TYPE_RCS_FLS = 0x0f,
++ DVB_SERVICE_TYPE_MHP = 0x10,
++ DVB_SERVICE_TYPE_MPEG2_HD_DIGITAL_TV = 0x11,
++ DVB_SERVICE_TYPE_ADVANCED_CODEC_SD_DIGITAL_TV = 0x16,
++ DVB_SERVICE_TYPE_ADVANCED_CODEC_SD_NVOD_TIMESHIFT = 0x17,
++ DVB_SERVICE_TYPE_ADVANCED_CODEC_SD_NVOD_REF = 0x18,
++ DVB_SERVICE_TYPE_ADVANCED_CODEC_HD_DIGITAL_TV = 0x19,
++ DVB_SERVICE_TYPE_ADVANCED_CODEC_HD_NVOD_TIMESHIFT = 0x1a,
++ DVB_SERVICE_TYPE_ADVANCED_CODEC_HD_NVOD_REF = 0x1b,
++};
++
++/**
++ * dvb_service_descriptor structure.
++ */
++struct dvb_service_descriptor {
++ struct descriptor d;
++
++ uint8_t service_type;
++ uint8_t service_provider_name_length;
++ /* uint8_t service_provider_name[] */
++ /* struct dvb_service_descriptor_part2 part2 */
++} __ucsi_packed;
++
++/**
++ * Second part of a dvb_service_descriptor following the variable length
++ * service_provider_name field.
++ */
++struct dvb_service_descriptor_part2 {
++ uint8_t service_name_length;
++ /* uint8_t service_name[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_service_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_service_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_service_descriptor*
++ dvb_service_descriptor_codec(struct descriptor* d)
++{
++ struct dvb_service_descriptor *p =
++ (struct dvb_service_descriptor *) d;
++ struct dvb_service_descriptor_part2 *p2;
++ uint32_t pos = sizeof(struct dvb_service_descriptor) - 2;
++ uint32_t len = d->len;
++
++ if (pos > len)
++ return NULL;
++
++ pos += p->service_provider_name_length;
++
++ if (pos > len)
++ return NULL;
++
++ p2 = (struct dvb_service_descriptor_part2*) ((uint8_t*) d + 2 + pos);
++
++ pos += sizeof(struct dvb_service_descriptor_part2);
++
++ if (pos > len)
++ return NULL;
++
++ pos += p2->service_name_length;
++
++ if (pos != len)
++ return NULL;
++
++ return p;
++}
++
++/**
++ * Accessor for the service_provider_name field of a dvb_service_descriptor.
++ *
++ * @param d dvb_service_descriptor pointer.
++ * @return Pointer to the service_provider_name field.
++ */
++static inline uint8_t *
++ dvb_service_descriptor_service_provider_name(struct dvb_service_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_service_descriptor);
++}
++
++/**
++ * Accessor for the second part of a dvb_service_descriptor.
++ *
++ * @param d dvb_service_descriptor pointer.
++ * @return dvb_service_descriptor_part2 pointer.
++ */
++static inline struct dvb_service_descriptor_part2 *
++ dvb_service_descriptor_part2(struct dvb_service_descriptor *d)
++{
++ return (struct dvb_service_descriptor_part2 *)
++ ((uint8_t*) d + sizeof(struct dvb_service_descriptor) +
++ d->service_provider_name_length);
++}
++
++/**
++ * Accessor for the service_name field of a dvb_service_descriptor_part2.
++ *
++ * @param d dvb_service_descriptor_part2 pointer.
++ * @return Pointer to the service_name field.
++ */
++static inline uint8_t *
++ dvb_service_descriptor_service_name(struct dvb_service_descriptor_part2 *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_service_descriptor_part2);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/service_identifier_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_identifier_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/service_identifier_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,82 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SERVICE_IDENTIFIER_DESCRIPTOR
++#define _UCSI_DVB_SERVICE_IDENTIFIER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_service_identifier_descriptor.
++ */
++struct dvb_service_identifier_descriptor {
++ struct descriptor d;
++
++ /* uint8_t identifier[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_service_identifier_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_service_identifier_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_service_identifier_descriptor*
++ dvb_service_identifier_descriptor_codec(struct descriptor* d)
++{
++ return (struct dvb_service_identifier_descriptor*) d;
++}
++
++/**
++ * Retrieve a pointer to the identifier field of a dvb_service_identifier_descriptor.
++ *
++ * @param d dvb_service_identifier_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_service_identifier_descriptor_identifier(struct dvb_service_identifier_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_service_identifier_descriptor);
++}
++
++/**
++ * Calculate length of the identifier field of a dvb_service_identifier_descriptor.
++ *
++ * @param d dvb_service_identifier_descriptor pointer.
++ * @return The length in bytes.
++ */
++static inline int
++ dvb_service_identifier_descriptor_identifier_length(struct dvb_service_identifier_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_list_descriptor.h dvb-apps/lib/libucsi/dvb/service_list_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_list_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/service_list_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,122 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SERVICE_LIST_DESCRIPTOR
++#define _UCSI_DVB_SERVICE_LIST_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_service_list_descriptor structure.
++ */
++struct dvb_service_list_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_service_list_service services[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the services field of a dvb_service_list_descriptor.
++ */
++struct dvb_service_list_service {
++ uint16_t service_id;
++ uint8_t service_type;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_service_list_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_service_list_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_service_list_descriptor*
++ dvb_service_list_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++ uint8_t *p = (uint8_t*) d + 2;
++
++ if (len % sizeof(struct dvb_service_list_service))
++ return NULL;
++
++ while(pos < len) {
++ bswap16(p+pos);
++ pos += sizeof(struct dvb_service_list_service);
++ }
++
++ return (struct dvb_service_list_descriptor*) d;
++}
++
++/**
++ * Iterator for services field in a dvb_service_list_descriptor.
++ *
++ * @param d dvb_service_list_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_service_list_service.
++ */
++#define dvb_service_list_descriptor_services_for_each(d, pos) \
++ for ((pos) = dvb_service_list_descriptor_services_first(d); \
++ (pos); \
++ (pos) = dvb_service_list_descriptor_services_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_service_list_service*
++ dvb_service_list_descriptor_services_first(struct dvb_service_list_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_service_list_service *)
++ ((uint8_t*) d + sizeof(struct dvb_service_list_descriptor));
++}
++
++static inline struct dvb_service_list_service*
++ dvb_service_list_descriptor_services_next(struct dvb_service_list_descriptor *d,
++ struct dvb_service_list_service *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_service_list_service);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_service_list_service *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_move_descriptor.h dvb-apps/lib/libucsi/dvb/service_move_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/service_move_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/service_move_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,67 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SERVICE_MOVE_DESCRIPTOR
++#define _UCSI_DVB_SERVICE_MOVE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_service_move_descriptor structure.
++ */
++struct dvb_service_move_descriptor {
++ struct descriptor d;
++
++ uint16_t new_original_network_id;
++ uint16_t new_transport_stream_id;
++ uint16_t new_service_id;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_service_move_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to dvb_service_move_descriptor, or NULL on error.
++ */
++static inline struct dvb_service_move_descriptor*
++ dvb_service_move_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_service_move_descriptor) - 2))
++ return NULL;
++
++ bswap16((uint8_t*) d + 2);
++ bswap16((uint8_t*) d + 4);
++ bswap16((uint8_t*) d + 6);
++
++ return (struct dvb_service_move_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/short_event_descriptor.h dvb-apps/lib/libucsi/dvb/short_event_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/short_event_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/short_event_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,135 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SHORT_EVENT_DESCRIPTOR
++#define _UCSI_DVB_SHORT_EVENT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_short_event_descriptor structure.
++ */
++struct dvb_short_event_descriptor {
++ struct descriptor d;
++
++ iso639lang_t language_code;
++ uint8_t event_name_length;
++ /* uint8_t event_name[] */
++ /* struct dvb_short_event_descriptor_part2 part2 */
++} __ucsi_packed;
++
++/**
++ * Second part of a dvb_short_event_descriptor, following the variable length
++ * name field.
++ */
++struct dvb_short_event_descriptor_part2 {
++ uint8_t text_length;
++ /* uint8_t text[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_short_event_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_short_event_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_short_event_descriptor*
++ dvb_short_event_descriptor_codec(struct descriptor* d)
++{
++ struct dvb_short_event_descriptor *p =
++ (struct dvb_short_event_descriptor*) d;
++ struct dvb_short_event_descriptor_part2 *p2;
++ uint32_t pos = sizeof(struct dvb_short_event_descriptor) - 2;
++ uint32_t len = d->len;
++
++ if (pos > len)
++ return NULL;
++
++ pos += p->event_name_length;
++
++ if (pos > len)
++ return NULL;
++
++ p2 = (struct dvb_short_event_descriptor_part2*) ((uint8_t*) d + 2 + pos);
++
++ pos += sizeof(struct dvb_short_event_descriptor_part2);
++
++ if (pos > len)
++ return NULL;
++
++ pos += p2->text_length;
++
++ if (pos != len)
++ return NULL;
++
++ return p;
++}
++
++/**
++ * Accessor for name field in a dvb_short_event_descriptor.
++ *
++ * @param d dvb_short_event_descriptor pointer.
++ * @return Pointer to name field.
++ */
++static inline uint8_t *
++ dvb_short_event_descriptor_event_name(struct dvb_short_event_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_short_event_descriptor);
++}
++
++/**
++ * Accessor for second part of a dvb_short_event_descriptor.
++ *
++ * @param d dvb_short_event_descriptor pointer.
++ * @return dvb_short_event_descriptor_part2 pointer.
++ */
++static inline struct dvb_short_event_descriptor_part2 *
++ dvb_short_event_descriptor_part2(struct dvb_short_event_descriptor *d)
++{
++ return (struct dvb_short_event_descriptor_part2 *)
++ ((uint8_t*) d + sizeof(struct dvb_short_event_descriptor) +
++ d->event_name_length);
++}
++
++/**
++ * Accessor for text field in a dvb_short_event_descriptor_part2.
++ *
++ * @param d dvb_short_event_descriptor_part2 pointer.
++ * @return Pointer to text field.
++ */
++static inline uint8_t *
++ dvb_short_event_descriptor_text(struct dvb_short_event_descriptor_part2 *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_short_event_descriptor_part2);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/short_smoothing_buffer_descriptor.h dvb-apps/lib/libucsi/dvb/short_smoothing_buffer_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/short_smoothing_buffer_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/short_smoothing_buffer_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,87 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SHORT_SMOOTHING_BUFFER_DESCRIPTOR
++#define _UCSI_DVB_SHORT_SMOOTHING_BUFFER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_short_smoothing_buffer_descriptor structure.
++ */
++struct dvb_short_smoothing_buffer_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t sb_size : 2; ,
++ uint8_t sb_leak_rate : 6; );
++ /* uint8_t reserved [] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_short_smoothing_buffer_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_short_smoothing_buffer_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_short_smoothing_buffer_descriptor*
++ dvb_short_smoothing_buffer_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct dvb_short_smoothing_buffer_descriptor) - 2))
++ return NULL;
++
++ return (struct dvb_short_smoothing_buffer_descriptor*) d;
++}
++
++/**
++ * Accessor for reserved field in a dvb_short_smoothing_buffer_descriptor.
++ *
++ * @param d dvb_short_smoothing_buffer_descriptor pointer.
++ * @return Pointer to reserved field.
++ */
++static inline uint8_t *
++ dvb_short_smoothing_buffer_descriptor_reserved(struct dvb_short_smoothing_buffer_descriptor *d)
++{
++ return (uint8_t*) d + sizeof(struct dvb_short_smoothing_buffer_descriptor);
++}
++
++/**
++ * Calculate length of reserved field in a dvb_short_smoothing_buffer_descriptor.
++ *
++ * @param d dvb_short_smoothing_buffer_descriptor pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ dvb_short_smoothing_buffer_descriptor_reserved_length(struct dvb_short_smoothing_buffer_descriptor *d)
++{
++ return d->d.len - 1;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sit_section.c dvb-apps/lib/libucsi/dvb/sit_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sit_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/sit_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,69 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/sit_section.h>
++
++struct dvb_sit_section * dvb_sit_section_codec(struct section_ext * ext)
++{
++ uint8_t * buf = (uint8_t *) ext;
++ struct dvb_sit_section * ret = (struct dvb_sit_section *) ext;
++ size_t pos = sizeof(struct section_ext);
++ size_t len = section_ext_length(ext);
++
++ if (len < sizeof(struct dvb_sit_section))
++ return NULL;
++
++ bswap16(buf + pos);
++ pos += 2;
++
++ if ((pos + ret->transmission_info_loop_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, ret->transmission_info_loop_length))
++ return NULL;
++
++ pos += ret->transmission_info_loop_length;
++
++ while (pos < len) {
++ struct dvb_sit_service * service = (void*)(buf + pos);
++
++ if ((pos + sizeof(struct dvb_sit_service)) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++ bswap16(buf + pos + 2);
++ bswap16(buf + pos + 4);
++ pos += sizeof(struct dvb_sit_service);
++
++ if ((pos + service->service_loop_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, service->service_loop_length))
++ return NULL;
++
++ pos += service->service_loop_length;
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return ret;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sit_section.h dvb-apps/lib/libucsi/dvb/sit_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/sit_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/sit_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,173 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SIT_SECTION_H
++#define _UCSI_DVB_SIT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * dvb_sit_section structure.
++ */
++struct dvb_sit_section {
++ struct section_ext head;
++
++ EBIT2(uint16_t reserved : 4; ,
++ uint16_t transmission_info_loop_length :12; );
++ /* struct descriptor descriptors[] */
++ /* struct dvb_sit_service services[] */
++};
++
++/**
++ * An entry in the services field of a dvb_sit_section.
++ */
++struct dvb_sit_service {
++ uint16_t service_id;
++ EBIT3(uint16_t reserved : 1; ,
++ uint16_t running_status : 3; ,
++ uint16_t service_loop_length :12; );
++ /* struct descriptor descriptors[] */
++};
++
++/**
++ * Process a dvb_sit_section.
++ *
++ * @param section Generic section_ext structure.
++ * @return dvb_sit_section pointer, or NULL on error.
++ */
++struct dvb_sit_section * dvb_sit_section_codec(struct section_ext *section);
++
++/**
++ * Iterator for descriptors field in a dvb_sit_section.
++ *
++ * @param sit dvb_sit_section Pointer.
++ * @param pos Variable holding pointer to current descriptor.
++ */
++#define dvb_sit_section_descriptors_for_each(sit, pos) \
++ for ((pos) = dvb_sit_section_descriptors_first(sit); \
++ (pos); \
++ (pos) = dvb_sit_section_descriptors_first(sit))
++
++/**
++ * Iterator for services field in a dvb_sit_section.
++ *
++ * @param sit dvb_sit_section Pointer.
++ * @param pos Variable holding pointer to current dvb_sit_service.
++ */
++#define dvb_sit_section_services_for_each(sit, pos) \
++ for ((pos) = dvb_sit_section_services_first(sit); \
++ (pos); \
++ (pos) = dvb_sit_section_services_next(sit, pos))
++
++/**
++ * Iterator for descriptors field in a dvb_sit_service.
++ *
++ * @param service dvb_sit_service Pointer.
++ * @param pos Variable holding pointer to current descriptor.
++ */
++#define dvb_sit_service_descriptors_for_each(service, pos) \
++ for ((pos) = dvb_sit_service_descriptors_first(service); \
++ (pos); \
++ (pos) = dvb_sit_service_descriptors_next(service, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct descriptor *
++ dvb_sit_section_descriptors_first(struct dvb_sit_section *sit)
++{
++ if (sit->transmission_info_loop_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) sit + sizeof(struct dvb_sit_section));
++}
++
++static inline struct descriptor *
++ dvb_sit_section_descriptors_next(struct dvb_sit_section *sit,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) sit + sizeof(struct dvb_sit_section),
++ sit->transmission_info_loop_length,
++ pos);
++}
++
++static inline struct dvb_sit_service *
++ dvb_sit_section_services_first(struct dvb_sit_section *sit)
++{
++ size_t pos = sizeof(struct dvb_sit_section) + sit->transmission_info_loop_length;
++
++ if (pos >= section_ext_length(&sit->head))
++ return NULL;
++
++ return (struct dvb_sit_service*) ((uint8_t *) sit + pos);
++}
++
++static inline struct dvb_sit_service *
++ dvb_sit_section_services_next(struct dvb_sit_section *sit,
++ struct dvb_sit_service *pos)
++{
++ uint8_t *end = (uint8_t*) sit + section_ext_length(&sit->head);
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_sit_service) +
++ pos->service_loop_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_sit_service *) next;
++}
++
++static inline struct descriptor *
++ dvb_sit_service_descriptors_first(struct dvb_sit_service * t)
++{
++ if (t->service_loop_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) t + sizeof(struct dvb_sit_service));
++}
++
++static inline struct descriptor *
++ dvb_sit_service_descriptors_next(struct dvb_sit_service *t,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t*) t + sizeof(struct dvb_sit_service),
++ t->service_loop_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/stream_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/stream_identifier_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/stream_identifier_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/stream_identifier_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,61 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_STREAM_IDENTIFIER_DESCRIPTOR
++#define _UCSI_DVB_STREAM_IDENTIFIER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_stream_identifier_descriptor structure.
++ */
++struct dvb_stream_identifier_descriptor {
++ struct descriptor d;
++
++ uint8_t component_tag;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_stream_identifier_descriptor.
++ *
++ * @param d Pointer to generic descriptor structure.
++ * @return dvb_stream_identifier_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_stream_identifier_descriptor*
++ dvb_stream_identifier_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_stream_identifier_descriptor) - 2))
++ return NULL;
++
++ return (struct dvb_stream_identifier_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/st_section.c dvb-apps/lib/libucsi/dvb/st_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/st_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/st_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,29 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/st_section.h>
++
++struct dvb_st_section * dvb_st_section_codec(struct section * section)
++{
++ struct dvb_st_section * ret = (struct dvb_st_section *)section;
++
++ return ret;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/st_section.h dvb-apps/lib/libucsi/dvb/st_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/st_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/st_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,77 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_ST_SECTION_H
++#define _UCSI_DVB_ST_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * dvb_st_section structure.
++ */
++struct dvb_st_section {
++ struct section head;
++
++ /* uint8_t data[] */
++};
++
++/**
++ * Process a dvb_st_section.
++ *
++ * @param section Generic section header.
++ * @return dvb_st_section pointer, or NULL on error.
++ */
++struct dvb_st_section *dvb_st_section_codec(struct section *section);
++
++/**
++ * Accessor for data field of dvb_st_section.
++ *
++ * @param st dvb_st_section Pointer.
++ * @return Pointer to field.
++ */
++static inline uint8_t*
++ dvb_st_section_data(struct dvb_st_section* st)
++{
++ return (uint8_t*) st + sizeof(struct dvb_st_section);
++}
++
++/**
++ * Calculate length of data field of dvb_st_section.
++ *
++ * @param st dvb_st_section Pointer.
++ * @return Length in bytes.
++ */
++static inline int
++ dvb_st_section_data_length(struct dvb_st_section* st)
++{
++ return st->head.length;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/stuffing_descriptor.h dvb-apps/lib/libucsi/dvb/stuffing_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/stuffing_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/stuffing_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,82 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_STUFFING_DESCRIPTOR
++#define _UCSI_DVB_STUFFING_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_stuffing_descriptor.
++ */
++struct dvb_stuffing_descriptor {
++ struct descriptor d;
++
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_stuffing_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_stuffing_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_stuffing_descriptor*
++ dvb_stuffing_descriptor_codec(struct descriptor* d)
++{
++ return (struct dvb_stuffing_descriptor*) d;
++}
++
++/**
++ * Retrieve a pointer to the data field of a dvb_stuffing_descriptor.
++ *
++ * @param d dvb_stuffing_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ dvb_stuffing_descriptor_data(struct dvb_stuffing_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_stuffing_descriptor);
++}
++
++/**
++ * Calculate length of the data field of a dvb_stuffing_descriptor.
++ *
++ * @param d dvb_stuffing_descriptor pointer.
++ * @return The length in bytes.
++ */
++static inline int
++ dvb_stuffing_descriptor_data_length(struct dvb_stuffing_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/subtitling_descriptor.h dvb-apps/lib/libucsi/dvb/subtitling_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/subtitling_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/subtitling_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,126 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_SUBTITLING_DESCRIPTOR
++#define _UCSI_DVB_SUBTITLING_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_subtitling_descriptor structure.
++ */
++struct dvb_subtitling_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_subtitling_entry subtitles[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the subtitles field of the a dvb_subtitling_descriptor.
++ */
++struct dvb_subtitling_entry {
++ iso639lang_t language_code;
++ uint8_t subtitling_type;
++ uint16_t composition_page_id;
++ uint16_t ancillary_page_id;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_subtitling_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return dvb_subtitling_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_subtitling_descriptor*
++ dvb_subtitling_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint8_t* ptr = (uint8_t*) d + 2;
++ uint32_t len = d->len;
++
++ if (len % sizeof(struct dvb_subtitling_entry))
++ return NULL;
++
++ while(pos < len) {
++ bswap16(ptr+pos+4);
++ bswap16(ptr+pos+6);
++ pos += sizeof(struct dvb_subtitling_entry);
++ }
++
++ return (struct dvb_subtitling_descriptor*) d;
++}
++
++/**
++ * Iterator for subtitles field in dvb_subtitling_descriptor.
++ *
++ * @param d dvb_subtitling_descriptor pointer.
++ * @param pos Variable containing a pointer to current dvb_subtitling_entry.
++ */
++#define dvb_subtitling_descriptor_subtitles_for_each(d, pos) \
++ for ((pos) = dvb_subtitling_descriptor_subtitles_first(d); \
++ (pos); \
++ (pos) = dvb_subtitling_descriptor_subtitles_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_subtitling_entry*
++ dvb_subtitling_descriptor_subtitles_first(struct dvb_subtitling_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_subtitling_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_subtitling_descriptor));
++}
++
++static inline struct dvb_subtitling_entry*
++ dvb_subtitling_descriptor_subtitles_next(struct dvb_subtitling_descriptor *d,
++ struct dvb_subtitling_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_subtitling_entry);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_subtitling_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_address_descriptor.h dvb-apps/lib/libucsi/dvb/target_ip_address_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_address_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/target_ip_address_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TARGET_IP_ADDRESS_DESCRIPTOR
++#define _UCSI_DVB_TARGET_IP_ADDRESS_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_target_ip_address_descriptor structure.
++ */
++struct dvb_target_ip_address_descriptor {
++ struct descriptor d;
++
++ uint8_t ipv4_addr_mask[4];
++ /* struct dvb_ipv4_addr ipv4_addr[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the ipv4_addr field of a dvb_target_ip_address_descriptor.
++ */
++struct dvb_ipv4_addr {
++ uint8_t ipv4_addr[4];
++} __ucsi_packed;
++
++/**
++ * Process a dvb_target_ip_address_descriptor.
++ *
++ * @param d Generic descriptor structure pointer.
++ * @return dvb_target_ip_address_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_target_ip_address_descriptor*
++ dvb_target_ip_address_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len - 4;
++
++ if (len % sizeof(struct dvb_ipv4_addr))
++ return NULL;
++
++ return (struct dvb_target_ip_address_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the ipv4_addr field of a dvb_target_ip_address_descriptor.
++ *
++ * @param d dvb_target_ip_address_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_ipv4_addr.
++ */
++#define dvb_target_ip_address_descriptor_ipv4_addr_for_each(d, pos) \
++ for ((pos) = dvb_target_ip_address_descriptor_ipv4_addr_first(d); \
++ (pos); \
++ (pos) = dvb_target_ip_address_descriptor_ipv4_addr_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ipv4_addr*
++ dvb_target_ip_address_descriptor_ipv4_addr_first(struct dvb_target_ip_address_descriptor *d)
++{
++ if (d->d.len == 4)
++ return NULL;
++
++ return (struct dvb_ipv4_addr *)
++ ((uint8_t*) d + sizeof(struct dvb_target_ip_address_descriptor));
++}
++
++static inline struct dvb_ipv4_addr*
++ dvb_target_ip_address_descriptor_ipv4_addr_next(struct dvb_target_ip_address_descriptor *d,
++ struct dvb_ipv4_addr *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len - 4;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv4_addr);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_ipv4_addr *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_slash_descriptor.h dvb-apps/lib/libucsi/dvb/target_ip_slash_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_slash_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/target_ip_slash_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TARGET_IP_SLASH_DESCRIPTOR
++#define _UCSI_DVB_TARGET_IP_SLASH_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_target_ip_slash_descriptor structure.
++ */
++struct dvb_target_ip_slash_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_ipv4_slash ipv4_slash[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the ipv4_slash field of a dvb_target_ip_slash_descriptor.
++ */
++struct dvb_ipv4_slash {
++ uint8_t ipv4_addr[4];
++ uint8_t ipv4_slash;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_target_ip_slash_descriptor.
++ *
++ * @param d Generic descriptor structure pointer.
++ * @return dvb_target_ip_slash_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_target_ip_slash_descriptor*
++ dvb_target_ip_slash_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len;
++
++ if (len % sizeof(struct dvb_ipv4_slash))
++ return NULL;
++
++ return (struct dvb_target_ip_slash_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the ipv4_slash field of a dvb_target_ip_slash_descriptor.
++ *
++ * @param d dvb_target_ip_slash_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_ipv4_slash.
++ */
++#define dvb_target_ip_slash_descriptor_ipv4_slash_for_each(d, pos) \
++ for ((pos) = dvb_target_ip_slash_descriptor_ipv4_slash_first(d); \
++ (pos); \
++ (pos) = dvb_target_ip_slash_descriptor_ipv4_slash_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ipv4_slash*
++ dvb_target_ip_slash_descriptor_ipv4_slash_first(struct dvb_target_ip_slash_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_ipv4_slash *)
++ ((uint8_t*) d + sizeof(struct dvb_target_ip_slash_descriptor));
++}
++
++static inline struct dvb_ipv4_slash*
++ dvb_target_ip_slash_descriptor_ipv4_slash_next(struct dvb_target_ip_slash_descriptor *d,
++ struct dvb_ipv4_slash *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv4_slash);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_ipv4_slash *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_source_slash_descriptor.h dvb-apps/lib/libucsi/dvb/target_ip_source_slash_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ip_source_slash_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/target_ip_source_slash_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,118 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TARGET_IP_SOURCE_SLASH_DESCRIPTOR
++#define _UCSI_DVB_TARGET_IP_SOURCE_SLASH_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_target_ip_source_slash_descriptor structure.
++ */
++struct dvb_target_ip_source_slash_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_ipv4_source_slash ipv4_source_slash[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the ipv4_source_slash field of a dvb_target_ip_source_slash_descriptor.
++ */
++struct dvb_ipv4_source_slash {
++ uint8_t ipv4_source_addr[4];
++ uint8_t ipv4_source_slash;
++ uint8_t ipv4_dest_addr[4];
++ uint8_t ipv4_dest_slash;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_target_ip_source_slash_descriptor.
++ *
++ * @param d Generic descriptor structure pointer.
++ * @return dvb_target_ip_source_slash_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_target_ip_source_slash_descriptor*
++ dvb_target_ip_source_slash_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len;
++
++ if (len % sizeof(struct dvb_ipv4_source_slash))
++ return NULL;
++
++ return (struct dvb_target_ip_source_slash_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the ipv4_source_slash field of a dvb_target_ip_source_slash_descriptor.
++ *
++ * @param d dvb_target_ip_source_slash_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_ipv4_source_slash.
++ */
++#define dvb_target_ip_source_slash_descriptor_ipv4_source_slash_for_each(d, pos) \
++ for ((pos) = dvb_target_ip_source_slash_descriptor_ipv4_source_slash_first(d); \
++ (pos); \
++ (pos) = dvb_target_ip_source_slash_descriptor_ipv4_source_slash_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ipv4_source_slash*
++ dvb_target_ip_source_slash_descriptor_ipv4_source_slash_first(struct dvb_target_ip_source_slash_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_ipv4_source_slash *)
++ ((uint8_t*) d + sizeof(struct dvb_target_ip_source_slash_descriptor));
++}
++
++static inline struct dvb_ipv4_source_slash*
++ dvb_target_ip_source_slash_descriptor_ipv4_source_slash_next(struct dvb_target_ip_source_slash_descriptor *d,
++ struct dvb_ipv4_source_slash *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv4_source_slash);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_ipv4_source_slash *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_address_descriptor.h dvb-apps/lib/libucsi/dvb/target_ipv6_address_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_address_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/target_ipv6_address_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TARGET_IPV6_ADDRESS_DESCRIPTOR
++#define _UCSI_DVB_TARGET_IPV6_ADDRESS_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_target_ipv6_address_descriptor structure.
++ */
++struct dvb_target_ipv6_address_descriptor {
++ struct descriptor d;
++
++ uint8_t ipv6_addr_mask[16];
++ /* struct dvb_ipv6_addr ipv6_addr[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the ipv6_addr field of a dvb_target_ipv6_address_descriptor.
++ */
++struct dvb_ipv6_addr {
++ uint8_t ipv6_addr[16];
++} __ucsi_packed;
++
++/**
++ * Process a dvb_target_ipv6_address_descriptor.
++ *
++ * @param d Generic descriptor structure pointer.
++ * @return dvb_target_ipv6_address_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_target_ipv6_address_descriptor*
++ dvb_target_ipv6_address_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len - 16;
++
++ if (len % sizeof(struct dvb_ipv6_addr))
++ return NULL;
++
++ return (struct dvb_target_ipv6_address_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the ipv6_addr field of a dvb_target_ipv6_address_descriptor.
++ *
++ * @param d dvb_target_ipv6_address_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_ipv6_addr.
++ */
++#define dvb_target_ipv6_address_descriptor_ipv6_addr_for_each(d, pos) \
++ for ((pos) = dvb_target_ipv6_address_descriptor_ipv6_addr_first(d); \
++ (pos); \
++ (pos) = dvb_target_ipv6_address_descriptor_ipv6_addr_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ipv6_addr*
++ dvb_target_ipv6_address_descriptor_ipv6_addr_first(struct dvb_target_ipv6_address_descriptor *d)
++{
++ if (d->d.len == 16)
++ return NULL;
++
++ return (struct dvb_ipv6_addr *)
++ ((uint8_t*) d + sizeof(struct dvb_target_ipv6_address_descriptor));
++}
++
++static inline struct dvb_ipv6_addr*
++ dvb_target_ipv6_address_descriptor_ipv6_addr_next(struct dvb_target_ipv6_address_descriptor *d,
++ struct dvb_ipv6_addr *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len - 16;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv6_addr);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_ipv6_addr *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_slash_descriptor.h dvb-apps/lib/libucsi/dvb/target_ipv6_slash_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_slash_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/target_ipv6_slash_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TARGET_IPV6_SLASH_DESCRIPTOR
++#define _UCSI_DVB_TARGET_IPV6_SLASH_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_target_ipv6_slash_descriptor structure.
++ */
++struct dvb_target_ipv6_slash_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_ipv6_slash ipv6_slash[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the ipv6_slash field of a dvb_target_ipv6_slash_descriptor.
++ */
++struct dvb_ipv6_slash {
++ uint8_t ipv6_addr[16];
++ uint8_t ipv6_slash;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_target_ipv6_slash_descriptor.
++ *
++ * @param d Generic descriptor structure pointer.
++ * @return dvb_target_ipv6_slash_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_target_ipv6_slash_descriptor*
++ dvb_target_ipv6_slash_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len;
++
++ if (len % sizeof(struct dvb_ipv6_slash))
++ return NULL;
++
++ return (struct dvb_target_ipv6_slash_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the ipv6_slash field of a dvb_target_ipv6_slash_descriptor.
++ *
++ * @param d dvb_target_ipv6_slash_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_ipv6_slash.
++ */
++#define dvb_target_ipv6_slash_descriptor_ipv6_slash_for_each(d, pos) \
++ for ((pos) = dvb_target_ipv6_slash_descriptor_ipv6_slash_first(d); \
++ (pos); \
++ (pos) = dvb_target_ipv6_slash_descriptor_ipv6_slash_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ipv6_slash*
++ dvb_target_ipv6_slash_descriptor_ipv6_slash_first(struct dvb_target_ipv6_slash_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_ipv6_slash *)
++ ((uint8_t*) d + sizeof(struct dvb_target_ipv6_slash_descriptor));
++}
++
++static inline struct dvb_ipv6_slash*
++ dvb_target_ipv6_slash_descriptor_ipv6_slash_next(struct dvb_target_ipv6_slash_descriptor *d,
++ struct dvb_ipv6_slash *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv6_slash);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_ipv6_slash *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h dvb-apps/lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/target_ipv6_source_slash_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,118 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TARGET_IPV6_SOURCE_SLASH_DESCRIPTOR
++#define _UCSI_DVB_TARGET_IPV6_SOURCE_SLASH_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_target_ipv6_source_slash_descriptor structure.
++ */
++struct dvb_target_ipv6_source_slash_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_ipv6_source_slash ipv6_source_slash[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the ipv6_source_slash field of a dvb_target_ipv6_source_slash_descriptor.
++ */
++struct dvb_ipv6_source_slash {
++ uint8_t ipv6_source_addr[16];
++ uint8_t ipv6_source_slash;
++ uint8_t ipv6_dest_addr[16];
++ uint8_t ipv6_dest_slash;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_target_ipv6_source_slash_descriptor.
++ *
++ * @param d Generic descriptor structure pointer.
++ * @return dvb_target_ipv6_source_slash_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_target_ipv6_source_slash_descriptor*
++ dvb_target_ipv6_source_slash_descriptor_codec(struct descriptor* d)
++{
++ uint32_t len = d->len;
++
++ if (len % sizeof(struct dvb_ipv6_source_slash))
++ return NULL;
++
++ return (struct dvb_target_ipv6_source_slash_descriptor*) d;
++}
++
++/**
++ * Iterator for entries in the ipv6_source_slash field of a dvb_target_ipv6_source_slash_descriptor.
++ *
++ * @param d dvb_target_ipv6_source_slash_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_ipv6_source_slash.
++ */
++#define dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_for_each(d, pos) \
++ for ((pos) = dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_first(d); \
++ (pos); \
++ (pos) = dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_ipv6_source_slash*
++ dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_first(struct dvb_target_ipv6_source_slash_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_ipv6_source_slash *)
++ ((uint8_t*) d + sizeof(struct dvb_target_ipv6_source_slash_descriptor));
++}
++
++static inline struct dvb_ipv6_source_slash*
++ dvb_target_ipv6_source_slash_descriptor_ipv6_source_slash_next(struct dvb_target_ipv6_source_slash_descriptor *d,
++ struct dvb_ipv6_source_slash *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_ipv6_source_slash);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_ipv6_source_slash *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tdt_section.c dvb-apps/lib/libucsi/dvb/tdt_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tdt_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/tdt_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,33 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/tdt_section.h>
++
++struct dvb_tdt_section * dvb_tdt_section_codec(struct section * section)
++{
++ size_t len = section_length(section);
++ struct dvb_tdt_section * ret = (struct dvb_tdt_section *) section;
++
++ if (len != sizeof(struct dvb_tdt_section))
++ return NULL;
++
++ return ret;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tdt_section.h dvb-apps/lib/libucsi/dvb/tdt_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tdt_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/tdt_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,54 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TDT_SECTION_H
++#define _UCSI_DVB_TDT_SECTION_H
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++#include <libucsi/dvb/types.h>
++
++/**
++ * dvb_tdt_section structure.
++ */
++struct dvb_tdt_section {
++ struct section head;
++
++ dvbdate_t utc_time;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_tdt_section.
++ *
++ * @param section Generic section header.
++ * @return dvb_tdt_section pointer, or NULL on error.
++ */
++struct dvb_tdt_section *dvb_tdt_section_codec(struct section *section);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/telephone_descriptor.h dvb-apps/lib/libucsi/dvb/telephone_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/telephone_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/telephone_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,150 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TELEPHONE_DESCRIPTOR
++#define _UCSI_DVB_TELEPHONE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_telephone_descriptor stucture.
++ */
++struct dvb_telephone_descriptor {
++ struct descriptor d;
++
++ EBIT3(uint8_t reserved_1 : 2; ,
++ uint8_t foreign_availability : 1; ,
++ uint8_t connection_type : 5; );
++ EBIT4(uint8_t reserved_2 : 1; ,
++ uint8_t country_prefix_length : 2; ,
++ uint8_t international_area_code_length : 3; ,
++ uint8_t operator_code_length : 2; );
++ EBIT3(uint8_t reserved_3 : 1; ,
++ uint8_t national_area_code_length : 3; ,
++ uint8_t core_number_length : 4; );
++ /* uint8_t country_prefix[] */
++ /* uint8_t international_area_code[] */
++ /* uint8_t operator_code[] */
++ /* uint8_t national_area_code[] */
++ /* uint8_t core_number[] */
++} __ucsi_packed;
++
++
++/**
++ * Process a dvb_telephone_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return dvb_telephone_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_telephone_descriptor*
++ dvb_telephone_descriptor_codec(struct descriptor* d)
++{
++ struct dvb_telephone_descriptor* p =
++ (struct dvb_telephone_descriptor*) d;
++ uint32_t pos = sizeof(struct dvb_telephone_descriptor) - 2;
++ uint32_t len = d->len;
++
++ if (pos > len)
++ return NULL;
++
++ pos += p->country_prefix_length +
++ p->international_area_code_length +
++ p->operator_code_length +
++ p->national_area_code_length +
++ p->core_number_length;
++
++ if (pos != len)
++ return NULL;
++
++ return p;
++}
++
++/**
++ * Retrieve pointer to country_prefix field of a dvb_telephone_descriptor.
++ *
++ * @param d dvb_telephone_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ dvb_telephone_descriptor_country_prefix(struct dvb_telephone_descriptor* d)
++{
++ return (uint8_t*) d + sizeof(struct dvb_telephone_descriptor);
++}
++
++/**
++ * Retrieve pointer to international_area_code field of a dvb_telephone_descriptor.
++ *
++ * @param d dvb_telephone_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ dvb_telephone_descriptor_international_area_code(struct dvb_telephone_descriptor* d)
++{
++ return dvb_telephone_descriptor_country_prefix(d) + d->country_prefix_length;
++}
++
++/**
++ * Retrieve pointer to operator_code field of a dvb_telephone_descriptor.
++ *
++ * @param d dvb_telephone_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ dvb_telephone_descriptor_operator_code(struct dvb_telephone_descriptor* d)
++{
++ return dvb_telephone_descriptor_international_area_code(d) + d->international_area_code_length;
++}
++
++/**
++ * Retrieve pointer to national_area_code field of a dvb_telephone_descriptor.
++ *
++ * @param d dvb_telephone_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ dvb_telephone_descriptor_national_area_code(struct dvb_telephone_descriptor* d)
++{
++ return dvb_telephone_descriptor_operator_code(d) + d->operator_code_length;
++}
++
++/**
++ * Retrieve pointer to core_number field of a dvb_telephone_descriptor.
++ *
++ * @param d dvb_telephone_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ dvb_telephone_descriptor_core_number(struct dvb_telephone_descriptor* d)
++{
++ return dvb_telephone_descriptor_national_area_code(d) + d->national_area_code_length;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/teletext_descriptor.h dvb-apps/lib/libucsi/dvb/teletext_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/teletext_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/teletext_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,127 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TELETEXT_DESCRIPTOR
++#define _UCSI_DVB_TELETEXT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * Possible values for the type field.
++ */
++enum {
++ DVB_TELETEXT_TYPE_INITIAL = 0x01,
++ DVB_TELETEXT_TYPE_SUBTITLE = 0x02,
++ DVB_TELETEXT_TYPE_ADDITIONAL = 0x03,
++ DVB_TELETEXT_TYPE_SCHEDULE = 0x04,
++ DVB_TELETEXT_TYPE_SUBTITLE_HEARING_IMPAIRED= 0x05,
++};
++
++/**
++ * dvb_teletext_descriptor structure.
++ */
++struct dvb_teletext_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_teletext_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the entries field of a dvb_teletext_descriptor.
++ */
++struct dvb_teletext_entry {
++ iso639lang_t language_code;
++ EBIT2(uint8_t type : 5; ,
++ uint8_t magazine_number: 3; );
++ uint8_t page_number;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_teletext_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return dvb_teletext_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_teletext_descriptor*
++ dvb_teletext_descriptor_codec(struct descriptor* d)
++{
++ if (d->len % sizeof(struct dvb_teletext_entry))
++ return NULL;
++
++ return (struct dvb_teletext_descriptor*) d;
++}
++
++/**
++ * Iterator for entries field of a dvb_teletext_descriptor.
++ *
++ * @param d dvb_teletext_descriptor pointer.
++ * @param pos Variable holding a pointer to the current dvb_teletext_entry.
++ */
++#define dvb_teletext_descriptor_entries_for_each(d, pos) \
++ for ((pos) = dvb_teletext_descriptor_entries_first(d); \
++ (pos); \
++ (pos) = dvb_teletext_descriptor_entries_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_teletext_entry*
++ dvb_teletext_descriptor_entries_first(struct dvb_teletext_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_teletext_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_teletext_descriptor));
++}
++
++static inline struct dvb_teletext_entry*
++ dvb_teletext_descriptor_entries_next(struct dvb_teletext_descriptor *d,
++ struct dvb_teletext_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_teletext_entry);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_teletext_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/terrestrial_delivery_descriptor.h dvb-apps/lib/libucsi/dvb/terrestrial_delivery_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/terrestrial_delivery_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/terrestrial_delivery_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,77 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TERRESTRIAL_DELIVERY_DESCRIPTOR
++#define _UCSI_DVB_TERRESTRIAL_DELIVERY_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_terrestrial_delivery_descriptor structure.
++ */
++struct dvb_terrestrial_delivery_descriptor {
++ struct descriptor d;
++
++ uint32_t centre_frequency; // Normal integer, units 10Hz
++ EBIT5(uint8_t bandwidth : 3; ,
++ uint8_t priority : 1; ,
++ uint8_t time_slicing_indicator : 1; ,
++ uint8_t mpe_fec_indicator : 1; ,
++ uint8_t reserved_1 : 2; );
++ EBIT3(uint8_t constellation : 2; ,
++ uint8_t hierarchy_information : 3; ,
++ uint8_t code_rate_hp_stream : 3; );
++ EBIT4(uint8_t code_rate_lp_stream : 3; ,
++ uint8_t guard_interval : 2; ,
++ uint8_t transmission_mode : 2; ,
++ uint8_t other_frequency_flag : 1; );
++ uint32_t reserved_2;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_terrestrial_delivery_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_terrestrial_delivery_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_terrestrial_delivery_descriptor*
++ dvb_terrestrial_delivery_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_terrestrial_delivery_descriptor) - 2))
++ return NULL;
++
++ bswap32((uint8_t*) d + 2);
++ bswap32((uint8_t*) d + 9);
++
++ return (struct dvb_terrestrial_delivery_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_shifted_event_descriptor.h dvb-apps/lib/libucsi/dvb/time_shifted_event_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_shifted_event_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/time_shifted_event_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,65 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TIME_SHIFTED_EVENT_DESCRIPTOR
++#define _UCSI_DVB_TIME_SHIFTED_EVENT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_time_shifted_event_descriptor structure.
++ */
++struct dvb_time_shifted_event_descriptor {
++ struct descriptor d;
++
++ uint16_t reference_service_id;
++ uint16_t reference_event_id;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_time_shifted_event_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return dvb_time_shifted_event_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_time_shifted_event_descriptor*
++ dvb_time_shifted_event_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_time_shifted_event_descriptor) - 2))
++ return NULL;
++
++ bswap16((uint8_t*) d + 2);
++ bswap16((uint8_t*) d + 4);
++
++ return (struct dvb_time_shifted_event_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_shifted_service_descriptor.h dvb-apps/lib/libucsi/dvb/time_shifted_service_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_shifted_service_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/time_shifted_service_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,63 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TIME_SHIFTED_SERVICE_DESCRIPTOR
++#define _UCSI_DVB_TIME_SHIFTED_SERVICE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_time_shifted_service_descriptor structure.
++ */
++struct dvb_time_shifted_service_descriptor {
++ struct descriptor d;
++
++ uint16_t reference_service_id;
++} __ucsi_packed;
++
++/**
++ * Process a dvb_time_shifted_service_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return Pointer to dvb_time_shifted_service_descriptor, or NULL on error.
++ */
++static inline struct dvb_time_shifted_service_descriptor*
++ dvb_time_shifted_service_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct dvb_time_shifted_service_descriptor) - 2))
++ return NULL;
++
++ bswap16((uint8_t*) d + 2);
++
++ return (struct dvb_time_shifted_service_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h dvb-apps/lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/time_slice_fec_identifier_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,94 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2008 Patrick Boettcher (pb@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TIME_SLICE_FEC_IDENTIFIER_DESCRIPTOR
++#define _UCSI_DVB_TIME_SLICE_FEC_IDENTIFIER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/types.h>
++
++/*
++ * dvb_time_slice_fec_identifier_descriptor structure.
++ */
++struct dvb_time_slice_fec_identifier_descriptor {
++ struct descriptor d;
++
++ EBIT4(uint8_t time_slicing :1; ,
++ uint8_t mpe_fec :2; ,
++ uint8_t reserved :2; ,
++ uint8_t frame_size :3; );
++
++ uint8_t max_burst_duration;
++
++ EBIT2(uint8_t max_average_rate :4; ,
++ uint8_t time_slice_fec_id :4; );
++ /* id_selector_bytes[] */
++};
++
++static inline struct dvb_time_slice_fec_identifier_descriptor *
++ dvb_time_slice_fec_identifier_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < 3)
++ return NULL;
++ return (struct dvb_time_slice_fec_identifier_descriptor *) d;
++}
++
++static inline uint8_t dvb_time_slice_fec_identifier_selector_byte_length(struct dvb_time_slice_fec_identifier_descriptor *d)
++{
++ return d->d.len - 3;
++}
++
++static inline uint8_t * dvb_time_slice_fec_identifier_selector_bytes(struct dvb_time_slice_fec_identifier_descriptor *d)
++{
++ if (d->d.len < 3)
++ return NULL;
++ else
++ return ((uint8_t *) d) + 2 + 3;
++}
++
++static inline uint16_t dvb_time_slice_fec_identifier_max_burst_duration_msec(struct dvb_time_slice_fec_identifier_descriptor *d)
++{
++ return (d->max_burst_duration + 1) * 20;
++}
++
++static inline uint16_t dvb_time_slice_fec_identifier_frame_size_kbits(struct dvb_time_slice_fec_identifier_descriptor *d)
++{
++ if (d->frame_size > 3)
++ return 0;
++ return (d->frame_size+1) * 512;
++}
++
++static inline uint16_t dvb_time_slice_fec_identifier_frame_size_rows(struct dvb_time_slice_fec_identifier_descriptor *d)
++{
++ return dvb_time_slice_fec_identifier_frame_size_kbits(d) / 2;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tot_section.c dvb-apps/lib/libucsi/dvb/tot_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tot_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/tot_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,50 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/tot_section.h>
++
++struct dvb_tot_section *dvb_tot_section_codec(struct section *section)
++{
++ uint8_t * buf = (uint8_t *)section;
++ size_t pos = sizeof(struct section);
++ size_t len = section_length(section) - CRC_SIZE;
++ struct dvb_tot_section * ret = (struct dvb_tot_section *)section;
++
++ if (len < sizeof(struct dvb_tot_section))
++ return NULL;
++
++ pos += 5;
++ bswap16(buf + pos);
++ pos += 2;
++
++ if ((pos + ret->descriptors_loop_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, ret->descriptors_loop_length))
++ return NULL;
++
++ pos += ret->descriptors_loop_length;
++
++ if (pos != len)
++ return NULL;
++
++ return ret;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tot_section.h dvb-apps/lib/libucsi/dvb/tot_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tot_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/tot_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,97 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TOT_SECTION_H
++#define _UCSI_DVB_TOT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++#include <libucsi/dvb/types.h>
++
++/**
++ * dvb_tot_section structure.
++ */
++struct dvb_tot_section {
++ struct section head;
++
++ dvbdate_t utc_time;
++ EBIT2(uint16_t reserved : 4; ,
++ uint16_t descriptors_loop_length:12; );
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_tot_section.
++ *
++ * @param section Pointer to generic section structure.
++ * @return dvb_tot_section pointer, or NULL on error.
++ */
++struct dvb_tot_section * dvb_tot_section_codec(struct section *section);
++
++/**
++ * Iterator for descriptors field of dvb_tot_section.
++ *
++ * @param tot dvb_tot_section pointer.
++ * @param pos Variable holding a pointer to the current descriptor.
++ */
++#define dvb_tot_section_descriptors_for_each(tot, pos) \
++ for ((pos) = dvb_tot_section_descriptors_first(tot); \
++ (pos); \
++ (pos) = dvb_tot_section_descriptors_next(tot, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct descriptor *
++ dvb_tot_section_descriptors_first(struct dvb_tot_section * tot)
++{
++ if (tot->descriptors_loop_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) tot + sizeof(struct dvb_tot_section));
++}
++
++static inline struct descriptor *
++ dvb_tot_section_descriptors_next(struct dvb_tot_section *tot,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t *) tot + sizeof(struct dvb_tot_section),
++ tot->descriptors_loop_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/transport_stream_descriptor.h dvb-apps/lib/libucsi/dvb/transport_stream_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/transport_stream_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/transport_stream_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,82 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TRANSPORT_STREAM_DESCRIPTOR
++#define _UCSI_DVB_TRANSPORT_STREAM_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_transport_stream_descriptor structure.
++ */
++struct dvb_transport_stream_descriptor {
++ struct descriptor d;
++
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Process dvb_transport_stream_descriptor structure.
++ *
++ * @param d Pointer to generic descriptor.
++ * @return dvb_transport_stream_descriptor structure or NULL on error.
++ */
++static inline struct dvb_transport_stream_descriptor*
++ dvb_transport_stream_descriptor_codec(struct descriptor* d)
++{
++ return (struct dvb_transport_stream_descriptor*) d;
++}
++
++/**
++ * Retrieve a pointer to the data field of a dvb_transport_stream_descriptor.
++ *
++ * @param d dvb_transport_stream_descriptor structure.
++ * @return Pointer to data field.
++ */
++static inline uint8_t *
++ dvb_transport_stream_descriptor_data(struct dvb_transport_stream_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_transport_stream_descriptor);
++}
++
++/**
++ * Calculate the length of the data field of a dvb_transport_stream_descriptor.
++ *
++ * @param d dvb_transport_stream_descriptor structure.
++ * @return length of data field in bytes.
++ */
++static inline int
++ dvb_transport_stream_descriptor_data_length(struct dvb_transport_stream_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_container_section.c dvb-apps/lib/libucsi/dvb/tva_container_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_container_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/tva_container_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,33 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/dvb/tva_container_section.h>
++
++struct dvb_tva_container_section *dvb_tva_container_section_codec(struct section_ext *ext)
++{
++ size_t len = section_ext_length(ext);
++ struct dvb_tva_container_section* ret = (struct dvb_tva_container_section*) ext;
++
++ if (len < sizeof(struct dvb_tva_container_section))
++ return NULL;
++
++ return ret;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_container_section.h dvb-apps/lib/libucsi/dvb/tva_container_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_container_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/tva_container_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,90 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TVA_CONTAINER_SECTION_H
++#define _UCSI_DVB_TVA_CONTAINER_SECTION_H
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++#include <libucsi/dvb/types.h>
++
++/**
++ * dvb_tva_container_section structure.
++ */
++struct dvb_tva_container_section {
++ struct section_ext head;
++
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Process a dvb_tva_container_section.
++ *
++ * @param section Generic section header.
++ * @return dvb_tdt_section pointer, or NULL on error.
++ */
++struct dvb_tva_container_section *dvb_tva_container_section_codec(struct section_ext *ext);
++
++/**
++ * Accessor for the container_id field of a tva container section.
++ *
++ * @param container dvb_tva_container_section pointer.
++ * @return The container_id.
++ */
++static inline uint16_t dvb_tva_container_section_container_id(struct dvb_tva_container_section *container)
++{
++ return container->head.table_id_ext;
++}
++
++/**
++ * Accessor for the data field of a dvb_data_broadcast_id_descriptor.
++ *
++ * @param d dvb_data_broadcast_id_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++dvb_tva_container_section_data(struct dvb_tva_container_section *s)
++{
++ return (uint8_t *) s + sizeof(struct dvb_tva_container_section);
++}
++
++/**
++ * Determine the number of bytes in the data field of a dvb_tva_container_section.
++ *
++ * @param d dvb_tva_container_section pointer.
++ * @return Length of the field in bytes.
++ */
++static inline int
++dvb_tva_container_section_data_length(struct dvb_tva_container_section *s)
++{
++ return section_ext_length(&s->head) - sizeof(struct dvb_tva_container_section);
++}
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_id_descriptor.h dvb-apps/lib/libucsi/dvb/tva_id_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/tva_id_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/tva_id_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,124 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TVA_ID_DESCRIPTOR
++#define _UCSI_DVB_TVA_ID_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * dvb_tva_id_descriptor structure.
++ */
++struct dvb_tva_id_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_tva_id_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the entries field of a dvb_tva_id_descriptor.
++ */
++struct dvb_tva_id_entry {
++ uint16_t tva_id;
++ EBIT2(uint8_t reserved : 5; ,
++ uint8_t running_status : 3; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_tva_id_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return dvb_tva_id_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_tva_id_descriptor*
++ dvb_tva_id_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++ uint8_t* buf = (uint8_t*) d + 2;
++
++ pos += sizeof(struct dvb_tva_id_descriptor) - 2;
++ if (len % sizeof(struct dvb_tva_id_entry))
++ return NULL;
++
++ while(pos < len) {
++ bswap16(buf+pos);
++ pos+=3;
++ }
++
++ return (struct dvb_tva_id_descriptor*) d;
++}
++
++/**
++ * Iterator for the entries field of a dvb_tva_id_descriptor.
++ *
++ * @param d dvb_tva_id_descriptor pointer.
++ * @param pos Variable containing a pointer to the current dvb_tva_id_entry.
++ */
++#define dvb_tva_id_descriptor_entries_for_each(d, pos) \
++ for ((pos) = dvb_tva_id_descriptor_entries_first(d); \
++ (pos); \
++ (pos) = dvb_tva_id_descriptor_entries_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_tva_id_entry*
++ dvb_tva_id_descriptor_entries_first(struct dvb_tva_id_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_tva_id_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_tva_id_descriptor));
++}
++
++static inline struct dvb_tva_id_entry*
++ dvb_tva_id_descriptor_entries_next(struct dvb_tva_id_descriptor *d,
++ struct dvb_tva_id_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_tva_id_entry);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_tva_id_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/types.c dvb-apps/lib/libucsi/dvb/types.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/types.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/types.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,270 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <string.h>
++#include "types.h"
++
++time_t dvbdate_to_unixtime(dvbdate_t dvbdate)
++{
++ int k = 0;
++ struct tm tm;
++ double mjd;
++
++ /* check for the undefined value */
++ if ((dvbdate[0] == 0xff) &&
++ (dvbdate[1] == 0xff) &&
++ (dvbdate[2] == 0xff) &&
++ (dvbdate[3] == 0xff) &&
++ (dvbdate[4] == 0xff)) {
++ return -1;
++ }
++
++ memset(&tm, 0, sizeof(tm));
++ mjd = (dvbdate[0] << 8) | dvbdate[1];
++
++ tm.tm_year = (int) ((mjd - 15078.2) / 365.25);
++ tm.tm_mon = (int) (((mjd - 14956.1) - (int) (tm.tm_year * 365.25)) / 30.6001);
++ tm.tm_mday = (int) mjd - 14956 - (int) (tm.tm_year * 365.25) - (int) (tm.tm_mon * 30.6001);
++ if ((tm.tm_mon == 14) || (tm.tm_mon == 15)) k = 1;
++ tm.tm_year += k;
++ tm.tm_mon = tm.tm_mon - 2 - k * 12;
++ tm.tm_sec = bcd_to_integer(dvbdate[4]);
++ tm.tm_min = bcd_to_integer(dvbdate[3]);
++ tm.tm_hour = bcd_to_integer(dvbdate[2]);
++
++ return mktime(&tm);
++}
++
++void unixtime_to_dvbdate(time_t unixtime, dvbdate_t dvbdate)
++{
++ struct tm tm;
++ double l = 0;
++ int mjd;
++
++ /* the undefined value */
++ if (unixtime == -1) {
++ memset(dvbdate, 0xff, 5);
++ return;
++ }
++
++ gmtime_r(&unixtime, &tm);
++ tm.tm_mon++;
++ if ((tm.tm_mon == 1) || (tm.tm_mon == 2)) l = 1;
++ mjd = 14956 + tm.tm_mday + (int) ((tm.tm_year - l) * 365.25) + (int) ((tm.tm_mon + 1 + l * 12) * 30.6001);
++
++ dvbdate[0] = (mjd & 0xff00) >> 8;
++ dvbdate[1] = mjd & 0xff;
++ dvbdate[2] = integer_to_bcd(tm.tm_hour);
++ dvbdate[3] = integer_to_bcd(tm.tm_min);
++ dvbdate[4] = integer_to_bcd(tm.tm_sec);
++}
++
++int dvbduration_to_seconds(dvbduration_t dvbduration)
++{
++ int seconds = 0;
++
++ seconds += (bcd_to_integer(dvbduration[0]) * 60 * 60);
++ seconds += (bcd_to_integer(dvbduration[1]) * 60);
++ seconds += bcd_to_integer(dvbduration[2]);
++
++ return seconds;
++}
++
++void seconds_to_dvbduration(int seconds, dvbduration_t dvbduration)
++{
++ int hours, mins;
++
++ hours = seconds / (60*60);
++ seconds -= (hours * 60 * 60);
++ mins = seconds / 60;
++ seconds -= (mins * 60);
++
++ dvbduration[0] = integer_to_bcd(hours);
++ dvbduration[1] = integer_to_bcd(mins);
++ dvbduration[2] = integer_to_bcd(seconds);
++}
++
++int dvbhhmm_to_seconds(dvbhhmm_t dvbhhmm)
++{
++ int seconds = 0;
++
++ seconds += (bcd_to_integer(dvbhhmm[0]) * 60 * 60);
++ seconds += (bcd_to_integer(dvbhhmm[1]) * 60);
++
++ return seconds;
++}
++
++void seconds_to_dvbhhmm(int seconds, dvbhhmm_t dvbhhmm)
++{
++ int hours, mins;
++
++ hours = seconds / (60*60);
++ seconds -= (hours * 60 * 60);
++ mins = seconds / 60;
++
++ dvbhhmm[0] = integer_to_bcd(hours);
++ dvbhhmm[1] = integer_to_bcd(mins);
++}
++
++uint32_t integer_to_bcd(uint32_t intval)
++{
++ uint32_t val = 0;
++
++ int i;
++ for(i=0; i<=28;i+=4) {
++ val |= ((intval % 10) << i);
++ intval /= 10;
++ }
++
++ return val;
++}
++
++uint32_t bcd_to_integer(uint32_t bcdval)
++{
++ uint32_t val = 0;
++
++ int i;
++ for(i=28; i>=0;i-=4) {
++ val += ((bcdval >> i) & 0x0f);
++ if (i != 0) val *= 10;
++ }
++
++ return val;
++}
++
++const char *dvb_charset(char *dvb_text, int dvb_text_length, int *consumed)
++{
++ char *charset = "ISO6937";
++ int used = 0;
++
++ if (dvb_text_length == 0)
++ goto exit;
++ if (dvb_text[0] >= 32)
++ goto exit;
++ if (dvb_text[0] == 0x10) {
++ if (dvb_text_length < 3)
++ goto exit;
++
++ used = 3;
++ uint16_t ext = (dvb_text[1] << 8) | dvb_text[2];
++ switch(ext) {
++ case 0x01:
++ charset = "ISO8859-1";
++ break;
++ case 0x02:
++ charset = "ISO8859-2";
++ break;
++ case 0x03:
++ charset = "ISO8859-3";
++ break;
++ case 0x04:
++ charset = "ISO8859-4";
++ break;
++ case 0x05:
++ charset = "ISO8859-5";
++ break;
++ case 0x06:
++ charset = "ISO8859-6";
++ break;
++ case 0x07:
++ charset = "ISO8859-7";
++ break;
++ case 0x08:
++ charset = "ISO8859-8";
++ break;
++ case 0x09:
++ charset = "ISO8859-9";
++ break;
++ case 0x0a:
++ charset = "ISO8859-10";
++ break;
++ case 0x0b:
++ charset = "ISO8859-11";
++ break;
++ case 0x0d:
++ charset = "ISO8859-13";
++ break;
++ case 0x0e:
++ charset = "ISO8859-14";
++ break;
++ case 0x0f:
++ charset = "ISO8859-15";
++ break;
++ default:
++ used = 0;
++ break;
++ }
++ } else {
++ used = 1;
++ switch(dvb_text[0]) {
++ case 0x01:
++ charset = "ISO8859-5";
++ break;
++ case 0x02:
++ charset = "ISO8859-6";
++ break;
++ case 0x03:
++ charset = "ISO8859-7";
++ break;
++ case 0x04:
++ charset = "ISO8859-8";
++ break;
++ case 0x05:
++ charset = "ISO8859-9";
++ break;
++ case 0x06:
++ charset = "ISO8859-10";
++ break;
++ case 0x07:
++ charset = "ISO8859-11";
++ break;
++ case 0x09:
++ charset = "ISO8859-13";
++ break;
++ case 0x0a:
++ charset = "ISO8859-14";
++ break;
++ case 0x0b:
++ charset = "ISO8859-15";
++ break;
++ case 0x11:
++ charset = "UTF16";
++ break;
++ case 0x12:
++ charset = "EUC-KR";
++ break;
++ case 0x13:
++ charset = "GB2312";
++ break;
++ case 0x14:
++ charset = "GBK";
++ break;
++ case 0x15:
++ charset = "UTF8";
++ break;
++ default:
++ used = 0;
++ break;
++ }
++ }
++exit:
++ *consumed = used;
++ return charset;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/types.h dvb-apps/lib/libucsi/dvb/types.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/types.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/types.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,127 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_TYPES_H
++#define _UCSI_DVB_TYPES_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++#include <time.h>
++
++typedef uint8_t dvbdate_t[5];
++typedef uint8_t dvbduration_t[3];
++typedef uint8_t dvbhhmm_t[2];
++
++/**
++ * Running status values.
++ */
++enum {
++ DVB_RUNNING_STATUS_NOT_RUNNING = 0x01,
++ DVB_RUNNING_STATUS_FEW_SECONDS = 0x02,
++ DVB_RUNNING_STATUS_PAUSING = 0x03,
++ DVB_RUNNING_STATUS_RUNNING = 0x04,
++};
++
++/**
++ * Convert from a 5 byte DVB UTC date to unix time.
++ * Note: this functions expects the DVB date in network byte order.
++ *
++ * @param d Pointer to DVB date.
++ * @return The unix timestamp, or -1 if the dvbdate was set to the 'undefined' value
++ */
++extern time_t dvbdate_to_unixtime(dvbdate_t dvbdate);
++
++/**
++ * Convert from a unix timestemp to a 5 byte DVB UTC date.
++ * Note: this function will always output the DVB date in
++ * network byte order.
++ *
++ * @param unixtime The unix timestamp, or -1 for the 'undefined' value.
++ * @param utc Pointer to 5 byte DVB date.
++ */
++extern void unixtime_to_dvbdate(time_t unixtime, dvbdate_t dvbdate);
++
++/**
++ * Convert from a DVB BCD duration to a number of seconds.
++ *
++ * @param dvbduration Pointer to 3 byte DVB duration.
++ * @return Number of seconds.
++ */
++extern int dvbduration_to_seconds(dvbduration_t dvbduration);
++
++/**
++ * Convert from a number of seconds to a DVB 3 byte BCD duration.
++ *
++ * @param seconds The number of seconds.
++ * @param dvbduration Pointer to 3 byte DVB duration.
++ */
++extern void seconds_to_dvbduration(int seconds, dvbduration_t dvbduration);
++
++/**
++ * Convert from a DVB BCD HHMM to a number of seconds.
++ *
++ * @param dvbduration Pointer to 2 byte DVB HHMM.
++ * @return Number of seconds.
++ */
++extern int dvbhhmm_to_seconds(dvbhhmm_t dvbhhmm);
++
++/**
++ * Convert from a number of seconds to a DVB 2 byte BCD HHMM.
++ *
++ * @param seconds The number of seconds.
++ * @param dvbduration Pointer to 2 byte DVB HHMM.
++ */
++extern void seconds_to_dvbhhmm(int seconds, dvbhhmm_t dvbhhmm);
++
++/**
++ * Convert a __ucsi_packed BCD value into a normal integer.
++ *
++ * @param bcd The value to convert.
++ * @return The value.
++ */
++extern uint32_t bcd_to_integer(uint32_t bcd);
++
++/**
++ * Convert a normal integer into a __ucsi_packed BCD value.
++ *
++ * @param integer The value to convert.
++ * @return The value.
++ */
++extern uint32_t integer_to_bcd(uint32_t integer);
++
++/**
++ * Determine the (iconv compatable) character set of a dvb string.
++ *
++ * @param dvb_text DVB text concerned.
++ * @param dvb_text_length Length of text.
++ * @param consumed Out parameter of number of bytes used to encode the character set.
++ * @return Name of the character set.
++ */
++extern const char *dvb_charset(char *dvb_text, int dvb_text_length, int *consumed);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/vbi_data_descriptor.h dvb-apps/lib/libucsi/dvb/vbi_data_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/vbi_data_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/vbi_data_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,186 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_VBI_DATA_DESCRIPTOR
++#define _UCSI_DVB_VBI_DATA_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Possible values for the data_service_id field.
++ */
++enum {
++ DVB_VBI_DATA_SERVICE_ID_EBU = 0x01,
++ DVB_VBI_DATA_SERVICE_ID_INVERTED = 0x02,
++ DVB_VBI_DATA_SERVICE_ID_VPS = 0x04,
++ DVB_VBI_DATA_SERVICE_ID_WSS = 0x05,
++ DVB_VBI_DATA_SERVICE_ID_CC = 0x06,
++ DVB_VBI_DATA_SERVICE_ID_MONO_422 = 0x07,
++};
++
++/**
++ * dvb_vbi_data_descriptor structure
++ */
++struct dvb_vbi_data_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_vbi_data_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the dvb_vbi_data_descriptor entries field.
++ */
++struct dvb_vbi_data_entry {
++ uint8_t data_service_id;
++ uint8_t data_length;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Format of the dvb_vbi_data_entry data field, if data_service_id == 1,2,4,5,6,7.
++ */
++struct dvb_vbi_data_x {
++ EBIT3(uint8_t reserved : 2; ,
++ uint8_t field_parity : 1; ,
++ uint8_t line_offset : 5; );
++} __ucsi_packed;
++
++/**
++ * Process a dvb_vbi_data_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return dvb_vbi_data_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_vbi_data_descriptor*
++ dvb_vbi_data_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* p = (uint8_t*) d + 2;
++ uint32_t pos = 0;
++ uint32_t len = d->len;
++
++ while(pos < len) {
++ struct dvb_vbi_data_entry *e =
++ (struct dvb_vbi_data_entry*) (p+pos);
++
++ pos += sizeof(struct dvb_vbi_data_entry);
++
++ if (pos > len)
++ return NULL;
++
++ pos += e->data_length;
++
++ if (pos > len)
++ return NULL;
++ }
++
++ return (struct dvb_vbi_data_descriptor*) d;
++}
++
++/**
++ * Iterator for entries field in a dvb_vbi_data_descriptor structure.
++ *
++ * @param d Pointer to dvb_vbi_data_descriptor structure.
++ * @param pos Variable holding pointer to the current dvb_vbi_data_entry structure.
++ */
++#define dvb_vbi_data_descriptor_entries_for_each(d, pos) \
++ for ((pos) = dvb_vbi_data_descriptor_entries_first(d); \
++ (pos); \
++ (pos) = dvb_vbi_data_descriptor_entries_next(d, pos))
++
++/**
++ * Get a pointer to the data field of a dvb_vbi_data_entry.
++ *
++ * @param d dvb_vbi_data_entry structure.
++ * @return Pointer to the data field.
++ */
++static inline uint8_t *
++ dvb_vbi_data_entry_data(struct dvb_vbi_data_entry *d)
++{
++ return (uint8_t *) d + sizeof(struct dvb_vbi_data_entry);
++}
++
++/**
++ * Get a pointer to the data field of a dvb_vbi_data_x for id 1,2,4,5,6,7.
++ *
++ * @param d dvb_vbi_data_entry structure.
++ * @return Pointer to the data field, or NULL if invalid
++ */
++static inline struct dvb_vbi_data_x*
++ dvb_vbi_data_entry_data_x(struct dvb_vbi_data_entry *d)
++{
++ switch(d->data_service_id) {
++ case 1:
++ case 2:
++ case 4:
++ case 5:
++ case 6:
++ case 7:
++ return (struct dvb_vbi_data_x*) ((uint8_t *) d + sizeof(struct dvb_vbi_data_entry));
++ }
++
++ return NULL;
++}
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_vbi_data_entry*
++ dvb_vbi_data_descriptor_entries_first(struct dvb_vbi_data_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_vbi_data_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_vbi_data_descriptor));
++}
++
++static inline struct dvb_vbi_data_entry*
++ dvb_vbi_data_descriptor_entries_next(struct dvb_vbi_data_descriptor *d,
++ struct dvb_vbi_data_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_vbi_data_entry) +
++ pos->data_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_vbi_data_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/vbi_teletext_descriptor.h dvb-apps/lib/libucsi/dvb/vbi_teletext_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/dvb/vbi_teletext_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/dvb/vbi_teletext_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_DVB_VBI_TELETEXT_DESCRIPTOR
++#define _UCSI_DVB_VBI_TELETEXT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * dvb_vbi_teletext_descriptor structure
++ */
++struct dvb_vbi_teletext_descriptor {
++ struct descriptor d;
++
++ /* struct dvb_vbi_teletext_entry entries[] */
++} __ucsi_packed;
++
++/**
++ * An entry in a dvb_vbi_teletext_descriptor structure.
++ */
++struct dvb_vbi_teletext_entry {
++ iso639lang_t language_code;
++ EBIT2(uint8_t type : 5; ,
++ uint8_t magazine_number: 3; );
++ uint8_t page_number;
++} __ucsi_packed;
++
++/**
++ * Process an dvb_vbi_teletext_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return dvb_vbi_teletext_descriptor pointer, or NULL on error.
++ */
++static inline struct dvb_vbi_teletext_descriptor*
++ dvb_vbi_teletext_descriptor_codec(struct descriptor* d)
++{
++ if (d->len % sizeof(struct dvb_vbi_teletext_entry))
++ return NULL;
++
++ return (struct dvb_vbi_teletext_descriptor*) d;
++}
++
++/**
++ * Iterator for entries field of a dvb_vbi_teletext_descriptor.
++ *
++ * @param d Pointer to dvb_vbi_teletext_descriptor.
++ * @param pos Variable holding a pointer to the current dvb_vbi_teletext_entry.
++ */
++#define dvb_vbi_teletext_descriptor_entries_for_each(d, pos) \
++ for ((pos) = dvb_vbi_teletext_descriptor_entries_first(d); \
++ (pos); \
++ (pos) = dvb_vbi_teletext_descriptor_entries_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct dvb_vbi_teletext_entry*
++ dvb_vbi_teletext_descriptor_entries_first(struct dvb_vbi_teletext_descriptor *d)
++{
++ if (d->d.len == 0)
++ return NULL;
++
++ return (struct dvb_vbi_teletext_entry *)
++ ((uint8_t*) d + sizeof(struct dvb_vbi_teletext_descriptor));
++}
++
++static inline struct dvb_vbi_teletext_entry*
++ dvb_vbi_teletext_descriptor_entries_next(struct dvb_vbi_teletext_descriptor *d,
++ struct dvb_vbi_teletext_entry *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct dvb_vbi_teletext_entry);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct dvb_vbi_teletext_entry *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/endianops.h dvb-apps/lib/libucsi/endianops.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/endianops.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/endianops.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,128 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_COMMON_H
++#define _UCSI_COMMON_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++#include <byteswap.h>
++#include <endian.h>
++
++#define __ucsi_packed __attribute__((packed))
++
++
++
++
++#if __BYTE_ORDER == __BIG_ENDIAN
++#define EBIT2(x1,x2) x1 x2
++#define EBIT3(x1,x2,x3) x1 x2 x3
++#define EBIT4(x1,x2,x3,x4) x1 x2 x3 x4
++#define EBIT5(x1,x2,x3,x4,x5) x1 x2 x3 x4 x5
++#define EBIT6(x1,x2,x3,x4,x5,x6) x1 x2 x3 x4 x5 x6
++#define EBIT7(x1,x2,x3,x4,x5,x6,x7) x1 x2 x3 x4 x5 x6 x7
++#define EBIT8(x1,x2,x3,x4,x5,x6,x7,x8) x1 x2 x3 x4 x5 x6 x7 x8
++
++static inline void bswap16(uint8_t *buf) {
++ (void) buf;
++}
++
++static inline void bswap32(uint8_t *buf) {
++ (void) buf;
++}
++
++static inline void bswap64(uint8_t *buf) {
++ (void) buf;
++}
++
++static inline void bswap24(uint8_t *buf) {
++ (void) buf;
++}
++
++static inline void bswap40(uint8_t *buf) {
++ (void) buf;
++}
++
++static inline void bswap48(uint8_t *buf) {
++ (void) buf;
++}
++
++#else
++#define EBIT2(x1,x2) x2 x1
++#define EBIT3(x1,x2,x3) x3 x2 x1
++#define EBIT4(x1,x2,x3,x4) x4 x3 x2 x1
++#define EBIT5(x1,x2,x3,x4,x5) x5 x4 x3 x2 x1
++#define EBIT6(x1,x2,x3,x4,x5,x6) x6 x5 x4 x3 x2 x1
++#define EBIT7(x1,x2,x3,x4,x5,x6,x7) x7 x6 x5 x4 x3 x2 x1
++#define EBIT8(x1,x2,x3,x4,x5,x6,x7,x8) x8 x7 x6 x5 x4 x3 x2 x1
++
++static inline void bswap16(uint8_t * buf) {
++ *((uint16_t*)buf) = bswap_16((*(uint16_t*)buf));
++}
++
++static inline void bswap32(uint8_t * buf) {
++ *((uint32_t*)buf) = bswap_32((*(uint32_t*)buf));
++}
++
++static inline void bswap64(uint8_t * buf) {
++ *((uint64_t*)buf) = bswap_64((*(uint64_t*)buf));
++}
++
++static inline void bswap24(uint8_t * buf) {
++ uint8_t tmp0 = buf[0];
++
++ buf[0] = buf[2];
++ buf[2] = tmp0;
++}
++
++static inline void bswap40(uint8_t * buf) {
++ uint8_t tmp0 = buf[0];
++ uint8_t tmp1 = buf[1];
++
++ buf[0] = buf[4];
++ buf[1] = buf[3];
++ buf[3] = tmp1;
++ buf[4] = tmp0;
++}
++
++static inline void bswap48(uint8_t * buf) {
++ uint8_t tmp0 = buf[0];
++ uint8_t tmp1 = buf[1];
++ uint8_t tmp2 = buf[2];
++
++ buf[0] = buf[5];
++ buf[1] = buf[4];
++ buf[2] = buf[3];
++ buf[3] = tmp2;
++ buf[4] = tmp1;
++ buf[5] = tmp0;
++}
++
++#endif // __BYTE_ORDER
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/Makefile dvb-apps/lib/libucsi/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,34 @@
++# Makefile for linuxtv.org dvb-apps/lib/libucsi
++
++includes = crc32.h \
++ descriptor.h \
++ endianops.h \
++ section.h \
++ section_buf.h \
++ transport_packet.h \
++ types.h
++
++objects = crc32.o \
++ section_buf.o \
++ transport_packet.o
++
++lib_name = libucsi
++
++CPPFLAGS += -I../../lib
++
++.PHONY: all
++
++all: library
++
++include atsc/Makefile
++include dvb/Makefile
++include mpeg/Makefile
++
++.PHONY: $(sub-install)
++
++install:: $(sub-install)
++
++$(sub-install):
++ $(MAKE) -C $@ install
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/audio_stream_descriptor.h dvb-apps/lib/libucsi/mpeg/audio_stream_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/audio_stream_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/audio_stream_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,65 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_AUDIO_STREAM_DESCRIPTOR
++#define _UCSI_MPEG_AUDIO_STREAM_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_audio_stream_descriptor structure
++ */
++struct mpeg_audio_stream_descriptor {
++ struct descriptor d;
++
++ EBIT5(uint8_t free_format_flag : 1; ,
++ uint8_t id : 1; ,
++ uint8_t layer : 2; ,
++ uint8_t variable_rate_audio_indicator : 1; ,
++ uint8_t reserved : 3; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_audio_stream_descriptor.
++ *
++ * @param d Pointer to the generic descriptor structure.
++ * @return Pointer to the mpeg_audio_stream_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_audio_stream_descriptor*
++ mpeg_audio_stream_descriptor_codec(struct descriptor *d)
++{
++ if (d->len != (sizeof(struct mpeg_audio_stream_descriptor) - 2))
++ return NULL;
++
++ return (struct mpeg_audio_stream_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/ca_descriptor.h dvb-apps/lib/libucsi/mpeg/ca_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/ca_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/ca_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,91 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_CA_DESCRIPTOR
++#define _UCSI_MPEG_CA_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_ca_descriptor structure
++ */
++struct mpeg_ca_descriptor {
++ struct descriptor d;
++
++ uint16_t ca_system_id;
++ EBIT2(uint16_t reserved : 3; ,
++ uint16_t ca_pid : 13; );
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_ca_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return Pointer to an mpeg_ca_descriptor, or NULL on error.
++ */
++static inline struct mpeg_ca_descriptor*
++ mpeg_ca_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct mpeg_ca_descriptor) - 2))
++ return NULL;
++
++ bswap16((uint8_t*) d + 2);
++ bswap16((uint8_t*) d + 4);
++
++ return (struct mpeg_ca_descriptor*) d;
++}
++
++/**
++ * Accessor for pointer to data field of an mpeg_ca_descriptor.
++ *
++ * @param d The mpeg_ca_descriptor structure.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ mpeg_ca_descriptor_data(struct mpeg_ca_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct mpeg_ca_descriptor);
++}
++
++/**
++ * Determine length of data field of an mpeg_ca_descriptor.
++ *
++ * @param d The mpeg_ca_descriptor structure.
++ * @return Length of the field in bytes.
++ */
++static inline int
++ mpeg_ca_descriptor_data_length(struct mpeg_ca_descriptor *d)
++{
++ return d->d.len - 4;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/cat_section.c dvb-apps/lib/libucsi/mpeg/cat_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/cat_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/cat_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,34 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/mpeg/cat_section.h>
++
++struct mpeg_cat_section * mpeg_cat_section_codec(struct section_ext * ext)
++{
++ uint8_t * buf = (uint8_t *)ext;
++ size_t pos = sizeof(struct section_ext);
++
++ if (verify_descriptors(buf + pos,
++ section_ext_length(ext) - sizeof(struct mpeg_cat_section)))
++ return NULL;
++
++ return (struct mpeg_cat_section *)ext;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/cat_section.h dvb-apps/lib/libucsi/mpeg/cat_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/cat_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/cat_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,94 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_CAT_SECTION_H
++#define _UCSI_MPEG_CAT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * mpeg_cat_section structure.
++ */
++struct mpeg_cat_section {
++ struct section_ext head;
++
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_cat_section.
++ *
++ * @param section The generic section_ext structure.
++ * @return Pointer to an mpeg_cat_section structure, or NULL on error.
++ */
++extern struct mpeg_cat_section *mpeg_cat_section_codec(struct section_ext *section);
++
++/**
++ * Convenience iterator for descriptors field of an mpeg_cat_section.
++ *
++ * @param cat The mpeg_cat_section pointer.
++ * @param pos Variable holding a pointer to the current descriptor.
++ */
++#define mpeg_cat_section_descriptors_for_each(cat, pos) \
++ for ((pos) = mpeg_cat_section_descriptors_first(cat); \
++ (pos); \
++ (pos) = mpeg_cat_section_descriptors_next(cat, pos))
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct descriptor *
++ mpeg_cat_section_descriptors_first(struct mpeg_cat_section *cat)
++{
++ size_t pos = sizeof(struct mpeg_cat_section);
++
++ if (pos >= section_ext_length(&cat->head))
++ return NULL;
++
++ return (struct descriptor*)((uint8_t *) cat + pos);
++}
++
++
++static inline struct descriptor *
++ mpeg_cat_section_descriptors_next(struct mpeg_cat_section *cat,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t *) cat + sizeof(struct mpeg_cat_section),
++ section_ext_length(&cat->head) - sizeof(struct mpeg_cat_section),
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/content_labelling_descriptor.h dvb-apps/lib/libucsi/mpeg/content_labelling_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/content_labelling_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/content_labelling_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,356 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_CONTENT_LABELLING_DESCRIPTOR
++#define _UCSI_MPEG_CONTENT_LABELLING_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Possible values for content_time_base_indicator.
++ */
++enum {
++ MPEG_CONTENT_TIME_BASE_STC = 0x01,
++ MPEG_CONTENT_TIME_BASE_NPT = 0x02,
++};
++
++/**
++ * mpeg_content_labelling_descriptor structure.
++ */
++struct mpeg_content_labelling_descriptor {
++ struct descriptor d;
++
++ uint16_t metadata_application_format;
++ /* struct mpeg_content_labelling_descriptor_application_format_identifier id */
++ /* struct mpeg_content_labelling_descriptor_flags flags */
++ /* struct mpeg_content_labelling_descriptor_reference_id reference_id */
++ /* struct mpeg_content_labelling_descriptor_time_base time_base */
++ /* struct mpeg_content_labelling_descriptor_content_id content_id */
++ /* struct mpeg_content_labelling_descriptor_time_base_association time_base_assoc */
++ /* uint8_t private_data[] */
++} __ucsi_packed;
++
++/**
++ * id field of a content_labelling_descriptor.
++ */
++struct mpeg_content_labelling_descriptor_application_format_identifier {
++ uint32_t id;
++} __ucsi_packed;
++
++/**
++ * Flags field of a content_labelling_descriptor
++ */
++struct mpeg_content_labelling_descriptor_flags {
++ EBIT3(uint8_t content_reference_id_record_flag : 1; ,
++ uint8_t content_time_base_indicator : 4; ,
++ uint8_t reserved : 3; );
++} __ucsi_packed;
++
++/**
++ * Reference_id field of a content_labelling_descriptor.
++ */
++struct mpeg_content_labelling_descriptor_reference_id {
++ uint8_t content_reference_id_record_length;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * time_base field of a content_labelling_descriptor.
++ */
++struct mpeg_content_labelling_descriptor_time_base {
++ EBIT2(uint64_t reserved_1 : 7; ,
++ uint64_t content_time_base_value :33; );
++ EBIT2(uint64_t reserved_2 : 7; ,
++ uint64_t metadata_time_base_value :33; );
++} __ucsi_packed;
++
++/**
++ * content_id field of a content_labelling_descriptor.
++ */
++struct mpeg_content_labelling_descriptor_content_id {
++ EBIT2(uint8_t reserved : 1; ,
++ uint8_t contentId : 7; );
++} __ucsi_packed;
++
++/**
++ * time_base_assoc field of a content_labelling_descriptor.
++ */
++struct mpeg_content_labelling_descriptor_time_base_association {
++ uint8_t time_base_association_data_length;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++
++
++/**
++ * Process an mpeg_content_labelling_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return Pointer to an mpeg_content_labelling_descriptor, or NULL on error.
++ */
++static inline struct mpeg_content_labelling_descriptor*
++ mpeg_content_labelling_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 2;
++ uint8_t *buf = (uint8_t*) d;
++ uint32_t len = d->len + 2;
++ struct mpeg_content_labelling_descriptor_flags *flags;
++ int id;
++
++ if (len < sizeof(struct mpeg_content_labelling_descriptor))
++ return NULL;
++
++ bswap16(buf + pos);
++ id = *((uint16_t*) (buf+pos));
++ pos += 2;
++
++ if (id == 0xffff) {
++ if (len < (pos+4))
++ return NULL;
++ bswap32(buf+pos);
++ pos += 4;
++ }
++
++ if (len < (pos + sizeof(struct mpeg_content_labelling_descriptor_flags)))
++ return NULL;
++ flags = (struct mpeg_content_labelling_descriptor_flags*) (buf+pos);
++ pos += sizeof(struct mpeg_content_labelling_descriptor_flags);
++
++ if (flags->content_reference_id_record_flag == 1) {
++ if (len < (pos+1))
++ return NULL;
++ if (len < (pos+1+buf[pos]))
++ return NULL;
++ pos += 1 + buf[pos];
++ }
++
++ if ((flags->content_time_base_indicator == 1) ||
++ (flags->content_time_base_indicator == 2)) {
++ if (len < (pos + sizeof(struct mpeg_content_labelling_descriptor_time_base)))
++ return NULL;
++ bswap40(buf+pos);
++ bswap40(buf+pos+5);
++ pos += sizeof(struct mpeg_content_labelling_descriptor_time_base);
++ }
++
++ if (flags->content_time_base_indicator == 2) {
++ if (len < (pos + sizeof(struct mpeg_content_labelling_descriptor_content_id)))
++ return NULL;
++ pos += sizeof(struct mpeg_content_labelling_descriptor_content_id);
++ }
++
++ if (flags->content_time_base_indicator > 2) {
++ if (len < (pos+1))
++ return NULL;
++ if (len < (pos+1+buf[pos]))
++ return NULL;
++ pos += 1 + buf[pos];
++ }
++
++ if (len < pos)
++ return NULL;
++
++ return (struct mpeg_content_labelling_descriptor*) d;
++}
++
++/**
++ * Accessor for pointer to id field of an mpeg_content_labelling_descriptor.
++ *
++ * @param d The mpeg_content_labelling_descriptor structure.
++ * @return The pointer, or NULL on error.
++ */
++static inline struct mpeg_content_labelling_descriptor_application_format_identifier*
++ mpeg_content_labelling_descriptor_id(struct mpeg_content_labelling_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d;
++
++ if (d->metadata_application_format != 0xffff)
++ return NULL;
++ return (struct mpeg_content_labelling_descriptor_application_format_identifier*)
++ (buf + sizeof(struct mpeg_content_labelling_descriptor));
++}
++
++/**
++ * Accessor for pointer to flags field of an mpeg_content_labelling_descriptor.
++ *
++ * @param d The mpeg_content_labelling_descriptor structure.
++ * @return The pointer, or NULL on error.
++ */
++static inline struct mpeg_content_labelling_descriptor_flags*
++ mpeg_content_labelling_descriptor_flags(struct mpeg_content_labelling_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_content_labelling_descriptor);
++
++ if (d->metadata_application_format != 0xffff)
++ buf += 4;
++
++ return (struct mpeg_content_labelling_descriptor_flags *) buf;
++}
++
++/**
++ * Accessor for reference_id field of an mpeg_content_labelling_descriptor.
++ *
++ * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_content_labelling_descriptor_reference_id*
++ mpeg_content_labelling_descriptor_reference_id(struct mpeg_content_labelling_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
++
++ if (flags->content_reference_id_record_flag != 1)
++ return NULL;
++
++ return (struct mpeg_content_labelling_descriptor_reference_id *) buf;
++}
++
++/**
++ * Accessor for data field of an mpeg_content_reference_id.
++ *
++ * @param d The mpeg_content_reference_id structure.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_content_reference_id_data(struct mpeg_content_labelling_descriptor_reference_id *d)
++{
++ return (uint8_t*) d + sizeof(struct mpeg_content_labelling_descriptor_reference_id);
++}
++
++/**
++ * Accessor for time_base field of an mpeg_content_labelling_descriptor.
++ *
++ * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_content_labelling_descriptor_time_base*
++ mpeg_content_labelling_descriptor_time_base(struct mpeg_content_labelling_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
++
++ if ((flags->content_time_base_indicator!=1) && (flags->content_time_base_indicator!=2))
++ return NULL;
++
++ if (flags->content_reference_id_record_flag == 1)
++ buf += 1 + buf[1];
++
++ return (struct mpeg_content_labelling_descriptor_time_base *) buf;
++}
++
++/**
++ * Accessor for content_id field of an mpeg_content_labelling_descriptor.
++ *
++ * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_content_labelling_descriptor_content_id*
++ mpeg_content_labelling_descriptor_content_id(struct mpeg_content_labelling_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
++
++ if (flags->content_time_base_indicator!=2)
++ return NULL;
++
++ if (flags->content_reference_id_record_flag == 1)
++ buf += 1 + buf[1];
++ if ((flags->content_time_base_indicator==1) || (flags->content_time_base_indicator==2))
++ buf += sizeof(struct mpeg_content_labelling_descriptor_time_base);
++
++ return (struct mpeg_content_labelling_descriptor_content_id *) buf;
++}
++
++/**
++ * Accessor for time_base_association field of an mpeg_content_labelling_descriptor.
++ *
++ * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_content_labelling_descriptor_time_base_association*
++ mpeg_content_labelling_descriptor_time_base_assoc(struct mpeg_content_labelling_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
++
++ if (flags->content_time_base_indicator<3)
++ return NULL;
++
++ if (flags->content_reference_id_record_flag == 1)
++ buf += 1 + buf[1];
++ if ((flags->content_time_base_indicator==1) || (flags->content_time_base_indicator==2))
++ buf += sizeof(struct mpeg_content_labelling_descriptor_time_base);
++ if (flags->content_time_base_indicator==2)
++ buf += sizeof(struct mpeg_content_labelling_descriptor_content_id);
++
++ return (struct mpeg_content_labelling_descriptor_time_base_association *) buf;
++}
++
++/**
++ * Accessor for data field of an mpeg_time_base_association.
++ *
++ * @param d The mpeg_time_base_association structure.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_time_base_association_data(struct mpeg_content_labelling_descriptor_time_base_association *d)
++{
++ return (uint8_t*) d + sizeof(struct mpeg_content_labelling_descriptor_time_base_association);
++}
++
++
++/**
++ * Accessor for private_data field of an mpeg_content_labelling_descriptor.
++ *
++ * @param d The mpeg_content_labelling_descriptor structure.
++ * @param flags Pointer to the mpeg_content_labelling_descriptor_flags.
++ * @param length Where the number of bytes in the field should be stored.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_content_labelling_descriptor_data(struct mpeg_content_labelling_descriptor *d,
++ struct mpeg_content_labelling_descriptor_flags *flags,
++ int *length)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_content_labelling_descriptor_flags);
++ uint8_t *end = (uint8_t*) d + d->d.len + 2;
++
++ if (flags->content_reference_id_record_flag == 1)
++ buf += 1 + buf[1];
++ if ((flags->content_time_base_indicator==1) || (flags->content_time_base_indicator==2))
++ buf += sizeof(struct mpeg_content_labelling_descriptor_time_base);
++ if (flags->content_time_base_indicator==2)
++ buf += sizeof(struct mpeg_content_labelling_descriptor_content_id);
++ if (flags->content_time_base_indicator<3)
++ buf += 1 + buf[1];
++
++ *length = end - buf;
++
++ return buf;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/copyright_descriptor.h dvb-apps/lib/libucsi/mpeg/copyright_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/copyright_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/copyright_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,89 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_COPYRIGHT_DESCRIPTOR
++#define _UCSI_MPEG_COPYRIGHT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_copyright_descriptor structure.
++ */
++struct mpeg_copyright_descriptor {
++ struct descriptor d;
++
++ uint32_t copyright_identifier;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_copyright_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return mpeg_copyright_descriptor pointer, or NULL on error.
++ */
++static inline struct mpeg_copyright_descriptor*
++ mpeg_copyright_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct mpeg_copyright_descriptor) - 2))
++ return NULL;
++
++ bswap32((uint8_t*) d + 2);
++
++ return (struct mpeg_copyright_descriptor*) d;
++}
++
++/**
++ * Retrieve pointer to data field of an mpeg_copyright_descriptor.
++ *
++ * @param d mpeg_copyright_descriptor pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ mpeg_copyright_descriptor_data(struct mpeg_copyright_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct mpeg_copyright_descriptor);
++}
++
++
++/**
++ * Determine length of the data field of an mpeg_copyright_descriptor.
++ *
++ * @param d mpeg_copyright_descriptor pointer.
++ * @return Length of field in bytes.
++ */
++static inline int
++ mpeg_copyright_descriptor_data_length(struct mpeg_copyright_descriptor *d)
++{
++ return d->d.len - 4;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/datagram_section.h dvb-apps/lib/libucsi/mpeg/datagram_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/datagram_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/datagram_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,81 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ * Copyright (C) 2008 Patrick Boettcher (pb@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_DATAGRAM_SECTION_H
++#define _UCSI_MPEG_DATAGRAM_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * datagram_section structure.
++ */
++struct datagram_section {
++ struct section head;
++
++ uint8_t MAC_address_6;
++ uint8_t MAC_address_5;
++ EBIT5(uint8_t reserved : 2; ,
++ uint8_t payload_scrambling_control : 2; ,
++ uint8_t address_scrambling_control : 2; ,
++ uint8_t LLC_SNAP_flag : 1; ,
++ uint8_t current_next_indicator : 1; );
++ uint8_t section_number;
++ uint8_t last_section_number;
++ uint8_t MAC_address_4;
++ uint8_t MAC_address_3;
++ uint8_t MAC_address_2;
++ uint8_t MAC_address_1;
++
++ /* LLC_SNAP or IP-data */
++ /* if last section stuffing */
++ /* CRC */
++} __ucsi_packed;
++
++/**
++ */
++static inline struct datagram_section *datagram_section_codec(struct section *section)
++{
++ /* something to do here ? */
++ return (struct datagram_section *) section;
++}
++
++static inline uint8_t *datagram_section_ip_data(struct datagram_section *d)
++{
++ return (uint8_t *) d + sizeof(struct section) + 2 + 1 + 1 + 1 + 4;
++}
++
++static inline size_t datagram_section_ip_data_length(struct datagram_section *d)
++{
++ return section_length(&d->head) - (sizeof(struct section) + 2 + 1 + 1 + 1 + 4) - CRC_SIZE;
++}
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/data_stream_alignment_descriptor.h dvb-apps/lib/libucsi/mpeg/data_stream_alignment_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/data_stream_alignment_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/data_stream_alignment_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,73 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_DATA_STREAM_ALIGNMENT_DESCRIPTOR
++#define _UCSI_MPEG_DATA_STREAM_ALIGNMENT_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Possible values for alignment_type.
++ */
++enum {
++ MPEG_DATA_STREAM_ALIGNMENT_VIDEO_SLICE_OR_AU = 0x01,
++ MPEG_DATA_STREAM_ALIGNMENT_VIDEO_AU = 0x02,
++ MPEG_DATA_STREAM_ALIGNMENT_VIDEO_GOP_OR_SEQ = 0x03,
++ MPEG_DATA_STREAM_ALIGNMENT_VIDEO_SEQ = 0x04,
++
++ MPEG_DATA_STREAM_ALIGNMENT_AUDIO_SYNC_WORD = 0x01,
++};
++
++/**
++ * mpeg_data_stream_alignment_descriptor structure.
++ */
++struct mpeg_data_stream_alignment_descriptor {
++ struct descriptor d;
++
++ uint8_t alignment_type;
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_data_stream_alignment_descriptor.
++ *
++ * @param d Pointer to generic descriptor structure.
++ * @return Pointer to mpeg_data_stream_alignment_descriptor, or NULL on error.
++ */
++static inline struct mpeg_data_stream_alignment_descriptor*
++ mpeg_data_stream_alignment_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_data_stream_alignment_descriptor) - 2))
++ return NULL;
++
++ return (struct mpeg_data_stream_alignment_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/descriptor.h dvb-apps/lib/libucsi/mpeg/descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,102 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_DESCRIPTOR_H
++#define _UCSI_MPEG_DESCRIPTOR_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/mpeg/mpeg4_audio_descriptor.h>
++#include <libucsi/mpeg/mpeg4_video_descriptor.h>
++#include <libucsi/mpeg/audio_stream_descriptor.h>
++#include <libucsi/mpeg/ca_descriptor.h>
++#include <libucsi/mpeg/content_labelling_descriptor.h>
++#include <libucsi/mpeg/copyright_descriptor.h>
++#include <libucsi/mpeg/data_stream_alignment_descriptor.h>
++#include <libucsi/mpeg/external_es_id_descriptor.h>
++#include <libucsi/mpeg/fmc_descriptor.h>
++#include <libucsi/mpeg/fmxbuffer_size_descriptor.h>
++#include <libucsi/mpeg/hierarchy_descriptor.h>
++#include <libucsi/mpeg/ibp_descriptor.h>
++#include <libucsi/mpeg/iod_descriptor.h>
++#include <libucsi/mpeg/iso_639_language_descriptor.h>
++#include <libucsi/mpeg/maximum_bitrate_descriptor.h>
++#include <libucsi/mpeg/metadata_descriptor.h>
++#include <libucsi/mpeg/metadata_pointer_descriptor.h>
++#include <libucsi/mpeg/metadata_std_descriptor.h>
++#include <libucsi/mpeg/multiplex_buffer_descriptor.h>
++#include <libucsi/mpeg/multiplex_buffer_utilization_descriptor.h>
++#include <libucsi/mpeg/muxcode_descriptor.h>
++#include <libucsi/mpeg/private_data_indicator_descriptor.h>
++#include <libucsi/mpeg/registration_descriptor.h>
++#include <libucsi/mpeg/sl_descriptor.h>
++#include <libucsi/mpeg/smoothing_buffer_descriptor.h>
++#include <libucsi/mpeg/std_descriptor.h>
++#include <libucsi/mpeg/system_clock_descriptor.h>
++#include <libucsi/mpeg/target_background_grid_descriptor.h>
++#include <libucsi/mpeg/video_stream_descriptor.h>
++#include <libucsi/mpeg/video_window_descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Enumeration of MPEG descriptor tags.
++ */
++enum mpeg_descriptor_tag {
++ dtag_mpeg_video_stream = 0x02,
++ dtag_mpeg_audio_stream = 0x03,
++ dtag_mpeg_hierarchy = 0x04,
++ dtag_mpeg_registration = 0x05,
++ dtag_mpeg_data_stream_alignment = 0x06,
++ dtag_mpeg_target_background_grid = 0x07,
++ dtag_mpeg_video_window = 0x08,
++ dtag_mpeg_ca = 0x09,
++ dtag_mpeg_iso_639_language = 0x0a,
++ dtag_mpeg_system_clock = 0x0b,
++ dtag_mpeg_multiplex_buffer_utilization = 0x0c,
++ dtag_mpeg_copyright = 0x0d,
++ dtag_mpeg_maximum_bitrate = 0x0e,
++ dtag_mpeg_private_data_indicator = 0x0f,
++ dtag_mpeg_smoothing_buffer = 0x10,
++ dtag_mpeg_std = 0x11,
++ dtag_mpeg_ibp = 0x12,
++ dtag_mpeg_4_video = 0x1b,
++ dtag_mpeg_4_audio = 0x1c,
++ dtag_mpeg_iod = 0x1d,
++ dtag_mpeg_sl = 0x1e,
++ dtag_mpeg_fmc = 0x1f,
++ dtag_mpeg_external_es_id = 0x20,
++ dtag_mpeg_muxcode = 0x21,
++ dtag_mpeg_fmxbuffer_size = 0x22,
++ dtag_mpeg_multiplex_buffer = 0x23,
++ dtag_mpeg_content_labelling = 0x24,
++ dtag_mpeg_metadata_pointer = 0x25,
++ dtag_mpeg_metadata = 0x26,
++ dtag_mpeg_metadata_std = 0x27,
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/external_es_id_descriptor.h dvb-apps/lib/libucsi/mpeg/external_es_id_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/external_es_id_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/external_es_id_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,63 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_EXTERNAL_ES_ID_DESCRIPTOR
++#define _UCSI_MPEG_EXTERNAL_ES_ID_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_external_es_id_descriptor structure.
++ */
++struct mpeg_external_es_id_descriptor {
++ struct descriptor d;
++
++ uint16_t external_es_id;
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_external_es_id_descriptor structure.
++ *
++ * @param d Generic descriptor structure.
++ * @return mpeg_external_es_id_descriptor pointer, or NULL on error.
++ */
++static inline struct mpeg_external_es_id_descriptor*
++ mpeg_external_es_id_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_external_es_id_descriptor) - 2))
++ return NULL;
++
++ bswap16((uint8_t*) d + 2);
++
++ return (struct mpeg_external_es_id_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/fmc_descriptor.h dvb-apps/lib/libucsi/mpeg/fmc_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/fmc_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/fmc_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,122 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_FMC_DESCRIPTOR
++#define _UCSI_MPEG_FMC_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_fmc_descriptor structure.
++ */
++struct mpeg_fmc_descriptor {
++ struct descriptor d;
++
++ /* struct mpeg_flex_mux muxes[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the muxes field of an mpeg_fmc_descriptor structure.
++ */
++struct mpeg_flex_mux {
++ uint16_t es_id;
++ uint8_t flex_mux_channel;
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_fmc_descriptor structure.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to an mpeg_fmc_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_fmc_descriptor*
++ mpeg_fmc_descriptor_codec(struct descriptor* d)
++{
++ uint8_t* buf = (uint8_t*) d + 2;
++ int pos = 0;
++ int len = d->len;
++
++ if (len % sizeof(struct mpeg_flex_mux))
++ return NULL;
++
++ while(pos < len) {
++ bswap16(buf+pos);
++ pos += sizeof(struct mpeg_flex_mux);
++ }
++
++ return (struct mpeg_fmc_descriptor*) d;
++}
++
++/**
++ * Convenience iterator for the muxes field of an mpeg_fmc_descriptor structure.
++ *
++ * @param d Generic descriptor structure.
++ * @param pos Variable holding a pointer to the the current entry within the muxes field.
++ */
++#define mpeg_fmc_descriptor_muxes_for_each(d, pos) \
++ for ((pos) = mpeg_fmc_descriptor_muxes_first(d); \
++ (pos); \
++ (pos) = mpeg_fmc_descriptor_muxes_next(d, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct mpeg_flex_mux*
++ mpeg_fmc_descriptor_muxes_first(struct mpeg_fmc_descriptor *d)
++{
++ if (d->d.len < sizeof(struct mpeg_flex_mux))
++ return NULL;
++
++ return (struct mpeg_flex_mux *)
++ ((uint8_t*) d + sizeof(struct mpeg_fmc_descriptor));
++}
++
++static inline struct mpeg_flex_mux*
++ mpeg_fmc_descriptor_muxes_next(struct mpeg_fmc_descriptor *d,
++ struct mpeg_flex_mux *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct mpeg_flex_mux);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct mpeg_flex_mux *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/fmxbuffer_size_descriptor.h dvb-apps/lib/libucsi/mpeg/fmxbuffer_size_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/fmxbuffer_size_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/fmxbuffer_size_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,83 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_FMXBUFFER_SIZE_DESCRIPTOR
++#define _UCSI_MPEG_FMXBUFFER_SIZE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++
++/**
++ * mpeg_fmxbuffer_size_descriptor structure.
++ */
++struct mpeg_fmxbuffer_size_descriptor {
++ struct descriptor d;
++
++ /* uint8_t descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_fmxbuffer_size_descriptor structure.
++ *
++ * @param d Pointer to a generic descriptor structure.
++ * @return Pointer to an mpeg_fmxbuffer_size_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_fmxbuffer_size_descriptor*
++ mpeg_fmxbuffer_size_descriptor_codec(struct descriptor* d)
++{
++ return (struct mpeg_fmxbuffer_size_descriptor*) d;
++}
++
++/**
++ * Retrieve pointer to descriptors field of mpeg_fmxbuffer_size_descriptor structure.
++ *
++ * @param d mpeg_fmxbuffer_size_descriptor structure pointer.
++ * @return Pointer to the descriptors.
++ */
++static inline uint8_t *
++ mpeg_fmxbuffer_size_descriptor_descriptors(struct mpeg_fmxbuffer_size_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct mpeg_fmxbuffer_size_descriptor);
++}
++
++/**
++ * Calculate the length of the descriptors field of an mpeg_fmxbuffer_size_descriptor structure.
++ *
++ * @param d mpeg_fmxbuffer_size_descriptor structure pointer.
++ * @return Length of descriptors in bytes.
++ */
++static inline int
++ mpeg_fmxbuffer_size_descriptor_descriptors_length(struct mpeg_fmxbuffer_size_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/hierarchy_descriptor.h dvb-apps/lib/libucsi/mpeg/hierarchy_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/hierarchy_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/hierarchy_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,83 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_HIERARCHY_DESCRIPTOR
++#define _UCSI_MPEG_HIERARCHY_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Hierarchy type values.
++ */
++enum {
++ MPEG_HIERARCHY_TYPE_ISO13818_2_SPATIAL_SCALABILITY = 0x01,
++ MPEG_HIERARCHY_TYPE_ISO13818_2_SNR_SCALABILITY = 0x02,
++ MPEG_HIERARCHY_TYPE_ISO13818_2_TEMPORAL_SCALABILITY = 0x03,
++ MPEG_HIERARCHY_TYPE_ISO13818_2_DATA_PARTITIONING = 0x04,
++ MPEG_HIERARCHY_TYPE_ISO13818_3_EXTENSION_BITSTREAM = 0x05,
++ MPEG_HIERARCHY_TYPE_ISO13818_1_PRIVATE_BITSTREAM = 0x06,
++ MPEG_HIERARCHY_TYPE_ISO13818_2_MULTI_VIEW_PROFILE = 0x07,
++ MPEG_HIERARCHY_TYPE_BASE_LAYER = 0x0f,
++};
++
++
++/**
++ * mpeg_hierarchy_descriptor structure.
++ */
++struct mpeg_hierarchy_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t reserved_1 : 4; ,
++ uint8_t hierarchy_type : 4; );
++ EBIT2(uint8_t reserved_2 : 2; ,
++ uint8_t hierarchy_layer_index : 6; );
++ EBIT2(uint8_t reserved_3 : 2; ,
++ uint8_t hierarchy_embedded_layer_index : 6; );
++ EBIT2(uint8_t reserved_4 : 2; ,
++ uint8_t hierarchy_channel : 6; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_hierarchy_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to mpeg_hierarchy_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_hierarchy_descriptor*
++ mpeg_hierarchy_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_hierarchy_descriptor) - 2))
++ return NULL;
++
++ return (struct mpeg_hierarchy_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/ibp_descriptor.h dvb-apps/lib/libucsi/mpeg/ibp_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/ibp_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/ibp_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,65 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_IBP_DESCRIPTOR
++#define _UCSI_MPEG_IBP_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_ibp_descriptor structure.
++ */
++struct mpeg_ibp_descriptor {
++ struct descriptor d;
++
++ EBIT3(uint16_t closed_gop_flag : 1; ,
++ uint16_t identical_gop_flag : 1; ,
++ uint16_t max_gop_length : 14; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_ibp_descriptor structure.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to the mpeg_ibp_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_ibp_descriptor*
++ mpeg_ibp_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_ibp_descriptor) - 2))
++ return NULL;
++
++ bswap16((uint8_t*) d + 2);
++
++ return (struct mpeg_ibp_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/iod_descriptor.h dvb-apps/lib/libucsi/mpeg/iod_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/iod_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/iod_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,87 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_IOD_DESCRIPTOR
++#define _UCSI_MPEG_IOD_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_iod_descriptor structure.
++ */
++struct mpeg_iod_descriptor {
++ struct descriptor d;
++
++ uint8_t scope_of_iod_label;
++ uint8_t iod_label;
++ /* uint8_t iod[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_iod_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to an mpeg_iod_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_iod_descriptor*
++ mpeg_iod_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct mpeg_iod_descriptor) - 2))
++ return NULL;
++
++ return (struct mpeg_iod_descriptor*) d;
++}
++
++/**
++ * Retrieve pointer to iod field of an mpeg_iod_descriptor structure.
++ *
++ * @param d Pointer to mpeg_iod_descriptor structure.
++ * @return Pointer to the iod field.
++ */
++static inline uint8_t *
++ mpeg_iod_descriptor_iod(struct mpeg_iod_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct mpeg_iod_descriptor);
++}
++
++/**
++ * Calculate the length of the iod field of an mpeg_iod_descriptor structure.
++ *
++ * @param d Pointer to mpeg_iod_descriptor structure.
++ * @return The number of bytes.
++ */
++static inline int
++ mpeg_iod_descriptor_iod_length(struct mpeg_iod_descriptor *d)
++{
++ return d->d.len - 2;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/iso_639_language_descriptor.h dvb-apps/lib/libucsi/mpeg/iso_639_language_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/iso_639_language_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/iso_639_language_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,124 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_ISO_639_LANGUAGE_DESCRIPTOR
++#define _UCSI_MPEG_ISO_639_LANGUAGE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++#include <libucsi/types.h>
++
++/**
++ * Possible values for audio_type.
++ */
++enum {
++ MPEG_AUDIO_TYPE_CLEAN_EFFECTS = 0x01,
++ MPEG_AUDIO_TYPE_HEARING_IMPAIRED = 0x02,
++ MPEG_AUDIO_TYPE_VISUAL_IMPAIRED_COMMENTARY = 0x03,
++};
++
++/**
++ * mpeg_iso_639_language_descriptor structure.
++ */
++struct mpeg_iso_639_language_descriptor {
++ struct descriptor d;
++
++ /* struct mpeg_iso_639_language_code languages[] */
++} __ucsi_packed;
++
++/**
++ * An entry in the mpeg_iso_639_language_descriptor languages field.
++ */
++struct mpeg_iso_639_language_code {
++ iso639lang_t language_code;
++ uint8_t audio_type;
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_iso_639_language_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to an mpeg_iso_639_language_descriptor structure, or NULL
++ * on error.
++ */
++static inline struct mpeg_iso_639_language_descriptor*
++ mpeg_iso_639_language_descriptor_codec(struct descriptor* d)
++{
++ if (d->len % sizeof(struct mpeg_iso_639_language_code))
++ return NULL;
++
++ return (struct mpeg_iso_639_language_descriptor*) d;
++}
++
++/**
++ * Convenience iterator for the languages field of an mpeg_iso_639_language_descriptor
++ *
++ * @param d Pointer to the mpeg_iso_639_language_descriptor structure.
++ * @param pos Variable holding a pointer to the current entry.
++ */
++#define mpeg_iso_639_language_descriptor_languages_for_each(_d, _pos) \
++ for ((_pos) = mpeg_iso_639_language_descriptor_languages_first(_d); \
++ (_pos); \
++ (_pos) = mpeg_iso_639_language_descriptor_languages_next(_d, _pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct mpeg_iso_639_language_code*
++ mpeg_iso_639_language_descriptor_languages_first(struct mpeg_iso_639_language_descriptor *d)
++{
++ if (d->d.len < sizeof(struct mpeg_iso_639_language_code))
++ return NULL;
++
++ return (struct mpeg_iso_639_language_code *)
++ ((uint8_t*) d + sizeof(struct mpeg_iso_639_language_descriptor));
++}
++
++static inline struct mpeg_iso_639_language_code*
++ mpeg_iso_639_language_descriptor_languages_next(struct mpeg_iso_639_language_descriptor *d,
++ struct mpeg_iso_639_language_code *pos)
++{
++ uint8_t *end = (uint8_t*) d + 2 + d->d.len;
++ uint8_t *next = (uint8_t *) pos + sizeof(struct mpeg_iso_639_language_code);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct mpeg_iso_639_language_code *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/Makefile dvb-apps/lib/libucsi/mpeg/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,66 @@
++# Makefile for linuxtv.org dvb-apps/lib/libucsi/mpeg
++
++.PHONY: sub-error-mpeg
++
++sub-error-mpeg:
++ $(error You can't use this makefile directly.)
++
++ifneq ($(lib_name),)
++
++objects += mpeg/cat_section.o \
++ mpeg/metadata_section.o \
++ mpeg/odsmt_section.o \
++ mpeg/pat_section.o \
++ mpeg/pmt_section.o \
++ mpeg/tsdt_section.o
++
++sub-install += mpeg
++
++else
++
++includes = audio_stream_descriptor.h \
++ ca_descriptor.h \
++ cat_section.h \
++ content_labelling_descriptor.h \
++ copyright_descriptor.h \
++ data_stream_alignment_descriptor.h \
++ datagram_section.h \
++ descriptor.h \
++ external_es_id_descriptor.h \
++ fmc_descriptor.h \
++ fmxbuffer_size_descriptor.h \
++ hierarchy_descriptor.h \
++ ibp_descriptor.h \
++ iod_descriptor.h \
++ iso_639_language_descriptor.h \
++ maximum_bitrate_descriptor.h \
++ metadata_descriptor.h \
++ metadata_pointer_descriptor.h \
++ metadata_section.h \
++ metadata_std_descriptor.h \
++ mpeg4_audio_descriptor.h \
++ mpeg4_video_descriptor.h \
++ multiplex_buffer_descriptor.h \
++ multiplex_buffer_utilization_descriptor.h \
++ muxcode_descriptor.h \
++ odsmt_section.h \
++ pat_section.h \
++ pmt_section.h \
++ private_data_indicator_descriptor.h \
++ registration_descriptor.h \
++ section.h \
++ sl_descriptor.h \
++ smoothing_buffer_descriptor.h \
++ std_descriptor.h \
++ system_clock_descriptor.h \
++ target_background_grid_descriptor.h \
++ tsdt_section.h \
++ types.h \
++ video_stream_descriptor.h \
++ video_window_descriptor.h
++
++include ../../../Make.rules
++
++lib_name = libucsi/mpeg
++
++endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/maximum_bitrate_descriptor.h dvb-apps/lib/libucsi/mpeg/maximum_bitrate_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/maximum_bitrate_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/maximum_bitrate_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,64 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_MAXIMUM_BITRATE_DESCRIPTOR
++#define _UCSI_MPEG_MAXIMUM_BITRATE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_maximum_bitrate_descriptor structure.
++ */
++struct mpeg_maximum_bitrate_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint32_t reserved : 2; ,
++ uint32_t maximum_bitrate : 22; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_maximum_bitrate_descriptor.
++ *
++ * @param d Pointer to generic descriptor structure.
++ * @return Pointer to mpeg_maximum_bitrate_descriptor, or NULL on error.
++ */
++static inline struct mpeg_maximum_bitrate_descriptor*
++ mpeg_maximum_bitrate_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_maximum_bitrate_descriptor) - 2))
++ return NULL;
++
++ bswap24((uint8_t*) d + 2);
++
++ return (struct mpeg_maximum_bitrate_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_descriptor.h dvb-apps/lib/libucsi/mpeg/metadata_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/metadata_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,472 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_METADATA_DESCRIPTOR
++#define _UCSI_MPEG_METADATA_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Values for the decoder_config_flags field.
++ */
++enum {
++ MPEG_DECODER_CONFIG_NONE = 0x00,
++ MPEG_DECODER_CONFIG_IN_DECODER_CONFIG = 0x01,
++ MPEG_DECODER_CONFIG_SAME_METADATA_SERVICE = 0x02,
++ MPEG_DECODER_CONFIG_DSMCC = 0x03,
++ MPEG_DECODER_CONFIG_SAME_PROGRAM = 0x04,
++};
++
++/**
++ * mpeg_metadata_descriptor structure.
++ */
++struct mpeg_metadata_descriptor {
++ struct descriptor d;
++
++ uint16_t metadata_application_format;
++ /* struct mpeg_metadata_descriptor_application_format_identifier appid */
++ /* uint8_t metadata_format */
++ /* struct mpeg_metadata_descriptor_format_identifier formid */
++ /* struct mpeg_metadata_descriptor_flags flags */
++ /* struct mpeg_metadata_descriptor_service_identifier service_identifier */
++ /* struct mpeg_metadata_descriptor_decoder_config decoder_config */
++ /* struct mpeg_metadata_descriptor_decoder_config_id_record decoder_config_id_record */
++ /* struct mpeg_metadata_descriptor_decoder_config_service_id decoder_config_service_id */
++ /* struct mpeg_metadata_descriptor_decoder_config_reserved decoder_config_reserved */
++ /* uint8_t private_data[] */
++} __ucsi_packed;
++
++/**
++ * appid field of a metadata_descriptor.
++ */
++struct mpeg_metadata_descriptor_application_format_identifier {
++ uint32_t id;
++} __ucsi_packed;
++
++/**
++ * formid field of a metadata_descriptor.
++ */
++struct mpeg_metadata_descriptor_format_identifier {
++ uint32_t id;
++} __ucsi_packed;
++
++/**
++ * Flags field of a metadata_descriptor
++ */
++struct mpeg_metadata_descriptor_flags {
++ uint8_t metadata_service_id;
++ EBIT3(uint8_t decoder_config_flags : 3; ,
++ uint8_t dsm_cc_flag : 1; ,
++ uint8_t reserved : 4; );
++} __ucsi_packed;
++
++/**
++ * service_identifier field of a metadata_descriptor.
++ */
++struct mpeg_metadata_descriptor_service_identifier {
++ uint8_t service_identification_length;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * decoder_config field of a metadata_descriptor.
++ */
++struct mpeg_metadata_descriptor_decoder_config {
++ uint8_t decoder_config_length;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * decoder_config_id_record field of a metadata_descriptor.
++ */
++struct mpeg_metadata_descriptor_decoder_config_id_record {
++ uint8_t decoder_config_id_record_length;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * decoder_config_service_id field of a metadata_descriptor.
++ */
++struct mpeg_metadata_descriptor_decoder_config_service_id {
++ uint8_t decoder_config_metadata_service_id;
++} __ucsi_packed;
++
++/**
++ * decoder_config_reserved field of a metadata_descriptor.
++ */
++struct mpeg_metadata_descriptor_decoder_config_reserved {
++ uint8_t reserved_data_length;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++
++
++
++/**
++ * Process an mpeg_metadata_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return Pointer to an mpeg_metadata_descriptor, or NULL on error.
++ */
++static inline struct mpeg_metadata_descriptor*
++ mpeg_metadata_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 2;
++ uint8_t *buf = (uint8_t*) d;
++ uint32_t len = d->len + 2;
++ struct mpeg_metadata_descriptor_flags *flags;
++ int id;
++
++ if (len < sizeof(struct mpeg_metadata_descriptor))
++ return NULL;
++
++ bswap16(buf + pos);
++ id = *((uint16_t*) (buf+pos));
++ pos += 2;
++
++ if (id == 0xffff) {
++ if (len < (pos+4))
++ return NULL;
++ bswap32(buf+pos);
++ pos += 4;
++ }
++
++ if (len < (pos+1))
++ return NULL;
++
++ id = buf[pos];
++ pos++;
++ if (id == 0xff) {
++ if (len < (pos+4))
++ return NULL;
++ bswap32(buf+pos);
++ pos += 4;
++ }
++
++ if (len < (pos + sizeof(struct mpeg_metadata_descriptor_flags)))
++ return NULL;
++ flags = (struct mpeg_metadata_descriptor_flags*) (buf+pos);
++ pos += sizeof(struct mpeg_metadata_descriptor_flags);
++
++ if (flags->dsm_cc_flag == 1) {
++ if (len < (pos+1))
++ return NULL;
++ if (len < (pos+1+buf[pos]))
++ return NULL;
++ pos += 1 + buf[pos];
++ }
++
++ if (flags->decoder_config_flags == 1) {
++ if (len < (pos+1))
++ return NULL;
++ if (len < (pos+1+buf[pos]))
++ return NULL;
++ pos += 1 + buf[pos];
++ }
++
++ if (flags->decoder_config_flags == 3) {
++ if (len < (pos+1))
++ return NULL;
++ if (len < (pos+1+buf[pos]))
++ return NULL;
++ pos += 1 + buf[pos];
++ }
++
++ if (flags->decoder_config_flags == 4) {
++ if (len < (pos+1))
++ return NULL;
++ pos++;
++ }
++
++ if ((flags->decoder_config_flags == 5) ||
++ (flags->decoder_config_flags == 6)) {
++ if (len < (pos+1))
++ return NULL;
++ if (len < (pos+1+buf[pos]))
++ return NULL;
++ pos += 1 + buf[pos];
++ }
++
++ if (len < pos)
++ return NULL;
++
++ return (struct mpeg_metadata_descriptor*) d;
++}
++
++/**
++ * Accessor for pointer to appid field of an mpeg_metadata_descriptor.
++ *
++ * @param d The mpeg_metadata_descriptor structure.
++ * @return The pointer, or NULL on error.
++ */
++static inline struct mpeg_metadata_descriptor_application_format_identifier*
++ mpeg_metadata_descriptor_appid(struct mpeg_metadata_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor);
++
++ if (d->metadata_application_format != 0xffff)
++ return NULL;
++ return (struct mpeg_metadata_descriptor_application_format_identifier*) buf;
++}
++
++/**
++ * Accessor for metadata_format field of an mpeg_metadata_descriptor.
++ *
++ * @param d The mpeg_metadata_descriptor structure.
++ * @return The pointer, or NULL on error.
++ */
++static inline uint8_t
++ mpeg_metadata_descriptor_metadata_format(struct mpeg_metadata_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor);
++
++ if (d->metadata_application_format == 0xffff)
++ buf+=4;
++ return *buf;
++}
++
++/**
++ * Accessor for pointer to formid field of an mpeg_metadata_descriptor.
++ *
++ * @param d The mpeg_metadata_descriptor structure.
++ * @return The pointer, or NULL on error.
++ */
++static inline struct mpeg_metadata_descriptor_format_identifier*
++ mpeg_metadata_descriptor_formid(struct mpeg_metadata_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor);
++
++ if (d->metadata_application_format == 0xffff)
++ buf+=4;
++ if (*buf != 0xff)
++ return NULL;
++
++ return (struct mpeg_metadata_descriptor_format_identifier*) (buf+1);
++}
++
++/**
++ * Accessor for flags field of an mpeg_metadata_descriptor.
++ *
++ * @param d The mpeg_metadata_descriptor structure.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_descriptor_flags*
++ mpeg_metadata_descriptor_flags(struct mpeg_metadata_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor);
++
++ if (d->metadata_application_format == 0xffff)
++ buf+=4;
++ if (*buf == 0xff)
++ buf+=4;
++
++ return (struct mpeg_metadata_descriptor_flags*) buf;
++}
++
++
++/**
++ * Accessor for service_identifier field of an mpeg_metadata_descriptor.
++ *
++ * @param flags Pointer to the mpeg_metadata_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_descriptor_service_identifier*
++ mpeg_metadata_descriptor_sevice_identifier(struct mpeg_metadata_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
++
++ if (flags->dsm_cc_flag!=1)
++ return NULL;
++
++ return (struct mpeg_metadata_descriptor_service_identifier *) buf;
++}
++
++/**
++ * Accessor for data field of an mpeg_metadata_descriptor_service_identifier.
++ *
++ * @param d The mpeg_metadata_descriptor_service_identifier structure.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_metadata_descriptor_service_identifier_data(struct mpeg_metadata_descriptor_service_identifier *d)
++{
++ return (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor_service_identifier);
++}
++
++/**
++ * Accessor for decoder_config field of an mpeg_metadata_descriptor.
++ *
++ * @param flags Pointer to the mpeg_metadata_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_descriptor_decoder_config*
++ mpeg_metadata_descriptor_decoder_config(struct mpeg_metadata_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
++
++ if (flags->decoder_config_flags != 1)
++ return NULL;
++
++ if (flags->dsm_cc_flag==1)
++ buf += 1 + buf[1];
++
++ return (struct mpeg_metadata_descriptor_decoder_config*) buf;
++}
++
++/**
++ * Accessor for data field of an mpeg_metadata_descriptor_service_identifier.
++ *
++ * @param d The mpeg_metadata_descriptor_service_identifier structure.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_metadata_descriptor_decoder_config_data(struct mpeg_metadata_descriptor_decoder_config *d)
++{
++ return (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor_decoder_config);
++}
++
++/**
++ * Accessor for decoder_config_id_record field of an mpeg_metadata_descriptor.
++ *
++ * @param flags Pointer to the mpeg_metadata_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_descriptor_decoder_config_id_record*
++ mpeg_metadata_descriptor_decoder_config_id_record(struct mpeg_metadata_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
++
++ if (flags->decoder_config_flags != 3)
++ return NULL;
++
++ if (flags->dsm_cc_flag==1)
++ buf += 1 + buf[1];
++
++ return (struct mpeg_metadata_descriptor_decoder_config_id_record *) buf;
++}
++
++/**
++ * Accessor for data field of an mpeg_metadata_descriptor_decoder_config_id_record.
++ *
++ * @param d The mpeg_metadata_descriptor_decoder_config_id_record structure.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_metadata_descriptor_decoder_config_id_record_data(struct mpeg_metadata_descriptor_decoder_config_id_record *d)
++{
++ return (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor_decoder_config_id_record);
++}
++
++/**
++ * Accessor for decoder_config_service_id field of an mpeg_metadata_descriptor.
++ *
++ * @param flags Pointer to the mpeg_metadata_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_descriptor_decoder_config_service_id*
++ mpeg_metadata_descriptor_decoder_config_service_id(struct mpeg_metadata_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
++
++ if (flags->decoder_config_flags != 4)
++ return NULL;
++
++ if (flags->dsm_cc_flag==1)
++ buf += 1 + buf[1];
++
++ return (struct mpeg_metadata_descriptor_decoder_config_service_id *) buf;
++}
++
++/**
++ * Accessor for decoder_config_reserved field of an mpeg_metadata_descriptor.
++ *
++ * @param flags Pointer to the mpeg_metadata_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_descriptor_decoder_config_reserved*
++ mpeg_metadata_descriptor_decoder_config_reserved(struct mpeg_metadata_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
++
++ if ((flags->decoder_config_flags != 5) && (flags->decoder_config_flags != 6))
++ return NULL;
++
++ if (flags->dsm_cc_flag==1)
++ buf += 1 + buf[1];
++
++ return (struct mpeg_metadata_descriptor_decoder_config_reserved *) buf;
++}
++
++/**
++ * Accessor for data field of an mpeg_metadata_descriptor_decoder_config_reserved.
++ *
++ * @param d The mpeg_metadata_descriptor_decoder_config_reserved structure.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_metadata_descriptor_decoder_config_reserved_data(struct mpeg_metadata_descriptor_decoder_config_reserved *d)
++{
++ return (uint8_t*) d + sizeof(struct mpeg_metadata_descriptor_decoder_config_reserved);
++}
++
++/**
++ * Accessor for private_data field of an mpeg_metadata_descriptor.
++ *
++ * @param d The mpeg_metadata_descriptor structure.
++ * @param flags Pointer to the mpeg_metadata_descriptor_flags.
++ * @param length Where the number of bytes in the field should be stored.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_metadata_descriptor_private_data(struct mpeg_metadata_descriptor *d,
++ struct mpeg_metadata_descriptor_flags *flags,
++ int *length)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_descriptor_flags);
++ uint8_t *end = (uint8_t*) d + d->d.len + 2;
++
++
++ if (flags->dsm_cc_flag==1)
++ buf += 1 + buf[1];
++ if (flags->decoder_config_flags==1)
++ buf += 1 + buf[1];
++ if (flags->decoder_config_flags==3)
++ buf += 1 + buf[1];
++ if (flags->decoder_config_flags==4)
++ buf++;
++ if ((flags->decoder_config_flags==5)||(flags->decoder_config_flags==6))
++ buf += 1 + buf[1];
++
++ *length = end - buf;
++ return buf;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_pointer_descriptor.h dvb-apps/lib/libucsi/mpeg/metadata_pointer_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_pointer_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/metadata_pointer_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,360 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_METADATA_POINTER_DESCRIPTOR
++#define _UCSI_MPEG_METADATA_POINTER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * Possible values for the mpeg_carriage_flags field.
++ */
++enum {
++ MPEG_CARRIAGE_SAME_TS = 0x00,
++ MPEG_CARRIAGE_DIFFERENT_TS = 0x01,
++ MPEG_CARRIAGE_PS = 0x02,
++ MPEG_CARRIAGE_OTHER = 0x03,
++};
++
++/**
++ * mpeg_metadata_pointer_descriptor structure.
++ */
++struct mpeg_metadata_pointer_descriptor {
++ struct descriptor d;
++
++ uint16_t metadata_application_format;
++ /* struct mpeg_metadata_pointer_descriptor_application_format_identifier appid */
++ /* uint8_t metadata_format */
++ /* struct mpeg_metadata_pointer_descriptor_format_identifier formid */
++ /* struct mpeg_metadata_pointer_descriptor_flags flags */
++ /* struct mpeg_metadata_pointer_descriptor_locator locator */
++ /* struct mpeg_metadata_pointer_descriptor_program_number program_number */
++ /* struct mpeg_metadata_pointer_descriptor_carriage carriage */
++ /* uint8_t private_data[] */
++} __ucsi_packed;
++
++/**
++ * appid field of a metadata_pointer_descriptor.
++ */
++struct mpeg_metadata_pointer_descriptor_application_format_identifier {
++ uint32_t id;
++} __ucsi_packed;
++
++/**
++ * formid field of a metadata_pointer_descriptor.
++ */
++struct mpeg_metadata_pointer_descriptor_format_identifier {
++ uint32_t id;
++} __ucsi_packed;
++
++/**
++ * Flags field of a metadata_pointer_descriptor
++ */
++struct mpeg_metadata_pointer_descriptor_flags {
++ uint8_t metadata_service_id;
++ EBIT3(uint8_t metadata_locator_record_flag : 1; ,
++ uint8_t mpeg_carriage_flags : 2; ,
++ uint8_t reserved : 5; );
++} __ucsi_packed;
++
++/**
++ * Reference_id field of a metadata_pointer_descriptor.
++ */
++struct mpeg_metadata_pointer_descriptor_locator {
++ uint8_t metadata_locator_record_length;
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * program_number field of a metadata_pointer_descriptor.
++ */
++struct mpeg_metadata_pointer_descriptor_program_number {
++ uint16_t number;
++} __ucsi_packed;
++
++/**
++ * carriage field of a metadata_pointer_descriptor.
++ */
++struct mpeg_metadata_pointer_descriptor_carriage {
++ uint16_t transport_stream_location;
++ uint16_t transport_stream_id;
++} __ucsi_packed;
++
++
++
++
++/**
++ * Process an mpeg_metadata_pointer_descriptor.
++ *
++ * @param d Generic descriptor.
++ * @return Pointer to an mpeg_metadata_pointer_descriptor, or NULL on error.
++ */
++static inline struct mpeg_metadata_pointer_descriptor*
++ mpeg_metadata_pointer_descriptor_codec(struct descriptor* d)
++{
++ uint32_t pos = 2;
++ uint8_t *buf = (uint8_t*) d;
++ uint32_t len = d->len + 2;
++ struct mpeg_metadata_pointer_descriptor_flags *flags;
++ int id;
++
++ if (len < sizeof(struct mpeg_metadata_pointer_descriptor))
++ return NULL;
++
++ bswap16(buf + pos);
++ id = *((uint16_t*) (buf+pos));
++ pos += 2;
++
++ if (id == 0xffff) {
++ if (len < (pos+4))
++ return NULL;
++ bswap32(buf+pos);
++ pos += 4;
++ }
++
++ if (len < (pos+1))
++ return NULL;
++
++ id = buf[pos];
++ pos++;
++ if (id == 0xff) {
++ if (len < (pos+4))
++ return NULL;
++ bswap32(buf+pos);
++ pos += 4;
++ }
++
++ if (len < (pos + sizeof(struct mpeg_metadata_pointer_descriptor_flags)))
++ return NULL;
++ flags = (struct mpeg_metadata_pointer_descriptor_flags*) (buf+pos);
++ pos += sizeof(struct mpeg_metadata_pointer_descriptor_flags);
++
++ if (flags->metadata_locator_record_flag == 1) {
++ if (len < (pos+1))
++ return NULL;
++ if (len < (pos+1+buf[pos]))
++ return NULL;
++ pos += 1 + buf[pos];
++ }
++
++ if (flags->mpeg_carriage_flags < 3) {
++ if (len < (pos + 2))
++ return NULL;
++ bswap16(buf+pos);
++ pos += 2;
++ }
++
++ if (flags->mpeg_carriage_flags == 1) {
++ if (len < (pos + 4))
++ return NULL;
++ bswap16(buf+pos);
++ bswap16(buf+pos+2);
++ pos += 4;
++ }
++
++ if (len < pos)
++ return NULL;
++
++ return (struct mpeg_metadata_pointer_descriptor*) d;
++}
++
++/**
++ * Accessor for pointer to appid field of an mpeg_metadata_pointer_descriptor.
++ *
++ * @param d The mpeg_metadata_pointer_descriptor structure.
++ * @return The pointer, or NULL on error.
++ */
++static inline struct mpeg_metadata_pointer_descriptor_application_format_identifier*
++ mpeg_metadata_pointer_descriptor_appid(struct mpeg_metadata_pointer_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor);
++
++ if (d->metadata_application_format != 0xffff)
++ return NULL;
++ return (struct mpeg_metadata_pointer_descriptor_application_format_identifier*) buf;
++}
++
++/**
++ * Accessor for metadata_format field of an mpeg_metadata_pointer_descriptor.
++ *
++ * @param d The mpeg_metadata_pointer_descriptor structure.
++ * @return The pointer, or NULL on error.
++ */
++static inline uint8_t
++ mpeg_metadata_pointer_descriptor_metadata_format(struct mpeg_metadata_pointer_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor);
++
++ if (d->metadata_application_format == 0xffff)
++ buf+=4;
++ return *buf;
++}
++
++/**
++ * Accessor for pointer to formid field of an mpeg_metadata_pointer_descriptor.
++ *
++ * @param d The mpeg_metadata_pointer_descriptor structure.
++ * @return The pointer, or NULL on error.
++ */
++static inline struct mpeg_metadata_pointer_descriptor_format_identifier*
++ mpeg_metadata_pointer_descriptor_formid(struct mpeg_metadata_pointer_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor);
++
++ if (d->metadata_application_format == 0xffff)
++ buf+=4;
++ if (*buf != 0xff)
++ return NULL;
++
++ return (struct mpeg_metadata_pointer_descriptor_format_identifier*) (buf+1);
++}
++
++/**
++ * Accessor for flags field of an mpeg_metadata_pointer_descriptor.
++ *
++ * @param d The mpeg_metadata_pointer_descriptor structure.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_pointer_descriptor_flags*
++ mpeg_metadata_pointer_descriptor_flags(struct mpeg_metadata_pointer_descriptor *d)
++{
++ uint8_t *buf = (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor);
++
++ if (d->metadata_application_format == 0xffff)
++ buf+=4;
++ if (*buf == 0xff)
++ buf+=4;
++
++ return (struct mpeg_metadata_pointer_descriptor_flags*) buf;
++}
++
++
++/**
++ * Accessor for locator field of an mpeg_metadata_pointer_descriptor.
++ *
++ * @param flags Pointer to the mpeg_metadata_pointer_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_pointer_descriptor_locator*
++ mpeg_metadata_pointer_descriptor_locator(struct mpeg_metadata_pointer_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_pointer_descriptor_flags);
++
++ if (flags->metadata_locator_record_flag!=1)
++ return NULL;
++
++ return (struct mpeg_metadata_pointer_descriptor_locator *) buf;
++}
++
++/**
++ * Accessor for data field of an mpeg_metadata_pointer_descriptor_locator.
++ *
++ * @param d The mpeg_metadata_pointer_descriptor_locator structure.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_metadata_pointer_descriptor_locator_data(struct mpeg_metadata_pointer_descriptor_locator *d)
++{
++ return (uint8_t*) d + sizeof(struct mpeg_metadata_pointer_descriptor_locator);
++}
++
++
++/**
++ * Accessor for program_number field of an mpeg_metadata_pointer_descriptor.
++ *
++ * @param flags Pointer to the mpeg_metadata_pointer_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_pointer_descriptor_program_number*
++ mpeg_metadata_pointer_descriptor_program_number(struct mpeg_metadata_pointer_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_pointer_descriptor_flags);
++
++ if (flags->mpeg_carriage_flags < 3)
++ return NULL;
++
++ if (flags->metadata_locator_record_flag==1)
++ buf += 1 + buf[1];
++
++ return (struct mpeg_metadata_pointer_descriptor_program_number*) buf;
++}
++
++/**
++ * Accessor for carriage field of an mpeg_metadata_pointer_descriptor.
++ *
++ * @param flags Pointer to the mpeg_metadata_pointer_descriptor_flags.
++ * @return Pointer to the field, or NULL on error.
++ */
++static inline struct mpeg_metadata_pointer_descriptor_carriage*
++ mpeg_metadata_pointer_descriptor_carriage(struct mpeg_metadata_pointer_descriptor_flags *flags)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_pointer_descriptor_flags);
++
++ if (flags->mpeg_carriage_flags != 1)
++ return NULL;
++
++ if (flags->metadata_locator_record_flag==1)
++ buf += 1 + buf[1];
++ if (flags->mpeg_carriage_flags < 3)
++ buf += sizeof(struct mpeg_metadata_pointer_descriptor_program_number);
++
++ return (struct mpeg_metadata_pointer_descriptor_carriage *) buf;
++}
++
++/**
++ * Accessor for private_data field of an mpeg_metadata_pointer_descriptor.
++ *
++ * @param d The mpeg_metadata_pointer_descriptor structure.
++ * @param flags Pointer to the mpeg_metadata_pointer_descriptor_flags.
++ * @param length Where the number of bytes in the field should be stored.
++ * @return Pointer to the field.
++ */
++static inline uint8_t*
++ mpeg_metadata_pointer_descriptor_private_data(struct mpeg_metadata_pointer_descriptor *d,
++ struct mpeg_metadata_pointer_descriptor_flags *flags,
++ int *length)
++{
++ uint8_t *buf = (uint8_t*) flags + sizeof(struct mpeg_metadata_pointer_descriptor_flags);
++ uint8_t *end = (uint8_t*) d + d->d.len + 2;
++
++
++ if (flags->metadata_locator_record_flag==1)
++ buf += 1 + buf[1];
++ if (flags->mpeg_carriage_flags < 3)
++ buf += sizeof(struct mpeg_metadata_pointer_descriptor_program_number);
++ if (flags->mpeg_carriage_flags != 1)
++ buf += sizeof(struct mpeg_metadata_pointer_descriptor_carriage);
++
++ *length = end - buf;
++ return buf;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_section.c dvb-apps/lib/libucsi/mpeg/metadata_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/metadata_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,27 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/mpeg/metadata_section.h>
++
++struct mpeg_metadata_section * mpeg_metadata_section_codec(struct section_ext * ext)
++{
++ return (struct mpeg_metadata_section *)ext;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_section.h dvb-apps/lib/libucsi/mpeg/metadata_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/metadata_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,122 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_METADATA_SECTION_H
++#define _UCSI_MPEG_METADATA_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * mpeg_metadata_section structure.
++ */
++struct mpeg_metadata_section {
++ struct section_ext head;
++
++ /* uint8_t data[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_metadata_section structure.
++ *
++ * @param section Pointer to the section_ext structure.
++ * @return Pointer to the mpeg_metadata_section structure, or NULL on error.
++ */
++extern struct mpeg_metadata_section *mpeg_metadata_section_codec(struct section_ext *section);
++
++/**
++ * Accessor for the random_access_indicator field of a metadata section.
++ *
++ * @param metadata metadata section pointer.
++ * @return The random_access_indicator.
++ */
++static inline uint8_t mpeg_metadata_section_random_access_indicator(struct mpeg_metadata_section *metadata)
++{
++ return metadata->head.reserved >> 1;
++}
++
++/**
++ * Accessor for the decoder_config_flag field of a metadata section.
++ *
++ * @param metadata metadata section pointer.
++ * @return The decoder_config_flag.
++ */
++static inline uint8_t mpeg_metadata_section_decoder_config_flag(struct mpeg_metadata_section *metadata)
++{
++ return metadata->head.reserved & 1;
++}
++
++/**
++ * Accessor for the fragment_indicator field of a metadata section.
++ *
++ * @param metadata metadata section pointer.
++ * @return The fragment_indicator.
++ */
++static inline uint8_t mpeg_metadata_section_fragment_indicator(struct mpeg_metadata_section *metadata)
++{
++ return metadata->head.reserved1;
++}
++
++/**
++ * Accessor for the service_id field of a metadata section.
++ *
++ * @param metadata metadata section pointer.
++ * @return The service_id.
++ */
++static inline uint16_t mpeg_metadata_section_service_id(struct mpeg_metadata_section *metadata)
++{
++ return metadata->head.table_id_ext >> 8;
++}
++
++/**
++ * Retrieve pointer to data field of an mpeg_metadata_section.
++ *
++ * @param s mpeg_metadata_section pointer.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ mpeg_metadata_section_data(struct mpeg_metadata_section *s)
++{
++ return (uint8_t *) s + sizeof(struct mpeg_metadata_section);
++}
++
++
++/**
++ * Determine length of the data field of an mpeg_copyright_descriptor.
++ *
++ * @param s mpeg_metadata_section_data pointer.
++ * @return Length of field in bytes.
++ */
++static inline int
++ mpeg_metadata_section_data_length(struct mpeg_metadata_section *s)
++{
++ return section_ext_length(&s->head) - sizeof(struct mpeg_metadata_section);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_std_descriptor.h dvb-apps/lib/libucsi/mpeg/metadata_std_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/metadata_std_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/metadata_std_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,72 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_METADATA_STD_DESCRIPTOR
++#define _UCSI_MPEG_METADATA_STD_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_metadata_std_descriptor structure.
++ */
++struct mpeg_metadata_std_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint32_t reserved_1 : 2; ,
++ uint32_t metadata_input_leak_rate :22; );
++ EBIT2(uint32_t reserved_2 : 2; ,
++ uint32_t metadata_buffer_size :22; );
++ EBIT2(uint32_t reserved_3 : 2; ,
++ uint32_t metadata_output_leak_rate :22; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_metadata_std_descriptor.
++ *
++ * @param d Pointer to the generic descriptor structure.
++ * @return Pointer to the mpeg_metadata_std_descriptor, or NULL on error.
++ */
++static inline struct mpeg_metadata_std_descriptor*
++ mpeg_metadata_std_descriptor_codec(struct descriptor* d)
++{
++ uint8_t *buf = (uint8_t*) d;
++
++ if (d->len != (sizeof(struct mpeg_metadata_std_descriptor) - 2))
++ return NULL;
++
++ bswap24(buf + 2);
++ bswap24(buf + 5);
++ bswap24(buf + 8);
++
++ return (struct mpeg_metadata_std_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/mpeg4_audio_descriptor.h dvb-apps/lib/libucsi/mpeg/mpeg4_audio_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/mpeg4_audio_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/mpeg4_audio_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,61 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG4_AUDIO_DESCRIPTOR
++#define _UCSI_MPEG4_AUDIO_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg4_audio_descriptor structure.
++ */
++struct mpeg4_audio_descriptor {
++ struct descriptor d;
++
++ uint8_t mpeg4_audio_profile_and_level;
++} __ucsi_packed;
++
++/**
++ * Process an mpeg4_audio_descriptor.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to an mpeg4_audio_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg4_audio_descriptor*
++ mpeg4_audio_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg4_audio_descriptor) - 2))
++ return NULL;
++
++ return (struct mpeg4_audio_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/mpeg4_video_descriptor.h dvb-apps/lib/libucsi/mpeg/mpeg4_video_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/mpeg4_video_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/mpeg4_video_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,61 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG4_VIDEO_DESCRIPTOR
++#define _UCSI_MPEG4_VIDEO_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg4_video_descriptor structure.
++ */
++struct mpeg4_video_descriptor {
++ struct descriptor d;
++
++ uint8_t mpeg4_visual_profile_and_level;
++} __ucsi_packed;
++
++/**
++ * Process an mpeg4_video_descriptor structure.
++ *
++ * @param d Pointer to generic descriptor structure.
++ * @return Pointer to mpeg4_video_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg4_video_descriptor*
++ mpeg4_video_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg4_video_descriptor) - 2))
++ return NULL;
++
++ return (struct mpeg4_video_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/multiplex_buffer_descriptor.h dvb-apps/lib/libucsi/mpeg/multiplex_buffer_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/multiplex_buffer_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/multiplex_buffer_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,65 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_MULTIPLEX_BUFFER_DESCRIPTOR
++#define _UCSI_MPEG_MULTIPLEX_BUFFER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_multiplex_buffer_descriptor descriptor.
++ */
++struct mpeg_multiplex_buffer_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint64_t mb_buffer_size : 24; ,
++ uint64_t tb_leak_rate : 24; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_multiplex_buffer_descriptor.
++ *
++ * @param d Pointer to generic descriptor structure.
++ * @return Pointer to an mpeg_multiplex_buffer_descriptor structure, or NULL on
++ * error.
++ */
++static inline struct mpeg_multiplex_buffer_descriptor*
++ mpeg_multiplex_buffer_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_multiplex_buffer_descriptor) - 2))
++ return NULL;
++
++ bswap48((uint8_t*) d + 2);
++
++ return (struct mpeg_multiplex_buffer_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h dvb-apps/lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/multiplex_buffer_utilization_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,67 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_MULTIPLEX_BUFFER_UTILIZATION_DESCRIPTOR
++#define _UCSI_MPEG_MULTIPLEX_BUFFER_UTILIZATION_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_multiplex_buffer_utilization_descriptor structure.
++ */
++struct mpeg_multiplex_buffer_utilization_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint16_t bound_valid_flag : 1; ,
++ uint16_t ltw_offset_lower_bound : 15; );
++ EBIT2(uint16_t reserved : 1; ,
++ uint16_t ltw_offset_upper_bound : 15; );
++} __ucsi_packed;
++
++/**
++ * Process a mpeg_multiplex_buffer_utilization_descriptor.
++ *
++ * @param d Generic descriptor pointer.
++ * @return mpeg_multiplex_buffer_utilization_descriptor pointer, or NULL on error.
++ */
++static inline struct mpeg_multiplex_buffer_utilization_descriptor*
++ mpeg_multiplex_buffer_utilization_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_multiplex_buffer_utilization_descriptor) - 2))
++ return NULL;
++
++ bswap16((uint8_t*) d + 2);
++ bswap16((uint8_t*) d + 4);
++
++ return (struct mpeg_multiplex_buffer_utilization_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/muxcode_descriptor.h dvb-apps/lib/libucsi/mpeg/muxcode_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/muxcode_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/muxcode_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,82 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_MUXCODE_DESCRIPTOR
++#define _UCSI_MPEG_MUXCODE_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_muxcode_descriptor structure
++ */
++struct mpeg_muxcode_descriptor {
++ struct descriptor d;
++
++ /* uint8_t entries[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_muxcode_descriptor.
++ *
++ * @param d Pointer to a generic descriptor structure.
++ * @return Pointer to an mpeg_muxcode_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_muxcode_descriptor*
++ mpeg_muxcode_descriptor_codec(struct descriptor* d)
++{
++ return (struct mpeg_muxcode_descriptor*) d;
++}
++
++/**
++ * Retrieve pointer to entries field of an mpeg_muxcode_descriptor structure.
++ *
++ * @param d Generic descriptor structure.
++ * @return Pointer to the entries field.
++ */
++static inline uint8_t *
++ mpeg_muxcode_descriptor_entries(struct mpeg_muxcode_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct mpeg_muxcode_descriptor);
++}
++
++/**
++ * Determine length of entries field of an mpeg_muxcode_descriptor structure.
++ *
++ * @param d Generic descriptor structure.
++ * @return Number of bytes in the entries field.
++ */
++static inline int
++ mpeg_muxcode_descriptor_entries_length(struct mpeg_muxcode_descriptor *d)
++{
++ return d->d.len;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/odsmt_section.c dvb-apps/lib/libucsi/mpeg/odsmt_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/odsmt_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/odsmt_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,80 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/mpeg/odsmt_section.h>
++
++struct mpeg_odsmt_section *mpeg_odsmt_section_codec(struct section_ext * ext)
++{
++ struct mpeg_odsmt_section * odsmt = (struct mpeg_odsmt_section *)ext;
++ uint8_t * buf = (uint8_t *)ext;
++ size_t pos = sizeof(struct section_ext);
++ size_t len = section_ext_length(ext);
++ int i;
++
++ if (len < sizeof(struct mpeg_odsmt_section))
++ return NULL;
++
++ pos++;
++
++ if (odsmt->stream_count == 0) {
++ struct mpeg_odsmt_stream * stream =
++ (struct mpeg_odsmt_stream *) (buf + pos);
++
++ if ((pos + sizeof(struct mpeg_odsmt_stream_single)) > len)
++ return NULL;
++
++ bswap16(buf+pos);
++ pos+=3;
++
++ if ((pos + stream->u.single.es_info_length) >= len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, stream->u.single.es_info_length))
++ return NULL;
++
++ pos += stream->u.single.es_info_length;
++ } else {
++ for (i=0; i< odsmt->stream_count; i++) {
++ struct mpeg_odsmt_stream * stream =
++ (struct mpeg_odsmt_stream *)(buf + pos);
++
++ if ((pos + sizeof(struct mpeg_odsmt_stream_multi)) > len)
++ return NULL;
++
++ bswap16(buf+pos);
++ pos += sizeof(struct mpeg_odsmt_stream_multi);
++
++ if ((pos + stream->u.multi.es_info_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos,
++ stream->u.multi.es_info_length))
++ return NULL;
++
++ pos += stream->u.multi.es_info_length;
++ }
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return (struct mpeg_odsmt_section *) ext;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/odsmt_section.h dvb-apps/lib/libucsi/mpeg/odsmt_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/odsmt_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/odsmt_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,224 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_ODSMT_SECTION_H
++#define _UCSI_MPEG_ODSMT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * mpeg_odsmt_section structure.
++ */
++struct mpeg_odsmt_section {
++ struct section_ext head;
++
++ uint8_t stream_count;
++ /* stream_count==0 => struct mpeg_odsmt_stream_single streams
++ stream_count>0 => struct mpeg_odsmt_stream_multi streams[] */
++ /* uint8_t object_descriptors[] */
++} __ucsi_packed;
++
++struct mpeg_odsmt_stream_single
++{
++ uint16_t esid;
++ uint8_t es_info_length;
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++struct mpeg_odsmt_stream_multi
++{
++ uint16_t esid;
++ uint8_t fmc;
++ uint8_t es_info_length;
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Structure describing the stream information held in an mpeg_odsmt_section.
++ */
++struct mpeg_odsmt_stream {
++ union {
++ struct mpeg_odsmt_stream_single single;
++ struct mpeg_odsmt_stream_multi multi;
++ } u;
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_odsmt_section.
++ *
++ * @param section Pointer to the generic section_ext structure.
++ * @return Pointer to a mpeg_odsmt_section structure, or NULL on error.
++ */
++extern struct mpeg_odsmt_section *mpeg_odsmt_section_codec(struct section_ext *section);
++
++/**
++ * Accessor for the PID field of an ODSMT.
++ *
++ * @param odsmt odsmt pointer.
++ * @return The pid.
++ */
++static inline uint16_t mpeg_odsmt_section_pid(struct mpeg_odsmt_section *odsmt)
++{
++ return odsmt->head.table_id_ext & 0x1fff;
++}
++
++/**
++ * Convenience iterator for the streams field of an mpeg_odsmt_section.
++ *
++ * @param osdmt Pointer to the mpeg_odsmt_section structure.
++ * @param pos Variable holding pointer to the current mpeg_odsmt_stream structure.
++ * @param index Variable holding the stream index.
++ */
++#define mpeg_odsmt_section_streams_for_each(osdmt, pos, index) \
++ for (index=0, (pos) = mpeg_odsmt_section_streams_first(odsmt); \
++ (pos); \
++ (pos) = mpeg_odsmt_section_streams_next(odsmt, pos, ++index))
++
++/**
++ * Convenience iterator for the descriptors field of an mpeg_odsmt_stream.
++ *
++ * @param osdmt Pointer to the mpeg_odsmt_section structure.
++ * @param stream Pointer to the mpeg_odsmt_stream structure.
++ * @param pos Variable holding pointer to the current descriptor structure.
++ */
++#define mpeg_odsmt_stream_descriptors_for_each(osdmt, stream, pos) \
++ for ((pos) = mpeg_odsmt_stream_descriptors_first(odsmt, stream); \
++ (pos); \
++ (pos) = mpeg_odsmt_stream_descriptors_next(odsmt, stream, pos))
++
++/**
++ * Retrieve a pointer to the object_descriptors field of an mpeg_odsmt_section.
++ *
++ * @param osdmt Pointer to the mpeg_odsmt_section structure.
++ * @param len On return, will contain the number of bytes in the object descriptors field.
++ * @return Pointer to the object_descriptors field, or NULL on error.
++ */
++static inline uint8_t*
++ mpeg_odsmt_section_object_descriptors(struct mpeg_odsmt_section * odsmt,
++ size_t* len);
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct mpeg_odsmt_stream *
++ mpeg_odsmt_section_streams_first(struct mpeg_odsmt_section *odsmt)
++{
++ size_t pos = sizeof(struct mpeg_odsmt_section);
++
++ if (pos >= section_ext_length(&odsmt->head))
++ return NULL;
++
++ return (struct mpeg_odsmt_stream *) ((uint8_t *) odsmt + pos);
++}
++
++static inline struct mpeg_odsmt_stream *
++ mpeg_odsmt_section_streams_next(struct mpeg_odsmt_section *odsmt,
++ struct mpeg_odsmt_stream *pos,
++ int _index)
++{
++ uint8_t *end = (uint8_t*) odsmt + section_ext_length(&odsmt->head);
++ uint8_t *next;
++
++ if (_index > odsmt->stream_count)
++ return NULL;
++
++ next = (uint8_t *) pos + sizeof(struct mpeg_odsmt_stream_multi) +
++ pos->u.multi.es_info_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct mpeg_odsmt_stream *) next;
++}
++
++static inline struct descriptor *
++ mpeg_odsmt_stream_descriptors_first(struct mpeg_odsmt_section *odsmt,
++ struct mpeg_odsmt_stream *stream)
++{
++ if (odsmt->stream_count == 0) {
++ if (stream->u.single.es_info_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t*) stream + sizeof(struct mpeg_odsmt_stream_single));
++ } else {
++ if (stream->u.multi.es_info_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t*) stream + sizeof(struct mpeg_odsmt_stream_multi));
++ }
++}
++
++static inline struct descriptor *
++ mpeg_odsmt_stream_descriptors_next(struct mpeg_odsmt_section *odsmt,
++ struct mpeg_odsmt_stream *stream,
++ struct descriptor* pos)
++{
++ if (odsmt->stream_count == 0) {
++ return next_descriptor((uint8_t *) stream + sizeof(struct mpeg_odsmt_stream_single),
++ stream->u.single.es_info_length,
++ pos);
++ } else {
++ return next_descriptor((uint8_t *) stream + sizeof(struct mpeg_odsmt_stream_multi),
++ stream->u.multi.es_info_length,
++ pos);
++ }
++}
++
++static inline uint8_t*
++ mpeg_odsmt_section_object_descriptors(struct mpeg_odsmt_section * odsmt,
++ size_t* len)
++{
++ struct mpeg_odsmt_stream* pos;
++ size_t size = sizeof(struct mpeg_odsmt_section);
++ int _index;
++
++ mpeg_odsmt_section_streams_for_each(odsmt, pos, _index) {
++ if (odsmt->stream_count == 0)
++ size += sizeof(struct mpeg_odsmt_stream_single) +
++ pos->u.single.es_info_length;
++ else
++ size += sizeof(struct mpeg_odsmt_stream_multi) +
++ pos->u.multi.es_info_length;
++ }
++
++ *len = section_ext_length(&odsmt->head) - size;
++ return (uint8_t*) odsmt + size;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pat_section.c dvb-apps/lib/libucsi/mpeg/pat_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pat_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/pat_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,46 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/mpeg/pat_section.h>
++
++struct mpeg_pat_section *mpeg_pat_section_codec(struct section_ext * ext)
++{
++ uint8_t *buf = (uint8_t *)ext;
++ size_t pos = sizeof(struct section_ext);
++ size_t len = section_ext_length(ext);
++
++ if (len < sizeof(struct mpeg_pat_section))
++ return NULL;
++
++ while (pos < len) {
++ if ((pos + 4) > len)
++ return NULL;
++
++ bswap16(buf + pos);
++ bswap16(buf + pos + 2);
++ pos += 4;
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return (struct mpeg_pat_section *)ext;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pat_section.h dvb-apps/lib/libucsi/mpeg/pat_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pat_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/pat_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,118 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_PAT_SECTION_H
++#define _UCSI_MPEG_PAT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * mpeg_pat_section structure.
++ */
++struct mpeg_pat_section {
++ struct section_ext head; /* table_id_ext == transport_stream_id */
++
++ /* struct mpeg_pat_program programs[] */
++} __ucsi_packed;
++
++/**
++ * A program within an mpeg_pat_section.
++ */
++struct mpeg_pat_program {
++ uint16_t program_number;
++ EBIT2(uint16_t reserved : 3; ,
++ uint16_t pid :13; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_pat_section.
++ *
++ * @param section Pointer to the generic section_ext structure.
++ * @return Pointer to the mpeg_pat_section structure, or NULL on error.
++ */
++extern struct mpeg_pat_section *mpeg_pat_section_codec(struct section_ext *section);
++
++/**
++ * Accessor for the transport_stream_id field of a PAT.
++ *
++ * @param pat PAT pointer.
++ * @return The transport_stream_id.
++ */
++static inline uint16_t mpeg_pat_section_transport_stream_id(struct mpeg_pat_section *pat)
++{
++ return pat->head.table_id_ext;
++}
++
++/**
++ * Conveience iterator for the programs field of an mpeg_pat_section.
++ *
++ * @param pat Pointer to the mpeg_pat_section structure.
++ * @param pos Variable holding a pointer to the current mpeg_pat_program structure.
++ */
++#define mpeg_pat_section_programs_for_each(pat, pos) \
++ for ((pos) = mpeg_pat_section_programs_first(pat); \
++ (pos); \
++ (pos) = mpeg_pat_section_programs_next(pat, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct mpeg_pat_program *
++ mpeg_pat_section_programs_first(struct mpeg_pat_section * pat)
++{
++ size_t pos = sizeof(struct mpeg_pat_section);
++
++ if (pos >= section_ext_length(&pat->head))
++ return NULL;
++
++ return (struct mpeg_pat_program*)((uint8_t *) pat + pos);
++}
++
++static inline
++ struct mpeg_pat_program *mpeg_pat_section_programs_next(struct mpeg_pat_section * pat,
++ struct mpeg_pat_program * pos)
++{
++ uint8_t *end = (uint8_t*) pat + section_ext_length(&pat->head);
++ uint8_t *next= (uint8_t *) pos + sizeof(struct mpeg_pat_program);
++
++ if (next >= end)
++ return NULL;
++
++ return (struct mpeg_pat_program *) next;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pmt_section.c dvb-apps/lib/libucsi/mpeg/pmt_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pmt_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/pmt_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,71 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/mpeg/pmt_section.h>
++
++struct mpeg_pmt_section * mpeg_pmt_section_codec(struct section_ext * ext)
++{
++ uint8_t * buf = (uint8_t *) ext;
++ struct mpeg_pmt_section * pmt = (struct mpeg_pmt_section *) ext;
++ size_t pos = sizeof(struct section_ext);
++ size_t len = section_ext_length(ext);
++
++ if (len < sizeof(struct mpeg_pmt_section))
++ return NULL;
++
++ bswap16(buf + pos);
++ pos += 2;
++ bswap16(buf + pos);
++ pos += 2;
++
++ if ((pos + pmt->program_info_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, pmt->program_info_length))
++ return NULL;
++
++ pos += pmt->program_info_length;
++
++ while (pos < len) {
++ struct mpeg_pmt_stream * stream =
++ (struct mpeg_pmt_stream *) (buf + pos);
++
++ if ((pos + sizeof(struct mpeg_pmt_stream)) > len)
++ return NULL;
++
++ bswap16(buf + pos + 1);
++ bswap16(buf + pos + 3);
++ pos += sizeof(struct mpeg_pmt_stream);
++
++ if ((pos + stream->es_info_length) > len)
++ return NULL;
++
++ if (verify_descriptors(buf + pos, stream->es_info_length))
++ return NULL;
++
++ pos += stream->es_info_length;
++ }
++
++ if (pos != len)
++ return NULL;
++
++ return (struct mpeg_pmt_section *) ext;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pmt_section.h dvb-apps/lib/libucsi/mpeg/pmt_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/pmt_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/pmt_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,188 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_PMT_SECTION_H
++#define _UCSI_MPEG_PMT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * mpeg_pmt_section structure.
++ */
++struct mpeg_pmt_section {
++ struct section_ext head;
++
++ EBIT2(uint16_t reserved_1 : 3; ,
++ uint16_t pcr_pid :13; );
++ EBIT2(uint16_t reserved_2 : 4; ,
++ uint16_t program_info_length :12; );
++ /* struct descriptor descriptors[] */
++ /* struct mpeg_pmt_stream streams[] */
++} __ucsi_packed;
++
++/**
++ * A stream within an mpeg_pmt_section.
++ */
++struct mpeg_pmt_stream {
++ uint8_t stream_type;
++ EBIT2(uint16_t reserved_1 : 3; ,
++ uint16_t pid :13; );
++ EBIT2(uint16_t reserved_2 : 4; ,
++ uint16_t es_info_length :12; );
++
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_pmt_section section.
++ *
++ * @param section Pointer to the generic section header.
++ * @return Pointer to the mpeg_pmt_section structure, or NULL on error.
++ */
++extern struct mpeg_pmt_section *mpeg_pmt_section_codec(struct section_ext *section);
++
++/**
++ * Accessor for program_number field of a PMT.
++ *
++ * @param pmt PMT pointer.
++ * @return The program_number.
++ */
++static inline uint16_t mpeg_pmt_section_program_number(struct mpeg_pmt_section *pmt)
++{
++ return pmt->head.table_id_ext;
++}
++
++/**
++ * Convenience iterator for the descriptors field of the mpeg_pmt_section structure.
++ *
++ * @param pmt Pointer to the mpeg_pmt_section structure.
++ * @param pos Variable holding a pointer to the current descriptor.
++ */
++#define mpeg_pmt_section_descriptors_for_each(pmt, pos) \
++ for ((pos) = mpeg_pmt_section_descriptors_first(pmt); \
++ (pos); \
++ (pos) = mpeg_pmt_section_descriptors_next(pmt, pos))
++
++/**
++ * Convenience iterator for the streams field of the mpeg_pmt_section structure.
++ *
++ * @param pmt Pointer to the mpeg_pmt_section structure.
++ * @param pos Variable holding a pointer to the current mpeg_pmt_stream.
++ */
++#define mpeg_pmt_section_streams_for_each(pmt, pos) \
++ for ((pos) = mpeg_pmt_section_streams_first(pmt); \
++ (pos); \
++ (pos) = mpeg_pmt_section_streams_next(pmt, pos))
++
++/**
++ * Convenience iterator for the descriptors field of an mpeg_pmt_stream structure.
++ *
++ * @param stream Pointer to the mpeg_pmt_stream structure.
++ * @param pos Variable holding a pointer to the current descriptor.
++ */
++#define mpeg_pmt_stream_descriptors_for_each(stream, pos) \
++ for ((pos) = mpeg_pmt_stream_descriptors_first(stream); \
++ (pos); \
++ (pos) = mpeg_pmt_stream_descriptors_next(stream, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct descriptor *
++ mpeg_pmt_section_descriptors_first(struct mpeg_pmt_section * pmt)
++{
++ if (pmt->program_info_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t *) pmt + sizeof(struct mpeg_pmt_section));
++}
++
++static inline struct descriptor *
++ mpeg_pmt_section_descriptors_next(struct mpeg_pmt_section *pmt,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t *) pmt + sizeof(struct mpeg_pmt_section),
++ pmt->program_info_length,
++ pos);
++}
++
++static inline struct mpeg_pmt_stream *
++ mpeg_pmt_section_streams_first(struct mpeg_pmt_section * pmt)
++{
++ size_t pos = sizeof(struct mpeg_pmt_section) + pmt->program_info_length;
++
++ if (pos >= section_ext_length(&pmt->head))
++ return NULL;
++
++ return (struct mpeg_pmt_stream *)((uint8_t *)pmt + pos);
++}
++
++static inline struct mpeg_pmt_stream *
++ mpeg_pmt_section_streams_next(struct mpeg_pmt_section * pmt,
++ struct mpeg_pmt_stream * pos)
++{
++ uint8_t *end = (uint8_t*) pmt + section_ext_length(&pmt->head);
++ uint8_t *next = (uint8_t *) pos + sizeof(struct mpeg_pmt_stream) +
++ pos->es_info_length;
++
++ if (next >= end)
++ return NULL;
++
++ return (struct mpeg_pmt_stream *) next;
++}
++
++static inline struct descriptor *
++ mpeg_pmt_stream_descriptors_first(struct mpeg_pmt_stream *stream)
++{
++ if (stream->es_info_length == 0)
++ return NULL;
++
++ return (struct descriptor *)
++ ((uint8_t*) stream + sizeof(struct mpeg_pmt_stream));
++}
++
++static inline struct descriptor *
++ mpeg_pmt_stream_descriptors_next(struct mpeg_pmt_stream *stream,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t *) stream + sizeof(struct mpeg_pmt_stream),
++ stream->es_info_length,
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/private_data_indicator_descriptor.h dvb-apps/lib/libucsi/mpeg/private_data_indicator_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/private_data_indicator_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/private_data_indicator_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,63 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_PRIVATE_DATA_INDICATOR_DESCRIPTOR
++#define _UCSI_MPEG_PRIVATE_DATA_INDICATOR_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_private_data_indicator_descriptor structure
++ */
++struct mpeg_private_data_indicator_descriptor {
++ struct descriptor d;
++
++ uint32_t private_data_indicator;
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_private_data_indicator_descriptor structure.
++ *
++ * @param d Pointer to the generic descriptor structure.
++ * @return Pointer to the mpeg_private_data_indicator_descriptor, or NULL on error.
++ */
++static inline struct mpeg_private_data_indicator_descriptor*
++ mpeg_private_data_indicator_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_private_data_indicator_descriptor) - 2))
++ return NULL;
++
++ bswap32((uint8_t*) d + 2);
++
++ return (struct mpeg_private_data_indicator_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/registration_descriptor.h dvb-apps/lib/libucsi/mpeg/registration_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/registration_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/registration_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,91 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_REGISTRATION_DESCRIPTOR
++#define _UCSI_MPEG_REGISTRATION_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_registration_descriptor structure.
++ */
++struct mpeg_registration_descriptor {
++ struct descriptor d;
++
++ uint32_t format_identifier;
++ /* uint8_t additional_id_info[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_registration_descriptor.
++ *
++ * @param d Pointer to the generic descriptor structure.
++ * @return Pointer to the mpeg_registration_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_registration_descriptor*
++ mpeg_registration_descriptor_codec(struct descriptor* d)
++{
++ if (d->len < (sizeof(struct mpeg_registration_descriptor) - 2))
++ return NULL;
++
++ bswap32((uint8_t*) d + 2);
++
++ return (struct mpeg_registration_descriptor*) d;
++}
++
++/**
++ * Retrieve a pointer to the additional_id_info field of the
++ * mpeg_registration_descriptor structure.
++ *
++ * @param d Pointer to the mpeg_registration_descriptor structure.
++ * @return Pointer to the field.
++ */
++static inline uint8_t *
++ mpeg_registration_descriptor_additional_id_info(struct mpeg_registration_descriptor *d)
++{
++ return (uint8_t *) d + sizeof(struct mpeg_registration_descriptor);
++}
++
++/**
++ * Determine number of bytes in the additional_id_info field of the
++ * mpeg_registration_descriptor structure.
++ *
++ * @param d Pointer to the mpeg_registration_descriptor structure.
++ * @return Number of bytes.
++ */
++
++static inline int
++ mpeg_registration_descriptor_additional_id_info_length(struct mpeg_registration_descriptor *d)
++{
++ return d->d.len - 4;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/section.h dvb-apps/lib/libucsi/mpeg/section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,60 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_SECTION_H
++#define _UCSI_MPEG_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/mpeg/cat_section.h>
++#include <libucsi/mpeg/odsmt_section.h>
++#include <libucsi/mpeg/pat_section.h>
++#include <libucsi/mpeg/pmt_section.h>
++#include <libucsi/mpeg/tsdt_section.h>
++#include <libucsi/mpeg/metadata_section.h>
++#include <libucsi/mpeg/datagram_section.h>
++
++#define TRANSPORT_PAT_PID 0x00
++#define TRANSPORT_CAT_PID 0x01
++#define TRANSPORT_TSDT_PID 0x02
++
++/**
++ * Enumeration of MPEG section tags.
++ */
++enum mpeg_section_tag {
++ stag_mpeg_program_association = 0x00,
++ stag_mpeg_conditional_access = 0x01,
++ stag_mpeg_program_map = 0x02,
++ stag_mpeg_transport_stream_description = 0x03,
++ stag_mpeg_iso14496_scene_description = 0x04,
++ stag_mpeg_iso14496_object_description = 0x05,
++ stag_mpeg_metadata = 0x06,
++ stag_mpeg_datagram = 0x3e,
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/sl_descriptor.h dvb-apps/lib/libucsi/mpeg/sl_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/sl_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/sl_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,63 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_SL_DESCRIPTOR
++#define _UCSI_MPEG_SL_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_sl_descriptor structure.
++ */
++struct mpeg_sl_descriptor {
++ struct descriptor d;
++
++ uint16_t es_id;
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_sl_descriptor.
++ *
++ * @param d The generic descriptor structure.
++ * @return Pointer to an mpeg_sl_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_sl_descriptor*
++ mpeg_sl_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_sl_descriptor) - 2))
++ return NULL;
++
++ bswap16((uint8_t*) d + 2);
++
++ return (struct mpeg_sl_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/smoothing_buffer_descriptor.h dvb-apps/lib/libucsi/mpeg/smoothing_buffer_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/smoothing_buffer_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/smoothing_buffer_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,66 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_SMOOTHING_BUFFER_DESCRIPTOR
++#define _UCSI_MPEG_SMOOTHING_BUFFER_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_smoothing_buffer_descriptor structure.
++ */
++struct mpeg_smoothing_buffer_descriptor {
++ struct descriptor d;
++
++ EBIT4(uint64_t reserved_1 : 2; ,
++ uint64_t sb_leak_rate :22; ,
++ uint64_t reserved_2 : 2; ,
++ uint64_t sb_size :22; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_smoothing_buffer_descriptor.
++ *
++ * @param d The generic descriptor structure.
++ * @return Pointer to mpeg_smoothing_buffer_descriptor, or NULL on error.
++ */
++static inline struct mpeg_smoothing_buffer_descriptor*
++ mpeg_smoothing_buffer_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_smoothing_buffer_descriptor) - 2))
++ return NULL;
++
++ bswap48((uint8_t*) d + 2);
++
++ return (struct mpeg_smoothing_buffer_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/std_descriptor.h dvb-apps/lib/libucsi/mpeg/std_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/std_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/std_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,62 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_STD_DESCRIPTOR
++#define _UCSI_MPEG_STD_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_std_descriptor structure.
++ */
++struct mpeg_std_descriptor {
++ struct descriptor d;
++
++ EBIT2(uint8_t reserved : 7; ,
++ uint8_t leak_valid_flag : 1; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_std_descriptor.
++ *
++ * @param d Pointer to the generic descriptor structure.
++ * @return Pointer to the mpeg_std_descriptor, or NULL on error.
++ */
++static inline struct mpeg_std_descriptor*
++ mpeg_std_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_std_descriptor) - 2))
++ return NULL;
++
++ return (struct mpeg_std_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/system_clock_descriptor.h dvb-apps/lib/libucsi/mpeg/system_clock_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/system_clock_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/system_clock_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,65 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_SYSTEM_CLOCK_DESCRIPTOR
++#define _UCSI_MPEG_SYSTEM_CLOCK_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_system_clock_descriptor structure.
++ */
++struct mpeg_system_clock_descriptor {
++ struct descriptor d;
++
++ EBIT3(uint8_t external_clock_reference_indicator : 1; ,
++ uint8_t reserved_1 : 1; ,
++ uint8_t clock_accuracy_integer : 6; );
++ EBIT2(uint8_t clock_accuracy_exponent : 3; ,
++ uint8_t reserved_2 : 5; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_system_clock_descriptor.
++ *
++ * @param d The generic descriptor structure.
++ * @return Pointer to a mpeg_system_clock_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_system_clock_descriptor*
++ mpeg_system_clock_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_system_clock_descriptor) - 2))
++ return NULL;
++
++ return (struct mpeg_system_clock_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/target_background_grid_descriptor.h dvb-apps/lib/libucsi/mpeg/target_background_grid_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/target_background_grid_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/target_background_grid_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,66 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_TARGET_BACKGROUND_GRID_DESCRIPTOR
++#define _UCSI_MPEG_TARGET_BACKGROUND_GRID_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * mpeg_target_background_grid_descriptor structure.
++ */
++struct mpeg_target_background_grid_descriptor {
++ struct descriptor d;
++
++ EBIT3(uint32_t horizontal_size : 14; ,
++ uint32_t vertical_size : 14; ,
++ uint32_t aspect_ratio_information : 4; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_target_background_grid_descriptor structure.
++ *
++ * @param d Pointer to the generic descriptor structure.
++ * @return Pointer to the mpeg_target_background_grid_descriptor structure, or
++ * NULL on error.
++ */
++static inline struct mpeg_target_background_grid_descriptor*
++ mpeg_target_background_grid_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_target_background_grid_descriptor) - 2))
++ return NULL;
++
++ bswap32((uint8_t*) d + 2);
++
++ return (struct mpeg_target_background_grid_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/tsdt_section.c dvb-apps/lib/libucsi/mpeg/tsdt_section.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/tsdt_section.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/tsdt_section.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,34 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/mpeg/tsdt_section.h>
++
++struct mpeg_tsdt_section * mpeg_tsdt_section_codec(struct section_ext * ext)
++{
++ uint8_t * buf = (uint8_t *)ext;
++ size_t pos = sizeof(struct section_ext);
++
++ if (verify_descriptors(buf + pos,
++ section_ext_length(ext) - sizeof(struct mpeg_tsdt_section)))
++ return NULL;
++
++ return (struct mpeg_tsdt_section *)ext;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/tsdt_section.h dvb-apps/lib/libucsi/mpeg/tsdt_section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/tsdt_section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/tsdt_section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,94 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_TSDT_SECTION_H
++#define _UCSI_MPEG_TSDT_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/section.h>
++
++/**
++ * mpeg_tsdt_section structure.
++ */
++struct mpeg_tsdt_section {
++ struct section_ext head;
++
++ /* struct descriptor descriptors[] */
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_tsdt_section structure.
++ *
++ * @param section Pointer to the section_ext structure.
++ * @return Pointer to the mpeg_tsdt_section structure, or NULL on error.
++ */
++extern struct mpeg_tsdt_section *mpeg_tsdt_section_codec(struct section_ext *section);
++
++/**
++ * Convenience iterator for descriptors field.
++ *
++ * @param tsdt Pointer to the mpeg_tsdt_section structure.
++ * @param pos Variable holding a pointer to the current descriptor.
++ */
++#define mpeg_tsdt_section_descriptors_for_each(tsdt, pos) \
++ for ((pos) = mpeg_tsdt_section_descriptors_first(tsdt); \
++ (pos); \
++ (pos) = mpeg_tsdt_section_descriptors_next(tsdt, pos))
++
++
++
++
++
++
++
++
++
++
++/******************************** PRIVATE CODE ********************************/
++static inline struct descriptor *
++ mpeg_tsdt_section_descriptors_first(struct mpeg_tsdt_section * tsdt)
++{
++ size_t pos = sizeof(struct mpeg_tsdt_section);
++
++ if (pos >= section_ext_length(&tsdt->head))
++ return NULL;
++
++ return (struct descriptor*)((uint8_t *) tsdt + pos);
++}
++
++static inline struct descriptor *
++ mpeg_tsdt_section_descriptors_next(struct mpeg_tsdt_section *tsdt,
++ struct descriptor* pos)
++{
++ return next_descriptor((uint8_t *) tsdt + sizeof(struct mpeg_tsdt_section),
++ section_ext_length(&tsdt->head) - sizeof(struct mpeg_tsdt_section),
++ pos);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/types.h dvb-apps/lib/libucsi/mpeg/types.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/types.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/types.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,127 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_TYPES_H
++#define _UCSI_MPEG_TYPES_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++/**
++ * Known stream types.
++ */
++enum {
++ MPEG_STREAM_TYPE_ISO11172_VIDEO = 0x01,
++ MPEG_STREAM_TYPE_ISO13818_2_VIDEO = 0x02,
++ MPEG_STREAM_TYPE_ISO11172_AUDIO = 0x03,
++ MPEG_STREAM_TYPE_ISO13818_3_AUDIO = 0x04,
++ MPEG_STREAM_TYPE_ISO13818_1_PRIVATE_SECTIONS = 0x05,
++ MPEG_STREAM_TYPE_ISO13818_1_PRIVATE_PES = 0x06,
++ MPEG_STREAM_TYPE_ISO13522_MHEG = 0x07,
++ MPEG_STREAM_TYPE_ISO13818_DSMCC = 0x08,
++ MPEG_STREAM_TYPE_ITUH222_1 = 0x09,
++ MPEG_STREAM_TYPE_ISO13818_6_A = 0x0a,
++ MPEG_STREAM_TYPE_ISO13818_6_B = 0x0b,
++ MPEG_STREAM_TYPE_ISO13818_6_C = 0x0c,
++ MPEG_STREAM_TYPE_ISO13818_6_D = 0x0d,
++ MPEG_STREAM_TYPE_ISO13818_1_AUX = 0x0e,
++ MPEG_STREAM_TYPE_ISO13818_7_AUDIO_ADTS = 0x0f,
++ MPEG_STREAM_TYPE_ISO14496_2_VISUAL = 0x10,
++ MPEG_STREAM_TYPE_ISO14496_3_AUDIO_LATM = 0x11,
++ MPEG_STREAM_TYPE_ISO14496_1_PES = 0x12,
++ MPEG_STREAM_TYPE_ISO14496_1_SECTIONS = 0x13,
++ MPEG_STREAM_TYPE_ISO14496_6_SYNCDOWNLOAD = 0x14,
++ MPEG_STREAM_TYPE_METADATA_PES = 0x15,
++ MPEG_STREAM_TYPE_METADATA_SECTIONS = 0x16,
++ MPEG_STREAM_TYPE_METADATA_DSMCC_DATA = 0x17,
++ MPEG_STREAM_TYPE_METADATA_DSMCC_OBJECT = 0x18,
++ MPEG_STREAM_TYPE_METADATA_SYNCDOWNLOAD = 0x19,
++};
++
++/**
++ * Metadata formats
++ */
++enum {
++ MPEG_METADATA_FORMAT_ISO15938_1_TEM = 0x01,
++ MPEG_METADATA_FORMAT_ISO15938_1_BIM = 0x02,
++ MPEG_METADATA_FORMAT_METADATA_APPLICATION_FORMAT = 0x3F,
++ MPEG_METADATA_FORMAT_METADATA_APPLICATION_FORMAT_ID = 0xFF,
++};
++
++/**
++ * MPEG 4 audio profile and levels.
++ */
++enum {
++ MPEG4_AUDIO_PROFILE_MAIN_LEVEL_1 = 0x10,
++ MPEG4_AUDIO_PROFILE_MAIN_LEVEL_2 = 0x11,
++ MPEG4_AUDIO_PROFILE_MAIN_LEVEL_3 = 0x12,
++ MPEG4_AUDIO_PROFILE_MAIN_LEVEL_4 = 0x13,
++
++ MPEG4_AUDIO_PROFILE_SCALABLE_LEVEL_1 = 0x18,
++ MPEG4_AUDIO_PROFILE_SCALABLE_LEVEL_2 = 0x19,
++ MPEG4_AUDIO_PROFILE_SCALABLE_LEVEL_3 = 0x1a,
++ MPEG4_AUDIO_PROFILE_SCALABLE_LEVEL_4 = 0x1b,
++
++ MPEG4_AUDIO_PROFILE_SPEECH_LEVEL_1 = 0x20,
++ MPEG4_AUDIO_PROFILE_SPEECH_LEVEL_2 = 0x21,
++
++ MPEG4_AUDIO_PROFILE_SYNTHESIS_LEVEL_1 = 0x28,
++ MPEG4_AUDIO_PROFILE_SYNTHESIS_LEVEL_2 = 0x29,
++ MPEG4_AUDIO_PROFILE_SYNTHESIS_LEVEL_3 = 0x2a,
++
++ MPEG4_AUDIO_PROFILE_HQ_LEVEL_1 = 0x30,
++ MPEG4_AUDIO_PROFILE_HQ_LEVEL_2 = 0x31,
++ MPEG4_AUDIO_PROFILE_HQ_LEVEL_3 = 0x32,
++ MPEG4_AUDIO_PROFILE_HQ_LEVEL_4 = 0x33,
++ MPEG4_AUDIO_PROFILE_HQ_LEVEL_5 = 0x34,
++ MPEG4_AUDIO_PROFILE_HQ_LEVEL_6 = 0x35,
++ MPEG4_AUDIO_PROFILE_HQ_LEVEL_7 = 0x36,
++ MPEG4_AUDIO_PROFILE_HQ_LEVEL_8 = 0x37,
++
++ MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_1 = 0x38,
++ MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_2 = 0x39,
++ MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_3 = 0x3a,
++ MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_4 = 0x3b,
++ MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_5 = 0x3c,
++ MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_6 = 0x3d,
++ MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_7 = 0x3e,
++ MPEG4_AUDIO_PROFILE_LOW_DELAY_LEVEL_8 = 0x3f,
++
++ MPEG4_AUDIO_PROFILE_NATURAL_LEVEL_1 = 0x40,
++ MPEG4_AUDIO_PROFILE_NATURAL_LEVEL_2 = 0x41,
++ MPEG4_AUDIO_PROFILE_NATURAL_LEVEL_3 = 0x42,
++ MPEG4_AUDIO_PROFILE_NATURAL_LEVEL_4 = 0x43,
++
++ MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_1 = 0x48,
++ MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_2 = 0x49,
++ MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_3 = 0x4a,
++ MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_4 = 0x4b,
++ MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_5 = 0x4c,
++ MPEG4_AUDIO_PROFILE_MOBILE_LEVEL_6 = 0x4d,
++};
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/video_stream_descriptor.h dvb-apps/lib/libucsi/mpeg/video_stream_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/video_stream_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/video_stream_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,101 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_VIDEO_STREAM_DESCRIPTOR
++#define _UCSI_MPEG_VIDEO_STREAM_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++#include <libucsi/endianops.h>
++
++/**
++ * The mpeg_video_stream_descriptor structure
++ */
++struct mpeg_video_stream_descriptor {
++ struct descriptor d;
++
++ EBIT5(uint8_t multiple_frame_rate_flag : 1; ,
++ uint8_t frame_rate_code : 4; ,
++ uint8_t mpeg_1_only_flag : 1; ,
++ uint8_t constrained_parameter_flag : 1; ,
++ uint8_t still_picture_flag : 1; );
++ /* if (mpeg_1_only_flag == 0) struct mpeg_video_stream_extra extra */
++} __ucsi_packed;
++
++/**
++ * The mpeg_video_stream_extra - only present in non-MPEG1-only streams.
++ */
++struct mpeg_video_stream_extra {
++ uint8_t profile_and_level_indication;
++ EBIT3(uint8_t chroma_format : 2; ,
++ uint8_t frame_rate_extension : 1; ,
++ uint8_t reserved : 5; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_video_stream_descriptor structure.
++ *
++ * @param d Pointer to the generic descriptor structure.
++ * @return Pointer to the mpeg_video_stream_descriptor, or NULL on error.
++ */
++static inline struct mpeg_video_stream_descriptor*
++ mpeg_video_stream_descriptor_codec(struct descriptor* d)
++{
++ struct mpeg_video_stream_descriptor* vsd =
++ (struct mpeg_video_stream_descriptor*) d;
++
++ if (d->len < (sizeof(struct mpeg_video_stream_descriptor) - 2))
++ return NULL;
++
++ if (!vsd->mpeg_1_only_flag) {
++ if (d->len != (sizeof(struct mpeg_video_stream_descriptor) +
++ sizeof(struct mpeg_video_stream_extra) - 2))
++ return NULL;
++ }
++
++ return (struct mpeg_video_stream_descriptor*) d;
++}
++
++/**
++ * Get a pointer to the mpeg_video_stream_extra structure.
++ *
++ * @param d Pointer to the mpeg_video_stream_descriptor structure.
++ * @return Pointer to the mpeg_video_stream_extra structure, or NULL on error.
++ */
++static inline struct mpeg_video_stream_extra*
++ mpeg_video_stream_descriptor_extra(struct mpeg_video_stream_descriptor* d)
++{
++ if (d->mpeg_1_only_flag != 0)
++ return NULL;
++
++ return (struct mpeg_video_stream_extra*)
++ ((uint8_t*) d + sizeof(struct mpeg_video_stream_descriptor));
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/video_window_descriptor.h dvb-apps/lib/libucsi/mpeg/video_window_descriptor.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/mpeg/video_window_descriptor.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/mpeg/video_window_descriptor.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,64 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_MPEG_VIDEO_WINDOW_DESCRIPTOR
++#define _UCSI_MPEG_VIDEO_WINDOW_DESCRIPTOR 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/descriptor.h>
++
++/**
++ * mpeg_video_window_descriptor structure.
++ */
++struct mpeg_video_window_descriptor {
++ struct descriptor d;
++
++ EBIT3(uint32_t horizontal_offset : 14; ,
++ uint32_t vertical_offset : 14; ,
++ uint32_t window_priority : 4; );
++} __ucsi_packed;
++
++/**
++ * Process an mpeg_video_window_descriptor.
++ *
++ * @param d Pointer to the generic descriptor structure.
++ * @return Pointer to the mpeg_video_window_descriptor structure, or NULL on error.
++ */
++static inline struct mpeg_video_window_descriptor*
++ mpeg_video_window_descriptor_codec(struct descriptor* d)
++{
++ if (d->len != (sizeof(struct mpeg_video_window_descriptor) - 2))
++ return NULL;
++
++ bswap32((uint8_t*) d + 2);
++
++ return (struct mpeg_video_window_descriptor*) d;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/section_buf.c dvb-apps/lib/libucsi/section_buf.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/section_buf.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/section_buf.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,173 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <errno.h>
++#include <string.h>
++#include "section_buf.h"
++
++#define SECTION_HDR_SIZE 3
++#define SECTION_PAD 0xff
++
++int section_buf_init(struct section_buf *section, int max)
++{
++ if (max < SECTION_HDR_SIZE)
++ return -EINVAL;
++
++ memset(section, 0, sizeof(struct section_buf));
++ section->max = max; /* max size of data */
++ section->len = SECTION_HDR_SIZE;
++ section->wait_pdu = 1;
++
++ return 0;
++}
++
++int section_buf_add(struct section_buf *section, uint8_t* frag, int len, int *section_status)
++{
++ int copy;
++ int used = 0;
++ uint8_t *data;
++ uint8_t *pos = (uint8_t*) section + sizeof(struct section_buf) + section->count;
++
++ /* have we finished? */
++ if (section->header && (section->len == section->count)) {
++ *section_status = 1;
++ return 0;
++ }
++
++ /* skip over section padding bytes */
++ *section_status = 0;
++ if (section->count == 0) {
++ while(len && (*frag == SECTION_PAD)) {
++ frag++;
++ len--;
++ used++;
++ }
++
++ if (len == 0)
++ return used;
++ }
++
++ /* grab the header to get the section length */
++ if (!section->header) {
++ /* copy the header frag */
++ copy = SECTION_HDR_SIZE - section->count;
++ if (copy > len)
++ copy = len;
++ memcpy(pos, frag, copy);
++ section->count += copy;
++ pos += copy;
++ frag += copy;
++ used += copy;
++ len -= copy;
++
++ /* we need 3 bytes for the section header */
++ if (section->count != SECTION_HDR_SIZE)
++ return used;
++
++ /* work out the length & check it isn't too big */
++ data = (uint8_t*) section + sizeof(struct section_buf);
++ section->len = SECTION_HDR_SIZE + (((data[1] & 0x0f) << 8) | data[2]);
++ if (section->len > section->max) {
++ *section_status = -ERANGE;
++ return len + used;
++ }
++
++ /* update fields */
++ section->header = 1;
++ }
++
++ /* accumulate frag */
++ copy = section->len - section->count;
++ if (copy > len)
++ copy = len;
++ memcpy(pos, frag, copy);
++ section->count += copy;
++ used += copy;
++
++ /* have we finished? */
++ if (section->header && (section->len == section->count))
++ *section_status = 1;
++
++ /* return number of bytes used */
++ return used;
++}
++
++int section_buf_add_transport_payload(struct section_buf *section,
++ uint8_t* payload, int len,
++ int pdu_start, int *section_status)
++{
++ int used = 0;
++ int tmp;
++
++ /* have we finished? */
++ if (section->header && (section->len == section->count)) {
++ *section_status = 1;
++ return 0;
++ }
++
++ /* don't bother if we're waiting for a PDU */
++ *section_status = 0;
++ if (section->wait_pdu && (!pdu_start))
++ return len;
++
++ /* if we're at a PDU start, we need extra handling for the extra first
++ * byte giving the offset to the start of the next section. */
++ if (pdu_start) {
++ /* we have received a pdu */
++ section->wait_pdu = 0;
++
++ /* work out the offset to the _next_ payload */
++ int offset = payload[0];
++ if ((offset+1) > len) {
++ section->wait_pdu = 1;
++ *section_status = -EINVAL;
++ return len;
++ }
++
++ /* accumulate the end if we need to */
++ if (section->count != 0) {
++ /* add the final fragment. */
++ tmp = section_buf_add(section, payload + 1, offset, section_status);
++
++ /* the stream said this was the final fragment
++ * (PDU START bit) - check that it really was! */
++ if ((tmp != offset) || section_buf_remaining(section) || (*section_status != 1)) {
++ *section_status = -ERANGE;
++ section->wait_pdu = 1;
++ return 1 + tmp;
++ }
++
++ /* it is complete - return the number of bytes we used */
++ return 1 + tmp;
++ }
++
++ /* otherwise, we skip the end of the previous section, and
++ * start accumulating the new data. */
++ used = 1 + offset;
++ }
++
++ /* ok, just accumulate the data as normal */
++ tmp = section_buf_add(section, payload+used, len - used, section_status);
++ if (*section_status < 0) {
++ section->wait_pdu = 1;
++ }
++
++ return used + tmp;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/section_buf.h dvb-apps/lib/libucsi/section_buf.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/section_buf.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/section_buf.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,124 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_SECTION_BUF_H
++#define _UCSI_SECTION_BUF_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++
++#define DVB_MAX_SECTION_BYTES 4096
++
++/**
++ * Buffer used to keep track of section fragments. You should allocate an
++ * area of memory of size (sizeof(section_buf) + <maxsectionsize>), and pass that area
++ * to section_buf_init() to set it up.
++ */
++struct section_buf {
++ uint32_t max; /* maximum size of section - setup by section_buf_init() */
++ uint32_t count; /* number of bytes currently accumulated */
++ uint32_t len; /* total number of bytes expected in the complete section */
++ uint8_t header:1; /* flag indicating the section header has been commpletely received */
++ uint8_t wait_pdu:1;/* flag indicating to wait till the next PDU start */
++ /* uint8_t data[] */
++};
++
++/**
++ * Initialise a section_buf structure.
++ *
++ * @param section The section_buf to initialise.
++ * @param max Maximum number of bytes in section (must be > 3)
++ * @return 0 on success, nonzero on error.
++ */
++extern int section_buf_init(struct section_buf *section, int max);
++
++/**
++ * Reset a section_buf structure (e.g. if a discontinuity occurred). The
++ * section_buf will wait for the first PDU start indicator.
++ *
++ * @param section The section_buf to reset.
++ */
++static inline void section_buf_reset(struct section_buf *section)
++{
++ int tmp = section->wait_pdu;
++ section_buf_init(section, section->max);
++ section->wait_pdu = tmp;
++}
++
++/**
++ * Add a data fragment to a section_buf.
++ *
++ * @param section section_buf to add to.
++ * @param frag Pointer to data fragment.
++ * @param len Number of bytes of data.
++ * @param section_status 0: nothing special. 1: section complete. -ERANGE indicates that the
++ * section is larger than section->max.
++ * @return Number of bytes which were consumed.
++ */
++extern int section_buf_add(struct section_buf *section, uint8_t* frag, int len, int *section_status);
++
++/**
++ * Add a transport packet PSI payload to a section_buf. This takes into account
++ * the extra byte present in PDU_START flagged packets.
++ *
++ * @param section section_buf to add to.
++ * @param payload Pointer to packet payload data.
++ * @param len Number of bytes of data.
++ * @param pdu_start True if the payload_unit_start_indicator flag was set in the
++ * TS packet.
++ * @param section_status 0: nothing special. 1: section complete. -ERANGE indicates that the
++ * section is larger than section->max. -EINVAL indicates the pointer_field was completely
++ * invalid (too large).
++ */
++extern int section_buf_add_transport_payload(struct section_buf *section,
++ uint8_t* payload, int len,
++ int pdu_start, int *section_status);
++
++/**
++ * Get the number of bytes left to be received in a section_buf.
++ *
++ * @param section The section_buf concerned.
++ * @return The number of bytes.
++ */
++static inline int section_buf_remaining(struct section_buf *section)
++{
++ return section->len - section->count;
++}
++
++/**
++ * Return a pointer to the start of the data in the section_buf.
++ *
++ * @param section The section_buf concerned.
++ * @return The data.
++ */
++static inline uint8_t* section_buf_data(struct section_buf *section)
++{
++ return (uint8_t*) section + sizeof(struct section_buf);
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/section.h dvb-apps/lib/libucsi/section.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/section.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/section.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,253 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_SECTION_H
++#define _UCSI_SECTION_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <libucsi/endianops.h>
++#include <libucsi/descriptor.h>
++#include <libucsi/crc32.h>
++#include <stdint.h>
++#include <string.h>
++
++#define CRC_SIZE 4
++
++
++/**
++ * Generic section header.
++ */
++struct section {
++ uint8_t table_id;
++ EBIT4(uint16_t syntax_indicator : 1; ,
++ uint16_t private_indicator : 1; , /* 2.4.4.10 */
++ uint16_t reserved : 2; ,
++ uint16_t length :12; );
++} __ucsi_packed;
++
++/**
++ * Generic extended section header structure.
++ */
++struct section_ext {
++ uint8_t table_id;
++ EBIT4(uint16_t syntax_indicator : 1; ,
++ uint16_t private_indicator : 1; , /* 2.4.4.10 */
++ uint16_t reserved : 2; ,
++ uint16_t length :12; );
++
++ uint16_t table_id_ext;
++ EBIT3(uint8_t reserved1 : 2; ,
++ uint8_t version_number : 5; ,
++ uint8_t current_next_indicator : 1; );
++ uint8_t section_number;
++ uint8_t last_section_number;
++} __ucsi_packed;
++
++/**
++ * Structure for keeping track of sections of a PSI table.
++ */
++struct psi_table_state {
++ uint8_t version_number;
++ uint16_t next_section_number;
++ uint8_t complete:1;
++ uint8_t new_table:1;
++} __ucsi_packed;
++
++
++/**
++ * Determine the total length of a section, including the header.
++ *
++ * @param section The parsed section structure.
++ * @return The length.
++ */
++static inline size_t section_length(struct section *section)
++{
++ return section->length + sizeof(struct section);
++}
++
++/**
++ * Determine the total length of an extended section, including the header,
++ * but omitting the CRC.
++ *
++ * @param section The parsed section_ext structure.
++ * @return The length.
++ */
++static inline size_t section_ext_length(struct section_ext * section)
++{
++ return section->length + sizeof(struct section) - CRC_SIZE;
++}
++
++/**
++ * Process a section structure in-place.
++ *
++ * @param buf Pointer to the data.
++ * @param len Length of data.
++ * @return Pointer to the section structure, or NULL if invalid.
++ */
++static inline struct section * section_codec(uint8_t * buf, size_t len)
++{
++ struct section * ret = (struct section *)buf;
++
++ if (len < 3)
++ return NULL;
++
++ bswap16(buf+1);
++
++ if (len != ret->length + 3U)
++ return NULL;
++
++ return ret;
++}
++
++/**
++ * Some sections have a CRC even though they are not section_exts.
++ * This function is to allow checking of them.
++ *
++ * @param section Pointer to the processed section structure.
++ * @return Nonzero on error, or 0 if the CRC was correct.
++ */
++static inline int section_check_crc(struct section *section)
++{
++ uint8_t * buf = (uint8_t *) section;
++ size_t len = section_length(section);
++ uint32_t crc;
++
++ /* the crc check has to be performed on the unswapped data */
++ bswap16(buf+1);
++ crc = crc32(CRC32_INIT, buf, len);
++ bswap16(buf+1);
++
++ /* the crc check includes the crc value,
++ * the result should therefore be zero.
++ */
++ if (crc)
++ return -1;
++ return 0;
++}
++
++
++/**
++ * Decode an extended section structure.
++ *
++ * @param section Pointer to the processed section structure.
++ * @param check_crc If 1, the CRC of the section will also be checked.
++ * @return Pointer to the parsed section_ext structure, or NULL if invalid.
++ */
++static inline struct section_ext * section_ext_decode(struct section * section,
++ int check_crc)
++{
++ if (section->syntax_indicator == 0)
++ return NULL;
++
++ if (check_crc) {
++ if (section_check_crc(section))
++ return NULL;
++ }
++
++ bswap16((uint8_t *)section + sizeof(struct section));
++
++ return (struct section_ext *)section;
++}
++
++/**
++ * Encode an extended section structure for transmission.
++ *
++ * @param section Pointer to the section_ext structure.
++ * @param update_crc If 1, the CRC of the section will also be updated.
++ * @return Pointer to the encoded section_ext structure, or NULL if invalid.
++ */
++static inline struct section_ext * section_ext_encode(struct section_ext* section,
++ int update_crc)
++{
++ if (section->syntax_indicator == 0)
++ return NULL;
++
++ bswap16((uint8_t *)section + sizeof(struct section));
++
++ if (update_crc) {
++ uint8_t * buf = (uint8_t *) section;
++ int len = sizeof(struct section) + section->length;
++ uint32_t crc;
++
++ /* the crc has to be performed on the swapped data */
++ bswap16(buf+1);
++ crc = crc32(CRC32_INIT, buf, len-4);
++ bswap16(buf+1);
++
++ /* update the CRC */
++ *((uint32_t*) (buf+len-4)) = crc;
++ bswap32(buf+len-4);
++ }
++
++ return (struct section_ext *)section;
++}
++
++/**
++ * Reset a psi_table_state structure.
++ *
++ * @param tstate The structure to reset.
++ */
++static inline void psi_table_state_reset(struct psi_table_state *tstate)
++{
++ tstate->version_number = 0xff;
++}
++
++/**
++ * Check if a supplied section_ext is something we want to process.
++ *
++ * @param section The parsed section_ext structure.
++ * @param tstate The state structure for this PSI table.
++ * @return 0=> not useful. nonzero => useful.
++ */
++static inline int section_ext_useful(struct section_ext *section, struct psi_table_state *tstate)
++{
++ if ((section->version_number == tstate->version_number) && tstate->complete)
++ return 0;
++ if (section->version_number != tstate->version_number) {
++ if (section->section_number != 0)
++ return 0;
++
++ tstate->next_section_number = 0;
++ tstate->complete = 0;
++ tstate->version_number = section->version_number;
++ tstate->new_table = 1;
++ } else if (section->section_number == tstate->next_section_number) {
++ tstate->new_table = 0;
++ } else {
++ return 0;
++ }
++
++ tstate->next_section_number++;
++ if (section->last_section_number < tstate->next_section_number) {
++ tstate->complete = 1;
++ }
++
++ return 1;
++}
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/testrecord.txt dvb-apps/lib/libucsi/testrecord.txt
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/testrecord.txt 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/testrecord.txt 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,146 @@
++libucsi test record. Anything without PASS is either not tested, or is
++currently broken.
++
++Testing means (a) ensure there are no segfaults etc. (b) dump the raw hex,
++decode it by hand, and check it matches the output.
++
++Sections:
++PASS mpeg/cat_section.h
++ mpeg/odsmt_section.h
++PASS mpeg/pat_section.h
++PASS mpeg/pmt_section.h
++ mpeg/tsdt_section.h
++ mpeg/metadata_section.h
++
++PASS dvb/bat_section.h
++ dvb/dit_section.h
++PASS dvb/eit_section.h
++ dvb/int_section.h
++PASS dvb/nit_section.h
++ dvb/rst_section.h
++PASS dvb/sdt_section.h
++ dvb/sit_section.h
++PASS dvb/st_section.h
++PASS dvb/tdt_section.h
++PASS dvb/tot_section.h
++ dvb/tva_container_section.h
++
++PASS atsc/cvct_section.h
++ atsc/dccsct_section.h
++ atsc/dcct_section.h
++PASS atsc/eit_section.h
++PASS atsc/ett_section.h
++PASS atsc/mgt_section.h
++ atsc/rrt_section.h
++PASS atsc/stt_section.h
++PASS atsc/tvct_section.h
++
++Descriptors:
++PASS mpeg/audio_stream_descriptor.h
++PASS mpeg/ca_descriptor.h
++ mpeg/content_labelling_descriptor.h
++PASS mpeg/copyright_descriptor.h
++PASS mpeg/data_stream_alignment_descriptor.h
++PASS mpeg/external_es_id_descriptor.h
++ mpeg/fmc_descriptor.h
++PASS mpeg/fmxbuffer_size_descriptor.h
++ mpeg/hierarchy_descriptor.h
++ mpeg/ibp_descriptor.h
++ mpeg/iod_descriptor.h
++PASS mpeg/iso_639_language_descriptor.h
++PASS mpeg/maximum_bitrate_descriptor.h
++ mpeg/metadata_descriptor.h
++ mpeg/metadata_pointer_descriptor.h
++ mpeg/metadata_std_descriptor.h
++ mpeg/mpeg4_audio_descriptor.h
++ mpeg/mpeg4_video_descriptor.h
++ mpeg/multiplex_buffer_descriptor.h
++PASS mpeg/multiplex_buffer_utilization_descriptor.h
++ mpeg/muxcode_descriptor.h
++PASS mpeg/private_data_indicator_descriptor.h
++PASS mpeg/registration_descriptor.h
++ mpeg/sl_descriptor.h
++PASS mpeg/smoothing_buffer_descriptor.h
++PASS mpeg/std_descriptor.h
++PASS mpeg/system_clock_descriptor.h
++ mpeg/target_background_grid_descriptor.h
++PASS mpeg/video_stream_descriptor.h
++ mpeg/video_window_descriptor.h
++
++ dvb/ac3_descriptor.h
++ dvb/adaptation_field_data_descriptor.h
++ dvb/ait_application_descriptor.h
++ dvb/ait_application_icons_descriptor.h
++ dvb/ait_application_name_descriptor.h
++ dvb/ait_external_application_authorisation_descriptor.h
++ dvb/ancillary_data_descriptor.h
++ dvb/announcement_support_descriptor.h
++ dvb/application_signalling_descriptor.h
++PASS dvb/bouquet_name_descriptor.h
++PASS dvb/ca_identifier_descriptor.h
++ dvb/cable_delivery_descriptor.h
++ dvb/cell_frequency_link_descriptor.h
++ dvb/cell_list_descriptor.h
++PASS dvb/component_descriptor.h
++PASS dvb/content_descriptor.h
++ dvb/content_identifier_descriptor.h
++ dvb/country_availability_descriptor.h
++ dvb/data_broadcast_descriptor.h
++PASS dvb/data_broadcast_id_descriptor.h
++ dvb/default_authority_descriptor.h
++ dvb/dsng_descriptor.h
++ dvb/extended_event_descriptor.h
++PASS dvb/frequency_list_descriptor.h
++PASS dvb/linkage_descriptor.h
++PASS dvb/local_time_offset_descriptor.h
++ dvb/mhp_data_broadcast_id_descriptor.h
++ dvb/mosaic_descriptor.h
++ dvb/multilingual_bouquet_name_descriptor.h
++PASS dvb/multilingual_component_descriptor.h
++ dvb/multilingual_network_name_descriptor.h
++ dvb/multilingual_service_name_descriptor.h
++PASS dvb/network_name_descriptor.h
++ dvb/nvod_reference_descriptor.h
++PASS dvb/parental_rating_descriptor.h
++ dvb/partial_transport_stream_descriptor.h
++ dvb/pdc_descriptor.h
++PASS dvb/private_data_specifier_descriptor.h
++ dvb/related_content_descriptor.h
++ dvb/rnt_rar_over_dvb_stream_descriptor.h
++ dvb/rnt_rar_over_ip_descriptor.h
++ dvb/rnt_rnt_scan_descriptor.h
++ dvb/s2_satellite_delivery_descriptor.h
++PASS dvb/satellite_delivery_descriptor.h
++ dvb/scrambling_descriptor.h
++ dvb/service_availablility_descriptor.h
++PASS dvb/service_descriptor.h
++ dvb/service_identifier_descriptor.h
++PASS dvb/service_list_descriptor.h
++ dvb/service_move_descriptor.h
++PASS dvb/short_event_descriptor.h
++ dvb/short_smoothing_buffer_descriptor.h
++PASS dvb/stream_identifier_descriptor.h
++PASS dvb/stuffing_descriptor.h
++PASS dvb/subtitling_descriptor.h
++ dvb/telephone_descriptor.h
++ dvb/teletext_descriptor.h
++PASS dvb/terrestrial_delivery_descriptor.h
++ dvb/time_shifted_event_descriptor.h
++ dvb/time_shifted_service_descriptor.h
++ dvb/transport_stream_descriptor.h
++ dvb/tva_id_descriptor.h
++ dvb/vbi_data_descriptor.h
++ dvb/vbi_teletext_descriptor.h
++
++PASS atsc/ac3_descriptor.h
++PASS atsc/caption_service_descriptor.h
++ atsc/component_name_descriptor.h
++PASS atsc/content_advisory_descriptor.h
++ atsc/dcc_arriving_request_descriptor.h
++ atsc/dcc_departing_request_descriptor.h
++PASS atsc/extended_channel_name_descriptor.h
++ atsc/genre_descriptor.h
++ atsc/rc_descriptor.h
++PASS atsc/service_location_descriptor.h
++PASS atsc/stuffing_descriptor.h
++ atsc/time_shifted_service_descriptor.h
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/transport_packet.c dvb-apps/lib/libucsi/transport_packet.c
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/transport_packet.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/transport_packet.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,256 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include "transport_packet.h"
++
++#define CONTINUITY_VALID 0x80
++#define CONTINUITY_DUPESEEN 0x40
++
++int transport_packet_values_extract(struct transport_packet *pkt,
++ struct transport_values *out,
++ enum transport_value extract)
++{
++ uint8_t *end = (uint8_t*) pkt + TRANSPORT_PACKET_LENGTH;
++ uint8_t *adapend;
++ uint8_t *pos = (uint8_t*) pkt + sizeof(struct transport_packet);
++ enum transport_value extracted = 0;
++ enum transport_adaptation_flags adapflags = 0;
++ enum transport_adaptation_extension_flags adapextflags = 0;
++ int adaplength = 0;
++ int adapextlength = 0;
++
++ /* does the packet contain an adaptation field ? */
++ if ((pkt->adaptation_field_control & 2) == 0)
++ goto extract_payload;
++
++ /* get the adaptation field length and skip the byte */
++ adaplength = *pos++;
++
++ /* do we actually have any adaptation data? */
++ if (adaplength == 0)
++ goto extract_payload;
++
++ /* sanity check */
++ adapend = pos + adaplength;
++ if (adapend > end)
++ return -1;
++
++ /* extract the adaptation flags (we must have at least 1 byte to be here) */
++ adapflags = *pos++;
++
++ /* do we actually want anything else? */
++ if ((extract & 0xffff) == 0)
++ goto extract_payload;
++
++ /* PCR? */
++ if (adapflags & transport_adaptation_flag_pcr) {
++ if ((pos+6) > adapend)
++ return -1;
++
++ if (extract & transport_value_pcr) {
++ uint64_t base = ((uint64_t) pos[0] << 25) |
++ ((uint64_t) pos[1] << 17) |
++ ((uint64_t) pos[2] << 9) |
++ ((uint64_t) pos[3] << 1) |
++ ((uint64_t) pos[4] >> 7);
++ uint64_t ext = (((uint64_t) pos[4] & 1) << 8) |
++ (uint64_t) pos[5];
++ out->pcr= base * 300ULL + ext;
++ extracted |= transport_value_pcr;
++ }
++ pos += 6;
++ }
++
++ /* OPCR? */
++ if (adapflags & transport_adaptation_flag_opcr) {
++ if ((pos+6) > adapend)
++ return -1;
++
++ if (extract & transport_value_opcr) {
++ uint64_t base = ((uint64_t) pos[0] << 25) |
++ ((uint64_t) pos[1] << 17) |
++ ((uint64_t) pos[2] << 9) |
++ ((uint64_t) pos[3] << 1) |
++ ((uint64_t) pos[4] >> 7);
++ uint64_t ext = (((uint64_t) pos[4] & 1) << 8) |
++ (uint64_t) pos[5];
++ out->opcr= base * 300ULL + ext;
++ extracted |= transport_value_opcr;
++ }
++ pos += 6;
++ }
++
++ /* splice countdown? */
++ if (adapflags & transport_adaptation_flag_splicing_point) {
++ if ((pos+1) > adapend)
++ return -1;
++
++ if (extract & transport_value_splice_countdown) {
++ out->splice_countdown = *pos;
++ extracted |= transport_value_splice_countdown;
++ }
++ pos++;
++ }
++
++ /* private data? */
++ if (adapflags & transport_adaptation_flag_private_data) {
++ if ((pos+1) > adapend)
++ return -1;
++ if ((pos+1+*pos) > adapend)
++ return -1;
++
++ if (extract & transport_value_private_data) {
++ out->private_data_length = *pos;
++ out->private_data = pos + 1;
++ extracted |= transport_value_private_data;
++ }
++ pos += 1 + *pos;
++ }
++
++ /* is there an adaptation extension? */
++ if (!(adapflags & transport_adaptation_flag_extension))
++ goto extract_payload;
++
++ /* get/check the length */
++ if (pos >= adapend)
++ return -1;
++ adapextlength = *pos++;
++ if ((pos + adapextlength) > adapend)
++ return -1;
++
++ /* do we want/have anything in the adaptation extension? */
++ if (((extract & 0xff00) == 0) || (adapextlength == 0))
++ goto extract_payload;
++
++ /* extract the adaptation extension flags (we must have at least 1 byte
++ * to be here) */
++ adapextflags = *pos++;
++
++ /* LTW? */
++ if (adapextflags & transport_adaptation_extension_flag_ltw) {
++ if ((pos+2) > adapend)
++ return -1;
++
++ if (extract & transport_value_ltw) {
++ if (*pos & 0x80) {
++ out->ltw_offset = ((pos[0] & 0x7f) << 8) |
++ (pos[1]);
++ extracted |= transport_value_ltw;
++ }
++ }
++ pos += 2;
++ }
++
++ /* piecewise_rate? */
++ if (adapextflags & transport_adaptation_extension_flag_piecewise_rate) {
++ if ((pos+3) > adapend)
++ return -1;
++
++ if (extract & transport_value_piecewise_rate) {
++ out->piecewise_rate = ((pos[0] & 0x3f) << 16) |
++ (pos[1] << 8) |
++ pos[2];
++ extracted |= transport_value_piecewise_rate;
++ }
++ pos += 3;
++ }
++
++ /* seamless_splice? */
++ if (adapextflags & transport_adaptation_extension_flag_seamless_splice) {
++ if ((pos+5) > adapend)
++ return -1;
++
++ if (extract & transport_value_piecewise_rate) {
++ out->splice_type = pos[0] >> 4;
++ out->dts_next_au = ((pos[0] & 0x0e) << 29) |
++ (pos[1] << 22) |
++ ((pos[2] & 0xfe) << 14) |
++ (pos[3] << 7) |
++ ((pos[4] & 0xfe) >> 1);
++ extracted |= transport_value_seamless_splice;
++ }
++ pos += 5;
++ }
++
++
++
++extract_payload:
++ /* does the packet contain a payload? */
++ if (pkt->adaptation_field_control & 1) {
++ int off = sizeof(struct transport_packet);
++ if (pkt->adaptation_field_control & 2)
++ off++;
++ off += adaplength;
++
++ out->payload = (uint8_t*) pkt + off;
++ out->payload_length = TRANSPORT_PACKET_LENGTH - off;
++ } else {
++ out->payload = NULL;
++ out->payload_length = 0;
++ }
++
++ out->flags = adapflags;
++ return extracted;
++}
++
++int transport_packet_continuity_check(struct transport_packet *pkt,
++ int discontinuity_indicator, unsigned char *cstate)
++{
++ unsigned char pktcontinuity = pkt->continuity_counter;
++ unsigned char prevcontinuity = *cstate & 0x0f;
++ unsigned char nextcontinuity;
++
++ /* NULL packets have undefined continuity */
++ if (transport_packet_pid(pkt) == TRANSPORT_NULL_PID)
++ return 0;
++
++ /* is the state valid? */
++ if (!(*cstate & CONTINUITY_VALID)) {
++ *cstate = pktcontinuity | CONTINUITY_VALID;
++ return 0;
++ }
++
++ /* check for discontinuity_indicator */
++ if (discontinuity_indicator) {
++ *cstate = pktcontinuity | CONTINUITY_VALID;
++ return 0;
++ }
++
++ /* only packets with a payload should increment the counter */
++ if (pkt->adaptation_field_control & 1)
++ nextcontinuity = (prevcontinuity + 1) & 0xf;
++ else
++ nextcontinuity = prevcontinuity;
++
++ /* check for a normal continuity progression */
++ if (nextcontinuity == pktcontinuity) {
++ *cstate = pktcontinuity | CONTINUITY_VALID;
++ return 0;
++ }
++
++ /* one dupe is allowed */
++ if ((prevcontinuity == pktcontinuity) && (!(*cstate & CONTINUITY_DUPESEEN))) {
++ *cstate = pktcontinuity | (CONTINUITY_VALID|CONTINUITY_DUPESEEN);
++ return 0;
++ }
++
++ /* continuity error */
++ return -1;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/transport_packet.h dvb-apps/lib/libucsi/transport_packet.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/transport_packet.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/transport_packet.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,195 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_TRANSPORT_PACKET_H
++#define _UCSI_TRANSPORT_PACKET_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++#include <stdint.h>
++#include "descriptor.h"
++
++#define TRANSPORT_PACKET_LENGTH 188
++#define TRANSPORT_PACKET_SYNC 0x47
++#define TRANSPORT_MAX_PIDS 0x2000
++#define TRANSPORT_NULL_PID 0x1fff
++
++
++/**
++ * Enumeration of adaptation field control values.
++ */
++enum transport_adaptation_field_control {
++ transport_adaptation_field_control_reserved = 0x00,
++ transport_adaptation_field_control_payload_only = 0x01,
++ transport_adaptation_field_control_adaptation_only = 0x02,
++ transport_adaptation_field_control_adaptation_payload = 0x03,
++};
++
++/**
++ * Enumeration of scrambling control values.
++ */
++enum transport_scrambling_control {
++ transport_scrambling_control_unscrambled = 0x00,
++ transport_scrambling_control_user_1 = 0x01,
++ transport_scrambling_control_user_2 = 0x02,
++ transport_scrambling_control_user_3 = 0x03,
++};
++
++/**
++ * Enumeration of adaptation flags.
++ */
++enum transport_adaptation_flags {
++ transport_adaptation_flag_discontinuity = 0x80,
++ transport_adaptation_flag_random_access = 0x40,
++ transport_adaptation_flag_es_priority = 0x20,
++ transport_adaptation_flag_pcr = 0x10,
++ transport_adaptation_flag_opcr = 0x08,
++ transport_adaptation_flag_splicing_point = 0x04,
++ transport_adaptation_flag_private_data = 0x02,
++ transport_adaptation_flag_extension = 0x01,
++};
++
++/**
++ * Enumeration of adaptation extension flags.
++ */
++enum transport_adaptation_extension_flags {
++ transport_adaptation_extension_flag_ltw = 0x80,
++ transport_adaptation_extension_flag_piecewise_rate = 0x40,
++ transport_adaptation_extension_flag_seamless_splice = 0x20,
++};
++
++/**
++ * Enumeration of flags controlling which values to extract using the
++ * transport_packet_values_extract() function.
++ */
++enum transport_value {
++ /* normal adaptation */
++ transport_value_pcr = 0x0001,
++ transport_value_opcr = 0x0002,
++ transport_value_splice_countdown = 0x0004,
++ transport_value_private_data = 0x0008,
++
++ /* extension adaptation */
++ transport_value_ltw = 0x0100,
++ transport_value_piecewise_rate = 0x0200,
++ transport_value_seamless_splice = 0x0400,
++};
++
++/**
++ * Structure describing a transport packet header.
++ */
++struct transport_packet {
++ uint8_t sync_byte;
++ EBIT4(uint8_t transport_error_indicator : 1; ,
++ uint8_t payload_unit_start_indicator : 1; ,
++ uint8_t transport_priority : 1; ,
++ uint8_t pid_hi : 5; );
++ uint8_t pid_lo;
++ EBIT3(uint8_t transport_scrambling_control : 2; ,
++ uint8_t adaptation_field_control : 2; ,
++ uint8_t continuity_counter : 4; );
++ /* values */
++} __ucsi_packed;
++
++/**
++ * Structure to extract values into using the transport_packet_values_extract()
++ * function.
++ */
++struct transport_values {
++ enum transport_adaptation_flags flags; /* always extracted */
++ uint8_t *payload; /* always extracted */
++ uint16_t payload_length; /* always extracted */
++
++ uint64_t pcr;
++ uint64_t opcr;
++ uint8_t splice_countdown;
++ uint8_t private_data_length;
++ uint8_t *private_data;
++ uint16_t ltw_offset;
++ uint32_t piecewise_rate;
++ uint8_t splice_type;
++ uint64_t dts_next_au;
++};
++
++/**
++ * Extract the PID from a transport packet.
++ *
++ * @param pkt The packet.
++ * @return The PID.
++ */
++static inline int transport_packet_pid(struct transport_packet *pkt)
++{
++ return (pkt->pid_hi << 8) | (pkt->pid_lo);
++}
++
++/**
++ * Process a buffer into a transport packet.
++ *
++ * @param buf Raw buffer. Note, this function assumes there are 188 bytes available.
++ * @return transport_packet pointer, or NULL on error.
++ */
++static inline struct transport_packet *transport_packet_init(unsigned char *buf)
++{
++ struct transport_packet *pkt = (struct transport_packet*) buf;
++
++ if (pkt->sync_byte != TRANSPORT_PACKET_SYNC)
++ return NULL;
++
++ if (transport_packet_pid(pkt) >= TRANSPORT_MAX_PIDS)
++ return NULL;
++
++ return pkt;
++}
++
++/**
++ * Check the continuity counter for a packet in a PID stream.
++ *
++ * @param pkt transport_packet to check.
++ * @param discontinuity_indicator Set to 1 if the packet's discontinuity_indicator flag is set.
++ * @param cstate Pointer to a single 8 bit character, used to store state for validating
++ * continuity. To initialise the state, simply set it to 0 before the first call.
++ * @return 0 if the continuity was correct, or nonzero on error. cstate will not be updated on error,
++ * it is up to the caller to clear it to accept the next packet.
++ */
++extern int transport_packet_continuity_check(struct transport_packet *pkt,
++ int discontinuity_indicator, unsigned char *cstate);
++
++/**
++ * Extract selected fields from a transport packet.
++ *
++ * @param pkt The packet.
++ * @param out Destination structure for values.
++ * @param extract Orred bitmask of enum transport_value - tells it what fields
++ * to extract if they are available.
++ * @return < 0 => error. Otherwise, an orred bitmask of enum transport_value
++ * telling you what fields were successfully extracted.
++ */
++extern int transport_packet_values_extract(struct transport_packet *pkt,
++ struct transport_values *out,
++ enum transport_value extract);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/libucsi/types.h dvb-apps/lib/libucsi/types.h
+--- linuxtv-dvb-apps-1.1.1/lib/libucsi/types.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/libucsi/types.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,36 @@
++/*
++ * section and descriptor parser
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#ifndef _UCSI_TYPES_H
++#define _UCSI_TYPES_H 1
++
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++
++typedef uint8_t iso639lang_t[3];
++typedef uint8_t iso639country_t[3];
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/lib/Makefile dvb-apps/lib/Makefile
+--- linuxtv-dvb-apps-1.1.1/lib/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/lib/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,11 @@
++# Makefile for linuxtv.org dvb-apps/lib
++
++.PHONY: all clean install
++
++all clean install:
++ $(MAKE) -C libdvbapi $@
++ $(MAKE) -C libdvbcfg $@
++ $(MAKE) -C libdvben50221 $@
++ $(MAKE) -C libdvbsec $@
++ $(MAKE) -C libesg $@
++ $(MAKE) -C libucsi $@
+diff -Nurd linuxtv-dvb-apps-1.1.1/libdvb2/README dvb-apps/libdvb2/README
+--- linuxtv-dvb-apps-1.1.1/libdvb2/README 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/libdvb2/README 1970-01-01 01:00:00.000000000 +0100
+@@ -1,23 +0,0 @@
+-Late in 2003 the idea to create a simple DVB library from the code snippets
+-in the test/utility programs was discussed on the linux-dvb mailing list.
+-Hopefully someone will invest some time in this project to turn the idea into
+-reality...
+-
+-Here is an outline of what libdvb2 should be, according to my recollection:
+-(For first hand information search the linux-dvb list archives for "libdvb2".)
+-
+-- C
+-- small: The goal is to make the library usable in *any* DVB project, which
+- is easier if the library sticks to the basics. Advanced stuff can be
+- done in a second library. What exacty "basic" and "advanced" means
+- is subject of discussion, but I want avoid to impose a certain programming
+- model (e.g. multi-threaded vw. event-loop) on users of the library.
+-- a prime target is to establish a standard DVB config and service list
+- format, to make this sharable between different applications
+-- LGPL
+-
+-About the name: There already is a libdvb written by the Metzler Bros.,
+-but the main drawback is that it is written in C++ and thus rejected
+-by many projects.
+-
+-Johannes Stezenbach <js@convergence.de>
+diff -Nurd linuxtv-dvb-apps-1.1.1/Makefile dvb-apps/Makefile
+--- linuxtv-dvb-apps-1.1.1/Makefile 2004-02-04 19:41:55.000000000 +0100
++++ dvb-apps/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,28 +1,12 @@
+ # Makefile for linuxtv.org dvb-apps
+
+-VERSION := 1.1.0
+-PACKAGE := linuxtv-dvb-apps-$(VERSION)
+-CVSROOT := $(shell cat CVS/Root)
+-RELEASE_TAG := LINUXTV-DVB-$(subst .,_,$(subst -,_,$(VERSION)))
+-
+-all:
++.PHONY: all clean install update
+
+-release dist:
+- rm -rf release-tmp $(PACKAGE).tar.gz
+- mkdir release-tmp
+- ( cd release-tmp; cvs -d$(CVSROOT) export -r$(RELEASE_TAG) -d$(PACKAGE) dvb-apps )
+- find release-tmp -name .cvsignore | xargs rm -v
+- ( cd release-tmp; tar cjf ../$(PACKAGE).tar.bz2 $(PACKAGE) )
+- rm -rf release-tmp
+- @echo
+- @echo --------------------------------------------------------------------------------
+- @echo
+- @echo "dist package: ./$(PACKAGE).tar.bz2"
+- @echo
+- @echo --------------------------------------------------------------------------------
+- @echo
++all clean install:
++ $(MAKE) -C lib $@
++ $(MAKE) -C test $@
++ $(MAKE) -C util $@
+
+-%::
+-# $(MAKE) -C libdvb2 $(MAKECMDGOALS)
+- $(MAKE) -C util $(MAKECMDGOALS)
+- $(MAKE) -C test $(MAKECMDGOALS)
++update:
++ @echo "Pulling changes & updating from master repository"
++ hg pull -u
+diff -Nurd linuxtv-dvb-apps-1.1.1/Make.rules dvb-apps/Make.rules
+--- linuxtv-dvb-apps-1.1.1/Make.rules 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/Make.rules 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,104 @@
++# build rules for linuxtv.org dvb-apps
++
++CFLAGS ?= -g -Wall -W -Wshadow -Wpointer-arith -Wstrict-prototypes
++
++ifneq ($(lib_name),)
++
++# additional rules for libraries
++
++CFLAGS_LIB ?= -fPIC
++CFLAGS += $(CFLAGS_LIB)
++
++libraries = $(lib_name).so $(lib_name).a
++
++.PHONY: library
++
++library: $(libraries)
++
++$(libraries): $(objects)
++
++endif
++
++prerequisites = $(subst .o,.d,$(objects)) $(addsuffix .d,$(binaries))
++
++.PHONY: clean install
++
++ifeq ($(static),1)
++LDFLAGS += -static
++endif
++
++prefix ?= /usr
++
++bindir ?= $(prefix)/bin
++includedir ?= $(prefix)/include
++libdir ?= $(prefix)/lib
++sharedir ?= $(prefix)/share
++
++ifneq ($(DESTDIR),)
++DESTDIR = $(DESTDIR)/
++endif
++
++ifeq ($(V),1)
++%.o: %.c
++ $(CC) -c $(CPPFLAGS) $(CFLAGS) -MMD -o $@ $< $(filter-out %.h %.c,$^)
++%: %.o
++ $(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
++%: %.c
++ $(CC) $(CPPFLAGS) $(CFLAGS) -MMD $(LDFLAGS) -o $@ $< $(filter-out %.h %.c,$^) $(LOADLIBES) $(LDLIBS)
++%.so:
++ $(CC) -shared -o $@ $^
++%.a:
++ $(AR) rcs $@ $^
++clean::
++ $(RM) -f $(prerequisites) $(objects) $(libraries) $(binaries) $(removing) *~
++install::
++ifneq ($(includes),)
++ mkdir -p $(DESTDIR)$(includedir)/$(lib_name)
++ install -m 644 $(includes) $(DESTDIR)$(includedir)/$(lib_name)/
++endif
++ifneq ($(libraries),)
++ mkdir -p $(DESTDIR)$(libdir)
++ install -m 644 $(libraries) $(DESTDIR)$(libdir)/
++endif
++ifneq ($(inst_bin),)
++ mkdir -p $(DESTDIR)$(bindir)
++ install -m 755 $(inst_bin) $(DESTDIR)$(bindir)/
++endif
++else
++%.o: %.c
++ @echo CC $@
++ @$(CC) -c $(CPPFLAGS) $(CFLAGS) -MMD -o $@ $< $(filter-out %.h %.c,$^)
++%: %.o
++ @echo CC $@
++ @$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
++%: %.c
++ @echo CC $@
++ @$(CC) $(CPPFLAGS) $(CFLAGS) -MMD $(LDFLAGS) -o $@ $< $(filter-out %.h %.c,$^) $(LOADLIBES) $(LDLIBS)
++%.so:
++ @echo CC $@
++ @$(CC) -shared -o $@ $^
++%.a:
++ @echo AR $@
++ @$(AR) rcs $@ $^
++clean::
++ @echo cleaning
++ @$(RM) -f $(prerequisites) $(objects) $(libraries) $(binaries) $(removing) *~
++install::
++ifneq ($(includes),)
++ @echo installing headers
++ @mkdir -p $(DESTDIR)$(includedir)/$(lib_name)
++ @install -m 644 $(includes) $(DESTDIR)$(includedir)/$(lib_name)/
++endif
++ifneq ($(libraries),)
++ @echo installing libraries
++ @mkdir -p $(DESTDIR)$(libdir)
++ @install -m 644 $(libraries) $(DESTDIR)$(libdir)/
++endif
++ifneq ($(inst_bin),)
++ @echo installing binaries
++ @mkdir -p $(DESTDIR)$(bindir)
++ @install -m 755 $(inst_bin) $(DESTDIR)$(bindir)/
++endif
++endif
++
++-include $(prerequisites)
+diff -Nurd linuxtv-dvb-apps-1.1.1/README dvb-apps/README
+--- linuxtv-dvb-apps-1.1.1/README 2006-05-18 01:37:39.000000000 +0200
++++ dvb-apps/README 2009-06-21 13:29:06.000000000 +0200
+@@ -1,28 +1,40 @@
+-linuxtv-dvb-apps-1.1.1
++linuxtv-dvb-apps-1.?
+ ======================
+
+-Linux DVB API test/demo applications and utilities.
++Linux DVB API applications and utilities.
+
+-You find a README in each subdirectory explaining what the code there does.
+-For beginners utils/szap/ and utils/scan/ are probably most useful.
++All applications support the DVB-S, DVB-C, DVB-T, and ATSC standards.
+
+-For convenience, dvb-apps contains a copy of the DVB API include
+-files as they are contained in the linuxtv-dvb-1.1.0 realease
+-and the 2.6.x Linux kernel. However, since the DVB API hasn't changed,
+-the apps will still work with the old "DVB" drivers, should you decide not
+-to use linuxtv-dvb-1.1.0 (or the dvb-kernel CVS).
++Main User Applications:
++util/scan - Scan for channels on your digital TV device.
++util/gnutv - Tune, watch and stream your TV.
+
++General Utilities:
++util/dvbdate - Set your clock from digital TV.
++util/dvbnet - Control digital data network interfaces.
++util/dvbtraffic - Monitor traffic on a digital device.
++util/femon - Monitor the tuning on a digital TV device.
++util/zap - *Just* tunes a digital device - really intended for developers.
+
+-Historical note:
+-The apps have been copied from the "DVB" CVS tree, which means that
+-the stuff in "DVB" is now unmaintained and out of date.
++Hardware Specific Utilities:
++util/av7110_loadkeys - Load remote keys into an av7110 based card
++util/dib3000-watch - Monitor DIB3000 demodulators
++util/dst-utils - Utilities for DST based cards.
++util/ttusb_dec_reset - Reset a TechnoTrends TTUSB DEC device.
+
++Libraries:
++lib/libdvbapi - Interface library to digital TV devices.
++lib/libdvbcfg - Library to parse/create digital TV channel configuration files.
++lib/libdvbsec - Library for Satellite Equipment Control operations.
++lib/libucsi - Fast MPEG2 Transport Stream SI table parsing library.
++lib/libdvben50221- Complete implementation of a Cenelec EN 50221 CAM stack.
++lib/libdvbmisc - Miscellaneous utilities used by the other libraries.
+
+-Johannes Stezenbach <js@convergence.de>
++Various testing applications also live in test.
+
+-This is an interim point release adding support for ATSC to the 1.1.0 release.
+-dvb-apps is currently being rewritten completely with new standardised DVB
+-libraries for all aspects of DVB, ca support etc, so expect a 1.2.0 release
+-at some point soon.
++For convenience, dvb-apps contains a copy of the DVB API include
++files as they are contained in the linuxtv-dvb-1.? release
++and the 2.6.x Linux kernel.
+
++Johannes Stezenbach <js@convergence.de>
+ Andrew de Quincey <adq_dvb@lidskialf.net>
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/dia dvb-apps/test/dia
+--- linuxtv-dvb-apps-1.1.1/test/dia 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/dia 2009-06-21 13:29:06.000000000 +0200
+@@ -4,4 +4,4 @@
+ do /usr/X11R6/bin/convert -geomtry 702x576 $f test.mpg
+ test_video test.mpg
+ rm test.mpg
+-done
+\ No newline at end of file
++done
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/diseqc.c dvb-apps/test/diseqc.c
+--- linuxtv-dvb-apps-1.1.1/test/diseqc.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/diseqc.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,11 +1,13 @@
+-/*
+- * Test sending DiSEqC commands on a SAT frontend.
+- *
+- * usage: FRONTEND=/dev/dvb/adapterX/frontendX diseqc [test_seq_no]
+- */
++#define USAGE \
++"\n" \
++"\nTest sending DiSEqC commands on a SAT frontend." \
++"\n" \
++"\nusage: FRONTEND=/dev/dvb/adapterX/frontendX diseqc [test_seq_no|'all']" \
++"\n"
+
+ #include <pthread.h>
+ #include <time.h>
++#include <string.h>
+ #include <stdlib.h>
+ #include <stdint.h>
+ #include <stdio.h>
+@@ -109,7 +111,10 @@
+ return -1;
+ }
+
+- if (argc > 1) {
++ if (argc != 2) {
++ fprintf (stderr, "usage: %s [number|'all']\n" USAGE, argv[0]);
++ return 1;
++ } else if (strcmp(argv[1], "all")) {
+ int i = atol(argv[1]);
+ cmd[0] = &switch_cmds[i];
+ diseqc_send_msg(fd,
+@@ -136,5 +141,3 @@
+
+ return 0;
+ }
+-
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/evtest.c dvb-apps/test/evtest.c
+--- linuxtv-dvb-apps-1.1.1/test/evtest.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/evtest.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,251 @@
++/*
++ * $Id: evtest.c,v 1.3 2005/08/15 20:43:52 js Exp $
++ *
++ * Copyright (c) 1999-2000 Vojtech Pavlik
++ *
++ * Event device test program
++ */
++
++/*
++ * 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
++ *
++ * Should you need to contact me, the author, you can do so either by
++ * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
++ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
++ */
++
++#include <linux/input.h>
++
++#include <string.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <stdio.h>
++#include <stdlib.h>
++
++char *events[EV_MAX + 1] = { "Sync", "Key", "Relative", "Absolute", "Misc", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++NULL, NULL, NULL, "LED", "Sound", NULL, "Repeat", "ForceFeedback", "Power", "ForceFeedbackStatus"};
++char *syncs[2] = { "Sync", "Config"};
++char *keys[KEY_MAX + 1] = {
++ // 0x000
++ "Reserved", "Esc", "1", "2", "3", "4", "5", "6",
++ "7", "8", "9", "0", "Minus", "Equal", "Backspace", "Tab",
++ // 0x010
++ "Q", "W", "E", "R", "T", "Y", "U", "I",
++ "O", "P", "LeftBrace", "RightBrace", "Enter", "LeftControl", "A", "S",
++ // 0x020
++ "D", "F", "G", "H", "J", "K", "L", "Semicolon",
++ "Apostrophe", "Grave", "LeftShift", "BackSlash", "Z", "X", "C", "V",
++ // 0x030
++ "B", "N", "M", "Comma", "Dot", "Slash", "RightShift", "KPAsterisk",
++ "LeftAlt", "Space", "CapsLock", "F1", "F2", "F3", "F4", "F5",
++ // 0x040
++ "F6", "F7", "F8", "F9", "F10", "NumLock", "ScrollLock", "KP7",
++ "KP8", "KP9", "KPMinus", "KP4", "KP5", "KP6", "KPPlus", "KP1",
++ // 0x050
++ "KP2", "KP3", "KP0", "KPDot", NULL, "ZENKAKUHANKAKU", "102nd", "F11",
++ "F12", "RO", "KATAKANA", "HIRAGANA", "HENKAN", "KATAKANAHIRAGANA", "MUHENKAN", "KPJPCOMMA",
++ // 0x060
++ "KPEnter", "RightCtrl", "KPSlash", "SysRq", "RightAlt", "LineFeed", "Home", "Up",
++ "PageUp", "Left", "Right", "End", "Down", "PageDown", "Insert", "Delete",
++ // 0x070
++ "Macro", "Mute", "VolumeDown", "VolumeUp", "Power", "KPEqual", "KPPlusMinus", "Pause",
++ NULL, "KPComma", "HANGUEL", "HANJA", "YEN", "LeftMeta", "RightMeta", "Compose",
++ // 0x080
++ "Stop", "Again", "Props", "Undo", "Front", "Copy", "Open", "Paste",
++ "Find", "Cut", "Help", "Menu", "Calc", "Setup", "Sleep", "WakeUp",
++ // 0x090
++ "File", "SendFile", "DeleteFile", "X-fer", "Prog1", "Prog2", "WWW", "MSDOS",
++ "Coffee", "Direction", "CycleWindows", "Mail", "Bookmarks", "Computer", "Back", "Forward",
++ // 0x0A0
++ "CloseCD", "EjectCD", "EjectCloseCD", "NextSong", "PlayPause", "PreviousSong", "StopCD", "Record",
++ "Rewind", "Phone", "ISOKey", "Config", "HomePage", "Refresh", "Exit", "Move",
++ // 0x0B0
++ "Edit", "ScrollUp", "ScrollDown", "KPLeftParenthesis", "KPRightParenthesis", NULL, NULL, "F13",
++ "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21",
++ // 0x0C0
++ "F22", "F23", "F24", NULL, NULL, NULL, NULL, NULL,
++ "PlayCD", "PauseCD", "Prog3", "Prog4", NULL, "Suspend", "Close", "Play",
++ // 0x0D0
++ "FastForward", "BassBoost", "Print", "HP", "Camera", "Sound", "Question", "EMail",
++ "Chat", "Search", "Connect", "Finance", "Sport", "Shop", "AltErase", "Cancel",
++ // 0x0E0
++ "BrightnessDown", "BrightnessUp", "Media", NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x0F0
++ "Unknown", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x100
++ "Btn0", "Btn1", "Btn2", "Btn3", "Btn4", "Btn5", "Btn6", "Btn7",
++ "Btn8", "Btn9", NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x110
++ "LeftBtn", "RightBtn", "MiddleBtn", "SideBtn", "ExtraBtn", "ForwardBtn", "BackBtn", "TaskBtn",
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x120
++ "Trigger", "ThumbBtn", "ThumbBtn2", "TopBtn", "TopBtn2", "PinkieBtn", "BaseBtn", "BaseBtn2",
++ "BaseBtn3", "BaseBtn4", "BaseBtn5", "BaseBtn6", NULL, NULL, NULL, "BtnDead",
++ // 0x130
++ "BtnA", "BtnB", "BtnC", "BtnX", "BtnY", "BtnZ", "BtnTL", "BtnTR",
++ "BtnTL2", "BtnTR2", "BtnSelect", "BtnStart", "BtnMode", "BtnThumbL", "BtnThumbR", NULL,
++ // 0x140
++ "ToolPen", "ToolRubber", "ToolBrush", "ToolPencil", "ToolAirbrush", "ToolFinger", "ToolMouse", "ToolLens",
++ NULL, NULL, "Touch", "Stylus", "Stylus2", "ToolDoubleTap", "ToolTripleTap", NULL,
++ // 0x150
++ "GearDown", "GearUp", NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x160
++ "Ok", "Select", "Goto", "Clear", "Power2", "Option", "Info", "Time",
++ "Vendor", "Archive", "Program", "Channel", "Favorites", "EPG", "PVR", "MHP",
++ // 0x170
++ "Language", "Title", "Subtitle", "Angle", "Zoom", "Mode", "Keyboard", "Screen",
++ "PC", "TV", "TV2", "VCR", "VCR2", "Sat", "Sat2", "CD",
++ // 0x180
++ "Tape", "Radio", "Tuner", "Player", "Text", "DVD", "Aux", "MP3",
++ "Audio", "Video", "Directory", "List", "Memo", "Calendar", "Red", "Green",
++ // 0x190
++ "Yellow", "Blue", "ChannelUp", "ChannelDown", "First", "Last", "AB", "Next",
++ "Restart", "Slow", "Shuffle", "Break", "Previous", "Digits", "Teen", "Twen",
++ // 0x1A0
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x1B0
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x1C0
++ "DelEOL", "DelEOS", "InsLine", "DelLine", NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x1D0
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x1E0
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x1F0
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++};
++
++char *absval[5] = { "Value", "Min ", "Max ", "Fuzz ", "Flat " };
++char *relatives[REL_MAX + 1] = {
++ "X", "Y", "Z", NULL, NULL, NULL, "HWheel", "Dial",
++ "Wheel", "Misc", NULL, NULL, NULL, NULL, NULL, NULL,
++};
++char *absolutes[ABS_MAX + 1] = {
++ // 0x00
++ "X", "Y", "Z", "Rx", "Ry", "Rz", "Throttle", "Rudder",
++ "Wheel", "Gas", "Brake", NULL, NULL, NULL, NULL, NULL,
++ // 0x10
++ "Hat0X", "Hat0Y", "Hat1X", "Hat1Y", "Hat2X", "Hat2Y", "Hat3X", "Hat 3Y",
++ "Pressure", "Distance", "XTilt", "YTilt", "ToolWidth", NULL, NULL, NULL,
++ // 0x20
++ "Volume", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ "Misc", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ // 0x30
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++};
++char *leds[LED_MAX + 1] = { "NumLock", "CapsLock", "ScrollLock", "Compose", "Kana", "Sleep", "Suspend", "Mute" };
++char *repeats[REP_MAX + 1] = { "Delay", "Period" };
++char *sounds[SND_MAX + 1] = { "Bell", "Click" };
++
++char **names[EV_MAX + 1] = { syncs, keys, relatives, absolutes, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++NULL, NULL, leds, sounds, NULL, repeats, NULL, NULL, NULL };
++
++#ifndef BITS_PER_LONG
++#define BITS_PER_LONG (sizeof(long) * 8)
++#endif
++#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
++#define OFF(x) ((x)%BITS_PER_LONG)
++#define BIT(x) (1UL<<OFF(x))
++#define LONG(x) ((x)/BITS_PER_LONG)
++#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
++
++int main (int argc, char **argv)
++{
++ int fd, rd, i, j, k;
++ struct input_event ev[64];
++ int version;
++ unsigned short id[4];
++ unsigned long bit[EV_MAX][NBITS(KEY_MAX)];
++ char name[256] = "Unknown";
++ int _abs[5];
++
++ if (argc < 2) {
++ printf("Usage: evtest /dev/input/eventX\n");
++ printf("Where X = input device number\n");
++ exit(1);
++ }
++
++ if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {
++ perror("evtest");
++ exit(1);
++ }
++
++ if (ioctl(fd, EVIOCGVERSION, &version)) {
++ perror("evtest: can't get version");
++ exit(1);
++ }
++
++ printf("Input driver version is %d.%d.%d\n",
++ version >> 16, (version >> 8) & 0xff, version & 0xff);
++
++ ioctl(fd, EVIOCGID, id);
++ printf("Input device ID: bus 0x%x vendor 0x%x product 0x%x version 0x%x\n",
++ id[ID_BUS], id[ID_VENDOR], id[ID_PRODUCT], id[ID_VERSION]);
++
++ ioctl(fd, EVIOCGNAME(sizeof(name)), name);
++ printf("Input device name: \"%s\"\n", name);
++
++ memset(bit, 0, sizeof(bit));
++ ioctl(fd, EVIOCGBIT(0, EV_MAX), bit[0]);
++ printf("Supported events:\n");
++
++ for (i = 0; i < EV_MAX; i++)
++ if (test_bit(i, bit[0])) {
++ printf(" Event type %d (%s)\n", i, events[i] ? events[i] : "?");
++ ioctl(fd, EVIOCGBIT(i, KEY_MAX), bit[i]);
++ for (j = 0; j < KEY_MAX; j++)
++ if (test_bit(j, bit[i])) {
++ printf(" Event code %d (%s)\n", j, names[i] ? (names[i][j] ? names[i][j] : "?") : "?");
++ if (i == EV_ABS) {
++ ioctl(fd, EVIOCGABS(j), _abs);
++ for (k = 0; k < 5; k++)
++ if ((k < 3) || _abs[k])
++ printf(" %s %6d\n", absval[k], _abs[k]);
++ }
++ }
++ }
++
++
++ printf("Testing ... (interrupt to exit)\n");
++
++ while (1) {
++ rd = read(fd, ev, sizeof(struct input_event) * 64);
++
++ if (rd < (int) sizeof(struct input_event)) {
++ printf("yyy\n");
++ perror("\nevtest: error reading");
++ exit (1);
++ }
++
++ for (i = 0; i < rd / (int) sizeof(struct input_event); i++)
++ printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\n",
++ ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
++ events[ev[i].type] ? events[ev[i].type] : "?",
++ ev[i].code,
++ names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?",
++ ev[i].value);
++
++ }
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/hex_dump.c dvb-apps/test/hex_dump.c
+--- linuxtv-dvb-apps-1.1.1/test/hex_dump.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/hex_dump.c 2009-06-21 13:29:06.000000000 +0200
+@@ -60,4 +60,3 @@
+ }
+ printf("\n");
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbcfg/dvbcfg_test.c dvb-apps/test/libdvbcfg/dvbcfg_test.c
+--- linuxtv-dvb-apps-1.1.1/test/libdvbcfg/dvbcfg_test.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvbcfg/dvbcfg_test.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,100 @@
++/**
++ * dvbcfg testing.
++ *
++ * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License as
++ * published by the Free Software Foundation; either version 2.1 of
++ * the License, or (at your option) any later version.
++ *
++ * This 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 Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include <libdvbcfg/dvbcfg_zapchannel.h>
++
++void syntax(void);
++
++struct dvbcfg_zapchannel *channels = NULL;
++int zapcount = 0;
++int zappos = 0;
++
++int zapload_callback(struct dvbcfg_zapchannel *channel, void *private);
++int zapsave_callback(struct dvbcfg_zapchannel *channel, void *private);
++
++int main(int argc, char *argv[])
++{
++ if (argc != 4) {
++ syntax();
++ }
++
++ if (!strcmp(argv[1], "-zapchannel")) {
++
++ FILE *f = fopen(argv[2], "r");
++ if (!f) {
++ fprintf(stderr, "Unable to load %s\n", argv[2]);
++ exit(1);
++ }
++ dvbcfg_zapchannel_parse(f, zapload_callback, NULL);
++ fclose(f);
++
++ f = fopen(argv[3], "w");
++ if (!f) {
++ fprintf(stderr, "Unable to write %s\n", argv[3]);
++ exit(1);
++ }
++ dvbcfg_zapchannel_save(f, zapsave_callback, NULL);
++ fclose(f);
++
++ } else {
++ syntax();
++ }
++
++ exit(0);
++}
++
++int zapload_callback(struct dvbcfg_zapchannel *channel, void *private)
++{
++ (void) private;
++
++ struct dvbcfg_zapchannel *tmp = realloc(channels, (zapcount+1) * sizeof(struct dvbcfg_zapchannel));
++ if (tmp == NULL) {
++ fprintf(stderr, "Out of memory\n");
++ exit(1);
++ }
++ channels = tmp;
++
++ memcpy(&channels[zapcount++], channel, sizeof(struct dvbcfg_zapchannel));
++
++ return 0;
++}
++
++int zapsave_callback(struct dvbcfg_zapchannel *channel, void *private)
++{
++ (void) private;
++
++ if (zappos >= zapcount)
++ return 1;
++
++ memcpy(channel, channels + zappos, sizeof(struct dvbcfg_zapchannel));
++ zappos++;
++
++ return 0;
++}
++
++void syntax()
++{
++ fprintf(stderr,
++ "Syntax: dvbcfg_test <-zapchannel> <input filename> <output filename>\n");
++ exit(1);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbcfg/Makefile dvb-apps/test/libdvbcfg/Makefile
+--- linuxtv-dvb-apps-1.1.1/test/libdvbcfg/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvbcfg/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Makefile for linuxtv.org dvb-apps/test/libdvbcfg
++
++binaries = dvbcfg_test
++
++CPPFLAGS += -I../../lib
++LDLIBS += ../../lib/libdvbcfg/libdvbcfg.a
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbcfg/test_zapchannels.txt dvb-apps/test/libdvbcfg/test_zapchannels.txt
+--- linuxtv-dvb-apps-1.1.1/test/libdvbcfg/test_zapchannels.txt 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvbcfg/test_zapchannels.txt 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,446 @@
++# Most of the major channels in the Raleigh Durham Area. Frequencies the NTSC center freq.
++WRAL:707000000:8VSB:33:36
++WNCN:719000000:8VSB:49:52
++WTVD:701000000:8VSB:49:52
++WRAZ:683000000:8VSB:49:52
++WUNC:743000000:8VSB:49:52
++WRDU:551000000:8VSB:33:36
++WLFL:731000000:8VSB:33:36
++3sat:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:210:220
++ARD-Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1805
++CNBC:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:510:520
++DLF-Köln:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:810
++DLR-Berlin:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:710
++EinsExtra:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
++EinsFestival:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
++EinsMuXx:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
++EuroNews:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2221:2233
++Eurosport:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:410:420
++Fritz:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:901
++KiKa:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:310:320
++MDR FERNSEHEN:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:402
++MDR KULTUR:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:801
++MDR info:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1101
++MHP ARD Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:102
++NDR Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2401:2402
++ORB-Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
++RADIOmultikulti:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1301
++Radio 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:701
++SFB1:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
++SWR2:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1401
++SÃœDWEST BW:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:801:802
++SÃœDWEST RP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3101:3102
++WDR 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1501
++WDR 5:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1601
++ZDF:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:110:120
++ZDFdigitext:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++ZDFdokukanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:660:670
++ZDFinfokanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:610:620
++ZDFtheaterkanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++JUMP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1001
++SPUTNIK:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1201
++Österreich 1:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:169
++ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
++ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
++Adagio:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++All Jazz:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Avante:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:741:743
++B5 aktuell:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3101
++BBC Prime:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:761:762
++BData3:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++BData4:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++BData5:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++BR-alpha:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
++Barock Fantasie:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Bayerisches FS:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
++Bayern 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3601
++Bayern 4 Klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3001
++BibelTV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:731:732
++Bloomberg:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++CLASSICA:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
++COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:656
++Canal 24 Horas:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:991:992
++Club:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:711:713
++Cristal New Age:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++DANCE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:304
++DW-tv:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:634:632
++Das Erste:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
++Detskij Mir:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:931:932
++ERT-Sat:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:691:692
++Einstein TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
++Euronews:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:597:596
++Eurosport News:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:771:772
++Extreme Sports:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:791:793
++Extreme Sports:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Fashion TV:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:672
++Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:673
++GOLD:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:320
++HITLISTE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:784
++HR XXL:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3501
++JAZZ:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:640
++Jazz legends:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Kabel Wizard:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Kanal 7:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Kanal 7:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:49:52
++Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
++Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
++LATIN:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:368
++Landscape:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Leitseite:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2254:0
++Liberty TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:721:723
++MTV Base:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:781:782
++MV-Test:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Modem-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Movie Sounds:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Musica Antica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Musica Camerata:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++NDR Info:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3701
++NTV international:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++NTVI:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:611:612
++Nashe Kino:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:621:622
++NordwestRadio:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3801
++OLD GOLD:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:336
++Opernfestival:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PCNE:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:681:682
++PREMIERE SPORT INTERACTIVE:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PREMIERE DIREKT 1:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PREMIERE DIREKT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PREMIERE DIREKT 3:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PREMIERE DIREKT 4:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2815:2816
++PREMIERE EROTIK:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
++PREMIERE NOSTALGIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
++PREMIERE SERIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
++PREMIERE SPORT 1:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:258
++PREMIERE SPORT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
++PREMIERE START:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
++Parlamentsfernsehen:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:33:36
++Phoenix:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:901:902
++Portal:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++RTP Internacional:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:661:662
++Rai 1:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:951:952
++Rai 2:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:961:962
++Rai 3:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:971:972
++SCHLAGER:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
++SR 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3901
++SR Fernsehen Suedwest:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
++Show TV:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:911:912
++Sinfonica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++TGRT:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:921:922
++TM V1.0:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++TV Polonia:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:641:642
++TVEi:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:981:982
++TW1:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:751:752
++Test-R:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
++Travel:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:595:594
++VCR-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++VH1 Classic:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:604:603
++Videotext:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++WDR FERNSEHEN:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
++ZEE TV:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++arte:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:403
++hessen fernsehen:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
++hr-chronos:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3201
++hr-klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3401
++hr2:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3301
++13 TH STREET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
++ALTERNATIVE ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:544
++BEATE-UHSE.TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
++CHILLOUT:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:400
++CLASSIC ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
++DISCOVERY CHANNEL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
++DISNEY CHANNEL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
++DEUTSCHE HITS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:800
++EASY LISTENING:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:608
++Einstein:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++FILM & MUSICAL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
++FOX KIDS:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
++GOLDSTAR TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
++HARD ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:816
++HEIMATKANAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
++HIP HOP/R&B:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:576
++JUNIOR:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
++K-TOON:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++KLASSIK POPULÄR:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:624
++KRIMI &CO:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
++LOVE SONGS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
++NEW COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
++ORCHESTRALE WERKE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:560
++PLANET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
++PREMIERE 1:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:511:512
++PREMIERE 2:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1793
++PREMIERE 3:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
++PREMIERE 4:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
++PREMIERE 5:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
++PREMIERE 6:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
++PREMIERE 7:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
++SOUL CLASSICS:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
++STUDIO UNIVERSAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2047:2048
++Sonnenklar TV:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Das Erste:11837:h:0:27500:101:102:28106
++ZDF:11954:h:0:27500:110:120:28006
++3sat:11954:h:0:27500:210:220:28007
++EinsMuXx:12110:h:0:27500:301:302:28203
++EinsFestival:12110:h:0:27500:201:202:28202
++EinsExtra:12110:h:0:27500:101:102:28201
++MDR FERNSEHEN:12110:h:0:27500:401:402:28204
++ORB-Fernsehen:12110:h:0:27500:501:502:28205
++B1 Berlin:12110:h:0:27500:601:602:28206
++SWR Fernsehen:11837:h:0:27500:801:802:28113
++SR Fernsehen Suedwes:11837:h:0:27500:501:502:28110
++hessen fernsehen:11837:h:0:27500:301:302:28108
++WDR FERNSEHEN:11837:h:0:27500:601:602:28111
++Bayerisches FS:11837:h:0:27500:201:202:28107
++N3:12110:h:0:27500:2401:2402:28224
++BR-alpha:11837:h:0:27500:701:702:28112
++KiKa:11954:h:0:27500:310:320:28008
++arte:11836:h:0:27500:401:402:28109
++ZDF Theaterkanal:11954:h:0:27500:1110:1120:28016
++ZDF.info:11954:h:0:27500:610:620:28011
++ZDF.doku:11954:h:0:27500:660:670:28014
++Phoenix:11837:h:0:27500:901:902:28114
++DW-tv:10786:v:0:21997:305:306:9005
++RTL Television:12188:h:0:27500:163:104:12003
++SAT.1:12480:v:0:27500:1791:1792:46
++ProSieben:12480:v:0:27500:255:256:898
++RTL2:12188:h:0:27500:166:128:12020
++Super RTL:12188:h:0:27500:165:120:12040
++KABEL1:12480:v:0:27500:511:512:899
++VOX:12188:h:0:27500:167:136:12060
++tm3:12480:v:0:27500:767:768:897
++Bloomberg TV Germany:12552:v:0:22000:162:99:12160
++EuroNews:11954:h:0:27500:2221:2233:28015
++N24:12480:v:0:27500:2047:2048:47
++n-tv:12670:v:0:22000:162:96:12730
++DSF:12480:v:0:27500:1023:1024:900
++Eurosport:11954:h:0:27500:410:420:28009
++Via 1 - Sch ner Re:12148:h:0:27500:511:512:44
++Home Order Tel:12480:v:0:27500:1279:1280:40
++QVC GERMANY:12552:v:0:22000:165:166:12100
++TW 1:12692:h:0:22000:166:167:13013
++Canal Canarias:12441:v:0:27500:513:681:29700
++ProSieben A:12051:v:0:27500:161:84:20002
++ProSieben CH:12051:v:0:27500:289:290:20001
++Kabel 1 Austria:12051:v:0:27500:166:167:20004
++Kabel 1 Schweiz:12051:v:0:27500:162:163:20003
++CNN Int.:12168:v:0:27500:165:100:28512
++Sky News:12552:v:0:22000:305:306:3995
++Travel:12168:v:0:27500:163:92:28001
++AB SAT / XXL:12266:h:0:27500:164:96:17004
++MOTEURS:12266:h:0:27500:160:80:17000
++HOT GM:12148:h:0:27500:767:768:45
++KTO:12129:v:0:27500:170:120:8411
++LA CINQUIEME:12207:v:0:27500:160:80:8501
++LCP:12207:v:0:27500:165:100:8506
++LibertyTV.com:12611:v:0:22000:941:942:12280
++TV5 Europe:12611:v:0:22000:45:46:12240
++Motors TV:12611:v:0:22000:191:194:12300
++Wishline:12611:v:0:22000:214:216:12320
++TV 5:10786:v:0:21997:164:112:9001
++RTM - MAROC:10786:v:0:21997:162:96:9002
++ESC1 - EGYPTE:10786:v:0:21997:163:104:9003
++RAI 1:10786:v:0:21997:289:290:9004
++RTPI:10786:v:0:21997:300:301:9006
++TV7:10786:v:0:21997:166:128:9007
++ARTE:10786:v:0:21997:167:136:9009
++Colourbars:12611:v:0:22000:48:49:3982
++Alice:12611:v:0:22000:162:96:12200
++Video Italia:12611:v:0:22000:121:122:12220
++ANDALUCIA TV:11934:v:0:27500:166:104:29011
++TVC INT.:12441:v:0:27500:512:660:29701
++TV4:11992:h:0:27500:165:98:20365
++TV Niepokalanow:11876:h:0:27500:161:82:20601
++VIVA:12670:v:0:22000:309:310:12732
++VIVA ZWEI:12552:v:0:22000:171:172:12120
++MTV Central:12699:v:0:22000:3031:3032:28643
++ONYX:12692:h:1:27500:161:84:502
++VIVA polska:11603:h:1:27500:190:191:611
++DeeJay TV:11603:h:1:27500:160:161:602
++NBC:11053:h:1:27500:550:551:8008
++EWTN:10722:h:1:29900:1001:1201:4601
++MTA INTL:10722:h:1:29900:1004:1204:4604
++VOX:11053:h:1:27500:500:501:8002
++SAT.1 A:11053:h:1:27500:511:512:8003
++RTL2 AUSTRIA:11053:h:1:27500:520:521:8004
++ZDF:11053:h:1:27500:570:571:8011
++K-TV:11053:h:1:27500:580:581:8012
++RTL Television:11053:h:1:27500:160:80:8001
++ARTE:11059:v:1:6510:98:99:1
++HOT Italia:11095:h:1:27500:4194:4195:3714
++Olisat:11095:h:1:27500:33:34:3718
++VIVA-POLSKA:11128:h:1:4340:98:99:1
++DW-tv:11195:v:1:9099:101:102:5301
++Canal 24 Horas:11203:h:1:3999:4130:4131:5301
++TV5:11337:v:1:5631:512:640:1
++SAT.1 CH:11603:h:1:27500:101:102:601
++KurdSat:11603:h:1:27500:111:112:603
++ARD "Das Erste":11603:h:1:27500:172:173:606
++RTL 2 CH:11603:h:1:27500:175:176:609
++Super RTL A:11603:h:1:27500:180:181:610
++TV ROMANIA:11622:v:1:27500:227:247:10707
++MRTV:11622:v:1:27500:222:242:10702
++102.5 HIT Ch:11622:v:1:27500:224:244:10704
++TLC SAT:11622:v:1:27500:225:245:10705
++PRO-SAT:11622:v:1:27500:246:226:10706
++Channel SUN:11622:v:1:27500:229:249:10709
++Racing Channel:11622:v:1:27500:228:248:10708
++3 ABN:11622:v:1:27500:221:241:10701
++Bloom.Germany:11642:h:1:27500:1460:1420:4
++Bloomberg TV UK:11642:h:1:27500:1560:1520:4
++Sat 7:11642:h:1:27500:1660:1620:4
++EDTV 1:11746:h:1:27500:4130:4131:9501
++EDTV SPORT:11746:h:1:27500:4386:4387:9502
++EDTV BUSINESS:11746:h:1:27500:4642:4643:9503
++EDTV DRAMA:11746:h:1:27500:4898:4899:9504
++RAI1:11765:v:1:27499:160:80:3401
++RAI2:11765:v:1:27499:161:84:3402
++RAI3:11765:v:1:27499:162:88:3403
++RaiWayTEST2:11765:v:1:27499:516:654:3405
++RAIMOSAICO:11765:v:1:27499:518:8191:3407
++RAINews24:11803:v:1:27500:516:654:3301
++CAMERA DEPUTATI:11803:v:1:27500:517:655:3302
++TELEPACE:11803:v:1:27500:515:653:3304
++RAISPORTSAT:11803:v:1:27500:512:650:3305
++RAINettunoSAT2:11803:v:1:27500:513:651:3306
++RAIeducational:11803:v:1:27500:514:652:3307
++RAINettunoSAT1:11803:v:1:27500:519:657:3308
++SAT2000:11803:v:1:27500:518:656:3309
++I1:11918:v:1:27499:512:650:1
++C5:11918:v:1:27499:513:660:2
++R4:11918:v:1:27499:514:670:3
++Telesierra:12091:h:1:27500:4160:4161:8704
++C. Milagro:12091:h:1:27500:4368:4369:8711
++Italia Sat:12091:h:1:27500:4600:4601:8728
++TVE Internacional:12091:h:1:27500:4208:4209:8707
++Fiesta:12091:h:1:27500:4432:4433:8720
++Retelsat:12091:h:1:27500:4464:4465:8722
++ART EUROPE:12013:h:1:27495:164:96:450
++EGYPT SAT. CH. 2:12013:h:1:27495:166:104:470
++IQRA:12013:h:1:27495:168:112:474
++MAURITANIA TV:12110:v:1:27500:230:231:704
++ARMENIA TV:12110:v:1:27500:240:241:705
++SAILING CHANNEL:12110:v:1:27500:260:261:707
++AL JAZEERA:12110:v:1:27500:270:271:708
++Coming Soon TV:12110:v:1:27500:310:311:717
++SaluteBenessere:12110:v:1:27500:320:321:718
++AH-EDP1:12148:v:1:27499:96:97:7201
++AH-EDP2:12148:v:1:27499:112:113:7202
++Espresso:12148:v:1:27499:192:193:7203
++Alice:12148:v:1:27499:160:161:7220
++Nuvolari:12148:v:1:27499:176:177:7221
++Leonardo:12148:v:1:27499:128:129:7222
++AH-EDP3:12148:v:1:27499:36:37:7205
++OTE Promo:12187:v:1:27500:517:655:1001
++RTS SAT:12187:v:1:27500:519:657:1022
++ERT SAT:12187:v:1:27500:514:652:1102
++EXTRA:12187:v:1:27500:516:654:1106
++TRIAL:12187:v:1:27500:513:651:1108
++Minimax:11303:h:1:19540:300:301:3
++TVN1:12209:h:1:5631:4194:4195:1
++RR TEST:10978:v:1:8998:33:34:1
++TV 5 Thailand:10978:v:1:8998:1057:1058:2
++TEST-1:10978:v:1:8998:3105:3106:4
++FASHION:12244:h:1:27500:123:133:103
++AJARA TV:12244:h:1:27500:127:137:107
++SLO-TV1:12300:v:1:27495:200:201:3201
++POLONIA 1:12302:v:1:27500:205:206:3203
++SUPER 1:12302:v:1:27500:207:208:3207
++NAPOLI INT.:12302:v:1:27500:240:241:3210
++MAGIC:12302:v:1:27500:245:246:3211
++COUNTDOWN:12302:v:1:27500:235:236:3212
++TBNE:12302:v:1:27500:230:231:3213
++NAPOLI CHANNEL:12302:v:1:27500:227:228:3215
++KURDISTAN TV:12302:v:1:27500:225:226:3214
++ATLAS TV:12379:v:1:27500:3022:3032:3002
++TELE 24 SWITZERLAND:12379:v:1:27500:3023:3033:3003
++Abu Dhabi TV:12379:v:1:27500:3024:3034:3004
++RTV MONTENEGRO:12379:v:1:27500:3026:3036:3006
++JAAM-E-JAM 1:12436:h:1:27500:160:80:1
++JAAM-E-JAM 2:12436:h:1:27500:161:82:2
++SAHAR:12436:h:1:27500:162:84:3
++SAHAR 2:12436:h:1:27500:163:86:4
++IRINN:12436:h:1:27500:164:88:5
++Musicmax:11303:h:1:19540:500:501:6
++TEST:12474:h:1:27500:771:8191:10608
++EbS:12474:h:1:27500:101:201:10601
++MOU.2:12474:h:1:27500:42:43:10602
++PINK PLUS:12474:h:1:27500:308:256:10605
++LibertyTV.com:12474:h:1:27500:941:942:10603
++2M Maroc:12474:h:1:27500:601:602:10607
++ZEE TV:12474:h:1:27500:910:911:10604
++WorldNet Europe:12483:v:1:8299:4260:4220:1
++WorldNet:12483:v:1:8299:4560:4520:4
++SICILIA INTERNATIONA:12519:v:1:27499:501:502:8309
++SARDEGNA UNO:12519:v:1:27499:503:504:8310
++EuroMed:12519:v:1:27499:510:511:8312
++TGRT:12519:v:1:27499:505:506:8313
++VIDEOLINA:12519:v:1:27499:515:516:8318
++MEDIOLANUM:12538:h:1:27500:1131:1132:8987
++www.travel:12538:h:1:27500:1180:1183:8992
++MonteCarloSat:12538:h:1:27500:5126:5122:8877
++Bulgaria TV:12538:h:1:27500:4612:4613:8827
++TVN1:12571:h:1:5631:4194:4195:1
++JSTV 1:12595:v:1:27500:2000:2001:8213
++JSTV 2:12595:v:1:27500:2011:2013:8214
++MBC:12595:v:1:27500:160:80:8201
++ANN:12595:v:1:27500:161:84:8202
++BET:12595:v:1:27500:167:108:8208
++EuroNews:12595:v:1:27500:2221:2231:8211
++Sharjah Arabs:12653:h:1:27500:1160:1120:1
++Qatar Arabs:12653:h:1:27500:1260:1220:2
++Saudi 1 Arabs:12653:h:1:27500:1360:1320:3
++Kuwait Arabs:12653:h:1:27500:1460:1420:4
++Libya Arabs:12653:h:1:27500:1560:1520:5
++Sudan Arabs:12653:h:1:27500:1660:1620:6
++Oman Arabs:12653:h:1:27500:1760:1720:7
++Jordan Arabs:12653:h:1:27500:1860:1820:8
++IRAQ TV:12653:h:1:27500:1960:1920:9
++Dubai Sport:12653:h:1:27500:1060:1020:10
++Digitaly:12672:v:1:27500:220:221:4203
++Telemarket:12672:v:1:27500:350:351:4211
++eVision:12672:v:1:27500:360:361:4214
++Thai TV5:12672:v:1:27500:200:201:4201
++Studio Europa:12672:v:1:27500:230:231:4204
++Video Italia:12672:v:1:27500:340:341:4210
++GAME NETWORK:12672:v:1:27500:291:292:4213
++BBC-Choice:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
++BBC-Knowledge:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
++BBC-News24:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
++BBC-1:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
++BBC-Parliament:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
++BBC-2:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
++ITV-1:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
++ITV-2:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
++ITV-Sport:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2836:2837
++FilmFour:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
++C4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2826:2827
++E4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
++C5:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
++Shop:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
++ITVSelect-Info:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6065:6066
++ITVSelect-1:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6081:6082
++ITVSelect-2:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6097:6098
++ITVSelect-3:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6113:6114
++ITVSelect-4:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6129:6130
++Carlton-Cinema:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
++Sky-One:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
++Sky-Sports-1:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
++Sky-Premier:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1056:1057
++CartoonNetwork:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
++UK-Horizons:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
++ITV-Sport-Plus:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
++ITVSportSelect:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:2596
++BreezeMen&Mtrs:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
++Granada-Plus:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
++MTV:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1568:1569
++Sky-Movie-Max:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
++Sky-Sports-2:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
++UK-Gold:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
++Wellbeing:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1824:1825
++PLAY-uk:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
++UK-Style:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
++no-name:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
++Discovery:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
++Nick/Paramount:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
++Sky-Sports-3:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
++Brit-Eurosport:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvben50221/Makefile dvb-apps/test/libdvben50221/Makefile
+--- linuxtv-dvb-apps-1.1.1/test/libdvben50221/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvben50221/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,14 @@
++# Makefile for linuxtv.org dvb-apps/test/libdvben50221
++
++binaries = test-app \
++ test-session \
++ test-transport
++
++CPPFLAGS += -I../../lib
++LDLIBS += ../../lib/libdvbapi/libdvbapi.a ../../lib/libdvben50221/libdvben50221.a ../../lib/libucsi/libucsi.a -lpthread
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-app.c dvb-apps/test/libdvben50221/test-app.c
+--- linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-app.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvben50221/test-app.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,854 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com)
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <ctype.h>
++#include <unistd.h>
++#include <libdvben50221/en50221_session.h>
++#include <libdvben50221/en50221_app_utils.h>
++#include <libdvben50221/en50221_app_ai.h>
++#include <libdvben50221/en50221_app_auth.h>
++#include <libdvben50221/en50221_app_ca.h>
++#include <libdvben50221/en50221_app_datetime.h>
++#include <libdvben50221/en50221_app_dvb.h>
++#include <libdvben50221/en50221_app_epg.h>
++#include <libdvben50221/en50221_app_lowspeed.h>
++#include <libdvben50221/en50221_app_mmi.h>
++#include <libdvben50221/en50221_app_rm.h>
++#include <libdvben50221/en50221_app_smartcard.h>
++#include <libdvben50221/en50221_app_teletext.h>
++#include <libdvbapi/dvbca.h>
++#include <pthread.h>
++#include <libdvbcfg/dvbcfg_zapchannel.h>
++#include <libdvbapi/dvbdemux.h>
++#include <libucsi/section.h>
++#include <libucsi/mpeg/section.h>
++
++#define DEFAULT_SLOT 0
++
++#define MAX_SESSIONS 256
++#define MAX_TC 32
++
++void *stackthread_func(void* arg);
++void *pmtthread_func(void* arg);
++int test_lookup_callback(void *arg, uint8_t slot_id, uint32_t requested_resource_id,
++ en50221_sl_resource_callback *callback_out, void **arg_out, uint32_t *connected_resource_id);
++int test_session_callback(void *arg, int reason, uint8_t slot_id, uint16_t session_number, uint32_t resource_id);
++
++int test_datetime_enquiry_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t response_interval);
++
++int test_rm_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number);
++int test_rm_reply_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t resource_id_count, uint32_t *resource_ids);
++int test_rm_changed_callback(void *arg, uint8_t slot_id, uint16_t session_number);
++
++int test_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t application_type, uint16_t application_manufacturer,
++ uint16_t manufacturer_code, uint8_t menu_string_length,
++ uint8_t *menu_string);
++
++int test_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids);
++int test_ca_pmt_reply_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ struct en50221_app_pmt_reply *reply, uint32_t reply_size);
++
++int test_mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t cmd_id, uint8_t delay);
++
++int test_mmi_display_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t cmd_id, uint8_t mmi_mode);
++
++int test_mmi_keypad_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t cmd_id, uint8_t *key_codes, uint32_t key_codes_count);
++
++int test_mmi_subtitle_segment_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t *segment, uint32_t segment_size);
++
++int test_mmi_scene_end_mark_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t decoder_continue_flag, uint8_t scene_reveal_flag,
++ uint8_t send_scene_done, uint8_t scene_tag);
++
++int test_mmi_scene_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t decoder_continue_flag, uint8_t scene_reveal_flag,
++ uint8_t scene_tag);
++
++int test_mmi_subtitle_download_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t *segment, uint32_t segment_size);
++
++int test_mmi_flush_download_callback(void *arg, uint8_t slot_id, uint16_t session_number);
++
++int test_mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t blind_answer, uint8_t expected_answer_length,
++ uint8_t *text, uint32_t text_size);
++
++int test_mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ struct en50221_app_mmi_text *title,
++ struct en50221_app_mmi_text *sub_title,
++ struct en50221_app_mmi_text *bottom,
++ uint32_t item_count, struct en50221_app_mmi_text *items,
++ uint32_t item_raw_length, uint8_t *items_raw);
++
++int test_app_mmi_list_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ struct en50221_app_mmi_text *title,
++ struct en50221_app_mmi_text *sub_title,
++ struct en50221_app_mmi_text *bottom,
++ uint32_t item_count, struct en50221_app_mmi_text *items,
++ uint32_t item_raw_length, uint8_t *items_raw);
++
++struct section_ext *read_section_ext(char *buf, int buflen, int adapter, int demux, int pid, int table_id);
++
++
++
++
++
++
++
++int adapterid;
++
++int shutdown_stackthread = 0;
++int shutdown_pmtthread = 0;
++int in_menu = 0;
++int in_enq = 0;
++int ca_connected = 0;
++int pmt_pid = -1;
++int ca_session_number = 0;
++
++
++// instances of resources we actually implement here
++struct en50221_app_rm *rm_resource;
++struct en50221_app_datetime *datetime_resource;
++struct en50221_app_ai *ai_resource;
++struct en50221_app_ca *ca_resource;
++struct en50221_app_mmi *mmi_resource;
++
++// lookup table used in resource manager implementation
++struct resource {
++ struct en50221_app_public_resource_id resid;
++ uint32_t binary_resource_id;
++ en50221_sl_resource_callback callback;
++ void *arg;
++};
++struct resource resources[20];
++int resources_count = 0;
++
++// this contains all known resource ids so we can see if the cam asks for something exotic
++uint32_t resource_ids[] = { EN50221_APP_TELETEXT_RESOURCEID,
++ EN50221_APP_SMARTCARD_RESOURCEID(1),
++ EN50221_APP_RM_RESOURCEID,
++ EN50221_APP_MMI_RESOURCEID,
++ EN50221_APP_LOWSPEED_RESOURCEID(1,1),
++ EN50221_APP_EPG_RESOURCEID(1),
++ EN50221_APP_DVB_RESOURCEID,
++ EN50221_APP_CA_RESOURCEID,
++ EN50221_APP_DATETIME_RESOURCEID,
++ EN50221_APP_AUTH_RESOURCEID,
++ EN50221_APP_AI_RESOURCEID, };
++int resource_ids_count = sizeof(resource_ids)/4;
++
++
++uint16_t ai_session_numbers[5];
++
++uint16_t mmi_session_number;
++
++int main(int argc, char * argv[])
++{
++ pthread_t stackthread;
++ pthread_t pmtthread;
++ struct en50221_app_send_functions sendfuncs;
++
++ if ((argc < 2) || (argc > 3)) {
++ fprintf(stderr, "Syntax: test-app <adapterid> [<pmtpid>]\n");
++ exit(1);
++ }
++ adapterid = atoi(argv[1]);
++ if (argc == 3) {
++ if (sscanf(argv[2], "%i", &pmt_pid) != 1) {
++ fprintf(stderr, "Unable to parse PMT PID\n");
++ exit(1);
++ }
++ }
++
++ // create transport layer
++ struct en50221_transport_layer *tl = en50221_tl_create(5, 32);
++ if (tl == NULL) {
++ fprintf(stderr, "Failed to create transport layer\n");
++ exit(1);
++ }
++
++ // find CAMs
++ int cafd;
++ if (((cafd = dvbca_open(adapterid, 0)) < 0) || (dvbca_get_cam_state(cafd, DEFAULT_SLOT) == DVBCA_CAMSTATE_MISSING)) {
++ fprintf(stderr, "Unable to open CAM on adapter %i\n", adapterid);
++ exit(1);
++ }
++
++ // reset it and wait
++ dvbca_reset(cafd, DEFAULT_SLOT);
++ printf("Found a CAM on adapter%i... waiting...\n", adapterid);
++ while(dvbca_get_cam_state(cafd, DEFAULT_SLOT) != DVBCA_CAMSTATE_READY) {
++ usleep(1000);
++ }
++
++ // register it with the CA stack
++ int slot_id = 0;
++ if ((slot_id = en50221_tl_register_slot(tl, cafd, DEFAULT_SLOT, 1000, 100)) < 0) {
++ fprintf(stderr, "Slot registration failed\n");
++ exit(1);
++ }
++ printf("slotid: %i\n", slot_id);
++
++ // create session layer
++ struct en50221_session_layer *sl = en50221_sl_create(tl, 256);
++ if (sl == NULL) {
++ fprintf(stderr, "Failed to create session layer\n");
++ exit(1);
++ }
++
++ // create the sendfuncs
++ sendfuncs.arg = sl;
++ sendfuncs.send_data = (en50221_send_data) en50221_sl_send_data;
++ sendfuncs.send_datav = (en50221_send_datav) en50221_sl_send_datav;
++
++ // create the resource manager resource
++ rm_resource = en50221_app_rm_create(&sendfuncs);
++ en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_RM_RESOURCEID);
++ resources[resources_count].binary_resource_id = EN50221_APP_RM_RESOURCEID;
++ resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_rm_message;
++ resources[resources_count].arg = rm_resource;
++ en50221_app_rm_register_enq_callback(rm_resource, test_rm_enq_callback, NULL);
++ en50221_app_rm_register_reply_callback(rm_resource, test_rm_reply_callback, NULL);
++ en50221_app_rm_register_changed_callback(rm_resource, test_rm_changed_callback, NULL);
++ resources_count++;
++
++ // create the datetime resource
++ datetime_resource = en50221_app_datetime_create(&sendfuncs);
++ en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_DATETIME_RESOURCEID);
++ resources[resources_count].binary_resource_id = EN50221_APP_DATETIME_RESOURCEID;
++ resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_datetime_message;
++ resources[resources_count].arg = datetime_resource;
++ en50221_app_datetime_register_enquiry_callback(datetime_resource, test_datetime_enquiry_callback, NULL);
++ resources_count++;
++
++ // create the application information resource
++ ai_resource = en50221_app_ai_create(&sendfuncs);
++ en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_AI_RESOURCEID);
++ resources[resources_count].binary_resource_id = EN50221_APP_AI_RESOURCEID;
++ resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_ai_message;
++ resources[resources_count].arg = ai_resource;
++ en50221_app_ai_register_callback(ai_resource, test_ai_callback, NULL);
++ resources_count++;
++
++ // create the CA resource
++ ca_resource = en50221_app_ca_create(&sendfuncs);
++ en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_CA_RESOURCEID);
++ resources[resources_count].binary_resource_id = EN50221_APP_CA_RESOURCEID;
++ resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_ca_message;
++ resources[resources_count].arg = ca_resource;
++ en50221_app_ca_register_info_callback(ca_resource, test_ca_info_callback, NULL);
++ en50221_app_ca_register_pmt_reply_callback(ca_resource, test_ca_pmt_reply_callback, NULL);
++ resources_count++;
++
++ // create the MMI resource
++ mmi_resource = en50221_app_mmi_create(&sendfuncs);
++ en50221_app_decode_public_resource_id(&resources[resources_count].resid, EN50221_APP_MMI_RESOURCEID);
++ resources[resources_count].binary_resource_id = EN50221_APP_MMI_RESOURCEID;
++ resources[resources_count].callback = (en50221_sl_resource_callback) en50221_app_mmi_message;
++ resources[resources_count].arg = mmi_resource;
++ en50221_app_mmi_register_close_callback(mmi_resource, test_mmi_close_callback, NULL);
++ en50221_app_mmi_register_display_control_callback(mmi_resource, test_mmi_display_control_callback, NULL);
++ en50221_app_mmi_register_keypad_control_callback(mmi_resource, test_mmi_keypad_control_callback, NULL);
++ en50221_app_mmi_register_subtitle_segment_callback(mmi_resource, test_mmi_subtitle_segment_callback, NULL);
++ en50221_app_mmi_register_scene_end_mark_callback(mmi_resource, test_mmi_scene_end_mark_callback, NULL);
++ en50221_app_mmi_register_scene_control_callback(mmi_resource, test_mmi_scene_control_callback, NULL);
++ en50221_app_mmi_register_subtitle_download_callback(mmi_resource, test_mmi_subtitle_download_callback, NULL);
++ en50221_app_mmi_register_flush_download_callback(mmi_resource, test_mmi_flush_download_callback, NULL);
++ en50221_app_mmi_register_enq_callback(mmi_resource, test_mmi_enq_callback, NULL);
++ en50221_app_mmi_register_menu_callback(mmi_resource, test_mmi_menu_callback, NULL);
++ en50221_app_mmi_register_list_callback(mmi_resource, test_app_mmi_list_callback, NULL);
++ resources_count++;
++
++ // start another thread running the stack
++ pthread_create(&stackthread, NULL, stackthread_func, tl);
++
++ // start another thread parsing PMT
++ if (pmt_pid != -1) {
++ pthread_create(&pmtthread, NULL, pmtthread_func, tl);
++ }
++
++ // register callbacks
++ en50221_sl_register_lookup_callback(sl, test_lookup_callback, sl);
++ en50221_sl_register_session_callback(sl, test_session_callback, sl);
++
++ // create a new connection on each slot
++ int tc = en50221_tl_new_tc(tl, slot_id);
++ printf("tcid: %i\n", tc);
++
++ printf("Press a key to enter menu\n");
++ getchar();
++ en50221_app_ai_entermenu(ai_resource, ai_session_numbers[slot_id]);
++
++ // wait
++ char tmp[256];
++ while(1) {
++ fgets(tmp, sizeof(tmp), stdin);
++ int choice = atoi(tmp);
++
++ if (in_menu) {
++ en50221_app_mmi_menu_answ(mmi_resource, mmi_session_number, choice);
++ in_menu = 0;
++ }
++ if (in_enq) {
++ uint32_t i;
++ uint32_t len = strlen(tmp);
++ for(i=0; i< len; i++) {
++ if (!isdigit(tmp[i])) {
++ len = i;
++ break;
++ }
++ }
++ en50221_app_mmi_answ(mmi_resource, mmi_session_number, MMI_ANSW_ID_ANSWER, (uint8_t*) tmp, len);
++ in_enq = 0;
++ }
++ }
++ printf("Press a key to exit\n");
++ getchar();
++
++ // destroy slots
++ en50221_tl_destroy_slot(tl, slot_id);
++ shutdown_stackthread = 1;
++ shutdown_pmtthread = 1;
++ pthread_join(stackthread, NULL);
++ if (pmt_pid != -1) {
++ pthread_join(pmtthread, NULL);
++ }
++
++ // destroy session layer
++ en50221_sl_destroy(sl);
++
++ // destroy transport layer
++ en50221_tl_destroy(tl);
++
++ return 0;
++}
++
++int test_lookup_callback(void *arg, uint8_t slot_id, uint32_t requested_resource_id,
++ en50221_sl_resource_callback *callback_out, void **arg_out, uint32_t *connected_resource_id)
++{
++ struct en50221_app_public_resource_id resid;
++ (void)arg;
++
++ // decode the resource id
++ if (en50221_app_decode_public_resource_id(&resid, requested_resource_id)) {
++ printf("%02x:Public resource lookup callback %i %i %i\n", slot_id,
++ resid.resource_class, resid.resource_type, resid.resource_version);
++ } else {
++ printf("%02x:Private resource lookup callback %08x\n", slot_id, requested_resource_id);
++ return -1;
++ }
++
++ // FIXME: need better comparison
++ // FIXME: return resourceid we actually connected to
++
++ // try and find an instance of the resource
++ int i;
++ for(i=0; i<resources_count; i++) {
++ if ((resid.resource_class == resources[i].resid.resource_class) &&
++ (resid.resource_type == resources[i].resid.resource_type)) {
++ *callback_out = resources[i].callback;
++ *arg_out = resources[i].arg;
++ *connected_resource_id = resources[i].binary_resource_id;
++ return 0;
++ }
++ }
++
++ return -1;
++}
++
++int test_session_callback(void *arg, int reason, uint8_t slot_id, uint16_t session_number, uint32_t resource_id)
++{
++ (void)arg;
++ switch(reason) {
++ case S_SCALLBACK_REASON_CAMCONNECTING:
++ printf("%02x:CAM connecting to resource %08x, session_number %i\n",
++ slot_id, resource_id, session_number);
++ break;
++ case S_SCALLBACK_REASON_CAMCONNECTED:
++ printf("%02x:CAM successfully connected to resource %08x, session_number %i\n",
++ slot_id, resource_id, session_number);
++
++ if (resource_id == EN50221_APP_RM_RESOURCEID) {
++ en50221_app_rm_enq(rm_resource, session_number);
++ } else if (resource_id == EN50221_APP_AI_RESOURCEID) {
++ en50221_app_ai_enquiry(ai_resource, session_number);
++ } else if (resource_id == EN50221_APP_CA_RESOURCEID) {
++ en50221_app_ca_info_enq(ca_resource, session_number);
++ ca_session_number = session_number;
++ }
++
++ break;
++ case S_SCALLBACK_REASON_CAMCONNECTFAIL:
++ printf("%02x:CAM on failed to connect to resource %08x\n", slot_id, resource_id);
++ break;
++ case S_SCALLBACK_REASON_CONNECTED:
++ printf("%02x:Host connection to resource %08x connected successfully, session_number %i\n",
++ slot_id, resource_id, session_number);
++ break;
++ case S_SCALLBACK_REASON_CONNECTFAIL:
++ printf("%02x:Host connection to resource %08x failed, session_number %i\n",
++ slot_id, resource_id, session_number);
++ break;
++ case S_SCALLBACK_REASON_CLOSE:
++ printf("%02x:Connection to resource %08x, session_number %i closed\n",
++ slot_id, resource_id, session_number);
++ break;
++ case S_SCALLBACK_REASON_TC_CONNECT:
++ printf("%02x:Host originated transport connection %i connected\n", slot_id, session_number);
++ break;
++ case S_SCALLBACK_REASON_TC_CAMCONNECT:
++ printf("%02x:CAM originated transport connection %i connected\n", slot_id, session_number);
++ break;
++ }
++ return 0;
++}
++
++
++
++int test_rm_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number)
++{
++ (void)arg;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ if (en50221_app_rm_reply(rm_resource, session_number, resource_ids_count, resource_ids)) {
++ printf("%02x:Failed to send reply to ENQ\n", slot_id);
++ }
++
++ return 0;
++}
++
++int test_rm_reply_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t resource_id_count, uint32_t *_resource_ids)
++{
++ (void)arg;
++ printf("%02x:%s\n", slot_id, __func__);
++
++ uint32_t i;
++ for(i=0; i< resource_id_count; i++) {
++ printf(" CAM provided resource id: %08x\n", _resource_ids[i]);
++ }
++
++ if (en50221_app_rm_changed(rm_resource, session_number)) {
++ printf("%02x:Failed to send REPLY\n", slot_id);
++ }
++
++ return 0;
++}
++
++int test_rm_changed_callback(void *arg, uint8_t slot_id, uint16_t session_number)
++{
++ (void)arg;
++ printf("%02x:%s\n", slot_id, __func__);
++
++ if (en50221_app_rm_enq(rm_resource, session_number)) {
++ printf("%02x:Failed to send ENQ\n", slot_id);
++ }
++
++ return 0;
++}
++
++
++
++int test_datetime_enquiry_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t response_interval)
++{
++ (void)arg;
++ printf("%02x:%s\n", slot_id, __func__);
++ printf(" response_interval:%i\n", response_interval);
++
++ if (en50221_app_datetime_send(datetime_resource, session_number, time(NULL), -1)) {
++ printf("%02x:Failed to send datetime\n", slot_id);
++ }
++
++ return 0;
++}
++
++
++
++int test_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t application_type, uint16_t application_manufacturer,
++ uint16_t manufacturer_code, uint8_t menu_string_length,
++ uint8_t *menu_string)
++{
++ (void)arg;
++
++ printf("%02x:%s\n", slot_id, __func__);
++ printf(" Application type: %02x\n", application_type);
++ printf(" Application manufacturer: %04x\n", application_manufacturer);
++ printf(" Manufacturer code: %04x\n", manufacturer_code);
++ printf(" Menu string: %.*s\n", menu_string_length, menu_string);
++
++ ai_session_numbers[slot_id] = session_number;
++
++ return 0;
++}
++
++
++
++int test_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids)
++{
++ (void)arg;
++ (void)session_number;
++
++ printf("%02x:%s\n", slot_id, __func__);
++ uint32_t i;
++ for(i=0; i< ca_id_count; i++) {
++ printf(" Supported CA ID: %04x\n", ca_ids[i]);
++ }
++
++ ca_connected = 1;
++ return 0;
++}
++
++int test_ca_pmt_reply_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ struct en50221_app_pmt_reply *reply, uint32_t reply_size)
++{
++ (void)arg;
++ (void)session_number;
++ (void)reply;
++ (void)reply_size;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ return 0;
++}
++
++
++int test_mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint8_t cmd_id, uint8_t delay)
++{
++ (void)arg;
++ (void)session_number;
++
++ printf("%02x:%s\n", slot_id, __func__);
++ printf(" cmd_id: %02x\n", cmd_id);
++ printf(" delay: %02x\n", delay);
++
++ return 0;
++}
++
++int test_mmi_display_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t cmd_id, uint8_t mmi_mode)
++{
++ (void)arg;
++ (void)session_number;
++
++ printf("%02x:%s\n", slot_id, __func__);
++ printf(" cmd_id: %02x\n", cmd_id);
++ printf(" mode: %02x\n", mmi_mode);
++
++ if (cmd_id == MMI_DISPLAY_CONTROL_CMD_ID_SET_MMI_MODE) {
++ struct en50221_app_mmi_display_reply_details details;
++
++ details.u.mode_ack.mmi_mode = mmi_mode;
++ if (en50221_app_mmi_display_reply(mmi_resource, session_number, MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK, &details)) {
++ printf("%02x:Failed to send mode ack\n", slot_id);
++ }
++ }
++
++ return 0;
++}
++
++int test_mmi_keypad_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t cmd_id, uint8_t *key_codes, uint32_t key_codes_count)
++{
++ (void)arg;
++ (void)session_number;
++ (void)cmd_id;
++ (void)key_codes;
++ (void)key_codes_count;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ return 0;
++}
++
++int test_mmi_subtitle_segment_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t *segment, uint32_t segment_size)
++{
++ (void)arg;
++ (void)session_number;
++ (void)segment;
++ (void)segment_size;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ return 0;
++}
++
++int test_mmi_scene_end_mark_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t decoder_continue_flag, uint8_t scene_reveal_flag,
++ uint8_t send_scene_done, uint8_t scene_tag)
++{
++ (void)arg;
++ (void)session_number;
++ (void)decoder_continue_flag;
++ (void)scene_reveal_flag;
++ (void)send_scene_done;
++ (void)scene_tag;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ return 0;
++}
++
++int test_mmi_scene_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t decoder_continue_flag, uint8_t scene_reveal_flag,
++ uint8_t scene_tag)
++{
++ (void)arg;
++ (void)session_number;
++ (void)decoder_continue_flag;
++ (void)scene_reveal_flag;
++ (void)scene_tag;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ return 0;
++}
++
++int test_mmi_subtitle_download_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t *segment, uint32_t segment_size)
++{
++ (void)arg;
++ (void)session_number;
++ (void)segment;
++ (void)segment_size;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ return 0;
++}
++
++int test_mmi_flush_download_callback(void *arg, uint8_t slot_id, uint16_t session_number)
++{
++ (void)arg;
++ (void)session_number;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ return 0;
++}
++
++int test_mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t blind_answer, uint8_t expected_answer_length,
++ uint8_t *text, uint32_t text_size)
++{
++ (void)arg;
++ (void)text;
++ (void)text_size;
++
++ printf("%02x:%s\n", slot_id, __func__);
++ printf(" blind: %i\n", blind_answer);
++ printf(" expected_answer_length: %i\n", expected_answer_length);
++
++ mmi_session_number = session_number;
++ in_enq = 1;
++
++ return 0;
++}
++
++int test_mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ struct en50221_app_mmi_text *title,
++ struct en50221_app_mmi_text *sub_title,
++ struct en50221_app_mmi_text *bottom,
++ uint32_t item_count, struct en50221_app_mmi_text *items,
++ uint32_t item_raw_length, uint8_t *items_raw)
++{
++ (void)arg;
++ (void)items_raw;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ printf(" title: %.*s\n", title->text_length, title->text);
++ printf(" sub_title: %.*s\n", sub_title->text_length, sub_title->text);
++ printf(" bottom: %.*s\n", bottom->text_length, bottom->text);
++
++ uint32_t i;
++ for(i=0; i< item_count; i++) {
++ printf(" item %i: %.*s\n", i+1, items[i].text_length, items[i].text);
++ }
++ printf(" raw_length: %i\n", item_raw_length);
++
++ mmi_session_number = session_number;
++ in_menu = 1;
++
++ return 0;
++}
++
++int test_app_mmi_list_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ struct en50221_app_mmi_text *title,
++ struct en50221_app_mmi_text *sub_title,
++ struct en50221_app_mmi_text *bottom,
++ uint32_t item_count, struct en50221_app_mmi_text *items,
++ uint32_t item_raw_length, uint8_t *items_raw)
++{
++ (void)arg;
++ (void)items_raw;
++ (void)arg;
++
++ printf("%02x:%s\n", slot_id, __func__);
++
++ printf(" title: %.*s\n", title->text_length, title->text);
++ printf(" sub_title: %.*s\n", sub_title->text_length, sub_title->text);
++ printf(" bottom: %.*s\n", bottom->text_length, bottom->text);
++
++ uint32_t i;
++ for(i=0; i< item_count; i++) {
++ printf(" item %i: %.*s\n", i+1, items[i].text_length, items[i].text);
++ }
++ printf(" raw_length: %i\n", item_raw_length);
++
++ mmi_session_number = session_number;
++ in_menu = 1;
++
++ return 0;
++}
++
++
++
++
++
++
++
++void *stackthread_func(void* arg) {
++ struct en50221_transport_layer *tl = arg;
++ int lasterror = 0;
++
++ while(!shutdown_stackthread) {
++ int error;
++ if ((error = en50221_tl_poll(tl)) != 0) {
++ if (error != lasterror) {
++ fprintf(stderr, "Error reported by stack slot:%i error:%i\n",
++ en50221_tl_get_error_slot(tl),
++ en50221_tl_get_error(tl));
++ }
++ lasterror = error;
++ }
++ }
++
++ shutdown_stackthread = 0;
++ return 0;
++}
++
++void *pmtthread_func(void* arg) {
++ (void)arg;
++ char buf[4096];
++ uint8_t capmt[4096];
++ int pmtversion = -1;
++
++ while(!shutdown_pmtthread) {
++
++ if (!ca_connected) {
++ sleep(1);
++ continue;
++ }
++
++ // read the PMT
++ struct section_ext *section_ext = read_section_ext(buf, sizeof(buf), adapterid, 0, pmt_pid, stag_mpeg_program_map);
++ if (section_ext == NULL) {
++ fprintf(stderr, "Failed to read PMT\n");
++ exit(1);
++ }
++ struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(section_ext);
++ if (pmt == NULL) {
++ fprintf(stderr, "Bad PMT received\n");
++ exit(1);
++ }
++ if (pmt->head.version_number == pmtversion) {
++ continue;
++ }
++
++ // translate it into a CA PMT
++ int listmgmt = CA_LIST_MANAGEMENT_ONLY;
++ if (pmtversion != -1) {
++ listmgmt = CA_LIST_MANAGEMENT_UPDATE;
++ }
++ int size;
++ if ((size = en50221_ca_format_pmt(pmt,
++ capmt,
++ sizeof(capmt),
++ listmgmt,
++ 0,
++ CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
++ fprintf(stderr, "Failed to format CA PMT object\n");
++ exit(1);
++ }
++
++ // set it
++ if (en50221_app_ca_pmt(ca_resource, ca_session_number, capmt, size)) {
++ fprintf(stderr, "Failed to send CA PMT object\n");
++ exit(1);
++ }
++ pmtversion = pmt->head.version_number;
++ }
++ shutdown_pmtthread = 0;
++ return 0;
++}
++
++
++struct section_ext *read_section_ext(char *buf, int buflen, int adapter, int demux, int pid, int table_id)
++{
++ int demux_fd = -1;
++ uint8_t filter[18];
++ uint8_t mask[18];
++ int size;
++ struct section *section;
++ struct section_ext *result = NULL;
++
++ // open the demuxer
++ if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
++ goto exit;
++ }
++
++ // create a section filter
++ memset(filter, 0, sizeof(filter));
++ memset(mask, 0, sizeof(mask));
++ filter[0] = table_id;
++ mask[0] = 0xFF;
++ if (dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) {
++ goto exit;
++ }
++
++ // read the section
++ if ((size = read(demux_fd, buf, buflen)) < 0) {
++ goto exit;
++ }
++
++ // parse it as a section
++ section = section_codec((uint8_t*) buf, size);
++ if (section == NULL) {
++ goto exit;
++ }
++
++ // parse it as a section_ext
++ result = section_ext_decode(section, 0);
++
++exit:
++ if (demux_fd != -1)
++ close(demux_fd);
++ return result;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-session.c dvb-apps/test/libdvben50221/test-session.c
+--- linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-session.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvben50221/test-session.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,171 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com)
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <libdvben50221/en50221_session.h>
++#include <libdvben50221/en50221_app_utils.h>
++#include <libdvbapi/dvbca.h>
++#include <pthread.h>
++
++void *stackthread_func(void* arg);
++int test_lookup_callback(void *arg, uint8_t slot_id, uint32_t requested_resource_id,
++ en50221_sl_resource_callback *callback_out, void **arg_out, uint32_t *connected_resource_id);
++int test_session_callback(void *arg, int reason, uint8_t slot_id, uint16_t session_number, uint32_t resource_id);
++
++
++int shutdown_stackthread = 0;
++
++#define DEFAULT_SLOT 0
++
++int main(int argc, char * argv[])
++{
++ (void)argc;
++ (void)argv;
++
++ int i;
++ pthread_t stackthread;
++
++ // create transport layer
++ struct en50221_transport_layer *tl = en50221_tl_create(5, 32);
++ if (tl == NULL) {
++ fprintf(stderr, "Failed to create transport layer\n");
++ exit(1);
++ }
++
++ // find CAMs
++ int slot_count = 0;
++ int cafd= -1;
++ for(i=0; i<20; i++) {
++ if ((cafd = dvbca_open(i, 0)) > 0) {
++ if (dvbca_get_cam_state(cafd, DEFAULT_SLOT) == DVBCA_CAMSTATE_MISSING) {
++ close(cafd);
++ continue;
++ }
++
++ // reset it and wait
++ dvbca_reset(cafd, DEFAULT_SLOT);
++ printf("Found a CAM on adapter%i... waiting...\n", i);
++ while(dvbca_get_cam_state(cafd, DEFAULT_SLOT) != DVBCA_CAMSTATE_READY) {
++ usleep(1000);
++ }
++
++ // register it with the CA stack
++ int slot_id = 0;
++ if ((slot_id = en50221_tl_register_slot(tl, cafd, DEFAULT_SLOT, 1000, 100)) < 0) {
++ fprintf(stderr, "Slot registration failed\n");
++ exit(1);
++ }
++ printf("slotid: %i\n", slot_id);
++ slot_count++;
++ }
++ }
++
++ // create session layer
++ struct en50221_session_layer *sl = en50221_sl_create(tl, 256);
++ if (sl == NULL) {
++ fprintf(stderr, "Failed to create session layer\n");
++ exit(1);
++ }
++
++ // start another thread running the stack
++ pthread_create(&stackthread, NULL, stackthread_func, tl);
++
++ // register callbacks
++ en50221_sl_register_lookup_callback(sl, test_lookup_callback, sl);
++ en50221_sl_register_session_callback(sl, test_session_callback, sl);
++
++ // create a new connection
++ for(i=0; i<slot_count; i++) {
++ int tc = en50221_tl_new_tc(tl, i);
++ printf("tcid: %i\n", tc);
++ }
++
++ // wait
++ printf("Press a key to exit\n");
++ getchar();
++
++ // destroy slots
++ for(i=0; i<slot_count; i++) {
++ en50221_tl_destroy_slot(tl, i);
++ }
++ shutdown_stackthread = 1;
++ pthread_join(stackthread, NULL);
++
++ // destroy session layer
++ en50221_sl_destroy(sl);
++
++ // destroy transport layer
++ en50221_tl_destroy(tl);
++
++ return 0;
++}
++
++int test_lookup_callback(void *arg, uint8_t slot_id, uint32_t requested_resource_id,
++ en50221_sl_resource_callback *callback_out, void **arg_out, uint32_t *connected_resource_id)
++{
++ (void)arg;
++ (void)callback_out;
++ (void)arg_out;
++ (void)connected_resource_id;
++
++ struct en50221_app_public_resource_id resid;
++
++ if (en50221_app_decode_public_resource_id(&resid, requested_resource_id)) {
++ printf("Public resource lookup callback %i %i %i %i\n", slot_id,
++ resid.resource_class, resid.resource_type, resid.resource_version);
++ } else {
++ printf("Private resource lookup callback %i %08x\n", slot_id, requested_resource_id);
++ }
++
++ return -1;
++}
++
++int test_session_callback(void *arg, int reason, uint8_t slot_id, uint16_t session_number, uint32_t resource_id)
++{
++ (void)arg;
++
++ printf("Session callback %i %i %i %04x\n", slot_id, session_number, reason, resource_id);
++
++ return -1;
++}
++
++void *stackthread_func(void* arg) {
++ struct en50221_transport_layer *tl = arg;
++ int lasterror = 0;
++
++ while(!shutdown_stackthread) {
++ int error;
++ if ((error = en50221_tl_poll(tl)) != 0) {
++ if (error != lasterror) {
++ fprintf(stderr, "Error reported by stack slot:%i error:%i\n",
++ en50221_tl_get_error_slot(tl),
++ en50221_tl_get_error(tl));
++ }
++ lasterror = error;
++ }
++ }
++
++ shutdown_stackthread = 0;
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-transport.c dvb-apps/test/libdvben50221/test-transport.c
+--- linuxtv-dvb-apps-1.1.1/test/libdvben50221/test-transport.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvben50221/test-transport.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,144 @@
++/*
++ en50221 encoder An implementation for libdvb
++ an implementation for the en50221 transport layer
++
++ Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com)
++ Copyright (C) 2005 Julian Scheel (julian at jusst dot de)
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This library is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <libdvben50221/en50221_transport.h>
++#include <libdvbapi/dvbca.h>
++#include <pthread.h>
++
++void *stackthread_func(void* arg);
++void test_callback(void *arg, int reason,
++ uint8_t *data, uint32_t data_length,
++ uint8_t slot_id, uint8_t connection_id);
++
++int shutdown_stackthread = 0;
++
++#define DEFAULT_SLOT 0
++
++int main(int argc, char * argv[])
++{
++ (void)argc;
++ (void)argv;
++
++ int i;
++ pthread_t stackthread;
++
++ // create transport layer
++ struct en50221_transport_layer *tl = en50221_tl_create(5, 32);
++ if (tl == NULL) {
++ fprintf(stderr, "Failed to create transport layer\n");
++ exit(1);
++ }
++
++ // find CAMs
++ int slot_count = 0;
++ int cafd= -1;
++ for(i=0; i<20; i++) {
++ if ((cafd = dvbca_open(i, 0)) > 0) {
++ if (dvbca_get_cam_state(cafd, DEFAULT_SLOT) == DVBCA_CAMSTATE_MISSING) {
++ close(cafd);
++ continue;
++ }
++
++ // reset it and wait
++ dvbca_reset(cafd, DEFAULT_SLOT);
++ printf("Found a CAM on adapter%i... waiting...\n", i);
++ while(dvbca_get_cam_state(cafd, DEFAULT_SLOT) != DVBCA_CAMSTATE_READY) {
++ usleep(1000);
++ }
++
++ // register it with the CA stack
++ int slot_id = 0;
++ if ((slot_id = en50221_tl_register_slot(tl, cafd, DEFAULT_SLOT, 1000, 100)) < 0) {
++ fprintf(stderr, "Slot registration failed\n");
++ exit(1);
++ }
++ printf("slotid: %i\n", slot_id);
++ slot_count++;
++ }
++ }
++
++ // start another thread to running the stack
++ pthread_create(&stackthread, NULL, stackthread_func, tl);
++
++ // register callback
++ en50221_tl_register_callback(tl, test_callback, tl);
++
++ // create a new connection
++ for(i=0; i<slot_count; i++) {
++ int tc = en50221_tl_new_tc(tl, i);
++ printf("tcid: %i\n", tc);
++ }
++
++ // wait
++ printf("Press a key to exit\n");
++ getchar();
++
++ // destroy slots
++ for(i=0; i<slot_count; i++) {
++ en50221_tl_destroy_slot(tl, i);
++ }
++ shutdown_stackthread = 1;
++ pthread_join(stackthread, NULL);
++
++ // destroy transport layer
++ en50221_tl_destroy(tl);
++
++ return 0;
++}
++
++void test_callback(void *arg, int reason,
++ uint8_t *data, uint32_t data_length,
++ uint8_t slot_id, uint8_t connection_id)
++{
++ (void) arg;
++
++ printf("-----------------------------------\n");
++ printf("CALLBACK SLOTID:%i %i %i\n", slot_id, connection_id, reason);
++
++ uint32_t i;
++ for(i=0; i< data_length; i++) {
++ printf("%02x %02x\n", i, data[i]);
++ }
++}
++
++void *stackthread_func(void* arg) {
++ struct en50221_transport_layer *tl = arg;
++ int lasterror = 0;
++
++ while(!shutdown_stackthread) {
++ int error;
++ if ((error = en50221_tl_poll(tl)) != 0) {
++ if (error != lasterror) {
++ fprintf(stderr, "Error reported by stack slot:%i error:%i\n",
++ en50221_tl_get_error_slot(tl),
++ en50221_tl_get_error(tl));
++ }
++ lasterror = error;
++ }
++ }
++
++ shutdown_stackthread = 0;
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbsec/dvbsec_test.c dvb-apps/test/libdvbsec/dvbsec_test.c
+--- linuxtv-dvb-apps-1.1.1/test/libdvbsec/dvbsec_test.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvbsec/dvbsec_test.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,85 @@
++/**
++ * dvbsec testing.
++ *
++ * Copyright (c) 2005 by Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
++ * This library is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License as
++ * published by the Free Software Foundation; either version 2.1 of
++ * the License, or (at your option) any later version.
++ *
++ * This 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 Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include <libdvbsec/dvbsec_cfg.h>
++
++void syntax(void);
++
++struct dvbsec_config *secconfigs = NULL;
++int seccount = 0;
++
++int secload_callback(void *private, struct dvbsec_config *sec);
++
++int main(int argc, char *argv[])
++{
++ if (argc != 4) {
++ syntax();
++ }
++
++ if (!strcmp(argv[1], "-sec")) {
++
++ FILE *f = fopen(argv[2], "r");
++ if (!f) {
++ fprintf(stderr, "Unable to load %s\n", argv[2]);
++ exit(1);
++ }
++ dvbsec_cfg_load(f, NULL, secload_callback);
++ fclose(f);
++
++ f = fopen(argv[3], "w");
++ if (!f) {
++ fprintf(stderr, "Unable to write %s\n", argv[3]);
++ exit(1);
++ }
++ dvbsec_cfg_save(f, secconfigs, seccount);
++ fclose(f);
++
++ } else {
++ syntax();
++ }
++
++ exit(0);
++}
++
++int secload_callback(void *private, struct dvbsec_config *sec)
++{
++ (void) private;
++
++ struct dvbsec_config *tmp = realloc(secconfigs, (seccount+1) * sizeof(struct dvbsec_config));
++ if (tmp == NULL) {
++ fprintf(stderr, "Out of memory\n");
++ exit(1);
++ }
++ secconfigs = tmp;
++
++ memcpy(&secconfigs[seccount++], sec, sizeof(struct dvbsec_config));
++
++ return 0;
++}
++
++void syntax()
++{
++ fprintf(stderr,
++ "Syntax: dvbcfg_test <-zapchannel|-sec> <input filename> <output filename>\n");
++ exit(1);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbsec/Makefile dvb-apps/test/libdvbsec/Makefile
+--- linuxtv-dvb-apps-1.1.1/test/libdvbsec/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvbsec/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Makefile for linuxtv.org dvb-apps/test/libdvbsec
++
++binaries = dvbsec_test
++
++CPPFLAGS += -I../../lib
++LDLIBS += ../../lib/libdvbsec/libdvbsec.a
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libdvbsec/test_sec.txt dvb-apps/test/libdvbsec/test_sec.txt
+--- linuxtv-dvb-apps-1.1.1/test/libdvbsec/test_sec.txt 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libdvbsec/test_sec.txt 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,28 @@
++[sec]
++name=test1
++switch-frequency=100000
++lof-lo-v=20
++lof-lo-h=30
++lof-lo-l=40
++lof-lo-r=50
++lof-hi-v=60
++lof-hi-h=70
++lof-hi-l=80
++lof-hi-r=90
++config-type=none
++
++[sec]
++name=test2
++switch-frequency=200
++lof-lo-v=40
++lof-hi-h=50
++config-type=simple
++
++[sec]
++name=test3
++switch-frequency=100000
++lof-lo-l=20
++lof-hi-r=30
++config-type=advanced
++cmd-lo-v=MOOVH
++cmd-lo-h=MOOLH
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libesg/Makefile dvb-apps/test/libesg/Makefile
+--- linuxtv-dvb-apps-1.1.1/test/libesg/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libesg/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Makefile for linuxtv.org dvb-apps/test/libucsi
++
++binaries = testesg
++
++CPPFLAGS += -I../../lib
++LDLIBS += ../../lib/libesg/libesg.a
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libesg/samples/ESGProviderDiscoveryDescriptor.xml dvb-apps/test/libesg/samples/ESGProviderDiscoveryDescriptor.xml
+--- linuxtv-dvb-apps-1.1.1/test/libesg/samples/ESGProviderDiscoveryDescriptor.xml 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libesg/samples/ESGProviderDiscoveryDescriptor.xml 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++<?xml version="1.0"?>
++<ESGProviderDiscovery xmlns="urn:dvb:ipdc:esgbs:2005" xmlns:mpeg7="urn:mpeg:mpeg7:schema:2001">
++ <ServiceProvider>
++ <ProviderURI>http://www.sidsa.com</ProviderURI>
++ <ProviderName>SIDSA (Multiple Stream)</ProviderName>
++ <ProviderID>1</ProviderID>
++ </ServiceProvider>
++ <ServiceProvider>
++ <ProviderURI>http://www.sidsa.com</ProviderURI>
++ <ProviderName>SIDSA (Single Stream)</ProviderName>
++ <ProviderID>2</ProviderID>
++ </ServiceProvider>
++</ESGProviderDiscovery>
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libesg/testesg.c dvb-apps/test/libesg/testesg.c
+--- linuxtv-dvb-apps-1.1.1/test/libesg/testesg.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libesg/testesg.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,563 @@
++/*
++ * ESG parser
++ *
++ * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <stdio.h>
++#include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <fcntl.h>
++#include <sys/stat.h>
++
++#include <libesg/bootstrap/access_descriptor.h>
++#include <libesg/encapsulation/container.h>
++#include <libesg/encapsulation/fragment_management_information.h>
++#include <libesg/encapsulation/data_repository.h>
++#include <libesg/encapsulation/string_repository.h>
++#include <libesg/representation/encapsulated_textual_esg_xml_fragment.h>
++#include <libesg/representation/init_message.h>
++#include <libesg/representation/textual_decoder_init.h>
++#include <libesg/representation/bim_decoder_init.h>
++#include <libesg/transport/session_partition_declaration.h>
++
++#define MAX_FILENAME 256
++
++void usage(void) {
++ static const char *_usage =
++ "Usage: testesg [-a <ESGAccessDescriptor>]\n"
++ " [-c <ESGContainer with Textual ESG XML Fragment>]\n"
++ " [-X XXXX]\n";
++
++ fprintf(stderr, "%s", _usage);
++ exit(1);
++}
++
++void read_from_file(const char *filename, char **buffer, int *size) {
++ int fd;
++ struct stat fs;
++
++ if ((fd = open(filename, O_RDONLY)) <= 0) {
++ fprintf(stderr, "File not found\n");
++ exit(1);
++ }
++
++ if (fstat(fd, &fs) < 0) {
++ fprintf(stderr, "File not readable\n");
++ exit(1);
++ }
++ *size = fs.st_size;
++
++ *buffer = (char *) malloc(*size);
++ if (read(fd, *buffer, *size) != *size) {
++ fprintf(stderr, "File read error\n");
++ exit(1);
++ }
++
++ close(fd);
++
++ return;
++}
++
++int main(int argc, char *argv[]) {
++ char access_descriptor_filename[MAX_FILENAME] = "";
++ char container_filename[MAX_FILENAME] = "";
++ int c;
++ char *buffer = NULL;
++ int size;
++
++ // Read command line options
++ while ((c = getopt(argc, argv, "a:c:")) != -1) {
++ switch (c) {
++ case 'a':
++ strncpy(access_descriptor_filename, optarg, MAX_FILENAME);
++ break;
++ case 'c':
++ strncpy(container_filename, optarg, MAX_FILENAME);
++ break;
++ default:
++ usage();
++ }
++ }
++
++ // ESGAccessDescriptor
++ if (strncmp(access_descriptor_filename, "", MAX_FILENAME) != 0) {
++ fprintf(stdout, "**************************************************\n");
++ fprintf(stdout, "Reading ESG Access Descriptor = %s\n", access_descriptor_filename);
++ fprintf(stdout, "**************************************************\n\n");
++
++ read_from_file(access_descriptor_filename, &buffer, &size);
++
++ struct esg_access_descriptor *access_descriptor = esg_access_descriptor_decode((uint8_t *) buffer, size);
++ free(buffer);
++ if (access_descriptor == NULL) {
++ fprintf(stderr, "ESG Access Descriptor decode error\n");
++ exit(1);
++ }
++ fprintf(stdout, "n_o_ESGEntries %d\n\n", access_descriptor->n_o_entries);
++
++ struct esg_entry *entry;
++ esg_access_descriptor_entry_list_for_each(access_descriptor, entry) {
++ fprintf(stdout, " ESGEntryVersion %d\n", entry->version);
++ fprintf(stdout, " MultipleStreamTransport %d\n", entry->multiple_stream_transport);
++ fprintf(stdout, " IPVersion6 %d\n", entry->ip_version_6);
++ fprintf(stdout, " ProviderID %d\n", entry->provider_id);
++ if (entry->ip_version_6 == 0) {
++ fprintf(stdout, " SourceIPAddress %d.%d.%d.%d\n",
++ entry->source_ip.ipv4[0],
++ entry->source_ip.ipv4[1],
++ entry->source_ip.ipv4[2],
++ entry->source_ip.ipv4[3]);
++ fprintf(stdout, " DestinationIPAddress %d.%d.%d.%d\n",
++ entry->destination_ip.ipv4[0],
++ entry->destination_ip.ipv4[1],
++ entry->destination_ip.ipv4[2],
++ entry->destination_ip.ipv4[3]);
++ } else if (entry->ip_version_6 == 1) {
++ fprintf(stdout, " SourceIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
++ entry->source_ip.ipv6[0],
++ entry->source_ip.ipv6[1],
++ entry->source_ip.ipv6[2],
++ entry->source_ip.ipv6[3],
++ entry->source_ip.ipv6[4],
++ entry->source_ip.ipv6[5],
++ entry->source_ip.ipv6[6],
++ entry->source_ip.ipv6[7],
++ entry->source_ip.ipv6[8],
++ entry->source_ip.ipv6[9],
++ entry->source_ip.ipv6[10],
++ entry->source_ip.ipv6[11],
++ entry->source_ip.ipv6[12],
++ entry->source_ip.ipv6[13],
++ entry->source_ip.ipv6[14],
++ entry->source_ip.ipv6[15]);
++ fprintf(stdout, " DestinationIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
++ entry->destination_ip.ipv6[0],
++ entry->destination_ip.ipv6[1],
++ entry->destination_ip.ipv6[2],
++ entry->destination_ip.ipv6[3],
++ entry->destination_ip.ipv6[4],
++ entry->destination_ip.ipv6[5],
++ entry->destination_ip.ipv6[6],
++ entry->destination_ip.ipv6[7],
++ entry->destination_ip.ipv6[8],
++ entry->destination_ip.ipv6[9],
++ entry->destination_ip.ipv6[10],
++ entry->destination_ip.ipv6[11],
++ entry->destination_ip.ipv6[12],
++ entry->destination_ip.ipv6[13],
++ entry->destination_ip.ipv6[14],
++ entry->destination_ip.ipv6[15]);
++ }
++ fprintf(stdout, "Port %d\n", entry->port);
++ fprintf(stdout, "TSI %d\n", entry->tsi);
++ fprintf(stdout, "\n");
++ }
++ }
++
++ // ESGContainer
++ if (strncmp(container_filename, "", MAX_FILENAME) != 0) {
++ fprintf(stdout, "**************************************************\n");
++ fprintf(stdout, "Reading ESG Container = %s\n", container_filename);
++ fprintf(stdout, "**************************************************\n\n");
++
++ read_from_file(container_filename, &buffer, &size);
++
++ struct esg_container *container = esg_container_decode((uint8_t *) buffer, size);
++ free(buffer);
++ if (container == NULL) {
++ fprintf(stderr, "ESG Container decode error\n");
++ exit(1);
++ }
++ if (container->header == NULL) {
++ fprintf(stderr, "ESG Container no header found\n");
++ exit(1);
++ }
++
++ struct esg_encapsulation_structure *fragment_management_information = NULL;
++ struct esg_data_repository *data_repository = NULL;
++ struct esg_string_repository *string_repository = NULL;
++ struct esg_container_structure *structure = NULL;
++ struct esg_init_message *init_message = NULL;
++ struct esg_textual_encoding_parameters *textual_encoding_parameters = NULL;
++ struct esg_textual_decoder_init *textual_decoder_init = NULL;
++ struct esg_namespace_prefix *namespace_prefix = NULL;
++ struct esg_xml_fragment_type *xml_fragment_type = NULL;
++ struct esg_bim_encoding_parameters *bim_encoding_parameters = NULL;
++ struct esg_bim_decoder_init *bim_decoder_init = NULL;
++ struct esg_session_partition_declaration *partition = NULL;
++ struct esg_session_field *field = NULL;
++ struct esg_session_ip_stream *ip_stream = NULL;
++ struct esg_session_ip_stream_field *ip_stream_field = NULL;
++ esg_container_header_structure_list_for_each(container->header, structure) {
++ fprintf(stdout, " structure_type %d [0x%02x]\n", structure->type, structure->type);
++ fprintf(stdout, " structure_id %d [0x%02x]\n", structure->id, structure->id);
++ fprintf(stdout, " structure_ptr %d\n", structure->ptr);
++ fprintf(stdout, " structure_length %d\n\n", structure->length);
++ switch (structure->type) {
++ case 0x01: {
++ switch (structure->id) {
++ case 0x00: {
++ fprintf(stdout, " ESG Fragment Management Information\n");
++
++ fragment_management_information = (struct esg_encapsulation_structure *) structure->data;
++ if (fragment_management_information == NULL) {
++ fprintf(stderr, "ESG Fragment Management Information decode error\n");
++ exit(1);
++ }
++
++ fprintf(stdout, " fragment_reference_format %d [0x%02x]\n\n", fragment_management_information->header->fragment_reference_format, fragment_management_information->header->fragment_reference_format);
++
++ struct esg_encapsulation_entry *entry;
++ esg_encapsulation_structure_entry_list_for_each(fragment_management_information, entry) {
++ fprintf(stdout, " fragment_type %d [0x%02x]\n", entry->fragment_reference->fragment_type, entry->fragment_reference->fragment_type);
++ fprintf(stdout, " data_repository_offset %d\n", entry->fragment_reference->data_repository_offset);
++ fprintf(stdout, " fragment_version %d\n", entry->fragment_version);
++ fprintf(stdout, " fragment_id %d\n\n", entry->fragment_id);
++ }
++
++ break;
++ }
++ default: {
++ fprintf(stdout, " Unknown structure_id\n");
++ }
++ }
++ break;
++ }
++ case 0x02: {
++ switch (structure->id) {
++ case 0x00: {
++ fprintf(stdout, " ESG String Repository / ");
++
++ string_repository = (struct esg_string_repository *) structure->data;
++ if (string_repository == NULL) {
++ fprintf(stderr, "ESG String Repository decode error\n");
++ exit(1);
++ }
++
++ fprintf(stdout, "encoding_type %d / length %d\n\n", string_repository->encoding_type, string_repository->length);
++
++ break;
++ }
++ default: {
++ fprintf(stdout, " Unknown structure_id\n");
++ }
++ }
++ break;
++ }
++ case 0x03: {
++ //TODO
++ break;
++ }
++ case 0x04: {
++ //TODO
++ break;
++ }
++ case 0x05: {
++ //TODO
++ break;
++ }
++ case 0xE0: {
++ switch (structure->id) {
++ case 0x00: {
++ fprintf(stdout, " ESG Data Repository / ");
++
++ data_repository = (struct esg_data_repository *) structure->data;
++ if (data_repository == NULL) {
++ fprintf(stderr, "ESG Data Repository decode error\n");
++ exit(1);
++ }
++
++ fprintf(stdout, "length %d\n\n", data_repository->length);
++
++ break;
++ }
++ default: {
++ fprintf(stdout, " Unknown structure_id\n");
++ }
++ }
++ break;
++ }
++ case 0xE1: {
++ switch (structure->id) {
++ case 0xFF: {
++ fprintf(stdout, " ESG Session Partition Declaration\n");
++
++ partition = (struct esg_session_partition_declaration *) structure->data;
++ fprintf(stdout, " num_fields %d\n", partition->num_fields);
++ fprintf(stdout, " overlapping %d\n\n", partition->overlapping);
++ esg_session_partition_declaration_field_list_for_each(partition, field) {
++ fprintf(stdout, " identifier %d\n", field->identifier);
++ fprintf(stdout, " encoding %d\n",field->encoding);
++ fprintf(stdout, " length %d\n\n",field->length);
++ }
++ fprintf(stdout, " n_o_IPStreams %d\n", partition->n_o_ip_streams);
++ fprintf(stdout, " IPVersion6 %d\n\n", partition->ip_version_6);
++ esg_session_partition_declaration_ip_stream_list_for_each(partition, ip_stream) {
++ fprintf(stdout, " IPStreamID %d\n", ip_stream->id);
++ if (partition->ip_version_6 == 0) {
++ fprintf(stdout, " SourceIPAddress %d.%d.%d.%d\n",
++ ip_stream->source_ip.ipv4[0],
++ ip_stream->source_ip.ipv4[1],
++ ip_stream->source_ip.ipv4[2],
++ ip_stream->source_ip.ipv4[3]);
++ fprintf(stdout, " DestinationIPAddress %d.%d.%d.%d\n",
++ ip_stream->destination_ip.ipv4[0],
++ ip_stream->destination_ip.ipv4[1],
++ ip_stream->destination_ip.ipv4[2],
++ ip_stream->destination_ip.ipv4[3]);
++ } else if (partition->ip_version_6 == 1) {
++ fprintf(stdout, " SourceIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
++ ip_stream->source_ip.ipv6[0],
++ ip_stream->source_ip.ipv6[1],
++ ip_stream->source_ip.ipv6[2],
++ ip_stream->source_ip.ipv6[3],
++ ip_stream->source_ip.ipv6[4],
++ ip_stream->source_ip.ipv6[5],
++ ip_stream->source_ip.ipv6[6],
++ ip_stream->source_ip.ipv6[7],
++ ip_stream->source_ip.ipv6[8],
++ ip_stream->source_ip.ipv6[9],
++ ip_stream->source_ip.ipv6[10],
++ ip_stream->source_ip.ipv6[11],
++ ip_stream->source_ip.ipv6[12],
++ ip_stream->source_ip.ipv6[13],
++ ip_stream->source_ip.ipv6[14],
++ ip_stream->source_ip.ipv6[15]);
++ fprintf(stdout, " DestinationIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
++ ip_stream->destination_ip.ipv6[0],
++ ip_stream->destination_ip.ipv6[1],
++ ip_stream->destination_ip.ipv6[2],
++ ip_stream->destination_ip.ipv6[3],
++ ip_stream->destination_ip.ipv6[4],
++ ip_stream->destination_ip.ipv6[5],
++ ip_stream->destination_ip.ipv6[6],
++ ip_stream->destination_ip.ipv6[7],
++ ip_stream->destination_ip.ipv6[8],
++ ip_stream->destination_ip.ipv6[9],
++ ip_stream->destination_ip.ipv6[10],
++ ip_stream->destination_ip.ipv6[11],
++ ip_stream->destination_ip.ipv6[12],
++ ip_stream->destination_ip.ipv6[13],
++ ip_stream->destination_ip.ipv6[14],
++ ip_stream->destination_ip.ipv6[15]);
++ }
++ fprintf(stdout, " Port %d\n", ip_stream->port);
++ fprintf(stdout, " SessionID %d\n", ip_stream->session_id);
++
++ field = partition->field_list;
++ esg_session_ip_stream_field_list_for_each(ip_stream, ip_stream_field) {
++ switch (field->encoding) {
++ case 0x0000: {
++ if (ip_stream_field->start_field_value != NULL) {
++ fprintf(stdout, " start_field_value %s\n", ip_stream_field->start_field_value->string);
++ }
++ fprintf(stdout, " end_field_value %s\n", ip_stream_field->end_field_value->string);
++ break;
++ }
++ case 0x0101: {
++ if (ip_stream_field->start_field_value != NULL) {
++ fprintf(stdout, " start_field_value %d\n", ip_stream_field->start_field_value->unsigned_short);
++ }
++ fprintf(stdout, " end_field_value %d\n", ip_stream_field->end_field_value->unsigned_short);
++ break;
++ }
++ }
++
++ field = field->_next;
++ }
++ fprintf(stdout, "\n");
++ }
++ break;
++ }
++ default: {
++ fprintf(stdout, " Unknown structure_id\n");
++ }
++ }
++ break;
++ }
++ case 0xE2: {
++ switch (structure->id) {
++ case 0x00: {
++ fprintf(stdout, " ESG Init Message\n");
++
++ init_message = (struct esg_init_message *) structure->data;
++ if (init_message == NULL) {
++ fprintf(stderr, "ESG Init Message decode error\n");
++ exit(1);
++ }
++
++ fprintf(stdout, " EncodingVersion %d [0x%02x]\n", init_message->encoding_version, init_message->encoding_version);
++ fprintf(stdout, " IndexingFlag %d\n", init_message->indexing_flag);
++ fprintf(stdout, " DecoderInitptr %d\n", init_message->decoder_init_ptr);
++ if (init_message->indexing_flag) {
++ fprintf(stdout, " IndexingVersion %d\n", init_message->indexing_version);
++ }
++
++ switch (init_message->encoding_version) {
++ case 0xF1: {
++ bim_encoding_parameters = (struct esg_bim_encoding_parameters *) init_message->encoding_parameters;
++ if (bim_encoding_parameters == NULL) {
++ fprintf(stderr, "ESG Init Message decode error / bim_encoding_parameters\n");
++ exit(1);
++ }
++ fprintf(stdout, " BufferSizeFlag %d\n", bim_encoding_parameters->buffer_size_flag);
++ fprintf(stdout, " PositionCodeFlag %d\n", bim_encoding_parameters->position_code_flag);
++ fprintf(stdout, " CharacterEncoding %d\n", bim_encoding_parameters->character_encoding);
++ if (bim_encoding_parameters->buffer_size_flag) {
++ fprintf(stdout, " BufferSize %d\n", bim_encoding_parameters->buffer_size);
++ }
++
++ // TODO BimDecoderInit
++ break;
++ }
++ case 0xF2:
++ case 0xF3: {
++ textual_encoding_parameters = (struct esg_textual_encoding_parameters *) init_message->encoding_parameters;
++ if (textual_encoding_parameters == NULL) {
++ fprintf(stderr, "ESG Init Message decode error / textual_encoding_parameters\n");
++ exit(1);
++ }
++ fprintf(stdout, " CharacterEncoding %d\n\n", textual_encoding_parameters->character_encoding);
++
++ // TextualDecoderInit
++ textual_decoder_init = (struct esg_textual_decoder_init *) init_message->decoder_init;
++ if (textual_decoder_init == NULL) {
++ fprintf(stderr, "ESG Init Message decode error / textual_decoder_init\n");
++ exit(1);
++ }
++ fprintf(stdout, " Textual DecoderInit\n");
++ fprintf(stdout, " num_namespaces_prefixes %d\n\n", textual_decoder_init->num_namespace_prefixes);
++ esg_textual_decoder_namespace_prefix_list_for_each(textual_decoder_init, namespace_prefix) {
++ fprintf(stdout, " prefix_string_ptr %d\n", namespace_prefix->prefix_string_ptr);
++ fprintf(stdout, " namespace_URI_ptr %d\n\n", namespace_prefix->namespace_uri_ptr);
++ }
++ fprintf(stdout, " num_fragment_types %d\n\n", textual_decoder_init->num_fragment_types);
++ esg_textual_decoder_xml_fragment_type_list_for_each(textual_decoder_init, xml_fragment_type) {
++ fprintf(stdout, " xpath_ptr %d\n", xml_fragment_type->xpath_ptr);
++ fprintf(stdout, " ESG_XML_fragment_type %d\n\n", xml_fragment_type->xml_fragment_type);
++ }
++ break;
++ }
++ default: {
++ fprintf(stdout, " Unknown EncodingVersion\n");
++ }
++ }
++
++ break;
++ }
++ default: {
++ fprintf(stdout, " Unknown structure_id\n");
++ }
++ }
++ break;
++ }
++ default: {
++ fprintf(stdout, " Unknown structure_type\n");
++ }
++ }
++ }
++ fprintf(stdout, "\n");
++
++ fprintf(stdout, "structure_body_ptr %d\n", container->structure_body_ptr);
++ fprintf(stdout, "structure_body_length %d\n\n", container->structure_body_length);
++
++ // ESG XML Fragment
++ if (fragment_management_information) {
++ fprintf(stdout, "**************************************************\n");
++ fprintf(stdout, "ESG XML Fragment\n");
++ fprintf(stdout, "**************************************************\n\n");
++
++ struct esg_encapsulation_entry *entry;
++ esg_encapsulation_structure_entry_list_for_each(fragment_management_information, entry) {
++ switch (entry->fragment_reference->fragment_type) {
++ case 0x00: {
++ if (data_repository) {
++ struct esg_encapsulated_textual_esg_xml_fragment *esg_xml_fragment = esg_encapsulated_textual_esg_xml_fragment_decode(data_repository->data + entry->fragment_reference->data_repository_offset, data_repository->length);
++
++ fprintf(stdout, "ESG_XML_fragment_type %d\n", esg_xml_fragment->esg_xml_fragment_type);
++ fprintf(stdout, "data_length %d\n", esg_xml_fragment->data_length);
++ fprintf(stdout, "fragment_version %d\n", entry->fragment_version);
++ fprintf(stdout, "fragment_id %d\n\n", entry->fragment_id);
++ char *string = (char *) malloc(esg_xml_fragment->data_length + 1);
++ memcpy(string, esg_xml_fragment->data, esg_xml_fragment->data_length);
++ string[esg_xml_fragment->data_length] = 0;
++ fprintf(stdout, "%s\n", string);
++
++ } else {
++ fprintf(stderr, "ESG Data Repository not found");
++ }
++ break;
++ }
++ case 0x01: {
++ // TODO
++ break;
++ }
++ case 0x02: {
++ // TODO
++ break;
++ }
++ default: {
++ }
++ }
++ }
++ }
++
++ // String
++ if (init_message) {
++ fprintf(stdout, "**************************************************\n");
++ fprintf(stdout, "String\n");
++ fprintf(stdout, "**************************************************\n\n");
++
++ switch (init_message->encoding_version) {
++ case 0xF1: {
++ // TODO Bim
++ break;
++ }
++ case 0xF2: {
++ // TODO GZIP
++ break;
++ }
++ case 0xF3: {
++ // RAW
++ if (string_repository) {
++ textual_decoder_init = (struct esg_textual_decoder_init *) init_message->decoder_init;
++ esg_textual_decoder_namespace_prefix_list_for_each(textual_decoder_init, namespace_prefix) {
++ fprintf(stdout, "prefix_string_ptr %d\n", namespace_prefix->prefix_string_ptr);
++ fprintf(stdout, "%s\n", string_repository->data + namespace_prefix->prefix_string_ptr);
++ fprintf(stdout, "namespace_URI_ptr %d\n", namespace_prefix->namespace_uri_ptr);
++ fprintf(stdout, "%s\n\n", string_repository->data + namespace_prefix->namespace_uri_ptr - 1); // TODO -1
++ }
++
++ esg_textual_decoder_xml_fragment_type_list_for_each(textual_decoder_init, xml_fragment_type) {
++ fprintf(stdout, "xpath_ptr %d\n", xml_fragment_type->xpath_ptr);
++ fprintf(stdout, "ESG_XML_fragment_type %d\n", xml_fragment_type->xml_fragment_type);
++ fprintf(stdout, "%s\n\n", string_repository->data + xml_fragment_type->xpath_ptr - 1); // TODO -1
++ }
++ }
++ break;
++ }
++ default: {
++ fprintf(stdout, " Unknown EncodingVersion\n");
++ }
++ }
++ }
++ }
++
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libucsi/Makefile dvb-apps/test/libucsi/Makefile
+--- linuxtv-dvb-apps-1.1.1/test/libucsi/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libucsi/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# Makefile for linuxtv.org dvb-apps/test/libucsi
++
++binaries = testucsi
++
++CPPFLAGS += -I../../lib
++LDLIBS += ../../lib/libdvbapi/libdvbapi.a ../../lib/libdvbcfg/libdvbcfg.a \
++ ../../lib/libdvbsec/libdvbsec.a ../../lib/libucsi/libucsi.a
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/libucsi/testucsi.c dvb-apps/test/libucsi/testucsi.c
+--- linuxtv-dvb-apps-1.1.1/test/libucsi/testucsi.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/libucsi/testucsi.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3528 @@
++/*
++ * section and descriptor parser test/sample application.
++ *
++ * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net)
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
++ */
++
++#include <libucsi/mpeg/descriptor.h>
++#include <libucsi/mpeg/section.h>
++#include <libucsi/dvb/descriptor.h>
++#include <libucsi/dvb/section.h>
++#include <libucsi/atsc/descriptor.h>
++#include <libucsi/atsc/section.h>
++#include <libucsi/transport_packet.h>
++#include <libucsi/section_buf.h>
++#include <libucsi/dvb/types.h>
++#include <libdvbapi/dvbdemux.h>
++#include <libdvbapi/dvbfe.h>
++#include <libdvbcfg/dvbcfg_zapchannel.h>
++#include <libdvbsec/dvbsec_api.h>
++#include <libdvbsec/dvbsec_cfg.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <errno.h>
++#include <stdarg.h>
++#include <fcntl.h>
++
++void receive_data(int dvrfd, int timeout, int data_type);
++void parse_section(uint8_t *buf, int len, int pid, int data_type);
++void parse_dvb_section(uint8_t *buf, int len, int pid, int data_type, struct section *section);
++void parse_atsc_section(uint8_t *buf, int len, int pid, int data_type, struct section *section);
++void parse_descriptor(struct descriptor *d, int indent, int data_type);
++void parse_dvb_descriptor(struct descriptor *d, int indent, int data_type);
++void parse_atsc_descriptor(struct descriptor *d, int indent, int data_type);
++void iprintf(int indent, char *fmt, ...);
++void hexdump(int indent, char *prefix, uint8_t *buf, int buflen);
++void atsctextdump(char *header, int indent, struct atsc_text *atext, int len);
++int channels_cb(struct dvbcfg_zapchannel *channel, void *private);
++void ts_from_file(char *filename, int data_type);
++
++#define TIME_CHECK_VAL 1131835761
++#define DURATION_CHECK_VAL 5643
++
++#define MAX_TUNE_TIME 3000
++#define MAX_DUMP_TIME 60
++
++#define DATA_TYPE_MPEG 0
++#define DATA_TYPE_DVB 1
++#define DATA_TYPE_ATSC 2
++
++
++struct dvbfe_handle *fe;
++struct dvbfe_info feinfo;
++int demuxfd;
++int dvrfd;
++
++int main(int argc, char *argv[])
++{
++ int adapter;
++ char *channelsfile;
++ int pidlimit = -1;
++ dvbdate_t dvbdate;
++ dvbduration_t dvbduration;
++
++ // process arguments
++ if ((argc < 3) || (argc > 4)) {
++ fprintf(stderr, "Syntax: testucsi <adapter id>|-atscfile <filename> <zapchannels file> [<pid to limit to>]\n");
++ exit(1);
++ }
++ if (!strcmp(argv[1], "-atscfile")) {
++ ts_from_file(argv[2], DATA_TYPE_ATSC);
++ exit(0);
++ }
++ adapter = atoi(argv[1]);
++ channelsfile = argv[2];
++ if (argc == 4)
++ sscanf(argv[3], "%i", &pidlimit);
++ printf("Using adapter %i\n", adapter);
++
++ // check the dvbdate conversion functions
++ unixtime_to_dvbdate(TIME_CHECK_VAL, dvbdate);
++ if (dvbdate_to_unixtime(dvbdate) != TIME_CHECK_VAL) {
++ fprintf(stderr, "XXXX dvbdate function check failed (%i!=%i)\n",
++ TIME_CHECK_VAL, (int) dvbdate_to_unixtime(dvbdate));
++ exit(1);
++ }
++ seconds_to_dvbduration(DURATION_CHECK_VAL, dvbduration);
++ if (dvbduration_to_seconds(dvbduration) != DURATION_CHECK_VAL) {
++ fprintf(stderr, "XXXX dvbduration function check failed (%i!=%i)\n",
++ DURATION_CHECK_VAL, (int) dvbduration_to_seconds(dvbduration));
++ exit(1);
++ }
++
++ // open the frontend
++ if ((fe = dvbfe_open(adapter, 0, 0)) == NULL) {
++ perror("open frontend");
++ exit(1);
++ }
++ dvbfe_get_info(fe, 0, &feinfo, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
++ int data_type = DATA_TYPE_MPEG;
++ switch(feinfo.type) {
++ case DVBFE_TYPE_DVBS:
++ case DVBFE_TYPE_DVBC:
++ case DVBFE_TYPE_DVBT:
++ data_type = DATA_TYPE_DVB;
++ break;
++
++ case DVBFE_TYPE_ATSC:
++ data_type = DATA_TYPE_ATSC;
++ break;
++ }
++
++ // open demux devices
++ if ((demuxfd = dvbdemux_open_demux(adapter, 0, 0)) < 0) {
++ perror("demux");
++ exit(1);
++ }
++ if ((dvrfd = dvbdemux_open_dvr(adapter, 0, 1, 1)) < 0) {
++ perror("dvr");
++ exit(1);
++ }
++
++ // make the demux buffer a bit larger
++ if (dvbdemux_set_buffer(demuxfd, 1024*1024)) {
++ perror("set buffer");
++ exit(1);
++ }
++
++ // setup filter to capture stuff
++ if (dvbdemux_set_pid_filter(demuxfd, pidlimit, DVBDEMUX_INPUT_FRONTEND, DVBDEMUX_OUTPUT_DVR, 1)) {
++ perror("set pid filter");
++ exit(1);
++ }
++
++ // process all the channels
++ FILE *channels = fopen(channelsfile, "r");
++ if (channels == NULL) {
++ fprintf(stderr, "Unable to open %s\n", channelsfile);
++ exit(1);
++ }
++ dvbcfg_zapchannel_parse(channels, channels_cb, (void*) (long) data_type);
++ return 0;
++}
++
++void ts_from_file(char *filename, int data_type) {
++ int fd = open(filename, O_RDONLY);
++ if (fd < 0) {
++ fprintf(stderr, "Unable to open file %s\n", filename);
++ exit(1);
++ }
++ receive_data(fd, 1000000000, data_type);
++}
++
++int channels_cb(struct dvbcfg_zapchannel *channel, void *private)
++{
++ long data_type = (long) private;
++ struct dvbsec_config sec;
++
++ if (dvbsec_cfg_find(NULL, "UNIVERSAL", &sec)) {
++ fprintf(stderr, "Unable to find SEC id\n");
++ exit(1);
++ }
++
++ if (dvbsec_set(fe,
++ &sec,
++ channel->polarization,
++ DISEQC_SWITCH_UNCHANGED,
++ DISEQC_SWITCH_UNCHANGED,
++ &channel->fe_params,
++ MAX_TUNE_TIME)) {
++ fprintf(stderr, "Failed to lock!\n");
++ } else {
++ printf("Tuned successfully!\n");
++ receive_data(dvrfd, MAX_DUMP_TIME, data_type);
++ }
++
++ return 0;
++}
++
++void receive_data(int _dvrfd, int timeout, int data_type)
++{
++ unsigned char databuf[TRANSPORT_PACKET_LENGTH*20];
++ int sz;
++ int pid;
++ int i;
++ int used;
++ int section_status;
++ time_t starttime;
++ unsigned char continuities[TRANSPORT_MAX_PIDS];
++ struct section_buf *section_bufs[TRANSPORT_MAX_PIDS];
++ struct transport_packet *tspkt;
++ struct transport_values tsvals;
++
++ // process the data
++ starttime = time(NULL);
++ memset(continuities, 0, sizeof(continuities));
++ memset(section_bufs, 0, sizeof(section_bufs));
++ while((time(NULL) - starttime) < timeout) {
++ // got some!
++ if ((sz = read(_dvrfd, databuf, sizeof(databuf))) < 0) {
++ if (errno == EOVERFLOW) {
++ fprintf(stderr, "data overflow!\n");
++ continue;
++ } else if (errno == EAGAIN) {
++ usleep(100);
++ continue;
++ } else {
++ perror("read error");
++ exit(1);
++ }
++ }
++ for(i=0; i < sz; i+=TRANSPORT_PACKET_LENGTH) {
++ // parse the transport packet
++ tspkt = transport_packet_init(databuf + i);
++ if (tspkt == NULL) {
++ fprintf(stderr, "XXXX Bad sync byte\n");
++ continue;
++ }
++ pid = transport_packet_pid(tspkt);
++
++ // extract all TS packet values even though we don't need them (to check for
++ // library segfaults etc)
++ if (transport_packet_values_extract(tspkt, &tsvals, 0xffff) < 0) {
++ fprintf(stderr, "XXXX Bad packet received (pid:%04x)\n", pid);
++ continue;
++ }
++
++ // check continuity
++ if (transport_packet_continuity_check(tspkt,
++ tsvals.flags & transport_adaptation_flag_discontinuity,
++ continuities + pid)) {
++ fprintf(stderr, "XXXX Continuity error (pid:%04x)\n", pid);
++ continuities[pid] = 0;
++ if (section_bufs[pid] != NULL) {
++ section_buf_reset(section_bufs[pid]);
++ }
++ continue;
++ }
++
++ // allocate section buf if we don't have one already
++ if (section_bufs[pid] == NULL) {
++ section_bufs[pid] = (struct section_buf*)
++ malloc(sizeof(struct section_buf) + DVB_MAX_SECTION_BYTES);
++ if (section_bufs[pid] == NULL) {
++ fprintf(stderr, "Failed to allocate section buf (pid:%04x)\n", pid);
++ exit(1);
++ }
++ section_buf_init(section_bufs[pid], DVB_MAX_SECTION_BYTES);
++ }
++
++ // process the payload data as a section
++ while(tsvals.payload_length) {
++ used = section_buf_add_transport_payload(section_bufs[pid],
++ tsvals.payload,
++ tsvals.payload_length,
++ tspkt->payload_unit_start_indicator,
++ &section_status);
++ tspkt->payload_unit_start_indicator = 0;
++ tsvals.payload_length -= used;
++ tsvals.payload += used;
++
++ if (section_status == 1) {
++ parse_section(section_buf_data(section_bufs[pid]),
++ section_bufs[pid]->len, pid, data_type);
++ section_buf_reset(section_bufs[pid]);
++ } else if (section_status < 0) {
++ // some kind of error - just discard
++ fprintf(stderr, "XXXX bad section %04x %i\n",pid, section_status);
++ section_buf_reset(section_bufs[pid]);
++ }
++ }
++ }
++ }
++}
++
++void parse_section(uint8_t *buf, int len, int pid, int data_type)
++{
++ struct section *section;
++ struct section_ext *section_ext = NULL;
++
++ if ((section = section_codec(buf, len)) == NULL) {
++ return;
++ }
++
++ switch(section->table_id) {
++ case stag_mpeg_program_association:
++ {
++ struct mpeg_pat_section *pat;
++ struct mpeg_pat_program *cur;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode PAT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((pat = mpeg_pat_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "SCT XXXX PAT section decode error\n");
++ return;
++ }
++ printf("SCT transport_stream_id:0x%04x\n", mpeg_pat_section_transport_stream_id(pat));
++ mpeg_pat_section_programs_for_each(pat, cur) {
++ printf("\tSCT program_number:0x%04x pid:0x%04x\n", cur->program_number, cur->pid);
++ }
++ break;
++ }
++
++ case stag_mpeg_conditional_access:
++ {
++ struct mpeg_cat_section *cat;
++ struct descriptor *curd;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode CAT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((cat = mpeg_cat_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "SCT XXXX CAT section decode error\n");
++ return;
++ }
++ mpeg_cat_section_descriptors_for_each(cat, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ break;
++ }
++
++ case stag_mpeg_program_map:
++ {
++ struct mpeg_pmt_section *pmt;
++ struct descriptor *curd;
++ struct mpeg_pmt_stream *cur_stream;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode PMT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((pmt = mpeg_pmt_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "SCT XXXX PMT section decode error\n");
++ return;
++ }
++ printf("SCT program_number:0x%04x pcr_pid:0x%02x\n", mpeg_pmt_section_program_number(pmt), pmt->pcr_pid);
++ mpeg_pmt_section_descriptors_for_each(pmt, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ mpeg_pmt_section_streams_for_each(pmt, cur_stream) {
++ printf("\tSCT stream_type:0x%02x pid:0x%04x\n", cur_stream->stream_type, cur_stream->pid);
++ mpeg_pmt_stream_descriptors_for_each(cur_stream, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++ break;
++ }
++
++ case stag_mpeg_transport_stream_description:
++ {
++ struct mpeg_tsdt_section *tsdt;
++ struct descriptor *curd;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode TSDT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((tsdt = mpeg_tsdt_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "SCT XXXX TSDT section decode error\n");
++ return;
++ }
++ mpeg_tsdt_section_descriptors_for_each(tsdt, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++
++ hexdump(0, "SCT ", buf, len);
++ getchar();
++ break;
++ }
++
++ case stag_mpeg_metadata:
++ {
++ struct mpeg_metadata_section *metadata;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode metadata (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((metadata = mpeg_metadata_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "SCT XXXX metadata section decode error\n");
++ return;
++ }
++ printf("SCT random_access_indicator:%i decoder_config_flag:%i fragment_indicator:%i service_id:%02x\n",
++ mpeg_metadata_section_random_access_indicator(metadata),
++ mpeg_metadata_section_decoder_config_flag(metadata),
++ mpeg_metadata_section_fragment_indicator(metadata),
++ mpeg_metadata_section_service_id(metadata));
++ hexdump(0, "SCT ", mpeg_metadata_section_data(metadata), mpeg_metadata_section_data_length(metadata));
++
++ hexdump(0, "SCT ", buf, len);
++ getchar();
++ break;
++ }
++
++ case stag_mpeg_iso14496_scene_description:
++ case stag_mpeg_iso14496_object_description:
++ {
++ struct mpeg_odsmt_section *odsmt;
++ struct mpeg_odsmt_stream *cur_stream;
++ struct descriptor *curd;
++ int _index;
++ uint8_t *objects;
++ size_t objects_length;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode ISO14496 (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((odsmt = mpeg_odsmt_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "XXXX ISO14496 section decode error\n");
++ return;
++ }
++ printf("SCT PID:0x%04x\n", mpeg_odsmt_section_pid(odsmt));
++ mpeg_odsmt_section_streams_for_each(osdmt, cur_stream, _index) {
++ if (odsmt->stream_count == 0) {
++ printf("\tSCT SINGLE 0x%04x\n", cur_stream->u.single.esid);
++ } else {
++ printf("\tSCT MULTI 0x%04x 0x%02x\n", cur_stream->u.multi.esid, cur_stream->u.multi.fmc);
++ }
++ mpeg_odsmt_stream_descriptors_for_each(osdmt, cur_stream, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++ objects = mpeg_odsmt_section_object_descriptors(odsmt, &objects_length);
++ if (objects == NULL) {
++ printf("SCT XXXX OSDMT parse error\n");
++ break;
++ }
++ hexdump(1, "SCT ", objects, objects_length);
++
++ hexdump(0, "SCT ", buf, len);
++ getchar();
++ break;
++ }
++
++ default:
++ switch(data_type) {
++ case DATA_TYPE_DVB:
++ parse_dvb_section(buf, len, pid, data_type, section);
++ break;
++
++ case DATA_TYPE_ATSC:
++ parse_atsc_section(buf, len, pid, data_type, section);
++ break;
++
++ default:
++ fprintf(stderr, "SCT XXXX Unknown table_id:0x%02x (pid:0x%04x)\n",
++ section->table_id, pid);
++// hexdump(0, "SCT ", buf, len);
++ return;
++ }
++ }
++
++ printf("\n");
++}
++
++void parse_dvb_section(uint8_t *buf, int len, int pid, int data_type, struct section *section)
++{
++ struct section_ext *section_ext = NULL;
++
++ switch(section->table_id) {
++ case stag_dvb_network_information_actual:
++ case stag_dvb_network_information_other:
++ {
++ struct dvb_nit_section *nit;
++ struct descriptor *curd;
++ struct dvb_nit_section_part2 *part2;
++ struct dvb_nit_transport *cur_transport;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode NIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((nit = dvb_nit_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "SCT XXXX NIT section decode error\n");
++ return;
++ }
++ printf("SCT network_id:0x%04x\n", dvb_nit_section_network_id(nit));
++ dvb_nit_section_descriptors_for_each(nit, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ part2 = dvb_nit_section_part2(nit);
++ dvb_nit_section_transports_for_each(nit, part2, cur_transport) {
++ printf("\tSCT transport_stream_id:0x%04x original_network_id:0x%04x\n", cur_transport->transport_stream_id, cur_transport->original_network_id);
++ dvb_nit_transport_descriptors_for_each(cur_transport, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++ break;
++ }
++
++ case stag_dvb_service_description_actual:
++ case stag_dvb_service_description_other:
++ {
++ struct dvb_sdt_section *sdt;
++ struct dvb_sdt_service *cur_service;
++ struct descriptor *curd;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode SDT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((sdt = dvb_sdt_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "XXXX SDT section decode error\n");
++ return;
++ }
++ printf("SCT transport_stream_id:0x%04x original_network_id:0x%04x\n", dvb_sdt_section_transport_stream_id(sdt), sdt->original_network_id);
++ dvb_sdt_section_services_for_each(sdt, cur_service) {
++ printf("\tSCT service_id:0x%04x eit_schedule_flag:%i eit_present_following_flag:%i running_status:%i free_ca_mode:%i\n",
++ cur_service->service_id,
++ cur_service->eit_schedule_flag,
++ cur_service->eit_present_following_flag,
++ cur_service->running_status,
++ cur_service->free_ca_mode);
++ dvb_sdt_service_descriptors_for_each(cur_service, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++ break;
++ }
++
++ case stag_dvb_bouquet_association:
++ {
++ struct dvb_bat_section *bat;
++ struct descriptor *curd;
++ struct dvb_bat_section_part2 *part2;
++ struct dvb_bat_transport *cur_transport;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode BAT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((bat = dvb_bat_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "SCT XXXX BAT section decode error\n");
++ return;
++ }
++ printf("SCT bouquet_id:0x%04x\n", dvb_bat_section_bouquet_id(bat));
++ dvb_bat_section_descriptors_for_each(bat, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ part2 = dvb_bat_section_part2(bat);
++ dvb_bat_section_transports_for_each(part2, cur_transport) {
++ printf("\tSCT transport_stream_id:0x%04x original_network_id:0x%04x\n",
++ cur_transport->transport_stream_id,
++ cur_transport->original_network_id);
++ dvb_bat_transport_descriptors_for_each(cur_transport, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++ break;
++ }
++
++ case stag_dvb_update_notification:
++ case stag_dvb_ip_mac_notification:
++ {
++ struct dvb_int_section *_int;
++ struct descriptor *curd;
++ struct dvb_int_target *cur_target;
++ struct dvb_int_operational_loop *operational_loop;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode INT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((_int = dvb_int_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "XXXX INT section decode error\n");
++ return;
++ }
++ printf("SCT action_type:0x%02x platform_id_hash:0x%02x platform_id:0x%06x processing_order:0x%02x\n",
++ dvb_int_section_action_type(_int),
++ dvb_int_section_platform_id_hash(_int),
++ _int->platform_id,
++ _int->processing_order);
++ dvb_int_section_platform_descriptors_for_each(_int, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ dvb_int_section_target_loop_for_each(_int, cur_target) {
++ dvb_int_target_target_descriptors_for_each(cur_target, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ operational_loop = dvb_int_target_operational_loop(cur_target);
++ dvb_int_operational_loop_operational_descriptors_for_each(operational_loop, curd) {
++ parse_descriptor(curd, 3, data_type);
++ }
++ }
++
++ hexdump(0, "SCT ", buf, len);
++ getchar();
++ break;
++ }
++
++ case stag_dvb_event_information_nownext_actual:
++ case stag_dvb_event_information_nownext_other:
++ case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57:
++ case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f:
++ case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67:
++ case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f:
++ {
++ struct dvb_eit_section *eit;
++ struct dvb_eit_event *cur_event;
++ struct descriptor *curd;
++ time_t start_time;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode EIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((eit = dvb_eit_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "XXXX EIT section decode error\n");
++ return;
++ }
++ printf("SCT service_id:0x%04x transport_stream_id:0x%04x original_network_id:0x%04x segment_last_section_number:0x%02x last_table_id:0x%02x\n",
++ dvb_eit_section_service_id(eit),
++ eit->transport_stream_id,
++ eit->original_network_id,
++ eit->segment_last_section_number,
++ eit->last_table_id);
++ dvb_eit_section_events_for_each(eit, cur_event) {
++ start_time = dvbdate_to_unixtime(cur_event->start_time);
++ printf("\tSCT event_id:0x%04x duration:%i running_status:%i free_ca_mode:%i start_time:%i -- %s",
++ cur_event->event_id,
++ dvbduration_to_seconds(cur_event->duration),
++ cur_event->running_status,
++ cur_event->free_ca_mode,
++ (int) start_time,
++ ctime(&start_time));
++ dvb_eit_event_descriptors_for_each(cur_event, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++ break;
++ }
++
++ case stag_dvb_time_date:
++ {
++ struct dvb_tdt_section *tdt;
++ time_t dvbtime;
++
++ printf("SCT Decode TDT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((tdt = dvb_tdt_section_codec(section)) == NULL) {
++ fprintf(stderr, "XXXX TDT section decode error\n");
++ return;
++ }
++ dvbtime = dvbdate_to_unixtime(tdt->utc_time);
++ printf("SCT Time: %i -- %s", (int) dvbtime, ctime(&dvbtime));
++ break;
++ }
++
++ case stag_dvb_running_status:
++ {
++ struct dvb_rst_section *rst;
++ struct dvb_rst_status *cur_status;
++
++ printf("SCT Decode RST (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((rst = dvb_rst_section_codec(section)) == NULL) {
++ fprintf(stderr, "SCT XXXX RST section decode error\n");
++ return;
++ }
++ dvb_rst_section_statuses_for_each(rst, cur_status) {
++ printf("\tSCT transport_stream_id:0x%04x original_network_id:0x%04x service_id:0x%04x event_id:0x%04x running_status:%i\n",
++ cur_status->transport_stream_id,
++ cur_status->original_network_id,
++ cur_status->service_id,
++ cur_status->event_id,
++ cur_status->running_status);
++ }
++
++// hexdump(0, "SCT ", buf, len);
++// getchar();
++ break;
++ }
++
++ case stag_dvb_stuffing:
++ {
++ struct dvb_st_section *st;
++
++ printf("SCT Decode ST (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((st = dvb_st_section_codec(section)) == NULL) {
++ fprintf(stderr, "SCT XXXX ST section decode error\n");
++ return;
++ }
++ printf("SCT Length: %i\n", dvb_st_section_data_length(st));
++ break;
++ }
++
++ case stag_dvb_time_offset:
++ {
++ struct dvb_tot_section *tot;
++ struct descriptor *curd;
++ time_t dvbtime;
++
++ if (section_check_crc(section))
++ return;
++ printf("SCT Decode TOT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((tot = dvb_tot_section_codec(section)) == NULL) {
++ fprintf(stderr, "SCT XXXX TOT section decode error\n");
++ return;
++ }
++ dvbtime = dvbdate_to_unixtime(tot->utc_time);
++ printf("SCT utc_time: %i -- %s", (int) dvbtime, ctime(&dvbtime));
++ dvb_tot_section_descriptors_for_each(tot, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ break;
++ }
++
++ case stag_dvb_tva_container:
++ {
++ struct dvb_tva_container_section *tva;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode tva (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((tva = dvb_tva_container_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "SCT XXXX tva section decode error\n");
++ return;
++ }
++ printf("SCT container_id:%04x\n",
++ dvb_tva_container_section_container_id(tva));
++ hexdump(0, "SCT ", dvb_tva_container_section_data(tva), dvb_tva_container_section_data_length(tva));
++
++ hexdump(0, "SCT ", buf, len);
++ getchar();
++ break;
++ }
++
++ case stag_dvb_discontinuity_information:
++ {
++ struct dvb_dit_section *dit;
++
++ printf("SCT Decode DIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((dit = dvb_dit_section_codec(section)) == NULL) {
++ fprintf(stderr, "SCT XXXX DIT section decode error\n");
++ return;
++ }
++ printf("SCT transition_flag:%i\n", dit->transition_flag);
++
++// hexdump(0, "SCT ", buf, len);
++// getchar();
++ break;
++ }
++
++ case stag_dvb_selection_information:
++ {
++ struct dvb_sit_section *sit;
++ struct descriptor *curd;
++ struct dvb_sit_service *cur_service;
++
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ printf("SCT Decode SIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((sit = dvb_sit_section_codec(section_ext)) == NULL) {
++ fprintf(stderr, "SCT XXXX SIT section decode error\n");
++ return;
++ }
++ dvb_sit_section_descriptors_for_each(sit, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ dvb_sit_section_services_for_each(sit, cur_service) {
++ printf("\tSCT service_id:0x%04x running_status:%i\n", cur_service->service_id, cur_service->running_status);
++ dvb_sit_service_descriptors_for_each(cur_service, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++
++ hexdump(0, "SCT ", buf, len);
++ getchar();
++ break;
++ }
++
++ default:
++ fprintf(stderr, "SCT XXXX Unknown table_id:0x%02x (pid:0x%04x)\n", section->table_id, pid);
++// hexdump(0, "SCT ", buf, len);
++ return;
++ }
++}
++
++void parse_atsc_section(uint8_t *buf, int len, int pid, int data_type, struct section *section)
++{
++ struct section_ext *section_ext = NULL;
++ struct atsc_section_psip *section_psip = NULL;
++ if ((section_ext = section_ext_decode(section, 1)) == NULL) {
++ return;
++ }
++ if ((section_psip = atsc_section_psip_decode(section_ext)) == NULL) {
++ return;
++ }
++
++ printf("SCT protocol_version:%i\n", section_psip->protocol_version);
++
++ switch(section->table_id) {
++ case stag_atsc_master_guide:
++ {
++ struct atsc_mgt_section *mgt;
++ struct atsc_mgt_table *cur_table;
++ struct atsc_mgt_section_part2 *part2;
++ struct descriptor *curd;
++ int idx;
++
++ printf("SCT Decode MGT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((mgt = atsc_mgt_section_codec(section_psip)) == NULL) {
++ fprintf(stderr, "SCT XXXX MGT section decode error\n");
++ return;
++ }
++ atsc_mgt_section_tables_for_each(mgt, cur_table, idx) {
++ printf("\tSCT table_type:0x%04x table_type_PID:%04x table_type_version_number:%i number_bytes:%i\n",
++ cur_table->table_type,
++ cur_table->table_type_PID,
++ cur_table->table_type_version_number,
++ cur_table->number_bytes);
++ atsc_mgt_table_descriptors_for_each(cur_table, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++
++ part2 = atsc_mgt_section_part2(mgt);
++ atsc_mgt_section_part2_descriptors_for_each(part2, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ break;
++ }
++
++ case stag_atsc_terrestrial_virtual_channel:
++ {
++ struct atsc_tvct_section *tvct;
++ struct atsc_tvct_channel *cur_channel;
++ struct atsc_tvct_section_part2 *part2;
++ struct descriptor *curd;
++ int idx;
++
++ printf("SCT Decode TVCT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((tvct = atsc_tvct_section_codec(section_psip)) == NULL) {
++ fprintf(stderr, "SCT XXXX TVCT section decode error\n");
++ return;
++ }
++ printf("\tSCT tranport_stream_id:0x%04x\n",
++ atsc_tvct_section_transport_stream_id(tvct));
++
++ atsc_tvct_section_channels_for_each(tvct, cur_channel, idx) {
++ hexdump(0, "SCT short_name ", (uint8_t*) cur_channel->short_name, 7*2);
++
++ printf("\tSCT major_channel_number:%04x minor_channel_number:%04x modulation_mode:%02x carrier_frequency:%i channel_TSID:%04x program_number:%04x ETM_location:%i access_controlled:%i hidden:%i hide_guide:%i service_type:%02x source_id:%04x\n",
++ cur_channel->major_channel_number,
++ cur_channel->minor_channel_number,
++ cur_channel->modulation_mode,
++ cur_channel->carrier_frequency,
++ cur_channel->channel_TSID,
++ cur_channel->program_number,
++ cur_channel->ETM_location,
++ cur_channel->access_controlled,
++ cur_channel->hidden,
++ cur_channel->hide_guide,
++ cur_channel->service_type,
++ cur_channel->source_id);
++ atsc_tvct_channel_descriptors_for_each(cur_channel, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++
++ part2 = atsc_tvct_section_part2(tvct);
++ atsc_tvct_section_part2_descriptors_for_each(part2, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ break;
++ }
++
++ case stag_atsc_cable_virtual_channel:
++ {
++ struct atsc_cvct_section *cvct;
++ struct atsc_cvct_channel *cur_channel;
++ struct atsc_cvct_section_part2 *part2;
++ struct descriptor *curd;
++ int idx;
++
++ printf("SCT Decode CVCT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((cvct = atsc_cvct_section_codec(section_psip)) == NULL) {
++ fprintf(stderr, "SCT XXXX CVCT section decode error\n");
++ return;
++ }
++ printf("\tSCT tranport_stream_id:0x%04x\n",
++ atsc_cvct_section_transport_stream_id(cvct));
++
++ atsc_cvct_section_channels_for_each(cvct, cur_channel, idx) {
++ hexdump(0, "SCT short_name ", (uint8_t*) cur_channel->short_name, 7*2);
++
++ printf("\tSCT major_channel_number:%04x minor_channel_number:%04x modulation_mode:%02x carrier_frequency:%i channel_TSID:%04x program_number:%04x ETM_location:%i access_controlled:%i hidden:%i path_select:%i out_of_band:%i hide_guide:%i service_type:%02x source_id:%04x\n",
++ cur_channel->major_channel_number,
++ cur_channel->minor_channel_number,
++ cur_channel->modulation_mode,
++ cur_channel->carrier_frequency,
++ cur_channel->channel_TSID,
++ cur_channel->program_number,
++ cur_channel->ETM_location,
++ cur_channel->access_controlled,
++ cur_channel->hidden,
++ cur_channel->path_select,
++ cur_channel->out_of_band,
++ cur_channel->hide_guide,
++ cur_channel->service_type,
++ cur_channel->source_id);
++ atsc_cvct_channel_descriptors_for_each(cur_channel, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++
++ part2 = atsc_cvct_section_part2(cvct);
++ atsc_cvct_section_part2_descriptors_for_each(part2, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++ break;
++ }
++
++ case stag_atsc_rating_region:
++ {
++ struct atsc_rrt_section *rrt;
++ struct atsc_rrt_section_part2 *part2;
++ struct atsc_rrt_dimension *cur_dimension;
++ struct atsc_rrt_dimension_part2 *dpart2;
++ struct atsc_rrt_dimension_value *cur_value;
++ struct atsc_rrt_dimension_value_part2 *vpart2;
++ struct atsc_rrt_section_part3 *part3;
++ struct descriptor *curd;
++ int didx;
++ int vidx;
++
++ printf("SCT Decode RRT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((rrt = atsc_rrt_section_codec(section_psip)) == NULL) {
++ fprintf(stderr, "SCT XXXX RRT section decode error\n");
++ return;
++ }
++ printf("\tSCT rating_region:0x%02x\n",
++ atsc_rrt_section_rating_region(rrt));
++ atsctextdump("SCT region_name:", 1,
++ atsc_rrt_section_rating_region_name_text(rrt),
++ rrt->rating_region_name_length);
++
++ part2 = atsc_rrt_section_part2(rrt);
++ atsc_rrt_section_dimensions_for_each(part2, cur_dimension, didx) {
++ atsctextdump("SCT dimension_name:", 2,
++ atsc_rrt_dimension_name_text(cur_dimension),
++ cur_dimension->dimension_name_length);
++
++ dpart2 = atsc_rrt_dimension_part2(cur_dimension);
++ printf("\tSCT graduated_scale:%i\n",
++ dpart2->graduated_scale);
++
++ atsc_rrt_dimension_part2_values_for_each(dpart2, cur_value, vidx) {
++ atsctextdump("SCT value_abbrev_name:", 3,
++ atsc_rrt_dimension_value_abbrev_rating_value_text(cur_value),
++ cur_value->abbrev_rating_value_length);
++
++ vpart2 = atsc_rrt_dimension_value_part2(cur_value);
++ atsctextdump("SCT value_text:", 3,
++ atsc_rrt_dimension_value_part2_rating_value_text(vpart2),
++ vpart2->rating_value_length);
++ }
++ }
++
++ part3 = atsc_rrt_section_part3(part2);
++ atsc_rrt_section_part3_descriptors_for_each(part3, curd) {
++ parse_descriptor(curd, 1, data_type);
++ }
++
++ hexdump(0, "SCT ", buf, len);
++ getchar();
++ break;
++ }
++
++ case stag_atsc_event_information:
++ {
++ struct atsc_eit_section *eit;
++ struct atsc_eit_event *cur_event;
++ struct atsc_eit_event_part2 *part2;
++ struct descriptor *curd;
++ int idx;
++
++ printf("SCT Decode EIT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((eit = atsc_eit_section_codec(section_psip)) == NULL) {
++ fprintf(stderr, "SCT XXXX EIT section decode error\n");
++ return;
++ }
++ printf("\tSCT source_id:0x%04x\n",
++ atsc_eit_section_source_id(eit));
++
++ atsc_eit_section_events_for_each(eit, cur_event, idx) {
++ printf("\t\tSCT event_id:%04x start_time:%i ETM_location:%i length_in_secs:%i\n",
++ cur_event->event_id,
++ cur_event->start_time,
++ cur_event->ETM_location,
++ cur_event->length_in_seconds);
++
++ atsctextdump("SCT title:", 2,
++ atsc_eit_event_name_title_text(cur_event),
++ cur_event->title_length);
++
++ part2 = atsc_eit_event_part2(cur_event);
++
++ atsc_eit_event_part2_descriptors_for_each(part2, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ }
++ break;
++ }
++
++ case stag_atsc_extended_text:
++ {
++ struct atsc_ett_section *ett;
++
++ printf("SCT Decode ETT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((ett = atsc_ett_section_codec(section_psip)) == NULL) {
++ fprintf(stderr, "SCT XXXX ETT section decode error\n");
++ return;
++ }
++ printf("\tSCT ETM_source_id:0x%04x ETM_sub_id:%04x ETM_type:%02x\n",
++ ett->ETM_source_id,
++ ett->ETM_sub_id,
++ ett->ETM_type);
++ atsctextdump("SCT text:", 1,
++ atsc_ett_section_extended_text_message(ett),
++ atsc_ett_section_extended_text_message_length(ett));
++ break;
++ }
++
++ case stag_atsc_system_time:
++ {
++ struct atsc_stt_section *stt;
++ struct descriptor *curd;
++
++ printf("SCT Decode STT (pid:0x%04x) (table:0x%02x)\n", pid, section->table_id);
++ if ((stt = atsc_stt_section_codec(section_psip)) == NULL) {
++ fprintf(stderr, "SCT XXXX STT section decode error\n");
++ return;
++ }
++ printf("\tSCT system_time:%i gps_utc_offset:%i DS_status:%i DS_day_of_month:%i DS_hour:%i\n",
++ stt->system_time,
++ stt->gps_utc_offset,
++ stt->DS_status,
++ stt->DS_day_of_month,
++ stt->DS_hour);
++ atsc_stt_section_descriptors_for_each(stt, curd) {
++ parse_descriptor(curd, 2, data_type);
++ }
++ break;
++ }
++
++ default:
++ fprintf(stderr, "SCT XXXX Unknown table_id:0x%02x (pid:0x%04x)\n", section->table_id, pid);
++ hexdump(0, "SCT ", buf, len);
++ return;
++ }
++}
++
++void parse_descriptor(struct descriptor *d, int indent, int data_type)
++{
++ switch(d->tag) {
++ case dtag_mpeg_video_stream:
++ {
++ struct mpeg_video_stream_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_video_stream_descriptor\n");
++ dx = mpeg_video_stream_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_video_stream_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC multiple_frame_rate_flag:%i frame_rate_code:%i mpeg_1_only_flag:%i constrained_parameter_flag:%i still_picture_flag:%i\n",
++ dx->multiple_frame_rate_flag,
++ dx->frame_rate_code,
++ dx->mpeg_1_only_flag,
++ dx->constrained_parameter_flag,
++ dx->still_picture_flag);
++ if (!dx->mpeg_1_only_flag) {
++ struct mpeg_video_stream_extra *extra = mpeg_video_stream_descriptor_extra(dx);
++ iprintf(indent, "DSC profile_and_level_indication:0x%02x chroma_format:%i frame_rate_extension:%i\n",
++ extra->profile_and_level_indication,
++ extra->chroma_format,
++ extra->frame_rate_extension);
++ }
++ break;
++ }
++
++ case dtag_mpeg_audio_stream:
++ {
++ struct mpeg_audio_stream_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_audio_stream_descriptor\n");
++ dx = mpeg_audio_stream_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_audio_stream_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC free_format_flag:%i id:%i layer:%i variable_rate_audio_indicator:%i\n",
++ dx->free_format_flag,
++ dx->id,
++ dx->layer,
++ dx->variable_rate_audio_indicator);
++ break;
++ }
++
++ case dtag_mpeg_hierarchy:
++ {
++ struct mpeg_hierarchy_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_hierarchy_descriptor\n");
++ dx = mpeg_hierarchy_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_hierarchy_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC hierarchy_type:%i hierarchy_layer_index:%i hierarchy_embedded_layer_index:%i hierarchy_channel:%i\n",
++ dx->hierarchy_type,
++ dx->hierarchy_layer_index,
++ dx->hierarchy_embedded_layer_index,
++ dx->hierarchy_channel);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_registration:
++ {
++ struct mpeg_registration_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_registration_descriptor\n");
++ dx = mpeg_registration_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_registration_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC format_identifier:0x%x\n",
++ dx->format_identifier);
++ iprintf(indent, "DSC additional_id_info:\n");
++ hexdump(indent, "DSC ",
++ mpeg_registration_descriptor_additional_id_info(dx),
++ mpeg_registration_descriptor_additional_id_info_length(dx));
++ break;
++ }
++
++ case dtag_mpeg_data_stream_alignment:
++ {
++ struct mpeg_data_stream_alignment_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_data_stream_alignment_descriptor\n");
++ dx = mpeg_data_stream_alignment_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_data_stream_alignment_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC alignment_type:%i\n",
++ dx->alignment_type);
++ break;
++ }
++
++ case dtag_mpeg_target_background_grid:
++ {
++ struct mpeg_target_background_grid_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_target_background_grid_descriptor\n");
++ dx = mpeg_target_background_grid_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_target_background_grid_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC horizontal_size:%i vertical_size:%i aspect_ratio_information:%i\n",
++ dx->horizontal_size,
++ dx->vertical_size,
++ dx->aspect_ratio_information);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_video_window:
++ {
++ struct mpeg_video_window_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_video_window_descriptor\n");
++ dx = mpeg_video_window_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_video_window_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC horizontal_offset:%i vertical_offset:%i window_priority:%i\n",
++ dx->horizontal_offset,
++ dx->vertical_offset,
++ dx->window_priority);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_ca:
++ {
++ struct mpeg_ca_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_ca_descriptor\n");
++ dx = mpeg_ca_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_ca_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC ca_system_id:0x%04x ca_pid:0x%04x\n",
++ dx->ca_system_id,
++ dx->ca_pid);
++ iprintf(indent, "DSC data:\n");
++ hexdump(indent, "DSC ", mpeg_ca_descriptor_data(dx), mpeg_ca_descriptor_data_length(dx));
++ break;
++ }
++
++ case dtag_mpeg_iso_639_language:
++ {
++ struct mpeg_iso_639_language_descriptor *dx;
++ struct mpeg_iso_639_language_code *cur_lang;
++
++ iprintf(indent, "DSC Decode mpeg_iso_639_language_descriptor\n");
++ dx = mpeg_iso_639_language_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_iso_639_language_descriptor decode error\n");
++ return;
++ }
++ mpeg_iso_639_language_descriptor_languages_for_each(dx, cur_lang) {
++ iprintf(indent+1, "DSC language_code:%.3s audio_type:0x%02x\n",
++ cur_lang->language_code,
++ cur_lang->audio_type);
++ }
++ break;
++ }
++
++ case dtag_mpeg_system_clock:
++ {
++ struct mpeg_system_clock_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_system_clock_descriptor\n");
++ dx = mpeg_system_clock_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_system_clock_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC external_clock_reference_indicator:%i clock_accuracy_integer:%i clock_accuracy_exponent:%i\n",
++ dx->external_clock_reference_indicator,
++ dx->clock_accuracy_integer,
++ dx->clock_accuracy_exponent);
++ break;
++ }
++
++ case dtag_mpeg_multiplex_buffer_utilization:
++ {
++ struct mpeg_multiplex_buffer_utilization_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_multiplex_buffer_utilization_descriptor\n");
++ dx = mpeg_multiplex_buffer_utilization_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_multiplex_buffer_utilization_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC bound_valid_flag:%i ltw_offset_lower_bound:%i ltw_offset_upper_bound:%i\n",
++ dx->bound_valid_flag,
++ dx->ltw_offset_lower_bound,
++ dx->ltw_offset_upper_bound);
++ break;
++ }
++
++ case dtag_mpeg_copyright:
++ {
++ struct mpeg_copyright_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_copyright_descriptor\n");
++ dx = mpeg_copyright_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_copyright_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC copyright_identifier:0x%08x\n",
++ dx->copyright_identifier);
++ iprintf(indent, "DSC data:\n");
++ hexdump(indent, "DSC ", mpeg_copyright_descriptor_data(dx), mpeg_copyright_descriptor_data_length(dx));
++ break;
++ }
++
++ case dtag_mpeg_maximum_bitrate:
++ {
++ struct mpeg_maximum_bitrate_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_maximum_bitrate_descriptor\n");
++ dx = mpeg_maximum_bitrate_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_maximum_bitrate_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC maximum_bitrate:%i\n",
++ dx->maximum_bitrate);
++ break;
++ }
++
++ case dtag_mpeg_private_data_indicator:
++ {
++ struct mpeg_private_data_indicator_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_private_data_indicator_descriptor\n");
++ dx = mpeg_private_data_indicator_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_private_data_indicator_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC private_data_indicator:0x%x\n",
++ dx->private_data_indicator);
++ break;
++ }
++
++ case dtag_mpeg_smoothing_buffer:
++ {
++ struct mpeg_smoothing_buffer_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_smoothing_buffer_descriptor\n");
++ dx = mpeg_smoothing_buffer_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_smoothing_buffer_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC sb_leak_rate:%i sb_size:%i\n",
++ dx->sb_leak_rate,
++ dx->sb_size);
++ break;
++ }
++
++ case dtag_mpeg_std:
++ {
++ struct mpeg_std_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_std_descriptor\n");
++ dx = mpeg_std_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_std_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC leak_valid_flag:%i\n",
++ dx->leak_valid_flag);
++ break;
++ }
++
++ case dtag_mpeg_ibp:
++ {
++ struct mpeg_ibp_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_ibp_descriptor\n");
++ dx = mpeg_ibp_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_ibp_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC closed_gop_flag:%i identical_gop_flag:%i max_gop_length:%i\n",
++ dx->closed_gop_flag, dx->identical_gop_flag, dx->max_gop_length);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_4_video:
++ {
++ struct mpeg4_video_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg4_video_descriptor\n");
++ dx = mpeg4_video_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg4_video_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC mpeg4_visual_profile_and_level:0x%02x\n",
++ dx->mpeg4_visual_profile_and_level);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_4_audio:
++ {
++ struct mpeg4_audio_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg4_audio_descriptor\n");
++ dx = mpeg4_audio_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg4_audio_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC mpeg4_audio_profile_and_level:0x%02x\n",
++ dx->mpeg4_audio_profile_and_level);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_iod:
++ {
++ struct mpeg_iod_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_iod_descriptor\n");
++ dx = mpeg_iod_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_iod_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC scope_of_iod_label:0x%08x iod_label:0x%02x\n",
++ dx->scope_of_iod_label, dx->iod_label);
++ iprintf(indent, "DSC iod:\n");
++ hexdump(indent, "DSC ", mpeg_iod_descriptor_iod(dx), mpeg_iod_descriptor_iod_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_sl:
++ {
++ struct mpeg_sl_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_sl_descriptor\n");
++ dx = mpeg_sl_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_sl_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC es_id:0x%04x\n",
++ dx->es_id);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_fmc:
++ {
++ struct mpeg_fmc_descriptor *dx;
++ struct mpeg_flex_mux *cur_fm;
++
++ iprintf(indent, "DSC Decode mpeg_fmc_descriptor\n");
++ dx = mpeg_fmc_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_fmc_descriptor_descriptor decode error\n");
++ return;
++ }
++ mpeg_fmc_descriptor_muxes_for_each(dx, cur_fm) {
++ iprintf(indent+1, "DSC es_id:0x%04x flex_mux_channel:0x%02x\n",
++ cur_fm->es_id,
++ cur_fm->flex_mux_channel);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_external_es_id:
++ {
++ struct mpeg_external_es_id_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_external_es_id_descriptor\n");
++ dx = mpeg_external_es_id_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_external_es_id_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC external_es_id:0x%04x\n",
++ dx->external_es_id);
++ break;
++ }
++
++ case dtag_mpeg_muxcode:
++ {
++ struct mpeg_muxcode_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_muxcode_descriptor\n");
++ dx = mpeg_muxcode_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_muxcode_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC entries:\n");
++ hexdump(indent, "DSC ", mpeg_muxcode_descriptor_entries(dx), mpeg_muxcode_descriptor_entries_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_fmxbuffer_size:
++ {
++ struct mpeg_fmxbuffer_size_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_fmxbuffer_size_descriptor\n");
++ dx = mpeg_fmxbuffer_size_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_fmxbuffer_size_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC descriptors:\n");
++ hexdump(indent, "DSC ", mpeg_fmxbuffer_size_descriptor_descriptors(dx), mpeg_fmxbuffer_size_descriptor_descriptors_length(dx));
++ break;
++ }
++
++ case dtag_mpeg_multiplex_buffer:
++ {
++ struct mpeg_multiplex_buffer_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_multiplex_buffer_descriptor\n");
++ dx = mpeg_multiplex_buffer_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_multiplex_buffer_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC mb_buffer_size:%i tb_leak_rate:%i\n",
++ dx->mb_buffer_size, dx->tb_leak_rate);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_content_labelling:
++ {
++ struct mpeg_content_labelling_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_content_labelling_descriptor\n");
++ dx = mpeg_content_labelling_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_content_labelling_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC metadata_application_format:%04x\n",
++ dx->metadata_application_format);
++ struct mpeg_content_labelling_descriptor_application_format_identifier *id =
++ mpeg_content_labelling_descriptor_id(dx);
++ if (id != NULL) {
++ iprintf(indent, "DSC application_format_id:%04x\n",
++ id->id);
++ }
++ struct mpeg_content_labelling_descriptor_flags *flags =
++ mpeg_content_labelling_descriptor_flags(dx);
++ if (flags != NULL) {
++ iprintf(indent, "DSC content_reference_id_record_flag:%i content_time_base_indicator:%02x\n",
++ flags->content_reference_id_record_flag,
++ flags->content_time_base_indicator);
++
++ struct mpeg_content_labelling_descriptor_reference_id *reference_id =
++ mpeg_content_labelling_descriptor_reference_id(flags);
++ if (reference_id != NULL) {
++ hexdump(indent, "DSC reference_id " ,
++ mpeg_content_reference_id_data(reference_id),
++ reference_id->content_reference_id_record_length);
++ }
++
++ struct mpeg_content_labelling_descriptor_time_base *time_base =
++ mpeg_content_labelling_descriptor_time_base(flags);
++ if (time_base != NULL) {
++ iprintf(indent, "DSC time_base content_time_base_value:%lli metadata_time_base_value:%lli\n",
++ time_base->content_time_base_value,
++ time_base->metadata_time_base_value);
++ }
++
++ struct mpeg_content_labelling_descriptor_content_id *content_id =
++ mpeg_content_labelling_descriptor_content_id(flags);
++ if (content_id != NULL) {
++ iprintf(indent, "DSC content_id contentId:%i\n",
++ content_id->contentId);
++ }
++
++ struct mpeg_content_labelling_descriptor_time_base_association *time_base_assoc =
++ mpeg_content_labelling_descriptor_time_base_assoc(flags);
++ if (time_base_assoc != NULL) {
++ hexdump(indent, "DSC time_base_assoc" ,
++ mpeg_time_base_association_data(time_base_assoc),
++ time_base_assoc->time_base_association_data_length);
++ }
++
++ uint8_t *priv;
++ int priv_length;
++ priv = mpeg_content_labelling_descriptor_data(dx, flags, &priv_length);
++ hexdump(indent, "DSC private_data", priv, priv_length);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_metadata_pointer:
++ {
++ struct mpeg_metadata_pointer_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_metadata_pointer_descriptor\n");
++ dx = mpeg_metadata_pointer_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_metadata_pointer_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC metadata_application_format:%04x\n",
++ dx->metadata_application_format);
++
++ struct mpeg_metadata_pointer_descriptor_application_format_identifier *id =
++ mpeg_metadata_pointer_descriptor_appid(dx);
++ if (id != NULL) {
++ iprintf(indent, "DSC application_format_id:%04x\n",
++ id->id);
++ }
++
++ struct mpeg_metadata_pointer_descriptor_format_identifier *did =
++ mpeg_metadata_pointer_descriptor_formid(dx);
++ if (did != NULL) {
++ iprintf(indent, "DSC mpeg_metadata_pointer_descriptor_format_id:%04x\n",
++ did->id);
++ }
++
++ struct mpeg_metadata_pointer_descriptor_flags *flags =
++ mpeg_metadata_pointer_descriptor_flags(dx);
++ if (flags != NULL) {
++ iprintf(indent, "DSC metadata_service_id:%i metadata_locator_record_flag:%i mpeg_carriage_flags:%x\n",
++ flags->metadata_service_id,
++ flags->metadata_locator_record_flag,
++ flags->mpeg_carriage_flags);
++
++ struct mpeg_metadata_pointer_descriptor_locator *locator =
++ mpeg_metadata_pointer_descriptor_locator(flags);
++ if (locator != NULL) {
++ hexdump(indent, "DSC locator" ,
++ mpeg_metadata_pointer_descriptor_locator_data(locator),
++ locator->metadata_locator_record_length);
++ }
++
++ struct mpeg_metadata_pointer_descriptor_program_number *pnum=
++ mpeg_metadata_pointer_descriptor_program_number(flags);
++ if (pnum != NULL) {
++ iprintf(indent, "DSC program_number number:%04x\n",
++ pnum->number);
++ }
++
++ struct mpeg_metadata_pointer_descriptor_carriage *carriage =
++ mpeg_metadata_pointer_descriptor_carriage(flags);
++ if (carriage != NULL) {
++ iprintf(indent, "DSC carriage transport_stream_location:%04x transport_stream_id:%04x\n",
++ carriage->transport_stream_location,
++ carriage->transport_stream_id);
++ }
++
++ uint8_t *priv;
++ int priv_length;
++ priv = mpeg_metadata_pointer_descriptor_private_data(dx, flags, &priv_length);
++ hexdump(indent, "DSC private_data" , priv, priv_length);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_metadata:
++ {
++ struct mpeg_metadata_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_metadata_descriptor\n");
++ dx = mpeg_metadata_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_metadata_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC metadata_application_format:%04x\n",
++ dx->metadata_application_format);
++
++ struct mpeg_metadata_descriptor_application_format_identifier *id =
++ mpeg_metadata_descriptor_appid(dx);
++ if (id != NULL) {
++ iprintf(indent, "DSC application_format_id:%04x\n",
++ id->id);
++ }
++
++ struct mpeg_metadata_descriptor_format_identifier *did =
++ mpeg_metadata_descriptor_formid(dx);
++ if (did != NULL) {
++ iprintf(indent, "DSC mpeg_metadata_descriptor_format_id:%04x\n",
++ did->id);
++ }
++
++ struct mpeg_metadata_descriptor_flags *flags =
++ mpeg_metadata_descriptor_flags(dx);
++ if (flags != NULL) {
++ iprintf(indent, "DSC metadata_service_id:%i decoder_config_flags:%i dsm_cc_flag:%x\n",
++ flags->metadata_service_id,
++ flags->decoder_config_flags,
++ flags->dsm_cc_flag);
++
++ struct mpeg_metadata_descriptor_service_identifier *serviceid=
++ mpeg_metadata_descriptor_sevice_identifier(flags);
++ if (serviceid != NULL) {
++ hexdump(indent, "DSC service_id" ,
++ mpeg_metadata_descriptor_service_identifier_data(serviceid),
++ serviceid->service_identification_length);
++ }
++
++ struct mpeg_metadata_descriptor_decoder_config *dconfig=
++ mpeg_metadata_descriptor_decoder_config(flags);
++ if (dconfig != NULL) {
++ hexdump(indent, "DSC decoder_config" ,
++ mpeg_metadata_descriptor_decoder_config_data(dconfig),
++ dconfig->decoder_config_length);
++ }
++
++ struct mpeg_metadata_descriptor_decoder_config_id_record *dconfigid=
++ mpeg_metadata_descriptor_decoder_config_id_record(flags);
++ if (dconfigid != NULL) {
++ hexdump(indent, "DSC decoder_config" ,
++ mpeg_metadata_descriptor_decoder_config_id_record_data(dconfigid),
++ dconfigid->decoder_config_id_record_length);
++ }
++
++ struct mpeg_metadata_descriptor_decoder_config_service_id *dserviceid=
++ mpeg_metadata_descriptor_decoder_config_service_id(flags);
++ if (dserviceid != NULL) {
++ iprintf(indent, "DSC decoder config service_id:%04x\n",
++ dserviceid->decoder_config_metadata_service_id);
++ }
++
++ struct mpeg_metadata_descriptor_decoder_config_reserved *reserved=
++ mpeg_metadata_descriptor_decoder_config_reserved(flags);
++ if (reserved != NULL) {
++ hexdump(indent, "DSC reserved" ,
++ mpeg_metadata_descriptor_decoder_config_reserved_data(reserved),
++ reserved->reserved_data_length);
++ }
++
++ uint8_t *priv;
++ int priv_length;
++ priv = mpeg_metadata_descriptor_private_data(dx, flags, &priv_length);
++ hexdump(indent, "DSC private_data" , priv, priv_length);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_mpeg_metadata_std:
++ {
++ struct mpeg_metadata_std_descriptor *dx;
++
++ iprintf(indent, "DSC Decode mpeg_metadata_std_descriptor\n");
++ dx = mpeg_metadata_std_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX mpeg_metadata_std_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC metadata_input_leak_rate:%i metadata_buffer_size:%i metadata_output_leak_rate:%i\n",
++ dx->metadata_input_leak_rate,
++ dx->metadata_buffer_size,
++ dx->metadata_output_leak_rate);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ default:
++ switch(data_type) {
++ case DATA_TYPE_DVB:
++ parse_dvb_descriptor(d, indent, data_type);
++ return;
++
++ case DATA_TYPE_ATSC:
++ parse_atsc_descriptor(d, indent, data_type);
++ return;
++
++ default:
++ fprintf(stderr, "DSC XXXX Unknown descriptor_tag:0x%02x\n", d->tag);
++ hexdump(0, "DSC ", (uint8_t*) d, d->len+2);
++ return;
++ }
++ }
++}
++
++void parse_dvb_descriptor(struct descriptor *d, int indent, int data_type)
++{
++ (void) data_type;
++
++ switch(d->tag) {
++ case dtag_dvb_network_name:
++ {
++ struct dvb_network_name_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_network_name_descriptor\n");
++ dx = dvb_network_name_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_network_name_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC name:%.*s\n",
++ dvb_network_name_descriptor_name_length(dx),
++ dvb_network_name_descriptor_name(dx));
++ break;
++ }
++
++ case dtag_dvb_service_list:
++ {
++ struct dvb_service_list_descriptor *dx;
++ struct dvb_service_list_service *curs;
++
++ iprintf(indent, "DSC Decode dvb_service_list_descriptor\n");
++ dx = dvb_service_list_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_service_list_descriptor decode error\n");
++ return;
++ }
++ dvb_service_list_descriptor_services_for_each(dx, curs) {
++ iprintf(indent+1, "DSC service_id:0x%04x service_type:0x%02x\n",
++ curs->service_id, curs->service_type);
++ }
++ break;
++ }
++
++ case dtag_dvb_stuffing:
++ {
++ struct dvb_stuffing_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_stuffing_descriptor\n");
++ dx = dvb_stuffing_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_stuffing_descriptor decode error\n");
++ return;
++ }
++ hexdump(indent, "DSC",
++ dvb_stuffing_descriptor_data(dx),
++ dvb_stuffing_descriptor_data_length(dx));
++ break;
++ }
++
++ case dtag_dvb_satellite_delivery_system:
++ {
++ struct dvb_satellite_delivery_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_satellite_delivery_descriptor\n");
++ dx = dvb_satellite_delivery_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_satellite_delivery_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC frequency:%i orbital_position:%i west_east:%i polarization:%i roll_off:%i modulation_system:%i modulation_type: %i symbol_rate:%i fec_inner:%i\n",
++ dx->frequency,
++ dx->orbital_position,
++ dx->west_east_flag,
++ dx->polarization,
++ dx->roll_off,
++ dx->modulation_system,
++ dx->modulation_type,
++ dx->symbol_rate,
++ dx->fec_inner);
++ break;
++ }
++
++ case dtag_dvb_cable_delivery_system:
++ {
++ struct dvb_cable_delivery_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_cable_delivery_descriptor\n");
++ dx = dvb_cable_delivery_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_cable_delivery_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC frequency:%i fec_outer:%i modulation:%i symbol_rate:%i fec_inner:%i\n",
++ dx->frequency, dx->fec_outer, dx->modulation,
++ dx->symbol_rate, dx->fec_inner);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_vbi_data:
++ {
++ struct dvb_vbi_data_descriptor *dx;
++ struct dvb_vbi_data_entry *cur;
++ struct dvb_vbi_data_x *curx;
++
++ iprintf(indent, "DSC Decode dvb_vbi_data_descriptor\n");
++ dx = dvb_vbi_data_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_vbi_data_descriptor decode error\n");
++ return;
++ }
++ dvb_vbi_data_descriptor_entries_for_each(dx, cur) {
++ curx = dvb_vbi_data_entry_data_x(cur);
++ iprintf(indent+1, "DSC data_service_id:0x%04x\n", cur->data_service_id);
++ if (cur == NULL) {
++ hexdump(indent+1, "DSC", dvb_vbi_data_entry_data(cur), cur->data_length);
++ } else {
++ iprintf(indent+1, "DSC field_parity:%i line_offset:%i\n",
++ curx->field_parity, curx->line_offset);
++ }
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_vbi_teletext:
++ {
++ struct dvb_vbi_teletext_descriptor *dx;
++ struct dvb_vbi_teletext_entry *cur;
++
++ iprintf(indent, "DSC Decode dvb_vbi_teletext_descriptor\n");
++ dx = dvb_vbi_teletext_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_vbi_teletext_descriptor decode error\n");
++ return;
++ }
++ dvb_vbi_teletext_descriptor_entries_for_each(dx, cur) {
++ iprintf(indent+1, "DSC language_code:%.3s type:%i magazine_number:%i page_number:%i\n",
++ cur->language_code,
++ cur->type, cur->magazine_number, cur->page_number);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_bouquet_name:
++ {
++ struct dvb_bouquet_name_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_bouquet_name_descriptor\n");
++ dx = dvb_bouquet_name_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_bouquet_name_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC name:%.*s\n",
++ dvb_bouquet_name_descriptor_name_length(dx),
++ dvb_bouquet_name_descriptor_name(dx));
++ break;
++ }
++
++ case dtag_dvb_service:
++ {
++ struct dvb_service_descriptor *dx;
++ struct dvb_service_descriptor_part2 *part2;
++
++ iprintf(indent, "DSC Decode dvb_service_descriptor\n");
++ dx = dvb_service_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_service_descriptor decode error\n");
++ return;
++ }
++ part2 = dvb_service_descriptor_part2(dx);
++ iprintf(indent, "DSC service_type:%02x provider_name:%.*s service_name:%.*s\n",
++ dx->service_type,
++ dx->service_provider_name_length,
++ dvb_service_descriptor_service_provider_name(dx),
++ part2->service_name_length,
++ dvb_service_descriptor_service_name(part2));
++ break;
++ }
++
++ case dtag_dvb_country_availability:
++ {
++ struct dvb_country_availability_descriptor *dx;
++ struct dvb_country_availability_entry *cur;
++
++ iprintf(indent, "DSC Decode dvb_country_availability_descriptor\n");
++ dx = dvb_country_availability_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_country_availability_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC country_availability_flag:%i\n", dx->country_availability_flag);
++ dvb_country_availability_descriptor_countries_for_each(dx, cur) {
++ iprintf(indent+1, "DSC country_code:%.3s\n", cur->country_code);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_linkage:
++ {
++ struct dvb_linkage_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_linkage_descriptor\n");
++ dx = dvb_linkage_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_linkage_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC transport_stream_id:0x%04x original_network_id:0x%04x service_id:0x%04x linkage_type:0x%02x\n",
++ dx->transport_stream_id, dx->original_network_id, dx->service_id, dx->linkage_type);
++ switch(dx->linkage_type) {
++ case 0x08:
++ {
++ struct dvb_linkage_data_08 *d08 = dvb_linkage_data_08(dx);
++ int network_id = dvb_linkage_data_08_network_id(dx, d08);
++ int initial_service_id = dvb_linkage_data_08_initial_service_id(dx, d08);
++ int length = 0;
++ uint8_t *data;
++
++ data = dvb_linkage_data_08_data(dx, d08, &length);
++ iprintf(indent, "DSC hand_over_type:%i origin_type:%i\n",
++ d08->hand_over_type, d08->origin_type);
++ if (network_id != -1) {
++ iprintf(indent, "DSC network_id:0x%04x\n", network_id);
++ }
++ if (initial_service_id != -1) {
++ iprintf(indent, "DSC initial_service_id:0x%04x\n", initial_service_id);
++ }
++ }
++
++ case 0x0b:
++ {
++ struct dvb_linkage_data_0b *data = dvb_linkage_data_0b(dx);
++ struct dvb_platform_id *platid;
++ struct dvb_platform_name *curplatname;
++
++ dvb_linkage_data_0b_platform_id_for_each(data, platid) {
++ iprintf(indent+1, "DSC platform_id:0x%06x\n", platid->platform_id);
++ dvb_platform_id_platform_name_for_each(platid, curplatname) {
++ iprintf(indent+2, "DSC language_code:%.3s platform_name:%.*s\n",
++ curplatname->language_code,
++ curplatname->platform_name_length, dvb_platform_name_text(curplatname));
++ }
++ }
++ break;
++ }
++
++ case 0x0c:
++ {
++ struct dvb_linkage_data_0c *data = dvb_linkage_data_0c(dx);
++
++ iprintf(indent, "DSC table_type:0x%02x\n", data->table_type);
++ if (dvb_linkage_data_0c_bouquet_id(data)) {
++ iprintf(indent, "DSC bouquet_id:0x%04x\n",
++ dvb_linkage_data_0c_bouquet_id(data));
++ }
++ break;
++ }
++
++ default:
++ hexdump(indent+1, "DSC", dvb_linkage_descriptor_data(dx), dvb_linkage_descriptor_data_length(dx));
++ break;
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_nvod_reference:
++ {
++ struct dvb_nvod_reference_descriptor *dx;
++ struct dvb_nvod_reference *cur;
++
++ iprintf(indent, "DSC Decode dvb_nvod_reference_descriptor\n");
++ dx = dvb_nvod_reference_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_nvod_reference_descriptor decode error\n");
++ return;
++ }
++ dvb_nvod_reference_descriptor_references_for_each(dx, cur) {
++ iprintf(indent+1, "DSC transport_stream_id:0x%04x original_network_id:0x%04x service_id:0x%04x\n",
++ cur->transport_stream_id, cur->original_network_id,
++ cur->service_id);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_time_shifted_service:
++ {
++ struct dvb_time_shifted_service_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_time_shifted_service_descriptor\n");
++ dx = dvb_time_shifted_service_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_time_shifted_service_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC reference_service_id:0x%04x\n", dx->reference_service_id);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_short_event:
++ {
++ struct dvb_short_event_descriptor *dx;
++ struct dvb_short_event_descriptor_part2 *part2;
++
++ iprintf(indent, "DSC Decode dvb_short_event_descriptor\n");
++ dx = dvb_short_event_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_short_event_descriptor decode error\n");
++ return;
++ }
++ part2 = dvb_short_event_descriptor_part2(dx);
++ iprintf(indent, "DSC language_code:%.3s event_name:%.*s text:%.*s\n",
++ dx->language_code,
++ dx->event_name_length, dvb_short_event_descriptor_event_name(dx),
++ part2->text_length, dvb_short_event_descriptor_text(part2));
++ break;
++ }
++
++ case dtag_dvb_extended_event:
++ {
++ struct dvb_extended_event_descriptor *dx;
++ struct dvb_extended_event_descriptor_part2 *part2;
++ struct dvb_extended_event_item *cur;
++
++ iprintf(indent, "DSC Decode dvb_extended_event_descriptor\n");
++ dx = dvb_extended_event_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_extended_event_descriptor decode error\n");
++ return;
++ }
++ part2 = dvb_extended_event_descriptor_part2(dx);
++ iprintf(indent, "DSC descriptor_number:%i last_descriptor_number:%i language_code:%.3s text:%.*s\n",
++ dx->descriptor_number, dx->last_descriptor_number,
++ dx->language_code,
++ part2->text_length, dvb_extended_event_descriptor_part2_text(part2));
++ dvb_extended_event_descriptor_items_for_each(dx, cur) {
++ struct dvb_extended_event_item_part2 *ipart2 =
++ dvb_extended_event_item_part2(cur);
++ iprintf(indent+1, "DSC description:%.*s item:%.*s\n",
++ cur->item_description_length, dvb_extended_event_item_description(cur),
++ ipart2->item_length, dvb_extended_event_item_part2_item(ipart2));
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_time_shifted_event:
++ {
++ struct dvb_time_shifted_event_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_time_shifted_event_descriptor\n");
++ dx = dvb_time_shifted_event_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_time_shifted_event_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC reference_service_id:0x%04x reference_event_id:0x%04x\n",
++ dx->reference_service_id, dx->reference_event_id);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_component:
++ {
++ struct dvb_component_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_component_descriptor\n");
++ dx = dvb_component_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_component_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC stream_content:%i component_type:%i component_tag: %i language_code:%.3s, text:%.*s\n",
++ dx->stream_content,
++ dx->component_type,
++ dx->component_tag,
++ dx->language_code,
++ dvb_component_descriptor_text_length(dx),
++ dvb_component_descriptor_text(dx));
++ break;
++ }
++
++ case dtag_dvb_mosaic:
++ {
++ struct dvb_mosaic_descriptor *dx;
++ struct dvb_mosaic_info *curinfo;
++
++ iprintf(indent, "DSC Decode dvb_mosaic_descriptor\n");
++ dx = dvb_mosaic_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_mosaic_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC mosaic_entry_point:%i number_of_horiz_elementary_cells:%i number_of_vert_elementary_cells:%i\n",
++ dx->mosaic_entry_point, dx->number_of_horiz_elementary_cells,
++ dx->number_of_vert_elementary_cells);
++ dvb_mosaic_descriptor_infos_for_each(dx, curinfo) {
++ struct dvb_mosaic_info_part2 *part2;
++ struct dvb_mosaic_linkage *linkage;
++ struct dvb_mosaic_elementary_cell_field *curfield;
++
++ part2 = dvb_mosaic_info_part2(curinfo);
++ linkage = dvb_mosaic_linkage(part2);
++ iprintf(indent+1, "DSC logical_cell_id:%i logical_cell_presentation_info:%i cell_linkage_info:0x%02x\n",
++ curinfo->logical_cell_id, curinfo->logical_cell_presentation_info,
++ part2->cell_linkage_info);
++ if (linkage) {
++ switch(part2->cell_linkage_info) {
++ case 0x01:
++ iprintf(indent+1, "DSC bouquet_id:0x%04x\n",
++ linkage->u.linkage_01.bouquet_id);
++ break;
++
++ case 0x02:
++ iprintf(indent+1, "DSC original_network_id:0x%04x transport_stream_id:0x%04x service_id:0x%04x\n",
++ linkage->u.linkage_02.original_network_id,
++ linkage->u.linkage_02.transport_stream_id,
++ linkage->u.linkage_02.service_id);
++ break;
++
++ case 0x03:
++ iprintf(indent+1, "DSC original_network_id:0x%04x transport_stream_id:0x%04x service_id:0x%04x\n",
++ linkage->u.linkage_03.original_network_id,
++ linkage->u.linkage_03.transport_stream_id,
++ linkage->u.linkage_03.service_id);
++ break;
++
++ case 0x04:
++ iprintf(indent+1, "DSC original_network_id:0x%04x transport_stream_id:0x%04x service_id:0x%04x event_id:0x%04x\n",
++ linkage->u.linkage_04.original_network_id,
++ linkage->u.linkage_04.transport_stream_id,
++ linkage->u.linkage_04.service_id,
++ linkage->u.linkage_04.event_id);
++ break;
++ }
++ }
++
++ dvb_mosaic_info_fields_for_each(curinfo, curfield) {
++ iprintf(indent+2, "DSC elementary_cell_id:0x%02x\n",
++ curfield->elementary_cell_id);
++ }
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_stream_identifier:
++ {
++ struct dvb_stream_identifier_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_stream_identifier_descriptor\n");
++ dx = dvb_stream_identifier_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_stream_identifier_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC component_tag:%i\n",
++ dx->component_tag);
++ break;
++ }
++
++ case dtag_dvb_ca_identifier:
++ {
++ struct dvb_ca_identifier_descriptor *dx;
++ int i;
++ uint16_t *ids;
++
++ iprintf(indent, "DSC Decode dvb_ca_identifier_descriptor\n");
++ dx = dvb_ca_identifier_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_ca_identifier_descriptor decode error\n");
++ return;
++ }
++ ids = dvb_ca_identifier_descriptor_ca_system_ids(dx);
++ for(i=0; i< dvb_ca_identifier_descriptor_ca_system_ids_count(dx); i++) {
++ iprintf(indent+i, "DSC system_id:0x%04x\n", ids[i]);
++ }
++ break;
++ }
++
++ case dtag_dvb_content:
++ {
++ struct dvb_content_descriptor *dx;
++ struct dvb_content_nibble *cur;
++
++ iprintf(indent, "DSC Decode dvb_content_descriptor\n");
++ dx = dvb_content_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_content_descriptor decode error\n");
++ return;
++ }
++ dvb_content_descriptor_nibbles_for_each(dx, cur) {
++ iprintf(indent+1, "DSC content_nibble_level_1:%i content_nibble_level_2:%i user_nibble_1:%i user_nibble_2:%i\n",
++ cur->content_nibble_level_1, cur->content_nibble_level_2,
++ cur->user_nibble_1, cur->user_nibble_2);
++ }
++ break;
++ }
++
++ case dtag_dvb_parental_rating:
++ {
++ struct dvb_parental_rating_descriptor *dx;
++ struct dvb_parental_rating *cur;
++
++ iprintf(indent, "DSC Decode dvb_parental_rating_descriptor\n");
++ dx = dvb_parental_rating_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_parental_rating_descriptor decode error\n");
++ return;
++ }
++ dvb_parental_rating_descriptor_ratings_for_each(dx, cur) {
++ iprintf(indent+1, "DSC country_code:%.3s rating:%i\n",
++ cur->country_code, cur->rating);
++ }
++ break;
++ }
++
++ case dtag_dvb_teletext:
++ {
++ struct dvb_teletext_descriptor *dx;
++ struct dvb_teletext_entry *cur;
++
++ iprintf(indent, "DSC Decode dvb_teletext_descriptor\n");
++ dx = dvb_teletext_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_teletext_descriptor decode error\n");
++ return;
++ }
++ dvb_teletext_descriptor_entries_for_each(dx, cur) {
++ iprintf(indent+1, "DSC language_code:%.3s type:%i magazine_number:%i page_number:%i\n",
++ cur->language_code,
++ cur->type, cur->magazine_number, cur->page_number);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_telephone:
++ {
++ struct dvb_telephone_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_telephone_descriptor\n");
++ dx = dvb_telephone_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_telephone_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent,
++ "DSC foreign_availability:%i connection_type:%i country_prefix:%.*s "
++ "international_area_code:%.*s operator_code:%.*s national_area_code:%.*s core_number:%.*s\n",
++ dx->foreign_availability, dx->connection_type,
++ dx->country_prefix_length, dvb_telephone_descriptor_country_prefix(dx),
++ dx->international_area_code_length, dvb_telephone_descriptor_international_area_code(dx),
++ dx->operator_code_length, dvb_telephone_descriptor_operator_code(dx),
++ dx->national_area_code_length, dvb_telephone_descriptor_national_area_code(dx),
++ dx->core_number_length, dvb_telephone_descriptor_core_number(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_local_time_offset:
++ {
++ struct dvb_local_time_offset_descriptor *dx;
++ struct dvb_local_time_offset *cur;
++
++ iprintf(indent, "DSC Decode dvb_local_time_offset_descriptor\n");
++ dx = dvb_local_time_offset_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_local_time_offset_descriptor decode error\n");
++ return;
++ }
++ dvb_local_time_offset_descriptor_offsets_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC country_code:%.3s country_region_id:%i "
++ "local_time_offset_polarity:%i local_time_offset:%i "
++ "time_of_change:%i next_time_offset:%i\n",
++ cur->country_code, cur->country_region_id,
++ cur->local_time_offset_polarity,
++ dvbhhmm_to_seconds(cur->local_time_offset),
++ dvbdate_to_unixtime(cur->time_of_change),
++ dvbhhmm_to_seconds(cur->next_time_offset));
++ }
++ break;
++ }
++
++ case dtag_dvb_subtitling:
++ {
++ struct dvb_subtitling_descriptor *dx;
++ struct dvb_subtitling_entry *cur;
++
++ iprintf(indent, "DSC Decode dvb_subtitling_descriptor\n");
++ dx = dvb_subtitling_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_subtitling_descriptor decode error\n");
++ return;
++ }
++ dvb_subtitling_descriptor_subtitles_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC language_code:%.3s subtitling_type:0x%02x composition_page_id:0x%04x ancillary_page_id:0x%04x\n",
++ cur->language_code, cur->subtitling_type,
++ cur->composition_page_id, cur->ancillary_page_id);
++ }
++ break;
++ }
++
++ case dtag_dvb_terrestial_delivery_system:
++ {
++ struct dvb_terrestrial_delivery_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_terrestrial_delivery_descriptor\n");
++ dx = dvb_terrestrial_delivery_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_terrestrial_delivery_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC centre_frequency:%i bandwidth:%i priority:%i "
++ "time_slicing_indicator:%i mpe_fec_indicator:%i constellation:%i "
++ "hierarchy_information:%i code_rate_hp_stream:%i "
++ "code_rate_lp_stream:%i guard_interval:%i transmission_mode:%i "
++ "other_frequency_flag:%i\n",
++ dx->centre_frequency, dx->bandwidth, dx->priority,
++ dx->time_slicing_indicator, dx->mpe_fec_indicator,
++ dx->constellation,
++ dx->hierarchy_information, dx->code_rate_hp_stream,
++ dx->code_rate_lp_stream, dx->guard_interval,
++ dx->transmission_mode, dx->other_frequency_flag);
++ break;
++ }
++
++ case dtag_dvb_multilingual_network_name:
++ {
++ struct dvb_multilingual_network_name_descriptor *dx;
++ struct dvb_multilingual_network_name *cur;
++
++ iprintf(indent, "DSC Decode dvb_multilingual_network_name_descriptor\n");
++ dx = dvb_multilingual_network_name_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_multilingual_network_name_descriptor decode error\n");
++ return;
++ }
++ dvb_multilingual_network_name_descriptor_names_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC language_code:%.3s network_name:%.*s\n",
++ cur->language_code,
++ cur->network_name_length,
++ dvb_multilingual_network_name_name(cur));
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_multilingual_bouquet_name:
++ {
++ struct dvb_multilingual_bouquet_name_descriptor *dx;
++ struct dvb_multilingual_bouquet_name *cur;
++
++ iprintf(indent, "DSC Decode dvb_multilingual_bouquet_name_descriptor\n");
++ dx = dvb_multilingual_bouquet_name_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_multilingual_bouquet_name_descriptor decode error\n");
++ return;
++ }
++ dvb_multilingual_bouquet_name_descriptor_names_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC language_code:%.3s bouquet_name:%.*s\n",
++ cur->language_code,
++ cur->bouquet_name_length,
++ dvb_multilingual_bouquet_name_name(cur));
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_multilingual_service_name:
++ {
++ struct dvb_multilingual_service_name_descriptor *dx;
++ struct dvb_multilingual_service_name *cur;
++
++ iprintf(indent, "DSC Decode dvb_multilingual_service_name_descriptor\n");
++ dx = dvb_multilingual_service_name_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_multilingual_service_name_descriptor decode error\n");
++ return;
++ }
++ dvb_multilingual_service_name_descriptor_names_for_each(dx, cur) {
++ struct dvb_multilingual_service_name_part2 *part2;
++ part2 = dvb_multilingual_service_name_part2(cur);
++
++ iprintf(indent+1,
++ "DSC language_code:%.3s provider_name:%.*s service_name:%.*s\n",
++ cur->language_code,
++ cur->service_provider_name_length,
++ dvb_multilingual_service_name_service_provider_name(cur),
++ part2->service_name_length,
++ dvb_multilingual_service_name_service_name(part2));
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_multilingual_component:
++ {
++ struct dvb_multilingual_component_descriptor *dx;
++ struct dvb_multilingual_component *cur;
++
++ iprintf(indent, "DSC Decode dvb_multilingual_component_descriptor\n");
++ dx = dvb_multilingual_component_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_multilingual_component_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC component_tag:%02x\n", dx->component_tag);
++ dvb_multilingual_component_descriptor_components_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC language_code:%.3s description:%.*s\n",
++ cur->language_code,
++ cur->text_description_length,
++ dvb_multilingual_component_text_char(cur));
++ }
++ break;
++ }
++
++ case dtag_dvb_private_data_specifier:
++ {
++ struct dvb_private_data_specifier_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_private_data_specifier_descriptor\n");
++ dx = dvb_private_data_specifier_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_private_data_specifier_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC private_data_specifier:0x%08x\n",
++ dx->private_data_specifier);
++ break;
++ }
++
++ case dtag_dvb_service_move:
++ {
++ struct dvb_service_move_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_service_move_descriptor\n");
++ dx = dvb_service_move_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_service_move_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC new_original_network_id:0x%04x new_transport_stream_id:0x%04x new_service_id:0x%04x\n",
++ dx->new_original_network_id, dx->new_transport_stream_id, dx->new_service_id);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_short_smoothing_buffer:
++ {
++ struct dvb_short_smoothing_buffer_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_short_smoothing_buffer_descriptor\n");
++ dx = dvb_short_smoothing_buffer_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_short_smoothing_buffer_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC sb_size:%i sb_leak_rate:%i\n",
++ dx->sb_size, dx->sb_leak_rate);
++ hexdump(indent, "DSC",
++ dvb_short_smoothing_buffer_descriptor_reserved(dx),
++ dvb_short_smoothing_buffer_descriptor_reserved_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_frequency_list:
++ {
++ struct dvb_frequency_list_descriptor *dx;
++ uint32_t *freqs;
++ int count;
++ int i;
++
++ iprintf(indent, "DSC Decode dvb_frequency_list_descriptor\n");
++ dx = dvb_frequency_list_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_frequency_list_descriptor decode error\n");
++ return;
++ }
++ iprintf(0, "DSC coding_type=%i\n", dx->coding_type);
++
++ freqs = dvb_frequency_list_descriptor_centre_frequencies(dx);
++ count = dvb_frequency_list_descriptor_centre_frequencies_count(dx);
++ for(i=0; i< count; i++) {
++ iprintf(indent+1, "DSC %i\n", freqs[i]);
++ }
++ break;
++ }
++
++ case dtag_dvb_partial_transport_stream:
++ {
++ struct dvb_partial_transport_stream_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_partial_transport_stream_descriptor\n");
++ dx = dvb_partial_transport_stream_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_partial_transport_stream_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC peak_rate:%i minimum_overall_smoothing_rate:%i maximum_overall_smoothing_rate:%i\n",
++ dx->peak_rate, dx->minimum_overall_smoothing_rate, dx->maximum_overall_smoothing_rate);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_data_broadcast:
++ {
++ struct dvb_data_broadcast_descriptor *dx;
++ struct dvb_data_broadcast_descriptor_part2 *part2;
++
++ iprintf(indent, "DSC Decode dvb_data_broadcast_descriptor\n");
++ dx = dvb_data_broadcast_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_data_broadcast_descriptor decode error\n");
++ return;
++ }
++ part2 = dvb_data_broadcast_descriptor_part2(dx);
++
++ iprintf(indent, "DSC data_broadcast_id:0x%04x component_tag:0x%02x selector:%.*s language_code:%.3s text:%.*s\n",
++ dx->data_broadcast_id, dx->component_tag,
++ dx->selector_length, dvb_data_broadcast_descriptor_selector(dx),
++ part2->language_code,
++ part2->text_length, dvb_data_broadcast_descriptor_part2_text(part2));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_scrambling:
++ {
++ struct dvb_scrambling_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_scrambling_descriptor\n");
++ dx = dvb_scrambling_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_scrambling_descriptor decode error\n");
++ return;
++ }
++
++ iprintf(indent, "DSC scrambling_mode:0x%02x\n",
++ dx->scrambling_mode);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_data_broadcast_id:
++ {
++ struct dvb_data_broadcast_id_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_data_broadcast_id_descriptor\n");
++ dx = dvb_data_broadcast_id_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_data_broadcast_id_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC data_broadcast_id:0x%04x\n",
++ dx->data_broadcast_id);
++ hexdump(indent+1, "DSC",
++ dvb_data_broadcast_id_descriptor_id_selector_byte(dx),
++ dvb_data_broadcast_id_descriptor_id_selector_byte_length(dx));
++ break;
++ }
++
++ case dtag_dvb_transport_stream:
++ {
++ struct dvb_transport_stream_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_transport_stream_descriptor\n");
++ dx = dvb_transport_stream_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_transport_stream_descriptor decode error\n");
++ return;
++ }
++ hexdump(indent, "DSC",
++ dvb_transport_stream_descriptor_data(dx),
++ dvb_transport_stream_descriptor_data_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_dsng:
++ {
++ struct dvb_dsng_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_dsng_descriptor\n");
++ dx = dvb_dsng_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_dsng_descriptor decode error\n");
++ return;
++ }
++ hexdump(indent, "DSC",
++ dvb_dsng_descriptor_data(dx),
++ dvb_dsng_descriptor_data_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_pdc:
++ {
++ struct dvb_pdc_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_pdc_descriptor\n");
++ dx = dvb_pdc_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_pdc_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC programme_id_label:0x%06x\n",
++ dx->programme_id_label);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_ac3:
++ {
++ struct dvb_ac3_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_ac3_descriptor\n");
++ dx = dvb_ac3_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_ac3_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC ac3_type_flag:%i bsid_flag:%i mainid_flag:%i asvc_flag:%i\n",
++ dx->ac3_type_flag, dx->bsid_flag, dx->mainid_flag, dx->asvc_flag);
++ hexdump(indent+1, "DSC",
++ dvb_ac3_descriptor_additional_info(dx),
++ dvb_ac3_descriptor_additional_info_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_ancillary_data:
++ {
++ struct dvb_ancillary_data_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_ancillary_data_descriptor\n");
++ dx = dvb_ancillary_data_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_ancillary_data_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent, "DSC scale_factor_error_check:%i dab_ancillary_data:%i announcement_switching_data:%i extended_ancillary_data:%i dvd_video_ancillary_data:%i\n",
++ dx->scale_factor_error_check,
++ dx->dab_ancillary_data,
++ dx->announcement_switching_data,
++ dx->extended_ancillary_data,
++ dx->dvd_video_ancillary_data);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_cell_list:
++ {
++ struct dvb_cell_list_descriptor *dx;
++ struct dvb_cell_list_entry *cur;
++ struct dvb_subcell_list_entry *cur_subcell;
++
++ iprintf(indent, "DSC Decode dvb_cell_list_descriptor\n");
++ dx = dvb_cell_list_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_cell_list_descriptor decode error\n");
++ return;
++ }
++ dvb_cell_list_descriptor_cells_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC cell_id:%04x cell_latitude:%i cell_longitude:%i cell_extend_of_latitude:%i cell_extend_of_longitude:%i\n",
++ cur->cell_id,
++ cur->cell_latitude,
++ cur->cell_longitude,
++ cur->cell_extend_of_latitude,
++ cur->cell_extend_of_longitude);
++
++ dvb_cell_list_entry_subcells_for_each(cur, cur_subcell) {
++ iprintf(indent+2,
++ "DSC cell_id_extension:%04x subcell_latitude:%i subcell_longitude:%i subcell_extend_of_latitude:%i subcell_extend_of_longitude:%i\n",
++ cur_subcell->cell_id_extension,
++ cur_subcell->subcell_latitude,
++ cur_subcell->subcell_longitude,
++ cur_subcell->subcell_extend_of_latitude,
++ cur_subcell->subcell_extend_of_longitude);
++ }
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_cell_frequency_link:
++ {
++ struct dvb_cell_frequency_link_descriptor *dx;
++ struct dvb_cell_frequency_link_cell *cur;
++ struct dvb_cell_frequency_link_cell_subcell *cur_subcell;
++
++ iprintf(indent, "DSC Decode dvb_cell_frequency_link_descriptor\n");
++ dx = dvb_cell_frequency_link_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_cell_frequency_link_descriptor decode error\n");
++ return;
++ }
++ dvb_cell_frequency_link_descriptor_cells_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC cell_id:%04x frequency:%i\n",
++ cur->cell_id,
++ cur->frequency);
++
++ dvb_cell_frequency_link_cell_subcells_for_each(cur, cur_subcell) {
++ iprintf(indent+2,
++ "DSC cell_id_extension:%04x transposer_frequency:%i\n",
++ cur_subcell->cell_id_extension,
++ cur_subcell->transposer_frequency);
++ }
++ }
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_announcement_support:
++ {
++ struct dvb_announcement_support_descriptor *dx;
++ struct dvb_announcement_support_entry *cur;
++ struct dvb_announcement_support_reference *ref;
++
++ iprintf(indent, "DSC Decode dvb_announcement_support_descriptor\n");
++ dx = dvb_announcement_support_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_announcement_support_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent,
++ "DSC announcement_support_indicator:%04x\n",
++ dx->announcement_support_indicator);
++
++ dvb_announcement_support_descriptor_entries_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC announcement_type:%i reference_type:%i\n",
++ cur->announcement_type,
++ cur->reference_type);
++
++ ref = dvb_announcement_support_entry_reference(cur);
++ if (ref) {
++ iprintf(indent+1,
++ "DSC original_network_id:%04x transport_stream_id:%04x service_id:%04x component_tag:%02x\n",
++ ref->original_network_id,
++ ref->transport_stream_id,
++ ref->service_id,
++ ref->component_tag);
++ }
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_application_signalling:
++ {
++ struct dvb_application_signalling_descriptor *dx;
++ struct dvb_application_signalling_entry *cur;
++
++ iprintf(indent, "DSC Decode dvb_application_signalling_descriptor\n");
++ dx = dvb_application_signalling_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_application_signalling_descriptor decode error\n");
++ return;
++ }
++
++ dvb_application_signalling_descriptor_entries_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC application_type:%i AIT_version_number:%i\n",
++ cur->application_type,
++ cur->AIT_version_number);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_adaptation_field_data:
++ {
++ struct dvb_adaptation_field_data_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_adaptation_field_data_descriptor\n");
++ dx = dvb_adaptation_field_data_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_adaptation_field_data_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent,
++ "DSC announcement_switching_data:%i\n",
++ dx->announcement_switching_data);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_service_identifier:
++ {
++ struct dvb_service_identifier_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_service_identifier_descriptor\n");
++ dx = dvb_service_identifier_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_service_identifier_descriptor decode error\n");
++ return;
++ }
++ hexdump(indent, "DSC",
++ dvb_service_identifier_descriptor_identifier(dx),
++ dvb_service_identifier_descriptor_identifier_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_service_availability:
++ {
++ struct dvb_service_availability_descriptor *dx;
++ uint16_t *cellids;
++ int count;
++ int i;
++
++ iprintf(indent, "DSC Decode dvb_service_availability_descriptor\n");
++ dx = dvb_service_availability_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_service_availability_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent,
++ "DSC availability_flag:%i\n",
++ dx->availability_flag);
++
++ cellids = dvb_service_availability_descriptor_cell_ids(dx);
++ count = dvb_service_availability_descriptor_cell_ids_count(dx);
++ for(i=0; i< count; i++) {
++ iprintf(indent+1, "DSC", "%04x\n", cellids[i]);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_default_authority:
++ {
++ struct dvb_default_authority_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_default_authority_descriptor\n");
++ dx = dvb_default_authority_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_default_authority_descriptor decode error\n");
++ return;
++ }
++ hexdump(indent, "DSC",
++ dvb_default_authority_descriptor_name(dx),
++ dvb_default_authority_descriptor_name_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_related_content:
++ {
++ struct dvb_related_content_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_related_content_descriptor\n");
++ dx = dvb_related_content_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_related_content_descriptor decode error\n");
++ return;
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_tva_id:
++ {
++ struct dvb_tva_id_descriptor *dx;
++ struct dvb_tva_id_entry *cur;
++
++ iprintf(indent, "DSC Decode dvb_tva_id_descriptor\n");
++ dx = dvb_tva_id_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_tva_id_descriptor decode error\n");
++ return;
++ }
++
++ dvb_tva_id_descriptor_entries_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC tva_id:%04x running_status:%i\n",
++ cur->tva_id,
++ cur->running_status);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_content_identifier:
++ {
++ struct dvb_content_identifier_descriptor *dx;
++ struct dvb_content_identifier_entry *cur;
++ struct dvb_content_identifier_entry_data_0 *data0;
++ struct dvb_content_identifier_entry_data_1 *data1;
++
++ iprintf(indent, "DSC Decode dvb_tva_id_descriptor\n");
++ dx = dvb_content_identifier_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_content_identifier_descriptor decode error\n");
++ return;
++ }
++
++ dvb_content_identifier_descriptor_entries_for_each(dx, cur) {
++ iprintf(indent+1,
++ "DSC crid_type:%i crid_location:%i\n",
++ cur->crid_type,
++ cur->crid_location);
++
++ data0 = dvb_content_identifier_entry_data_0(cur);
++ if (data0) {
++ hexdump(indent, "DSC data0",
++ dvb_content_identifier_entry_data_0_data(data0),
++ data0->crid_length);
++ }
++
++ data1 = dvb_content_identifier_entry_data_1(cur);
++ if (data1) {
++ iprintf(indent+1,
++ "DSC crid_ref:%04x\n",
++ data1->crid_ref);
++ }
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_dvb_s2_satellite_delivery_descriptor:
++ {
++ struct dvb_s2_satellite_delivery_descriptor *dx;
++
++ iprintf(indent, "DSC Decode dvb_s2_satellite_delivery_descriptor\n");
++ dx = dvb_s2_satellite_delivery_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX dvb_s2_satellite_delivery_descriptor decode error\n");
++ return;
++ }
++
++ iprintf(indent,
++ "DSC scrambling_sequence_selector:%i multiple_input_stream:%i backwards_compatability:%i\n",
++ dx->scrambling_sequence_selector,
++ dx->multiple_input_stream,
++ dx->backwards_compatability);
++ if (dx->scrambling_sequence_selector) {
++ iprintf(indent,
++ "DSC scrambling_sequence_index:%i\n",
++ dvb_s2_satellite_delivery_descriptor_scrambling_sequence_index(dx));
++ }
++ if (dx->multiple_input_stream) {
++ iprintf(indent,
++ "DSC input_stream_id:%i\n",
++ dvb_s2_satellite_delivery_descriptor_input_stream_id(dx));
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ default:
++ fprintf(stderr, "DSC XXXX Unknown descriptor_tag:0x%02x\n", d->tag);
++ hexdump(0, "DSC ", (uint8_t*) d, d->len+2);
++ return;
++ }
++}
++
++void parse_atsc_descriptor(struct descriptor *d, int indent, int data_type)
++{
++ (void) data_type;
++
++ switch(d->tag) {
++ case dtag_atsc_stuffing:
++ {
++ struct atsc_stuffing_descriptor *dx;
++
++ iprintf(indent, "DSC Decode atsc_stuffing_descriptor\n");
++ dx = atsc_stuffing_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_stuffing_descriptor decode error\n");
++ return;
++ }
++ hexdump(indent, "DSC",
++ atsc_stuffing_descriptor_data(dx),
++ atsc_stuffing_descriptor_data_length(dx));
++ break;
++ }
++
++ case dtag_atsc_ac3_audio:
++ {
++ struct atsc_ac3_descriptor *dx;
++
++ iprintf(indent, "DSC Decode atsc_ac3_descriptor\n");
++ dx = atsc_ac3_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_ac3_descriptor decode error\n");
++ return;
++ }
++
++ iprintf(indent,
++ "DSC sample_rate_code:%i bsid:%i bit_rate_code:%i surround_mode:%i bsmod:%i num_channels:%i full_svc:%i\n",
++ dx->sample_rate_code,
++ dx->bsid,
++ dx->bit_rate_code,
++ dx->surround_mode,
++ dx->bsmod,
++ dx->num_channels,
++ dx->full_svc);
++
++ hexdump(indent+1, "DSC additional_info",
++ atsc_ac3_descriptor_additional_info(dx),
++ atsc_ac3_descriptor_additional_info_length(dx));
++ break;
++ }
++
++ case dtag_atsc_caption_service:
++ {
++ struct atsc_caption_service_descriptor *dx;
++ struct atsc_caption_service_entry *cur;
++ int idx;
++
++ iprintf(indent, "DSC Decode atsc_caption_service_descriptor\n");
++ dx = atsc_caption_service_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_caption_service_descriptor decode error\n");
++ return;
++ }
++
++ atsc_caption_service_descriptor_entries_for_each(dx, cur, idx) {
++ iprintf(indent+1,
++ "DSC language_code:%.3s digital_cc:%i value:%i easy_reader:%i wide_aspect_ratio:%i\n",
++ cur->language_code,
++ cur->digital_cc,
++ cur->value,
++ cur->easy_reader,
++ cur->wide_aspect_ratio);
++ }
++ break;
++ }
++
++ case dtag_atsc_content_advisory:
++ {
++ struct atsc_content_advisory_descriptor *dx;
++ struct atsc_content_advisory_entry *cure;
++ struct atsc_content_advisory_entry_dimension *curd;
++ struct atsc_content_advisory_entry_part2 *part2;
++ int eidx;
++ int didx;
++
++ iprintf(indent, "DSC Decode atsc_content_advisory_descriptor\n");
++ dx = atsc_content_advisory_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_content_advisory_descriptor decode error\n");
++ return;
++ }
++
++ atsc_content_advisory_descriptor_entries_for_each(dx, cure, eidx) {
++ iprintf(indent+1,
++ "DSC rating_region:%i\n",
++ cure->rating_region);
++
++ atsc_content_advisory_entry_dimensions_for_each(cure, curd, didx) {
++ iprintf(indent+2,
++ "DSC rating_dimension_j:%i rating_value:%i\n",
++ curd->rating_dimension_j,
++ curd->rating_value);
++ }
++
++ part2 = atsc_content_advisory_entry_part2(cure);
++
++ atsctextdump("DSC description:",
++ indent,
++ atsc_content_advisory_entry_part2_description(part2),
++ part2->rating_description_length);
++ }
++
++ break;
++ }
++
++ case dtag_atsc_extended_channel_name:
++ {
++ struct atsc_extended_channel_name_descriptor *dx;
++
++ iprintf(indent, "DSC Decode atsc_extended_channel_name_descriptor\n");
++ dx = atsc_extended_channel_name_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_extended_channel_name_descriptor decode error\n");
++ return;
++ }
++
++ atsctextdump("SCT text:", 1,
++ atsc_extended_channel_name_descriptor_text(dx),
++ atsc_extended_channel_name_descriptor_text_length(dx));
++ break;
++ }
++
++ case dtag_atsc_service_location:
++ {
++ struct atsc_service_location_descriptor *dx;
++ struct atsc_caption_service_location_element *cur;
++ int idx;
++
++ iprintf(indent, "DSC Decode atsc_service_location_descriptor\n");
++ dx = atsc_service_location_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_service_location_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent+1, "DSC PCR_PID:%04x\n", dx->PCR_PID);
++
++ atsc_service_location_descriptor_elements_for_each(dx, cur, idx) {
++ iprintf(indent+1, "DSC stream_type:%02x elementary_PID:%04x language_code:%.3s\n",
++ cur->stream_type,
++ cur->elementary_PID,
++ cur->language_code);
++ }
++ break;
++ }
++
++ case dtag_atsc_time_shifted_service:
++ {
++ struct atsc_time_shifted_service_descriptor *dx;
++ struct atsc_time_shifted_service *cur;
++ int idx;
++
++ iprintf(indent, "DSC Decode atsc_time_shifted_service_descriptor\n");
++ dx = atsc_time_shifted_service_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_time_shifted_service_descriptor decode error\n");
++ return;
++ }
++
++ atsc_time_shifted_service_descriptor_services_for_each(dx, cur, idx) {
++ iprintf(indent+1, "DSC time_shift:%i major_channel_number:%04x minor_channel_number:%04x\n",
++ cur->time_shift,
++ cur->major_channel_number,
++ cur->minor_channel_number);
++ }
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_atsc_component_name:
++ {
++ struct atsc_component_name_descriptor *dx;
++
++ iprintf(indent, "DSC Decode atsc_component_name_descriptor\n");
++ dx = atsc_component_name_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_component_name_descriptor decode error\n");
++ return;
++ }
++
++ atsctextdump("SCT name:", 1,
++ atsc_component_name_descriptor_text(dx),
++ atsc_component_name_descriptor_text_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_atsc_dcc_departing_request:
++ {
++ struct atsc_dcc_departing_request_descriptor *dx;
++
++ iprintf(indent, "DSC Decode atsc_dcc_departing_request_descriptor\n");
++ dx = atsc_dcc_departing_request_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_dcc_departing_request_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent+1, "DSC dcc_departing_request_type:%02x\n",
++ dx->dcc_departing_request_type);
++
++ atsctextdump("SCT text:", 1,
++ atsc_dcc_departing_request_descriptor_text(dx),
++ atsc_dcc_departing_request_descriptor_text_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_atsc_dcc_arriving_request:
++ {
++ struct atsc_dcc_arriving_request_descriptor *dx;
++
++ iprintf(indent, "DSC Decode atsc_dcc_arriving_request_descriptor\n");
++ dx = atsc_dcc_arriving_request_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_dcc_arriving_request_descriptor decode error\n");
++ return;
++ }
++ iprintf(indent+1, "DSC dcc_arriving_request_type:%02x\n",
++ dx->dcc_arriving_request_type);
++
++ atsctextdump("SCT text:", 1,
++ atsc_dcc_arriving_request_descriptor_text(dx),
++ atsc_dcc_arriving_request_descriptor_text_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_atsc_redistribution_control:
++ {
++ struct atsc_rc_descriptor *dx;
++
++ iprintf(indent, "DSC Decode atsc_rc_descriptor\n");
++ dx = atsc_rc_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_rc_descriptor decode error\n");
++ return;
++ }
++ hexdump(indent, "DSC",
++ atsc_rc_descriptor_info(dx),
++ atsc_rc_descriptor_info_length(dx));
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_atsc_genre:
++ {
++ struct atsc_genre_descriptor *dx;
++
++ iprintf(indent, "DSC Decode atsc_genre_descriptor\n");
++ dx = atsc_genre_descriptor_codec(d);
++ if (dx == NULL) {
++ fprintf(stderr, "DSC XXXX atsc_genre_descriptor decode error\n");
++ return;
++ }
++ hexdump(indent, "DSC",
++ atsc_genre_descriptor_attributes(dx),
++ dx->attribute_count);
++
++ hexdump(0, "XXX", (uint8_t*) d, d->len + 2);
++ getchar();
++ break;
++ }
++
++ case dtag_atsc_private_information:
++ // FIXME: whats the format?
++
++ case dtag_atsc_content_identifier:
++ // FIXME: whats the format?
++
++ default:
++ fprintf(stderr, "DSC XXXX Unknown descriptor_tag:0x%02x\n", d->tag);
++ hexdump(0, "DSC ", (uint8_t*) d, d->len+2);
++ return;
++ }
++}
++
++void iprintf(int indent, char *fmt, ...)
++{
++ va_list ap;
++
++ while(indent--) {
++ printf("\t");
++ }
++
++ va_start(ap, fmt);
++ vprintf(fmt, ap);
++ va_end(ap);
++}
++
++void hexdump(int indent, char *prefix, uint8_t *buf, int buflen)
++{
++ int i;
++ int j;
++ int max;
++ char line[512];
++
++ for(i=0; i< buflen; i+=16) {
++ max = 16;
++ if ((i + max) > buflen)
++ max = buflen - i;
++
++ memset(line, 0, sizeof(line));
++ memset(line + 4 + 48 + 1, ' ', 16);
++ sprintf(line, "%02x: ", i);
++ for(j=0; j<max; j++) {
++ sprintf(line + 4 + (j*3), "%02x", buf[i+j]);
++ if ((buf[i+j] > 31) && (buf[i+j] < 127))
++ line[4 + 48 + 1 + j] = buf[i+j];
++ else
++ line[4 + 48 + 1 + j] = '.';
++ }
++
++ for(j=0; j< 4 + 48; j++) {
++ if (!line[j])
++ line[j] = ' ';
++ }
++ line[4+48] = '|';
++
++ for(j=0; j < indent; j++) {
++ printf("\t");
++ }
++ printf("%s%s|\n", prefix, line);
++ }
++}
++
++void atsctextdump(char *header, int indent, struct atsc_text *atext, int len)
++{
++ struct atsc_text_string *cur_string;
++ struct atsc_text_string_segment *cur_segment;
++ int str_idx;
++ int seg_idx;
++
++ if (len == 0)
++ return;
++
++ atsc_text_strings_for_each(atext, cur_string, str_idx) {
++ iprintf(indent+1, "%s String %i language:%.3s\n", header, str_idx, cur_string->language_code);
++
++ atsc_text_string_segments_for_each(cur_string, cur_segment, seg_idx) {
++ iprintf(indent+2, "Segment %i compression_type:%i mode:%i\n",
++ seg_idx,
++ cur_segment->compression_type,
++ cur_segment->mode);
++
++ hexdump(indent+2, "rawbytes ",
++ atsc_text_string_segment_bytes(cur_segment),
++ cur_segment->number_bytes);
++
++ if (cur_segment->compression_type < 0x3e) {
++ uint8_t *decoded = NULL;
++ size_t decodedlen = 0;
++ size_t decodedpos = 0;
++
++ if (atsc_text_segment_decode(cur_segment,
++ &decoded,
++ &decodedlen,
++ &decodedpos) < 0) {
++ iprintf(indent+2, "Decode error\n");
++ } else {
++ hexdump(indent+2, "decoded ", decoded, decodedpos);
++ }
++ if (decoded)
++ free(decoded);
++ }
++ }
++ }
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/lnb.c dvb-apps/test/lnb.c
+--- linuxtv-dvb-apps-1.1.1/test/lnb.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/lnb.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,101 @@
++#include <stdlib.h>
++#include <string.h>
++#include <ctype.h>
++#include "lnb.h"
++
++static char *univ_desc[] = {
++ "Europe",
++ "10800 to 11800 MHz and 11600 to 12700 Mhz",
++ "Dual LO, loband 9750, hiband 10600 MHz",
++ (char *)NULL };
++
++static char *dbs_desc[] = {
++ "Expressvu, North America",
++ "12200 to 12700 MHz",
++ "Single LO, 11250 MHz",
++ (char *)NULL };
++
++static char *standard_desc[] = {
++ "10945 to 11450 Mhz",
++ "Single LO, 10000 Mhz",
++ (char *)NULL };
++
++static char *enhan_desc[] = {
++ "Astra",
++ "10700 to 11700 MHz",
++ "Single LO, 9750 MHz",
++ (char *)NULL };
++
++static char *cband_desc[] = {
++ "Big Dish",
++ "3700 to 4200 MHz",
++ "Single LO, 5150 Mhz",
++ (char *)NULL };
++
++static struct lnb_types_st lnbs[] = {
++ {"UNIVERSAL", univ_desc, 9750, 10600, 11700 },
++ {"DBS", dbs_desc, 11250, 0, 0 },
++ {"STANDARD", standard_desc, 10000, 0, 0 },
++ {"ENHANCED", enhan_desc, 9750, 0, 0 },
++ {"C-BAND", cband_desc, 5150, 0, 0 }
++};
++
++/* Enumerate through standard types of LNB's until NULL returned.
++ * Increment curno each time
++ */
++
++struct lnb_types_st *
++lnb_enum(int curno)
++{
++ if (curno >= (int) (sizeof(lnbs) / sizeof(lnbs[0])))
++ return (struct lnb_types_st *)NULL;
++ return &lnbs[curno];
++}
++
++/* Decode an lnb type, for example given on a command line
++ * If alpha and standard type, e.g. "Universal" then match that
++ * otherwise low[,high[,switch]]
++ */
++
++int
++lnb_decode(char *str, struct lnb_types_st *lnbp)
++{
++int i;
++char *cp, *np;
++
++ memset(lnbp, 0, sizeof(*lnbp));
++ cp = str;
++ while(*cp && isspace(*cp))
++ cp++;
++ if (isalpha(*cp)) {
++ for (i = 0; i < (int)(sizeof(lnbs) / sizeof(lnbs[0])); i++) {
++ if (!strcasecmp(lnbs[i].name, cp)) {
++ *lnbp = lnbs[i];
++ return 1;
++ }
++ }
++ return -1;
++ }
++ if (*cp == '\0' || !isdigit(*cp))
++ return -1;
++ lnbp->low_val = strtoul(cp, &np, 0);
++ if (lnbp->low_val == 0)
++ return -1;
++ cp = np;
++ while(*cp && (isspace(*cp) || *cp == ','))
++ cp++;
++ if (*cp == '\0')
++ return 1;
++ if (!isdigit(*cp))
++ return -1;
++ lnbp->high_val = strtoul(cp, &np, 0);
++ cp = np;
++ while(*cp && (isspace(*cp) || *cp == ','))
++ cp++;
++ if (*cp == '\0')
++ return 1;
++ if (!isdigit(*cp))
++ return -1;
++ lnbp->switch_val = strtoul(cp, NULL, 0);
++ return 1;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/lnb.h dvb-apps/test/lnb.h
+--- linuxtv-dvb-apps-1.1.1/test/lnb.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/lnb.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,22 @@
++struct lnb_types_st {
++ char *name;
++ char **desc;
++ unsigned long low_val;
++ unsigned long high_val; /* zero indicates no hiband */
++ unsigned long switch_val; /* zero indicates no hiband */
++};
++
++/* Enumerate through standard types of LNB's until NULL returned.
++ * Increment curno each time
++ */
++
++struct lnb_types_st *
++lnb_enum(int curno);
++
++/* Decode an lnb type, for example given on a command line
++ * If alpha and standard type, e.g. "Universal" then match that
++ * otherwise low[,high[,switch]]
++ */
++
++int
++lnb_decode(char *str, struct lnb_types_st *lnbp);
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/Makefile dvb-apps/test/Makefile
+--- linuxtv-dvb-apps-1.1.1/test/Makefile 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,37 +1,41 @@
+-# Makefile for Linux DVB API Version 3 test programs
++# Makefile for linuxtv.org dvb-apps/test
+
+-CC = gcc
+-CFLAGS = -g -O2 -W -Wall -I../include
++objects = hex_dump.o lnb.o
+
+-TARGETS = \
+- diseqc \
+- set22k \
+- sendburst \
+- setvoltage \
+- setpid \
+- video \
+- test_sections \
+- test_sec_ne \
+- test_pes \
+- test_dvr \
+- test_dvr_play \
+- test_tt \
+- test_av \
+- test_av_play \
+- test_vevent \
+- test_stc \
+- test_stillimage
++binaries = diseqc \
++ sendburst \
++ set22k \
++ setpid \
++ setvoltage \
++ test_av \
++ test_av_play \
++ test_dvr \
++ test_dvr_play \
++ test_pes \
++ test_sec_ne \
++ test_sections \
++ test_stc \
++ test_stillimage \
++ test_tt \
++ test_vevent \
++ evtest \
++ video \
++ szap2
+
+-# test \
+-# test_audio \
+-# test_front \
+-# test_switch \
+-# test_video \
++.PHONY: all
+
+-all: $(TARGETS)
++all: $(binaries)
++ make -C libdvbcfg $@
++ make -C libdvben50221 $@
++ make -C libesg $@
++ make -C libucsi $@
+
+-test_sections test_sec_ne test_pes test_tt: hex_dump.o
++$(binaries): $(objects)
+
+-clean:
+- rm -f $(TARGETS) *.o
++clean::
++ make -C libdvbcfg $@
++ make -C libdvben50221 $@
++ make -C libesg $@
++ make -C libucsi $@
+
++include ../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/README dvb-apps/test/README
+--- linuxtv-dvb-apps-1.1.1/test/README 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/README 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,4 @@
+-Various small test/sample programs for the Linux DVB API Version 2
++Various small test/sample programs for the Linux DVB API Version 2/3
+
+ The default devices used by the test programs are generally
+ /dev/dvb/adapter0/*0, and can be overridden using environment
+@@ -33,13 +33,13 @@
+ test_stc : Test DMX_GET_STC.
+
+ test_stillimage : Display single iframes as stillimages
+- iframes can be created with the 'convert' tool from
+- imagemagick and mpeg2encode from ftp.mpeg.org, and must
++ iframes can be created with the 'convert' tool from
++ imagemagick and mpeg2encode from ftp.mpeg.org, and must
+ have a supported size, e.g. 702x576
+ ($ convert -sample 702x576\! test.jpg test.mpg)
+
+-(test_av_play : Test playing MPEG TS from a file (apparently broken))
+-
++test_av_play : Test playing MPEG PES (VDR format) from a file
++test_dvr_play : Test playing MPEG TS from a file (don't try, driver is broken)
+
+ test :
+ test_audio :
+@@ -48,4 +48,3 @@
+ test_front :
+ test_switch :
+ test_video :
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/sendburst.c dvb-apps/test/sendburst.c
+--- linuxtv-dvb-apps-1.1.1/test/sendburst.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/sendburst.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,8 +1,9 @@
+-/*
+- * Test sending the burst mini command A/B on a SAT frontend.
+- *
+- * usage: FRONTEND=/dev/dvb/adapterX/frontendX sendburst {a|b}
+- */
++#define USAGE \
++"\n" \
++"\nTest sending the burst mini command A/B on a SAT frontend." \
++"\n" \
++"\nusage: FRONTEND=/dev/dvb/adapterX/frontendX sendburst {a|b}" \
++"\n"
+
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -22,7 +23,7 @@
+ int fd, r;
+
+ if (argc != 2 || (strcmp(argv[1], "a") && strcmp(argv[1], "b"))) {
+- fprintf (stderr, "usage: %s <a|b>\n", argv[0]);
++ fprintf (stderr, "usage: %s <a|b>\n" USAGE, argv[0]);
+ return 1;
+ }
+
+@@ -52,4 +53,3 @@
+
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/set22k.c dvb-apps/test/set22k.c
+--- linuxtv-dvb-apps-1.1.1/test/set22k.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/set22k.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,10 +1,11 @@
+-/*
+- * Test switching the 22kHz tone signal on and off on a SAT frontend.
+- * (Note: DiSEqC equipment ignores this after it has once seen a diseqc
+- * sequence; reload the driver or unplug/replug the SAT cable to reset.)
+- *
+- * usage: FRONTEND=/dev/dvb/adapterX/frontendX set22k {on|off}
+- */
++#define USAGE \
++"\n" \
++"\nTest switching the 22kHz tone signal on and off on a SAT frontend." \
++"\n(Note: DiSEqC equipment ignores this after it has once seen a diseqc" \
++"\n sequence; reload the driver or unplug/replug the SAT cable to reset.)" \
++"\n" \
++"\nusage: FRONTEND=/dev/dvb/adapterX/frontendX set22k {on|off}" \
++"\n"
+
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -24,7 +25,7 @@
+ int fd, r;
+
+ if (argc != 2 || (strcmp(argv[1], "on") && strcmp(argv[1], "off"))) {
+- fprintf (stderr, "usage: %s <on|off>\n", argv[0]);
++ fprintf (stderr, "usage: %s <on|off>\n" USAGE, argv[0]);
+ return 1;
+ }
+ if (getenv("FRONTEND"))
+@@ -47,4 +48,3 @@
+
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/setpid.c dvb-apps/test/setpid.c
+--- linuxtv-dvb-apps-1.1.1/test/setpid.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/setpid.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,9 +1,10 @@
+-/*
+- * Set video and audio PIDs in the demux; useful only if you have
+- * a hardware MPEG decoder and you're tuned to a transport stream.
+- *
+- * usage: DEMUX=/dev/dvb/adapterX/demuxX setpid video_pid audio_pid
+- */
++#define USAGE \
++"\n" \
++"\nSet video and audio PIDs in the demux; useful only if you have" \
++"\na hardware MPEG decoder and you're tuned to a transport stream." \
++"\n" \
++"\nusage: DEMUX=/dev/dvb/adapterX/demuxX setpid video_pid audio_pid" \
++"\n"
+
+ #include <unistd.h>
+ #include <stdlib.h>
+@@ -69,7 +70,7 @@
+ int video_pid, audio_pid;
+
+ if (argc != 3) {
+- printf ("\nusage: %s <video pid> <audio pid>\n\n", argv[0]);
++ printf ("\nusage: %s <video pid> <audio pid>\n\n" USAGE, argv[0]);
+ exit (1);
+ }
+ if (getenv("DEMUX"))
+@@ -83,5 +84,3 @@
+
+ return 0;
+ }
+-
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/setvoltage.c dvb-apps/test/setvoltage.c
+--- linuxtv-dvb-apps-1.1.1/test/setvoltage.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/setvoltage.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,10 +1,11 @@
+-/*
+- * Test switching the voltage signal high and low on a SAT frontend.
+- * (Note: DiSEqC equipment ignores this after it has once seen a diseqc
+- * sequence; reload the driver or unplug/replug the SAT cable to reset.)
+- *
+- * usage: FRONTEND=/dev/dvb/adapterX/frontendX setvoltage {13|18}
+- */
++#define USAGE \
++"\n" \
++"\nTest switching the voltage signal high and low on a SAT frontend." \
++"\n(Note: DiSEqC equipment ignores this after it has once seen a diseqc" \
++"\n sequence; reload the driver or unplug/replug the SAT cable to reset.)" \
++"\n" \
++"\nusage: FRONTEND=/dev/dvb/adapterX/frontendX setvoltage {13|18}" \
++"\n"
+
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -23,7 +24,7 @@
+ int fd, r;
+
+ if (argc != 2 || (strcmp(argv[1], "13") && strcmp(argv[1], "18"))) {
+- fprintf (stderr, "usage: %s <13|18>\n", argv[0]);
++ fprintf (stderr, "usage: %s <13|18>\n" USAGE, argv[0]);
+ return -1;
+ }
+ if (getenv("FRONTEND"))
+@@ -44,4 +45,3 @@
+
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/szap2.c dvb-apps/test/szap2.c
+--- linuxtv-dvb-apps-1.1.1/test/szap2.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/test/szap2.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,767 @@
++/* szap -- simple zapping tool for the Linux DVB API
++ *
++ * szap operates on VDR (http://www.cadsoft.de/people/kls/vdr/index.htm)
++ * satellite channel lists (e.g. from http://www.dxandy.de/cgi-bin/dvbchan.pl).
++ * szap assumes you have a "Universal LNB" (i.e. with LOFs 9750/10600 MHz).
++ *
++ * Compilation: `gcc -Wall -I../../ost/include -O2 szap.c -o szap`
++ * or, if your DVB driver is in the kernel source tree:
++ * `gcc -Wall -DDVB_IN_KERNEL -O2 szap.c -o szap`
++ *
++ * Copyright (C) 2001 Johannes Stezenbach (js@convergence.de)
++ * for convergence integrated media
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <limits.h>
++#include <string.h>
++#include <errno.h>
++#include <sys/ioctl.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <sys/poll.h>
++#include <sys/param.h>
++#include <fcntl.h>
++#include <time.h>
++#include <unistd.h>
++
++#include <stdint.h>
++#include <sys/time.h>
++
++#include "../include/frontend.h"
++#include "../include/dmx.h"
++#include "../include/audio.h"
++#include "../include/version.h"
++#include "lnb.h"
++
++#ifndef TRUE
++#define TRUE (1==1)
++#endif
++#ifndef FALSE
++#define FALSE (1==0)
++#endif
++
++/* location of channel list file */
++#define CHANNEL_FILE "channels.conf"
++
++/* one line of the VDR channel file has the following format:
++ * ^name:frequency_MHz:polarization:sat_no:symbolrate:vpid:apid:?:service_id$
++ */
++
++
++#define FRONTENDDEVICE "/dev/dvb/adapter%d/frontend%d"
++#define DEMUXDEVICE "/dev/dvb/adapter%d/demux%d"
++#define AUDIODEVICE "/dev/dvb/adapter%d/audio%d"
++
++static struct lnb_types_st lnb_type;
++
++static int exit_after_tuning;
++static int interactive;
++
++static char *usage_str =
++ "\nusage: szap -q\n"
++ " list known channels\n"
++ " szap [options] {-n channel-number|channel_name}\n"
++ " zap to channel via number or full name (case insensitive)\n"
++ " -a number : use given adapter (default 0)\n"
++ " -f number : use given frontend (default 0)\n"
++ " -d number : use given demux (default 0)\n"
++ " -c file : read channels list from 'file'\n"
++ " -b : enable Audio Bypass (default no)\n"
++ " -x : exit after tuning\n"
++ " -r : set up /dev/dvb/adapterX/dvr0 for TS recording\n"
++ " -l lnb-type (DVB-S Only) (use -l help to print types) or \n"
++ " -l low[,high[,switch]] in Mhz\n"
++ " -i : run interactively, allowing you to type in channel names\n"
++ " -p : add pat and pmt to TS recording (implies -r)\n"
++ " or -n numbers for zapping\n"
++ " -t : delivery system type DVB-S=0, DSS=1, DVB-S2=2\n";
++
++static int set_demux(int dmxfd, int pid, int pes_type, int dvr)
++{
++ struct dmx_pes_filter_params pesfilter;
++
++ if (pid < 0 || pid >= 0x1fff) /* ignore this pid to allow radio services */
++ return TRUE;
++
++ if (dvr) {
++ int buffersize = 64 * 1024;
++ if (ioctl(dmxfd, DMX_SET_BUFFER_SIZE, buffersize) == -1)
++ perror("DMX_SET_BUFFER_SIZE failed");
++ }
++
++ pesfilter.pid = pid;
++ pesfilter.input = DMX_IN_FRONTEND;
++ pesfilter.output = dvr ? DMX_OUT_TS_TAP : DMX_OUT_DECODER;
++ pesfilter.pes_type = pes_type;
++ pesfilter.flags = DMX_IMMEDIATE_START;
++
++ if (ioctl(dmxfd, DMX_SET_PES_FILTER, &pesfilter) == -1) {
++ fprintf(stderr, "DMX_SET_PES_FILTER failed "
++ "(PID = 0x%04x): %d %m\n", pid, errno);
++
++ return FALSE;
++ }
++
++ return TRUE;
++}
++
++int get_pmt_pid(char *dmxdev, int sid)
++{
++ int patfd, count;
++ int pmt_pid = 0;
++ int patread = 0;
++ int section_length;
++ unsigned char buft[4096];
++ unsigned char *buf = buft;
++ struct dmx_sct_filter_params f;
++
++ memset(&f, 0, sizeof(f));
++ f.pid = 0;
++ f.filter.filter[0] = 0x00;
++ f.filter.mask[0] = 0xff;
++ f.timeout = 0;
++ f.flags = DMX_IMMEDIATE_START | DMX_CHECK_CRC;
++
++ if ((patfd = open(dmxdev, O_RDWR)) < 0) {
++ perror("openening pat demux failed");
++ return -1;
++ }
++
++ if (ioctl(patfd, DMX_SET_FILTER, &f) == -1) {
++ perror("ioctl DMX_SET_FILTER failed");
++ close(patfd);
++ return -1;
++ }
++
++ while (!patread) {
++ if (((count = read(patfd, buf, sizeof(buft))) < 0) && errno == EOVERFLOW)
++ count = read(patfd, buf, sizeof(buft));
++ if (count < 0) {
++ perror("read_sections: read error");
++ close(patfd);
++ return -1;
++ }
++
++ section_length = ((buf[1] & 0x0f) << 8) | buf[2];
++ if (count != section_length + 3)
++ continue;
++
++ buf += 8;
++ section_length -= 8;
++
++ patread = 1; /* assumes one section contains the whole pat */
++ while (section_length > 0) {
++ int service_id = (buf[0] << 8) | buf[1];
++ if (service_id == sid) {
++ pmt_pid = ((buf[2] & 0x1f) << 8) | buf[3];
++ section_length = 0;
++ }
++ buf += 4;
++ section_length -= 4;
++ }
++ }
++ close(patfd);
++ return pmt_pid;
++}
++
++struct diseqc_cmd {
++ struct dvb_diseqc_master_cmd cmd;
++ uint32_t wait;
++};
++
++void diseqc_send_msg(int fd, fe_sec_voltage_t v, struct diseqc_cmd *cmd,
++ fe_sec_tone_mode_t t, fe_sec_mini_cmd_t b)
++{
++ if (ioctl(fd, FE_SET_TONE, SEC_TONE_OFF) == -1)
++ perror("FE_SET_TONE failed");
++ if (ioctl(fd, FE_SET_VOLTAGE, v) == -1)
++ perror("FE_SET_VOLTAGE failed");
++ usleep(15 * 1000);
++ if (ioctl(fd, FE_DISEQC_SEND_MASTER_CMD, &cmd->cmd) == -1)
++ perror("FE_DISEQC_SEND_MASTER_CMD failed");
++ usleep(cmd->wait * 1000);
++ usleep(15 * 1000);
++ if (ioctl(fd, FE_DISEQC_SEND_BURST, b) == -1)
++ perror("FE_DISEQC_SEND_BURST failed");
++ usleep(15 * 1000);
++ if (ioctl(fd, FE_SET_TONE, t) == -1)
++ perror("FE_SET_TONE failed");
++}
++
++
++
++
++/* digital satellite equipment control,
++ * specification is available from http://www.eutelsat.com/
++ */
++static int diseqc(int secfd, int sat_no, int pol_vert, int hi_band)
++{
++ struct diseqc_cmd cmd =
++ { {{0xe0, 0x10, 0x38, 0xf0, 0x00, 0x00}, 4}, 0 };
++
++ /**
++ * param: high nibble: reset bits, low nibble set bits,
++ * bits are: option, position, polarizaion, band
++ */
++ cmd.cmd.msg[3] =
++ 0xf0 | (((sat_no * 4) & 0x0f) | (hi_band ? 1 : 0) | (pol_vert ? 0 : 2));
++
++ diseqc_send_msg(secfd, pol_vert ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18,
++ &cmd, hi_band ? SEC_TONE_ON : SEC_TONE_OFF,
++ (sat_no / 4) % 2 ? SEC_MINI_B : SEC_MINI_A);
++
++ return TRUE;
++}
++
++#define DVBS 0
++#define DSS 1
++#define DVBS2 2
++
++static int do_tune(int fefd, unsigned int ifreq, unsigned int sr, unsigned int delsys)
++{
++ /* API Major=3, Minor=1 */
++ struct dvb_frontend_parameters tuneto;
++ struct dvb_frontend_event ev;
++ /* API Major=3, Minor=2 */
++ struct dvbfe_params fe_params;
++
++ /* discard stale QPSK events */
++ while (1) {
++ if (ioctl(fefd, FE_GET_EVENT, &ev) == -1)
++ break;
++ }
++
++ if ((DVB_API_VERSION == 3) && (DVB_API_VERSION_MINOR == 3)) {
++ printf("\n%s: API version=%d, delivery system = %d\n", __func__, DVB_API_VERSION_MINOR, delsys);
++
++ fe_params.frequency = ifreq;
++ fe_params.inversion = INVERSION_AUTO;
++
++ switch (delsys) {
++ case DVBS:
++ fe_params.delsys.dvbs.symbol_rate = sr;
++ fe_params.delsys.dvbs.fec = FEC_AUTO;
++ printf("%s: Frequency = %d, Srate = %d\n",
++ __func__, fe_params.frequency, fe_params.delsys.dvbs.symbol_rate);
++ break;
++ case DSS:
++ fe_params.delsys.dss.symbol_rate = sr;
++ fe_params.delsys.dss.fec = FEC_AUTO;
++ printf("%s: Frequency = %d, Srate = %d\n",
++ __func__, fe_params.frequency, fe_params.delsys.dss.symbol_rate);
++ break;
++ case DVBS2:
++ fe_params.delsys.dvbs2.symbol_rate = sr;
++ fe_params.delsys.dvbs2.fec = FEC_AUTO;
++ printf("%s: Frequency = %d, Srate = %d\n",
++ __func__, fe_params.frequency, fe_params.delsys.dvbs2.symbol_rate);
++ break;
++ default:
++ return -EINVAL;
++ }
++ printf("%s: Frequency = %d, Srate = %d\n\n\n",
++ __func__, fe_params.frequency, fe_params.delsys.dvbs.symbol_rate);
++
++ if (ioctl(fefd, DVBFE_SET_PARAMS, &fe_params) == -1) {
++ perror("DVBFE_SET_PARAMS failed");
++ return FALSE;
++ }
++
++ } else if ((DVB_API_VERSION == 3) && (DVB_API_VERSION_MINOR == 1)){
++ tuneto.frequency = ifreq;
++ tuneto.inversion = INVERSION_AUTO;
++ tuneto.u.qpsk.symbol_rate = sr;
++ tuneto.u.qpsk.fec_inner = FEC_AUTO;
++ if (ioctl(fefd, FE_SET_FRONTEND, &tuneto) == -1) {
++ perror("FE_SET_FRONTEND failed");
++ return FALSE;
++ }
++ }
++ return TRUE;
++}
++
++
++static
++int check_frontend (int fe_fd, int dvr)
++{
++ (void)dvr;
++ fe_status_t status;
++ uint16_t snr, signal;
++ uint32_t ber, uncorrected_blocks;
++ int timeout = 0;
++
++ do {
++ if (ioctl(fe_fd, FE_READ_STATUS, &status) == -1)
++ perror("FE_READ_STATUS failed");
++ /* some frontends might not support all these ioctls, thus we
++ * avoid printing errors
++ */
++ if (ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal) == -1)
++ signal = -2;
++ if (ioctl(fe_fd, FE_READ_SNR, &snr) == -1)
++ snr = -2;
++ if (ioctl(fe_fd, FE_READ_BER, &ber) == -1)
++ ber = -2;
++ if (ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks) == -1)
++ uncorrected_blocks = -2;
++
++ printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
++ status, signal, snr, ber, uncorrected_blocks);
++
++ if (status & FE_HAS_LOCK)
++ printf("FE_HAS_LOCK");
++ printf("\n");
++
++ if (exit_after_tuning && ((status & FE_HAS_LOCK) || (++timeout >= 10)))
++ break;
++
++ usleep(1000000);
++ } while (1);
++
++ return 0;
++}
++
++
++static
++int zap_to(unsigned int adapter, unsigned int frontend, unsigned int demux,
++ unsigned int sat_no, unsigned int freq, unsigned int pol,
++ unsigned int sr, unsigned int vpid, unsigned int apid, int sid,
++ int dvr, int rec_psi, int bypass, unsigned int delsys)
++{
++ char fedev[128], dmxdev[128], auddev[128];
++ static int fefd, dmxfda, dmxfdv, audiofd = -1, patfd, pmtfd;
++ int pmtpid;
++ uint32_t ifreq;
++ int hiband, result;
++ enum dvbfe_delsys delivery;
++
++ switch (delsys) {
++ case DVBS:
++ printf("Delivery system=DVB-S\n");
++ delivery = DVBFE_DELSYS_DVBS;
++ break;
++ case DSS:
++ printf("Delivery system=DSS\n");
++ delivery = DVBFE_DELSYS_DSS;
++ break;
++ case DVBS2:
++ printf("Delivery system=DVB-S2\n");
++ delivery = DVBFE_DELSYS_DVBS2;
++ break;
++ default:
++ printf("Unsupported delivery system\n");
++ return -EINVAL;
++ }
++
++ if (!fefd) {
++ snprintf(fedev, sizeof(fedev), FRONTENDDEVICE, adapter, frontend);
++ snprintf(dmxdev, sizeof(dmxdev), DEMUXDEVICE, adapter, demux);
++ snprintf(auddev, sizeof(auddev), AUDIODEVICE, adapter, demux);
++ printf("using '%s' and '%s'\n", fedev, dmxdev);
++
++ if ((fefd = open(fedev, O_RDWR | O_NONBLOCK)) < 0) {
++ perror("opening frontend failed");
++ return FALSE;
++ }
++ result = ioctl(fefd, DVBFE_SET_DELSYS, &delivery);
++ if (result < 0) {
++ perror("ioctl DVBFE_SET_DELSYS failed");
++ close(fefd);
++ return FALSE;
++ }
++
++ if ((dmxfdv = open(dmxdev, O_RDWR)) < 0) {
++ perror("opening video demux failed");
++ close(fefd);
++ return FALSE;
++ }
++
++ if ((dmxfda = open(dmxdev, O_RDWR)) < 0) {
++ perror("opening audio demux failed");
++ close(fefd);
++ return FALSE;
++ }
++
++ if (dvr == 0) /* DMX_OUT_DECODER */
++ audiofd = open(auddev, O_RDWR);
++
++ if (rec_psi){
++ if ((patfd = open(dmxdev, O_RDWR)) < 0) {
++ perror("opening pat demux failed");
++ close(audiofd);
++ close(dmxfda);
++ close(dmxfdv);
++ close(fefd);
++ return FALSE;
++ }
++
++ if ((pmtfd = open(dmxdev, O_RDWR)) < 0) {
++ perror("opening pmt demux failed");
++ close(patfd);
++ close(audiofd);
++ close(dmxfda);
++ close(dmxfdv);
++ close(fefd);
++ return FALSE;
++ }
++ }
++ }
++
++ hiband = 0;
++ if (lnb_type.switch_val && lnb_type.high_val &&
++ freq >= lnb_type.switch_val)
++ hiband = 1;
++
++ if (hiband)
++ ifreq = freq - lnb_type.high_val;
++ else {
++ if (freq < lnb_type.low_val)
++ ifreq = lnb_type.low_val - freq;
++ else
++ ifreq = freq - lnb_type.low_val;
++ }
++ result = FALSE;
++
++ if (diseqc(fefd, sat_no, pol, hiband))
++ if (do_tune(fefd, ifreq, sr, delsys))
++ if (set_demux(dmxfdv, vpid, DMX_PES_VIDEO, dvr))
++ if (audiofd >= 0)
++ (void)ioctl(audiofd, AUDIO_SET_BYPASS_MODE, bypass);
++ if (set_demux(dmxfda, apid, DMX_PES_AUDIO, dvr)) {
++ if (rec_psi) {
++ pmtpid = get_pmt_pid(dmxdev, sid);
++ if (pmtpid < 0) {
++ result = FALSE;
++ }
++ if (pmtpid == 0) {
++ fprintf(stderr,"couldn't find pmt-pid for sid %04x\n",sid);
++ result = FALSE;
++ }
++ if (set_demux(patfd, 0, DMX_PES_OTHER, dvr))
++ if (set_demux(pmtfd, pmtpid, DMX_PES_OTHER, dvr))
++ result = TRUE;
++ } else {
++ result = TRUE;
++ }
++ }
++
++ check_frontend (fefd, dvr);
++
++ if (!interactive) {
++ close(patfd);
++ close(pmtfd);
++ if (audiofd >= 0)
++ close(audiofd);
++ close(dmxfda);
++ close(dmxfdv);
++ close(fefd);
++ }
++
++ return result;
++}
++
++
++static int read_channels(const char *filename, int list_channels,
++ uint32_t chan_no, const char *chan_name,
++ unsigned int adapter, unsigned int frontend,
++ unsigned int demux, int dvr, int rec_psi,
++ int bypass, unsigned int delsys)
++{
++ FILE *cfp;
++ char buf[4096];
++ char inp[256];
++ char *field, *tmp, *p;
++ unsigned int line;
++ unsigned int freq, pol, sat_no, sr, vpid, apid, sid;
++ int ret;
++
++again:
++ line = 0;
++ if (!(cfp = fopen(filename, "r"))) {
++ fprintf(stderr, "error opening channel list '%s': %d %m\n",
++ filename, errno);
++ return FALSE;
++ }
++
++ if (interactive) {
++ fprintf(stderr, "\n>>> ");
++ if (!fgets(inp, sizeof(inp), stdin)) {
++ printf("\n");
++ return -1;
++ }
++ if (inp[0] == '-' && inp[1] == 'n') {
++ chan_no = strtoul(inp+2, NULL, 0);
++ chan_name = NULL;
++ if (!chan_no) {
++ fprintf(stderr, "bad channel number\n");
++ goto again;
++ }
++ } else {
++ p = strchr(inp, '\n');
++ if (p)
++ *p = '\0';
++ chan_name = inp;
++ chan_no = 0;
++ }
++ }
++
++ while (!feof(cfp)) {
++ if (fgets(buf, sizeof(buf), cfp)) {
++ line++;
++
++ if (chan_no && chan_no != line)
++ continue;
++
++ tmp = buf;
++ field = strsep(&tmp, ":");
++
++ if (!field)
++ goto syntax_err;
++
++ if (list_channels) {
++ printf("%03u %s\n", line, field);
++ continue;
++ }
++
++ if (chan_name && strcasecmp(chan_name, field) != 0)
++ continue;
++
++ printf("zapping to %d '%s':\n", line, field);
++
++ if (!(field = strsep(&tmp, ":")))
++ goto syntax_err;
++
++ freq = strtoul(field, NULL, 0);
++
++ if (!(field = strsep(&tmp, ":")))
++ goto syntax_err;
++
++ pol = (field[0] == 'h' ? 0 : 1);
++
++ if (!(field = strsep(&tmp, ":")))
++ goto syntax_err;
++
++ sat_no = strtoul(field, NULL, 0);
++
++ if (!(field = strsep(&tmp, ":")))
++ goto syntax_err;
++
++ sr = strtoul(field, NULL, 0) * 1000;
++
++ if (!(field = strsep(&tmp, ":")))
++ goto syntax_err;
++
++ vpid = strtoul(field, NULL, 0);
++ if (!vpid)
++ vpid = 0x1fff;
++
++ if (!(field = strsep(&tmp, ":")))
++ goto syntax_err;
++
++ p = strchr(field, ';');
++
++ if (p) {
++ *p = '\0';
++ p++;
++ if (bypass) {
++ if (!p || !*p)
++ goto syntax_err;
++ field = p;
++ }
++ }
++
++ apid = strtoul(field, NULL, 0);
++ if (!apid)
++ apid = 0x1fff;
++
++ if (!(field = strsep(&tmp, ":")))
++ goto syntax_err;
++
++ sid = strtoul(field, NULL, 0);
++
++ printf("sat %u, frequency = %u MHz %c, symbolrate %u, "
++ "vpid = 0x%04x, apid = 0x%04x sid = 0x%04x\n",
++ sat_no, freq, pol ? 'V' : 'H', sr, vpid, apid, sid);
++
++ fclose(cfp);
++
++ ret = zap_to(adapter, frontend, demux, sat_no, freq * 1000,
++ pol, sr, vpid, apid, sid, dvr, rec_psi, bypass, delsys);
++ if (interactive)
++ goto again;
++
++ if (ret)
++ return TRUE;
++
++ return FALSE;
++
++syntax_err:
++ fprintf(stderr, "syntax error in line %u: '%s'\n", line, buf);
++ } else if (ferror(cfp)) {
++ fprintf(stderr, "error reading channel list '%s': %d %m\n",
++ filename, errno);
++ fclose(cfp);
++ return FALSE;
++ } else
++ break;
++ }
++
++ fclose(cfp);
++
++ if (!list_channels) {
++ fprintf(stderr, "channel not found\n");
++
++ if (!interactive)
++ return FALSE;
++ }
++ if (interactive)
++ goto again;
++
++ return TRUE;
++}
++
++
++void
++bad_usage(char *pname, int prlnb)
++{
++ int i;
++ struct lnb_types_st *lnbp;
++ char **cp;
++
++ if (!prlnb) {
++ fprintf (stderr, usage_str, pname);
++ } else {
++ i = 0;
++ fprintf(stderr, "-l <lnb-type> or -l low[,high[,switch]] in Mhz\nwhere <lnb-type> is:\n");
++ while(NULL != (lnbp = lnb_enum(i))) {
++ fprintf (stderr, "%s\n", lnbp->name);
++ for (cp = lnbp->desc; *cp ; cp++) {
++ fprintf (stderr, " %s\n", *cp);
++ }
++ i++;
++ }
++ }
++}
++
++int main(int argc, char *argv[])
++{
++ const char *home;
++ char chanfile[2 * PATH_MAX];
++ int list_channels = 0;
++ unsigned int chan_no = 0;
++ const char *chan_name = NULL;
++ unsigned int adapter = 0, frontend = 0, demux = 0, dvr = 0, rec_psi = 0, delsys = 0;
++ int bypass = 0;
++ int opt, copt = 0;
++
++ lnb_type = *lnb_enum(0);
++ while ((opt = getopt(argc, argv, "hqrpn:a:f:d:t:c:l:xib")) != -1) {
++ switch (opt) {
++ case '?':
++ case 'h':
++ default:
++ bad_usage(argv[0], 0);
++ case 'b':
++ bypass = 1;
++ break;
++ case 'q':
++ list_channels = 1;
++ break;
++ case 'r':
++ dvr = 1;
++ break;
++ case 'n':
++ chan_no = strtoul(optarg, NULL, 0);
++ break;
++ case 'a':
++ adapter = strtoul(optarg, NULL, 0);
++ break;
++ case 'f':
++ frontend = strtoul(optarg, NULL, 0);
++ break;
++ case 'p':
++ rec_psi = 1;
++ break;
++ case 'd':
++ demux = strtoul(optarg, NULL, 0);
++ break;
++ case 't':
++ delsys = strtoul(optarg, NULL, 0);
++ break;
++ case 'c':
++ copt = 1;
++ strncpy(chanfile, optarg, sizeof(chanfile));
++ break;
++ case 'l':
++ if (lnb_decode(optarg, &lnb_type) < 0) {
++ bad_usage(argv[0], 1);
++ return -1;
++ }
++ break;
++ case 'x':
++ exit_after_tuning = 1;
++ break;
++ case 'i':
++ interactive = 1;
++ exit_after_tuning = 1;
++ }
++ }
++ lnb_type.low_val *= 1000; /* convert to kiloherz */
++ lnb_type.high_val *= 1000; /* convert to kiloherz */
++ lnb_type.switch_val *= 1000; /* convert to kiloherz */
++ if (optind < argc)
++ chan_name = argv[optind];
++ if (chan_name && chan_no) {
++ bad_usage(argv[0], 0);
++ return -1;
++ }
++ if (list_channels && (chan_name || chan_no)) {
++ bad_usage(argv[0], 0);
++ return -1;
++ }
++ if (!list_channels && !chan_name && !chan_no && !interactive) {
++ bad_usage(argv[0], 0);
++ return -1;
++ }
++
++ if (!copt) {
++ if (!(home = getenv("HOME"))) {
++ fprintf(stderr, "error: $HOME not set\n");
++ return TRUE;
++ }
++ snprintf(chanfile, sizeof(chanfile),
++ "%s/.szap/%i/%s", home, adapter, CHANNEL_FILE);
++ if (access(chanfile, R_OK))
++ snprintf(chanfile, sizeof(chanfile),
++ "%s/.szap/%s", home, CHANNEL_FILE);
++ }
++
++ printf("reading channels from file '%s'\n", chanfile);
++
++ if (rec_psi)
++ dvr=1;
++
++ if (!read_channels(chanfile, list_channels, chan_no, chan_name,
++ adapter, frontend, demux, dvr, rec_psi, bypass, delsys))
++
++ return TRUE;
++
++ return FALSE;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_audio.c dvb-apps/test/test_audio.c
+--- linuxtv-dvb-apps-1.1.1/test/test_audio.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_audio.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,4 @@
+-/*
++/*
+ * test_audio.c - Test program for new API
+ *
+ * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
+@@ -40,7 +40,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_STOP,0) < 0)){
++ if ((ans = ioctl(fd,AUDIO_STOP,0)) < 0) {
+ perror("AUDIO STOP: ");
+ return -1;
+ }
+@@ -52,7 +52,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_PLAY) < 0)){
++ if ((ans = ioctl(fd,AUDIO_PLAY)) < 0) {
+ perror("AUDIO PLAY: ");
+ return -1;
+ }
+@@ -65,7 +65,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_PAUSE) < 0)){
++ if ((ans = ioctl(fd,AUDIO_PAUSE)) < 0) {
+ perror("AUDIO PAUSE: ");
+ return -1;
+ }
+@@ -78,7 +78,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_CONTINUE) < 0)){
++ if ((ans = ioctl(fd,AUDIO_CONTINUE)) < 0) {
+ perror("AUDIO CONTINUE: ");
+ return -1;
+ }
+@@ -90,7 +90,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_SELECT_SOURCE, source) < 0)){
++ if ((ans = ioctl(fd,AUDIO_SELECT_SOURCE, source)) < 0) {
+ perror("AUDIO SELECT SOURCE: ");
+ return -1;
+ }
+@@ -104,7 +104,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_SET_MUTE, state) < 0)){
++ if ((ans = ioctl(fd,AUDIO_SET_MUTE, state)) < 0) {
+ perror("AUDIO SET MUTE: ");
+ return -1;
+ }
+@@ -116,7 +116,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_SET_AV_SYNC, state) < 0)){
++ if ((ans = ioctl(fd,AUDIO_SET_AV_SYNC, state)) < 0) {
+ perror("AUDIO SET AV SYNC: ");
+ return -1;
+ }
+@@ -128,8 +128,8 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_SET_BYPASS_MODE, mode) < 0)){
+- perror("AUDIO SET BYPASS MODE: ");
++ if ((ans = ioctl(fd,AUDIO_SET_BYPASS_MODE, mode)) < 0) {
++ printf("AUDIO SET BYPASS MODE not implemented?\n");
+ return -1;
+ }
+
+@@ -141,7 +141,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_CHANNEL_SELECT, select) < 0)){
++ if ((ans = ioctl(fd,AUDIO_CHANNEL_SELECT, select)) < 0) {
+ perror("AUDIO CHANNEL SELECT: ");
+ return -1;
+ }
+@@ -154,7 +154,7 @@
+ struct audio_status stat;
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_GET_STATUS, &stat) < 0)){
++ if ((ans = ioctl(fd,AUDIO_GET_STATUS, &stat)) < 0) {
+ perror("AUDIO GET STATUS: ");
+ return -1;
+ }
+@@ -179,7 +179,7 @@
+ printf("unknown (%d)\n",stat.play_state);
+ break;
+ }
+-
++
+ printf(" Stream Source : ");
+ switch((int)stat.stream_source){
+ case AUDIO_SOURCE_DEMUX:
+@@ -227,7 +227,7 @@
+ int stopped = 0;
+ boolean mute = false;
+ boolean sync = false;
+-
++
+ pfd[0].fd = STDIN_FILENO;
+ pfd[0].events = POLLIN;
+
+@@ -257,7 +257,7 @@
+ printf("playback stopped\n");
+ stopped = 1;
+ break;
+-
++
+ case 'c':
+ audioContinue(fd);
+ printf("playback continued\n");
+@@ -291,7 +291,7 @@
+ break;
+ }
+ }
+-
++
+ }
+ }
+ }
+@@ -312,8 +312,8 @@
+ perror("File open:");
+ return -1;
+ }
+-
+- if((fd = open("/dev/ost/audio",O_RDWR|O_NONBLOCK)) < 0){
++
++ if ((fd = open("/dev/ost/audio",O_RDWR|O_NONBLOCK)) < 0){
+ perror("AUDIO DEVICE: ");
+ return -1;
+ }
+@@ -321,7 +321,7 @@
+
+
+ audioSetMute(fd,mute);
+- // audioSetBypassMode(fd,false); // not implemented
++ audioSetBypassMode(fd,false);
+ //audioContinue(fd);
+ audioSelectSource(fd,AUDIO_SOURCE_MEMORY);
+ audioPlay(fd);
+@@ -334,7 +334,7 @@
+ //audioChannelSelect(fd,AUDIO_STEREO);
+ //audioSetAVSync(fd,sync);
+ audioGetStatus(fd);
+-
++
+ play_file_audio(filefd,fd);
+
+ close(fd);
+@@ -342,4 +342,3 @@
+
+
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_av.c dvb-apps/test/test_av.c
+--- linuxtv-dvb-apps-1.1.1/test/test_av.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_av.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,4 @@
+-/*
++/*
+ * test_av.c - Test for audio and video MPEG decoder API.
+ *
+ * Copyright (C) 2000 - 2002 convergence GmbH
+@@ -30,6 +30,7 @@
+ #include <time.h>
+ #include <unistd.h>
+
++#include <linux/types.h>
+ #include <linux/dvb/audio.h>
+ #include <linux/dvb/video.h>
+
+@@ -94,11 +95,11 @@
+
+ int audioSetAVSync(int fd, char *arg)
+ {
+- int sync;
++ int _sync;
+ if (!arg)
+ return -1;
+- sync = atoi(arg);
+- if (ioctl(fd, AUDIO_SET_AV_SYNC, sync) == -1)
++ _sync = atoi(arg);
++ if (ioctl(fd, AUDIO_SET_AV_SYNC, _sync) == -1)
+ perror("AUDIO_SET_AV_SYNC");
+ return 0;
+ }
+@@ -127,66 +128,66 @@
+
+ int audioGetStatus(int fd, char *arg)
+ {
+- struct audio_status stat;
++ struct audio_status _stat;
+
+ if (arg)
+ return -1;
+- if (ioctl(fd, AUDIO_GET_STATUS, &stat) == -1) {
++ if (ioctl(fd, AUDIO_GET_STATUS, &_stat) == -1) {
+ perror("AUDIO_GET_STATUS");
+ return 0;
+ }
+
+ printf("Audio Status:\n");
+ printf(" Sync State : %s\n",
+- (stat.AV_sync_state ? "SYNC" : "NO SYNC"));
++ (_stat.AV_sync_state ? "SYNC" : "NO SYNC"));
+ printf(" Mute State : %s\n",
+- (stat.mute_state ? "muted" : "not muted"));
++ (_stat.mute_state ? "muted" : "not muted"));
+ printf(" Play State : ");
+- switch ((int)stat.play_state){
++ switch ((int)_stat.play_state){
+ case AUDIO_STOPPED:
+- printf("STOPPED (%d)\n",stat.play_state);
++ printf("STOPPED (%d)\n",_stat.play_state);
+ break;
+ case AUDIO_PLAYING:
+- printf("PLAYING (%d)\n",stat.play_state);
++ printf("PLAYING (%d)\n",_stat.play_state);
+ break;
+ case AUDIO_PAUSED:
+- printf("PAUSED (%d)\n",stat.play_state);
++ printf("PAUSED (%d)\n",_stat.play_state);
+ break;
+ default:
+- printf("unknown (%d)\n",stat.play_state);
++ printf("unknown (%d)\n",_stat.play_state);
+ break;
+ }
+
+ printf(" Stream Source : ");
+- switch((int)stat.stream_source){
++ switch((int)_stat.stream_source){
+ case AUDIO_SOURCE_DEMUX:
+- printf("DEMUX (%d)\n",stat.stream_source);
++ printf("DEMUX (%d)\n",_stat.stream_source);
+ break;
+ case AUDIO_SOURCE_MEMORY:
+- printf("MEMORY (%d)\n",stat.stream_source);
++ printf("MEMORY (%d)\n",_stat.stream_source);
+ break;
+ default:
+- printf("unknown (%d)\n",stat.stream_source);
++ printf("unknown (%d)\n",_stat.stream_source);
+ break;
+ }
+
+ printf(" Channel Select : ");
+- switch((int)stat.channel_select){
++ switch((int)_stat.channel_select){
+ case AUDIO_STEREO:
+- printf("Stereo (%d)\n",stat.channel_select);
++ printf("Stereo (%d)\n",_stat.channel_select);
+ break;
+ case AUDIO_MONO_LEFT:
+- printf("Mono left(%d)\n",stat.channel_select);
++ printf("Mono left(%d)\n",_stat.channel_select);
+ break;
+ case AUDIO_MONO_RIGHT:
+- printf("Mono right (%d)\n",stat.channel_select);
++ printf("Mono right (%d)\n",_stat.channel_select);
+ break;
+ default:
+- printf("unknown (%d)\n",stat.channel_select);
++ printf("unknown (%d)\n",_stat.channel_select);
+ break;
+ }
+ printf(" Bypass Mode : %s\n",
+- (stat.bypass_mode ? "ON" : "OFF"));
++ (_stat.bypass_mode ? "ON" : "OFF"));
+
+ return 0;
+
+@@ -300,76 +301,76 @@
+
+ int videoGetStatus(int fd, char *arg)
+ {
+- struct video_status stat;
++ struct video_status _stat;
+
+ if (arg)
+ return -1;
+- if (ioctl(fd, VIDEO_GET_STATUS, &stat) == -1){
++ if (ioctl(fd, VIDEO_GET_STATUS, &_stat) == -1){
+ perror("VIDEO_GET_STATUS");
+ return 0;
+ }
+
+ printf("Video Status:\n");
+ printf(" Blank State : %s\n",
+- (stat.video_blank ? "BLANK" : "STILL"));
++ (_stat.video_blank ? "BLANK" : "STILL"));
+ printf(" Play State : ");
+- switch ((int)stat.play_state){
++ switch ((int)_stat.play_state){
+ case VIDEO_STOPPED:
+- printf("STOPPED (%d)\n",stat.play_state);
++ printf("STOPPED (%d)\n",_stat.play_state);
+ break;
+ case VIDEO_PLAYING:
+- printf("PLAYING (%d)\n",stat.play_state);
++ printf("PLAYING (%d)\n",_stat.play_state);
+ break;
+ case VIDEO_FREEZED:
+- printf("FREEZED (%d)\n",stat.play_state);
++ printf("FREEZED (%d)\n",_stat.play_state);
+ break;
+ default:
+- printf("unknown (%d)\n",stat.play_state);
++ printf("unknown (%d)\n",_stat.play_state);
+ break;
+ }
+
+ printf(" Stream Source : ");
+- switch((int)stat.stream_source){
++ switch((int)_stat.stream_source){
+ case VIDEO_SOURCE_DEMUX:
+- printf("DEMUX (%d)\n",stat.stream_source);
++ printf("DEMUX (%d)\n",_stat.stream_source);
+ break;
+ case VIDEO_SOURCE_MEMORY:
+- printf("MEMORY (%d)\n",stat.stream_source);
++ printf("MEMORY (%d)\n",_stat.stream_source);
+ break;
+ default:
+- printf("unknown (%d)\n",stat.stream_source);
++ printf("unknown (%d)\n",_stat.stream_source);
+ break;
+ }
+
+ printf(" Format (Aspect Ratio): ");
+- switch((int)stat.video_format){
++ switch((int)_stat.video_format){
+ case VIDEO_FORMAT_4_3:
+- printf("4:3 (%d)\n",stat.video_format);
++ printf("4:3 (%d)\n",_stat.video_format);
+ break;
+ case VIDEO_FORMAT_16_9:
+- printf("16:9 (%d)\n",stat.video_format);
++ printf("16:9 (%d)\n",_stat.video_format);
+ break;
+ case VIDEO_FORMAT_221_1:
+- printf("2.21:1 (%d)\n",stat.video_format);
++ printf("2.21:1 (%d)\n",_stat.video_format);
+ break;
+ default:
+- printf("unknown (%d)\n",stat.video_format);
++ printf("unknown (%d)\n",_stat.video_format);
+ break;
+ }
+
+ printf(" Display Format : ");
+- switch((int)stat.display_format){
++ switch((int)_stat.display_format){
+ case VIDEO_PAN_SCAN:
+- printf("Pan&Scan (%d)\n",stat.display_format);
++ printf("Pan&Scan (%d)\n",_stat.display_format);
+ break;
+ case VIDEO_LETTER_BOX:
+- printf("Letterbox (%d)\n",stat.display_format);
++ printf("Letterbox (%d)\n",_stat.display_format);
+ break;
+ case VIDEO_CENTER_CUT_OUT:
+- printf("Center cutout (%d)\n",stat.display_format);
++ printf("Center cutout (%d)\n",_stat.display_format);
+ break;
+ default:
+- printf("unknown (%d)\n",stat.display_format);
++ printf("unknown (%d)\n",_stat.display_format);
+ break;
+ }
+ return 0;
+@@ -424,12 +425,12 @@
+ sp.size = st.st_size;
+ printf("I-frame size: %d\n", sp.size);
+
+- if(!sp.iFrame) {
++ if (!sp.iFrame) {
+ printf("No memory for I-Frame\n");
+ return 0;
+ }
+
+- printf("read: %d bytes\n",read(sifd,sp.iFrame,sp.size));
++ printf("read: %d bytes\n", (int) read(sifd,sp.iFrame,sp.size));
+ if (ioctl(fd, VIDEO_STILLPICTURE, &sp) == -1)
+ perror("VIDEO_STILLPICTURE");
+ return 0;
+@@ -555,11 +556,11 @@
+ printf("using audio device '%s'\n", audiodev);
+ printf("enter command or h + enter for help\n");
+
+- if((vfd = open(videodev, O_RDWR | O_NONBLOCK)) < 0) {
++ if ((vfd = open(videodev, O_RDWR | O_NONBLOCK)) < 0) {
+ perror("open video device");
+ return 1;
+ }
+- if((afd = open(audiodev, O_RDWR | O_NONBLOCK)) < 0) {
++ if ((afd = open(audiodev, O_RDWR | O_NONBLOCK)) < 0) {
+ perror("open audio device");
+ return 1;
+ }
+@@ -571,4 +572,3 @@
+ close(afd);
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_av_play.c dvb-apps/test/test_av_play.c
+--- linuxtv-dvb-apps-1.1.1/test/test_av_play.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_av_play.c 2009-06-21 13:29:06.000000000 +0200
+@@ -19,27 +19,44 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
++ * Thu Jun 24 09:18:44 CEST 2004
++ * Add scan_file_av() and copy_to_dvb() for AV
++ * filtering to be able to use AC3 audio streams
++ * Copyright (C) 2004 Werner Fink <werner@suse.de>
+ */
+
++#ifndef _GNU_SOURCE
++# define _GNU_SOURCE
++#endif
++
+ #include <sys/ioctl.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <netinet/in.h>
+ #include <fcntl.h>
+ #include <time.h>
++#include <termios.h>
+ #include <unistd.h>
++#include <errno.h>
+
+ #include <linux/dvb/dmx.h>
+ #include <linux/dvb/video.h>
+ #include <linux/dvb/audio.h>
+ #include <sys/poll.h>
+
++static char dolby;
++static char audio;
++static char black;
++static char volset;
++
+ static int audioPlay(int fd)
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_PLAY) < 0)){
++ if ((ans = ioctl(fd,AUDIO_PLAY)) < 0) {
+ perror("AUDIO PLAY: ");
+ return -1;
+ }
+@@ -47,12 +64,11 @@
+ return 0;
+ }
+
+-
+ static int audioSelectSource(int fd, audio_stream_source_t source)
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_SELECT_SOURCE, source) < 0)){
++ if ((ans = ioctl(fd,AUDIO_SELECT_SOURCE, source)) < 0) {
+ perror("AUDIO SELECT SOURCE: ");
+ return -1;
+ }
+@@ -60,13 +76,11 @@
+ return 0;
+ }
+
+-
+-
+ static int audioSetMute(int fd, int state)
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_SET_MUTE, state) < 0)){
++ if ((ans = ioctl(fd,AUDIO_SET_MUTE, state)) < 0) {
+ perror("AUDIO SET MUTE: ");
+ return -1;
+ }
+@@ -78,7 +92,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,AUDIO_SET_AV_SYNC, state) < 0)){
++ if ((ans = ioctl(fd,AUDIO_SET_AV_SYNC, state)) < 0) {
+ perror("AUDIO SET AV SYNC: ");
+ return -1;
+ }
+@@ -86,11 +100,55 @@
+ return 0;
+ }
+
++static int audioSetVolume(int fd, int level)
++{
++ int ans;
++ audio_mixer_t mix;
++
++ mix.volume_left = mix.volume_right = level;
++ if ((ans = ioctl(fd, AUDIO_SET_MIXER, &mix)) < 0) {
++ perror("AUDIO SET VOLUME: ");
++ return -1;
++ }
++ return 0;
++}
++
++static int audioStop(int fd)
++{
++ int ans;
++
++ if ((ans = ioctl(fd,AUDIO_STOP,0)) < 0) {
++ perror("AUDIO STOP: ");
++ return -1;
++ }
++ return 0;
++}
++
++static int deviceClear(int afd, int vfd)
++{
++ int ans;
++
++ if (vfd >= 0) {
++ if ((ans = ioctl(vfd, VIDEO_CLEAR_BUFFER, 0)) < 0) {
++ perror("VIDEO CLEAR BUFFER: ");
++ return -1;
++ }
++ }
++ if (afd >= 0) {
++ if ((ans = ioctl(afd, AUDIO_CLEAR_BUFFER, 0)) < 0) {
++ perror("AUDIO CLEAR BUFFER: ");
++ return -1;
++ }
++ }
++
++ return 0;
++}
++
+ static int videoStop(int fd)
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_STOP,0) < 0)){
++ if ((ans = ioctl(fd,VIDEO_STOP,0)) < 0) {
+ perror("VIDEO STOP: ");
+ return -1;
+ }
+@@ -102,7 +160,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_PLAY) < 0)){
++ if ((ans = ioctl(fd,VIDEO_PLAY)) < 0) {
+ perror("VIDEO PLAY: ");
+ return -1;
+ }
+@@ -110,12 +168,11 @@
+ return 0;
+ }
+
+-
+ static int videoFreeze(int fd)
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_FREEZE) < 0)){
++ if ((ans = ioctl(fd,VIDEO_FREEZE)) < 0) {
+ perror("VIDEO FREEZE: ");
+ return -1;
+ }
+@@ -123,12 +180,22 @@
+ return 0;
+ }
+
++static int videoBlank(int fd, int state)
++{
++ int ans;
++
++ if ((ans = ioctl(fd, VIDEO_SET_BLANK, state)) < 0) {
++ perror("VIDEO BLANK: ");
++ return -1;
++ }
++ return 0;
++}
+
+ static int videoContinue(int fd)
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_CONTINUE) < 0)){
++ if ((ans = ioctl(fd,VIDEO_CONTINUE)) < 0) {
+ perror("VIDEO CONTINUE: ");
+ return -1;
+ }
+@@ -140,7 +207,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_SELECT_SOURCE, source) < 0)){
++ if ((ans = ioctl(fd,VIDEO_SELECT_SOURCE, source)) < 0) {
+ perror("VIDEO SELECT SOURCE: ");
+ return -1;
+ }
+@@ -153,7 +220,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_FAST_FORWARD, nframes) < 0)){
++ if ((ans = ioctl(fd,VIDEO_FAST_FORWARD, nframes)) < 0) {
+ perror("VIDEO FAST FORWARD: ");
+ return -1;
+ }
+@@ -165,7 +232,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_SLOWMOTION, nframes) < 0)){
++ if ((ans = ioctl(fd,VIDEO_SLOWMOTION, nframes)) < 0) {
+ perror("VIDEO SLOWMOTION: ");
+ return -1;
+ }
+@@ -173,14 +240,11 @@
+ return 0;
+ }
+
+-#define BUFFY 32768
+-#define NFD 2
+-static void play_file_av(int filefd, int vfd, int afd)
++#define NFD 3
++static void copy_to_dvb(int vfd, int afd, int cfd, const uint8_t* ptr, const unsigned short len)
+ {
+- char buf[BUFFY];
+- int count;
+- int written;
+ struct pollfd pfd[NFD];
++ unsigned short pos = 0;
+ int stopped = 0;
+
+ pfd[0].fd = STDIN_FILENO;
+@@ -192,119 +256,399 @@
+ pfd[2].fd = afd;
+ pfd[2].events = POLLOUT;
+
+- videoSelectSource(vfd,VIDEO_SOURCE_MEMORY);
+- audioSelectSource(afd,AUDIO_SOURCE_MEMORY);
+-
+- // FIXME: only seems to work if starting audio first!
+- audioPlay(afd);
+- videoPlay(vfd);
+-
+- count = read(filefd,buf,BUFFY);
+- write(vfd,buf,count);
+-
+- while ( (count = read(filefd,buf,BUFFY)) >= 0 ){
+- written = 0;
+- while(written < count){
+- if (poll(pfd,NFD,1)){
+- if (pfd[1].revents & POLLOUT){
+- written += write(vfd,buf+written,
+- count-written);
++ while (pos < len) {
++ int ret;
++ if ((ret = poll(pfd,NFD,1)) > 0) {
++ if (pfd[1].revents & POLLOUT) {
++ int cnt = write(cfd, ptr + pos, len - pos);
++ if (cnt > 0)
++ pos += cnt;
++ else if (cnt < 0) {
++ if (errno != EAGAIN && errno != EINTR) {
++ perror("Write:");
++ exit(-1);
++ }
++ if (errno == EAGAIN)
++ usleep(1000);
++ continue;
+ }
+- if (pfd[0].revents & POLLIN){
+- int c = getchar();
+- switch(c){
+- case 'z':
++ }
++ if (pfd[0].revents & POLLIN) {
++ int c = getchar();
++ switch(c) {
++ case 'z':
++ if (audio && !black) {
++ audioSetMute(afd, 1);
++ } else {
+ videoFreeze(vfd);
+- printf("playback frozen\n");
+- stopped = 1;
+- break;
++ }
++ deviceClear(afd, -1);
++ printf("playback frozen\n");
++ stopped = 1;
++ break;
+
+- case 's':
++ case 's':
++ if (audio) {
++ audioStop(afd);
++ deviceClear(afd, -1);
++ } else {
+ videoStop(vfd);
+- printf("playback stopped\n");
+- stopped = 1;
+- break;
++ deviceClear(afd, vfd);
++ }
++ printf("playback stopped\n");
++ stopped = 1;
++ break;
+
+- case 'c':
++ case 'c':
++ if (audio && !black) {
++ audioSetAVSync(afd, 0);
++ deviceClear(afd, -1);
++ audioSetMute(afd, 0);
++ } else {
++ audioSetAVSync(afd, 1);
++ deviceClear(afd, vfd);
+ videoContinue(vfd);
+- printf("playback continued\n");
+- stopped = 0;
+- break;
++ }
++ printf("playback continued\n");
++ stopped = 0;
++ break;
+
+- case 'p':
+- videoPlay(vfd);
++ case 'p':
++ if (audio) {
++ deviceClear(afd, -1);
++ audioSetAVSync(afd, 0);
+ audioPlay(afd);
+- audioSetAVSync(afd, 1);
+- audioSetMute(afd, 0);
+- printf("playback started\n");
+- stopped = 0;
+- break;
++ } else {
++ deviceClear(afd, vfd);
++ audioSetAVSync(afd, 1);
++ audioPlay(afd);
++ videoPlay(vfd);
++ }
++ audioSetMute(afd, 0);
++ printf("playback started\n");
++ stopped = 0;
++ break;
+
+- case 'f':
+- audioSetAVSync(afd, 0);
++ case 'f':
++ audioSetAVSync(afd, 0);
++ if (!audio) {
+ audioSetMute(afd, 1);
+ videoFastForward(vfd,0);
+- printf("fastforward\n");
+- stopped = 0;
+- break;
++ }
++ printf("fastforward\n");
++ stopped = 0;
++ break;
+
+- case 'm':
+- audioSetAVSync(afd, 0);
++ case 'm':
++ audioSetAVSync(afd, 0);
++ audioSetMute(afd, 1);
++ printf("mute\n");
++ stopped = 0;
++ break;
++
++ case 'u':
++ audioSetAVSync(afd, 1);
++ audioSetMute(afd, 0);
++ printf("unmute\n");
++ stopped = 0;
++ break;
++
++ case 'd':
++ if (dolby)
++ dolby = 0;
++ else
++ dolby++;
++ break;
++
++ case 'l':
++ audioSetAVSync(afd, 0);
++ if (!audio) {
+ audioSetMute(afd, 1);
+ videoSlowMotion(vfd,2);
+- printf("slowmotion\n");
+- stopped = 0;
+- break;
++ }
++ printf("slowmotion\n");
++ stopped = 0;
++ break;
+
+- case 'q':
+- videoContinue(vfd);
+- exit(0);
++ case 'q':
++ videoContinue(vfd);
++ exit(0);
++ break;
++
++ default:
++ break;
++ }
++ }
++ } else if (ret < 0) {
++ if (errno != EAGAIN && errno != EINTR) {
++ perror("Write:");
++ exit(-1);
++ }
++ if (errno == EAGAIN)
++ usleep(1000);
++ }
++ }
++}
++
++static unsigned char play[6] = {0x00, 0x00, 0x01, 0xff, 0xff, 0xff};
++static unsigned char except[2];
++
++static int scan_file_av(int vfd, int afd, const unsigned char *buf, int buflen)
++{
++ const unsigned char *const start = buf;
++ const unsigned char *const end = buf + buflen;
++
++ static unsigned int magic = 0xffffffff;
++ static unsigned short count, len;
++ static int fdc = -1;
++ int m;
++
++ while (buf < end) {
++ if (count < 6) {
++ switch (count) {
++ case 0:
++ m = 0;
++ while ((magic & 0xffffff00) != 0x00000100) {
++ if (buf >= end) goto out;
++ magic = (magic << 8) | *buf++;
++ m++;
++ }
++ if (m > 4)
++ printf("Broken Frame found\n");
++ play[3] = (unsigned char)(magic & 0x000000ff);
++ switch (play[3]) {
++ case 0xE0 ... 0xEF:
++ fdc = vfd;
++ if (except[0] != play[3]) {
++ if (except[0] == 0)
++ except[0] = play[3];
++ else
++ fdc = -1;
++ }
++ if (audio)
++ fdc = -1;
++ break;
++ case 0xC0 ... 0xDF:
++ fdc = afd;
++ if (dolby) {
++ fdc = -1;
+ break;
+ }
++ if (except[1] != play[3]) {
++ if (except[1] == 0)
++ except[1] = play[3];
++ else
++ fdc = -1;
++ }
++ if (!volset) {
++ audioSetVolume(afd, 255);
++ volset = 1;
++ }
++ break;
++ case 0xBD:
++ /*
++ * TODO: sub filter to through out e.g. ub pictures
++ * in Private Streams 1 _and_ get sub audio header
++ * to set an except(ion) audio stream.
++ * The later one requires some changes within the VDR
++ * remux part! 2004/07/01 Werner
++ */
++ fdc = afd;
++ if (!dolby) {
++ fdc = -1;
++ break;
++ }
++ if (volset) {
++ audioSetVolume(afd, 0);
++ volset = 0;
++ }
++ break;
++ default:
++ fdc = -1;
++ break;
+ }
++ count = 4;
++ case 4:
++ if (buf >= end) goto out;
++ len = ((*buf) << 8);
++ play[4] = (*buf);
++ buf++;
++ count++;
++ case 5:
++ if (buf >= end) goto out;
++ len |= (*buf);
++ len += 6;
++ play[5] = (*buf);
++ buf++;
++ count++;
++ if (fdc != -1)
++ copy_to_dvb(vfd, afd, fdc, &play[0], count);
++ default:
++ break;
+ }
+ }
++
++ while (count < len) {
++ int rest = end - buf;
++ if (rest <= 0) goto out;
++
++ if (rest + count > len)
++ rest = len - count;
++
++ if (fdc != -1)
++ copy_to_dvb(vfd, afd, fdc, buf, rest);
++ count += rest;
++ buf += rest;
++ }
++
++ /* Reset for next scan */
++ magic = 0xffffffff;
++ count = len = 0;
++ fdc = -1;
++ play[3] = 0xff;
+ }
++out:
++ return buf - start;
++}
++
++#define BUFFY 32768
++static void play_file_av(int filefd, int vfd, int afd)
++{
++ unsigned char buf[BUFFY];
++ int count;
++
++ audioSetMute(afd, 1);
++ videoBlank(vfd, 1);
++ if (audio && !black) {
++ audioStop(afd);
++ deviceClear(afd, -1);
++ audioSetAVSync(afd, 0);
++ audioSelectSource(afd, AUDIO_SOURCE_MEMORY);
++ audioPlay(afd);
++ videoBlank(vfd, 0);
++ } else if (audio && black) {
++ deviceClear(afd, vfd);
++ videoBlank(vfd, 1);
++ audioSetAVSync(afd, 0);
++ audioSelectSource(afd, AUDIO_SOURCE_MEMORY);
++ videoSelectSource(vfd, VIDEO_SOURCE_MEMORY);
++ audioPlay(afd);
++ videoPlay(vfd);
++ } else {
++ deviceClear(afd, vfd);
++ audioSetAVSync(afd, 1);
++ audioSelectSource(afd, AUDIO_SOURCE_MEMORY);
++ videoSelectSource(vfd, VIDEO_SOURCE_MEMORY);
++ audioPlay(afd);
++ videoPlay(vfd);
++ videoBlank(vfd, 0);
++ }
++
++ if (dolby) {
++ audioSetVolume(afd, 0);
++ volset = 0;
++ } else {
++ audioSetVolume(afd, 255);
++ volset = 1;
++ }
++
++#ifndef __stub_posix_fadvise
++ posix_fadvise(filefd, 0, 0, POSIX_FADV_SEQUENTIAL);
++#endif
++
++ while ((count = read(filefd,buf,BUFFY)) > 0)
++ scan_file_av(vfd,afd,buf,count);
++}
++
++static struct termios term;
++
++static void restore(void)
++{
++ tcsetattr(STDIN_FILENO, TCSANOW, &term);
+ }
+
+ int main(int argc, char **argv)
+ {
+- int vfd, afd;
++ int vfd, afd, c;
+ int filefd;
+- char *videodev = "/dev/dvb/adapter0/video0";
+- char *audiodev = "/dev/dvb/adapter0/audio0";
++ const char *videodev = "/dev/dvb/adapter0/video0";
++ const char *audiodev = "/dev/dvb/adapter0/audio0";
+
+- if (argc < 2) {
+- fprintf(stderr, "usage: test_av_play mpeg_A+V_PES_file\n");
+- return 1;
++ if (((tcgetpgrp(STDIN_FILENO) == getpid()) || (getppid() != (pid_t)1))
++ && (tcgetattr(STDIN_FILENO, &term) == 0)) {
++ struct termios newterm;
++ memcpy(&newterm, &term, sizeof(struct termios));
++ newterm.c_iflag = 0;
++ newterm.c_lflag &= ~(ICANON | ECHO);
++ newterm.c_cc[VMIN] = 0;
++ newterm.c_cc[VTIME] = 0;
++ atexit(restore);
++ tcsetattr(STDIN_FILENO, TCSANOW, &newterm);
++ }
++
++ opterr = 0;
++ while ((c = getopt(argc, argv, "+daA")) != -1) {
++ switch (c) {
++ case 'd':
++ dolby++;
++ break;
++ case 'a':
++ audio++;
++ break;
++ case 'A':
++ audio++;
++ black++;
++ break;
++ case '?':
++ fprintf(stderr, "usage: test_av_play [-d] [-a] [-A] mpeg_A+V_PES_file\n");
++ return 1;
++ default:
++ break;
++ }
+ }
++ argv += optind;
++ argc -= optind;
+
+ if (getenv("VIDEO"))
+ videodev = getenv("VIDEO");
+ if (getenv("AUDIO"))
+- videodev = getenv("AUDIO");
++ audiodev = getenv("AUDIO");
+
+ printf("using video device '%s'\n", videodev);
+ printf("using audio device '%s'\n", audiodev);
+
+- if ( (filefd = open(argv[1],O_RDONLY)) < 0){
++ putchar('\n');
++
++ printf("Freeze by pressing `z'\n");
++ printf("Stop by pressing `s'\n");
++ printf("Continue by pressing `c'\n");
++ printf("Start by pressing `p'\n");
++ printf("FastForward by pressing `f'\n");
++ printf("Mute by pressing `m'\n");
++ printf("UnMute by pressing `u'\n");
++ printf("MP2/AC3 by pressing `d'\n");
++ printf("SlowMotion by pressing `l'\n");
++ printf("Quit by pressing `q'\n");
++
++ putchar('\n');
++
++ errno = ENOENT;
++ if (!argv[0] || (filefd = open(argv[0], O_RDONLY)) < 0) {
+ perror("File open:");
+ return -1;
+ }
+- if((vfd = open(videodev,O_RDWR|O_NONBLOCK)) < 0){
++ if ((vfd = open(videodev,O_RDWR|O_NONBLOCK)) < 0) {
+ perror("VIDEO DEVICE: ");
+ return -1;
+ }
+- if((afd = open(audiodev,O_RDWR|O_NONBLOCK)) < 0){
++ if ((afd = open(audiodev,O_RDWR|O_NONBLOCK)) < 0) {
+ perror("AUDIO DEVICE: ");
+ return -1;
+ }
++
+ play_file_av(filefd, vfd, afd);
+ close(vfd);
+ close(afd);
+ close(filefd);
+ return 0;
+-
+-
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test.c dvb-apps/test/test.c
+--- linuxtv-dvb-apps-1.1.1/test/test.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,4 @@
+-/*
++/*
+ * test.c - Test program for new API
+ *
+ * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
+@@ -58,7 +58,7 @@
+ c=reverse[c]&0x7f;
+ if (c<0x20)
+ c=0x20;
+-
++
+ return c;
+ }
+
+@@ -68,16 +68,16 @@
+ int i,j;
+ int len;
+ int fd=open("/dev/ost/demux1", O_RDWR);
+- struct dmx_pes_filter_params pesFilterParams;
+-
+- pesFilterParams.input = DMX_IN_FRONTEND;
+- pesFilterParams.output = DMX_OUT_TS_TAP;
+- pesFilterParams.pes_type = DMX_PES_TELETEXT;
++ struct dmx_pes_filter_params pesFilterParams;
++
++ pesFilterParams.input = DMX_IN_FRONTEND;
++ pesFilterParams.output = DMX_OUT_TS_TAP;
++ pesFilterParams.pes_type = DMX_PES_TELETEXT;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+-
++
+ pesFilterParams.pid = 0x2c ;
+ if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
+- printf("Could not set PES filter\n");
++ printf("Could not set PES filter\n");
+ close(fd);
+ return;
+ }
+@@ -85,7 +85,7 @@
+ /*
+ pesFilterParams.pid = 54;
+ if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
+- printf("Could not set PES filter\n");
++ printf("Could not set PES filter\n");
+ close(fd);
+ return;
+ }
+@@ -93,7 +93,7 @@
+
+ pesFilterParams.pid = 55;
+ if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
+- printf("Could not set PES filter\n");
++ printf("Could not set PES filter\n");
+ close(fd);
+ return;
+ }
+@@ -103,7 +103,7 @@
+ if (len>0) write(1, buf, len);
+ }
+
+- do {
++ do {
+ read(fd, buf, 4);
+ if (htonl(*(uint32_t *)buf)!=0x00001bd)
+ continue;
+@@ -112,10 +112,10 @@
+ read(fd, buf+6, len);
+ fprintf(stderr,"read %d bytes PES\n", len);
+ write (1, buf, len+6);
+-
++
+ id=buf[45];
+ fprintf(stderr,"id=%02x\n", id);
+-
++
+ for (i=0; i<(len+6-46)/46; i++) {
+ for (j=6; j<46; j++) {
+ fprintf(stderr,"%c", t2a(buf[i*46+46+j]));
+@@ -128,11 +128,11 @@
+
+ /*
+ pesFilterParams.pid = 55;
+- pesFilterParams.input = DMX_IN_FRONTEND;
+- pesFilterParams.output = DMX_OUT_DECODER;
+- pesFilterParams.pes_type = DMX_PES_TELETEXT;
++ pesFilterParams.input = DMX_IN_FRONTEND;
++ pesFilterParams.output = DMX_OUT_DECODER;
++ pesFilterParams.pes_type = DMX_PES_TELETEXT;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+-
++
+ ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams);
+ close(fd);
+ */
+@@ -145,8 +145,8 @@
+ int len;
+ struct secCommand scmd;
+ struct secCmdSequence scmds;
+- struct dmx_pes_filter_params pesFilterParams;
+- struct dmx_sct_filter_params secFilterParams;
++ struct dmx_pes_filter_params pesFilterParams;
++ struct dmx_sct_filter_params secFilterParams;
+ FrontendParameters frp;
+ uint8_t buf[4096];
+
+@@ -173,7 +173,7 @@
+ scmd.u.diseqc.cmd=0x38;
+ scmd.u.diseqc.numParams=1;
+ scmd.u.diseqc.params[0]=0xf0;
+-
++
+ scmds.voltage=SEC_VOLTAGE_13;
+ scmds.miniCommand=SEC_MINI_NONE;
+ scmds.continuousTone=SEC_TONE_ON;
+@@ -195,31 +195,31 @@
+ if (ret<0)
+ perror("DMX_SET_BUFFER_SIZE\n");
+ printf("Audio filter size OK\n");
+- pesFilterParams.pid = 0x60;
+- pesFilterParams.input = DMX_IN_FRONTEND;
+- pesFilterParams.output = DMX_OUT_DECODER;
+- pesFilterParams.pes_type = DMX_PES_AUDIO;
++ pesFilterParams.pid = 0x60;
++ pesFilterParams.input = DMX_IN_FRONTEND;
++ pesFilterParams.output = DMX_OUT_DECODER;
++ pesFilterParams.pes_type = DMX_PES_AUDIO;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+-
+- if (ioctl(fd_demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0) return(1);
++
++ if (ioctl(fd_demux2, DMX_SET_PES_FILTER, &pesFilterParams) < 0) return(1);
+ printf("Audio filter OK\n");
+-
+- if (ioctl(fd_demux, DMX_SET_BUFFER_SIZE, 64*1024) < 0) return(1);
++
++ if (ioctl(fd_demux, DMX_SET_BUFFER_SIZE, 64*1024) < 0) return(1);
+ pesFilterParams.pid = 0xa2;
+- pesFilterParams.input = DMX_IN_FRONTEND;
+- pesFilterParams.output = DMX_OUT_DECODER;
+- pesFilterParams.pes_type = DMX_PES_VIDEO;
++ pesFilterParams.input = DMX_IN_FRONTEND;
++ pesFilterParams.output = DMX_OUT_DECODER;
++ pesFilterParams.pes_type = DMX_PES_VIDEO;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+- if (ioctl(fd_demux, DMX_SET_PES_FILTER, &pesFilterParams) < 0) return(1);
++ if (ioctl(fd_demux, DMX_SET_PES_FILTER, &pesFilterParams) < 0) return(1);
+ printf("Video filter OK\n");
+ #endif
+ /*
+ pesFilterParams.pid = 56;
+- pesFilterParams.input = DMX_IN_FRONTEND;
+- pesFilterParams.output = DMX_OUT_DECODER;
+- pesFilterParams.pes_type = DMX_PES_TELETEXT;
++ pesFilterParams.input = DMX_IN_FRONTEND;
++ pesFilterParams.output = DMX_OUT_DECODER;
++ pesFilterParams.pes_type = DMX_PES_TELETEXT;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+- if (ioctl(fd_tt, DMX_SET_PES_FILTER, &pesFilterParams) < 0) return(1);
++ if (ioctl(fd_tt, DMX_SET_PES_FILTER, &pesFilterParams) < 0) return(1);
+ printf("TT filter OK\n");
+ */
+ //while (1);
+@@ -250,7 +250,7 @@
+ int32_t snr, str;
+ ioctl(fd_frontend, FE_READ_SNR, &snr);
+ ioctl(fd_frontend, FE_READ_SIGNAL_STRENGTH, &str);
+-
++
+ printf("snr=%d, str=%d\n", snr, str);
+ }
+ */
+@@ -260,7 +260,7 @@
+ if (ioctl(fd_section, DMX_SET_FILTER, &secFilterParams) < 0) return;
+ //if (ioctl(fd_section2, DMX_SET_FILTER, &secFilterParams) < 0) return;
+ //close(fd_section2);
+- //while (1)
++ //while (1)
+ {
+ len=read(fd_section, buf, 4096);
+ if (len>0) write(1, buf, len);
+@@ -270,7 +270,7 @@
+ //if (len>0) write(1,buf,len);
+ //printf("read section with length %d\n", len);
+ }
+-
++
+ }
+
+ main()
+@@ -278,4 +278,3 @@
+ //senf();
+ testpesfilter();
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_dvr.c dvb-apps/test/test_dvr.c
+--- linuxtv-dvb-apps-1.1.1/test/test_dvr.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_dvr.c 2009-06-21 13:29:06.000000000 +0200
+@@ -82,7 +82,7 @@
+ fprintf(stderr, "got %d bytes (%llu total)\n", bytes, total_bytes);
+ }
+
+-static int add_filter(unsigned int pid, const unsigned char* dmxdev)
++static int add_filter(unsigned int pid, const char* dmxdev)
+ {
+ int fd;
+ struct dmx_pes_filter_params f;
+@@ -161,4 +161,3 @@
+ close(dvrfd);
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_dvr_play.c dvb-apps/test/test_dvr_play.c
+--- linuxtv-dvb-apps-1.1.1/test/test_dvr_play.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_dvr_play.c 2009-06-21 13:29:06.000000000 +0200
+@@ -141,4 +141,3 @@
+ close(filefd);
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_front.c dvb-apps/test/test_front.c
+--- linuxtv-dvb-apps-1.1.1/test/test_front.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_front.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,4 @@
+-/*
++/*
+ * test_front.c - Test program for new API
+ *
+ * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
+@@ -40,7 +40,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,OST_SELFTEST,0) < 0)){
++ if ((ans = ioctl(fd,OST_SELFTEST,0)) < 0) {
+ perror("OST SELF TEST: ");
+ return -1;
+ }
+@@ -52,7 +52,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,OST_SET_POWER_STATE,state) < 0)){
++ if ((ans = ioctl(fd,OST_SET_POWER_STATE,state)) < 0) {
+ perror("OST SET POWER STATE: ");
+ return -1;
+ }
+@@ -64,7 +64,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,OST_GET_POWER_STATE,state) < 0)){
++ if ((ans = ioctl(fd,OST_GET_POWER_STATE,state)) < 0) {
+ perror("OST GET POWER STATE: ");
+ return -1;
+ }
+@@ -95,7 +95,7 @@
+ int ans;
+ feStatus stat;
+
+- if ( (ans = ioctl(fd,FE_READ_STATUS,&stat) < 0)){
++ if ((ans = ioctl(fd,FE_READ_STATUS,&stat)) < 0) {
+ perror("FE READ STATUS: ");
+ return -1;
+ }
+@@ -116,7 +116,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,FE_READ_BER, ber) < 0)){
++ if ((ans = ioctl(fd,FE_READ_BER, ber)) < 0) {
+ perror("FE READ_BER: ");
+ return -1;
+ }
+@@ -129,7 +129,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,FE_READ_SIGNAL_STRENGTH, strength) < 0)){
++ if ((ans = ioctl(fd,FE_READ_SIGNAL_STRENGTH, strength)) < 0) {
+ perror("FE READ SIGNAL STRENGTH: ");
+ return -1;
+ }
+@@ -142,7 +142,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,FE_READ_SNR, snr) < 0)){
++ if ((ans = ioctl(fd,FE_READ_SNR, snr)) < 0) {
+ perror("FE READ_SNR: ");
+ return -1;
+ }
+@@ -156,7 +156,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,FE_READ_UNCORRECTED_BLOCKS, ucb) < 0)){
++ if ((ans = ioctl(fd,FE_READ_UNCORRECTED_BLOCKS, ucb)) < 0) {
+ perror("FE READ UNCORRECTED BLOCKS: ");
+ return -1;
+ }
+@@ -169,7 +169,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,FE_GET_NEXT_FREQUENCY, nfr) < 0)){
++ if ((ans = ioctl(fd,FE_GET_NEXT_FREQUENCY, nfr)) < 0) {
+ perror("FE GET NEXT FREQUENCY: ");
+ return -1;
+ }
+@@ -182,7 +182,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,FE_GET_NEXT_SYMBOL_RATE, nsr) < 0)){
++ if ((ans = ioctl(fd,FE_GET_NEXT_SYMBOL_RATE, nsr)) < 0) {
+ perror("FE GET NEXT SYMBOL RATE: ");
+ return -1;
+ }
+@@ -195,7 +195,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,QPSK_TUNE, param) < 0)){
++ if ((ans = ioctl(fd,QPSK_TUNE, param)) < 0) {
+ perror("QPSK TUNE: ");
+ return -1;
+ }
+@@ -207,7 +207,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,QPSK_GET_EVENT, event) < 0)){
++ if ((ans = ioctl(fd,QPSK_GET_EVENT, event)) < 0) {
+ perror("QPSK GET EVENT: ");
+ return -1;
+ }
+@@ -219,7 +219,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,QPSK_FE_INFO, info) < 0)){
++ if ((ans = ioctl(fd,QPSK_FE_INFO, info)) < 0) {
+ perror("QPSK FE INFO: ");
+ return -1;
+ }
+@@ -238,7 +238,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,SEC_GET_STATUS, state) < 0)){
++ if ((ans = ioctl(fd,SEC_GET_STATUS, state)) < 0) {
+ perror("QPSK GET EVENT: ");
+ return -1;
+ }
+@@ -261,7 +261,7 @@
+ break;
+ }
+
+-
++
+ switch (state->selVolt){
+ case SEC_VOLTAGE_OFF:
+ printf("SEC VOLTAGE: OFF (%d)\n",state->selVolt);
+@@ -299,11 +299,11 @@
+ struct qpskFrontendInfo info;
+ struct secStatus sec_state;
+
+- if((fd = open("/dev/ost/qpskfe",O_RDWR)) < 0){
++ if ((fd = open("/dev/ost/qpskfe",O_RDWR)) < 0){
+ perror("FRONTEND DEVICE: ");
+ return -1;
+ }
+- if((fd_sec = open("/dev/ost/sec",O_RDWR)) < 0){
++ if ((fd_sec = open("/dev/ost/sec",O_RDWR)) < 0){
+ perror("SEC DEVICE: ");
+ return -1;
+ }
+@@ -325,4 +325,3 @@
+ close(fd);
+ close(fd_sec);
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_sec_ne.c dvb-apps/test/test_sec_ne.c
+--- linuxtv-dvb-apps-1.1.1/test/test_sec_ne.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_sec_ne.c 2009-06-21 13:29:06.000000000 +0200
+@@ -65,7 +65,7 @@
+ }
+
+ int set_filter(int fd, unsigned int pid, unsigned int tid,
+- unsigned int tid_ext, unsigned int version_number)
++ unsigned int tid_ext, unsigned int _version_number)
+ {
+ struct dmx_sct_filter_params f;
+ unsigned long bufsz;
+@@ -92,8 +92,8 @@
+ f.filter.mask[1] = 0xff;
+ f.filter.mask[2] = 0xff;
+ }
+- if (version_number < 0x20) {
+- f.filter.filter[3] = (uint8_t) (version_number << 1);
++ if (_version_number < 0x20) {
++ f.filter.filter[3] = (uint8_t) (_version_number << 1);
+ f.filter.mask[3] = 0x3e;
+ f.filter.mode[3] = 0x3e;
+ }
+@@ -162,4 +162,3 @@
+ close(dmxfd);
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_sections.c dvb-apps/test/test_sections.c
+--- linuxtv-dvb-apps-1.1.1/test/test_sections.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_sections.c 2009-06-21 13:29:06.000000000 +0200
+@@ -178,7 +178,7 @@
+ fprintf(stderr, "0x%.2x ", mask[filter_idx]);
+
+ fprintf(stderr, "\n");
+-
++
+ if ((dmxfd = open(dmxdev, O_RDWR)) < 0){
+ perror("open");
+ return 1;
+@@ -194,4 +194,3 @@
+ close(dmxfd);
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_stc.c dvb-apps/test/test_stc.c
+--- linuxtv-dvb-apps-1.1.1/test/test_stc.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_stc.c 2009-06-21 13:29:06.000000000 +0200
+@@ -71,4 +71,3 @@
+ close(dmxfd);
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_stillimage.c dvb-apps/test/test_stillimage.c
+--- linuxtv-dvb-apps-1.1.1/test/test_stillimage.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_stillimage.c 2009-06-21 13:29:06.000000000 +0200
+@@ -6,7 +6,7 @@
+ *
+ * or more advanced using netpbm and mpeg2enc (not mpeg2encode) :
+ * $ cat image.jpg | jpegtopnm | pnmscale -xsize=704 -ysize=576 |\
+- * ppmntsc --pal | ppmtoy4m -F 25:1 -A 4:3 |\
++ * ppmntsc --pal | ppmtoy4m -F 25:1 -A 4:3 -S 420mpeg2 |\
+ * mpeg2enc -f 7 -T 90 -F 3 -np -a 2 -o "image.mpg"
+ *
+ */
+@@ -21,6 +21,7 @@
+ #include <time.h>
+ #include <unistd.h>
+
++#include <linux/types.h>
+ #include <linux/dvb/video.h>
+
+
+@@ -82,7 +83,7 @@
+ return -1;
+ }
+
+- printf ("read: %d bytes\n", read(filefd, sp.iFrame, sp.size));
++ printf ("read: %d bytes\n", (int) read(filefd, sp.iFrame, sp.size));
+ close(filefd);
+
+ if ((ioctl(fd, VIDEO_STILLPICTURE, &sp) < 0)) {
+@@ -99,5 +100,3 @@
+
+ return 0;
+ }
+-
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_switch.c dvb-apps/test/test_switch.c
+--- linuxtv-dvb-apps-1.1.1/test/test_switch.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_switch.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,4 @@
+-/*
++/*
+ * test_switch.c - Test program for new API
+ *
+ * Copyright (C) 2001 Ralph Metzler <ralph@convergence.de>
+@@ -42,97 +42,97 @@
+ int fd_demuxtt;
+
+ struct dmx_sct_filter_params sctFilterParams;
+-
++
+ struct secCommand scmd;
+ struct secCmdSequence scmds;
+-struct dmx_pes_filter_params pesFilterParams;
+-struct dmx_pes_filter_params pesFilterParamsV;
+-struct dmx_pes_filter_params pesFilterParamsA;
+-struct dmx_pes_filter_params pesFilterParamsTT;
++struct dmx_pes_filter_params pesFilterParams;
++struct dmx_pes_filter_params pesFilterParamsV;
++struct dmx_pes_filter_params pesFilterParamsA;
++struct dmx_pes_filter_params pesFilterParamsTT;
+ FrontendParameters frp;
+ int front_type;
+
+
+-set_front(void)
++set_front(void)
+ {
+ fe_status_t stat = 0;
+ int i, freq;
+ uint32_t soff;
+-
++
+ scmds.miniCommand = SEC_MINI_NONE;
+ scmds.numCommands = 1;
+ scmds.commands = &scmd;
+-
++
+ soff = frp.u.qpsk.SymbolRate/16000;
+
+ if (ioctl(fd_sec, SEC_SEND_SEQUENCE, &scmds) < 0)
+ perror("setfront sec");
+ usleep(100000);
+-
++
+ freq = frp.Frequency;
+-
++
+ while(tune_it(&frp));
+-}
++}
+
+-set_diseqc_nb(int nr)
++set_diseqc_nb(int nr)
+ {
+ scmd.type=0;
+ scmd.u.diseqc.addr = 0x10;
+ scmd.u.diseqc.cmd = 0x38;
+ scmd.u.diseqc.numParams = 1;
+- scmd.u.diseqc.params[0] = 0xF0 | ((nr * 4) & 0x0F) |
++ scmd.u.diseqc.params[0] = 0xF0 | ((nr * 4) & 0x0F) |
+ (scmds.continuousTone == SEC_TONE_ON ? 1 : 0) |
+ (scmds.voltage==SEC_VOLTAGE_18 ? 2 : 0);
+ }
+
+-set_ttpid(ushort ttpid)
+-{
++set_ttpid(ushort ttpid)
++{
+ if (ttpid==0 || ttpid==0xffff || ttpid==0x1fff) {
+ ioctl(fd_demuxtt, DMX_STOP, 0);
+ return;
+ }
+
+ pesFilterParamsTT.pid = ttpid;
+- pesFilterParamsTT.input = DMX_IN_FRONTEND;
+- pesFilterParamsTT.output = DMX_OUT_DECODER;
+- pesFilterParamsTT.pes_type = DMX_PES_TELETEXT;
++ pesFilterParamsTT.input = DMX_IN_FRONTEND;
++ pesFilterParamsTT.output = DMX_OUT_DECODER;
++ pesFilterParamsTT.pes_type = DMX_PES_TELETEXT;
+ pesFilterParamsTT.flags = DMX_IMMEDIATE_START;
+- if (ioctl(fd_demuxtt, DMX_SET_PES_FILTER,
++ if (ioctl(fd_demuxtt, DMX_SET_PES_FILTER,
+ &pesFilterParamsTT) < 0) {
+ printf("PID=%04x\n", ttpid);
+ perror("set_ttpid");
+ }
+ }
+
+-set_vpid(ushort vpid)
+-{
++set_vpid(ushort vpid)
++{
+ if (vpid==0 || vpid==0xffff || vpid==0x1fff) {
+ ioctl(fd_demuxv, DMX_STOP, 0);
+ return;
+ }
+
+ pesFilterParamsV.pid = vpid;
+- pesFilterParamsV.input = DMX_IN_FRONTEND;
+- pesFilterParamsV.output = DMX_OUT_DECODER;
+- pesFilterParamsV.pes_type = DMX_PES_VIDEO;
++ pesFilterParamsV.input = DMX_IN_FRONTEND;
++ pesFilterParamsV.output = DMX_OUT_DECODER;
++ pesFilterParamsV.pes_type = DMX_PES_VIDEO;
+ pesFilterParamsV.flags = DMX_IMMEDIATE_START;
+- if (ioctl(fd_demuxv, DMX_SET_PES_FILTER,
++ if (ioctl(fd_demuxv, DMX_SET_PES_FILTER,
+ &pesFilterParamsV) < 0)
+ perror("set_vpid");
+ }
+
+-set_apid(ushort apid)
+-{
++set_apid(ushort apid)
++{
+ if (apid==0 || apid==0xffff || apid==0x1fff) {
+ ioctl(fd_demuxa, DMX_STOP, apid);
+ return;
+ }
+ pesFilterParamsA.pid = apid;
+- pesFilterParamsA.input = DMX_IN_FRONTEND;
+- pesFilterParamsA.output = DMX_OUT_DECODER;
+- pesFilterParamsA.pes_type = DMX_PES_AUDIO;
++ pesFilterParamsA.input = DMX_IN_FRONTEND;
++ pesFilterParamsA.output = DMX_OUT_DECODER;
++ pesFilterParamsA.pes_type = DMX_PES_AUDIO;
+ pesFilterParamsA.flags = DMX_IMMEDIATE_START;
+- if (ioctl(fd_demuxa, DMX_SET_PES_FILTER,
++ if (ioctl(fd_demuxa, DMX_SET_PES_FILTER,
+ &pesFilterParamsA) < 0)
+ perror("set_apid");
+ }
+@@ -156,7 +156,7 @@
+ if (poll(pfd,1,3000)){
+ if (pfd[0].revents & POLLIN){
+ printf("Getting QPSK event\n");
+- if ( ioctl(fd_frontend, FE_GET_EVENT, &event)
++ if ( ioctl(fd_frontend, FE_GET_EVENT, &event)
+
+ == -EOVERFLOW){
+ perror("qpsk get event");
+@@ -170,7 +170,7 @@
+ case FE_FAILURE_EV:
+ printf("failure event\n");
+ return -1;
+-
++
+ case FE_COMPLETION_EV:
+ printf("completion event\n");
+ }
+@@ -179,7 +179,7 @@
+ return 0;
+ }
+
+-set_tp(uint *freq, int ttk, int pol, uint srate, int dis)
++set_tp(uint *freq, int ttk, int pol, uint srate, int dis)
+ {
+ if (*freq < 11700000) {
+ frp.Frequency = (*freq - 9750000);
+@@ -195,22 +195,22 @@
+ frp.u.qpsk.FEC_inner = 0;
+ }
+
+-get_front(void)
++get_front(void)
+ {
+ set_vpid(0);
+ set_apid(0);
+ set_ttpid(0);
+- scmds.voltage = SEC_VOLTAGE_18;
++ scmds.voltage = SEC_VOLTAGE_18;
+ scmds.miniCommand = SEC_MINI_NONE;
+ scmds.continuousTone = SEC_TONE_OFF;
+ scmds.numCommands=1;
+ scmds.commands=&scmd;
+-
++
+ frp.Frequency=(12073000-10600000);
+ frp.u.qpsk.SymbolRate=25378000;
+ frp.u.qpsk.FEC_inner=(fe_code_rate_t)5;
+-}
+-
++}
++
+
+ void get_sect(int fd)
+ {
+@@ -219,10 +219,10 @@
+ uint16_t cpid = 0;
+ uint16_t length;
+ struct pollfd pfd;
+-
++
+ pfd.fd = fd;
+ pfd.events = POLLIN;
+-
++
+ while (1){
+ if (poll(&pfd, 1, 5000) != POLLIN) {
+ printf("not found\n");
+@@ -232,7 +232,7 @@
+
+ length = (sec[1]& 0x0F)<<8;
+ length |= (sec[2]& 0xFF);
+-
++
+
+ for (i= 0; i < length+3; i++) {
+ printf("0x%02x ",sec[i]);
+@@ -248,7 +248,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,FE_READ_STATUS,stat) < 0)){
++ if ((ans = ioctl(fd,FE_READ_STATUS,stat)) < 0) {
+ perror("FE READ STATUS: ");
+ return -1;
+ }
+@@ -268,7 +268,7 @@
+ int has_signal()
+ {
+ fe_status_t stat;
+-
++
+ FEReadStatus(fd_frontend, &stat);
+ if (stat & FE_HAS_SIGNAL)
+ return 1;
+@@ -304,7 +304,7 @@
+ scmds.commands=&scmd;
+ frp.Frequency = (12073000 - 10600000);
+ // frp.Frequency = (11975000 - 10600000);
+- scmds.continuousTone = SEC_TONE_ON;
++ scmds.continuousTone = SEC_TONE_ON;
+ frp.u.qpsk.SymbolRate = 25378000;
+ // frp.u.qpsk.SymbolRate = 27500000;
+ // frp.u.qpsk.FEC_inner = FEC_AUTO;
+@@ -313,7 +313,7 @@
+ scmd.u.diseqc.addr = 0x10;
+ scmd.u.diseqc.cmd = 0x38;
+ scmd.u.diseqc.numParams = 1;
+- scmd.u.diseqc.params[0] = 0xF0 | ((3 * 4) & 0x0F) |
++ scmd.u.diseqc.params[0] = 0xF0 | ((3 * 4) & 0x0F) |
+ (scmds.continuousTone == SEC_TONE_ON ? 1 : 0) |
+ (scmds.voltage==SEC_VOLTAGE_18 ? 2 : 0);
+
+@@ -324,7 +324,7 @@
+
+
+ /*
+- if ((fd_demuxa=open("/dev/ost/demux", O_RDWR|O_NONBLOCK))
++ if ((fd_demuxa=open("/dev/ost/demux", O_RDWR|O_NONBLOCK))
+ < 0){
+ perror("DEMUX DEVICE: ");
+ return -1;
+@@ -336,18 +336,18 @@
+ sctFilterParams.timeout = 0;
+ sctFilterParams.flags = DMX_IMMEDIATE_START;
+
+- if (ioctl(fd_demuxa, DMX_SET_FILTER, &sctFilterParams) < 0)
++ if (ioctl(fd_demuxa, DMX_SET_FILTER, &sctFilterParams) < 0)
+ perror("DMX SET FILTER:");
+
+
+ get_sect(fd_demuxa);
+ */
+ pesFilterParamsA.pid = 0x1fff;
+- pesFilterParamsA.input = DMX_IN_FRONTEND;
+- pesFilterParamsA.output = DMX_OUT_TS_TAP;
+- pesFilterParamsA.pes_type = DMX_PES_OTHER;
++ pesFilterParamsA.input = DMX_IN_FRONTEND;
++ pesFilterParamsA.output = DMX_OUT_TS_TAP;
++ pesFilterParamsA.pes_type = DMX_PES_OTHER;
+ pesFilterParamsA.flags = DMX_IMMEDIATE_START;
+- if (ioctl(fd_demuxa, DMX_SET_PES_FILTER,
++ if (ioctl(fd_demuxa, DMX_SET_PES_FILTER,
+ &pesFilterParamsA) < 0)
+ perror("set_apid");
+
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_tt.c dvb-apps/test/test_tt.c
+--- linuxtv-dvb-apps-1.1.1/test/test_tt.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_tt.c 2009-06-21 13:29:06.000000000 +0200
+@@ -202,4 +202,3 @@
+ close(dmxfd);
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_vevent.c dvb-apps/test/test_vevent.c
+--- linuxtv-dvb-apps-1.1.1/test/test_vevent.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_vevent.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,4 @@
+-/*
++/*
+ * test_vevent.c - Test VIDEO_GET_EVENT and poll(9 for video events
+ *
+ * Copyright (C) 2003 convergence GmbH
+@@ -29,6 +29,7 @@
+ #include <time.h>
+ #include <unistd.h>
+
++#include <linux/types.h>
+ #include <linux/dvb/video.h>
+
+
+@@ -73,7 +74,7 @@
+
+ printf("using video device '%s'\n", videodev);
+
+- if((vfd = open(videodev, O_RDONLY | O_NONBLOCK)) < 0) {
++ if ((vfd = open(videodev, O_RDONLY | O_NONBLOCK)) < 0) {
+ perror("open video device");
+ return 1;
+ }
+@@ -122,4 +123,3 @@
+ close(vfd);
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/test_video.c dvb-apps/test/test_video.c
+--- linuxtv-dvb-apps-1.1.1/test/test_video.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/test_video.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,4 @@
+-/*
++/*
+ * test_video.c - Test program for new API
+ *
+ * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
+@@ -40,7 +40,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_STOP,0) < 0)){
++ if ((ans = ioctl(fd,VIDEO_STOP,0)) < 0) {
+ perror("VIDEO STOP: ");
+ return -1;
+ }
+@@ -52,7 +52,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_PLAY) < 0)){
++ if ((ans = ioctl(fd,VIDEO_PLAY)) < 0) {
+ perror("VIDEO PLAY: ");
+ return -1;
+ }
+@@ -65,7 +65,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_FREEZE) < 0)){
++ if ((ans = ioctl(fd,VIDEO_FREEZE)) < 0) {
+ perror("VIDEO FREEZE: ");
+ return -1;
+ }
+@@ -78,7 +78,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_CONTINUE) < 0)){
++ if ((ans = ioctl(fd,VIDEO_CONTINUE)) < 0) {
+ perror("VIDEO CONTINUE: ");
+ return -1;
+ }
+@@ -90,7 +90,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_SELECT_SOURCE, source) < 0)){
++ if ((ans = ioctl(fd,VIDEO_SELECT_SOURCE, source)) < 0) {
+ perror("VIDEO SELECT SOURCE: ");
+ return -1;
+ }
+@@ -104,7 +104,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_SET_BLANK, state) < 0)){
++ if ((ans = ioctl(fd,VIDEO_SET_BLANK, state)) < 0) {
+ perror("VIDEO SET BLANK: ");
+ return -1;
+ }
+@@ -116,7 +116,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_FAST_FORWARD, nframes) < 0)){
++ if ((ans = ioctl(fd,VIDEO_FAST_FORWARD, nframes)) < 0) {
+ perror("VIDEO FAST FORWARD: ");
+ return -1;
+ }
+@@ -128,7 +128,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_SLOWMOTION, nframes) < 0)){
++ if ((ans = ioctl(fd,VIDEO_SLOWMOTION, nframes)) < 0) {
+ perror("VIDEO SLOWMOTION: ");
+ return -1;
+ }
+@@ -141,7 +141,7 @@
+ struct video_status stat;
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_GET_STATUS, &stat) < 0)){
++ if ((ans = ioctl(fd,VIDEO_GET_STATUS, &stat)) < 0) {
+ perror("VIDEO GET STATUS: ");
+ return -1;
+ }
+@@ -164,7 +164,7 @@
+ printf("unknown (%d)\n",stat.play_state);
+ break;
+ }
+-
++
+ printf(" Stream Source : ");
+ switch((int)stat.stream_source){
+ case VIDEO_SOURCE_DEMUX:
+@@ -213,7 +213,7 @@
+ {
+ int ans;
+
+- if ( (ans = ioctl(fd,VIDEO_STILLPICTURE, sp) < 0)){
++ if ((ans = ioctl(fd,VIDEO_STILLPICTURE, sp)) < 0) {
+ perror("VIDEO STILLPICTURE: ");
+ return -1;
+ }
+@@ -234,17 +234,17 @@
+
+ pfd[0].fd = STDIN_FILENO;
+ pfd[0].events = POLLIN;
+-
++
+ pfd[1].fd = fd;
+ pfd[1].events = POLLOUT;
+-
++
+ videoSelectSource(fd,VIDEO_SOURCE_MEMORY);
+ videoPlay(fd);
+-
+-
++
++
+ count = read(filefd,buf,BUFFY);
+ write(fd,buf,count);
+-
++
+ while ( (count = read(filefd,buf,BUFFY)) >= 0 ){
+ written = 0;
+ while(written < count){
+@@ -267,7 +267,7 @@
+ printf("playback stopped\n");
+ stopped = 1;
+ break;
+-
++
+ case 'c':
+ videoContinue(fd);
+ printf("playback continued\n");
+@@ -298,7 +298,7 @@
+ break;
+ }
+ }
+-
++
+ }
+ }
+ }
+@@ -310,12 +310,12 @@
+ struct video_still_picture sp;
+
+ fstat(filefd, &st);
+-
++
+ sp.iFrame = (char *) malloc(st.st_size);
+ sp.size = st.st_size;
+ printf("I-frame size: %d\n", sp.size);
+-
+- if(!sp.iFrame) {
++
++ if (!sp.iFrame) {
+ printf("No memory for I-Frame\n");
+ return;
+ }
+@@ -338,12 +338,12 @@
+ perror("File open:");
+ return -1;
+ }
+- if((fd = open("/dev/ost/video1",O_RDWR|O_NONBLOCK)) < 0){
++ if ((fd = open("/dev/ost/video1",O_RDWR|O_NONBLOCK)) < 0){
+ perror("VIDEO DEVICE: ");
+ return -1;
+ }
+-
+-
++
++
+
+
+ // videoSetBlank(fd,false);
+@@ -365,4 +365,3 @@
+
+
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/test/video.c dvb-apps/test/video.c
+--- linuxtv-dvb-apps-1.1.1/test/video.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/test/video.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,13 +1,14 @@
+- /**
+- * A tiny video watching application, just starts capturing /dev/video
+- * into /dev/fb0.
+- * Be shure to have >8Bit/pixel color resolution and r/w access for
+- * /dev/video0, /dev/fb0 and /dev/tty0 to let this work...
+- *
+- * compile with
+- *
+- * $ gcc -g -Wall -O2 -o video video.c -I../../ost/include
+- */
++#define USAGE \
++"\n" \
++"\n A tiny video watching application, just starts capturing /dev/video" \
++"\n into /dev/fb0." \
++"\n Be shure to have >8Bit/pixel color resolution and r/w access for " \
++"\n /dev/video0, /dev/fb0 and /dev/tty0 to let this work..." \
++"\n" \
++"\n compile with" \
++"\n" \
++"\n $ gcc -g -Wall -O2 -o video video.c -I../../ost/include" \
++"\n"
+
+ #include <sys/mman.h>
+ #include <sys/ioctl.h>
+@@ -55,7 +56,7 @@
+ }
+
+ write( vt_fd, blankoff_str, strlen(blankoff_str) );
+-
++
+ if (ioctl (fd, FBIOGET_VSCREENINFO, &fb_var) < 0) {
+ perror("Could not get variable screen information (fb_var)\n");
+ return 1;
+@@ -77,14 +78,14 @@
+ struct video_capability vcap;
+
+ if ((fd = open (video_devname, O_RDWR)) < 0) {
+- fprintf (stderr,
++ fprintf (stderr,
+ "%s: Could not open %s, please check permissions\n",
+ __FUNCTION__, video_devname);
+ return -1;
+ }
+
+ ioctl(fd, VIDIOCGCAP, &vcap);
+-
++
+ if (ioctl(fd, VIDIOCCAPTURE, &zero) < 0) {
+ perror("Could not stop capturing (VIDIOCCAPTURE failed)\n");
+ return -2;
+@@ -92,7 +93,7 @@
+
+ if (stop)
+ return 0;
+-
++
+ {
+ struct video_buffer b;
+ b.base = (void*) fb_fix.smem_start;
+@@ -105,7 +106,7 @@
+ return -3;
+ }
+ }
+-
++
+ {
+ struct video_picture p;
+ if (ioctl(fd, VIDIOCGPICT, &p) < 0) {
+@@ -131,7 +132,7 @@
+ return -5;
+ }
+ }
+-
++
+ {
+ struct video_window win;
+ win.width = min((__u32) vcap.maxwidth, fb_var.xres);
+@@ -147,14 +148,14 @@
+ return -6;
+ }
+ }
+-
++
+ if (ioctl(fd, VIDIOCCAPTURE, &one) < 0) {
+ perror("Could not start capturing (VIDIOCCAPTURE failed)\n");
+ return -7;
+ }
+-
++
+ close (fd);
+-
++
+ return 0;
+ }
+
+@@ -173,10 +174,9 @@
+ video_devname = argv[1];
+
+ if (argc != 1 && argc != 2 && !(argc == 3 && stop)) {
+- fprintf (stderr, "usage: %s <devname> <stop>\n", argv[0]);
++ fprintf(stderr, "usage: %s <devname> <stop>\n" USAGE, argv[0]);
+ exit (-1);
+ }
+
+ return init_video (stop);
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/TODO dvb-apps/TODO
+--- linuxtv-dvb-apps-1.1.1/TODO 2004-02-04 19:51:58.000000000 +0100
++++ dvb-apps/TODO 1970-01-01 01:00:00.000000000 +0100
+@@ -1 +0,0 @@
+-- create libdvb2, possibly merging util/lib/*
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/atsc_epg/atsc_epg.c dvb-apps/util/atsc_epg/atsc_epg.c
+--- linuxtv-dvb-apps-1.1.1/util/atsc_epg/atsc_epg.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/atsc_epg/atsc_epg.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,1249 @@
++/*
++ * atsc_epg utility
++ *
++ * Copyright (C) 2009 Yufei Yuan <yfyuan@gmail.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., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
++#include <time.h>
++#include <signal.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <sys/ioctl.h>
++#include <sys/poll.h>
++#include <errno.h>
++#include <getopt.h>
++#include <stdarg.h>
++#include <libdvbapi/dvbfe.h>
++#include <libdvbapi/dvbdemux.h>
++#include <libucsi/dvb/section.h>
++#include <libucsi/atsc/section.h>
++#include <libucsi/atsc/types.h>
++
++#define TIMEOUT 60
++#define RRT_TIMEOUT 60
++#define MAX_NUM_EVENT_TABLES 128
++#define TITLE_BUFFER_LEN 4096
++#define MESSAGE_BUFFER_LEN (16 * 1024)
++#define MAX_NUM_CHANNELS 16
++#define MAX_NUM_EVENTS_PER_CHANNEL (4 * 24 * 7)
++
++static int atsc_scan_table(int dmxfd, uint16_t pid, enum atsc_section_tag tag,
++ void **table_section);
++
++static const char *program;
++static int adapter = 0;
++static int period = 12; /* hours */
++static int frequency;
++static int enable_ett = 0;
++static int ctrl_c = 0;
++static const char *modulation = NULL;
++static char separator[80];
++void (*old_handler)(int);
++
++struct atsc_string_buffer {
++ int buf_len;
++ int buf_pos;
++ char *string;
++};
++
++struct atsc_event_info {
++ uint16_t id;
++ struct tm start;
++ struct tm end;
++ int title_pos;
++ int title_len;
++ int msg_pos;
++ int msg_len;
++};
++
++struct atsc_eit_section_info {
++ uint8_t section_num;
++ uint8_t num_events;
++ uint8_t num_etms;
++ uint8_t num_received_etms;
++ struct atsc_event_info **events;
++};
++
++struct atsc_eit_info {
++ int num_eit_sections;
++ struct atsc_eit_section_info *section;
++};
++
++struct atsc_channel_info {
++ uint8_t num_eits;
++ uint8_t service_type;
++ char short_name[8];
++ uint16_t major_num;
++ uint16_t minor_num;
++ uint16_t tsid;
++ uint16_t prog_num;
++ uint16_t src_id;
++ struct atsc_eit_info *eit;
++ struct atsc_event_info *last_event;
++ int event_info_index;
++ struct atsc_event_info e[MAX_NUM_EVENTS_PER_CHANNEL];
++ struct atsc_string_buffer title_buf;
++ struct atsc_string_buffer msg_buf;
++};
++
++struct atsc_virtual_channels_info {
++ int num_channels;
++ uint16_t eit_pid[MAX_NUM_EVENT_TABLES];
++ uint16_t ett_pid[MAX_NUM_EVENT_TABLES];
++ struct atsc_channel_info ch[MAX_NUM_CHANNELS];
++} guide;
++
++struct mgt_table_name {
++ uint16_t range;
++ const char *string;
++};
++
++struct mgt_table_name mgt_tab_name_array[] = {
++ {0x0000, "terrestrial VCT with current_next_indictor=1"},
++ {0x0001, "terrestrial VCT with current_next_indictor=0"},
++ {0x0002, "cable VCT with current_next_indictor=1"},
++ {0x0003, "cable VCT with current_next_indictor=0"},
++ {0x0004, "channel ETT"},
++ {0x0005, "DCCSCT"},
++ {0x00FF, "reserved for future ATSC use"},
++ {0x017F, "EIT"},
++ {0x01FF, "reserved for future ATSC use"},
++ {0x027F, "event ETT"},
++ {0x02FF, "reserved for future ATSC use"}, /* FIXME */
++ {0x03FF, "RRT with rating region"},
++ {0x0FFF, "user private"},
++ {0x13FF, "reserved for future ATSC use"},
++ {0x14FF, "DCCT with dcc_id"},
++ {0xFFFF, "reserved for future ATSC use"}
++};
++
++const char *channel_modulation_mode[] = {
++ "",
++ "analog",
++ "SCTE mode 1",
++ "SCTE mode 2",
++ "ATSC 8VSB",
++ "ATSC 16VSB"
++};
++
++const char *channel_service_type[] = {
++ "",
++ "analog TV",
++ "ATSC digital TV",
++ "ATSC audio",
++ "ATSC data-only"
++};
++
++void *(*table_callback[16])(struct atsc_section_psip *) =
++{
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
++ (void *(*)(struct atsc_section_psip *))atsc_mgt_section_codec,
++ (void *(*)(struct atsc_section_psip *))atsc_tvct_section_codec,
++ (void *(*)(struct atsc_section_psip *))atsc_cvct_section_codec,
++ (void *(*)(struct atsc_section_psip *))atsc_rrt_section_codec,
++ (void *(*)(struct atsc_section_psip *))atsc_eit_section_codec,
++ (void *(*)(struct atsc_section_psip *))atsc_ett_section_codec,
++ (void *(*)(struct atsc_section_psip *))atsc_stt_section_codec,
++ NULL, NULL
++};
++
++static void int_handler(int sig_num)
++{
++ if(SIGINT != sig_num) {
++ return;
++ }
++ ctrl_c = 1;
++}
++
++/* shamelessly stolen from dvbsnoop, but almost not modified */
++static uint32_t get_bits(const uint8_t *buf, int startbit, int bitlen)
++{
++ const uint8_t *b;
++ uint32_t mask,tmp_long;
++ int bitHigh,i;
++
++ b = &buf[startbit / 8];
++ startbit %= 8;
++
++ bitHigh = 8;
++ tmp_long = b[0];
++ for (i = 0; i < ((bitlen-1) >> 3); i++) {
++ tmp_long <<= 8;
++ tmp_long |= b[i+1];
++ bitHigh += 8;
++ }
++
++ startbit = bitHigh - startbit - bitlen;
++ tmp_long = tmp_long >> startbit;
++ mask = (1ULL << bitlen) - 1;
++ return tmp_long & mask;
++}
++
++static void usage(void)
++{
++ fprintf(stderr, "usage: %s [-a <n>] -f <frequency> [-p <period>]"
++ " [-m <modulation>] [-t] [-h]\n", program);
++}
++
++static void help(void)
++{
++ fprintf(stderr,
++ "\nhelp:\n"
++ "%s [-a <n>] -f <frequency> [-p <period>] [-m <modulation>] [-t] [-h]\n"
++ " -a: adapter index to use, (default 0)\n"
++ " -f: tuning frequency\n"
++ " -p: period in hours, (default 12)\n"
++ " -m: modulation ATSC vsb_8|vsb_16 (default vsb_8)\n"
++ " -t: enable ETT to receive program details, if available\n"
++ " -h: display this message\n", program);
++}
++
++static int close_frontend(struct dvbfe_handle *fe)
++{
++ if(NULL == fe) {
++ fprintf(stderr, "%s(): NULL pointer detected\n", __FUNCTION__);
++ }
++
++ dvbfe_close(fe);
++
++ return 0;
++}
++
++static int open_frontend(struct dvbfe_handle **fe)
++{
++ struct dvbfe_info fe_info;
++
++ if(NULL == (*fe = dvbfe_open(adapter, 0, 0))) {
++ fprintf(stderr, "%s(): error calling dvbfe_open()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ dvbfe_get_info(*fe, 0, &fe_info, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
++ if(DVBFE_TYPE_ATSC != fe_info.type) {
++ fprintf(stderr, "%s(): only ATSC frontend supported currently\n",
++ __FUNCTION__);
++ return -1;
++ }
++ fe_info.feparams.frequency = frequency;
++ fe_info.feparams.inversion = DVBFE_INVERSION_AUTO;
++ fe_info.feparams.u.atsc.modulation = DVBFE_ATSC_MOD_VSB_8;
++ fprintf(stdout, "tuning to %d Hz, please wait...\n", frequency);
++ if(dvbfe_set(*fe, &fe_info.feparams, TIMEOUT * 1000)) {
++ fprintf(stderr, "%s(): cannot lock to %d Hz in %d seconds\n",
++ __FUNCTION__, frequency, TIMEOUT);
++ return -1;
++ }
++ fprintf(stdout, "tuner locked.\n");
++
++ return 0;
++}
++
++#if ENABLE_RRT
++/* this is untested as since this part of the library is broken */
++static int parse_rrt(int dmxfd)
++{
++ const enum atsc_section_tag tag = stag_atsc_rating_region;
++ struct atsc_rrt_section *rrt;
++ struct atsc_text *region_name;
++ struct atsc_text_string *atsc_str;
++ int i, j, ret;
++
++ i = 0;
++ fprintf(stdout, "waiting for RRT: ");
++ fflush(stdout);
++ while(i < RRT_TIMEOUT) {
++ ret = atsc_scan_table(dmxfd, ATSC_BASE_PID, tag, (void **)&rrt);
++ if(0 > ret) {
++ fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ if(0 == ret) {
++ if(RRT_TIMEOUT > i) {
++ fprintf(stdout, ".");
++ fflush(stdout);
++ } else {
++ fprintf(stdout, "\nno RRT in %d seconds\n",
++ RRT_TIMEOUT);
++ return 0;
++ }
++ i += TIMEOUT;
++ } else {
++ fprintf(stdout, "\n");
++ fflush(stdout);
++ break;
++ }
++ }
++
++ region_name = atsc_rrt_section_rating_region_name_text(rrt);
++ atsc_text_strings_for_each(region_name, atsc_str, i) {
++ struct atsc_text_string_segment *seg;
++
++ atsc_text_string_segments_for_each(atsc_str, seg, j) {
++ const char *c;
++ int k;
++ if(seg->mode < 0x3E) {
++ fprintf(stderr, "%s(): text mode of 0x%02X "
++ "not supported yet\n",
++ __FUNCTION__, seg->mode);
++ return -1;
++ }
++ c = (const char *)atsc_text_string_segment_bytes(seg);
++ for(k = 0; k < seg->number_bytes; k++) {
++ fprintf(stdout, "%c", c[k]);
++ }
++ }
++ }
++
++ return 0;
++}
++#endif
++
++static int parse_stt(int dmxfd)
++{
++ const enum atsc_section_tag tag = stag_atsc_system_time;
++ const struct atsc_stt_section *stt;
++ time_t rx_time;
++ time_t sys_time;
++ int ret;
++
++ ret = atsc_scan_table(dmxfd, ATSC_BASE_PID, tag, (void **)&stt);
++ if(0 > ret) {
++ fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ if(0 == ret) {
++ fprintf(stdout, "no STT in %d seconds\n", TIMEOUT);
++ return 0;
++ }
++
++ rx_time = atsctime_to_unixtime(stt->system_time);
++ time(&sys_time);
++ fprintf(stdout, "system time: %s", ctime(&sys_time));
++ fprintf(stdout, "TS STT time: %s", ctime(&rx_time));
++
++ return 0;
++}
++
++static int parse_tvct(int dmxfd)
++{
++ int num_sections;
++ uint32_t section_pattern;
++ const enum atsc_section_tag tag = stag_atsc_terrestrial_virtual_channel;
++ struct atsc_tvct_section *tvct;
++ struct atsc_tvct_channel *ch;
++ struct atsc_channel_info *curr_info;
++ int i, k, ret;
++
++ section_pattern = 0;
++ num_sections = -1;
++
++ do {
++ ret = atsc_scan_table(dmxfd, ATSC_BASE_PID, tag, (void **)&tvct);
++ if(0 > ret) {
++ fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ if(0 == ret) {
++ fprintf(stdout, "no TVCT in %d seconds\n", TIMEOUT);
++ return 0;
++ }
++
++ if(-1 == num_sections) {
++ num_sections = 1 + tvct->head.ext_head.last_section_number;
++ if(32 < num_sections) {
++ fprintf(stderr, "%s(): no support yet for "
++ "tables having more than 32 sections\n",
++ __FUNCTION__);
++ return -1;
++ }
++ } else {
++ if(num_sections !=
++ 1 + tvct->head.ext_head.last_section_number) {
++ fprintf(stderr,
++ "%s(): last section number does not match\n",
++ __FUNCTION__);
++ return -1;
++ }
++ }
++ if(section_pattern & (1 << tvct->head.ext_head.section_number)) {
++ continue;
++ }
++ section_pattern |= 1 << tvct->head.ext_head.section_number;
++
++ if(MAX_NUM_CHANNELS < guide.num_channels +
++ tvct->num_channels_in_section) {
++ fprintf(stderr, "%s(): no support for more than %d "
++ "virtual channels in a pyhsical channel\n",
++ __FUNCTION__, MAX_NUM_CHANNELS);
++ return -1;
++ }
++ curr_info = &guide.ch[guide.num_channels];
++ guide.num_channels += tvct->num_channels_in_section;
++
++ atsc_tvct_section_channels_for_each(tvct, ch, i) {
++ /* initialize the curr_info structure */
++ /* each EIT covers 3 hours */
++ curr_info->num_eits = (period / 3) + !!(period % 3);
++ while (curr_info->num_eits &&
++ (0xFFFF == guide.eit_pid[curr_info->num_eits - 1])) {
++ curr_info->num_eits -= 1;
++ }
++ if(curr_info->eit) {
++ fprintf(stderr, "%s(): non-NULL pointer detected "
++ "during initialization", __FUNCTION__);
++ return -1;
++ }
++ if(NULL == (curr_info->eit = calloc(curr_info->num_eits,
++ sizeof(struct atsc_eit_info)))) {
++ fprintf(stderr, "%s(): error calling calloc()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ if(NULL == (curr_info->title_buf.string = calloc(TITLE_BUFFER_LEN,
++ sizeof(char)))) {
++ fprintf(stderr, "%s(): error calling calloc()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ curr_info->title_buf.buf_len = TITLE_BUFFER_LEN;
++ curr_info->title_buf.buf_pos = 0;
++
++ if(NULL == (curr_info->msg_buf.string = calloc(MESSAGE_BUFFER_LEN,
++ sizeof(char)))) {
++ fprintf(stderr, "%s(): error calling calloc()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ curr_info->msg_buf.buf_len = MESSAGE_BUFFER_LEN;
++ curr_info->msg_buf.buf_pos = 0;
++
++ for(k = 0; k < 7; k++) {
++ curr_info->short_name[k] =
++ get_bits((const uint8_t *)ch->short_name,
++ k * 16, 16);
++ }
++ curr_info->service_type = ch->service_type;
++ curr_info->major_num = ch->major_channel_number;
++ curr_info->minor_num = ch->minor_channel_number;
++ curr_info->tsid = ch->channel_TSID;
++ curr_info->prog_num = ch->program_number;
++ curr_info->src_id = ch->source_id;
++ curr_info++;
++ }
++ } while(section_pattern != (uint32_t)((1 << num_sections) - 1));
++
++ return 0;
++}
++
++static int match_event(struct atsc_eit_info *eit, uint16_t event_id,
++ struct atsc_event_info **event, uint8_t *curr_index)
++{
++ int j, k;
++ struct atsc_eit_section_info *section;
++
++ if(NULL == eit || NULL == event || NULL == curr_index) {
++ fprintf(stderr, "%s(): NULL pointer detected\n", __FUNCTION__);
++ return -1;
++ }
++
++ for(j = 0; j < eit->num_eit_sections; j++) {
++ section = &eit->section[j];
++
++ for(k = 0; k < section->num_events; k++) {
++ if(section->events[k] && section->events[k]->id ==
++ event_id) {
++ *event = section->events[k];
++ break;
++ }
++ }
++ if(*event) {
++ *curr_index = j;
++ break;
++ }
++ }
++
++ return 0;
++}
++
++static int parse_message(struct atsc_channel_info *channel,
++ struct atsc_ett_section *ett, struct atsc_event_info *event)
++{
++ int i, j;
++ struct atsc_text *text;
++ struct atsc_text_string *str;
++
++ if(NULL == ett || NULL == event || NULL == channel) {
++ fprintf(stderr, "%s(): NULL pointer detected\n", __FUNCTION__);
++ return -1;
++ }
++
++ text = atsc_ett_section_extended_text_message(ett);
++ atsc_text_strings_for_each(text, str, i) {
++ struct atsc_text_string_segment *seg;
++
++ atsc_text_string_segments_for_each(str, seg, j) {
++ event->msg_pos = channel->msg_buf.buf_pos;
++ if(0 > atsc_text_segment_decode(seg,
++ (uint8_t **)&channel->msg_buf.string,
++ (size_t *)&channel->msg_buf.buf_len,
++ (size_t *)&channel->msg_buf.buf_pos)) {
++ fprintf(stderr, "%s(): error calling "
++ "atsc_text_segment_decode()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ event->msg_len = 1 + channel->msg_buf.buf_pos -
++ event->msg_pos;
++ }
++ }
++
++ return 0;
++}
++
++static int parse_ett(int dmxfd, int index, uint16_t pid)
++{
++ uint8_t curr_index;
++ uint32_t section_pattern;
++ const enum atsc_section_tag tag = stag_atsc_extended_text;
++ struct atsc_eit_info *eit;
++ struct atsc_ett_section *ett;
++ struct atsc_channel_info *channel;
++ struct atsc_event_info *event;
++ struct atsc_eit_section_info *section;
++ uint16_t source_id, event_id;
++ int c, ret;
++
++ if(0xFFFF == guide.ett_pid[index]) {
++ return 0;
++ }
++
++ for(c = 0; c < guide.num_channels; c++) {
++ channel = &guide.ch[c];
++ eit = &channel->eit[index];
++
++ section_pattern = 0;
++ while(section_pattern !=
++ (uint32_t)((1 << eit->num_eit_sections) - 1)) {
++ if(ctrl_c) {
++ return 0;
++ }
++ ret = atsc_scan_table(dmxfd, pid, tag, (void **)&ett);
++ fprintf(stdout, ".");
++ fflush(stdout);
++ if(0 > ret) {
++ fprintf(stderr, "%s(): error calling "
++ "atsc_scan_table()\n", __FUNCTION__);
++ return -1;
++ }
++ if(0 == ret) {
++ fprintf(stdout, "no ETT %d in %d seconds\n",
++ index, TIMEOUT);
++ return 0;
++ }
++
++ source_id = ett->ETM_source_id;
++ event_id = ett->ETM_sub_id;
++ if(source_id != channel->src_id) {
++ continue;
++ }
++
++ event = NULL;
++ if(match_event(eit, event_id, &event, &curr_index)) {
++ fprintf(stderr, "%s(): error calling "
++ "match_event()\n", __FUNCTION__);
++ return -1;
++ }
++ if(NULL == event) {
++ continue;
++ }
++ if(section_pattern & (1 << curr_index)) {
++ /* the section has been filled, so skip,
++ * not consider version yet
++ */
++ continue;
++ }
++ if(event->msg_len) {
++ /* the message has been filled */
++ continue;
++ }
++
++ if(parse_message(channel, ett, event)) {
++ fprintf(stderr, "%s(): error calling "
++ "parse_message()\n", __FUNCTION__);
++ return -1;
++ }
++ section = &eit->section[curr_index];
++ if(++section->num_received_etms == section->num_etms) {
++ section_pattern |= 1 << curr_index;
++ }
++ }
++ }
++
++ return 0;
++}
++
++static int parse_events(struct atsc_channel_info *curr_info,
++ struct atsc_eit_section *eit, struct atsc_eit_section_info *section)
++{
++ int i, j, k;
++ struct atsc_eit_event *e;
++ time_t start_time, end_time;
++
++ if(NULL == curr_info || NULL == eit) {
++ fprintf(stderr, "%s(): NULL pointer detected\n", __FUNCTION__);
++ return -1;
++ }
++
++ atsc_eit_section_events_for_each(eit, e, i) {
++ struct atsc_text *title;
++ struct atsc_text_string *str;
++ struct atsc_event_info *e_info =
++ &curr_info->e[curr_info->event_info_index];
++
++ if(0 == i && curr_info->last_event) {
++ if(e->event_id == curr_info->last_event->id) {
++ section->events[i] = NULL;
++ /* skip if it's the same event spanning
++ * over sections
++ */
++ continue;
++ }
++ }
++ curr_info->event_info_index += 1;
++ section->events[i] = e_info;
++ e_info->id = e->event_id;
++ start_time = atsctime_to_unixtime(e->start_time);
++ end_time = start_time + e->length_in_seconds;
++ localtime_r(&start_time, &e_info->start);
++ localtime_r(&end_time, &e_info->end);
++ if(0 != e->ETM_location && 3 != e->ETM_location) {
++ /* FIXME assume 1 and 2 is interchangable as of now */
++ section->num_etms++;
++ }
++
++ title = atsc_eit_event_name_title_text(e);
++ atsc_text_strings_for_each(title, str, j) {
++ struct atsc_text_string_segment *seg;
++
++ atsc_text_string_segments_for_each(str, seg, k) {
++ e_info->title_pos = curr_info->title_buf.buf_pos;
++ if(0 > atsc_text_segment_decode(seg,
++ (uint8_t **)&curr_info->title_buf.string,
++ (size_t *)&curr_info->title_buf.buf_len,
++ (size_t *)&curr_info->title_buf.buf_pos)) {
++ fprintf(stderr, "%s(): error calling "
++ "atsc_text_segment_decode()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ e_info->title_len = curr_info->title_buf.buf_pos -
++ e_info->title_pos + 1;
++ }
++ }
++ }
++
++ return 0;
++}
++
++static int parse_eit(int dmxfd, int index, uint16_t pid)
++{
++ int num_sections;
++ uint8_t section_num;
++ uint8_t curr_channel_index;
++ uint32_t section_pattern;
++ const enum atsc_section_tag tag = stag_atsc_event_information;
++ struct atsc_eit_section *eit;
++ struct atsc_channel_info *curr_info;
++ struct atsc_eit_info *eit_info;
++ struct atsc_eit_section_info *section;
++ uint16_t source_id;
++ uint32_t eit_instance_pattern = 0;
++ int i, k, ret;
++
++ while(eit_instance_pattern !=
++ (uint32_t)((1 << guide.num_channels) - 1)) {
++ source_id = 0xFFFF;
++ section_pattern = 0;
++ num_sections = -1;
++
++ do {
++ ret = atsc_scan_table(dmxfd, pid, tag, (void **)&eit);
++ fprintf(stdout, ".");
++ fflush(stdout);
++ if(0 > ret) {
++ fprintf(stderr, "%s(): error calling "
++ "atsc_scan_table()\n", __FUNCTION__);
++ return -1;
++ }
++ if(0 == ret) {
++ fprintf(stdout, "no EIT %d in %d seconds\n",
++ index, TIMEOUT);
++ return 0;
++ }
++
++ if(0xFFFF == source_id) {
++ source_id = atsc_eit_section_source_id(eit);
++ for(k = 0; k < guide.num_channels; k++) {
++ if(source_id == guide.ch[k].src_id) {
++ curr_info = &guide.ch[k];
++ curr_channel_index = k;
++ if(0 == index) {
++ curr_info->last_event = NULL;
++ }
++ break;
++ }
++ }
++ if(k == guide.num_channels) {
++ fprintf(stderr, "%s(): cannot find source_id "
++ "0x%04X in the EIT\n",
++ __FUNCTION__, source_id);
++ return -1;
++ }
++ } else {
++ if(source_id !=
++ atsc_eit_section_source_id(eit)) {
++ continue;
++ }
++ }
++ if(eit_instance_pattern & (1 << curr_channel_index)) {
++ /* we have received this instance,
++ * so quit quick
++ */
++ break;
++ }
++
++ if(-1 == num_sections) {
++ num_sections = 1 +
++ eit->head.ext_head.last_section_number;
++ if(32 < num_sections) {
++ fprintf(stderr,
++ "%s(): no support yet for "
++ "tables having more than "
++ "32 sections\n", __FUNCTION__);
++ return -1;
++ }
++ } else {
++ if(num_sections != 1 +
++ eit->head.ext_head.last_section_number) {
++ fprintf(stderr,
++ "%s(): last section number "
++ "does not match\n",
++ __FUNCTION__);
++ return -1;
++ }
++ }
++ if(section_pattern &
++ (1 << eit->head.ext_head.section_number)) {
++ continue;
++ }
++ section_pattern |= 1 << eit->head.ext_head.section_number;
++
++ eit_info = &curr_info->eit[index];
++ if(NULL == (eit_info->section =
++ realloc(eit_info->section,
++ (eit_info->num_eit_sections + 1) *
++ sizeof(struct atsc_eit_section_info)))) {
++ fprintf(stderr,
++ "%s(): error calling realloc()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ section_num = eit->head.ext_head.section_number;
++ if(0 == eit_info->num_eit_sections) {
++ eit_info->num_eit_sections = 1;
++ section = eit_info->section;
++ } else {
++ /* have to sort it into section order
++ * (temporal order)
++ */
++ for(i = 0; i < eit_info->num_eit_sections; i++) {
++ if(eit_info->section[i].section_num >
++ section_num) {
++ break;
++ }
++ }
++ memmove(&eit_info->section[i + 1],
++ &eit_info->section[i],
++ (eit_info->num_eit_sections - i) *
++ sizeof(struct atsc_eit_section_info));
++ section = &eit_info->section[i - 1];
++ section = &eit_info->section[i];
++ eit_info->num_eit_sections += 1;
++ }
++
++ section->section_num = section_num;
++ section->num_events = eit->num_events_in_section;
++ section->num_etms = 0;
++ section->num_received_etms = 0;
++ if(NULL == (section->events = calloc(section->num_events,
++ sizeof(struct atsc_event_info *)))) {
++ fprintf(stderr, "%s(): error calling calloc()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ if(parse_events(curr_info, eit, section)) {
++ fprintf(stderr, "%s(): error calling "
++ "parse_events()\n", __FUNCTION__);
++ return -1;
++ }
++ } while(section_pattern != (uint32_t)((1 << num_sections) - 1));
++ eit_instance_pattern |= 1 << curr_channel_index;
++ }
++
++ for(i = 0; i < guide.num_channels; i++) {
++ struct atsc_channel_info *channel = &guide.ch[i];
++ struct atsc_eit_info *ei = &channel->eit[index];
++ struct atsc_eit_section_info *s;
++
++ if(0 == ei->num_eit_sections) {
++ channel->last_event = NULL;
++ continue;
++ }
++ s = &ei->section[ei->num_eit_sections - 1];
++ /* BUG: it's incorrect when last section has no event */
++ if(0 == s->num_events) {
++ channel->last_event = NULL;
++ continue;
++ }
++ channel->last_event = s->events[s->num_events - 1];
++ }
++
++ return 0;
++}
++
++static int parse_mgt(int dmxfd)
++{
++ const enum atsc_section_tag tag = stag_atsc_master_guide;
++ struct atsc_mgt_section *mgt;
++ struct atsc_mgt_table *t;
++ int i, j, ret;
++
++ ret = atsc_scan_table(dmxfd, ATSC_BASE_PID, tag, (void **)&mgt);
++ if(0 > ret) {
++ fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ if(0 == ret) {
++ fprintf(stdout, "no MGT in %d seconds\n", TIMEOUT);
++ return 0;
++ }
++
++ fprintf(stdout, "MGT table:\n");
++ atsc_mgt_section_tables_for_each(mgt, t, i) {
++ struct mgt_table_name table;
++
++ for(j = 0; j < (int)(sizeof(mgt_tab_name_array) /
++ sizeof(struct mgt_table_name)); j++) {
++ if(t->table_type > mgt_tab_name_array[j].range) {
++ continue;
++ }
++ table = mgt_tab_name_array[j];
++ if(0 == j || mgt_tab_name_array[j - 1].range + 1 ==
++ mgt_tab_name_array[j].range) {
++ j = -1;
++ } else {
++ j = t->table_type - mgt_tab_name_array[j - 1].range - 1;
++ if(0x017F == table.range) {
++ guide.eit_pid[j] = t->table_type_PID;
++ } else if (0x027F == table.range) {
++ guide.ett_pid[j] = t->table_type_PID;
++ }
++ }
++ break;
++ }
++
++ fprintf(stdout, " %2d: type = 0x%04X, PID = 0x%04X, %s", i,
++ t->table_type, t->table_type_PID, table.string);
++ if(-1 != j) {
++ fprintf(stdout, " %d", j);
++ }
++ fprintf(stdout, "\n");
++ }
++
++ return 0;
++}
++
++static int cleanup_guide(void)
++{
++ int i, j, k;
++
++ for(i = 0; i < guide.num_channels; i++) {
++ struct atsc_channel_info *channel = &guide.ch[i];
++
++ if(channel->title_buf.string) {
++ free(channel->title_buf.string);
++ }
++ if(channel->msg_buf.string) {
++ free(channel->msg_buf.string);
++ }
++ for(j = 0; j < channel->num_eits; j++) {
++ struct atsc_eit_info *eit = &channel->eit[j];
++
++ for(k = 0; k < eit->num_eit_sections; k++) {
++ struct atsc_eit_section_info *section =
++ &eit->section[k];
++ if(section->num_events) {
++ free(section->events);
++ }
++ }
++ if(k) {
++ free(eit->section);
++ }
++ }
++ if(j) {
++ free(channel->eit);
++ }
++ }
++
++ return 0;
++}
++
++static int print_events(struct atsc_channel_info *channel,
++ struct atsc_eit_section_info *section)
++{
++ int m;
++ char line[256];
++
++ if(NULL == section) {
++ fprintf(stderr, "%s(): NULL pointer detected", __FUNCTION__);
++ return -1;
++ }
++ for(m = 0; m < section->num_events; m++) {
++ struct atsc_event_info *event =
++ section->events[m];
++
++ if(NULL == event) {
++ continue;
++ }
++ fprintf(stdout, "|%02d:%02d--%02d:%02d| ",
++ event->start.tm_hour, event->start.tm_min,
++ event->end.tm_hour, event->end.tm_min);
++ snprintf(line, event->title_len, "%s",
++ &channel->title_buf.string[event->title_pos]);
++ line[event->title_len] = '\0';
++ fprintf(stdout, "%s\n", line);
++ if(event->msg_len) {
++ int len = event->msg_len;
++ int pos = event->msg_pos;
++ size_t part;
++
++ do {
++ part = len > 255 ? 255 : len;
++ snprintf(line, part, "%s",
++ &channel->msg_buf.string[pos]);
++ line[part] = '\0';
++ fprintf(stdout, "%s", line);
++ len -= part;
++ pos += part;
++ } while(0 < len);
++ fprintf(stdout, "\n");
++ }
++ }
++ return 0;
++}
++
++static int print_guide(void)
++{
++ int i, j, k;
++
++ fprintf(stdout, "%s\n", separator);
++ for(i = 0; i < guide.num_channels; i++) {
++ struct atsc_channel_info *channel = &guide.ch[i];
++
++ fprintf(stdout, "%d.%d %s\n", channel->major_num,
++ channel->minor_num, channel->short_name);
++ for(j = 0; j < channel->num_eits; j++) {
++ struct atsc_eit_info *eit = &channel->eit[j];
++
++ for(k = 0; k < eit->num_eit_sections; k++) {
++ struct atsc_eit_section_info *section =
++ &eit->section[k];
++ if(print_events(channel, section)) {
++ fprintf(stderr, "%s(): error calling "
++ "print_events()\n", __FUNCTION__);
++ return -1;
++ }
++ }
++ }
++ fprintf(stdout, "%s\n", separator);
++ }
++
++ return 0;
++}
++
++static int open_demux(int *dmxfd)
++{
++ if((*dmxfd = dvbdemux_open_demux(adapter, 0, 0)) < 0) {
++ fprintf(stderr, "%s(): error calling dvbdemux_open_demux()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ return 0;
++}
++
++static int close_demux(int dmxfd)
++{
++ if(dvbdemux_stop(dmxfd)) {
++ fprintf(stderr, "%s(): error calling dvbdemux_stop()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ return 0;
++}
++
++/* used other utilities as template and generalized here */
++static int atsc_scan_table(int dmxfd, uint16_t pid, enum atsc_section_tag tag,
++ void **table_section)
++{
++ uint8_t filter[18];
++ uint8_t mask[18];
++ unsigned char sibuf[4096];
++ int size;
++ int ret;
++ struct pollfd pollfd;
++ struct section *section;
++ struct section_ext *section_ext;
++ struct atsc_section_psip *psip;
++
++ /* create a section filter for the table */
++ memset(filter, 0, sizeof(filter));
++ memset(mask, 0, sizeof(mask));
++ filter[0] = tag;
++ mask[0] = 0xFF;
++ if(dvbdemux_set_section_filter(dmxfd, pid, filter, mask, 1, 1)) {
++ fprintf(stderr, "%s(): error calling atsc_scan_table()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ /* poll for data */
++ pollfd.fd = dmxfd;
++ pollfd.events = POLLIN | POLLERR |POLLPRI;
++ if((ret = poll(&pollfd, 1, TIMEOUT * 1000)) < 0) {
++ if(ctrl_c) {
++ return 0;
++ }
++ fprintf(stderr, "%s(): error calling poll()\n", __FUNCTION__);
++ return -1;
++ }
++
++ if(0 == ret) {
++ return 0;
++ }
++
++ /* read it */
++ if((size = read(dmxfd, sibuf, sizeof(sibuf))) < 0) {
++ fprintf(stderr, "%s(): error calling read()\n", __FUNCTION__);
++ return -1;
++ }
++
++ /* parse section */
++ section = section_codec(sibuf, size);
++ if(NULL == section) {
++ fprintf(stderr, "%s(): error calling section_codec()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ section_ext = section_ext_decode(section, 0);
++ if(NULL == section_ext) {
++ fprintf(stderr, "%s(): error calling section_ext_decode()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ psip = atsc_section_psip_decode(section_ext);
++ if(NULL == psip) {
++ fprintf(stderr,
++ "%s(): error calling atsc_section_psip_decode()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ *table_section = table_callback[tag & 0x0F](psip);
++ if(NULL == *table_section) {
++ fprintf(stderr, "%s(): error decode table section\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ return 1;
++}
++
++int main(int argc, char *argv[])
++{
++ int i, dmxfd;
++ struct dvbfe_handle *fe;
++
++ program = argv[0];
++
++ if(1 == argc) {
++ usage();
++ exit(-1);
++ }
++
++ for( ; ; ) {
++ char c;
++
++ if(-1 == (c = getopt(argc, argv, "a:f:p:m:th"))) {
++ break;
++ }
++
++ switch(c) {
++ case 'a':
++ adapter = strtoll(optarg, NULL, 0);
++ break;
++
++ case 'f':
++ frequency = strtol(optarg, NULL, 0);
++ break;
++
++ case 'p':
++ period = strtol(optarg, NULL, 0);
++ /* each table covers 3 hours */
++ if((3 * MAX_NUM_EVENT_TABLES) < period) {
++ period = 3 * MAX_NUM_EVENT_TABLES;
++ }
++ break;
++
++ case 'm':
++ /* just stub, so far ATSC only has VSB_8 */
++ modulation = optarg;
++ break;
++
++ case 't':
++ enable_ett = 1;
++ break;
++
++ case 'h':
++ help();
++ exit(0);
++
++ default:
++ usage();
++ exit(-1);
++ }
++ }
++
++ memset(separator, '-', sizeof(separator));
++ separator[79] = '\0';
++ memset(&guide, 0, sizeof(struct atsc_virtual_channels_info));
++ memset(guide.eit_pid, 0xFF, MAX_NUM_EVENT_TABLES * sizeof(uint16_t));
++ memset(guide.ett_pid, 0xFF, MAX_NUM_EVENT_TABLES * sizeof(uint16_t));
++
++ if(open_frontend(&fe)) {
++ fprintf(stderr, "%s(): error calling open_frontend()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ if(open_demux(&dmxfd)) {
++ fprintf(stderr, "%s(): error calling open_demux()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ if(parse_stt(dmxfd)) {
++ fprintf(stderr, "%s(): error calling parse_stt()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ if(parse_mgt(dmxfd)) {
++ fprintf(stderr, "%s(): error calling parse_mgt()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ if(parse_tvct(dmxfd)) {
++ fprintf(stderr, "%s(): error calling parse_tvct()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++#ifdef ENABLE_RRT
++ if(parse_rrt(dmxfd)) {
++ fprintf(stderr, "%s(): error calling parse_rrt()\n",
++ __FUNCTION__);
++ return -1;
++ }
++#endif
++
++ fprintf(stdout, "receiving EIT ");
++ for(i = 0; i < guide.ch[0].num_eits; i++) {
++ if(parse_eit(dmxfd, i, guide.eit_pid[i])) {
++ fprintf(stderr, "%s(): error calling parse_eit()\n",
++ __FUNCTION__);
++ return -1;
++ }
++ }
++ fprintf(stdout, "\n");
++
++ old_handler = signal(SIGINT, int_handler);
++ if(enable_ett) {
++ fprintf(stdout, "receiving ETT ");
++ for(i = 0; i < guide.ch[0].num_eits; i++) {
++ if(0xFFFF != guide.ett_pid[i]) {
++ if(parse_ett(dmxfd, i, guide.ett_pid[i])) {
++ fprintf(stderr, "%s(): error calling "
++ "parse_eit()\n", __FUNCTION__);
++ return -1;
++ }
++ }
++ if(ctrl_c) {
++ break;
++ }
++ }
++ fprintf(stdout, "\n");
++ }
++ signal(SIGINT, old_handler);
++
++ if(print_guide()) {
++ fprintf(stderr, "%s(): error calling print_guide()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ if(cleanup_guide()) {
++ fprintf(stderr, "%s(): error calling cleanup_guide()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ if(close_demux(dmxfd)) {
++ fprintf(stderr, "%s(): error calling close_demux()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ if(close_frontend(fe)) {
++ fprintf(stderr, "%s(): error calling close_demux()\n",
++ __FUNCTION__);
++ return -1;
++ }
++
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/atsc_epg/Makefile dvb-apps/util/atsc_epg/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/atsc_epg/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/atsc_epg/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++# Makefile for linuxtv.org dvb-apps/util/atsc_epg
++
++binaries = atsc_epg
++
++inst_bin = $(binaries)
++
++CPPFLAGS += -I../../lib -std=c99 -D_POSIX_SOURCE
++#LDFLAGS += -static -L../../lib/libdvbapi -L../../lib/libucsi
++LDFLAGS += -L../../lib/libdvbapi -L../../lib/libucsi
++LDLIBS += -ldvbapi -lucsi
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/atsc_epg/README dvb-apps/util/atsc_epg/README
+--- linuxtv-dvb-apps-1.1.1/util/atsc_epg/README 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/atsc_epg/README 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++Hi there,
++
++atsc_epg is a small utility for obtaining information such as programs, EPG
++(electronic program guide) from an ATSC channel.
++
++Pulling the detailed information, i.e., option '-t', may take fairly long
++time, or never ending, which is a bug of the PSIP generator. Ctrl+C can be
++used to abort and the received parts will be printed.
++
++Enjoy,
++Yufei
++
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/activy.rcmm dvb-apps/util/av7110_loadkeys/activy.rcmm
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/activy.rcmm 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/activy.rcmm 2009-06-21 13:29:06.000000000 +0200
+@@ -51,4 +51,3 @@
+ 0x31 KEY_STOP
+ 0x20 KEY_NEXT
+ 0x42 KEY_EJECTCD
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/av7110_loadkeys.c dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/av7110_loadkeys.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/av7110_loadkeys.c 2009-06-21 13:29:06.000000000 +0200
+@@ -33,9 +33,10 @@
+ static
+ int parse_keyname (char *pos, char **nend, int limit)
+ {
+- int cmp, index;
++ int cmp, _index;
+ int l = 1;
+- int r = sizeof (key_name) / sizeof (key_name[0]);
++ const struct input_key_name *kn;
++ int r;
+
+ if (limit < 5)
+ return -1;
+@@ -46,7 +47,18 @@
+ limit--;
+ }
+
+- if (pos [0] != 'K' || pos[1] != 'E' || pos[2] != 'Y' || pos[3] != '_')
++ if (pos[3] != '_')
++ return -2;
++
++ if (pos[0] == 'K' && pos[1] == 'E' && pos[2] == 'Y') {
++ kn = key_name;
++ r = sizeof (key_name) / sizeof (key_name[0]);
++ }
++ else if (pos[0] == 'B' && pos[1] == 'T' && pos[2] == 'N') {
++ kn = btn_name;
++ r = sizeof (btn_name) / sizeof (btn_name[0]);
++ }
++ else
+ return -2;
+
+ (*nend) += 4;
+@@ -56,21 +68,21 @@
+ while (r >= l) {
+ int len0, len1 = 0;
+
+- index = (l + r) / 2;
+-
+- len0 = strlen(key_name[index-1].name);
++ _index = (l + r) / 2;
++
++ len0 = strlen(kn[_index-1].name);
+
+ while (len1 < limit && isgraph(pos[len1]))
+ len1++;
+
+- cmp = strncmp (key_name[index-1].name, pos,
+- strlen(key_name[index-1].name));
+-
++ cmp = strncmp (kn[_index-1].name, pos,
++ strlen(kn[_index-1].name));
++
+ if (len0 < len1 && cmp == 0)
+ cmp = -1;
+
+ if (cmp == 0) {
+- *nend = pos + strlen (key_name[index-1].name);
++ *nend = pos + strlen (kn[_index-1].name);
+
+ if (**nend != '\n' &&
+ **nend != '\t' &&
+@@ -78,13 +90,13 @@
+ *nend != pos)
+ return -3;
+
+- return key_name[index-1].key;
++ return kn[_index-1].key;
+ }
+
+ if (cmp < 0)
+- l = index + 1;
++ l = _index + 1;
+ else
+- r = index - 1;
++ r = _index - 1;
+
+ if (r < l) {
+ static const char msg [] = "\nunknown key '";
+@@ -151,18 +163,18 @@
+
+ while (pos < buf + len) {
+ int key, keycode;
+-
++
+ while (!isxdigit(*pos) && pos < buf + len)
+ pos++;
+
+ if (pos == buf + len)
+ break;
+-
++
+ key = strtol (pos, &pos, 0);
+ keycode = parse_keyname (pos, &pos, buf + len - pos);
+
+ if (key < 0 || key > 0xff) {
+- const char msg [] =
++ const char msg [] =
+ "\nERROR: key must be in range 0 ... 0xff!\n\n";
+
+ write (0, msg, strlen(msg));
+@@ -174,7 +186,7 @@
+
+ setup.keytab[key] = keycode;
+ }
+-
++
+ munmap (buf, len);
+ close (fd);
+
+@@ -182,5 +194,3 @@
+
+ return 0;
+ }
+-
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/evtest.c dvb-apps/util/av7110_loadkeys/evtest.c
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/evtest.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/evtest.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,177 +0,0 @@
+-/*
+- * $Id: evtest.c,v 1.1 2004/01/17 16:59:46 js Exp $
+- *
+- * Copyright (c) 1999-2000 Vojtech Pavlik
+- *
+- * Event device test program
+- */
+-
+-/*
+- * 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
+- *
+- * Should you need to contact me, the author, you can do so either by
+- * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
+- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+- */
+-
+-#include <linux/input.h>
+-
+-#include <string.h>
+-#include <fcntl.h>
+-#include <unistd.h>
+-#include <stdio.h>
+-#include <stdlib.h>
+-
+-char *events[EV_MAX + 1] = { "Reset", "Key", "Relative", "Absolute", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+-NULL, NULL, NULL, "LED", "Sound", NULL, "Repeat", "ForceFeedback", NULL, "ForceFeedbackStatus"};
+-char *keys[KEY_MAX + 1] = { "Reserved", "Esc", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "Minus", "Equal", "Backspace",
+-"Tab", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "LeftBrace", "RightBrace", "Enter", "LeftControl", "A", "S", "D", "F", "G",
+-"H", "J", "K", "L", "Semicolon", "Apostrophe", "Grave", "LeftShift", "BackSlash", "Z", "X", "C", "V", "B", "N", "M", "Comma", "Dot",
+-"Slash", "RightShift", "KPAsterisk", "LeftAlt", "Space", "CapsLock", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10",
+-"NumLock", "ScrollLock", "KP7", "KP8", "KP9", "KPMinus", "KP4", "KP5", "KP6", "KPPlus", "KP1", "KP2", "KP3", "KP0", "KPDot", "103rd",
+-"F13", "102nd", "F11", "F12", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "KPEnter", "RightCtrl", "KPSlash", "SysRq",
+-"RightAlt", "LineFeed", "Home", "Up", "PageUp", "Left", "Right", "End", "Down", "PageDown", "Insert", "Delete", "Macro", "Mute",
+-"VolumeDown", "VolumeUp", "Power", "KPEqual", "KPPlusMinus", "Pause", "F21", "F22", "F23", "F24", "KPComma", "LeftMeta", "RightMeta",
+-"Compose", "Stop", "Again", "Props", "Undo", "Front", "Copy", "Open", "Paste", "Find", "Cut", "Help", "Menu", "Calc", "Setup",
+-"Sleep", "WakeUp", "File", "SendFile", "DeleteFile", "X-fer", "Prog1", "Prog2", "WWW", "MSDOS", "Coffee", "Direction",
+-"CycleWindows", "Mail", "Bookmarks", "Computer", "Back", "Forward", "CloseCD", "EjectCD", "EjectCloseCD", "NextSong", "PlayPause",
+-"PreviousSong", "StopCD", "Record", "Rewind", "Phone", "ISOKey", "Config", "HomePage", "Refresh", "Exit", "Move", "Edit", "ScrollUp",
+-"ScrollDown", "KPLeftParenthesis", "KPRightParenthesis",
+-"International1", "International2", "International3", "International4", "International5",
+-"International6", "International7", "International8", "International9",
+-"Language1", "Language2", "Language3", "Language4", "Language5", "Language6", "Language7", "Language8", "Language9",
+-NULL,
+-"PlayCD", "PauseCD", "Prog3", "Prog4", "Suspend", "Close",
+-NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+-NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+-NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+-"Btn0", "Btn1", "Btn2", "Btn3", "Btn4", "Btn5", "Btn6", "Btn7", "Btn8", "Btn9",
+-NULL, NULL, NULL, NULL, NULL, NULL,
+-"LeftBtn", "RightBtn", "MiddleBtn", "SideBtn", "ExtraBtn", "ForwardBtn", "BackBtn",
+-NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+-"Trigger", "ThumbBtn", "ThumbBtn2", "TopBtn", "TopBtn2", "PinkieBtn",
+-"BaseBtn", "BaseBtn2", "BaseBtn3", "BaseBtn4", "BaseBtn5", "BaseBtn6",
+-NULL, NULL, NULL, "BtnDead",
+-"BtnA", "BtnB", "BtnC", "BtnX", "BtnY", "BtnZ", "BtnTL", "BtnTR", "BtnTL2", "BtnTR2", "BtnSelect", "BtnStart", "BtnMode",
+-"BtnThumbL", "BtnThumbR", NULL,
+-"ToolPen", "ToolRubber", "ToolBrush", "ToolPencil", "ToolAirbrush", "ToolFinger", "ToolMouse", "ToolLens", NULL, NULL,
+-"Touch", "Stylus", "Stylus2", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+-"Ok", "Select", "Goto", "Clear", "Power2", "Option", "Info", "Time", "Vendor",
+-"Archive", "Program", "Channel", "Favorites", "EPG", "PVR", "MHP", "Language",
+-"Title", "Subtitle", "Angle", "Zoom", "Mode", "Keyboard", "Screen", "PC", "TV",
+-"TV2", "VCR", "VCR2", "Sat", "Sat2", "CD", "Tape", "Radio", "Tuner", "Player",
+-"Text", "DVD", "Aux", "MP3", "Audio", "Video", "Directory", "List", "Memo",
+-"Calendar", "Red", "Green", "Yellow", "Blue", "ChannelUp", "ChannelDown",
+-"First", "Last", "AB", "Play", "Restart", "Slow", "Shuffle", "FastForward",
+-"Previous", "Next", "Digits", "Teen", "Twen", "Break" };
+-
+-char *absval[5] = { "Value", "Min ", "Max ", "Fuzz ", "Flat " };
+-char *relatives[REL_MAX + 1] = { "X", "Y", "Z", NULL, NULL, NULL, "HWheel", "Dial", "Wheel" };
+-char *absolutes[ABS_MAX + 1] = { "X", "Y", "Z", "Rx", "Ry", "Rz", "Throttle", "Rudder", "Wheel", "Gas", "Brake",
+-NULL, NULL, NULL, NULL, NULL,
+-"Hat0X", "Hat0Y", "Hat1X", "Hat1Y", "Hat2X", "Hat2Y", "Hat3X", "Hat 3Y", "Pressure", "Distance", "XTilt", "YTilt"};
+-char *leds[LED_MAX + 1] = { "NumLock", "CapsLock", "ScrollLock", "Compose", "Kana", "Sleep", "Suspend", "Mute" };
+-char *repeats[REP_MAX + 1] = { "Delay", "Period" };
+-char *sounds[SND_MAX + 1] = { "Bell", "Click" };
+-
+-char **names[EV_MAX + 1] = { events, keys, relatives, absolutes, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+-NULL, NULL, leds, sounds, NULL, repeats, NULL, NULL, NULL };
+-
+-#define BITS_PER_LONG (sizeof(long) * 8)
+-#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
+-#define OFF(x) ((x)%BITS_PER_LONG)
+-#define BIT(x) (1UL<<OFF(x))
+-#define LONG(x) ((x)/BITS_PER_LONG)
+-#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
+-
+-int main (int argc, char **argv)
+-{
+- int fd, rd, i, j, k;
+- struct input_event ev[64];
+- int version;
+- unsigned short id[4];
+- unsigned long bit[EV_MAX][NBITS(KEY_MAX)];
+- char name[256] = "Unknown";
+- int abs[5];
+-
+- if (argc < 2) {
+- printf("Usage: evtest /dev/input/eventX\n");
+- printf("Where X = input device number\n");
+- exit(1);
+- }
+-
+- if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {
+- perror("evtest");
+- exit(1);
+- }
+-
+- if (ioctl(fd, EVIOCGVERSION, &version)) {
+- perror("evtest: can't get version");
+- exit(1);
+- }
+-
+- printf("Input driver version is %d.%d.%d\n",
+- version >> 16, (version >> 8) & 0xff, version & 0xff);
+-
+- ioctl(fd, EVIOCGID, id);
+- printf("Input device ID: bus 0x%x vendor 0x%x product 0x%x version 0x%x\n",
+- id[ID_BUS], id[ID_VENDOR], id[ID_PRODUCT], id[ID_VERSION]);
+-
+- ioctl(fd, EVIOCGNAME(sizeof(name)), name);
+- printf("Input device name: \"%s\"\n", name);
+-
+- memset(bit, 0, sizeof(bit));
+- ioctl(fd, EVIOCGBIT(0, EV_MAX), bit[0]);
+- printf("Supported events:\n");
+-
+- for (i = 0; i < EV_MAX; i++)
+- if (test_bit(i, bit[0])) {
+- printf(" Event type %d (%s)\n", i, events[i] ? events[i] : "?");
+- ioctl(fd, EVIOCGBIT(i, KEY_MAX), bit[i]);
+- for (j = 0; j < KEY_MAX; j++)
+- if (test_bit(j, bit[i])) {
+- printf(" Event code %d (%s)\n", j, names[i] ? (names[i][j] ? names[i][j] : "?") : "?");
+- if (i == EV_ABS) {
+- ioctl(fd, EVIOCGABS(j), abs);
+- for (k = 0; k < 5; k++)
+- if ((k < 3) || abs[k])
+- printf(" %s %6d\n", absval[k], abs[k]);
+- }
+- }
+- }
+-
+-
+- printf("Testing ... (interrupt to exit)\n");
+-
+- while (1) {
+- rd = read(fd, ev, sizeof(struct input_event) * 64);
+-
+- if (rd < (int) sizeof(struct input_event)) {
+- printf("yyy\n");
+- perror("\nevtest: error reading");
+- exit (1);
+- }
+-
+- for (i = 0; i < rd / sizeof(struct input_event); i++)
+- printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\n",
+- ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
+- events[ev[i].type] ? events[ev[i].type] : "?",
+- ev[i].code,
+- names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?",
+- ev[i].value);
+-
+- }
+-}
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/galaxis.rcmm dvb-apps/util/av7110_loadkeys/galaxis.rcmm
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/galaxis.rcmm 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/galaxis.rcmm 2009-06-21 13:29:06.000000000 +0200
+@@ -37,7 +37,7 @@
+ 0x6e KEY_GREEN
+ 0x6f KEY_YELLOW
+ 0x70 KEY_BLUE
+-
++
+ 0x78 KEY_MENU
+ 0x79 KEY_LIST
+ 0xcc KEY_EPG
+@@ -48,4 +48,3 @@
+ 0xc7 KEY_DOWN
+
+ 0xff KEY_VCR
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/generate-keynames.sh dvb-apps/util/av7110_loadkeys/generate-keynames.sh
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/generate-keynames.sh 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/generate-keynames.sh 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,37 @@
++# Makefile helper for linuxtv.org dvb-apps/util/av7110_loadkeys
++
++echo "generate $1..."
++echo "#ifndef INPUT_KEYNAMES_H" > $1
++echo "#define INPUT_KEYNAMES_H" >> $1
++echo >> $1
++echo "#include <linux/input.h>" >> $1
++echo >> $1
++echo "#if !defined(KEY_OK)" >> $1
++echo "#include \"input_fake.h\"" >> $1
++echo "#endif" >> $1
++echo >> $1
++echo >> $1
++echo "struct input_key_name {" >> $1
++echo " const char *name;" >> $1
++echo " int key;" >> $1
++echo "};" >> $1
++echo >> $1
++echo >> $1
++echo "static struct input_key_name key_name [] = {" >> $1
++for x in $(cat /usr/include/linux/input.h input_fake.h | \
++ egrep "#define[ \t]+KEY_" | grep -v KEY_MAX | \
++ cut -f 1 | cut -f 2 -d " " | sort -u) ; do
++ echo " { \"$(echo $x | cut -b 5-)\", $x }," >> $1
++done
++echo "};" >> $1
++echo >> $1
++echo "static struct input_key_name btn_name [] = {" >> $1
++for x in $(cat /usr/include/linux/input.h input_fake.h | \
++ egrep "#define[ \t]+BTN_" | \
++ cut -f 1 | cut -f 2 -d " " | sort -u) ; do
++ echo " { \"$(echo $x | cut -b 5-)\", $x }," >> $1
++done
++echo "};" >> $1
++echo >> $1
++echo "#endif /* INPUT_KEYNAMES_H */" >> $1
++echo >> $1
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge2.rc5 dvb-apps/util/av7110_loadkeys/hauppauge2.rc5
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge2.rc5 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/hauppauge2.rc5 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,40 @@
++0x00 KEY_0
++0x01 KEY_1
++0x02 KEY_2
++0x03 KEY_3
++0x04 KEY_4
++0x05 KEY_5
++0x06 KEY_6
++0x07 KEY_7
++0x08 KEY_8
++0x09 KEY_9
++
++0x10 KEY_VOLUMEUP
++0x11 KEY_VOLUMEDOWN
++0x1e KEY_VENDOR
++
++0x20 KEY_CHANNELUP
++0x21 KEY_CHANNELDOWN
++0x22 KEY_SELECT
++0x26 KEY_CYCLEWINDOWS
++
++0x3d KEY_POWER
++0x3b KEY_GOTO
++0x1f KEY_BACK
++0x0d KEY_MENU
++0x0b KEY_RED
++0x2e KEY_GREEN
++0x38 KEY_YELLOW
++0x25 KEY_OK
++0x29 KEY_BLUE
++0x0f KEY_MUTE
++0x0c KEY_AUX
++0x3c KEY_SCREEN
++0x32 KEY_REWIND
++0x35 KEY_PLAY
++0x34 KEY_FORWARD
++0x37 KEY_RECORD
++0x36 KEY_STOP
++0x30 KEY_PAUSE
++0x24 KEY_LEFT
++0x1e KEY_RIGHT
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge_grey.rc5 dvb-apps/util/av7110_loadkeys/hauppauge_grey.rc5
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge_grey.rc5 2004-02-01 12:50:15.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/hauppauge_grey.rc5 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,3 @@
+-
+ 0x3d KEY_POWER
+ 0x3b KEY_GOTO
+
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge.rc5 dvb-apps/util/av7110_loadkeys/hauppauge.rc5
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/hauppauge.rc5 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/hauppauge.rc5 2009-06-21 13:29:06.000000000 +0200
+@@ -22,4 +22,3 @@
+ 0x22 KEY_SELECT
+ 0x26 KEY_CYCLEWINDOWS
+ 0x2e KEY_SCREEN
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/input_fake.h dvb-apps/util/av7110_loadkeys/input_fake.h
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/input_fake.h 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/input_fake.h 2009-06-21 13:29:06.000000000 +0200
+@@ -7,7 +7,7 @@
+ #if !defined(KEY_OK)
+
+ /**
+- * define some additional remote control keys in case they
++ * define some additional remote control keys in case they
+ * were not already defined above in <linux/input.h>
+ */
+
+@@ -66,19 +66,16 @@
+ #define KEY_FIRST 0x194
+ #define KEY_LAST 0x195
+ #define KEY_AB 0x196
+-#define KEY_PLAY 0x197
++#define KEY_NEXT 0x197
+ #define KEY_RESTART 0x198
+ #define KEY_SLOW 0x199
+ #define KEY_SHUFFLE 0x19a
+-#define KEY_FASTFORWARD 0x19b
++#define KEY_BREAK 0x19b
+ #define KEY_PREVIOUS 0x19c
+-#define KEY_NEXT 0x19d
+-#define KEY_DIGITS 0x19e
+-#define KEY_TEEN 0x19f
+-#define KEY_TWEN 0x1a0
+-#define KEY_BREAK 0x1a1
++#define KEY_DIGITS 0x19d
++#define KEY_TEEN 0x19e
++#define KEY_TWEN 0x19f
+
+
+ #endif /* !defined(KEY_OK) */
+ #endif /* _INPUT_FAKE_H */
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/Makefile dvb-apps/util/av7110_loadkeys/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/Makefile 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,48 +1,23 @@
+-CC = gcc
+-CFLAGS = -g -Wall -O2
+-
+-all: av7110_loadkeys evtest
++# Makefile for linuxtv.org dvb-apps/util/av7110_loadkeys
+
+-av7110_loadkeys: av7110_loadkeys.o
++binaries = av7110_loadkeys
+
+-evtest: evtest.o
++inst_bin = $(binaries)
+
+-av7110_loadkeys.o: av7110_loadkeys.c input_keynames.h
++removing = input_keynames.h
+
+-evtest.o: evtest.c input_keynames.h
++.PHONY: all
+
++all: $(binaries)
+
+-input_keynames.h: /usr/include/linux/input.h input_fake.h
+- @echo 'generate $@...'
+- @echo '#ifndef __INPUT_KEYNAMES_H__' > $@
+- @echo '#define __INPUT_KEYNAMES_H__' >> $@
+- @echo '' >> $@
+- @echo '#include <linux/input.h>' >> $@
+- @echo '' >> $@
+- @echo '#if !defined(KEY_OK)' >> $@
+- @echo '#include "input_fake.h"' >> $@
+- @echo '#endif' >> $@
+- @echo '' >> $@
+- @echo '' >> $@
+- @echo 'struct input_key_name {' >> $@
+- @echo ' const char *name;' >> $@
+- @echo ' int key;' >> $@
+- @echo '};' >> $@
+- @echo '' >> $@
+- @echo '' >> $@
+- @echo 'static struct input_key_name key_name [] = {' >> $@
+- @for x in `cat /usr/include/linux/input.h input_fake.h | \
+- grep KEY_ | grep "#define" | grep -v KEY_MAX | \
+- cut -f 1 | cut -f 2 -d ' ' | sort | uniq` ; do \
+- echo " { \"`echo $$x | cut -b 5-`\", $$x }," >> $@ \
+- ; \
+- done
+- @echo '};' >> $@
+- @echo '' >> $@
+- @echo '#endif /* __INPUT_KEYNAMES_H */' >> $@
+- @echo '' >> $@
++$(binaries): input_keynames.h
+
++input_keynames.h:
++ $(SHELL) generate-keynames.sh $@
+
+-clean:
+- $(RM) core* *.o input_keynames.h av7110_loadkeys evtest
++include ../../Make.rules
+
++install::
++ @echo installing av7110 keymaps
++ @mkdir -p $(DESTDIR)$(sharedir)/dvb/av7110_loadkeys
++ @install -m 644 *.rc5 *.rcmm $(DESTDIR)$(sharedir)/dvb/av7110_loadkeys/
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/philips1358.rc5 dvb-apps/util/av7110_loadkeys/philips1358.rc5
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/philips1358.rc5 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/philips1358.rc5 2009-06-21 13:29:06.000000000 +0200
+@@ -26,12 +26,12 @@
+ 0x2B KEY_PAUSE
+ 0x2C KEY_REWIND
+ 0x2D KEY_F4
+-0x2E KEY_F3
++0x2E KEY_F3
+ 0x32 KEY_YELLOW
+ 0x34 KEY_BLUE
+ 0x36 KEY_GREEN
+ 0x37 KEY_RED
+ 0x38 KEY_AUX
+-0x3C KEY_F2
++0x3C KEY_F2
+ 0x3D KEY_SCREEN
+-0x3F KEY_F1
+\ No newline at end of file
++0x3F KEY_F1
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/README dvb-apps/util/av7110_loadkeys/README
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/README 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/README 2009-06-21 13:29:06.000000000 +0200
+@@ -1,13 +1,13 @@
+ Hi,
+
+-this is a utility to setup IR control keymaps using the /proc/av7110_ir
++this is a utility to setup IR control keymaps using the /proc/av7110_ir
+ interface.
+
+-just call
++just call
+
+ # ./av7110_loadkeys [-i|--invert] [-a|--address <num>] keymapname.(rc5|rcmm) > /proc/av7110_ir
+
+-If your IR receiver hardware inverts the signal, you should use the -i
++If your IR receiver hardware inverts the signal, you should use the -i
+ or --invert command line option.
+
+ If you have two or more devices which use the same IR protocol, you should
+@@ -42,7 +42,7 @@
+
+ ------------------------------------------------------------------------
+
+-In order to write a new keymap you might want to see the raw key
++In order to write a new keymap you might want to see the raw key
+ values in the kernel log. Use
+
+ # insmod dvb-ttpci.o av7110_ir_debug=1
+@@ -52,13 +52,12 @@
+ any messages in your kernel log you should check all electrical connections,
+ the selected protocol (RC5 or RCMM?) and the inversion setting.
+
+-You find a list of all linux input key identifiers in </usr/include/input.h>
++You find a list of all linux input key identifiers in </usr/include/input.h>
+ and "./input_fake.h".
+
+-Please post new keymaps on the linux-dvb mailing list or send them to
++Please post new keymaps on the linux-dvb mailing list or send them to
+ me <holger@convergence.de>.
+
+-have fun!
++have fun!
+
+ Holger
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/technotrend.rc5 dvb-apps/util/av7110_loadkeys/technotrend.rc5
+--- linuxtv-dvb-apps-1.1.1/util/av7110_loadkeys/technotrend.rc5 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/av7110_loadkeys/technotrend.rc5 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,41 @@
++0x22 KEY_EPG
++0x1a KEY_RADIO
++0x19 KEY_TEXT
++
++0x0c KEY_0
++0x03 KEY_1
++0x04 KEY_2
++0x05 KEY_3
++0x06 KEY_4
++0x07 KEY_5
++0x08 KEY_6
++0x09 KEY_7
++0x0a KEY_8
++0x0b KEY_9
++
++0x0d KEY_UP
++0x11 KEY_DOWN
++0x25 KEY_VOLUMEUP
++0x26 KEY_VOLUMEDOWN
++
++0x23 KEY_CHANNELUP
++0x24 KEY_CHANNELDOWN
++
++0x01 KEY_POWER
++0x13 KEY_BACK
++0x02 KEY_MENU
++0x14 KEY_RED
++0x15 KEY_GREEN
++0x16 KEY_YELLOW
++0x0f KEY_OK
++0x17 KEY_BLUE
++0x18 KEY_MUTE
++0x3d KEY_REWIND
++0x3b KEY_PLAY
++0x3f KEY_FORWARD
++0x3a KEY_RECORD
++0x3c KEY_STOP
++0x3e KEY_PAUSE
++0x0e KEY_LEFT
++0x10 KEY_RIGHT
++0x12 KEY_INFO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000.h dvb-apps/util/dib3000-watch/dib3000.h
+--- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dib3000-watch/dib3000.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,56 @@
++#ifndef __DIB3000_H__
++#define __DIB3000_H__
++
++/* most of this is taken from dib3000-common.h, dib3000mc_priv.h and dib3000mb_priv.h */
++
++#define DIB3000_REG_MANUFACTOR_ID ( 1025)
++#define DIB3000_I2C_ID_DIBCOM (0x01b3)
++
++#define DIB3000_REG_DEVICE_ID ( 1026)
++#define DIB3000MB_DEVICE_ID (0x3000)
++#define DIB3000MC_DEVICE_ID (0x3001)
++#define DIB3000P_DEVICE_ID (0x3002)
++
++/* dib3000mb_priv.h */
++
++#define DIB3000MB_REG_DDS_INV ( 5)
++#define DIB3000MB_REG_AGC_LOCK ( 324)
++#define DIB3000MB_REG_CARRIER_LOCK ( 355)
++#define DIB3000MB_REG_TPS_LOCK ( 394)
++#define DIB3000MB_REG_VIT_LCK ( 421)
++#define DIB3000MB_REG_TS_SYNC_LOCK ( 423)
++#define DIB3000MB_REG_TS_RS_LOCK ( 424)
++
++#define DIB3000MB_REG_DDS_FREQ_MSB ( 6)
++#define DIB3000MB_REG_DDS_FREQ_LSB ( 7)
++#define DIB3000MB_REG_DDS_VALUE_MSB ( 339)
++#define DIB3000MB_REG_DDS_VALUE_LSB ( 340)
++
++#define DIB3000MB_REG_BER_MSB ( 414)
++#define DIB3000MB_REG_BER_LSB ( 415)
++#define DIB3000MB_REG_PACKET_ERROR_RATE ( 417)
++#define DIB3000MB_REG_UNC ( 420)
++
++#define DIB3000MB_REG_FFT_WINDOW_POS ( 353)
++#define DIB3000MB_REG_TPS_FFT ( 404)
++
++#define DIB3000MB_REG_NOISE_POWER_MSB ( 372)
++#define DIB3000MB_REG_NOISE_POWER_LSB ( 373)
++
++#define DIB3000MB_REG_SIGNAL_POWER ( 380)
++
++#define DIB3000MB_REG_MER_MSB ( 381)
++#define DIB3000MB_REG_MER_LSB ( 382)
++
++#define DIB3000MB_REG_AGC_POWER ( 325)
++#define DIB3000MB_REG_RF_POWER ( 328)
++
++#define DIB3000MB_REG_TIMING_OFFSET_MSB ( 341)
++#define DIB3000MB_REG_TIMING_OFFSET_LSB ( 342)
++
++#define DEF_agc_ref_dB -14
++#define DEF_gain_slope_dB 100
++#define DEF_gain_delta_dB -2
++#define DEF_SampFreq_KHz 27700
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000-watch.c dvb-apps/util/dib3000-watch/dib3000-watch.c
+--- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000-watch.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dib3000-watch/dib3000-watch.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,296 @@
++/*
++ * Tool for watching the dib3000*-demodulators,
++ * with an extended output.
++ *
++ * Copyright (C) 2005 by Patrick Boettcher <patrick.boettcher@desy.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
++ */
++#include <stdio.h>
++#include <string.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <ctype.h>
++
++#include <getopt.h>
++
++#include <signal.h>
++
++#include <math.h>
++
++#include <fcntl.h>
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <sys/ioctl.h>
++
++#include <linux/types.h>
++
++#include "dib-i2c.h"
++#include "dib3000-watch.h"
++#include "dib3000.h"
++
++void usage (void)
++{
++ verb("usage: dib3000-watch -d <i2c-device> -a <i2c-address> [-o <type>] [-i <seconds>]\n"
++ " -d normally one of /dev/i2c-[0-255]\n"
++ " -a is 8 for DiB3000M-B and 9, 10, 11 or 12 for DiB3000M-C or DiB3000-P\n"
++ " -o output type (print|csv) (default: print)\n"
++ " -i query interval in seconds (default: 0.1)\n"
++ "\n"
++ "Don't forget to run tzap or any other dvb-tune program (vdr, kaxtv) in order to tune a channel,\n"
++ "tuning isn't done by this tool.\n"
++ "\n"
++ "A lot of thing have been taken for the dibusb, dib3000m[bc] driver from kernel and\n"
++ "from t_demod-test software created by DiBcom. Both is GPL, so is dib-demod-watch.\n"
++ "\n"
++ "Copyright (C) 2005 by Patrick Boettcher <patrick.boettcher@desy.de>\n"
++ "\n"
++ "The source of this tool is released under the GPL.\n"
++ );
++ exit(1);
++}
++
++__u16 dib_read_reg(struct dib_demod *dib,__u16 reg)
++{
++ int ret;
++ __u8 wb[] = { ((reg >> 8) | 0x80) & 0xff, reg & 0xff };
++ __u8 rb[2];
++ struct i2c_msg msg[] = {
++ { .addr = dib->i2c_addr, .flags = 0, .buf = wb, .len = 2 },
++ { .addr = dib->i2c_addr, .flags = I2C_M_RD, .buf = rb, .len = 2 },
++ };
++ struct i2c_rdwr_ioctl_data i2c_data = {
++ .msgs = msg,
++ .nmsgs = 2,
++ };
++
++ if ((ret = ioctl(dib->fd,I2C_RDWR,&i2c_data)) != 2) {
++ err("i2c_rdwr read failed. (%d)\n",ret);
++ return 0;
++ }
++ return (rb[0] << 8)| rb[1];
++};
++
++int dib_write_reg(struct dib_demod *dib, __u16 reg, __u16 val)
++{
++ int ret;
++ __u8 b[] = {
++ (reg >> 8) & 0xff, reg & 0xff,
++ (val >> 8) & 0xff, val & 0xff,
++ };
++ struct i2c_msg msg[] = {
++ { .addr = dib->i2c_addr, .flags = 0, .buf = b, .len = 4 }
++ };
++ struct i2c_rdwr_ioctl_data i2c_data = {
++ .msgs = msg,
++ .nmsgs = 1,
++ };
++
++ if ((ret = ioctl(dib->fd,I2C_RDWR,&i2c_data)) != 1) {
++ err("i2c_rdwr write failed. (%d)\n",ret);
++ return -1;
++ }
++ return 0;
++}
++
++int dib3000mb_monitoring(struct dib_demod *dib,struct dib3000mb_monitoring *m)
++{
++ int dds_freq, p_dds_freq,
++ n_agc_power = dib_read_reg(dib,DIB3000MB_REG_AGC_POWER),
++ rf_power = dib_read_reg(dib,DIB3000MB_REG_RF_POWER),
++ timing_offset;
++ double ad_power_dB, minor_power;
++
++ m->invspec = dib_read_reg(dib,DIB3000MB_REG_DDS_INV);
++ m->nfft = dib_read_reg(dib,DIB3000MB_REG_TPS_FFT);
++
++ m->agc_lock = dib_read_reg(dib,DIB3000MB_REG_AGC_LOCK);
++ m->carrier_lock = dib_read_reg(dib,DIB3000MB_REG_CARRIER_LOCK);
++ m->tps_lock = dib_read_reg(dib,DIB3000MB_REG_TPS_LOCK);
++ m->vit_lock = dib_read_reg(dib,DIB3000MB_REG_VIT_LCK);
++ m->ts_sync_lock = dib_read_reg(dib,DIB3000MB_REG_TS_SYNC_LOCK);
++ m->ts_data_lock = dib_read_reg(dib,DIB3000MB_REG_TS_RS_LOCK);
++
++ p_dds_freq = ((dib_read_reg(dib,DIB3000MB_REG_DDS_FREQ_MSB) & 0xff) << 8) |
++ ((dib_read_reg(dib,DIB3000MB_REG_DDS_FREQ_LSB) & 0xff00) >> 8);
++ dds_freq = ((dib_read_reg(dib,DIB3000MB_REG_DDS_VALUE_MSB) & 0xff) << 8) |
++ ((dib_read_reg(dib,DIB3000MB_REG_DDS_VALUE_LSB) & 0xff00) >> 8);
++ if (m->invspec)
++ dds_freq = (1 << 16) - dds_freq;
++ m->carrier_offset = (double)(dds_freq - p_dds_freq) / (double)(1 << 16) * DEF_SampFreq_KHz;
++
++ m->ber = (double)((dib_read_reg(dib,DIB3000MB_REG_BER_MSB) << 16) | dib_read_reg(dib,DIB3000MB_REG_BER_LSB)) / (double) 1e8;
++ m->per = dib_read_reg(dib,DIB3000MB_REG_PACKET_ERROR_RATE);
++ m->unc = dib_read_reg(dib,DIB3000MB_REG_UNC);
++ m->fft_pos = dib_read_reg(dib,DIB3000MB_REG_FFT_WINDOW_POS);
++ m->snr = 10.0 * log10( (double)(dib_read_reg(dib,DIB3000MB_REG_SIGNAL_POWER) << 8) /
++ (double)((dib_read_reg(dib,DIB3000MB_REG_NOISE_POWER_MSB) << 16) + dib_read_reg(dib,DIB3000MB_REG_NOISE_POWER_LSB)));
++
++ m->mer = (double) ((dib_read_reg(dib,DIB3000MB_REG_MER_MSB) << 16) + dib_read_reg(dib,DIB3000MB_REG_MER_LSB))
++ / (double) (1<<9) / (m->nfft ? 767.0 : 191.0);
++
++ if (n_agc_power == 0)
++ n_agc_power = 1;
++ ad_power_dB = 10 * log10( (double)(n_agc_power) / (double)(1<<16));
++ minor_power = ad_power_dB - DEF_agc_ref_dB ;
++ m->rf_power = -DEF_gain_slope_dB * (double)rf_power/(double)(1<<16) + DEF_gain_delta_dB + minor_power;
++
++ timing_offset =
++ (dib_read_reg(dib,DIB3000MB_REG_TIMING_OFFSET_MSB) << 16) + dib_read_reg(dib,DIB3000MB_REG_TIMING_OFFSET_LSB);
++ if (timing_offset >= 0x800000)
++ timing_offset |= 0xff000000;
++ m->timing_offset_ppm = -(double)timing_offset / (double)(m->nfft ? 8192 : 2048) * 1e6 / (double)(1<<20);
++
++ return 0;
++}
++
++int dib3000mb_print_monitoring(struct dib3000mb_monitoring *m)
++{
++ printf("DiB3000M-B status\n\n");
++ printf(" AGC lock: %10d\n",m->agc_lock);
++ printf(" carrier lock: %10d\n",m->carrier_lock);
++ printf(" TPS synchronize lock: %10d\n",m->tps_lock);
++ printf(" Viterbi lock: %10d\n",m->vit_lock);
++ printf(" MPEG TS synchronize lock: %10d\n",m->ts_sync_lock);
++ printf(" MPEG TS data lock: %10d\n",m->ts_data_lock);
++ printf("\n\n");
++ printf(" spectrum inversion: %10d\n",m->invspec);
++ printf(" carrier offset: %3.7g\n",m->carrier_offset);
++ printf("\n\n");
++ printf(" bit error rate: %3.7g\n",m->ber);
++ printf(" packet error rate: %10d\n",m->per);
++ printf(" packet error count: %10d\n",m->unc);
++ printf("\n\n");
++ printf(" fft position: %10d\n",m->fft_pos);
++ printf(" transmission mode: %10s\n",m->nfft ? "8k" : "2k");
++ printf("\n\n");
++ printf(" C / (N + I) = %3.7g\n",m->snr);
++ printf(" MER = %3.7g dB\n",m->mer);
++ printf(" RF power = %3.7g dBm\n",m->rf_power);
++ printf(" timing offset = %3.7g ppm\n",m->timing_offset_ppm);
++ return 0;
++}
++
++int interrupted;
++
++void sighandler (int sig)
++{
++ (void)sig;
++ interrupted = 1;
++}
++
++typedef enum {
++ OUT_PRINT = 0,
++ OUT_CSV,
++} dib3000m_output_t;
++
++int main (int argc, char * const argv[])
++{
++ struct dib_demod dib;
++ struct dib3000mb_monitoring mon;
++ const char *dev = NULL;
++ float intervall = 0.1;
++ dib3000m_output_t out = OUT_PRINT;
++ int c;
++
++ while ((c = getopt(argc,argv,"d:a:o:i:")) != -1) {
++ switch (c) {
++ case 'd':
++ dev = optarg;
++ break;
++ case 'a':
++ dib.i2c_addr = atoi(optarg); /* The I2C address */
++ break;
++ case 'o':
++ if (strcasecmp(optarg,"print") == 0) out = OUT_PRINT;
++ else if (strcasecmp(optarg,"csv") == 0) out = OUT_CSV;
++ else usage();
++ break;
++ case 'i':
++ intervall = atof(optarg);
++ break;
++ default:
++ usage();
++ }
++ }
++
++ if (dev == NULL)
++ usage();
++
++ interrupted = 0;
++ signal(SIGINT, sighandler);
++ signal(SIGKILL, sighandler);
++ signal(SIGHUP, sighandler);
++
++ verb("will use '%s' as i2c-device and %d as i2c address.\n",dev,dib.i2c_addr);
++
++ if ((dib.fd = open(dev,O_RDWR)) < 0) {
++ err("could not open %s\n",dev);
++ exit(1);
++ }
++
++ if (ioctl(dib.fd,I2C_SLAVE,dib.i2c_addr) < 0) {
++ err("could not set i2c address\n");
++ exit(1);
++ }
++
++ if (dib_read_reg(&dib,DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM) {
++ err("could not find a dib3000 demodulator at i2c-address %d\n",dib.i2c_addr);
++ exit(1);
++ }
++
++ switch (dib_read_reg(&dib,DIB3000_REG_DEVICE_ID)) {
++ case DIB3000MB_DEVICE_ID:
++ verb("found a DiB3000M-B demodulator.\n");
++ dib.rev = DIB3000MB;
++ break;
++ case DIB3000MC_DEVICE_ID:
++ verb("found a DiB3000M-C demodulator.\n");
++ dib.rev = DIB3000MC;
++ break;
++ case DIB3000P_DEVICE_ID:
++ verb("found a DiB3000-P demodulator.\n");
++ dib.rev = DIB3000P;
++ break;
++ default:
++ err("unsupported demodulator found.\n");
++ }
++
++ while (!interrupted) {
++ switch (dib.rev) {
++ case DIB3000MB:
++ dib3000mb_monitoring(&dib,&mon);
++ if (out == OUT_PRINT) {
++ printf("\E[H\E[2J");
++ dib3000mb_print_monitoring(&mon);
++ } else if (out == OUT_CSV) {
++ printf("no csv output implemented yet.\n");
++ }
++ break;
++ default:
++ interrupted=1;
++ err("no monitoring writting for this demod, yet.\n");
++ }
++ usleep((int) (intervall * 1000000));
++ }
++
++ close(dib.fd);
++
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000-watch.h dvb-apps/util/dib3000-watch/dib3000-watch.h
+--- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib3000-watch.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dib3000-watch/dib3000-watch.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,46 @@
++#ifndef __DIB_DEMOD_WATCH__
++#define __DIB_DEMOD_WATCH__
++
++#define err(args...) fprintf(stderr,"error '%s': ",strerror(errno)); fprintf(stderr,args)
++#define verb(args...) fprintf(stderr,args)
++
++typedef enum {
++ DIB3000MB = 0,
++ DIB3000MC,
++ DIB3000P,
++} dib_demod_t;
++
++
++struct dib_demod {
++ int fd;
++ __u8 i2c_addr;
++
++ dib_demod_t rev;
++};
++
++struct dib3000mb_monitoring {
++ int agc_lock;
++ int carrier_lock;
++ int tps_lock;
++ int vit_lock;
++ int ts_sync_lock;
++ int ts_data_lock;
++
++ int invspec;
++
++ int per;
++ int unc;
++
++ int fft_pos;
++
++ int nfft;
++
++ double carrier_offset;
++ double ber;
++ double snr;
++ double mer;
++ double rf_power;
++ double timing_offset_ppm;
++};
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib-i2c.h dvb-apps/util/dib3000-watch/dib-i2c.h
+--- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/dib-i2c.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dib3000-watch/dib-i2c.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,43 @@
++/*
++ * adapted from different kernel headers
++ * "this is the current way of doing things."-Greg K-H
++ *
++ * everything copied from linux kernel 2.6.10 source
++ */
++
++#ifndef _DIB_I2C_H
++#define _DIB_I2C_H
++
++
++/* from <linux/i2c.h> */
++#define I2C_SLAVE 0x0703
++#define I2C_SLAVE_FORCE 0x0706
++#define I2C_TENBIT 0x0704
++#define I2C_PEC 0x0708
++#define I2C_RETRIES 0x0701
++#define I2C_TIMEOUT 0x0702
++
++#define I2C_FUNCS 0x0705
++#define I2C_RDWR 0x0707
++#define I2C_SMBUS 0x0720
++
++struct i2c_msg {
++ __u16 addr;
++ __u16 flags;
++#define I2C_M_RD 0x0001
++#define I2C_M_TEN 0x0010
++#define I2C_M_NOSTART 0x4000
++#define I2C_M_REV_DIR_ADDR 0x2000
++#define I2C_M_IGNORE_NAK 0x1000
++#define I2C_M_NO_RD_ACK 0x0800
++ __u16 len;
++ __u8 *buf;
++};
++
++/* from <linux/i2c-dev.h> */
++struct i2c_rdwr_ioctl_data {
++ struct i2c_msg *msgs;
++ __u32 nmsgs;
++};
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/Makefile dvb-apps/util/dib3000-watch/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dib3000-watch/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# Makefile for linuxtv.org dvb-apps/util/dib3000-watch
++
++binaries = dib3000-watch
++
++inst_bin = $(binaries)
++
++LDLIBS += -lm
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/make-i2c-dev dvb-apps/util/dib3000-watch/make-i2c-dev
+--- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/make-i2c-dev 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dib3000-watch/make-i2c-dev 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++for i in `seq 0 10`;
++do
++ mknod /dev/i2c-$i c 89 $i
++ chown root.video /dev/i2c-$i
++ chmod 664 /dev/i2c-$i
++done
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dib3000-watch/README.dib3000-watch dvb-apps/util/dib3000-watch/README.dib3000-watch
+--- linuxtv-dvb-apps-1.1.1/util/dib3000-watch/README.dib3000-watch 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dib3000-watch/README.dib3000-watch 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,29 @@
++This is a small tool for gathering and evaluating more reception-related data
++from the dib3000-demodulators, than the DVB-API currently makes use of.
++
++It uses the i2c-dev-interface. In order to use it, you have to enable i2c-dev
++in your kernel. The module i2c-dev is loaded automatically, when you want to
++access the /dev/i2c-*-node.
++
++If your distribution hasn't create the /dev/i2c-*-nodes you can use the
++make-i2c-dev-script located its source directory.
++
++It is not yet completed, but works fine for all dib3000mb-demods (all of the
++USB1.1 dibusb-devices are equipped with it).
++Having a CSV output would certainly be useful, when you want to make range
++tests by driving around with your car and check the signal. Nevertheless,
++this isn't written yet, but should be easy-going. Each line then should
++have an timestamp.
++
++I cannot guarantee for the values this program calculates, I'm not a signal
++expert, thus I don't know if they are correct.
++
++Thanks to Amaury Demol from DiBcom, who provides source for showing me how to
++calculate frequencies from the demod values.
++
++Patrick Boettcher <patrick.boettcher@desy.de>
++
++PS: Please feel free to modify the source to fullfil your wishes. But please
++remember, it is released under the GPL, thus please send back patches to the
++author or to the linux-dvb mailing list, so other users can have benefit from
++it.
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dst-utils/dst_test.c dvb-apps/util/dst-utils/dst_test.c
+--- linuxtv-dvb-apps-1.1.1/util/dst-utils/dst_test.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dst-utils/dst_test.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,258 @@
++/*
++ DST-TEST utility
++ an implementation for the High Level Common Interface
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <sys/ioctl.h>
++#include <errno.h>
++#include <stdint.h>
++
++#include <linux/dvb/dmx.h>
++#include <linux/dvb/ca.h>
++#include <libdvben50221/en50221_app_tags.h>
++
++#define CA_NODE "/dev/dvb/adapter0/ca0"
++
++static int dst_comms(int cafd, uint32_t tag, uint32_t function, struct ca_msg *msg)
++{
++ if (tag) {
++ msg->msg[2] = tag & 0xff;
++ msg->msg[1] = (tag & 0xff00) >> 8;
++ msg->msg[0] = (tag & 0xff0000) >> 16;
++
++ printf("%s: Msg=[%02x %02x %02x ]\n",__FUNCTION__, msg->msg[0], msg->msg[1], msg->msg[2]);
++ }
++
++ if ((ioctl(cafd, function, msg)) < 0) {
++ printf("%s: ioctl failed ..\n", __FUNCTION__);
++ return -1;
++ }
++
++ return 0;
++}
++
++
++static int dst_get_caps(int cafd, struct ca_caps *caps)
++{
++ if ((ioctl(cafd, CA_GET_CAP, caps)) < 0) {
++ printf("%s: ioctl failed ..\n", __FUNCTION__);
++ return -1;
++ }
++
++ if (caps->slot_num < 1) {
++ printf ("No CI Slots found\n");
++ return -1;
++ }
++
++ printf("APP: Slots=[%d]\n", caps->slot_num);
++ printf("APP: Type=[%d]\n", caps->slot_type);
++ printf("APP: Descrambler keys=[%d]\n", caps->descr_num);
++ printf("APP: Type=[%d]\n", caps->descr_type);
++
++ return 0;
++}
++
++static int dst_get_info(int cafd, struct ca_slot_info *info)
++{
++ if ((ioctl(cafd, CA_GET_SLOT_INFO, info)) < 0) {
++ printf("%s: ioctl failed ..\n", __FUNCTION__);
++ return -1;
++ }
++ if (info->num < 1) {
++ printf("No CI Slots found\n");
++ return -1;
++ }
++ printf("APP: Number=[%d]\n", info->num);
++ printf("APP: Type=[%d]\n", info->type);
++ printf("APP: flags=[%d]\n", info->flags);
++
++ if (info->flags == 1)
++ printf("APP: CI High level interface\n");
++ if (info->flags == 1)
++ printf("APP: CA/CI Module Present\n");
++ else if (info->flags == 2)
++ printf("APP: CA/CI Module Ready\n");
++ else if (info->flags == 0)
++ printf("APP: No CA/CI Module\n");
++
++ return 0;
++}
++
++static int dst_reset(int cafd)
++{
++ if ((ioctl(cafd, CA_RESET)) < 0) {
++ printf("%s: ioctl failed ..\n", __FUNCTION__);
++ return -1;
++ }
++
++ return 0;
++}
++
++static int dst_set_pid(int cafd)
++{
++ if ((ioctl(cafd, CA_SET_PID)) < 0) {
++ printf("%s: ioctl failed ..\n", __FUNCTION__);
++ return -1;
++ }
++
++ return 0;
++}
++
++static int dst_get_descr(int cafd)
++{
++ if ((ioctl(cafd, CA_GET_DESCR_INFO)) < 0) {
++ printf("%s: ioctl failed ..\n", __FUNCTION__);
++ return -1;
++ }
++
++ return 0;
++}
++
++static int dst_set_descr(int cafd)
++{
++ if ((ioctl(cafd, CA_SET_DESCR)) < 0) {
++ printf("%s: ioctl failed ..\n", __FUNCTION__);
++ return -1;
++ }
++ return 0;
++}
++
++static int dst_get_app_info(int cafd, struct ca_msg *msg)
++{
++ uint32_t tag = 0;
++
++ /* Enquire */
++ tag = TAG_CA_INFO_ENQUIRY;
++ if ((dst_comms(cafd, tag, CA_SEND_MSG, msg)) < 0) {
++ printf("%s: Dst communication failed\n", __FUNCTION__);
++ return -1;
++ }
++
++ /* Receive */
++ tag = TAG_CA_INFO;
++ if ((dst_comms(cafd, tag, CA_GET_MSG, msg)) < 0) {
++ printf("%s: Dst communication failed\n", __FUNCTION__);
++ return -1;
++ }
++
++ /* Process */
++ printf("%s: ================================ CI Module Application Info ======================================\n", __FUNCTION__);
++ printf("%s: Application Type=[%d], Application Vendor=[%d], Vendor Code=[%d]\n%s: Application info=[%s]\n",
++ __FUNCTION__, msg->msg[7], (msg->msg[8] << 8) | msg->msg[9], (msg->msg[10] << 8) | msg->msg[11], __FUNCTION__,
++ ((char *) (&msg->msg[12])));
++ printf("%s: ==================================================================================================\n", __FUNCTION__);
++
++ return 0;
++}
++
++static int dst_session_test(int cafd, struct ca_msg *msg)
++{
++ msg->msg[0] = 0x91;
++ printf("Debugging open session request\n");
++ if ((ioctl(cafd, CA_SEND_MSG, msg)) < 0) {
++ printf("%s: ioctl failed ..\n", __FUNCTION__);
++ return -1;
++ }
++
++ return 0;
++}
++
++
++int main(int argc, char *argv[])
++{
++ int cafd;
++ const char *usage = " DST-TEST: Twinhan DST and clones test utility\n"
++ " an implementation for the High Level Common Interface\n"
++ " Copyright (C) 2004, 2005 Manu Abraham (manu@kromtek.com)\n\n"
++ "\t dst_test options:\n"
++ "\t -c capabilities\n"
++ "\t -i info\n"
++ "\t -r reset\n"
++ "\t -p pid\n"
++ "\t -g get descr\n"
++ "\t -s set_descr\n"
++ "\t -a app_info\n"
++ "\t -t session test\n";
++
++
++ struct ca_caps *caps;
++ caps = (struct ca_caps *) malloc(sizeof (struct ca_caps));
++
++ struct ca_slot_info *info;
++ info = (struct ca_slot_info *)malloc (sizeof (struct ca_slot_info));
++
++ struct ca_msg *msg;
++ msg = (struct ca_msg *) malloc(sizeof (struct ca_msg));
++
++ if (argc < 2)
++ printf("%s\n", usage);
++
++ if (argc > 1) {
++ if ((cafd = open(CA_NODE, O_RDONLY)) < 0) {
++ printf("%s: Error opening %s\n", __FUNCTION__, CA_NODE);
++ return -1;
++ }
++
++ switch (getopt(argc, argv, "cirpgsat")) {
++ case 'c':
++ printf("%s: Capabilities\n", __FUNCTION__);
++ dst_get_caps(cafd, caps);
++ break;
++ case 'i':
++ printf("%s: Info\n", __FUNCTION__);
++ dst_get_info(cafd, info);
++ break;
++ case 'r':
++ printf("%s: Reset\n", __FUNCTION__);
++ dst_reset(cafd);
++ break;
++ case 'p':
++ printf("%s: PID\n", __FUNCTION__);
++ dst_set_pid(cafd);
++ break;
++ case 'g':
++ printf("%s: Get Desc\n", __FUNCTION__);
++ dst_get_descr(cafd);
++ break;
++ case 's':
++ printf("%s: Set Desc\n", __FUNCTION__);
++ dst_set_descr(cafd);
++ break;
++ case 'a':
++ printf("%s: App Info\n", __FUNCTION__);
++ dst_get_app_info(cafd, msg);
++ break;
++ case 't':
++ printf("%s: Session test\n", __FUNCTION__);
++ dst_session_test(cafd, msg);
++ break;
++
++ break;
++ }
++ close(cafd);
++ }
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dst-utils/Makefile dvb-apps/util/dst-utils/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/dst-utils/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dst-utils/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# Makefile for linuxtv.org dvb-apps/util/dst-utils
++
++binaries = dst_test
++
++inst_bin = $(binaries)
++
++CPPFLAGS += -I../../lib
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbdate/dvbdate.c dvb-apps/util/dvbdate/dvbdate.c
+--- linuxtv-dvb-apps-1.1.1/util/dvbdate/dvbdate.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/dvbdate/dvbdate.c 2009-06-21 13:29:06.000000000 +0200
+@@ -8,7 +8,10 @@
+
+ Revamped by Johannes Stezenbach <js@convergence.de>
+ and Michael Hunold <hunold@convergence.de>
+-
++
++ Ported to use the standard dvb libraries and add ATSC STT
++ support Andrew de Quincey <adq_dvb@lidskialf.net>
++
+ 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
+@@ -40,10 +43,10 @@
+ #include <errno.h>
+ #include <getopt.h>
+ #include <stdarg.h>
+-
+-#include <linux/dvb/dmx.h>
+-
+-#define bcdtoint(i) ((((i & 0xf0) >> 4) * 10) + (i & 0x0f))
++#include <libdvbapi/dvbfe.h>
++#include <libdvbapi/dvbdemux.h>
++#include <libucsi/dvb/section.h>
++#include <libucsi/atsc/section.h>
+
+ /* How many seconds can the system clock be out before we get warned? */
+ #define ALLOWABLE_DELTA 30*60
+@@ -54,6 +57,7 @@
+ int do_force;
+ int do_quiet;
+ int timeout = 25;
++int adapter = 0;
+
+ void errmsg(char *message, ...)
+ {
+@@ -65,15 +69,24 @@
+ va_end(ap);
+ }
+
+-void usage()
++void usage(void)
+ {
+- fprintf(stderr, "usage: %s [-p] [-s] [-f] [-q] [-h]\n", ProgName);
++ fprintf(stderr, "usage: %s [-a] [-p] [-s] [-f] [-q] [-h]\n", ProgName);
+ _exit(1);
+ }
+
+-void help()
++void help(void)
+ {
+- fprintf(stderr, "\nhelp:\n" "%s [-p] [-s] [-f] [-q] [-h] [-t n]\n" " --print (print current time, TDT time and delta)\n" " --set (set the system clock to TDT time)\n" " --force (force the setting of the clock)\n" " --quiet (be silent)\n" " --help (display this message)\n"" --timout n (max seconds to wait, default: 25)\n", ProgName);
++ fprintf(stderr,
++ "\nhelp:\n"
++ "%s [-a] [-p] [-s] [-f] [-q] [-h] [-t n]\n"
++ " --adapter (adapter to use, default: 0)\n"
++ " --print (print current time, received time and delta)\n"
++ " --set (set the system clock to received time)\n"
++ " --force (force the setting of the clock)\n"
++ " --quiet (be silent)\n"
++ " --help (display this message)\n"
++ " --timeout n (max seconds to wait, default: 25)\n", ProgName);
+ _exit(1);
+ }
+
+@@ -86,13 +99,14 @@
+ {"quiet", 0, 0, 'q'},
+ {"help", 0, 0, 'h'},
+ {"timeout", 1, 0, 't'},
++ {"adapter", 1, 0, 'a'},
+ {0, 0, 0, 0}
+ };
+ int c;
+ int Option_Index = 0;
+
+ while (1) {
+- c = getopt_long(arg_count, arg_strings, "psfqht:", Long_Options, &Option_Index);
++ c = getopt_long(arg_count, arg_strings, "a:psfqht:", Long_Options, &Option_Index);
+ if (c == EOF)
+ break;
+ switch (c) {
+@@ -103,6 +117,9 @@
+ usage();
+ }
+ break;
++ case 'a':
++ adapter = atoi(optarg);
++ break;
+ case 'p':
+ do_print = 1;
+ break;
+@@ -134,7 +151,8 @@
+ case 2: /* Force */
+ case 3: /* Quiet */
+ case 4: /* Help */
+- case 5: /* timout */
++ case 5: /* timeout */
++ case 6: /* adapter */
+ break;
+ default:
+ fprintf(stderr, "%s: unknown long option %d\n", ProgName, Option_Index);
+@@ -153,125 +171,135 @@
+ }
+
+ /*
+- * return the TDT time in UNIX time_t format
++ * Get the next UTC date packet from the TDT section
+ */
+-
+-time_t convert_date(char *dvb_buf)
++int dvb_scan_date(time_t *rx_time, unsigned int to)
+ {
+- int i;
+- int year, month, day, hour, min, sec;
+- long int mjd;
+- struct tm dvb_time;
++ int tdt_fd;
++ uint8_t filter[18];
++ uint8_t mask[18];
++ unsigned char sibuf[4096];
++ int size;
+
+- mjd = (dvb_buf[0] & 0xff) << 8;
+- mjd += (dvb_buf[1] & 0xff);
+- hour = bcdtoint(dvb_buf[2] & 0xff);
+- min = bcdtoint(dvb_buf[3] & 0xff);
+- sec = bcdtoint(dvb_buf[4] & 0xff);
+-/*
+- * Use the routine specified in ETSI EN 300 468 V1.4.1,
+- * "Specification for Service Information in Digital Video Broadcasting"
+- * to convert from Modified Julian Date to Year, Month, Day.
+- */
+- year = (int) ((mjd - 15078.2) / 365.25);
+- month = (int) ((mjd - 14956.1 - (int) (year * 365.25)) / 30.6001);
+- day = mjd - 14956 - (int) (year * 365.25) - (int) (month * 30.6001);
+- if (month == 14 || month == 15)
+- i = 1;
+- else
+- i = 0;
+- year += i;
+- month = month - 1 - i * 12;
++ // open the demuxer
++ if ((tdt_fd = dvbdemux_open_demux(adapter, 0, 0)) < 0) {
++ return -1;
++ }
+
+- dvb_time.tm_sec = sec;
+- dvb_time.tm_min = min;
+- dvb_time.tm_hour = hour;
+- dvb_time.tm_mday = day;
+- dvb_time.tm_mon = month - 1;
+- dvb_time.tm_year = year;
+- dvb_time.tm_isdst = -1;
+- dvb_time.tm_wday = 0;
+- dvb_time.tm_yday = 0;
+- return (timegm(&dvb_time));
++ // create a section filter for the TDT
++ memset(filter, 0, sizeof(filter));
++ memset(mask, 0, sizeof(mask));
++ filter[0] = stag_dvb_time_date;
++ mask[0] = 0xFF;
++ if (dvbdemux_set_section_filter(tdt_fd, TRANSPORT_TDT_PID, filter, mask, 1, 1)) {
++ close(tdt_fd);
++ return -1;
++ }
++
++ // poll for data
++ struct pollfd pollfd;
++ pollfd.fd = tdt_fd;
++ pollfd.events = POLLIN|POLLERR|POLLPRI;
++ if (poll(&pollfd, 1, to * 1000) != 1) {
++ close(tdt_fd);
++ return -1;
++ }
++
++ // read it
++ if ((size = read(tdt_fd, sibuf, sizeof(sibuf))) < 0) {
++ close(tdt_fd);
++ return -1;
++ }
++
++ // parse section
++ struct section *section = section_codec(sibuf, size);
++ if (section == NULL) {
++ close(tdt_fd);
++ return -1;
++ }
++
++ // parse TDT
++ struct dvb_tdt_section *tdt = dvb_tdt_section_codec(section);
++ if (tdt == NULL) {
++ close(tdt_fd);
++ return -1;
++ }
++
++ // done
++ *rx_time = dvbdate_to_unixtime(tdt->utc_time);
++ close(tdt_fd);
++ return 0;
+ }
+
+
+ /*
+- * Get the next UTC date packet from the TDT multiplex
++ * Get the next date packet from the STT section
+ */
+-
+-int scan_date(time_t *dvb_time, unsigned int to)
++int atsc_scan_date(time_t *rx_time, unsigned int to)
+ {
+- int fd_date;
+- int n, seclen;
+- time_t t;
+- unsigned char buf[4096];
+- struct dmx_sct_filter_params sctFilterParams;
+- struct pollfd ufd;
+- int found = 0;
+-
+- t = 0;
+- if ((fd_date = open("/dev/dvb/adapter0/demux0", O_RDWR | O_NONBLOCK)) < 0) {
+- perror("fd_date DEVICE: ");
++ int stt_fd;
++ uint8_t filter[18];
++ uint8_t mask[18];
++ unsigned char sibuf[4096];
++ int size;
++
++ // open the demuxer
++ if ((stt_fd = dvbdemux_open_demux(adapter, 0, 0)) < 0) {
+ return -1;
+ }
+
+- memset(&sctFilterParams, 0, sizeof(sctFilterParams));
+- sctFilterParams.pid = 0x14;
+- sctFilterParams.timeout = 0;
+- sctFilterParams.flags = DMX_IMMEDIATE_START;
+- sctFilterParams.filter.filter[0] = 0x70;
+- sctFilterParams.filter.mask[0] = 0xff;
+-
+- if (ioctl(fd_date, DMX_SET_FILTER, &sctFilterParams) < 0) {
+- perror("DATE - DMX_SET_FILTER:");
+- close(fd_date);
++ // create a section filter for the STT
++ memset(filter, 0, sizeof(filter));
++ memset(mask, 0, sizeof(mask));
++ filter[0] = stag_atsc_system_time;
++ mask[0] = 0xFF;
++ if (dvbdemux_set_section_filter(stt_fd, ATSC_BASE_PID, filter, mask, 1, 1)) {
++ close(stt_fd);
+ return -1;
+ }
+
+- while (to > 0) {
+- int res;
++ // poll for data
++ struct pollfd pollfd;
++ pollfd.fd = stt_fd;
++ pollfd.events = POLLIN|POLLERR|POLLPRI;
++ if (poll(&pollfd, 1, to * 1000) != 1) {
++ close(stt_fd);
++ return -1;
++ }
+
+- memset(&ufd,0,sizeof(ufd));
+- ufd.fd=fd_date;
+- ufd.events=POLLIN;
++ // read it
++ if ((size = read(stt_fd, sibuf, sizeof(sibuf))) < 0) {
++ close(stt_fd);
++ return -1;
++ }
+
+- res = poll(&ufd,1,1000);
+- if (0 == res) {
+- fprintf(stdout, ".");
+- fflush(stdout);
+- to--;
+- continue;
+- }
+- if (1 == res) {
+- found = 1;
+- break;
+- }
+- errmsg("error polling for data");
+- close(fd_date);
++ // parse section
++ struct section *section = section_codec(sibuf, size);
++ if (section == NULL) {
++ close(stt_fd);
+ return -1;
+ }
+- fprintf(stdout, "\n");
+- if (0 == found) {
+- errmsg("timeout - try tuning to a multiplex?\n");
+- close(fd_date);
++ struct section_ext *section_ext = section_ext_decode(section, 0);
++ if (section_ext == NULL) {
++ close(stt_fd);
++ return -1;
++ }
++ struct atsc_section_psip *psip = atsc_section_psip_decode(section_ext);
++ if (psip == NULL) {
++ close(stt_fd);
+ return -1;
+ }
+
+- if ((n = read(fd_date, buf, 4096)) >= 3) {
+- seclen = ((buf[1] & 0x0f) << 8) | (buf[2] & 0xff);
+- if (n == seclen + 3) {
+- t = convert_date(&(buf[3]));
+- } else {
+- errmsg("Under-read bytes for DATE - wanted %d, got %d\n", seclen, n);
+- return 0;
+- }
+- } else {
+- errmsg("Nothing to read from fd_date - try tuning to a multiplex?\n");
+- return 0;
++ // parse STT
++ struct atsc_stt_section *stt = atsc_stt_section_codec(psip);
++ if (stt == NULL) {
++ close(stt_fd);
++ return -1;
+ }
+- close(fd_date);
+- *dvb_time = t;
++
++ // done
++ *rx_time = atsctime_to_unixtime(stt->system_time);
++ close(stt_fd);
+ return 0;
+ }
+
+@@ -291,10 +319,12 @@
+
+ int main(int argc, char **argv)
+ {
+- time_t dvb_time;
++ time_t rx_time;
+ time_t real_time;
+ time_t offset;
+ int ret;
++ struct dvbfe_handle *fe;
++ struct dvbfe_info fe_info;
+
+ do_print = 0;
+ do_force = 0;
+@@ -310,27 +340,51 @@
+ errmsg("quiet and print options are mutually exclusive.\n");
+ exit(1);
+ }
++
+ /*
+- * Get the date from the currently tuned TDT multiplex
++ * Find the frontend type
+ */
+- ret = scan_date(&dvb_time, timeout);
++ if ((fe = dvbfe_open(adapter, 0, 1)) == NULL) {
++ errmsg("Unable to open frontend.\n");
++ exit(1);
++ }
++ dvbfe_get_info(fe, 0, &fe_info, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
++
++/*
++ * Get the date from the currently tuned multiplex
++ */
++ switch(fe_info.type) {
++ case DVBFE_TYPE_DVBS:
++ case DVBFE_TYPE_DVBC:
++ case DVBFE_TYPE_DVBT:
++ ret = dvb_scan_date(&rx_time, timeout);
++ break;
++
++ case DVBFE_TYPE_ATSC:
++ ret = atsc_scan_date(&rx_time, timeout);
++ break;
++
++ default:
++ errmsg("Unsupported frontend type.\n");
++ exit(1);
++ }
+ if (ret != 0) {
+ errmsg("Unable to get time from multiplex.\n");
+ exit(1);
+ }
+ time(&real_time);
+- offset = dvb_time - real_time;
++ offset = rx_time - real_time;
+ if (do_print) {
+ fprintf(stdout, "System time: %s", ctime(&real_time));
+- fprintf(stdout, " TDT time: %s", ctime(&dvb_time));
++ fprintf(stdout, " RX time: %s", ctime(&rx_time));
+ fprintf(stdout, " Offset: %ld seconds\n", offset);
+ } else if (!do_quiet) {
+- fprintf(stdout, "%s", ctime(&dvb_time));
++ fprintf(stdout, "%s", ctime(&rx_time));
+ }
+ if (do_set) {
+ if (labs(offset) > ALLOWABLE_DELTA) {
+ if (do_force) {
+- if (0 != set_time(&dvb_time)) {
++ if (0 != set_time(&rx_time)) {
+ errmsg("setting the time failed\n");
+ }
+ } else {
+@@ -339,7 +393,7 @@
+ exit(1);
+ }
+ } else {
+- set_time(&dvb_time);
++ set_time(&rx_time);
+ }
+ } /* #end if (do_set) */
+ return (0);
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbdate/Makefile dvb-apps/util/dvbdate/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/dvbdate/Makefile 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/dvbdate/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,25 +1,15 @@
++# Makefile for linuxtv.org dvb-apps/util/dvbdate
+
+-CC = gcc
+-CFLAGS = -g -O2 -MD -Wall -I. -I../../include
+-LFLAGS =
+-
+-OBJS = dvbdate.o
+-TARGET = dvbdate
+-DESTDIR = /usr/local/bin/
+-
+-all: $(TARGET)
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++binaries = dvbdate
+
+-$(TARGET): $(OBJS)
+- $(CC) -o $@ $(OBJS) $(LFLAGS)
++inst_bin = $(binaries)
+
+-install: all
+- install -m 755 $(TARGET) $(DESTDIR)
++CPPFLAGS += -I../../lib
++LDFLAGS += -L../../lib/libdvbapi -L../../lib/libucsi
++LDLIBS += -ldvbapi -lucsi
+
+-clean:
+- rm -f $(TARGET) $(OBJS) core* *~ *.d
++.PHONY: all
+
+--include $(wildcard *.d) dummy
++all: $(binaries)
+
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbnet/dvbnet.c dvb-apps/util/dvbnet/dvbnet.c
+--- linuxtv-dvb-apps-1.1.1/util/dvbnet/dvbnet.c 2006-05-18 01:37:58.000000000 +0200
++++ dvb-apps/util/dvbnet/dvbnet.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,26 +1,29 @@
+-/*
++/*
+ * dvbnet.c
+ *
+ * Copyright (C) 2003 TV Files S.p.A
+ * L.Y.Mesentsev <lymes@tiscalinet.it>
+ *
++ * Ported to use new DVB libraries:
++ * Copyright (C) 2006 Andrew de Quincey <adq_dvb@lidskialf.net>
++ *
+ * 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.
+ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+- *
++ *
+ */
+
+ #include <stdio.h>
+@@ -33,19 +36,10 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+-
+-#include <linux/dvb/net.h>
+-#include <version.h>
+-
+-#ifndef VERSION_INFO
+-#define VERSION_INFO "1.1.1"
+-#endif
++#include <libdvbapi/dvbnet.h>
+
+ #define OK 0
+ #define FAIL -1
+-#define DVB_NET_DEVICE "/dev/dvb/adapter%d/net%d"
+-#define DVB_NET_DEVICES_MAX 10
+-#define IFNAME_DVB "dvb"
+
+
+ enum Mode {
+@@ -57,14 +51,15 @@
+
+ static int adapter = 0;
+ static int netdev = 0;
+-static struct dvb_net_if net_data;
+
+ static void hello(void);
+ static void usage(char *);
+ static void parse_args(int, char **);
+-static int queryInterface(int, int);
++static void queryInterface(int);
+
+-static char dvb_net_device[40];
++int ifnum;
++int pid;
++int encapsulation;
+
+ int main(int argc, char **argv)
+ {
+@@ -74,40 +69,36 @@
+
+ parse_args(argc, argv);
+
+- sprintf(dvb_net_device, DVB_NET_DEVICE, adapter, netdev);
+-
+- printf("Device: %s\n", dvb_net_device);
+-
+- if ((fd_net = open(dvb_net_device, O_RDWR | O_NONBLOCK)) < 0) {
+- fprintf(stderr, "Error: couldn't open device %s: %d %m\n",
+- dvb_net_device, errno);
++ if ((fd_net = dvbnet_open(adapter, netdev)) < 0) {
++ fprintf(stderr, "Error: couldn't open device %d: %d %m\n",
++ netdev, errno);
+ return FAIL;
+ }
+
+ switch (op_mode) {
+ case DEL_INTERFACE:
+- if (ioctl(fd_net, NET_REMOVE_IF, net_data.if_num))
++ if (dvbnet_remove_interface(fd_net, ifnum))
+ fprintf(stderr,
+ "Error: couldn't remove interface %d: %d %m.\n",
+- net_data.if_num, errno);
++ ifnum, errno);
+ else
+ printf("Status: device %d removed successfully.\n",
+- net_data.if_num);
++ ifnum);
+ break;
+
+ case ADD_INTERFACE:
+- if (ioctl(fd_net, NET_ADD_IF, &net_data))
++ if ((ifnum = dvbnet_add_interface(fd_net, pid, encapsulation)) < 0)
+ fprintf(stderr,
+ "Error: couldn't add interface for pid %d: %d %m.\n",
+- net_data.pid, errno);
++ pid, errno);
+ else
+ printf
+ ("Status: device dvb%d_%d for pid %d created successfully.\n",
+- adapter, net_data.if_num, net_data.pid);
++ adapter, ifnum, pid);
+ break;
+
+ case LST_INTERFACE:
+- queryInterface(fd_net, 0);
++ queryInterface(fd_net);
+ break;
+
+ default:
+@@ -120,39 +111,48 @@
+ }
+
+
+-int queryInterface(int fd_net, int dev)
++void queryInterface(int fd_net)
+ {
+- struct dvb_net_if data;
+- int IF, nIFaces = 0, ret = FAIL;
++ int IF, nIFaces = 0;
++ char *encap;
+
+ printf("Query DVB network interfaces:\n");
+ printf("-----------------------------\n");
+- for (IF = 0; IF < DVB_NET_DEVICES_MAX; IF++) {
+- data.if_num = IF;
+- if (ioctl(fd_net, NET_GET_IF, &data))
++ for (IF = 0; IF < DVBNET_MAX_INTERFACES; IF++) {
++ uint16_t _pid;
++ enum dvbnet_encap _encapsulation;
++ if (dvbnet_get_interface(fd_net, IF, &_pid, &_encapsulation))
+ continue;
+
+- if (dev == data.if_num)
+- ret = OK;
++ encap = "???";
++ switch(_encapsulation) {
++ case DVBNET_ENCAP_MPE:
++ encap = "MPE";
++ break;
++ case DVBNET_ENCAP_ULE:
++ encap = "ULE";
++ break;
++ }
+
+ printf("Found device %d: interface dvb%d_%d, "
+- "listening on PID %d\n",
+- IF, adapter, data.if_num, data.pid);
++ "listening on PID %d, encapsulation %s\n",
++ IF, adapter, IF, _pid, encap);
+
+ nIFaces++;
+ }
+
+ printf("-----------------------------\n");
+ printf("Found %d interface(s).\n\n", nIFaces);
+- return ret;
+ }
+
+
+ void parse_args(int argc, char **argv)
+ {
+- char c, *s;
++ int c;
++ char *s;
+ op_mode = UNKNOWN;
+- while ((c = getopt(argc, argv, "a:n:p:d:lvh")) != EOF) {
++ encapsulation = DVBNET_ENCAP_MPE;
++ while ((c = getopt(argc, argv, "a:n:p:d:lUvh")) != EOF) {
+ switch (c) {
+ case 'a':
+ adapter = strtol(optarg, NULL, 0);
+@@ -161,16 +161,19 @@
+ netdev = strtol(optarg, NULL, 0);
+ break;
+ case 'p':
+- net_data.pid = strtol(optarg, NULL, 0);
++ pid = strtol(optarg, NULL, 0);
+ op_mode = ADD_INTERFACE;
+ break;
+ case 'd':
+- net_data.if_num = strtol(optarg, NULL, 0);
++ ifnum = strtol(optarg, NULL, 0);
+ op_mode = DEL_INTERFACE;
+ break;
+ case 'l':
+ op_mode = LST_INTERFACE;
+ break;
++ case 'U':
++ encapsulation = DVBNET_ENCAP_ULE;
++ break;
+ case 'v':
+ exit(OK);
+ case 'h':
+@@ -187,12 +190,12 @@
+ {
+ fprintf(stderr, "Usage: %s [options]\n", prog_name);
+ fprintf(stderr, "Where options are:\n");
+- fprintf(stderr, "\t-a AD : Adapter card AD (default 0)\n");
+- fprintf(stderr, "\t-n NET : Net demux NET (default 0)\n");
++ fprintf(stderr, "\t-a AD : Adapter card (default 0)\n");
++ fprintf(stderr, "\t-n DD : Demux (default 0)\n");
+ fprintf(stderr, "\t-p PID : Add interface listening on PID\n");
+- fprintf(stderr, "\t-d NUM : Remove interface dvbAD_NUM\n");
+- fprintf(stderr,
+- "\t-l : List currently available interfaces\n");
++ fprintf(stderr, "\t-d NUM : Remove interface NUM\n");
++ fprintf(stderr, "\t-l : List currently available interfaces\n");
++ fprintf(stderr, "\t-U : use ULE framing (default: MPE)\n" );
+ fprintf(stderr, "\t-v : Print current version\n\n");
+ }
+
+@@ -200,6 +203,5 @@
+ void hello(void)
+ {
+ printf("\nDVB Network Interface Manager\n");
+- printf("Version %s\n", VERSION_INFO);
+ printf("Copyright (C) 2003, TV Files S.p.A\n\n");
+ }
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbnet/Makefile dvb-apps/util/dvbnet/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/dvbnet/Makefile 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/dvbnet/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,29 +1,15 @@
++# Makefile for linuxtv.org dvb-apps/util/dvbnet
+
+-CC = gcc
+-CFLAGS = -g -O2 -MD -Wall -I. -I../../include
+-LFLAGS =
+-
+-OBJS = dvbnet.o
+-TARGET = dvbnet
+-DESTDIR = /usr/local/bin/
+-
+-all: version.h $(TARGET)
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
+-
+-$(TARGET): $(OBJS)
+- $(CC) -o $@ $(OBJS) $(LFLAGS)
++binaries = dvbnet
+
+-version.h:
+- printf '#define VERSION_INFO "%s (Build %s)"\n' \
+- "`cat $@.in`" "`date +'%a %b %d %X %Y'`" > $@
++inst_bin = $(binaries)
+
+-install: all
+- install -m 755 $(TARGET) $(DESTDIR)
++CPPFLAGS += -I../../lib
++LDFLAGS += -L../../lib/libdvbapi
++LDLIBS += -ldvbapi
+
+-clean:
+- rm -f $(TARGET) $(OBJS) version.h core* *~ *.d
++.PHONY: all
+
+--include $(wildcard *.d) dummy
++all: $(binaries)
+
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbnet/net_start.pl dvb-apps/util/dvbnet/net_start.pl
+--- linuxtv-dvb-apps-1.1.1/util/dvbnet/net_start.pl 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/dvbnet/net_start.pl 2009-06-21 13:29:06.000000000 +0200
+@@ -22,4 +22,3 @@
+
+ system("/sbin/ifconfig $DEV_NAME");
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbnet/version.h.in dvb-apps/util/dvbnet/version.h.in
+--- linuxtv-dvb-apps-1.1.1/util/dvbnet/version.h.in 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/dvbnet/version.h.in 1970-01-01 01:00:00.000000000 +0100
+@@ -1 +0,0 @@
+-1.1.0-TVF
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_atsc.c dvb-apps/util/dvbscan/dvbscan_atsc.c
+--- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_atsc.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dvbscan/dvbscan_atsc.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++/*
++ dvbscan utility
++
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include "dvbscan.h"
++
++void dvbscan_scan_atsc(struct dvbfe_handle *fe)
++{
++ // FIXME
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan.c dvb-apps/util/dvbscan/dvbscan.c
+--- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dvbscan/dvbscan.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,370 @@
++/*
++ dvbscan utility
++
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#include <stdlib.h>
++#include <unistd.h>
++#include <stdio.h>
++#include <string.h>
++#include <time.h>
++#include <libdvbsec/dvbsec_cfg.h>
++#include <libdvbcfg/dvbcfg_scanfile.h>
++#include <libdvbapi/dvbdemux.h>
++#include "dvbscan.h"
++
++
++#define OUTPUT_TYPE_RAW 1
++#define OUTPUT_TYPE_CHANNELS 2
++#define OUTPUT_TYPE_VDR12 3
++#define OUTPUT_TYPE_VDR13 4
++
++#define SERVICE_FILTER_TV 1
++#define SERVICE_FILTER_RADIO 2
++#define SERVICE_FILTER_OTHER 4
++#define SERVICE_FILTER_ENCRYPTED 8
++
++#define TIMEOUT_WAIT_LOCK 2
++
++
++// transponders we have yet to scan
++static struct transponder *toscan = NULL;
++static struct transponder *toscan_end = NULL;
++
++// transponders we have scanned
++static struct transponder *scanned = NULL;
++static struct transponder *scanned_end = NULL;
++
++
++static void usage(void)
++{
++ static const char *_usage = "\n"
++ " dvbscan: A digital tv channel scanning utility\n"
++ " Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)\n\n"
++ " usage: dvbscan <options> as follows:\n"
++ " -h help\n"
++ " -adapter <id> adapter to use (default 0)\n"
++ " -frontend <id> frontend to use (default 0)\n"
++ " -demux <id> demux to use (default 0)\n"
++ " -secfile <filename> Optional sec.conf file.\n"
++ " -secid <secid> ID of the SEC configuration to use, one of:\n"
++ " * UNIVERSAL (default) - Europe, 10800 to 11800 MHz and 11600 to 12700 Mhz,\n"
++ " Dual LO, loband 9750, hiband 10600 MHz.\n"
++ " * DBS - Expressvu, North America, 12200 to 12700 MHz, Single LO, 11250 MHz.\n"
++ " * STANDARD - 10945 to 11450 Mhz, Single LO, 10000 Mhz.\n"
++ " * ENHANCED - Astra, 10700 to 11700 MHz, Single LO, 9750 MHz.\n"
++ " * C-BAND - Big Dish, 3700 to 4200 MHz, Single LO, 5150 Mhz.\n"
++ " * C-MULTI - Big Dish - Multipoint LNBf, 3700 to 4200 MHz,\n"
++ " Dual LO, H:5150MHz, V:5750MHz.\n"
++ " * One of the sec definitions from the secfile if supplied\n"
++ " -satpos <position> Specify DISEQC switch position for DVB-S.\n"
++ " -inversion <on|off|auto> Specify inversion (default: auto).\n"
++ " -uk-ordering Use UK DVB-T channel ordering if present.\n"
++ " -timeout <secs> Specify filter timeout to use (standard specced values will be used by default)\n"
++ " -filter <filter> Specify service filter, a comma seperated list of the following tokens:\n"
++ " (If no filter is supplied, all services will be output)\n"
++ " * tv - Output TV channels\n"
++ " * radio - Output radio channels\n"
++ " * other - Output other channels\n"
++ " * encrypted - Output encrypted channels\n"
++ " -out raw <filename>|- Output in raw format to <filename> or stdout\n"
++ " channels <filename>|- Output in channels.conf format to <filename> or stdout.\n"
++ " vdr12 <filename>|- Output in vdr 1.2.x format to <filename> or stdout.\n"
++ " vdr13 <filename>|- Output in vdr 1.3.x format to <filename> or stdout.\n"
++ " <initial scan file>\n";
++ fprintf(stderr, "%s\n", _usage);
++
++ exit(1);
++}
++
++
++static int scan_load_callback(struct dvbcfg_scanfile *channel, void *private_data)
++{
++ struct dvbfe_info *feinfo = (struct dvbfe_info *) private_data;
++
++ if (channel->fe_type != feinfo->type)
++ return 0;
++
++ struct transponder *t = new_transponder();
++ append_transponder(t, &toscan, &toscan_end);
++ memcpy(&t->params, &channel->fe_params, sizeof(struct dvbfe_parameters));
++
++ add_frequency(t, t->params.frequency);
++ t->params.frequency = 0;
++
++ return 0;
++}
++
++int main(int argc, char *argv[])
++{
++ uint32_t i;
++ int argpos = 1;
++ int adapter_id = 0;
++ int frontend_id = 0;
++ int demux_id = 0;
++ char *secfile = NULL;
++ char *secid = NULL;
++ int satpos = 0;
++ enum dvbfe_spectral_inversion inversion = DVBFE_INVERSION_AUTO;
++ int service_filter = -1;
++ int uk_ordering = 0;
++ int timeout = 5;
++ int output_type = OUTPUT_TYPE_RAW;
++ char *output_filename = NULL;
++ char *scan_filename = NULL;
++ struct dvbsec_config sec;
++ int valid_sec = 0;
++
++ while(argpos != argc) {
++ if (!strcmp(argv[argpos], "-h")) {
++ usage();
++ } else if (!strcmp(argv[argpos], "-adapter")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &adapter_id) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-frontend")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &frontend_id) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-demux")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &demux_id) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-secfile")) {
++ if ((argc - argpos) < 2)
++ usage();
++ secfile = argv[argpos+1];
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-secid")) {
++ if ((argc - argpos) < 2)
++ usage();
++ secid = argv[argpos+1];
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-satpos")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &satpos) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-inversion")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (!strcmp(argv[argpos+1], "off")) {
++ inversion = DVBFE_INVERSION_OFF;
++ } else if (!strcmp(argv[argpos+1], "on")) {
++ inversion = DVBFE_INVERSION_ON;
++ } else if (!strcmp(argv[argpos+1], "auto")) {
++ inversion = DVBFE_INVERSION_AUTO;
++ } else {
++ usage();
++ }
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-uk-ordering")) {
++ if ((argc - argpos) < 1)
++ usage();
++ uk_ordering = 1;
++ } else if (!strcmp(argv[argpos], "-timeout")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &timeout) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-filter")) {
++ if ((argc - argpos) < 2)
++ usage();
++ service_filter = 0;
++ if (!strstr(argv[argpos+1], "tv")) {
++ service_filter |= SERVICE_FILTER_TV;
++ }
++ if (!strstr(argv[argpos+1], "radio")) {
++ service_filter |= SERVICE_FILTER_RADIO;
++ }
++ if (!strstr(argv[argpos+1], "other")) {
++ service_filter |= SERVICE_FILTER_OTHER;
++ }
++ if (!strstr(argv[argpos+1], "encrypted")) {
++ service_filter |= SERVICE_FILTER_ENCRYPTED;
++ }
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-out")) {
++ if ((argc - argpos) < 3)
++ usage();
++ if (!strcmp(argv[argpos+1], "raw")) {
++ output_type = OUTPUT_TYPE_RAW;
++ } else if (!strcmp(argv[argpos+1], "channels")) {
++ output_type = OUTPUT_TYPE_CHANNELS;
++ } else if (!strcmp(argv[argpos+1], "vdr12")) {
++ output_type = OUTPUT_TYPE_VDR12;
++ } else if (!strcmp(argv[argpos+1], "vdr13")) {
++ output_type = OUTPUT_TYPE_VDR13;
++ } else {
++ usage();
++ }
++ output_filename = argv[argpos+2];
++ if (!strcmp(output_filename, "-"))
++ output_filename = NULL;
++ } else {
++ if ((argc - argpos) != 1)
++ usage();
++ scan_filename = argv[argpos];
++ argpos++;
++ }
++ }
++
++ // open the frontend & get its type
++ struct dvbfe_handle *fe = dvbfe_open(adapter_id, frontend_id, 0);
++ if (fe == NULL) {
++ fprintf(stderr, "Failed to open frontend\n");
++ exit(1);
++ }
++ struct dvbfe_info feinfo;
++ if (dvbfe_get_info(fe, 0, &feinfo, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0) != 0) {
++ fprintf(stderr, "Failed to query frontend\n");
++ exit(1);
++ }
++
++ // default SEC with a DVBS card
++ if ((secid == NULL) && (feinfo.type == DVBFE_TYPE_DVBS))
++ secid = "UNIVERSAL";
++
++ // look up SECID if one was supplied
++ if (secid != NULL) {
++ if (dvbsec_cfg_find(secfile, secid, &sec)) {
++ fprintf(stderr, "Unable to find suitable sec/lnb configuration for channel\n");
++ exit(1);
++ }
++ valid_sec = 1;
++ }
++
++ // load the initial scan file
++ FILE *scan_file = fopen(scan_filename, "r");
++ if (scan_file == NULL) {
++ fprintf(stderr, "Could not open scan file %s\n", scan_filename);
++ exit(1);
++ }
++ if (dvbcfg_scanfile_parse(scan_file, scan_load_callback, &feinfo) < 0) {
++ fprintf(stderr, "Could not parse scan file %s\n", scan_filename);
++ exit(1);
++ }
++ fclose(scan_file);
++
++ // main scan loop
++ while(toscan) {
++ // get the first item on the toscan list
++ struct transponder *tmp = first_transponder(&toscan, &toscan_end);
++
++ // have we already seen this transponder?
++ if (seen_transponder(tmp, scanned)) {
++ free_transponder(tmp);
++ continue;
++ }
++
++ // do we have a valid SEC configuration?
++ struct dvbsec_config *psec = NULL;
++ if (valid_sec)
++ psec = &sec;
++
++ // tune it
++ int tuned_ok = 0;
++ for(i=0; i < tmp->frequency_count; i++) {
++ tmp->params.frequency = tmp->frequencies[i];
++ if (dvbsec_set(fe,
++ psec,
++ tmp->polarization,
++ (satpos & 0x01) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
++ (satpos & 0x02) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
++ &tmp->params,
++ 0)) {
++ fprintf(stderr, "Failed to set frontend\n");
++ exit(1);
++ }
++
++ // wait for lock
++ time_t starttime = time(NULL);
++ while((time(NULL) - starttime) < TIMEOUT_WAIT_LOCK) {
++ if (dvbfe_get_info(fe, DVBFE_INFO_LOCKSTATUS, &feinfo,
++ DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0) !=
++ DVBFE_INFO_QUERYTYPE_IMMEDIATE) {
++ fprintf(stderr, "Unable to query frontend status\n");
++ exit(1);
++ }
++ if (feinfo.lock) {
++ tuned_ok = 1;
++ break;
++ }
++ usleep(100000);
++ }
++ }
++ if (!tuned_ok) {
++ free_transponder(tmp);
++ continue;
++ }
++
++ // scan it
++ switch(feinfo.type) {
++ case DVBFE_TYPE_DVBS:
++ case DVBFE_TYPE_DVBC:
++ case DVBFE_TYPE_DVBT:
++ dvbscan_scan_dvb(fe);
++ break;
++
++ case DVBFE_TYPE_ATSC:
++ dvbscan_scan_atsc(fe);
++ break;
++ }
++
++ // add to scanned list.
++ append_transponder(tmp, &scanned, &scanned_end);
++ }
++
++ // FIXME: output the data
++
++ return 0;
++}
++
++int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id)
++{
++ int demux_fd = -1;
++ uint8_t filter[18];
++ uint8_t mask[18];
++
++ // open the demuxer
++ if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
++ return -1;
++ }
++
++ // create a section filter
++ memset(filter, 0, sizeof(filter));
++ memset(mask, 0, sizeof(mask));
++ filter[0] = table_id;
++ mask[0] = 0xFF;
++ if (dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) {
++ close(demux_fd);
++ return -1;
++ }
++
++ // done
++ return demux_fd;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_dvb.c dvb-apps/util/dvbscan/dvbscan_dvb.c
+--- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_dvb.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dvbscan/dvbscan_dvb.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++/*
++ dvbscan utility
++
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include "dvbscan.h"
++
++void dvbscan_scan_dvb(struct dvbfe_handle *fe)
++{
++ // FIXME
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan.h dvb-apps/util/dvbscan/dvbscan.h
+--- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dvbscan/dvbscan.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,136 @@
++/*
++ dvbscan utility
++
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#ifndef DVBSCAN_H
++#define DVBSCAN_H 1
++
++#include <libdvbapi/dvbfe.h>
++#include <libdvbsec/dvbsec_api.h>
++#include <libucsi/types.h>
++
++/**
++ * A stream which is part of a service.
++ */
++struct stream
++{
++ uint8_t stream_type;
++ iso639lang_t language;
++
++ struct stream *next;
++};
++
++/**
++ * A service (programme) which is part of a transponder.
++ */
++struct service
++{
++ /**
++ * Service identification stuff. Strings are in UTF-8.
++ */
++ uint16_t service_id;
++ char *provider_name;
++ char *service_name;
++
++ /**
++ * Pids common to the whole service.
++ */
++ uint16_t pmt_pid;
++ uint16_t pcr_pid;
++
++ /**
++ * CA stuff.
++ */
++ uint16_t *ca_ids;
++ uint32_t ca_ids_count;
++ uint8_t is_scrambled;
++
++ /**
++ * BBC channel number (-1 if unknown).
++ */
++ int bbc_channel_number;
++
++ /**
++ * Streams composing this service.
++ */
++ struct stream *streams;
++ struct stream *streams_end;
++
++ /**
++ * Next service in list.
++ */
++ struct service *next;
++};
++
++/**
++ * A collection of multiplexed services.
++ */
++struct transponder
++{
++ /**
++ * we need to have a seperate list of frequencies since the
++ * DVB standard allows a frequency list descriptor of alternate
++ * frequencies to be supplied.
++ */
++ uint32_t *frequencies;
++ uint32_t frequency_count;
++
++ /**
++ * The rest of the tuning parameters.
++ */
++ struct dvbfe_parameters params;
++
++ /**
++ * DVBS specific parameters
++ */
++ enum dvbsec_diseqc_polarization polarization;
++ int oribital_position;
++
++ /**
++ * Numerical IDs
++ */
++ uint16_t network_id;
++ uint16_t original_network_id;
++ uint16_t transport_stream_id;
++
++ /**
++ * Services detected on this transponder.
++ */
++ struct service *services;
++ struct service *services_end;
++
++ /**
++ * Next item in list.
++ */
++ struct transponder *next;
++};
++
++extern void append_transponder(struct transponder *t, struct transponder **tlist, struct transponder **tlist_end);
++extern struct transponder *new_transponder(void);
++extern void free_transponder(struct transponder *t);
++extern int seen_transponder(struct transponder *t, struct transponder *checklist);
++extern void add_frequency(struct transponder *t, uint32_t frequency);
++extern struct transponder *first_transponder(struct transponder **tlist, struct transponder **tlist_end);
++
++extern int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id);
++extern void dvbscan_scan_dvb(struct dvbfe_handle *fe);
++extern void dvbscan_scan_atsc(struct dvbfe_handle *fe);
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_structutils.c dvb-apps/util/dvbscan/dvbscan_structutils.c
+--- linuxtv-dvb-apps-1.1.1/util/dvbscan/dvbscan_structutils.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dvbscan/dvbscan_structutils.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,99 @@
++/*
++ dvbscan utility
++
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++#include "dvbscan.h"
++
++void append_transponder(struct transponder *t, struct transponder **tlist, struct transponder **tlist_end)
++{
++ if (*tlist_end == NULL) {
++ *tlist = t;
++ } else {
++ (*tlist_end)->next = t;
++ }
++ *tlist_end = t;
++ t->next = NULL;
++}
++
++struct transponder *new_transponder(void)
++{
++ struct transponder *t = (struct transponder *) malloc(sizeof(struct transponder));
++ if (t == NULL) {
++ fprintf(stderr, "Out of memory\n");
++ exit(1);
++ }
++ memset(t, 0, sizeof(struct transponder));
++
++ return t;
++}
++
++void free_transponder(struct transponder *t)
++{
++ if (t->frequencies)
++ free(t->frequencies);
++ // FIXME: free services
++ free(t);
++}
++
++int seen_transponder(struct transponder *t, struct transponder *checklist)
++{
++ uint32_t i;
++
++ struct transponder *cur_check = checklist;
++ while(cur_check) {
++ uint32_t freq1 = cur_check->params.frequency / 2000;
++ for(i=0; i < t->frequency_count; i++) {
++ uint32_t freq2 = t->frequencies[i] / 2000;
++ if (freq1 == freq2) {
++ return 1;
++ }
++ }
++ cur_check = cur_check->next;
++ }
++
++ return 0;
++}
++
++void add_frequency(struct transponder *t, uint32_t frequency)
++{
++ uint32_t *tmp;
++
++ tmp = (uint32_t*) realloc(t->frequencies, sizeof(uint32_t) * (t->frequency_count + 1));
++ if (tmp == NULL) {
++ fprintf(stderr, "Out of memory\n");
++ exit(1);
++ }
++ tmp[t->frequency_count++] = frequency;
++ t->frequencies = tmp;
++}
++
++struct transponder *first_transponder(struct transponder **tlist, struct transponder **tlist_end)
++{
++ struct transponder *t = *tlist;
++
++ *tlist = t->next;
++ if (*tlist == NULL)
++ *tlist_end = NULL;
++
++ return t;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbscan/Makefile dvb-apps/util/dvbscan/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/dvbscan/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/dvbscan/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,22 @@
++# Makefile for linuxtv.org dvb-apps/util/dvbscan
++
++objects = dvbscan.o \
++ dvbscan_structutils.o \
++ dvbscan_dvb.o \
++ dvbscan_atsc.o
++
++binaries = dvbscan
++
++inst_bin = $(binaries)
++
++CPPFLAGS += -I../../lib
++LDFLAGS += -L../../lib/libdvbapi -L../../lib/libdvbcfg -L../../lib/libdvbsec -L../../lib/libucsi
++LDLIBS += -ldvbcfg -lucsi -ldvbsec -ldvbapi -lpthread
++
++.PHONY: all
++
++all: $(binaries)
++
++$(binaries): $(objects)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbtraffic/dvbtraffic.c dvb-apps/util/dvbtraffic/dvbtraffic.c
+--- linuxtv-dvb-apps-1.1.1/util/dvbtraffic/dvbtraffic.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/dvbtraffic/dvbtraffic.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,5 @@
++/* This file is released into the public domain by its authors */
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
+@@ -9,64 +11,83 @@
+ #include <sys/poll.h>
+ #include <sys/time.h>
+ #include <string.h>
+-
+-#include <linux/dvb/dmx.h>
+-#include <linux/dvb/frontend.h>
+-#include <linux/dvb/video.h>
++#include <limits.h>
++#include <libdvbapi/dvbdemux.h>
+
+ #define BSIZE 188
+
+-int pidt[0x2001];
++static int pidt[0x2001];
++
++static void usage(FILE *output)
++{
++ fprintf(output,
++ "Usage: dvbtraffic [OPTION]...\n"
++ "Options:\n"
++ " -a N use dvb adapter N\n"
++ " -d N use demux N\n"
++ " -h display this help\n");
++}
+
+ int main(int argc, char **argv)
+ {
+- int fd, ffd, packets = 0;
+ struct timeval startt;
+- struct dmx_pes_filter_params flt;
+- char *search;
+- unsigned char buffer[BSIZE];
+-
+- fd = open("/dev/dvb/adapter0/dvr0", O_RDONLY);
+-
+- ioctl(fd, DMX_SET_BUFFER_SIZE, 1024 * 1024);
++ int adapter = 0, demux = 0;
++ char *search = NULL;
++ int fd, ffd, packets = 0;
++ int opt;
+
+- ffd = open("/dev/dvb/adapter0/demux0", O_RDWR);
+- if (ffd < 0) {
+- perror("/dev/dvb/adapter0/demux0");
+- return -fd;
++ while ((opt = getopt(argc, argv, "a:d:hs:")) != -1) {
++ switch (opt) {
++ case 'a':
++ adapter = atoi(optarg);
++ break;
++ case 'd':
++ demux = atoi(optarg);
++ break;
++ case 'h':
++ usage(stdout);
++ exit(0);
++ case 's':
++ search = strdup(optarg);
++ break;
++ default:
++ usage(stderr);
++ exit(1);
++ }
+ }
+
+- flt.pid = 0x2000;
+- flt.input = DMX_IN_FRONTEND;
+- flt.output = DMX_OUT_TS_TAP;
+- flt.pes_type = DMX_PES_OTHER;
+- flt.flags = 0;
++ // open the DVR device
++ fd = dvbdemux_open_dvr(adapter, demux, 1, 0);
++ if (fd < 0) {
++ fprintf(stderr, "dvbtraffic: Could not open dvr device: %m\n");
++ exit(1);
++ }
++ dvbdemux_set_buffer(fd, 1024 * 1024);
+
+- if (ioctl(ffd, DMX_SET_PES_FILTER, &flt) < 0) {
+- perror("DMX_SET_PES_FILTER");
+- return -1;
++ ffd = dvbdemux_open_demux(adapter, demux, 0);
++ if (ffd < 0) {
++ fprintf(stderr, "dvbtraffic: Could not open demux device: %m\n");
++ exit(1);
+ }
+
+- if (ioctl(ffd, DMX_START, 0) < 0) {
+- perror("DMX_SET_PES_FILTER");
++ if (dvbdemux_set_pid_filter(ffd, -1, DVBDEMUX_INPUT_FRONTEND, DVBDEMUX_OUTPUT_DVR, 1)) {
++ perror("dvbdemux_set_pid_filter");
+ return -1;
+ }
+
+ gettimeofday(&startt, 0);
+
+- if (argc > 1)
+- search = argv[1];
+- else
+- search = 0;
+-
+ while (1) {
+- int pid, r, ok;
+- if ((r = read(fd, buffer, 188)) <= 0) {
++ unsigned char buffer[BSIZE];
++ int pid, ok;
++ ssize_t r;
++
++ if ((r = read(fd, buffer, BSIZE)) <= 0) {
+ perror("read");
+ break;
+ }
+- if (r != 188) {
+- printf("only read %d\n", r);
++ if (r != BSIZE) {
++ fprintf(stderr, "dvbtraffic: only read %zd bytes\n", r);
+ break;
+ }
+ if (buffer[0] != 0x47) {
+@@ -106,16 +127,16 @@
+ (now.tv_sec - startt.tv_sec) * 1000 +
+ (now.tv_usec - startt.tv_usec) / 1000;
+ if (diff > 1000) {
+- int pid = 0;
+- for (pid = 0; pid < 0x2001; pid++) {
+- if (pidt[pid]) {
++ int _pid = 0;
++ for (_pid = 0; _pid < 0x2001; _pid++) {
++ if (pidt[_pid]) {
+ printf("%04x %5d p/s %5d kb/s %5d kbit\n",
+- pid,
+- pidt[pid] * 1000 / diff,
+- pidt[pid] * 1000 / diff * 188 / 1024,
+- pidt[pid] * 8 * 1000 / diff * 188 / 1000);
++ _pid,
++ pidt[_pid] * 1000 / diff,
++ pidt[_pid] * 1000 / diff * 188 / 1024,
++ pidt[_pid] * 8 * 1000 / diff * 188 / 1000);
+ }
+- pidt[pid] = 0;
++ pidt[_pid] = 0;
+ }
+ printf("-PID--FREQ-----BANDWIDTH-BANDWIDTH-\n");
+ startt = now;
+@@ -127,4 +148,3 @@
+ close(fd);
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/dvbtraffic/Makefile dvb-apps/util/dvbtraffic/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/dvbtraffic/Makefile 2004-01-19 18:10:16.000000000 +0100
++++ dvb-apps/util/dvbtraffic/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,6 +1,15 @@
++# Makefile for linuxtv.org dvb-apps/util/dvbtraffic
+
+-dvbtraffic: dvbtraffic.c
+- gcc -MD -g -O2 -Wall -I../../include $< -o $@
++binaries = dvbtraffic
+
+-clean:
+- rm -f *.o *.d dvbtraffic
++inst_bin = $(binaries)
++
++CPPFLAGS += -I../../lib
++LDFLAGS += -L../../lib/libdvbapi
++LDLIBS += -ldvbapi
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/femon/femon.c dvb-apps/util/femon/femon.c
+--- linuxtv-dvb-apps-1.1.1/util/femon/femon.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/femon/femon.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,175 @@
++/* femon -- monitor frontend status
++ *
++ * Copyright (C) 2003 convergence GmbH
++ * Johannes Stezenbach <js@convergence.de>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <limits.h>
++#include <string.h>
++#include <errno.h>
++#include <sys/ioctl.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <sys/poll.h>
++#include <fcntl.h>
++#include <time.h>
++#include <unistd.h>
++
++#include <stdint.h>
++#include <sys/time.h>
++
++#include <libdvbapi/dvbfe.h>
++
++#define FE_STATUS_PARAMS (DVBFE_INFO_LOCKSTATUS|DVBFE_INFO_SIGNAL_STRENGTH|DVBFE_INFO_BER|DVBFE_INFO_SNR|DVBFE_INFO_UNCORRECTED_BLOCKS)
++
++static char *usage_str =
++ "\nusage: femon [options]\n"
++ " -H : human readable output\n"
++ " -a number : use given adapter (default 0)\n"
++ " -f number : use given frontend (default 0)\n"
++ " -c number : samples to take (default 0 = infinite)\n\n";
++
++
++static void usage(void)
++{
++ fprintf(stderr, usage_str);
++ exit(1);
++}
++
++
++static
++int check_frontend (struct dvbfe_handle *fe, int human_readable, unsigned int count)
++{
++ struct dvbfe_info fe_info;
++ unsigned int samples = 0;
++
++ do {
++ if (dvbfe_get_info(fe, FE_STATUS_PARAMS, &fe_info, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0) != FE_STATUS_PARAMS) {
++ fprintf(stderr, "Problem retrieving frontend information: %m\n");
++ }
++
++
++
++ if (human_readable) {
++ printf ("status %c%c%c%c%c | signal %3u%% | snr %3u%% | ber %d | unc %d | ",
++ fe_info.signal ? 'S' : ' ',
++ fe_info.carrier ? 'C' : ' ',
++ fe_info.viterbi ? 'V' : ' ',
++ fe_info.sync ? 'Y' : ' ',
++ fe_info.lock ? 'L' : ' ',
++ (fe_info.signal_strength * 100) / 0xffff,
++ (fe_info.snr * 100) / 0xffff,
++ fe_info.ber,
++ fe_info.ucblocks);
++ } else {
++ printf ("status %c%c%c%c%c | signal %04x | snr %04x | ber %08x | unc %08x | ",
++ fe_info.signal ? 'S' : ' ',
++ fe_info.carrier ? 'C' : ' ',
++ fe_info.viterbi ? 'V' : ' ',
++ fe_info.sync ? 'Y' : ' ',
++ fe_info.lock ? 'L' : ' ',
++ fe_info.signal_strength,
++ fe_info.snr,
++ fe_info.ber,
++ fe_info.ucblocks);
++ }
++
++ if (fe_info.lock)
++ printf("FE_HAS_LOCK");
++
++ printf("\n");
++ fflush(stdout);
++ usleep(1000000);
++ samples++;
++ } while ((!count) || (count-samples));
++
++ return 0;
++}
++
++
++static
++int do_mon(unsigned int adapter, unsigned int frontend, int human_readable, unsigned int count)
++{
++ int result;
++ struct dvbfe_handle *fe;
++ struct dvbfe_info fe_info;
++ char *fe_type = "UNKNOWN";
++
++ fe = dvbfe_open(adapter, frontend, 1);
++ if (fe == NULL) {
++ perror("opening frontend failed");
++ return 0;
++ }
++
++ dvbfe_get_info(fe, 0, &fe_info, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
++ switch(fe_info.type) {
++ case DVBFE_TYPE_DVBS:
++ fe_type = "DVBS";
++ break;
++ case DVBFE_TYPE_DVBC:
++ fe_type = "DVBC";
++ break;
++ case DVBFE_TYPE_DVBT:
++ fe_type = "DVBT";
++ break;
++ case DVBFE_TYPE_ATSC:
++ fe_type = "ATSC";
++ break;
++ }
++ printf("FE: %s (%s)\n", fe_info.name, fe_type);
++
++ result = check_frontend (fe, human_readable, count);
++
++ dvbfe_close(fe);
++
++ return result;
++}
++
++int main(int argc, char *argv[])
++{
++ unsigned int adapter = 0, frontend = 0, count = 0;
++ int human_readable = 0;
++ int opt;
++
++ while ((opt = getopt(argc, argv, "Ha:f:c:")) != -1) {
++ switch (opt)
++ {
++ default:
++ usage();
++ break;
++ case 'a':
++ adapter = strtoul(optarg, NULL, 0);
++ break;
++ case 'c':
++ count = strtoul(optarg, NULL, 0);
++ break;
++ case 'f':
++ frontend = strtoul(optarg, NULL, 0);
++ break;
++ case 'H':
++ human_readable = 1;
++ break;
++ }
++ }
++
++ do_mon(adapter, frontend, human_readable, count);
++
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/femon/Makefile dvb-apps/util/femon/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/femon/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/femon/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,15 @@
++# Makefile for linuxtv.org dvb-apps/util/femon
++
++binaries = femon
++
++inst_bin = $(binaries)
++
++CPPFLAGS += -I../../lib
++LDFLAGS += -L../../lib/libdvbapi
++LDLIBS += -ldvbapi
++
++.PHONY: all
++
++all: $(binaries)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv.c dvb-apps/util/gnutv/gnutv.c
+--- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/gnutv/gnutv.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,375 @@
++/*
++ gnutv utility
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <limits.h>
++#include <string.h>
++#include <fcntl.h>
++#include <signal.h>
++#include <pthread.h>
++#include <sys/poll.h>
++#include <libdvbapi/dvbdemux.h>
++#include <libdvbapi/dvbaudio.h>
++#include <libdvbsec/dvbsec_cfg.h>
++#include <libucsi/mpeg/section.h>
++#include "gnutv.h"
++#include "gnutv_dvb.h"
++#include "gnutv_ca.h"
++#include "gnutv_data.h"
++
++
++static void signal_handler(int _signal);
++
++static int quit_app = 0;
++
++void usage(void)
++{
++ static const char *_usage = "\n"
++ " gnutv: A digital tv utility\n"
++ " Copyright (C) 2004, 2005, 2006 Manu Abraham (manu@kromtek.com)\n"
++ " Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)\n\n"
++ " usage: gnutv <options> as follows:\n"
++ " -h help\n"
++ " -adapter <id> adapter to use (default 0)\n"
++ " -frontend <id> frontend to use (default 0)\n"
++ " -demux <id> demux to use (default 0)\n"
++ " -caslotnum <id> ca slot number to use (default 0)\n"
++ " -channels <filename> channels.conf file.\n"
++ " -secfile <filename> Optional sec.conf file.\n"
++ " -secid <secid> ID of the SEC configuration to use, one of:\n"
++ " * UNIVERSAL (default) - Europe, 10800 to 11800 MHz and 11600 to 12700 Mhz,\n"
++ " Dual LO, loband 9750, hiband 10600 MHz.\n"
++ " * DBS - Expressvu, North America, 12200 to 12700 MHz, Single LO, 11250 MHz.\n"
++ " * STANDARD - 10945 to 11450 Mhz, Single LO, 10000 Mhz.\n"
++ " * ENHANCED - Astra, 10700 to 11700 MHz, Single LO, 9750 MHz.\n"
++ " * C-BAND - Big Dish, 3700 to 4200 MHz, Single LO, 5150 Mhz.\n"
++ " * C-MULTI - Big Dish - Multipoint LNBf, 3700 to 4200 MHz,\n"
++ " Dual LO, H:5150MHz, V:5750MHz.\n"
++ " * One of the sec definitions from the secfile if supplied\n"
++ " -buffer <size> Custom DVR buffer size\n"
++ " -out decoder Output to hardware decoder (default)\n"
++ " decoderabypass Output to hardware decoder using audio bypass\n"
++ " dvr Output stream to dvr device\n"
++ " null Do not output anything\n"
++ " stdout Output to stdout\n"
++ " file <filename> Output stream to file\n"
++ " udp <address> <port> Output stream to address:port using udp\n"
++ " udpif <address> <port> <interface> Output stream to address:port using udp\n"
++ " forcing the specified interface\n"
++ " rtp <address> <port> Output stream to address:port using udp-rtp\n"
++ " rtpif <address> <port> <interface> Output stream to address:port using udp-rtp\n"
++ " forcing the specified interface\n"
++ " -timeout <secs> Number of seconds to output channel for\n"
++ " (0=>exit immediately after successful tuning, default is to output forever)\n"
++ " -cammenu Show the CAM menu\n"
++ " -nomoveca Do not attempt to move CA descriptors from stream to programme level\n"
++ " <channel name>\n";
++ fprintf(stderr, "%s\n", _usage);
++
++ exit(1);
++}
++
++int find_channel(struct dvbcfg_zapchannel *channel, void *private_data)
++{
++ struct dvbcfg_zapchannel *tmpchannel = private_data;
++
++ if (strcmp(channel->name, tmpchannel->name) == 0) {
++ memcpy(tmpchannel, channel, sizeof(struct dvbcfg_zapchannel));
++ return 1;
++ }
++
++ return 0;
++}
++
++int main(int argc, char *argv[])
++{
++ int adapter_id = 0;
++ int frontend_id = 0;
++ int demux_id = 0;
++ int caslot_num = 0;
++ char *chanfile = "/etc/channels.conf";
++ char *secfile = NULL;
++ char *secid = NULL;
++ char *channel_name = NULL;
++ int output_type = OUTPUT_TYPE_DECODER;
++ char *outfile = NULL;
++ char *outhost = NULL;
++ char *outport = NULL;
++ char *outif = NULL;
++ struct addrinfo *outaddrs = NULL;
++ int timeout = -1;
++ int moveca = 1;
++ int cammenu = 0;
++ int argpos = 1;
++ struct gnutv_dvb_params gnutv_dvb_params;
++ struct gnutv_ca_params gnutv_ca_params;
++ int ffaudiofd = -1;
++ int usertp = 0;
++ int buffer_size = 0;
++
++ while(argpos != argc) {
++ if (!strcmp(argv[argpos], "-h")) {
++ usage();
++ } else if (!strcmp(argv[argpos], "-adapter")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &adapter_id) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-frontend")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &frontend_id) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-demux")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &demux_id) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-caslotnum")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &caslot_num) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-channels")) {
++ if ((argc - argpos) < 2)
++ usage();
++ chanfile = argv[argpos+1];
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-secfile")) {
++ if ((argc - argpos) < 2)
++ usage();
++ secfile = argv[argpos+1];
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-secid")) {
++ if ((argc - argpos) < 2)
++ usage();
++ secid = argv[argpos+1];
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-buffer")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &buffer_size) != 1)
++ usage();
++ if (buffer_size < 0)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-out")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (!strcmp(argv[argpos+1], "decoder")) {
++ output_type = OUTPUT_TYPE_DECODER;
++ } else if (!strcmp(argv[argpos+1], "decoderabypass")) {
++ output_type = OUTPUT_TYPE_DECODER_ABYPASS;
++ } else if (!strcmp(argv[argpos+1], "dvr")) {
++ output_type = OUTPUT_TYPE_DVR;
++ } else if (!strcmp(argv[argpos+1], "null")) {
++ output_type = OUTPUT_TYPE_NULL;
++ } else if (!strcmp(argv[argpos+1], "stdout")) {
++ output_type = OUTPUT_TYPE_STDOUT;
++ } else if (!strcmp(argv[argpos+1], "file")) {
++ output_type = OUTPUT_TYPE_FILE;
++ if ((argc - argpos) < 3)
++ usage();
++ outfile = argv[argpos+2];
++ argpos++;
++ } else if ((!strcmp(argv[argpos+1], "udp")) ||
++ (!strcmp(argv[argpos+1], "rtp"))) {
++ output_type = OUTPUT_TYPE_UDP;
++ if ((argc - argpos) < 4)
++ usage();
++
++ if (!strcmp(argv[argpos+1], "rtp"))
++ usertp = 1;
++ outhost = argv[argpos+2];
++ outport = argv[argpos+3];
++ argpos+=2;
++ } else if ((!strcmp(argv[argpos+1], "udpif")) ||
++ (!strcmp(argv[argpos+1], "rtpif"))) {
++ output_type = OUTPUT_TYPE_UDP;
++ if ((argc - argpos) < 5)
++ usage();
++
++ if (!strcmp(argv[argpos+1], "rtpif"))
++ usertp = 1;
++ outhost = argv[argpos+2];
++ outport = argv[argpos+3];
++ outif = argv[argpos+4];
++ argpos+=3;
++ } else {
++ usage();
++ }
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-timeout")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &timeout) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-nomoveca")) {
++ moveca = 0;
++ argpos++;
++ } else if (!strcmp(argv[argpos], "-cammenu")) {
++ cammenu = 1;
++ argpos++;
++ } else {
++ if ((argc - argpos) != 1)
++ usage();
++ channel_name = argv[argpos];
++ argpos++;
++ }
++ }
++
++ // the user didn't select anything!
++ if ((channel_name == NULL) && (!cammenu))
++ usage();
++
++ // resolve host/port
++ if ((outhost != NULL) && (outport != NULL)) {
++ int res;
++ struct addrinfo hints;
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = AF_UNSPEC;
++ hints.ai_socktype = SOCK_DGRAM;
++ if ((res = getaddrinfo(outhost, outport, &hints, &outaddrs)) != 0) {
++ fprintf(stderr, "Unable to resolve requested address: %s\n", gai_strerror(res));
++ exit(1);
++ }
++ }
++
++ // setup any signals
++ signal(SIGINT, signal_handler);
++ signal(SIGPIPE, SIG_IGN);
++
++ // start the CA stuff
++ gnutv_ca_params.adapter_id = adapter_id;
++ gnutv_ca_params.caslot_num = caslot_num;
++ gnutv_ca_params.cammenu = cammenu;
++ gnutv_ca_params.moveca = moveca;
++ gnutv_ca_start(&gnutv_ca_params);
++
++ // frontend setup if a channel name was supplied
++ if ((!cammenu) && (channel_name != NULL)) {
++ // find the requested channel
++ if (strlen(channel_name) >= sizeof(gnutv_dvb_params.channel.name)) {
++ fprintf(stderr, "Channel name is too long %s\n", channel_name);
++ exit(1);
++ }
++ FILE *channel_file = fopen(chanfile, "r");
++ if (channel_file == NULL) {
++ fprintf(stderr, "Could open channel file %s\n", chanfile);
++ exit(1);
++ }
++ memcpy(gnutv_dvb_params.channel.name, channel_name, strlen(channel_name) + 1);
++ if (dvbcfg_zapchannel_parse(channel_file, find_channel, &gnutv_dvb_params.channel) != 1) {
++ fprintf(stderr, "Unable to find requested channel %s\n", channel_name);
++ exit(1);
++ }
++ fclose(channel_file);
++
++ // default SEC with a DVBS card
++ if ((secid == NULL) && (gnutv_dvb_params.channel.fe_type == DVBFE_TYPE_DVBS))
++ secid = "UNIVERSAL";
++
++ // look it up if one were supplied
++ gnutv_dvb_params.valid_sec = 0;
++ if (secid != NULL) {
++ if (dvbsec_cfg_find(secfile, secid,
++ &gnutv_dvb_params.sec)) {
++ fprintf(stderr, "Unable to find suitable sec/lnb configuration for channel\n");
++ exit(1);
++ }
++ gnutv_dvb_params.valid_sec = 1;
++ }
++
++ // open the frontend
++ gnutv_dvb_params.fe = dvbfe_open(adapter_id, frontend_id, 0);
++ if (gnutv_dvb_params.fe == NULL) {
++ fprintf(stderr, "Failed to open frontend\n");
++ exit(1);
++ }
++
++ // failover decoder to dvr output if decoder not available
++ if ((output_type == OUTPUT_TYPE_DECODER) ||
++ (output_type == OUTPUT_TYPE_DECODER_ABYPASS)) {
++ ffaudiofd = dvbaudio_open(adapter_id, 0);
++ if (ffaudiofd < 0) {
++ fprintf(stderr, "Cannot open decoder; defaulting to dvr output\n");
++ output_type = OUTPUT_TYPE_DVR;
++ }
++ }
++
++ // start the DVB stuff
++ gnutv_dvb_params.adapter_id = adapter_id;
++ gnutv_dvb_params.frontend_id = frontend_id;
++ gnutv_dvb_params.demux_id = demux_id;
++ gnutv_dvb_params.output_type = output_type;
++ gnutv_dvb_start(&gnutv_dvb_params);
++
++ // start the data stuff
++ gnutv_data_start(output_type, ffaudiofd, adapter_id, demux_id, buffer_size, outfile, outif, outaddrs, usertp);
++ }
++
++ // the UI
++ time_t start = 0;
++ while(!quit_app) {
++ if (gnutv_dvb_locked() && (start == 0))
++ start = time(NULL);
++
++ // the timeout
++ if ((timeout != -1) && (start != 0)) {
++ if ((time(NULL) - start) >= timeout)
++ break;
++ }
++
++ if (cammenu)
++ gnutv_ca_ui();
++ else
++ usleep(1);
++ }
++
++ // stop data handling
++ gnutv_data_stop();
++
++ // shutdown DVB stuff
++ if (channel_name != NULL)
++ gnutv_dvb_stop();
++
++ // shutdown CA stuff
++ gnutv_ca_stop();
++
++ // done
++ exit(0);
++}
++
++static void signal_handler(int _signal)
++{
++ (void) _signal;
++
++ if (!quit_app) {
++ quit_app = 1;
++ }
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_ca.c dvb-apps/util/gnutv/gnutv_ca.c
+--- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_ca.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/gnutv/gnutv_ca.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,404 @@
++/*
++ gnutv utility
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <sys/poll.h>
++#include <pthread.h>
++#include <libdvben50221/en50221_stdcam.h>
++#include "gnutv.h"
++#include "gnutv_ca.h"
++
++
++
++#define MMI_STATE_CLOSED 0
++#define MMI_STATE_OPEN 1
++#define MMI_STATE_ENQ 2
++#define MMI_STATE_MENU 3
++
++static int gnutv_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids);
++static int gnutv_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t application_type, uint16_t application_manufacturer,
++ uint16_t manufacturer_code, uint8_t menu_string_length,
++ uint8_t *menu_string);
++
++static int gnutv_mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t cmd_id, uint8_t delay);
++static int gnutv_mmi_display_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t cmd_id, uint8_t mmi_mode);
++static int gnutv_mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t blind_answer, uint8_t expected_answer_length,
++ uint8_t *text, uint32_t text_size);
++static int gnutv_mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ struct en50221_app_mmi_text *title,
++ struct en50221_app_mmi_text *sub_title,
++ struct en50221_app_mmi_text *bottom,
++ uint32_t item_count, struct en50221_app_mmi_text *items,
++ uint32_t item_raw_length, uint8_t *items_raw);
++static void *camthread_func(void* arg);
++
++static struct en50221_transport_layer *tl = NULL;
++static struct en50221_session_layer *sl = NULL;
++static struct en50221_stdcam *stdcam = NULL;
++
++static int ca_resource_connected = 0;
++static int mmi_state = MMI_STATE_CLOSED;
++static int mmi_enq_blind;
++static int mmi_enq_length;
++
++static int camthread_shutdown = 0;
++static pthread_t camthread;
++int moveca = 0;
++int seenpmt = 0;
++int cammenu = 0;
++
++char ui_line[256];
++uint32_t ui_linepos = 0;
++
++
++void gnutv_ca_start(struct gnutv_ca_params *params)
++{
++ // create transport layer
++ tl = en50221_tl_create(1, 16);
++ if (tl == NULL) {
++ fprintf(stderr, "Failed to create transport layer\n");
++ return;
++ }
++
++ // create session layer
++ sl = en50221_sl_create(tl, 16);
++ if (sl == NULL) {
++ fprintf(stderr, "Failed to create session layer\n");
++ en50221_tl_destroy(tl);
++ return;
++ }
++
++ // create the stdcam instance
++ stdcam = en50221_stdcam_create(params->adapter_id, params->caslot_num, tl, sl);
++ if (stdcam == NULL) {
++ en50221_sl_destroy(sl);
++ en50221_tl_destroy(tl);
++ return;
++ }
++
++ // hook up the AI callbacks
++ if (stdcam->ai_resource) {
++ en50221_app_ai_register_callback(stdcam->ai_resource, gnutv_ai_callback, stdcam);
++ }
++
++ // hook up the CA callbacks
++ if (stdcam->ca_resource) {
++ en50221_app_ca_register_info_callback(stdcam->ca_resource, gnutv_ca_info_callback, stdcam);
++ }
++
++ // hook up the MMI callbacks
++ if (params->cammenu) {
++ if (stdcam->mmi_resource) {
++ en50221_app_mmi_register_close_callback(stdcam->mmi_resource, gnutv_mmi_close_callback, stdcam);
++ en50221_app_mmi_register_display_control_callback(stdcam->mmi_resource, gnutv_mmi_display_control_callback, stdcam);
++ en50221_app_mmi_register_enq_callback(stdcam->mmi_resource, gnutv_mmi_enq_callback, stdcam);
++ en50221_app_mmi_register_menu_callback(stdcam->mmi_resource, gnutv_mmi_menu_callback, stdcam);
++ en50221_app_mmi_register_list_callback(stdcam->mmi_resource, gnutv_mmi_menu_callback, stdcam);
++ } else {
++ fprintf(stderr, "CAM Menus are not supported by this interface hardware\n");
++ exit(1);
++ }
++ }
++
++ // any other stuff
++ moveca = params->moveca;
++ cammenu = params->cammenu;
++
++ // start the cam thread
++ pthread_create(&camthread, NULL, camthread_func, NULL);
++}
++
++void gnutv_ca_stop(void)
++{
++ if (stdcam == NULL)
++ return;
++
++ // shutdown the cam thread
++ camthread_shutdown = 1;
++ pthread_join(camthread, NULL);
++
++ // destroy the stdcam
++ if (stdcam->destroy)
++ stdcam->destroy(stdcam, 1);
++
++ // destroy session layer
++ en50221_sl_destroy(sl);
++
++ // destroy transport layer
++ en50221_tl_destroy(tl);
++}
++
++void gnutv_ca_ui(void)
++{
++ // make up polling structure for stdin
++ struct pollfd pollfd;
++ pollfd.fd = 0;
++ pollfd.events = POLLIN|POLLPRI|POLLERR;
++
++ if (stdcam == NULL)
++ return;
++
++ // is there a character?
++ if (poll(&pollfd, 1, 10) != 1)
++ return;
++ if (pollfd.revents & POLLERR)
++ return;
++
++ // try to read the character
++ char c;
++ if (read(0, &c, 1) != 1)
++ return;
++ if (c == '\r') {
++ return;
++ } else if (c == '\n') {
++ switch(mmi_state) {
++ case MMI_STATE_CLOSED:
++ case MMI_STATE_OPEN:
++ if ((ui_linepos == 0) && (ca_resource_connected)) {
++ en50221_app_ai_entermenu(stdcam->ai_resource, stdcam->ai_session_number);
++ }
++ break;
++
++ case MMI_STATE_ENQ:
++ if (ui_linepos == 0) {
++ en50221_app_mmi_answ(stdcam->mmi_resource, stdcam->mmi_session_number,
++ MMI_ANSW_ID_CANCEL, NULL, 0);
++ } else {
++ en50221_app_mmi_answ(stdcam->mmi_resource, stdcam->mmi_session_number,
++ MMI_ANSW_ID_ANSWER, (uint8_t*) ui_line, ui_linepos);
++ }
++ mmi_state = MMI_STATE_OPEN;
++ break;
++
++ case MMI_STATE_MENU:
++ ui_line[ui_linepos] = 0;
++ en50221_app_mmi_menu_answ(stdcam->mmi_resource, stdcam->mmi_session_number,
++ atoi(ui_line));
++ mmi_state = MMI_STATE_OPEN;
++ break;
++ }
++ ui_linepos = 0;
++ } else {
++ if (ui_linepos < (sizeof(ui_line)-1)) {
++ ui_line[ui_linepos++] = c;
++ }
++ }
++}
++
++int gnutv_ca_new_pmt(struct mpeg_pmt_section *pmt)
++{
++ uint8_t capmt[4096];
++ int size;
++
++ if (stdcam == NULL)
++ return -1;
++
++ if (ca_resource_connected) {
++ fprintf(stderr, "Received new PMT - sending to CAM...\n");
++
++ // translate it into a CA PMT
++ int listmgmt = CA_LIST_MANAGEMENT_ONLY;
++ if (seenpmt) {
++ listmgmt = CA_LIST_MANAGEMENT_UPDATE;
++ }
++ seenpmt = 1;
++
++ if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), moveca, listmgmt,
++ CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
++ fprintf(stderr, "Failed to format PMT\n");
++ return -1;
++ }
++
++ // set it
++ if (en50221_app_ca_pmt(stdcam->ca_resource, stdcam->ca_session_number, capmt, size)) {
++ fprintf(stderr, "Failed to send PMT\n");
++ return -1;
++ }
++
++ // we've seen this PMT
++ return 1;
++ }
++
++ return 0;
++}
++
++void gnutv_ca_new_dvbtime(time_t dvb_time)
++{
++ if (stdcam == NULL)
++ return;
++
++ if (stdcam->dvbtime)
++ stdcam->dvbtime(stdcam, dvb_time);
++}
++
++static void *camthread_func(void* arg)
++{
++ (void) arg;
++ int entered_menu = 0;
++
++ while(!camthread_shutdown) {
++ stdcam->poll(stdcam);
++
++ if ((!entered_menu) && cammenu && ca_resource_connected && stdcam->mmi_resource) {
++ en50221_app_ai_entermenu(stdcam->ai_resource, stdcam->ai_session_number);
++ entered_menu = 1;
++ }
++ }
++
++ return 0;
++}
++
++static int gnutv_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t application_type, uint16_t application_manufacturer,
++ uint16_t manufacturer_code, uint8_t menu_string_length,
++ uint8_t *menu_string)
++{
++ (void) arg;
++ (void) slot_id;
++ (void) session_number;
++
++ fprintf(stderr, "CAM Application type: %02x\n", application_type);
++ fprintf(stderr, "CAM Application manufacturer: %04x\n", application_manufacturer);
++ fprintf(stderr, "CAM Manufacturer code: %04x\n", manufacturer_code);
++ fprintf(stderr, "CAM Menu string: %.*s\n", menu_string_length, menu_string);
++
++ return 0;
++}
++
++static int gnutv_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids)
++{
++ (void) arg;
++ (void) slot_id;
++ (void) session_number;
++
++ fprintf(stderr, "CAM supports the following ca system ids:\n");
++ uint32_t i;
++ for(i=0; i< ca_id_count; i++) {
++ fprintf(stderr, " 0x%04x\n", ca_ids[i]);
++ }
++ ca_resource_connected = 1;
++ return 0;
++}
++
++static int gnutv_mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t cmd_id, uint8_t delay)
++{
++ (void) arg;
++ (void) slot_id;
++ (void) session_number;
++ (void) cmd_id;
++ (void) delay;
++
++ // note: not entirely correct as its supposed to delay if asked
++ mmi_state = MMI_STATE_CLOSED;
++ return 0;
++}
++
++static int gnutv_mmi_display_control_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t cmd_id, uint8_t mmi_mode)
++{
++ struct en50221_app_mmi_display_reply_details reply;
++ (void) arg;
++ (void) slot_id;
++
++ // don't support any commands but set mode
++ if (cmd_id != MMI_DISPLAY_CONTROL_CMD_ID_SET_MMI_MODE) {
++ en50221_app_mmi_display_reply(stdcam->mmi_resource, session_number,
++ MMI_DISPLAY_REPLY_ID_UNKNOWN_CMD_ID, &reply);
++ return 0;
++ }
++
++ // we only support high level mode
++ if (mmi_mode != MMI_MODE_HIGH_LEVEL) {
++ en50221_app_mmi_display_reply(stdcam->mmi_resource, session_number,
++ MMI_DISPLAY_REPLY_ID_UNKNOWN_MMI_MODE, &reply);
++ return 0;
++ }
++
++ // ack the high level open
++ reply.u.mode_ack.mmi_mode = mmi_mode;
++ en50221_app_mmi_display_reply(stdcam->mmi_resource, session_number,
++ MMI_DISPLAY_REPLY_ID_MMI_MODE_ACK, &reply);
++ mmi_state = MMI_STATE_OPEN;
++ return 0;
++}
++
++static int gnutv_mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t blind_answer, uint8_t expected_answer_length,
++ uint8_t *text, uint32_t text_size)
++{
++ (void) arg;
++ (void) slot_id;
++ (void) session_number;
++
++ fprintf(stderr, "%.*s: ", text_size, text);
++ fflush(stdout);
++
++ mmi_enq_blind = blind_answer;
++ mmi_enq_length = expected_answer_length;
++ mmi_state = MMI_STATE_ENQ;
++ return 0;
++}
++
++static int gnutv_mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ struct en50221_app_mmi_text *title,
++ struct en50221_app_mmi_text *sub_title,
++ struct en50221_app_mmi_text *bottom,
++ uint32_t item_count, struct en50221_app_mmi_text *items,
++ uint32_t item_raw_length, uint8_t *items_raw)
++{
++ (void) arg;
++ (void) slot_id;
++ (void) session_number;
++ (void) item_raw_length;
++ (void) items_raw;
++
++ fprintf(stderr, "------------------------------\n");
++
++ if (title->text_length) {
++ fprintf(stderr, "%.*s\n", title->text_length, title->text);
++ }
++ if (sub_title->text_length) {
++ fprintf(stderr, "%.*s\n", sub_title->text_length, sub_title->text);
++ }
++
++ uint32_t i;
++ fprintf(stderr, "0. Quit menu\n");
++ for(i=0; i< item_count; i++) {
++ fprintf(stderr, "%i. %.*s\n", i+1, items[i].text_length, items[i].text);
++ }
++
++ if (bottom->text_length) {
++ fprintf(stderr, "%.*s\n", bottom->text_length, bottom->text);
++ }
++ fprintf(stderr, "Enter option: ");
++ fflush(stdout);
++
++ mmi_state = MMI_STATE_MENU;
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_ca.h dvb-apps/util/gnutv/gnutv_ca.h
+--- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_ca.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/gnutv/gnutv_ca.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,40 @@
++/*
++ gnutv utility
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#ifndef gnutv_CA_H
++#define gnutv_CA_H 1
++
++struct gnutv_ca_params {
++ int adapter_id;
++ int caslot_num;
++ int cammenu;
++ int moveca;
++};
++
++extern void gnutv_ca_start(struct gnutv_ca_params *params);
++extern void gnutv_ca_ui(void);
++extern void gnutv_ca_stop(void);
++
++extern int gnutv_ca_new_pmt(struct mpeg_pmt_section *pmt);
++extern void gnutv_ca_new_dvbtime(time_t dvb_time);
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_data.c dvb-apps/util/gnutv/gnutv_data.c
+--- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_data.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/gnutv/gnutv_data.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,483 @@
++/*
++ gnutv utility
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#define _FILE_OFFSET_BITS 64
++#define _LARGEFILE_SOURCE 1
++#define _LARGEFILE64_SOURCE 1
++
++#include <stdio.h>
++#include <unistd.h>
++#include <limits.h>
++#include <string.h>
++#include <fcntl.h>
++#include <signal.h>
++#include <pthread.h>
++#include <errno.h>
++#include <sys/poll.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <libdvbapi/dvbdemux.h>
++#include <libdvbapi/dvbaudio.h>
++#include <libucsi/mpeg/section.h>
++#include "gnutv.h"
++#include "gnutv_dvb.h"
++#include "gnutv_ca.h"
++#include "gnutv_data.h"
++
++static void *fileoutputthread_func(void* arg);
++static void *udpoutputthread_func(void* arg);
++
++static int gnutv_data_create_decoder_filter(int adapter, int demux, uint16_t pid, int pestype);
++static int gnutv_data_create_dvr_filter(int adapter, int demux, uint16_t pid);
++
++static void gnutv_data_decoder_pmt(struct mpeg_pmt_section *pmt);
++static void gnutv_data_dvr_pmt(struct mpeg_pmt_section *pmt);
++
++static void gnutv_data_append_pid_fd(int pid, int fd);
++static void gnutv_data_free_pid_fds(void);
++
++static pthread_t outputthread;
++static int outfd = -1;
++static int dvrfd = -1;
++static int pat_fd_dvrout = -1;
++static int pmt_fd_dvrout = -1;
++static int outputthread_shutdown = 0;
++
++static int usertp = 0;
++static int adapter_id = -1;
++static int demux_id = -1;
++static int output_type = 0;
++static struct addrinfo *outaddrs = NULL;
++
++struct pid_fd {
++ int pid;
++ int fd;
++};
++static struct pid_fd *pid_fds = NULL;
++static int pid_fds_count = 0;
++
++void gnutv_data_start(int _output_type,
++ int ffaudiofd, int _adapter_id, int _demux_id, int buffer_size,
++ char *outfile,
++ char* outif, struct addrinfo *_outaddrs, int _usertp)
++{
++ usertp = _usertp;
++ demux_id = _demux_id;
++ adapter_id = _adapter_id;
++ output_type = _output_type;
++
++ // setup output
++ switch(output_type) {
++ case OUTPUT_TYPE_DECODER:
++ case OUTPUT_TYPE_DECODER_ABYPASS:
++ dvbaudio_set_bypass(ffaudiofd, (output_type == OUTPUT_TYPE_DECODER_ABYPASS) ? 1 : 0);
++ close(ffaudiofd);
++ break;
++
++ case OUTPUT_TYPE_STDOUT:
++ case OUTPUT_TYPE_FILE:
++ if (output_type == OUTPUT_TYPE_FILE) {
++ // open output file
++ outfd = open(outfile, O_WRONLY|O_CREAT|O_LARGEFILE|O_TRUNC, 0644);
++ if (outfd < 0) {
++ fprintf(stderr, "Failed to open output file\n");
++ exit(1);
++ }
++ } else {
++ outfd = STDOUT_FILENO;
++ }
++
++ // open dvr device
++ dvrfd = dvbdemux_open_dvr(adapter_id, 0, 1, 0);
++ if (dvrfd < 0) {
++ fprintf(stderr, "Failed to open DVR device\n");
++ exit(1);
++ }
++
++ // optionally set dvr buffer size
++ if (buffer_size > 0) {
++ if (dvbdemux_set_buffer(dvrfd, buffer_size) != 0) {
++ fprintf(stderr, "Failed to set DVR buffer size\n");
++ exit(1);
++ }
++ }
++
++ pthread_create(&outputthread, NULL, fileoutputthread_func, NULL);
++ break;
++
++ case OUTPUT_TYPE_UDP:
++ outaddrs = _outaddrs;
++
++ // open output socket
++ outfd = socket(outaddrs->ai_family, outaddrs->ai_socktype, outaddrs->ai_protocol);
++ if (outfd < 0) {
++ fprintf(stderr, "Failed to open output socket\n");
++ exit(1);
++ }
++
++ // bind to local interface if requested
++ if (outif != NULL) {
++ if (setsockopt(outfd, SOL_SOCKET, SO_BINDTODEVICE, outif, strlen(outif)) < 0) {
++ fprintf(stderr, "Failed to bind to interface %s\n", outif);
++ exit(1);
++ }
++ }
++
++ // open dvr device
++ dvrfd = dvbdemux_open_dvr(adapter_id, 0, 1, 0);
++ if (dvrfd < 0) {
++ fprintf(stderr, "Failed to open DVR device\n");
++ exit(1);
++ }
++
++ // optionally set dvr buffer size
++ if (buffer_size > 0) {
++ if (dvbdemux_set_buffer(dvrfd, buffer_size) != 0) {
++ fprintf(stderr, "Failed to set DVR buffer size\n");
++ exit(1);
++ }
++ }
++
++ pthread_create(&outputthread, NULL, udpoutputthread_func, NULL);
++ break;
++ }
++
++ // output PAT to DVR if requested
++ switch(output_type) {
++ case OUTPUT_TYPE_DVR:
++ case OUTPUT_TYPE_FILE:
++ case OUTPUT_TYPE_STDOUT:
++ case OUTPUT_TYPE_UDP:
++ pat_fd_dvrout = gnutv_data_create_dvr_filter(adapter_id, demux_id, TRANSPORT_PAT_PID);
++ }
++}
++
++void gnutv_data_stop()
++{
++ // shutdown output thread if necessary
++ if (dvrfd != -1) {
++ outputthread_shutdown = 1;
++ pthread_join(outputthread, NULL);
++ }
++ gnutv_data_free_pid_fds();
++ if (pat_fd_dvrout != -1)
++ close(pat_fd_dvrout);
++ if (pmt_fd_dvrout != -1)
++ close(pmt_fd_dvrout);
++ if (outaddrs)
++ freeaddrinfo(outaddrs);
++}
++
++void gnutv_data_new_pat(int pmt_pid)
++{
++ // output PMT to DVR if requested
++ switch(output_type) {
++ case OUTPUT_TYPE_DVR:
++ case OUTPUT_TYPE_FILE:
++ case OUTPUT_TYPE_STDOUT:
++ case OUTPUT_TYPE_UDP:
++ if (pmt_fd_dvrout != -1)
++ close(pmt_fd_dvrout);
++ pmt_fd_dvrout = gnutv_data_create_dvr_filter(adapter_id, demux_id, pmt_pid);
++ }
++}
++
++int gnutv_data_new_pmt(struct mpeg_pmt_section *pmt)
++{
++ // close all old PID FDs
++ gnutv_data_free_pid_fds();
++
++ // deal with the PMT appropriately
++ switch(output_type) {
++ case OUTPUT_TYPE_DECODER:
++ case OUTPUT_TYPE_DECODER_ABYPASS:
++ gnutv_data_decoder_pmt(pmt);
++ break;
++
++ case OUTPUT_TYPE_DVR:
++ case OUTPUT_TYPE_FILE:
++ case OUTPUT_TYPE_STDOUT:
++ case OUTPUT_TYPE_UDP:
++ gnutv_data_dvr_pmt(pmt);
++ break;
++ }
++
++ return 1;
++}
++
++static void *fileoutputthread_func(void* arg)
++{
++ (void)arg;
++ uint8_t buf[4096];
++ struct pollfd pollfd;
++ int written;
++
++ pollfd.fd = dvrfd;
++ pollfd.events = POLLIN|POLLPRI|POLLERR;
++
++ while(!outputthread_shutdown) {
++ if (poll(&pollfd, 1, 1000) == -1) {
++ if (errno == EINTR)
++ continue;
++ fprintf(stderr, "DVR device poll failure\n");
++ return 0;
++ }
++
++ if (pollfd.revents == 0)
++ continue;
++
++ int size = read(dvrfd, buf, sizeof(buf));
++ if (size < 0) {
++ if (errno == EINTR)
++ continue;
++
++ if (errno == EOVERFLOW) {
++ // The error flag has been cleared, next read should succeed.
++ fprintf(stderr, "DVR overflow\n");
++ continue;
++ }
++
++ fprintf(stderr, "DVR device read failure\n");
++ return 0;
++ }
++
++ written = 0;
++ while(written < size) {
++ int tmp = write(outfd, buf + written, size - written);
++ if (tmp == -1) {
++ if (errno != EINTR) {
++ fprintf(stderr, "Write error: %m\n");
++ break;
++ }
++ } else {
++ written += tmp;
++ }
++ }
++ }
++
++ return 0;
++}
++
++#define TS_PAYLOAD_SIZE (188*7)
++
++static void *udpoutputthread_func(void* arg)
++{
++ (void)arg;
++ uint8_t buf[12 + TS_PAYLOAD_SIZE];
++ struct pollfd pollfd;
++ int bufsize = 0;
++ int bufbase = 0;
++ int readsize;
++ uint16_t rtpseq = 0;
++
++ pollfd.fd = dvrfd;
++ pollfd.events = POLLIN|POLLPRI|POLLERR;
++
++ if (usertp) {
++ srandom(time(NULL));
++ int ssrc = random();
++ rtpseq = random();
++ buf[0x0] = 0x80;
++ buf[0x1] = 0x21;
++ buf[0x4] = 0x00; // }
++ buf[0x5] = 0x00; // } FIXME: should really be a valid stamp
++ buf[0x6] = 0x00; // }
++ buf[0x7] = 0x00; // }
++ buf[0x8] = ssrc >> 24;
++ buf[0x9] = ssrc >> 16;
++ buf[0xa] = ssrc >> 8;
++ buf[0xb] = ssrc;
++ bufbase = 12;
++ }
++
++ while(!outputthread_shutdown) {
++ if (poll(&pollfd, 1, 1000) != 1)
++ continue;
++ if (pollfd.revents & POLLERR) {
++ if (errno == EINTR)
++ continue;
++ fprintf(stderr, "DVR device read failure\n");
++ return 0;
++ }
++
++ readsize = TS_PAYLOAD_SIZE - bufsize;
++ readsize = read(dvrfd, buf + bufbase + bufsize, readsize);
++ if (readsize < 0) {
++ if (errno == EINTR)
++ continue;
++ fprintf(stderr, "DVR device read failure\n");
++ return 0;
++ }
++ bufsize += readsize;
++
++ if (bufsize == TS_PAYLOAD_SIZE) {
++ if (usertp) {
++ buf[2] = rtpseq >> 8;
++ buf[3] = rtpseq;
++ }
++ if (sendto(outfd, buf, bufbase + bufsize, 0, outaddrs->ai_addr, outaddrs->ai_addrlen) < 0) {
++ if (errno != EINTR) {
++ fprintf(stderr, "Socket send failure: %m\n");
++ return 0;
++ }
++ }
++ rtpseq++;
++ bufsize = 0;
++ }
++ }
++
++ if (bufsize) {
++ if (usertp) {
++ buf[2] = rtpseq >> 8;
++ buf[3] = rtpseq;
++ }
++ if (sendto(outfd, buf, bufbase + bufsize, 0, outaddrs->ai_addr, outaddrs->ai_addrlen) < 0) {
++ if (errno != EINTR)
++ fprintf(stderr, "Socket send failure: %m\n");
++ }
++ }
++
++ return 0;
++}
++
++static int gnutv_data_create_decoder_filter(int adapter, int demux, uint16_t pid, int pestype)
++{
++ int demux_fd = -1;
++
++ // open the demuxer
++ if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
++ return -1;
++ }
++
++ // create a section filter
++ if (dvbdemux_set_pes_filter(demux_fd, pid, DVBDEMUX_INPUT_FRONTEND, DVBDEMUX_OUTPUT_DECODER, pestype, 1)) {
++ close(demux_fd);
++ return -1;
++ }
++
++ // done
++ return demux_fd;
++}
++
++static int gnutv_data_create_dvr_filter(int adapter, int demux, uint16_t pid)
++{
++ int demux_fd = -1;
++
++ // open the demuxer
++ if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
++ return -1;
++ }
++
++ // create a section filter
++ if (dvbdemux_set_pid_filter(demux_fd, pid, DVBDEMUX_INPUT_FRONTEND, DVBDEMUX_OUTPUT_DVR, 1)) {
++ close(demux_fd);
++ return -1;
++ }
++
++ // done
++ return demux_fd;
++}
++
++static void gnutv_data_decoder_pmt(struct mpeg_pmt_section *pmt)
++{
++ int audio_pid = -1;
++ int video_pid = -1;
++ struct mpeg_pmt_stream *cur_stream;
++ mpeg_pmt_section_streams_for_each(pmt, cur_stream) {
++ switch(cur_stream->stream_type) {
++ case 1:
++ case 2: // video
++ video_pid = cur_stream->pid;
++ break;
++
++ case 3:
++ case 4: // audio
++ audio_pid = cur_stream->pid;
++ break;
++ }
++ }
++
++ if (audio_pid != -1) {
++ int fd = gnutv_data_create_decoder_filter(adapter_id, demux_id, audio_pid, DVBDEMUX_PESTYPE_AUDIO);
++ if (fd < 0) {
++ fprintf(stderr, "Unable to create dvr filter for PID %i\n", audio_pid);
++ } else {
++ gnutv_data_append_pid_fd(audio_pid, fd);
++ }
++ }
++ if (video_pid != -1) {
++ int fd = gnutv_data_create_decoder_filter(adapter_id, demux_id, video_pid, DVBDEMUX_PESTYPE_VIDEO);
++ if (fd < 0) {
++ fprintf(stderr, "Unable to create dvr filter for PID %i\n", video_pid);
++ } else {
++ gnutv_data_append_pid_fd(video_pid, fd);
++ }
++ }
++ int fd = gnutv_data_create_decoder_filter(adapter_id, demux_id, pmt->pcr_pid, DVBDEMUX_PESTYPE_PCR);
++ if (fd < 0) {
++ fprintf(stderr, "Unable to create dvr filter for PID %i\n", pmt->pcr_pid);
++ } else {
++ gnutv_data_append_pid_fd(pmt->pcr_pid, fd);
++ }
++}
++
++static void gnutv_data_dvr_pmt(struct mpeg_pmt_section *pmt)
++{
++ struct mpeg_pmt_stream *cur_stream;
++ mpeg_pmt_section_streams_for_each(pmt, cur_stream) {
++ int fd = gnutv_data_create_dvr_filter(adapter_id, demux_id, cur_stream->pid);
++ if (fd < 0) {
++ fprintf(stderr, "Unable to create dvr filter for PID %i\n", cur_stream->pid);
++ } else {
++ gnutv_data_append_pid_fd(cur_stream->pid, fd);
++ }
++ }
++}
++
++static void gnutv_data_append_pid_fd(int pid, int fd)
++{
++ struct pid_fd *tmp;
++ if ((tmp = realloc(pid_fds, (pid_fds_count +1) * sizeof(struct pid_fd))) == NULL) {
++ fprintf(stderr, "Out of memory when adding a new pid_fd\n");
++ exit(1);
++ }
++ tmp[pid_fds_count].pid = pid;
++ tmp[pid_fds_count].fd = fd;
++ pid_fds_count++;
++ pid_fds = tmp;
++}
++
++static void gnutv_data_free_pid_fds()
++{
++ if (pid_fds_count) {
++ int i;
++ for(i=0; i< pid_fds_count; i++) {
++ close(pid_fds[i].fd);
++ }
++ }
++ if (pid_fds)
++ free(pid_fds);
++
++ pid_fds_count = 0;
++ pid_fds = NULL;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_data.h dvb-apps/util/gnutv/gnutv_data.h
+--- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_data.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/gnutv/gnutv_data.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,39 @@
++/*
++ gnutv utility
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#ifndef gnutv_DATA_H
++#define gnutv_DATA_H 1
++
++#include <netdb.h>
++
++extern void gnutv_data_start(int output_type,
++ int ffaudiofd, int adapter_id, int demux_id, int buffer_size,
++ char *outfile,
++ char* outif, struct addrinfo *outaddrs, int usertp);
++extern void gnutv_data_stop(void);
++
++extern void gnutv_data_new_pat(int pmt_pid);
++extern int gnutv_data_new_pmt(struct mpeg_pmt_section *pmt);
++
++
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_dvb.c dvb-apps/util/gnutv/gnutv_dvb.c
+--- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_dvb.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/gnutv/gnutv_dvb.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,376 @@
++/*
++ gnutv utility
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <limits.h>
++#include <string.h>
++#include <signal.h>
++#include <pthread.h>
++#include <errno.h>
++#include <sys/poll.h>
++#include <libdvbapi/dvbdemux.h>
++#include <libucsi/section.h>
++#include <libucsi/mpeg/section.h>
++#include <libucsi/dvb/section.h>
++#include "gnutv.h"
++#include "gnutv_dvb.h"
++#include "gnutv_data.h"
++#include "gnutv_ca.h"
++
++#define FE_STATUS_PARAMS (DVBFE_INFO_LOCKSTATUS|DVBFE_INFO_SIGNAL_STRENGTH|DVBFE_INFO_BER|DVBFE_INFO_SNR|DVBFE_INFO_UNCORRECTED_BLOCKS)
++
++static int dvbthread_shutdown = 0;
++static pthread_t dvbthread;
++static int tune_state = 0;
++
++static int pat_version = -1;
++static int ca_pmt_version = -1;
++static int data_pmt_version = -1;
++
++static void *dvbthread_func(void* arg);
++
++static void process_pat(int pat_fd, struct gnutv_dvb_params *params, int *pmt_fd, struct pollfd *pollfd);
++static void process_tdt(int tdt_fd);
++static void process_pmt(int pmt_fd, struct gnutv_dvb_params *params);
++static int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id);
++
++
++int gnutv_dvb_start(struct gnutv_dvb_params *params)
++{
++ pthread_create(&dvbthread, NULL, dvbthread_func, (void*) params);
++ return 0;
++}
++
++void gnutv_dvb_stop(void)
++{
++ dvbthread_shutdown = 1;
++ pthread_join(dvbthread, NULL);
++}
++
++int gnutv_dvb_locked(void)
++{
++ return tune_state == 2;
++}
++
++static void *dvbthread_func(void* arg)
++{
++ int pat_fd = -1;
++ int pmt_fd = -1;
++ int tdt_fd = -1;
++ struct pollfd pollfds[3];
++
++ struct gnutv_dvb_params *params = (struct gnutv_dvb_params *) arg;
++
++ tune_state = 0;
++
++ // create PAT filter
++ if ((pat_fd = create_section_filter(params->adapter_id, params->demux_id,
++ TRANSPORT_PAT_PID, stag_mpeg_program_association)) < 0) {
++ fprintf(stderr, "Failed to create PAT section filter\n");
++ exit(1);
++ }
++ pollfds[0].fd = pat_fd;
++ pollfds[0].events = POLLIN|POLLPRI|POLLERR;
++
++ // create TDT filter
++ if ((tdt_fd = create_section_filter(params->adapter_id, params->demux_id, TRANSPORT_TDT_PID, stag_dvb_time_date)) < 0) {
++ fprintf(stderr, "Failed to create TDT section filter\n");
++ exit(1);
++ }
++ pollfds[1].fd = tdt_fd;
++ pollfds[1].events = POLLIN|POLLPRI|POLLERR;
++
++ // zero PMT filter
++ pollfds[2].fd = 0;
++ pollfds[2].events = 0;
++
++ // the DVB loop
++ while(!dvbthread_shutdown) {
++ // tune frontend + monitor lock status
++ if (tune_state == 0) {
++ // get the type of frontend
++ struct dvbfe_info result;
++ char *types;
++ memset(&result, 0, sizeof(result));
++ dvbfe_get_info(params->fe, 0, &result, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
++ switch(result.type) {
++ case DVBFE_TYPE_DVBS:
++ types = "DVB-S";
++ break;
++ case DVBFE_TYPE_DVBC:
++ types = "DVB-C";
++ break;
++ case DVBFE_TYPE_DVBT:
++ types = "DVB-T";
++ break;
++ case DVBFE_TYPE_ATSC:
++ types = "ATSC";
++ break;
++ default:
++ types = "Unknown";
++ }
++ fprintf(stderr, "Using frontend \"%s\", type %s\n", result.name, types);
++
++ // do we have a valid SEC configuration?
++ struct dvbsec_config *sec = NULL;
++ if (params->valid_sec)
++ sec = &params->sec;
++
++ // tune!
++ if (dvbsec_set(params->fe,
++ sec,
++ params->channel.polarization,
++ (params->channel.diseqc_switch & 0x01) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
++ (params->channel.diseqc_switch & 0x02) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
++ &params->channel.fe_params,
++ 0)) {
++ fprintf(stderr, "Failed to set frontend\n");
++ exit(1);
++ }
++
++ tune_state++;
++ } else if (tune_state == 1) {
++ struct dvbfe_info result;
++ memset(&result, 0, sizeof(result));
++ dvbfe_get_info(params->fe,
++ FE_STATUS_PARAMS,
++ &result,
++ DVBFE_INFO_QUERYTYPE_IMMEDIATE,
++ 0);
++
++ fprintf(stderr, "status %c%c%c%c%c | signal %04x | snr %04x | ber %08x | unc %08x | %s\r",
++ result.signal ? 'S' : ' ',
++ result.carrier ? 'C' : ' ',
++ result.viterbi ? 'V' : ' ',
++ result.sync ? 'Y' : ' ',
++ result.lock ? 'L' : ' ',
++ result.signal_strength,
++ result.snr,
++ result.ber,
++ result.ucblocks,
++ result.lock ? "FE_HAS_LOCK" : "");
++ fflush(stderr);
++
++ if (result.lock) {
++ tune_state++;
++ fprintf(stderr, "\n");
++ fflush(stderr);
++ } else {
++ usleep(500000);
++ }
++ }
++
++ // is there SI data?
++ int count = poll(pollfds, 3, 100);
++ if (count < 0) {
++ if (errno != EINTR)
++ fprintf(stderr, "Poll error: %m\n");
++ break;
++ }
++ if (count == 0) {
++ continue;
++ }
++
++ // PAT
++ if (pollfds[0].revents & (POLLIN|POLLPRI)) {
++ process_pat(pat_fd, params, &pmt_fd, &pollfds[2]);
++ }
++
++ // TDT
++ if (pollfds[1].revents & (POLLIN|POLLPRI)) {
++ process_tdt(tdt_fd);
++ }
++
++ // PMT
++ if (pollfds[2].revents & (POLLIN|POLLPRI)) {
++ process_pmt(pmt_fd, params);
++ }
++ }
++
++ // close demuxers
++ if (pat_fd != -1)
++ close(pat_fd);
++ if (pmt_fd != -1)
++ close(pmt_fd);
++ if (tdt_fd != -1)
++ close(tdt_fd);
++
++ return 0;
++}
++
++static void process_pat(int pat_fd, struct gnutv_dvb_params *params, int *pmt_fd, struct pollfd *pollfd)
++{
++ int size;
++ uint8_t sibuf[4096];
++
++ // read the section
++ if ((size = read(pat_fd, sibuf, sizeof(sibuf))) < 0) {
++ return;
++ }
++
++ // parse section
++ struct section *section = section_codec(sibuf, size);
++ if (section == NULL) {
++ return;
++ }
++
++ // parse section_ext
++ struct section_ext *section_ext = section_ext_decode(section, 0);
++ if (section_ext == NULL) {
++ return;
++ }
++ if (pat_version == section_ext->version_number) {
++ return;
++ }
++
++ // parse PAT
++ struct mpeg_pat_section *pat = mpeg_pat_section_codec(section_ext);
++ if (pat == NULL) {
++ return;
++ }
++
++ // try and find the requested program
++ struct mpeg_pat_program *cur_program;
++ mpeg_pat_section_programs_for_each(pat, cur_program) {
++ if (cur_program->program_number == params->channel.service_id) {
++ // close old PMT fd
++ if (*pmt_fd != -1)
++ close(*pmt_fd);
++
++ // create PMT filter
++ if ((*pmt_fd = create_section_filter(params->adapter_id, params->demux_id,
++ cur_program->pid, stag_mpeg_program_map)) < 0) {
++ return;
++ }
++ pollfd->fd = *pmt_fd;
++ pollfd->events = POLLIN|POLLPRI|POLLERR;
++
++ gnutv_data_new_pat(cur_program->pid);
++
++ // we have a new PMT pid
++ data_pmt_version = -1;
++ ca_pmt_version = -1;
++ break;
++ }
++ }
++
++ // remember the PAT version
++ pat_version = section_ext->version_number;
++}
++
++static void process_tdt(int tdt_fd)
++{
++ int size;
++ uint8_t sibuf[4096];
++
++ // read the section
++ if ((size = read(tdt_fd, sibuf, sizeof(sibuf))) < 0) {
++ return;
++ }
++
++ // parse section
++ struct section *section = section_codec(sibuf, size);
++ if (section == NULL) {
++ return;
++ }
++
++ // parse TDT
++ struct dvb_tdt_section *tdt = dvb_tdt_section_codec(section);
++ if (tdt == NULL) {
++ return;
++ }
++
++ // done
++ gnutv_ca_new_dvbtime(dvbdate_to_unixtime(tdt->utc_time));
++}
++
++static void process_pmt(int pmt_fd, struct gnutv_dvb_params *params)
++{
++ int size;
++ uint8_t sibuf[4096];
++
++ // read the section
++ if ((size = read(pmt_fd, sibuf, sizeof(sibuf))) < 0) {
++ return;
++ }
++
++ // parse section
++ struct section *section = section_codec(sibuf, size);
++ if (section == NULL) {
++ return;
++ }
++
++ // parse section_ext
++ struct section_ext *section_ext = section_ext_decode(section, 0);
++ if (section_ext == NULL) {
++ return;
++ }
++ if ((section_ext->table_id_ext != params->channel.service_id) ||
++ ((section_ext->version_number == data_pmt_version) &&
++ (section_ext->version_number == ca_pmt_version))) {
++ return;
++ }
++
++ // parse PMT
++ struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(section_ext);
++ if (pmt == NULL) {
++ return;
++ }
++
++ // do data handling
++ if (section_ext->version_number != data_pmt_version) {
++ if (gnutv_data_new_pmt(pmt) == 1)
++ data_pmt_version = pmt->head.version_number;
++ }
++
++ // do ca handling
++ if (section_ext->version_number != ca_pmt_version) {
++ if (gnutv_ca_new_pmt(pmt) == 1)
++ ca_pmt_version = pmt->head.version_number;
++ }
++}
++
++static int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id)
++{
++ int demux_fd = -1;
++ uint8_t filter[18];
++ uint8_t mask[18];
++
++ // open the demuxer
++ if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
++ return -1;
++ }
++
++ // create a section filter
++ memset(filter, 0, sizeof(filter));
++ memset(mask, 0, sizeof(mask));
++ filter[0] = table_id;
++ mask[0] = 0xFF;
++ if (dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) {
++ close(demux_fd);
++ return -1;
++ }
++
++ // done
++ return demux_fd;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_dvb.h dvb-apps/util/gnutv/gnutv_dvb.h
+--- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv_dvb.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/gnutv/gnutv_dvb.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,44 @@
++/*
++ gnutv utility
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#ifndef gnutv_DVB_H
++#define gnutv_DVB_H 1
++
++#include <libdvbcfg/dvbcfg_zapchannel.h>
++#include <libdvbsec/dvbsec_api.h>
++
++struct gnutv_dvb_params {
++ int adapter_id;
++ int frontend_id;
++ int demux_id;
++ struct dvbcfg_zapchannel channel;
++ struct dvbsec_config sec;
++ int valid_sec;
++ int output_type;
++ struct dvbfe_handle *fe;
++};
++
++extern int gnutv_dvb_start(struct gnutv_dvb_params *params);
++extern void gnutv_dvb_stop(void);
++extern int gnutv_dvb_locked(void);
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv.h dvb-apps/util/gnutv/gnutv.h
+--- linuxtv-dvb-apps-1.1.1/util/gnutv/gnutv.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/gnutv/gnutv.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,37 @@
++/*
++ gnutv utility
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#ifndef __CA_gnutv_H__
++#define __CA_gnutv_H__
++
++#include <stdlib.h>
++#include <stdint.h>
++
++#define OUTPUT_TYPE_DECODER 0
++#define OUTPUT_TYPE_DECODER_ABYPASS 1
++#define OUTPUT_TYPE_DVR 2
++#define OUTPUT_TYPE_NULL 3
++#define OUTPUT_TYPE_FILE 4
++#define OUTPUT_TYPE_UDP 5
++#define OUTPUT_TYPE_STDOUT 6
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/gnutv/Makefile dvb-apps/util/gnutv/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/gnutv/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/gnutv/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,21 @@
++# Makefile for linuxtv.org dvb-apps/util/gnutv
++
++objects = gnutv_ca.o \
++ gnutv_dvb.o \
++ gnutv_data.o
++
++binaries = gnutv
++
++inst_bin = $(binaries)
++
++CPPFLAGS += -I../../lib
++LDFLAGS += -L../../lib/libdvbapi -L../../lib/libdvbcfg -L../../lib/libdvbsec -L../../lib/libdvben50221 -L../../lib/libucsi
++LDLIBS += -ldvbcfg -ldvben50221 -lucsi -ldvbsec -ldvbapi -lpthread
++
++.PHONY: all
++
++all: $(binaries)
++
++$(binaries): $(objects)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/lib/lnb.c dvb-apps/util/lib/lnb.c
+--- linuxtv-dvb-apps-1.1.1/util/lib/lnb.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/lib/lnb.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,101 +0,0 @@
+-#include <stdlib.h>
+-#include <string.h>
+-#include <ctype.h>
+-#include "lnb.h"
+-
+-static char *univ_desc[] = {
+- "Europe",
+- "10800 to 11800 MHz and 11600 to 12700 Mhz",
+- "Dual LO, loband 9750, hiband 10600 MHz",
+- (char *)NULL };
+-
+-static char *dbs_desc[] = {
+- "Expressvu, North America",
+- "12200 to 12700 MHz",
+- "Single LO, 11250 MHz",
+- (char *)NULL };
+-
+-static char *standard_desc[] = {
+- "10945 to 11450 Mhz",
+- "Single LO, 10000 Mhz",
+- (char *)NULL };
+-
+-static char *enhan_desc[] = {
+- "Astra",
+- "10700 to 11700 MHz",
+- "Single LO, 9750 MHz",
+- (char *)NULL };
+-
+-static char *cband_desc[] = {
+- "Big Dish",
+- "3700 to 4200 MHz",
+- "Single LO, 5150 Mhz",
+- (char *)NULL };
+-
+-static struct lnb_types_st lnbs[] = {
+- {"UNIVERSAL", univ_desc, 9750, 10600, 11700 },
+- {"DBS", dbs_desc, 11250, 0, 0 },
+- {"STANDARD", standard_desc, 10000, 0, 0 },
+- {"ENHANCED", enhan_desc, 9750, 0, 0 },
+- {"C-BAND", cband_desc, 5150, 0, 0 }
+-};
+-
+-/* Enumerate through standard types of LNB's until NULL returned.
+- * Increment curno each time
+- */
+-
+-struct lnb_types_st *
+-lnb_enum(int curno)
+-{
+- if (curno >= sizeof(lnbs) / sizeof(lnbs[0]))
+- return (struct lnb_types_st *)NULL;
+- return &lnbs[curno];
+-}
+-
+-/* Decode an lnb type, for example given on a command line
+- * If alpha and standard type, e.g. "Universal" then match that
+- * otherwise low[,high[,switch]]
+- */
+-
+-int
+-lnb_decode(char *str, struct lnb_types_st *lnbp)
+-{
+-int i;
+-char *cp, *np;
+-
+- memset(lnbp, 0, sizeof(*lnbp));
+- cp = str;
+- while(*cp && isspace(*cp))
+- cp++;
+- if (isalpha(*cp)) {
+- for(i = 0; i < (sizeof(lnbs) / sizeof(lnbs[0])); i++) {
+- if (!strcasecmp(lnbs[i].name, cp)) {
+- *lnbp = lnbs[i];
+- return 1;
+- }
+- }
+- return -1;
+- }
+- if (*cp == '\0' || !isdigit(*cp))
+- return -1;
+- lnbp->low_val = strtoul(cp, &np, 0);
+- if (lnbp->low_val == 0)
+- return -1;
+- cp = np;
+- while(*cp && (isspace(*cp) || *cp == ','))
+- cp++;
+- if (*cp == '\0')
+- return 1;
+- if (!isdigit(*cp))
+- return -1;
+- lnbp->high_val = strtoul(cp, &np, 0);
+- cp = np;
+- while(*cp && (isspace(*cp) || *cp == ','))
+- cp++;
+- if (*cp == '\0')
+- return 1;
+- if (!isdigit(*cp))
+- return -1;
+- lnbp->switch_val = strtoul(cp, NULL, 0);
+- return 1;
+-}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/lib/lnb.h dvb-apps/util/lib/lnb.h
+--- linuxtv-dvb-apps-1.1.1/util/lib/lnb.h 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/lib/lnb.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,24 +0,0 @@
+-
+-struct lnb_types_st {
+- char *name;
+- char **desc;
+- unsigned long low_val;
+- unsigned long high_val; /* zero indicates no hiband */
+- unsigned long switch_val; /* zero indicates no hiband */
+-};
+-
+-/* Enumerate through standard types of LNB's until NULL returned.
+- * Increment curno each time
+- */
+-
+-struct lnb_types_st *
+-lnb_enum(int curno);
+-
+-/* Decode an lnb type, for example given on a command line
+- * If alpha and standard type, e.g. "Universal" then match that
+- * otherwise low[,high[,switch]]
+- */
+-
+-int
+-lnb_decode(char *str, struct lnb_types_st *lnbp);
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/lib/Makefile dvb-apps/util/lib/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/lib/Makefile 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/lib/Makefile 1970-01-01 01:00:00.000000000 +0100
+@@ -1,20 +0,0 @@
+-
+-CC = gcc
+-CFLAGS = -MD -g -Wall -O2 -I../../include -I.
+-LFLAGS = -g -Wall
+-
+-OBJS = lnb.o
+-SRCS = $(OBJS:.o=.c)
+-
+-TARGET = lnb.o
+-
+-$(TARGET): $(SRCS)
+-
+-.c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
+-
+-clean:
+- $(RM) *.o *.d $(TARGET)
+-
+--include $(wildcard *.d) dummy
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/Makefile dvb-apps/util/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/Makefile 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,12 +1,19 @@
+ # Makefile for linuxtv.org dvb-apps/util
+
+-%:: FORCE
+- $(MAKE) -C lib $(MAKECMDGOALS)
+- $(MAKE) -C szap $(MAKECMDGOALS)
+- $(MAKE) -C scan $(MAKECMDGOALS)
+- $(MAKE) -C dvbnet $(MAKECMDGOALS)
+- $(MAKE) -C dvbdate $(MAKECMDGOALS)
+- $(MAKE) -C dvbtraffic $(MAKECMDGOALS)
+- $(MAKE) -C av7110_loadkeys $(MAKECMDGOALS)
++.PHONY: all clean install
+
+-FORCE:
++all clean install:
++ $(MAKE) -C atsc_epg $@
++ $(MAKE) -C av7110_loadkeys $@
++ $(MAKE) -C dib3000-watch $@
++ $(MAKE) -C dst-utils $@
++ $(MAKE) -C dvbdate $@
++ $(MAKE) -C dvbnet $@
++ $(MAKE) -C dvbtraffic $@
++ $(MAKE) -C dvbscan $@
++ $(MAKE) -C femon $@
++ $(MAKE) -C scan $@
++ $(MAKE) -C szap $@
++ $(MAKE) -C ttusb_dec_reset $@
++ $(MAKE) -C gnutv $@
++ $(MAKE) -C zap $@
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-ATSC-center-frequencies-8VSB dvb-apps/util/scan/atsc/us-ATSC-center-frequencies-8VSB
+--- linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-ATSC-center-frequencies-8VSB 2006-04-29 22:31:08.000000000 +0200
++++ dvb-apps/util/scan/atsc/us-ATSC-center-frequencies-8VSB 2009-06-21 13:29:06.000000000 +0200
+@@ -68,4 +68,3 @@
+ A 791028615 8VSB
+ A 797028615 8VSB
+ A 803028615 8VSB
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-NTSC-center-frequencies-8VSB dvb-apps/util/scan/atsc/us-NTSC-center-frequencies-8VSB
+--- linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-NTSC-center-frequencies-8VSB 2006-04-29 22:31:08.000000000 +0200
++++ dvb-apps/util/scan/atsc/us-NTSC-center-frequencies-8VSB 2009-06-21 13:29:06.000000000 +0200
+@@ -68,4 +68,3 @@
+ A 791000000 8VSB
+ A 797000000 8VSB
+ A 803000000 8VSB
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-NY-TWC-NYC dvb-apps/util/scan/atsc/us-NY-TWC-NYC
+--- linuxtv-dvb-apps-1.1.1/util/scan/atsc/us-NY-TWC-NYC 2006-04-29 22:31:08.000000000 +0200
++++ dvb-apps/util/scan/atsc/us-NY-TWC-NYC 1970-01-01 01:00:00.000000000 +0100
+@@ -1,53 +0,0 @@
+-#initial tuning data for Time Warner Cable in New York City
+-
+-#80
+-A 561000000 QAM256
+-A 567000000 QAM256
+-A 573000000 QAM256
+-A 579000000 QAM256
+-A 585000000 QAM256
+-A 591000000 QAM256
+-A 597000000 QAM256
+-A 603000000 QAM256
+-A 609000000 QAM256
+-A 615000000 QAM256
+-#90
+-A 621000000 QAM256
+-A 627000000 QAM256
+-A 633000000 QAM256
+-A 639000000 QAM256
+-A 645000000 QAM256
+-A 93000000 QAM256
+-A 99000000 QAM256
+-A 105000000 QAM256
+-A 111025000 QAM256
+-A 117025000 QAM256
+-#100
+-A 651000000 QAM256
+-A 657000000 QAM256
+-A 663000000 QAM256
+-A 669000000 QAM256
+-A 675000000 QAM256
+-A 681000000 QAM256
+-A 687000000 QAM256
+-A 693000000 QAM256
+-A 699000000 QAM256
+-A 705000000 QAM256
+-#110
+-A 711000000 QAM256
+-A 717000000 QAM256
+-A 723000000 QAM256
+-A 729000000 QAM256
+-A 735000000 QAM256
+-A 741000000 QAM256
+-A 747000000 QAM256
+-A 753000000 QAM256
+-A 759000000 QAM256
+-A 765000000 QAM256
+-#120
+-A 771000000 QAM256
+-A 777000000 QAM256
+-A 783000000 QAM256
+-A 789000000 QAM256
+-A 795000000 QAM256
+-A 801000000 QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.c dvb-apps/util/scan/atsc_psip_section.c
+--- linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.c 2006-05-18 01:33:25.000000000 +0200
++++ dvb-apps/util/scan/atsc_psip_section.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,62 +0,0 @@
+-#include "atsc_psip_section.h"
+-
+-struct ATSC_extended_channel_name_descriptor read_ATSC_extended_channel_name_descriptor(const u8 *b)
+-{
+- struct ATSC_extended_channel_name_descriptor v;
+- v.descriptor_tag = getBits(b, 0, 8);
+- v.descriptor_length = getBits(b, 8, 8);
+- v.TODO = getBits(b, 16, 1);
+- return v;
+-}
+-
+-struct ATSC_service_location_descriptor read_ATSC_service_location_descriptor(const u8 *b)
+-{
+- struct ATSC_service_location_descriptor v;
+- v.descriptor_tag = getBits(b, 0, 8);
+- v.descriptor_length = getBits(b, 8, 8);
+- v.reserved = getBits(b, 16, 3);
+- v.PCR_PID = getBits(b, 19,13);
+- v.number_elements = getBits(b, 32, 8);
+- return v;
+-}
+-
+-struct ATSC_service_location_element read_ATSC_service_location_element(const u8 *b)
+-{
+- struct ATSC_service_location_element v;
+- v.stream_type = getBits(b, 0, 8);
+- v.reserved = getBits(b, 8, 3);
+- v.elementary_PID = getBits(b, 11,13);
+- v.ISO_639_language_code = getBits(b, 24,24);
+- return v;
+-}
+-
+-struct tvct_channel read_tvct_channel(const u8 *b)
+-{
+- struct tvct_channel v;
+- v.short_name0 = getBits(b, 0,16);
+- v.short_name1 = getBits(b, 16,16);
+- v.short_name2 = getBits(b, 32,16);
+- v.short_name3 = getBits(b, 48,16);
+- v.short_name4 = getBits(b, 64,16);
+- v.short_name5 = getBits(b, 80,16);
+- v.short_name6 = getBits(b, 96,16);
+- v.reserved0 = getBits(b,112, 4);
+- v.major_channel_number = getBits(b,116,10);
+- v.minor_channel_number = getBits(b,126,10);
+- v.modulation_mode = getBits(b,136, 8);
+- v.carrier_frequency = getBits(b,144,32);
+- v.channel_TSID = getBits(b,176,16);
+- v.program_number = getBits(b,192,16);
+- v.ETM_location = getBits(b,208, 2);
+- v.access_controlled = getBits(b,210, 1);
+- v.hidden = getBits(b,211, 1);
+- v.reserved1 = getBits(b,212, 2);
+- v.hide_guide = getBits(b,214, 1);
+- v.reserved2 = getBits(b,215, 3);
+- v.service_type = getBits(b,218, 6);
+- v.source_id = getBits(b,224,16);
+- v.reserved3 = getBits(b,240, 6);
+- v.descriptors_length = getBits(b,246,10);
+- return v;
+-}
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.h dvb-apps/util/scan/atsc_psip_section.h
+--- linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.h 2006-05-18 01:33:27.000000000 +0200
++++ dvb-apps/util/scan/atsc_psip_section.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,60 +0,0 @@
+-#ifndef __ATSC_PSIP_SECTION_H_
+-#define __ATSC_PSIP_SECTION_H_
+-
+-#include "section.h"
+-
+-#define ATSC_EXTENDED_CHANNEL_NAME_DESCRIPTOR_ID 0xA0
+-struct ATSC_extended_channel_name_descriptor {
+- u8 descriptor_tag : 8;
+- u8 descriptor_length : 8;
+- u8 TODO : 1;
+-} PACKED;
+-struct ATSC_extended_channel_name_descriptor read_ATSC_extended_channel_name_descriptor(const u8 *);
+-
+-#define ATSC_SERVICE_LOCATION_DESCRIPTOR_ID 0xA1
+-struct ATSC_service_location_descriptor {
+- u8 descriptor_tag : 8;
+- u8 descriptor_length : 8;
+- u8 reserved : 3;
+- u16 PCR_PID :13;
+- u8 number_elements : 8;
+-} PACKED;
+-struct ATSC_service_location_descriptor read_ATSC_service_location_descriptor(const u8 *);
+-
+-struct ATSC_service_location_element {
+- u8 stream_type : 8;
+- u8 reserved : 3;
+- u16 elementary_PID :13;
+- u32 ISO_639_language_code :24;
+-} PACKED;
+-struct ATSC_service_location_element read_ATSC_service_location_element(const u8 *);
+-
+-struct tvct_channel {
+- u16 short_name0 :16;
+- u16 short_name1 :16;
+- u16 short_name2 :16;
+- u16 short_name3 :16;
+- u16 short_name4 :16;
+- u16 short_name5 :16;
+- u16 short_name6 :16;
+- u8 reserved0 : 4;
+- u16 major_channel_number :10;
+- u16 minor_channel_number :10;
+- u8 modulation_mode : 8;
+- u32 carrier_frequency :32;
+- u16 channel_TSID :16;
+- u16 program_number :16;
+- u8 ETM_location : 2;
+- u8 access_controlled : 1;
+- u8 hidden : 1;
+- u8 reserved1 : 2;
+- u8 hide_guide : 1;
+- u8 reserved2 : 3;
+- u8 service_type : 6;
+- u16 source_id :16;
+- u8 reserved3 : 6;
+- u16 descriptors_length :10;
+-} PACKED;
+-struct tvct_channel read_tvct_channel(const u8 *);
+-
+-#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.pl dvb-apps/util/scan/atsc_psip_section.pl
+--- linuxtv-dvb-apps-1.1.1/util/scan/atsc_psip_section.pl 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/atsc_psip_section.pl 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,76 @@
++use strict;
++
++return {
++#{ 0x80, 0x80, "ATSC stuffing descriptor" },
++#{ 0x81, 0x81, "ATSC AC-3 audio descriptor" },
++#{ 0x82, 0x85, "ATSC TODO" },
++#{ 0x86, 0x86, "ATSC caption service descriptor" },
++#{ 0x87, 0x87, "ATSC content advisory descriptor" },
++#{ 0x88, 0x8F, "ATSC TODO" },
++#{ 0xA0, 0xA0, "ATSC extended channel name descriptor" },
++#{ 0xA1, 0xA1, "ATSC service location descriptor" },
++#{ 0xA2, 0xA2, "ATSC time-shifted service descriptor" },
++#{ 0xA3, 0xA3, "ATSC component name descriptor" },
++#{ 0xA4, 0xA7, "ATSC TODO" },
++#{ 0xA8, 0xA8, "ATSC DCC departing request descriptor" },
++#{ 0xA9, 0xA9, "ATSC DCC arriving request descriptor" },
++#{ 0xAA, 0xAA, "ATSC redistribution control descriptor" },
++ descriptors => [
++ { id => 0xa0,
++ name => "ATSC_extended_channel_name_descriptor",
++ elements => [
++ descriptor_tag => 8,
++ descriptor_length => 8,
++ TODO => 1,
++ ],
++ },
++ { id => 0xa1,
++ name => "ATSC_service_location_descriptor",
++ elements => [
++ descriptor_tag => 8,
++ descriptor_length => 8,
++ reserved => 3,
++ PCR_PID => 13,
++ number_elements => 8,
++ ],
++ }
++ ],
++ misc => [
++ { name => "ATSC_service_location_element",
++ elements => [
++ stream_type => 8,
++ reserved => 3,
++ elementary_PID => 13,
++ ISO_639_language_code => 24,
++ ],
++ },
++ { name => "tvct_channel",
++ elements => [
++ short_name0 => 16,
++ short_name1 => 16,
++ short_name2 => 16,
++ short_name3 => 16,
++ short_name4 => 16,
++ short_name5 => 16,
++ short_name6 => 16,
++ reserved0 => 4,
++ major_channel_number => 10,
++ minor_channel_number => 10,
++ modulation_mode => 8,
++ carrier_frequency => 32,
++ channel_TSID => 16,
++ program_number => 16,
++ ETM_location => 2,
++ access_controlled => 1,
++ hidden => 1,
++ reserved1 => 2,
++ hide_guide => 1,
++ reserved2 => 3,
++ service_type => 6,
++ source_id => 16,
++ reserved3 => 6,
++ descriptors_length => 10,
++ ],
++ },
++ ]
++};
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/diseqc.c dvb-apps/util/scan/diseqc.c
+--- linuxtv-dvb-apps-1.1.1/util/scan/diseqc.c 2006-05-18 01:33:25.000000000 +0200
++++ dvb-apps/util/scan/diseqc.c 2009-06-21 13:29:06.000000000 +0200
+@@ -37,9 +37,6 @@
+ ;
+ }
+
+-#define printf(x...)
+-
+-
+ int diseqc_send_msg (int fd, fe_sec_voltage_t v, struct diseqc_cmd **cmd,
+ fe_sec_tone_mode_t t, fe_sec_mini_cmd_t b)
+ {
+@@ -104,5 +101,3 @@
+ (i/2) % 2 ? SEC_TONE_ON : SEC_TONE_OFF,
+ (i/4) % 2 ? SEC_MINI_B : SEC_MINI_A);
+ }
+-
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/diseqc.h dvb-apps/util/scan/diseqc.h
+--- linuxtv-dvb-apps-1.1.1/util/scan/diseqc.h 2006-05-18 01:33:27.000000000 +0200
++++ dvb-apps/util/scan/diseqc.h 2009-06-21 13:29:06.000000000 +0200
+@@ -22,4 +22,3 @@
+
+
+ #endif
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dump-vdr.c dvb-apps/util/scan/dump-vdr.c
+--- linuxtv-dvb-apps-1.1.1/util/scan/dump-vdr.c 2006-05-18 01:33:25.000000000 +0200
++++ dvb-apps/util/scan/dump-vdr.c 2009-06-21 13:29:06.000000000 +0200
+@@ -138,7 +138,7 @@
+ {
+ int i;
+
+- if ((video_pid || audio_pid[0]) && ((ca_select > 0) || ((ca_select == 0) && (scrambled == 0)))) {
++ if (video_pid || audio_pid[0]) {
+ if (vdr_version <= 2) {
+ audio_lang = NULL;
+ network_id = 0;
+@@ -174,10 +174,17 @@
+ if (audio_lang && audio_lang[0][0])
+ fprintf (f, "=%.4s", audio_lang[0]);
+ }
+- if (scrambled == 1) scrambled = ca_select;
++ if (scrambled == 1) {
++ if (ca_select == -1)
++ if (vdr_version <= 2)
++ scrambled = 1;
++ else
++ scrambled = 0;
++ else
++ scrambled = ca_select;
++ }
+ fprintf (f, ":%d:%d:%d:%d:%d:0", teletext_pid, scrambled,
+ service_id, network_id, transport_stream_id);
+ fprintf (f, "\n");
+ }
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dump-vdr.h dvb-apps/util/scan/dump-vdr.h
+--- linuxtv-dvb-apps-1.1.1/util/scan/dump-vdr.h 2006-05-18 01:33:27.000000000 +0200
++++ dvb-apps/util/scan/dump-vdr.h 2009-06-21 13:29:06.000000000 +0200
+@@ -36,4 +36,3 @@
+ int channel_num);
+
+ #endif
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dump-zap.c dvb-apps/util/scan/dump-zap.c
+--- linuxtv-dvb-apps-1.1.1/util/scan/dump-zap.c 2006-05-18 01:33:25.000000000 +0200
++++ dvb-apps/util/scan/dump-zap.c 2009-06-21 13:29:06.000000000 +0200
+@@ -123,4 +123,3 @@
+ fprintf (f, ":%i:%i:%i", video_pid, audio_pid[0], service_id);
+ fprintf (f, "\n");
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dump-zap.h dvb-apps/util/scan/dump-zap.h
+--- linuxtv-dvb-apps-1.1.1/util/scan/dump-zap.h 2006-05-18 01:33:27.000000000 +0200
++++ dvb-apps/util/scan/dump-zap.h 2009-06-21 13:29:06.000000000 +0200
+@@ -17,4 +17,3 @@
+ uint16_t service_id);
+
+ #endif
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-Innsbruck dvb-apps/util/scan/dvb-c/at-Innsbruck
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-Innsbruck 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/at-Innsbruck 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# scan config for Innsbruck Telesystem cable provider
++# freq sr fec mod
++C 450000000 6875000 NONE QAM64
++C 490000000 6875000 NONE QAM64
++C 442000000 6875000 NONE QAM64
++C 546000000 6875000 NONE QAM64
++C 554000000 6875000 NONE QAM64
++C 562000000 6875000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-KarrerNet dvb-apps/util/scan/dvb-c/at-KarrerNet
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-KarrerNet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/at-KarrerNet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# Kabel St. Florian bei Linz/AT KarrerNet
++# 2009-01-10
++# freq sr fec mod
++C 418000000 6900000 NONE QAM64
++C 426000000 6900000 NONE QAM64
++C 434000000 6900000 NONE QAM64
++C 442000000 6900000 NONE QAM64
++C 450000000 6900000 NONE QAM64
++C 458000000 6900000 NONE QAM64
++C 466000000 6900000 NONE QAM64
++C 474000000 6900000 NONE QAM64
++C 482000000 6900000 NONE QAM64
++C 522000000 6900000 NONE QAM64
++C 530000000 6900000 NONE QAM64
++C 538000000 6900000 NONE QAM64
++C 578000000 6900000 NONE QAM64
++C 402000000 6900000 NONE QAM256
++C 410000000 6900000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-Liwest dvb-apps/util/scan/dvb-c/at-Liwest
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-Liwest 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/at-Liwest 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,31 @@
++# Kabel Linz/AT Liwest
++# 2006-08-01
++# freq sr fec mod
++C 394000000 6900000 NONE QAM64
++C 402000000 6900000 NONE QAM64
++C 410000000 6875000 NONE QAM64
++C 418000000 6900000 NONE QAM64
++C 426000000 6900000 NONE QAM64
++C 434000000 6900000 NONE QAM64
++C 442000000 6900000 NONE QAM64
++C 506000000 6900000 NONE QAM64
++C 514000000 6900000 NONE QAM64
++C 522000000 6900000 NONE QAM64
++C 530000000 6900000 NONE QAM64
++C 538000000 6900000 NONE QAM64
++C 546000000 6900000 NONE QAM64
++C 554000000 6900000 NONE QAM64
++C 562000000 6900000 NONE QAM64
++C 570000000 6900000 NONE QAM64
++C 578000000 6900000 NONE QAM64
++C 586000000 6900000 NONE QAM64
++C 594000000 6900000 NONE QAM64
++C 666000000 6900000 NONE QAM64
++C 674000000 6900000 NONE QAM64
++C 682000000 6900000 NONE QAM64
++C 586000000 6900000 NONE QAM256
++C 634000000 6900000 NONE QAM256
++C 642000000 6900000 NONE QAM256
++C 650000000 6900000 NONE QAM256
++C 658000000 6900000 NONE QAM256
++C 690000000 6900000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-SalzburgAG dvb-apps/util/scan/dvb-c/at-SalzburgAG
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/at-SalzburgAG 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/at-SalzburgAG 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# scan config for Salzburg AG cable provider
++# freq sr fec mod
++C 306000000 6900000 NONE QAM64
++C 370000000 6900000 NONE QAM64
++C 410000000 6900000 NONE QAM64
++C 418000000 6900000 NONE QAM64
++C 426000000 6900000 NONE QAM64
++C 442000000 6900000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/be-IN.DI-Integan dvb-apps/util/scan/dvb-c/be-IN.DI-Integan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/be-IN.DI-Integan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/be-IN.DI-Integan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++# Integan DVB-C (Belgium, IN.DI region)
++# freq sr fec mod
++C 330000000 6875000 NONE QAM256
++C 338000000 6875000 NONE QAM256
++C 346000000 6875000 NONE QAM256
++C 354000000 6875000 NONE QAM256
++C 362000000 6875000 NONE QAM64
++C 370000000 6875000 NONE QAM256
++C 378000000 6875000 NONE QAM256
++C 386000000 6875000 NONE QAM256
++C 394000000 6875000 NONE QAM256
++C 458000000 6875000 NONE QAM256
++C 466000000 6875000 NONE QAM256
++C 474000000 6875000 NONE QAM256
++C 482000000 6875000 NONE QAM256
++C 586000000 6875000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Rega-Sense dvb-apps/util/scan/dvb-c/ch-Rega-Sense
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Rega-Sense 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/ch-Rega-Sense 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,34 @@
++# Rega Sense, Switzerland
++# freq sr fec mod
++
++# Pay TV
++C 434000000 6900000 NONE QAM64 # Teleclub
++C 714000000 6900000 NONE QAM64
++C 722000000 6900000 NONE QAM64
++
++# Basis offer
++C 125000000 6900000 NONE QAM64
++C 450000000 6900000 NONE QAM64
++C 458000000 6900000 NONE QAM64
++C 466000000 6900000 NONE QAM64
++C 474000000 6900000 NONE QAM64
++C 482000000 6900000 NONE QAM64
++C 514000000 6900000 NONE QAM64
++C 522000000 6900000 NONE QAM64
++C 578000000 6900000 NONE QAM64
++C 586000000 6900000 NONE QAM64
++C 634000000 6900000 NONE QAM64
++C 642000000 6900000 NONE QAM64
++C 650000000 6900000 NONE QAM64
++C 658000000 6900000 NONE QAM64
++C 666000000 6900000 NONE QAM64
++C 682000000 6900000 NONE QAM64
++C 698000000 6900000 NONE QAM64
++C 730000000 6900000 NONE QAM64
++
++C 618000000 6900000 NONE QAM256
++C 674000000 6900000 NONE QAM256
++
++# HDTV
++C 642000000 6900000 NONE QAM256
++C 690000000 6900000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Video2000 dvb-apps/util/scan/dvb-c/ch-Video2000
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Video2000 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/ch-Video2000 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# Cable Video2000
++# Canton of Neuchatel, Switzerland
++
++# freq sr fec mod
++C 306000000 6900000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Zuerich-cablecom dvb-apps/util/scan/dvb-c/ch-Zuerich-cablecom
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/ch-Zuerich-cablecom 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/ch-Zuerich-cablecom 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Kabel cablecom.ch Zuerich
++# freq sr fec mod
++C 410000000 6900000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/cz-Moravianet dvb-apps/util/scan/dvb-c/cz-Moravianet
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/cz-Moravianet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/cz-Moravianet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,24 @@
++# DVB-C Moravianet (http://www.moravia.net/)
++# Available in villages and cities around Brno:
++# Bohuslavice, Bukovany, Hrusovany u Brna, Hustopece, Ivancice, Jirikovice,
++# Kyjov, Moravsky Krumlov, Mutenice, Neslovice, Nove Branice, Oslavany,
++# Popuvky, Padochov, Troubsko, Rosice, Tisnov, Vojkovice, Svatoborice,
++# Slapanice, Zabcice, Zidlochovice
++# The same content is available also from NejTV where they provide DVB-C.
++# Currently it is in Havlickuv Brod, Breclav, Velke Mezirici
++#
++# 2008-12-03
++#
++# freq sr fec mod
++C 218000000 6900000 NONE QAM64
++C 226000000 6900000 NONE QAM64
++C 234000000 6900000 NONE QAM64
++C 242000000 6900000 NONE QAM64
++C 250000000 6900000 NONE QAM64
++C 258000000 6900000 NONE QAM64
++C 266000000 6900000 NONE QAM64
++C 274000000 6900000 NONE QAM64
++C 282000000 6900000 NONE QAM64
++C 290000000 6900000 NONE QAM64
++C 298000000 6900000 NONE QAM64
++C 306000000 6900000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Berlin dvb-apps/util/scan/dvb-c/de-Berlin
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Berlin 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/de-Berlin 2009-06-21 13:29:06.000000000 +0200
+@@ -2,3 +2,4 @@
+ # freq sr fec mod
+ C 394000000 6900000 NONE QAM64
+ C 113000000 6900000 NONE QAM64
++C 466000000 6900000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-iesy dvb-apps/util/scan/dvb-c/de-iesy
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-iesy 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/de-iesy 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,20 @@
+-# Kabel iesy
++# Unity Media (iesy Hessen, ish Nordrhein-Westfalen)
+ # freq sr fec mod
++C 113000000 6900000 NONE QAM64
++C 121000000 6900000 NONE QAM64
++C 346000000 6900000 NONE QAM256
++C 354000000 6900000 NONE QAM64
++C 362000000 6900000 NONE QAM64
++C 370000000 6900000 NONE QAM64
++C 378000000 6900000 NONE QAM64
++C 386000000 6900000 NONE QAM64
++C 394000000 6900000 NONE QAM64
++C 402000000 6900000 NONE QAM256
+ C 410000000 6900000 NONE QAM64
++C 426000000 6900000 NONE QAM64
++C 434000000 6900000 NONE QAM256
++C 442000000 6900000 NONE QAM256
++C 450000000 6900000 NONE QAM64
++C 458000000 6900000 NONE QAM64
++C 466000000 6900000 NONE QAM64
++C 538000000 6900000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Kabel_BW dvb-apps/util/scan/dvb-c/de-Kabel_BW
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Kabel_BW 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/de-Kabel_BW 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++# Kabel-BW, Stand 04/2007
++#
++# Nur eine Anfangsfrequenz ist noetig, um den Ball ins
++# Rollen zu bringen. Quasi als Einstiegspunkt fuer eine
++# umfassende Suche. Es besteht kein Grund, sich um all die
++# vielen anderen Frequenzen und deren aktuell verwendete
++# Parameter zu kuemmern und diese dann womoeglich auch
++# noch auf einem aktuellen Stand halten zu wollen. Bei der
++# schieren Anzahl der innerhalb des Ausbaugebiets durch
++# Kabel BW genutzten Frequenzen waere das nur zeitraubend
++# und fehleranfaellig... ;-)
++#
++# Dirk Ritter <dirk@GNUmatic.de>
++#
++# freq sr fec mod
++C 113000000 6900000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Muenchen dvb-apps/util/scan/dvb-c/de-Muenchen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Muenchen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/de-Muenchen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,27 @@
++# 2008-06-22
++# Area: Muenchen City
++# Cable Provider: Kabel & Medien Service - http://www.atcable.de
++# Cable Content: Cablevista GmbH - http://www.cablevista.de
++#
++# freq sr fec mod
++C 113000000 6900000 NONE QAM64
++C 121000000 6900000 NONE QAM64
++C 346000000 6900000 NONE QAM64
++C 354000000 6900000 NONE QAM64
++C 362000000 6900000 NONE QAM64
++C 370000000 6900000 NONE QAM64
++C 378000000 6900000 NONE QAM64
++C 386000000 6900000 NONE QAM64
++C 394000000 6900000 NONE QAM64
++C 402000000 6900000 NONE QAM64
++C 410000000 6900000 NONE QAM64
++C 418000000 6900000 NONE QAM64
++C 426000000 6900000 NONE QAM64
++C 434000000 6900000 NONE QAM64
++C 442000000 6900000 NONE QAM64
++C 450000000 6900000 NONE QAM64
++C 466000000 6900000 NONE QAM64
++C 482000000 6900000 NONE QAM64
++C 322000000 6900000 NONE QAM256
++C 458000000 6900000 NONE QAM256
++C 490000000 6900000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-neftv dvb-apps/util/scan/dvb-c/de-neftv
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-neftv 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/de-neftv 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,23 @@
++# Cable conf for NEFtv
++# (Nuernberg, Erlangen, Fuerth and Herzogenaurach)
++
++# freq sr fec mod
++C 346000000 6875000 NONE QAM64
++C 354000000 6875000 NONE QAM64
++C 362000000 6875000 NONE QAM64
++C 370000000 6875000 NONE QAM64
++C 378000000 6875000 NONE QAM64
++C 386000000 6875000 NONE QAM64
++C 394000000 6875000 NONE QAM64
++C 402000000 6875000 NONE QAM64
++C 410000000 6875000 NONE QAM64
++C 418000000 6875000 NONE QAM64
++C 426000000 6875000 NONE QAM64
++C 434000000 6875000 NONE QAM64
++C 450000000 6875000 NONE QAM64
++C 458000000 6875000 NONE QAM64
++C 474000000 6875000 NONE QAM64
++C 490000000 6875000 NONE QAM64
++C 498000000 6875000 NONE QAM64
++C 514000000 6875000 NONE QAM64
++C 546000000 6875000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Primacom dvb-apps/util/scan/dvb-c/de-Primacom
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Primacom 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/de-Primacom 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,23 @@
++# Primacom
++# freq sr fec mod
++C 121000000 6900000 NONE QAM64
++C 306000000 6900000 NONE QAM64
++C 314000000 6900000 NONE QAM64
++C 322000000 6900000 NONE QAM64
++C 330000000 6900000 NONE QAM64
++C 338000000 6900000 NONE QAM256
++C 346000000 6900000 NONE QAM256
++C 354000000 6900000 NONE QAM256
++C 362000000 6900000 NONE QAM256
++C 370000000 6900000 NONE QAM256
++C 378000000 6900000 NONE QAM256
++C 386000000 6900000 NONE QAM256
++C 394000000 6900000 NONE QAM256
++C 418000000 6900000 NONE QAM256
++C 434000000 6900000 NONE QAM64
++C 442000000 6900000 NONE QAM64
++C 450000000 6900000 NONE QAM64
++C 458000000 6900000 NONE QAM64
++C 466000000 6900000 NONE QAM64
++C 610000000 6900000 NONE QAM64
++C 746000000 6900000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Unitymedia dvb-apps/util/scan/dvb-c/de-Unitymedia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/de-Unitymedia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/de-Unitymedia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,35 @@
++# Unitymedia
++# Created from http://www.unitymedia.de/service/tv/frequenzen.html
++# and http://blob.unitymedia.de/Download/Unitymedia_Senderlineup_digital_2008-05-28.pdf
++# freq sr fec mod
++C 113000000 6900000 NONE QAM256
++C 121000000 6900000 NONE QAM256
++C 338000000 6900000 NONE QAM256
++C 346000000 6900000 NONE QAM256
++C 354000000 6900000 NONE QAM64
++C 362000000 6900000 NONE QAM64
++C 370000000 6900000 NONE QAM64
++C 378000000 6900000 NONE QAM64
++C 386000000 6900000 NONE QAM64
++C 394000000 6900000 NONE QAM256
++C 402000000 6900000 NONE QAM256
++C 410000000 6900000 NONE QAM256
++C 418000000 6900000 NONE QAM256
++C 426000000 6900000 NONE QAM256
++C 434000000 6900000 NONE QAM256
++C 442000000 6900000 NONE QAM64
++C 450000000 6900000 NONE QAM64
++C 458000000 6900000 NONE QAM256
++C 466000000 6900000 NONE QAM256
++C 474000000 6900000 NONE QAM64
++C 522000000 6900000 NONE QAM256
++C 530000000 6900000 NONE QAM256
++C 538000000 6900000 NONE QAM256
++C 554000000 6900000 NONE QAM256
++C 562000000 6900000 NONE QAM256
++C 570000000 6900000 NONE QAM256
++C 610000000 6900000 NONE QAM64
++C 650000000 6900000 NONE QAM256
++C 658000000 6900000 NONE QAM256
++C 666000000 6900000 NONE QAM256
++C 674000000 6900000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/dk-Copenhagen-AFDK dvb-apps/util/scan/dvb-c/dk-Copenhagen-AFDK
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/dk-Copenhagen-AFDK 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/dk-Copenhagen-AFDK 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,11 @@
++# AFDK, Copenhagen
++# http://www.afdk.tv/
++# freq sr fec mod
++C 386000000 6875000 NONE QAM64
++C 394000000 6875000 NONE QAM64
++C 402000000 6875000 NONE QAM64
++C 490000000 6875000 NONE QAM64
++C 602000000 6875000 NONE QAM64
++C 610000000 6875000 NONE QAM64
++C 618000000 6875000 NONE QAM64
++C 794000000 6875000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/dk-Odense dvb-apps/util/scan/dvb-c/dk-Odense
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/dk-Odense 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/dk-Odense 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# Glentevejs Antennelaug (Denmark / Odense)
++# freq sr fec mod
++C 442000000 6900000 NONE QAM64
++C 434000000 6875000 NONE QAM256
++C 255000000 5000000 NONE QAM256
++C 506000000 6875000 NONE QAM256
++C 562000000 6875000 NONE QAM256
++C 610000000 6875000 NONE QAM256
++C 754000000 6875000 NONE QAM256
++C 770000000 6875000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/es-Euskaltel dvb-apps/util/scan/dvb-c/es-Euskaltel
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/es-Euskaltel 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/es-Euskaltel 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++# Scan config for Euskaltel (DVB-C)
++# Basque Country - Spain
++# file automatically generated by w_scan
++# (http://free.pages.at/wirbel4vdr/w_scan/index2.html)
++# freq sr fec mod
++C 714000000 6875000 NONE QAM64
++C 722000000 6875000 NONE QAM64
++C 730000000 6875000 NONE QAM64
++C 738000000 6875000 NONE QAM64
++C 746000000 6875000 NONE QAM64
++C 754000000 6875000 NONE QAM64
++C 762000000 6875000 NONE QAM64
++C 770000000 6875000 NONE QAM64
++C 778000000 6875000 NONE QAM64
++C 786000000 6875000 NONE QAM64
++C 794000000 6875000 NONE QAM64
++C 802000000 6875000 NONE QAM64
++C 810000000 6875000 NONE QAM64
++C 818000000 6875000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-3ktv dvb-apps/util/scan/dvb-c/fi-3ktv
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-3ktv 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/fi-3ktv 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,20 @@
+-# 3KTV
+-# freq sr fec mod
+-C 306000000 6875000 NONE QAM64
++# 3KTV network reference channels
++# freq sr fec mod
++C 154000000 6875000 NONE QAM128
++C 162000000 6875000 NONE QAM128
++C 170000000 6875000 NONE QAM128
++C 232000000 6875000 NONE QAM128
++C 298000000 6875000 NONE QAM128
++C 306000000 6875000 NONE QAM128
++C 314000000 6875000 NONE QAM128
++C 322000000 6875000 NONE QAM128
++C 330000000 6875000 NONE QAM128
++C 338000000 6875000 NONE QAM128
++C 346000000 6875000 NONE QAM128
++C 354000000 6875000 NONE QAM128
++C 362000000 6875000 NONE QAM128
++C 370000000 6875000 NONE QAM128
++C 378000000 6875000 NONE QAM128
++C 394000000 6875000 NONE QAM128
++C 402000000 6875000 NONE QAM128
++C 450000000 6875000 NONE QAM128
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-HTV dvb-apps/util/scan/dvb-c/fi-HTV
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-HTV 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/fi-HTV 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# HTV
++# freq sr fec mod
++C 283000000 5900000 NONE QAM128
++C 154000000 6900000 NONE QAM128
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-jkl dvb-apps/util/scan/dvb-c/fi-jkl
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-jkl 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/fi-jkl 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# OnCable (Finland / Jyväskylä)
++# freq sr fec mod
++C 514000000 6900000 NONE QAM128
++C 426000000 6900000 NONE QAM128
++C 162000000 6900000 NONE QAM128
++C 418000000 6900000 NONE QAM128
++C 490000000 6900000 NONE QAM128
++C 498000000 6900000 NONE QAM128
++C 402000000 6900000 NONE QAM128
++C 410000000 6900000 NONE QAM128
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-Joensuu-Tikka dvb-apps/util/scan/dvb-c/fi-Joensuu-Tikka
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-Joensuu-Tikka 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/fi-Joensuu-Tikka 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# DVB-C, Tikka Media, Joensuu, Finland
++# freq sr fec mod
++C 154000000 6900000 NONE QAM128
++C 162000000 6900000 NONE QAM128
++C 170000000 6900000 NONE QAM128
++C 402000000 6900000 NONE QAM128
++C 410000000 6900000 NONE QAM128
++C 418000000 6900000 NONE QAM128
++C 426000000 6900000 NONE QAM128
++C 434000000 6900000 NONE QAM128
++C 458000000 6900000 NONE QAM128
++C 466000000 6900000 NONE QAM128
++C 474000000 6900000 NONE QAM128
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-sonera dvb-apps/util/scan/dvb-c/fi-sonera
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-sonera 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/fi-sonera 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Sonera kaapeli-tv (Finland)
++# Maksuttomat kanavat ovat 162 ja 170 MHz:n muxeissa
++#
++# freq      sr      fec  mod
++C 154000000 6900000 NONE QAM128
++C 162000000 6900000 NONE QAM128
++C 170000000 6900000 NONE QAM128
++C 314000000 6900000 NONE QAM128
++C 322000000 6900000 NONE QAM128
++C 338000000 6900000 NONE QAM128
++C 346000000 6900000 NONE QAM128
++C 354000000 6900000 NONE QAM128
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-TTV dvb-apps/util/scan/dvb-c/fi-TTV
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-TTV 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/fi-TTV 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# TTV
++# freq sr fec mod
++C 418000000 6900000 NONE QAM128
++C 346000000 6900000 NONE QAM128
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-Turku dvb-apps/util/scan/dvb-c/fi-Turku
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fi-Turku 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/fi-Turku 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,17 @@
++# Turun Kaapelitelevisio Oy (Turku)
++# freq sr fec mod
++C 146000000 6900000 NONE QAM128
++C 154000000 6900000 NONE QAM128
++C 162000000 6900000 NONE QAM128
++C 322000000 6900000 NONE QAM128
++C 330000000 6900000 NONE QAM128
++C 338000000 6900000 NONE QAM128
++C 362000000 6900000 NONE QAM128
++C 378000000 6900000 NONE QAM128
++C 386000000 6900000 NONE QAM128
++C 402000000 6900000 NONE QAM128
++C 410000000 6900000 NONE QAM128
++C 418000000 6900000 NONE QAM128
++C 426000000 6900000 NONE QAM128
++C 442000000 6900000 NONE QAM128
++C 354000000 6900000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fr-noos-numericable dvb-apps/util/scan/dvb-c/fr-noos-numericable
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/fr-noos-numericable 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/fr-noos-numericable 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,41 @@
++# Cable en France
++# freq sr fec mod
++C 123000000 6875000 NONE QAM64
++C 131000000 6875000 NONE QAM64
++C 139000000 6875000 NONE QAM64
++C 147000000 6875000 NONE QAM64
++C 155000000 6875000 NONE QAM64
++C 163000000 6875000 NONE QAM64
++C 171000000 6875000 NONE QAM64
++C 179000000 6875000 NONE QAM64
++C 187000000 6875000 NONE QAM64
++C 195000000 6875000 NONE QAM64
++C 203000000 6875000 NONE QAM64
++C 211000000 6875000 NONE QAM64
++C 219000000 6875000 NONE QAM64
++C 227000000 6875000 NONE QAM64
++C 235000000 6875000 NONE QAM64
++C 243000000 6875000 NONE QAM64
++C 251000000 6875000 NONE QAM64
++C 259000000 6875000 NONE QAM64
++C 267000000 6875000 NONE QAM64
++C 275000000 6875000 NONE QAM64
++C 283000000 6875000 NONE QAM64
++C 291000000 6875000 NONE QAM64
++C 299000000 6875000 NONE QAM64
++C 315000000 6875000 NONE QAM64
++C 323000000 6875000 NONE QAM64
++C 339000000 6875000 NONE QAM64
++C 347000000 6875000 NONE QAM64
++C 706000000 6875000 NONE QAM64
++C 714000000 6875000 NONE QAM64
++C 722000000 6875000 NONE QAM64
++C 730000000 6875000 NONE QAM64
++C 738000000 6875000 NONE QAM64
++C 746000000 6875000 NONE QAM64
++C 748000000 6875000 NONE QAM64
++C 754000000 6875000 NONE QAM64
++C 762000000 6875000 NONE QAM64
++C 834000000 6875000 NONE QAM64
++C 842000000 6875000 NONE QAM64
++C 850000000 6875000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/lu-Ettelbruck-ACE dvb-apps/util/scan/dvb-c/lu-Ettelbruck-ACE
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/lu-Ettelbruck-ACE 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/lu-Ettelbruck-ACE 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,20 @@
++# Scan config for Antenne Collective Ettelbruck a.s.b.l.
++# (http://antenne-ettelbruck.lu)
++# Luxembourg - Ettelbruck
++# freq sr fec mod
++C 634000000 6900000 NONE QAM64
++C 642000000 6900000 NONE QAM64
++C 650000000 6900000 NONE QAM64
++C 666000000 6900000 NONE QAM64
++C 674000000 6900000 NONE QAM64
++C 682000000 6900000 NONE QAM64
++C 690000000 6900000 NONE QAM64
++C 698000000 6900000 NONE QAM64
++C 706000000 6900000 NONE QAM64
++C 714000000 6900000 NONE QAM64
++C 656000000 3450000 NONE QAM64
++C 660000000 3450000 NONE QAM64
++C 720000000 3450000 NONE QAM64
++C 732000000 3450000 NONE QAM64
++C 724000000 3450000 NONE QAM64
++C 728000000 3450000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/nl-Ziggo dvb-apps/util/scan/dvb-c/nl-Ziggo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/nl-Ziggo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/nl-Ziggo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,14 @@
++# Initial Tuning file for nl-Ziggo
++# This file only lists the main
++# frequencies. You still need to do
++# a network scan to find other
++# transponders.
++#
++# based on:
++# http://blob.ziggo.nl/dynamic/NL_HOME/PDF-UPLOAD/Gebruikers-Handleiding-DigitaleTV.pdf
++# Chapter 4
++#
++C 372000000 6875000 NONE QAM64 # Main Frequency Ziggo/Casema
++C 514000000 6875000 NONE QAM64 # Main Frequency Ziggo/Multikabel
++C 356000000 6875000 NONE QAM64 # Main Frequency Ziggo/@Home Zuid
++C 369000000 6875000 NONE QAM64 # Main Frequency Ziggo/@Home Noord
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/nl-Ziggo-Zwolle dvb-apps/util/scan/dvb-c/nl-Ziggo-Zwolle
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/nl-Ziggo-Zwolle 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/nl-Ziggo-Zwolle 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,26 @@
++C 313000000 6875000 NONE QAM64 # TS 1
++C 361000000 6875000 NONE QAM64 # TS 2
++C 353000000 6875000 NONE QAM64 # TS 3
++C 345000000 6875000 NONE QAM64 # TS 4
++C 818000000 6875000 NONE QAM64 # TS 5
++C 329000000 6875000 NONE QAM64 # TS 6
++C 810000000 6875000 NONE QAM64 # TS 7
++C 305000000 6875000 NONE QAM64 # TS 8
++C 762000000 6875000 NONE QAM64 # TS 9
++C 618000000 6875000 NONE QAM64 # TS 10
++C 610000000 6875000 NONE QAM64 # TS 11
++C 337000000 6875000 NONE QAM64 # TS 12
++C 321000000 6875000 NONE QAM64 # TS 13
++C 385000000 6875000 NONE QAM64 # TS 14
++C 393000000 6875000 NONE QAM64 # TS 15
++C 401000000 6875000 NONE QAM64 # TS 16
++C 369000000 6875000 NONE QAM64 # TS 18 (main TS)
++C 297000000 6875000 NONE QAM64 # TS 19
++C 377000000 6875000 NONE QAM64 # TS 22
++C 754000000 6875000 NONE QAM64 # TS 23
++C 642000000 6875000 NONE QAM64 # TS 24
++C 650000000 6875000 NONE QAM64 # TS 25
++C 794000000 6875000 NONE QAM64 # TS 26
++C 409000000 6875000 NONE QAM64 # TS 27
++C 425000000 6875000 NONE QAM64 # TS 206
++C 417000000 6875000 NONE QAM64 # TS 207
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/no-Oslo-CanalDigital dvb-apps/util/scan/dvb-c/no-Oslo-CanalDigital
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/no-Oslo-CanalDigital 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/no-Oslo-CanalDigital 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# no-oslo-CanalDigital (cable)
++C 354000000 6950000 NONE QAM64
++C 362000000 6950000 NONE QAM64
++C 370000000 6950000 NONE QAM64
++C 378000000 6950000 NONE QAM64
++C 386000000 6950000 NONE QAM64
++C 394000000 6950000 NONE QAM64
++C 402000000 6950000 NONE QAM64
++C 410000000 6950000 NONE QAM64
++C 418000000 6950000 NONE QAM64
++C 426000000 6950000 NONE QAM64
++C 450000000 6950000 NONE QAM64
++C 474000000 6950000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/no-Oslo-Get dvb-apps/util/scan/dvb-c/no-Oslo-Get
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/no-Oslo-Get 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/no-Oslo-Get 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,22 @@
++# no-Oslo-Get (cable)
++C 241000000 6900000 NONE QAM256
++C 272000000 6900000 NONE QAM256
++C 280000000 6900000 NONE QAM256
++C 290000000 6900000 NONE QAM256
++C 298000000 6900000 NONE QAM256
++C 306000000 6900000 NONE QAM256
++C 314000000 6900000 NONE QAM256
++C 322000000 6900000 NONE QAM256
++C 330000000 6900000 NONE QAM256
++C 338000000 6900000 NONE QAM256
++C 346000000 6900000 NONE QAM256
++C 354000000 6900000 NONE QAM256
++C 362000000 6900000 NONE QAM256
++C 370000000 6900000 NONE QAM256
++C 378000000 6900000 NONE QAM256
++C 386000000 6900000 NONE QAM256
++C 394000000 6900000 NONE QAM256
++C 410000000 6900000 NONE QAM256
++C 442000000 6952000 NONE QAM256
++C 482000000 6900000 NONE QAM256
++C 498000000 6900000 NONE QAM256
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/se-comhem dvb-apps/util/scan/dvb-c/se-comhem
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/se-comhem 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/se-comhem 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# com hem
++# freq sr fec mod
++C 362000000 6875000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/se-Gothnet dvb-apps/util/scan/dvb-c/se-Gothnet
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-c/se-Gothnet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-c/se-Gothnet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,23 @@
++# Gothnet DVB-C
++# Updated: 2008-09-19
++# freq sr fec mod
++
++# Free channels
++C 490000000 6875000 NONE QAM64
++C 498000000 6875000 NONE QAM64
++C 506000000 6875000 NONE QAM64
++C 514000000 6875000 NONE QAM64
++
++# SPA channels
++C 682000000 6900000 NONE QAM64
++C 690000000 6900000 NONE QAM64
++C 698000000 6900000 NONE QAM64
++C 706000000 6900000 NONE QAM64
++
++# Canal Digital channels
++C 314000000 7000000 NONE QAM64
++C 322000000 7000000 NONE QAM64
++C 346000000 7000000 NONE QAM64
++C 354000000 7000000 NONE QAM64
++C 362000000 7000000 NONE QAM64
++C 370000000 7000000 NONE QAM64
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Helsinki dvb-apps/util/scan/dvb-h/fi-Helsinki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Helsinki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-h/fi-Helsinki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,2 @@
++# H freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++H 586000000 8MHz 1/2 NONE QAM16 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Oulu dvb-apps/util/scan/dvb-h/fi-Oulu
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Oulu 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-h/fi-Oulu 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,2 @@
++# H freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++H 498000000 8MHz 1/2 NONE QAM16 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Oulu-Nokia-devel dvb-apps/util/scan/dvb-h/fi-Oulu-Nokia-devel
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Oulu-Nokia-devel 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-h/fi-Oulu-Nokia-devel 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Nokia Oulu delelopment network
++# Network Name 'Nokia Oulu'
++# H freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++H 690000000 8MHz 1/2 NONE QPSK 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Turku dvb-apps/util/scan/dvb-h/fi-Turku
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/fi-Turku 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-h/fi-Turku 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,2 @@
++# H freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++H 498000000 8MHz 1/2 NONE QAM16 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/README dvb-apps/util/scan/dvb-h/README
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-h/README 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-h/README 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++These files are mainly for informational and experimental purposes.
++The DVB-H file format hasn't been specified in any way; currently it's just
++a copy of the DVB-T format.
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ABS1-75.0E dvb-apps/util/scan/dvb-s/ABS1-75.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ABS1-75.0E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/ABS1-75.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# ABS-1 @ 75E
++# freq pol sr fec
++S 12518000 V 22000000 AUTO
++S 12548000 V 22000000 AUTO
++S 12579000 V 22000000 AUTO
++S 12640000 V 22000000 AUTO
++S 12670000 V 22000000 AUTO
++S 12693000 V 10000000 AUTO
++S 12704000 V 3900000 AUTO
++S 12740000 V 7408000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Amazonas-61.0W dvb-apps/util/scan/dvb-s/Amazonas-61.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Amazonas-61.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Amazonas-61.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,54 @@
++# Amazonas @ 61.0W
++# freq pol sr fec
++
++S 3957000 H 06666000 AUTO
++S 3966000 H 06666000 AUTO
++S 3975000 H 06666000 AUTO
++S 3993000 H 06666000 AUTO
++S 4137000 H 03409000 AUTO
++S 3941000 V 03480000 AUTO
++S 12092000 V 30000000 AUTO
++S 12132000 V 30000000 AUTO
++S 4174000 H 03330000 AUTO
++S 11128000 V 06666000 AUTO
++S 11185000 V 11800000 AUTO
++S 11049000 V 02000000 AUTO
++S 12052000 V 27000000 AUTO
++S 10975000 V 27000000 AUTO
++S 3631000 H 02785000 AUTO
++S 10975000 H 26666000 AUTO
++S 3677000 H 04400000 AUTO
++S 3985000 H 04444000 AUTO
++S 11810000 V 06666000 AUTO
++S 11921000 V 21740000 AUTO
++S 11943000 V 04750000 AUTO
++S 4168000 H 07307000 AUTO
++S 12052000 H 26667000 AUTO
++S 12172000 H 27500000 AUTO
++S 12092000 H 27500000 AUTO
++S 11175000 H 28880000 AUTO
++S 4154000 H 09615000 AUTO
++S 11099000 V 07576000 AUTO
++S 11885000 H 04890000 AUTO
++S 11882000 V 11343000 AUTO
++S 11133000 V 03111000 AUTO
++S 11078000 V 01862000 AUTO
++S 11912000 H 02222000 AUTO
++S 11906000 H 02220000 AUTO
++S 11108000 V 02170000 AUTO
++S 12132000 H 27500000 AUTO
++S 11135000 H 26667000 AUTO
++S 4144000 V 04540000 AUTO
++S 11808000 H 11111000 AUTO
++S 11972000 H 26667000 AUTO
++S 4156000 V 04540000 AUTO
++S 4149000 V 04540000 AUTO
++S 3948000 H 13300000 AUTO
++S 4178000 H 03333000 AUTO
++S 11844000 V 16600000 AUTO
++S 11095000 H 30000000 AUTO
++S 11790000 H 03600000 AUTO
++S 12172000 V 30000000 AUTO
++S 11015000 H 26666000 AUTO
++S 11055000 H 27500000 AUTO
++S 12012000 H 27500000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC1-103w dvb-apps/util/scan/dvb-s/AMC1-103w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC1-103w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/AMC1-103w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# AMC 1 @ 103W
++# freq pol sr fec
++
++S 11942000 V 20000000 AUTO
++S 12100000 V 20000000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC2-85w dvb-apps/util/scan/dvb-s/AMC2-85w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC2-85w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/AMC2-85w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# AMC 2 @ 85W
++# freq pol sr fec
++
++S 11731000 H 13021000 AUTO
++S 11744000 H 13021000 AUTO
++S 11771000 H 13021000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC3-87w dvb-apps/util/scan/dvb-s/AMC3-87w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC3-87w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/AMC3-87w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# AMC 3 @ 87.0W
++# freq pol sr fec
++
++S 11716000 H 04859000 AUTO
++S 12142000 V 30000000 AUTO
++S 12147000 H 04340000 AUTO
++S 12159000 H 04444000 AUTO
++S 12165000 H 04444000 AUTO
++S 12172000 H 04444000 AUTO
++S 12182000 V 30000000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC4-101w dvb-apps/util/scan/dvb-s/AMC4-101w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC4-101w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/AMC4-101w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# AMC 4 @ 101.0W
++# freq pol sr fec
++
++S 11573000 V 07234000 AUTO
++S 11655000 V 30000000 AUTO
++S 11708000 V 02170000 AUTO
++S 11822000 H 05700000 AUTO
++S 11860000 H 28138000 AUTO
++S 12120000 V 30000000 AUTO
++S 12169000 H 03003000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC5-79w dvb-apps/util/scan/dvb-s/AMC5-79w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC5-79w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/AMC5-79w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# AMC 5 @ 79W
++# freq pol sr fec
++
++S 11742000 V 11110000 AUTO
++S 12182000 H 23000000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC6-72w dvb-apps/util/scan/dvb-s/AMC6-72w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC6-72w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/AMC6-72w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,44 @@
++# AMC 6 @ 72W
++# freq pol sr fec
++
++S 11482000 V 02656000 AUTO
++S 11494000 V 06560000 AUTO
++S 11499000 V 02964000 AUTO
++S 11505000 V 02963000 AUTO
++S 11546000 V 12000000 AUTO
++S 11548000 H 03002000 AUTO
++S 11552000 H 03002000 AUTO
++S 11557000 H 04392000 AUTO
++S 11563000 H 04392000 AUTO
++S 11570000 H 04392000 AUTO
++S 11576000 H 04392000 AUTO
++S 11586000 H 02652000 AUTO
++S 11603000 V 08500000 AUTO
++S 11605000 V 03600000 AUTO
++S 11611000 V 03400000 AUTO
++S 11628000 V 06560000 AUTO
++S 11637000 V 02800000 AUTO
++S 11641000 V 03702000 AUTO
++S 11648000 V 07500000 AUTO
++S 11667000 V 07400000 AUTO
++S 11674000 V 04000000 AUTO
++S 11680000 V 03255000 AUTO
++S 11703000 V 03979000 AUTO
++S 11709000 V 03979000 AUTO
++S 11715000 V 03979000 AUTO
++S 11746000 V 03979000 AUTO
++S 11748000 H 14015000 AUTO
++S 11752000 V 03979000 AUTO
++S 11763000 V 03979000 AUTO
++S 11817000 H 05000000 AUTO
++S 11874000 V 04000000 AUTO
++S 11986000 V 03979000 AUTO
++S 11995000 V 03979000 AUTO
++S 12004000 V 03979000 AUTO
++S 12013000 V 03979000 AUTO
++S 12025000 V 03979000 AUTO
++S 12031000 V 03979000 AUTO
++S 12046000 H 06111000 AUTO
++S 12055000 V 06890000 AUTO
++S 12144000 V 02573000 AUTO
++S 12188000 H 06511000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC9-83w dvb-apps/util/scan/dvb-s/AMC9-83w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AMC9-83w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/AMC9-83w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# AMC 9 @ 83W
++# freq pol sr fec
++
++S 11745000 H 04232000 AUTO
++S 11751000 H 04232000 AUTO
++S 11757000 H 04232000 AUTO
++S 11763000 H 04232000 AUTO
++S 11769000 H 04232000 AUTO
++S 11775000 H 04232000 AUTO
++S 11826000 H 05632000 AUTO
++S 11864000 H 03979000 AUTO
++S 11871000 H 13000000 AUTO
++S 11889000 H 13025000 AUTO
++S 11926000 V 06511000 AUTO
++S 11953000 V 03979000 AUTO
++S 11960000 H 05000000 AUTO
++S 12002000 H 03979000 AUTO
++S 12011000 H 03979000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Amos-4w dvb-apps/util/scan/dvb-s/Amos-4w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Amos-4w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Amos-4w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,48 @@
++# Amos 6 @ 4W
++# freq pol sr fec
++S 10722000 H 27500000 3/4
++S 10722000 V 27500000 3/4
++S 10722000 V 30000000 2/3
++S 10758000 V 27500000 3/4
++S 10758000 V 30000000 2/3
++S 10759000 H 30000000 3/4
++S 10806000 H 27500000 5/6
++S 10806000 V 27500000 3/4
++S 10842000 H 27500000 7/8
++S 10842000 V 27500000 3/4
++S 10842000 V 30000000 2/3
++S 10890000 H 27500000 7/8
++S 10890000 V 27500000 3/4
++S 10925000 H 27500000 7/8
++S 10925000 V 27500000 3/4
++S 10972000 V 27500000 3/4
++S 11008000 V 27500000 3/4
++S 11015000 H 2295000 3/4
++S 11123000 H 1850000 7/8
++S 11167000 H 12500000 5/6
++S 11179000 H 6666000 3/4
++S 11260000 H 27500000 3/4
++S 11304000 H 19540000 3/4
++S 11319000 H 2750000 3/4
++S 11329000 H 3333000 3/4
++S 11333000 H 3500000 3/4
++S 11347000 H 3350000 3/4
++S 11384000 H 19000000 5/6
++S 11411000 H 7925000 5/6
++S 11429000 H 5925000 3/4
++S 11435000 H 2089000 3/4
++S 11474000 V 27500000 3/4
++S 11510000 V 30000000 2/3
++S 11558000 V 27500000 3/4
++S 11559000 H 13400000 7/8
++S 11572000 H 8888000 3/4
++S 11592000 H 21350000 3/4
++S 11593000 V 27500000 3/4
++S 11625000 V 3000000 3/4
++S 11630000 H 2963000 3/4
++S 11630000 V 3000000 3/4
++S 11637000 V 1480000 3/4
++S 11647000 H 9167000 3/4
++S 11647000 V 8518000 3/4
++S 11654000 H 2000000 5/6
++S 11658000 V 8520000 5/6
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Anik-F1-107.3W dvb-apps/util/scan/dvb-s/Anik-F1-107.3W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Anik-F1-107.3W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Anik-F1-107.3W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Anik F1 @ 107.3W
++# freq pol sr fec
++
++S 12002000 H 19980000 AUTO
++S 12063000 H 19980000 AUTO
++S 12155000 H 22500000 AUTO
++S 12185000 H 19980000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AsiaSat3S_C-105.5E dvb-apps/util/scan/dvb-s/AsiaSat3S_C-105.5E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/AsiaSat3S_C-105.5E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/AsiaSat3S_C-105.5E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,122 @@
++# AsiaSat 3S 105.5E C-BAND
++# Generated by Xingbo Wang
++# Apr 2, 2005
++
++# MPEG-2 QPSK
++# freq pol sr fec
++
++# [encrypted] ZEE English, ZEE TV International, ZEE Movies, MX, ZEE TV SE Asia, ZEE TV Asia, Trendz
++S 3700000 V 27500000 3/4
++
++# BTV World
++S 3725000 V 4450000 3/4
++
++# SAB TV
++S 3743000 V 3300000 3/4
++
++# AAJ TV
++S 3750000 V 2820000 3/4
++
++# Arirang TV
++S 3755150 V 4417900 7/8
++
++# [encrypted] STAR Plus India, STAR Movies India, STAR News India, National Geographic India, STAR Gold, STAR Movies (Middle East)
++# STAR Utsav
++S 3780000 V 28100000 3/4
++
++# Chinese Provincial TV: Guangxi, Shanxi, Anhui, Jiangsu, Heilongjiang
++S 3806000 V 4420000 3/4
++S 3813000 V 4420000 3/4
++S 3820000 V 4420000 3/4
++S 3827000 V 4420000 3/4
++S 3834000 V 4420000 3/4
++
++# [encrypted] ESPN Taiwan, STAR Sports Taiwan, ESPN Asia, STAR Sports South East Asia, STAR Sports India, ESPN India, ESPN Philippines
++S 3860000 V 27500000 3/4
++
++# Dragon TV
++S 3886000 V 4800000 3/4
++
++# Shandong TV
++S 3895000 V 6813000 3/4
++
++# CCTV-1(comprehensive), China National Radio Channel 1
++S 3904000 V 4420000 7/8
++
++# Jilin Provincial TV
++S 3914500 V 4420000 3/4
++
++# [encrypted] A1, History, STAR Movies SEA/China, STAR World India, STAR Plus Pakistan, Channel[V] India, STAR Chinese Movies, CNBC India, STAR One, STAR Vijay
++S 3980000 V 28100000 3/4
++
++# Sahara One, Sahara Samay National, Sahara Samay Mumbai, Sahara Samay Uttar Pradesh, Sahara Samay Bihar, Sahara Samay Madhya Pradesh
++S 4020000 V 27250000 3/4
++
++# Tianjin TV
++S 4046000 V 5950000 3/4
++
++# PTV-1, PTV World, PTV Channel 3, AVT Khyber
++S 4091000 V 13333000 3/4
++
++# PTV National
++S 4106000 V 3333300 3/4
++
++# Indus News
++S 4115750 V 3333000 3/4
++
++# [encrypted] ZEE Biz, ZEE News, ZEE Cinema, ZEE Music, Alpha TV Punjabi, Alpha TV Gujarati, Alpha TV Bangla, Alpha TV Marathi, Smile TV
++S 4140000 V 27500000 3/4
++
++# Chinese Provincial TV: Henan, Fujian, Jiangxi, Liaoning
++S 4166000 V 4420000 3/4
++S 4180000 V 4420000 3/4
++S 4187000 V 4420000 3/4
++S 4194000 V 4420000 3/4
++
++# CETV
++S 3680000 H 26670000 3/4
++
++# Channel NewsAsia
++S 3706000 H 6000000 3/4
++
++# Asia Plus
++S 3715500 H 7000000 3/4
++
++# TVB 8, CETV
++S 3729000 H 13650000 3/4
++
++# Network of the World, Bloomberg TV Asia, Indus Vision, Indus Music, Muslim TV Ahmadiyya, Living Asia Channel
++# [encrypted] Filmazia
++S 3760000 H 26000000 7/8
++
++# [encrypted] Fox News, Sky News, STAR Movies Int'l Taiwan, National Geographic Taiwan, STAR Chinese Channel, STAR Movies mandarin, Channel[V] Taiwan
++S 3840000 H 26850000 7/8
++
++# STAR Sports Asia
++# [encrypted] ESPN China, STAR Sports Hong Kong, ESPN Hong Kong
++S 3920000 H 26750000 7/8
++
++# [encrypted] CNN International Asia, CNN Newsource, Cartoon Network Asia, Cartoon Network Taiwan, Cartoon Network Philippines, Cartoon Network Australia/New Zealand, TCM Australia, Boomerang
++S 3960000 H 27500000 3/4
++
++# [encrypted] Phoenix Movies, star World Asia, Star Movies Int'l, Channel[V] International, National Geographic Regional
++# Phoenix Chinese Channel, Phoenix Info News Channel, Xiong Kong Int'l, Xing Kong Regional, Channel[V](Greater China)
++S 4000000 H 26850000 7/8
++
++# Chinese Provincial TV: Hubei, Sichuan
++S 4034600 H 4420000 3/4
++S 4051000 H 4420000 3/4
++
++# Chinese Provincial TV: Qinghai, Hunan
++S 4067000 H 4420000 3/4
++S 4082000 H 4420000 3/4
++
++# Sun TV
++S 4094000 H 5555000 3/4
++
++# MATV, Horizon Channel
++# [encrypted] Tian Ying Movies Channel, TVB Xing He Channel
++S 4111000 H 13650000 3/4
++
++# CCTV Channel 4 (International), Channel 9 (English language), CCTV E&F
++S 4129000 H 13240000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Astra-28.2E dvb-apps/util/scan/dvb-s/Astra-28.2E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Astra-28.2E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Astra-28.2E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,186 @@
++# Astra 28.2E SDT info service transponder
++# freq pol sr fec
++
++## Astra 2A
++# Transponder 1
++S 11720000 H 29500000 3/4
++# Transponder 2
++S 11740000 V 27500000 2/3
++# Transponder 3
++S 11758000 H 27500000 2/3
++# Transponder 4
++S 11778000 V 27500000 2/3
++# Transponder 5
++S 11798000 H 29500000 3/4
++# Transponder 6
++S 11817000 V 27500000 2/3
++# Transponder 7
++S 11836000 H 27500000 2/3
++# Transponder 8
++S 11856000 V 27500000 2/3
++# Transponder 9
++S 11876000 H 27500000 2/3
++# Transponder 10
++S 11895000 V 27500000 2/3
++# Transponder 11
++S 11914000 H 27500000 2/3
++# Transponder 12
++S 11934000 V 27500000 2/3
++# Transponder 13
++S 11954000 H 27500000 2/3
++# Transponder 18
++S 12051000 V 27500000 2/3
++# Transponder 22
++S 12129000 V 27500000 2/3
++# Transponder 23
++S 12148000 H 27500000 2/3
++# Transponder 24
++S 12168000 V 27500000 2/3
++# Transponder 27
++S 12226000 H 27500000 2/3
++# Transponder 28
++S 12246000 V 27500000 2/3
++# Transponder 37
++S 12422000 H 27500000 2/3
++# Transponder 40
++S 12480000 V 27500000 2/3
++
++## Astra 2B
++# Transponder 14
++S 11973000 V 27500000 2/3
++# Transponder 15
++S 11992000 H 27500000 2/3
++# Transponder 16
++S 12012000 V 27500000 2/3
++# Transponder 17
++S 12032000 H 27500000 2/3
++# Transponder 19
++S 12070000 H 27500000 2/3
++# Transponder 20
++S 12090000 V 27500000 2/3
++# Transponder 21
++S 12110000 H 27500000 2/3
++# Transponder 25
++S 12188000 H 27500000 2/3
++# Transponder 26
++S 12207000 V 27500000 2/3
++# Transponder 29
++S 12266000 H 27500000 2/3
++# Transponder 30
++S 12285000 V 27500000 2/3
++# Transponder 31
++S 12304000 H 27500000 2/3
++# Transponder 32
++S 12324000 V 29500000 3/4
++# Transponder 33
++S 12344000 H 29500000 3/4
++# Transponder 34
++S 12363000 V 29500000 3/4
++# Transponder 35
++S 12382000 H 27500000 2/3
++# Transponder 36
++S 12402000 V 27500000 2/3
++# Transponder 38
++S 12441000 V 27500000 2/3
++# Transponder 39
++S 12460000 H 27500000 2/3
++
++## Astra 2D
++# Transponder 41
++S 10714000 H 22000000 5/6
++# Transponder 42
++S 10729000 V 22000000 5/6
++# Transponder 43
++S 10744000 H 22000000 5/6
++# Transponder 44
++S 10758000 V 22000000 5/6
++# Transponder 45
++S 10773000 H 22000000 5/6
++# Transponder 46
++S 10788000 V 22000000 5/6
++# Transponder 47
++S 10803000 H 22000000 5/6
++# Transponder 48
++S 10818000 V 22000000 5/6
++# Transponder 49
++S 10832000 H 22000000 5/6
++# Transponder 50
++S 10847000 V 22000000 5/6
++# Transponder 51
++S 10862000 H 22000000 5/6
++# Transponder 52
++S 10876000 V 22000000 5/6
++# Transponder 53
++S 10891000 H 22000000 5/6
++# Transponder 54
++S 10906000 V 22000000 5/6
++# Transponder 55
++S 10921000 H 22000000 5/6
++# Transponder 56
++S 10936000 V 22000000 5/6
++
++## Eurobird 1
++# Transponder C1
++S 11222170 H 27500000 2/3
++# Transponder C2
++S 11223670 V 27500000 2/3
++# Transponder C2
++S 11259000 V 27500000 2/3
++# Transponder C1
++S 11261000 H 27500000 2/3
++# Transponder C3
++S 11307000 H 27500000 2/3
++# Transponder C4
++S 11307000 V 27500000 2/3
++# Transponder C4
++S 11343000 V 27500000 2/3
++# Transponder C3
++S 11344000 H 27500000 2/3
++# Transponder C5
++S 11390000 H 27500000 2/3
++# Transponder C6
++S 11390000 V 27500000 2/3
++# Transponder C5
++S 11426000 H 27500000 2/3
++# Transponder C6
++S 11426000 V 27500000 2/3
++# Transponder D1
++S 11469000 H 27500000 2/3
++# Transponder D2S
++S 11488000 V 27500000 2/3
++# Transponder D3S
++S 11508000 H 27500000 2/3
++# Transponder D4S
++S 11527000 V 27500000 2/3
++# Transponder D5
++S 11546000 H 27500000 2/3
++# Transponder D6
++S 11565000 V 27500000 2/3
++# Transponder D7
++S 11585000 H 27500000 2/3
++# Transponder D8
++S 11603850 V 27500000 2/3
++# Transponder D9
++S 11623000 H 27500000 2/3
++# Transponder D10
++S 11642000 V 27500000 2/3
++# Transponder D11
++S 11661540 H 27500000 2/3
++# Transponder D12
++S 11680770 V 27500000 2/3
++# Transponder F1
++S 12524000 H 27500000 2/3
++# Transponder F2
++S 12524000 V 27500000 2/3
++# Transponder F1
++S 12560000 H 27500000 2/3
++# Transponder F2
++S 12560000 V 27500000 2/3
++# Transponder F4
++S 12596000 V 27500000 2/3
++# Transponder F3
++S 12607000 H 27500000 3/4
++# Transponder F4
++S 12629000 V 6111000 3/4
++# Transponder F5
++S 12692000 V 19532000 1/2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Atlantic-Bird-1-12.5W dvb-apps/util/scan/dvb-s/Atlantic-Bird-1-12.5W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Atlantic-Bird-1-12.5W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Atlantic-Bird-1-12.5W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Atlantic Bird 1 @ 12.5W
++# freq pol sr fec
++S 11099000 H 2000000 5/6
++S 11132000 H 3255000 3/4
++S 11136000 V 3700000 5/6
++S 11174000 H 15190000 3/4
++S 11179000 V 22400000 2/3
++S 11188000 H 5722000 5/6
++S 11332000 H 6428000 2/3
++S 11337000 H 1923000 7/8
++S 11340000 H 2279000 5/6
++S 11355000 H 11781000 7/8
++S 11408000 V 27500000 3/4
++S 11428000 H 30000000 5/6
++S 11595000 V 27500000 5/6
++S 11622000 H 3255000 AUTO
++S 11643000 H 2398000 AUTO
++S 11645000 V 4790000 AUTO
++S 11651000 V 3688000 AUTO
++S 12515000 H 17455000 3/4
++S 12535000 V 2000000 3/4
++S 12545000 H 17455000 3/4
++S 12594000 H 2170000 3/4
++S 12597000 H 1730000 3/4
++S 12604000 H 1481000 3/4
++S 12655000 H 4285000 3/4
++S 12659000 H 2141000 3/4
++S 12662000 V 3928000 3/4
++S 12720000 V 1808000 3/4
++S 12743000 V 3214000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B1-75.0W dvb-apps/util/scan/dvb-s/BrasilSat-B1-75.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B1-75.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/BrasilSat-B1-75.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,11 @@
++# Brasilsat B1 @ 75.0W
++# freq pol sr fec
++
++S 3648000 V 04285000 AUTO
++S 3657000 V 06620000 AUTO
++S 3653000 V 04710000 AUTO
++S 3655000 H 06620000 AUTO
++S 3629000 H 06620000 AUTO
++S 3711000 H 03200000 AUTO
++S 3644000 V 04440000 AUTO
++S 3638000 H 04440000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B2-65.0W dvb-apps/util/scan/dvb-s/BrasilSat-B2-65.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B2-65.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/BrasilSat-B2-65.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,34 @@
++# Brasilsat B2 @ 65.0W
++# freq pol sr fec
++
++S 3745000 H 03540000 AUTO
++S 4008000 H 03333000 AUTO
++S 4011000 V 05000000 AUTO
++S 3792000 V 03393000 AUTO
++S 4104000 V 03214000 AUTO
++S 4097000 V 06667000 AUTO
++S 3905000 H 06666000 AUTO
++S 3935000 H 06666000 AUTO
++S 3890000 H 06666000 AUTO
++S 3925000 H 06666000 AUTO
++S 4112000 V 04285000 AUTO
++S 3650000 V 04440000 AUTO
++S 3736000 H 01808000 AUTO
++S 3787000 H 06666000 AUTO
++S 3876000 V 02740000 AUTO
++S 4117000 V 02963000 AUTO
++S 3815000 H 06666000 AUTO
++S 3793000 H 06666000 AUTO
++S 3721000 H 02963000 AUTO
++S 3684000 H 06666000 AUTO
++S 3915000 H 06666000 AUTO
++S 3766000 H 03336000 AUTO
++S 3847000 H 04444000 AUTO
++S 3706000 H 02462000 AUTO
++S 3667000 H 07236000 AUTO
++S 3771000 V 01480000 AUTO
++S 3734000 V 02852000 AUTO
++S 3810000 H 13333000 AUTO
++S 3762000 H 02222000 AUTO
++S 3834000 H 03572000 AUTO
++S 3850000 H 01570000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B3-84.0W dvb-apps/util/scan/dvb-s/BrasilSat-B3-84.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B3-84.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/BrasilSat-B3-84.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,85 @@
++# Brasilsat B3 @ 84.0W
++# freq pol sr fec
++
++S 3728000 H 04340000 AUTO
++S 3698000 V 03333000 AUTO
++S 4054000 V 01287000 AUTO
++S 3745000 H 04300000 AUTO
++S 3738000 V 04708000 AUTO
++S 3923000 V 01808000 AUTO
++S 3768000 V 08000000 AUTO
++S 3955000 V 04340000 AUTO
++S 4167000 H 03255000 AUTO
++S 3791000 V 03330000 AUTO
++S 3866000 H 04425000 AUTO
++S 3932000 V 03255000 AUTO
++S 4132000 V 02532000 AUTO
++S 3906000 H 03928000 AUTO
++S 3858000 V 04288000 AUTO
++S 3665000 V 03177000 AUTO
++S 3732000 V 03214000 AUTO
++S 3774000 H 03330000 AUTO
++S 3927000 V 03255000 AUTO
++S 3710000 H 03261000 AUTO
++S 3883000 H 04278000 AUTO
++S 3770000 H 03333000 AUTO
++S 3754000 V 05000000 AUTO
++S 3764000 H 04285000 AUTO
++S 3910000 H 03616000 AUTO
++S 3705000 H 04280000 AUTO
++S 3852000 V 03806000 AUTO
++S 3845000 H 10127000 AUTO
++S 3936000 V 03255000 AUTO
++S 3653000 V 03807000 AUTO
++S 3751000 H 03565000 AUTO
++S 3871000 H 04435000 AUTO
++S 3895000 H 04430000 AUTO
++S 3936000 H 03255000 AUTO
++S 3800000 H 03255000 AUTO
++S 3855000 H 04000000 AUTO
++S 4171000 H 02170000 AUTO
++S 3716000 H 04800000 AUTO
++S 4068000 H 02600000 AUTO
++S 4070000 V 02964000 AUTO
++S 3949000 V 04340000 AUTO
++S 3684000 V 03200000 AUTO
++S 4169000 V 08140000 AUTO
++S 4144000 H 02734000 AUTO
++S 3736000 H 04285000 AUTO
++S 3790000 H 10444000 AUTO
++S 3724000 V 02075000 AUTO
++S 4121000 H 02500000 AUTO
++S 3629000 H 06666000 AUTO
++S 3970000 V 04445000 AUTO
++S 3985000 V 03300000 AUTO
++S 3916000 H 03255000 AUTO
++S 4155000 V 03255000 AUTO
++S 3692000 V 03330000 AUTO
++S 3644000 V 04687000 AUTO
++S 4087000 H 17200000 AUTO
++S 3889000 H 04440000 AUTO
++S 4176000 V 03515000 AUTO
++S 3829000 V 04340000 AUTO
++S 3805000 V 02662000 AUTO
++S 3943000 V 02460000 AUTO
++S 3757000 H 03565000 AUTO
++S 3696000 H 01808000 AUTO
++S 3989000 V 02666000 AUTO
++S 3690000 V 03200000 AUTO
++S 3657000 V 03600000 AUTO
++S 3996000 V 02300000 AUTO
++S 3926000 H 04000000 AUTO
++S 4126000 H 04000000 AUTO
++S 4136000 H 02142000 AUTO
++S 3675000 V 04285000 AUTO
++S 3931000 H 04000000 AUTO
++S 3786000 V 04286000 AUTO
++S 3688000 V 02308000 AUTO
++S 4075000 V 04444000 AUTO
++S 3911000 V 03255000 AUTO
++S 3824000 H 03002000 AUTO
++S 3778000 V 06850000 AUTO
++S 3710000 V 12960000 AUTO
++S 3877000 H 04450000 AUTO
++S 3940000 V 03255000 AUTO
++S 4064000 H 03300000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B4-70.0W dvb-apps/util/scan/dvb-s/BrasilSat-B4-70.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/BrasilSat-B4-70.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/BrasilSat-B4-70.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,39 @@
++# Brasilsat B4 @ 70.0W
++# freq pol sr fec
++
++S 3951000 H 03214000 AUTO
++S 3714000 V 04400000 AUTO
++S 3672000 H 04713000 AUTO
++S 3955000 H 04400000 AUTO
++S 3965000 V 02930000 AUTO
++S 3628000 H 03000000 AUTO
++S 3644000 V 03214000 AUTO
++S 3650000 H 04285000 AUTO
++S 3688000 H 06000000 AUTO
++S 3680000 H 06000000 AUTO
++S 3662000 V 04606000 AUTO
++S 3945000 H 03214000 AUTO
++S 3640000 H 03263000 AUTO
++S 3979000 V 03617000 AUTO
++S 3752000 V 06220000 AUTO
++S 3685000 V 04500000 AUTO
++S 3650000 V 04400000 AUTO
++S 3985000 H 02170000 AUTO
++S 4010000 H 13021000 AUTO
++S 3665000 H 04700000 AUTO
++S 3637000 H 02228000 AUTO
++S 3708000 V 03928000 AUTO
++S 4047000 V 07143000 AUTO
++S 3672000 V 08454000 AUTO
++S 3820000 V 27500000 AUTO
++S 3940000 V 27500000 AUTO
++S 3964000 H 01875000 AUTO
++S 3695000 H 03598000 AUTO
++S 3900000 V 27500000 AUTO
++S 3645000 H 03520000 AUTO
++S 3983000 V 01630000 AUTO
++S 3631000 H 04687000 AUTO
++S 3874000 V 05926000 AUTO
++S 3700000 V 09123000 AUTO
++S 3997000 V 02300000 AUTO
++S 3973000 V 04338000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Estrela-do-Sul-63.0W dvb-apps/util/scan/dvb-s/Estrela-do-Sul-63.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Estrela-do-Sul-63.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Estrela-do-Sul-63.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,27 @@
++# Estrela do Sul @ 63.0W
++# freq pol sr fec
++
++S 11892000 V 02964000 AUTO
++S 11987000 H 03330000 AUTO
++S 12054000 H 26660000 AUTO
++S 11830000 V 06000000 AUTO
++S 11603000 V 03124000 AUTO
++S 11598000 V 03124000 AUTO
++S 11803000 V 04444000 AUTO
++S 11958000 H 04444000 AUTO
++S 11610000 V 03124000 AUTO
++S 11861000 V 02964000 AUTO
++S 11879000 V 02964000 AUTO
++S 11903000 V 02362000 AUTO
++S 11817000 V 06666000 AUTO
++S 11577000 V 03124000 AUTO
++S 11582000 V 03124000 AUTO
++S 11982000 H 08888000 AUTO
++S 11888000 V 02392000 AUTO
++S 11898000 V 02480000 AUTO
++S 11871000 V 02000000 AUTO
++S 11795000 V 04444000 AUTO
++S 11845000 V 04444000 AUTO
++S 11640000 V 18100000 AUTO
++S 11875000 V 03333000 AUTO
++S 11543000 V 10410000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Eurobird1-28.5E dvb-apps/util/scan/dvb-s/Eurobird1-28.5E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Eurobird1-28.5E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Eurobird1-28.5E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# Eurobird 28.5E SDT info service transponder
++# freq pol sr fec
++S 11623000 H 27500000 2/3
++S 11224000 V 27500000 2/3
++S 11527000 V 27500000 2/3
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Eurobird9-9.0E dvb-apps/util/scan/dvb-s/Eurobird9-9.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Eurobird9-9.0E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Eurobird9-9.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++# Eurobird 9.0E
++# freq pol sr fec
++S 11727000 V 27500000 5/6
++S 11747000 H 27500000 3/4
++S 11766000 V 27500000 5/6
++S 11785000 H 27500000 3/4
++S 11804000 V 27500000 3/4
++S 11823000 H 27500000 3/4
++S 11843000 V 27500000 3/4
++S 11881000 V 26700000 3/4
++S 11919000 V 27500000 5/6
++S 11938000 H 27500000 3/4
++S 11977000 H 27500000 3/4
++S 11996000 V 27500000 3/4
++S 12054000 H 27500000 3/4
++S 12092000 H 27500000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/EutelsatW2-16E dvb-apps/util/scan/dvb-s/EutelsatW2-16E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/EutelsatW2-16E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/EutelsatW2-16E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,59 @@
++# Eutelsat W2 @ 16E
++# freq pol sr fec
++
++S 10957000 H 2821000 AUTO
++S 10968000 H 6400000 AUTO
++S 10972000 V 27500000 AUTO
++S 10976000 H 6400000 AUTO
++S 10989000 H 6400000 AUTO
++S 10997000 H 6400000 AUTO
++S 11005000 H 6400000 AUTO
++S 11011000 V 27500000 AUTO
++S 11015000 H 6400000 AUTO
++S 11025000 H 2894000 AUTO
++S 11046000 H 10555000 AUTO
++S 11057000 H 3327000 AUTO
++S 11061000 H 5722000 AUTO
++S 11078000 H 5208000 AUTO
++S 11092000 V 32000000 AUTO
++S 11094000 H 2734000 AUTO
++S 11132000 V 14185000 AUTO
++S 11178000 V 27500000 AUTO
++S 11192000 H 2667000 AUTO
++S 11267000 H 2170000 AUTO
++S 11276000 H 11100000 AUTO
++S 11294000 H 13333000 AUTO
++S 11304000 V 30000000 AUTO
++S 11324000 H 27500000 AUTO
++S 11428000 V 30000000 AUTO
++S 11449000 H 27500000 AUTO
++S 11471000 V 29950000 AUTO
++S 11492000 H 29950000 AUTO
++S 11513000 V 29950000 AUTO
++S 11534000 H 30000000 AUTO
++S 11554000 V 30000000 AUTO
++S 11575000 H 30000000 AUTO
++S 11594000 V 28800000 AUTO
++S 11617000 H 29950000 AUTO
++S 11634000 V 17578000 AUTO
++S 11658000 H 30000000 AUTO
++S 11659000 V 17578000 AUTO
++S 11682000 V 14468000 AUTO
++S 12538000 V 4340000 AUTO
++S 12549000 V 2894000 AUTO
++S 12555000 H 5632000 AUTO
++S 12557000 V 2156000 AUTO
++S 12562000 H 5632000 AUTO
++S 12563000 V 2222000 AUTO
++S 12568000 H 3703000 AUTO
++S 12625000 V 4444000 AUTO
++S 12633000 V 4883000 AUTO
++S 12642000 V 3418000 AUTO
++S 12650000 H 15000000 AUTO
++S 12656000 V 4883000 AUTO
++S 12677000 V 6111000 AUTO
++S 12683000 H 2894000 AUTO
++S 12703000 H 2748000 AUTO
++S 12716000 H 6000000 AUTO
++S 12723000 H 3000000 AUTO
++S 12733000 V 16277000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Express-3A-11.0W dvb-apps/util/scan/dvb-s/Express-3A-11.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Express-3A-11.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Express-3A-11.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Express 3A @ 11.0W
++# freq pol sr fec
++
++S 3675000 V 29623000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM1-40.0E dvb-apps/util/scan/dvb-s/ExpressAM1-40.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM1-40.0E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/ExpressAM1-40.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# Express AM1 @ 40E
++# freq pol sr fec
++S 10967000 V 20000000 AUTO
++S 10995000 V 20000000 AUTO
++S 11097000 H 4000000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM22-53.0E dvb-apps/util/scan/dvb-s/ExpressAM22-53.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM22-53.0E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/ExpressAM22-53.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# Express AM 22 @ 53E
++# freq pol sr fec
++S 11044000 V 44950000 3/4
++S 10974000 H 8150000 3/4
++#S 10974000 V 32223000 7/8
++S 11031000 H 3750000 3/4
++S 11096000 V 6400000 3/4
++S 11124000 V 7593000 3/4
++S 11161000 V 5785000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM2-80.0E dvb-apps/util/scan/dvb-s/ExpressAM2-80.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/ExpressAM2-80.0E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/ExpressAM2-80.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,35 @@
++# Express AM2 @ 80E
++# freq pol sr fec
++S 10973000 V 4444000 AUTO
++S 10991000 V 4444000 AUTO
++S 11044000 H 44948000 AUTO
++S 11081000 V 5064000 AUTO
++S 11088000 V 4548000 AUTO
++S 11191000 H 3255000 AUTO
++S 11462000 V 3200000 AUTO
++S 11478000 H 4400000 AUTO
++S 11544000 V 44950000 AUTO
++S 11606000 V 44948000 AUTO
++S 11650000 V 3500000 AUTO
++
++# Express AM2 @ 80E C-BAND
++# Generated by Roman Kashcheev
++# Mar 30, 2008
++# freq pol sr fec
++
++# RSCC
++S 3525000 V 31106000 3/4
++# TRK Sever
++S 3558000 V 3215000 3/4
++# TRV Muji
++S 3562000 V 3225000 3/4
++# OTV Sakhalin
++S 3625000 V 3000000 3/4
++# RSCC
++S 3675000 V 33483000 7/8
++# 5 Kanal
++S 3929000 H 8705000 3/4
++# TV Centr
++S 4147000 V 27500000 3/4
++# Blagovest Telekanal
++S 4175000 V 6510000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy10R-123w dvb-apps/util/scan/dvb-s/Galaxy10R-123w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy10R-123w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Galaxy10R-123w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# Galaxy 10R @ 123W
++# freq pol sr fec
++
++S 11720000 V 27692000 AUTO
++S 11732000 H 13240000 AUTO
++S 11800000 V 26657000 AUTO
++S 11805000 H 04580000 AUTO
++S 11966000 V 13021000 AUTO
++S 12104000 V 02222000 AUTO
++S 12114000 V 04444000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy11-91w dvb-apps/util/scan/dvb-s/Galaxy11-91w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy11-91w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Galaxy11-91w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,49 @@
++# Galaxy 11 @ 91W
++# freq pol sr fec
++
++S 10964000 V 19850000 AUTO
++S 10994000 V 20000000 AUTO
++S 11024000 V 20000000 AUTO
++S 11806000 V 03979000 AUTO
++S 11815000 V 03979000 AUTO
++S 11825000 V 06111000 AUTO
++S 11925000 V 03979000 AUTO
++S 11930000 V 03979000 AUTO
++S 11935000 V 03979000 AUTO
++S 11940000 V 03979000 AUTO
++S 11945000 V 03979000 AUTO
++S 11950000 H 03979000 AUTO
++S 11950000 V 03979000 AUTO
++S 11955000 H 03979000 AUTO
++S 11955000 V 03979000 AUTO
++S 11960000 H 03979000 AUTO
++S 11965000 V 03979000 AUTO
++S 11965000 H 03979000 AUTO
++S 11970000 V 03979000 AUTO
++S 11970000 H 03979000 AUTO
++S 11975000 V 03979000 AUTO
++S 11975000 H 03979000 AUTO
++S 11980000 V 03979000 AUTO
++S 11985000 H 03979000 AUTO
++S 11985000 V 03979000 AUTO
++S 11990000 H 03979000 AUTO
++S 11990000 V 03979000 AUTO
++S 11995000 H 03979000 AUTO
++S 11995000 V 03979000 AUTO
++S 12000000 H 03979000 AUTO
++S 12005000 V 03979000 AUTO
++S 12010000 H 03979000 AUTO
++S 12010000 V 03979000 AUTO
++S 12015000 H 03979000 AUTO
++S 12015000 V 03979000 AUTO
++S 12020000 V 03979000 AUTO
++S 12025000 V 03979000 AUTO
++S 12030000 V 03979000 AUTO
++S 12035000 V 03979000 AUTO
++S 12066000 H 05632000 AUTO
++S 12075000 H 03979000 AUTO
++S 12083000 H 05632000 AUTO
++S 12086000 V 06144000 AUTO
++S 12096000 V 06144000 AUTO
++S 12104000 V 06144000 AUTO
++S 12114000 V 06144000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy25-97w dvb-apps/util/scan/dvb-s/Galaxy25-97w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy25-97w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Galaxy25-97w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++# Galaxy 25 @ 97W
++# freq pol sr fec
++
++S 11789000 V 28125000 AUTO
++S 11836000 V 20770000 AUTO
++S 11867000 V 22000000 AUTO
++S 11874000 H 22000000 AUTO
++S 11898000 V 22000000 AUTO
++S 11936000 H 20000000 AUTO
++S 11966000 H 22000000 AUTO
++S 11991000 V 22000000 AUTO
++S 11999000 H 20000000 AUTO
++S 12053000 V 22000000 AUTO
++S 12084000 V 22000000 AUTO
++S 12090000 H 20000000 AUTO
++S 12115000 V 22425000 AUTO
++S 12146000 V 22000000 AUTO
++S 12152000 H 20000000 AUTO
++S 12177000 V 23000000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy26-93w dvb-apps/util/scan/dvb-s/Galaxy26-93w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy26-93w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Galaxy26-93w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,58 @@
++# Galaxy 26 @ 93W
++# freq pol sr fec
++
++S 11711000 V 14312000 AUTO
++S 11721000 V 03979000 AUTO
++S 11727000 V 03979000 AUTO
++S 11732000 V 03979000 AUTO
++S 11737000 V 03979000 AUTO
++S 11737000 H 03979000 AUTO
++S 11742000 V 03979000 AUTO
++S 11748000 V 03979000 AUTO
++S 11753000 V 03979000 AUTO
++S 11767000 V 03979000 AUTO
++S 11772000 V 03979000 AUTO
++S 11772000 H 03979000 AUTO
++S 11777000 V 03979000 AUTO
++S 11782000 V 03979000 AUTO
++S 11788000 V 03979000 AUTO
++S 11793000 V 03979000 AUTO
++S 11809000 V 03979000 AUTO
++S 11814000 V 03979000 AUTO
++S 11841000 H 04000000 AUTO
++S 11887000 V 03979000 AUTO
++S 11893000 V 03979000 AUTO
++S 11904000 H 03010000 AUTO
++S 11919000 V 03979000 AUTO
++S 11924000 V 03979000 AUTO
++S 11926000 H 08848000 AUTO
++S 11929000 V 03979000 AUTO
++S 11935000 V 03979000 AUTO
++S 11936000 H 08848000 AUTO
++S 11944000 H 08848000 AUTO
++S 11949000 V 03979000 AUTO
++S 11954000 V 03979000 AUTO
++S 11956000 H 03979000 AUTO
++S 11960000 V 03979000 AUTO
++S 11961000 H 03979000 AUTO
++S 11965000 V 03979000 AUTO
++S 11967000 H 03979000 AUTO
++S 11970000 V 03979000 AUTO
++S 11972000 H 03979000 AUTO
++S 11977000 H 03979000 AUTO
++S 12047000 V 03979000 AUTO
++S 12048000 H 03979000 AUTO
++S 12054000 H 03979000 AUTO
++S 12058000 V 03979000 AUTO
++S 12059000 H 03979000 AUTO
++S 12063000 V 03979000 AUTO
++S 12064000 H 03979000 AUTO
++S 12069000 H 03979000 AUTO
++S 12076000 V 08681000 AUTO
++S 12089000 V 06511000 AUTO
++S 12110000 H 04104000 AUTO
++S 12116000 H 03979000 AUTO
++S 12121000 H 03979000 AUTO
++S 12126000 H 03979000 AUTO
++S 12132000 H 03979000 AUTO
++S 12175000 V 05147000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy27-129w dvb-apps/util/scan/dvb-s/Galaxy27-129w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy27-129w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Galaxy27-129w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Galaxy 27 @ 129W
++# freq pol sr fec
++
++S 11964000 H 02920000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy28-89w dvb-apps/util/scan/dvb-s/Galaxy28-89w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy28-89w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Galaxy28-89w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,41 @@
++# Galaxy 28 @ 89W
++# freq pol sr fec
++
++S 11717000 H 04411000 AUTO
++S 11747000 H 06620000 AUTO
++S 11756000 H 06620000 AUTO
++S 11780000 H 29000000 AUTO
++S 11800000 H 27500000 AUTO
++S 11825000 H 04552000 AUTO
++S 11865000 H 03700000 AUTO
++S 11882000 H 04883000 AUTO
++S 11925000 H 03979000 AUTO
++S 11930000 H 03979000 AUTO
++S 11935000 H 03979000 AUTO
++S 11936000 H 06000000 AUTO
++S 11940000 H 03979000 AUTO
++S 11945000 H 03979000 AUTO
++S 11950000 H 03979000 AUTO
++S 11955000 V 19532000 AUTO
++S 11960000 H 28800000 AUTO
++S 11965000 H 03979000 AUTO
++S 11970000 H 03979000 AUTO
++S 11975000 V 03979000 AUTO
++S 11980000 H 03979000 AUTO
++S 11985000 H 03979000 AUTO
++S 11989000 V 06111000 AUTO
++S 11990000 H 03979000 AUTO
++S 11995000 H 03979000 AUTO
++S 12000000 H 28800000 AUTO
++S 12009000 V 06111000 AUTO
++S 12032000 H 06666000 AUTO
++S 12092000 H 02314000 AUTO
++S 12114000 H 14398000 AUTO
++S 12134000 H 04000000 AUTO
++S 12164000 H 03979000 AUTO
++S 12170000 H 03979000 AUTO
++S 12175000 H 03979000 AUTO
++S 12180000 H 03979000 AUTO
++S 12185000 H 03979000 AUTO
++S 12191000 H 03979000 AUTO
++S 12196000 H 03979000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy3C-95w dvb-apps/util/scan/dvb-s/Galaxy3C-95w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Galaxy3C-95w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Galaxy3C-95w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Galaxy 3C @ 95W
++# freq pol sr fec
++
++S 11780000 H 20760000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Hispasat-30.0W dvb-apps/util/scan/dvb-s/Hispasat-30.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Hispasat-30.0W 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Hispasat-30.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -1,6 +1,43 @@
+ # Hispasat 30.0W
+ # freq pol sr fec
++
+ S 11539000 V 24500000 5/6
++S 11749000 V 03520000 AUTO
++S 11760000 V 03260000 AUTO
++S 11766000 V 04500000 AUTO
++S 11776000 V 02387000 AUTO
++S 11783000 V 01200000 AUTO
++S 11787000 V 02500000 AUTO
++S 11807000 V 06510000 AUTO
++S 11823000 V 02387000 AUTO
++S 11884000 V 27500000 AUTO
++S 11907000 V 02592000 AUTO
++S 11917000 V 05681000 AUTO
+ S 11931000 H 27500000 3/4
++S 11931000 V 02220000 AUTO
++S 11936000 V 05185000 AUTO
++S 11940000 V 01481000 AUTO
++S 11972000 H 27500000 AUTO
++S 11997000 H 04422000 AUTO
++S 12003000 H 05632000 AUTO
++S 12008000 H 06111000 AUTO
++S 12015000 H 03492000 AUTO
+ S 12015000 V 27500000 3/4
++S 12040000 H 05632000 AUTO
++S 12052000 V 27500000 AUTO
++S 12085000 H 05632000 AUTO
++S 12131000 H 27500000 AUTO
++S 12135000 V 04444000 AUTO
++S 12137000 V 03030000 AUTO
++S 12141000 V 03255000 AUTO
++S 12146000 V 04200000 AUTO
++S 12156000 V 02222000 AUTO
++S 12158000 V 02348000 AUTO
++S 12163000 V 03030000 AUTO
++S 12168000 V 05240000 AUTO
++S 12172000 H 27500000 AUTO
++S 12175000 V 04500000 AUTO
++S 12182000 V 03340000 AUTO
++S 12188000 V 02583000 AUTO
++S 12192000 V 02593000 AUTO
+ S 12567000 H 19850000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Hotbird-13.0E dvb-apps/util/scan/dvb-s/Hotbird-13.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Hotbird-13.0E 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Hotbird-13.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,96 @@
+ # EUTELSAT SkyPlex, Hotbird 13E
+ # freq pol sr fec
+ S 12539000 H 27500000 3/4
++S 10719000 V 27500000 3/4
++S 10723000 H 29900000 3/4
++S 10757000 V 27500000 3/4
++S 10775000 H 28000000 3/4
++S 10795000 V 27500000 3/4
++S 10834000 V 27500000 3/4
++S 10853000 H 27500000 3/4
++S 10872000 V 27500000 3/4
++S 10892000 H 27500000 3/4
++S 10910000 V 27500000 3/4
++S 10930000 H 27500000 3/4
++S 10949000 V 27500000 3/4
++S 10971000 H 27500000 3/4
++S 10992000 V 27500000 2/3
++S 11013000 H 27500000 3/4
++S 11034000 V 27500000 3/4
++S 11054000 H 27500000 5/6
++S 11075000 V 27500000 3/4
++S 11095000 H 28000000 3/4
++S 11117000 V 27500000 3/4
++S 11137000 H 27500000 3/4
++S 11158000 V 27500000 3/4
++S 11178000 H 27500000 3/4
++S 11200000 V 27500000 5/6
++S 11219000 H 27500000 3/4
++S 11242000 V 27500000 3/4
++S 11278000 V 27500000 3/4
++S 11295000 H 27500000 3/4
++S 11334000 H 27500000 2/3
++S 11355000 V 27500000 3/4
++S 11373000 H 27500000 2/3
++S 11393000 V 27500000 3/4
++S 11411000 H 27500000 5/6
++S 11432000 V 27500000 2/3
++S 11470000 V 27500000 5/6
++S 11488000 H 27500000 3/4
++S 11526000 H 27500000 3/4
++S 11541000 V 22000000 5/6
++S 11565000 H 27500000 3/4
++S 11585000 V 27500000 3/4
++S 11604000 H 27500000 5/6
++S 11623000 V 27500000 3/4
++S 11645000 H 27500000 3/4
++S 11662000 V 27500000 3/4
++S 11677000 H 27500000 3/4
++S 11727000 V 27500000 3/4
++S 11747000 H 27500000 3/4
++S 11765000 V 27500000 2/3
++S 11785000 H 27500000 3/4
++S 11804000 V 27500000 2/3
++S 11823000 H 27500000 3/4
++S 11842000 V 27500000 3/4
++S 11861000 H 27500000 3/4
++S 11880000 V 27500000 3/4
++S 11900000 H 27500000 3/4
++S 11919000 V 27500000 2/3
++S 11938000 H 27500000 3/4
++S 11958000 V 27500000 3/4
++S 11976000 H 27500000 3/4
++S 12015000 H 27500000 3/4
++S 12034000 V 27500000 3/4
++S 12054000 H 27500000 3/4
++S 12072000 V 27500000 3/4
++S 12092000 H 27500000 3/4
++S 12111000 V 27500000 3/4
++S 12149000 V 27500000 3/4
++S 12169000 H 27500000 3/4
++S 12188000 V 27500000 3/4
++S 12207000 H 27500000 3/4
++S 12226000 V 27500000 3/4
++S 12245000 H 27500000 3/4
++S 12264000 V 27500000 3/4
++S 12284000 H 27500000 3/4
++S 12302000 V 27500000 3/4
++S 12322000 H 27500000 3/4
++S 12341000 V 27500000 3/4
++S 12360000 H 27500000 3/4
++S 12379000 V 27500000 3/4
++S 12398000 H 27500000 3/4
++S 12418000 V 27500000 3/4
++S 12437000 H 27500000 3/4
++S 12475000 H 27500000 3/4
++S 12519000 V 27500000 3/4
++S 12558000 V 27500000 3/4
++S 12577000 H 27500000 3/4
++S 12596000 V 27500000 3/4
++S 12616000 H 27500000 3/4
++S 12635000 V 27500000 3/4
++S 12654000 H 27500000 3/4
++S 12673000 V 27500000 3/4
++S 12692000 H 27500000 3/4
++S 12713000 V 27500000 3/4
++S 12731000 H 27500000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA5-97w dvb-apps/util/scan/dvb-s/IA5-97w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA5-97w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/IA5-97w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# Intelsat Americas 5 @ 97W
++# freq pol sr fec
++
++S 11789000 V 25000000 AUTO
++S 11836000 V 20765000 AUTO
++S 11867000 V 22000000 AUTO
++S 11874000 H 22000000 AUTO
++S 11898000 V 22000000 AUTO
++S 11966000 H 22000000 AUTO
++S 11991000 V 22000000 AUTO
++S 12053000 V 22000000 AUTO
++S 12084000 V 22000000 AUTO
++S 12090000 H 20000000 AUTO
++S 12115000 V 22425000 AUTO
++S 12122000 H 22000000 AUTO
++S 12146000 V 22000000 AUTO
++S 12152000 H 20000000 AUTO
++S 12177000 V 23000000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA6-93w dvb-apps/util/scan/dvb-s/IA6-93w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA6-93w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/IA6-93w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,61 @@
++# Intelsat Americas 6 @ 93W
++# freq pol sr fec
++
++S 11711000 V 14312000 AUTO
++S 11721000 V 03979000 AUTO
++S 11727000 V 03979000 AUTO
++S 11732000 V 03979000 AUTO
++S 11737000 V 03979000 AUTO
++S 11737000 H 03979000 AUTO
++S 11742000 V 03979000 AUTO
++S 11748000 V 03979000 AUTO
++S 11753000 V 03979000 AUTO
++S 11767000 V 03979000 AUTO
++S 11772000 V 03979000 AUTO
++S 11772000 H 03979000 AUTO
++S 11777000 V 03979000 AUTO
++S 11782000 V 03979000 AUTO
++S 11788000 V 03979000 AUTO
++S 11793000 V 03979000 AUTO
++S 11809000 V 03979000 AUTO
++S 11814000 V 03979000 AUTO
++S 11827000 V 08429000 AUTO
++S 11836000 H 07179000 AUTO
++S 11841000 H 04000000 AUTO
++S 11865000 V 03516000 AUTO
++S 11887000 V 03979000 AUTO
++S 11893000 V 03979000 AUTO
++S 11904000 V 05000000 AUTO
++S 11919000 V 03979000 AUTO
++S 11924000 V 03979000 AUTO
++S 11926000 H 08848000 AUTO
++S 11929000 V 03979000 AUTO
++S 11935000 V 03979000 AUTO
++S 11936000 H 08848000 AUTO
++S 11944000 H 08848000 AUTO
++S 11949000 V 03979000 AUTO
++S 11954000 V 03979000 AUTO
++S 11956000 H 03979000 AUTO
++S 11960000 V 03979000 AUTO
++S 11961000 H 03979000 AUTO
++S 11965000 V 03979000 AUTO
++S 11967000 H 03979000 AUTO
++S 11970000 V 03979000 AUTO
++S 11972000 H 03979000 AUTO
++S 11977000 H 03979000 AUTO
++S 12047000 V 03979000 AUTO
++S 12048000 H 03979000 AUTO
++S 12054000 H 03979000 AUTO
++S 12058000 V 03979000 AUTO
++S 12059000 H 03979000 AUTO
++S 12063000 V 03979000 AUTO
++S 12064000 H 03979000 AUTO
++S 12069000 H 03979000 AUTO
++S 12076000 V 08679000 AUTO
++S 12089000 V 06511000 AUTO
++S 12110000 H 04104000 AUTO
++S 12116000 H 03979000 AUTO
++S 12121000 H 03979000 AUTO
++S 12126000 H 03979000 AUTO
++S 12132000 H 03979000 AUTO
++S 12175000 V 05147000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA7-129w dvb-apps/util/scan/dvb-s/IA7-129w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA7-129w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/IA7-129w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Intelsat Americas 7 @ 129W
++# freq pol sr fec
++
++S 11989000 H 02821000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA8-89w dvb-apps/util/scan/dvb-s/IA8-89w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/IA8-89w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/IA8-89w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,34 @@
++# Intelsat Americas 8 @ 89W
++# freq pol sr fec
++
++S 11780000 H 29000000 AUTO
++S 11925000 H 03979000 AUTO
++S 11930000 H 03979000 AUTO
++S 11935000 H 03979000 AUTO
++S 11940000 H 03979000 AUTO
++S 11945000 H 03979000 AUTO
++S 11945000 V 03979000 AUTO
++S 11950000 H 03979000 AUTO
++S 11950000 V 03979000 AUTO
++S 11955000 H 03979000 AUTO
++S 11955000 V 03979000 AUTO
++S 11960000 V 03979000 AUTO
++S 11965000 V 03979000 AUTO
++S 11965000 H 03979000 AUTO
++S 11970000 V 03979000 AUTO
++S 11970000 H 03979000 AUTO
++S 11975000 V 03979000 AUTO
++S 11975000 H 03979000 AUTO
++S 11980000 H 03979000 AUTO
++S 11985000 H 03979000 AUTO
++S 11989000 V 06111000 AUTO
++S 11990000 H 03979000 AUTO
++S 11995000 H 03979000 AUTO
++S 12009000 V 06111000 AUTO
++S 12164000 H 03979000 AUTO
++S 12170000 H 03979000 AUTO
++S 12175000 H 03979000 AUTO
++S 12180000 H 03979000 AUTO
++S 12185000 H 03979000 AUTO
++S 12191000 H 03979000 AUTO
++S 12196000 H 03979000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intel4-72.0E dvb-apps/util/scan/dvb-s/Intel4-72.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intel4-72.0E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intel4-72.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Intel4 @ 72E
++# freq pol sr fec
++S 11533000 V 4220000 AUTO
++S 11638000 H 5632000 AUTO
++S 12518000 V 8232000 AUTO
++S 12526000 V 3266000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intel904-60.0E dvb-apps/util/scan/dvb-s/Intel904-60.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intel904-60.0E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intel904-60.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# Intel904 @ 60E
++# freq pol sr fec
++S 11003000 H 2975000 AUTO
++S 11011000 H 2975000 AUTO
++S 11015000 H 2975000 AUTO
++S 11093000 V 3980000 AUTO
++S 11101000 V 4105000 AUTO
++S 11142000 H 2963000 AUTO
++S 11152000 H 2963000 AUTO
++S 11157000 H 2963000 AUTO
++S 11515000 V 7300000 AUTO
++S 11635000 V 29700000 AUTO
++S 11675000 V 29700000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-1002-1.0W dvb-apps/util/scan/dvb-s/Intelsat-1002-1.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-1002-1.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-1002-1.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,20 @@
++# Intelsat 1002 @ 1.0W
++# freq pol sr fec
++S 4175000 V 28000000 AUTO
++S 4180000 H 21050000 AUTO
++S 11093000 H 19191000 7/8
++S 11166000 V 1450000 7/8
++S 11182000 V 3100000 7/8
++S 11606000 H 13356000 7/8
++S 12527000 H 27500000 3/4
++S 12563000 H 27500000 3/4
++S 12563000 V 27500000 3/4
++S 12607000 H 27500000 3/4
++S 12607000 V 27500000 3/4
++S 12643000 H 27500000 3/4
++S 12643000 V 27500000 3/4
++S 12687000 H 27500000 3/4
++S 12687000 V 27500000 3/4
++S 12718000 V 18400000 3/4
++S 12723000 H 27500000 3/4
++S 12735000 V 8800000 5/6
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-11-43.0W dvb-apps/util/scan/dvb-s/Intelsat-11-43.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-11-43.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-11-43.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Intelsat 11 @ 43.0W
++# freq pol sr fec
++
++S 3944000 H 05945000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-1R-45.0W dvb-apps/util/scan/dvb-s/Intelsat-1R-45.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-1R-45.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-1R-45.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,44 @@
++# Intelsat 1R @ 45.0W
++# freq pol sr fec
++
++S 4104000 V 14450000 AUTO
++S 3854000 H 02370000 AUTO
++S 11893000 H 06620000 AUTO
++S 3869000 H 03515000 AUTO
++S 4186000 V 02000000 AUTO
++S 4040000 V 04347000 AUTO
++S 4071000 V 02615000 AUTO
++S 3991000 V 04044000 AUTO
++S 3882000 V 04410000 AUTO
++S 11788000 V 10000000 AUTO
++S 11728000 V 05057000 AUTO
++S 11737000 V 05057000 AUTO
++S 11722000 V 03000000 AUTO
++S 11718000 H 24667000 AUTO
++S 11833000 H 17360000 AUTO
++S 11930000 V 11790000 AUTO
++S 11808000 H 04779000 AUTO
++S 4132000 H 05749000 AUTO
++S 3780000 V 02941000 AUTO
++S 11705000 V 04440000 AUTO
++S 3759000 V 02941000 AUTO
++S 4171000 V 04410000 AUTO
++S 3899000 V 06611000 AUTO
++S 4192000 H 02075000 AUTO
++S 4096000 H 08102000 AUTO
++S 11873000 H 06000000 AUTO
++S 11856000 V 03000000 AUTO
++S 11746000 V 06900000 AUTO
++S 11715000 V 05500000 AUTO
++S 3985000 V 03310000 AUTO
++S 3892000 V 06110000 AUTO
++S 4135000 H 26600000 AUTO
++S 4121000 H 03510000 AUTO
++S 3742000 V 04444000 AUTO
++S 3910000 V 04292000 AUTO
++S 3975000 V 03310000 AUTO
++S 4133000 V 03255000 AUTO
++S 3785000 V 04409000 AUTO
++S 3868000 V 10075000 AUTO
++S 3774000 V 08820000 AUTO
++S 4128000 V 03310000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-3R-43.0W dvb-apps/util/scan/dvb-s/Intelsat-3R-43.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-3R-43.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-3R-43.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,35 @@
++# Intelsat 3R @ 43.0W
++# freq pol sr fec
++
++S 3936000 H 03310000 AUTO
++S 3901000 V 06620000 AUTO
++S 3891000 V 06111000 AUTO
++S 3935000 V 17360000 AUTO
++S 3872000 H 06620000 AUTO
++S 3736000 H 29270000 AUTO
++S 4106000 V 26470000 AUTO
++S 3910000 V 05632000 AUTO
++S 3919000 V 06620000 AUTO
++S 4083000 V 06599000 AUTO
++S 4106000 H 29270000 AUTO
++S 3994000 H 21090000 AUTO
++S 3867000 V 06429000 AUTO
++S 3958000 V 06500000 AUTO
++S 3980000 V 03500000 AUTO
++S 3828000 V 04350000 AUTO
++S 3888000 H 07813000 AUTO
++S 3785000 H 30800000 AUTO
++S 3942000 V 01200000 AUTO
++S 3946000 V 02592000 AUTO
++S 3988000 V 04070000 AUTO
++S 3845000 H 30800000 AUTO
++S 4040000 H 30800000 AUTO
++S 3865000 V 06900000 AUTO
++S 3850000 V 28800000 AUTO
++S 11705000 H 03700000 AUTO
++S 11745000 H 03111000 AUTO
++S 11711000 H 04687000 AUTO
++S 11754000 H 03109000 AUTO
++S 3746000 V 21261000 AUTO
++S 4150000 H 24570000 AUTO
++S 3930000 H 02812000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-6B-43.0W dvb-apps/util/scan/dvb-s/Intelsat-6B-43.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-6B-43.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-6B-43.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,17 @@
++# Intelsat 6B @ 43.0W
++# freq pol sr fec
++
++S 10882000 H 30000000 AUTO
++S 10882000 V 30000000 AUTO
++S 10970000 H 30000000 AUTO
++S 10970000 V 30000000 AUTO
++S 11050000 H 30000000 AUTO
++S 11130000 H 30000000 AUTO
++S 11382000 V 30000000 AUTO
++S 11130000 V 30000000 AUTO
++S 10720000 H 30000000 AUTO
++S 10720000 V 30000000 AUTO
++S 11050000 V 30000000 AUTO
++S 11382000 H 30000000 AUTO
++S 10800000 H 30000000 AUTO
++S 10800000 V 30000000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-705-50.0W dvb-apps/util/scan/dvb-s/Intelsat-705-50.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-705-50.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-705-50.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Intelsat 705 @ 50.0W
++# freq pol sr fec
++
++S 3911000 V 03617000 AUTO
++S 3917000 V 04087000 AUTO
++S 3838000 H 07053000 AUTO
++S 4126000 H 06111000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-707-53.0W dvb-apps/util/scan/dvb-s/Intelsat-707-53.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-707-53.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-707-53.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# Intelsat 707 @ 53.0W
++# freq pol sr fec
++
++S 3820000 V 03255000 AUTO
++S 11483000 V 05333000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-805-55.5W dvb-apps/util/scan/dvb-s/Intelsat-805-55.5W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-805-55.5W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-805-55.5W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,67 @@
++# Intelsat 805 @ 55.5W
++# freq pol sr fec
++
++S 4171000 H 06111000 AUTO
++S 4147000 H 06111000 AUTO
++S 3914000 V 01809000 AUTO
++S 3572000 V 11800000 AUTO
++S 4135000 H 06111000 AUTO
++S 3737000 H 01809000 AUTO
++S 3932000 V 03255000 AUTO
++S 3759000 V 04167000 AUTO
++S 3750000 V 05632000 AUTO
++S 3850000 H 20000000 AUTO
++S 4010000 V 06111000 AUTO
++S 3715000 H 08890000 AUTO
++S 3670000 H 01374000 AUTO
++S 4158000 H 01447000 AUTO
++S 3549000 V 06510000 AUTO
++S 3451000 H 04444000 AUTO
++S 3667000 H 03300000 AUTO
++S 3522000 H 30000000 AUTO
++S 4055000 V 21703000 AUTO
++S 3698000 V 03600000 AUTO
++S 4119000 V 01631000 AUTO
++S 3446000 H 03200000 AUTO
++S 3675000 V 02660000 AUTO
++S 3717000 V 11574000 AUTO
++S 4030000 V 06111000 AUTO
++S 3767000 H 04427000 AUTO
++S 4027000 V 02000000 AUTO
++S 4089000 V 05540000 AUTO
++S 3685000 V 05632000 AUTO
++S 3751000 H 05632000 AUTO
++S 4127000 V 02000000 AUTO
++S 3980000 V 19510000 AUTO
++S 3590000 V 10127000 AUTO
++S 4000000 V 05200000 AUTO
++S 3762000 H 03662000 AUTO
++S 3936000 H 03255000 AUTO
++S 3727000 H 03000000 AUTO
++S 4104000 H 05062000 AUTO
++S 3777000 H 07400000 AUTO
++S 3431000 H 03500000 AUTO
++S 3478000 V 05632000 AUTO
++S 4093000 H 02540000 AUTO
++S 3929000 H 02941000 AUTO
++S 4195000 H 04444000 AUTO
++S 4140000 V 04700000 AUTO
++S 4096000 H 05247000 AUTO
++S 3467000 V 04340000 AUTO
++S 3442000 H 03000000 AUTO
++S 4080000 V 04340000 AUTO
++S 4084000 H 10317000 AUTO
++S 3723000 H 03000000 AUTO
++S 3815000 H 26667000 AUTO
++S 4006000 V 03690000 AUTO
++S 3918000 V 04400000 AUTO
++S 3735000 V 08680000 AUTO
++S 3727000 V 03000000 AUTO
++S 3940000 H 02575000 AUTO
++S 3792000 H 02244000 AUTO
++S 3900000 H 03612000 AUTO
++S 3677000 H 04232000 AUTO
++S 4127000 H 02532000 AUTO
++S 4152000 V 03600000 AUTO
++S 4177000 V 27690000 AUTO
++S 4111000 H 03333000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-903-34.5W dvb-apps/util/scan/dvb-s/Intelsat-903-34.5W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-903-34.5W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-903-34.5W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Intelsat 903 @ 34.5W
++# freq pol sr fec
++
++S 4178000 V 32555000 AUTO
++S 4045000 H 04960000 AUTO
++S 3895000 H 13021000 AUTO
++S 4004000 V 02170000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-905-24.5W dvb-apps/util/scan/dvb-s/Intelsat-905-24.5W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-905-24.5W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-905-24.5W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# Intelsat 905 @ 24.5W
++# freq pol sr fec
++
++S 4171000 V 06111000 AUTO
++S 4181000 V 06111000 AUTO
++S 4194000 V 05193000 AUTO
++S 4162000 V 06111000 AUTO
++S 4060000 V 06111000 AUTO
++S 4070000 V 06111000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-907-27.5W dvb-apps/util/scan/dvb-s/Intelsat-907-27.5W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-907-27.5W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-907-27.5W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# Intelsat 907 @ 27.5W
++# freq pol sr fec
++
++S 3873000 H 04687000 AUTO
++S 3935000 H 04687000 AUTO
++S 3743000 V 02900000 AUTO
++S 3732000 V 14000000 AUTO
++S 3943000 H 01808000 AUTO
++S 3938000 H 03544000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-9-58.0W dvb-apps/util/scan/dvb-s/Intelsat-9-58.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Intelsat-9-58.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Intelsat-9-58.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,58 @@
++# Intelsat 9 @ 58.0W
++# freq pol sr fec
++
++S 4122000 H 02222000 AUTO
++S 4146000 H 06620000 AUTO
++S 4157000 H 06620000 AUTO
++S 4160000 V 03000000 AUTO
++S 3960000 V 29270000 AUTO
++S 3960000 H 29270000 AUTO
++S 4080000 H 27684000 AUTO
++S 3720000 H 19510000 AUTO
++S 4131000 H 04444000 AUTO
++S 4155000 H 06111000 AUTO
++S 4173000 H 06620000 AUTO
++S 3995000 H 05632000 AUTO
++S 3986000 H 06111000 AUTO
++S 4175000 H 04410000 AUTO
++S 4107000 H 08850000 AUTO
++S 3925000 H 06666000 AUTO
++S 3905000 H 06620000 AUTO
++S 3915000 H 06620000 AUTO
++S 3925000 H 06620000 AUTO
++S 4005000 H 06620000 AUTO
++S 4015000 H 06620000 AUTO
++S 3720000 V 27700000 AUTO
++S 4166000 H 06200000 AUTO
++S 3794000 H 03332000 AUTO
++S 3807000 H 03428000 AUTO
++S 3880000 V 27690000 AUTO
++S 3800000 V 26470000 AUTO
++S 3760000 V 27690000 AUTO
++S 3996000 H 03330000 AUTO
++S 3935000 H 05632000 AUTO
++S 11852000 V 30000000 AUTO
++S 11895000 V 20000000 AUTO
++S 11913000 V 10000000 AUTO
++S 4155000 V 03310000 AUTO
++S 3934000 V 07000000 AUTO
++S 3787000 H 07407000 AUTO
++S 3924000 V 06620000 AUTO
++S 3800000 H 04444000 AUTO
++S 3911000 V 13330000 AUTO
++S 4040000 H 16180000 AUTO
++S 4080000 V 27690000 AUTO
++S 4144000 V 02205000 AUTO
++S 4151000 V 02890000 AUTO
++S 4147000 V 02941000 AUTO
++S 4170000 V 02941000 AUTO
++S 3760000 H 28500000 AUTO
++S 4120000 V 27500000 AUTO
++S 11670000 V 16470000 AUTO
++S 4125000 H 02941000 AUTO
++S 4137000 H 02941000 AUTO
++S 3880000 H 27690000 AUTO
++S 4174000 V 02941000 AUTO
++S 3840000 V 27690000 AUTO
++S 3840000 H 27690000 AUTO
++S 3815000 H 06250000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Nahuel-1-71.8W dvb-apps/util/scan/dvb-s/Nahuel-1-71.8W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Nahuel-1-71.8W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Nahuel-1-71.8W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,11 @@
++# Nahuel 1 @ 71.8W
++# freq pol sr fec
++
++S 11673000 V 04000000 AUTO
++S 11680000 V 03335000 AUTO
++S 11654000 V 04170000 AUTO
++S 11874000 V 04000000 AUTO
++S 12136000 V 02960000 AUTO
++S 11873000 H 08000000 AUTO
++S 12116000 H 14396000 AUTO
++S 11997000 V 08500000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Nilesat101+102-7.0W dvb-apps/util/scan/dvb-s/Nilesat101+102-7.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Nilesat101+102-7.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Nilesat101+102-7.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,41 @@
++# Nilesat 101/102 & Atlantic Bird @ 7W
++# freq pol sr fec
++S 10719000 V 27500000 3/4
++S 10723000 H 27500000 3/4
++S 10758000 V 27500000 3/4
++S 10775000 H 27500000 3/4
++S 10796000 V 27500000 3/4
++S 10892000 H 27500000 3/4
++S 10911000 V 27500000 3/4
++S 10930000 H 27500000 3/4
++S 11317000 V 27500000 3/4
++S 11747000 V 27500000 3/4
++S 11766000 H 27500000 3/4
++S 11785000 V 27500000 3/4
++S 11804000 H 27500000 3/4
++S 11823000 V 27500000 3/4
++S 11843000 H 27500000 3/4
++S 11862000 V 27500000 3/4
++S 11881000 H 27500000 3/4
++S 11900000 V 27500000 3/4
++S 11919000 H 27500000 3/4
++S 11938000 V 27500000 3/4
++S 11958000 H 27500000 3/4
++S 11977000 V 27600000 5/6
++S 11996000 H 27500000 3/4
++S 12015000 V 27500000 3/4
++S 12034000 H 27500000 3/4
++S 12054000 V 27500000 3/4
++S 12073000 H 27500000 3/4
++S 12130000 V 27500000 3/4
++S 12149000 H 27500000 3/4
++S 12207000 V 27500000 3/4
++S 12226000 H 27500000 3/4
++S 12284000 V 27500000 3/4
++S 12303000 H 27500000 3/4
++S 12341000 V 27500000 3/4
++S 12360000 H 27500000 3/4
++S 12380000 V 27500000 3/4
++S 12399000 H 27500000 3/4
++S 12418000 V 27500000 3/4
++S 12476000 H 27500000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-10-37.5W dvb-apps/util/scan/dvb-s/NSS-10-37.5W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-10-37.5W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/NSS-10-37.5W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# NSS 10 @ 37.5W
++# freq pol sr fec
++
++S 4055000 V 02700000 AUTO
++S 3824000 H 01808000 AUTO
++S 4059000 V 03214000 AUTO
++S 3828000 H 02532000 AUTO
++S 3844000 H 04340000 AUTO
++S 4071000 V 03150000 AUTO
++S 4051000 V 04440000 AUTO
++S 4044000 V 03250000 AUTO
++S 4077000 V 03200000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-7-22.0W dvb-apps/util/scan/dvb-s/NSS-7-22.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-7-22.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/NSS-7-22.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# NSS 7 @ 22.0W
++# freq pol sr fec
++
++S 3926000 H 03715000 AUTO
++S 3920000 H 03715000 AUTO
++S 3954000 V 05632000 AUTO
++S 3929000 V 05632000 AUTO
++S 3915000 H 03715000 AUTO
++S 3761000 V 22650000 AUTO
++S 11825000 H 05904000 AUTO
++S 12162000 H 06510000 AUTO
++S 11777000 H 04000000 AUTO
++S 11860000 H 35000000 AUTO
++S 12049000 H 06500000 AUTO
++S 11921000 H 35000000 AUTO
++S 4003000 H 06667000 AUTO
++S 4011000 H 06667000 AUTO
++S 4126000 H 03680000 AUTO
++S 3969000 H 01808000 AUTO
++S 3976000 H 01842000 AUTO
++S 11814000 H 05630000 AUTO
++S 4038000 V 03690000 AUTO
++S 3674000 V 02222000 AUTO
++S 4033000 V 03689000 AUTO
++S 4016000 H 03663000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-806-40.5W dvb-apps/util/scan/dvb-s/NSS-806-40.5W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/NSS-806-40.5W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/NSS-806-40.5W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,108 @@
++# NSS 806 @ 40.5W
++# freq pol sr fec
++
++S 11921000 H 35000000 AUTO
++S 3660000 H 04350000 AUTO
++S 3986000 H 03179000 AUTO
++S 3859000 H 02600000 AUTO
++S 4120000 V 02960000 AUTO
++S 4016000 V 05712000 AUTO
++S 3978000 H 03978000 AUTO
++S 4100000 V 06111000 AUTO
++S 3965000 V 02540000 AUTO
++S 3774000 H 06670000 AUTO
++S 3725000 V 26667000 AUTO
++S 3600000 V 25185000 AUTO
++S 3758000 V 26667000 AUTO
++S 3982000 V 17800000 AUTO
++S 4090000 V 02515000 AUTO
++S 4042000 H 08680000 AUTO
++S 4009000 V 06666000 AUTO
++S 4003000 H 06666000 AUTO
++S 3648000 H 02000000 AUTO
++S 3664000 V 02170000 AUTO
++S 3644000 H 02534000 AUTO
++S 3695000 H 02963000 AUTO
++S 4082000 H 06666000 AUTO
++S 4143000 V 04800000 AUTO
++S 3641000 V 02666000 AUTO
++S 3991000 H 03578000 AUTO
++S 4000000 H 02450000 AUTO
++S 4009000 H 02450000 AUTO
++S 3960000 V 03170000 AUTO
++S 3755000 H 20000000 AUTO
++S 4135000 V 02000000 AUTO
++S 4005000 H 02450000 AUTO
++S 4003000 H 02450000 AUTO
++S 3600000 H 29185000 AUTO
++S 3868000 V 02100000 AUTO
++S 3685000 H 06500000 AUTO
++S 3688000 V 06666000 AUTO
++S 3679000 V 02220000 AUTO
++S 3961000 H 01481000 AUTO
++S 4130000 V 02000000 AUTO
++S 3923000 H 27500000 AUTO
++S 4052000 V 02459000 AUTO
++S 4071000 V 03333000 AUTO
++S 4146000 H 02571000 AUTO
++S 3646000 V 03978000 AUTO
++S 3837000 H 19510000 AUTO
++S 4132000 H 02480000 AUTO
++S 3653000 V 05924000 AUTO
++S 4055000 H 07233000 AUTO
++S 3938000 V 04785000 AUTO
++S 4152000 V 03280000 AUTO
++S 3832000 V 13310000 AUTO
++S 4090000 H 06620000 AUTO
++S 4082000 V 06510000 AUTO
++S 4107000 V 02100000 AUTO
++S 3500000 H 06666000 AUTO
++S 4126000 V 02531000 AUTO
++S 3860000 V 02713000 AUTO
++S 3983000 H 02222000 AUTO
++S 4065000 H 08400000 AUTO
++S 4063000 V 08500000 AUTO
++S 3972000 H 03330000 AUTO
++S 4024000 H 16030000 AUTO
++S 3803000 V 26860000 AUTO
++S 3920000 V 20000000 AUTO
++S 4053000 V 06666000 AUTO
++S 3676000 V 03000000 AUTO
++S 3637000 H 02963000 AUTO
++S 3516000 V 05632000 AUTO
++S 3516000 H 05632000 AUTO
++S 4093000 V 02887000 AUTO
++S 4177000 H 04391000 AUTO
++S 4124000 H 03480000 AUTO
++S 4139000 V 02220000 AUTO
++S 3693000 V 04441000 AUTO
++S 4194000 H 06660000 AUTO
++S 3803000 H 27500000 AUTO
++S 4112000 V 02000000 AUTO
++S 3676000 H 05900000 AUTO
++S 3652000 H 04000000 AUTO
++S 3725000 H 26669000 AUTO
++S 3898000 V 04195000 AUTO
++S 4162000 H 07200000 AUTO
++S 4168000 H 02400000 AUTO
++S 3965000 H 03332000 AUTO
++S 4100000 H 06654000 AUTO
++S 4127000 H 03000000 AUTO
++S 4109000 H 06654000 AUTO
++S 3670000 H 02960000 AUTO
++S 3853000 H 05900000 AUTO
++S 3660000 V 02540000 AUTO
++S 4170000 H 02222000 AUTO
++S 3630000 H 05632000 AUTO
++S 3695000 V 02220000 AUTO
++S 4184000 H 06142000 AUTO
++S 4122000 V 01860000 AUTO
++S 4022000 V 03800000 AUTO
++S 4137000 H 04400000 AUTO
++S 3878000 V 22117000 AUTO
++S 4132000 V 02800000 AUTO
++S 4043000 V 07440000 AUTO
++S 4142000 H 02222000 AUTO
++S 3990000 V 04195000 AUTO
++S 3667000 V 03340000 AUTO
++S 3673000 V 03000000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/OptusC1-156E dvb-apps/util/scan/dvb-s/OptusC1-156E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/OptusC1-156E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/OptusC1-156E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,20 @@
++# Optus C1 satellite 156E
++# freq pol sr fec
++S 12278000 H 30000000 2/3
++S 12305000 H 30000000 2/3
++S 12358000 H 27000000 2/3
++S 12398000 H 27800000 3/4
++S 12407000 V 30000000 2/3
++S 12438000 H 27800000 3/4
++S 12487000 V 27800000 3/4
++S 12501000 H 29473000 3/4
++S 12518000 H 27800000 3/4
++S 12527000 V 30000000 3/4
++S 12558000 H 27800000 3/4
++S 12564000 H 29473000 3/4
++S 12567000 V 27800000 2/3
++S 12598000 H 27800000 3/4
++S 12607000 V 29473000 3/4
++S 12638000 H 27800000 3/4
++S 12689000 H 27800000 3/4
++S 12720000 V 30000000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Satmex-5-116.8W dvb-apps/util/scan/dvb-s/Satmex-5-116.8W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Satmex-5-116.8W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Satmex-5-116.8W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,72 @@
++# Satmex 5 @ 116.8W
++# freq pol sr fec
++
++S 12034000 H 02532000 AUTO
++S 12175000 H 04232000 AUTO
++S 4060000 H 19510000 AUTO
++S 3905000 V 02963000 AUTO
++S 4084000 H 03162000 AUTO
++S 3767000 H 01620000 AUTO
++S 11975000 H 05000000 AUTO
++S 11960000 H 02000000 AUTO
++S 4180000 H 19510000 AUTO
++S 4115000 H 03253000 AUTO
++S 3840000 V 29270000 AUTO
++S 4160000 V 29270000 AUTO
++S 3940000 H 28125000 AUTO
++S 4052000 V 04307000 AUTO
++S 12024000 H 03000000 AUTO
++S 4134000 H 03617000 AUTO
++S 12028000 H 03255000 AUTO
++S 12060000 V 03078000 AUTO
++S 4012000 V 03131000 AUTO
++S 3949000 V 03255000 AUTO
++S 4076000 H 02962000 AUTO
++S 3749000 H 04070000 AUTO
++S 3744000 H 04480000 AUTO
++S 3755000 H 04000000 AUTO
++S 3869000 H 03000000 AUTO
++S 3876000 H 02170000 AUTO
++S 3879000 H 01984000 AUTO
++S 3957000 V 02600000 AUTO
++S 3975000 V 03131000 AUTO
++S 3982000 H 02531000 AUTO
++S 3832000 H 02500000 AUTO
++S 3953000 V 02597000 AUTO
++S 3987000 V 08860000 AUTO
++S 3996000 V 02170000 AUTO
++S 3748000 V 02100000 AUTO
++S 3932000 V 02500000 AUTO
++S 3914000 V 03223000 AUTO
++S 3888000 H 05351000 AUTO
++S 3805000 V 04679000 AUTO
++S 4001000 V 04100000 AUTO
++S 4023000 H 06400000 AUTO
++S 12176000 H 03985000 AUTO
++S 4108000 H 02666000 AUTO
++S 4038000 V 07675000 AUTO
++S 3809000 V 03100000 AUTO
++S 4080000 V 29270000 AUTO
++S 3910000 H 02500000 AUTO
++S 4164000 H 01733000 AUTO
++S 12193000 V 07885000 AUTO
++S 12164000 V 02000000 AUTO
++S 12044000 V 04340000 AUTO
++S 3720000 V 27000000 AUTO
++S 3922000 V 09760000 AUTO
++S 3797000 V 03200000 AUTO
++S 3968000 V 07500000 AUTO
++S 4037000 H 02222000 AUTO
++S 4046000 H 02441000 AUTO
++S 4080000 H 02441000 AUTO
++S 3773000 V 02892000 AUTO
++S 3767000 V 02893000 AUTO
++S 3935000 V 04440000 AUTO
++S 3972000 H 03364000 AUTO
++S 3905000 H 02400000 AUTO
++S 4007000 V 05582000 AUTO
++S 3885000 H 03000000 AUTO
++S 3826000 H 02712000 AUTO
++S 3944000 V 03410000 AUTO
++S 3915000 H 01520000 AUTO
++S 3876000 V 02920000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Satmex-6-113.0W dvb-apps/util/scan/dvb-s/Satmex-6-113.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Satmex-6-113.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Satmex-6-113.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++# Satmex 6 @ 113.0W
++# freq pol sr fec
++
++S 4078000 H 03609000 AUTO
++S 4080000 V 03255000 AUTO
++S 12145000 V 03255000 AUTO
++S 4085000 V 02821000 AUTO
++S 12126000 V 06022000 AUTO
++S 12166000 H 17500000 AUTO
++S 4075000 V 03782000 AUTO
++S 4091000 V 03720000 AUTO
++S 3985000 V 02300000 AUTO
++S 12126000 H 02170000 AUTO
++S 12157000 V 03038000 AUTO
++S 12091000 V 03337000 AUTO
++S 3947000 V 03700000 AUTO
++S 3761000 V 02120000 AUTO
++S 12107000 V 02222000 AUTO
++S 12080000 H 25635000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/SBS6-74w dvb-apps/util/scan/dvb-s/SBS6-74w
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/SBS6-74w 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/SBS6-74w 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# SBS 6 @ 74W
++# freq pol sr fec
++
++S 11744000 H 06616000 AUTO
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Sirius-5.0E dvb-apps/util/scan/dvb-s/Sirius-5.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Sirius-5.0E 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Sirius-5.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -1,5 +1,62 @@
+ # Sirius 5.0E
+ # freq pol sr fec
++S 11215000 V 6666000 1/2
++S 11227000 H 23145000 3/4
++S 11247000 V 23145000 3/4
++S 11420000 H 23145000 3/4
++S 11727000 H 27500000 5/6
++S 11747000 V 27500000 3/4
++S 11766000 H 27500000 3/4
++S 11785000 V 27500000 3/4
++S 11804000 H 27500000 3/4
+ S 11823000 V 27500000 3/4
++S 11843000 H 27500000 3/4
++S 11862000 V 27500000 3/4
++S 11881000 H 27500000 3/4
++S 11900000 V 27500000 3/4
++S 11919000 H 27500000 3/4
++S 11938000 V 27500000 3/4
++S 11958000 H 27500000 3/4
+ S 11977000 V 27500000 3/4
++S 11996000 H 27500000 3/4
++S 12015000 V 27500000 5/6
++S 12034000 H 27500000 3/4
+ S 12054000 V 27500000 3/4
++S 12073000 H 27500000 3/4
++S 12092000 V 27500000 3/4
++S 12111000 H 27500000 5/6
++S 12130000 V 27500000 3/4
++S 12149000 H 27500000 3/4
++S 12169000 V 27500000 3/4
++S 12188000 H 27500000 7/8
++S 12207000 V 27500000 3/4
++S 12226000 H 25540000 7/8
++S 12245000 V 27500000 3/4
++S 12265000 H 27500000 3/4
++S 12284000 V 27500000 3/4
++S 12303000 H 25547000 7/8
++S 12322000 V 27500000 3/4
++S 12341000 H 27500000 3/4
++S 12360000 V 27500000 7/8
++S 12379000 H 27500000 3/4
++S 12399000 V 27500000 2/3
++S 12418000 H 27500000 3/4
++S 12437000 V 27500000 2/3
++S 12456000 H 27500000 3/4
++S 12476000 V 27500000 3/4
++S 12608000 H 27500000 3/4
++S 12637000 H 14465000 3/4
++S 12668000 V 6666000 1/2
++S 12672000 H 3300000 3/4
++S 12674000 V 10000000 3/4
++S 12678000 V 13333000 5/6
++S 12680000 H 9404000 3/4
++S 12685000 V 4444000 3/4
++S 12690000 H 3330000 3/4
++S 12693000 V 3333000 5/6
++S 12701000 H 6111000 3/4
++S 12715000 H 3330000 3/4
++S 12718000 V 23500000 3/4
++S 12724000 H 1772000 3/4
++S 12728000 V 19720000 3/4
++S 12737000 V 6150000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Telecom2-8.0W dvb-apps/util/scan/dvb-s/Telecom2-8.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Telecom2-8.0W 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Telecom2-8.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,17 @@
+ # Telecom2 8.0W
+ # freq pol sr fec
+-S 11635000 H 6800000 5/6
+-S 12687000 V 1879000 3/4
++S 10972000 V 27500000 3/4
++S 10974000 H 27500000 3/4
++S 11010000 H 27500000 3/4
++S 11011000 V 27500000 3/4
++S 11042000 H 7860000 3/4
++S 11053000 H 2850000 3/4
++S 11064000 H 12667000 3/4
++S 11387000 H 24740000 5/6
++S 11428000 H 27500000 3/4
++S 11500000 H 3460000 AUTO
++S 11554000 V 27500000 3/4
++S 11595000 V 27500000 3/4
++S 12545000 H 3038000 3/4
++S 12566000 V 27500000 3/4
++S 12649000 V 27500000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Telstar12-15.0W dvb-apps/util/scan/dvb-s/Telstar12-15.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Telstar12-15.0W 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Telstar12-15.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,26 @@
+ # Telstar 12 15.0W
+ # freq pol sr fec
+-S 12041000 H 3256000 2/3
+-S 12520000 V 8700000 1/2
++S 10988000 H 2893000 3/4
++S 10992000 H 2893000 3/4
++S 11060000 H 19279000 3/4
++S 11123000 V 19279000 3/4
++S 11124000 H 18386000 3/4
++S 11150000 H 18386000 3/4
++S 11150000 V 19279000 3/4
++S 11531000 H 3198000 7/8
++S 11566000 H 4284000 3/4
++S 11677000 V 2200000 1/2
++S 11709000 V 3195000 AUTO
++S 11806000 V 7596000 3/4
++S 11963000 H 14714000 3/4
++S 12082000 H 3935000 3/4
++S 12117000 H 4772000 AUTO
++S 12159000 H 7777000 2/3
++S 12166000 H 3503000 3/4
++S 12173000 H 3503000 3/4
++S 12524000 V 26470000 3/4
++S 12547000 H 11900000 2/3
++S 12589000 V 4503000 1/2
++S 12608000 H 19279000 2/3
++S 12615000 V 11939000 2/3
++S 12645000 H 3255000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Thor-1.0W dvb-apps/util/scan/dvb-s/Thor-1.0W
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Thor-1.0W 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Thor-1.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -1,8 +1,36 @@
+ # Thor 1.0W
+ # freq pol sr fec
++S 11216000 V 24500000 7/8
++S 11229000 H 24500000 7/8
+ S 11247000 V 24500000 7/8
++S 11261000 H 24500000 7/8
++S 11278000 V 24500000 7/8
+ S 11293000 H 24500000 7/8
++S 11309000 V 24500000 7/8
+ S 11325000 H 24500000 7/8
+-S 12054000 H 28000000 7/8
++S 11325000 V 24500000 7/8
++S 11325000 V 24500000 7/8
++S 11341000 V 24500000 7/8
++S 11357000 H 24500000 7/8
++S 11372000 V 24500000 7/8
++S 11389000 H 24500000 7/8
++S 11403000 V 24500000 7/8
++S 11421000 H 24500000 7/8
++S 11434000 V 24500000 7/8
++S 11747000 H 28000000 5/6
++S 11785000 H 28000000 5/6
++S 11823000 H 28000000 7/8
++S 11938000 H 25000000 3/4
++S 12015000 H 30000000 3/4
++S 12130000 H 30000000 3/4
++S 12149000 V 28000000 5/6
+ S 12169000 H 28000000 7/8
+-S 12226000 V 28000000 7/8
++S 12188000 V 25000000 3/4
++S 12226000 V 28000000 3/4
++S 12245000 H 28000000 5/6
++S 12303000 V 28000000 5/6
++S 12322000 H 27800000 3/4
++S 12399000 H 28000000 7/8
++S 12418000 V 28000000 7/8
++S 12456000 V 28000000 3/4
++S 12476000 H 28000000 5/6
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Turksat-42.0E dvb-apps/util/scan/dvb-s/Turksat-42.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Turksat-42.0E 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Turksat-42.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,104 @@
+ # Turksat 42.0E
+ # freq pol sr fec
+-S 11594000 H 4557000 5/6
+-S 10978000 V 2344000 3/4
++S 10968000 V 4557000 3/4
++S 10970000 H 30000000 5/6
++S 10999000 V 2222000 3/4
++S 11003000 V 2175000 3/4
++S 11007000 V 2950000 5/6
++S 11011000 V 2125000 5/6
++S 11014000 V 2050000 3/4
++S 11018000 V 2150000 3/4
++S 11028000 V 2400000 3/4
++S 11083000 V 8888000 3/4
++S 11136000 V 2170000 3/4
++S 11143000 V 2200000 3/4
++S 11159000 V 2596000 3/4
++S 11162000 V 2222000 5/6
++S 11166000 V 2960000 3/4
++S 11177000 V 2200000 3/4
++S 11554000 H 2916000 2/3
++S 11576000 H 2400000 5/6
++S 11581000 H 4444000 3/4
++S 11607000 H 3750000 2/3
++S 11712000 V 2963000 3/4
++S 11716000 V 2222000 3/4
++S 11729000 V 15555000 5/6
++S 11734000 H 3291000 3/4
++S 11739000 H 3125000 3/4
++S 11743000 H 2222000 3/4
++S 11743000 V 2222000 3/4
++S 11748000 H 4444000 5/6
++S 11753000 H 3000000 7/8
++S 11754000 V 3900000 5/6
++S 11758000 V 2962000 3/4
++S 11760000 H 5925000 3/4
++S 11762000 V 2155000 3/4
++S 11765000 V 2222000 3/4
++S 11770000 V 2177000 3/4
++S 11773000 V 2420000 5/6
++S 11775000 H 2222000 3/4
++S 11777000 V 3150000 5/6
++S 11781000 V 2815000 5/6
++S 11794000 H 5632000 3/4
++S 11800000 H 2400000 5/6
++S 11804000 V 24444000 5/6
++S 11830000 V 6666000 3/4
++S 11839000 V 4444000 3/4
++S 11846000 V 3333000 5/6
++S 11852000 V 4444000 5/6
++S 11858000 V 2400000 7/8
++S 11867000 V 4444000 5/6
++S 11874000 V 3400000 7/8
++S 11878000 V 3750000 5/6
++S 11882000 V 2965000 5/6
++S 11887000 V 3333000 7/8
++S 11892000 H 12800000 5/6
++S 11892000 V 2960000 5/6
++S 11896000 V 2222000 3/4
++S 11905000 H 6666000 3/4
++S 11912000 H 3333000 5/6
++S 11919000 V 24444000 3/4
++S 11951000 V 8800000 5/6
++S 11959000 V 2960000 3/4
++S 11963000 V 2300000 5/6
++S 11967000 V 4340000 3/4
++S 11970000 H 17900000 5/6
++S 11973000 V 2240000 5/6
++S 11984000 H 4000000 5/6
++S 11996000 V 26000000 5/6
++S 12002000 H 4800000 5/6
++S 12008000 H 4400000 5/6
++S 12015000 H 4800000 5/6
++S 12022000 H 5380000 5/6
++S 12028000 H 4557000 5/6
++S 12126000 V 6666000 5/6
++S 12127000 H 7400000 5/6
++S 12140000 H 2222000 3/4
++S 12140000 V 4444000 3/4
++S 12513000 H 4400000 3/4
++S 12518000 H 3125000 3/4
++S 12524000 H 4250000 5/6
++S 12530000 H 4444000 5/6
++S 12536000 H 2962000 3/4
++S 12540000 H 3125000 3/4
++S 12563000 H 24000000 7/8
++S 12590000 V 3000000 5/6
++S 12595000 V 2500000 5/6
++S 12605000 V 2961000 3/4
++S 12609000 V 3700000 5/6
++S 12614000 V 3333000 5/6
++S 12633000 V 4800000 5/6
++S 12636000 H 4800000 5/6
++S 12638000 V 2400000 5/6
++S 12647000 V 3333000 5/6
++S 12652000 H 22500000 5/6
++S 12652000 V 3900000 5/6
++S 12660000 V 9150000 5/6
++S 12672000 H 2222000 5/6
++S 12680000 H 8888000 3/4
++S 12692000 H 2800000 5/6
++S 12696000 H 2222000 3/4
++S 12699000 H 2400000 3/4
++S 12702000 H 2285000 7/8
++S 12717000 V 5925000 5/6
++S 12731000 V 3333000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Yamal201-90.0E dvb-apps/util/scan/dvb-s/Yamal201-90.0E
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Yamal201-90.0E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-s/Yamal201-90.0E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,48 @@
++# Yamal201 @ 90E
++# freq pol sr fec
++S 10990000 V 2170000 AUTO
++S 10995000 V 4285000 AUTO
++S 11057000 V 26470000 AUTO
++S 11092000 V 26470000 AUTO
++S 11145000 V 22222000 AUTO
++S 11671000 V 18200000 AUTO
++
++# Yamal201 @ 90E C-BAND
++# Generated by Roman Kashcheev
++# Mar 30, 2008
++# freq pol sr fec
++
++# NauTV
++S 3536000 H 2532000 3/4
++# Turkmenistan
++S 3553000 H 20000000 3/4
++# CNL
++S 3577000 H 2626000 3/4
++# Nord TV
++S 3588000 H 4285000 3/4
++# Telekompanija OTV
++S 3600000 H 4285000 3/4
++# Oblastnoe Televidenie
++S 3603000 V 4285000 3/4
++# CNL
++S 3605000 H 2626000 3/4
++# Gascom
++S 3645000 H 28000000 3/4
++# Spas
++S 3674000 H 17500000 3/4
++# TV Gubernia
++S 3725000 H 3200000 3/4
++# Yuzhniy Region
++S 3900000 H 4285000 3/4
++# Rostov TV
++S 3907000 H 4265000 3/4
++# ORTRK 12 Kanal
++S 3912000 H 4295000 3/4
++# O2
++S 3944000 H 15550000 3/4
++# Klub Puteshestviy
++S 3980000 H 38000000 3/4
++# Music Box
++S 4042000 V 8681000 3/4
++# NetService
++S 4084000 V 2500000 3/4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ad-Andorra dvb-apps/util/scan/dvb-t/ad-Andorra
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ad-Andorra 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/ad-Andorra 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# DVB-T Andorra
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/at-Official dvb-apps/util/scan/dvb-t/at-Official
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/at-Official 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/at-Official 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,24 @@
++# Austria, all DVB-T transmitters run by ORS
++# Created from http://www.ors.at/view08/ors.php?mid=94
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 490000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 498000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 514000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 522000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 530000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 538000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 546000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 554000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 562000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 578000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 578000000 8MHz 3/4 NONE QAM16 8k 1/8 NONE
++T 594000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 602000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 610000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 634000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 650000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 666000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 698000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 722000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
++T 754000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Adelaide dvb-apps/util/scan/dvb-t/au-Adelaide
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Adelaide 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Adelaide 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Adelaide / Mt Lofty
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC
++T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven
++T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine
++T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten
++T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS
++T 564500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Brisbane dvb-apps/util/scan/dvb-t/au-Brisbane
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Brisbane 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Brisbane 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Brisbane (Mt Coot-tha transmitters)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC
++T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven
++T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine
++T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten
++T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS
++T 585625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Cairns dvb-apps/util/scan/dvb-t/au-Cairns
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Cairns 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Cairns 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Cairns (Mt Bellenden-Ker transmitters)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC VHF 8
++T 191500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SEVEN VHF 11
++T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# WIN VHF 12
++T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# TEN VHF 6 (Expected Start Date Dec 2006)
++T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS UHF 29
++T 536500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-canberra dvb-apps/util/scan/dvb-t/au-canberra
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-canberra 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-canberra 2009-06-21 13:29:06.000000000 +0200
+@@ -1,12 +1,12 @@
+ # Australia / Canberra / Woden
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+ # ABC
+-T 205625000 7MHz 3/4 3/4 QAM64 8k 1/16 NONE
++T 205625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+ # Seven
+-T 177500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 177500000 7MHz 3/4 NONE QAM64 8k 1/8 NONE
+ # Nine
+ T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+ # Ten
+-T 219500000 7MHz 3/4 1/2 QAM64 8k 1/16 NONE
++T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+ # SBS
+ T 543500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Canberra-Black-Mt dvb-apps/util/scan/dvb-t/au-Canberra-Black-Mt
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Canberra-Black-Mt 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Canberra-Black-Mt 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Canberra / Black Mt
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC
++T 205500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime
++T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# WIN
++T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten
++T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS
++T 543500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Coonabarabran dvb-apps/util/scan/dvb-t/au-Coonabarabran
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Coonabarabran 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Coonabarabran 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++# Australia / Coonabarabran
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#
++# ABC VHF12
++T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# TEN UHF46
++T 655500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine UHF45
++T 648500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven VHF11
++#T 618250000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS UHF44
++T 641500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# D44 UHF35
++#T 578500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Darwin dvb-apps/util/scan/dvb-t/au-Darwin
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Darwin 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Darwin 2009-06-21 13:29:06.000000000 +0200
+@@ -1,5 +1,9 @@
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC (UHF 30)
+ T 543625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+-T 550500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# Nine (UHF 31)
++T 550500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS (UHF 29)
+ T 536625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+-T 557625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# Southern Cross (UHF 32)
++T 557625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-GoldCoast dvb-apps/util/scan/dvb-t/au-GoldCoast
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-GoldCoast 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-GoldCoast 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,21 @@
++# DVB-T frequencies & modulation for the Gold Coast, Australia (Mt Tamborine)
++# See http://www.dba.org.au/index.asp?sectionID=22&recLocation=Gold+Coast
++# and http://www.dba.org.au/index.asp?sectionID=120
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC (UHF 62)
++T 767500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS (UHF 36)
++T 585500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# Seven (UHF 53)
++T 704500000 7MHz 3/4 NONE QAM64 8k 1/8 NONE
++# NBN (UHF 68)
++T 809500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime (UHF 65)
++T 788500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Southern Cross Ten (UHF 43)
++T 634500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine (UHF 59)
++T 746500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten (UHF 56)
++T 725500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Hobart dvb-apps/util/scan/dvb-t/au-Hobart
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Hobart 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Hobart 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Tasmania / Hobart
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC VHF 8
++T 191500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS VHF 9a
++T 205500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# SCT VHF 10
++T 212500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# WIN VHF 7
++T 184625000 7MHz 3/4 NONE QAM64 8k 1/8 NONE
++# TDT VHF 11
++T 219500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Mackay dvb-apps/util/scan/dvb-t/au-Mackay
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Mackay 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Mackay 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,14 @@
++# Australia / Mackay (Mt Blackwood transmitters)
++# aufreq=((UHF channel number)*8+306)
++
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC
++T 212500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven Network
++T 205500000 7MHz 3/4 NONE QAM64 8k 1/8 NONE
++# WIN Digital
++T 578500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Southern Cross Ten
++T 557500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS
++T 536500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Melbourne dvb-apps/util/scan/dvb-t/au-Melbourne
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Melbourne 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Melbourne 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Melbourne (Mt Dandenong transmitters)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC
++T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven
++T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine
++T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten
++T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS
++T 536625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Melbourne-Upwey dvb-apps/util/scan/dvb-t/au-Melbourne-Upwey
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Melbourne-Upwey 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Melbourne-Upwey 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Melbourne (Upwey Repeater)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC
++T 662500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven
++T 620500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine
++T 641500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten
++T 711500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS
++T 683500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-MidNorthCoast dvb-apps/util/scan/dvb-t/au-MidNorthCoast
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-MidNorthCoast 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-MidNorthCoast 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,22 @@
++# Australia ABC Mid North Coast
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC middle brother
++T 184625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime Middle Brother
++T 198500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# NBN Middle Brother
++T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten Middle Brother
++T 641500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS middle brother
++T 205500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# ABC Moombil
++T 585500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime Moombil
++T 543500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# NBN Moombil
++T 564500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten Moombil
++T 599500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS Moombil
++T 606500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Newcastle dvb-apps/util/scan/dvb-t/au-Newcastle
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Newcastle 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Newcastle 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Newcastle
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# SBS
++T 599500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# NBN
++T 585500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime
++T 704500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# ABC
++T 592500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SC10
++T 690500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Perth dvb-apps/util/scan/dvb-t/au-Perth
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Perth 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Perth 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Perth
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC
++T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven Network
++T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine Network
++T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Network TEN
++T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS
++T 536625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Perth_Roleystone dvb-apps/util/scan/dvb-t/au-Perth_Roleystone
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Perth_Roleystone 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Perth_Roleystone 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Perth (Roleystone transmitter)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# SBS
++T 704500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# ABC
++T 725500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven
++T 746500000 7MHz 2/3 NONE QAM64 8k 1/16 NONE
++# Nine
++T 767500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten
++T 788500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-SpencerGulf dvb-apps/util/scan/dvb-t/au-SpencerGulf
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-SpencerGulf 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-SpencerGulf 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Australia / South Australia / Pt Pirie (THE BLUFF)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC
++T 599500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Southern Cross
++T 641500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS
++T 620500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-SunshineCoast dvb-apps/util/scan/dvb-t/au-SunshineCoast
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-SunshineCoast 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-SunshineCoast 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Sunshine Coast
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# SBS36 SBS ***
++T 585625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# TNQ47 10 ***
++T 662625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# ABQ62 ABC ***
++T 767625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# STQ65 7 ***
++T 788625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# STQ68 WIN ***
++T 809500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Sydney_Kings_Cross dvb-apps/util/scan/dvb-t/au-Sydney_Kings_Cross
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Sydney_Kings_Cross 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Sydney_Kings_Cross 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,14 @@
++# Australia / Sydney / Kings Cross and North Head
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#
++# ABC UHF30
++T 543500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven UHF48
++T 669500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine UHF33
++T 564500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten UHF45
++T 648500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS UHF34
++T 571500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-sydney_north_shore dvb-apps/util/scan/dvb-t/au-sydney_north_shore
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-sydney_north_shore 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-sydney_north_shore 1970-01-01 01:00:00.000000000 +0100
+@@ -1,12 +0,0 @@
+-# Australia / Sydney / North Shore (aka Artarmon/Gore Hill)
+-# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-# ABC
+-T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+-# Seven
+-T 177500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+-# Nine
+-T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+-# Ten
+-T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+-# SBS
+-T 571500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Sydney_North_Shore dvb-apps/util/scan/dvb-t/au-Sydney_North_Shore
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Sydney_North_Shore 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Sydney_North_Shore 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++# Australia / Sydney / North Shore (aka Artarmon/Gore Hill/Willoughby)
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#
++# ABC VHF12
++T 226500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven VHF6
++T 177500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine VHF8
++T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten VHF11
++T 219500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS UHF34
++T 571500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# D44 UHF35
++T 578500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Tamworth dvb-apps/util/scan/dvb-t/au-Tamworth
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Tamworth 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Tamworth 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,38 @@
++# Australia / NSW / New England / Tamworth / Mt.Soma
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# SBS
++T 690500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# NBN
++T 753500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime
++T 732500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# ABC
++T 711500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SC10
++T 774500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++
++# Australia / NSW / New England / Upper Namoi / Mt.Dowe
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# SBS
++T 585500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# NBN
++T 592500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime
++T 205625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# ABC
++T 191625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SC10
++T 613500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++
++# Australia / NSW / Western Districts / Central Western Slopes / Mt. Cenn Cruaich
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# SBS
++T 641500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# WIN
++T 648500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime
++T 620500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# ABC
++T 226625000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SC10
++T 641500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Townsville dvb-apps/util/scan/dvb-t/au-Townsville
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Townsville 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Townsville 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Brisbane (Mt Coot-tha transmitters)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# SBS
++T 592500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# ABC
++T 550500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Seven
++T 599500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Nine
++T 620500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten
++T 585500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-WaggaWagga dvb-apps/util/scan/dvb-t/au-WaggaWagga
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-WaggaWagga 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-WaggaWagga 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Australia / Wagga Wagga (Mt Ulundra)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# ABC
++T 655500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS
++T 669500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++# Prime
++T 662500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Southern Cross Ten
++T 690500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# WIN
++T 683500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Wollongong dvb-apps/util/scan/dvb-t/au-Wollongong
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/au-Wollongong 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/au-Wollongong 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,40 @@
++# Australia / Wollongong
++#
++# Australia modulation params:
++# - http://www.dba.org.au/index.asp?sectionID=120
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#
++# North (Broadcast Site Escarpment Road BROKERS NOSE)
++# - http://www.dba.org.au/index.asp?query=true&sectionID=22&recLocation=Wollongong+%2D+North
++#
++# ABC UHF52
++T 697500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime UHF46
++T 655500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# WIN UHF40
++T 613500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten UHF43
++T 634500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS UHF54
++T 711625000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
++#
++# Illawarra (Broadcast Australia Digital Television Tower KNIGHTS HILL)
++# - http://www.dba.org.au/index.asp?query=true&sectionID=22&recLocation=Wollongong+%2D+Illawarra
++#
++# ABC UHF51
++T 690500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Prime UHF38
++T 599500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# WIN UHF36
++T 585500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Ten UHF37
++T 592500000 7MHz 3/4 NONE QAM64 8k 1/16 NONE
++# SBS - same as North
++#
++# Stanwell Park (Bald Hill STANWELL TOPS)
++# - http://www.dba.org.au/index.asp?query=true&sectionID=22&recLocation=Wollongong+%2D+Stanwell%20Park
++#
++# ABC, Prime, WIN, Ten are identical to Wollongong / North
++# SBS UHF49
++T 676500000 7MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Brussels dvb-apps/util/scan/dvb-t/be-Brussels
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Brussels 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/be-Brussels 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# Brussels - Belgium (Transmitters of the RTBF and the VRT)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # RTBF
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # BE-TV
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # VRT
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Libramont dvb-apps/util/scan/dvb-t/be-Libramont
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Libramont 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/be-Libramont 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# Libramont - Belgique
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# Canal 7 191.5 MHz M6
++# Canal 24 498.0 MHz RTL-TVI Club-RTL Plug-TV RTL 4,5,7
++# Canal 27 522.0 MHz RTL Lux, den 2ten RTL
++# Canal 56 834.0 MHz RTBF 1,2,3 + radio
++T 191500000 7MHz 1/2 NONE QAM64 8k 1/8 NONE
++T 498000000 8MHz 1/2 NONE QAM64 8k 1/16 NONE
++T 522000000 8MHz 1/2 NONE QAM64 8k 1/16 NONE
++T 834000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Schoten dvb-apps/util/scan/dvb-t/be-Schoten
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Schoten 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/be-Schoten 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Schoten-Antwerpen - Belgie
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-St_Pieters_Leeuw dvb-apps/util/scan/dvb-t/be-St_Pieters_Leeuw
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-St_Pieters_Leeuw 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/be-St_Pieters_Leeuw 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# St.-Pieters-Leeuw - Belgie
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Tournai dvb-apps/util/scan/dvb-t/be-Tournai
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/be-Tournai 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/be-Tournai 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Tournai - Belgique
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ch-All dvb-apps/util/scan/dvb-t/ch-All
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ch-All 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/ch-All 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,31 @@
++# Switzerland, whole country
++# Created from http://www.broadcast.ch/portal.aspx?pid=705
++# and http://www.broadcast.ch/data_program_dvbt.aspx
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 522000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 538000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 554000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 562000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 578000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 602000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 618000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 626000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 642000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 658000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 658000000 8MHz 5/6 NONE QAM16 8k 1/8 NONE
++T 666000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 674000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 682000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 690000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 698000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 714000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 722000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 722000000 8MHz 5/6 NONE QAM16 8k 1/8 NONE
++T 738000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 754000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 762000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 786000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 802000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 826000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 850000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ch-Citycable dvb-apps/util/scan/dvb-t/ch-Citycable
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/ch-Citycable 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/ch-Citycable 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# Lausanne - Switzerland (DVB-T on CityCable cable network)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 522000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 554000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 570000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 578000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 586000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 610000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 618000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 626000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 658000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 730000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 746000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 818000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 826000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 834000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
++T 842000000 8MHz 7/8 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Brno dvb-apps/util/scan/dvb-t/cz-Brno
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Brno 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/cz-Brno 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# DVB-T Brno (Brno, Czech Republic)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX 1 Ceska televize
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++# MUX 2 Ceske radiokomunikace
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++# MUX 3 Czech Digital Group
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++# MUX 4 Telefonica O2
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Domazlice dvb-apps/util/scan/dvb-t/cz-Domazlice
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Domazlice 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/cz-Domazlice 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# DVB-T Domažlice (Domažlice, Czech Republic)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Klet dvb-apps/util/scan/dvb-t/cz-Klet
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Klet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/cz-Klet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# DVB-T Ceske Budejovice (Klet, Czech Republic)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# CRa - Ceske radiokomunikace, TX Klet
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Ostrava dvb-apps/util/scan/dvb-t/cz-Ostrava
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Ostrava 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/cz-Ostrava 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# DVB-T Ostrava (Ostrava, Czech Republic)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Plzen dvb-apps/util/scan/dvb-t/cz-Plzen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Plzen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/cz-Plzen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# DVB-T Plzen (Pilsen, Czech Republic)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX 1 Ceska televize
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++# MUX 2 Ceske Radiokomunikace
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++# MUX 3 Czech Digital Group
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Praha dvb-apps/util/scan/dvb-t/cz-Praha
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/cz-Praha 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/cz-Praha 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# DVB-T Praha (Prague, Czech Republic)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Baden-Wuerttemberg dvb-apps/util/scan/dvb-t/de-Baden-Wuerttemberg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Baden-Wuerttemberg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Baden-Wuerttemberg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,20 @@
++# DVB-T Baden-Württemberg
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 514000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH26: Das Erste, arte, Phoenix, EinsPlus
++T 522000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH27: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 618000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH39: SWR-BW, BR, hr, WDR
++T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: SWR-BW, BR, hr, WDR
++T 634000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH41: SWR-BW, BR, hr, WDR
++T 650000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH43: Das Erste, arte, Phoenix, EinsPlus
++T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH49: SWR-BW, BR, hr, WDR
++T 706000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH50: Das Erste, arte, Phoenix, EinsPlus
++ # CH50: SWR-BW, BR, hr, WDR
++T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH52: Das Erste, arte, Phoenix, EinsPlus
++T 730000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH53: Das Erste, arte, Phoenix, EinsPlus
++ # CH53: SWR-BW, BR, hr, WDR
++T 738000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH54: Das Erste, arte, Phoenix, EinsPlus
++T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Das Erste, arte, Phoenix, EinsPlus
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Bayern dvb-apps/util/scan/dvb-t/de-Bayern
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Bayern 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Bayern 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,40 @@
++# DVB-T Bayern
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 184500000 7MHz 3/4 NONE QAM16 8k 1/4 NONE # CH06: Das Erste, arte, Phoenix, EinsPlus
++T 191500000 7MHz 3/4 NONE QAM16 8k 1/4 NONE # CH07: Das Erste, arte, Phoenix, EinsPlus
++T 212500000 7MHz 3/4 NONE QAM16 8k 1/4 NONE # CH10: Das Erste, arte, Phoenix, EinsPlus
++T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 506000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH25: BR, BRalpha, SWR, Das Erste
++ # CH25: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 522000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH27: BR, BRalpha, SWR, Das Erste
++T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: BR, BRalpha, SWR, Das Erste
++ # CH28: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: Das Erste, arte, Phoenix, EinsPlus
++T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: Das Erste, arte, Phoenix, EinsPlus
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 578000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH34: RTL, RTL II, Super RTL, VOX
++ # CH34: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 586000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH35: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: Das Erste, arte, Phoenix, EinsPlus
++T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: BR, BRalpha, hr, mdr
++ # CH40: Das Erste, arte, Phoenix, EinsPlus
++T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 658000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH44: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 666000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH45: BR, BRalpha, hr, mdr
++ # CH45: Das Erste, arte, Phoenix, EinsPlus
++T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: BR, BRalpha, SWR, Das Erste
++ # CH46: BR, BRalpha, hr, mdr
++T 682000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH47: BR, BRalpha, hr, mdr
++ # CH47: Das Erste, arte, Phoenix, EinsPlus
++T 690000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH48: Pro7, Sat.1, Kabel1, N24
++T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH52: Pro7, Sat.1, Kabel1, N24
++T 730000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH53: BR, BRalpha, SWR, Das Erste
++ # CH53: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 738000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH54: http://www.digitalfernsehen.de/news/news_769785.html
++T 746000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH55: Das Erste, arte, Phoenix, EinsPlus
++T 754000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH56: BR, BRalpha, SWR, Das Erste
++T 770000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH58: Das Erste, arte, Phoenix, EinsPlus
++T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Tele 5, Eurosport, MonA, Franken Fernsehen
++T 834000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH66: RTL, RTL II, Super RTL, VOX
++ # CH66: Tele 5, Eurosport, HSE 24, münchen.tv
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Berlin dvb-apps/util/scan/dvb-t/de-Berlin
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Berlin 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Berlin 2009-06-21 13:29:06.000000000 +0200
+@@ -1,5 +1,11 @@
+ # DVB-T Berlin
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 522000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # ard / rbb
+-T 570000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # zdf
+-T 658000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # t-systems
++T 177500000 7MHz 3/4 NONE QAM16 8k 1/8 NONE # CH05: HSE 24/MONA, FAB, WDR, SWR
++T 191500000 7MHz 2/3 NONE QAM16 8k 1/8 NONE # CH07: MDR, NDR, arte
++T 506000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH25: RTL, RTL II, Super RTL, VOX
++T 522000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH27: Das Erste, RBB, Phoenix, EinsExtra
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 658000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH44: Pro7, Sat.1, Kabel1, N24
++T 754000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH56: Eurosport, TV.B, DSF, Neun live
++T 778000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH59: n-tv, EuroNews, + 26 Radioprogramme
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Brandenburg dvb-apps/util/scan/dvb-t/de-Brandenburg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Brandenburg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Brandenburg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# DVB-T Brandenburg
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 730000000 8MHz 3/4 NONE QAM16 8k 1/4 NONE # CH53: Das Erste, RBB, Phoenix, EinsExtra
++T 762000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH57: MDR, NDR, arte
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Bremen dvb-apps/util/scan/dvb-t/de-Bremen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Bremen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Bremen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# DVB-T Bremen
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: Das Erste (RB), RB TV (NDR NDS), arte, Phoenix
++T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 562000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH32: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: RTL, RTL II, Super RTL, VOX
++T 666000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH45: Tele 5, Neun live, Eurosport, MONA/DMAX
++T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH49: Pro7, Sat.1, Kabel1, N24
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Hamburg dvb-apps/util/scan/dvb-t/de-Hamburg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Hamburg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Hamburg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++# DVB-T Hamburg
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 490000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: NDR SH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR HH
++T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: Pro7, Sat.1, Kabel1, N24
++T 546000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH30: Pro7, Sat.1, Kabel1, N24
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: Das Erste, arte, Phoenix, EinsExtra
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH33: Das Erste, arte, Phoenix, EinsExtra
++T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: RTL, RTL II, Super RTL, VOX
++T 626000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH40: RTL, RTL II, Super RTL, VOX
++T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: Neun live, HH1, BibelTV, Eurosport
++T 674000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH46: Neun live, HH1, BibelTV, Eurosport
++T 738000000 8MHz 1/2 NONE QAM64 8k 1/8 NONE # CH54: NDR HH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR SH
++T 738000000 8MHz 3/4 NONE QAM16 8k 1/8 NONE # CH54: NDR HH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR SH
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Hessen dvb-apps/util/scan/dvb-t/de-Hessen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Hessen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Hessen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++# DVB-T Hessen
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 198500000 7MHz 2/3 NONE QAM16 8k 1/4 NONE # CH08: Phoenix, BR, SWR-RP
++T 474000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH21: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 498000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH24: Phoenix, BR, SWR-RP, WDR
++T 506000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH25: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 562000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH32: Das Erste, hr, EinsExtra/arte
++T 578000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH34: RTL, RTL II, Super RTL, VOX
++T 602000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH37: Das Erste, hr, EinsExtra/arte
++T 618000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH39: Phoenix, BR, SWR-RP, mdr
++T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 650000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH43: Das Erste, hr, EinsExtra/arte
++T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH52: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 730000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH53: BR, hr, SWR-BW, WDR
++T 738000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH54: Pro7, Sat.1, Kabel1, N24
++T 746000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH55: Phoenix, NDR, mdr, WDR
++T 818000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH64: Tele5, Eurosport, rheinmaintv
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Mecklenburg-Vorpommern dvb-apps/util/scan/dvb-t/de-Mecklenburg-Vorpommern
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Mecklenburg-Vorpommern 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Mecklenburg-Vorpommern 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# DVB-T Mecklenburg-Vorpommern
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: Das Erste, NDR MVP, RBB, MDR/NDR SH
++T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 514000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH26: Das Erste, NDR MVP, RBB, MDR/NDR SH
++T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: Das Erste, NDR MVP, RBB, MDR/NDR SH
++T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: Das Erste, NDR MVP, RBB, MDR/NDR SH
++T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 714000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH51: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 738000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH54: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Niedersachsen dvb-apps/util/scan/dvb-t/de-Niedersachsen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Niedersachsen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Niedersachsen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,40 @@
++# DVB-T Niedersachsen
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH21: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: Das Erste (RB), RB TV (NDR NDS), arte, Phoenix
++ # CH22: Das Erste, arte, Phoenix, EinsExtra
++ # CH22: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 498000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH24: RTL, RTL II, Super RTL, VOX
++ # CH24: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 522000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH27: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: Tele 5, NICK/Comedy Central, Eurosport, MONA/DMAX
++T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 562000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH32: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: Das Erste, arte, Phoenix, EinsExtra
++T 586000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH35: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 602000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH37: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 610000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH38: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 634000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH41: Das Erste, arte, Phoenix, EinsExtra
++T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: RTL, RTL II, Super RTL, VOX
++ # CH42: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 650000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH43: Das Erste, arte, Phoenix, EinsExtra
++ # CH43: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 658000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH44: Pro7, Sat.1, Kabel1, N24
++T 666000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH45: Tele 5, Neun live, Eurosport, MONA/DMAX
++T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 682000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH47: Das Erste, arte, Phoenix, EinsExtra
++T 690000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH48: Das Erste, arte, Phoenix, EinsExtra
++T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH49: Pro7, Sat.1, Kabel1, N24
++T 706000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH50: Das Erste, arte, Phoenix, EinsExtra
++T 714000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH51: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 746000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH55: Das Erste, arte, Phoenix, EinsExtra
++T 754000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH56: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 770000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH58: NDR NDS, WDR/NDR SH, MDR/NDR MVP, HR/NDR HH
++T 778000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH59: Das Erste, arte, Phoenix, EinsExtra
++ # CH59: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Tele 5, Comedy Central, Eurosport, MONA/DMAX
++ # CH60: Tele 5, NICK/Comedy Central, Eurosport, MONA/DMAX
++T 826000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH65: Das Erste, arte, Phoenix, EinsExtra
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Nordrhein-Westfalen dvb-apps/util/scan/dvb-t/de-Nordrhein-Westfalen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Nordrhein-Westfalen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Nordrhein-Westfalen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,27 @@
++# DVB-T Nordrhein-Westfalen
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH21: Das Erste, arte, Phoenix, EinsFestival
++T 482000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH22: WDR-Wuppertal, NDR/WDR-Düsseldorf, MDR, SWR
++T 506000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH25: WDR-Dortmund, NDR/WDR-Essen, MDR, SWR
++T 514000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH26: Das Erste, arte, Phoenix, EinsFestival
++ # CH26: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 522000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH27: WDR-Siegen, NDR, MDR, SWR
++T 538000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH29: RTL, RTL II, Super RTL, VOX
++T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 554000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH31: WDR-Bielefeld, NDR/WDR-Siegen, MDR, SWR
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 586000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH35: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: CNN, Eurosport, Tele5, VIVA
++T 602000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH37: WDR-Aachen, NDR/WDR-Köln, MDR, SWR
++T 666000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH45: WDR-Münster, NDR/WDR-Dortmund, MDR, SWR
++T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: WDR-Düsseldorf, MDR/WDR-Duisburg, NDR/WDR-Wuppertal, SWR
++T 690000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH48: Das Erste, arte, Phoenix, EinsFestival
++T 698000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE # CH49: WDR-Köln, MDR/WDR-Bonn, NDR/WDR-Aachen, SWR
++T 706000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH50: Das Erste, arte, Phoenix, EinsFestival
++T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH52: CNN, Eurosport, Tele5, VIVA
++T 730000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH53: Pro7, Sat.1, Kabel1, N24
++T 746000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH55: Pro7, Sat.1, Kabel1, N24
++T 762000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE # CH57: WDR-Essen, NDR/WDR-Dortmund, MDR, SWR
++T 778000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH59: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Das Erste, arte, Phoenix, EinsFestival
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Rheinland-Pfalz dvb-apps/util/scan/dvb-t/de-Rheinland-Pfalz
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Rheinland-Pfalz 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Rheinland-Pfalz 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# DVB-T Rheinland-Pfalz
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: SWR-RP, BR, hr, WDR
++T 658000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH44: SWR-RP, BR, hr, WDR
++T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH46: Das Erste, arte, Phoenix, EinsPlus
++T 690000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH48: SWR-RP, BR, hr, WDR
++T 754000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH56: Das Erste, arte, Phoenix, EinsPlus
++T 762000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH57: Das Erste, arte, Phoenix, EinsPlus
++T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Das Erste, arte, Phoenix, EinsPlus
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Saarland dvb-apps/util/scan/dvb-t/de-Saarland
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Saarland 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Saarland 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# DVB-T Saarland
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 642000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH42: Das Erste, SR Fernsehen, arte, Phoenix
++T 658000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH44: SWR-RP, BR, hr, WDR
++T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH49: SaarTV, Tele 5, QVC, BibelTV
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Sachsen dvb-apps/util/scan/dvb-t/de-Sachsen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Sachsen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Sachsen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# DVB-T Sachsen
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 205500000 7MHz 2/3 NONE QAM64 8k 1/16 NONE # CH09: MDR-SN, rbb, BR, WDR
++T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH24: Das Erste, arte, Phoenix, EinsFestival
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH25: Das Erste, arte, Phoenix, EinsFestival
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH27: MDR-SN, rbb, BR, WDR
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH29: MDR-SN, rbb, BR, WDR
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH32: MDR-SN, rbb, BR, WDR
++T 594000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH36: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH39: Das Erste, arte, Phoenix, EinsFestival
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Sachsen-Anhalt dvb-apps/util/scan/dvb-t/de-Sachsen-Anhalt
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Sachsen-Anhalt 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Sachsen-Anhalt 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# DVB-T Sachsen-Anhalt
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH24: Das Erste, arte, Phoenix, EinsFestival
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH29: Das Erste, arte, Phoenix, EinsFestival
++T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 554000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH31: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH34: MDR-ST, rbb, NDR, WDR
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH35: MDR-ST, rbb, NDR, WDR
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH38: MDR-ST, rbb, NDR, WDR
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH41: Das Erste, arte, Phoenix, EinsFestival
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Schleswig-Holstein dvb-apps/util/scan/dvb-t/de-Schleswig-Holstein
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Schleswig-Holstein 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Schleswig-Holstein 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# DVB-T Schleswig-Holstein
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH21: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 490000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH23: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 514000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH26: NDR SH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR HH
++T 530000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH28: NDR SH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR HH
++T 546000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH30: Pro7, Sat.1, Kabel1, N24
++T 554000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH31: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH33: Das Erste, arte, Phoenix, EinsExtra
++T 586000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH35: Pro7, Sat.1, Kabel1, N24
++T 618000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH39: NDR SH, WDR/NDR NDS, MDR/NDR MVP, BR/NDR HH
++T 626000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH40: RTL, RTL II, Super RTL, VOX
++T 666000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH45: RTL, RTL II, Super RTL, VOX
++T 682000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH47: Das Erste, arte, Phoenix, EinsExtra
++T 762000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH57: Neun live, Tele 5, Eurosport, MONA/DMAX
++T 778000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH59: Neun live, Tele 5, Eurosport, MONA/DMAX
++T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH60: Das Erste, arte, Phoenix, EinsExtra
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Thueringen dvb-apps/util/scan/dvb-t/de-Thueringen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/de-Thueringen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/de-Thueringen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# DVB-T Thüringen
++# Created from http://www.ueberallfernsehen.de/data/senderliste.pdf
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH21: Das Erste, arte, Phoenix, EinsFestival
++T 482000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH22: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH25: Das Erste, arte, Phoenix, EinsFestival
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH27: MDR-TH, rbb, hr, BR
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH48: MDR-TH, rbb, hr, BR
++T 706000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE # CH50: ZDF, 3sat, KiKa / ZDFdokukanal, ZDFinfokanal
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CH53: Das Erste, arte, Phoenix, EinsFestival
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/dk-All dvb-apps/util/scan/dvb-t/dk-All
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/dk-All 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/dk-All 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,17 @@
++# Denmark, whole country
++# Created from http://www.digi-tv.dk/Indhold_og_tilbud/frekvenser.asp
++# and http://www.digi-tv.dk/Sendenettets_opbygning/
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Albacete dvb-apps/util/scan/dvb-t/es-Albacete
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Albacete 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Albacete 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Spain, Albacete
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 59: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 63: CLMTV
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Veo, Veo 2, Net TV, Teledeporte
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alfabia dvb-apps/util/scan/dvb-t/es-Alfabia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alfabia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Alfabia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# DVB-T Alfabia, Mallorca, Balearic Islands, Spain.
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.63: 24h, 50 aniv., ClanTV, La 2, TVE1; RNE 1, RNE 3, RNE C; Digitext, EPG, Lanzadera.
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.65: IB3, Aprenda Ingles TV
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.66: NetTV, Teledeporte, VeoTV1, VeoTV2.
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.67: 40 Latino TV, CNN+, Cuatro, La Sexta 1.
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.68: Fly Music, Tele 5, Tele 5 Estrellas, Tele 5 Sport.
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C.69: Antena 3, La Sexta 2, Neox, Nova.
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alicante dvb-apps/util/scan/dvb-t/es-Alicante
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alicante 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Alicante 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# DVB-T Alicante, Spain
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 55: TV3, K33/33, 3/24, Canal 300
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 58: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 63: Telemadrid, La Otra, Onda 6
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Veo, Veo 2, Net TV, Teledeporte
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alpicat dvb-apps/util/scan/dvb-t/es-Alpicat
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Alpicat 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Alpicat 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# DVB-T Alpicat (Lleida)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c58: TV3, K3/33, 3/24, 300, 3i
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c64: TVE1, TVE2, Teledeporte, C24h
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c66: TVE ClanTV, TVE 50a, Veo1, Veo2, Net
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c67: Cuatro, 40Latino, CNN+, LaSexta 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c68: T5, T5 Sports, T5 Estrellas, Net Fly Music
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c69: Antena3, Antena.Neox, Antena.Nova, La Sexta 2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Asturias dvb-apps/util/scan/dvb-t/es-Asturias
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Asturias 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Asturias 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# DVB-T Asturias
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TPA TPA2
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TVE 1, TVE 2, 24H TVE, CLAN/50 TVE, RNE1, RNE CLASICA, RNE3
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TELEDEPORTE, VEO TV, VEO 2, NET TV
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CUATRO, CNN+, 40 LATINO, LA SEXTA 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TELECINCO, T5 ESTRELLAS, T5 SPORT, FLYMUSIC
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, LA SEXTA 2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Bilbao dvb-apps/util/scan/dvb-t/es-Bilbao
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Bilbao 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Bilbao 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: CNN+. Cuatro, La Sexta, 40 latino TV
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: Antena 3, La Sexta 2, Neo, Nova, Telehit, Onda Cero, Europa FM, Onda Melodia
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 63: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Veo, Veo 2, Net TV, Teledeporte
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 61: ETB1, ETB2, ETB-Sat, Canal Vasco, Euskadi Irratia, Radio Euskadi, Euskadi Gastea, Radio EITB
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Cadiz dvb-apps/util/scan/dvb-t/es-Cadiz
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Cadiz 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Cadiz 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# DVB-T Cadiz (Andalucia) by terrex Feb 2009
++# T freq bw fec_hi fec_lo mod transm-mode guard-interval hierarchy
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C59
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C64
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C66
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C67
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C68
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C69
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Carceres dvb-apps/util/scan/dvb-t/es-Carceres
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Carceres 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Carceres 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 39: 8Madrid, TMT-Popular TV, Kiss TV, Intereconomía TV
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 50: EsMadrid TV, Ver-t, EM2, Libertad Digital TV
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 58: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 63: Telemadrid, La Otra, Onda 6
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Veo, Veo 2, Net TV, Teledeporte
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 61: Canal Extremadura, Extremadura Television
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Collserola dvb-apps/util/scan/dvb-t/es-Collserola
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Collserola 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Collserola 2009-06-21 13:29:06.000000000 +0200
+@@ -1,6 +1,10 @@
+ # DVB-T Collserola (Barcelona)
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 650000000 8MHz 2/3 2/3 QAM64 8k 1/32 NONE # C43: tvc
+-T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C61: tve, t5, a3, c+
+-T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C66: veotv, nettv
+-
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE #c26: BTV
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE #c33: CityTV
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE #c61: TV3, K3/33, 3/24, 300
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE #c64: TVE1, TVE2, TVE 24H, Clan/TVE 50 Años, RNE1, RNEC, RNE3
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE #c66: Veo TV, Veo2, Net TV, Teledeporte
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE #c67: Cuatro, CNN+, 40 Latino, La Sexta1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE #c68: Telecino, T5 Sport, T5 Estrellas, Fly Music
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE #c69: Antena 3, Antena.Neox, Antena.Nova, La Sexta2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Donostia dvb-apps/util/scan/dvb-t/es-Donostia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Donostia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Donostia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,14 @@
++# The channels with 1/32 guard-interval are French and should be perfectly visible
++# here. However I have only managed to get a lock for the channel 57 of the French ones.
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 32: CNN+, Cuatro, La Sexta 1, 40 Latino TV, EPG Soge V2 5
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 40: Antena 3, Antena.Neox, Antena.Nova, Telehit, Onda Cero, Europa FM, Onda Melodia, A3Lanzadera, A3Portal, EPGA3, A3Ticker
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # Canal 42: Direct8, TMC, BFM, iTele, Europe2TV, Gulli
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # Canal 49: M6, W9, NT1
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # Canal 51: Canal+, Canal+ Cinema, Canal+ Sport
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # Canal 57: TF1, NRJ12, Eurosport, TPS Star, LCI
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 60: ETB1, ETB2, ETB-Sat, Canal Vasco, Euskadi Irratia, Radio Euskadi, Euskadi Gaztea, Radio Etb, TGov, Eguraldi
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 63: TVE1, TVE2, 24H TVE, Clan/TVE 50 anos, RNE, RNEC, RNE3, Lanzadera, EPG, Digitext, Meteo, Bolsa, Trafico, Empleat
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # Canal 65: France 2, France 3, France 4, France 5, Arte, LCP
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Net TV, Teledeporte, Veo TV1, Veo TV2, Lanzadera, EPG, Digitext, Meteo, Bolsa, Trafico, Empleat
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Fly Music, Tele 5, Tele 5 Estrellas, Tele 5 Sport
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Huesca dvb-apps/util/scan/dvb-t/es-Huesca
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Huesca 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Huesca 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# DVB-T Huesca (Aragón) [Spain] [es-Huesca]
++# Generated by Vicente Hernando Ara <bizenton@gmail.com>
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE # Canal 57: ARAGON TV, ARAGON RADIO, ARAGON HD
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 61: La 1, La 2, 24h, Clan, RNE1, RNEC, RNE3
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Teledeporte, Canal Ingenieria, VEO7, SONY TV en VEO, Tienda en VEO, GUIDE PLUS+, Intereconomia, Radio Intereconomia, RADIO MARCA
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: laSexta, CUATRO, CNN+, 40 LATINO, PROMO, SER, 40 PRINCIPALES, CADENA DIAL
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Telecinco, FDF, Telecinco 2, Disney Channel, Cincoshop
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, ONDA CERO, EUROPA FM, ONDA MELODÃA, HOGAR 10
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Las_Palmas dvb-apps/util/scan/dvb-t/es-Las_Palmas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Las_Palmas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Las_Palmas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Funciona correctamente en Las Palmas de Gran Canaria (24-4-2007)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 60: TVE1, TVE2, 24H TVE, Clan/TVE, RNE, RNEC, RNE3, Lanzadera, EPG, Digitext, Meteo, Bolsa, Trafico, Empleat
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 65: TV C, TV C2
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Net TV, Teledeporte, Veo TV1, SETenVeo, Radio Intereconomía Lanzadera, EPG, Digitext, Meteo, Bolsa, Trafico, Empleat
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: CNN+, Cuatro, La Sexta 1, 40 Latino TV, EPG Soge V2 5
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Fly Music, Punto Radio, Tele 5, Tele 5 Estrellas, Tele 5 Sport
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: Antena 3, Antena.Neox, Antena.Nova, Telehit, Onda Cero, Europa FM, Onda Melodia, A3Lanzadera, A3Portal, EPGA3, A3Ticker
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Lugo dvb-apps/util/scan/dvb-t/es-Lugo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Lugo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Lugo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# DVB-T Lugo (Centro emisor Paramo) - Rev. 1.2 - 11.12.05
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TVE 1, TVE 2, 24H TVE, CLAN/50 TVE, RNE1, RNE CLASICA, RNE3
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TVG, GALICIA TV AMERICA, RADIO GALEGA, R.GALEGA MUSICA, SON GALICIA RADIO, PROBAS RETEGAL
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TELEDEPORTE, VEO TV, VEO 2, NET TV
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # CUATRO, CNN+, 40 LATINO, LA SEXTA 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TELECINCO, T5 ESTRELLAS, T5 SPORT, FLYMUSIC
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, LA SEXTA 2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Madrid dvb-apps/util/scan/dvb-t/es-Madrid
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Madrid 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Madrid 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 39: 8Madrid, TMT-Popular TV, Kiss TV, Intereconomía TV
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 50: EsMadrid TV, Ver-t, EM2, Libertad Digital TV
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 58: La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 63: Telemadrid, La Otra, Onda 6
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Veo, Veo 2, Net TV, Teledeporte
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Malaga dvb-apps/util/scan/dvb-t/es-Malaga
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Malaga 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Malaga 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# DVB-T Malaga (Andalucia) by Pedro Leon 4 Mayo 2007
++# T freq bw fec_hi fec_lo mod transm-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C57 La Primera, La 2, Canal 24H, Clan/TVE 50, RNE1, RNE Clásica, RNE 3
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C63 Canal Sur, Canal 2 Andalucia
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C66 TELEDEPORTE, VEO, *Canal Ingenieria, SETenVEO, Tienda en VEO, NET TV, Radio Intereconomia
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C67 CUATRO, CNN+, 40 LATINO, laSexta
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C68 Telecinco, T5 Estrellas, T5 Sport, FLYMUSIC, PUNTO RADIO
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C69 ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, *tvtv DIGITAL, ONDA CERO, EUROPA FM, ONDA MELODIA, Telehit
++# * Canales de datos o MHT
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Muros-Noia dvb-apps/util/scan/dvb-t/es-Muros-Noia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Muros-Noia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Muros-Noia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# DVB-T Muros and Noia
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 27: Local Ribeira
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 61: RAR A Corunha
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 63: RGE Galicia
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: SFN 1
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: SFN 2
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: SFN 3
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: SFN 4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Mussara dvb-apps/util/scan/dvb-t/es-Mussara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Mussara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Mussara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# DVB-T La Mussara (Reus-Tarragona)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c59: TV3, K3/33, 3/24, 300, 3i
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c64: TVE1, TVE2, Teledeporte, C24h
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c66: TVE ClanTV, TVE 50a, Veo1, Veo2, Net
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c67: Cuatro, 40Latino, CNN+, LaSexta 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c68: T5, T5 Sports, T5 Estrellas, Net Fly Music
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # c69: Antena3, Antena.Neox, Antena.Nova, La Sexta 2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Rocacorba dvb-apps/util/scan/dvb-t/es-Rocacorba
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Rocacorba 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Rocacorba 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# DVB-T Rocacorba (Girona)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TVE 1, TVE 2, ANTENA 3, TELECINCO, CUATRO
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # TV3, K3/33, 3XL.NET, 3/24, CANAL PILOT
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # SERVICIO PRUEBAS CANAL 67
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE #
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Santander dvb-apps/util/scan/dvb-t/es-Santander
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Santander 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Santander 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# file automatically generated by w_scan
++# (http://wirbel.htpc-forum.de/w_scan/index2.html)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Santiago_de_Compostela dvb-apps/util/scan/dvb-t/es-Santiago_de_Compostela
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Santiago_de_Compostela 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Santiago_de_Compostela 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# DVB-T Santiago de Compostela
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 23: Local Santiago
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 40: RAR Santiago
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 63: RGE Galicia
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: SFN 1
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: SFN 2
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: SFN 3
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: SFN 4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Sevilla dvb-apps/util/scan/dvb-t/es-Sevilla
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Sevilla 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Sevilla 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# DVB-T Sevilla (Andalucia) by x2 15 Agosto 2006
++# T freq bw fec_hi fec_lo mod transm-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C57
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C61
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C66
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C67
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C68
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # C69
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Valencia dvb-apps/util/scan/dvb-t/es-Valencia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Valencia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Valencia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# DVB-T Valencia, Spain
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 23: TMV, Tele 7, Aprende ingles TV, Ed. Prensa Val.,R.Mediamed
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 55: TV3, 33, 3/24, K3/300
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 57: Canal 9, Punt 2, Popular TV, LP Teva, Radio 9, Si Radio
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 58: TVE 1, La 2, 24H TVE, Clan TVE, RNE 1, RNE C, RNE 3
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Veo, Sony TV en Veo, Tienda en Veo, Intereconomia, Teledeporte, R. Interec., R. Marca
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: Cuatro, CNN+, 40 Latino, Promo, La Sexta, Ser, 40 Princ., Cad. Dial
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Telecinco, Telecinco 2, FDF, Cinco Shop, Disney Channel, Punto Radio
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: Antena 3, Antena Neox, Antena Nova, Hogar 10, Onda Cero, Europa FM, Onda Melodia
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Valladolid dvb-apps/util/scan/dvb-t/es-Valladolid
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Valladolid 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Valladolid 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# DVB-T Valladolid
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 57: Clan TVE, 24H TVE, La 2, TVE 1, RNE1, RNE3, RNC
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: Veo, Veo 2, Net TV, Teledeporte
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: Cuatro, CNN+, 40 Latino, La Sexta 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: Telecinco, Telecinco Sport, Telecinco Estrellas, Fly Music
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: Antena 3, Antena Neox, Antena Nova, La Sexta 2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Vilamarxant dvb-apps/util/scan/dvb-t/es-Vilamarxant
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Vilamarxant 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Vilamarxant 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# DVB-T Vilamarxant, Valencia, C. Valenciana, Spain.
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Zaragoza dvb-apps/util/scan/dvb-t/es-Zaragoza
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/es-Zaragoza 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/es-Zaragoza 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# DVB-T Zaragoza (Aragón) [Spain] [es-Zaragoza]
++# Generated by Víctor Martínez Romanos <vmromanos@gmail.com>
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 63: TVE 1, TVE 2, 24H, CLAN/50, RNE1, RNEC, RNE3
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 66: TELEDEPORTE, VEO TV, VEO 2, NET TV
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 67: CUATRO, CNN+, 40 LATINO, LA SEXTA 1
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 68: T5 ESTRELLAS, T5 SPORT, TELECINCO, FLYMUSIC
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE # Canal 69: ANTENA 3, ANTENA.NEOX, ANTENA.NOVA, LA SEXTA 2
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Aanekoski dvb-apps/util/scan/dvb-t/fi-Aanekoski
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Aanekoski 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Aanekoski 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Aanekoski_Konginkangas dvb-apps/util/scan/dvb-t/fi-Aanekoski_Konginkangas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Aanekoski_Konginkangas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Aanekoski_Konginkangas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ahtari dvb-apps/util/scan/dvb-t/fi-Ahtari
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ahtari 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ahtari 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Alajarvi dvb-apps/util/scan/dvb-t/fi-Alajarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Alajarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Alajarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ala-Vuokki dvb-apps/util/scan/dvb-t/fi-Ala-Vuokki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ala-Vuokki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ala-Vuokki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ammansaari dvb-apps/util/scan/dvb-t/fi-Ammansaari
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ammansaari 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ammansaari 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Anjalankoski dvb-apps/util/scan/dvb-t/fi-Anjalankoski
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Anjalankoski 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Anjalankoski 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama dvb-apps/util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Enontekio_Ahovaara_Raattama 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Espoo dvb-apps/util/scan/dvb-t/fi-Espoo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Espoo 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Espoo 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,6 @@
+-# Espoo A-mux (Digita Finland)
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+ T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Eurajoki dvb-apps/util/scan/dvb-t/fi-Eurajoki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Eurajoki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Eurajoki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Fiskars dvb-apps/util/scan/dvb-t/fi-Fiskars
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Fiskars 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Fiskars 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Haapavesi dvb-apps/util/scan/dvb-t/fi-Haapavesi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Haapavesi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Haapavesi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hameenkyro_Kyroskoski dvb-apps/util/scan/dvb-t/fi-Hameenkyro_Kyroskoski
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hameenkyro_Kyroskoski 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Hameenkyro_Kyroskoski 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hameenlinna_Painokangas dvb-apps/util/scan/dvb-t/fi-Hameenlinna_Painokangas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hameenlinna_Painokangas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Hameenlinna_Painokangas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hanko dvb-apps/util/scan/dvb-t/fi-Hanko
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hanko 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Hanko 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hartola dvb-apps/util/scan/dvb-t/fi-Hartola
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hartola 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Hartola 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Heinavesi dvb-apps/util/scan/dvb-t/fi-Heinavesi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Heinavesi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Heinavesi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Heinola dvb-apps/util/scan/dvb-t/fi-Heinola
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Heinola 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Heinola 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hetta dvb-apps/util/scan/dvb-t/fi-Hetta
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hetta 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Hetta 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Houtskari dvb-apps/util/scan/dvb-t/fi-Houtskari
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Houtskari 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Houtskari 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi_Kyparavaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi_Paljakka dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi_Paljakka
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyrynsalmi_Paljakka 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Hyrynsalmi_Paljakka 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto dvb-apps/util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Hyvinkaa_Musta-Mannisto 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ii_Raiskio dvb-apps/util/scan/dvb-t/fi-Ii_Raiskio
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ii_Raiskio 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ii_Raiskio 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Iisalmi dvb-apps/util/scan/dvb-t/fi-Iisalmi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Iisalmi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Iisalmi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ikaalinen dvb-apps/util/scan/dvb-t/fi-Ikaalinen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ikaalinen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ikaalinen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ikaalinen_Riitiala dvb-apps/util/scan/dvb-t/fi-Ikaalinen_Riitiala
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ikaalinen_Riitiala 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ikaalinen_Riitiala 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari dvb-apps/util/scan/dvb-t/fi-Inari
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Inari 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari_Janispaa dvb-apps/util/scan/dvb-t/fi-Inari_Janispaa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari_Janispaa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Inari_Janispaa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari_Naatamo dvb-apps/util/scan/dvb-t/fi-Inari_Naatamo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Inari_Naatamo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Inari_Naatamo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ivalo_Saarineitamovaara dvb-apps/util/scan/dvb-t/fi-Ivalo_Saarineitamovaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ivalo_Saarineitamovaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ivalo_Saarineitamovaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jalasjarvi dvb-apps/util/scan/dvb-t/fi-Jalasjarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jalasjarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Jalasjarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Kaipola dvb-apps/util/scan/dvb-t/fi-Jamsa_Kaipola
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Kaipola 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Jamsa_Kaipola 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli dvb-apps/util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Jamsa_Kuorevesi_Halli 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Matkosvuori dvb-apps/util/scan/dvb-t/fi-Jamsa_Matkosvuori
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Matkosvuori 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Jamsa_Matkosvuori 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsankoski dvb-apps/util/scan/dvb-t/fi-Jamsankoski
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsankoski 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Jamsankoski 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Ouninpohja dvb-apps/util/scan/dvb-t/fi-Jamsa_Ouninpohja
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jamsa_Ouninpohja 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Jamsa_Ouninpohja 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joensuu_Vestinkallio dvb-apps/util/scan/dvb-t/fi-Joensuu_Vestinkallio
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joensuu_Vestinkallio 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Joensuu_Vestinkallio 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joroinen_Puukkola dvb-apps/util/scan/dvb-t/fi-Joroinen_Puukkola
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joroinen_Puukkola 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Joroinen_Puukkola 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joutsa_Lankia dvb-apps/util/scan/dvb-t/fi-Joutsa_Lankia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joutsa_Lankia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Joutsa_Lankia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joutseno dvb-apps/util/scan/dvb-t/fi-Joutseno
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Joutseno 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Joutseno 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Juntusranta dvb-apps/util/scan/dvb-t/fi-Juntusranta
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Juntusranta 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Juntusranta 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Juupajoki_Kopsamo dvb-apps/util/scan/dvb-t/fi-Juupajoki_Kopsamo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Juupajoki_Kopsamo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Juupajoki_Kopsamo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jyvaskyla dvb-apps/util/scan/dvb-t/fi-Jyvaskyla
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jyvaskyla 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Jyvaskyla 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski dvb-apps/util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Jyvaskylan_mlk_Vaajakoski 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti dvb-apps/util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kaavi_Sivakkavaara_Luikonlahti 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kajaani_Pollyvaara dvb-apps/util/scan/dvb-t/fi-Kajaani_Pollyvaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kajaani_Pollyvaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kajaani_Pollyvaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kalajoki dvb-apps/util/scan/dvb-t/fi-Kalajoki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kalajoki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kalajoki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kangaslampi dvb-apps/util/scan/dvb-t/fi-Kangaslampi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kangaslampi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kangaslampi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kangasniemi_Turkinmaki dvb-apps/util/scan/dvb-t/fi-Kangasniemi_Turkinmaki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kangasniemi_Turkinmaki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kangasniemi_Turkinmaki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kankaanpaa dvb-apps/util/scan/dvb-t/fi-Kankaanpaa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kankaanpaa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kankaanpaa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karigasniemi dvb-apps/util/scan/dvb-t/fi-Karigasniemi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karigasniemi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Karigasniemi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karkkila dvb-apps/util/scan/dvb-t/fi-Karkkila
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karkkila 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Karkkila 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karstula dvb-apps/util/scan/dvb-t/fi-Karstula
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karstula 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Karstula 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karvia dvb-apps/util/scan/dvb-t/fi-Karvia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Karvia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Karvia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kaunispaa dvb-apps/util/scan/dvb-t/fi-Kaunispaa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kaunispaa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kaunispaa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kemijarvi_Suomutunturi dvb-apps/util/scan/dvb-t/fi-Kemijarvi_Suomutunturi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kemijarvi_Suomutunturi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kemijarvi_Suomutunturi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kerimaki dvb-apps/util/scan/dvb-t/fi-Kerimaki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kerimaki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kerimaki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Keuruu dvb-apps/util/scan/dvb-t/fi-Keuruu
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Keuruu 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Keuruu 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Keuruu_Haapamaki dvb-apps/util/scan/dvb-t/fi-Keuruu_Haapamaki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Keuruu_Haapamaki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Keuruu_Haapamaki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kihnio dvb-apps/util/scan/dvb-t/fi-Kihnio
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kihnio 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kihnio 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kiihtelysvaara dvb-apps/util/scan/dvb-t/fi-Kiihtelysvaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kiihtelysvaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kiihtelysvaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kilpisjarvi dvb-apps/util/scan/dvb-t/fi-Kilpisjarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kilpisjarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kilpisjarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi dvb-apps/util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kittila_Sirkka_Levitunturi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kolari_Vuolittaja dvb-apps/util/scan/dvb-t/fi-Kolari_Vuolittaja
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kolari_Vuolittaja 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kolari_Vuolittaja 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Koli dvb-apps/util/scan/dvb-t/fi-Koli
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Koli 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Koli 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Korpilahti_Vaarunvuori dvb-apps/util/scan/dvb-t/fi-Korpilahti_Vaarunvuori
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Korpilahti_Vaarunvuori 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Korpilahti_Vaarunvuori 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Korppoo dvb-apps/util/scan/dvb-t/fi-Korppoo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Korppoo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Korppoo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kruunupyy dvb-apps/util/scan/dvb-t/fi-Kruunupyy
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kruunupyy 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kruunupyy 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Iivantiira dvb-apps/util/scan/dvb-t/fi-Kuhmo_Iivantiira
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Iivantiira 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kuhmo_Iivantiira 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen dvb-apps/util/scan/dvb-t/fi-Kuhmoinen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kuhmoinen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi dvb-apps/util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kuhmoinen_Harjunsalmi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen dvb-apps/util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kuhmoinen_Puukkoinen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Lentiira dvb-apps/util/scan/dvb-t/fi-Kuhmo_Lentiira
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Lentiira 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kuhmo_Lentiira 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki dvb-apps/util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kuhmo_Tikkasenmaki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuopio dvb-apps/util/scan/dvb-t/fi-Kuopio
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuopio 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kuopio 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kustavi_Viherlahti dvb-apps/util/scan/dvb-t/fi-Kustavi_Viherlahti
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kustavi_Viherlahti 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kustavi_Viherlahti 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuttanen dvb-apps/util/scan/dvb-t/fi-Kuttanen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuttanen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kuttanen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuusamo_Hamppulampi dvb-apps/util/scan/dvb-t/fi-Kuusamo_Hamppulampi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kuusamo_Hamppulampi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kuusamo_Hamppulampi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kyyjarvi_Noposenaho dvb-apps/util/scan/dvb-t/fi-Kyyjarvi_Noposenaho
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Kyyjarvi_Noposenaho 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Kyyjarvi_Noposenaho 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lahti dvb-apps/util/scan/dvb-t/fi-Lahti
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lahti 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Lahti 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lapua dvb-apps/util/scan/dvb-t/fi-Lapua
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lapua 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Lapua 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Laukaa dvb-apps/util/scan/dvb-t/fi-Laukaa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Laukaa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Laukaa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Laukaa_Vihtavuori dvb-apps/util/scan/dvb-t/fi-Laukaa_Vihtavuori
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Laukaa_Vihtavuori 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Laukaa_Vihtavuori 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lavia_Lavianjarvi dvb-apps/util/scan/dvb-t/fi-Lavia_Lavianjarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lavia_Lavianjarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Lavia_Lavianjarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lieksa_Vieki dvb-apps/util/scan/dvb-t/fi-Lieksa_Vieki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lieksa_Vieki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Lieksa_Vieki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lohja dvb-apps/util/scan/dvb-t/fi-Lohja
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Lohja 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Lohja 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Loimaa dvb-apps/util/scan/dvb-t/fi-Loimaa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Loimaa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Loimaa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Luhanka dvb-apps/util/scan/dvb-t/fi-Luhanka
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Luhanka 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Luhanka 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Luopioinen dvb-apps/util/scan/dvb-t/fi-Luopioinen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Luopioinen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Luopioinen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mantta dvb-apps/util/scan/dvb-t/fi-Mantta
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mantta 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Mantta 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mantyharju dvb-apps/util/scan/dvb-t/fi-Mantyharju
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mantyharju 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Mantyharju 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mikkeli dvb-apps/util/scan/dvb-t/fi-Mikkeli
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Mikkeli 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Mikkeli 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Muonio_Olostunturi dvb-apps/util/scan/dvb-t/fi-Muonio_Olostunturi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Muonio_Olostunturi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Muonio_Olostunturi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia dvb-apps/util/scan/dvb-t/fi-Nilsia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Nilsia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi dvb-apps/util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Nilsia_Keski-Siikajarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia_Pisa dvb-apps/util/scan/dvb-t/fi-Nilsia_Pisa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nilsia_Pisa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Nilsia_Pisa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nokia dvb-apps/util/scan/dvb-t/fi-Nokia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nokia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Nokia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori dvb-apps/util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Nokia_Siuro_Linnavuori 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nummi-Pusula_Hyonola dvb-apps/util/scan/dvb-t/fi-Nummi-Pusula_Hyonola
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nummi-Pusula_Hyonola 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Nummi-Pusula_Hyonola 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nurmes_Kortevaara dvb-apps/util/scan/dvb-t/fi-Nurmes_Kortevaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Nurmes_Kortevaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Nurmes_Kortevaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen dvb-apps/util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Orivesi_Langelmaki_Talviainen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Oulu dvb-apps/util/scan/dvb-t/fi-Oulu
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Oulu 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Oulu 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Padasjoki dvb-apps/util/scan/dvb-t/fi-Padasjoki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Padasjoki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Padasjoki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Padasjoki_Arrakoski dvb-apps/util/scan/dvb-t/fi-Padasjoki_Arrakoski
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Padasjoki_Arrakoski 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Padasjoki_Arrakoski 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Paltamo_Kivesvaara dvb-apps/util/scan/dvb-t/fi-Paltamo_Kivesvaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Paltamo_Kivesvaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Paltamo_Kivesvaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Parikkala dvb-apps/util/scan/dvb-t/fi-Parikkala
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Parikkala 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Parikkala 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Parkano dvb-apps/util/scan/dvb-t/fi-Parkano
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Parkano 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Parkano 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pello dvb-apps/util/scan/dvb-t/fi-Pello
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pello 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pello 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pello_Ratasvaara dvb-apps/util/scan/dvb-t/fi-Pello_Ratasvaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pello_Ratasvaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pello_Ratasvaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Perho dvb-apps/util/scan/dvb-t/fi-Perho
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Perho 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Perho 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pernaja dvb-apps/util/scan/dvb-t/fi-Pernaja
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pernaja 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pernaja 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pieksamaki_Halkokumpu dvb-apps/util/scan/dvb-t/fi-Pieksamaki_Halkokumpu
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pieksamaki_Halkokumpu 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pieksamaki_Halkokumpu 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pihtipudas dvb-apps/util/scan/dvb-t/fi-Pihtipudas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pihtipudas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pihtipudas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Porvoo_Suomenkyla dvb-apps/util/scan/dvb-t/fi-Porvoo_Suomenkyla
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Porvoo_Suomenkyla 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Porvoo_Suomenkyla 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Posio dvb-apps/util/scan/dvb-t/fi-Posio
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Posio 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Posio 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi dvb-apps/util/scan/dvb-t/fi-Pudasjarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pudasjarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote dvb-apps/util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pudasjarvi_Iso-Syote 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara dvb-apps/util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pudasjarvi_Kangasvaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Puolanka dvb-apps/util/scan/dvb-t/fi-Puolanka
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Puolanka 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Puolanka 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pyhatunturi dvb-apps/util/scan/dvb-t/fi-Pyhatunturi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pyhatunturi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pyhatunturi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pyhavuori dvb-apps/util/scan/dvb-t/fi-Pyhavuori
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pyhavuori 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pyhavuori 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi dvb-apps/util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Pylkonmaki_Karankajarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Raahe_Mestauskallio dvb-apps/util/scan/dvb-t/fi-Raahe_Mestauskallio
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Raahe_Mestauskallio 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Raahe_Mestauskallio 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Raahe_Piehinki dvb-apps/util/scan/dvb-t/fi-Raahe_Piehinki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Raahe_Piehinki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Raahe_Piehinki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ranua_Haasionmaa dvb-apps/util/scan/dvb-t/fi-Ranua_Haasionmaa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ranua_Haasionmaa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ranua_Haasionmaa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ranua_Leppiaho dvb-apps/util/scan/dvb-t/fi-Ranua_Leppiaho
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ranua_Leppiaho 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ranua_Leppiaho 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rautavaara_Angervikko dvb-apps/util/scan/dvb-t/fi-Rautavaara_Angervikko
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rautavaara_Angervikko 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Rautavaara_Angervikko 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rautjarvi_Simpele dvb-apps/util/scan/dvb-t/fi-Rautjarvi_Simpele
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rautjarvi_Simpele 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Rautjarvi_Simpele 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ristijarvi dvb-apps/util/scan/dvb-t/fi-Ristijarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ristijarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ristijarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi dvb-apps/util/scan/dvb-t/fi-Rovaniemi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Ala-Nampa_Yli-Nampa_Rantalaki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Kaihuanvaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Karhuvaara_Marrasjarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Marasenkallio dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Marasenkallio
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Marasenkallio 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Marasenkallio 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Meltaus_Sorviselka 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Sonka dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Sonka
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Rovaniemi_Sonka 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Rovaniemi_Sonka 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ruka dvb-apps/util/scan/dvb-t/fi-Ruka
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ruka 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ruka 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ruovesi_Storminiemi dvb-apps/util/scan/dvb-t/fi-Ruovesi_Storminiemi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ruovesi_Storminiemi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ruovesi_Storminiemi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi dvb-apps/util/scan/dvb-t/fi-Saarijarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Saarijarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi_Kalmari dvb-apps/util/scan/dvb-t/fi-Saarijarvi_Kalmari
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi_Kalmari 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Saarijarvi_Kalmari 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi_Mahlu dvb-apps/util/scan/dvb-t/fi-Saarijarvi_Mahlu
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Saarijarvi_Mahlu 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Saarijarvi_Mahlu 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Hirvasvaara dvb-apps/util/scan/dvb-t/fi-Salla_Hirvasvaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Hirvasvaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Salla_Hirvasvaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Ihistysjanka dvb-apps/util/scan/dvb-t/fi-Salla_Ihistysjanka
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Ihistysjanka 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Salla_Ihistysjanka 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Naruska dvb-apps/util/scan/dvb-t/fi-Salla_Naruska
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Naruska 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Salla_Naruska 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Sallatunturi dvb-apps/util/scan/dvb-t/fi-Salla_Sallatunturi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Sallatunturi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Salla_Sallatunturi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Sarivaara dvb-apps/util/scan/dvb-t/fi-Salla_Sarivaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salla_Sarivaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Salla_Sarivaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salo_Isokyla dvb-apps/util/scan/dvb-t/fi-Salo_Isokyla
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Salo_Isokyla 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Salo_Isokyla 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa dvb-apps/util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Savukoski_Martti_Haarahonganmaa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Savukoski_Tanhua dvb-apps/util/scan/dvb-t/fi-Savukoski_Tanhua
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Savukoski_Tanhua 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Savukoski_Tanhua 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Siilinjarvi dvb-apps/util/scan/dvb-t/fi-Siilinjarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Siilinjarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Siilinjarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sipoo_Norrkulla dvb-apps/util/scan/dvb-t/fi-Sipoo_Norrkulla
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sipoo_Norrkulla 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Sipoo_Norrkulla 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sodankyla_Pittiovaara dvb-apps/util/scan/dvb-t/fi-Sodankyla_Pittiovaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sodankyla_Pittiovaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Sodankyla_Pittiovaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sulkava_Vaatalanmaki dvb-apps/util/scan/dvb-t/fi-Sulkava_Vaatalanmaki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sulkava_Vaatalanmaki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Sulkava_Vaatalanmaki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Suomussalmi_Myllylahti dvb-apps/util/scan/dvb-t/fi-Suomussalmi_Myllylahti
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Suomussalmi_Myllylahti 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Suomussalmi_Myllylahti 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sysma_Liikola dvb-apps/util/scan/dvb-t/fi-Sysma_Liikola
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Sysma_Liikola 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Sysma_Liikola 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Taivalkoski dvb-apps/util/scan/dvb-t/fi-Taivalkoski
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Taivalkoski 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Taivalkoski 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Taivalkoski_Taivalvaara dvb-apps/util/scan/dvb-t/fi-Taivalkoski_Taivalvaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Taivalkoski_Taivalvaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Taivalkoski_Taivalvaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tammela dvb-apps/util/scan/dvb-t/fi-Tammela
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tammela 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Tammela 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tammisaari dvb-apps/util/scan/dvb-t/fi-Tammisaari
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tammisaari 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Tammisaari 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tampere dvb-apps/util/scan/dvb-t/fi-Tampere
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tampere 2004-01-19 18:10:16.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Tampere 2009-06-21 13:29:06.000000000 +0200
+@@ -1,6 +1,6 @@
+-# Tampere DVB-T (Digita Finland)
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+ T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+ T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+ T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+-
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tampere_Pyynikki dvb-apps/util/scan/dvb-t/fi-Tampere_Pyynikki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tampere_Pyynikki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Tampere_Pyynikki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tervola dvb-apps/util/scan/dvb-t/fi-Tervola
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Tervola 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Tervola 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Turku dvb-apps/util/scan/dvb-t/fi-Turku
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Turku 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Turku 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,6 @@
+-# Turku A-mux (Digita Finland)
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+ T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki dvb-apps/util/scan/dvb-t/fi-Utsjoki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Utsjoki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuorgam_Njallavaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuorgam_raja 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuvvus dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuvvus
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Nuvvus 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Nuvvus 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Outakoski dvb-apps/util/scan/dvb-t/fi-Utsjoki_Outakoski
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Outakoski 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Outakoski 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Polvarniemi dvb-apps/util/scan/dvb-t/fi-Utsjoki_Polvarniemi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Polvarniemi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Polvarniemi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Rovisuvanto dvb-apps/util/scan/dvb-t/fi-Utsjoki_Rovisuvanto
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Rovisuvanto 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Rovisuvanto 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Tenola dvb-apps/util/scan/dvb-t/fi-Utsjoki_Tenola
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Utsjoki_Tenola 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Utsjoki_Tenola 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Uusikaupunki_Orivo dvb-apps/util/scan/dvb-t/fi-Uusikaupunki_Orivo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Uusikaupunki_Orivo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Uusikaupunki_Orivo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vaala dvb-apps/util/scan/dvb-t/fi-Vaala
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vaala 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Vaala 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vaasa dvb-apps/util/scan/dvb-t/fi-Vaasa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vaasa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Vaasa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Valtimo dvb-apps/util/scan/dvb-t/fi-Valtimo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Valtimo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Valtimo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Jyranvuori dvb-apps/util/scan/dvb-t/fi-Vammala_Jyranvuori
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Jyranvuori 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Vammala_Jyranvuori 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Roismala dvb-apps/util/scan/dvb-t/fi-Vammala_Roismala
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Roismala 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Vammala_Roismala 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Savi dvb-apps/util/scan/dvb-t/fi-Vammala_Savi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vammala_Savi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Vammala_Savi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vantaa_Hakunila dvb-apps/util/scan/dvb-t/fi-Vantaa_Hakunila
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vantaa_Hakunila 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Vantaa_Hakunila 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki dvb-apps/util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Varpaisjarvi_Honkamaki 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Virrat_Lappavuori dvb-apps/util/scan/dvb-t/fi-Virrat_Lappavuori
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Virrat_Lappavuori 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Virrat_Lappavuori 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vuokatti dvb-apps/util/scan/dvb-t/fi-Vuokatti
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vuokatti 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Vuokatti 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vuotso dvb-apps/util/scan/dvb-t/fi-Vuotso
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Vuotso 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Vuotso 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ylitornio_Ainiovaara dvb-apps/util/scan/dvb-t/fi-Ylitornio_Ainiovaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ylitornio_Ainiovaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ylitornio_Ainiovaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ylitornio_Raanujarvi dvb-apps/util/scan/dvb-t/fi-Ylitornio_Raanujarvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Ylitornio_Raanujarvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Ylitornio_Raanujarvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Yllas dvb-apps/util/scan/dvb-t/fi-Yllas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fi-Yllas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fi-Yllas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Abbeville dvb-apps/util/scan/dvb-t/fr-Abbeville
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Abbeville 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Abbeville 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Abbeville - France (DVB-T transmitter of Abbeville ( LaMotte ) )
++# Abbeville - France (signal DVB-T transmis depuis l'émetteur de LaMotte )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Abbeville - LaMotte ####
++#R1
++T 506000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Agen dvb-apps/util/scan/dvb-t/fr-Agen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Agen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Agen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Agen - France (DVB-T transmitter of Agen ( Agglomération ) )
++# Agen - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Agen - Agglomération ####
++#R1
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ajaccio dvb-apps/util/scan/dvb-t/fr-Ajaccio
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ajaccio 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Ajaccio 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Ajaccio - France (DVB-T transmitter of Ajaccio ( Baied'Ajaccio ) )
++# Ajaccio - France (signal DVB-T transmis depuis l'émetteur de Baied'Ajaccio )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Ajaccio - Baied'Ajaccio ####
++#R1
++T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Albi dvb-apps/util/scan/dvb-t/fr-Albi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Albi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Albi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Albi - France (DVB-T transmitter of Albi ( Agglomération ) )
++# Albi - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Albi - Agglomération ####
++#R1
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 818000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Alençon dvb-apps/util/scan/dvb-t/fr-Alençon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Alençon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Alençon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Alençon - France (DVB-T transmitter of Alençon ( Montsd'Amain ) )
++# Alençon - France (signal DVB-T transmis depuis l'émetteur de Montsd'Amain )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Alençon - Montsd'Amain ####
++#R1
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ales dvb-apps/util/scan/dvb-t/fr-Ales
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ales 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Ales 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Alès - France (DVB-T transmitter of Alès ( Agglomération ) )
++# Alès - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Alès - Agglomération ####
++#R1
++T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ales-Bouquet dvb-apps/util/scan/dvb-t/fr-Ales-Bouquet
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ales-Bouquet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Ales-Bouquet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Alès - France (DVB-T transmitter of Alès ( MontBouquet ) )
++# Alès - France (signal DVB-T transmis depuis l'émetteur de MontBouquet )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Alès - MontBouquet ####
++#R1
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Amiens dvb-apps/util/scan/dvb-t/fr-Amiens
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Amiens 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Amiens 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Amiens - France (DVB-T transmitter of Amiens ( LesSaintJust ) )
++# Amiens - France (signal DVB-T transmis depuis l'émetteur de LesSaintJust )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Amiens - LesSaintJust ####
++#R1
++T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Angers dvb-apps/util/scan/dvb-t/fr-Angers
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Angers 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Angers 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Angers - France (DVB-T transmitter of Angers ( RochefortsurLoire ) )
++# Angers - France (signal DVB-T transmis depuis l'émetteur de RochefortsurLoire )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Angers - RochefortsurLoire ####
++#R1
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Annecy dvb-apps/util/scan/dvb-t/fr-Annecy
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Annecy 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Annecy 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Annecy - France (DVB-T transmitter of Annecy ( Agglomération ) )
++# Annecy - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Annecy - Agglomération ####
++#R1
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 530000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 506000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 834000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Arcachon dvb-apps/util/scan/dvb-t/fr-Arcachon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Arcachon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Arcachon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Arcachon - France (DVB-T transmitter of Arcachon ( Agglomération ) )
++# Arcachon - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Arcachon - Agglomération ####
++#R1
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Argenton dvb-apps/util/scan/dvb-t/fr-Argenton
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Argenton 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Argenton 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Argenton - France (DVB-T transmitter of Argenton ( Malicornay ) )
++# Argenton - France (signal DVB-T transmis depuis l'émetteur de Malicornay )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Argenton - Malicornay ####
++#R1
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Aubenas dvb-apps/util/scan/dvb-t/fr-Aubenas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Aubenas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Aubenas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Aubenas - France (DVB-T transmitter of Aubenas ( Nord ) )
++# Aubenas - France (signal DVB-T transmis depuis l'émetteur de Nord )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Aubenas - Nord ####
++#R1
++T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Aurillac dvb-apps/util/scan/dvb-t/fr-Aurillac
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Aurillac 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Aurillac 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Aurillac - France (DVB-T transmitter of Aurillac ( Agglomération ) )
++# Aurillac - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Aurillac - Agglomération ####
++#R1
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Autun dvb-apps/util/scan/dvb-t/fr-Autun
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Autun 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Autun 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Autun - France (DVB-T transmitter of Autun ( BoisduRoi ) )
++# Autun - France (signal DVB-T transmis depuis l'émetteur de BoisduRoi )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Autun - BoisduRoi ####
++#R1
++T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 834000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 850000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Auxerre dvb-apps/util/scan/dvb-t/fr-Auxerre
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Auxerre 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Auxerre 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Auxerre - France (DVB-T transmitter of Auxerre ( Molesmes ) )
++# Auxerre - France (signal DVB-T transmis depuis l'émetteur de Molesmes )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Auxerre - Molesmes ####
++#R1
++T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Avignon dvb-apps/util/scan/dvb-t/fr-Avignon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Avignon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Avignon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Avignon - France (DVB-T transmitter of Avignon ( MontVentoux ) )
++# Avignon - France (signal DVB-T transmis depuis l'émetteur de MontVentoux )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Avignon - MontVentoux ####
++#R1
++T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-BarleDuc dvb-apps/util/scan/dvb-t/fr-BarleDuc
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-BarleDuc 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-BarleDuc 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# BarleDuc - France (DVB-T transmitter of BarleDuc ( Willeroncourt ) )
++# BarleDuc - France (signal DVB-T transmis depuis l'émetteur de Willeroncourt )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### BarleDuc - Willeroncourt ####
++#R1
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bastia dvb-apps/util/scan/dvb-t/fr-Bastia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bastia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Bastia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Bastia - France (DVB-T transmitter of Bastia ( SerradiPigno ) )
++# Bastia - France (signal DVB-T transmis depuis l'émetteur de SerradiPigno )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Bastia - SerradiPigno ####
++#R1
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bayonne dvb-apps/util/scan/dvb-t/fr-Bayonne
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bayonne 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Bayonne 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Bayonne - France (DVB-T transmitter of Bayonne ( LaRhune ) )
++# Bayonne - France (signal DVB-T transmis depuis l'émetteur de LaRhune )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Bayonne - LaRhune ####
++#R1
++T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bergerac dvb-apps/util/scan/dvb-t/fr-Bergerac
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bergerac 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Bergerac 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Bergerac - France (DVB-T transmitter of Bergerac ( Audrix ) )
++# Bergerac - France (signal DVB-T transmis depuis l'émetteur de Audrix )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Bergerac - Audrix ####
++#R1
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Besançon dvb-apps/util/scan/dvb-t/fr-Besançon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Besançon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Besançon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Besançon - France (DVB-T transmitter of Besançon ( Brégille ) )
++# Besançon - France (signal DVB-T transmis depuis l'émetteur de Brégille )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Besançon - Brégille ####
++#R1
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux dvb-apps/util/scan/dvb-t/fr-Bordeaux
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Bordeaux 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# Bordeaux - France (DVB-T transmitter of Bouliac or Cauderan)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux-Bouliac dvb-apps/util/scan/dvb-t/fr-Bordeaux-Bouliac
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux-Bouliac 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Bordeaux-Bouliac 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Bordeaux - France (DVB-T transmitter of Bordeaux ( BordeauxEst ) )
++# Bordeaux - France (signal DVB-T transmis depuis l'émetteur de BordeauxEst )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Bordeaux - BordeauxEst ####
++#R1
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux-Cauderan dvb-apps/util/scan/dvb-t/fr-Bordeaux-Cauderan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bordeaux-Cauderan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Bordeaux-Cauderan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Bordeaux - France (DVB-T transmitter of Bordeaux ( Caudéran ) )
++# Bordeaux - France (signal DVB-T transmis depuis l'émetteur de Caudéran )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Bordeaux - Caudéran ####
++#R1
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Boulogne dvb-apps/util/scan/dvb-t/fr-Boulogne
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Boulogne 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Boulogne 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Boulogne - France (DVB-T transmitter of Boulogne ( MontLambert ) )
++# Boulogne - France (signal DVB-T transmis depuis l'émetteur de MontLambert )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Boulogne - MontLambert ####
++#R1
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bourges dvb-apps/util/scan/dvb-t/fr-Bourges
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Bourges 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Bourges 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Bourges - France (DVB-T transmitter of Bourges ( CollinesduSancerrois ) )
++# Bourges - France (signal DVB-T transmis depuis l'émetteur de CollinesduSancerrois )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Bourges - CollinesduSancerrois ####
++#R1
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Brest dvb-apps/util/scan/dvb-t/fr-Brest
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Brest 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Brest 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# Brest - France
++# Emetteur du Roch Tredudon
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 482000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 506000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 490000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 530000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 514000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Brive dvb-apps/util/scan/dvb-t/fr-Brive
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Brive 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Brive 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Brive - France (DVB-T transmitter of Brive ( Lissac ) )
++# Brive - France (signal DVB-T transmis depuis l'émetteur de Lissac )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Brive - Lissac ####
++#R1
++T 530000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Caen dvb-apps/util/scan/dvb-t/fr-Caen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Caen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Caen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Caen - France (DVB-T transmitter of Caen ( CaenNord ) )
++# Caen - France (signal DVB-T transmis depuis l'émetteur de CaenNord )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Caen - CaenNord ####
++#R1
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Caen-Pincon dvb-apps/util/scan/dvb-t/fr-Caen-Pincon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Caen-Pincon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Caen-Pincon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Caen - France (DVB-T transmitter of Caen ( MontPinçon ) )
++# Caen - France (signal DVB-T transmis depuis l'émetteur de MontPinçon )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Caen - MontPinçon ####
++#R1
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cannes dvb-apps/util/scan/dvb-t/fr-Cannes
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cannes 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Cannes 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Cannes - France (DVB-T transmitter of Cannes ( Vallauris ) )
++# Cannes - France (signal DVB-T transmis depuis l'émetteur de Vallauris )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Cannes - Vallauris ####
++#R1
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Carcassonne dvb-apps/util/scan/dvb-t/fr-Carcassonne
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Carcassonne 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Carcassonne 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Carcassonne - France (DVB-T transmitter of Carcassonne ( MontagneNoire ) )
++# Carcassonne - France (signal DVB-T transmis depuis l'émetteur de MontagneNoire )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Carcassonne - MontagneNoire ####
++#R1
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chambery dvb-apps/util/scan/dvb-t/fr-Chambery
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chambery 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Chambery 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Chambéry - France (DVB-T transmitter of Chambéry ( Nondéfini ) )
++# Chambéry - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Chambéry - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Chambéry n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chartres dvb-apps/util/scan/dvb-t/fr-Chartres
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chartres 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Chartres 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Chartres - France (DVB-T transmitter of Chartres ( Montlandon ) )
++# Chartres - France (signal DVB-T transmis depuis l'émetteur de Montlandon )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Chartres - Montlandon ####
++#R1
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chennevieres dvb-apps/util/scan/dvb-t/fr-Chennevieres
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Chennevieres 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Chennevieres 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# ParisEst - France (DVB-T transmitter of ParisEst ( Chennevières ) )
++# ParisEst - France (signal DVB-T transmis depuis l'émetteur de Chennevières )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### ParisEst - Chennevières ####
++#R1
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cherbourg dvb-apps/util/scan/dvb-t/fr-Cherbourg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cherbourg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Cherbourg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Cherbourg - France (DVB-T transmitter of Cherbourg ( Digosville ) )
++# Cherbourg - France (signal DVB-T transmis depuis l'émetteur de Digosville )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Cherbourg - Digosville ####
++#R1
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-ClermontFerrand dvb-apps/util/scan/dvb-t/fr-ClermontFerrand
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-ClermontFerrand 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-ClermontFerrand 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Clermont-Ferrand - France (DVB-T transmitter of Clermont-Ferrand ( PuydeDôme ) )
++# Clermont-Ferrand - France (signal DVB-T transmis depuis l'émetteur de PuydeDôme )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Clermont-Ferrand - PuydeDôme ####
++#R1
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cluses dvb-apps/util/scan/dvb-t/fr-Cluses
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Cluses 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Cluses 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,23 @@
++# Cluses - France (DVB-T transmitter of Cluses ( St Sigismond ) )
++# Cluses - France (signal DVB-T transmis depuis l'émetteur de St Sigismond )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Cluses - Nondéfini ####
++#R1
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dieppe dvb-apps/util/scan/dvb-t/fr-Dieppe
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dieppe 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Dieppe 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Dieppe - France (DVB-T transmitter of Dieppe ( Neuville ) )
++# Dieppe - France (signal DVB-T transmis depuis l'émetteur de Neuville )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Dieppe - Neuville ####
++#R1
++T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dijon dvb-apps/util/scan/dvb-t/fr-Dijon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dijon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Dijon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,28 @@
++# Dijon - France (DVB-T transmitter of Dijon ( Nuit Saint Georges ) )
++# Dijon - France (signal DVB-T transmis depuis l'émetteur de Nuit Saint Georges )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# Fichier mis à jour par Maxence Antonczyk <maxantz@yahoo.fr>
++# le Dimanche 7 Septembre 2008, à 13h00
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Dijon - Nuit Saint Georges ####
++#R1 (France 2,France 3,France 5,Arte,LCP/Public Sénat, Chaîne Locale)
++T 506000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2 (I-Télé,BFM TV,Direct 8,Gulli,Virgin 17,France 4)
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3 (Canal+,Canal+ Cinéma,Canal+ Sport,Planète,Canal J,TPS Star)
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4 (M6,W9,NT1,TF6,Paris Première, AB1)
++T 834000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6 (TF1,TNC,NRJ 12,LCI,Eurosport France)
++T 530000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dunkerque dvb-apps/util/scan/dvb-t/fr-Dunkerque
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Dunkerque 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Dunkerque 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Dunkerque - France (DVB-T transmitter of Dunkerque ( Nondéfini ) )
++# Dunkerque - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Dunkerque - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Dunkerque n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Epinal dvb-apps/util/scan/dvb-t/fr-Epinal
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Epinal 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Epinal 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Epinal - France (DVB-T transmitter of Epinal ( BoisdelaVierge ) )
++# Epinal - France (signal DVB-T transmis depuis l'émetteur de BoisdelaVierge )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Epinal - BoisdelaVierge ####
++#R1
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Evreux dvb-apps/util/scan/dvb-t/fr-Evreux
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Evreux 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Evreux 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Evreux - France (DVB-T transmitter of Evreux ( Netreville ) )
++# Evreux - France (signal DVB-T transmis depuis l'émetteur de Netreville )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Evreux - Netreville ####
++#R1
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Forbach dvb-apps/util/scan/dvb-t/fr-Forbach
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Forbach 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Forbach 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Forbach - France (DVB-T transmitter of Forbach ( Nondéfini ) )
++# Forbach - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Forbach - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Forbach n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Gex dvb-apps/util/scan/dvb-t/fr-Gex
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Gex 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Gex 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Gex - France (DVB-T transmitter of Gex ( Nondéfini ) )
++# Gex - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Gex - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Gex n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Grenoble dvb-apps/util/scan/dvb-t/fr-Grenoble
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Grenoble 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Grenoble 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Grenoble - France (DVB-T transmitter of Grenoble ( ToursansVenin ) )
++# Grenoble - France (signal DVB-T transmis depuis l'émetteur de ToursansVenin )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Grenoble - ToursansVenin ####
++#R1
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 474000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Gueret dvb-apps/util/scan/dvb-t/fr-Gueret
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Gueret 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Gueret 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Guéret - France (DVB-T transmitter of Guéret ( StLégerleGueretois ) )
++# Guéret - France (signal DVB-T transmis depuis l'émetteur de StLégerleGueretois )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Guéret - StLégerleGueretois ####
++#R1
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Hirson dvb-apps/util/scan/dvb-t/fr-Hirson
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Hirson 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Hirson 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Hirson - France (DVB-T transmitter of Hirson ( Nondéfini ) )
++# Hirson - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Hirson - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Hirson n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Hyeres dvb-apps/util/scan/dvb-t/fr-Hyeres
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Hyeres 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Hyeres 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Hyères - France (DVB-T transmitter of Hyères ( CapBenat ) )
++# Hyères - France (signal DVB-T transmis depuis l'émetteur de CapBenat )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Hyères - CapBenat ####
++#R1
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LaRochelle dvb-apps/util/scan/dvb-t/fr-LaRochelle
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LaRochelle 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-LaRochelle 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Rochelle(La) - France (DVB-T transmitter of Rochelle(La) ( Mireuil ) )
++# Rochelle(La) - France (signal DVB-T transmis depuis l'émetteur de Mireuil )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Rochelle(La) - Mireuil ####
++#R1
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Laval dvb-apps/util/scan/dvb-t/fr-Laval
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Laval 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Laval 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Laval - France (DVB-T transmitter of Laval ( MontRochard ) )
++# Laval - France (signal DVB-T transmis depuis l'émetteur de MontRochard )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Laval - MontRochard ####
++#R1
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeCreusot dvb-apps/util/scan/dvb-t/fr-LeCreusot
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeCreusot 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-LeCreusot 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Creusot(Le) - France (DVB-T transmitter of Creusot(Le) ( MontStVincent ) )
++# Creusot(Le) - France (signal DVB-T transmis depuis l'émetteur de MontStVincent )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Creusot(Le) - MontStVincent ####
++#R1
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 818000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeHavre dvb-apps/util/scan/dvb-t/fr-LeHavre
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeHavre 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-LeHavre 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Havre(Le) - France (DVB-T transmitter of Havre(Le) ( Harfleur ) )
++# Havre(Le) - France (signal DVB-T transmis depuis l'émetteur de Harfleur )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Havre(Le) - Harfleur ####
++#R1
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeMans dvb-apps/util/scan/dvb-t/fr-LeMans
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LeMans 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-LeMans 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,21 @@
++# Le Mans - France (DVB-T transmitter of Mayet)
++# Le Mans - France (signal DVB-T transmis depuis l'émetteur de Mayet )
++# Pour plus d'informations vous pouvez consulter :
++# - le topic sur l'émetteur de Mayet sur le forum du site tvnt.net :
++# http://www.tvnt.net/forum/viewtopic.php?t=48
++# - le site de TDF : http://tnt.niv2.com/72100-LE-MANS.html
++# contact : Matthieu Duchemin <alkahan@free.fr>
++
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# R1 : Canal 26
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R2 : Canal 23
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R3 : Canal 56
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R4 : Canal 31
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R5 : Canal 37
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R6 : Canal 36
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LePuyEnVelay dvb-apps/util/scan/dvb-t/fr-LePuyEnVelay
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LePuyEnVelay 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-LePuyEnVelay 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# PuyenVelay(Le) - France (DVB-T transmitter of PuyenVelay(Le) ( Agglomération ) )
++# PuyenVelay(Le) - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### PuyenVelay(Le) - Agglomération ####
++#R1
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lille dvb-apps/util/scan/dvb-t/fr-Lille
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lille 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Lille 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Lille - France (DVB-T transmitter of Lille ( Nondéfini ) )
++# Lille - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Lille - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Lille n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lille-Lambersart dvb-apps/util/scan/dvb-t/fr-Lille-Lambersart
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lille-Lambersart 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Lille-Lambersart 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Lille - France (DVB-T transmitter of Lille ( Lambersart ) )
++# Lille - France (signal DVB-T transmis depuis l'émetteur de Lambersart )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Lille - Lambersart ####
++#R1
++T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LilleT2 dvb-apps/util/scan/dvb-t/fr-LilleT2
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-LilleT2 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-LilleT2 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# Lille - France (DVB-T transmitter of Lambersart)
++#offset of 167000 for Cinergy T2. Other type of card users need to replace 167 by 000
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#R2
++T 538167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R4
++T 546167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R3
++T 562167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R6
++T 586167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R1
++T 594167000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Limoges dvb-apps/util/scan/dvb-t/fr-Limoges
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Limoges 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Limoges 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Limoges - France (DVB-T transmitter of Limoges ( Agglomération ) )
++# Limoges - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Limoges - Agglomération ####
++#R1
++T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Longwy dvb-apps/util/scan/dvb-t/fr-Longwy
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Longwy 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Longwy 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Longwy - France (DVB-T transmitter of Longwy ( Nondéfini ) )
++# Longwy - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Longwy - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Longwy n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lorient dvb-apps/util/scan/dvb-t/fr-Lorient
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lorient 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Lorient 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Lorient - France (DVB-T transmitter of Lorient ( Ploemer ) )
++# Lorient - France (signal DVB-T transmis depuis l'émetteur de Ploemer )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Lorient - Ploemer ####
++#R1
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 818000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lyon-Fourviere dvb-apps/util/scan/dvb-t/fr-Lyon-Fourviere
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lyon-Fourviere 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Lyon-Fourviere 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# Lyon - France (DVB-T transmitter of Fourvière)
++# Lyon - France (signal DVB-T transmis depuis l'émetteur de Fourvière)
++# see : http://tnt.niv2.com/69000-LYON.html
++# contact : Nicolas Estre <n_estre@yahoo.fr>
++
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# R1 : Canal 56
++T 754167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R2 : Canal 36
++T 594167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R3 : Canal 21
++T 474167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R4 : Canal 54
++T 738167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R5 : Canal 27
++T 522167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R6 : Canal 24
++T 498167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lyon-Pilat dvb-apps/util/scan/dvb-t/fr-Lyon-Pilat
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Lyon-Pilat 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Lyon-Pilat 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,17 @@
++# Lyon - France (DVB-T transmitter of Mt Pilat)
++# Lyon - France (signal DVB-T transmis depuis l'émetteur du Mont Pilat)
++# see : http://tnt.niv2.com/69000-LYON.html
++# contact : Nicolas Estre <n_estre@yahoo.fr>
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# R1 : Canal 45
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R2 : Canal 36
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R3 : Canal 39
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R4 : Canal 54
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R5 : Canal 42
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# R6 : Canal 47
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Macon dvb-apps/util/scan/dvb-t/fr-Macon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Macon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Macon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Mâcon - France (DVB-T transmitter of Mâcon ( Nondéfini ) )
++# Mâcon - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Mâcon - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Mâcon n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mantes dvb-apps/util/scan/dvb-t/fr-Mantes
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mantes 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Mantes 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Mantes - France (DVB-T transmitter of Mantes ( MaudétourenVexin ) )
++# Mantes - France (signal DVB-T transmis depuis l'émetteur de MaudétourenVexin )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Mantes - MaudétourenVexin ####
++#R1
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 650000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 674000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 626000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Marseille dvb-apps/util/scan/dvb-t/fr-Marseille
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Marseille 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Marseille 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Maubeuge dvb-apps/util/scan/dvb-t/fr-Maubeuge
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Maubeuge 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Maubeuge 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Maubeuge - France (DVB-T transmitter of Maubeuge ( Nondéfini ) )
++# Maubeuge - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Maubeuge - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Maubeuge n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Meaux dvb-apps/util/scan/dvb-t/fr-Meaux
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Meaux 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Meaux 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Meaux - France (DVB-T transmitter of Meaux ( Mareuil ) )
++# Meaux - France (signal DVB-T transmis depuis l'émetteur de Mareuil )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Meaux - Mareuil ####
++#R1
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 818000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mende dvb-apps/util/scan/dvb-t/fr-Mende
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mende 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Mende 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Mende - France (DVB-T transmitter of Mende ( TrucdeFortunio ) )
++# Mende - France (signal DVB-T transmis depuis l'émetteur de TrucdeFortunio )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Mende - TrucdeFortunio ####
++#R1
++T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 474000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Menton dvb-apps/util/scan/dvb-t/fr-Menton
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Menton 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Menton 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Menton - France (DVB-T transmitter of Menton ( CapMartin ) )
++# Menton - France (signal DVB-T transmis depuis l'émetteur de CapMartin )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Menton - CapMartin ####
++#R1
++T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 842000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Metz dvb-apps/util/scan/dvb-t/fr-Metz
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Metz 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Metz 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Metz - France (DVB-T transmitter of Metz ( Nondéfini ) )
++# Metz - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Metz - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Metz n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mezieres dvb-apps/util/scan/dvb-t/fr-Mezieres
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mezieres 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Mezieres 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Mézières - France (DVB-T transmitter of Mézières ( Nondéfini ) )
++# Mézières - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Mézières - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Mézières n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montbeliard dvb-apps/util/scan/dvb-t/fr-Montbeliard
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montbeliard 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Montbeliard 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# Montbéliard - France (DVB-T transmitter of Montbéliard "Fort Lachaux" )
++# Montbéliard - France (signal DVB-T transmis depuis l'émetteur de Fort Lachaux )
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# multiplex R1 (GR1), canal 29V + offset 167000 : FRANCE 2 SD , FRANCE 5 , ARTE SD , La Chaîne Parlementaire/Public Sénat , FRANCE 3 , FRANCE 3 Franche-Comté
++T 538167000 8MHz AUTO NONE QAM64 8k AUTO NONE
++# multiplex R3 (CNH), canal 43V + offset 167000 : CANAL+ , CANAL+HD , CANAL+ CINEMA , CANAL+ SPORT , PLANETE , CANAL J et TPS STAR
++T 650167000 8MHz AUTO NONE QAM64 8k AUTO NONE
++# multiplex R2 (NTN), canal 55V + offset 167000 : DIRECT 8 , BFM TV , I>TELE , FRANCE 4 , VIRGIN 17 , GULLI et France 4
++T 746167000 8MHz AUTO NONE QAM64 8k AUTO NONE
++# multiplex R6 (SMR6), canal 32V + offset 167000 : TF1 SD , NRJ 12 , TMC , EUROSPORT , LCI et TF6
++T 562167000 8MHz AUTO NONE QAM64 8k AUTO NONE
++# Télévision Suisse, canal 56V + offset 000000 : TSR1 , TSR2 , TSI1 et SF 1
++T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++# multiplex R4 (MULTI4), canal 58V + offset 167000 : ARTE HD , PARIS PREMIERE, M6 SD , W9 , NT1
++T 770167000 8MHz AUTO NONE QAM64 8k AUTO NONE
++# multiplex R5 (???), canal ??? : TF1 HD , FRANCE 2 HD, M6 HD
++# canal d'émission pas encore défini (février 2009)
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montlucon dvb-apps/util/scan/dvb-t/fr-Montlucon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montlucon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Montlucon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Montluçon - France (DVB-T transmitter of Montluçon ( Agglomération ) )
++# Montluçon - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Montluçon - Agglomération ####
++#R1
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montpellier dvb-apps/util/scan/dvb-t/fr-Montpellier
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Montpellier 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Montpellier 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Montpellier - France (DVB-T transmitter of Montpellier ( SaintBaudille ) )
++# Montpellier - France (signal DVB-T transmis depuis l'émetteur de SaintBaudille )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Montpellier - SaintBaudille ####
++#R1
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mulhouse dvb-apps/util/scan/dvb-t/fr-Mulhouse
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Mulhouse 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Mulhouse 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,26 @@
++# Mulhouse - France (DVB-T transmitter of Mulhouse ( Belvédère ) )
++# Mulhouse - France (signal DVB-T transmis depuis l'émetteur du Belvédère )
++#
++# Fichier réalisé par :
++# IUT COLMAR DEPARTEMENT RESEAUX ET TELECOMMUNICATIONS
++# Novembre 2007
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++# R1 - ch 53 : France 2, 3 (Alsace), 5, LCP et Arte (France)
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++
++# R2 - ch 55 : I-TELE, BFM TV, Direct 8, Gulli, Virgin 17 (ex-Europe 2 TV) et France 4
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++
++# R3 - ch 54 : TV payante : CANAL+, CANAL+ CINEMA, CANAL+ SPORT, PLANETE, CANAL J et TPS STAR
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++
++# R4 - ch 37 : M6, W9 et NT1 + TV payante : PARIS PREMIERE, TF6 et AB1
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++
++# R5
++# ch 66, candidat a la TVHD
++
++# R6 - ch 65 : TF 1, NRJ 12 et TMC + TV payante : Eurosport France et LCI
++T 826000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nancy dvb-apps/util/scan/dvb-t/fr-Nancy
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nancy 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Nancy 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Nancy - France (DVB-T transmitter of Nancy ( Nondéfini ) )
++# Nancy - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Nancy - Nondéfini ####
++#R1
++T 522166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R2
++T 682166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R3
++T 794166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R4
++T 770166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R5
++T 498166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R6
++T 826166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nantes dvb-apps/util/scan/dvb-t/fr-Nantes
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nantes 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Nantes 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Nantes - France
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-NeufchatelEnBray dvb-apps/util/scan/dvb-t/fr-NeufchatelEnBray
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-NeufchatelEnBray 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-NeufchatelEnBray 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Neufchatel-en-Bray - France (DVB-T transmitter of Neufchatel-en-Bray ( Croixdalle ) )
++# Neufchatel-en-Bray - France (signal DVB-T transmis depuis l'émetteur de Croixdalle )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Neufchatel-en-Bray - Croixdalle ####
++#R1
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nice dvb-apps/util/scan/dvb-t/fr-Nice
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Nice 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Nice 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Nice - France (DVB-T transmitter of Nice ( MontAlban ) )
++# Nice - France (signal DVB-T transmis depuis l'émetteur de MontAlban )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Nice - MontAlban ####
++#R1
++T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Niort dvb-apps/util/scan/dvb-t/fr-Niort
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Niort 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Niort 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Niort - France (DVB-T transmitter of Niort-Maisonnay)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 602000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 738000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 778000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 802000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Orleans dvb-apps/util/scan/dvb-t/fr-Orleans
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Orleans 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Orleans 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,17 @@
++# Orléans / France
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#
++# R2: canal 38 : direct8 TMC Gulli europe2 bfm itélé
++T 610166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# R1: canal 46 : F2 F3 F4 F5 arte LCP
++T 674166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# R4: canal 48 : M6 W9 NT1
++T 690166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# R6: canal 51 : TF1 NRJ12
++T 714166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# R3: canal 63 : canalplus
++T 810166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Paris dvb-apps/util/scan/dvb-t/fr-Paris
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Paris 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Paris 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++# Paris - France - various DVB-T transmitters
++# contributed by Alexis de Lattre <alexis@via.ecp.fr>
++# Paris - Tour Eiffel : 21 24 27 29 32 35
++# Paris Est - Chennevières : 35 51 54 57 60 63
++# Paris Nord - Sannois : 35 51 54 57 60 63
++# Paris Sud - Villebon : 35 51 56 57 60 63
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 498166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 522166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 538166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 562166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 586166000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
++T 714166000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
++T 738166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 754166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 762166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 786166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 810166000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Parthenay dvb-apps/util/scan/dvb-t/fr-Parthenay
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Parthenay 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Parthenay 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Parthenay - France (DVB-T transmitter of Parthenay ( Amailloux ) )
++# Parthenay - France (signal DVB-T transmis depuis l'émetteur de Amailloux )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Parthenay - Amailloux ####
++#R1
++T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Perpignan dvb-apps/util/scan/dvb-t/fr-Perpignan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Perpignan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Perpignan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Perpignan - France (DVB-T transmitter of Perpignan ( PicdeNeulos ) )
++# Perpignan - France (signal DVB-T transmis depuis l'émetteur de PicdeNeulos )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Perpignan - PicdeNeulos ####
++#R1
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 474000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Poitiers dvb-apps/util/scan/dvb-t/fr-Poitiers
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Poitiers 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Poitiers 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Poitiers - France (DVB-T transmitter of Poitiers ( Agglomération ) )
++# Poitiers - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Poitiers - Agglomération ####
++#R1
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Privas dvb-apps/util/scan/dvb-t/fr-Privas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Privas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Privas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Privas - France (DVB-T transmitter of Privas ( Sud ) )
++# Privas - France (signal DVB-T transmis depuis l'émetteur de Sud )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Privas - Sud ####
++#R1
++T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Reims dvb-apps/util/scan/dvb-t/fr-Reims
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Reims 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Reims 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Reims - France (DVB-T transmitter of Reims ( Hautvillers ) )
++# Reims - France (signal DVB-T transmis depuis l'émetteur de Hautvillers )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Reims - Hautvillers ####
++#R1
++T 562000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 554000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Rennes dvb-apps/util/scan/dvb-t/fr-Rennes
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Rennes 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Rennes 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Rennes - France
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 586000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 650000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 674000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
++T 626000000 8MHz 1/2 NONE QAM16 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Roanne dvb-apps/util/scan/dvb-t/fr-Roanne
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Roanne 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Roanne 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Roanne - France (DVB-T transmitter of Roanne ( Perreux ) )
++# Roanne - France (signal DVB-T transmis depuis l'émetteur de Perreux )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Roanne - Perreux ####
++#R1
++T 474000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 498000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 522000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Rouen dvb-apps/util/scan/dvb-t/fr-Rouen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Rouen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Rouen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Rouen - France
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-SaintEtienne dvb-apps/util/scan/dvb-t/fr-SaintEtienne
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-SaintEtienne 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-SaintEtienne 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Saint-Etienne - France (DVB-T transmitter of Saint-Etienne ( CroixduGuisay ) )
++# Saint-Etienne - France (signal DVB-T transmis depuis l'émetteur de CroixduGuisay )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Saint-Etienne - CroixduGuisay ####
++#R1
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 618000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 538000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-SaintRaphael dvb-apps/util/scan/dvb-t/fr-SaintRaphael
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-SaintRaphael 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-SaintRaphael 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Saint-Raphaël - France (DVB-T transmitter of Saint-Raphaël ( Picdel'Ours ) )
++# Saint-Raphaël - France (signal DVB-T transmis depuis l'émetteur de Picdel'Ours )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Saint-Raphaël - Picdel'Ours ####
++#R1
++T 490000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sannois dvb-apps/util/scan/dvb-t/fr-Sannois
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sannois 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Sannois 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# ParisNord - France (DVB-T transmitter of ParisNord ( Sannois ) )
++# ParisNord - France (signal DVB-T transmis depuis l'émetteur de Sannois )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### ParisNord - Sannois ####
++#R1
++T 586000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 786000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 762000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sarrebourg dvb-apps/util/scan/dvb-t/fr-Sarrebourg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sarrebourg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Sarrebourg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Sarrebourg - France (DVB-T transmitter of Sarrebourg ( Nondéfini ) )
++# Sarrebourg - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Sarrebourg - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Sarrebourg n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sens dvb-apps/util/scan/dvb-t/fr-Sens
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Sens 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Sens 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Sens - France (DVB-T transmitter of Sens ( GisylesNobles ) )
++# Sens - France (signal DVB-T transmis depuis l'émetteur de GisylesNobles )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Sens - GisylesNobles ####
++#R1
++T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 794000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 770000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Strasbourg dvb-apps/util/scan/dvb-t/fr-Strasbourg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Strasbourg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Strasbourg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# Strasbourg - France (DVB-T transmitter of Strasbourg (Nordheim))
++# contributed by Benjamin Zores <ben@geexbox.org>
++#
++# Strasbourg - Nordheim: 22 47 48 51 61 69
++# See http://www.tvnt.net/V2/pages/342/medias/pro-bo-doc-tk-frequences_tnt.pdf
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 570000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
++T 618000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 722000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
++T 786000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulon dvb-apps/util/scan/dvb-t/fr-Toulon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Toulon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Toulon - France (DVB-T transmitter of Toulon ( CapSicié ) )
++# Toulon - France (signal DVB-T transmis depuis l'émetteur de CapSicié )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Toulon - CapSicié ####
++#R1
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 730000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulouse dvb-apps/util/scan/dvb-t/fr-Toulouse
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulouse 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Toulouse 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Toulouse - France (DVB-T transmitter of Bohnoure)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 698167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 722167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 714167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 746167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 730167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulouse-Midi dvb-apps/util/scan/dvb-t/fr-Toulouse-Midi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Toulouse-Midi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Toulouse-Midi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Toulouse - France (DVB-T transmitter of Toulouse ( PicduMidi ) )
++# Toulouse - France (signal DVB-T transmis depuis l'émetteur de PicduMidi )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Toulouse - PicduMidi ####
++#R1
++T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Tours dvb-apps/util/scan/dvb-t/fr-Tours
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Tours 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Tours 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Tours - France (DVB-T transmitter of Tours ( Chissay ) )
++# Tours - France (signal DVB-T transmis depuis l'émetteur de Chissay )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Tours - Chissay ####
++#R1
++T 578000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 610000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 810000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Troyes dvb-apps/util/scan/dvb-t/fr-Troyes
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Troyes 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Troyes 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Troyes - France (DVB-T transmitter of Troyes ( LesRiceys ) )
++# Troyes - France (signal DVB-T transmis depuis l'émetteur de LesRiceys )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Troyes - LesRiceys ####
++#R1
++T 482000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 594000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 506000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 530000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ussel dvb-apps/util/scan/dvb-t/fr-Ussel
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Ussel 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Ussel 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Ussel - France (DVB-T transmitter of Ussel ( Meymac ) )
++# Ussel - France (signal DVB-T transmis depuis l'émetteur de Meymac )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Ussel - Meymac ####
++#R1
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 634000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 658000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Valence dvb-apps/util/scan/dvb-t/fr-Valence
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Valence 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Valence 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Valence - France (DVB-T transmitter of Valence ( StRomaindeLerps ) )
++# Valence - France (signal DVB-T transmis depuis l'émetteur de StRomaindeLerps )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Valence - StRomaindeLerps ####
++#R1
++T 706000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++T 722000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++T 746000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++T 546000000 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++T 570000000 8MHz AUTO NONE QAM64 8k AUTO NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Valenciennes dvb-apps/util/scan/dvb-t/fr-Valenciennes
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Valenciennes 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Valenciennes 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Valenciennes - France (DVB-T transmitter of Valenciennes ( Nondéfini ) )
++# Valenciennes - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Valenciennes - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Valenciennes n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Vannes dvb-apps/util/scan/dvb-t/fr-Vannes
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Vannes 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Vannes 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Vannes / France
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 698167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 762167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 778167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 818167000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Villebon dvb-apps/util/scan/dvb-t/fr-Villebon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Villebon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Villebon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,22 @@
++# Paris - France (DVB-T transmitter of Villebon )
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++# Villebon - France (DVB-T transmitter of Villebon (South of Paris))
++# Villebon - France (signal DVB-T transmis depuis l'émetteur de Villebon (Sud de Paris))
++# see : http://tnt.niv2.com/91140-VILLEBON-SUR-YVETTE.html
++# contact : Nicolas Estre <n_estre@yahoo.fr>
++
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### VILLEBON SUR YVETTE ####
++#R1 35
++T 586000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
++#R2 56
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R3 60
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R4 63
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R5 51
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#R6 57
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Vittel dvb-apps/util/scan/dvb-t/fr-Vittel
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Vittel 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Vittel 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Vittel - France (DVB-T transmitter of Vittel ( Nondéfini ) )
++# Vittel - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Vittel - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Vittel n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Voiron dvb-apps/util/scan/dvb-t/fr-Voiron
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/fr-Voiron 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/fr-Voiron 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,30 @@
++# Voiron - France (DVB-T transmitter of Voiron ( Nondéfini ) )
++# Voiron - France (signal DVB-T transmis depuis l'émetteur de Nondéfini )
++#
++# ATTENTION ! Ce fichier a ete construit automatiquement a partir
++# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
++# en Avril 2006. Si vous constatez des problemes et voulez apporter des
++# modifications au fichier, envoyez le fichier modifie a
++# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
++# ou a l'auteur du fichier :
++# Nicolas Estre <n_estre@yahoo.fr>
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#### Voiron - Nondéfini ####
++#R1
++#T FREQ1 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R2
++#T FREQ2 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R3
++#T FREQ3 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R4
++#T FREQ4 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R5
++#T FREQ5 8MHz AUTO NONE QAM64 8k AUTO NONE
++#R6
++#T FREQ6 8MHz AUTO NONE QAM64 8k AUTO NONE
++##############################################################
++# en Avril 2006, l'emetteur pour Voiron n'etait pas defini
++# Vous devez donc modifier les frequences manuellement.
++# SVP Renvoyez le fichier mis a jour aux contacts ci-dessus.
++##############################################################
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/gr-Athens dvb-apps/util/scan/dvb-t/gr-Athens
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/gr-Athens 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/gr-Athens 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Initial scan config for Digital DVB-T (Ert) in Athens Greece
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 690000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/hk-HongKong dvb-apps/util/scan/dvb-t/hk-HongKong
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/hk-HongKong 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/hk-HongKong 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# Hong Kong (DMB-TH)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++# TVB (band 35)
++T 586000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
++# ATV (band 37)
++T 602000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
++
++# Simulcast (band 22)
++T 482000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
++# Simulcast (band 30)
++T 546000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
++# Simulcast (band 32)
++T 562000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
++# Simulcast (band 40)
++T 628000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
++# Simulcast (band 43)
++T 650000000 8MHz AUTO NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/hr-Zagreb dvb-apps/util/scan/dvb-t/hr-Zagreb
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/hr-Zagreb 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/hr-Zagreb 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# DVB-T Hamburg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 3/4 NONE AUTO 8k 1/32 NONE # CH27:
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/is-Reykjavik dvb-apps/util/scan/dvb-t/is-Reykjavik
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/is-Reykjavik 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/is-Reykjavik 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# Initial scan config for Digital Ãsland in Iceland
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Aosta dvb-apps/util/scan/dvb-t/it-Aosta
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Aosta 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Aosta 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,21 @@
++# Italia / Aosta (it-Aosta) -- mailto: Marco <lovebuzz@email.it>
++#
++# A me funziona solo il Mux Mediaset 2 non riesco a capire come mai...
++# (magari colpa della mia pinnacle pctv 301i saa7133)
++# Gli altri Mux inseriti li ho inseriti come da sito http://www.digitv.it...
++#
++# Chi avesse news o riuscisse a venirne a capo usando anche gli altri mux potrebbe scrivermi
++# inviare una maila kaffeine-user@lists.sf.net per aggiornare/correggere questo file...
++#
++# MUX-A RAI
++T 226500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 1
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MBONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 2
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# TIMB1
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bari dvb-apps/util/scan/dvb-t/it-Bari
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bari 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Bari 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# Italy, Bari
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX-A RAI
++T 219500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-B RAI
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 1
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE
++T 226500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 2
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MBONE
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# TIMB1
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# TeleNorba, TelePuglia, altro...
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bologna dvb-apps/util/scan/dvb-t/it-Bologna
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bologna 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Bologna 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,28 @@
++# DVB-T Collserola (Barcelona)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#TeleSanterno
++T 186000000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++#RaiA
++T 203500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++#Sestarete / Rete 7
++T 212500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++#Modena
++T 219500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++#ReteA, Camera e Senato
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#Sestarete / Rete 7
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#DFree
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#Mediaset Mux-B
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#La7
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#RaiB
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#Mediaset Mux-A
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#TeleSanterno
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#LA7-2
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bolzano dvb-apps/util/scan/dvb-t/it-Bolzano
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Bolzano 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Bolzano 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# DVB-T Bolzano
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++#RAS DVB-t NETWORK
++T 698000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Cagliari dvb-apps/util/scan/dvb-t/it-Cagliari
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Cagliari 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Cagliari 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,23 @@
++# DVB-T Cagliari
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 205500000 7MHz 3/4 NONE QAM64 8k 1/32 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 514000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 562000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 642000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 674000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 722000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 730000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 762000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Caivano dvb-apps/util/scan/dvb-t/it-Caivano
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Caivano 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Caivano 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,17 @@
++# DVB-T Caivano (Naples) 80023
++# 30/10/2008 by Nicola Costanzo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 1
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 2
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX LA7/MTV
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# TIMB1
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-A RAI
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Catania dvb-apps/util/scan/dvb-t/it-Catania
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Catania 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Catania 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,27 @@
++# it-Catania
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++# MUX DFREE (Canale 5,Italia1,SportItalia,LCI,RadioItalia Tv)
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX LA7/MTV (La 7,MTV ITALIA,Canale D,Music Box)
++#T 586000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX RTI (Rete 4,Class News,Sole 24 Ore TV,BBC World)
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX MEDIASET 1
++T 226500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX MEDIASET 2
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX-A RAI (Rai Utile,Rai Doc,RaiSportSAT,RaiNews24,Rai EDU1)
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX-B RAI (Rai Utile,Rai Doc,RaiSportSAT,RaiNews24,Rai EDU1)
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Conero dvb-apps/util/scan/dvb-t/it-Conero
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Conero 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Conero 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Italia / Conero (it-Conero) -- mailto: simon <f.simon@email.it>
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# C50
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C46
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C21
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Firenze dvb-apps/util/scan/dvb-t/it-Firenze
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Firenze 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Firenze 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,20 @@
++# This channel list is made by Michele Ficarra
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX-A RAI
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-B RAI
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 1
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 2
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX La7/MTV
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MBON
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX Digitoscana
++T 219500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX Tele37
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Genova dvb-apps/util/scan/dvb-t/it-Genova
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Genova 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Genova 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# Italia / Genova (it-Genova) - Angelo Conforti <angeloxx@angeloxx.it>
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX-A RAI
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-B RAI
++T 219500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX La7/MTV
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX Mediaset
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Livorno dvb-apps/util/scan/dvb-t/it-Livorno
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Livorno 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Livorno 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,15 @@
++# This channel list is made by G.U.L.LI. LIvorno's Linux Users Group
++# Thanks to: Alessandro Guarguaglini, Stefano Lenzi
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX-A RAI
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-B RAI
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 1
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 2
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX La7/MTV
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Milano dvb-apps/util/scan/dvb-t/it-Milano
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Milano 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Milano 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,15 @@
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX-A RAI
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-B RAI
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-A MEDIASET
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-A MEDIASET-2
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX La7/MTV
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE 2
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pagnacco dvb-apps/util/scan/dvb-t/it-Pagnacco
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pagnacco 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Pagnacco 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,27 @@
++# Italia / Pagnacco (it-Pagnacco)
++# DVB-T Pagnacco (Italia)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++# MUX-A RAI
++
++T 602000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
++
++# MUX-B RAI
++
++T 490000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
++T 226500000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
++
++# MUX-Dfree
++
++T 634000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
++T 594000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
++
++# MUX-LA7/MTV
++
++T 522000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
++
++# Mediaset
++
++T 818000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
++
++# Europa
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Palermo dvb-apps/util/scan/dvb-t/it-Palermo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Palermo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Palermo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,23 @@
++# Palermo, Italy
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++# MUX DFREE (Canale 5,Italia1,SportItalia,LCI,RadioItalia Tv)
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX LA7/MTV (La 7,MTV ITALIA,Canale D,Music Box)
++#T 730000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX RTI (Rete 4,Class News,Sole 24 Ore TV,BBC World)
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX MEDIASET 2
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX-A RAI (Rai Utile,Rai Doc,RaiSportSAT,RaiNews24,Rai EDU1)
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++
++# MUX-B RAI (Rai Utile,Rai Doc,RaiSportSAT,RaiNews24,Rai EDU1)
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pescara dvb-apps/util/scan/dvb-t/it-Pescara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pescara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Pescara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,15 @@
++# Italy, Pescara San Silvestro
++# Antonio de Vincentiis, www.devincentiis.it, Montesilvano (PE)
++# update 06.02.2009
++# MUX-A RAI canale: VHF-E polarizzazione: O
++T 186000000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-B RAI canale: VHF-F polarizzazione: O
++T 194500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 1 canale: UHF-69 polarizzazione: V
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE canale: UHF-56 polarizzazione: V
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 2 canale: UHF-49 polarizzazione: V
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MBONE canale: UHF-34 polarizzazione: V
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pisa dvb-apps/util/scan/dvb-t/it-Pisa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Pisa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Pisa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++# This channel list is made by G.U.L.LI. LIvorno's Linux Users Group
++# Thanks to: Alessandro Guarguaglini, Stefano Lenzi
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX-A RAI
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-B RAI
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 1
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 2
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MBONE
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX TIMB1
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Roma dvb-apps/util/scan/dvb-t/it-Roma
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Roma 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Roma 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++# DVB-T Roma
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX DFREE
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX La7/MTV
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 1
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET 2
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-A RAI
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-B RAI
++T 186000000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++# SUPER 3
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Sassari dvb-apps/util/scan/dvb-t/it-Sassari
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Sassari 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Sassari 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,33 @@
++# DVB-T Sassari Channels List by frippertronics@alice.it ;)
++# MUX DFREE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX LA7/MTV
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET1
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX MEDIASET2
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-A RAI
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX-B RAI
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 858000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MBONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# TCS
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# VIDEOLINA
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# TIMEDIA MUX A
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# TIMEDIA MUX B
++T 177500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# T 177500000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# SUPER TV
++# T 650000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-S-Stefano_al_mare dvb-apps/util/scan/dvb-t/it-S-Stefano_al_mare
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-S-Stefano_al_mare 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-S-Stefano_al_mare 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++#DVB Santo Stefano al mare (IM)
++#Aggiornato al 10/08/2008
++#Fonte: DGTVI.it
++#s-stefano@email.it
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#MUX-A RAI
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#MUX-B RAI
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#MUX MEDIASET 1
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#MUX MEDIASET 2
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#MUX MBONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#MUX DFREE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#MUX TIMB 1
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Torino dvb-apps/util/scan/dvb-t/it-Torino
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Torino 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Torino 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# DVB-T Torino (Italia)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#MUX-A RAI
++T 834000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++#MUX-B RAI
++T 514000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++#MUX RTI
++T 474000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++#MUX LA7
++T 850000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 602000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++#MUX DFREE
++T 650000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Trieste dvb-apps/util/scan/dvb-t/it-Trieste
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Trieste 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Trieste 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,23 @@
++# Trieste, Italy
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# MUX MEDIASET 1 (Class News, 24Ore TV, Coming soon, BBC World, Boing, Mediaset Premium)
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#
++# MUX-B RAI (Rai Doc-Futura, RaiSportSAT, RaiNotizie24, Rai EDU1, Sat2000, Radio1, Radio2, Radio3, FDAuditorium)
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#
++# MUX-A RAI (Rai Uno, Rai Due, Rai Tre, Rai Utile)
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#
++# MUX DFREE (Rete 4, Italia 1, Sportitalia, LCI / Prima, Si Live24)
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#
++# MUX (All Music)
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#
++# MUX (Triveneta)
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++#
++# MUX (La7 Telemarket Retecapri MTv italia Sitcom Uno)
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Varese dvb-apps/util/scan/dvb-t/it-Varese
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Varese 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Varese 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++# Italia / Varese -- mailto: b.gabriele <gb.dvbch@dveprojects.com>
++#
++# From: http://www.dgtvi.it/copertura.aspx
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#
++# MUX-A RAI VHF H2 226,5 O CAMPO DEI FIORI
++T 226500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX DFREE UHF C50 706 V CAMPO DEI FIORI
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX LA7-MTV UHF C37 602 V CAMPO DEI FIORI
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX RTI UHF C26 514 O CAMPO DEI FIORI PRIMA CAPPELLA
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# MUX RTI UHF C38 514 V CAMPO DEI FIORI ALBERGO
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Venezia dvb-apps/util/scan/dvb-t/it-Venezia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Venezia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Venezia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++# Italia / Venzia (it-Venezia) -- mailto: Rob <rob.davis@libero.it>
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++#
++# According to Eurosat 1/2006
++#
++# C50 - MediaSet
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C37 - Rai A - Doesn't work in Mestre though
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C23 -Rai B
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C64 DFree
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C65 La 7
++T 826000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C58 Mediaset 2
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C36 DFree
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Verona dvb-apps/util/scan/dvb-t/it-Verona
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/it-Verona 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/it-Verona 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++# Italia / Verona / Sommacampagna - 02/03/2009
++# Italia / Verona / Zevio - 28/02/2009
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# C26 - TIMB1
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C34 - Mux B Rai
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C41 - Mux DFree
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C54 - MBone
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C58 - Rete All Music
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C61 - Mux Mediaset 2
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C64 - Mux DFree
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
++# C67 - Mediaset 1
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/lu-All dvb-apps/util/scan/dvb-t/lu-All
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/lu-All 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/lu-All 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# DVB-T Luxembourg [2007-11-18]
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 191500000 7MHz 2/3 NONE QAM16 8k 1/8 NONE # Kanal 7 M6, RTL 8, LUXE.TV
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/16 NONE # Kanal 24 club RTL, RTL TVI, plug TV, RTL 4, RTL 5, RTL 7
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/16 NONE # Kanal 27 RTL TeleLetz, 2 ten RTL
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/lv-Riga dvb-apps/util/scan/dvb-t/lv-Riga
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/lv-Riga 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/lv-Riga 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++# Latvia - Riga (lv-Riga)
++# Generated by Raimonds Cicans
++# UTF8 encoding
++
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++# DLRTC
++T 610000000 8MHz 3/4 NONE QAM64 8k 1/8 NONE # Weak signal! VÄjÅ¡ signÄls! Слабый Ñигнал!
++
++# Baltkom TV
++T 650000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
++T 658000000 8MHz 1/2 NONE QPSK 8k 1/4 NONE
++T 666000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
++T 690000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
++T 778000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
++T 834000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
++
++# WARNING!
++# Some applications detect incorrect guard-interval.
++
++# UZMANĪBU!
++# Dažas programmas nekorekti nosaka "guard-interval" parametru.
++
++# Ð’ÐИМÐÐИЕ!
++# Ðекоторые программы некорректно определÑÑŽÑ‚ параметр "guard-interval"
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-All dvb-apps/util/scan/dvb-t/nl-All
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-All 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/nl-All 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,42 @@
++# The Netherlands, whole country
++# Created from http://radio-tv-nederland.nl/TV%20zenderlijst%20Nederland.xls
++# and http://radio-tv-nederland.nl/dvbt/dvbt-lokaal.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 482000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 514000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 538000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 546000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 562000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 578000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 618000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 642000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 666000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 690000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 706000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 722000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 738000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 746000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 786000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 826000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 834000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/4 NONE
++T 850000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-AlphenaandenRijn dvb-apps/util/scan/dvb-t/nl-AlphenaandenRijn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-AlphenaandenRijn 2004-01-25 17:50:15.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/nl-AlphenaandenRijn 1970-01-01 01:00:00.000000000 +0100
+@@ -1,7 +0,0 @@
+-# Digitenne (Alphen aan den Rijn, The Netherlands)
+-# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 474000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+-T 578000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+-T 722000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+-T 762000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+-T 818000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-Randstad dvb-apps/util/scan/dvb-t/nl-Randstad
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nl-Randstad 2004-01-25 17:50:15.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/nl-Randstad 1970-01-01 01:00:00.000000000 +0100
+@@ -1,7 +0,0 @@
+-# Digitenne (Randstad, The Netherlands)
+-# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 474000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+-T 490000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+-T 578000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+-T 762000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+-T 818000000 8MHz 1/2 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/no-Trondelag_Stjordal dvb-apps/util/scan/dvb-t/no-Trondelag_Stjordal
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/no-Trondelag_Stjordal 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/no-Trondelag_Stjordal 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Norway / Trondelag / Stjordal
++# modified according to data automatically generated by w_scan
++# free (nrk) channels are on 658000000
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nz-Waiatarua dvb-apps/util/scan/dvb-t/nz-Waiatarua
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/nz-Waiatarua 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/nz-Waiatarua 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# Waiatarua, Auckland NZ
++#
++# Channel allocation details for NZ can be found at
++# http://www.rsm.govt.nz/cms/policy-and-planning/current-projects/broadcasting/digital-television-2007-frequency-plan
++#
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++# Multiplex DA
++T 538000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Multiplex DB
++T 570000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
++# Multiplex DC
++T 666000000 8MHz 3/4 NONE QAM64 8k 1/16 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Rzeszow dvb-apps/util/scan/dvb-t/pl-Rzeszow
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Rzeszow 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/pl-Rzeszow 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Rzeszow / Sucha Gora, South-East Poland
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Warszawa dvb-apps/util/scan/dvb-t/pl-Warszawa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Warszawa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/pl-Warszawa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Warsaw / PKiN, Central Poland
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 690000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
++T 746000000 8MHz 5/6 NONE QAM16 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Wroclaw dvb-apps/util/scan/dvb-t/pl-Wroclaw
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/pl-Wroclaw 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/pl-Wroclaw 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Wroclaw / Zorawina, South-West Poland
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvdalen_Brunnsberg dvb-apps/util/scan/dvb-t/se-Alvdalen_Brunnsberg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvdalen_Brunnsberg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Alvdalen_Brunnsberg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Älvdalen/Brunnsberg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvdalsasen dvb-apps/util/scan/dvb-t/se-Alvdalsasen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvdalsasen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Alvdalsasen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Älvdalsåsen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvsbyn dvb-apps/util/scan/dvb-t/se-Alvsbyn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Alvsbyn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Alvsbyn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Älvsbyn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Amot dvb-apps/util/scan/dvb-t/se-Amot
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Amot 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Amot 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Ã…mot
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Angebo dvb-apps/util/scan/dvb-t/se-Angebo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Angebo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Angebo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Ängebo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Angelholm_Vegeholm dvb-apps/util/scan/dvb-t/se-Angelholm_Vegeholm
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Angelholm_Vegeholm 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Angelholm_Vegeholm 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Ängelholm/Vegeholm
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ange_Snoberg dvb-apps/util/scan/dvb-t/se-Ange_Snoberg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ange_Snoberg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ange_Snoberg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Ånge/Snöberg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Arvidsjaur_Jultrask dvb-apps/util/scan/dvb-t/se-Arvidsjaur_Jultrask
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Arvidsjaur_Jultrask 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Arvidsjaur_Jultrask 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Arvidsjaur/Julträsk
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Aspeboda dvb-apps/util/scan/dvb-t/se-Aspeboda
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Aspeboda 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Aspeboda 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Aspeboda
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Atvidaberg dvb-apps/util/scan/dvb-t/se-Atvidaberg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Atvidaberg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Atvidaberg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Ã…tvidaberg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Avesta_Krylbo dvb-apps/util/scan/dvb-t/se-Avesta_Krylbo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Avesta_Krylbo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Avesta_Krylbo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Avesta/Krylbo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Backefors dvb-apps/util/scan/dvb-t/se-Backefors
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Backefors 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Backefors 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Bäckefors
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 586000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 754000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 826000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bankeryd dvb-apps/util/scan/dvb-t/se-Bankeryd
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bankeryd 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Bankeryd 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Bankeryd
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bergsjo_Balleberget dvb-apps/util/scan/dvb-t/se-Bergsjo_Balleberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bergsjo_Balleberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Bergsjo_Balleberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Bergsjö/Bålleberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bergvik dvb-apps/util/scan/dvb-t/se-Bergvik
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bergvik 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Bergvik 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Bergvik
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bollebygd dvb-apps/util/scan/dvb-t/se-Bollebygd
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bollebygd 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Bollebygd 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Bollebygd
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bollnas dvb-apps/util/scan/dvb-t/se-Bollnas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bollnas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Bollnas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Bollnäs
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 618000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Boras_Dalsjofors dvb-apps/util/scan/dvb-t/se-Boras_Dalsjofors
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Boras_Dalsjofors 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Boras_Dalsjofors 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Borås/Dalsjöfors
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Boras_Sjobo dvb-apps/util/scan/dvb-t/se-Boras_Sjobo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Boras_Sjobo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Boras_Sjobo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Borås/Sjöbo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Borlange_Idkerberget dvb-apps/util/scan/dvb-t/se-Borlange_Idkerberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Borlange_Idkerberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Borlange_Idkerberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Borlänge/Idkerberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Borlange_Nygardarna dvb-apps/util/scan/dvb-t/se-Borlange_Nygardarna
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Borlange_Nygardarna 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Borlange_Nygardarna 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Borlänge/Nygårdarna
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bottnaryd_Ryd dvb-apps/util/scan/dvb-t/se-Bottnaryd_Ryd
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bottnaryd_Ryd 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Bottnaryd_Ryd 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Bottnaryd/Ryd
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bromsebro dvb-apps/util/scan/dvb-t/se-Bromsebro
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bromsebro 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Bromsebro 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Brömsebro
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bruzaholm dvb-apps/util/scan/dvb-t/se-Bruzaholm
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Bruzaholm 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Bruzaholm 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Bruzaholm
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Byxelkrok dvb-apps/util/scan/dvb-t/se-Byxelkrok
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Byxelkrok 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Byxelkrok 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Byxelkrok
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dadran dvb-apps/util/scan/dvb-t/se-Dadran
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dadran 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Dadran 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - DÃ¥dran
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dalfors dvb-apps/util/scan/dvb-t/se-Dalfors
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dalfors 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Dalfors 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Dalfors
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dalstuga dvb-apps/util/scan/dvb-t/se-Dalstuga
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Dalstuga 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Dalstuga 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Dalstuga
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Degerfors dvb-apps/util/scan/dvb-t/se-Degerfors
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Degerfors 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Degerfors 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Degerfors
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Delary dvb-apps/util/scan/dvb-t/se-Delary
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Delary 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Delary 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Delary
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Djura dvb-apps/util/scan/dvb-t/se-Djura
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Djura 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Djura 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Djura
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Drevdagen dvb-apps/util/scan/dvb-t/se-Drevdagen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Drevdagen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Drevdagen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Drevdagen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Duvnas dvb-apps/util/scan/dvb-t/se-Duvnas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Duvnas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Duvnas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Duvnäs
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Duvnas_Basna dvb-apps/util/scan/dvb-t/se-Duvnas_Basna
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Duvnas_Basna 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Duvnas_Basna 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Duvnäs/Bäsna
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Edsbyn dvb-apps/util/scan/dvb-t/se-Edsbyn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Edsbyn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Edsbyn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Edsbyn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Emmaboda_Balshult dvb-apps/util/scan/dvb-t/se-Emmaboda_Balshult
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Emmaboda_Balshult 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Emmaboda_Balshult 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Emmaboda/Bälshult
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Enviken dvb-apps/util/scan/dvb-t/se-Enviken
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Enviken 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Enviken 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Enviken
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fagersta dvb-apps/util/scan/dvb-t/se-Fagersta
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fagersta 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Fagersta 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Fagersta
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Falerum_Centrum dvb-apps/util/scan/dvb-t/se-Falerum_Centrum
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Falerum_Centrum 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Falerum_Centrum 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Falerum/Centrum
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Falun_Lovberget dvb-apps/util/scan/dvb-t/se-Falun_Lovberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Falun_Lovberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Falun_Lovberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Falun/Lövberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Farila dvb-apps/util/scan/dvb-t/se-Farila
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Farila 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Farila 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Färila
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Faro_Ajkerstrask dvb-apps/util/scan/dvb-t/se-Faro_Ajkerstrask
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Faro_Ajkerstrask 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Faro_Ajkerstrask 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Fårö/Ajkersträsk
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Farosund_Bunge dvb-apps/util/scan/dvb-t/se-Farosund_Bunge
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Farosund_Bunge 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Farosund_Bunge 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Fårösund/Bunge
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Filipstad_Klockarhojden dvb-apps/util/scan/dvb-t/se-Filipstad_Klockarhojden
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Filipstad_Klockarhojden 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Filipstad_Klockarhojden 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Filipstad/Klockarhöjden
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Finnveden dvb-apps/util/scan/dvb-t/se-Finnveden
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Finnveden 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Finnveden 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Finnveden
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fredriksberg dvb-apps/util/scan/dvb-t/se-Fredriksberg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fredriksberg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Fredriksberg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Fredriksberg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fritsla dvb-apps/util/scan/dvb-t/se-Fritsla
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Fritsla 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Fritsla 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Fritsla
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Furudal dvb-apps/util/scan/dvb-t/se-Furudal
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Furudal 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Furudal 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Furudal
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gallivare dvb-apps/util/scan/dvb-t/se-Gallivare
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gallivare 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Gallivare 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Gällivare
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Garpenberg_Kuppgarden dvb-apps/util/scan/dvb-t/se-Garpenberg_Kuppgarden
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Garpenberg_Kuppgarden 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Garpenberg_Kuppgarden 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Garpenberg/Kuppgården
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gavle dvb-apps/util/scan/dvb-t/se-Gavle
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gavle 2004-01-25 15:33:02.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Gavle 1970-01-01 01:00:00.000000000 +0100
+@@ -1,6 +0,0 @@
+-# Gavle (Senda/Boxer Sweden)
+-# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+-T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+-T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+-T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gavle_Skogmur dvb-apps/util/scan/dvb-t/se-Gavle_Skogmur
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gavle_Skogmur 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Gavle_Skogmur 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Gävle/Skogmur
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnarp dvb-apps/util/scan/dvb-t/se-Gnarp
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnarp 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Gnarp 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Gnarp
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnesta dvb-apps/util/scan/dvb-t/se-Gnesta
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnesta 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Gnesta 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Gnesta
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnosjo_Marieholm dvb-apps/util/scan/dvb-t/se-Gnosjo_Marieholm
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gnosjo_Marieholm 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Gnosjo_Marieholm 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Gnosjö/Marieholm
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Goteborg_Brudaremossen dvb-apps/util/scan/dvb-t/se-Goteborg_Brudaremossen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Goteborg_Brudaremossen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Goteborg_Brudaremossen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Göteborg/Brudaremossen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Goteborg_Slattadamm dvb-apps/util/scan/dvb-t/se-Goteborg_Slattadamm
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Goteborg_Slattadamm 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Goteborg_Slattadamm 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Göteborg/Slättadamm
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gullbrandstorp dvb-apps/util/scan/dvb-t/se-Gullbrandstorp
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gullbrandstorp 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Gullbrandstorp 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Gullbrandstorp
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gunnarsbo dvb-apps/util/scan/dvb-t/se-Gunnarsbo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gunnarsbo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Gunnarsbo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Gunnarsbo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gusum dvb-apps/util/scan/dvb-t/se-Gusum
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Gusum 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Gusum 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Gusum
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hagfors_Varmullsasen dvb-apps/util/scan/dvb-t/se-Hagfors_Varmullsasen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hagfors_Varmullsasen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hagfors_Varmullsasen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Hagfors/Värmullsåsen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hallaryd dvb-apps/util/scan/dvb-t/se-Hallaryd
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hallaryd 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hallaryd 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Hallaryd
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hallbo dvb-apps/util/scan/dvb-t/se-Hallbo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hallbo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hallbo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Hällbo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Halmstad_Hamnen dvb-apps/util/scan/dvb-t/se-Halmstad_Hamnen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Halmstad_Hamnen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Halmstad_Hamnen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Halmstad/Hamnen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Halmstad_Oskarstrom dvb-apps/util/scan/dvb-t/se-Halmstad_Oskarstrom
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Halmstad_Oskarstrom 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Halmstad_Oskarstrom 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Halmstad/Oskarström
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 610000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 666000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Harnosand_Harnon dvb-apps/util/scan/dvb-t/se-Harnosand_Harnon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Harnosand_Harnon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Harnosand_Harnon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Härnösand/Härnön
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hassela dvb-apps/util/scan/dvb-t/se-Hassela
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hassela 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hassela 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Hassela
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Havdhem dvb-apps/util/scan/dvb-t/se-Havdhem
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Havdhem 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Havdhem 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Havdhem
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hedemora dvb-apps/util/scan/dvb-t/se-Hedemora
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hedemora 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hedemora 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Hedemora
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Helsingborg_Olympia dvb-apps/util/scan/dvb-t/se-Helsingborg_Olympia
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Helsingborg_Olympia 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Helsingborg_Olympia 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Helsingborg/Olympia
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hennan dvb-apps/util/scan/dvb-t/se-Hennan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hennan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hennan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Hennan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hestra_Aspas dvb-apps/util/scan/dvb-t/se-Hestra_Aspas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hestra_Aspas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hestra_Aspas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Hestra/Äspås
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hjo_Grevback dvb-apps/util/scan/dvb-t/se-Hjo_Grevback
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hjo_Grevback 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hjo_Grevback 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Hjo/Grevbäck
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hofors dvb-apps/util/scan/dvb-t/se-Hofors
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hofors 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hofors 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Hofors
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hogfors dvb-apps/util/scan/dvb-t/se-Hogfors
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hogfors 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hogfors 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Högfors
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hogsby_Virstad dvb-apps/util/scan/dvb-t/se-Hogsby_Virstad
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hogsby_Virstad 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hogsby_Virstad 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Högsby/Virstad
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Holsbybrunn_Holsbyholm dvb-apps/util/scan/dvb-t/se-Holsbybrunn_Holsbyholm
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Holsbybrunn_Holsbyholm 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Holsbybrunn_Holsbyholm 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Holsbybrunn/Holsbyholm
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Horby_Sallerup dvb-apps/util/scan/dvb-t/se-Horby_Sallerup
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Horby_Sallerup 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Horby_Sallerup 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Hörby/Sallerup
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Horken dvb-apps/util/scan/dvb-t/se-Horken
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Horken 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Horken 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Hörken
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hudiksvall_Forsa dvb-apps/util/scan/dvb-t/se-Hudiksvall_Forsa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hudiksvall_Forsa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hudiksvall_Forsa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Hudiksvall/Forsa
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 618000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hudiksvall_Galgberget dvb-apps/util/scan/dvb-t/se-Hudiksvall_Galgberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Hudiksvall_Galgberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Hudiksvall_Galgberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Hudiksvall/Galgberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Huskvarna dvb-apps/util/scan/dvb-t/se-Huskvarna
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Huskvarna 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Huskvarna 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Huskvarna
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Idre dvb-apps/util/scan/dvb-t/se-Idre
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Idre 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Idre 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Idre
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ingatorp dvb-apps/util/scan/dvb-t/se-Ingatorp
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ingatorp 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ingatorp 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Ingatorp
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ingvallsbenning dvb-apps/util/scan/dvb-t/se-Ingvallsbenning
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ingvallsbenning 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ingvallsbenning 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Ingvallsbenning
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Irevik dvb-apps/util/scan/dvb-t/se-Irevik
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Irevik 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Irevik 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Irevik
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jamjo dvb-apps/util/scan/dvb-t/se-Jamjo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jamjo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Jamjo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Jämjö
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jarnforsen dvb-apps/util/scan/dvb-t/se-Jarnforsen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jarnforsen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Jarnforsen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Järnforsen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jarvso dvb-apps/util/scan/dvb-t/se-Jarvso
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jarvso 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Jarvso 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Järvsö
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jokkmokk_Tjalmejaure dvb-apps/util/scan/dvb-t/se-Jokkmokk_Tjalmejaure
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jokkmokk_Tjalmejaure 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Jokkmokk_Tjalmejaure 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Jokkmokk/Tjalmejaure
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jonkoping_Bondberget dvb-apps/util/scan/dvb-t/se-Jonkoping_Bondberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Jonkoping_Bondberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Jonkoping_Bondberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Jönköping/Bondberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kalix dvb-apps/util/scan/dvb-t/se-Kalix
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kalix 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kalix 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Kalix
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 770000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 786000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karbole dvb-apps/util/scan/dvb-t/se-Karbole
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karbole 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Karbole 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Kårböle
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlsborg_Vaberget dvb-apps/util/scan/dvb-t/se-Karlsborg_Vaberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlsborg_Vaberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Karlsborg_Vaberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Karlsborg/Vaberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlshamn dvb-apps/util/scan/dvb-t/se-Karlshamn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlshamn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Karlshamn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Karlshamn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 498000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 642000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 522000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlskrona_Vamo dvb-apps/util/scan/dvb-t/se-Karlskrona_Vamo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlskrona_Vamo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Karlskrona_Vamo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Karlskrona/Vämö
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 498000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 642000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 522000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlstad_Sormon dvb-apps/util/scan/dvb-t/se-Karlstad_Sormon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Karlstad_Sormon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Karlstad_Sormon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,9 @@
++# Sweden - Karlstad Sörmon Valid from 2007 09 26. Ver. 2 Correct FEC
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++# Channels
++# Mux3=30
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++# Mux4=42
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++# Mux1=43
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kaxholmen_Vistakulle dvb-apps/util/scan/dvb-t/se-Kaxholmen_Vistakulle
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kaxholmen_Vistakulle 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kaxholmen_Vistakulle 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Kaxholmen/Vistakulle
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kinnastrom dvb-apps/util/scan/dvb-t/se-Kinnastrom
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kinnastrom 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kinnastrom 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Kinnaström
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kiruna_Kirunavaara dvb-apps/util/scan/dvb-t/se-Kiruna_Kirunavaara
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kiruna_Kirunavaara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kiruna_Kirunavaara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Kiruna/Kirunavaara
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kisa dvb-apps/util/scan/dvb-t/se-Kisa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kisa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kisa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Kisa
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Knared dvb-apps/util/scan/dvb-t/se-Knared
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Knared 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Knared 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Knäred
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kopmanholmen dvb-apps/util/scan/dvb-t/se-Kopmanholmen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kopmanholmen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kopmanholmen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Köpmanholmen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kopparberg dvb-apps/util/scan/dvb-t/se-Kopparberg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kopparberg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kopparberg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Kopparberg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kramfors_Lugnvik dvb-apps/util/scan/dvb-t/se-Kramfors_Lugnvik
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kramfors_Lugnvik 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kramfors_Lugnvik 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Kramfors/Lugnvik
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kristinehamn_Utsiktsberget dvb-apps/util/scan/dvb-t/se-Kristinehamn_Utsiktsberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kristinehamn_Utsiktsberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kristinehamn_Utsiktsberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Kristinehamn/Utsiktsberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 522000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 642000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 626000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kungsater dvb-apps/util/scan/dvb-t/se-Kungsater
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kungsater 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kungsater 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Kungsäter
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kungsberget_GI dvb-apps/util/scan/dvb-t/se-Kungsberget_GI
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Kungsberget_GI 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Kungsberget_GI 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Kungsberget/GI
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Langshyttan dvb-apps/util/scan/dvb-t/se-Langshyttan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Langshyttan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Langshyttan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - LÃ¥ngshyttan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Langshyttan_Engelsfors dvb-apps/util/scan/dvb-t/se-Langshyttan_Engelsfors
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Langshyttan_Engelsfors 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Langshyttan_Engelsfors 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - LÃ¥ngshyttan/Engelsfors
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Leksand_Karingberget dvb-apps/util/scan/dvb-t/se-Leksand_Karingberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Leksand_Karingberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Leksand_Karingberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Leksand/Käringberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lerdala dvb-apps/util/scan/dvb-t/se-Lerdala
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lerdala 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Lerdala 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Lerdala
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lilltjara_Digerberget dvb-apps/util/scan/dvb-t/se-Lilltjara_Digerberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lilltjara_Digerberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Lilltjara_Digerberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Lilltjära/Digerberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Limedsforsen dvb-apps/util/scan/dvb-t/se-Limedsforsen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Limedsforsen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Limedsforsen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Limedsforsen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lindshammar_Ramkvilla dvb-apps/util/scan/dvb-t/se-Lindshammar_Ramkvilla
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lindshammar_Ramkvilla 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Lindshammar_Ramkvilla 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Lindshammar/Ramkvilla
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Linkoping_Vattentornet dvb-apps/util/scan/dvb-t/se-Linkoping_Vattentornet
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Linkoping_Vattentornet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Linkoping_Vattentornet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Linköping/Vattentornet
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ljugarn dvb-apps/util/scan/dvb-t/se-Ljugarn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ljugarn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ljugarn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Ljugarn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Loffstrand dvb-apps/util/scan/dvb-t/se-Loffstrand
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Loffstrand 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Loffstrand 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Loffstrand
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 650000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 762000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 770000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lonneberga dvb-apps/util/scan/dvb-t/se-Lonneberga
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lonneberga 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Lonneberga 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Lönneberga
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lorstrand dvb-apps/util/scan/dvb-t/se-Lorstrand
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lorstrand 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Lorstrand 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Lörstrand
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ludvika_Bjorkasen dvb-apps/util/scan/dvb-t/se-Ludvika_Bjorkasen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ludvika_Bjorkasen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ludvika_Bjorkasen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Ludvika/Björkåsen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lumsheden_Trekanten dvb-apps/util/scan/dvb-t/se-Lumsheden_Trekanten
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lumsheden_Trekanten 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Lumsheden_Trekanten 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Lumsheden/Trekanten
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lycksele_Knaften dvb-apps/util/scan/dvb-t/se-Lycksele_Knaften
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Lycksele_Knaften 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Lycksele_Knaften 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Lycksele/Knaften
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mahult dvb-apps/util/scan/dvb-t/se-Mahult
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mahult 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Mahult 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Mahult
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Malmo_Jagersro dvb-apps/util/scan/dvb-t/se-Malmo_Jagersro
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Malmo_Jagersro 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Malmo_Jagersro 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Malmö/Jägersro
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Malung dvb-apps/util/scan/dvb-t/se-Malung
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Malung 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Malung 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Malung
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mariannelund dvb-apps/util/scan/dvb-t/se-Mariannelund
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mariannelund 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Mariannelund 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Mariannelund
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Markaryd_Hualtet dvb-apps/util/scan/dvb-t/se-Markaryd_Hualtet
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Markaryd_Hualtet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Markaryd_Hualtet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Markaryd/Hualtet
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Matfors dvb-apps/util/scan/dvb-t/se-Matfors
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Matfors 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Matfors 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Matfors
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Molnbo_Tallstugan dvb-apps/util/scan/dvb-t/se-Molnbo_Tallstugan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Molnbo_Tallstugan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Molnbo_Tallstugan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,2 @@
++# Sweden - Mölnbo/Tallstugan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Molndal_Vasterberget dvb-apps/util/scan/dvb-t/se-Molndal_Vasterberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Molndal_Vasterberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Molndal_Vasterberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Mölndal/Västerberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mora_Eldris dvb-apps/util/scan/dvb-t/se-Mora_Eldris
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mora_Eldris 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Mora_Eldris 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Mora/Eldris
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Motala_Ervasteby dvb-apps/util/scan/dvb-t/se-Motala_Ervasteby
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Motala_Ervasteby 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Motala_Ervasteby 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Motala/Ervasteby
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mullsjo_Torestorp dvb-apps/util/scan/dvb-t/se-Mullsjo_Torestorp
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Mullsjo_Torestorp 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Mullsjo_Torestorp 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Mullsjö/Torestorp
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 850000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Nassjo dvb-apps/util/scan/dvb-t/se-Nassjo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Nassjo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Nassjo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Nässjö
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Navekvarn dvb-apps/util/scan/dvb-t/se-Navekvarn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Navekvarn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Navekvarn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Nävekvarn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrahammar dvb-apps/util/scan/dvb-t/se-Norrahammar
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrahammar 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Norrahammar 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Norrahammar
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrkoping_Krokek dvb-apps/util/scan/dvb-t/se-Norrkoping_Krokek
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrkoping_Krokek 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Norrkoping_Krokek 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Norrköping/Krokek
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrtalje_Sodra_Bergen dvb-apps/util/scan/dvb-t/se-Norrtalje_Sodra_Bergen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Norrtalje_Sodra_Bergen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Norrtalje_Sodra_Bergen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Norrtälje/Södra Bergen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Nykoping dvb-apps/util/scan/dvb-t/se-Nykoping
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Nykoping 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Nykoping 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Nyköping
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Orebro_Lockhyttan dvb-apps/util/scan/dvb-t/se-Orebro_Lockhyttan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Orebro_Lockhyttan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Orebro_Lockhyttan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Örebro/Lockhyttan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ornskoldsvik_As dvb-apps/util/scan/dvb-t/se-Ornskoldsvik_As
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ornskoldsvik_As 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ornskoldsvik_As 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Örnsköldsvik/Ås
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Oskarshamn dvb-apps/util/scan/dvb-t/se-Oskarshamn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Oskarshamn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Oskarshamn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Oskarshamn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ostersund_Brattasen dvb-apps/util/scan/dvb-t/se-Ostersund_Brattasen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ostersund_Brattasen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ostersund_Brattasen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Östersund/Brattåsen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Osthammar_Valo dvb-apps/util/scan/dvb-t/se-Osthammar_Valo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Osthammar_Valo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Osthammar_Valo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Östhammar/Valö
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Overkalix dvb-apps/util/scan/dvb-t/se-Overkalix
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Overkalix 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Overkalix 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Överkalix
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 770000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 786000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 746000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Oxberg dvb-apps/util/scan/dvb-t/se-Oxberg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Oxberg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Oxberg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Oxberg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Pajala dvb-apps/util/scan/dvb-t/se-Pajala
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Pajala 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Pajala 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Pajala
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE #Teracom_Mux_2
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE #Teracom_Mux_3
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE #Teracom_Mux_1
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE #Teracom_Mux_4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Paulistom dvb-apps/util/scan/dvb-t/se-Paulistom
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Paulistom 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Paulistom 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Paulistöm
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rattvik dvb-apps/util/scan/dvb-t/se-Rattvik
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rattvik 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Rattvik 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Rättvik
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rengsjo dvb-apps/util/scan/dvb-t/se-Rengsjo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rengsjo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Rengsjo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Rengsjö
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rorbacksnas dvb-apps/util/scan/dvb-t/se-Rorbacksnas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Rorbacksnas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Rorbacksnas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Rörbäcksnäs
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sagmyra dvb-apps/util/scan/dvb-t/se-Sagmyra
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sagmyra 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Sagmyra 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - SÃ¥gmyra
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Salen dvb-apps/util/scan/dvb-t/se-Salen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Salen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Salen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Sälen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Salfjallet dvb-apps/util/scan/dvb-t/se-Salfjallet
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Salfjallet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Salfjallet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Sälfjället
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sarna_Mickeltemplet dvb-apps/util/scan/dvb-t/se-Sarna_Mickeltemplet
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sarna_Mickeltemplet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Sarna_Mickeltemplet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Särna/Mickeltemplet
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Satila dvb-apps/util/scan/dvb-t/se-Satila
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Satila 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Satila 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Sätila
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Saxdalen dvb-apps/util/scan/dvb-t/se-Saxdalen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Saxdalen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Saxdalen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Saxdalen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Siljansnas_Uvberget dvb-apps/util/scan/dvb-t/se-Siljansnas_Uvberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Siljansnas_Uvberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Siljansnas_Uvberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Siljansnäs/Uvberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skarstad dvb-apps/util/scan/dvb-t/se-Skarstad
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skarstad 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Skarstad 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Skärstad
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skattungbyn dvb-apps/util/scan/dvb-t/se-Skattungbyn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skattungbyn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Skattungbyn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Skattungbyn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skelleftea dvb-apps/util/scan/dvb-t/se-Skelleftea
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skelleftea 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Skelleftea 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Skellefteå
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skene_Nycklarberget dvb-apps/util/scan/dvb-t/se-Skene_Nycklarberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skene_Nycklarberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Skene_Nycklarberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Skene/Nycklarberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skovde dvb-apps/util/scan/dvb-t/se-Skovde
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Skovde 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Skovde 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Skövde
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Smedjebacken_Uvberget dvb-apps/util/scan/dvb-t/se-Smedjebacken_Uvberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Smedjebacken_Uvberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Smedjebacken_Uvberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Smedjebacken/Uvberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Soderhamn dvb-apps/util/scan/dvb-t/se-Soderhamn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Soderhamn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Soderhamn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Söderhamn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 810000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Soderkoping dvb-apps/util/scan/dvb-t/se-Soderkoping
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Soderkoping 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Soderkoping 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Söderköping
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sodertalje_Ragnhildsborg dvb-apps/util/scan/dvb-t/se-Sodertalje_Ragnhildsborg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sodertalje_Ragnhildsborg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Sodertalje_Ragnhildsborg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Sweden - Södertälje/Ragnhildsborg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Solleftea_Hallsta dvb-apps/util/scan/dvb-t/se-Solleftea_Hallsta
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Solleftea_Hallsta 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Solleftea_Hallsta 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Sollefteå/Hallsta
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Solleftea_Multra dvb-apps/util/scan/dvb-t/se-Solleftea_Multra
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Solleftea_Multra 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Solleftea_Multra 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Sollefteå/Multrå
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sorsjon dvb-apps/util/scan/dvb-t/se-Sorsjon
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sorsjon 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Sorsjon 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Sörsjön
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stockholm_Marieberg dvb-apps/util/scan/dvb-t/se-Stockholm_Marieberg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stockholm_Marieberg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Stockholm_Marieberg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Stockholm/Marieberg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stockholm_Nacka dvb-apps/util/scan/dvb-t/se-Stockholm_Nacka
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stockholm_Nacka 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Stockholm_Nacka 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Sweden - Stockholm/Nacka
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE # Teracom_Mux_1
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE # Teracom_Mux_2
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE # Teracom_Mux_3
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE # Teracom_Mux_4
++T 746000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE # Teracom_Mux_5
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE # Teracom_Mux_6
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stora_Skedvi dvb-apps/util/scan/dvb-t/se-Stora_Skedvi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stora_Skedvi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Stora_Skedvi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Stora Skedvi
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Storfjaten dvb-apps/util/scan/dvb-t/se-Storfjaten
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Storfjaten 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Storfjaten 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Storfjäten
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Storuman dvb-apps/util/scan/dvb-t/se-Storuman
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Storuman 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Storuman 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Storuman
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stromstad dvb-apps/util/scan/dvb-t/se-Stromstad
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Stromstad 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Stromstad 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Strömstad
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 730000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 754000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 554000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Styrsjobo dvb-apps/util/scan/dvb-t/se-Styrsjobo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Styrsjobo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Styrsjobo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Styrsjöbo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundborn dvb-apps/util/scan/dvb-t/se-Sundborn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundborn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Sundborn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Sundborn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundsbruk dvb-apps/util/scan/dvb-t/se-Sundsbruk
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundsbruk 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Sundsbruk 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Sundsbruk
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundsvall_S_Stadsberget dvb-apps/util/scan/dvb-t/se-Sundsvall_S_Stadsberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sundsvall_S_Stadsberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Sundsvall_S_Stadsberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Sundsvall/S Stadsberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sunne_Blabarskullen dvb-apps/util/scan/dvb-t/se-Sunne_Blabarskullen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sunne_Blabarskullen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Sunne_Blabarskullen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Sunne/Blåbärskullen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Svartnas dvb-apps/util/scan/dvb-t/se-Svartnas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Svartnas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Svartnas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Svartnäs
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 642000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sveg_Brickan dvb-apps/util/scan/dvb-t/se-Sveg_Brickan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Sveg_Brickan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Sveg_Brickan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Sveg/Brickan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 674000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Taberg dvb-apps/util/scan/dvb-t/se-Taberg
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Taberg 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Taberg 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Taberg
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tandadalen dvb-apps/util/scan/dvb-t/se-Tandadalen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tandadalen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Tandadalen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Tandådalen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tasjo dvb-apps/util/scan/dvb-t/se-Tasjo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tasjo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Tasjo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Tåsjö
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tollsjo dvb-apps/util/scan/dvb-t/se-Tollsjo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tollsjo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Tollsjo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Töllsjö
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Torsby_Bada dvb-apps/util/scan/dvb-t/se-Torsby_Bada
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Torsby_Bada 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Torsby_Bada 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Torsby/Bada
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 802000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tranas_Bredkarr dvb-apps/util/scan/dvb-t/se-Tranas_Bredkarr
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tranas_Bredkarr 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Tranas_Bredkarr 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Tranås/Bredkärr
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tranemo dvb-apps/util/scan/dvb-t/se-Tranemo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tranemo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Tranemo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Tranemo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Transtrand_Bolheden dvb-apps/util/scan/dvb-t/se-Transtrand_Bolheden
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Transtrand_Bolheden 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Transtrand_Bolheden 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Transtrand/Bolheden
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Traryd_Betas dvb-apps/util/scan/dvb-t/se-Traryd_Betas
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Traryd_Betas 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Traryd_Betas 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Traryd/Betås
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 730000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Trollhattan dvb-apps/util/scan/dvb-t/se-Trollhattan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Trollhattan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Trollhattan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Trollhättan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 730000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 754000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 554000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Trosa dvb-apps/util/scan/dvb-t/se-Trosa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Trosa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Trosa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Trosa
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tystberga dvb-apps/util/scan/dvb-t/se-Tystberga
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Tystberga 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Tystberga 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Tystberga
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uddevalla_Herrestad dvb-apps/util/scan/dvb-t/se-Uddevalla_Herrestad
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uddevalla_Herrestad 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Uddevalla_Herrestad 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Uddevalla/Herrestad
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 730000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 754000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 554000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ullared dvb-apps/util/scan/dvb-t/se-Ullared
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ullared 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ullared 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Ullared
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ulricehamn dvb-apps/util/scan/dvb-t/se-Ulricehamn
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ulricehamn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ulricehamn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Ulricehamn
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 842000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ulvshyttan_Porjus dvb-apps/util/scan/dvb-t/se-Ulvshyttan_Porjus
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ulvshyttan_Porjus 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ulvshyttan_Porjus 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Ulvshyttan/Porjus
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uppsala_Rickomberga dvb-apps/util/scan/dvb-t/se-Uppsala_Rickomberga
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uppsala_Rickomberga 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Uppsala_Rickomberga 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Uppsala/Rickomberga
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uppsala_Vedyxa dvb-apps/util/scan/dvb-t/se-Uppsala_Vedyxa
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Uppsala_Vedyxa 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Uppsala_Vedyxa 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Uppsala/Vedyxa
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 474000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vaddo_Elmsta dvb-apps/util/scan/dvb-t/se-Vaddo_Elmsta
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vaddo_Elmsta 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vaddo_Elmsta 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Väddö/Elmsta
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Valdemarsvik dvb-apps/util/scan/dvb-t/se-Valdemarsvik
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Valdemarsvik 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Valdemarsvik 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# Sweden - Valdemarsvik
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 794000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vannas_Granlundsberget dvb-apps/util/scan/dvb-t/se-Vannas_Granlundsberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vannas_Granlundsberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vannas_Granlundsberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Vännäs/Granlundsberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 786000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 722000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 754000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 594000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vansbro_Hummelberget dvb-apps/util/scan/dvb-t/se-Vansbro_Hummelberget
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vansbro_Hummelberget 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vansbro_Hummelberget 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Vansbro/Hummelberget
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Varberg_Grimeton dvb-apps/util/scan/dvb-t/se-Varberg_Grimeton
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Varberg_Grimeton 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Varberg_Grimeton 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Varberg/Grimeton
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 530000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 610000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 666000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vasteras_Lillharad dvb-apps/util/scan/dvb-t/se-Vasteras_Lillharad
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vasteras_Lillharad 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vasteras_Lillharad 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Västerås/Lillhärad
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 554000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vastervik_Farhult dvb-apps/util/scan/dvb-t/se-Vastervik_Farhult
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vastervik_Farhult 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vastervik_Farhult 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Västervik/Fårhult
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 498000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 546000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vaxbo dvb-apps/util/scan/dvb-t/se-Vaxbo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vaxbo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vaxbo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Växbo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vessigebro dvb-apps/util/scan/dvb-t/se-Vessigebro
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vessigebro 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vessigebro 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Vessigebro
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vetlanda_Nye dvb-apps/util/scan/dvb-t/se-Vetlanda_Nye
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vetlanda_Nye 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vetlanda_Nye 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Vetlanda/Nye
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vikmanshyttan dvb-apps/util/scan/dvb-t/se-Vikmanshyttan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vikmanshyttan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vikmanshyttan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Vikmanshyttan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Virserum dvb-apps/util/scan/dvb-t/se-Virserum
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Virserum 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Virserum 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Virserum
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 738000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visby_Follingbo dvb-apps/util/scan/dvb-t/se-Visby_Follingbo
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visby_Follingbo 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Visby_Follingbo 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Visby/Follingbo
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 714000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 690000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 770000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visby_Hamnen dvb-apps/util/scan/dvb-t/se-Visby_Hamnen
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visby_Hamnen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Visby_Hamnen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Visby/Hamnen
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 522000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 506000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 570000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 586000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visingso dvb-apps/util/scan/dvb-t/se-Visingso
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Visingso 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Visingso 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Visingsö
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 650000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vislanda_Nydala dvb-apps/util/scan/dvb-t/se-Vislanda_Nydala
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Vislanda_Nydala 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Vislanda_Nydala 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Sweden - Vislanda/Nydala
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 578000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
++T 602000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Voxna dvb-apps/util/scan/dvb-t/se-Voxna
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Voxna 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Voxna 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Voxna
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ystad_Metallgatan dvb-apps/util/scan/dvb-t/se-Ystad_Metallgatan
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Ystad_Metallgatan 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Ystad_Metallgatan 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Sweden - Ystad/Metallgatan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 506000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 634000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 818000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
++T 794000000 8MHz 3/4 NONE QAM64 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Yttermalung dvb-apps/util/scan/dvb-t/se-Yttermalung
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/se-Yttermalung 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/se-Yttermalung 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,3 @@
++# Sweden - Yttermalung
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 698000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-BanskaBystrica dvb-apps/util/scan/dvb-t/sk-BanskaBystrica
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-BanskaBystrica 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/sk-BanskaBystrica 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# DVB-T Banska Bystrica (Banska Bystrica, Slovak Republic)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++T 778000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-Bratislava dvb-apps/util/scan/dvb-t/sk-Bratislava
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-Bratislava 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/sk-Bratislava 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# DVB-T Bratislava (Bratislava, Slovak Republic)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++T 834000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-Kosice dvb-apps/util/scan/dvb-t/sk-Kosice
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/sk-Kosice 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/sk-Kosice 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,4 @@
++# DVB-T Kosice (Kosice, Slovak Republic)
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++
++T 658000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/tw-Kaohsiung dvb-apps/util/scan/dvb-t/tw-Kaohsiung
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/tw-Kaohsiung 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/tw-Kaohsiung 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++# Taiwan - Kaohsiung, southern Taiwan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 545000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
++T 545000000 6MHz 2/3 NONE QAM16 8k 1/8 NONE
++T 557000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
++T 557000000 6MHz 2/3 NONE QAM16 8k 1/8 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/tw-Taipei dvb-apps/util/scan/dvb-t/tw-Taipei
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/tw-Taipei 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/tw-Taipei 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# Taiwan - Taipei, northern Taiwan
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 533000000 6MHz 1/2 NONE QAM16 8k 1/8 NONE
++T 545000000 6MHz 2/3 NONE QAM16 8k 1/8 NONE
++T 557000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
++T 581000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
++T 593000000 6MHz 2/3 NONE QAM16 8k 1/4 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Aberdare dvb-apps/util/scan/dvb-t/uk-Aberdare
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Aberdare 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Aberdare 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Aberdare
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 562167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 489833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 538167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Angus dvb-apps/util/scan/dvb-t/uk-Angus
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Angus 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Angus 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Angus
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 834167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 777833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 801833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 753833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 825833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BeaconHill dvb-apps/util/scan/dvb-t/uk-BeaconHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BeaconHill 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-BeaconHill 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Beacon Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 721833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 794167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 770167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 738167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 753833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 818167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Belmont dvb-apps/util/scan/dvb-t/uk-Belmont
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Belmont 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Belmont 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Belmont
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 690000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 850000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 834000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 762167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bilsdale dvb-apps/util/scan/dvb-t/uk-Bilsdale
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bilsdale 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Bilsdale 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Bilsdale
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 474000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 554000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 498167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 522167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BlackHill dvb-apps/util/scan/dvb-t/uk-BlackHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BlackHill 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-BlackHill 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# uk BlackHill
++# UK, Black Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 634167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 634167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 682167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 658167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 746000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 826000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Blaenplwyf dvb-apps/util/scan/dvb-t/uk-Blaenplwyf
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Blaenplwyf 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Blaenplwyf 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Blaenplwyf
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 506167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 538167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BluebellHill dvb-apps/util/scan/dvb-t/uk-BluebellHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BluebellHill 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-BluebellHill 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Bluebell Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 498000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 522000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 665833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 641833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bressay dvb-apps/util/scan/dvb-t/uk-Bressay
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bressay 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Bressay 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Bressay
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 497833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 521833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 834000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BrierleyHill dvb-apps/util/scan/dvb-t/uk-BrierleyHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BrierleyHill 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-BrierleyHill 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Brierley Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 825833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 753833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 777833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 834167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 801833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BristolIlchesterCres dvb-apps/util/scan/dvb-t/uk-BristolIlchesterCres
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BristolIlchesterCres 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-BristolIlchesterCres 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Bristol Ilchester Cres.
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 618000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 634167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 658167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BristolKingsWeston dvb-apps/util/scan/dvb-t/uk-BristolKingsWeston
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BristolKingsWeston 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-BristolKingsWeston 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Bristol King's Weston
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 482000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 506000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 530000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 562000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bromsgrove dvb-apps/util/scan/dvb-t/uk-Bromsgrove
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Bromsgrove 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Bromsgrove 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Bromsgrove
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 537833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 569833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 489833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BrougherMountain dvb-apps/util/scan/dvb-t/uk-BrougherMountain
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-BrougherMountain 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-BrougherMountain 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Brougher Mountain
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 490167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 514167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 538167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Caldbeck dvb-apps/util/scan/dvb-t/uk-Caldbeck
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Caldbeck 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Caldbeck 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Caldbeck
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 506000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 490000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 514167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-CaradonHill dvb-apps/util/scan/dvb-t/uk-CaradonHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-CaradonHill 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-CaradonHill 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Caradon Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 553833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 690000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 497833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 522000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Carmel dvb-apps/util/scan/dvb-t/uk-Carmel
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Carmel 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Carmel 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Carmel
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 825833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 777833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 801833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 834167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Chatton dvb-apps/util/scan/dvb-t/uk-Chatton
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Chatton 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Chatton 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Chatton
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 626167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 706167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 650167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 674167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Chesterfield dvb-apps/util/scan/dvb-t/uk-Chesterfield
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Chesterfield 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Chesterfield 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Chesterfield
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 626000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 650000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 674000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 706000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 722000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Craigkelly dvb-apps/util/scan/dvb-t/uk-Craigkelly
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Craigkelly 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Craigkelly 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Craigkelly
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 570000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 538000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 489833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-CrystalPalace dvb-apps/util/scan/dvb-t/uk-CrystalPalace
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-CrystalPalace 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-CrystalPalace 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# Crystal Palace
++# UK, Crystal Palace
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 505833333 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 505833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 481833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 561833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 529833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 537833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Darvel dvb-apps/util/scan/dvb-t/uk-Darvel
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Darvel 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Darvel 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Darvel
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 481833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 505833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 561833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 529833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 546167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Divis dvb-apps/util/scan/dvb-t/uk-Divis
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Divis 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Divis 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Divis
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 538000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 569833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 489833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Dover dvb-apps/util/scan/dvb-t/uk-Dover
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Dover 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Dover 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,14 @@
++# UK, Dover
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 850000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 794167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 745833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 770167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 762167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 785833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++# UK, Dover B
++T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 642000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 618167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Durris dvb-apps/util/scan/dvb-t/uk-Durris
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Durris 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Durris 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Durris
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 722167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 713833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 634000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 658000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Eitshal dvb-apps/util/scan/dvb-t/uk-Eitshal
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Eitshal 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Eitshal 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Eitshal
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 546167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 481833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 505833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 529833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 561833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-EmleyMoor dvb-apps/util/scan/dvb-t/uk-EmleyMoor
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-EmleyMoor 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-EmleyMoor 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Emley Moor
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 722167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 625833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 649833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 673833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 705833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Fenham dvb-apps/util/scan/dvb-t/uk-Fenham
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Fenham 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Fenham 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Fenham
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 506167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 762167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Fenton dvb-apps/util/scan/dvb-t/uk-Fenton
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Fenton 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Fenton 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Fenton
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 577833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 545833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 506167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Ferryside dvb-apps/util/scan/dvb-t/uk-Ferryside
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Ferryside 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Ferryside 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# UK, Ferryside
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 545833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 498000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 522000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Guildford dvb-apps/util/scan/dvb-t/uk-Guildford
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Guildford 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Guildford 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Guildford
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 658167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 634167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Hannington dvb-apps/util/scan/dvb-t/uk-Hannington
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Hannington 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Hannington 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# Hannington, North Hampshire
++# UK, Hannington
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+ T 706000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 650167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 626167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 674167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 658167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 634167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Hastings dvb-apps/util/scan/dvb-t/uk-Hastings
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Hastings 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Hastings 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Hastings
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 521833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 474000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 497833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 810000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Heathfield dvb-apps/util/scan/dvb-t/uk-Heathfield
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Heathfield 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Heathfield 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Heathfield
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 538000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 689833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 681833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 713833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-HemelHempstead dvb-apps/util/scan/dvb-t/uk-HemelHempstead
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-HemelHempstead 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-HemelHempstead 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Hemel Hempstead
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 690167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 746000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 786167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 777833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 802000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 826000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-HuntshawCross dvb-apps/util/scan/dvb-t/uk-HuntshawCross
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-HuntshawCross 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-HuntshawCross 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,13 @@
++# UK, Huntshaw Cross
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 737833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 769833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 793833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 817833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 729833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 761833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++# UK, Huntshaw Cross B
++T 714000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 682000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Idle dvb-apps/util/scan/dvb-t/uk-Idle
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Idle 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Idle 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Idle
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 578000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 754000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KeelylangHill dvb-apps/util/scan/dvb-t/uk-KeelylangHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KeelylangHill 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-KeelylangHill 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Keelylang Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 690167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 722167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 634167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 658167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Keighley dvb-apps/util/scan/dvb-t/uk-Keighley
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Keighley 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Keighley 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Keighley
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 850000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 834000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 729833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KilveyHill dvb-apps/util/scan/dvb-t/uk-KilveyHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KilveyHill 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-KilveyHill 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Kilvey Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 505833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 481833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 529833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 561833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KnockMore dvb-apps/util/scan/dvb-t/uk-KnockMore
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-KnockMore 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-KnockMore 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Knock More
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 546167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 762167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 753833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Lancaster dvb-apps/util/scan/dvb-t/uk-Lancaster
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Lancaster 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Lancaster 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Lancaster
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 506167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-LarkStoke dvb-apps/util/scan/dvb-t/uk-LarkStoke
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-LarkStoke 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-LarkStoke 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Lark Stoke
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 554000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 498167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 522167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 762000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Limavady dvb-apps/util/scan/dvb-t/uk-Limavady
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Limavady 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Limavady 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Limavady
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 842000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 769833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 761833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 786167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 810167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Llanddona dvb-apps/util/scan/dvb-t/uk-Llanddona
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Llanddona 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Llanddona 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Llanddona
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 706000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 738167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 770167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 794167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 818167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 674000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Malvern dvb-apps/util/scan/dvb-t/uk-Malvern
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Malvern 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Malvern 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Malvern
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 722167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 618000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 682000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 658000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 714000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 634000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Mendip dvb-apps/util/scan/dvb-t/uk-Mendip
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Mendip 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Mendip 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Mendip
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 778167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 746167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 802167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 826167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 754167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 842000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Midhurst dvb-apps/util/scan/dvb-t/uk-Midhurst
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Midhurst 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Midhurst 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Midhurst
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 754167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 826167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 802167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 778167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 817833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 786167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Moel-y-Parc dvb-apps/util/scan/dvb-t/uk-Moel-y-Parc
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Moel-y-Parc 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Moel-y-Parc 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Moel-y-Parc
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 770000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 794000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 818000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Nottingham dvb-apps/util/scan/dvb-t/uk-Nottingham
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Nottingham 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Nottingham 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Nottingham
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 842000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 810000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 538000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 778000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-OliversMount dvb-apps/util/scan/dvb-t/uk-OliversMount
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-OliversMount 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-OliversMount 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Oliver's Mount
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 698000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 842167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 738167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 770167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 794167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 818167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Oxford dvb-apps/util/scan/dvb-t/uk-Oxford
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Oxford 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Oxford 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# Oxford
++# UK, Oxford
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 578000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 850000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 713833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 721833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 538000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-PendleForest dvb-apps/util/scan/dvb-t/uk-PendleForest
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-PendleForest 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-PendleForest 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Pendle Forest
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 497833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 521833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 545833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Plympton dvb-apps/util/scan/dvb-t/uk-Plympton
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Plympton 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Plympton 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Plympton
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 722000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 842167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 833833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 785833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 809833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 754000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-PontopPike dvb-apps/util/scan/dvb-t/uk-PontopPike
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-PontopPike 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-PontopPike 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# Pontop Pike, UK
++# UK, Pontop Pike
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 690000000 8MHz 1/2 NONE QAM16 2k 1/32 NONE
++T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 746167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 778167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 802167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 826167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 729833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Pontypool dvb-apps/util/scan/dvb-t/uk-Pontypool
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Pontypool 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Pontypool 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Pontypool
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 722000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 690000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 642000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 482167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Presely dvb-apps/util/scan/dvb-t/uk-Presely
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Presely 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Presely 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Presely
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 714167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 618000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 641833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 665833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Redruth dvb-apps/util/scan/dvb-t/uk-Redruth
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Redruth 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Redruth 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# Redruth, Cornwall
++# UK, Redruth
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+ T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 642167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 666167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 697833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 650167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 705833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Reigate dvb-apps/util/scan/dvb-t/uk-Reigate
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Reigate 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Reigate 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# Reigate
++# UK, Reigate
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 554000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 554000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 474000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 498000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 522000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 618167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 834000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-RidgeHill dvb-apps/util/scan/dvb-t/uk-RidgeHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-RidgeHill 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-RidgeHill 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Ridge Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 730000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 762000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 786000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 810000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rosemarkie dvb-apps/util/scan/dvb-t/uk-Rosemarkie
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rosemarkie 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Rosemarkie 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Rosemarkie
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 714167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 633833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 657833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 674167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 706167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rosneath dvb-apps/util/scan/dvb-t/uk-Rosneath
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rosneath 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Rosneath 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Rosneath
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 842000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 729833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 761833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 785833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 809833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rowridge dvb-apps/util/scan/dvb-t/uk-Rowridge
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Rowridge 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Rowridge 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# Rowridge, Isle of Wight
++# UK, Rowridge
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 489833333 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 489833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 530000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 545833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 513833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-RumsterForest dvb-apps/util/scan/dvb-t/uk-RumsterForest
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-RumsterForest 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-RumsterForest 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Rumster Forest
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 530167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 482167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 506167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 562167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 802000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 778000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Saddleworth dvb-apps/util/scan/dvb-t/uk-Saddleworth
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Saddleworth 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Saddleworth 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Saddleworth
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 682000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 633833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 657833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 713833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 618167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Salisbury dvb-apps/util/scan/dvb-t/uk-Salisbury
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Salisbury 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Salisbury 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Salisbury
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 745833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 753833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 777833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 801833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 826000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 721833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-SandyHeath dvb-apps/util/scan/dvb-t/uk-SandyHeath
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-SandyHeath 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-SandyHeath 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# Sandy Heath
++# UK, Sandy Heath
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 641833334 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 641833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 665833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 650167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 842000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 626167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 674167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Selkirk dvb-apps/util/scan/dvb-t/uk-Selkirk
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Selkirk 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Selkirk 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Selkirk
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 730167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 762167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 786167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 810167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 834167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 754167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Sheffield dvb-apps/util/scan/dvb-t/uk-Sheffield
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Sheffield 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Sheffield 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Sheffield
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 730000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 762000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 786000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-StocklandHill dvb-apps/util/scan/dvb-t/uk-StocklandHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-StocklandHill 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-StocklandHill 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Stockland Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 481833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 529833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 505833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 561833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 546167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Storeton dvb-apps/util/scan/dvb-t/uk-Storeton
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Storeton 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Storeton 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,10 @@
+-# Storeton, Wirral
++# UK, Storeton
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+ T 546167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 490167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 514167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 538167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Sudbury dvb-apps/util/scan/dvb-t/uk-Sudbury
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Sudbury 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Sudbury 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++# UK, Sudbury
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 698167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 850000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 690167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 738000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 706167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++# UK, Sudbury B
++T 754000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-SuttonColdfield dvb-apps/util/scan/dvb-t/uk-SuttonColdfield
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-SuttonColdfield 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-SuttonColdfield 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Sutton Coldfield
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 634167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 658167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 682167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 714167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 722167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 746000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Tacolneston dvb-apps/util/scan/dvb-t/uk-Tacolneston
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Tacolneston 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Tacolneston 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Tacolneston
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 810000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 786000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 730167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 769833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 794000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 818000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-TheWrekin dvb-apps/util/scan/dvb-t/uk-TheWrekin
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-TheWrekin 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-TheWrekin 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,15 @@
++# UK, The Wrekin
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 554000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 498167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 522167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 730000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 762000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++# UK, The Wrekin B
++T 618167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 698000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 642000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Torosay dvb-apps/util/scan/dvb-t/uk-Torosay
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Torosay 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Torosay 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Torosay
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 490167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 514167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 538167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 570167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 474000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 553833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-TunbridgeWells dvb-apps/util/scan/dvb-t/uk-TunbridgeWells
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-TunbridgeWells 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-TunbridgeWells 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Tunbridge Wells
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 746000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 794000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 642167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 666167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 618000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 778000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Waltham dvb-apps/util/scan/dvb-t/uk-Waltham
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Waltham 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Waltham 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Waltham
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 698000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 490000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 514000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 570000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 666000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 642000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Wenvoe dvb-apps/util/scan/dvb-t/uk-Wenvoe
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-Wenvoe 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-Wenvoe 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Wenvoe
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 546000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 578000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 625833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 705833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 649833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 673833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-WhitehawkHill dvb-apps/util/scan/dvb-t/uk-WhitehawkHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-WhitehawkHill 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-WhitehawkHill 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,10 @@
++# UK, Whitehawk Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 834000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 706000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 746000000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 690000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 770167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 794167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-WinterHill dvb-apps/util/scan/dvb-t/uk-WinterHill
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/uk-WinterHill 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/uk-WinterHill 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,13 @@
+-# Winter Hill, North-West England
++# UK, Winter Hill
++# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
++# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
+ # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
+-T 754166670 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 754167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 834167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 850167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
++T 842167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 786167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 810167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++# UK, Winter Hill B
++T 650000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
++T 626000000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/vn-Hanoi dvb-apps/util/scan/dvb-t/vn-Hanoi
+--- linuxtv-dvb-apps-1.1.1/util/scan/dvb-t/vn-Hanoi 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/dvb-t/vn-Hanoi 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,5 @@
++# Hanoi - Vietnam - DVB-T by VTC
++# contributed by Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
++# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
++T 514000000 8MHz 3/4 NONE QAM64 2k 1/32 NONE
++T 578000000 8MHz 3/4 NONE QAM64 2k 1/32 NONE
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/list.h dvb-apps/util/scan/list.h
+--- linuxtv-dvb-apps-1.1.1/util/scan/list.h 2006-05-18 01:33:27.000000000 +0200
++++ dvb-apps/util/scan/list.h 2009-06-21 13:29:06.000000000 +0200
+@@ -26,7 +26,7 @@
+ } while (0)
+
+ /*
+- * Insert a new entry between two known consecutive entries.
++ * Insert a new entry between two known consecutive entries.
+ *
+ * This is only for internal list manipulation where we know
+ * the prev/next entries already!
+@@ -98,7 +98,7 @@
+ static __inline__ void list_del_init(struct list_head *entry)
+ {
+ __list_del(entry->prev, entry->next);
+- INIT_LIST_HEAD(entry);
++ INIT_LIST_HEAD(entry);
+ }
+
+ /**
+@@ -126,7 +126,7 @@
+ */
+ #define list_for_each(pos, head) \
+ for (pos = (head)->next; pos != (head); pos = pos->next)
+-
++
+ /**
+ * list_for_each_safe - iterate over a list safe against removal of list entry
+ * @pos: the &struct list_head to use as a loop counter.
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/lnb.c dvb-apps/util/scan/lnb.c
+--- linuxtv-dvb-apps-1.1.1/util/scan/lnb.c 2006-05-18 01:33:25.000000000 +0200
++++ dvb-apps/util/scan/lnb.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,6 +1,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <linux/types.h>
+ #include "lnb.h"
+
+ static char *univ_desc[] = {
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/lnb.h dvb-apps/util/scan/lnb.h
+--- linuxtv-dvb-apps-1.1.1/util/scan/lnb.h 2006-05-18 01:33:27.000000000 +0200
++++ dvb-apps/util/scan/lnb.h 2009-06-21 13:29:06.000000000 +0200
+@@ -1,4 +1,3 @@
+-
+ struct lnb_types_st {
+ char *name;
+ char **desc;
+@@ -21,4 +20,3 @@
+
+ int
+ lnb_decode(char *str, struct lnb_types_st *lnbp);
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/Makefile dvb-apps/util/scan/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/scan/Makefile 2006-05-18 01:34:53.000000000 +0200
++++ dvb-apps/util/scan/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,21 +1,41 @@
++# Makefile for linuxtv.org dvb-apps/util/scan
+
+-CC = gcc
+-CFLAGS = -MD -g -Wall -O2 -I../../include
+-LFLAGS = -g -Wall
++objects = atsc_psip_section.o \
++ diseqc.o \
++ dump-vdr.o \
++ dump-zap.o \
++ lnb.o \
++ scan.o \
++ section.o
+
+-OBJS = diseqc.o dump-zap.o dump-vdr.o scan.o lnb.o section.o atsc_psip_section.o
+-SRCS = $(OBJS:.o=.c)
++binaries = scan
+
+-TARGET = scan
++inst_bin = $(binaries)
+
+-$(TARGET): $(OBJS)
+- $(CC) $(LFLAGS) -o $(TARGET) $(OBJS)
++removing = atsc_psip_section.c atsc_psip_section.h
+
+-.c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++CPPFLAGS += -DDATADIR=\"$(prefix)/share\"
+
+-clean:
+- $(RM) *.o *.d $(TARGET)
++.PHONY: all
+
+--include $(wildcard *.d) dummy
++all: $(binaries)
++
++$(binaries): $(objects)
+
++$(objects): atsc_psip_section.c atsc_psip_section.h
++
++atsc_psip_section.c atsc_psip_section.h:
++ perl section_generate.pl atsc_psip_section.pl
++
++include ../../Make.rules
++
++install::
++ @echo installing scan files
++ @mkdir -p $(DESTDIR)$(sharedir)/dvb/atsc
++ @mkdir -p $(DESTDIR)$(sharedir)/dvb/dvb-c
++ @mkdir -p $(DESTDIR)$(sharedir)/dvb/dvb-s
++ @mkdir -p $(DESTDIR)$(sharedir)/dvb/dvb-t
++ @install -m 664 atsc/* $(DESTDIR)$(sharedir)/dvb/atsc/
++ @install -m 664 dvb-c/* $(DESTDIR)$(sharedir)/dvb/dvb-c/
++ @install -m 664 dvb-s/* $(DESTDIR)$(sharedir)/dvb/dvb-s/
++ @install -m 664 dvb-t/* $(DESTDIR)$(sharedir)/dvb/dvb-t/
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/README dvb-apps/util/scan/README
+--- linuxtv-dvb-apps-1.1.1/util/scan/README 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/scan/README 2009-06-21 13:29:06.000000000 +0200
+@@ -1,18 +1,20 @@
+-Hi,
++This is a little channel scan utility to generate szap/tzap/czap/azap
++compatible channel lists. An atsc/dvbscan does not do a frequency scan, however,
++so you must manually provide the data for tuning to one or more start
++transponders. A number of initial-tuning-data files are provided for various
++dvb-c, dvb-s, dvb-t and atsc networks around the world. If you make a new one
++feel free to submit it to the linux-dvb mailing list
++http://www.linuxtv.org/lists.php.
+
+-this is a little channel scan utility to generate szap/tzap/czap compatible
+-channel lists. Scan does not do a frequency scan, however, so you must
+-manually provide the data for tuning to one or more start transponders.
+-A number of initial-tuning-data files are provided for various dvb-c, dvb-s
+-and dvb-t networks around the world. If you make a new one feel free to
+-submit it to the linux-dvb mailing list http://linuxtv.org/mailinglists.xml.
++Basic usage: ./dvbscan dvb-s/Astra-19.2E | tee mychannels.conf
++or ./atscscan atsc/us-NTSC-center-frequencies-8VSB
+
+-Basic usage: ./scan dvb-s/Astra-19.2E | tee mychannels.conf
++If you want it to check a specific frequency, tune to that frequency
++(e.g. using szap/tzap/czap/azap) and then use './dvbscan -c' or './atscscan -c'.
+
+-If you want it to check a specific frequency, tune to that frequency
+-(e.g. using szap/tzap/czap) and then use './scan -c'.
++For more scan options see ./dvbscan -h or ./atscscan -h
+
+-For more scan options see ./scan -h.
++atscscan is _just_ a copy of dvbscan to not confuse ATSC-user.
+
+ Good luck,
+-Holger + Johannes
++Holger + Johannes + Patrick (beat me for ATSC)
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/scan.c dvb-apps/util/scan/scan.c
+--- linuxtv-dvb-apps-1.1.1/util/scan/scan.c 2006-05-18 01:33:25.000000000 +0200
++++ dvb-apps/util/scan/scan.c 2009-06-21 13:29:06.000000000 +0200
+@@ -61,9 +61,9 @@
+ static int vdr_dump_channum;
+ static int no_ATSC_PSIP;
+ static int ATSC_type=1;
+-static int ca_select = 1;
++static int ca_select = -1;
+ static int serv_select = 7;
+-static int vdr_version = 2;
++static int vdr_version = 3;
+ static struct lnb_types_st lnb_type;
+ static int unique_anon_services;
+
+@@ -130,6 +130,7 @@
+ struct list_head list;
+ struct list_head services;
+ int network_id;
++ int original_network_id;
+ int transport_stream_id;
+ enum fe_type type;
+ struct dvb_frontend_parameters param;
+@@ -236,6 +237,7 @@
+ static void copy_transponder(struct transponder *d, struct transponder *s)
+ {
+ d->network_id = s->network_id;
++ d->original_network_id = s->original_network_id;
+ d->transport_stream_id = s->transport_stream_id;
+ d->type = s->type;
+ memcpy(&d->param, &s->param, sizeof(d->param));
+@@ -755,12 +757,15 @@
+ switch (buf[0]) {
+ case 0x01:
+ case 0x02:
++ case 0x1b: /* H.264 video stream */
+ moreverbose(" VIDEO : PID 0x%04x\n", elementary_pid);
+ if (s->video_pid == 0)
+ s->video_pid = elementary_pid;
+ break;
+ case 0x03:
+ case 0x81: /* Audio per ATSC A/53B [2] Annex B */
++ case 0x0f: /* ADTS Audio Stream - usually AAC */
++ case 0x11: /* ISO/IEC 14496-3 Audio with LATM transport */
+ case 0x04:
+ moreverbose(" AUDIO : PID 0x%04x\n", elementary_pid);
+ if (s->audio_num < AUDIO_CHAN_MAX) {
+@@ -772,6 +777,12 @@
+ warning("more than %i audio channels, truncating\n",
+ AUDIO_CHAN_MAX);
+ break;
++ case 0x07:
++ moreverbose(" MHEG : PID 0x%04x\n", elementary_pid);
++ break;
++ case 0x0B:
++ moreverbose(" DSM-CC : PID 0x%04x\n", elementary_pid);
++ break;
+ case 0x06:
+ if (find_descriptor(0x56, buf + 5, ES_info_len, NULL, NULL)) {
+ moreverbose(" TELETEXT : PID 0x%04x\n", elementary_pid);
+@@ -860,6 +871,7 @@
+ memset(&tn, 0, sizeof(tn));
+ tn.type = -1;
+ tn.network_id = network_id;
++ tn.original_network_id = (buf[2] << 8) | buf[3];
+ tn.transport_stream_id = transport_stream_id;
+
+ parse_descriptors (NIT, buf + 6, descriptors_loop_len, &tn);
+@@ -1462,21 +1474,34 @@
+ }
+
+ if (t->type == FE_QPSK) {
+- int hiband = 0;
++ if (lnb_type.high_val) {
++ if (lnb_type.switch_val) {
++ /* Voltage-controlled switch */
++ int hiband = 0;
+
+- if (lnb_type.switch_val && lnb_type.high_val &&
+- p.frequency >= lnb_type.switch_val)
+- hiband = 1;
++ if (p.frequency >= lnb_type.switch_val)
++ hiband = 1;
+
+- setup_switch (frontend_fd,
+- switch_pos,
+- t->polarisation == POLARISATION_VERTICAL ? 0 : 1,
+- hiband);
+- usleep(50000);
+- if (hiband)
+- p.frequency = abs(p.frequency - lnb_type.high_val);
+- else
++ setup_switch (frontend_fd,
++ switch_pos,
++ t->polarisation == POLARISATION_VERTICAL ? 0 : 1,
++ hiband);
++ usleep(50000);
++ if (hiband)
++ p.frequency = abs(p.frequency - lnb_type.high_val);
++ else
++ p.frequency = abs(p.frequency - lnb_type.low_val);
++ } else {
++ /* C-Band Multipoint LNBf */
++ p.frequency = abs(p.frequency - (t->polarisation == POLARISATION_VERTICAL ?
++ lnb_type.low_val: lnb_type.high_val));
++ }
++ } else {
++ /* Monopoint LNBf without switch */
+ p.frequency = abs(p.frequency - lnb_type.low_val);
++ }
++ if (verbosity >= 2)
++ dprintf(1,"DVB-S IF freq is %d\n",p.frequency);
+ }
+
+ if (ioctl(frontend_fd, FE_SET_FRONTEND, &p) == -1) {
+@@ -1991,7 +2016,7 @@
+ //FIXME: s->subtitling_pid
+ s->ac3_pid,
+ s->service_id,
+- t->network_id,
++ t->original_network_id,
+ s->transport_stream_id,
+ t->orbital_pos,
+ t->we_flag,
+@@ -2066,14 +2091,15 @@
+ " -5 multiply all filter timeouts by factor 5\n"
+ " for non-DVB-compliant section repitition rates\n"
+ " -o fmt output format: 'zap' (default), 'vdr' or 'pids' (default with -c)\n"
+- " -x N Conditional Axcess, (default 1)\n"
++ " -x N Conditional Access, (default -1)\n"
+ " N=0 gets only FTA channels\n"
++ " N=-1 gets all channels\n"
+ " N=xxx sets ca field in vdr output to :xxx:\n"
+ " -t N Service select, Combined bitfield parameter.\n"
+ " 1 = TV, 2 = Radio, 4 = Other, (default 7)\n"
+ " -p for vdr output format: dump provider name\n"
+- " -e N VDR version, default 2 for VDR-1.2.x\n"
+- " ANYTHING ELSE GIVES NONZERO NIT and TID\n"
++ " -e N VDR version, default 3 for VDR-1.3.x and newer\n"
++ " value 2 sets NIT and TID to zero\n"
+ " Vdr version 1.3.x and up implies -p.\n"
+ " -l lnb-type (DVB-S Only) (use -l help to print types) or \n"
+ " -l low[,high[,switch]] in Mhz\n"
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/scan.h dvb-apps/util/scan/scan.h
+--- linuxtv-dvb-apps-1.1.1/util/scan/scan.h 2006-05-18 01:33:27.000000000 +0200
++++ dvb-apps/util/scan/scan.h 2009-06-21 13:29:06.000000000 +0200
+@@ -26,4 +26,3 @@
+ #define verbosedebug(msg...) dpprintf(6, msg)
+
+ #endif
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/scan/section_generate.pl dvb-apps/util/scan/section_generate.pl
+--- linuxtv-dvb-apps-1.1.1/util/scan/section_generate.pl 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/scan/section_generate.pl 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,92 @@
++#!/usr/bin/perl -w
++
++use strict;
++
++die "no section perl file given" unless @ARGV;
++
++my $h = require($ARGV[0]);
++
++our $basename;
++our $debug = $ARGV[1];
++
++($basename) = $ARGV[0] =~ /([a-zA-Z0-9_\-_]+).pl/;
++
++local *H;
++local *C;
++
++h_header();
++c_header();
++
++foreach (sort keys %{$h}) {
++ foreach my $item (@{$h->{$_}}) {
++ if ($_ eq "descriptors") {
++ printf H ("#define %s_ID 0x%02X\n",uc($item->{name}),$item->{id});
++ }
++
++ do_it ($item->{name},$item->{elements});
++ }
++}
++
++h_footer();
++c_footer();
++
++sub type
++{
++ if ($_[0] > 16) {
++ return "u32";
++ } elsif ($_[0] > 8) {
++ return "u16";
++ } else {
++ return "u8 ";
++ }
++}
++
++sub do_it
++{
++ my ($name,$val) = @_;
++ print H "struct $name {\n";
++
++ print C <<EOL;
++struct $name read_$name(const u8 *b)
++{
++ struct $name v;
++EOL
++ my $offs = 0;
++ for (my $i = 0; $i < scalar @{$val}; $i+=2) {
++ printf H ("\t\t%s %-25s :%2d;\n",type($val->[$i+1]),$val->[$i],$val->[$i+1]);
++
++ printf C ("\tv.%-25s = getBits(b,%3d,%2d);\n",$val->[$i],$offs,$val->[$i+1]);
++ printf C ("\tfprintf(stderr,\" %s = %%x %%d\\n\",v.%s,v.%s);\n",$val->[$i],$val->[$i],$val->[$i]) if $debug;
++ $offs += $val->[$i+1];
++ }
++ print H "} PACKED;\n";
++ print H "struct $name read_$name(const u8 *);\n\n";
++
++ print C "\treturn v;\n}\n\n"
++}
++
++sub h_header
++{
++ open(H,">$basename.h");
++ print H "#ifndef __".uc($basename)."_H_\n";
++ print H "#define __".uc($basename)."_H_\n\n";
++ print H "#include \"section.h\"\n\n";
++}
++
++sub c_header
++{
++ open(C,">$basename.c");
++ print C "#include \"$basename.h\"\n\n";
++}
++
++
++sub c_footer
++{
++ close(C);
++}
++
++sub h_footer
++{
++ print H "#endif\n";
++ close(H);
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/azap.c dvb-apps/util/szap/azap.c
+--- linuxtv-dvb-apps-1.1.1/util/szap/azap.c 2006-05-18 01:31:40.000000000 +0200
++++ dvb-apps/util/szap/azap.c 2009-06-21 13:29:06.000000000 +0200
+@@ -103,7 +103,10 @@
+ return -3; /* to fit in 32 bit */
+ };
+
++ errno = 0;
+ *val = strtol(number, NULL, 10);
++ if (errno == ERANGE)
++ return -4;
+
+ return 0;
+ }
+@@ -189,9 +192,9 @@
+
+ if ((err = try_parse_param(fd,
+ modulation_list, LIST_SIZE(modulation_list),
+- (int *) &frontend->u.vsb.modulation,
+- "modulation")))
++ &tmp, "modulation")))
+ return -4;
++ frontend->u.vsb.modulation = tmp;
+
+ if ((err = try_parse_int(fd, vpid, "Video PID")))
+ return -5;
+@@ -389,4 +392,3 @@
+
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/atsc/make_atsc_chanconf.pl dvb-apps/util/szap/channels-conf/atsc/make_atsc_chanconf.pl
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/atsc/make_atsc_chanconf.pl 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/atsc/make_atsc_chanconf.pl 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,110 @@
++#!/usr/bin/perl
++
++# Angel Li sent me this script to help in setting up a
++# ~/.azap/channels.conf file automagicly. This probbably
++# isn't the final version
++
++ use LWP;
++ use HTML::Form;
++ use HTTP::Cookies;
++ use XML::XPath;
++ use XML::XPath::XMLParser;
++
++ #$DEBUG = 1;
++
++ #
++ # Center frequencies for NTSC channels
++ #
++ @ntsc = (
++ 0, 0, 57, 63, 69, 79, 85, 177, 183, 189,
++ 195, 201, 207, 213, 473, 479, 485, 491, 497, 503,
++ 509, 515, 521, 527, 533, 539, 545, 551, 557, 563,
++ 569, 575, 581, 587, 593, 599, 605, 611, 617, 623,
++ 629, 635, 641, 647, 653, 659, 665, 671, 677, 683,
++ 689, 695, 701, 707, 713, 719, 725, 731, 737, 743,
++ 749, 755, 761, 767, 773, 779, 785, 791, 797, 803,
++ );
++
++ $ZIPCODE = 'txtZipcode';
++ $XML = 'stationXml';
++ $WEBSITE = 'http://www.antennaweb.org';
++
++ $zipCode = $ARGV[0];
++ unless ($zipCode) {
++ die "Zipcode missing on the command line";
++ }
++ unless ($zipCode =~ /^\d\d\d\d\d$/) {
++ die "Illegal zipcode: $zipCode";
++ }
++
++ $ua = LWP::UserAgent->new;
++ $ua->cookie_jar({});
++ push @{$ua->requests_redirectable}, 'POST';
++ $response = $ua->get($WEBSITE);
++ if ($response->is_success) {
++ $form = HTML::Form->parse($response);
++ $request = $form->click("btnStart");
++ $response2 = $ua->request($request);
++ if ($response2->is_success) {
++ $form2 = HTML::Form->parse($response2);
++ $form2->param($ZIPCODE, $zipCode);
++ $request2 = $form2->click("btnSubmit");
++ $response3 = $ua->request($request2);
++ $form3 = HTML::Form->parse($response3);
++ $request3 = $form3->click("btnContinue");
++ $response4 = $ua->request($request3);
++ if ($response4->is_success) {
++ $form4 = HTML::Form->parse($response4);
++ $xml = $form4->value($XML);
++ $xml =~ s/%22/"/g;
++ $xml =~ s/%2c/,/g;
++ $xml =~ s/%2f/\//g;
++ $xml =~ s/%3c/</g;
++ $xml =~ s/%3d/=/g;
++ $xml =~ s/%3e/>/g;
++ $xml =~ s/\+/ /g;
++ genConf($xml);
++ exit(0);
++ }
++ else {
++ print STDERR "Could not submit zipcode: $zipCode\n";
++ die $response3->status_line;
++ }
++ }
++ print STDERR "Could not reach zipcode page";
++ die $response2->status_line;
++ }
++ else {
++ print STDERR "Error reaching $WEBSITE\n";
++ die $response->status_line;
++ }
++
++ sub genConf {
++ my($xml) = @_;
++ my($s);
++ my($callSign);
++ my($channel);
++ my($c);
++ my($psipChannel);
++ my($freq);
++
++ $xp = XML::XPath->new(xml => $xml);
++ foreach $s ($xp->find('//Station[BroadcastType="D"]')->get_nodelist) {
++ if ($s->find('LiveStatus')->string_value eq "1") {
++ $callSign = $s->find('CallSign')->string_value;
++ $callSign =~ s/-DT//;
++ $channel = $s->find('Channel')->string_value; # Channel to tune
++ $psipChannel = $s->find('PsipChannel')->string_value;
++
++ if ($DEBUG) {
++ print STDERR $callSign, "\t", $channel, " -> ", $psipChannel, "\n";
++ }
++
++ $psipChannel =~ s/\.\d+$//;
++ $freq = $ntsc[$channel]*1000000;
++ if ($freq) {
++ print $callSign, ":", $freq, ":8VSB:0:0\n";
++ }
++ }
++ }
++ }
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/atsc/us-Raleigh-Durham dvb-apps/util/szap/channels-conf/atsc/us-Raleigh-Durham
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/atsc/us-Raleigh-Durham 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/atsc/us-Raleigh-Durham 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,8 @@
++# Most of the major channels in the Raleigh Durham Area. Frequencies the NTSC center freq.
++WRAL:707000000:8VSB:33:36
++WNCN:719000000:8VSB:49:52
++WTVD:701000000:8VSB:49:52
++WRAZ:683000000:8VSB:49:52
++WUNC:743000000:8VSB:49:52
++WRDU:551000000:8VSB:33:36
++WLFL:731000000:8VSB:33:36
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-c/de-Berlin dvb-apps/util/szap/channels-conf/dvb-c/de-Berlin
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-c/de-Berlin 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-c/de-Berlin 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,171 @@
++3sat:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:210:220
++ARD-Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1805
++CNBC:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:510:520
++DLF-Köln:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:810
++DLR-Berlin:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:710
++EinsExtra:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
++EinsFestival:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
++EinsMuXx:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
++EuroNews:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2221:2233
++Eurosport:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:410:420
++Fritz:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:901
++KiKa:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:310:320
++MDR FERNSEHEN:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:402
++MDR KULTUR:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:801
++MDR info:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1101
++MHP ARD Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:102
++NDR Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2401:2402
++ORB-Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
++RADIOmultikulti:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1301
++Radio 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:701
++SFB1:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
++SWR2:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1401
++SÃœDWEST BW:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:801:802
++SÃœDWEST RP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3101:3102
++WDR 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1501
++WDR 5:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1601
++ZDF:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:110:120
++ZDFdigitext:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++ZDFdokukanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:660:670
++ZDFinfokanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:610:620
++ZDFtheaterkanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++JUMP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1001
++SPUTNIK:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1201
++Österreich 1:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:169
++ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
++ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
++Adagio:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++All Jazz:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Avante:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:741:743
++B5 aktuell:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3101
++BBC Prime:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:761:762
++BData3:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++BData4:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++BData5:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++BR-alpha:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
++Barock Fantasie:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Bayerisches FS:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
++Bayern 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3601
++Bayern 4 Klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3001
++BibelTV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:731:732
++Bloomberg:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++CLASSICA:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
++COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:656
++Canal 24 Horas:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:991:992
++Club:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:711:713
++Cristal New Age:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++DANCE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:304
++DW-tv:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:634:632
++Das Erste:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
++Detskij Mir:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:931:932
++ERT-Sat:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:691:692
++Einstein TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
++Euronews:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:597:596
++Eurosport News:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:771:772
++Extreme Sports:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:791:793
++Extreme Sports:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Fashion TV:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:672
++Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:673
++GOLD:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:320
++HITLISTE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:784
++HR XXL:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3501
++JAZZ:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:640
++Jazz legends:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Kabel Wizard:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Kanal 7:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Kanal 7:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:49:52
++Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
++Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
++LATIN:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:368
++Landscape:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Leitseite:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2254:0
++Liberty TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:721:723
++MTV Base:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:781:782
++MV-Test:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Modem-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Movie Sounds:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Musica Antica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++Musica Camerata:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++NDR Info:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3701
++NTV international:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++NTVI:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:611:612
++Nashe Kino:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:621:622
++NordwestRadio:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3801
++OLD GOLD:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:336
++Opernfestival:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PCNE:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:681:682
++PREMIERE SPORT INTERACTIVE:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PREMIERE DIREKT 1:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PREMIERE DIREKT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PREMIERE DIREKT 3:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++PREMIERE DIREKT 4:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2815:2816
++PREMIERE EROTIK:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
++PREMIERE NOSTALGIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
++PREMIERE SERIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
++PREMIERE SPORT 1:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:258
++PREMIERE SPORT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
++PREMIERE START:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
++Parlamentsfernsehen:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:33:36
++Phoenix:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:901:902
++Portal:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++RTP Internacional:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:661:662
++Rai 1:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:951:952
++Rai 2:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:961:962
++Rai 3:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:971:972
++SCHLAGER:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
++SR 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3901
++SR Fernsehen Suedwest:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
++Show TV:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:911:912
++Sinfonica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++TGRT:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:921:922
++TM V1.0:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++TV Polonia:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:641:642
++TVEi:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:981:982
++TW1:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:751:752
++Test-R:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
++Travel:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:595:594
++VCR-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++VH1 Classic:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:604:603
++Videotext:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++WDR FERNSEHEN:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
++ZEE TV:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++arte:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:403
++hessen fernsehen:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
++hr-chronos:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3201
++hr-klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3401
++hr2:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3301
++13 TH STREET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
++ALTERNATIVE ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:544
++BEATE-UHSE.TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
++CHILLOUT:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:400
++CLASSIC ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
++DISCOVERY CHANNEL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
++DISNEY CHANNEL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
++DEUTSCHE HITS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:800
++EASY LISTENING:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:608
++Einstein:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++FILM & MUSICAL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
++FOX KIDS:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
++GOLDSTAR TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
++HARD ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:816
++HEIMATKANAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
++HIP HOP/R&B:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:576
++JUNIOR:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
++K-TOON:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
++KLASSIK POPULÄR:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:624
++KRIMI &CO:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
++LOVE SONGS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
++NEW COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
++ORCHESTRALE WERKE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:560
++PLANET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
++PREMIERE 1:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:511:512
++PREMIERE 2:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1793
++PREMIERE 3:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
++PREMIERE 4:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
++PREMIERE 5:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
++PREMIERE 6:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
++PREMIERE 7:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
++SOUL CLASSICS:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
++STUDIO UNIVERSAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2047:2048
++Sonnenklar TV:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/Astra-19.2E dvb-apps/util/szap/channels-conf/dvb-s/Astra-19.2E
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/Astra-19.2E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-s/Astra-19.2E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,226 @@
++Das Erste:11837:h:0:27500:101:102:28106
++ZDF:11954:h:0:27500:110:120:28006
++3sat:11954:h:0:27500:210:220:28007
++EinsMuXx:12110:h:0:27500:301:302:28203
++EinsFestival:12110:h:0:27500:201:202:28202
++EinsExtra:12110:h:0:27500:101:102:28201
++MDR FERNSEHEN:12110:h:0:27500:401:402:28204
++ORB-Fernsehen:12110:h:0:27500:501:502:28205
++B1 Berlin:12110:h:0:27500:601:602:28206
++SWR Fernsehen:11837:h:0:27500:801:802:28113
++SR Fernsehen Suedwes:11837:h:0:27500:501:502:28110
++hessen fernsehen:11837:h:0:27500:301:302:28108
++WDR FERNSEHEN:11837:h:0:27500:601:602:28111
++Bayerisches FS:11837:h:0:27500:201:202:28107
++N3:12110:h:0:27500:2401:2402:28224
++BR-alpha:11837:h:0:27500:701:702:28112
++KiKa:11954:h:0:27500:310:320:28008
++arte:11836:h:0:27500:401:402:28109
++ZDF Theaterkanal:11954:h:0:27500:1110:1120:28016
++ZDF.info:11954:h:0:27500:610:620:28011
++ZDF.doku:11954:h:0:27500:660:670:28014
++Phoenix:11837:h:0:27500:901:902:28114
++DW-tv:10786:v:0:21997:305:306:9005
++RTL Television:12188:h:0:27500:163:104:12003
++SAT.1:12480:v:0:27500:1791:1792:46
++ProSieben:12480:v:0:27500:255:256:898
++RTL2:12188:h:0:27500:166:128:12020
++Super RTL:12188:h:0:27500:165:120:12040
++KABEL1:12480:v:0:27500:511:512:899
++VOX:12188:h:0:27500:167:136:12060
++tm3:12480:v:0:27500:767:768:897
++Bloomberg TV Germany:12552:v:0:22000:162:99:12160
++EuroNews:11954:h:0:27500:2221:2233:28015
++N24:12480:v:0:27500:2047:2048:47
++n-tv:12670:v:0:22000:162:96:12730
++DSF:12480:v:0:27500:1023:1024:900
++Eurosport:11954:h:0:27500:410:420:28009
++Via 1 - Sch ner Re:12148:h:0:27500:511:512:44
++Home Order Tel:12480:v:0:27500:1279:1280:40
++QVC GERMANY:12552:v:0:22000:165:166:12100
++TW 1:12692:h:0:22000:166:167:13013
++Canal Canarias:12441:v:0:27500:513:681:29700
++ProSieben A:12051:v:0:27500:161:84:20002
++ProSieben CH:12051:v:0:27500:289:290:20001
++Kabel 1 Austria:12051:v:0:27500:166:167:20004
++Kabel 1 Schweiz:12051:v:0:27500:162:163:20003
++CNN Int.:12168:v:0:27500:165:100:28512
++Sky News:12552:v:0:22000:305:306:3995
++Travel:12168:v:0:27500:163:92:28001
++AB SAT / XXL:12266:h:0:27500:164:96:17004
++MOTEURS:12266:h:0:27500:160:80:17000
++HOT GM:12148:h:0:27500:767:768:45
++KTO:12129:v:0:27500:170:120:8411
++LA CINQUIEME:12207:v:0:27500:160:80:8501
++LCP:12207:v:0:27500:165:100:8506
++LibertyTV.com:12611:v:0:22000:941:942:12280
++TV5 Europe:12611:v:0:22000:45:46:12240
++Motors TV:12611:v:0:22000:191:194:12300
++Wishline:12611:v:0:22000:214:216:12320
++TV 5:10786:v:0:21997:164:112:9001
++RTM - MAROC:10786:v:0:21997:162:96:9002
++ESC1 - EGYPTE:10786:v:0:21997:163:104:9003
++RAI 1:10786:v:0:21997:289:290:9004
++RTPI:10786:v:0:21997:300:301:9006
++TV7:10786:v:0:21997:166:128:9007
++ARTE:10786:v:0:21997:167:136:9009
++Colourbars:12611:v:0:22000:48:49:3982
++Alice:12611:v:0:22000:162:96:12200
++Video Italia:12611:v:0:22000:121:122:12220
++ANDALUCIA TV:11934:v:0:27500:166:104:29011
++TVC INT.:12441:v:0:27500:512:660:29701
++TV4:11992:h:0:27500:165:98:20365
++TV Niepokalanow:11876:h:0:27500:161:82:20601
++VIVA:12670:v:0:22000:309:310:12732
++VIVA ZWEI:12552:v:0:22000:171:172:12120
++MTV Central:12699:v:0:22000:3031:3032:28643
++ONYX:12692:h:1:27500:161:84:502
++VIVA polska:11603:h:1:27500:190:191:611
++DeeJay TV:11603:h:1:27500:160:161:602
++NBC:11053:h:1:27500:550:551:8008
++EWTN:10722:h:1:29900:1001:1201:4601
++MTA INTL:10722:h:1:29900:1004:1204:4604
++VOX:11053:h:1:27500:500:501:8002
++SAT.1 A:11053:h:1:27500:511:512:8003
++RTL2 AUSTRIA:11053:h:1:27500:520:521:8004
++ZDF:11053:h:1:27500:570:571:8011
++K-TV:11053:h:1:27500:580:581:8012
++RTL Television:11053:h:1:27500:160:80:8001
++ARTE:11059:v:1:6510:98:99:1
++HOT Italia:11095:h:1:27500:4194:4195:3714
++Olisat:11095:h:1:27500:33:34:3718
++VIVA-POLSKA:11128:h:1:4340:98:99:1
++DW-tv:11195:v:1:9099:101:102:5301
++Canal 24 Horas:11203:h:1:3999:4130:4131:5301
++TV5:11337:v:1:5631:512:640:1
++SAT.1 CH:11603:h:1:27500:101:102:601
++KurdSat:11603:h:1:27500:111:112:603
++ARD "Das Erste":11603:h:1:27500:172:173:606
++RTL 2 CH:11603:h:1:27500:175:176:609
++Super RTL A:11603:h:1:27500:180:181:610
++TV ROMANIA:11622:v:1:27500:227:247:10707
++MRTV:11622:v:1:27500:222:242:10702
++102.5 HIT Ch:11622:v:1:27500:224:244:10704
++TLC SAT:11622:v:1:27500:225:245:10705
++PRO-SAT:11622:v:1:27500:246:226:10706
++Channel SUN:11622:v:1:27500:229:249:10709
++Racing Channel:11622:v:1:27500:228:248:10708
++3 ABN:11622:v:1:27500:221:241:10701
++Bloom.Germany:11642:h:1:27500:1460:1420:4
++Bloomberg TV UK:11642:h:1:27500:1560:1520:4
++Sat 7:11642:h:1:27500:1660:1620:4
++EDTV 1:11746:h:1:27500:4130:4131:9501
++EDTV SPORT:11746:h:1:27500:4386:4387:9502
++EDTV BUSINESS:11746:h:1:27500:4642:4643:9503
++EDTV DRAMA:11746:h:1:27500:4898:4899:9504
++RAI1:11765:v:1:27499:160:80:3401
++RAI2:11765:v:1:27499:161:84:3402
++RAI3:11765:v:1:27499:162:88:3403
++RaiWayTEST2:11765:v:1:27499:516:654:3405
++RAIMOSAICO:11765:v:1:27499:518:8191:3407
++RAINews24:11803:v:1:27500:516:654:3301
++CAMERA DEPUTATI:11803:v:1:27500:517:655:3302
++TELEPACE:11803:v:1:27500:515:653:3304
++RAISPORTSAT:11803:v:1:27500:512:650:3305
++RAINettunoSAT2:11803:v:1:27500:513:651:3306
++RAIeducational:11803:v:1:27500:514:652:3307
++RAINettunoSAT1:11803:v:1:27500:519:657:3308
++SAT2000:11803:v:1:27500:518:656:3309
++I1:11918:v:1:27499:512:650:1
++C5:11918:v:1:27499:513:660:2
++R4:11918:v:1:27499:514:670:3
++Telesierra:12091:h:1:27500:4160:4161:8704
++C. Milagro:12091:h:1:27500:4368:4369:8711
++Italia Sat:12091:h:1:27500:4600:4601:8728
++TVE Internacional:12091:h:1:27500:4208:4209:8707
++Fiesta:12091:h:1:27500:4432:4433:8720
++Retelsat:12091:h:1:27500:4464:4465:8722
++ART EUROPE:12013:h:1:27495:164:96:450
++EGYPT SAT. CH. 2:12013:h:1:27495:166:104:470
++IQRA:12013:h:1:27495:168:112:474
++MAURITANIA TV:12110:v:1:27500:230:231:704
++ARMENIA TV:12110:v:1:27500:240:241:705
++SAILING CHANNEL:12110:v:1:27500:260:261:707
++AL JAZEERA:12110:v:1:27500:270:271:708
++Coming Soon TV:12110:v:1:27500:310:311:717
++SaluteBenessere:12110:v:1:27500:320:321:718
++AH-EDP1:12148:v:1:27499:96:97:7201
++AH-EDP2:12148:v:1:27499:112:113:7202
++Espresso:12148:v:1:27499:192:193:7203
++Alice:12148:v:1:27499:160:161:7220
++Nuvolari:12148:v:1:27499:176:177:7221
++Leonardo:12148:v:1:27499:128:129:7222
++AH-EDP3:12148:v:1:27499:36:37:7205
++OTE Promo:12187:v:1:27500:517:655:1001
++RTS SAT:12187:v:1:27500:519:657:1022
++ERT SAT:12187:v:1:27500:514:652:1102
++EXTRA:12187:v:1:27500:516:654:1106
++TRIAL:12187:v:1:27500:513:651:1108
++Minimax:11303:h:1:19540:300:301:3
++TVN1:12209:h:1:5631:4194:4195:1
++RR TEST:10978:v:1:8998:33:34:1
++TV 5 Thailand:10978:v:1:8998:1057:1058:2
++TEST-1:10978:v:1:8998:3105:3106:4
++FASHION:12244:h:1:27500:123:133:103
++AJARA TV:12244:h:1:27500:127:137:107
++SLO-TV1:12300:v:1:27495:200:201:3201
++POLONIA 1:12302:v:1:27500:205:206:3203
++SUPER 1:12302:v:1:27500:207:208:3207
++NAPOLI INT.:12302:v:1:27500:240:241:3210
++MAGIC:12302:v:1:27500:245:246:3211
++COUNTDOWN:12302:v:1:27500:235:236:3212
++TBNE:12302:v:1:27500:230:231:3213
++NAPOLI CHANNEL:12302:v:1:27500:227:228:3215
++KURDISTAN TV:12302:v:1:27500:225:226:3214
++ATLAS TV:12379:v:1:27500:3022:3032:3002
++TELE 24 SWITZERLAND:12379:v:1:27500:3023:3033:3003
++Abu Dhabi TV:12379:v:1:27500:3024:3034:3004
++RTV MONTENEGRO:12379:v:1:27500:3026:3036:3006
++JAAM-E-JAM 1:12436:h:1:27500:160:80:1
++JAAM-E-JAM 2:12436:h:1:27500:161:82:2
++SAHAR:12436:h:1:27500:162:84:3
++SAHAR 2:12436:h:1:27500:163:86:4
++IRINN:12436:h:1:27500:164:88:5
++Musicmax:11303:h:1:19540:500:501:6
++TEST:12474:h:1:27500:771:8191:10608
++EbS:12474:h:1:27500:101:201:10601
++MOU.2:12474:h:1:27500:42:43:10602
++PINK PLUS:12474:h:1:27500:308:256:10605
++LibertyTV.com:12474:h:1:27500:941:942:10603
++2M Maroc:12474:h:1:27500:601:602:10607
++ZEE TV:12474:h:1:27500:910:911:10604
++WorldNet Europe:12483:v:1:8299:4260:4220:1
++WorldNet:12483:v:1:8299:4560:4520:4
++SICILIA INTERNATIONA:12519:v:1:27499:501:502:8309
++SARDEGNA UNO:12519:v:1:27499:503:504:8310
++EuroMed:12519:v:1:27499:510:511:8312
++TGRT:12519:v:1:27499:505:506:8313
++VIDEOLINA:12519:v:1:27499:515:516:8318
++MEDIOLANUM:12538:h:1:27500:1131:1132:8987
++www.travel:12538:h:1:27500:1180:1183:8992
++MonteCarloSat:12538:h:1:27500:5126:5122:8877
++Bulgaria TV:12538:h:1:27500:4612:4613:8827
++TVN1:12571:h:1:5631:4194:4195:1
++JSTV 1:12595:v:1:27500:2000:2001:8213
++JSTV 2:12595:v:1:27500:2011:2013:8214
++MBC:12595:v:1:27500:160:80:8201
++ANN:12595:v:1:27500:161:84:8202
++BET:12595:v:1:27500:167:108:8208
++EuroNews:12595:v:1:27500:2221:2231:8211
++Sharjah Arabs:12653:h:1:27500:1160:1120:1
++Qatar Arabs:12653:h:1:27500:1260:1220:2
++Saudi 1 Arabs:12653:h:1:27500:1360:1320:3
++Kuwait Arabs:12653:h:1:27500:1460:1420:4
++Libya Arabs:12653:h:1:27500:1560:1520:5
++Sudan Arabs:12653:h:1:27500:1660:1620:6
++Oman Arabs:12653:h:1:27500:1760:1720:7
++Jordan Arabs:12653:h:1:27500:1860:1820:8
++IRAQ TV:12653:h:1:27500:1960:1920:9
++Dubai Sport:12653:h:1:27500:1060:1020:10
++Digitaly:12672:v:1:27500:220:221:4203
++Telemarket:12672:v:1:27500:350:351:4211
++eVision:12672:v:1:27500:360:361:4214
++Thai TV5:12672:v:1:27500:200:201:4201
++Studio Europa:12672:v:1:27500:230:231:4204
++Video Italia:12672:v:1:27500:340:341:4210
++GAME NETWORK:12672:v:1:27500:291:292:4213
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/Astra-28.2E dvb-apps/util/szap/channels-conf/dvb-s/Astra-28.2E
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/Astra-28.2E 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-s/Astra-28.2E 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,522 @@
++BBC 1 London:10773:h:0:22000:2304:2306:6301
++BBC 2 England:10773:h:0:22000:2320:2322:6302
++BBC NEWS 24:10773:h:0:22000:2329:2331:6304
++ETV:10773:h:0:22000:2333:2335:6306
++BBC TES 3:10773:h:0:22000:2325:2327:6315
++CBBC Channel:10773:h:0:22000:2325:2327:6317
++CBeebies:10773:h:0:22000:2333:2335:6318
++BBC 1 NI:10773:h:0:22000:2316:2318:6331
++BBC R Cymru:10773:h:0:22000:0:2340:6363
++BBC TES Test:10773:h:0:22000:0:0:6308
++BBC TES 2:10773:h:0:22000:0:0:6309
++BBC FOUR:10773:h:0:22000:0:0:6316
++BBC THREE:10773:h:0:22000:0:0:6319
++[1341]:11469:h:0:27500:521:649:4929
++[1342]:11469:h:0:27500:522:650:4930
++MMS 5:11469:h:0:27500:0:0:5044
++MMS 6:11469:h:0:27500:0:0:5045
++Sky Active:11469:h:0:27500:0:0:5107
++[140a]:11469:h:0:27500:518:646:5130
++[146b]:11469:h:0:27500:512:640:5227
++[146c]:11469:h:0:27500:513:641:5228
++[1016]:11469:h:0:27500:514:642:4118
++[10e9]:11469:h:0:27500:519:647:4329
++[1279]:11469:h:0:27500:520:648:4729
++Sky Customer Service:11469:h:0:27500:0:0:5240
++Directgov - Govt Info:11469:h:0:27500:0:0:5241
++[1596]:11469:h:0:27500:515:643:5526
++[1597]:11469:h:0:27500:516:644:5527
++[159a]:11469:h:0:27500:517:645:5530
++[15a4]:11469:h:0:27500:0:0:5540
++[05dc]:11469:h:0:27500:0:0:1500
++[1017]:11469:h:0:27500:0:0:4119
++Sky Box Office:11469:h:0:27500:0:0:4121
++Sky Box Office:11469:h:0:27500:0:0:4122
++Sky Box Office:11469:h:0:27500:0:0:4123
++Sky Box Office:11469:h:0:27500:0:0:4124
++Sky Box Office:11469:h:0:27500:0:0:4129
++POP:12285:v:0:27500:2311:2312:52500
++3751 PH:12285:v:0:27500:2311:2312:52501
++Chart Show TV:12285:v:0:27500:2309:2310:52505
++3761 PH:12285:v:0:27500:2313:2314:52512
++The Vault:12285:v:0:27500:2322:2323:52515
++Chase-it.tv:12285:v:0:27500:2318:2319:52520
++OBE:12285:v:0:27500:2307:2308:52525
++Tiny Pop:12285:v:0:27500:2316:2317:52530
++Spice Extreme:12285:v:0:27500:2320:2321:52561
++Climax3 - 1:12285:v:0:27500:2324:2325:52562
++Climax3 - 2:12285:v:0:27500:2326:2327:52563
++Climax3 - 3:12285:v:0:27500:2328:2329:52564
++Adult Channel:12285:v:0:27500:2330:2331:52565
++Playboy TV:12285:v:0:27500:2313:2314:52566
++52567:12285:v:0:27500:2330:2331:52567
++3911 PH:12285:v:0:27500:2320:2321:52581
++IDMT:12148:h:0:27500:2307:2308:52200
++ Broadband UK:12148:h:0:27500:2305:2306:52210
++52220:12148:h:0:27500:2309:2310:52220
++Trouble Reload:12148:h:0:27500:2311:2312:52230
++Challenge+1:12148:h:0:27500:2314:2315:52232
++Ftn:12148:h:0:27500:0:0:52231
++[15ff]:10920:h:0:22000:516:644:5631
++D'covery H&L+:10920:h:0:22000:2305:2306:50003
++Eurosportnews:10920:h:0:22000:2307:2308:5009
++Hallmark:10920:h:0:22000:2310:2311:5010
++[13a2]:10920:h:0:22000:512:640:5026
++[13a4]:10920:h:0:22000:514:642:5028
++[13a5]:10920:h:0:22000:515:643:5029
++[05e6]:10920:h:0:22000:0:0:1510
++Sky Box Office:10920:h:0:22000:0:0:4122
++Sky Box Office:10920:h:0:22000:0:0:4123
++Sky Box Office:10920:h:0:22000:0:0:4124
++Sky Box Office:10920:h:0:22000:0:0:4129
++SportxxxBabes:10920:h:0:22000:0:0:4137
++[1393]:10920:h:0:22000:0:0:5011
++[15fb]:10920:h:0:22000:0:0:5627
++SAB TV:12226:h:0:27500:2310:2311:52401
++Performance:12226:h:0:27500:2312:2313:52402
++channel U:12226:h:0:27500:2314:2315:52403
++Gems.tv:12226:h:0:27500:2317:2318:52404
++Soundtrack ch.:12226:h:0:27500:2307:2308:52405
++HorrorChannel:12226:h:0:27500:2342:2343:52406
++Chat Box:12226:h:0:27500:2319:2320:52407
++Golf Channel:12226:h:0:27500:2321:2322:52408
++Ex&Mart TV:12226:h:0:27500:2323:2324:52409
++TVW Select:12226:h:0:27500:2305:2306:52412
++Game In TV:12226:h:0:27500:2335:2336:52414
++Majestic TV:12226:h:0:27500:2340:2341:52415
++18PlusXXX:12226:h:0:27500:0:0:52410
++XXXHousewive:12226:h:0:27500:0:0:52411
++52421:12226:h:0:27500:0:0:52421
++[10ea]:11603:v:0:27500:514:662:4330
++[114e]:11603:v:0:27500:515:663:4430
++[11b2]:11603:v:0:27500:516:664:4530
++[1215]:11603:v:0:27500:521:669:4629
++[1216]:11603:v:0:27500:517:665:4630
++[127a]:11603:v:0:27500:518:666:4730
++[12de]:11603:v:0:27500:519:667:4830
++[13a6]:11603:v:0:27500:512:660:5030
++[1409]:11603:v:0:27500:522:670:5129
++[146a]:11603:v:0:27500:520:668:5226
++[1599]:11603:v:0:27500:523:671:5529
++[15fa]:11603:v:0:27500:513:661:5626
++Sky Box Office:11603:v:0:27500:0:0:4124
++Sky Box Office:11603:v:0:27500:0:0:4129
++MMS 4:11603:v:0:27500:0:0:5043
++MMS 8:11603:v:0:27500:0:0:5047
++[1603]:11603:v:0:27500:0:0:5635
++[05e9]:11603:v:0:27500:0:0:1513
++Sky Box Office:11603:v:0:27500:0:0:4121
++Sky Box Office:11603:v:0:27500:0:0:4122
++Sky Box Office:11603:v:0:27500:0:0:4123
++1391:10935:v:0:22000:2321:2320:5421
++1392:10935:v:0:22000:2305:2320:5422
++1393:10935:v:0:22000:2306:2320:5423
++1394:10935:v:0:22000:2307:2320:5424
++1395:10935:v:0:22000:2308:2320:5425
++1396:10935:v:0:22000:2309:2320:5426
++1397:10935:v:0:22000:2310:2320:5427
++1398:10935:v:0:22000:2311:2320:5428
++1399:10935:v:0:22000:2312:2320:5429
++1471:10935:v:0:22000:2305:2313:5471
++1472:10935:v:0:22000:2306:2314:5472
++1473:10935:v:0:22000:2307:2315:5473
++1474:10935:v:0:22000:2308:2316:5474
++1475:10935:v:0:22000:2309:2317:5475
++1476:10935:v:0:22000:2310:2318:5476
++1477:10935:v:0:22000:2311:2319:5477
++1478:10935:v:0:22000:2312:2320:5478
++[05ea]:10935:v:0:22000:0:0:1514
++1326:10935:v:0:22000:0:0:5307
++1334:10935:v:0:22000:0:0:5310
++SPl:10935:v:0:22000:0:0:5404
++rc:10935:v:0:22000:0:0:5407
++nata:10935:v:0:22000:0:0:5466
++natd:10935:v:0:22000:0:0:5467
++ISM Sky News v6:11507:h:0:27500:2305:2306:9318
++ISM Movies v6:11507:h:0:27500:0:0:9319
++EIA2 Test:11507:h:0:27500:2305:2306:9322
++UK Online test:11507:h:0:27500:0:0:9323
++1784:11507:h:0:27500:2305:2306:9324
++1786:11507:h:0:27500:0:0:9325
++SCS:11507:h:0:27500:0:0:9326
++STT:11507:h:0:27500:2305:2306:9327
++1787:11507:h:0:27500:2305:2306:9329
++5ADT:11507:h:0:27500:2305:2306:9331
++EIA2 Test 6:11507:h:0:27500:2305:2306:9332
++8N2:11507:h:0:27500:0:0:9335
++EIA2 Test 5:11507:h:0:27500:2305:2306:9336
++[2479]:11507:h:0:27500:0:0:9337
++[247a]:11507:h:0:27500:0:0:9338
++7909:11507:h:0:27500:2305:2306:3909
++EIA2 Test 3:11507:h:0:27500:2305:2306:4909
++EIA2 Test 4:11507:h:0:27500:2305:2306:4912
++ISM Test1 v5:11507:h:0:27500:2305:2306:5902
++PlayJam:11507:h:0:27500:0:2445:9306
++PlayMonteCarlo & Roulette:11507:h:0:27500:0:2457:9308
++PlayJam test:11507:h:0:27500:0:2445:9310
++ISM Sky One v6:11507:h:0:27500:2305:2306:9316
++ISM Sports 1 v6:11507:h:0:27500:2305:2306:9317
++[05f3]:11507:h:0:27500:0:0:1523
++Playboy / Adult:11507:h:0:27500:0:0:4128
++Playboy TV:11507:h:0:27500:0:0:4131
++Private Girls:11507:h:0:27500:0:0:4133
++XXX TV:11507:h:0:27500:0:0:4134
++Amateur Babes:11507:h:0:27500:0:0:4135
++[1207]:11507:h:0:27500:0:0:4615
++[1209]:11507:h:0:27500:0:0:4617
++[232d]:11507:h:0:27500:0:0:9005
++YO-YO" test:11507:h:0:27500:0:0:9309
++UCB TV:12070:h:0:27500:2313:2314:52001
++ATN:12070:h:0:27500:2310:2311:52002
++Overload:12070:h:0:27500:2306:2307:52003
++Golf Pro-Shop:12070:h:0:27500:2315:2316:52004
++You TV:12070:h:0:27500:2336:2337:52005
++Escape:12070:h:0:27500:2317:2318:52006
++52007:12070:h:0:27500:2324:2325:52007
++Get Lucky TV:12070:h:0:27500:2319:2320:52008
++[fffe]:12070:h:0:27500:0:0:65534
++Wonderful:12070:h:0:27500:2308:2309:52009
++Musicians Chnl:12070:h:0:27500:2326:2327:52010
++Rangers TV:12070:h:0:27500:2328:2329:52011
++Celtic TV:12070:h:0:27500:2330:2331:52012
++Advert Channel:12070:h:0:27500:2332:2333:52013
++LONDON TV:12070:h:0:27500:2334:2335:52014
++Pure Dance:12070:h:0:27500:0:2312:52025
++Club Asia:12070:h:0:27500:0:2305:52026
++Setanta Sports:12070:h:0:27500:0:0:52021
++Setanta Sports:12070:h:0:27500:0:0:52022
++Setanta PPV2:12070:h:0:27500:0:0:52032
++FilmFour:11565:v:0:27500:2320:2321:50500
++FilmFour +1:11565:v:0:27500:2323:2324:50505
++Film4 Weekly:11565:v:0:27500:2326:2327:50510
++E4:11565:v:0:27500:2329:2330:50515
++Game 6:11565:v:0:27500:0:2336:50540
++Game 7:11565:v:0:27500:0:2342:50541
++Game 8:11565:v:0:27500:0:2344:50542
++FF TEST1:11565:v:0:27500:2320:2321:50543
++PCNE Chinese:11565:v:0:27500:6144:6145:50550
++Bloomberg:11565:v:0:27500:2316:2317:50555
++[05f5]:11565:v:0:27500:0:0:1525
++SCRD4:10861:h:0:22000:0:0:8009
++SBZP:10861:h:0:22000:0:0:8059
++LMIN:10861:h:0:22000:0:0:8108
++TRLN:10861:h:0:22000:0:0:8116
++SCD2:10861:h:0:22000:0:0:8126
++DOMI:10861:h:0:22000:0:0:8145
++WINC:10861:h:0:22000:2325:2326:8164
++The Betting Zone:10861:h:0:22000:0:0:8186
++TLM(Browser):10861:h:0:22000:2342:2344:8888
++Disney Chnl:10861:h:0:22000:2308:2309:9001
++Disney Chnl +1:10861:h:0:22000:2313:2314:9002
++Toon Disney:10861:h:0:22000:2317:2318:9003
++Playhse Disney:10861:h:0:22000:2320:2321:9004
++The Betting Zone:10861:h:0:22000:2336:2338:50008
++[05f6]:10861:h:0:22000:0:0:1526
++ALTU:10861:h:0:22000:0:0:8087
++DCT2 (t51):10861:h:0:22000:0:0:8999
++DCT (t51):10861:h:0:22000:0:0:9000
++Sky Travel +1:10876:v:0:22000:2310:2318:3905
++Sky Travel Active Dummy:10876:v:0:22000:0:0:4911
++Sky Travel:10876:v:0:22000:2308:2309:5005
++5006:10876:v:0:22000:2308:2309:5006
++Sky Trvl Extra:10876:v:0:22000:2305:2306:9312
++[0602]:10876:v:0:22000:0:0:1538
++Tel Sell:12460:h:0:27500:2319:2320:50832
++mSync:12460:h:0:27500:0:0:50837
++NASN:12460:h:0:27500:2322:2323:50839
++Classics TV:12460:h:0:27500:2324:2325:50840
++Information TV:12460:h:0:27500:2326:2327:50841
++Wrestling Chnl:12460:h:0:27500:2329:2330:50842
++TWC Reloaded:12460:h:0:27500:2331:2332:50843
++FRIENDLY TV:12460:h:0:27500:2333:2334:50848
++McColls:12460:h:0:27500:0:2335:50851
++Moto:12460:h:0:27500:0:2336:50852
++Teds FM:12460:h:0:27500:0:2337:50853
++Topps FM:12460:h:0:27500:0:2338:50855
++Kiss:12460:h:0:27500:0:2339:50856
++Smash Hits!:12460:h:0:27500:0:2340:50857
++Kerrang:12460:h:0:27500:0:2341:50858
++The Hits:12460:h:0:27500:0:2342:50859
++Magic:12460:h:0:27500:0:2343:50860
++Q:12460:h:0:27500:0:2344:50861
++MOJO:12460:h:0:27500:0:2345:50862
++Heat:12460:h:0:27500:0:2346:50863
++GlobeCast:12460:h:0:27500:0:2347:50864
++PTV Prime:12460:h:0:27500:2315:2316:50865
++Fashion TV:12460:h:0:27500:0:0:50850
++Best Direct:12246:v:0:27500:2314:2315:53500
++BestDirect+:12246:v:0:27500:2316:2317:53505
++Dating Channel:12246:v:0:27500:2320:2321:53515
++Wine TV:12246:v:0:27500:2323:2324:53520
++Flaunt:12246:v:0:27500:2326:2327:53525
++Scuzz:12246:v:0:27500:2328:2329:53530
++The Amp:12246:v:0:27500:2330:2331:53535
++Radio Caroline:12246:v:0:27500:0:2332:53550
++Amrit Bani:12246:v:0:27500:0:2333:53551
++Desi Radio:12246:v:0:27500:0:2334:53552
++CalvaryRadio:12246:v:0:27500:0:2335:53553
++Apple FM:12246:v:0:27500:0:2336:53554
++TWR:12246:v:0:27500:0:2337:53555
++Spectrum 1:12246:v:0:27500:0:2338:53556
++RTE Europe:12246:v:0:27500:0:2339:53557
++WRN Europe:12246:v:0:27500:0:2340:53558
++Raaj Radio:12246:v:0:27500:0:2341:53559
++On Air:12246:v:0:27500:0:2342:53560
++53561:12246:v:0:27500:0:2306:53561
++PulseUnsignd:12246:v:0:27500:0:2343:53564
++53581:12246:v:0:27500:0:0:53581
++RTE One:10743:h:0:22000:2306:2307:9601
++RTE TWO:10743:h:0:22000:2309:2310:9602
++TG4:10743:h:0:22000:2312:2313:9603
++TV3:10743:h:0:22000:2315:2316:9605
++DW-TV:10743:h:0:22000:2318:2319:9606
++TVEi:10743:h:0:22000:2320:2321:9607
++RTE Radio 1:10743:h:0:22000:0:2322:9611
++RTE 2FM:10743:h:0:22000:0:2323:9612
++RTE R na G:10743:h:0:22000:0:2324:9613
++RTE Lyric fm:10743:h:0:22000:0:2325:9614
++BBC R5 Live:10802:h:0:22000:0:2338:6401
++ETV2:10802:h:0:22000:2304:2306:6407
++BBC 1 Wales:10802:h:0:22000:2304:2306:6411
++BBC 2W:10802:h:0:22000:2321:2323:6412
++BBC 1 Scotland:10802:h:0:22000:2311:2313:6421
++BBC 2 Scotland:10802:h:0:22000:2325:2327:6422
++BBC 2 NI:10802:h:0:22000:2329:2331:6432
++BBC R1:10802:h:0:22000:0:2333:6451
++BBC R2:10802:h:0:22000:0:2334:6452
++BBC R3:10802:h:0:22000:0:2335:6453
++BBC R4 FM:10802:h:0:22000:0:2336:6454
++BBC R4 LW:10802:h:0:22000:0:2337:6455
++BBC R Scot.:10802:h:0:22000:0:2339:6457
++BBC R Wales:10802:h:0:22000:0:2340:6458
++BBC R Ulster:10802:h:0:22000:0:2341:6459
++BBC Asian Nt.:10802:h:0:22000:0:2342:6460
++BBC World Sv.:10802:h:0:22000:0:2343:6461
++ETV3:10802:h:0:22000:0:2333:6462
++BBC 5L SportX:10802:h:0:22000:0:2344:6464
++BBC WS Extra:10802:h:0:22000:0:2345:6465
++1Xtra BBC:10802:h:0:22000:0:2347:6466
++BBC 6 Music:10802:h:0:22000:0:2346:6467
++BBC 7:10802:h:0:22000:0:2348:6468
++BBC R n Gael:10802:h:0:22000:0:2349:6469
++T4 STRM-0:10847:v:0:22000:2305:2306:6900
++T4 STRM-1:10847:v:0:22000:2320:2321:6901
++BBC PARL'MNT:10847:v:0:22000:2327:2328:6902
++BBC 1 East (W):10847:v:0:22000:2338:2339:6903
++BBC 1 CI:10847:v:0:22000:2343:2344:6904
++T4 DEV-0:10847:v:0:22000:2305:2306:6990
++T4 DEV-1:10847:v:0:22000:2320:2321:6991
++T4 DEV-2:10847:v:0:22000:2327:2328:6992
++T4 DEV-3:10847:v:0:22000:2338:2339:6993
++T4 DEV-4:10847:v:0:22000:2343:2344:6994
++BBC 1 W Mids:10788:v:0:22000:2305:2306:10301
++BBC 1 N West:10788:v:0:22000:2318:2319:10302
++BBC 1 Yrks&Lin:10788:v:0:22000:2321:2322:10303
++BBC 1 Yorks:10788:v:0:22000:2324:2325:10304
++BBC 1 E Mids:10788:v:0:22000:2327:2328:10305
++BBC 1 East (E):10788:v:0:22000:2330:2331:10306
++ETV5:10788:v:0:22000:2305:2306:10321
++BBC 1 West:10817:v:0:22000:2305:2306:10351
++BBC 1 S East:10817:v:0:22000:2317:2318:10352
++BBC 1 South:10817:v:0:22000:2320:2321:10353
++BBC 1 S West:10817:v:0:22000:2323:2324:10354
++BBC 1 NE & C:10817:v:0:22000:2326:2327:10355
++BBC 1 Oxford:10817:v:0:22000:2329:2330:10356
++ETV6:10817:v:0:22000:2305:2306:10371
++POP:11426:v:0:27500:2311:2312:52500
++3751 PH:11426:v:0:27500:2311:2312:52501
++Chart Show TV:11426:v:0:27500:2309:2310:52505
++3761 PH:11426:v:0:27500:2313:2314:52512
++The Vault:11426:v:0:27500:2322:2323:52515
++Chase-it.tv:11426:v:0:27500:2318:2319:52520
++OBE:11426:v:0:27500:2307:2308:52525
++Tiny Pop:11426:v:0:27500:2316:2317:52530
++Spice Extreme:11426:v:0:27500:2320:2321:52561
++Climax3 - 1:11426:v:0:27500:2324:2325:52562
++Climax3 - 2:11426:v:0:27500:2326:2327:52563
++Climax3 - 3:11426:v:0:27500:2328:2329:52564
++Adult Channel:11426:v:0:27500:2330:2331:52565
++Playboy TV:11426:v:0:27500:2313:2314:52566
++52567:11426:v:0:27500:2330:2331:52567
++3911 PH:11426:v:0:27500:2320:2321:52581
++Simply Home:11488:v:0:27500:2364:2365:50102
++DTPCad4:11488:v:0:27500:2315:2316:50103
++Shop Vector:11488:v:0:27500:2322:2323:50105
++Simply Ideas:11488:v:0:27500:2324:2325:50115
++Simply Shop.:11488:v:0:27500:2353:2354:50120
++JobsTV:11488:v:0:27500:2366:2367:50125
++GayDateTV:11488:v:0:27500:2361:2362:50130
++Motors TV:11488:v:0:27500:3329:3330:50135
++nation217:11488:v:0:27500:2329:2330:50170
++52536:11488:v:0:27500:2353:2354:50176
++3786 PH:11488:v:0:27500:2342:2343:50177
++Avago Roulette:11488:v:0:27500:0:0:50180
++50181:11488:v:0:27500:2353:2354:50181
++XplicitXXX:11488:v:0:27500:0:0:50175
++3901 PH:11584:h:0:27500:2348:2349:50101
++50621:11584:h:0:27500:0:0:50621
++Gay TV:11584:h:0:27500:2333:2334:50671
++Red Hot Films:11584:h:0:27500:2338:2339:50672
++Red Hot Euro:11584:h:0:27500:2336:2337:50673
++Television X 2:11584:h:0:27500:2326:2327:50674
++Television X 3:11584:h:0:27500:2314:2315:50675
++Television X:11584:h:0:27500:2306:2307:50676
++RedHot All Girl:11584:h:0:27500:2340:2341:50677
++ExpressShop.:11584:h:0:27500:2331:2332:50678
++Real Estate TV:11584:h:0:27500:2329:2330:50679
++Red Hot Only 18:11584:h:0:27500:2311:2312:50680
++Red Hot Wives:11584:h:0:27500:2344:2345:50681
++RH 40+ Wives:11584:h:0:27500:2346:2347:50682
++redhot amateur:11584:h:0:27500:2342:2343:50683
++redhot uktalent:11584:h:0:27500:0:0:50100
++50686:11584:h:0:27500:0:0:50686
++AvaTest:11546:h:0:27500:2319:2320:50446
++SFI:11546:h:0:27500:0:0:50455
++Shop on TV:11546:h:0:27500:2315:2316:50400
++Thane Direct:11546:h:0:27500:2317:2318:50405
++AVAGO:11546:h:0:27500:2319:2320:50410
++SouthForYou:11546:h:0:27500:2313:2314:50420
++Stop + Shop:11546:h:0:27500:2324:2325:50430
++VHR:11546:h:0:27500:2326:2327:50435
++ditg:11546:h:0:27500:0:0:50439
++cso:11546:h:0:27500:2331:2332:50440
++Channel 425:11546:h:0:27500:2355:2357:50445
++Thomas Cook:11526:v:0:27500:2312:2313:50300
++B4:11526:v:0:27500:2361:2362:50305
++Al Jazeera:11526:v:0:27500:2310:2311:50325
++NHS 1:11526:v:0:27500:2314:2315:50370
++NHS 2:11526:v:0:27500:0:2329:50371
++NHS 2:11526:v:0:27500:0:2337:50372
++NHS Direct Interactive:11526:v:0:27500:0:0:50373
++NHS 4:11526:v:0:27500:2345:2347:50374
++SAB TV:11388:h:0:27500:2310:2311:52401
++Performance:11388:h:0:27500:2312:2313:52402
++channel U:11388:h:0:27500:2314:2315:52403
++Gems.tv:11388:h:0:27500:2317:2318:52404
++Soundtrack ch.:11388:h:0:27500:2307:2308:52405
++HorrorChannel:11388:h:0:27500:2342:2343:52406
++Chat Box:11388:h:0:27500:2319:2320:52407
++Golf Channel:11388:h:0:27500:2321:2322:52408
++Ex&Mart TV:11388:h:0:27500:2323:2324:52409
++TVW Select:11388:h:0:27500:2305:2306:52412
++Game In TV:11388:h:0:27500:2335:2336:52414
++Majestic TV:11388:h:0:27500:2340:2341:52415
++52421:11388:h:0:27500:0:0:52421
++18PlusXXX:11388:h:0:27500:0:0:52410
++XXXHousewive:11388:h:0:27500:0:0:52411
++Open Access 2:11642:v:0:27500:2312:2318:50152
++Unlimited TV:11642:v:0:27500:2319:2320:50153
++Racing UK:11642:v:0:27500:2306:2313:50951
++Vectone Bangla:11642:v:0:27500:2325:2326:50952
++VECTONE Urdu:11642:v:0:27500:2328:2329:50953
++VECTONE Tamil:11642:v:0:27500:2331:2332:50954
++VECTONE Bolly:11642:v:0:27500:2334:2335:50955
++Open Access:11642:v:0:27500:2356:2357:50956
++Classic FM TV:11642:v:0:27500:2358:2359:50957
++50959:11642:v:0:27500:2314:2315:50959
++Extreme Sports:11680:v:0:27500:2307:2308:51101
++EuroNews:11680:v:0:27500:2310:2311:51102
++GOD Channel:11680:v:0:27500:2319:2320:51103
++GOD REVIVAL:11680:v:0:27500:2321:2322:51104
++CrossRhythm:11680:v:0:27500:0:2306:51106
++Life TV:11680:v:0:27500:2323:2324:51108
++TBN Europe:11680:v:0:27500:2325:2326:51109
++HollywoodTV:11680:v:0:27500:2327:2328:51112
++GOD 2:11680:v:0:27500:2321:2322:51115
++revelation:11680:v:0:27500:2339:2340:51116
++Live XXX TV:11680:v:0:27500:0:0:51113
++51117:11680:v:0:27500:0:0:51117
++Alphameric1:11680:v:0:27500:0:0:51121
++Alphameric2:11680:v:0:27500:0:0:51122
++CFC TV:11680:v:0:27500:0:0:51105
++mta-muslim tv:11661:h:0:27500:2311:2312:51001
++BEN:11661:h:0:27500:2327:2328:51008
++Abu Dhabi TV:11661:h:0:27500:2329:2330:51009
++TV Travelshop 2:11661:h:0:27500:2370:2371:51010
++CCTV-9:11661:h:0:27500:2333:2334:51011
++Islam Channel:11661:h:0:27500:2337:2338:51014
++51020:11661:h:0:27500:0:2339:51020
++PlayMonteCarlo & Roulette:11661:h:0:27500:0:2319:51022
++2gbstp:11661:h:0:27500:0:0:51013
++Tel Sell:11623:h:0:27500:2319:2320:50832
++mSync:11623:h:0:27500:0:0:50837
++NASN:11623:h:0:27500:2322:2323:50839
++Classics TV:11623:h:0:27500:2324:2325:50840
++Information TV:11623:h:0:27500:2326:2327:50841
++Wrestling Chnl:11623:h:0:27500:2329:2330:50842
++TWC Reloaded:11623:h:0:27500:2331:2332:50843
++FRIENDLY TV:11623:h:0:27500:2333:2334:50848
++McColls:11623:h:0:27500:0:2335:50851
++Moto:11623:h:0:27500:0:2336:50852
++Teds FM:11623:h:0:27500:0:2337:50853
++Topps FM:11623:h:0:27500:0:2338:50855
++Kiss:11623:h:0:27500:0:2339:50856
++Smash Hits!:11623:h:0:27500:0:2340:50857
++Kerrang:11623:h:0:27500:0:2341:50858
++The Hits:11623:h:0:27500:0:2342:50859
++Magic:11623:h:0:27500:0:2343:50860
++Q:11623:h:0:27500:0:2344:50861
++MOJO:11623:h:0:27500:0:2345:50862
++Heat:11623:h:0:27500:0:2346:50863
++GlobeCast:11623:h:0:27500:0:2347:50864
++PTV Prime:11623:h:0:27500:2315:2316:50865
++Fashion TV:11623:h:0:27500:0:0:50850
++ITV1 London:10832:h:0:22000:2305:2307:10000
++ITV News:10832:h:0:22000:2329:2336:10009
++ITV1 Central:10832:h:0:22000:2327:2328:10010
++ITV1 HTV Wales:10832:h:0:22000:2334:2335:10020
++ITV1 HTV West:10832:h:0:22000:2341:2342:10030
++ITV1 W Country:10832:h:0:22000:2348:2349:10040
++G49:10832:h:0:22000:2334:2335:10099
++ITV1 Anglia:10891:h:0:22000:2305:2306:10100
++ITV1 Border:10891:h:0:22000:2327:2328:10110
++ITV1 BorderSco:10891:h:0:22000:2334:2335:10120
++ITV1 Meridian S:10891:h:0:22000:2348:2349:10140
++ITV1 Meridian E:10891:h:0:22000:2341:2342:10141
++ITV1 Tyne Tees:10891:h:0:22000:2355:2356:10150
++ITV1 Yorkshire:10891:h:0:22000:2362:2363:10160
++G53:10891:h:0:22000:2334:2335:10199
++ITV Channel Is:10906:v:0:22000:2326:2328:10200
++Grampian TV:10906:v:0:22000:2333:2334:10210
++Scottish TV:10906:v:0:22000:2340:2341:10220
++UTV:10906:v:0:22000:2347:2348:10230
++ITV2:10906:v:0:22000:2350:2351:10240
++ITV1 Granada:10906:v:0:22000:2305:2306:10250
++ITV3:10906:v:0:22000:2363:2364:10260
++G54:10906:v:0:22000:2357:2358:10299
++6300:10758:v:0:22000:2305:2306:10119
++LONDON TV:11222:h:0:27500:2334:2335:52014
++Setanta Sports:11222:h:0:27500:0:0:52021
++Setanta Sports:11222:h:0:27500:0:0:52022
++Pure Dance:11222:h:0:27500:0:2312:52025
++Club Asia:11222:h:0:27500:0:2305:52026
++Setanta PPV2:11222:h:0:27500:0:0:52032
++[fffe]:11222:h:0:27500:0:0:65534
++UCB TV:11222:h:0:27500:2313:2314:52001
++ATN:11222:h:0:27500:2310:2311:52002
++Overload:11222:h:0:27500:2306:2307:52003
++Golf Pro-Shop:11222:h:0:27500:2315:2316:52004
++You TV:11222:h:0:27500:2336:2337:52005
++Escape:11222:h:0:27500:2317:2318:52006
++52007:11222:h:0:27500:2324:2325:52007
++Get Lucky TV:11222:h:0:27500:2319:2320:52008
++Wonderful:11222:h:0:27500:2308:2309:52009
++Musicians Chnl:11222:h:0:27500:2326:2327:52010
++Rangers TV:11222:h:0:27500:2328:2329:52011
++Celtic TV:11222:h:0:27500:2330:2331:52012
++Advert Channel:11222:h:0:27500:2332:2333:52013
++E4+1:10729:v:0:22000:2306:2307:8300
++3310:10729:v:0:22000:2317:2318:8310
++3315:10729:v:0:22000:0:0:8315
++3320:10729:v:0:22000:0:0:8320
++[fffe]:11264:h:0:22000:0:0:65534
++52101:11264:h:0:22000:2305:2306:52101
++52102:11264:h:0:22000:2307:2308:52102
++52103:11264:h:0:22000:2309:2310:52103
++52104:11264:h:0:22000:2311:2312:52104
++IDMT:11307:h:0:27500:2307:2308:52200
++ Broadband UK:11307:h:0:27500:2305:2306:52210
++52220:11307:h:0:27500:2309:2310:52220
++Trouble Reload:11307:h:0:27500:2311:2312:52230
++Challenge+1:11307:h:0:27500:2314:2315:52232
++Ftn:11307:h:0:27500:0:0:52231
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W dvb-apps/util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-s/BrasilSat-B3-84.0W 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,39 @@
++NoName:3675:v:0:4285:1110:1211:1
++Rede 21:3688:v:0:2308:308:256:1
++SNG#3 TERRA VIVA:3692:v:0:3200:308:256:1
++TV PONTA PORA :3697:v:0:3333:1110:1211:1
++Servico 1:3710:v:0:12960:36:37:1
++TV Assembleia:3710:v:0:12960:39:40:2
++Servico 3:3710:v:0:12960:42:43:3
++TV Cultura:3710:v:0:12960:33:34:4
++TV Ra-Tim-Bum:3710:v:0:12960:45:46:5
++Tv Morena:3738:v:0:4710:4096:4097:1
++[6d65]:3754:v:0:5000:0:0:28005
++[6dc9]:3754:v:0:5000:0:0:28105
++[0faa]:3754:v:0:5000:0:0:4010
++[0fb4]:3754:v:0:5000:0:0:4020
++[6d61]:3754:v:0:5000:0:0:28001
++[0f9f]:3754:v:0:5000:0:0:3999
++[0fbe]:3754:v:0:5000:0:0:4030
++[000b]:3754:v:0:5000:0:0:11
++[5014]:3754:v:0:5000:0:0:20500
++STV:3768:v:0:8000:160:80:1
++CANAL 2:3768:v:0:8000:161:84:2
++TELECONF:3768:v:0:8000:162:88:3
++REDETV RO:3805:v:0:3255:4194:4195:1
++Videocom:3858:v:0:4289:1110:1211:1
++TVSULBAHIA:3911:v:0:3255:33:36:2
++TV ARATU BA:3927:v:0:3255:33:36:2
++TV BAND BA:3931:h:0:3255:337:340:21
++TV BAND BA:3932:v:0:3255:337:340:21
++REDE SUPER:3940:v:0:3255:337:340:1
++RBI:3949:v:0:4340:337:340:33
++TV TRIBUNA:3955:v:0:4340:337:340:1
++5 :3970:v:0:4445:1160:1120:1
++TV EDUCATIVA MS:4013:v:0:3255:337:340:33
++TV Justica:4060:v:0:3330:289:290:1
++CNT GERACAO 1:4075:v:0:4444:289:290:20101
++ASS-LEG-SC:4132:v:0:2532:337:340:33
++EMBRATEL 21:4152:v:0:2300:257:514:1
++SEXY TV:4155:v:0:2170:257:258:1
++BASA:4169:v:0:8140:4141:4140:4
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Adelaide dvb-apps/util/szap/channels-conf/dvb-t/au-Adelaide
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Adelaide 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/au-Adelaide 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,28 @@
++ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:592
++ABC TV Adelaide:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:593
++ABC TV 2:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:594
++ABC TV 3:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:595
++ABC TV 4:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:596
++ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2311:598
++7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1281:1282:1360
++7 Digital 1:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1281:1282:1361
++7 Digital 2:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1281:1282:1362
++7 Digital 3:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1281:1282:1363
++7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1345:1346:1364
++NINE Digital:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1105
++NINE HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:0:1112
++TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1617
++TEN Digital 1:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1618
++TEN Digital 2:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1619
++TEN Digital 3:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1620
++TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1621
++TEN Digital 4:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1622
++TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1623
++TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1624
++Ten Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1625
++SBS HD:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:832
++SBS DIGITAL 1:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:833
++SBS DIGITAL 2:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:834
++SBS EPG:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:835
++SBS RADIO 1:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:846
++SBS RADIO 2:564500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:847
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Brisbane dvb-apps/util/szap/channels-conf/dvb-t/au-Brisbane
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Brisbane 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/au-Brisbane 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,29 @@
++ABC HDTV:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:576
++ABC TV Brisbane:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:577
++ABC TV 2:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:578
++ABC TV 3:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:579
++ABC TV 4:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:580
++ABC DiG Radio:226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2310:582
++7 Digital:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1025:1026:1344
++7 Digital 1:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1025:1026:1345
++7 Digital 2:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1025:1026:1346
++7 Digital 3:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1025:1026:1347
++7 HD Digital:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1089:1090:1348
++Nine Digital:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:660:1025
++Nine Guide:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:517:660:1030
++Nine High Definition:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:1152
++TEN Digital:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1601
++TEN Digital 1:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1602
++TEN Digital 2:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1603
++TEN Digital 3:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1604
++TEN Digital:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1605
++TEN Digital 4:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1606
++TEN Digital:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1607
++TEN HD:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1608
++TEN Digital:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1609
++SBS HD:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:816
++SBS DIGITAL 1:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:817
++SBS DIGITAL 2:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:818
++SBS EPG:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:819
++SBS RADIO 1:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:830
++SBS RADIO 2:585625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:831
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Hobart dvb-apps/util/szap/channels-conf/dvb-t/au-Hobart
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Hobart 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/au-Hobart 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,18 @@
++ABC HDTV:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2314:0:624
++ABC TV Hobart:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:625
++ABC2:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2309:2310:626
++ABC TV:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:627
++ABC DiG Radio:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2317:630
++ABC DiG Jazz:191625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2318:631
++SBS HD:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:848
++SBS DIGITAL 1:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:849
++SBS DIGITAL 2:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:850
++SBS EPG:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:851
++SBS RADIO 1:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:862
++SBS RADIO 2:205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:863
++SCT Hobart:212500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:625:626:2306
++SCT - HD:212500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3611:0:2338
++WIN TELEVISION:184500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:116:117:1
++WIN HD:184500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:129:130:10
++TDT - SD:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:657:658:2071
++TDT - HD:219500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3511:0:2103
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Melbourne dvb-apps/util/szap/channels-conf/dvb-t/au-Melbourne
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Melbourne 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/au-Melbourne 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,17 @@
++ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:2308:560
++ABC TV Melbourne:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:561
++ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2310:566
++TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1585
++TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1592
++Nine Digital:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:519:720:1072
++Nine Digital HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:1073
++Nine Guide:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:517:700:1074
++7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1328
++7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:833:834:1332
++7 Program Guide:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:865:866:1334
++SBS HD:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:784
++SBS DIGITAL 1:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:785
++SBS DIGITAL 2:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:786
++SBS EPG:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:787
++SBS RADIO 1:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:798
++SBS RADIO 2:536625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:799
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Sydney-NorthShore dvb-apps/util/szap/channels-conf/dvb-t/au-Sydney-NorthShore
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/au-Sydney-NorthShore 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/au-Sydney-NorthShore 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,31 @@
++ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:544
++ABC TV Sydney:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:545
++ABC TV 2:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:546
++ABC TV 3:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:547
++ABC TV 4 :226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:548
++ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2310:550
++Test.:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:0:549
++7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1312
++7 Digital 1:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1313
++7 Digital 2:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1314
++7 Digital 3:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:514:1315
++7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:577:578:1316
++Program Guide:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:609:610:1318
++NINE DIGITAL:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:519:720:1
++NINE HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:5
++NINE GUIDE:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:517:720:6
++TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1569
++TEN Digital 1:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1570
++TEN Digital 2:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1571
++TEN Digital 3:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1572
++TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1573
++TEN Digital 4:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1574
++TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1575
++TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1576
++Ten Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1577
++SBS HD:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:768
++SBS DIGITAL 1:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:769
++SBS DIGITAL 2:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:770
++SBS EPG:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:772
++SBS RADIO 1:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:782
++SBS RADIO 2:571500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:783
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/cz-Praha dvb-apps/util/szap/channels-conf/dvb-t/cz-Praha
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/cz-Praha 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/cz-Praha 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,16 @@
++CT2.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:512:650:1
++Nova.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:513:661:2
++CT1.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:2325:2326:3
++Prima.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:514:671:4
++Stanice O.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:2322:2323:5
++Radiozurnal.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:652:6
++Praha.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:653:7
++Vltava.:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:651:8
++iTV:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:9
++Prima:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:161:84:1
++CT2:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:164:96:4
++TV Program:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2501:2502:5
++RADIO2:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2832:6
++RADIO:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2831:9
++Proglas:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:180:11
++Nova.:674000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:205:206:3
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Berlin dvb-apps/util/szap/channels-conf/dvb-t/de-Berlin
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Berlin 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/de-Berlin 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,47 @@
++rbb Brandenburg:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1101:1102:11
++rbb Berlin:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1201:1202:12
++Phoenix:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1301:1302:13
++Das Erste:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1401:1402:14
++ARD-MHP-Data:522000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16
++ZDF:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:545:546:514
++Info/3sat:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:561:562:515
++Doku/KiKa:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:593:594:517
++SAT.1:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:385:386:16408
++N24:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:225:226:16398
++ProSieben:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:305:306:16403
++KABEL1:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:162:16394
++MDR FERNSEHEN:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:101:102:1
++ARD-Online-Kanal:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:10
++ARD-MHP-Data:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:9
++NDR FERNSEHEN:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:301:302:3
++arte:191500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:201:202:2
++Test Programm:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3841:3842:16624
++SUD enhanced:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16650
++13 TH STREET:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:4273:4274:16651
++BMCO Nokia IPDC Signalling:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16652
++BMCO Nokia IPDC 1:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16653
++BMCO Nokia IPDC 2:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16654
++BMCO Nokia IPDC 3:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16655
++IP Services:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16640
++Media Broadcast Services:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16641
++SUD:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16642
++SUD 1:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16643
++Kathrein Download:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16644
++HUMAX DOWNLOAD SVC:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16645
++BMCO Nokia IPDC 4:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16656
++BMCO Nokia IPDC 5:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16657
++BMCO Nokia IPDC 6:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16658
++BMCO Nokia IPDC 7:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16659
++BMCO Nokia IPDC 8:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16660
++RTL:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:337:338:16405
++RTL2:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:353:354:16406
++Super RTL:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:433:434:16411
++VOX:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:545:546:16418
++Südwest BW/RP:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:257:258:16
++WDR:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:241:242:15
++BBC World:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:49:50:16387
++FAB:177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3073:3074:16576
++DSF:754000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:129:130:16392
++Testkanal NEUN LIVE:754000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:273:274:16401
++VIVA Plus:754000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:529:530:16417
++Eurosport:754000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:577:578:16420
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Braunschweig dvb-apps/util/szap/channels-conf/dvb-t/de-Braunschweig
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Braunschweig 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/de-Braunschweig 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++arte:198500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4385:4386:2
++Phoenix:198500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4401:4402:3
++EinsExtra:198500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4417:4418:4
++Das Erste:198500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4369:4370:128
++ZDF:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:514
++Info/3sat:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:561:562:515
++Doku/KiKa:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:593:594:517
++RTL Television:498000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
++RTL2:498000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
++Super RTL:498000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:369:370:16407
++VOX:498000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
++hr-fernsehen:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4673:4674:65
++MDR FERNSEHEN:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4657:4658:100
++NDR FS NDS:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:129
++NDR FS HH *:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:130
++NDR FS SH *:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:131
++NDR FS MVP *:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:132
++WDR Köln:594000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4641:4642:262
++SAT.1:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:385:386:16408
++N24:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:225:226:16398
++ProSieben:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:305:306:16403
++KABEL1:658000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:162:16394
++Eurosport:786000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:577:578:16420
++TERRA NOVA:786000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:609:610:16422
++TELE 5:786000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:465:466:16413
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Bremen dvb-apps/util/szap/channels-conf/dvb-t/de-Bremen
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Bremen 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/de-Bremen 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,25 @@
++arte:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:202:2
++Phoenix:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:3
++NDR RB:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:518:519:161
++Das Erste RB:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:261:262:160
++hr-fernsehen:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4673:4674:65
++MDR FERNSEHEN:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4657:4658:100
++NDR FS NDS:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:129
++NDR FS HH *:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:130
++NDR FS SH *:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:131
++NDR FS MVP *:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:132
++WDR Köln:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4641:4642:262
++ZDF:562000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:514
++Info/3sat:562000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:561:562:515
++Doku/KiKa:562000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:593:594:517
++RTL Television:642000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
++RTL2:642000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
++Super RTL:642000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:369:370:16407
++VOX:642000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
++Eurosport:666000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:577:578:16420
++TERRA NOVA:666000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:609:610:16422
++TELE 5:666000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:465:466:16413
++SAT.1:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:385:386:16408
++N24:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:225:226:16398
++ProSieben:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:305:306:16403
++KABEL1:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:162:16394
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Koeln-Bonn dvb-apps/util/szap/channels-conf/dvb-t/de-Koeln-Bonn
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Koeln-Bonn 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/de-Koeln-Bonn 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,23 @@
++RTL Television:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
++RTL2:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
++Super RTL:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:433:434:16411
++VOX:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
++ZDF:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:514
++Info/3sat:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:561:562:515
++Doku/KiKa:514000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:593:594:517
++MDR Fernsehen:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4657:4658:100
++NDR FS NDS:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4641:4642:129
++SÃœDWEST RP:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4673:4674:226
++WDR Köln:698000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4625:4626:262
++N24:650000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:225:226:16398
++ProSieben:650000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:305:306:16403
++KABEL1:650000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:162:16394
++SAT.1:650000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2078:2077:16408
++arte:826000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4385:4386:2
++Phoenix:826000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4401:4402:3
++EinsMuXx:826000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4417:4418:6
++Das Erste:826000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4369:4370:256
++Eurosport:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:577:578:16420
++VIVA:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:513:514:16416
++TERRA NOVA:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:609:610:16422
++CNN Int.:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:97:98:16390
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Leipzig dvb-apps/util/szap/channels-conf/dvb-t/de-Leipzig
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Leipzig 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/de-Leipzig 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,7 @@
++# channels.conf for DVB-T - Leipzig (Germany) Transmitter
++# Generated by Albrecht Lohoefener <albrechtloh@gmx.de>
++
++MDR:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1553:1554:97
++rbb:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:2833:2834:177
++WDR:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:4193:4194:262
++BR:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:529:530:33
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Luebeck dvb-apps/util/szap/channels-conf/dvb-t/de-Luebeck
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Luebeck 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/de-Luebeck 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,22 @@
++ZDF:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:545:546:514
++Info/3sat:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:561:562:515
++Doku/KiKa:490000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:593:594:517
++Bayerisches Fernsehen:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5185:5186:34
++MDR FERNSEHEN:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5169:5170:100
++NDR FS NDS *:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5137:5138:129
++NDR FS HH *:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5137:5138:130
++NDR FS SH:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5137:5138:131
++NDR FS MVP *:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5137:5138:132
++WDR Köln:530000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:5153:5154:262
++N24:546000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:225:226:16398
++ProSieben:546000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:305:306:16403
++KABEL1:546000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:161:162:16394
++SAT.1:546000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:385:386:16408
++arte:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4385:4386:2
++Phoenix:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4401:4402:3
++EinsExtra:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4417:4418:4
++Das Erste:570000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4369:4370:128
++RTL Television:626000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
++RTL2:626000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
++Super RTL:626000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:369:370:16407
++VOX:626000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Rhein-Main dvb-apps/util/szap/channels-conf/dvb-t/de-Rhein-Main
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Rhein-Main 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/de-Rhein-Main 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,6 @@
++c8:198500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
++c22:482000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
++c34:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
++c54:738000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
++c57:762000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
++c64:818000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:82
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Ruhrgebiet dvb-apps/util/szap/channels-conf/dvb-t/de-Ruhrgebiet
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/de-Ruhrgebiet 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/de-Ruhrgebiet 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,46 @@
++# channels.conf for dvb-t in germany, broadcasting area 'Duesseldorf/Ruhrgebiet'.
++# see
++# http://nrw.ueberallfernsehen.de/fileadmin/downloads/Programm_Ruhr_2005_04_04_final.pdf
++# for details on the regional availability of some channels (see the comments below).
++#
++RTL Television:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:337:338:16405
++RTL2:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:353:354:16406
++Super RTL:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:433:434:16411
++VOX:538000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:16418
++ZDF:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:545:546:514
++Info/3sat:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:561:562:515
++Doku/KiKa:586000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:593:594:517
++CNN Int.:722000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:97:98:16390
++VIVA:722000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:513:514:16416
++Eurosport:722000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:577:578:16420
++TERRA NOVA:722000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:609:610:16422
++ProSieben:746000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:305:306:16403
++SAT.1:746000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:385:386:16408
++KABEL1:746000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:162:16394
++N24:746000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:225:226:16398
++arte:818000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4385:4386:2
++Phoenix:818000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4401:4402:3
++EinsMuXx:818000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4417:4418:6
++Das Erste:818000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4369:4370:256
++##
++### regionale Sender/regional channels
++##
++## Kanal 25; Senderstandorte/broadcasting locations: Langenberg, Dortmund
++MDR FERNSEHEN-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5425:5426:100
++NDR FS NDS-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5409:5410:129
++SUEDWEST RP-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5441:5442:226
++WDR Dortmund-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5393:5394:259
++WDR Essen-25:506000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5393:5394:261
++#
++## Kanal 46; Senderstandorte/broadcasting locations: Duesseldorf, Wesel, Langenberg
++MDR FERNSEHEN-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4913:4914:100
++NDR FS NDS-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4897:4898:129
++SUEDWEST RP-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4929:4930:226
++WDR Duesseldorf-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4881:4882:260
++WDR Wuppertal-46:674000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4881:4882:265
++## Kanal 59; Senderstandorte/broadcasting locations: Essen
++MDR FERNSEHEN-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5169:5170:100
++NDR FS NDS-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5153:5154:129
++SUEDWEST RP-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5185:5186:226
++WDR Dortmund-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5137:5138:259
++WDR Essen-59:778000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:5137:5138:261
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Alpicat dvb-apps/util/szap/channels-conf/dvb-t/es-Alpicat
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Alpicat 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/es-Alpicat 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++#channels.conf for DVB-T - Alpicat (Lleida) Transmitter
++
++#C42
++TV3:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:112:801
++K3/33:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:121:122:802
++3/24:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:131:132:803
++Canal Pilot:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:141:142:804
++3XL.net:642000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:151:152:805
++
++#C58
++TVE 1:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
++TVE 2:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
++ANTENA 3:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
++CANAL+:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
++TELECINCO:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
++
++#C66
++Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
++Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Collserola dvb-apps/util/szap/channels-conf/dvb-t/es-Collserola
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Collserola 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/es-Collserola 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++#channels.conf for DVB-T - Collserola (Barcelona) Transmitter
++
++#C43
++TV3:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:112:801
++K3/33:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:121:122:802
++3/24:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:131:132:803
++Canal Pilot:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:141:142:804
++3XL.net:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:151:152:805
++
++#C61
++TVE 1:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
++TVE 2:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
++ANTENA 3:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
++CANAL+:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
++TELECINCO:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
++
++#C66
++Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
++Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Madrid dvb-apps/util/szap/channels-conf/dvb-t/es-Madrid
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Madrid 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/es-Madrid 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,26 @@
++TVE 1:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:380
++TVE 2:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:381
++24H TVE:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1001:1003:382
++RNE1:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:2001:385
++RNEC:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:2011:386
++CLAN/50 TVE:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:1503:383
++RNE3:770000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:2021:387
++TM3:810000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:113:421
++LAOTRA:810000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:211:212:422
++ONDA6:810000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:311:312:423
++TELEDEPORTE:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:100
++VEO TV:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1001:1002:260
++VEO 2:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:261
++NET TV:834000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:1502:300
++CUATRO:842000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:160:80:1057
++CNN+:842000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:161:84:1058
++40 LATINO:842000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:162:88:1059
++LA SEXTA 1:842000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:0:340
++T5 Estrellas:850000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:301:181
++T5 Sport:850000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:202:302:182
++Telecinco:850000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:203:303:180
++FLYMUSIC:850000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:1502:301
++antena 3:858000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:140
++a3.neox:858000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:141
++a3.nova:858000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1001:1003:142
++La Sexta 2:858000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1501:0:341
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Mussara dvb-apps/util/szap/channels-conf/dvb-t/es-Mussara
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/es-Mussara 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/es-Mussara 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,19 @@
++#channels.conf for DVB-T - La Mussara (Reus-Tarragona) Transmitter
++
++#C56
++TV3:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:112:801
++K3/33:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:121:122:802
++3/24:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:131:132:803
++Canal Pilot:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:141:142:804
++3XL.net:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:151:152:805
++
++#C59
++TVE 1:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
++TVE 2:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
++ANTENA 3:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
++CANAL+:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
++TELECINCO:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
++
++#C66
++Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
++Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Crystal-Palace dvb-apps/util/szap/channels-conf/dvb-t/uk-Crystal-Palace
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Crystal-Palace 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Crystal-Palace 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,67 @@
++#channels.conf for DVB-T - Crystal Palace Transmitter
++
++# Multiplex 1 BBC - Channel 25, Offset -, Freq 505833333
++BBCi:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0:4479
++CBBC Channel:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0:4671
++BBC ONE:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
++BBC TWO:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
++BBC THREE:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
++BBC NEWS 24:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
++
++# Multiplex 2 Digital 3&4 - Channel 22, Offset -, Freq 481833333
++Teletext:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++FourText:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++CHANNEL4:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2827:2828
++ITV NEWS:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2850:2851
++ITV 1:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:512:650
++ITV 2:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
++Ch 14:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
++
++#Multiplex A SDN - Channel 32, Offset -, Frequency 561833333
++ntl:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++Ch 15:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
++BBC Radio 1:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6210
++BBC Radio 2:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6226
++BBC Radio 3:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6242
++BBC Radio 4:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6258
++QVC:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
++FIVE:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
++bid-up.tv:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
++TV Travel Shop:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6161
++
++#Multiplex B BBC - Channel 28, Offset -, Frequency 529833333
++#Community (0x4e00) 01: PCR 0x1fff
++#703 (0x4c80) 01: PCR 0x1fff
++BBC PARLMNT:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
++BBC FOUR:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
++701:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
++702:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
++CBeebies:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
++BBC Asian Net:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:435
++1Xtra BBC:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:434
++BBC 7:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:433
++BBC 6 Music:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:432
++BBC 5L SportsX:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:431
++BBC R5 Live:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:430
++
++# Multiplex C Crown Castle - Channel 34, Offset +, Frequency 578166666
++UKHistory:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
++Sky Travel:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
++Sky Spts News:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
++Sky News:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
++
++# Multiplex D Crown Castle - Channel 29, Offset -, Freq 537833333
++#UKBrightIdeas (0x64c0) 01: PCR 0x1fff
++THE HITS:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
++TMF:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
++CBM:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:501:502
++Free2Play:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++Q:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1901
++Magic:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1801
++The Hits Radio:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1701
++BBC World Sv:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1601
++oneworld:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1501
++jazz fm:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1401
++Kerrang:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1301
++Smash Hits:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1201
++Kiss:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1101
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Hannington dvb-apps/util/szap/channels-conf/dvb-t/uk-Hannington
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Hannington 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Hannington 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,28 @@
++BBC One:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
++BBC Two:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
++CBBC:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
++BBC Three:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
++BBC News 24:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
++CBeebies:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
++BBC Four:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
++BBC Parliament:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
++701:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
++702:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
++703:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++ITV 1:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
++ITV 2:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
++Channel 4:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
++ITV News:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
++price-drop.tv:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
++Five:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
++QVC:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6059:6050
++Tv Travel Shop:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6162
++Channel 15:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
++bid-up.tv:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
++Sky News:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
++Sky Sports News:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
++Sky Travel:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
++UK History:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
++The Hits:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
++TMF:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
++UK Bright Ideas:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Oxford dvb-apps/util/szap/channels-conf/dvb-t/uk-Oxford
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Oxford 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Oxford 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,41 @@
++BBC-Choice:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
++BBC-Knowledge:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
++BBC-News24:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
++BBC-1:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
++BBC-Parliament:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
++BBC-2:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
++ITV-1:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
++ITV-2:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
++ITV-Sport:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2836:2837
++FilmFour:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
++C4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2826:2827
++E4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
++C5:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
++Shop:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
++ITVSelect-Info:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6065:6066
++ITVSelect-1:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6081:6082
++ITVSelect-2:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6097:6098
++ITVSelect-3:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6113:6114
++ITVSelect-4:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6129:6130
++Carlton-Cinema:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
++Sky-One:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
++Sky-Sports-1:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
++Sky-Premier:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1056:1057
++CartoonNetwork:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
++UK-Horizons:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
++ITV-Sport-Plus:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
++ITVSportSelect:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:2596
++BreezeMen&Mtrs:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
++Granada-Plus:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
++MTV:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1568:1569
++Sky-Movie-Max:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
++Sky-Sports-2:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
++UK-Gold:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
++Wellbeing:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1824:1825
++PLAY-uk:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
++UK-Style:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
++no-name:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
++Discovery:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
++Nick/Paramount:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
++Sky-Sports-3:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
++Brit-Eurosport:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Reigate dvb-apps/util/szap/channels-conf/dvb-t/uk-Reigate
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Reigate 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Reigate 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,51 @@
++BBC ONE:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
++BBC TWO:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
++ITV 1:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:512:650
++Channel 4:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2827:2828
++five:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
++ITV 2:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
++BBC THREE:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++Teletext:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++BBC FOUR:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++Sky Travel:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
++UKHistory:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
++Ch 14:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
++Ch 15:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
++QVC:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
++TV Travel Shop:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6162
++The HITS:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
++UKBrightIdeas:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
++f tn:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++TMF:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
++bid-up.tv:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
++CBM:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:501:502
++CBBC Channel:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
++CBeebies:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
++BBC NEWS 24:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
++ITV News:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2850:2851
++Sky News:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
++Sky Spts News:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
++BBC PARLMNT:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
++Community:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++FourText:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++BBCi:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++ntl:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
++BBC Radio 1:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6210
++1Xtra BBC:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:434
++BBC Radio 2:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6226
++BBC Radio 3:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6242
++BBC Radio 4:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6258
++BBC R5 Live:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:430
++BBC 5L SportsX:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:431
++BBC 6 Music:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:432
++BBC 7:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:433
++BBC Asian Net.:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:435
++BBC World Sv.:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1601
++Smash Hits!:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1201
++Kiss:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1101
++Kerrang!:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1301
++jazz fm:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1401
++oneword:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1501
++701:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
++702:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
++703:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Sandy-Heath dvb-apps/util/szap/channels-conf/dvb-t/uk-Sandy-Heath
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels-conf/dvb-t/uk-Sandy-Heath 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/channels-conf/dvb-t/uk-Sandy-Heath 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,12 @@
++BBC-Choice:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
++BBC-Knowledge:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
++BBC-News24:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
++BBC-1:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
++BBC-Parliament:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
++BBC-2:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
++ITV-1:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
++ITV-2:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2819:2820
++C4:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2823:2824
++E4:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
++C5:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
++Shop:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbc-berlin dvb-apps/util/szap/channels.conf-dvbc-berlin
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbc-berlin 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbc-berlin 1970-01-01 01:00:00.000000000 +0100
+@@ -1,171 +0,0 @@
+-3sat:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:210:220
+-ARD-Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1805
+-CNBC:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:510:520
+-DLF-Köln:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:810
+-DLR-Berlin:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:710
+-EinsExtra:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
+-EinsFestival:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
+-EinsMuXx:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
+-EuroNews:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2221:2233
+-Eurosport:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:410:420
+-Fritz:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:901
+-KiKa:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:310:320
+-MDR FERNSEHEN:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:402
+-MDR KULTUR:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:801
+-MDR info:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1101
+-MHP ARD Online-Kanal:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:102
+-NDR Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2401:2402
+-ORB-Fernsehen:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
+-RADIOmultikulti:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1301
+-Radio 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:701
+-SFB1:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
+-SWR2:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1401
+-SÜDWEST BW:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:801:802
+-SÜDWEST RP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3101:3102
+-WDR 3:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1501
+-WDR 5:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1601
+-ZDF:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:110:120
+-ZDFdigitext:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-ZDFdokukanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:660:670
+-ZDFinfokanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:610:620
+-ZDFtheaterkanal:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-JUMP:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1001
+-SPUTNIK:426000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:1201
+-Österreich 1:394000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:169
+-ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
+-ATV 2:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:631:632
+-Adagio:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-All Jazz:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Avante:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:741:743
+-B5 aktuell:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3101
+-BBC Prime:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:761:762
+-BData3:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-BData4:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-BData5:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-BR-alpha:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
+-Barock Fantasie:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Bayerisches FS:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:201:202
+-Bayern 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3601
+-Bayern 4 Klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3001
+-BibelTV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:731:732
+-Bloomberg:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-CLASSICA:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
+-COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:656
+-Canal 24 Horas:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:991:992
+-Club:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:711:713
+-Cristal New Age:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-DANCE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:304
+-DW-tv:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:634:632
+-Das Erste:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:101:102
+-Detskij Mir:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:931:932
+-ERT-Sat:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:691:692
+-Einstein TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
+-Euronews:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:597:596
+-Eurosport News:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:771:772
+-Extreme Sports:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:791:793
+-Extreme Sports:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Fashion TV:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:672
+-Fox Kids:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:671:673
+-GOLD:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:320
+-HITLISTE:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:784
+-HR XXL:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3501
+-JAZZ:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:640
+-Jazz legends:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Kabel Wizard:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Kanal 7:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Kanal 7:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:49:52
+-Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
+-Kanal D:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:651:652
+-LATIN:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:368
+-Landscape:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Leitseite:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2254:0
+-Liberty TV:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:721:723
+-MTV Base:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:781:782
+-MV-Test:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Modem-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Movie Sounds:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Musica Antica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-Musica Camerata:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-NDR Info:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3701
+-NTV international:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-NTVI:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:611:612
+-Nashe Kino:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:621:622
+-NordwestRadio:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3801
+-OLD GOLD:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:336
+-Opernfestival:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-PCNE:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:681:682
+-PREMIERE SPORT INTERACTIVE:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-PREMIERE DIREKT 1:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-PREMIERE DIREKT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-PREMIERE DIREKT 3:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-PREMIERE DIREKT 4:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2815:2816
+-PREMIERE EROTIK:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
+-PREMIERE NOSTALGIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
+-PREMIERE SERIE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
+-PREMIERE SPORT 1:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:258
+-PREMIERE SPORT 2:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
+-PREMIERE START:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
+-Parlamentsfernsehen:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:33:36
+-Phoenix:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:901:902
+-Portal:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-RTP Internacional:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:661:662
+-Rai 1:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:951:952
+-Rai 2:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:961:962
+-Rai 3:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:971:972
+-SCHLAGER:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
+-SR 1:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3901
+-SR Fernsehen Suedwest:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:501:502
+-Show TV:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:911:912
+-Sinfonica:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-TGRT:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:921:922
+-TM V1.0:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-TV Polonia:434000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:641:642
+-TVEi:121000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:981:982
+-TW1:113000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:751:752
+-Test-R:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:701:702
+-Travel:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:595:594
+-VCR-Setup:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-VH1 Classic:610000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:604:603
+-Videotext:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-WDR FERNSEHEN:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:601:602
+-ZEE TV:442000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-arte:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:401:403
+-hessen fernsehen:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:301:302
+-hr-chronos:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3201
+-hr-klassik:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3401
+-hr2:410000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:3301
+-13 TH STREET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
+-ALTERNATIVE ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:544
+-BEATE-UHSE.TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
+-CHILLOUT:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:400
+-CLASSIC ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
+-DISCOVERY CHANNEL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
+-DISNEY CHANNEL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2559:2560
+-DEUTSCHE HITS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:800
+-EASY LISTENING:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:608
+-Einstein:346000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-FILM & MUSICAL:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
+-FOX KIDS:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
+-GOLDSTAR TV:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:3839:3840
+-HARD ROCK:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:816
+-HEIMATKANAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
+-HIP HOP/R&B:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:576
+-JUNIOR:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:255:256
+-K-TOON:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+-KLASSIK POPULÄR:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:624
+-KRIMI &CO:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
+-LOVE SONGS:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:592
+-NEW COUNTRY:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:384
+-ORCHESTRALE WERKE:378000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:560
+-PLANET:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1792
+-PREMIERE 1:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:511:512
+-PREMIERE 2:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1791:1793
+-PREMIERE 3:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2303:2304
+-PREMIERE 4:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:767:768
+-PREMIERE 5:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1279:1280
+-PREMIERE 6:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1535:1536
+-PREMIERE 7:370000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:1023:1024
+-SOUL CLASSICS:362000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:352
+-STUDIO UNIVERSAL:354000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:2047:2048
+-Sonnenklar TV:402000000:INVERSION_OFF:6900000:FEC_NONE:QAM_64:0:0
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbs-astra dvb-apps/util/szap/channels.conf-dvbs-astra
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbs-astra 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbs-astra 1970-01-01 01:00:00.000000000 +0100
+@@ -1,226 +0,0 @@
+-Das Erste:11837:h:0:27500:101:102:1:28106
+-ZDF:11954:h:0:27500:110:120:1:28006
+-3sat:11954:h:0:27500:210:220:1:28007
+-EinsMuXx:12110:h:0:27500:301:302:1:28203
+-EinsFestival:12110:h:0:27500:201:202:1:28202
+-EinsExtra:12110:h:0:27500:101:102:1:28201
+-MDR FERNSEHEN:12110:h:0:27500:401:402:1:28204
+-ORB-Fernsehen:12110:h:0:27500:501:502:1:28205
+-B1 Berlin:12110:h:0:27500:601:602:1:28206
+-SWR Fernsehen:11837:h:0:27500:801:802:1:28113
+-SR Fernsehen Suedwes:11837:h:0:27500:501:502:1:28110
+-hessen fernsehen:11837:h:0:27500:301:302:1:28108
+-WDR FERNSEHEN:11837:h:0:27500:601:602:1:28111
+-Bayerisches FS:11837:h:0:27500:201:202:1:28107
+-N3:12110:h:0:27500:2401:2402:1:28224
+-BR-alpha:11837:h:0:27500:701:702:1:28112
+-KiKa:11954:h:0:27500:310:320:1:28008
+-arte:11836:h:0:27500:401:402:1:28109
+-ZDF Theaterkanal:11954:h:0:27500:1110:1120:1:28016
+-ZDF.info:11954:h:0:27500:610:620:1:28011
+-ZDF.doku:11954:h:0:27500:660:670:1:28014
+-Phoenix:11837:h:0:27500:901:902:1:28114
+-DW-tv:10786:v:0:21997:305:306:1:9005
+-RTL Television:12188:h:0:27500:163:104:1:12003
+-SAT.1:12480:v:0:27500:1791:1792:1:46
+-ProSieben:12480:v:0:27500:255:256:1:898
+-RTL2:12188:h:0:27500:166:128:1:12020
+-Super RTL:12188:h:0:27500:165:120:1:12040
+-KABEL1:12480:v:0:27500:511:512:1:899
+-VOX:12188:h:0:27500:167:136:1:12060
+-tm3:12480:v:0:27500:767:768:1:897
+-Bloomberg TV Germany:12552:v:0:22000:162:99:1:12160
+-EuroNews:11954:h:0:27500:2221:2233:1:28015
+-N24:12480:v:0:27500:2047:2048:1:47
+-n-tv:12670:v:0:22000:162:96:1:12730
+-DSF:12480:v:0:27500:1023:1024:1:900
+-Eurosport:11954:h:0:27500:410:420:1:28009
+-Via 1 - Sch ner Re:12148:h:0:27500:511:512:1:44
+-Home Order Tel:12480:v:0:27500:1279:1280:1:40
+-QVC GERMANY:12552:v:0:22000:165:166:1:12100
+-TW 1:12692:h:0:22000:166:167:1:13013
+-Canal Canarias:12441:v:0:27500:513:681:1:29700
+-ProSieben A:12051:v:0:27500:161:84:1:20002
+-ProSieben CH:12051:v:0:27500:289:290:1:20001
+-Kabel 1 Austria:12051:v:0:27500:166:167:1:20004
+-Kabel 1 Schweiz:12051:v:0:27500:162:163:1:20003
+-CNN Int.:12168:v:0:27500:165:100:1:28512
+-Sky News:12552:v:0:22000:305:306:1:3995
+-Travel:12168:v:0:27500:163:92:1:28001
+-AB SAT / XXL:12266:h:0:27500:164:96:1:17004
+-MOTEURS:12266:h:0:27500:160:80:1:17000
+-HOT GM:12148:h:0:27500:767:768:1:45
+-KTO:12129:v:0:27500:170:120:1:8411
+-LA CINQUIEME:12207:v:0:27500:160:80:1:8501
+-LCP:12207:v:0:27500:165:100:1:8506
+-LibertyTV.com:12611:v:0:22000:941:942:1:12280
+-TV5 Europe:12611:v:0:22000:45:46:1:12240
+-Motors TV:12611:v:0:22000:191:194:1:12300
+-Wishline:12611:v:0:22000:214:216:1:12320
+-TV 5:10786:v:0:21997:164:112:1:9001
+-RTM - MAROC:10786:v:0:21997:162:96:1:9002
+-ESC1 - EGYPTE:10786:v:0:21997:163:104:1:9003
+-RAI 1:10786:v:0:21997:289:290:1:9004
+-RTPI:10786:v:0:21997:300:301:1:9006
+-TV7:10786:v:0:21997:166:128:1:9007
+-ARTE:10786:v:0:21997:167:136:1:9009
+-Colourbars:12611:v:0:22000:48:49:1:3982
+-Alice:12611:v:0:22000:162:96:1:12200
+-Video Italia:12611:v:0:22000:121:122:1:12220
+-ANDALUCIA TV:11934:v:0:27500:166:104:1:29011
+-TVC INT.:12441:v:0:27500:512:660:1:29701
+-TV4:11992:h:0:27500:165:98:1:20365
+-TV Niepokalanow:11876:h:0:27500:161:82:1:20601
+-VIVA:12670:v:0:22000:309:310:1:12732
+-VIVA ZWEI:12552:v:0:22000:171:172:1:12120
+-MTV Central:12699:v:0:22000:3031:3032:1:28643
+-ONYX:12692:h:1:27500:161:84:1:502
+-VIVA polska:11603:h:1:27500:190:191:1:611
+-DeeJay TV:11603:h:1:27500:160:161:1:602
+-NBC:11053:h:1:27500:550:551:1:8008
+-EWTN:10722:h:1:29900:1001:1201:1:4601
+-MTA INTL:10722:h:1:29900:1004:1204:1:4604
+-VOX:11053:h:1:27500:500:501:1:8002
+-SAT.1 A:11053:h:1:27500:511:512:1:8003
+-RTL2 AUSTRIA:11053:h:1:27500:520:521:1:8004
+-ZDF:11053:h:1:27500:570:571:1:8011
+-K-TV:11053:h:1:27500:580:581:1:8012
+-RTL Television:11053:h:1:27500:160:80:1:8001
+-ARTE:11059:v:1:6510:98:99:1:1
+-HOT Italia:11095:h:1:27500:4194:4195:1:3714
+-Olisat:11095:h:1:27500:33:34:1:3718
+-VIVA-POLSKA:11128:h:1:4340:98:99:1:1
+-DW-tv:11195:v:1:9099:101:102:1:5301
+-Canal 24 Horas:11203:h:1:3999:4130:4131:1:5301
+-TV5:11337:v:1:5631:512:640:1:1
+-SAT.1 CH:11603:h:1:27500:101:102:1:601
+-KurdSat:11603:h:1:27500:111:112:1:603
+-ARD "Das Erste":11603:h:1:27500:172:173:1:606
+-RTL 2 CH:11603:h:1:27500:175:176:1:609
+-Super RTL A:11603:h:1:27500:180:181:1:610
+-TV ROMANIA:11622:v:1:27500:227:247:1:10707
+-MRTV:11622:v:1:27500:222:242:1:10702
+-102.5 HIT Ch:11622:v:1:27500:224:244:1:10704
+-TLC SAT:11622:v:1:27500:225:245:1:10705
+-PRO-SAT:11622:v:1:27500:246:226:1:10706
+-Channel SUN:11622:v:1:27500:229:249:1:10709
+-Racing Channel:11622:v:1:27500:228:248:1:10708
+-3 ABN:11622:v:1:27500:221:241:1:10701
+-Bloom.Germany:11642:h:1:27500:1460:1420:1:4
+-Bloomberg TV UK:11642:h:1:27500:1560:1520:1:4
+-Sat 7:11642:h:1:27500:1660:1620:1:4
+-EDTV 1:11746:h:1:27500:4130:4131:1:9501
+-EDTV SPORT:11746:h:1:27500:4386:4387:1:9502
+-EDTV BUSINESS:11746:h:1:27500:4642:4643:1:9503
+-EDTV DRAMA:11746:h:1:27500:4898:4899:1:9504
+-RAI1:11765:v:1:27499:160:80:1:3401
+-RAI2:11765:v:1:27499:161:84:1:3402
+-RAI3:11765:v:1:27499:162:88:1:3403
+-RaiWayTEST2:11765:v:1:27499:516:654:1:3405
+-RAIMOSAICO:11765:v:1:27499:518:8191:1:3407
+-RAINews24:11803:v:1:27500:516:654:1:3301
+-CAMERA DEPUTATI:11803:v:1:27500:517:655:1:3302
+-TELEPACE:11803:v:1:27500:515:653:1:3304
+-RAISPORTSAT:11803:v:1:27500:512:650:1:3305
+-RAINettunoSAT2:11803:v:1:27500:513:651:1:3306
+-RAIeducational:11803:v:1:27500:514:652:1:3307
+-RAINettunoSAT1:11803:v:1:27500:519:657:1:3308
+-SAT2000:11803:v:1:27500:518:656:1:3309
+-I1:11918:v:1:27499:512:650:1:1
+-C5:11918:v:1:27499:513:660:1:2
+-R4:11918:v:1:27499:514:670:1:3
+-Telesierra:12091:h:1:27500:4160:4161:1:8704
+-C. Milagro:12091:h:1:27500:4368:4369:1:8711
+-Italia Sat:12091:h:1:27500:4600:4601:1:8728
+-TVE Internacional:12091:h:1:27500:4208:4209:1:8707
+-Fiesta:12091:h:1:27500:4432:4433:1:8720
+-Retelsat:12091:h:1:27500:4464:4465:1:8722
+-ART EUROPE:12013:h:1:27495:164:96:1:450
+-EGYPT SAT. CH. 2:12013:h:1:27495:166:104:1:470
+-IQRA:12013:h:1:27495:168:112:1:474
+-MAURITANIA TV:12110:v:1:27500:230:231:1:704
+-ARMENIA TV:12110:v:1:27500:240:241:1:705
+-SAILING CHANNEL:12110:v:1:27500:260:261:1:707
+-AL JAZEERA:12110:v:1:27500:270:271:1:708
+-Coming Soon TV:12110:v:1:27500:310:311:1:717
+-SaluteBenessere:12110:v:1:27500:320:321:1:718
+-AH-EDP1:12148:v:1:27499:96:97:1:7201
+-AH-EDP2:12148:v:1:27499:112:113:1:7202
+-Espresso:12148:v:1:27499:192:193:1:7203
+-Alice:12148:v:1:27499:160:161:1:7220
+-Nuvolari:12148:v:1:27499:176:177:1:7221
+-Leonardo:12148:v:1:27499:128:129:1:7222
+-AH-EDP3:12148:v:1:27499:36:37:1:7205
+-OTE Promo:12187:v:1:27500:517:655:1:1001
+-RTS SAT:12187:v:1:27500:519:657:1:1022
+-ERT SAT:12187:v:1:27500:514:652:1:1102
+-EXTRA:12187:v:1:27500:516:654:1:1106
+-TRIAL:12187:v:1:27500:513:651:1:1108
+-Minimax:11303:h:1:19540:300:301:1:3
+-TVN1:12209:h:1:5631:4194:4195:1:1
+-RR TEST:10978:v:1:8998:33:34:1:1
+-TV 5 Thailand:10978:v:1:8998:1057:1058:1:2
+-TEST-1:10978:v:1:8998:3105:3106:1:4
+-FASHION:12244:h:1:27500:123:133:1:103
+-AJARA TV:12244:h:1:27500:127:137:1:107
+-SLO-TV1:12300:v:1:27495:200:201:1:3201
+-POLONIA 1:12302:v:1:27500:205:206:1:3203
+-SUPER 1:12302:v:1:27500:207:208:1:3207
+-NAPOLI INT.:12302:v:1:27500:240:241:1:3210
+-MAGIC:12302:v:1:27500:245:246:1:3211
+-COUNTDOWN:12302:v:1:27500:235:236:1:3212
+-TBNE:12302:v:1:27500:230:231:1:3213
+-NAPOLI CHANNEL:12302:v:1:27500:227:228:1:3215
+-KURDISTAN TV:12302:v:1:27500:225:226:1:3214
+-ATLAS TV:12379:v:1:27500:3022:3032:1:3002
+-TELE 24 SWITZERLAND:12379:v:1:27500:3023:3033:1:3003
+-Abu Dhabi TV:12379:v:1:27500:3024:3034:1:3004
+-RTV MONTENEGRO:12379:v:1:27500:3026:3036:1:3006
+-JAAM-E-JAM 1:12436:h:1:27500:160:80:1:1
+-JAAM-E-JAM 2:12436:h:1:27500:161:82:1:2
+-SAHAR:12436:h:1:27500:162:84:1:3
+-SAHAR 2:12436:h:1:27500:163:86:1:4
+-IRINN:12436:h:1:27500:164:88:1:5
+-Musicmax:11303:h:1:19540:500:501:1:6
+-TEST:12474:h:1:27500:771:8191:1:10608
+-EbS:12474:h:1:27500:101:201:1:10601
+-MOU.2:12474:h:1:27500:42:43:1:10602
+-PINK PLUS:12474:h:1:27500:308:256:1:10605
+-LibertyTV.com:12474:h:1:27500:941:942:1:10603
+-2M Maroc:12474:h:1:27500:601:602:1:10607
+-ZEE TV:12474:h:1:27500:910:911:1:10604
+-WorldNet Europe:12483:v:1:8299:4260:4220:1:1
+-WorldNet:12483:v:1:8299:4560:4520:1:4
+-SICILIA INTERNATIONA:12519:v:1:27499:501:502:1:8309
+-SARDEGNA UNO:12519:v:1:27499:503:504:1:8310
+-EuroMed:12519:v:1:27499:510:511:1:8312
+-TGRT:12519:v:1:27499:505:506:1:8313
+-VIDEOLINA:12519:v:1:27499:515:516:1:8318
+-MEDIOLANUM:12538:h:1:27500:1131:1132:1:8987
+-www.travel:12538:h:1:27500:1180:1183:1:8992
+-MonteCarloSat:12538:h:1:27500:5126:5122:1:8877
+-Bulgaria TV:12538:h:1:27500:4612:4613:1:8827
+-TVN1:12571:h:1:5631:4194:4195:1:1
+-JSTV 1:12595:v:1:27500:2000:2001:1:8213
+-JSTV 2:12595:v:1:27500:2011:2013:1:8214
+-MBC:12595:v:1:27500:160:80:1:8201
+-ANN:12595:v:1:27500:161:84:1:8202
+-BET:12595:v:1:27500:167:108:1:8208
+-EuroNews:12595:v:1:27500:2221:2231:1:8211
+-Sharjah Arabs:12653:h:1:27500:1160:1120:1:1
+-Qatar Arabs:12653:h:1:27500:1260:1220:1:2
+-Saudi 1 Arabs:12653:h:1:27500:1360:1320:1:3
+-Kuwait Arabs:12653:h:1:27500:1460:1420:1:4
+-Libya Arabs:12653:h:1:27500:1560:1520:1:5
+-Sudan Arabs:12653:h:1:27500:1660:1620:1:6
+-Oman Arabs:12653:h:1:27500:1760:1720:1:7
+-Jordan Arabs:12653:h:1:27500:1860:1820:1:8
+-IRAQ TV:12653:h:1:27500:1960:1920:1:9
+-Dubai Sport:12653:h:1:27500:1060:1020:1:10
+-Digitaly:12672:v:1:27500:220:221:1:4203
+-Telemarket:12672:v:1:27500:350:351:1:4211
+-eVision:12672:v:1:27500:360:361:1:4214
+-Thai TV5:12672:v:1:27500:200:201:1:4201
+-Studio Europa:12672:v:1:27500:230:231:1:4204
+-Video Italia:12672:v:1:27500:340:341:1:4210
+-GAME NETWORK:12672:v:1:27500:291:292:1:4213
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-australia dvb-apps/util/szap/channels.conf-dvbt-australia
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-australia 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbt-australia 1970-01-01 01:00:00.000000000 +0100
+@@ -1,31 +0,0 @@
+-ABC HDTV:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:2307:0:560
+-ABC TV Melbourne:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:561
+-ABC TV 2:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:562
+-ABC TV 3:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:563
+-ABC TV 4:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:564
+-ABC DiG Radio:226500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:0:2311:566
+-TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1585
+-TEN Digital 1:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1586
+-TEN Digital 2:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1587
+-TEN Digital 3:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1588
+-TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1589
+-TEN Digital 4:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1590
+-TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1591
+-TEN HD:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:0:1592
+-TEN Digital:219500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:650:1593
+-Nine Digital:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:660:1072
+-Nine Digital HD:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:0:1073
+-Nine Guide:191625000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:514:670:1074
+-7 Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1328
+-7 Digital 1:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1329
+-7 Digital 2:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1330
+-7 Digital 3:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:769:770:1331
+-7 HD Digital:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:833:834:1332
+-7 Program Guide:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:865:866:1334
+-SBS HD:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:102:103:784
+-SBS DIGITAL 1:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:81:785
+-SBS DIGITAL 2:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:162:83:786
+-SBS EPG:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:163:85:787
+-SBS RADIO 1:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:201:798
+-SBS RADIO 2:536500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:202:799
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-berlin dvb-apps/util/szap/channels.conf-dvbt-berlin
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-berlin 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbt-berlin 1970-01-01 01:00:00.000000000 +0100
+@@ -1,51 +0,0 @@
+-c5:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
+-c7:191500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
+-c25:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
+-c27:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
+-c33:570000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
+-c44:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
+-c56:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
+-c59:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:82
+-
+-SWR BW:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:257:258:16
+-WDR:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:241:242:15
+-BBC World:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:49:50:16387
+-FAB:177500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:3073:3074:16576
+-
+-MDR Fernsehen:191500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:101:102:1
+-arte:191500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:201:202:2
+-NDR Fernsehen:191500000:INVERSION_OFF:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:301:302:3
+-
+-RTL:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:337:338:16405
+-RTL2:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:353:354:16406
+-Super RTL:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:433:434:16411
+-VOX:506000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:545:546:16418
+-
+-Das Erste:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1401:1402:14
+-Phoenix:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1301:1302:13
+-RBB Berlin:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1201:1202:12
+-RBB Brandenburg:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1101:1102:11
+-
+-ZDF:570000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:545:546:514
+-Info/3sat:570000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:561:562:515
+-Doku/KiKa:570000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:593:594:517
+-
+-Kabel 1:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:161:162:16394
+-N24:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:225:226:16398
+-ProSieben:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:305:306:16403
+-SAT.1:658000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:385:386:16408
+-
+-DSF:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:129:130:16392
+-Testkanal n-tv:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:273:274:16401
+-VIVA Plus:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:529:530:16417
+-Eurosport:754000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:577:578:16420
+-
+-Testkanal Eurosport:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:577:578:16420
+-SUD:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16642
+-HUMAX DOWNLOAD SVC:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16645
+-IP Services:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16640
+-Media Broadcast Services:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16641
+-SUD 1:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16643
+-Kathrein Download:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:0:0:16644
+-Testkanal MTV:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:193:194:16396
+-Testkanal n-tv:778000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:273:274:16401
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-collserola dvb-apps/util/szap/channels.conf-dvbt-collserola
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-collserola 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbt-collserola 1970-01-01 01:00:00.000000000 +0100
+@@ -1,25 +0,0 @@
+-#channels.conf for DVB-T - Collserola (Barcelona) Transmitter
+-
+-#C43
+-TV3:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:111:112:801
+-K3/33:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:121:122:802
+-3/24:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:131:132:803
+-Canal Pilot:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:141:142:804
+-3XL.net:650000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:151:152:805
+-
+-#C61
+-TVE 1:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
+-TVE 2:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
+-ANTENA 3:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
+-CANAL+:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
+-TELECINCO:794000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
+-
+-#C66
+-Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
+-Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
+-Video Promocional 1:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:210:212:425
+-Video Promocional 2:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:110:0:420
+-[1388]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5000
+-[138c]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5004
+-[138a]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5002
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-crystal-palace dvb-apps/util/szap/channels.conf-dvbt-crystal-palace
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-crystal-palace 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbt-crystal-palace 1970-01-01 01:00:00.000000000 +0100
+@@ -1,70 +0,0 @@
+-#channels.conf for DVB-T - Crystal Palace Transmitter
+-
+-# Multiplex 1 BBC - Channel 25, Offset -, Freq 505833333
+-BBCi:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0:4479
+-CBBC Channel:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0:4671
+-BBC ONE:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
+-BBC TWO:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
+-BBC THREE:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
+-BBC NEWS 24:505833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
+-
+-# Multiplex 2 Digital 3&4 - Channel 22, Offset -, Freq 481833333
+-Teletext:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-FourText:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-CHANNEL4:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2827:2828
+-ITV NEWS:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2850:2851
+-ITV 1:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:512:650
+-ITV 2:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
+-Ch 14:481833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
+-
+-#Multiplex A SDN - Channel 32, Offset -, Frequency 561833333
+-ntl:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-Ch 15:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
+-BBC Radio 1:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6210
+-BBC Radio 2:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6226
+-BBC Radio 3:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6242
+-BBC Radio 4:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6258
+-QVC:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
+-FIVE:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
+-bid-up.tv:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
+-TV Travel Shop:561833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6161
+-
+-#Multiplex B BBC - Channel 28, Offset -, Frequency 529833333
+-#Community (0x4e00) 01: PCR 0x1fff
+-#703 (0x4c80) 01: PCR 0x1fff
+-BBC PARLMNT:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
+-BBC FOUR:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
+-701:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
+-702:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
+-CBeebies:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
+-BBC Asian Net:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:435
+-1Xtra BBC:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:434
+-BBC 7:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:433
+-BBC 6 Music:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:432
+-BBC 5L SportsX:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:431
+-BBC R5 Live:529833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:430
+-
+-# Multiplex C Crown Castle - Channel 34, Offset +, Frequency 578166666
+-UKHistory:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
+-Sky Travel:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
+-Sky Spts News:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
+-Sky News:578166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
+-
+-# Multiplex D Crown Castle - Channel 29, Offset -, Freq 537833333
+-#UKBrightIdeas (0x64c0) 01: PCR 0x1fff
+-THE HITS:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
+-TMF:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
+-CBM:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:501:502
+-Free2Play:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-Q:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1901
+-Magic:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1801
+-The Hits Radio:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1701
+-BBC World Sv:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1601
+-oneworld:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1501
+-jazz fm:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1401
+-Kerrang:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1301
+-Smash Hits:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1201
+-Kiss:537833333:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1101
+-
+-
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-hannington dvb-apps/util/szap/channels.conf-dvbt-hannington
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-hannington 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbt-hannington 1970-01-01 01:00:00.000000000 +0100
+@@ -1,28 +0,0 @@
+-BBC One:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
+-BBC Two:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
+-CBBC:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
+-BBC Three:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
+-BBC News 24:706000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
+-CBeebies:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
+-BBC Four:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
+-BBC Parliament:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
+-701:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
+-702:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
+-703:674166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-ITV 1:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
+-ITV 2:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
+-Channel 4:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
+-ITV News:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
+-price-drop.tv:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
+-Five:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
+-QVC:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6059:6050
+-Tv Travel Shop:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6162
+-Channel 15:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
+-bid-up.tv:626166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
+-Sky News:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
+-Sky Sports News:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
+-Sky Travel:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
+-UK History:658166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
+-The Hits:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
+-TMF:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
+-UK Bright Ideas:634166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-madrid dvb-apps/util/szap/channels.conf-dvbt-madrid
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-madrid 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbt-madrid 1970-01-01 01:00:00.000000000 +0100
+@@ -1,16 +0,0 @@
+-Veo TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:302:1536
+-Net TV:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:402:1825
+-[1388]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5000
+-[138c]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5004
+-[138a]:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:5002
+-Video Promocional:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:420
+-Informe Semanal:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:0:0:425
+-TVE 2:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:201:203:1441
+-ANTENA 3:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:301:303:1121
+-TELECINCO:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:401:403:1185
+-CANAL+:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:501:503:1057
+-TVE 1:770000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:101:103:1377
+-Telemadrid:810000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:111:113:421
+-La Otra:810000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:211:212:422
+-Quiero Madrid:810000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:411:412:424
+-Onda 6:810000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:311:312:423
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-oxford dvb-apps/util/szap/channels.conf-dvbt-oxford
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-oxford 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbt-oxford 1970-01-01 01:00:00.000000000 +0100
+@@ -1,41 +0,0 @@
+-BBC-Choice:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
+-BBC-Knowledge:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
+-BBC-News24:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
+-BBC-1:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
+-BBC-Parliament:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
+-BBC-2:578000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
+-ITV-1:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
+-ITV-2:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
+-ITV-Sport:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2836:2837
+-FilmFour:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2822:2823
+-C4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2826:2827
+-E4:850000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
+-C5:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
+-Shop:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
+-ITVSelect-Info:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6065:6066
+-ITVSelect-1:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6081:6082
+-ITVSelect-2:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6097:6098
+-ITVSelect-3:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6113:6114
+-ITVSelect-4:713833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6129:6130
+-Carlton-Cinema:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
+-Sky-One:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
+-Sky-Sports-1:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
+-Sky-Premier:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1056:1057
+-CartoonNetwork:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
+-UK-Horizons:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
+-ITV-Sport-Plus:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
+-ITVSportSelect:721833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:2596
+-BreezeMen&Mtrs:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
+-Granada-Plus:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
+-MTV:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1568:1569
+-Sky-Movie-Max:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
+-Sky-Sports-2:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
+-UK-Gold:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
+-Wellbeing:690000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1824:1825
+-PLAY-uk:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:288:289
+-UK-Style:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:544:545
+-no-name:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:800:801
+-Discovery:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1312:1313
+-Nick/Paramount:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2080:2081
+-Sky-Sports-3:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2336:2337
+-Brit-Eurosport:538000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2592:2593
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-reigate dvb-apps/util/szap/channels.conf-dvbt-reigate
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-reigate 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbt-reigate 1970-01-01 01:00:00.000000000 +0100
+@@ -1,51 +0,0 @@
+-BBC ONE:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
+-BBC TWO:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
+-ITV 1:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:512:650
+-Channel 4:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2827:2828
+-five:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
+-ITV 2:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2818:2819
+-BBC THREE:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-Teletext:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-BBC FOUR:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-Sky Travel:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
+-UKHistory:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:401:402
+-Ch 14:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2840:2841
+-Ch 15:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
+-QVC:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
+-TV Travel Shop:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6161:6162
+-The HITS:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
+-UKBrightIdeas:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:301:302
+-f tn:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-TMF:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
+-bid-up.tv:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6273:6274
+-CBM:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:501:502
+-CBBC Channel:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
+-CBeebies:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:401
+-BBC NEWS 24:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
+-ITV News:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2850:2851
+-Sky News:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:101:102
+-Sky Spts News:618166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:201:202
+-BBC PARLMNT:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:403
+-Community:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-FourText:474000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-BBCi:554000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-ntl:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+-BBC Radio 1:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6210
+-1Xtra BBC:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:434
+-BBC Radio 2:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6226
+-BBC Radio 3:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6242
+-BBC Radio 4:498000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_1_2:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:6258
+-BBC R5 Live:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:430
+-BBC 5L SportsX:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:431
+-BBC 6 Music:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:432
+-BBC 7:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:433
+-BBC Asian Net.:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:435
+-BBC World Sv.:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1601
+-Smash Hits!:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1201
+-Kiss:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1101
+-Kerrang!:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1301
+-jazz fm:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1401
+-oneword:834000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:1501
+-701:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:203:407
+-702:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:204:411
+-703:522000000:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_3_4:FEC_NONE:QAM_16:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:0
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-sandy_heath dvb-apps/util/szap/channels.conf-dvbt-sandy_heath
+--- linuxtv-dvb-apps-1.1.1/util/szap/channels.conf-dvbt-sandy_heath 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/channels.conf-dvbt-sandy_heath 1970-01-01 01:00:00.000000000 +0100
+@@ -1,13 +0,0 @@
+-BBC-Choice:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:620:621
+-BBC-Knowledge:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:630:631
+-BBC-News24:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:640:641
+-BBC-1:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:600:601
+-BBC-Parliament:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:0:660
+-BBC-2:641833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:610:611
+-ITV-1:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:513:651
+-ITV-2:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2819:2820
+-C4:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2823:2824
+-E4:665833334:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:2831:2832
+-C5:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6017:6018
+-Shop:650166666:INVERSION_OFF:BANDWIDTH_8_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_2K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:6049:6050
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/czap.c dvb-apps/util/szap/czap.c
+--- linuxtv-dvb-apps-1.1.1/util/szap/czap.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/czap.c 2009-06-21 13:29:06.000000000 +0200
+@@ -16,8 +16,9 @@
+
+ static char FRONTEND_DEV [80];
+ static char DEMUX_DEV [80];
++static int exit_after_tuning;
+
+-#define CHANNEL_FILE "/.czap/channels.conf"
++#define CHANNEL_FILE "channels.conf"
+
+ #define ERROR(x...) \
+ do { \
+@@ -71,14 +72,17 @@
+
+
+ static
+-int parse_param(const char *val, const Param * plist, int list_size)
++int parse_param(const char *val, const Param * plist, int list_size, int *ok)
+ {
+ int i;
+
+ for (i = 0; i < list_size; i++) {
+- if (strcasecmp(plist[i].name, val) == 0)
++ if (strcasecmp(plist[i].name, val) == 0) {
++ *ok = 1;
+ return plist[i].value;
++ }
+ }
++ *ok = 0;
+ return -1;
+ }
+
+@@ -119,6 +123,7 @@
+ FILE *f;
+ char *chan;
+ char *name, *inv, *fec, *mod;
++ int ok;
+
+ if ((f = fopen(fname, "r")) == NULL) {
+ PERROR("could not open file '%s'", fname);
+@@ -144,19 +149,19 @@
+ ERROR("cannot parse service data");
+ return -3;
+ }
+- frontend->inversion = parse_param(inv, inversion_list, LIST_SIZE(inversion_list));
+- if (frontend->inversion < 0) {
++ frontend->inversion = parse_param(inv, inversion_list, LIST_SIZE(inversion_list), &ok);
++ if (!ok) {
+ ERROR("inversion field syntax '%s'", inv);
+ return -4;
+ }
+- frontend->u.qam.fec_inner = parse_param(fec, fec_list, LIST_SIZE(fec_list));
+- if (frontend->u.qam.fec_inner < 0) {
++ frontend->u.qam.fec_inner = parse_param(fec, fec_list, LIST_SIZE(fec_list), &ok);
++ if (!ok) {
+ ERROR("FEC field syntax '%s'", fec);
+ return -5;
+ }
+ frontend->u.qam.modulation = parse_param(mod, modulation_list,
+- LIST_SIZE(modulation_list));
+- if (frontend->u.qam.modulation < 0) {
++ LIST_SIZE(modulation_list), &ok);
++ if (!ok) {
+ ERROR("modulation field syntax '%s'", mod);
+ return -6;
+ }
+@@ -223,7 +228,7 @@
+
+
+ static
+-int check_frontend (int fe_fd)
++int check_frontend (int fe_fd, int human_readable)
+ {
+ fe_status_t status;
+ uint16_t snr, signal;
+@@ -236,9 +241,13 @@
+ ioctl(fe_fd, FE_READ_BER, &ber);
+ ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks);
+
+- printf ("status %02x | signal %04x | snr %04x | "
+- "ber %08x | unc %08x | ",
+- status, signal, snr, ber, uncorrected_blocks);
++ if (human_readable) {
++ printf ("status %02x | signal %3u%% | snr %3u%% | ber %d | unc %d | ",
++ status, (signal * 100) / 0xffff, (snr * 100) / 0xffff, ber, uncorrected_blocks);
++ } else {
++ printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
++ status, signal, snr, ber, uncorrected_blocks);
++ }
+
+ if (status & FE_HAS_LOCK)
+ printf("FE_HAS_LOCK");
+@@ -246,13 +255,16 @@
+ usleep(1000000);
+
+ printf("\n");
++
++ if (exit_after_tuning && (status & FE_HAS_LOCK))
++ break;
+ } while (1);
+
+ return 0;
+ }
+
+
+-static const char *usage = "\nusage: %s [-a adapter_num] [-f frontend_id] [-d demux_id] [-c conf_file] {<channel name>| -n channel_num}\n"
++static const char *usage = "\nusage: %s [-a adapter_num] [-f frontend_id] [-d demux_id] [-c conf_file] [ -H ] {<channel name>| -n channel_num} [-x]\n"
+ " or: %s [-c conf_file] -l\n\n";
+
+
+@@ -266,66 +278,78 @@
+ int vpid, apid;
+ int frontend_fd, video_fd, audio_fd;
+ int opt, list_channels = 0, chan_no = 0;
++ int human_readable = 0;
+
+- while ((opt = getopt(argc, argv, "ln:hrn:a:f:d:c:")) != -1) {
+- switch (opt) {
+- case 'a':
+- adapter = strtoul(optarg, NULL, 0);
+- break;
+- case 'f':
+- frontend = strtoul(optarg, NULL, 0);
+- break;
+- case 'd':
+- demux = strtoul(optarg, NULL, 0);
+- break;
+- case 'r':
+- dvr = 1;
+- break;
+- case 'l':
+- list_channels = 1;
+- break;
+- case 'n':
+- chan_no = strtoul(optarg, NULL, 0);
+- break;
+- case 'c':
+- confname = optarg;
+- break;
+- case '?':
+- case 'h':
+- default:
+- fprintf (stderr, usage, argv[0], argv[0]);
+- return -1;
+- };
+- }
+-
+- if (optind < argc)
+- channel = argv[optind];
++ while ((opt = getopt(argc, argv, "Hln:hrn:a:f:d:c:x")) != -1) {
++ switch (opt) {
++ case 'a':
++ adapter = strtoul(optarg, NULL, 0);
++ break;
++ case 'f':
++ frontend = strtoul(optarg, NULL, 0);
++ break;
++ case 'd':
++ demux = strtoul(optarg, NULL, 0);
++ break;
++ case 'r':
++ dvr = 1;
++ break;
++ case 'l':
++ list_channels = 1;
++ break;
++ case 'n':
++ chan_no = strtoul(optarg, NULL, 0);
++ break;
++ case 'x':
++ exit_after_tuning = 1;
++ break;
++ case 'H':
++ human_readable = 1;
++ break;
++ case 'c':
++ confname = optarg;
++ break;
++ case '?':
++ case 'h':
++ default:
++ fprintf (stderr, usage, argv[0], argv[0]);
++ return -1;
++ };
++ }
+
+- if (!channel && chan_no <= 0 && !list_channels) {
+- fprintf (stderr, usage, argv[0], argv[0]);
+- return -1;
+- }
++ if (optind < argc)
++ channel = argv[optind];
++
++ if (!channel && chan_no <= 0 && !list_channels) {
++ fprintf (stderr, usage, argv[0], argv[0]);
++ return -1;
++ }
+
+ if (!homedir)
+ ERROR("$HOME not set");
+
+- snprintf (FRONTEND_DEV, sizeof(FRONTEND_DEV),
+- "/dev/dvb/adapter%i/frontend%i", adapter, frontend);
++ snprintf (FRONTEND_DEV, sizeof(FRONTEND_DEV),
++ "/dev/dvb/adapter%i/frontend%i", adapter, frontend);
+
+- snprintf (DEMUX_DEV, sizeof(DEMUX_DEV),
+- "/dev/dvb/adapter%i/demux%i", adapter, demux);
++ snprintf (DEMUX_DEV, sizeof(DEMUX_DEV),
++ "/dev/dvb/adapter%i/demux%i", adapter, demux);
+
+ printf ("using '%s' and '%s'\n", FRONTEND_DEV, DEMUX_DEV);
+
+ if (!confname)
+ {
++ int len = strlen(homedir) + strlen(CHANNEL_FILE) + 18;
+ if (!homedir)
+ ERROR("$HOME not set");
+- confname = malloc(strlen(homedir) + strlen(CHANNEL_FILE) + 1);
+- memcpy(confname, homedir, strlen(homedir));
+- memcpy(confname + strlen(homedir), CHANNEL_FILE,
+- strlen(CHANNEL_FILE) + 1);
++ confname = malloc(len);
++ snprintf(confname, len, "%s/.czap/%i/%s",
++ homedir, adapter, CHANNEL_FILE);
++ if (access(confname, R_OK))
++ snprintf(confname, len, "%s/.czap/%s",
++ homedir, CHANNEL_FILE);
+ }
++ printf("reading channels from file '%s'\n", confname);
++
+ memset(&frontend_param, 0, sizeof(struct dvb_frontend_parameters));
+
+ if (parse(confname, list_channels, chan_no, channel, &frontend_param, &vpid, &apid))
+@@ -357,7 +381,7 @@
+ if (set_pesfilter (audio_fd, apid, DMX_PES_AUDIO, dvr) < 0)
+ return -1;
+
+- check_frontend (frontend_fd);
++ check_frontend (frontend_fd, human_readable);
+
+ close (audio_fd);
+ close (video_fd);
+@@ -365,4 +389,3 @@
+
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/femon.c dvb-apps/util/szap/femon.c
+--- linuxtv-dvb-apps-1.1.1/util/szap/femon.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/femon.c 1970-01-01 01:00:00.000000000 +0100
+@@ -1,149 +0,0 @@
+-/* femon -- monitor frontend status
+- *
+- * Copyright (C) 2003 convergence GmbH
+- * Johannes Stezenbach <js@convergence.de>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2 of the License, or
+- * (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+- */
+-
+-
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <limits.h>
+-#include <string.h>
+-#include <errno.h>
+-#include <sys/ioctl.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-#include <sys/poll.h>
+-#include <fcntl.h>
+-#include <time.h>
+-#include <unistd.h>
+-
+-#include <stdint.h>
+-#include <sys/time.h>
+-
+-#include <linux/dvb/frontend.h>
+-
+-#ifndef TRUE
+-#define TRUE (1==1)
+-#endif
+-#ifndef FALSE
+-#define FALSE (1==0)
+-#endif
+-
+-
+-#define FRONTENDDEVICE "/dev/dvb/adapter%d/frontend%d"
+-
+-static char *usage_str =
+- "\nusage: femon [options]\n"
+- " -a number : use given adapter (default 0)\n"
+- " -f number : use given frontend (default 0)\n\n";
+-
+-
+-static void usage(void)
+-{
+- fprintf(stderr, usage_str);
+- exit(1);
+-}
+-
+-
+-static
+-int check_frontend (int fe_fd)
+-{
+- fe_status_t status;
+- uint16_t snr, signal;
+- uint32_t ber, uncorrected_blocks;
+-
+- do {
+- ioctl(fe_fd, FE_READ_STATUS, &status);
+- ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal);
+- ioctl(fe_fd, FE_READ_SNR, &snr);
+- ioctl(fe_fd, FE_READ_BER, &ber);
+- ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks);
+-
+- printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
+- status, signal, snr, ber, uncorrected_blocks);
+-
+- if (status & FE_HAS_LOCK)
+- printf("FE_HAS_LOCK");
+-
+- printf("\n");
+- usleep(1000000);
+- } while (1);
+-
+- return 0;
+-}
+-
+-
+-static
+-int do_mon(unsigned int adapter, unsigned int frontend)
+-{
+- char fedev[128];
+- int fefd;
+- int result;
+- struct dvb_frontend_info fe_info;
+-
+- snprintf(fedev, sizeof(fedev), FRONTENDDEVICE, adapter, frontend);
+- printf("using '%s'\n", fedev);
+-
+- if ((fefd = open(fedev, O_RDONLY | O_NONBLOCK)) < 0) {
+- perror("opening frontend failed");
+- return FALSE;
+- }
+-
+- result = ioctl(fefd, FE_GET_INFO, &fe_info);
+-
+- if (result < 0) {
+- perror("ioctl FE_GET_INFO failed");
+- close(fefd);
+- return FALSE;
+- }
+-
+- printf("FE: %s (%s)\n", fe_info.name, fe_info.type == FE_QPSK ? "SAT" :
+- fe_info.type == FE_QAM ? "CABLE": "TERRESTRIAL");
+-
+- check_frontend (fefd);
+-
+- close(fefd);
+-
+- return result;
+-}
+-
+-int main(int argc, char *argv[])
+-{
+- unsigned int adapter = 0, frontend = 0;
+- int opt;
+-
+- while ((opt = getopt(argc, argv, "hlrn:a:f:d:")) != -1) {
+- switch (opt)
+- {
+- case '?':
+- case 'h':
+- default:
+- usage();
+- case 'a':
+- adapter = strtoul(optarg, NULL, 0);
+- break;
+- case 'f':
+- frontend = strtoul(optarg, NULL, 0);
+- }
+- }
+-
+- do_mon(adapter, frontend);
+-
+- return FALSE;
+-}
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/lnb.c dvb-apps/util/szap/lnb.c
+--- linuxtv-dvb-apps-1.1.1/util/szap/lnb.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/lnb.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,101 @@
++#include <stdlib.h>
++#include <string.h>
++#include <ctype.h>
++#include "lnb.h"
++
++static char *univ_desc[] = {
++ "Europe",
++ "10800 to 11800 MHz and 11600 to 12700 Mhz",
++ "Dual LO, loband 9750, hiband 10600 MHz",
++ (char *)NULL };
++
++static char *dbs_desc[] = {
++ "Expressvu, North America",
++ "12200 to 12700 MHz",
++ "Single LO, 11250 MHz",
++ (char *)NULL };
++
++static char *standard_desc[] = {
++ "10945 to 11450 Mhz",
++ "Single LO, 10000 Mhz",
++ (char *)NULL };
++
++static char *enhan_desc[] = {
++ "Astra",
++ "10700 to 11700 MHz",
++ "Single LO, 9750 MHz",
++ (char *)NULL };
++
++static char *cband_desc[] = {
++ "Big Dish",
++ "3700 to 4200 MHz",
++ "Single LO, 5150 Mhz",
++ (char *)NULL };
++
++static struct lnb_types_st lnbs[] = {
++ {"UNIVERSAL", univ_desc, 9750, 10600, 11700 },
++ {"DBS", dbs_desc, 11250, 0, 0 },
++ {"STANDARD", standard_desc, 10000, 0, 0 },
++ {"ENHANCED", enhan_desc, 9750, 0, 0 },
++ {"C-BAND", cband_desc, 5150, 0, 0 }
++};
++
++/* Enumerate through standard types of LNB's until NULL returned.
++ * Increment curno each time
++ */
++
++struct lnb_types_st *
++lnb_enum(int curno)
++{
++ if (curno >= (int) (sizeof(lnbs) / sizeof(lnbs[0])))
++ return (struct lnb_types_st *)NULL;
++ return &lnbs[curno];
++}
++
++/* Decode an lnb type, for example given on a command line
++ * If alpha and standard type, e.g. "Universal" then match that
++ * otherwise low[,high[,switch]]
++ */
++
++int
++lnb_decode(char *str, struct lnb_types_st *lnbp)
++{
++int i;
++char *cp, *np;
++
++ memset(lnbp, 0, sizeof(*lnbp));
++ cp = str;
++ while(*cp && isspace(*cp))
++ cp++;
++ if (isalpha(*cp)) {
++ for (i = 0; i < (int)(sizeof(lnbs) / sizeof(lnbs[0])); i++) {
++ if (!strcasecmp(lnbs[i].name, cp)) {
++ *lnbp = lnbs[i];
++ return 1;
++ }
++ }
++ return -1;
++ }
++ if (*cp == '\0' || !isdigit(*cp))
++ return -1;
++ lnbp->low_val = strtoul(cp, &np, 0);
++ if (lnbp->low_val == 0)
++ return -1;
++ cp = np;
++ while(*cp && (isspace(*cp) || *cp == ','))
++ cp++;
++ if (*cp == '\0')
++ return 1;
++ if (!isdigit(*cp))
++ return -1;
++ lnbp->high_val = strtoul(cp, &np, 0);
++ cp = np;
++ while(*cp && (isspace(*cp) || *cp == ','))
++ cp++;
++ if (*cp == '\0')
++ return 1;
++ if (!isdigit(*cp))
++ return -1;
++ lnbp->switch_val = strtoul(cp, NULL, 0);
++ return 1;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/lnb.h dvb-apps/util/szap/lnb.h
+--- linuxtv-dvb-apps-1.1.1/util/szap/lnb.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/szap/lnb.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,22 @@
++struct lnb_types_st {
++ char *name;
++ char **desc;
++ unsigned long low_val;
++ unsigned long high_val; /* zero indicates no hiband */
++ unsigned long switch_val; /* zero indicates no hiband */
++};
++
++/* Enumerate through standard types of LNB's until NULL returned.
++ * Increment curno each time
++ */
++
++struct lnb_types_st *
++lnb_enum(int curno);
++
++/* Decode an lnb type, for example given on a command line
++ * If alpha and standard type, e.g. "Universal" then match that
++ * otherwise low[,high[,switch]]
++ */
++
++int
++lnb_decode(char *str, struct lnb_types_st *lnbp);
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/Makefile dvb-apps/util/szap/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/szap/Makefile 2006-05-18 01:31:54.000000000 +0200
++++ dvb-apps/util/szap/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,35 +1,18 @@
+-CC = gcc
+-CFLAGS = -MD -Wall -g -O2 -I../../include -I../lib
+-LFLAGS = -Wall -g -O2
+-RM = rm -f
+-
+-TARGETS = szap tzap czap azap femon
+-OBJS = szap.o tzap.o czap.o azap.o femon.o
++# Makefile for linuxtv.org dvb-apps/util/szap
+
+-all: $(OBJS) $(TARGETS)
+- @echo
+- @echo "--------------------------------------------------------------------------------"
+- @echo " please copy an appropriate channels.conf-XXX channel list for DVB-S/C/T"
+- @echo
+- @echo " to ~/.szap/channels.conf"
+- @echo " ~/.czap/channels.conf"
+- @echo " ~/.tzap/channels.conf"
+- @echo
+- @echo " and then call ./szap for DVB-S, ./czap for DVB-C or ./tzap for DVB-T"
+- @echo "--------------------------------------------------------------------------------"
+- @echo
++objects = lnb.o
+
+-szap: szap.o ../lib/lnb.o
+- $(CC) $(LFLAGS) -o szap szap.o ../lib/lnb.o
++binaries = azap \
++ czap \
++ szap \
++ tzap
+
+-.c.o:
+- $(CC) $(CFLAGS) -o $@ -c $<
++inst_bin = $(binaries)
+
+-.o:
+- $(CC) $(LFLAGS) -o $@ $<
++.PHONY: all
+
+-clean:
+- $(RM) $(TARGETS) core* *.o *.d .depend
++all: $(binaries)
+
+--include $(wildcard *.d) dummy
++$(binaries): $(objects)
+
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/README dvb-apps/util/szap/README
+--- linuxtv-dvb-apps-1.1.1/util/szap/README 2004-01-25 20:23:39.000000000 +0100
++++ dvb-apps/util/szap/README 2009-06-21 13:29:06.000000000 +0200
+@@ -5,23 +5,29 @@
+
+ For DVB-S, Astra Channel config file:
+
+-$ ./szap -c channels.conf-dvbs-astra n24
++$ ./szap -c channels-conf/dvb-s/Astra-19.2E n24
+
+ will tune to N24. For DVB-C, Berlin Cable channel config:
+
+-$ ./czap -c channels.conf-dvbc-berlin Arte
++$ ./czap -c channels-conf/dvb-c/de-Berlin Arte
+
+ For DVB-T, Berlin Config:
+
+-$ ./czap -c channels.conf-dvbt-berlin phoenix
++$ ./tzap -c channels-conf/dvb-t/de-Berlin phoenix
+
+-By default the MPEG stream is routed to a hardware decoder. If you want to
+-record the stream to disk you will route it to the DVR device by using the
++For ATSC, Raleigh Durham Config:
++
++$ ./azap -c channels-conf/atsc/us-Raleigh-Durham WRAL
++
++will tune to WRAL's Digital Channel 5-1.
++
++By default the MPEG stream is routed to a hardware decoder. If you want to
++record the stream to disk you will route it to the DVR device by using the
+ '-r' option:
+
+-$ ./czap -c channels.conf-dvbt-berlin phoenix -r
++$ ./tzap -c channels-conf/dvb-t/de-Berlin phoenix -r
+ [keep it running in one console]
+-$ cat /dev/dvr/adapter0/dvr0 > /tmp/recording.ts
++$ cat /dev/dvb/adapter0/dvr0 > /tmp/recording.ts
+ [in a second console, will dump the MPEG transport stream to /tmp/recording.ts]
+
+ The status messages have the following meaning:
+@@ -38,10 +44,9 @@
+ unc [0...0xffffffff] --- Number of Uncorrectable Blocks.
+ Small numbers are Preferable.
+
+-If everything is alright and all frontend circuits are working stable
++If everything is alright and all frontend circuits are working stable
+ (are locked) you should see a FE_HAS_LOCK in the rightmost line.
+
+ Good luck,
+
+ Holger
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/szap.c dvb-apps/util/szap/szap.c
+--- linuxtv-dvb-apps-1.1.1/util/szap/szap.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/szap.c 2009-06-21 13:29:06.000000000 +0200
+@@ -36,6 +36,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/poll.h>
++#include <sys/param.h>
+ #include <fcntl.h>
+ #include <time.h>
+ #include <unistd.h>
+@@ -45,6 +46,7 @@
+
+ #include <linux/dvb/frontend.h>
+ #include <linux/dvb/dmx.h>
++#include <linux/dvb/audio.h>
+ #include "lnb.h"
+
+ #ifndef TRUE
+@@ -64,6 +66,7 @@
+
+ #define FRONTENDDEVICE "/dev/dvb/adapter%d/frontend%d"
+ #define DEMUXDEVICE "/dev/dvb/adapter%d/demux%d"
++#define AUDIODEVICE "/dev/dvb/adapter%d/audio%d"
+
+ static struct lnb_types_st lnb_type;
+
+@@ -79,18 +82,21 @@
+ " -f number : use given frontend (default 0)\n"
+ " -d number : use given demux (default 0)\n"
+ " -c file : read channels list from 'file'\n"
++ " -b : enable Audio Bypass (default no)\n"
+ " -x : exit after tuning\n"
++ " -H : human readable output\n"
+ " -r : set up /dev/dvb/adapterX/dvr0 for TS recording\n"
+ " -l lnb-type (DVB-S Only) (use -l help to print types) or \n"
+ " -l low[,high[,switch]] in Mhz\n"
+ " -i : run interactively, allowing you to type in channel names\n"
++ " -p : add pat and pmt to TS recording (implies -r)\n"
+ " or -n numbers for zapping\n";
+
+-static int set_demux(int dmxfd, int pid, int audio, int dvr)
++static int set_demux(int dmxfd, int pid, int pes_type, int dvr)
+ {
+ struct dmx_pes_filter_params pesfilter;
+
+- if (pid <= 0 || pid >= 0x1fff) /* ignore this pid to allow radio services */
++ if (pid < 0 || pid >= 0x1fff) /* ignore this pid to allow radio services */
+ return TRUE;
+
+ if (dvr) {
+@@ -102,7 +108,7 @@
+ pesfilter.pid = pid;
+ pesfilter.input = DMX_IN_FRONTEND;
+ pesfilter.output = dvr ? DMX_OUT_TS_TAP : DMX_OUT_DECODER;
+- pesfilter.pes_type = audio ? DMX_PES_AUDIO : DMX_PES_VIDEO;
++ pesfilter.pes_type = pes_type;
+ pesfilter.flags = DMX_IMMEDIATE_START;
+
+ if (ioctl(dmxfd, DMX_SET_PES_FILTER, &pesfilter) == -1) {
+@@ -114,6 +120,65 @@
+ return TRUE;
+ }
+
++int get_pmt_pid(char *dmxdev, int sid)
++{
++ int patfd, count;
++ int pmt_pid = 0;
++ int patread = 0;
++ int section_length;
++ unsigned char buft[4096];
++ unsigned char *buf = buft;
++ struct dmx_sct_filter_params f;
++
++ memset(&f, 0, sizeof(f));
++ f.pid = 0;
++ f.filter.filter[0] = 0x00;
++ f.filter.mask[0] = 0xff;
++ f.timeout = 0;
++ f.flags = DMX_IMMEDIATE_START | DMX_CHECK_CRC;
++
++ if ((patfd = open(dmxdev, O_RDWR)) < 0) {
++ perror("openening pat demux failed");
++ return -1;
++ }
++
++ if (ioctl(patfd, DMX_SET_FILTER, &f) == -1) {
++ perror("ioctl DMX_SET_FILTER failed");
++ close(patfd);
++ return -1;
++ }
++
++ while (!patread){
++ if (((count = read(patfd, buf, sizeof(buft))) < 0) && errno == EOVERFLOW)
++ count = read(patfd, buf, sizeof(buft));
++ if (count < 0) {
++ perror("read_sections: read error");
++ close(patfd);
++ return -1;
++ }
++
++ section_length = ((buf[1] & 0x0f) << 8) | buf[2];
++ if (count != section_length + 3)
++ continue;
++
++ buf += 8;
++ section_length -= 8;
++
++ patread = 1; /* assumes one section contains the whole pat */
++ while (section_length > 0) {
++ int service_id = (buf[0] << 8) | buf[1];
++ if (service_id == sid) {
++ pmt_pid = ((buf[2] & 0x1f) << 8) | buf[3];
++ section_length = 0;
++ }
++ buf += 4;
++ section_length -= 4;
++ }
++ }
++
++ close(patfd);
++ return pmt_pid;
++}
+
+ struct diseqc_cmd {
+ struct dvb_diseqc_master_cmd cmd;
+@@ -151,14 +216,14 @@
+ { {{0xe0, 0x10, 0x38, 0xf0, 0x00, 0x00}, 4}, 0 };
+
+ /* param: high nibble: reset bits, low nibble set bits,
+- * bits are: option, position, polarizaion, band
++ * bits are: option, position, polarization, band
+ */
+ cmd.cmd.msg[3] =
+ 0xf0 | (((sat_no * 4) & 0x0f) | (hi_band ? 1 : 0) | (pol_vert ? 0 : 2));
+
+ diseqc_send_msg(secfd, pol_vert ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18,
+ &cmd, hi_band ? SEC_TONE_ON : SEC_TONE_OFF,
+- (sat_no / 4) % 2 ? SEC_MINI_B : SEC_MINI_A);
++ sat_no % 2 ? SEC_MINI_B : SEC_MINI_A);
+
+ return TRUE;
+ }
+@@ -189,8 +254,9 @@
+
+
+ static
+-int check_frontend (int fe_fd, int dvr)
++int check_frontend (int fe_fd, int dvr, int human_readable)
+ {
++ (void)dvr;
+ fe_status_t status;
+ uint16_t snr, signal;
+ uint32_t ber, uncorrected_blocks;
+@@ -210,8 +276,13 @@
+ if (ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks) == -1)
+ uncorrected_blocks = -2;
+
+- printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
+- status, signal, snr, ber, uncorrected_blocks);
++ if (human_readable) {
++ printf ("status %02x | signal %3u%% | snr %3u%% | ber %d | unc %d | ",
++ status, (signal * 100) / 0xffff, (snr * 100) / 0xffff, ber, uncorrected_blocks);
++ } else {
++ printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
++ status, signal, snr, ber, uncorrected_blocks);
++ }
+
+ if (status & FE_HAS_LOCK)
+ printf("FE_HAS_LOCK");
+@@ -230,10 +301,12 @@
+ static
+ int zap_to(unsigned int adapter, unsigned int frontend, unsigned int demux,
+ unsigned int sat_no, unsigned int freq, unsigned int pol,
+- unsigned int sr, unsigned int vpid, unsigned int apid, int dvr)
++ unsigned int sr, unsigned int vpid, unsigned int apid, int sid,
++ int dvr, int rec_psi, int bypass, int human_readable)
+ {
+- char fedev[128], dmxdev[128];
+- static int fefd, videofd, audiofd;
++ char fedev[128], dmxdev[128], auddev[128];
++ static int fefd, dmxfda, dmxfdv, audiofd = -1, patfd, pmtfd;
++ int pmtpid;
+ uint32_t ifreq;
+ int hiband, result;
+ static struct dvb_frontend_info fe_info;
+@@ -241,6 +314,7 @@
+ if (!fefd) {
+ snprintf(fedev, sizeof(fedev), FRONTENDDEVICE, adapter, frontend);
+ snprintf(dmxdev, sizeof(dmxdev), DEMUXDEVICE, adapter, demux);
++ snprintf(auddev, sizeof(auddev), AUDIODEVICE, adapter, demux);
+ printf("using '%s' and '%s'\n", fedev, dmxdev);
+
+ if ((fefd = open(fedev, O_RDWR | O_NONBLOCK)) < 0) {
+@@ -262,18 +336,41 @@
+ return FALSE;
+ }
+
+- if ((videofd = open(dmxdev, O_RDWR)) < 0) {
++ if ((dmxfdv = open(dmxdev, O_RDWR)) < 0) {
+ perror("opening video demux failed");
+ close(fefd);
+ return FALSE;
+ }
+
+- if ((audiofd = open(dmxdev, O_RDWR)) < 0) {
++ if ((dmxfda = open(dmxdev, O_RDWR)) < 0) {
+ perror("opening audio demux failed");
+- close(videofd);
+ close(fefd);
+ return FALSE;
+ }
++
++ if (dvr == 0) /* DMX_OUT_DECODER */
++ audiofd = open(auddev, O_RDWR);
++
++ if (rec_psi){
++ if ((patfd = open(dmxdev, O_RDWR)) < 0) {
++ perror("opening pat demux failed");
++ close(audiofd);
++ close(dmxfda);
++ close(dmxfdv);
++ close(fefd);
++ return FALSE;
++ }
++
++ if ((pmtfd = open(dmxdev, O_RDWR)) < 0) {
++ perror("opening pmt demux failed");
++ close(patfd);
++ close(audiofd);
++ close(dmxfda);
++ close(dmxfdv);
++ close(fefd);
++ return FALSE;
++ }
++ }
+ }
+
+ hiband = 0;
+@@ -293,15 +390,36 @@
+
+ if (diseqc(fefd, sat_no, pol, hiband))
+ if (do_tune(fefd, ifreq, sr))
+- if (set_demux(videofd, vpid, 0, dvr))
+- if (set_demux(audiofd, apid, 1, dvr))
+- result = TRUE;
++ if (set_demux(dmxfdv, vpid, DMX_PES_VIDEO, dvr))
++ if (audiofd >= 0)
++ (void)ioctl(audiofd, AUDIO_SET_BYPASS_MODE, bypass);
++ if (set_demux(dmxfda, apid, DMX_PES_AUDIO, dvr)) {
++ if (rec_psi) {
++ pmtpid = get_pmt_pid(dmxdev, sid);
++ if (pmtpid < 0) {
++ result = FALSE;
++ }
++ if (pmtpid == 0) {
++ fprintf(stderr,"couldn't find pmt-pid for sid %04x\n",sid);
++ result = FALSE;
++ }
++ if (set_demux(patfd, 0, DMX_PES_OTHER, dvr))
++ if (set_demux(pmtfd, pmtpid, DMX_PES_OTHER, dvr))
++ result = TRUE;
++ } else {
++ result = TRUE;
++ }
++ }
+
+- check_frontend (fefd, dvr);
++ check_frontend (fefd, dvr, human_readable);
+
+ if (!interactive) {
+- close(audiofd);
+- close(videofd);
++ close(patfd);
++ close(pmtfd);
++ if (audiofd >= 0)
++ close(audiofd);
++ close(dmxfda);
++ close(dmxfdv);
+ close(fefd);
+ }
+
+@@ -312,14 +430,15 @@
+ static int read_channels(const char *filename, int list_channels,
+ uint32_t chan_no, const char *chan_name,
+ unsigned int adapter, unsigned int frontend,
+- unsigned int demux, int dvr)
++ unsigned int demux, int dvr, int rec_psi,
++ int bypass, int human_readable)
+ {
+ FILE *cfp;
+ char buf[4096];
+ char inp[256];
+ char *field, *tmp, *p;
+ unsigned int line;
+- unsigned int freq, pol, sat_no, sr, vpid, apid;
++ unsigned int freq, pol, sat_no, sr, vpid, apid, sid;
+ int ret;
+
+ again:
+@@ -399,20 +518,41 @@
+ goto syntax_err;
+
+ vpid = strtoul(field, NULL, 0);
++ if (!vpid)
++ vpid = 0x1fff;
+
+ if (!(field = strsep(&tmp, ":")))
+ goto syntax_err;
+
++ p = strchr(field, ';');
++
++ if (p) {
++ *p = '\0';
++ p++;
++ if (bypass) {
++ if (!p || !*p)
++ goto syntax_err;
++ field = p;
++ }
++ }
++
+ apid = strtoul(field, NULL, 0);
++ if (!apid)
++ apid = 0x1fff;
++
++ if (!(field = strsep(&tmp, ":")))
++ goto syntax_err;
++
++ sid = strtoul(field, NULL, 0);
+
+ printf("sat %u, frequency = %u MHz %c, symbolrate %u, "
+- "vpid = 0x%04x, apid = 0x%04x\n",
+- sat_no, freq, pol ? 'V' : 'H', sr, vpid, apid);
++ "vpid = 0x%04x, apid = 0x%04x sid = 0x%04x\n",
++ sat_no, freq, pol ? 'V' : 'H', sr, vpid, apid, sid);
+
+ fclose(cfp);
+
+- ret = zap_to(adapter, frontend, demux,
+- sat_no, freq * 1000, pol, sr, vpid, apid, dvr);
++ ret = zap_to(adapter, frontend, demux, sat_no, freq * 1000,
++ pol, sr, vpid, apid, sid, dvr, rec_psi, bypass, human_readable);
+ if (interactive)
+ goto again;
+
+@@ -475,17 +615,22 @@
+ int list_channels = 0;
+ unsigned int chan_no = 0;
+ const char *chan_name = NULL;
+- unsigned int adapter = 0, frontend = 0, demux = 0, dvr = 0;
++ unsigned int adapter = 0, frontend = 0, demux = 0, dvr = 0, rec_psi = 0;
++ int bypass = 0;
+ int opt, copt = 0;
++ int human_readable = 0;
+
+ lnb_type = *lnb_enum(0);
+- while ((opt = getopt(argc, argv, "hqrn:a:f:d:c:l:xi")) != -1) {
++ while ((opt = getopt(argc, argv, "Hhqrpn:a:f:d:c:l:xib")) != -1) {
+ switch (opt)
+ {
+ case '?':
+ case 'h':
+ default:
+ bad_usage(argv[0], 0);
++ case 'b':
++ bypass = 1;
++ break;
+ case 'q':
+ list_channels = 1;
+ break;
+@@ -501,6 +646,9 @@
+ case 'f':
+ frontend = strtoul(optarg, NULL, 0);
+ break;
++ case 'p':
++ rec_psi = 1;
++ break;
+ case 'd':
+ demux = strtoul(optarg, NULL, 0);
+ break;
+@@ -517,6 +665,9 @@
+ case 'x':
+ exit_after_tuning = 1;
+ break;
++ case 'H':
++ human_readable = 1;
++ break;
+ case 'i':
+ interactive = 1;
+ exit_after_tuning = 1;
+@@ -545,16 +696,21 @@
+ fprintf(stderr, "error: $HOME not set\n");
+ return TRUE;
+ }
+- strncpy(chanfile, home, sizeof(chanfile));
+- strcat(chanfile, "/.szap/" CHANNEL_FILE);
++ snprintf(chanfile, sizeof(chanfile),
++ "%s/.szap/%i/%s", home, adapter, CHANNEL_FILE);
++ if (access(chanfile, R_OK))
++ snprintf(chanfile, sizeof(chanfile),
++ "%s/.szap/%s", home, CHANNEL_FILE);
+ }
+
+ printf("reading channels from file '%s'\n", chanfile);
+
++ if (rec_psi)
++ dvr=1;
++
+ if (!read_channels(chanfile, list_channels, chan_no, chan_name,
+- adapter, frontend, demux, dvr))
++ adapter, frontend, demux, dvr, rec_psi, bypass, human_readable))
+ return TRUE;
+
+ return FALSE;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/szap/tzap.c dvb-apps/util/szap/tzap.c
+--- linuxtv-dvb-apps-1.1.1/util/szap/tzap.c 2004-01-17 17:59:46.000000000 +0100
++++ dvb-apps/util/szap/tzap.c 2009-06-21 13:29:06.000000000 +0200
+@@ -1,3 +1,24 @@
++/* tzap -- DVB-T zapping utility
++ */
++
++/*
++ * Added recording to a file
++ * arguments:
++ *
++ * -t timeout (seconds)
++ * -o filename output filename (use -o - for stdout)
++ * -s only print summary
++ * -S run silently (no output)
++ *
++ * Bernard Hatt 24/2/04
++ */
++
++
++
++#define _FILE_OFFSET_BITS 64
++#define _LARGEFILE_SOURCE 1
++#define _LARGEFILE64_SOURCE 1
++
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+@@ -9,15 +30,19 @@
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <errno.h>
++#include <signal.h>
+
+ #include <linux/dvb/frontend.h>
+ #include <linux/dvb/dmx.h>
+
+-
+ static char FRONTEND_DEV [80];
+ static char DEMUX_DEV [80];
++static char DVR_DEV [80];
++static int timeout_flag=0;
++static int silent=0,timeout=0;
++static int exit_after_tuning;
+
+-#define CHANNEL_FILE "/.tzap/channels.conf"
++#define CHANNEL_FILE "channels.conf"
+
+ #define ERROR(x...) \
+ do { \
+@@ -68,14 +93,16 @@
+ {"GUARD_INTERVAL_1_16", GUARD_INTERVAL_1_16},
+ {"GUARD_INTERVAL_1_32", GUARD_INTERVAL_1_32},
+ {"GUARD_INTERVAL_1_4", GUARD_INTERVAL_1_4},
+- {"GUARD_INTERVAL_1_8", GUARD_INTERVAL_1_8}
++ {"GUARD_INTERVAL_1_8", GUARD_INTERVAL_1_8},
++ {"GUARD_INTERVAL_AUTO", GUARD_INTERVAL_AUTO}
+ };
+
+ static const Param hierarchy_list [] = {
+ { "HIERARCHY_1", HIERARCHY_1 },
+ { "HIERARCHY_2", HIERARCHY_2 },
+ { "HIERARCHY_4", HIERARCHY_4 },
+- { "HIERARCHY_NONE", HIERARCHY_NONE }
++ { "HIERARCHY_NONE", HIERARCHY_NONE },
++ { "HIERARCHY_AUTO", HIERARCHY_AUTO }
+ };
+
+ static const Param constellation_list [] = {
+@@ -84,12 +111,14 @@
+ { "QAM_16", QAM_16 },
+ { "QAM_256", QAM_256 },
+ { "QAM_32", QAM_32 },
+- { "QAM_64", QAM_64 }
++ { "QAM_64", QAM_64 },
++ { "QAM_AUTO", QAM_AUTO }
+ };
+
+ static const Param transmissionmode_list [] = {
+ { "TRANSMISSION_MODE_2K", TRANSMISSION_MODE_2K },
+ { "TRANSMISSION_MODE_8K", TRANSMISSION_MODE_8K },
++ { "TRANSMISSION_MODE_AUTO", TRANSMISSION_MODE_AUTO }
+ };
+
+ #define LIST_SIZE(x) sizeof(x)/sizeof(Param)
+@@ -100,7 +129,7 @@
+ {
+ char c;
+ int character = 0;
+- int index = 0;
++ int _index = 0;
+
+ while (1) {
+ if (read(fd, &c, 1) < 1)
+@@ -111,9 +140,9 @@
+ break;
+
+ while (toupper(c) != plist->name[character]) {
+- index++;
++ _index++;
+ plist++;
+- if (index >= list_size) /* parse error, no valid */
++ if (_index >= list_size) /* parse error, no valid */
+ return -2; /* parameter name found */
+ }
+
+@@ -150,7 +179,10 @@
+ return -3; /* to fit in 32 bit */
+ };
+
++ errno = 0;
+ *val = strtol(number, NULL, 10);
++ if (errno == ERANGE)
++ return -4;
+
+ return 0;
+ }
+@@ -167,13 +199,18 @@
+ if (read(fd, &c, 1) < 1)
+ return -1; /* EOF! */
+
+- if (c == ':' && channel[character] == '\0')
+- break;
+-
+- if (toupper(c) == toupper(channel[character]))
+- character++;
+- else
++ if ( '\n' == c ) /* start of line */
+ character = 0;
++ else if ( character >= 0 ) { /* we are in the namefield */
++
++ if (c == ':' && channel[character] == '\0')
++ break;
++
++ if (toupper(c) == toupper(channel[character]))
++ character++;
++ else
++ character = -1;
++ }
+ };
+
+ return 0;
+@@ -211,12 +248,32 @@
+ return err;
+ }
+
++static int check_fec(fe_code_rate_t *fec)
++{
++ switch (*fec)
++ {
++ case FEC_NONE:
++ *fec = FEC_AUTO;
++ case FEC_AUTO:
++ case FEC_1_2:
++ case FEC_2_3:
++ case FEC_3_4:
++ case FEC_5_6:
++ case FEC_7_8:
++ return 0;
++ default:
++ ;
++ }
++ return 1;
++}
++
+
+ int parse(const char *fname, const char *channel,
+ struct dvb_frontend_parameters *frontend, int *vpid, int *apid)
+ {
+ int fd;
+ int err;
++ int tmp;
+
+ if ((fd = open(fname, O_RDONLY | O_NONBLOCK)) < 0) {
+ PERROR ("could not open file '%s'", fname);
+@@ -229,54 +286,57 @@
+ return -2;
+ }
+
+- if ((err = try_parse_int(fd, &frontend->frequency, "frequency")))
++ if ((err = try_parse_int(fd, &tmp, "frequency")))
+ return -3;
++ frontend->frequency = tmp;
+
+ if ((err = try_parse_param(fd,
+ inversion_list, LIST_SIZE(inversion_list),
+- (int *) &frontend->inversion,
+- "inversion")))
++ &tmp, "inversion")))
+ return -4;
++ frontend->inversion = tmp;
+
+ if ((err = try_parse_param(fd, bw_list, LIST_SIZE(bw_list),
+- (int *) &frontend->u.ofdm.bandwidth,
+- "bandwidth")))
++ &tmp, "bandwidth")))
+ return -5;
++ frontend->u.ofdm.bandwidth = tmp;
+
+ if ((err = try_parse_param(fd, fec_list, LIST_SIZE(fec_list),
+- (int *) &frontend->u.ofdm.code_rate_HP,
+- "code_rate_HP")))
++ &tmp, "code_rate_HP")))
++ return -6;
++ frontend->u.ofdm.code_rate_HP = tmp;
++ if (check_fec(&frontend->u.ofdm.code_rate_HP))
+ return -6;
+
+ if ((err = try_parse_param(fd, fec_list, LIST_SIZE(fec_list),
+- (int *) &frontend->u.ofdm.code_rate_LP,
+- "code_rate_LP")))
++ &tmp, "code_rate_LP")))
++ return -7;
++ frontend->u.ofdm.code_rate_LP = tmp;
++ if (check_fec(&frontend->u.ofdm.code_rate_LP))
+ return -7;
+
+ if ((err = try_parse_param(fd, constellation_list,
+ LIST_SIZE(constellation_list),
+- (int *) &frontend->u.ofdm.constellation,
+- "constellation")))
++ &tmp, "constellation")))
+ return -8;
++ frontend->u.ofdm.constellation = tmp;
+
+ if ((err = try_parse_param(fd, transmissionmode_list,
+ LIST_SIZE(transmissionmode_list),
+- (int *) &frontend->u.ofdm.
+- transmission_mode,
+- "transmission_mode")))
++ &tmp, "transmission_mode")))
+ return -9;
++ frontend->u.ofdm.transmission_mode = tmp;
+
+ if ((err = try_parse_param(fd, guard_list, LIST_SIZE(guard_list),
+- (int *) &frontend->u.ofdm.
+- guard_interval, "guard_interval")))
++ &tmp, "guard_interval")))
+ return -10;
++ frontend->u.ofdm.guard_interval = tmp;
+
+ if ((err = try_parse_param(fd, hierarchy_list,
+ LIST_SIZE(hierarchy_list),
+- (int *) &frontend->u.ofdm.
+- hierarchy_information,
+- "hierarchy_information")))
++ &tmp, "hierarchy_information")))
+ return -11;
++ frontend->u.ofdm.hierarchy_information = tmp;
+
+ if ((err = try_parse_int(fd, vpid, "Video PID")))
+ return -12;
+@@ -330,7 +390,8 @@
+ return -1;
+ }
+
+- printf ("tuning to %i Hz\n", frontend->frequency);
++ if (silent<2)
++ fprintf (stderr,"tuning to %i Hz\n", frontend->frequency);
+
+ if (ioctl(fe_fd, FE_SET_FRONTEND, frontend) < 0) {
+ PERROR("ioctl FE_SET_FRONTEND failed");
+@@ -340,38 +401,115 @@
+ return 0;
+ }
+
++static void
++do_timeout(int x)
++{
++ (void)x;
++ if (timeout_flag==0)
++ {
++ timeout_flag=1;
++ alarm(2);
++ signal(SIGALRM, do_timeout);
++ }
++ else
++ {
++ /* something has gone wrong ... exit */
++ exit(1);
++ }
++}
+
+-static
+-int check_frontend (int fe_fd)
++static void
++print_frontend_stats (int fe_fd, int human_readable)
+ {
+ fe_status_t status;
+- uint16_t snr, signal;
++ uint16_t snr, _signal;
+ uint32_t ber, uncorrected_blocks;
+
+- do {
+- ioctl(fe_fd, FE_READ_STATUS, &status);
+- ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal);
+- ioctl(fe_fd, FE_READ_SNR, &snr);
+- ioctl(fe_fd, FE_READ_BER, &ber);
+- ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks);
++ ioctl(fe_fd, FE_READ_STATUS, &status);
++ ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &_signal);
++ ioctl(fe_fd, FE_READ_SNR, &snr);
++ ioctl(fe_fd, FE_READ_BER, &ber);
++ ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks);
+
+- printf ("status %02x | signal %04x | snr %04x | "
+- "ber %08x | unc %08x | ",
+- status, signal, snr, ber, uncorrected_blocks);
++ if (human_readable) {
++ printf ("status %02x | signal %3u%% | snr %3u%% | ber %d | unc %d | ",
++ status, (_signal * 100) / 0xffff, (snr * 100) / 0xffff, ber, uncorrected_blocks);
++ } else {
++ fprintf (stderr, "status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
++ status, _signal, snr, ber, uncorrected_blocks);
++ }
+
+- if (status & FE_HAS_LOCK)
+- printf("FE_HAS_LOCK");
++ if (status & FE_HAS_LOCK)
++ fprintf(stderr,"FE_HAS_LOCK");
+
+- usleep(1000000);
++ fprintf(stderr,"\n");
++}
+
+- printf("\n");
+- } while (1);
++static
++int check_frontend (int fe_fd, int human_readable)
++{
++ fe_status_t status;
++ do {
++ ioctl(fe_fd, FE_READ_STATUS, &status);
++ if (!silent)
++ print_frontend_stats(fe_fd, human_readable);
++ if (exit_after_tuning && (status & FE_HAS_LOCK))
++ break;
++ usleep(1000000);
++ } while (!timeout_flag);
++ if (silent < 2)
++ print_frontend_stats (fe_fd, human_readable);
+
+ return 0;
+ }
+
++#define BUFLEN (188*256)
++static
++void copy_to_file(int in_fd, int out_fd)
++{
++ char buf[BUFLEN];
++ int r;
++ long long int rc = 0LL;
++ while(timeout_flag==0)
++ {
++ r=read(in_fd,buf,BUFLEN);
++ if (r < 0) {
++ if (errno == EOVERFLOW) {
++ printf("buffer overrun\n");
++ continue;
++ }
++ PERROR("Read failed");
++ break;
++ }
++ if (write(out_fd,buf,r) < 0) {
++ PERROR("Write failed");
++ break;
++ }
++ rc+=r;
++ }
++ if (silent<2)
++ {
++ fprintf(stderr, "copied %lld bytes (%lld Kbytes/sec)\n",rc,rc/(1024*timeout));
++ }
++}
+
+-static const char *usage = "\nusage: %s [-a adapter_num] [-f frontend_id] [-d demux_id] [-c conf_file] [-r] <channel name>\n\n";
++static char *usage =
++ "usage:\n"
++ " tzap [options] <channel_name>\n"
++ " zap to channel channel_name (case insensitive)\n"
++ " -a number : use given adapter (default 0)\n"
++ " -f number : use given frontend (default 0)\n"
++ " -d number : use given demux (default 0)\n"
++ " -c file : read channels list from 'file'\n"
++ " -x : exit after tuning\n"
++ " -r : set up /dev/dvb/adapterX/dvr0 for TS recording\n"
++ " -s : only print summary\n"
++ " -S : run silently (no output)\n"
++ " -H : human readable output\n"
++ " -F : set up frontend only, don't touch demux\n"
++ " -t number : timeout (seconds)\n"
++ " -o file : output filename (use -o - for stdout)\n"
++ " -h -? : display this help and exit\n";
+
+
+ int main(int argc, char **argv)
+@@ -382,10 +520,14 @@
+ char *channel = NULL;
+ int adapter = 0, frontend = 0, demux = 0, dvr = 0;
+ int vpid, apid;
+- int frontend_fd, audio_fd, video_fd;
++ int frontend_fd, audio_fd = 0, video_fd = 0, dvr_fd, file_fd;
+ int opt;
++ int record = 0;
++ int frontend_only = 0;
++ char *filename = NULL;
++ int human_readable = 0;
+
+- while ((opt = getopt(argc, argv, "hrn:a:f:d:c:")) != -1) {
++ while ((opt = getopt(argc, argv, "H?hrxRsFSn:a:f:d:c:t:o:")) != -1) {
+ switch (opt) {
+ case 'a':
+ adapter = strtoul(optarg, NULL, 0);
+@@ -396,12 +538,34 @@
+ case 'd':
+ demux = strtoul(optarg, NULL, 0);
+ break;
++ case 't':
++ timeout = strtoul(optarg, NULL, 0);
++ break;
++ case 'o':
++ filename = strdup(optarg);
++ record=1;
++ /* fall through */
+ case 'r':
+ dvr = 1;
+ break;
++ case 'x':
++ exit_after_tuning = 1;
++ break;
+ case 'c':
+ confname = optarg;
+ break;
++ case 's':
++ silent = 1;
++ break;
++ case 'S':
++ silent = 2;
++ break;
++ case 'F':
++ frontend_only = 1;
++ break;
++ case 'H':
++ human_readable = 1;
++ break;
+ case '?':
+ case 'h':
+ default:
+@@ -424,17 +588,25 @@
+ snprintf (DEMUX_DEV, sizeof(DEMUX_DEV),
+ "/dev/dvb/adapter%i/demux%i", adapter, demux);
+
+- printf ("using '%s' and '%s'\n", FRONTEND_DEV, DEMUX_DEV);
++ snprintf (DVR_DEV, sizeof(DVR_DEV),
++ "/dev/dvb/adapter%i/dvr%i", adapter, demux);
++
++ if (silent<2)
++ fprintf (stderr,"using '%s' and '%s'\n", FRONTEND_DEV, DEMUX_DEV);
+
+ if (!confname)
+ {
++ int len = strlen(homedir) + strlen(CHANNEL_FILE) + 18;
+ if (!homedir)
+ ERROR ("$HOME not set");
+- confname = malloc (strlen(homedir) + strlen(CHANNEL_FILE) + 1);
+- memcpy (confname, homedir, strlen(homedir));
+- memcpy (confname + strlen(homedir), CHANNEL_FILE,
+- strlen(CHANNEL_FILE) + 1);
++ confname = malloc (len);
++ snprintf (confname, len, "%s/.tzap/%i/%s",
++ homedir, adapter, CHANNEL_FILE);
++ if (access (confname, R_OK))
++ snprintf (confname, len, "%s/.tzap/%s",
++ homedir, CHANNEL_FILE);
+ }
++ printf("reading channels from file '%s'\n", confname);
+
+ memset(&frontend_param, 0, sizeof(struct dvb_frontend_parameters));
+
+@@ -449,12 +621,17 @@
+ if (setup_frontend (frontend_fd, &frontend_param) < 0)
+ return -1;
+
++ if (frontend_only)
++ goto just_the_frontend_dude;
++
+ if ((video_fd = open(DEMUX_DEV, O_RDWR)) < 0) {
+ PERROR("failed opening '%s'", DEMUX_DEV);
+ return -1;
+ }
+
+- printf ("video pid 0x%04x, audio pid 0x%04x\n", vpid, apid);
++ if (silent<2)
++ fprintf (stderr,"video pid 0x%04x, audio pid 0x%04x\n", vpid, apid);
++
+ if (set_pesfilter (video_fd, vpid, DMX_PES_VIDEO, dvr) < 0)
+ return -1;
+
+@@ -466,7 +643,51 @@
+ if (set_pesfilter (audio_fd, apid, DMX_PES_AUDIO, dvr) < 0)
+ return -1;
+
+- check_frontend (frontend_fd);
++ signal(SIGALRM,do_timeout);
++ if (timeout>0)
++ alarm(timeout);
++
++
++ if (record)
++ {
++ if (filename!=NULL)
++ {
++ if (strcmp(filename,"-")!=0)
++ {
++ file_fd = open (filename,O_WRONLY|O_LARGEFILE|O_CREAT,0644);
++ if (file_fd<0)
++ {
++ PERROR("open of '%s' failed",filename);
++ return -1;
++ }
++ }
++ else
++ {
++ file_fd=1;
++ }
++ }
++ else
++ {
++ PERROR("Record mode but no filename!");
++ return -1;
++ }
++
++ if ((dvr_fd = open(DVR_DEV, O_RDONLY)) < 0) {
++ PERROR("failed opening '%s'", DVR_DEV);
++ return -1;
++ }
++ if (silent<2)
++ print_frontend_stats (frontend_fd, human_readable);
++
++ copy_to_file(dvr_fd,file_fd);
++
++ if (silent<2)
++ print_frontend_stats (frontend_fd, human_readable);
++ }
++ else {
++just_the_frontend_dude:
++ check_frontend (frontend_fd, human_readable);
++ }
+
+ close (audio_fd);
+ close (video_fd);
+@@ -474,4 +695,3 @@
+
+ return 0;
+ }
+-
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/ttusb_dec_reset/Makefile dvb-apps/util/ttusb_dec_reset/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/ttusb_dec_reset/Makefile 2004-01-21 23:13:45.000000000 +0100
++++ dvb-apps/util/ttusb_dec_reset/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -1,17 +1,19 @@
+-CC = gcc
+-RM = rm -f
+-CFLAGS = -g -Wall -O2
+-LFLAGS = -g -Wall
+-LDFLAGS = -lusb
++# Makefile for linuxtv.org dvb-apps/util/ttusb_dec_reset
+
+-OBJS = ttusb_dec_reset.o
+-TARGET = ttusb_dec_reset
++binaries = ttusb_dec_reset
+
+-$(TARGET): $(OBJS)
+- $(CC) $(LFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS)
++ifneq ($(realpath $(binaries)),)
++inst_bin = $(binaries)
++endif
+
+-.c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++LDLIBS += -lusb
+
+-clean:
+- $(RM) *.o $(TARGET)
++.PHONY: all
++
++ifeq ($(ttusb_dec_reset),1)
++all: $(binaries)
++else
++all: clean
++endif
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/ttusb_dec_reset/ttusb_dec_reset.c dvb-apps/util/ttusb_dec_reset/ttusb_dec_reset.c
+--- linuxtv-dvb-apps-1.1.1/util/ttusb_dec_reset/ttusb_dec_reset.c 2004-01-21 23:13:45.000000000 +0100
++++ dvb-apps/util/ttusb_dec_reset/ttusb_dec_reset.c 2009-06-21 13:29:06.000000000 +0200
+@@ -25,10 +25,12 @@
+ }
+ }
+
+-int main()
++int main(int argc, char *argv[])
+ {
+ struct usb_bus *busses;
+ struct usb_bus *bus;
++ (void) argc;
++ (void) argv;
+
+ usb_init();
+ usb_find_busses();
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/Makefile dvb-apps/util/zap/Makefile
+--- linuxtv-dvb-apps-1.1.1/util/zap/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/zap/Makefile 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,20 @@
++# Makefile for linuxtv.org dvb-apps/util/zap
++
++objects = zap_ca.o \
++ zap_dvb.o
++
++binaries = zap
++
++inst_bin = $(binaries)
++
++CPPFLAGS += -I../../lib
++LDFLAGS += -L../../lib/libdvbapi -L../../lib/libdvbsec -L../../lib/libdvbcfg -L../../lib/libdvben50221 -L../../lib/libucsi
++LDLIBS += -ldvbcfg -ldvben50221 -ldvbsec -ldvbapi -lucsi -lpthread
++
++.PHONY: all
++
++all: $(binaries)
++
++$(binaries): $(objects)
++
++include ../../Make.rules
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap.c dvb-apps/util/zap/zap.c
+--- linuxtv-dvb-apps-1.1.1/util/zap/zap.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/zap/zap.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,226 @@
++/*
++ ZAP utility
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <limits.h>
++#include <string.h>
++#include <fcntl.h>
++#include <signal.h>
++#include <pthread.h>
++#include <sys/poll.h>
++#include <libdvbapi/dvbdemux.h>
++#include <libdvbapi/dvbaudio.h>
++#include <libdvbsec/dvbsec_cfg.h>
++#include <libucsi/mpeg/section.h>
++#include "zap_dvb.h"
++#include "zap_ca.h"
++
++
++static void signal_handler(int _signal);
++
++static int quit_app = 0;
++
++void usage(void)
++{
++ static const char *_usage = "\n"
++ " ZAP: A zapping application\n"
++ " Copyright (C) 2004, 2005, 2006 Manu Abraham (manu@kromtek.com)\n"
++ " Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)\n\n"
++ " usage: zap <options> as follows:\n"
++ " -h help\n"
++ " -adapter <id> adapter to use (default 0)\n"
++ " -frontend <id> frontend to use (default 0)\n"
++ " -demux <id> demux to use (default 0)\n"
++ " -caslotnum <id> ca slot number to use (default 0)\n"
++ " -channels <filename> channels.conf file.\n"
++ " -secfile <filename> Optional sec.conf file.\n"
++ " -secid <secid> ID of the SEC configuration to use, one of:\n"
++ " -nomoveca Do not attempt to move CA descriptors from stream to programme level\n"
++ " <channel name>\n";
++ fprintf(stderr, "%s\n", _usage);
++
++ exit(1);
++}
++
++int find_channel(struct dvbcfg_zapchannel *channel, void *private_data)
++{
++ struct dvbcfg_zapchannel *tmpchannel = private_data;
++
++ if (strcmp(channel->name, tmpchannel->name) == 0) {
++ memcpy(tmpchannel, channel, sizeof(struct dvbcfg_zapchannel));
++ return 1;
++ }
++
++ return 0;
++}
++
++int main(int argc, char *argv[])
++{
++ int adapter_id = 0;
++ int frontend_id = 0;
++ int demux_id = 0;
++ int caslot_num = 0;
++ char *chanfile = "/etc/channels.conf";
++ char *secfile = NULL;
++ char *secid = NULL;
++ char *channel_name = NULL;
++ int moveca = 1;
++ int argpos = 1;
++ struct zap_dvb_params zap_dvb_params;
++ struct zap_ca_params zap_ca_params;
++
++ while(argpos != argc) {
++ if (!strcmp(argv[argpos], "-h")) {
++ usage();
++ } else if (!strcmp(argv[argpos], "-adapter")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &adapter_id) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-frontend")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &frontend_id) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-demux")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &demux_id) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-caslotnum")) {
++ if ((argc - argpos) < 2)
++ usage();
++ if (sscanf(argv[argpos+1], "%i", &caslot_num) != 1)
++ usage();
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-channels")) {
++ if ((argc - argpos) < 2)
++ usage();
++ chanfile = argv[argpos+1];
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-secfile")) {
++ if ((argc - argpos) < 2)
++ usage();
++ secfile = argv[argpos+1];
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-secid")) {
++ if ((argc - argpos) < 2)
++ usage();
++ secid = argv[argpos+1];
++ argpos+=2;
++ } else if (!strcmp(argv[argpos], "-nomoveca")) {
++ moveca = 0;
++ argpos++;
++ } else {
++ if ((argc - argpos) != 1)
++ usage();
++ channel_name = argv[argpos];
++ argpos++;
++ }
++ }
++
++ // the user didn't select anything!
++ if (channel_name == NULL)
++ usage();
++
++ // setup any signals
++ signal(SIGINT, signal_handler);
++ signal(SIGPIPE, SIG_IGN);
++
++ // start the CA stuff
++ zap_ca_params.adapter_id = adapter_id;
++ zap_ca_params.caslot_num = caslot_num;
++ zap_ca_params.moveca = moveca;
++ zap_ca_start(&zap_ca_params);
++
++ // find the requested channel
++ if (strlen(channel_name) >= sizeof(zap_dvb_params.channel.name)) {
++ fprintf(stderr, "Channel name is too long %s\n", channel_name);
++ exit(1);
++ }
++ FILE *channel_file = fopen(chanfile, "r");
++ if (channel_file == NULL) {
++ fprintf(stderr, "Could open channel file %s\n", chanfile);
++ exit(1);
++ }
++ memcpy(zap_dvb_params.channel.name, channel_name, strlen(channel_name) + 1);
++ if (dvbcfg_zapchannel_parse(channel_file, find_channel, &zap_dvb_params.channel) != 1) {
++ fprintf(stderr, "Unable to find requested channel %s\n", channel_name);
++ exit(1);
++ }
++ fclose(channel_file);
++
++ // default SEC with a DVBS card
++ if ((secid == NULL) && (zap_dvb_params.channel.fe_type == DVBFE_TYPE_DVBS))
++ secid = "UNIVERSAL";
++
++ // look it up if one were supplied
++ zap_dvb_params.valid_sec = 0;
++ if (secid != NULL) {
++ if (dvbsec_cfg_find(secfile, secid,
++ &zap_dvb_params.sec)) {
++ fprintf(stderr, "Unable to find suitable sec/lnb configuration for channel\n");
++ exit(1);
++ }
++ zap_dvb_params.valid_sec = 1;
++ }
++
++ // open the frontend
++ zap_dvb_params.fe = dvbfe_open(adapter_id, frontend_id, 0);
++ if (zap_dvb_params.fe == NULL) {
++ fprintf(stderr, "Failed to open frontend\n");
++ exit(1);
++ }
++
++ // start the DVB stuff
++ zap_dvb_params.adapter_id = adapter_id;
++ zap_dvb_params.frontend_id = frontend_id;
++ zap_dvb_params.demux_id = demux_id;
++ zap_dvb_start(&zap_dvb_params);
++
++ // the UI
++ while(!quit_app) {
++ sleep(1);
++ }
++
++ // shutdown DVB stuff
++ if (channel_name != NULL)
++ zap_dvb_stop();
++
++ // shutdown CA stuff
++ zap_ca_stop();
++
++ // done
++ exit(0);
++}
++
++static void signal_handler(int _signal)
++{
++ (void) _signal;
++
++ if (!quit_app) {
++ quit_app = 1;
++ }
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap_ca.c dvb-apps/util/zap/zap_ca.c
+--- linuxtv-dvb-apps-1.1.1/util/zap/zap_ca.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/zap/zap_ca.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,198 @@
++/*
++ ZAP utility CA functions
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <sys/poll.h>
++#include <pthread.h>
++#include <libdvben50221/en50221_stdcam.h>
++#include "zap_ca.h"
++
++
++static int zap_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids);
++static int zap_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t application_type, uint16_t application_manufacturer,
++ uint16_t manufacturer_code, uint8_t menu_string_length,
++ uint8_t *menu_string);
++static void *camthread_func(void* arg);
++
++static struct en50221_transport_layer *tl = NULL;
++static struct en50221_session_layer *sl = NULL;
++static struct en50221_stdcam *stdcam = NULL;
++
++static int ca_resource_connected = 0;
++
++static int camthread_shutdown = 0;
++static pthread_t camthread;
++static int seenpmt = 0;
++static int moveca = 0;
++
++void zap_ca_start(struct zap_ca_params *params)
++{
++ // create transport layer
++ tl = en50221_tl_create(1, 16);
++ if (tl == NULL) {
++ fprintf(stderr, "Failed to create transport layer\n");
++ return;
++ }
++
++ // create session layer
++ sl = en50221_sl_create(tl, 16);
++ if (sl == NULL) {
++ fprintf(stderr, "Failed to create session layer\n");
++ en50221_tl_destroy(tl);
++ return;
++ }
++
++ // create the stdcam instance
++ stdcam = en50221_stdcam_create(params->adapter_id, params->caslot_num, tl, sl);
++ if (stdcam == NULL) {
++ en50221_sl_destroy(sl);
++ en50221_tl_destroy(tl);
++ return;
++ }
++
++ // hook up the AI callbacks
++ if (stdcam->ai_resource) {
++ en50221_app_ai_register_callback(stdcam->ai_resource, zap_ai_callback, stdcam);
++ }
++
++ // hook up the CA callbacks
++ if (stdcam->ca_resource) {
++ en50221_app_ca_register_info_callback(stdcam->ca_resource, zap_ca_info_callback, stdcam);
++ }
++
++ // any other stuff
++ moveca = params->moveca;
++
++ // start the cam thread
++ pthread_create(&camthread, NULL, camthread_func, NULL);
++}
++
++void zap_ca_stop(void)
++{
++ if (stdcam == NULL)
++ return;
++
++ // shutdown the cam thread
++ camthread_shutdown = 1;
++ pthread_join(camthread, NULL);
++
++ // destroy session layer
++ en50221_sl_destroy(sl);
++
++ // destroy transport layer
++ en50221_tl_destroy(tl);
++
++ // destroy the stdcam
++ if (stdcam->destroy)
++ stdcam->destroy(stdcam, 1);
++}
++
++int zap_ca_new_pmt(struct mpeg_pmt_section *pmt)
++{
++ uint8_t capmt[4096];
++ int size;
++
++ if (stdcam == NULL)
++ return -1;
++
++ if (ca_resource_connected) {
++ fprintf(stderr, "Received new PMT - sending to CAM...\n");
++
++ // translate it into a CA PMT
++ int listmgmt = CA_LIST_MANAGEMENT_ONLY;
++ if (seenpmt) {
++ listmgmt = CA_LIST_MANAGEMENT_UPDATE;
++ }
++ seenpmt = 1;
++
++ if ((size = en50221_ca_format_pmt(pmt, capmt, sizeof(capmt), moveca, listmgmt,
++ CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0) {
++ fprintf(stderr, "Failed to format PMT\n");
++ return -1;
++ }
++
++ // set it
++ if (en50221_app_ca_pmt(stdcam->ca_resource, stdcam->ca_session_number, capmt, size)) {
++ fprintf(stderr, "Failed to send PMT\n");
++ return -1;
++ }
++
++ // we've seen this PMT
++ return 1;
++ }
++
++ return 0;
++}
++
++void zap_ca_new_dvbtime(time_t dvb_time)
++{
++ if (stdcam == NULL)
++ return;
++
++ if (stdcam->dvbtime)
++ stdcam->dvbtime(stdcam, dvb_time);
++}
++
++static void *camthread_func(void* arg)
++{
++ (void) arg;
++
++ while(!camthread_shutdown) {
++ stdcam->poll(stdcam);
++ }
++
++ return 0;
++}
++
++static int zap_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
++ uint8_t application_type, uint16_t application_manufacturer,
++ uint16_t manufacturer_code, uint8_t menu_string_length,
++ uint8_t *menu_string)
++{
++ (void) arg;
++ (void) slot_id;
++ (void) session_number;
++
++ printf("CAM Application type: %02x\n", application_type);
++ printf("CAM Application manufacturer: %04x\n", application_manufacturer);
++ printf("CAM Manufacturer code: %04x\n", manufacturer_code);
++ printf("CAM Menu string: %.*s\n", menu_string_length, menu_string);
++
++ return 0;
++}
++
++static int zap_ca_info_callback(void *arg, uint8_t slot_id, uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids)
++{
++ (void) arg;
++ (void) slot_id;
++ (void) session_number;
++
++ printf("CAM supports the following ca system ids:\n");
++ uint32_t i;
++ for(i=0; i< ca_id_count; i++) {
++ printf(" 0x%04x\n", ca_ids[i]);
++ }
++ ca_resource_connected = 1;
++ return 0;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap_ca.h dvb-apps/util/zap/zap_ca.h
+--- linuxtv-dvb-apps-1.1.1/util/zap/zap_ca.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/zap/zap_ca.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,37 @@
++/*
++ ZAP utility CA functions
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef ZAP_CA_H
++#define ZAP_CA_H 1
++
++struct zap_ca_params {
++ int adapter_id;
++ int caslot_num;
++ int moveca;
++};
++
++extern void zap_ca_start(struct zap_ca_params *params);
++extern void zap_ca_stop(void);
++
++extern int zap_ca_new_pmt(struct mpeg_pmt_section *pmt);
++extern void zap_ca_new_dvbtime(time_t dvb_time);
++
++#endif
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap_dvb.c dvb-apps/util/zap/zap_dvb.c
+--- linuxtv-dvb-apps-1.1.1/util/zap/zap_dvb.c 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/zap/zap_dvb.c 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,353 @@
++/*
++ ZAP utility DVB functions
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#include <stdio.h>
++#include <unistd.h>
++#include <limits.h>
++#include <string.h>
++#include <signal.h>
++#include <pthread.h>
++#include <sys/poll.h>
++#include <libdvbapi/dvbdemux.h>
++#include <libucsi/section.h>
++#include <libucsi/mpeg/section.h>
++#include <libucsi/dvb/section.h>
++#include "zap_dvb.h"
++#include "zap_ca.h"
++
++#define FE_STATUS_PARAMS (DVBFE_INFO_LOCKSTATUS|DVBFE_INFO_SIGNAL_STRENGTH|DVBFE_INFO_BER|DVBFE_INFO_SNR|DVBFE_INFO_UNCORRECTED_BLOCKS)
++
++static int dvbthread_shutdown = 0;
++static pthread_t dvbthread;
++
++static int pat_version = -1;
++static int ca_pmt_version = -1;
++
++static void *dvbthread_func(void* arg);
++
++static void process_pat(int pat_fd, struct zap_dvb_params *params, int *pmt_fd, struct pollfd *pollfd);
++static void process_tdt(int tdt_fd);
++static void process_pmt(int pmt_fd, struct zap_dvb_params *params);
++static int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id);
++
++
++int zap_dvb_start(struct zap_dvb_params *params)
++{
++ pthread_create(&dvbthread, NULL, dvbthread_func, (void*) params);
++ return 0;
++}
++
++void zap_dvb_stop(void)
++{
++ dvbthread_shutdown = 1;
++ pthread_join(dvbthread, NULL);
++}
++
++static void *dvbthread_func(void* arg)
++{
++ int tune_state = 0;
++ int pat_fd = -1;
++ int pmt_fd = -1;
++ int tdt_fd = -1;
++ struct pollfd pollfds[3];
++
++ struct zap_dvb_params *params = (struct zap_dvb_params *) arg;
++
++ // create PAT filter
++ if ((pat_fd = create_section_filter(params->adapter_id, params->demux_id,
++ TRANSPORT_PAT_PID, stag_mpeg_program_association)) < 0) {
++ fprintf(stderr, "Failed to create PAT section filter\n");
++ exit(1);
++ }
++ pollfds[0].fd = pat_fd;
++ pollfds[0].events = POLLIN|POLLPRI|POLLERR;
++
++ // create TDT filter
++ if ((tdt_fd = create_section_filter(params->adapter_id, params->demux_id, TRANSPORT_TDT_PID, stag_dvb_time_date)) < 0) {
++ fprintf(stderr, "Failed to create TDT section filter\n");
++ exit(1);
++ }
++ pollfds[1].fd = tdt_fd;
++ pollfds[1].events = POLLIN|POLLPRI|POLLERR;
++
++ // zero PMT filter
++ pollfds[2].fd = 0;
++ pollfds[2].events = 0;
++
++ // the DVB loop
++ while(!dvbthread_shutdown) {
++ // tune frontend + monitor lock status
++ if (tune_state == 0) {
++ // get the type of frontend
++ struct dvbfe_info result;
++ char *types;
++ memset(&result, 0, sizeof(result));
++ dvbfe_get_info(params->fe, 0, &result, DVBFE_INFO_QUERYTYPE_IMMEDIATE, 0);
++ switch(result.type) {
++ case DVBFE_TYPE_DVBS:
++ types = "DVB-S";
++ break;
++ case DVBFE_TYPE_DVBC:
++ types = "DVB-C";
++ break;
++ case DVBFE_TYPE_DVBT:
++ types = "DVB-T";
++ break;
++ case DVBFE_TYPE_ATSC:
++ types = "ATSC";
++ break;
++ default:
++ types = "Unknown";
++ }
++ fprintf(stderr, "Using frontend \"%s\", type %s\n", result.name, types);
++
++ // do we have a valid SEC configuration?
++ struct dvbsec_config *sec = NULL;
++ if (params->valid_sec)
++ sec = &params->sec;
++
++ // tune!
++ if (dvbsec_set(params->fe,
++ sec,
++ params->channel.polarization,
++ (params->channel.diseqc_switch & 0x01) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
++ (params->channel.diseqc_switch & 0x02) ? DISEQC_SWITCH_B : DISEQC_SWITCH_A,
++ &params->channel.fe_params,
++ 0)) {
++ fprintf(stderr, "Failed to set frontend\n");
++ exit(1);
++ }
++
++ tune_state++;
++ } else if (tune_state == 1) {
++ struct dvbfe_info result;
++ memset(&result, 0, sizeof(result));
++ if (dvbfe_get_info(params->fe,
++ FE_STATUS_PARAMS,
++ &result,
++ DVBFE_INFO_QUERYTYPE_IMMEDIATE,
++ 0) != FE_STATUS_PARAMS) {
++ fprintf(stderr, "Problem retrieving frontend information: %m\n");
++ }
++
++ fprintf(stderr, "status %c%c%c%c%c | signal %04x | snr %04x | ber %08x | unc %08x | %s\r",
++ result.signal ? 'S' : ' ',
++ result.carrier ? 'C' : ' ',
++ result.viterbi ? 'V' : ' ',
++ result.sync ? 'Y' : ' ',
++ result.lock ? 'L' : ' ',
++ result.signal_strength,
++ result.snr,
++ result.ber,
++ result.ucblocks,
++ result.lock ? "FE_HAS_LOCK" : "");
++ fflush(stderr);
++
++ if (result.lock) {
++ tune_state++;
++ fprintf(stderr, "\n");
++ fflush(stderr);
++ } else {
++ usleep(500000);
++ }
++ }
++
++ // is there SI data?
++ int count = poll(pollfds, 3, 100);
++ if (count < 0) {
++ fprintf(stderr, "Poll error\n");
++ break;
++ }
++ if (count == 0) {
++ continue;
++ }
++
++ // PAT
++ if (pollfds[0].revents & (POLLIN|POLLPRI)) {
++ process_pat(pat_fd, params, &pmt_fd, &pollfds[2]);
++ }
++
++ // TDT
++ if (pollfds[1].revents & (POLLIN|POLLPRI)) {
++ process_tdt(tdt_fd);
++ }
++
++ // PMT
++ if (pollfds[2].revents & (POLLIN|POLLPRI)) {
++ process_pmt(pmt_fd, params);
++ }
++ }
++
++ // close demuxers
++ if (pat_fd != -1)
++ close(pat_fd);
++ if (pmt_fd != -1)
++ close(pmt_fd);
++ if (tdt_fd != -1)
++ close(tdt_fd);
++
++ return 0;
++}
++
++static void process_pat(int pat_fd, struct zap_dvb_params *params, int *pmt_fd, struct pollfd *pollfd)
++{
++ int size;
++ uint8_t sibuf[4096];
++
++ // read the section
++ if ((size = read(pat_fd, sibuf, sizeof(sibuf))) < 0) {
++ return;
++ }
++
++ // parse section
++ struct section *section = section_codec(sibuf, size);
++ if (section == NULL) {
++ return;
++ }
++
++ // parse section_ext
++ struct section_ext *section_ext = section_ext_decode(section, 0);
++ if (section_ext == NULL) {
++ return;
++ }
++ if (pat_version == section_ext->version_number) {
++ return;
++ }
++
++ // parse PAT
++ struct mpeg_pat_section *pat = mpeg_pat_section_codec(section_ext);
++ if (pat == NULL) {
++ return;
++ }
++
++ // try and find the requested program
++ struct mpeg_pat_program *cur_program;
++ mpeg_pat_section_programs_for_each(pat, cur_program) {
++ if (cur_program->program_number == params->channel.service_id) {
++ // close old PMT fd
++ if (*pmt_fd != -1)
++ close(*pmt_fd);
++
++ // create PMT filter
++ if ((*pmt_fd = create_section_filter(params->adapter_id, params->demux_id,
++ cur_program->pid, stag_mpeg_program_map)) < 0) {
++ return;
++ }
++ pollfd->fd = *pmt_fd;
++ pollfd->events = POLLIN|POLLPRI|POLLERR;
++
++ // we have a new PMT pid
++ ca_pmt_version = -1;
++ break;
++ }
++ }
++
++ // remember the PAT version
++ pat_version = section_ext->version_number;
++}
++
++static void process_tdt(int tdt_fd)
++{
++ int size;
++ uint8_t sibuf[4096];
++
++ // read the section
++ if ((size = read(tdt_fd, sibuf, sizeof(sibuf))) < 0) {
++ return;
++ }
++
++ // parse section
++ struct section *section = section_codec(sibuf, size);
++ if (section == NULL) {
++ return;
++ }
++
++ // parse TDT
++ struct dvb_tdt_section *tdt = dvb_tdt_section_codec(section);
++ if (tdt == NULL) {
++ return;
++ }
++
++ // done
++ zap_ca_new_dvbtime(dvbdate_to_unixtime(tdt->utc_time));
++}
++
++static void process_pmt(int pmt_fd, struct zap_dvb_params *params)
++{
++ int size;
++ uint8_t sibuf[4096];
++
++ // read the section
++ if ((size = read(pmt_fd, sibuf, sizeof(sibuf))) < 0) {
++ return;
++ }
++
++ // parse section
++ struct section *section = section_codec(sibuf, size);
++ if (section == NULL) {
++ return;
++ }
++
++ // parse section_ext
++ struct section_ext *section_ext = section_ext_decode(section, 0);
++ if (section_ext == NULL) {
++ return;
++ }
++ if ((section_ext->table_id_ext != params->channel.service_id) ||
++ (section_ext->version_number == ca_pmt_version)) {
++ return;
++ }
++
++ // parse PMT
++ struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(section_ext);
++ if (pmt == NULL) {
++ return;
++ }
++
++ // do ca handling
++ if (zap_ca_new_pmt(pmt) == 1)
++ ca_pmt_version = pmt->head.version_number;
++}
++
++static int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id)
++{
++ int demux_fd = -1;
++ uint8_t filter[18];
++ uint8_t mask[18];
++
++ // open the demuxer
++ if ((demux_fd = dvbdemux_open_demux(adapter, demux, 0)) < 0) {
++ return -1;
++ }
++
++ // create a section filter
++ memset(filter, 0, sizeof(filter));
++ memset(mask, 0, sizeof(mask));
++ filter[0] = table_id;
++ mask[0] = 0xFF;
++ if (dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) {
++ close(demux_fd);
++ return -1;
++ }
++
++ // done
++ return demux_fd;
++}
+diff -Nurd linuxtv-dvb-apps-1.1.1/util/zap/zap_dvb.h dvb-apps/util/zap/zap_dvb.h
+--- linuxtv-dvb-apps-1.1.1/util/zap/zap_dvb.h 1970-01-01 01:00:00.000000000 +0100
++++ dvb-apps/util/zap/zap_dvb.h 2009-06-21 13:29:06.000000000 +0200
+@@ -0,0 +1,41 @@
++/*
++ ZAP utility DVB functions
++
++ Copyright (C) 2004, 2005 Manu Abraham <abraham.manu@gmail.com>
++ Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of
++ the License, or (at your option) any later version.
++
++ This 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++*/
++
++#ifndef ZAP_DVB_H
++#define ZAP_DVB_H 1
++
++#include <libdvbcfg/dvbcfg_zapchannel.h>
++#include <libdvbsec/dvbsec_api.h>
++
++struct zap_dvb_params {
++ int adapter_id;
++ int frontend_id;
++ int demux_id;
++ struct dvbcfg_zapchannel channel;
++ struct dvbsec_config sec;
++ int valid_sec;
++ struct dvbfe_handle *fe;
++};
++
++extern int zap_dvb_start(struct zap_dvb_params *params);
++extern void zap_dvb_stop(void);
++
++#endif
diff --git a/recipes/dvbtools/dvb-apps_1.1.1.bb b/recipes/dvbtools/dvb-apps_1.1.1.bb
index 8f3cd3f2ac..10ecff5215 100644
--- a/recipes/dvbtools/dvb-apps_1.1.1.bb
+++ b/recipes/dvbtools/dvb-apps_1.1.1.bb
@@ -1,11 +1,14 @@
HOMEPAGE = "http://www.linuxtv.org"
LICENSE = "GPL"
-S = "${WORKDIR}/linuxtv-dvb-apps-${PV}"
SRC_URI = "http://linuxtv.org/downloads/linuxtv-dvb-apps-${PV}.tar.bz2 \
- file://makefile.patch;patch=1"
+ file://update-to-trunk.diff;patch=1"
+
+PR = "r1"
+
+S = "${WORKDIR}/linuxtv-dvb-apps-${PV}"
-PACKAGES += "evtest evtest-dbg \
+PACKAGES =+ "evtest evtest-dbg \
dvbapp-tests dvbapp-tests-dbg \
dvbdate dvbdate-dbg \
dvbtraffic dvbtraffic-dbg \
@@ -19,17 +22,17 @@ PACKAGES += "evtest evtest-dbg \
dvb-zap-data"
-TARGET_CC_ARCH += "${LDFLAGS}"
+TARGET_CC_ARCH += "${LDFLAGS} -static"
-FILES_${PN} = ""
-FILES_${PN}-dbg = ""
+FILES_${PN} = "${bindir} ${datadir}/dvb"
FILES_${PN}-doc = ""
+FILES_${PN}-dev = "${includedir}"
FILES_evtest = "${bindir}/evtest"
FILES_evtest-dbg = "${bindir}/.debug/evtest"
-FILES_dvbapp-tests = "${bindir}/test_*"
-FILES_dvbapp-tests-dbg = "${bindir}/.debug/test_*"
+FILES_dvbapp-tests = "${bindir}/*test* "
+FILES_dvbapp-tests-dbg = "${bindir}/.debug/*test*"
FILES_dvbdate = "${bindir}/dvbdate"
FILES_dvbdate-dbg = "${bindir}/.debug/dvbdate"
@@ -40,8 +43,8 @@ FILES_dvbtraffic-dbg = "${bindir}/.debug/dvbtraffic"
FILES_dvbnet = "${bindir}/dvbnet"
FILES_dvbnet-dbg = "${bindir}/.debug/dvbnet"
-FILES_dvb-scan = "${bindir}/scan"
-FILES_dvb-scan-dbg = "${bindir}/.debug/scan"
+FILES_dvb-scan = "${bindir}/*scan "
+FILES_dvb-scan-dbg = "${bindir}/.debug/*scan"
FILES_dvb-scan-data = "${docdir}/dvb-apps/scan"
FILES_dvb-azap = "${bindir}/azap"
@@ -61,13 +64,17 @@ FILES_dvb-femon-dbg = "${bindir}/.debug/femon"
FILES_dvb-zap-data = "${docdir}/dvb-apps/szap"
-
+do_configure() {
+ sed -i -e s:/usr/include:${STAGING_INCDIR}:g util/av7110_loadkeys/generate-keynames.sh
+}
do_install() {
- install -d ${D}/${bindir}
+ make DESTDIR=${D} install
+ install -d ${D}/${bindir}
install -d ${D}/${docdir}/dvb-apps
install -d ${D}/${docdir}/dvb-apps/scan
install -d ${D}/${docdir}/dvb-apps/szap
+ chmod a+rx ${D}/${libdir}/*.so*
# Install tests
install -m 0755 ${S}/test/setvoltage ${D}${bindir}/test_setvoltage
@@ -87,25 +94,14 @@ do_install() {
install -m 0755 ${S}/test/test_pes ${D}${bindir}/
install -m 0755 ${S}/test/test_dvr ${D}${bindir}/
- # Install the utils
- install -m 0755 ${S}/util/dvbtraffic/dvbtraffic ${D}${bindir}/
- install -m 0755 ${S}/util/scan/scan ${D}${bindir}/
- install -m 0755 ${S}/util/szap/tzap ${D}${bindir}/
- install -m 0755 ${S}/util/szap/czap ${D}${bindir}/
- install -m 0755 ${S}/util/szap/femon ${D}${bindir}/
- install -m 0755 ${S}/util/szap/szap ${D}${bindir}/
- install -m 0755 ${S}/util/szap/azap ${D}${bindir}/
- install -m 0755 ${S}/util/av7110_loadkeys/evtest ${D}${bindir}/
- install -m 0755 ${S}/util/dvbnet/dvbnet ${D}${bindir}/
- install -m 0755 ${S}/util/dvbdate/dvbdate ${D}${bindir}/
-
- # Install data files
- cp -pPR ${S}/util/scan/dvb-c ${D}/${docdir}/dvb-apps/scan/
- cp -pPR ${S}/util/scan/dvb-s ${D}/${docdir}/dvb-apps/scan/
- cp -pPR ${S}/util/scan/dvb-t ${D}/${docdir}/dvb-apps/scan/
- cp -pPR ${S}/util/scan/atsc ${D}/${docdir}/dvb-apps/scan/
- cp -pPR ${S}/util/scan/README ${D}/${docdir}/dvb-apps/scan/
-
- cp -pPR ${S}/util/szap/channels.conf-* ${D}/${docdir}/dvb-apps/szap/
+ cp -pPR ${S}/util/szap/channels-conf* ${D}/${docdir}/dvb-apps/szap/
cp -pPR ${S}/util/szap/README ${D}/${docdir}/dvb-apps/szap/
}
+
+python populate_packages_prepend () {
+ dvb_libdir = bb.data.expand('${libdir}', d)
+ do_split_packages(d, dvb_libdir, '^lib(.*)\.so$', 'lib%s', 'DVB %s package', extra_depends='', allow_links=True)
+ do_split_packages(d, dvb_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'DVB %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, dvb_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'DVB %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, dvb_libdir, '^lib(.*)\.so\.*', 'lib%s', 'DVB %s library', extra_depends='', allow_links=True)
+}
diff --git a/recipes/dvbtools/dvbstream_cvs.bb b/recipes/dvbtools/dvbstream_cvs.bb
index c2411437e1..23909f58aa 100644
--- a/recipes/dvbtools/dvbstream_cvs.bb
+++ b/recipes/dvbtools/dvbstream_cvs.bb
@@ -4,10 +4,12 @@ LICENSE = "GPLV2"
DEPENDS = "libxml2"
PV = "0.0+cvs${SRCDATE}"
+PR = "r1"
+
SRC_URI = "cvs://anonymous@dvbtools.cvs.sourceforge.net/cvsroot/dvbtools;module=dvbstream"
S = "${WORKDIR}/dvbstream"
-CFLAGS_append = " -D_GNU_SOURCE"
+CFLAGS_append = " ${LDFLAGS} -D_GNU_SOURCE"
do_install() {
mkdir -p ${D}${bindir}
diff --git a/recipes/dvbtools/dvbtraffic.bb b/recipes/dvbtools/dvbtraffic.bb
index b41364353d..d36b13fa8c 100644
--- a/recipes/dvbtools/dvbtraffic.bb
+++ b/recipes/dvbtools/dvbtraffic.bb
@@ -7,7 +7,7 @@ PV = "0.0cvs${SRCDATE}"
SRC_URI = "cvs://anonymous@cvs.linuxtv.org/cvs/linuxtv;module=dvb-apps/util/dvbtraffic"
S = "${WORKDIR}/dvbtraffic"
-CFLAGS_append = " -D PATH_MAX=128"
+CFLAGS_append = " ${LDFLAGS} -D PATH_MAX=128"
do_compile() {
oe_runmake dvbtraffic
diff --git a/recipes/dvbtools/wscan_20080720.bb b/recipes/dvbtools/wscan_20080720.bb
index b71fb2bf18..50a0e019c7 100644
--- a/recipes/dvbtools/wscan_20080720.bb
+++ b/recipes/dvbtools/wscan_20080720.bb
@@ -1,9 +1,13 @@
DESCRIPTION = "Wscan is a dvb channel scanner that doesn't require an initial frequency table"
LICENSE = "GPLv2"
+PR = "r1"
+
SRC_URI = "http://wirbel.htpc-forum.de/w_scan/w_scan-${PV}.tar.bz2"
S = "${WORKDIR}/w_scan-${PV}"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
do_install() {
install -d ${D}/${bindir}
install -m 0755 w_scan ${D}/${bindir}/
diff --git a/recipes/dsplink/dsplink.inc b/recipes/dvsdk/dsplink.inc
index 1ca01c399c..1ca01c399c 100644
--- a/recipes/dsplink/dsplink.inc
+++ b/recipes/dvsdk/dsplink.inc
diff --git a/recipes/dsplink/files/Makefile-dsplink-dsp b/recipes/dvsdk/files/Makefile-dsplink-dsp
index 0861f1ee21..0861f1ee21 100755
--- a/recipes/dsplink/files/Makefile-dsplink-dsp
+++ b/recipes/dvsdk/files/Makefile-dsplink-dsp
diff --git a/recipes/dsplink/files/Makefile-dsplink-gpp b/recipes/dvsdk/files/Makefile-dsplink-gpp
index d9f2f6209a..d9f2f6209a 100755
--- a/recipes/dsplink/files/Makefile-dsplink-gpp
+++ b/recipes/dvsdk/files/Makefile-dsplink-gpp
diff --git a/recipes/dsplink/files/cmem-class-device-27-and-sched-include-fix.patch b/recipes/dvsdk/files/cmem-class-device-27-and-sched-include-fix.patch
index 8eb3210bb1..8eb3210bb1 100644
--- a/recipes/dsplink/files/cmem-class-device-27-and-sched-include-fix.patch
+++ b/recipes/dvsdk/files/cmem-class-device-27-and-sched-include-fix.patch
diff --git a/recipes/dvsdk/files/config.bld b/recipes/dvsdk/files/config.bld
new file mode 100644
index 0000000000..2e99cab0b0
--- /dev/null
+++ b/recipes/dvsdk/files/config.bld
@@ -0,0 +1,48 @@
+/*
+ * CROSS_DIR - toolchain installation location
+ * PLATFORM - platform to be build
+ * doBuildArm - true (to build arm)
+ * doBuildDsp - true (to build dsp)
+ * buildDualCpu - build example for dual cpu
+ */
+
+var buildTable = {
+ "Arm": [{doBuild: doBuildArm,
+ target: "gnu.targets.arm.GCArmv5T",
+ cgtoolsRootDir: "CROSS_DIR",
+ platforms: [
+ {platform: "PLATFORM", dualCpu: buildDualCpu, outDir: "bin/PLATFORM"},
+ ],
+ }],
+ "DSP": [{doBuild: doBuildDsp,
+ target: "ti.targets.C64P",
+ cgtoolsRootDir: "TICGTOOLSDIR",
+ platforms: [
+ {platform: "PLATFORM", outDir: "bin/PLATFORM"},
+ ],
+ }]
+
+};
+
+var targets = [];
+var userbldBuildPlatforms = {};
+for each (var cpu in buildTable) {
+ for (var t = 0; t < cpu.length; t++) {
+ if (cpu[t].doBuild) {
+ var targ = xdc.useModule(cpu[t].target);
+ targets.push(targ);
+ targ.rootDir = cpu[t].cgtoolsRootDir;
+ userbldBuildPlatforms[targ.name] = cpu[t].platforms;
+ }
+ }
+}
+
+Build.targets = targets;
+for (var i = 0; i < Build.targets.length; i++) {
+ var t = targets[i];
+
+ if (t.name == "GCArmv5T") {
+ t.LONGNAME = "bin/CROSS_PREFIX";
+ }
+}
+
diff --git a/recipes/dvsdk/files/dm355mm_1_30.patch b/recipes/dvsdk/files/dm355mm_1_30.patch
new file mode 100644
index 0000000000..6ee6064f5a
--- /dev/null
+++ b/recipes/dvsdk/files/dm355mm_1_30.patch
@@ -0,0 +1,498 @@
+diff -uNr dm355_codecs_1_13_000/dm355mm/module/dm350mmap.c dm355_codecs_1_13_000.new/dm355mm/module/dm350mmap.c
+--- dm355_codecs_1_13_000/dm355mm/module/dm350mmap.c 2009-05-20 11:22:57.000000000 -0500
++++ dm355_codecs_1_13_000.new/dm355mm/module/dm350mmap.c 2009-06-09 10:43:25.000000000 -0500
+@@ -7,7 +7,7 @@
+ * Use of this software is controlled by the terms and conditions found in the
+ * license agreement under which this software has been supplied or provided.
+ * ============================================================================
+- */
++ */
+ #include <linux/module.h>
+ #include <linux/init.h>
+ #include <linux/moduleparam.h>
+@@ -20,274 +20,283 @@
+ #include <linux/proc_fs.h>
+ #include <linux/kernel.h>
+ #include <linux/device.h>
+-
++#include <linux/clk.h>
++
+ #include <asm/page.h>
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+ #include <asm/io.h>
+-#include<asm/system.h>
+-#include<asm-arm/memory.h>
++#include <asm/system.h>
++#include <asm/memory.h>
++
+ #include <asm/irq.h>
+-
++
++#include <linux/version.h>
+ #include <linux/completion.h>
+-#include <asm/arch/edma.h>
+-
++#include <mach/edma.h>
++
+ #define ASQINT_ENABLE
+- typedef struct _edma_params
+-{
+- unsigned long src;
+- unsigned long dst;
+- unsigned int srcmode;
+- unsigned int srcfifowidth;
+- int srcbidx;
+- int srccidx;
+- unsigned int dstmode;
+- unsigned int dstfifowidth;
+- int dstbidx;
+- int dstcidx;
+- int acnt;
+- int bcnt;
+- int ccnt;
+- int bcntrld;
+- int syncmode;
+- } edma_params;
++typedef struct _edma_params {
++ unsigned long src;
++ unsigned long dst;
++ unsigned int srcmode;
++ unsigned int srcfifowidth;
++ int srcbidx;
++ int srccidx;
++ unsigned int dstmode;
++ unsigned int dstfifowidth;
++ int dstbidx;
++ int dstcidx;
++ int acnt;
++ int bcnt;
++ int ccnt;
++ int bcntrld;
++ int syncmode;
++} edma_params;
+
+ #define DM350MMAP_IOCMEMCPY 0x7
+ #define DM350MMAP_IOCWAIT 0x8
+ #define DM350MMAP_IOCCLEAR_PENDING 0x9
+-
++
+ #ifdef __DEBUG
+-#define __D(fmt, args...) printk(KERN_DEBUG "DM350MMAP Debug: " fmt, ## args)
++# define __D(fmt, args...) printk(KERN_DEBUG "DM350MMAP Debug: " fmt, ## args)
+ #else /* */
+-#define __D(fmt, args...)
++# define __D(fmt, args...)
+ #endif /* */
+-
++
+ #define __E(fmt, args...) printk(KERN_ERR "DM350MMAP Error: " fmt, ## args)
+-
++
+ #define MAXTYPE(T) ((T) (((T)1 << ((sizeof(T) * 8) - 1) ^ ((T) -1))))
+-
++
+ static int major = 0;
+
+ #if (USE_UDEV==1)
+ static struct class *dm350mmap_class;
+-
+ #endif // USE_UDEV
+-static DECLARE_MUTEX_LOCKED (dm350mmap_reply_mutex);
+-int master_ch;
+-struct completion edmacompletion;
+-
+-/* Forward declaration of system calls */
+-static int ioctl (struct inode *inode, struct file *filp, unsigned int cmd,
+- unsigned long args);
+-static int mmap (struct file *filp, struct vm_area_struct *vma);
+-static int open (struct inode *inode, struct file *filp);
+-static int release (struct inode *inode, struct file *filp);
++
++static DECLARE_MUTEX(dm350mmap_reply_mutex);
++static struct completion edmacompletion;
++
++/* Forward declaration of system calls */
++static int ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
++ unsigned long args);
++static int mmap(struct file *filp, struct vm_area_struct *vma);
++static int open(struct inode *inode, struct file *filp);
++static int release(struct inode *inode, struct file *filp);
+ static struct file_operations dm350mmap_fxns = { ioctl: ioctl, mmap: mmap, open: open, release:release
+-
+ };
+
+-static irqreturn_t irq_handler (int irq, void *dev_id, struct pt_regs *regs)
++/* Structure to hold mjcp clock info */
++static struct clk *mjcp = NULL;
++
++//static irqreturn_t irq_handler (int irq, void *dev_id, struct pt_regs *regs)
++static irqreturn_t irq_handler(int irq, void *dev_id)
+ {
+-
+- /* Release the mutex, suggesting sequencer processing complete */
+- up (&dm350mmap_reply_mutex);
+- return IRQ_HANDLED;
++ /* Release the mutex, suggesting sequencer processing complete */
++ up(&dm350mmap_reply_mutex);
++ return IRQ_HANDLED;
+ }
+
+-static void memcpy_dma_irq_handler (int lch, u16 ch_status, void *data)
++static void memcpy_dma_irq_handler(unsigned lch, u16 ch_status, void *data)
+ {
+- complete_all (&edmacompletion);
+-}
++ complete_all(&edmacompletion);
++}
+
+-static int mmap (struct file *filp, struct vm_area_struct *vma)
++static int mmap(struct file *filp, struct vm_area_struct *vma)
+ {
+- __D ("mmap: vma->vm_start = %#lx\n", vma->vm_start);
+- __D ("mmap: vma->vm_pgoff = %#lx\n", vma->vm_pgoff);
+- __D ("mmap: vma->vm_end = %#lx\n", vma->vm_end);
+- __D ("mmap: size = %#lx\n", vma->vm_end - vma->vm_start);
+- vma->vm_page_prot = pgprot_noncached (vma->vm_page_prot);
+- if (remap_pfn_range (vma, vma->vm_start,
+-
+-#ifdef LINUX_2_6_18
+- (vma->vm_pgoff >> PAGE_SHIFT),
++ __D("mmap: vma->vm_start = %#lx\n", vma->vm_start);
++ __D("mmap: vma->vm_pgoff = %#lx\n", vma->vm_pgoff);
++ __D("mmap: vma->vm_end = %#lx\n", vma->vm_end);
++ __D("mmap: size = %#lx\n", vma->vm_end - vma->vm_start);
++ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
++ if (remap_pfn_range(vma, vma->vm_start,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
++ (vma->vm_pgoff >> PAGE_SHIFT),
+ #else /* */
+- vma->vm_pgoff,
++ vma->vm_pgoff,
+ #endif /* */
+-
+- vma->vm_end - vma->vm_start, vma->vm_page_prot))
+- {
+- __E ("mmap: failed remap_pfn_range\n");
+- return -EAGAIN;
++ vma->vm_end - vma->vm_start, vma->vm_page_prot)) {
++ __E("mmap: failed remap_pfn_range\n");
++ return -EAGAIN;
+ }
+- return 0;
++ return 0;
+ }
+
+
+-static int ioctl (struct inode *inode, struct file *filp, unsigned int cmd,
+- unsigned long args)
++static int ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
++ unsigned long args)
+ {
+- unsigned int __user *argp = (unsigned int __user *) args;
+- edma_params edmaparams;
+- int err = 0, tcc = EDMA_TCC_ANY;
+- struct paramentry_descriptor paramentry;
+- switch (cmd)
+- {
+-
+- /*
+- * Tries to clear any previously unaccounted interrupt.
+- */
+- case DM350MMAP_IOCCLEAR_PENDING:
+-
+- {
+- int retval;
+- __D ("Clear Pending Call received.\n");
+- init_MUTEX_LOCKED(&dm350mmap_reply_mutex);
+- return 0;
+- }
+- break;
+-
+- /*
+- * Blocks till the sequencer completion interrupt arrives.
+- */
+- case DM350MMAP_IOCWAIT:
+-
+- {
+- int retval;
+- __D ("WAIT Call received.\n");
+- retval = down_interruptible (&dm350mmap_reply_mutex);
+- return retval;
+- }
+- break;
+- case DM350MMAP_IOCMEMCPY:
+- __D ("MEMCPY ioctl received.\n");
+- if (copy_from_user (&edmaparams, argp, sizeof (edmaparams)))
+- {
+- return -EFAULT;
+- }
+- err =
+- davinci_request_dma (EDMA_DMA_CHANNEL_ANY, "EDMA memcpy",
+- memcpy_dma_irq_handler, NULL, &master_ch, &tcc,
+- EVENTQ_1);
+-
+- /* Handle Failure condition here */
+- if (err < 0)
+- {
+- __E ("Error in requesting Master channel %d = 0x%x\n", master_ch,
+- err);
+- return err;
+- }
+- davinci_stop_dma (master_ch);
+- init_completion (&edmacompletion);
+- davinci_set_dma_src_params (master_ch,
+- (unsigned long) edmaparams.src,
+- edmaparams.srcmode,
+- edmaparams.srcfifowidth);
+- davinci_set_dma_dest_params (master_ch,
+- (unsigned long) edmaparams.dst,
+- edmaparams.dstmode,
+- edmaparams.dstfifowidth);
+- davinci_set_dma_src_index (master_ch, edmaparams.srcbidx,
+- edmaparams.srccidx);
+- davinci_set_dma_dest_index (master_ch, edmaparams.dstbidx,
+- edmaparams.dstcidx);
+- davinci_set_dma_transfer_params (master_ch, edmaparams.acnt,
+- edmaparams.bcnt, edmaparams.ccnt,
+- edmaparams.bcntrld,
+- edmaparams.syncmode);
+- davinci_get_dma_params (master_ch, &paramentry);
+-
+- /*printk("%x : %x : %x : %x : %x : %x : %x\n", paramentry.opt,
+- paramentry.a_b_cnt, paramentry.src_dst_bidx,
+- paramentry.src_dst_cidx, paramentry.ccnt, paramentry.src,
+- paramentry.dst); */
+- davinci_set_dma_params (master_ch, &paramentry);
+- davinci_start_dma (master_ch);
+- wait_for_completion (&edmacompletion);
+-
+- //printk("Dma completed... \n");
+- davinci_stop_dma (master_ch);
+- davinci_free_dma (master_ch);
+- break;
+- default:
+- __E ("Unknown ioctl received = %d.\n", cmd);
+- return -EINVAL;
++ unsigned int __user *argp = (unsigned int __user *) args;
++ edma_params edmaparams;
++ int edma_channel;
++ int retval = 0;
++ struct edmacc_param p_ram;
++
++ switch (cmd) {
++
++ /*
++ * Tries to clear any previously unaccounted interrupt.
++ */
++ case DM350MMAP_IOCCLEAR_PENDING:
++ __D("Clear Pending Call received.\n");
++ init_MUTEX_LOCKED(&dm350mmap_reply_mutex);
++ break;
++
++ /*
++ * Blocks till the sequencer completion interrupt arrives.
++ */
++ case DM350MMAP_IOCWAIT:
++ __D("WAIT Call received.\n");
++ retval = down_interruptible(&dm350mmap_reply_mutex);
++ break;
++
++ case DM350MMAP_IOCMEMCPY:
++ __D("MEMCPY ioctl received.\n");
++ if (copy_from_user(&edmaparams, argp, sizeof(edmaparams))) {
++ retval = -EFAULT;
++ break;
++ }
++
++ edma_channel =
++ edma_alloc_channel(EDMA_CHANNEL_ANY, &memcpy_dma_irq_handler,
++ NULL, EVENTQ_1);
++
++ /* Handle Failure condition here */
++ if (edma_channel < 0) {
++ __E("Error in requesting Master channel = 0x%x\n",
++ edma_channel);
++ retval = edma_channel;
++ break;
++ }
++
++ edma_stop(edma_channel);
++
++ init_completion(&edmacompletion);
++
++ edma_set_src(edma_channel,
++ (dma_addr_t) edmaparams.src,
++ edmaparams.srcmode, edmaparams.srcfifowidth);
++
++ edma_set_dest(edma_channel,
++ (dma_addr_t) edmaparams.dst,
++ edmaparams.dstmode, edmaparams.dstfifowidth);
++
++ edma_set_src_index(edma_channel, edmaparams.srcbidx,
++ edmaparams.srccidx);
++ edma_set_dest_index(edma_channel, edmaparams.dstbidx,
++ edmaparams.dstcidx);
++
++ edma_set_transfer_params(edma_channel,
++ edmaparams.acnt,
++ edmaparams.bcnt,
++ edmaparams.ccnt,
++ edmaparams.bcntrld, edmaparams.syncmode);
++
++ edma_read_slot(edma_channel, &p_ram);
++ p_ram.opt |= TCINTEN | EDMA_TCC(edma_channel);
++ edma_write_slot(edma_channel, &p_ram);
++
++ edma_start(edma_channel);
++ wait_for_completion(&edmacompletion);
++ edma_stop(edma_channel);
++ edma_free_channel(edma_channel);
++ break;
++
++ default:
++ __E("Unknown ioctl received = %d.\n", cmd);
++ retval = -EINVAL;
++ break;
+ }
+- return 0;
++
++ return retval;
+ }
+
+
+-static int open (struct inode *inode, struct file *filp)
++static int open(struct inode *inode, struct file *filp)
+ {
+- __D ("open: called.\n");
+- return 0;
++ __D("open: called.\n");
++ return 0;
+ }
+
+
+-static int release (struct inode *inode, struct file *filp)
++static int release(struct inode *inode, struct file *filp)
+ {
+- __D ("close: called.");
+- return 0;
++ __D("close: called.");
++ return 0;
+ }
+
+
+-int __init dm350mmap_init (void)
++int __init dm350mmap_init(void)
+ {
+- __D ("** DM350MMAP kernel module built: " __DATE__ " " __TIME__ "\n");
+- major = register_chrdev (0, "dm350mmap", &dm350mmap_fxns);
+- if (major < 0)
+- {
+- __E ("Failed to allocate major number.\n");
+- return -ENODEV;
++ /* In the GIT kernel unused clocks are disabled. To run codec we need to
++ * enable mjcp clock.
++ */
++ mjcp = clk_get(NULL, "mjcp");
++ if (IS_ERR(mjcp))
++ printk(KERN_WARNING "unable to get MJCP clock\n");
++ else
++ clk_enable(mjcp);
++
++ __D("** DM350MMAP kernel module built: " __DATE__ " " __TIME__ "\n");
++ major = register_chrdev(0, "dm350mmap", &dm350mmap_fxns);
++ if (major < 0) {
++ __E("Failed to allocate major number.\n");
++ return -ENODEV;
+ }
+- __D ("Allocated major number: %d\n", major);
+-
++ __D("Allocated major number: %d\n", major);
++
+ #if (USE_UDEV==1)
+- dm350mmap_class = class_create (THIS_MODULE, "dm350mmap");
+- if (IS_ERR (dm350mmap_class))
+- {
+- __E ("Error creating dm350mmap device class.\n");
+- return -EIO;
++ dm350mmap_class = class_create(THIS_MODULE, "dm350mmap");
++ if (IS_ERR(dm350mmap_class)) {
++ __E("Error creating dm350mmap device class.\n");
++ return -EIO;
+ }
+- class_device_create (dm350mmap_class, NULL, MKDEV (major, 0), NULL,
+- "dm350mmap");
+-
++ class_device_create(dm350mmap_class, NULL, MKDEV(major, 0), NULL,
++ "dm350mmap");
++
+ #endif // USE_UDEV
+- __D ("Successfully initialized module\n");
+-
++ __D("Successfully initialized module\n");
++
+ #ifdef ASQINT_ENABLE
+- if (request_irq (IRQ_ASQINT, irq_handler, 0, "seq_arm_interrupt", NULL))
+- {
+- __D ("Could not install ISR\n");
++ if (request_irq(IRQ_ASQINT, irq_handler, 0, "seq_arm_interrupt", NULL)) {
++ __D("Could not install ISR\n");
+ }
+-
++
+ #endif /* */
++ init_MUTEX_LOCKED(&dm350mmap_reply_mutex);
+ return 0;
+ }
+
+
+-void __exit dm350mmap_exit (void)
++void __exit dm350mmap_exit(void)
+ {
+- __D ("In dm350mmap_exit()\n");
+-
++ /* if mjcp clock is enabled then free it */
++ if (mjcp) {
++ clk_disable(mjcp);
++ clk_put(mjcp);
++ }
++
++ __D("In dm350mmap_exit()\n");
++
+ #if (USE_UDEV==1)
+- class_device_destroy (dm350mmap_class, MKDEV (major, 0));
+- class_destroy (dm350mmap_class);
+-
++ class_device_destroy(dm350mmap_class, MKDEV(major, 0));
++ class_destroy(dm350mmap_class);
++
+ #endif // USE_UDEV
+- __D ("Unregistering character device dm350mmap\n");
+- unregister_chrdev (major, "dm350mmap");
+-
++ __D("Unregistering character device dm350mmap\n");
++ unregister_chrdev(major, "dm350mmap");
++
+ #ifdef ASQINT_ENABLE
+- free_irq (IRQ_ASQINT, NULL);
+-
++ free_irq(IRQ_ASQINT, NULL);
++
+ #endif /* */
+- __D ("dm350mmap unregistered\n");
+-}
++ __D("dm350mmap unregistered\n");
++}
+
+-module_init (dm350mmap_init);
++module_init(dm350mmap_init);
+
+-module_exit (dm350mmap_exit);
+-MODULE_LICENSE ("GPL");
+-MODULE_AUTHOR ("Texas Instruments");
+-MODULE_DESCRIPTION ("DM350 mmap export to userland");
++module_exit(dm350mmap_exit);
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Texas Instruments");
++MODULE_DESCRIPTION("DM350 mmap export to userland");
+
diff --git a/recipes/dsplink/files/dmai-built-with-angstrom.patch b/recipes/dvsdk/files/dmai-built-with-angstrom.patch
index fc49789718..fc49789718 100644
--- a/recipes/dsplink/files/dmai-built-with-angstrom.patch
+++ b/recipes/dvsdk/files/dmai-built-with-angstrom.patch
diff --git a/recipes/dsplink/files/dmai-do-not-panic-on-mixer-failure.patch b/recipes/dvsdk/files/dmai-do-not-panic-on-mixer-failure.patch
index 20e1aece72..20e1aece72 100644
--- a/recipes/dsplink/files/dmai-do-not-panic-on-mixer-failure.patch
+++ b/recipes/dvsdk/files/dmai-do-not-panic-on-mixer-failure.patch
diff --git a/recipes/dsplink/files/dmai-support-32bit-align.patch b/recipes/dvsdk/files/dmai-support-32bit-align.patch
index 0ee817d9d9..0ee817d9d9 100644
--- a/recipes/dsplink/files/dmai-support-32bit-align.patch
+++ b/recipes/dvsdk/files/dmai-support-32bit-align.patch
diff --git a/recipes/dsplink/files/dmai-update-cpu-name.patch b/recipes/dvsdk/files/dmai-update-cpu-name.patch
index 052a8e3236..052a8e3236 100644
--- a/recipes/dsplink/files/dmai-update-cpu-name.patch
+++ b/recipes/dvsdk/files/dmai-update-cpu-name.patch
diff --git a/recipes/dsplink/files/dmai-update-fb-display.patch b/recipes/dvsdk/files/dmai-update-fb-display.patch
index 91c1dd15aa..91c1dd15aa 100644
--- a/recipes/dsplink/files/dmai-update-fb-display.patch
+++ b/recipes/dvsdk/files/dmai-update-fb-display.patch
diff --git a/recipes/dsplink/files/dmai-update-v4l2-display.patch b/recipes/dvsdk/files/dmai-update-v4l2-display.patch
index 8bb77d8473..8bb77d8473 100644
--- a/recipes/dsplink/files/dmai-update-v4l2-display.patch
+++ b/recipes/dvsdk/files/dmai-update-v4l2-display.patch
diff --git a/recipes/dsplink/files/dsplink-128M.patch b/recipes/dvsdk/files/dsplink-128M.patch
index ff5902bf50..ff5902bf50 100644
--- a/recipes/dsplink/files/dsplink-128M.patch
+++ b/recipes/dvsdk/files/dsplink-128M.patch
diff --git a/recipes/dsplink/files/dsplink-add-class-device-create-support.patch b/recipes/dvsdk/files/dsplink-add-class-device-create-support.patch
index b43c3481e1..b43c3481e1 100644
--- a/recipes/dsplink/files/dsplink-add-class-device-create-support.patch
+++ b/recipes/dvsdk/files/dsplink-add-class-device-create-support.patch
diff --git a/recipes/dsplink/files/dsplink-semaphore-27.patch b/recipes/dvsdk/files/dsplink-semaphore-27.patch
index b2f71169fd..b2f71169fd 100644
--- a/recipes/dsplink/files/dsplink-semaphore-27.patch
+++ b/recipes/dvsdk/files/dsplink-semaphore-27.patch
diff --git a/recipes/dvsdk/files/dvsdk-rules/Makefile b/recipes/dvsdk/files/dvsdk-rules/Makefile
new file mode 100644
index 0000000000..edb74e0999
--- /dev/null
+++ b/recipes/dvsdk/files/dvsdk-rules/Makefile
@@ -0,0 +1,339 @@
+include Rules.make
+
+COMPONENTS:=$(DMAI_INSTALL_DIR) $(LINK_INSTALL_DIR) $(XDAIS_INSTALL_DIR) $(CMEM_INSTALL_DIR) $(EDMA3_LLD_INSTALL_DIR) $(FC_INSTALL_DIR) $(CE_INSTALL_DIR) $(XDC_INSTALL_DIR) $(BIOSUTILS_INSTALL_DIR) $(BIOS_INSTALL_DIR) $(DVTB_INSTALL_DIR) $(CODEC_INSTALL_DIR)
+
+REPOSITORIES:=$(addsuffix /packages, $(COMPONENTS))
+
+CHECKLIST:=$(REPOSITORIES) $(CODEGEN_INSTALL_DIR)/bin/cl6x $(MVTOOL_PREFIX)gcc $(LINUXKERNEL_INSTALL_DIR)/Documentation $(DEMO_INSTALL_DIR)/$(PLATFORM) $(PSP_INSTALL_DIR)/docs
+
+.PHONY: all clean everything clobber help cmem cmem_clean dmai dmai_clean demos demos_clean examples examples_clean dvtb dvtb_clean dm355mm dm355mm_clean dsplink dsplink_arm dsplink_dsp dsplink_samples dsplink_clean codecs codecs_clean linux linux_clean psp_examples psp_clean info check install
+
+#==============================================================================
+# Set up platform dependent variables.
+#==============================================================================
+ifeq ($(PLATFORM),dm6446)
+LINUXKERNEL_CONFIG=davinci_dm644x_defconfig
+LINUXSAMPLES_PLATFORM=dm644x
+DSPLINK_CONFIG=--platform=DAVINCI --nodsp=1 --dspcfg_0=DM6446GEMSHMEM --dspos_0=DSPBIOS5XX --gppos=MVL5G --comps=ponslrm
+DSPLINK_MODULE=$(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/DAVINCI/RELEASE/dsplinkk.ko
+DMAI_PLATFORM=dm6446_al
+else
+ifeq ($(PLATFORM),dm6467)
+LINUXKERNEL_CONFIG=davinci_dm6467_defconfig
+LINUXSAMPLES_PLATFORM=dm646x
+DSPLINK_CONFIG=--platform=DAVINCIHD --nodsp=1 --dspcfg_0=DM6467GEMSHMEM --dspos_0=DSPBIOS5XX --gppos=MVL5G --comps=ponslrm
+DSPLINK_MODULE=$(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/DAVINCIHD/RELEASE/dsplinkk.ko
+DMAI_PLATFORM=dm6467_al
+else
+ifeq ($(PLATFORM),dm355)
+LINUXKERNEL_CONFIG=davinci_dm355_defconfig
+LINUXSAMPLES_PLATFORM=dm355
+DMAI_PLATFORM=dm355_al
+else
+ $(error PLATFORM not set correctly: $(PLATFORM))
+endif
+endif
+endif
+
+#==============================================================================
+# The default build target.
+#==============================================================================
+all: check cmem dm355mm dmai demos examples dvtb
+
+#==============================================================================
+# Clean up the targets built by 'make all'.
+#==============================================================================
+clean: cmem_clean dm355mm_clean dmai_clean demos_clean examples_clean dvtb_clean
+
+#==============================================================================
+# Build everything rebuildable.
+#==============================================================================
+everything: check codecs linux dsplink psp_examples all
+
+#==============================================================================
+# Clean up all targets.
+#==============================================================================
+clobber: clean dsplink_clean linux_clean codecs_clean psp_clean
+
+#==============================================================================
+# A help message target.
+#==============================================================================
+help:
+ @echo
+ @echo "Available build targets are:"
+ @echo
+ @echo " check : Make sure Rules.make is set up properly"
+ @echo " info : List versions of DVSDK components"
+ @echo
+ @echo " all : Build the components below"
+ @echo " clean : Remove files generated by the 'all' target"
+ @echo
+ @echo " cmem : Build the CMEM kernel module for $(PLATFORM)"
+ @echo " cmem_clean : Remove generated cmem files."
+ @echo
+ @echo " dmai : Build DMAI for $(PLATFORM)_al"
+ @echo " dmai_clean : Remove generated DMAI files."
+ @echo
+ @echo " demos : Build the DVSDK demos for $(PLATFORM)"
+ @echo " demos_clean : Remove generated DVSDK demo files."
+ @echo
+ @echo " examples : Build examples for $(PLATFORM)"
+ @echo " examples_clean : Build examples for $(PLATFORM)"
+ @echo
+ @echo " dvtb : Build DVTB for $(PLATFORM)"
+ @echo " dvtb_clean : Remove generated DVTB files"
+ @echo
+ @echo " dm355mm : Build the dm355mm kernel module"
+ @echo " dm355mm_clean : Remove generated dm355mm files"
+ @echo
+ @echo "The following targets have to be explicitly built and cleaned:"
+ @echo
+ @echo " everything : Rebuild everything including below targets"
+ @echo " clobber : Remove all generated files"
+ @echo
+ @echo " dsplink : Configure and build DSP Link for $(PLATFORM) ARM and DSP"
+ @echo " dsplink_arm : Configure and build DSP Link for $(PLATFORM) ARM"
+ @echo " dsplink_dsp : Configure and build DSP Link for $(PLATFORM) DSP"
+ @echo " dsplink_samples : Build DSP Link ARM and DSP sample applications for $(PLATFORM)"
+ @echo " dsplink_clean : Remove generated DSP Link files"
+ @echo
+ @echo " codecs : Build codec servers for $(PLATFORM)"
+ @echo " codecs_clean : Remove generated codec server files"
+ @echo
+ @echo " linux : Build Linux kernel uImage for $(PLATFORM)"
+ @echo " linux_clean : Remove generated Linux kernel files"
+ @echo
+ @echo " psp_examples : Build Linux examples for $(PLATFORM)"
+ @echo " psp_clean : Build Linux examples for $(PLATFORM)"
+ @echo
+ @echo " install : Install binaries to $(EXEC_DIR)"
+ @echo
+
+#==============================================================================
+# Target for listing information about the DVSDK components.
+#==============================================================================
+info: check
+ @LINUXKERNEL_INSTALL_DIR="$(LINUXKERNEL_INSTALL_DIR)" CODEGEN_INSTALL_DIR="$(CODEGEN_INSTALL_DIR)" GCC_PREFIX="$(MVTOOL_PREFIX)" XDC_INSTALL_DIR="$(XDC_INSTALL_DIR)" REPOSITORIES="$(REPOSITORIES)" $(DVSDK_INSTALL_DIR)/bin/info.sh
+
+#==============================================================================
+# Target for checking that the Rules.make file is set up properly.
+#==============================================================================
+check:
+ @CHECKLIST="$(CHECKLIST)" $(DVSDK_INSTALL_DIR)/bin/check.sh
+
+#==============================================================================
+# Build the dvsdk demos for the configured platform. Also, an explicit cleanup
+# target is defined.
+#==============================================================================
+demos:
+ $(MAKE) -C $(DEMO_INSTALL_DIR)/$(PLATFORM)
+
+demos_clean:
+ $(MAKE) -C $(DEMO_INSTALL_DIR)/$(PLATFORM) clean
+
+#==============================================================================
+# Build the Digital Video Test Bench for the configured platform. Also, an
+# explicit cleanup target is defined.
+#==============================================================================
+dvtb:
+ $(MAKE) -C $(DVTB_INSTALL_DIR) $(PLATFORM)
+ @echo
+ @echo "dvtb can be found under $(DVTB_INSTALL_DIR)/packages/ti/sdo/dvtb/$(PLATFORM)/bin"
+
+dvtb_clean:
+ $(MAKE) -C $(DVTB_INSTALL_DIR) clean
+
+#==============================================================================
+# Build the Linux kernel. Also, an explicit cleanup target is defined.
+#==============================================================================
+linux:
+ $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) CROSS_COMPILE=$(MVTOOL_PREFIX) $(LINUXKERNEL_CONFIG)
+ $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) CROSS_COMPILE=$(MVTOOL_PREFIX) uImage
+ @echo
+ @echo "Your kernel image can be found at $(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/uImage"
+
+linux_clean:
+ $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) CROSS_COMPILE=$(MVTOOL_PREFIX) clean
+
+#==============================================================================
+# Build the PSP Linux examples. Also, an explicit cleanup target is defined.
+#==============================================================================
+psp_examples:
+ $(MAKE) -C $(PSP_INSTALL_DIR)/examples PLATFORM=$(LINUXSAMPLES_PLATFORM) LINUXKERNEL_INSTALL_DIR=$(LINUXKERNEL_INSTALL_DIR) CROSS_COMPILE=$(MVTOOL_PREFIX)
+ @echo
+ @echo "PSP examples can be found under $(PSP_INSTALL_DIR)/examples/$(LINUXSAMPLES_PLATFORM)"
+
+psp_clean:
+ $(MAKE) -C $(PSP_INSTALL_DIR)/examples PLATFORM=$(LINUXSAMPLES_PLATFORM) LINUXKERNEL_INSTALL_DIR=$(LINUXKERNEL_INSTALL_DIR) clean
+
+#==============================================================================
+# Build the CMEM kernel module for the configured platform, and make sure the
+# kernel_binaries directory is kept in sync. Also, an explicit cleanup target
+# is defined.
+#==============================================================================
+cmem:
+ $(MAKE) -C $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/interface ../../lib/cmem.a470MV
+ $(MAKE) -C $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/module
+ @mkdir -p $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)
+ @cp $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)/
+ @echo
+ @echo "cmemk.ko kernel module can be found under $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)"
+
+cmem_clean:
+ $(MAKE) -C $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/module clean
+ $(MAKE) -C $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/interface clean
+
+#==============================================================================
+# Build the *evaluation* codec servers for the configured platform. Also, an
+# explicit cleanup target is defined.
+#==============================================================================
+codecs:
+ifneq ($(PLATFORM),dm355)
+ $(MAKE) -C $(CODEC_INSTALL_DIR) DVSDK_INSTALL_DIR=$(DVSDK_INSTALL_DIR) BIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR) XDC_INSTALL_DIR=$(XDC_INSTALL_DIR) CE_INSTALL_DIR=$(CE_INSTALL_DIR) FC_INSTALL_DIR=$(FC_INSTALL_DIR) CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) CODECS_INSTALL_DIR=$(CODEC_INSTALL_DIR) BIOSUTILS_INSTALL_DIR=$(BIOSUTILS_INSTALL_DIR) XDAIS_INSTALL_DIR=$(XDAIS_INSTALL_DIR) LINK_INSTALL_DIR=$(LINK_INSTALL_DIR) XDCARGS=\"eval\"
+endif
+
+codecs_clean:
+ifneq ($(PLATFORM),dm355)
+ $(MAKE) -C $(CODEC_INSTALL_DIR) DVSDK_INSTALL_DIR=$(DVSDK_INSTALL_DIR) BIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR) XDC_INSTALL_DIR=$(XDC_INSTALL_DIR) CE_INSTALL_DIR=$(CE_INSTALL_DIR) FC_INSTALL_DIR=$(FC_INSTALL_DIR) CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) CODECS_INSTALL_DIR=$(CODEC_INSTALL_DIR) BIOSUTILS_INSTALL_DIR=$(BIOSUTILS_INSTALL_DIR) XDAIS_INSTALL_DIR=$(XDAIS_INSTALL_DIR) LINK_INSTALL_DIR=$(LINK_INSTALL_DIR) XDCARGS=\"eval\" clean
+endif
+
+#==============================================================================
+# Build the dm355mm kernel module (if the configured platform is dm355). Also,
+# an explicit cleanup target is defined.
+#==============================================================================
+dm355mm:
+ifeq ($(PLATFORM),dm355)
+ $(MAKE) -C $(CODEC_INSTALL_DIR)/dm355mm/module KERNEL_DIR=$(LINUXKERNEL_INSTALL_DIR)
+ @mkdir -p $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)
+ @cp $(CODEC_INSTALL_DIR)/dm355mm/module/dm350mmap.ko $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)/
+ @echo
+ @echo "dm350mmap.ko kernel module can be found under $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)"
+endif
+
+dm355mm_clean:
+ifeq ($(PLATFORM),dm355)
+ $(MAKE) -C $(CODEC_INSTALL_DIR)/dm355mm/module KERNEL_DIR=$(LINUXKERNEL_INSTALL_DIR) clean
+endif
+
+#==============================================================================
+# Build the DVSDK examples for the configured platform. Also, an explicit
+# cleanup target is defined.
+#==============================================================================
+examples:
+ $(MAKE) -C examples/$(PLATFORM)
+
+examples_clean:
+ $(MAKE) -C examples/$(PLATFORM) clean
+
+#==============================================================================
+# Build the Davinci Multimedia Application Interface for the configured
+# platform. Also, an explicit cleanup target is defined.
+#==============================================================================
+dmai:
+ @$(MAKE) -C $(DMAI_INSTALL_DIR) PLATFORM=${DMAI_PLATFORM} \
+ CE_INSTALL_DIR_${DMAI_PLATFORM}=$(CE_INSTALL_DIR) \
+ CODEC_INSTALL_DIR_${DMAI_PLATFORM}=$(CODEC_INSTALL_DIR) \
+ LINK_INSTALL_DIR_${DMAI_PLATFORM}=$(LINK_INSTALL_DIR) \
+ CMEM_INSTALL_DIR_${DMAI_PLATFORM}=$(CMEM_INSTALL_DIR) \
+ FC_INSTALL_DIR_${DMAI_PLATFORM}=$(FC_INSTALL_DIR) \
+ LPM_INSTALL_DIR_${DMAI_PLATFORM}=$(LPM_INSTALL_DIR) \
+ XDAIS_INSTALL_DIR_${DMAI_PLATFORM}=$(XDAIS_INSTALL_DIR) \
+ BIOS_INSTALL_DIR_${DMAI_PLATFORM}=$(BIOS_INSTALL_DIR) \
+ LINUXLIBS_INSTALL_DIR_${DMAI_PLATFORM}=$(LINUXLIBS_INSTALL_DIR)\
+ LINUXKERNEL_INSTALL_DIR_${DMAI_PLATFORM}=$(LINUXKERNEL_INSTALL_DIR) \
+ CROSS_COMPILE_${DMAI_PLATFORM}=$(CSTOOL_PREFIX) \
+ XDC_INSTALL_DIR_${DMAI_PLATFORM}=$(XDC_INSTALL_DIR) \
+ EXEC_DIR_${DMAI_PLATFORM}=$(EXEC_DIR) all
+
+ @echo
+ @echo "DMAI applications can be found under $(DMAI_INSTALL_DIR)/packages/ti/sdo/dmai/apps"
+ @echo "To install them to $(EXEC_DIR) enter $(DMAI_INSTALL_DIR) and execute 'make install'"
+
+dmai_clean:
+ $(MAKE) -C $(DMAI_INSTALL_DIR) PLATFORM=${DMAI_PLATFORM} clean
+
+#==============================================================================
+# Build DSP Link for the configured platform. Also, an explicit cleanup target
+# is defined.
+#==============================================================================
+dsplink: dsplink_arm dsplink_dsp dsplink_samples
+
+dsplink_cfg:
+ifneq ($(PLATFORM),dm355)
+ DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink perl $(LINK_INSTALL_DIR)/packages/dsplink/config/bin/dsplinkcfg.pl $(DSPLINK_CONFIG)
+else
+ $(error DSP Link build is not supported for $(PLATFORM))
+endif
+
+dsplink_arm: dsplink_cfg
+ DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/gpp/src BASE_TOOLCHAIN=$(MVTOOL_DIR) BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR)
+ @mkdir -p $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)
+ @cp $(DSPLINK_MODULE) $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)/
+ @echo
+ @echo "dsplinkk.ko kernel module can be found under $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)"
+
+dsplink_dsp: dsplink_cfg
+ DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/dsp/src BASE_SABIOS=$(BIOS_INSTALL_DIR) XDCTOOLS_DIR=$(XDC_INSTALL_DIR) BASE_CGTOOLS=$(CODEGEN_INSTALL_DIR)
+
+dsplink_samples:
+ DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/gpp/src/samples BASE_TOOLCHAIN=$(MVTOOL_DIR) BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR)
+ DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/dsp/src/samples BASE_SABIOS=$(BIOS_INSTALL_DIR) XDCTOOLS_DIR=$(XDC_INSTALL_DIR) BASE_CGTOOLS=$(CODEGEN_INSTALL_DIR)
+
+dsplink_clean:
+ DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/gpp/src BASE_TOOLCHAIN=$(MVTOOL_DIR) BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR) clean
+ DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/dsp/src BASE_SABIOS=$(BIOS_INSTALL_DIR) XDCTOOLS_DIR=$(XDC_INSTALL_DIR) BASE_CGTOOLS=$(CODEGEN_INSTALL_DIR) clean
+ DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/gpp/src/samples BASE_TOOLCHAIN=$(MVTOOL_DIR) BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR) clean
+ DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/dsp/src/samples BASE_SABIOS=$(BIOS_INSTALL_DIR) XDCTOOLS_DIR=$(XDC_INSTALL_DIR) BASE_CGTOOLS=$(CODEGEN_INSTALL_DIR) clean
+
+#==============================================================================
+# Install the built binaries to the target file system.
+#==============================================================================
+install:
+ @echo
+ @echo Creating $(EXEC_DIR)
+ @mkdir -p $(EXEC_DIR)
+
+ @echo Copying kernel modules to target file system: $(EXEC_DIR)/
+ @install -m 666 $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)/* $(EXEC_DIR)/
+
+ @echo Installing DVSDK demos..
+ $(MAKE) -C $(DEMO_INSTALL_DIR)/$(PLATFORM) install
+
+ @echo Copying examples..
+ @cp -rp examples/$(PLATFORM)/web $(EXEC_DIR)/
+ @cp -p examples/$(PLATFORM)/dvevmdemo $(EXEC_DIR)/
+
+ @echo Installing clips..
+ $(MAKE) -C clips install
+
+ifeq ($(PLATFORM),dm6446)
+ @echo Copying codec servers..
+ @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/encode/encodeCombo.x64P $(EXEC_DIR)/
+ -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/encode/encodeCombo_e.x64P $(EXEC_DIR)/
+ @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/decode/decodeCombo.x64P $(EXEC_DIR)/
+ -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/decode/decodeCombo_e.x64P $(EXEC_DIR)/
+ @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/loopback/loopbackCombo.x64P $(EXEC_DIR)/
+ -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/loopback/loopbackCombo_e.x64P $(EXEC_DIR)/
+ @echo Copying dsplinkk.ko
+ @install -m 666 $(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/DAVINCI/RELEASE/dsplinkk.ko $(EXEC_DIR)/
+endif
+
+ifeq ($(PLATFORM),dm6467)
+ @echo Copying codec servers..
+ @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/encode/encodeCombo.x64P $(EXEC_DIR)/
+ -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/encode/encodeCombo_e.x64P $(EXEC_DIR)/
+ @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/decode/decodeCombo.x64P $(EXEC_DIR)/
+ -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/decode/decodeCombo_e.x64P $(EXEC_DIR)/
+ @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/loopback/loopbackCombo.x64P $(EXEC_DIR)/
+ -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/loopback/loopbackCombo_e.x64P $(EXEC_DIR)/
+ @echo Copying dsplinkk.ko
+ @install -m 666 $(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/DAVINCIHD/RELEASE/dsplinkk.ko $(EXEC_DIR)/
+ @echo Copying mapdmaqhd..
+ @install -m 777 $(DVSDK_INSTALL_DIR)/mapdmaq-hd/mapdmaq-hd $(EXEC_DIR)/
+endif
+
+ifeq ($(PLATFORM),dm355)
+ @echo Copying mapdmaq..
+ @install -m 777 $(DVSDK_INSTALL_DIR)/mapdmaq/mapdmaq $(EXEC_DIR)/
+endif
+
diff --git a/recipes/dvsdk/files/dvsdk-rules/check.sh b/recipes/dvsdk/files/dvsdk-rules/check.sh
new file mode 100755
index 0000000000..8dc4dd4959
--- /dev/null
+++ b/recipes/dvsdk/files/dvsdk-rules/check.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "Checking that components in Rules.make are found:"
+echo
+
+for x in $CHECKLIST
+do
+ if [ ! -e $x ]
+ then
+ echo "WARNING: $x doesn't exist, check your Rules.make.."
+ fi
+done
+
+echo "Done checking! If no warning messages above, all components are found.."
+
+echo
diff --git a/recipes/dvsdk/files/dvsdk-rules/info.sh b/recipes/dvsdk/files/dvsdk-rules/info.sh
new file mode 100755
index 0000000000..59d36149cf
--- /dev/null
+++ b/recipes/dvsdk/files/dvsdk-rules/info.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+echo "Listing information about the DVSDK components:"
+echo
+
+if [ ! -e $XDC_INSTALL_DIR ]
+then
+ echo "Fatal!: XDC tools not found in $XDC_INSTALL_DIR, check Rules.make.."
+ echo "Aborting!"
+ exit
+fi
+
+for x in $REPOSITORIES
+do
+ echo "*******************************************************************************"
+ echo "Listing package information for repository:"
+ echo $x
+ echo
+ XDC_PATH="$XDC_INSTALL_DIR" $XDC_INSTALL_DIR/xs xdc.tools.path -Pr $x
+done
+
+echo "*******************************************************************************"
+if [ -e $LINUXKERNEL_INSTALL_DIR ]
+then
+ echo "Using Linux kernel from:"
+ echo $LINUXKERNEL_INSTALL_DIR
+else
+ echo "WARNING: Linux kernel not found:"
+ echo $LINUXKERNEL_INSTALL_DIR
+fi
+echo
+
+echo "*******************************************************************************"
+echo "TI c6x codegen tool version:"
+echo $CODEGEN_INSTALL_DIR/bin/cl6x
+echo
+if [ -f $CODEGEN_INSTALL_DIR/bin/cl6x ]
+then
+ $CODEGEN_INSTALL_DIR/bin/cl6x -version
+else
+ echo "WARNING: TI codegen not found!"
+ echo
+fi
+
+echo
+echo "*******************************************************************************"
+echo "GCC compiler version:"
+echo "$GCC_PREFIX"gcc
+echo
+if [ -f "$GCC_PREFIX"gcc ]
+then
+ "$GCC_PREFIX"gcc --version
+else
+ echo "WARNING: gcc tool chain not found!"
+ echo
+fi
+
+echo
diff --git a/recipes/dsplink/files/loadmodules-ti-codec-engine-apps.sh b/recipes/dvsdk/files/loadmodules-ti-codec-engine-apps.sh
index 9f9233d12b..9f9233d12b 100755..100644
--- a/recipes/dsplink/files/loadmodules-ti-codec-engine-apps.sh
+++ b/recipes/dvsdk/files/loadmodules-ti-codec-engine-apps.sh
diff --git a/recipes/dsplink/files/loadmodules-ti-dmai-apps.sh b/recipes/dvsdk/files/loadmodules-ti-dmai-apps.sh
index 7120b74483..7120b74483 100755
--- a/recipes/dsplink/files/loadmodules-ti-dmai-apps.sh
+++ b/recipes/dvsdk/files/loadmodules-ti-dmai-apps.sh
diff --git a/recipes/dvsdk/files/loadmodules-ti-dmai-dm355_al.sh b/recipes/dvsdk/files/loadmodules-ti-dmai-dm355_al.sh
new file mode 100755
index 0000000000..ca357e2095
--- /dev/null
+++ b/recipes/dvsdk/files/loadmodules-ti-dmai-dm355_al.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# loadmodules.sh
+#
+# Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation version 2.1 of the License.
+#
+# This program is distributed #as is# WITHOUT ANY WARRANTY of any kind,
+# whether express or implied; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# 12MB
+modprobe cmemk phys_start=0x87400000 phys_end=0x88000000 pools=1x2903040,1x1529856,7x829440,1x524288,1x108680,1x81920,2x8192,6x4096
+
+./mapdmaq
+
+modprobe dm350mmap
+rm -f /dev/dm350mmap
+mknod /dev/dm350mmap c `awk "\\$2==\"dm350mmap\" {print \\$1}" /proc/devices` 0
diff --git a/recipes/dvsdk/files/loadmodules-ti-dmai-dm6446_al.sh b/recipes/dvsdk/files/loadmodules-ti-dmai-dm6446_al.sh
new file mode 100755
index 0000000000..b4a230d590
--- /dev/null
+++ b/recipes/dvsdk/files/loadmodules-ti-dmai-dm6446_al.sh
@@ -0,0 +1,19 @@
+#
+# loadmodules.sh
+#
+# Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation version 2.1 of the License.
+#
+# This program is distributed #as is# WITHOUT ANY WARRANTY of any kind,
+# whether express or implied; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+modprobe cmemk phys_start=0x87800000 phys_end=0x88E00000 pools=20x4096,8x202752,10x131072,2x1048576,1x2097152,10x829440,1x6750000
+modprobe dsplinkk ddr_start=0x8F800000 ddr_size=0x600000
+
+rm -rf /dev/dsplink
+mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0
diff --git a/recipes/dvsdk/files/loadmodules-ti-dmai-o3530_al.sh b/recipes/dvsdk/files/loadmodules-ti-dmai-o3530_al.sh
new file mode 100755
index 0000000000..076af07223
--- /dev/null
+++ b/recipes/dvsdk/files/loadmodules-ti-dmai-o3530_al.sh
@@ -0,0 +1,42 @@
+# loadmodules.sh
+#
+# Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation version 2.1 of the License.
+#
+# This program is distributed #as is# WITHOUT ANY WARRANTY of any kind,
+# whether express or implied; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+#
+# Default Memory Map
+#
+# Start Addr Size Description
+# -------------------------------------------
+# 0x80000000 88 MB Linux
+# 0x85800000 08 MB CMEM
+# 0x86800000 24 MB DDRALGHEAP
+# 0x87800000 6 MB DDR2 (BIOS, Codecs, Applications)
+# 0x87E00000 1 MB DSPLINK (MEM)
+# 0x87F00000 4 KB DSPLINK (RESET)
+# 0x87F01000 1020 KB unused
+
+modprobe cmemk phys_start=0x85800000 phys_end=0x86800000 pools=20x4096,8x131072,4x829440,1x5250000,1x1429440,1x256000
+
+
+# insert DSP/BIOS Link driver
+#
+modprobe dsplinkk
+
+# make /dev/dsplink
+rm -f /dev/dsplink
+mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0
+
+
+# insert Local Power Manager driver
+#
+modprobe lpm_omap3530
+
diff --git a/recipes/dsplink/files/loadmodules-ti-dsplink-apps.sh b/recipes/dvsdk/files/loadmodules-ti-dsplink-apps.sh
index 9cfb19d5c1..9cfb19d5c1 100755..100644
--- a/recipes/dsplink/files/loadmodules-ti-dsplink-apps.sh
+++ b/recipes/dvsdk/files/loadmodules-ti-dsplink-apps.sh
diff --git a/recipes/dsplink/files/lpm-device-create-and-semaphore-include-fix.patch b/recipes/dvsdk/files/lpm-device-create-and-semaphore-include-fix.patch
index a3bc2b14a6..a3bc2b14a6 100644
--- a/recipes/dsplink/files/lpm-device-create-and-semaphore-include-fix.patch
+++ b/recipes/dvsdk/files/lpm-device-create-and-semaphore-include-fix.patch
diff --git a/recipes/dsplink/files/lpm-make-symbol-warnings-fix.patch b/recipes/dvsdk/files/lpm-make-symbol-warnings-fix.patch
index 031a16022f..031a16022f 100644
--- a/recipes/dsplink/files/lpm-make-symbol-warnings-fix.patch
+++ b/recipes/dvsdk/files/lpm-make-symbol-warnings-fix.patch
diff --git a/recipes/dvsdk/files/mapdmaq b/recipes/dvsdk/files/mapdmaq
new file mode 100755
index 0000000000..5c11bc3141
--- /dev/null
+++ b/recipes/dvsdk/files/mapdmaq
Binary files differ
diff --git a/recipes/dsplink/files/sdma-class-device-and-includes-fix.patch b/recipes/dvsdk/files/sdma-class-device-and-includes-fix.patch
index 2dcc7a3b7e..2dcc7a3b7e 100644
--- a/recipes/dsplink/files/sdma-class-device-and-includes-fix.patch
+++ b/recipes/dvsdk/files/sdma-class-device-and-includes-fix.patch
diff --git a/recipes/dsplink/files/unloadmodules-ti-codec-engine-apps.sh b/recipes/dvsdk/files/unloadmodules-ti-codec-engine-apps.sh
index f990d99771..f990d99771 100755..100644
--- a/recipes/dsplink/files/unloadmodules-ti-codec-engine-apps.sh
+++ b/recipes/dvsdk/files/unloadmodules-ti-codec-engine-apps.sh
diff --git a/recipes/dsplink/files/unloadmodules-ti-dmai-apps.sh b/recipes/dvsdk/files/unloadmodules-ti-dmai-apps.sh
index 793d727f39..793d727f39 100755
--- a/recipes/dsplink/files/unloadmodules-ti-dmai-apps.sh
+++ b/recipes/dvsdk/files/unloadmodules-ti-dmai-apps.sh
diff --git a/recipes/dsplink/files/unloadmodules-ti-dsplink-apps.sh b/recipes/dvsdk/files/unloadmodules-ti-dsplink-apps.sh
index 48fa84b03d..48fa84b03d 100755..100644
--- a/recipes/dsplink/files/unloadmodules-ti-dsplink-apps.sh
+++ b/recipes/dvsdk/files/unloadmodules-ti-dsplink-apps.sh
diff --git a/recipes/dsplink/gstreamer-ti/gst-buffsize.diff b/recipes/dvsdk/gstreamer-ti/gst-buffsize.diff
index 2d71286498..2d71286498 100644
--- a/recipes/dsplink/gstreamer-ti/gst-buffsize.diff
+++ b/recipes/dvsdk/gstreamer-ti/gst-buffsize.diff
diff --git a/recipes/dvsdk/gstreamer-ti_svn.bb b/recipes/dvsdk/gstreamer-ti_svn.bb
new file mode 100644
index 0000000000..6eeffd0225
--- /dev/null
+++ b/recipes/dvsdk/gstreamer-ti_svn.bb
@@ -0,0 +1,95 @@
+DESCRIPTION = "Gstreamer plugin for TI Davinci and OMAP processors"
+
+inherit autotools
+
+DEPENDS = "ti-dmai gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly"
+
+# Fetch source from svn repo
+SRCREV = "285"
+SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \
+ "
+
+# Again, no '.' in PWD allowed :(
+PR = "r23"
+PV = "svnr${SRCREV}"
+
+S = "${WORKDIR}/gstreamer_ti/ti_build/ticodecplugin"
+
+installdir = "${datadir}/ti"
+
+META_SDK_PATH ?= "${CROSS_DIR}"
+
+DMAI_INSTALL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai"
+CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine"
+FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools"
+CODEC_INSTALL_DIR_dm355-evm="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-dm355"
+CODEC_INSTALL_DIR_dm6446-evm="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-dm6446"
+CODEC_INSTALL_DIR_omap3evm="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530"
+CODEC_INSTALL_DIR_beagleboard="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530"
+XDC_INSTALL_DIR="${STAGING_DIR}/${BUILD_SYS}/ti-xdctools-native"
+CODEGEN_INSTALL_DIR="${STAGING_DIR}/${BUILD_SYS}/ti-cgt6x-native"
+
+export DMAI_INSTALL_DIR
+export CE_INSTALL_DIR
+export FC_INSTALL_DIR
+export CODEC_INSTALL_DIR
+export XDC_INSTALL_DIR
+export CODEGEN_INSTALL_DIR
+
+XDC_TARGET = gnu.targets.arm.GCArmv5T
+XDC_PLATFORM_dm355-evm = ti.platforms.evmDM355
+XDC_PLATFORM_dm6446-evm = ti.platforms.evmDM6446
+XDC_PLATFORM_omap3evm = ti.platforms.evm3530
+XDC_PLATFORM_beagleboard = ti.platforms.evm3530
+PLATFORM_XDC = ${XDC_PLATFORM}
+
+export XDC_TARGET
+export XDC_PLATFORM
+export PLATFORM_XDC
+
+PLATFORM_dm355-evm = "dm355"
+PLATFORM_dm6446-evm = "dm6446"
+PLATFORM_omap3evm = "omap3530"
+PLATFORM_beagleboard = "omap3530"
+
+export PLATFORM
+
+CROSS_COMPILE=${META_SDK_PATH}/bin/${TARGET_PREFIX}
+CSTOOL_DIR=${META_SDK_PATH}
+MVTOOL_DIR=${META_SDK_PATH}
+export CROSS_COMPILE
+export CSTOOL_DIR
+export MVTOOL_DIR
+
+CPPFLAGS_append = " -DPlatform_${PLATFORM}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_install_prepend () {
+ # install gstreamer demo scripts
+ install -d ${D}/${installdir}/gst
+ cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/shared ${D}/${installdir}/gst
+ cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/${PLATFORM} ${D}/${installdir}/gst
+
+ # default loadmodule script is hard-coded for insmod, change to modprobe
+ sed -i 's/insmod/modprobe/g' ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh
+ sed -i 's/.ko//g' ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh
+ if [ "${PLATFORM}" = "omap3530" ]; then
+ echo "modprobe sdmak" >> ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh
+ fi
+ chmod 0755 ${D}/${installdir}/gst -R
+}
+
+pkg_postinst_gstreamer-ti-demo-script () {
+ ln -sf ${installdir}/codec-combo/* ${installdir}/gst/${PLATFORM}/
+}
+
+PACKAGES += "gstreamer-ti-demo-script"
+FILES_gstreamer-ti-demo-script = "${installdir}/gst/*"
+RDEPENDS_gstreamer-ti-demo-script = "gstreamer-ti"
+
+RDEPENDS_${PN} = "ti-dmai-apps"
+FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
+FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la"
+FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
+
diff --git a/recipes/dvsdk/readme.txt b/recipes/dvsdk/readme.txt
new file mode 100644
index 0000000000..daf7bf6be5
--- /dev/null
+++ b/recipes/dvsdk/readme.txt
@@ -0,0 +1,5 @@
+
+The software needed can be downloaded from:
+* http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/
+* https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm
+
diff --git a/recipes/dvsdk/ti-cgt6x-native_6.0.21.bb b/recipes/dvsdk/ti-cgt6x-native_6.0.21.bb
new file mode 100644
index 0000000000..d980f46c16
--- /dev/null
+++ b/recipes/dvsdk/ti-cgt6x-native_6.0.21.bb
@@ -0,0 +1,20 @@
+require ti-cgt6x.inc
+inherit native
+
+SRC_URI = "http://install.source.dir.com/ti_cgt_c6000_6.0.21_setup_linux_x86.bin"
+
+BINFILE="ti_cgt_c6000_6.0.21_setup_linux_x86.bin"
+
+S = "${WORKDIR}/cgt"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "6021"
+PR = "r3"
+
+do_stage() {
+ install -d ${STAGING_DIR_NATIVE}/${PN}
+ cp -pPrf ${S}/* ${STAGING_DIR_NATIVE}/${PN}/
+}
+
+AUTOTOOLS_NATIVE_STAGE_INSTALL="1"
+
diff --git a/recipes/dvsdk/ti-cgt6x-sdk_6.0.21.bb b/recipes/dvsdk/ti-cgt6x-sdk_6.0.21.bb
new file mode 100644
index 0000000000..f0ad126ac4
--- /dev/null
+++ b/recipes/dvsdk/ti-cgt6x-sdk_6.0.21.bb
@@ -0,0 +1,26 @@
+require ti-cgt6x.inc
+inherit sdk
+
+SRC_URI = "http://install.source.dir.com/ti_cgt_c6000_6.0.21_setup_linux_x86.bin"
+
+S = "${WORKDIR}/cgt"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "6021"
+PR = "r3"
+
+do_install() {
+ install -d ${D}/${prefix}/dvsdk/cg6x_6_0_21
+ cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/cg6x_6_0_21
+
+ # Creates rules.make file
+ mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules
+ echo "# Where the TI C6x codegen tool is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/cgt6x.Rules.make
+ echo "CODEGEN_INSTALL_DIR=${prefix}/dvsdk/cg6x_6_0_21" >> ${STAGING_DIR_HOST}/ti-sdk-rules/cgt6x.Rules.make
+ echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/cgt6x.Rules.make
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+FILES_${PN} = "${prefix}/dvsdk/cg6x_6_0_21"
+INSANE_SKIP_${PN} = True
+
diff --git a/recipes/dvsdk/ti-cgt6x.inc b/recipes/dvsdk/ti-cgt6x.inc
new file mode 100644
index 0000000000..35a9252cfe
--- /dev/null
+++ b/recipes/dvsdk/ti-cgt6x.inc
@@ -0,0 +1,42 @@
+DESCRIPTION = "Code Generation Tools for TI DaVinci and OMAP"
+
+# This file defines function used for extracting .bin file
+
+python do_unpack () {
+ bb.build.exec_func('base_do_unpack', d)
+ bb.build.exec_func('ti_bin_do_unpack', d)
+}
+
+python ti_bin_do_unpack() {
+
+ import os
+
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+
+ binfile = bb.data.getVar('BINFILE', localdata)
+
+ # Change to the working directory
+ save_cwd = os.getcwd()
+ workdir = bb.data.getVar('WORKDIR', localdata)
+ workdir = bb.data.expand(workdir, localdata)
+ os.chdir(workdir)
+
+ # Make the InstallJammer binary executable so we can run it
+ os.chmod(binfile, 0755)
+
+ # Run the InstallJammer binary and accept the EULA
+ filename = "HOME=%s ./%s" % (workdir, binfile)
+ f = os.popen(filename,'w')
+ print >>f, "Y\n"
+ print >>f, "qY\n"
+ print >>f, "%s/cgt\n" % workdir
+ print >>f, " \n"
+ print >>f, " \n"
+
+ f.close()
+
+ # Return to the previous directory
+ os.chdir(save_cwd)
+}
+
diff --git a/recipes/dvsdk/ti-cmem-module_2.23.1.bb b/recipes/dvsdk/ti-cmem-module_2.23.1.bb
new file mode 100644
index 0000000000..f02383d980
--- /dev/null
+++ b/recipes/dvsdk/ti-cmem-module_2.23.1.bb
@@ -0,0 +1,67 @@
+DESCRIPTION = "CMEM module for TI ARM/DSP processors"
+inherit module
+
+# compile and run time dependencies
+DEPENDS = "virtual/kernel perl-native"
+RDEPENDS = "update-modules"
+
+# Download codec_engine_2_23_01.tar.gz from
+# https://www-a.ti.com/downloads/sds_support/targetcontent/CE/ce_2_23/index.html
+
+SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz"
+
+# Set the source directory
+S = "${WORKDIR}/codec_engine_2_23_01"
+
+#This is a kernel module, don't set PR directly
+MACHINE_KERNEL_PR_append = "a"
+PV = "2231"
+
+do_compile() {
+ # TODO :: KERNEL_CC, etc need replacing with user CC
+ # TODO :: Need to understand why OBJDUMP is required for kernel module
+ # Unset these since LDFLAGS gets picked up and used incorrectly.... need
+ # investigation
+
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
+ make \
+ LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+ MVTOOL_PREFIX="${TARGET_PREFIX}" \
+ UCTOOL_PREFIX="${TARGET_PREFIX}" \
+ clean debug release
+}
+
+do_install () {
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ install -m 0755 ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem/apps
+ make \
+ LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+ MVTOOL_PREFIX="${TARGET_PREFIX}" \
+ UCTOOL_PREFIX="${TARGET_PREFIX}" \
+ EXEC_DIR="${D}${datadir}/ti/ti-cmem-apps" \
+ install
+}
+
+pkg_postinst () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm () {
+ update-modules || true
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko"
+PACKAGES += " ti-cmem-apps"
+FILES_ti-cmem-apps = "${datadir}/ti/ti-cmem-apps/*"
+INSANE_SKIP_ti-cmem-apps = True
+
+
diff --git a/recipes/dvsdk/ti-cmem-module_2.23.bb b/recipes/dvsdk/ti-cmem-module_2.23.bb
new file mode 100644
index 0000000000..60324fbc30
--- /dev/null
+++ b/recipes/dvsdk/ti-cmem-module_2.23.bb
@@ -0,0 +1,51 @@
+DESCRIPTION = "CMEM module for TI ARM/DSP processors"
+inherit module
+
+# compile and run time dependencies
+DEPENDS = "virtual/kernel perl-native"
+RDEPENDS = "update-modules"
+
+SRC_URI = "http://install.source.dir.com/codec_engine_2_23.tar.gz"
+
+# Set the source directory
+S = "${WORKDIR}/codec_engine_2_23"
+
+#This is a kernel module, don't set PR directly
+MACHINE_KERNEL_PR_append = "a"
+PV = "223"
+
+do_compile() {
+ # TODO :: KERNEL_CC, etc need replacing with user CC
+ # TODO :: Need to understand why OBJDUMP is required for kernel module
+ # Unset these since LDFLAGS gets picked up and used incorrectly.... need
+ # investigation
+
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
+ make \
+ LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+ MVTOOL_PREFIX="${TARGET_PREFIX}" \
+ UCTOOL_PREFIX="${TARGET_PREFIX}" \
+ clean debug release
+}
+
+do_install () {
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ install -m 0755 ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+}
+
+pkg_postinst () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm () {
+ update-modules || true
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko"
+
diff --git a/recipes/dvsdk/ti-codec-combo-dm355-sdk_1.13.bb b/recipes/dvsdk/ti-codec-combo-dm355-sdk_1.13.bb
new file mode 100644
index 0000000000..05952d2a6a
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-combo-dm355-sdk_1.13.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "DM355 Codec Combo 1.13"
+
+inherit sdk
+require ti-codec-combo-dm355.inc
+
+SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/codecs/dm355_codecs_setuplinux_1_13_000.bin\
+ file://dm355mm_1_30.patch;patch=1 \
+ "
+
+S = "${WORKDIR}/dm355_codecs_1_13_000"
+BINFILE="dm355_codecs_setuplinux_1_13_000.bin"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "113"
+PR = "r16"
+
+do_compile() {
+ echo "Do nothing"
+}
+
+do_install() {
+ install -d ${D}/${prefix}/dvsdk/dm355_codecs_1_13_000
+ cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/dm355_codecs_1_13_000
+
+ # Creates rules.make file
+ mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules
+ echo "# Where the codec servers are installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make
+ echo "CODEC_INSTALL_DIR=${prefix}/dvsdk/dm355_codecs_1_13_000" >> ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} = True
+FILES_${PN} = "${prefix}/dvsdk/dm355_codecs_1_13_000/*"
+
diff --git a/recipes/dvsdk/ti-codec-combo-dm355.inc b/recipes/dvsdk/ti-codec-combo-dm355.inc
new file mode 100644
index 0000000000..e975793082
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-combo-dm355.inc
@@ -0,0 +1,38 @@
+# This file defines function used for extracting .bin file
+
+python do_unpack () {
+ bb.build.exec_func('base_do_unpack', d)
+ bb.build.exec_func('ti_bin_do_unpack', d)
+}
+
+python ti_bin_do_unpack() {
+
+ import os
+
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+
+ binfile = bb.data.getVar('BINFILE', localdata)
+
+ # Change to the working directory
+ save_cwd = os.getcwd()
+ workdir = bb.data.getVar('WORKDIR', localdata)
+ workdir = bb.data.expand(workdir, localdata)
+ os.chdir(workdir)
+
+ # Make the InstallJammer binary executable so we can run it
+ os.chmod(binfile, 0755)
+
+ # Run the InstallJammer binary and accept the EULA
+ filename = "HOME=%s ./%s" % (workdir, binfile)
+ f = os.popen(filename,'w')
+ print >>f, "Y\n"
+ print >>f, "Y\n"
+ print >>f, " qY\n"
+ print >>f, "%s\n" % workdir
+ f.close()
+
+ # Return to the previous directory
+ os.chdir(save_cwd)
+}
+
diff --git a/recipes/dvsdk/ti-codec-combo-dm355_1.13.bb b/recipes/dvsdk/ti-codec-combo-dm355_1.13.bb
new file mode 100644
index 0000000000..cfc1c9005a
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-combo-dm355_1.13.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "DM355 Codec Combo 1.13"
+
+require ti-codec-combo-dm355.inc
+SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/codecs/dm355_codecs_setuplinux_1_13_000.bin \
+ file://mapdmaq \
+ "
+
+S = "${WORKDIR}/dm355_codecs_1_13_000"
+BINFILE="dm355_codecs_setuplinux_1_13_000.bin"
+installdir = "${datadir}/ti"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "113"
+PR = "r15"
+
+do_compile() {
+ echo "Do nothing"
+}
+
+do_install () {
+ # install mapdmaq on target
+ install -d ${D}/${installdir}/codec-combo
+ install -m 0755 ${WORKDIR}/mapdmaq ${D}/${installdir}/codec-combo
+}
+
+do_stage() {
+ install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}
+ cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} = True
+FILES_${PN} = "${installdir}/codec-combo/mapdmaq"
+
diff --git a/recipes/dvsdk/ti-codec-combo-dm6446-sdk_2.05.bb b/recipes/dvsdk/ti-codec-combo-dm6446-sdk_2.05.bb
new file mode 100644
index 0000000000..f02d49a048
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-combo-dm6446-sdk_2.05.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "DM6446 Codec Combo 2.05"
+inherit sdk
+
+# Should be replaced with real http URL, but for now create codec combo tar from DVSDK installation.
+SRC_URI = "ftp://install.source.dir.com/dm6446_dvsdk_combos_2_05.tar.gz"
+
+S = "${WORKDIR}/dm6446_dvsdk_combos_2_05"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "205"
+PR = "r10"
+
+# DM6446 combo has Makefile. We don't want to rebuild anything here.
+do_compile() {
+ echo "do nothing"
+}
+
+do_install() {
+ install -d ${D}/${prefix}/dvsdk/dm6446_dvsdk_combos_2_05
+ cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/dm6446_dvsdk_combos_2_05
+
+ # Creates rules.make file
+ mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules
+ echo "# Where the codec servers are installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make
+ echo "CODEC_INSTALL_DIR=${prefix}/dvsdk/dm6446_dvsdk_combos_2_05" >> ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} = True
+FILES_${PN} = "${prefix}/dvsdk/dm6446_dvsdk_combos_2_05/*"
+
diff --git a/recipes/dvsdk/ti-codec-combo-dm6446_2.05.bb b/recipes/dvsdk/ti-codec-combo-dm6446_2.05.bb
new file mode 100644
index 0000000000..04f946bc19
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-combo-dm6446_2.05.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "DM6446 Codec Combo 2.05"
+
+# Should be replaced with real http URL, but for now create codec combo tar from DVSDK installation.
+SRC_URI = "http://install.source.dir.com/dm6446_dvsdk_combos_2_05.tar.gz"
+
+S = "${WORKDIR}/dm6446_dvsdk_combos_2_05"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "205"
+PR = "r11"
+
+installdir = "${datadir}/ti"
+do_compile() {
+ echo "do nothing"
+}
+
+do_install () {
+ install -d ${D}/${installdir}/codec-combo
+ cd ${S}
+ for file in `find . -name *.x64P`; do
+ cp ${file} ${D}/${installdir}/codec-combo
+ done
+}
+
+do_stage() {
+ install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}
+ cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+FILES_${PN} = "/${installdir}/codec-combo/*"
+
diff --git a/recipes/dvsdk/ti-codec-combo-omap3530-sdk_3.16.1.bb b/recipes/dvsdk/ti-codec-combo-omap3530-sdk_3.16.1.bb
new file mode 100644
index 0000000000..966e568af9
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-combo-omap3530-sdk_3.16.1.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "OMAP3530 Codec Combo 3.16.01"
+require ti-codec-combo-omap3530.inc
+
+inherit sdk
+
+SRC_URI = "http://software-dl.ti.com/sdo/sdo_apps_public_sw/omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa-3_16_01-Linux-x86.bin"
+
+# Specify names of the InstallJammer binary file and the tarball it extracts
+BINFILE = "omap3530_dvsdk_combos_tspa-3_16_01-Linux-x86.bin"
+TARFILE = "omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa_3_16_01.tar.gz"
+
+S = "${WORKDIR}/omap3530_dvsdk_combos_tspa_3_16_01"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "316"
+PR = "r10"
+
+do_compile () {
+ echo "No nothing"
+}
+
+do_install() {
+ install -d ${D}/${prefix}/dvsdk/omap3530_dvsdk_combos_3_16_01
+ cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/omap3530_dvsdk_combos_3_16_01
+
+ # Creates rules.make file
+ mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules
+ echo "# Where the codec servers are installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make
+ echo "CODEC_INSTALL_DIR=${prefix}/dvsdk/omap3530_dvsdk_combos_3_16_01" >> ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+FILES_${PN} = "${prefix}/dvsdk/omap3530_dvsdk_combos_3_16_01/*"
+INSANE_SKIP_${PN} = True
+
diff --git a/recipes/dvsdk/ti-codec-combo-omap3530.inc b/recipes/dvsdk/ti-codec-combo-omap3530.inc
new file mode 100644
index 0000000000..a884549622
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-combo-omap3530.inc
@@ -0,0 +1,46 @@
+# This file defines function used for unpacking the .bin file downloaded over
+# the http and display EULA.
+# BINFILE - name of the install jammer .bin file
+# TARFILE - name of the tar file inside the install jammer
+
+python do_unpack () {
+ bb.build.exec_func('base_do_unpack', d)
+ bb.build.exec_func('ti_bin_do_unpack', d)
+}
+
+python ti_bin_do_unpack() {
+
+ import os
+
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+
+ binfile = bb.data.getVar('BINFILE', localdata)
+ tarfile = bb.data.getVar('TARFILE', localdata)
+
+ # Change to the working directory
+ save_cwd = os.getcwd()
+ workdir = bb.data.getVar('WORKDIR', localdata)
+ workdir = bb.data.expand(workdir, localdata)
+ os.chdir(workdir)
+
+ # Make the InstallJammer binary executable so we can run it
+ os.chmod(binfile, 0755)
+
+ # Run the InstallJammer binary and accept the EULA
+ filename = "HOME=%s ./%s" % (workdir, binfile)
+ f = os.popen(filename,'w')
+ print >>f, "Y\n"
+ print >>f, " qY\n"
+ print >>f, "%s\n" % workdir
+ f.close()
+
+ # Expand the tarball that was created
+ cmd = 'tar xz --no-same-owner -f %s -C %s' % (tarfile, workdir)
+ ret = os.system(cmd)
+
+ # Return to the previous directory
+ os.chdir(save_cwd)
+ return ret == 0
+}
+
diff --git a/recipes/dvsdk/ti-codec-combo-omap3530_3.16.1.bb b/recipes/dvsdk/ti-codec-combo-omap3530_3.16.1.bb
new file mode 100644
index 0000000000..76ebb46818
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-combo-omap3530_3.16.1.bb
@@ -0,0 +1,57 @@
+DESCRIPTION = "OMAP3530 TSPA codec combo 3.16.01"
+
+require ti-codec-combo-omap3530.inc
+
+SRC_URI = "http://software-dl.ti.com/sdo/sdo_apps_public_sw/omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa-3_16_01-Linux-x86.bin"
+
+# Specify names of the InstallJammer binary file and the tarball it extracts
+BINFILE = "omap3530_dvsdk_combos_tspa-3_16_01-Linux-x86.bin"
+TARFILE = "omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa_3_16_01.tar.gz"
+
+S = "${WORKDIR}/omap3530_dvsdk_combos_tspa_3_16_01"
+
+DEPENDS="ti-codec-engine"
+
+CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine"
+FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools"
+LINK_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools"
+CMEM_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools"
+LPM_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools"
+BIOS_INSTALL_DIR="${STAGING_DIR_NATIVE}/ti-dspbios-native"
+CODEGEN_INSTALL_DIR="${STAGING_DIR_NATIVE}/ti-cgt6x-native"
+XDC_INSTALL_DIR="${STAGING_DIR_NATIVE}/ti-xdctools-native"
+
+export ${CODEGEN_INSTALL_DIR}
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "3161"
+PR = "r12"
+installdir = "${datadir}/ti"
+
+do_compile() {
+ make CE_INSTALL_DIR=${CE_INSTALL_DIR} \
+ FC_INSTALL_DIR=${FC_INSTALL_DIR} \
+ LINK_INSTALL_DIR=${LINK_INSTALL_DIR} \
+ CMEM_INSTALL_DIR=${CMEM_INSTALL_DIR} \
+ LPM_INSTALL_DIR=${LPM_INSTALL_DIR} \
+ BIOS_INSTALL_DIR=${BIOS_INSTALL_DIR} \
+ CODEGEN_INSTALL_DIR=${CODEGEN_INSTALL_DIR} \
+ XDC_INSTALL_DIR=${XDC_INSTALL_DIR} \
+}
+
+do_install () {
+ install -d ${D}/${installdir}/codec-combo
+ cd ${S}
+ for file in `find . -name *.x64P`; do
+ cp ${file} ${D}/${installdir}/codec-combo
+ done
+}
+
+do_stage() {
+ install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}
+ cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+FILES_${PN} = "${installdir}/codec-combo/*"
+
diff --git a/recipes/dsplink/ti-codec-combos_3.16.bb b/recipes/dvsdk/ti-codec-combos_3.16.bb
index 6bab35a0d5..6bab35a0d5 100644
--- a/recipes/dsplink/ti-codec-combos_3.16.bb
+++ b/recipes/dvsdk/ti-codec-combos_3.16.bb
diff --git a/recipes/dvsdk/ti-codec-engine-sdk_2.23.1.bb b/recipes/dvsdk/ti-codec-engine-sdk_2.23.1.bb
new file mode 100644
index 0000000000..4f9f6b9bf1
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-engine-sdk_2.23.1.bb
@@ -0,0 +1,50 @@
+DESCRIPTION = "Codec Engine 2.23.01 for TI ARM/DSP processors"
+inherit sdk
+
+# tconf from xdctools dislikes '.' in pwd :/
+PR = "r17"
+PV = "2231"
+
+SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz "
+
+# Set the source directory
+S = "${WORKDIR}/codec_engine_2_23_01"
+
+do_compile () {
+ echo "nothing to build"
+}
+
+do_install() {
+ # Update cmem and sdma Rules.make to point correct location of main
+ # Rules.make.
+ sed -i -e s:Rules.make:../Rules.make:g \
+ ${S}/cetools/packages/ti/sdo/linuxutils/cmem/Rules.make
+ sed -i -e s:Rules.make:../Rules.make:g \
+ ${S}/cetools/packages/ti/sdo/linuxutils/sdma/Rules.make
+
+ install -d ${D}/${prefix}/dvsdk/codec_engine_2_23_01
+ cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/codec_engine_2_23_01
+
+ # Creates rules.make file
+
+ mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules
+ echo "# Where the Codec Engine package is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "CE_INSTALL_DIR=${prefix}/dvsdk/codec_engine_2_23_01" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "# Where the XDAIS package is installed." >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "XDAIS_INSTALL_DIR=\$(CE_INSTALL_DIR)/cetools" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "# Where the DSP Link package is installed." >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "LINK_INSTALL_DIR=\$(CE_INSTALL_DIR)/cetools" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "# Where the CMEM (contiguous memory allocator) package is installed." >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "CMEM_INSTALL_DIR=\$(CE_INSTALL_DIR)/cetools" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "# Where Framework Components product is installed." >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+ echo "FC_INSTALL_DIR=\$(CE_INSTALL_DIR)/cetools" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make
+}
+
+FILES_${PN} = "${prefix}/dvsdk/codec_engine_2_23_01"
+INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} = True
+
diff --git a/recipes/dsplink/ti-codec-engine_2.21.bb b/recipes/dvsdk/ti-codec-engine_2.21.bb
index d0cd18e8e9..d0cd18e8e9 100644
--- a/recipes/dsplink/ti-codec-engine_2.21.bb
+++ b/recipes/dvsdk/ti-codec-engine_2.21.bb
diff --git a/recipes/dvsdk/ti-codec-engine_2.23.1.bb b/recipes/dvsdk/ti-codec-engine_2.23.1.bb
new file mode 100644
index 0000000000..a553476427
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-engine_2.23.1.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "Codec Engine 2.23.01 for TI ARM/DSP processors"
+
+# compile time dependencies
+DEPENDS_dm6446-evm += "ti-xdctools-native ti-cgt6x-native ti-dspbios-native"
+DEPENDS_omap3evm += "ti-cgt6x-native ti-dspbios-native ti-xdctools-native"
+DEPENDS_beagleboard += "ti-cgt6x-native ti-dspbios-native ti-xdctools-native"
+DEPENDS_dm355-evm += "ti-xdctools-native"
+
+# tconf from xdctools dislikes '.' in pwd :/
+PR = "r16"
+PV = "2231"
+
+SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz "
+
+# Set the source directory
+S = "${WORKDIR}/codec_engine_2_23_01"
+
+do_compile () {
+ echo "! Do not rebuild for now !"
+}
+
+# stage tree - other packages may need this
+do_stage() {
+ install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}
+ cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+INHIBIT_PACKAGE_STRIP = "1"
+
diff --git a/recipes/dvsdk/ti-dm355mm-module_1.13.bb b/recipes/dvsdk/ti-dm355mm-module_1.13.bb
new file mode 100644
index 0000000000..0a2c6af14f
--- /dev/null
+++ b/recipes/dvsdk/ti-dm355mm-module_1.13.bb
@@ -0,0 +1,54 @@
+DESCRIPTION = "User space DMA module for DM355"
+
+require ti-codec-combo-dm355.inc
+inherit module
+# compile and run time dependencies
+DEPENDS = "virtual/kernel perl-native"
+RDEPENDS = "update-modules"
+
+SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/codecs/dm355_codecs_setuplinux_1_13_000.bin \
+ file://dm355mm_1_30.patch;patch=1 \
+ "
+S = "${WORKDIR}/dm355_codecs_1_13_000"
+BINFILE="dm355_codecs_setuplinux_1_13_000.bin"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "113"
+#This is a kernel module, don't set PR directly
+MACHINE_KERNEL_PR_append = "a"
+
+do_configure() {
+ find ${S} -name "*.ko" -exec rm {} \; || true
+ sed -i -e s:include:#include:g ${S}/dm355mm/Rules.make
+}
+
+do_compile() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+ cd ${S}/dm355mm/module
+ make \
+ LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+ MVTOOL_PREFIX="${TARGET_PREFIX}";
+}
+
+do_install () {
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ install -m 0755 ${S}/dm355mm/module/dm350mmap.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+}
+
+pkg_postinst () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm () {
+ update-modules || true
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/dm350mmap.ko"
+
+
diff --git a/recipes/dvsdk/ti-dmai-sdk_svn.bb b/recipes/dvsdk/ti-dmai-sdk_svn.bb
new file mode 100644
index 0000000000..e4c9ad0c89
--- /dev/null
+++ b/recipes/dvsdk/ti-dmai-sdk_svn.bb
@@ -0,0 +1,21 @@
+inherit sdk
+require ti-dmai.inc
+
+do_compile () {
+ echo "do nothing"
+}
+
+do_install() {
+ install -d ${D}/${prefix}/dvsdk/dmai_${PV}
+ cp -pPrf ${S}/dmai/* ${D}/${prefix}/dvsdk/dmai_${PV}
+
+ # Creates rules.make file
+ mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules
+ echo "# Where DMAI package is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/dmai.Rules.make
+ echo "DMAI_INSTALL_DIR=${prefix}/dvsdk/dmai_${PV}" >> ${STAGING_DIR_HOST}/ti-sdk-rules/dmai.Rules.make
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+FILES_${PN} = "${prefix}/dvsdk/dmai_${PV}/*"
+INSANE_SKIP_${PN} = True
+
diff --git a/recipes/dvsdk/ti-dmai.inc b/recipes/dvsdk/ti-dmai.inc
new file mode 100644
index 0000000000..d90a906cf9
--- /dev/null
+++ b/recipes/dvsdk/ti-dmai.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "DMAI for TI ARM/DSP processors"
+
+# NOTE: Use Brijesh' DMAI development branch. The URL *must* be updated once
+# we have stable DMAI 2.x on gforge.
+SRCREV = "195"
+SRC_URI = "svn://gforge.ti.com/svn/dmai/branches;module=BRIJESH_GIT_031809;proto=https;user=anonymous;pswd='' \
+ file://loadmodules-ti-dmai-dm355_al.sh \
+ file://loadmodules-ti-dmai-dm6446_al.sh \
+ file://loadmodules-ti-dmai-o3530_al.sh \
+ "
+
+S = "${WORKDIR}/BRIJESH_GIT_031809/davinci_multimedia_application_interface"
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "svnr${SRCREV}"
+PR = "r27"
+
diff --git a/recipes/dvsdk/ti-dmai_svn.bb b/recipes/dvsdk/ti-dmai_svn.bb
new file mode 100644
index 0000000000..e089595086
--- /dev/null
+++ b/recipes/dvsdk/ti-dmai_svn.bb
@@ -0,0 +1,105 @@
+require ti-dmai.inc
+
+inherit module-base
+
+# compile time dependencies
+DEPENDS_omap3evm += "alsa-lib ti-codec-engine ti-xdctools-native ti-dspbios-native ti-cgt6x-native ti-codec-combo-omap3530 virtual/kernel"
+DEPENDS_beagleboard += "alsa-lib ti-codec-engine ti-xdctools-native ti-dspbios-native ti-cgt6x-native ti-codec-combo-omap3530 virtual/kernel "
+DEPENDS_dm6446-evm += "alsa-lib ti-codec-engine ti-xdctools-native ti-dspbios-native ti-cgt6x-native ti-codec-combo-dm6446 virtual/kernel "
+DEPENDS_dm355-evm += "alsa-lib ti-codec-engine ti-xdctools-native ti-codec-combo-dm355 virtual/kernel"
+
+installdir = "${datadir}/ti"
+
+# Define DMAI build time variables
+TARGET ?= "all"
+TARGET_omap3evm ?= "o3530_al"
+TARGET_beagleboard ?= "o3530_al"
+TARGET_dm355-evm ?= "dm355_al"
+TARGET_dm6446-evm ?= "dm6446_al"
+
+CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine"
+CODEC_dm355-evm ="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-dm355"
+CODEC_omap3evm ="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530"
+CODEC_beagleboard ="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530"
+CODEC_dm6446-evm ="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-dm6446"
+FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools"
+DSPBIOS_DIR="${STAGING_DIR_NATIVE}/ti-dspbios-native"
+CGT6x_DIR="${STAGING_DIR_NATIVE}/ti-cgt6x-native"
+XDCTOOLS_DIR="${STAGING_DIR_NATIVE}/ti-xdctools-native"
+USER_XDC_PATH="${CE_INSTALL_DIR}/examples"
+
+PARALLEL_MAKE = ""
+
+do_configure () {
+ # If kernel version is greater than 2.6.28 replace mach/omapfb.h with
+ # linux/omapfb.h
+
+ if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 28 ] ; then
+ sed -i -e s:mach/omapfb:linux/omapfb:g ${S}/dmai/packages/ti/sdo/dmai/linux/Display_fbdev.c
+ fi
+}
+
+
+do_compile () {
+
+ cd ${S}
+ make XDC_INSTALL_DIR="${XDCTOOLS_DIR}" clean
+
+ # TODO: Figure out how to pass the alsa include location, currently
+ # LINUXLIBS_INSTALL_DIR is hard-coded for armv5te
+ make CE_INSTALL_DIR="${CE_INSTALL_DIR}" \
+ CODEC_INSTALL_DIR="${CODEC}" \
+ FC_INSTALL_DIR="${FC_INSTALL_DIR}" \
+ LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+ XDC_INSTALL_DIR="${XDCTOOLS_DIR}" \
+ CODEGEN_INSTALL_DIR="${CGT6x_DIR}" \
+ BIOS_INSTALL_DIR="${DSPBIOS_DIR}"\
+ LINUXLIBS_INSTALL_DIR="${STAGING_DIR_HOST}/usr" \
+ USER_XDC_PATH="${USER_XDC_PATH}" \
+ CROSS_COMPILE="${CROSS_DIR}/bin/${TARGET_PREFIX}" \
+ VERBOSE="true" \
+ XDAIS_INSTALL_DIR="${CE_INSTALL_DIR}/cetools" \
+ LINK_INSTALL_DIR="${CE_INSTALL_DIR}/cetools/packages/dsplink" \
+ CMEM_INSTALL_DIR="${CE_INSTALL_DIR}/cetools" \
+ LPM_INSTALL_DIR="${CE_INSTALL_DIR}/cetools" \
+ PLATFORM="${TARGET}"
+}
+
+do_install () {
+ # install dmai apps on target
+ install -d ${D}/dmai-apps
+ cd ${S}/dmai
+ make PLATFORM="${TARGET}" EXEC_DIR=${D}/${installdir}/dmai-apps install
+ install -m 0755 ${WORKDIR}/loadmodules-ti-dmai-${TARGET}.sh ${D}/${installdir}/dmai-apps/loadmodule.sh
+
+ cd ${S}/tests
+ install -d ${D}/dmai-tests
+ make PLATFORM="${TARGET}" EXEC_DIR=${D}/${installdir}/dmai-tests install
+ install -m 0755 ${WORKDIR}/loadmodules-ti-dmai-${TARGET}.sh ${D}/${installdir}/dmai-tests/loadmodule.sh
+}
+
+pkg_postinst_ti-dmai-apps () {
+ ln -sf ${installdir}/codec-combo/* ${installdir}/dmai-apps/
+}
+
+do_stage () {
+ install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai
+ cp -pPrf ${S}/dmai/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai
+}
+
+# Disable QA check untils we figure out how to pass LDFLAGS in build
+INSANE_SKIP_${PN} = True
+INSANE_SKIP_ti-dmai-apps = True
+INSANE_SKIP_ti-dmai-tests = True
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+INHIBIT_PACKAGE_STRIP = "1"
+PACKAGES += "ti-dmai-apps ti-dmai-tests"
+FILES_ti-dmai-apps = "${installdir}/dmai-apps/*"
+FILES_ti-dmai-tests = "${installdir}/dmai-tests/*"
+
+# run time dependencies
+RDEPENDS_ti-dmai-apps_dm355-evm += "ti-dm355mm-module ti-cmem-module ti-codec-combo-dm355"
+RDEPENDS_ti-dmai-apps_dm6446-evm += "ti-cmem-module ti-dsplink-module ti-codec-combo-dm6446"
+RDEPENDS_ti-dmai-apps_omap3evm += "ti-cmem-module ti-dsplink-module ti-codec-combo-omap3530 ti-lpm-module ti-sdma-module"
+RDEPENDS_ti-dmai-apps_beagleboard += "ti-cmem-module ti-dsplink-module ti-codec-combo-omap3530 ti-lpm-module ti-sdma-module"
diff --git a/recipes/dvsdk/ti-dspbios-native_5.33.02.bb b/recipes/dvsdk/ti-dspbios-native_5.33.02.bb
new file mode 100644
index 0000000000..e017a0366c
--- /dev/null
+++ b/recipes/dvsdk/ti-dspbios-native_5.33.02.bb
@@ -0,0 +1,19 @@
+require ti-dspbios.inc
+inherit native
+
+SRC_URI = "http://install.source.dir.com/bios_setuplinux_5_33_02.bin"
+BINFILE="bios_setuplinux_5_33_02.bin"
+
+S = "${WORKDIR}/bios_5_33_02"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "533"
+PR = "r13"
+
+do_stage() {
+ install -d ${STAGING_DIR_NATIVE}/${PN}
+ cp -pPrf ${S}/* ${STAGING_DIR_NATIVE}/${PN}/
+}
+
+AUTOTOOLS_NATIVE_STAGE_INSTALL="1"
+
diff --git a/recipes/dvsdk/ti-dspbios-sdk_5.33.02.bb b/recipes/dvsdk/ti-dspbios-sdk_5.33.02.bb
new file mode 100644
index 0000000000..da3657eed3
--- /dev/null
+++ b/recipes/dvsdk/ti-dspbios-sdk_5.33.02.bb
@@ -0,0 +1,26 @@
+require ti-dspbios.inc
+inherit sdk
+
+SRC_URI = "http://install.source.dir.com/bios_setuplinux_5_33_02.bin"
+BINFILE="bios_setuplinux_5_33_02.bin"
+
+S = "${WORKDIR}/bios_5_33_02"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "533"
+PR = "r13"
+
+do_install() {
+ install -d ${D}/${prefix}/dvsdk/bios_5_33_02
+ cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/bios_5_33_02
+
+ # Creates rules.make file
+ mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules
+ echo "# Where DSP/BIOS is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/bios.Rules.make
+ echo "BIOS_INSTALL_DIR=${prefix}/dvsdk/bios_5_33_02" >> ${STAGING_DIR_HOST}/ti-sdk-rules/bios.Rules.make
+}
+
+FILES_${PN} ="${prefix}/dvsdk/bios_5_33_02/*"
+INSANE_SKIP_${PN} = True
+INHIBIT_PACKAGE_STRIP = "1"
+
diff --git a/recipes/dvsdk/ti-dspbios.inc b/recipes/dvsdk/ti-dspbios.inc
new file mode 100644
index 0000000000..9e79216554
--- /dev/null
+++ b/recipes/dvsdk/ti-dspbios.inc
@@ -0,0 +1,40 @@
+DESCRIPTION = "TI DSP/BIOS for Davinci and OMAP processor"
+
+# This file defines function used for extracting .bin file
+
+python do_unpack () {
+ bb.build.exec_func('base_do_unpack', d)
+ bb.build.exec_func('ti_bin_do_unpack', d)
+}
+
+python ti_bin_do_unpack() {
+
+ import os
+
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+
+ binfile = bb.data.getVar('BINFILE', localdata)
+
+ # Change to the working directory
+ save_cwd = os.getcwd()
+ workdir = bb.data.getVar('WORKDIR', localdata)
+ workdir = bb.data.expand(workdir, localdata)
+ os.chdir(workdir)
+
+ # Make the InstallJammer binary executable so we can run it
+ os.chmod(binfile, 0755)
+
+ # Run the InstallJammer binary and accept the EULA
+ filename = "HOME=%s ./%s" % (workdir, binfile)
+ f = os.popen(filename,'w')
+ print >>f, "Y\n"
+ print >>f, " qY\n"
+ print >>f, "%s\n" % workdir
+ print >>f, "Y\n"
+ f.close()
+
+ # Return to the previous directory
+ os.chdir(save_cwd)
+}
+
diff --git a/recipes/dvsdk/ti-dsplink-module_1.61.3.bb b/recipes/dvsdk/ti-dsplink-module_1.61.3.bb
new file mode 100644
index 0000000000..492305f5c5
--- /dev/null
+++ b/recipes/dvsdk/ti-dsplink-module_1.61.3.bb
@@ -0,0 +1,156 @@
+DESCRIPTION = "DSPLINK 1.61.3 module for TI ARM/DSP processors"
+inherit module
+
+# compile and run time dependencies
+DEPENDS += " virtual/kernel perl-native ti-dspbios-native ti-cgt6x-native update-modules"
+
+# tconf from xdctools dislikes '.' in pwd :/
+PV = "1613"
+#This is a kernel module, don't set PR directly
+MACHINE_KERNEL_PR_append = "a"
+
+installdir = "${datadir}/ti"
+SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz \
+ file://loadmodules-ti-dsplink-apps.sh \
+ file://unloadmodules-ti-dsplink-apps.sh"
+
+# Set the source directory
+S = "${WORKDIR}/codec_engine_2_23_01"
+
+# DSPLINK - Config Variable for different platform
+DSPLINKPLATFORM ?= "DAVINCI"
+DSPLINKPLATFORM_dm6446-evm ?= "DAVINCI"
+
+DSPLINKDSPCFG ?= "DM6446GEMSHMEM"
+DSPLINKDSPCFG_dm6446-evm ?= "DM6446GEMSHMEM"
+
+DSPLINKGPPOS ?= "MVL5G"
+DSPLINKGPPOS_dm6446-evm ?= "MVL5G"
+
+export DSPLINK="${S}/cetools/packages/dsplink"
+STAGING_TI_DSPBIOS_DIR="${STAGING_DIR_NATIVE}/ti-dspbios-native"
+STAGING_TI_CGT6x_DIR="${STAGING_DIR_NATIVE}/ti-cgt6x-native"
+
+do_compile() {
+
+ # Run perl script to create appropriate makefiles (v1.60 and up)
+ (
+ cd ${DSPLINK}
+ perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 \
+ --dspcfg_0=${DSPLINKDSPCFG} --dspos_0=DSPBIOS5XX \
+ --gppos=${DSPLINKGPPOS} --comps=ponslrm
+ )
+
+ # dsplink makefile is hard-coded to use kbuild only on OMAP3530.
+ # we are forcing to use kbuild on other platforms.
+ sed -i 's/OMAP3530/${DSPLINKPLATFORM}/g' ${DSPLINK}/gpp/src/Makefile
+
+ # TODO :: KERNEL_CC, etc need replacing with user CC
+ # TODO :: Need to understand why OBJDUMP is required for kernel module
+ # Unset these since LDFLAGS gets picked up and used incorrectly.... need
+ # investigation
+
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+ # Build the gpp user space library
+ cd ${DSPLINK}/gpp/src/api
+ make \
+ CROSS_COMPILE="${TARGET_PREFIX}" \
+ CC="${KERNEL_CC}" \
+ AR="${KERNEL_AR}" \
+ LD="${KERNEL_LD}" \
+ COMPILER="${KERNEL_CC}" \
+ ARCHIVER="${KERNEL_AR}" \
+ KERNEL_DIR="${STAGING_KERNEL_DIR}" \
+ clean all
+
+ # Build the gpp kernel space (debug and release)
+ cd ${DSPLINK}/gpp/src
+ make \
+ OBJDUMP="${TARGET_PREFIX}objdump" \
+ CROSS_COMPILE="${TARGET_PREFIX}" \
+ CC="${KERNEL_CC}" \
+ AR="${KERNEL_AR}" \
+ LD="${KERNEL_LD}" \
+ COMPILER="${KERNEL_CC}" \
+ ARCHIVER="${KERNEL_AR}" \
+ KERNEL_DIR="${STAGING_KERNEL_DIR}" \
+ clean all
+
+ # Build the gpp samples
+ cd ${DSPLINK}/gpp/src/samples
+ make \
+ BASE_TOOLCHAIN="${CROSS_DIR}" \
+ BASE_CGTOOLS="${BASE_TOOLCHAIN}/bin" \
+ OSINC_PLATFORM="${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include" \
+ OSINC_TARGET="${BASE_TOOLCHAIN}/target/usr/include" \
+ CROSS_COMPILE="${TARGET_PREFIX}" \
+ CC="${KERNEL_CC}" \
+ AR="${KERNEL_AR}" \
+ LD="${KERNEL_LD}" \
+ COMPILER="${KERNEL_CC}" \
+ LINKER="${KERNEL_CC}" \
+ ARCHIVER="${KERNEL_AR}" \
+ KERNEL_DIR="${STAGING_KERNEL_DIR}" \
+ clean all
+
+ # Build the dsp library (debug and release)
+ cd ${DSPLINK}/dsp/src
+ make \
+ BASE_CGTOOLS="${STAGING_TI_CGT6x_DIR}" \
+ BASE_SABIOS="${STAGING_TI_DSPBIOS_DIR}" \
+ clean all
+
+ # Build the dsp samples (debug and release)
+ cd ${DSPLINK}/dsp/src/samples
+ make \
+ BASE_CGTOOLS="${STAGING_TI_CGT6x_DIR}" \
+ BASE_SABIOS="${STAGING_TI_DSPBIOS_DIR}" \
+ clean all
+}
+
+do_install () {
+ # DSPLINK driver - kernel module
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ install -m 0755 ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/
+
+ # DSPLINK library
+ install -d ${D}/${installdir}/dsplink/libs
+ install -m 0755 ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/dsplink.lib ${D}/${installdir}/dsplink/libs
+
+ # DSPLINK sample apps
+ install -d ${D}/${installdir}/dsplink/apps
+
+ cp ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/*gpp ${D}/${installdir}/dsplink/apps
+
+ for i in $(find ${DSPLINK}/dsp/BUILD/ -name "*.out") ; do
+ cp ${i} ${D}/${installdir}/dsplink/apps
+ done
+
+ # DSPLINK test app module un/load scripts
+ install ${WORKDIR}/loadmodules-ti-dsplink-apps.sh ${D}/${installdir}/dsplink/apps
+ install ${WORKDIR}/unloadmodules-ti-dsplink-apps.sh ${D}/${installdir}/dsplink/apps
+}
+
+pkg_postrm () {
+ update-modules || true
+}
+
+pkg_postinst () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+
+PACKAGES += " ti-dsplink-apps"
+FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*"
+FILES_ti-dsplink-apps = "${installdir}/dsplink/*"
+
+# Disable QA check untils we figure out how to pass LDFLAGS in build
+INSANE_SKIP_${PN} = True
+INSANE_SKIP_ti-dsplink-apps = True
+
diff --git a/recipes/dvsdk/ti-lpm-module_2.23.1.bb b/recipes/dvsdk/ti-lpm-module_2.23.1.bb
new file mode 100644
index 0000000000..8684fa1f97
--- /dev/null
+++ b/recipes/dvsdk/ti-lpm-module_2.23.1.bb
@@ -0,0 +1,63 @@
+DESCRIPTION = "LPM module for TI OMAP3 processors"
+
+inherit module
+# compile and run time dependencies
+DEPENDS = " virtual/kernel perl-native ti-dsplink-module"
+
+PV = "2231"
+#This is a kernel module, don't set PR directly
+MACHINE_KERNEL_PR_append = "a"
+
+
+SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz "
+
+# Set the source directory
+S = "${WORKDIR}/codec_engine_2_23_01"
+
+export DSPLINK="${S}/cetools/packages/dsplink"
+
+LPMDSPPOWERSOC ?= "omap3530"
+LPMDSPPOWERSOC_omap3evm ?= "omap3530"
+LPMDSPPOWERSOC_beagleboard ?= "omap3530"
+
+do_compile () {
+ # TODO :: KERNEL_CC, etc need replacing with user CC
+ # TODO :: Need to understand why OBJDUMP is required for kernel module
+ # Unset these since LDFLAGS gets picked up and used incorrectly.... need
+ # investigation
+
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+ cd ${S}/cetools/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm
+ make \
+ DSPLINK_REPO="${DSPLINK}/.." \
+ LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+ MVTOOL_PREFIX="${TARGET_PREFIX}" \
+ clean default
+}
+
+do_install () {
+
+ # LPM/CMEM/SDMA drivers - kernel modules
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ install -m 0755 ${S}/cetools/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm/*.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+}
+
+
+pkg_postinst () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm () {
+ update-modules || true
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+
+FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko"
+RDEPENDS += " ti-dsplink-module"
+
diff --git a/recipes/dsplink/ti-paths.inc b/recipes/dvsdk/ti-paths.inc
index 2f1a0e5005..20a453f3de 100644
--- a/recipes/dsplink/ti-paths.inc
+++ b/recipes/dvsdk/ti-paths.inc
@@ -9,7 +9,7 @@
TITOOLSDIR ?= "/OE/TI"
# Path under TITOOLSDIR where dspbios is unpacked
TIBIOSDIR ?= "bios_5_33_02"
-TIXDCTOOLSDIR ?= "${TITOOLSDIR}/xdctools_3_10_03"
+TIXDCTOOLSDIR ?= "xdctools_3_10_03"
# Path under TITOOLSDIR where the dsp toolchain is unpacked
TICGTOOLSDIR ?= "cg6x_6_0_16"
@@ -20,7 +20,7 @@ TICGTOOLSDIR ?= "cg6x_6_0_16"
# export some more variable to point to external TI tools
# information is duplicated between the js and make based tools
export CE_INSTALL_DIR=${S}
-export XDC_INSTALL_DIR=${TIXDCTOOLSDIR}
+export XDC_INSTALL_DIR=${TITOOLSDIR}/${TIXDCTOOLSDIR}
export BIOS_INSTALL_DIR=${TITOOLSDIR}/${TIBIOSDIR}
# needed for configuro:
export CGTOOLS_V5T="${CROSS_DIR}"
diff --git a/recipes/dvsdk/ti-rules-make-sdk.bb b/recipes/dvsdk/ti-rules-make-sdk.bb
new file mode 100644
index 0000000000..e1890bf606
--- /dev/null
+++ b/recipes/dvsdk/ti-rules-make-sdk.bb
@@ -0,0 +1,63 @@
+DESCRIPTION = "This package creates Rules.make file and copies top label Makefile for rebuilding dvsdk components."
+
+inherit sdk
+
+PR="r7"
+
+FILES=${@os.path.dirname(bb.data.getVar('FILE',d,1))}/files/dvsdk-rules
+
+DEPENDS_dm355-evm = "ti-xdctools-sdk ti-codec-engine-sdk ti-codec-combo-dm355-sdk ti-dmai-sdk"
+DEPENDS_dm6446-evm = "ti-xdctools-sdk ti-codec-engine-sdk ti-codec-combo-dm6446-sdk ti-dmai-sdk ti-cgt6x-sdk ti-dspbios-sdk"
+DEPENDS_omap3evm = "ti-xdctools-sdk ti-codec-engine-sdk ti-codec-combo-omap3530-sdk ti-dmai-sdk ti-cgt6x-sdk ti-dspbios-sdk"
+DEPENDS_beagleboard = "ti-xdctools-sdk ti-codec-engine-sdk ti-codec-combo-omap3530-sdk ti-dmai-sdk ti-cgt6x-sdk ti-dspbios-sdk"
+
+
+PLATFORM_dm355-evm = "dm355"
+PLATFORM_dm6446-evm = "dm6446"
+PLATFORM_omap3evm = "omap3530"
+PLATFORM_dm6467-evm = "dm6467"
+PLATFORM_beagleboard = "omap3530"
+
+do_install () {
+ mkdir -p ${D}/${prefix}/dvsdk/
+
+ # Create Rules.make file by concatinating pkg Rules.make files.
+ echo "# Define target platform." > ${D}/${prefix}/dvsdk/Rules.make
+ echo "PLATFORM=${PLATFORM}" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "# The installation directory of the DVSDK." >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "DVSDK_INSTALL_DIR=${prefix}/dvsdk" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "# For backwards compatibility" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "DVEVM_INSTALL_DIR=\$(DVSDK_INSTALL_DIR)" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "" >> ${D}/${prefix}/dvsdk/Rules.make
+
+ for file in `ls -1 ${STAGING_DIR_HOST}/ti-sdk-rules` ; do
+ cat ${STAGING_DIR_HOST}/ti-sdk-rules/${file} >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "" >> ${D}/${prefix}/dvsdk/Rules.make
+ done
+
+ echo "# The directory that points to your kernel source directory." >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "LINUXKERNEL_INSTALL_DIR=${prefix}/${TARGET_SYS}/usr/src/kernel" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "# Where temporary Linux headers and libs are installed." >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "LINUXLIBS_INSTALL_DIR=${prefix}/${TARGET_SYS}/usr" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "# The prefix to be added before the GNU compiler tools (optionally including # path), i.e. \"arm_v5t_le-\" or \"/opt/bin/arm_v5t_le-\"." >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "CSTOOL_DIR=${SDK_PATH}" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "CSTOOL_PREFIX=\$(CSTOOL_DIR)/bin/arm-none-linux-gnueabi-" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "MVTOOL_DIR=\$(CSTOOL_DIR)" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "MVTOOL_PREFIX=\$(CSTOOL_PREFIX)" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "# Where to copy the resulting executables" >> ${D}/${prefix}/dvsdk/Rules.make
+ echo "EXEC_DIR=\$(HOME)/install/\$(PLATFORM)" >> ${D}/${prefix}/dvsdk/Rules.make
+
+ # copy Makefile and other scripts needed by Makefile
+ mkdir -p ${D}/${prefix}/dvsdk/bin
+ cp ${FILES}/Makefile ${D}/${prefix}/dvsdk/
+ cp ${FILES}/info.sh ${D}/${prefix}/dvsdk/bin
+ cp ${FILES}/check.sh ${D}/${prefix}/dvsdk/bin
+}
+
+FILES_${PN} = "${prefix}/dvsdk/*"
diff --git a/recipes/dvsdk/ti-sdma-module_2.23.1.bb b/recipes/dvsdk/ti-sdma-module_2.23.1.bb
new file mode 100644
index 0000000000..4c104a0c10
--- /dev/null
+++ b/recipes/dvsdk/ti-sdma-module_2.23.1.bb
@@ -0,0 +1,53 @@
+DESCRIPTION = "SDMA module for TI OMAP3 processors"
+
+inherit module
+# compile and run time dependencies
+DEPENDS = "virtual/kernel perl-native"
+
+PV = "2231"
+#This is a kernel module, don't set PR directly
+MACHINE_KERNEL_PR_append = "a"
+
+SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz "
+
+# Set the source directory
+S = "${WORKDIR}/codec_engine_2_23_01"
+
+do_compile() {
+ # SDMA - Build the sdma module
+ # TODO :: KERNEL_CC, etc need replacing with user CC
+ # TODO :: Need to understand why OBJDUMP is required for kernel module
+ # Unset these since LDFLAGS gets picked up and used incorrectly.... need
+ # investigation
+
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/sdma
+ make \
+ LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+ MVTOOL_PREFIX="${TARGET_PREFIX}" \
+ UCTOOL_PREFIX="${TARGET_PREFIX}" \
+ clean debug release
+}
+
+do_install () {
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ install -m 0755 ${S}/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+}
+
+pkg_postinst () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm () {
+ update-modules || true
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+
+FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdmak.ko"
+
diff --git a/recipes/dvsdk/ti-xdctools-native_3.10.03.bb b/recipes/dvsdk/ti-xdctools-native_3.10.03.bb
new file mode 100644
index 0000000000..c37170ad7d
--- /dev/null
+++ b/recipes/dvsdk/ti-xdctools-native_3.10.03.bb
@@ -0,0 +1,19 @@
+inherit native
+require ti-xdctools.inc
+
+SRC_URI = "http://install.source.dir.com/xdctools_setuplinux_3_10_03.bin"
+BINFILE="xdctools_setuplinux_3_10_03.bin"
+
+S = "${WORKDIR}/xdctools_3_10_03"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "310"
+PR = "r16"
+
+do_stage() {
+ install -d ${STAGING_DIR_NATIVE}/${PN}
+ cp -pPrf ${S}/* ${STAGING_DIR_NATIVE}/${PN}
+}
+
+AUTOTOOLS_NATIVE_STAGE_INSTALL="1"
+
diff --git a/recipes/dvsdk/ti-xdctools-sdk_3.10.03.bb b/recipes/dvsdk/ti-xdctools-sdk_3.10.03.bb
new file mode 100644
index 0000000000..43ce1d0a20
--- /dev/null
+++ b/recipes/dvsdk/ti-xdctools-sdk_3.10.03.bb
@@ -0,0 +1,25 @@
+inherit sdk
+require ti-xdctools.inc
+
+SRC_URI = "http://install.source.dir.com/xdctools_setuplinux_3_10_03.bin"
+BINFILE="xdctools_setuplinux_3_10_03.bin"
+
+S = "${WORKDIR}/xdctools_3_10_03"
+
+# Yes, the xdc stuff still breaks with a '.' in PWD
+PV = "310"
+PR = "r16"
+
+do_install() {
+ install -d ${D}/${prefix}/dvsdk/xdctools_3_10_03
+ cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/xdctools_3_10_03
+
+ # Creates rules.make file
+ mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules
+ echo "# Where the RTSC tools package is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/xdc.Rules.make
+ echo "XDC_INSTALL_DIR=${prefix}/dvsdk/xdctools_3_10_03" >> ${STAGING_DIR_HOST}/ti-sdk-rules/xdc.Rules.make
+}
+
+FILES_${PN} = "${prefix}/dvsdk/xdctools_3_10_03"
+INSANE_SKIP_${PN} = True
+INHIBIT_PACKAGE_STRIP = "1"
diff --git a/recipes/dvsdk/ti-xdctools.inc b/recipes/dvsdk/ti-xdctools.inc
new file mode 100644
index 0000000000..9dbd35f24c
--- /dev/null
+++ b/recipes/dvsdk/ti-xdctools.inc
@@ -0,0 +1,40 @@
+DESCRIPTION = "TI XDC tool"
+
+# This file defines function used for extracting .bin file
+
+python do_unpack () {
+ bb.build.exec_func('base_do_unpack', d)
+ bb.build.exec_func('ti_bin_do_unpack', d)
+}
+
+python ti_bin_do_unpack() {
+
+ import os
+
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+
+ binfile = bb.data.getVar('BINFILE', localdata)
+
+ # Change to the working directory
+ save_cwd = os.getcwd()
+ workdir = bb.data.getVar('WORKDIR', localdata)
+ workdir = bb.data.expand(workdir, localdata)
+ os.chdir(workdir)
+
+ # Make the InstallJammer binary executable so we can run it
+ os.chmod(binfile, 0755)
+
+ # Run the InstallJammer binary and accept the EULA
+ filename = "HOME=%s ./%s" % (workdir, binfile)
+ f = os.popen(filename,'w')
+ print >>f, "Y\n"
+ print >>f, " qY\n"
+ print >>f, "%s\n" % workdir
+ print >>f, "Y\n"
+ f.close()
+
+ # Return to the previous directory
+ os.chdir(save_cwd)
+}
+
diff --git a/recipes/e17/bubble-keyboard_svn.bb b/recipes/e17/bubble-keyboard_svn.bb
new file mode 100644
index 0000000000..c47c8fb12d
--- /dev/null
+++ b/recipes/e17/bubble-keyboard_svn.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "Simple dialpad keyboard"
+SECTION = "x11"
+LICENSE = "GPLv2"
+DEPENDS = "ecore evas edje libfakekey"
+PV = "0.1.4+svnr${SRCREV}"
+PR = "r0"
+
+SRC_URI = "svn://svn.om.vptt.ch/trunk/;proto=http;module=bubble-keyboard"
+S = "${WORKDIR}/bubble-keyboard"
+
+inherit autotools pkgconfig
diff --git a/recipes/e17/e-wm_svn.bb b/recipes/e17/e-wm_svn.bb
index a1adc22bf1..7eac09618b 100644
--- a/recipes/e17/e-wm_svn.bb
+++ b/recipes/e17/e-wm_svn.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "The Enlightenment Window Manager Version 17"
DEPENDS = "eet evas ecore edje efreet edbus"
LICENSE = "MIT BSD"
SRCNAME = "e"
-PV = "0.16.999.050+svnr${SRCREV}"
+PV = "0.16.999.060+svnr${SRCREV}"
PR = "r6"
inherit e update-alternatives
@@ -53,11 +53,10 @@ RDEPENDS_${PN} += "\
"
# Uclibc build don't have 'glibc-utils'
-# I suspect the workaround below breaks eglibc, though. Koen - 20081125
-RDEPENDS_${PN}_append_linux = " glibc-utils "
-RDEPENDS_${PN}_append_linux-gnueabi = " glibc-utils "
-RDEPENDS_${PN}_append_linux-uclibc = " uclibc-utils "
-RDEPENDS_${PN}_append_linux-uclibcgnueabi = " uclibc-utils "
+RDEPENDS_${PN}_append_libc-glibc = " glibc-utils "
+
+# The systray module used to be external, but is part of e-wm now
+RREPLACES_${PN} = "systray"
PACKAGES =+ "\
${PN}-config-default \
diff --git a/recipes/e17/essential-dialer_svn.bb b/recipes/e17/essential-dialer_svn.bb
index e0c81293e9..bd16282b41 100644
--- a/recipes/e17/essential-dialer_svn.bb
+++ b/recipes/e17/essential-dialer_svn.bb
@@ -2,8 +2,7 @@ DESCRIPTION = "Simple Dialer based on Elementary and FSO"
SECTION = "x11"
LICENSE = "GPLv2"
DEPENDS = "ecore edbus elementary libefso"
-PV = "0.0.0+svnr${SRCREV}"
-PR = "r2"
+PV = "0.1.0.0+svnr${SRCREV}"
SRC_URI = "svn://svn.om.vptt.ch/trunk/;proto=http;module=essential-dialer"
S = "${WORKDIR}/essential-dialer"
diff --git a/recipes/e17/expedite_svn.bb b/recipes/e17/expedite_svn.bb
index 1337487623..c4dfa5afed 100644
--- a/recipes/e17/expedite_svn.bb
+++ b/recipes/e17/expedite_svn.bb
@@ -1,9 +1,9 @@
DESCRIPTION = "Expedite is a comprehensive benchmarking suite for Evas"
DEPENDS = "eet evas"
-RDEPENDS = "libevas-engine-buffer libevas-engine-fb libevas-engine-software-generic libevas-engine-software-x11 libevas-loader-png"
+RDEPENDS = "evas-engine-buffer evas-engine-fb evas-engine-software-generic evas-engine-software-x11 evas-loader-png"
LICENSE = "MIT BSD"
PV = "0.6.0+svnr${SRCREV}"
-PR = "r0"
+PR = "r1"
inherit e
diff --git a/recipes/e17/exquisite_svn.bb b/recipes/e17/exquisite_svn.bb
index ac4c6b57d4..b6b6441107 100644
--- a/recipes/e17/exquisite_svn.bb
+++ b/recipes/e17/exquisite_svn.bb
@@ -2,10 +2,10 @@ DESCRIPTION = "A psplash replacement for display"
LICENSE = "MIT BSD"
DEPENDS = "eet evas ecore embryo edje"
PV = "0.0.1+svnr${SRCREV}"
-PR = "r8"
+PR = "r9"
RDEPENDS = "initscripts"
RRECOMMENDS_${PN} = "exquisite-themes"
-RCONFLICTS_${PN} = "psplash virtual/psplash"
+RCONFLICTS_${PN} = "psplash virtual-psplash"
SRCNAME = "exquisite"
diff --git a/recipes/e17/gridpad_svn.bb b/recipes/e17/gridpad_svn.bb
new file mode 100644
index 0000000000..40dfa11da5
--- /dev/null
+++ b/recipes/e17/gridpad_svn.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "Gridpad handstroke recognition"
+SECTION = "x11"
+LICENSE = "GPLv2"
+DEPENDS = "ecore evas edje libfakekey"
+PV = "2.0+svnr${SRCREV}"
+PR = "r0"
+
+SRC_URI = "svn://svn.om.vptt.ch/trunk/;proto=http;module=GridPad"
+S = "${WORKDIR}/GridPad"
+
+inherit autotools pkgconfig
diff --git a/recipes/e17/intuition_svn.bb b/recipes/e17/intuition_svn.bb
new file mode 100644
index 0000000000..d40dae9f43
--- /dev/null
+++ b/recipes/e17/intuition_svn.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "Intuition a prototype context dependent mobile search engine"
+SECTION = "x11"
+LICENSE = "GPLv2"
+DEPENDS = "elementary sqlite"
+PV = "0.2.0+svnr${SRCREV}"
+PR = "r0"
+
+SRC_URI = "svn://svn.om.vptt.ch/trunk/;proto=http;module=intuition"
+S = "${WORKDIR}/intuition"
+
+inherit autotools pkgconfig
diff --git a/recipes/e17/systray_svn.bb b/recipes/e17/systray_svn.bb
deleted file mode 100644
index 3c0a8c7e71..0000000000
--- a/recipes/e17/systray_svn.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-LICENSE = "MIT"
-PV = "0.0.1+svnr${SRCREV}"
-
-require e-module.inc
-
-
-
-
diff --git a/recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.35.bb b/recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.35.bb
index 9d0afa864b..5f94c08dd4 100644
--- a/recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.35.bb
+++ b/recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.35.bb
@@ -2,5 +2,4 @@ SECTION = "base"
require e2fsprogs-libs_${PV}.bb
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/e2fsprogs-libs-${PV}', '${FILE_DIRNAME}/e2fsprogs-libs', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
diff --git a/recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.41.2.bb b/recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.41.2.bb
index 3db9e02f28..2632db485d 100644
--- a/recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.41.2.bb
+++ b/recipes/e2fsprogs-libs/e2fsprogs-libs-native_1.41.2.bb
@@ -2,7 +2,6 @@ SECTION = "base"
require e2fsprogs-libs_${PV}.bb
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/e2fsprogs-libs-${PV}', '${FILE_DIRNAME}/e2fsprogs-libs', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
DEPENDS = "gettext-native"
diff --git a/recipes/e2fsprogs-libs/e2fsprogs-libs.inc b/recipes/e2fsprogs-libs/e2fsprogs-libs.inc
index 9efa6d1d70..5b82c11ca1 100644
--- a/recipes/e2fsprogs-libs/e2fsprogs-libs.inc
+++ b/recipes/e2fsprogs-libs/e2fsprogs-libs.inc
@@ -12,6 +12,16 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/e2fsprogs/e2fsprogs-libs-${PV}.tar.gz \
S = "${WORKDIR}/e2fsprogs-libs-${PV}"
FILES_e2fsprogs-libs-dev_append = " ${datadir}/et ${datadir}/ss"
+FILES_${PN} = "${bindir}"
+
+python populate_packages_prepend () {
+ e2fs_libdir = bb.data.expand('${libdir}', d)
+ e2fs_libdir_dbg = bb.data.expand('${libdir}/.debug', d)
+ do_split_packages(d, e2fs_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'e2fsprogs-libs %s development package', extra_depends='${PN}-dev', allow_links=True)
+ do_split_packages(d, e2fs_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'e2fsprogs-libs %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, e2fs_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'e2fsprogs-libs %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, e2fs_libdir, '^lib(.*)\.so\.*', 'lib%s', 'e2fsprogs-libs %s library', extra_depends='', allow_links=True)
+}
do_stage () {
for i in libcom_err libss libuuid libblkid; do
diff --git a/recipes/e2fsprogs-libs/e2fsprogs-libs_1.41.5.bb b/recipes/e2fsprogs-libs/e2fsprogs-libs_1.41.5.bb
new file mode 100644
index 0000000000..25a6490c7c
--- /dev/null
+++ b/recipes/e2fsprogs-libs/e2fsprogs-libs_1.41.5.bb
@@ -0,0 +1,14 @@
+require e2fsprogs-libs.inc
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/e2fsprogs/e2fsprogs-libs-${PV}.tar.gz \
+ file://mkinstalldirs.patch;patch=1 \
+ "
+
+DEPENDS = "gettext-native"
+
+EXTRA_OECONF=" --enable-elf-shlibs "
+
+do_compile_prepend () {
+ find ./ -print|xargs chmod u=rwX
+ ( cd util; ${BUILD_CC} subst.c -o subst )
+}
diff --git a/recipes/e2fsprogs-libs/e2fsprogs-libs-1.41.2/mkinstalldirs.patch b/recipes/e2fsprogs-libs/files/mkinstalldirs.patch
index a32140eb93..a32140eb93 100644
--- a/recipes/e2fsprogs-libs/e2fsprogs-libs-1.41.2/mkinstalldirs.patch
+++ b/recipes/e2fsprogs-libs/files/mkinstalldirs.patch
diff --git a/recipes/e2fsprogs/e2fsprogs-native_1.38.bb b/recipes/e2fsprogs/e2fsprogs-native_1.38.bb
index af49b0d7dd..cef0aa41e8 100644
--- a/recipes/e2fsprogs/e2fsprogs-native_1.38.bb
+++ b/recipes/e2fsprogs/e2fsprogs-native_1.38.bb
@@ -11,10 +11,10 @@ SRC_URI += "file://no-hardlinks.patch;patch=1 \
EXTRA_OECONF = ""
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/e2fsprogs-${PV}', '${FILE_DIRNAME}/e2fsprogs', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
DEPENDS = ""
do_stage () {
oe_runmake install
+ install ${S}/lib/et/compile_et ${STAGING_BINDIR_NATIVE}
}
diff --git a/recipes/e2fsprogs/e2fsprogs-native_1.41.2.bb b/recipes/e2fsprogs/e2fsprogs-native_1.41.2.bb
index f2c3898dbe..4ff399b10f 100644
--- a/recipes/e2fsprogs/e2fsprogs-native_1.41.2.bb
+++ b/recipes/e2fsprogs/e2fsprogs-native_1.41.2.bb
@@ -2,15 +2,18 @@ SECTION = "base"
require e2fsprogs.inc
inherit native
-PR = "r1"
+PR = "r2"
DEFAULT_PREFERENCE = "-1"
EXTRA_OECONF = ""
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/e2fsprogs-${PV}', '${FILE_DIRNAME}/e2fsprogs', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
DEPENDS = ""
do_stage () {
- oe_runmake install
+ oe_runmake install
+ install -d ${STAGING_BINDIR_NATIVE}/
+ for b in ${e2miscbins}; do
+ install -m 0755 misc/$b ${STAGING_BINDIR_NATIVE}/ || die "failed to install $b"
+ done
}
diff --git a/recipes/e2fsprogs/e2fsprogs-native_1.41.5.bb b/recipes/e2fsprogs/e2fsprogs-native_1.41.5.bb
new file mode 100644
index 0000000000..295136328e
--- /dev/null
+++ b/recipes/e2fsprogs/e2fsprogs-native_1.41.5.bb
@@ -0,0 +1,18 @@
+SECTION = "base"
+require e2fsprogs.inc
+inherit native
+
+SRC_URI += "file://mkinstalldirs.patch;patch=1"
+
+EXTRA_OECONF = ""
+
+PACKAGES = ""
+DEPENDS = ""
+
+do_stage () {
+ autotools_stage_all
+ install -d ${STAGING_BINDIR_NATIVE}/
+ for b in ${e2miscbins}; do
+ install -m 0755 misc/$b ${STAGING_BINDIR_NATIVE}/ || die "failed to install $b"
+ done
+}
diff --git a/recipes/e2fsprogs/e2fsprogs.inc b/recipes/e2fsprogs/e2fsprogs.inc
index b7a1223cc9..6821d71004 100644
--- a/recipes/e2fsprogs/e2fsprogs.inc
+++ b/recipes/e2fsprogs/e2fsprogs.inc
@@ -15,3 +15,8 @@ EXTRA_OECONF = "${@['','--disable-tls'][bb.data.getVar('ARM_ABI', d, 1) == 'oabi
--enable-dynamic-e2fsck --disable-nls --sbindir=${base_sbindir}"
PARALLEL_MAKE = ""
+
+e2miscbins = "mke2fs badblocks tune2fs dumpe2fs blkid logsave e2image fsck \
+ e2undo chattr lsattr uuidgen mklost+found filefrag uuidd e2initrd_helper"
+
+
diff --git a/recipes/e2fsprogs/e2fsprogs-1.41.4/mkinstalldirs.patch b/recipes/e2fsprogs/e2fsprogs/mkinstalldirs.patch
index 759e84edb0..759e84edb0 100644
--- a/recipes/e2fsprogs/e2fsprogs-1.41.4/mkinstalldirs.patch
+++ b/recipes/e2fsprogs/e2fsprogs/mkinstalldirs.patch
diff --git a/recipes/e2fsprogs/e2fsprogs_1.41.5.bb b/recipes/e2fsprogs/e2fsprogs_1.41.5.bb
new file mode 100644
index 0000000000..04b5d1daf5
--- /dev/null
+++ b/recipes/e2fsprogs/e2fsprogs_1.41.5.bb
@@ -0,0 +1,125 @@
+require e2fsprogs.inc
+
+PR = "r1"
+
+SRC_URI += "file://mkinstalldirs.patch;patch=1"
+
+DEPENDS += "gettext-native"
+
+do_compile_prepend () {
+ find ./ -print|xargs chmod u=rwX
+ ( cd util; ${BUILD_CC} subst.c -o subst )
+}
+
+ext2fsheaders = "ext2_ext_attr.h bitops.h ext2_err.h \
+ ext2_types.h ext2_fs.h ext2_io.h \
+ ext2fs.h"
+e2pheaders = "e2p.h"
+
+do_stage () {
+ oe_libinstall -a -C lib libe2p ${STAGING_LIBDIR}/
+ oe_libinstall -a -C lib libext2fs ${STAGING_LIBDIR}/
+ install -d ${STAGING_INCDIR}/e2p
+ for h in ${e2pheaders}; do
+ install -m 0644 lib/e2p/$h ${STAGING_INCDIR}/e2p/ || die "failed to install $h"
+ done
+ install -d ${STAGING_INCDIR}/ext2fs
+ for h in ${ext2fsheaders}; do
+ install -m 0644 lib/ext2fs/$h ${STAGING_INCDIR}/ext2fs/ || die "failed to install $h"
+ done
+ autotools_stage_all
+}
+
+# blkid used to be part of e2fsprogs but is useful outside, add it
+# as an RDEPENDS so that anything relying on it being in e2fsprogs
+# still works
+RDEPENDS_e2fsprogs = "e2fsprogs-blkid e2fsprogs-uuidgen e2fsprogs-badblocks"
+
+FILES_${PN} += "${libdir}/e2initrd_helper"
+
+PACKAGES =+ "e2fsprogs-blkid e2fsprogs-uuidgen e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-fsck e2fsprogs-tune2fs e2fsprogs-badblocks"
+FILES_e2fsprogs-blkid = "${base_sbindir}/blkid.${PN}"
+FILES_e2fsprogs-uuidgen = "${bindir}/uuidgen"
+FILES_e2fsprogs-fsck = "${base_sbindir}/fsck.${PN}"
+FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck.${PN} ${base_sbindir}/fsck.ext*.${PN}"
+FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs.${PN} ${base_sbindir}/mkfs.ext*.${PN}"
+FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label ${base_sbindir}/findfs"
+FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
+
+do_install_append () {
+ mv ${D}${base_sbindir}/fsck ${D}${base_sbindir}/fsck.${PN}
+ mv ${D}${base_sbindir}/blkid ${D}${base_sbindir}/blkid.${PN}
+ mv ${D}${base_sbindir}/e2fsck ${D}${base_sbindir}/e2fsck.${PN}
+ rm ${D}${base_sbindir}/fsck.ext2
+ rm ${D}${base_sbindir}/fsck.ext3
+ rm ${D}${base_sbindir}/fsck.ext4*
+ mv ${D}${base_sbindir}/mke2fs ${D}${base_sbindir}/mke2fs.${PN}
+ rm ${D}${base_sbindir}/mkfs.ext2
+ rm ${D}${base_sbindir}/mkfs.ext3
+ rm ${D}${base_sbindir}/mkfs.ext4*
+
+ cd ${D}/${base_sbindir}
+ ln -sf ./e2fsck.${PN} fsck.ext2.${PN}
+ ln -sf ./e2fsck.${PN} fsck.ext3.${PN}
+ ln -sf ./e2fsck.${PN} fsck.ext4.${PN}
+ ln -sf ./e2fsck.${PN} fsck.ext4dev.${PN}
+ ln -sf ./mke2fs.${PN} mkfs.ext2.${PN}
+ ln -sf ./mke2fs.${PN} mkfs.ext3.${PN}
+ ln -sf ./mke2fs.${PN} mkfs.ext4.${PN}
+ ln -sf ./mke2fs.${PN} mkfs.ext4dev.${PN}
+
+ ln -sf ./tune2fs findfs
+ ln -sf ./tune2fs e2label
+}
+
+pkg_postinst_e2fsprogs () {
+ update-alternatives --install ${base_bindir}/chattr chattr chattr.${PN} 100
+}
+
+pkg_postinst_e2fsprogs-fsck () {
+ update-alternatives --install ${base_sbindir}/fsck fsck fsck.${PN} 100
+}
+
+pkg_prerm_e2fsprogs-fsck () {
+ update-alternatives --remove fsck fsck.${PN}
+}
+
+pkg_postinst_e2fsprogs-blkid () {
+ update-alternatives --install ${base_sbindir}/blkid blkid blkid.${PN} 100
+}
+
+pkg_prerm_e2fsprogs-blkid () {
+ update-alternatives --remove blkid blkid.${PN}
+}
+
+pkg_postinst_e2fsprogs-e2fsck () {
+ update-alternatives --install ${base_sbindir}/e2fsck e2fsck e2fsck.${PN} 100
+ update-alternatives --install ${base_sbindir}/fsck.ext2 fsck.ext2 fsck.ext2.${PN} 100
+ update-alternatives --install ${base_sbindir}/fsck.ext3 fsck.ext3 fsck.ext3.${PN} 100
+ update-alternatives --install ${base_sbindir}/fsck.ext4 fsck.ext4 fsck.ext4.${PN} 100
+ update-alternatives --install ${base_sbindir}/fsck.ext4dev fsck.ext4dev fsck.ext4dev.${PN} 100
+}
+
+pkg_prerm_e2fsprogs-e2fsck () {
+ update-alternatives --remove e2fsck e2fsck.${PN}
+ update-alternatives --remove fsck.ext2 fsck.ext2.${PN}
+ update-alternatives --remove fsck.ext3 fsck.ext3.${PN}
+ update-alternatives --remove fsck.ext4 fsck.ext4.${PN}
+ update-alternatives --remove fsck.ext4dev fsck.ext4dev.${PN}
+}
+
+pkg_postinst_e2fsprogs-mke2fs () {
+ update-alternatives --install ${base_sbindir}/mke2fs mke2fs mke2fs.${PN} 100
+ update-alternatives --install ${base_sbindir}/mkfs.ext2 mkfs.ext2 mkfs.ext2.${PN} 100
+ update-alternatives --install ${base_sbindir}/mkfs.ext3 mkfs.ext3 mkfs.ext3.${PN} 100
+ update-alternatives --install ${base_sbindir}/mkfs.ext4 mkfs.ext4 mkfs.ext4.${PN} 100
+ update-alternatives --install ${base_sbindir}/mkfs.ext4dev mkfs.ext4dev mkfs.ext4dev.${PN} 100
+}
+
+pkg_prerm_e2fsprogs-mke2fs () {
+ update-alternatives --remove mke2fs mke2fs.${PN}
+ update-alternatives --remove mkfs.ext2 mkfs.ext2.${PN}
+ update-alternatives --remove mkfs.ext3 mkfs.ext3.${PN}
+ update-alternatives --remove mkfs.ext4 mkfs.ext4.${PN}
+ update-alternatives --remove mkfs.ext4dev mkfs.ext4dev.${PN}
+}
diff --git a/recipes/e2tools/e2tools-native_0.0.16.bb b/recipes/e2tools/e2tools-native_0.0.16.bb
index e37eed2b18..f23a0b12a2 100644
--- a/recipes/e2tools/e2tools-native_0.0.16.bb
+++ b/recipes/e2tools/e2tools-native_0.0.16.bb
@@ -3,7 +3,6 @@ require e2tools_${PV}.bb
inherit native
DEPENDS = "e2fsprogs-libs-native e2fsprogs-native"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/e2tools-${PV}', '${FILE_DIRNAME}/e2tools', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
e2links = "e2ln e2ls e2mkdir e2mv e2rm e2tail"
diff --git a/recipes/efl1/ecore.inc b/recipes/efl1/ecore.inc
index bc4dcf38cf..1e639fc342 100644
--- a/recipes/efl1/ecore.inc
+++ b/recipes/efl1/ecore.inc
@@ -3,7 +3,7 @@ LICENSE = "MIT BSD"
DEPENDS = "curl eet evas tslib libxtst libxcomposite libxinerama libxscrnsaver libxdamage libxrandr libxcursor libxprintutil"
# optional
# DEPENDS += "directfb libsdl-x11 openssl virtual/libiconv"
-PV = "0.9.9.050+svnr${SRCREV}"
+PV = "0.9.9.060+svnr${SRCREV}"
PR = "r3"
inherit efl
diff --git a/recipes/efl1/edbus_svn.bb b/recipes/efl1/edbus_svn.bb
index b9fc1a67b8..adc6b7fbea 100644
--- a/recipes/efl1/edbus_svn.bb
+++ b/recipes/efl1/edbus_svn.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "DBus and HAL convenience wrappers for EFL"
DEPENDS = "dbus ecore"
LICENSE = "MIT BSD"
-PV = "0.5.0.050+svnr${SRCREV}"
+PV = "0.5.0.060+svnr${SRCREV}"
PR = "r1"
inherit efl
diff --git a/recipes/efl1/edje_svn.bb b/recipes/efl1/edje_svn.bb
index 31d47e6fb8..2509c859c7 100644
--- a/recipes/efl1/edje_svn.bb
+++ b/recipes/efl1/edje_svn.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Edje is the Enlightenment graphical design & layout library"
DEPENDS = "eet evas ecore embryo edje-native"
LICENSE = "MIT BSD"
-PV = "0.5.0.050+svnr${SRCREV}"
+PV = "0.9.92.060+svnr${SRCREV}"
PR = "r3"
inherit efl
@@ -14,9 +14,9 @@ PACKAGES =+ "${PN}-utils"
RDEPENDS_${PN}-utils = "cpp cpp-symlinks embryo-tests"
RRECOMMENDS_${PN}-utils = "\
- libevas-saver-png \
- libevas-saver-jpeg \
- libevas-saver-eet \
+ evas-saver-png \
+ evas-saver-jpeg \
+ evas-saver-eet \
"
DEBIAN_NOAUTONAME_${PN}-utils = "1"
diff --git a/recipes/efl1/efreet_svn.bb b/recipes/efl1/efreet_svn.bb
index 218d22efe3..7ed8812087 100644
--- a/recipes/efl1/efreet_svn.bb
+++ b/recipes/efl1/efreet_svn.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "The Enlightenment freedesktop.org library"
DEPENDS = "ecore"
LICENSE = "MIT BSD"
-PV = "0.5.0.050+svnr${SRCREV}"
+PV = "0.5.0.060+svnr${SRCREV}"
PR = "r1"
inherit efl
diff --git a/recipes/efl1/eina_svn.bb b/recipes/efl1/eina_svn.bb
index f38c4c5b36..e62cdd2380 100644
--- a/recipes/efl1/eina_svn.bb
+++ b/recipes/efl1/eina_svn.bb
@@ -1,8 +1,13 @@
DESCRIPTION = "Eina is the Enlightenment data library"
LICENSE = "LGPL"
-PV = "0.0.1+svnr${SRCREV}"
+PV = "0.0.2.060+svnr${SRCREV}"
PR = "r0"
inherit efl
+# Some upgrade path tweaking
+AUTO_LIBNAME_PKGS = ""
+
+RREPLACES_${PN} = "libeina-ver-pre-svn-00-0 libeina-ver-pre-svn-01-0"
+
FILES_${PN} += "${libdir}/eina"
diff --git a/recipes/efl1/embryo_svn.bb b/recipes/efl1/embryo_svn.bb
index 688ec22e97..aeceb5abe4 100644
--- a/recipes/efl1/embryo_svn.bb
+++ b/recipes/efl1/embryo_svn.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "The Enlightenment C-like scripting language for Edje"
LICENSE = "MIT BSD"
-PV = "0.9.9.050+svnr${SRCREV}"
+PV = "0.9.9.060+svnr${SRCREV}"
PR = "r1"
inherit efl
diff --git a/recipes/efl1/enhance_svn.bb b/recipes/efl1/enhance_svn.bb
index dd09256655..b44cbec75c 100644
--- a/recipes/efl1/enhance_svn.bb
+++ b/recipes/efl1/enhance_svn.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Enhance translates between glade .xml files and ETK"
LICENSE = "MIT"
DEPENDS = "exml"
-PV = "0.0.0+svnr${SRCREV}"
+PV = "0.0.1+svnr${SRCREV}"
PR = "r1"
inherit efl
diff --git a/recipes/efl1/evas.inc b/recipes/efl1/evas.inc
index 9561cfedc6..55774ee7ad 100644
--- a/recipes/efl1/evas.inc
+++ b/recipes/efl1/evas.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "Evas is the Enlightenment canvas API"
LICENSE = "MIT BSD"
# can also depend on valgrind, libsdl-x11, directfb
DEPENDS = "eina eet freetype jpeg libpng virtual/libx11 libxext libxrender fontconfig libfribidi"
-PV = "0.9.9.050+svnr${SRCREV}"
+PV = "0.9.9.060+svnr${SRCREV}"
PR = "r1"
@@ -20,7 +20,7 @@ python populate_packages_prepend () {
basedir = bb.data.expand( '${libdir}/evas/modules/%s' % plugin_type, d )
do_split_packages(d, basedir, '^(.*)',
- output_pattern = 'libevas-' + plugin_type[:-1] + "-%s",
+ output_pattern = 'evas-' + plugin_type[:-1] + "-%s",
description = 'Evas module %s',
allow_dirs=True, recursive=False, extra_depends="" )
}
@@ -32,22 +32,52 @@ do_install_append() {
FILES_${PN}-dev += "${libdir}/evas/modules/*/*/*/*.a ${libdir}/evas/modules/*/*/*/*.la"
FILES_${PN}-dbg += "${libdir}/evas/modules/*/*/*/.debug/"
-PACKAGES_DYNAMIC = "libevas-engine-* libevas-loader-* libevas-saver-*"
+PACKAGES_DYNAMIC = "evas-engine-* evas-loader-* evas-saver-*"
RRECOMMENDS_${PN} = "\
- libevas-engine-buffer \
- libevas-engine-fb \
- libevas-engine-software-generic \
- libevas-engine-software-x11 \
- libevas-engine-software-16 \
- libevas-engine-software-16-x11 \
- libevas-engine-xrender-x11 \
+ evas-engine-buffer \
+ evas-engine-fb \
+ evas-engine-software-generic \
+ evas-engine-software-x11 \
+ evas-engine-software-16 \
+ evas-engine-software-16-x11 \
+ evas-engine-xrender-x11 \
\
- libevas-loader-png \
- libevas-loader-jpeg \
- libevas-loader-eet \
+ evas-loader-png \
+ evas-loader-jpeg \
+ evas-loader-eet \
"
+# Some upgrade path tweaking
+AUTO_LIBNAME_PKGS = ""
+
+RREPLACES_${PN} = "libevas-ver-pre-svn-00-0 libevas-ver-pre-svn-01-0"
+
+RREPLACES_${PN}-tests = "libevas-ver-pre-svn-00-tests libevas-ver-pre-svn-01-tests"
+
+RREPLACES_evas-loader-pmaps = "liblibevas-ver-pre-svn-00-loader-pmaps libevas-ver-pre-svn-00-loader-pmaps "
+RREPLACES_evas-loader-eet = "liblibevas-ver-pre-svn-00-loader-eet libevas-ver-pre-svn-00-loader-eet "
+RREPLACES_evas-loader-jpeg = "liblibevas-ver-pre-svn-00-loader-jpeg libevas-ver-pre-svn-00-loader-jpeg "
+RREPLACES_evas-loader-tiff = "liblibevas-ver-pre-svn-00-loader-tiff libevas-ver-pre-svn-00-loader-tiff "
+RREPLACES_evas-loader-png = "liblibevas-ver-pre-svn-00-loader-png libevas-ver-pre-svn-00-loader-png "
+RREPLACES_evas-loader-xpm = "liblibevas-ver-pre-svn-00-loader-xpm libevas-ver-pre-svn-00-loader-xpm "
+
+RREPLACES_evas-saver-pmaps = "liblibevas-ver-pre-svn-00-saver-pmaps libevas-ver-pre-svn-00-saver-pmaps "
+RREPLACES_evas-saver-eet = "liblibevas-ver-pre-svn-00-saver-eet libevas-ver-pre-svn-00-saver-eet "
+RREPLACES_evas-saver-jpeg = "liblibevas-ver-pre-svn-00-saver-jpeg libevas-ver-pre-svn-00-saver-jpeg "
+RREPLACES_evas-saver-tiff = "liblibevas-ver-pre-svn-00-saver-tiff libevas-ver-pre-svn-00-saver-tiff "
+RREPLACES_evas-saver-png = "liblibevas-ver-pre-svn-00-saver-png libevas-ver-pre-svn-00-saver-png "
+RREPLACES_evas-saver-xpm = "liblibevas-ver-pre-svn-00-saver-xpm libevas-ver-pre-svn-00-saver-xpm "
+
+RREPLACES_evas-engine-fb = "liblibevas-ver-pre-svn-00-engine-fb libevas-ver-pre-svn-00-engine-fb "
+RREPLACES_evas-engine-software-generic = "liblibevas-ver-pre-svn-00-engine-software-generic libevas-ver-pre-svn-00-engine-software-generic "
+RREPLACES_evas-engine-software-16 = "liblibevas-ver-pre-svn-00-engine-software-16 libevas-ver-pre-svn-00-engine-software-16 "
+RREPLACES_evas-engine-buffer = "liblibevas-ver-pre-svn-00-engine-buffer libevas-ver-pre-svn-00-engine-buffer "
+RREPLACES_evas-engine-xrender-x11 = "liblibevas-ver-pre-svn-00-engine-xrender-x11 libevas-ver-pre-svn-00-engine-xrender-x11 "
+RREPLACES_evas-engine-software-x11 = "liblibevas-ver-pre-svn-00-engine-software-x11 libevas-ver-pre-svn-00-engine-software-x11 "
+
+
+
# disabling this, since (due to OE bugs) it drags in whole Gtk+
#RRECOMMENDS_${PN} += "\
# libevas-loader-svg \
diff --git a/recipes/efl1/evolve_svn.bb b/recipes/efl1/evolve_svn.bb
index e38df93e24..24e794b9cd 100644
--- a/recipes/efl1/evolve_svn.bb
+++ b/recipes/efl1/evolve_svn.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Evolve allows you to write ETK designs using a C-like language"
LICENSE = "MIT"
DEPENDS = "etk evolve-native"
-PV = "0.0.0+svnr${SRCREV}"
+PV = "0.1.0.001+svnr${SRCREV}"
PR = "r2"
inherit efl
diff --git a/recipes/efl1/ewl_svn.bb b/recipes/efl1/ewl_svn.bb
index 6425e865a3..a1d373b963 100644
--- a/recipes/efl1/ewl_svn.bb
+++ b/recipes/efl1/ewl_svn.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "The Enlightened Widget Library"
DEPENDS = "evas ecore edje emotion efreet epsilon"
LICENSE = "MIT BSD"
-PV = "0.5.2.050+svnr${SRCREV}"
+PV = "0.5.3.050+svnr${SRCREV}"
PR = "r1"
inherit efl
diff --git a/recipes/efl1/libefso_svn.bb b/recipes/efl1/libefso_svn.bb
index 20d520cba5..276cd100ef 100644
--- a/recipes/efl1/libefso_svn.bb
+++ b/recipes/efl1/libefso_svn.bb
@@ -2,8 +2,7 @@ DESCRIPTION = "EFL FSO wrapper library"
SECTION = "e/libs"
LICENSE = "GPLv2"
DEPENDS = "ecore edbus"
-PV = "0.0.0+svnr${SRCREV}"
-PR = "r2"
+PV = "0.0.1+svnr${SRCREV}"
SRC_URI = "svn://svn.om.vptt.ch/trunk/;proto=http;module=libefso"
S = "${WORKDIR}/libefso"
diff --git a/recipes/eglibc/eglibc-initial.inc b/recipes/eglibc/eglibc-initial.inc
index 5fbb5dbda5..7a5a7b22f4 100644
--- a/recipes/eglibc/eglibc-initial.inc
+++ b/recipes/eglibc/eglibc-initial.inc
@@ -1,7 +1,6 @@
SECTION = "libs"
DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
PACKAGES_DYNAMIC = ""
diff --git a/recipes/eglibc/eglibc-package.bbclass b/recipes/eglibc/eglibc-package.bbclass
index 7fcb558399..d8ac4f4e86 100644
--- a/recipes/eglibc/eglibc-package.bbclass
+++ b/recipes/eglibc/eglibc-package.bbclass
@@ -24,7 +24,7 @@ python __anonymous () {
ENABLE_BINARY_LOCALE_GENERATION ?= "0"
# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
-BINARY_LOCALE_ARCHES ?= "arm.*"
+BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc"
PACKAGES = "eglibc-dbg eglibc catchsegv sln nscd ldd localedef eglibc-utils eglibc-dev eglibc-doc eglibc-locale libsegfault eglibc-extra-nss eglibc-thread-db eglibc-pcprofile"
PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* glibc-binary-localedata-* eglibc-gconv-* eglibc-charmap-* eglibc-localedata-* eglibc-binary-localedata-* locale-base-*"
@@ -89,9 +89,6 @@ do_install() {
mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
done
rm -f ${D}/etc/rpc
- rm -f ${D}${includedir}/scsi/sg.h
- rm -f ${D}${includedir}/scsi/scsi_ioctl.h
- rm -f ${D}${includedir}/scsi/scsi.h
}
TMP_LOCALE="/tmp/locale${libdir}/locale"
@@ -287,7 +284,15 @@ python package_do_split_gconvs () {
def output_locale_binary(name, locale, encoding):
target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
- qemu = "qemu-%s -r 2.6.16" % target_arch
+ if target_arch in ("i486", "i586", "i686"):
+ target_arch = "i386"
+ elif target_arch == "powerpc":
+ target_arch = "ppc"
+ kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1)
+ if kernel_ver is None:
+ qemu = "qemu-%s -s 1048576" % target_arch
+ else:
+ qemu = "qemu-%s -s 1048576 -r %s" % (target_arch, kernel_ver)
pkgname = 'locale-base-' + legitimize_package_name(name)
m = re.match("(.*)\.(.*)", name)
if m:
@@ -305,11 +310,12 @@ python package_do_split_gconvs () {
bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d)
treedir = base_path_join(bb.data.getVar("WORKDIR", d, 1), "locale-tree")
+ ldlibdir = "%s/lib" % treedir
path = bb.data.getVar("PATH", d, 1)
i18npath = base_path_join(treedir, datadir, "i18n")
localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, name)
- cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, treedir, localedef_opts)
+ cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s -E LD_LIBRARY_PATH=%s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, ldlibdir, treedir, localedef_opts)
bb.note("generating locale %s (%s)" % (locale, encoding))
if os.system(cmd):
raise bb.build.FuncFailed("localedef returned an error (command was %s)." % cmd)
diff --git a/recipes/eglibc/eglibc.inc b/recipes/eglibc/eglibc.inc
index 97a45ac8dc..7863aacc89 100644
--- a/recipes/eglibc/eglibc.inc
+++ b/recipes/eglibc/eglibc.inc
@@ -3,6 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home"
SECTION = "libs"
PRIORITY = "required"
LICENSE = "LGPL"
+INC_PR = "r4"
# nptl needs unwind support in gcc, which can't be built without glibc.
DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
#this leads to circular deps, so lets not add it yet
diff --git a/recipes/eglibc/eglibc_2.9.bb b/recipes/eglibc/eglibc_2.9.bb
index ecd21de6fe..b3786d3c1d 100644
--- a/recipes/eglibc/eglibc_2.9.bb
+++ b/recipes/eglibc/eglibc_2.9.bb
@@ -4,7 +4,7 @@ DEPENDS += "gperf-native"
DEFAULT_PREFERENCE = "1"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/eglibc-svn"
PV = "2.9"
-PR = "r4"
+PR = "${INC_PR}.1"
SVN_REV="7430"
EGLIBC_BRANCH="eglibc-2_9"
SRC_URI = "svn://svn.eglibc.org/branches;module=eglibc-2_9;rev=${SVN_REV};proto=svn \
diff --git a/recipes/eglibc/eglibc_svn.bb b/recipes/eglibc/eglibc_svn.bb
index a2d3e872f9..4202a7d5e5 100644
--- a/recipes/eglibc/eglibc_svn.bb
+++ b/recipes/eglibc/eglibc_svn.bb
@@ -5,7 +5,7 @@ SRCREV = "7542"
# DEFAULT_PREFERENCE = "-1"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/eglibc-svn"
PV = "2.9+svnr${SRCREV}"
-PR = "r3"
+PR = "${INC_PR}.1"
EGLIBC_BRANCH="trunk"
SRC_URI = "svn://svn.eglibc.org;module=trunk \
file://eglibc-svn-arm-lowlevellock-include-tls.patch;patch=1 \
diff --git a/recipes/ekiga/ekiga_3.2.4.bb b/recipes/ekiga/ekiga_3.2.4.bb
new file mode 100644
index 0000000000..3a63015d66
--- /dev/null
+++ b/recipes/ekiga/ekiga_3.2.4.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Gnome videoconferencing application"
+LICENSE = "GPLv2"
+
+ARM_INSTRUCTION_SET = "arm"
+
+inherit gnome
+DEPENDS += " avahi libnotify eds-dbus libgnome gtkmm libsigc++-2.0 gstreamer gst-plugins-good gst-plugins-base gst-plugins-bad opal ptlib gnome-doc-utils"
+RDEPENDS += "gst-plugin-app gst-plugin-video4linux2 opal ptlib"
+
+EXTRA_OECONF = "--enable-static-libs --disable-ldap --disable-gnome --enable-gstreamer --disable-gdu --disable-scrollkeeper "
+
+do_configure_append() {
+ find ${S} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g
+ find ${S} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g
+}
+
+FILES_${PN} += "${datadir}/dbus-1 ${datadir}/icons"
+
diff --git a/recipes/ekiga/opal_3.6.2.bb b/recipes/ekiga/opal_3.6.2.bb
new file mode 100644
index 0000000000..502c344b13
--- /dev/null
+++ b/recipes/ekiga/opal_3.6.2.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Open Phone Abstraction Library, implementation of the ITU H.323 teleconferencing protocol, and successor of the openh323 library."
+LICENSE = "MPL"
+
+inherit gnome
+
+DEPENDS += " ffmpeg ptlib virtual/libsdl openldap"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/opalvoip/opal-${PV}.tar.bz2 \
+ file://configure.diff;patch=1 \
+ "
+
+EXTRA_OECONF = "--enable-localgsm --disable-spandsp "
+ARM_INSTRUCTION_SET = "arm"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_configure() {
+ libtoolize --force
+ gnu-configize
+ oe_runconf
+}
+
+FILES_${PN} += "${libdir}/opal-${PV}/*/*.so ${libdir}/opal-${PV}/*/*/*.so"
+FILES_${PN}-dbg += "${libdir}/opal-${PV}/*/.debug ${libdir}/opal-${PV}/*/*/.debug"
+
+do_stage() {
+ autotools_stage_all
+}
+
diff --git a/recipes/ekiga/ptlib_2.6.2.bb b/recipes/ekiga/ptlib_2.6.2.bb
new file mode 100644
index 0000000000..93a3bd8c96
--- /dev/null
+++ b/recipes/ekiga/ptlib_2.6.2.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "Portable Tools Libary"
+LICENSE = "MPL"
+
+inherit gnome
+
+DEPENDS += "libgsm openldap openssl expat virtual/libsdl alsa-lib"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/opalvoip/ptlib-${PV}.tar.bz2"
+
+do_configure() {
+ libtoolize --force
+ gnu-configize
+ oe_runconf
+}
+
+do_compile_append() {
+ sed -i -e s:${STAGING_DIR_TARGET}::g \
+ -e s:/${TARGET_SYS}::g \
+ ptlib.pc
+}
+
+FILES_${PN} += "${libdir}/ptlib-${PV}/*/*/*.so"
+
+do_stage() {
+ autotools_stage_all
+}
+
+
+
+
diff --git a/recipes/elvis/elvis_2.2.0.bb b/recipes/elvis/elvis_2.2.0.bb
index c0f92627bf..f038c6b110 100644
--- a/recipes/elvis/elvis_2.2.0.bb
+++ b/recipes/elvis/elvis_2.2.0.bb
@@ -4,8 +4,7 @@ PRIORITY = "optional"
LICENSE = "Perl Clarified Artistic License"
DEPENDS = "ncurses"
-#SRC_URI = "ftp://ftp.cs.pdx.edu/pub/elvis/elvis-2.2_0.tar.gz"
-SRC_URI = "http://www.fh-wedel.de/pub/elvis/elvis-2.2_0.tar.gz"
+SRC_URI = "ftp://ftp.cs.pdx.edu/pub/elvis/elvis-2.2_0.tar.gz"
S = "${WORKDIR}/elvis-2.2_0"
CFLAGS_prepend = " -I. -Iosunix -L${STAGING_LIBDIR} "
diff --git a/recipes/emacs/emacs.inc b/recipes/emacs/emacs.inc
index 05acd828dc..0464a26706 100644
--- a/recipes/emacs/emacs.inc
+++ b/recipes/emacs/emacs.inc
@@ -5,6 +5,8 @@ SECTION = "editor"
# and it needs to run some generated binaries..
DEPENDS += "qemu-native"
+DEPENDS +=" liblockfile"
+
inherit autotools
PACKAGES =+ "${PN}-el"
@@ -16,8 +18,12 @@ FILES_${PN} += "${datadir}/emacs"
FILES_${PN}-dbg += "${libexecdir}/emacs/*/*/.debug ${datadir}/emacs/*/*/.debug"
+TREEDIR = "${WORKDIR}/qemu-treedir"
+
# Large stack is required at least on x86_64 host, otherwise random segfaults appear:
-QEMU = "qemu-${TARGET_ARCH} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET}"
+QEMU = "qemu-${TARGET_ARCH} ${QEMU_OPTIONS} -s 1048576 -L ${TREEDIR}"
+
+export LOGNAME = "$(whoami)"
do_compile_prepend() {
sed -i ':1;s:\(START.* \|LIB_STANDARD.* \|LIBES.* \)/usr/lib:\1${STAGING_LIBDIR}:;t1' ${S}/src/s/gnu-linux.h `find "${S}" -name Makefile`
@@ -26,6 +32,19 @@ do_compile_prepend() {
ln -sf ../src/emacs lisp/emacs
ln -sf ../src/emacs lib-src/emacs
ln -sf ../src/emacs leim/emacs
+#copy STAGING_DIR_TARGET and libgcc_s.so* to WORKDIR/qemu-treedir #copied code from glibc-package.bbclass
+ treedir=${TREEDIR}
+ if [ -e $treedir ];then
+ rm -rf $treedir
+ fi
+ mkdir $treedir
+ cp -pPR ${STAGING_DIR_TARGET}/* $treedir
+ if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so ]; then
+ cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
+ fi
+ if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* ]; then
+ cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* $treedir/lib
+ fi
}
EXTRA_OEMAKE += 'QEMU="${QEMU}"'
diff --git a/recipes/emacs/emacs_22.3.bb b/recipes/emacs/emacs_22.3.bb
index da8de39eec..4eeff7b567 100644
--- a/recipes/emacs/emacs_22.3.bb
+++ b/recipes/emacs/emacs_22.3.bb
@@ -1,5 +1,7 @@
require emacs.inc
+PR="r1"
+
EXTRA_OECONF = "--without-sound --without-x"
SRC_URI = "${GNU_MIRROR}/emacs/emacs-${PV}.tar.gz \
diff --git a/recipes/enchant/enchant_1.3.0.bb b/recipes/enchant/enchant_1.3.0.bb
index cceceebabf..85e6297464 100644
--- a/recipes/enchant/enchant_1.3.0.bb
+++ b/recipes/enchant/enchant_1.3.0.bb
@@ -7,7 +7,7 @@ RDEPENDS = "aspell"
inherit autotools pkgconfig
-PR = "r0"
+PR = "r1"
S = "${WORKDIR}/enchant-${PV}"
@@ -15,9 +15,10 @@ SRC_URI = "http://www.abisource.com/downloads/enchant/${PV}/enchant-${PV}.tar.gz
EXTRA_OECONF = "--with-aspell-prefix=${STAGING_DIR_HOST}${layout_prefix} --enable-aspell --disable-binreloc"
-export CXXFLAGS += " -L${STAGING_LIBDIR} -lstdc++ "
+FILES_${PN} = "${bindir} ${libdir}/*${SOLIBS} ${datadir}/${PN} ${libdir}/${PN}/*.so"
+FILES_${PN}-dev += "${libdir}/${PN}/*{SOLIBSDEV} ${libdir}/${PN}/*.la ${libdir}/${PN}/*.a"
-FILES_${PN} = "/usr/bin/* /usr/lib/enchant/*.so /usr/share/enchant /usr/lib/libenchant*.so.*"
+export CXXFLAGS += " -L${STAGING_LIBDIR} -lstdc++ "
do_stage() {
autotools_stage_all
diff --git a/recipes/fann/fann_2.0.0.bb b/recipes/fann/fann_2.0.0.bb
new file mode 100644
index 0000000000..4ea49c909d
--- /dev/null
+++ b/recipes/fann/fann_2.0.0.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "Fast Artificial Neural Network Library"
+HOMEPAGE = "http://leenissen.dk/fann/"
+SECTION = "libs"
+LICENSE = "BSD"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/fann/fann-${PV}.tar.bz2"
+
+inherit autotools_stage
+
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
diff --git a/recipes/fbprogress/fbprogress_1.1.bb b/recipes/fbprogress/fbprogress_1.1.bb
index 8d603b8a3e..855d1ca3d4 100644
--- a/recipes/fbprogress/fbprogress_1.1.bb
+++ b/recipes/fbprogress/fbprogress_1.1.bb
@@ -3,8 +3,8 @@ AUTHOR = "Angel Roman"
HOMEPAGE = "http://www.buglabs.net/"
LICENSE = "GPL"
DEPENDS = "freetype zlib virtual/kernel"
-SRCREV = "9118"
-PR = "r1"
+SRCREV = "9405"
+PR = "r2"
SRC_URI = "svn://svn.buglabs.net/bug/trunk;module=com.buglabs.bug.native.fbprogress;proto=svn \
file://fbprogress-init"
@@ -13,14 +13,17 @@ S = "${WORKDIR}/com.buglabs.bug.native.fbprogress"
inherit update-rc.d
-EXTRA_OEMAKE = "BUG_LINUX_SRC=${STAGING_KERNEL_DIR}"
+TARGET_CXXFLAGS += "-I${STAGING_INCDIR}/freetype2 -I${STAGING_KERNEL_DIR}/include"
+TARGET_LDFLAGS += "-L${STAGING_LIBDIR} -lfreetype -lz"
do_install() {
- install -d ${D}/${sysconfdir}/fbprogress
- install -m 0644 ${S}/images/* ${D}/${sysconfdir}/fbprogress/
- install -d ${D}${layout_bindir}
- install -m 0755 fbprogress ${D}${layout_bindir}
- install -m 0755 fbprogress.sh ${D}${layout_bindir}
+ install -d ${D}/${datadir}/fbprogress
+ install -m 0644 ${S}/images/* ${D}/${datadir}/fbprogress/
+
+ install -d ${D}${bindir}
+ install -m 0755 fbprogress ${D}${bindir}
+ install -m 0755 fbprogress.sh ${D}${bindir}
+
install -d ${D}/${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/fbprogress-init ${D}/${sysconfdir}/init.d/fbprogress
}
diff --git a/recipes/ffmpeg/ffmpeg-0.5/ffmpeg-arm-update.diff b/recipes/ffmpeg/ffmpeg-0.5/ffmpeg-arm-update.diff
new file mode 100644
index 0000000000..7c72ccd665
--- /dev/null
+++ b/recipes/ffmpeg/ffmpeg-0.5/ffmpeg-arm-update.diff
@@ -0,0 +1,495 @@
+ Makefile | 4 +
+ arm/dsputil_neon.c | 16 ++++
+ arm/dsputil_neon_s.S | 178 +++++++++++++++++++++++++++++++++++++------------
+ arm/simple_idct_neon.S | 17 ++++
+ arm/vp3dsp_neon.S | 94 +++++++++++++++++++++++++
+ 5 files changed, 265 insertions(+), 44 deletions(-)
+diff -Nurd ffmpeg.old/libavcodec/arm/dsputil_neon.c ffmpeg-0.5/libavcodec/arm/dsputil_neon.c
+--- ffmpeg.old/libavcodec/arm/dsputil_neon.c 2009-01-31 00:13:19.000000000 +0100
++++ ffmpeg-0.5/libavcodec/arm/dsputil_neon.c 2009-05-30 11:27:54.000000000 +0200
+@@ -41,6 +41,10 @@
+
+ void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
+
++void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
++void ff_put_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
++void ff_put_signed_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
++
+ void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
+ void ff_put_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int);
+ void ff_put_h264_qpel16_mc20_neon(uint8_t *, uint8_t *, int);
+@@ -146,6 +150,9 @@
+ DCTELEM *block, int stride,
+ const uint8_t nnzc[6*8]);
+
++void ff_vp3_v_loop_filter_neon(uint8_t *, int, int *);
++void ff_vp3_h_loop_filter_neon(uint8_t *, int, int *);
++
+ void ff_vector_fmul_neon(float *dst, const float *src, int len);
+ void ff_vector_fmul_window_neon(float *dst, const float *src0,
+ const float *src1, const float *win,
+@@ -176,6 +183,10 @@
+
+ c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
+
++ c->add_pixels_clamped = ff_add_pixels_clamped_neon;
++ c->put_pixels_clamped = ff_put_pixels_clamped_neon;
++ c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
++
+ c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
+ c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon;
+
+@@ -247,6 +258,11 @@
+ c->h264_idct_add16intra = ff_h264_idct_add16intra_neon;
+ c->h264_idct_add8 = ff_h264_idct_add8_neon;
+
++ if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
++ c->vp3_v_loop_filter = ff_vp3_v_loop_filter_neon;
++ c->vp3_h_loop_filter = ff_vp3_h_loop_filter_neon;
++ }
++
+ c->vector_fmul = ff_vector_fmul_neon;
+ c->vector_fmul_window = ff_vector_fmul_window_neon;
+
+diff -Nurd ffmpeg.old/libavcodec/arm/dsputil_neon_s.S ffmpeg-0.5/libavcodec/arm/dsputil_neon_s.S
+--- ffmpeg.old/libavcodec/arm/dsputil_neon_s.S 2009-01-31 00:13:19.000000000 +0100
++++ ffmpeg-0.5/libavcodec/arm/dsputil_neon_s.S 2009-05-30 11:27:54.000000000 +0200
+@@ -38,13 +38,13 @@
+ pld [r1, r2]
+ pld [r1, r2, lsl #1]
+ .if \avg
+- vld1.64 {d16,d17}, [ip], r2
++ vld1.64 {d16,d17}, [ip,:128], r2
+ vrhadd.u8 q0, q0, q8
+- vld1.64 {d18,d19}, [ip], r2
++ vld1.64 {d18,d19}, [ip,:128], r2
+ vrhadd.u8 q1, q1, q9
+- vld1.64 {d20,d21}, [ip], r2
++ vld1.64 {d20,d21}, [ip,:128], r2
+ vrhadd.u8 q2, q2, q10
+- vld1.64 {d22,d23}, [ip], r2
++ vld1.64 {d22,d23}, [ip,:128], r2
+ vrhadd.u8 q3, q3, q11
+ .endif
+ subs r3, r3, #4
+@@ -73,35 +73,29 @@
+ .endm
+
+ .macro pixels16_y2 vhadd=vrhadd.u8
+- push {lr}
+- add ip, r1, r2
+- lsl lr, r2, #1
+- vld1.64 {d0, d1}, [r1], lr
+- vld1.64 {d2, d3}, [ip], lr
++ vld1.64 {d0, d1}, [r1], r2
++ vld1.64 {d2, d3}, [r1], r2
+ 1: subs r3, r3, #2
+ \vhadd q2, q0, q1
+- vld1.64 {d0, d1}, [r1], lr
++ vld1.64 {d0, d1}, [r1], r2
+ \vhadd q3, q0, q1
+- vld1.64 {d2, d3}, [ip], lr
++ vld1.64 {d2, d3}, [r1], r2
+ pld [r1]
+- pld [ip]
++ pld [r1, r2]
+ vst1.64 {d4, d5}, [r0,:128], r2
+ vst1.64 {d6, d7}, [r0,:128], r2
+ bne 1b
+- pop {pc}
++ bx lr
+ .endm
+
+ .macro pixels16_xy2 vshrn=vrshrn.u16 no_rnd=0
+- push {lr}
+- lsl lr, r2, #1
+- add ip, r1, r2
+- vld1.64 {d0-d2}, [r1], lr
+- vld1.64 {d4-d6}, [ip], lr
++ vld1.64 {d0-d2}, [r1], r2
++ vld1.64 {d4-d6}, [r1], r2
+ .if \no_rnd
+ vmov.i16 q13, #1
+ .endif
+ pld [r1]
+- pld [ip]
++ pld [r1, r2]
+ vext.8 q1, q0, q1, #1
+ vext.8 q3, q2, q3, #1
+ vaddl.u8 q8, d0, d2
+@@ -109,7 +103,7 @@
+ vaddl.u8 q9, d4, d6
+ vaddl.u8 q11, d5, d7
+ 1: subs r3, r3, #2
+- vld1.64 {d0-d2}, [r1], lr
++ vld1.64 {d0-d2}, [r1], r2
+ vadd.u16 q12, q8, q9
+ pld [r1]
+ .if \no_rnd
+@@ -123,11 +117,11 @@
+ .endif
+ \vshrn d29, q1, #2
+ vaddl.u8 q8, d0, d30
+- vld1.64 {d2-d4}, [ip], lr
++ vld1.64 {d2-d4}, [r1], r2
+ vaddl.u8 q10, d1, d31
+ vst1.64 {d28,d29}, [r0,:128], r2
+ vadd.u16 q12, q8, q9
+- pld [ip]
++ pld [r1, r2]
+ .if \no_rnd
+ vadd.u16 q12, q12, q13
+ .endif
+@@ -142,7 +136,7 @@
+ vaddl.u8 q11, d3, d5
+ vst1.64 {d30,d31}, [r0,:128], r2
+ bgt 1b
+- pop {pc}
++ bx lr
+ .endm
+
+ .macro pixels8
+@@ -180,41 +174,35 @@
+ .endm
+
+ .macro pixels8_y2 vhadd=vrhadd.u8
+- push {lr}
+- add ip, r1, r2
+- lsl lr, r2, #1
+- vld1.64 {d0}, [r1], lr
+- vld1.64 {d1}, [ip], lr
++ vld1.64 {d0}, [r1], r2
++ vld1.64 {d1}, [r1], r2
+ 1: subs r3, r3, #2
+ \vhadd d4, d0, d1
+- vld1.64 {d0}, [r1], lr
++ vld1.64 {d0}, [r1], r2
+ \vhadd d5, d0, d1
+- vld1.64 {d1}, [ip], lr
++ vld1.64 {d1}, [r1], r2
+ pld [r1]
+- pld [ip]
++ pld [r1, r2]
+ vst1.64 {d4}, [r0,:64], r2
+ vst1.64 {d5}, [r0,:64], r2
+ bne 1b
+- pop {pc}
++ bx lr
+ .endm
+
+ .macro pixels8_xy2 vshrn=vrshrn.u16 no_rnd=0
+- push {lr}
+- lsl lr, r2, #1
+- add ip, r1, r2
+- vld1.64 {d0, d1}, [r1], lr
+- vld1.64 {d2, d3}, [ip], lr
++ vld1.64 {d0, d1}, [r1], r2
++ vld1.64 {d2, d3}, [r1], r2
+ .if \no_rnd
+ vmov.i16 q11, #1
+ .endif
+ pld [r1]
+- pld [ip]
++ pld [r1, r2]
+ vext.8 d4, d0, d1, #1
+ vext.8 d6, d2, d3, #1
+ vaddl.u8 q8, d0, d4
+ vaddl.u8 q9, d2, d6
+ 1: subs r3, r3, #2
+- vld1.64 {d0, d1}, [r1], lr
++ vld1.64 {d0, d1}, [r1], r2
+ pld [r1]
+ vadd.u16 q10, q8, q9
+ vext.8 d4, d0, d1, #1
+@@ -223,9 +211,9 @@
+ .endif
+ vaddl.u8 q8, d0, d4
+ \vshrn d5, q10, #2
+- vld1.64 {d2, d3}, [ip], lr
++ vld1.64 {d2, d3}, [r1], r2
+ vadd.u16 q10, q8, q9
+- pld [ip]
++ pld [r1, r2]
+ .if \no_rnd
+ vadd.u16 q10, q10, q11
+ .endif
+@@ -235,7 +223,7 @@
+ vaddl.u8 q9, d2, d6
+ vst1.64 {d7}, [r0,:64], r2
+ bgt 1b
+- pop {pc}
++ bx lr
+ .endm
+
+ .macro pixfunc pfx name suf rnd_op args:vararg
+@@ -273,6 +261,112 @@
+ pixfunc2 put_ pixels8_y2, _no_rnd, vhadd.u8
+ pixfunc2 put_ pixels8_xy2, _no_rnd, vshrn.u16, 1
+
++function ff_put_pixels_clamped_neon, export=1
++ vld1.64 {d16-d19}, [r0,:128]!
++ vqmovun.s16 d0, q8
++ vld1.64 {d20-d23}, [r0,:128]!
++ vqmovun.s16 d1, q9
++ vld1.64 {d24-d27}, [r0,:128]!
++ vqmovun.s16 d2, q10
++ vld1.64 {d28-d31}, [r0,:128]!
++ vqmovun.s16 d3, q11
++ vst1.64 {d0}, [r1,:64], r2
++ vqmovun.s16 d4, q12
++ vst1.64 {d1}, [r1,:64], r2
++ vqmovun.s16 d5, q13
++ vst1.64 {d2}, [r1,:64], r2
++ vqmovun.s16 d6, q14
++ vst1.64 {d3}, [r1,:64], r2
++ vqmovun.s16 d7, q15
++ vst1.64 {d4}, [r1,:64], r2
++ vst1.64 {d5}, [r1,:64], r2
++ vst1.64 {d6}, [r1,:64], r2
++ vst1.64 {d7}, [r1,:64], r2
++ bx lr
++ .endfunc
++
++function ff_put_signed_pixels_clamped_neon, export=1
++ vmov.u8 d31, #128
++ vld1.64 {d16-d17}, [r0,:128]!
++ vqmovn.s16 d0, q8
++ vld1.64 {d18-d19}, [r0,:128]!
++ vqmovn.s16 d1, q9
++ vld1.64 {d16-d17}, [r0,:128]!
++ vqmovn.s16 d2, q8
++ vld1.64 {d18-d19}, [r0,:128]!
++ vadd.u8 d0, d0, d31
++ vld1.64 {d20-d21}, [r0,:128]!
++ vadd.u8 d1, d1, d31
++ vld1.64 {d22-d23}, [r0,:128]!
++ vadd.u8 d2, d2, d31
++ vst1.64 {d0}, [r1,:64], r2
++ vqmovn.s16 d3, q9
++ vst1.64 {d1}, [r1,:64], r2
++ vqmovn.s16 d4, q10
++ vst1.64 {d2}, [r1,:64], r2
++ vqmovn.s16 d5, q11
++ vld1.64 {d24-d25}, [r0,:128]!
++ vadd.u8 d3, d3, d31
++ vld1.64 {d26-d27}, [r0,:128]!
++ vadd.u8 d4, d4, d31
++ vadd.u8 d5, d5, d31
++ vst1.64 {d3}, [r1,:64], r2
++ vqmovn.s16 d6, q12
++ vst1.64 {d4}, [r1,:64], r2
++ vqmovn.s16 d7, q13
++ vst1.64 {d5}, [r1,:64], r2
++ vadd.u8 d6, d6, d31
++ vadd.u8 d7, d7, d31
++ vst1.64 {d6}, [r1,:64], r2
++ vst1.64 {d7}, [r1,:64], r2
++ bx lr
++ .endfunc
++
++function ff_add_pixels_clamped_neon, export=1
++ mov r3, r1
++ vld1.64 {d16}, [r1,:64], r2
++ vld1.64 {d0-d1}, [r0,:128]!
++ vaddw.u8 q0, q0, d16
++ vld1.64 {d17}, [r1,:64], r2
++ vld1.64 {d2-d3}, [r0,:128]!
++ vqmovun.s16 d0, q0
++ vld1.64 {d18}, [r1,:64], r2
++ vaddw.u8 q1, q1, d17
++ vld1.64 {d4-d5}, [r0,:128]!
++ vaddw.u8 q2, q2, d18
++ vst1.64 {d0}, [r3,:64], r2
++ vqmovun.s16 d2, q1
++ vld1.64 {d19}, [r1,:64], r2
++ vld1.64 {d6-d7}, [r0,:128]!
++ vaddw.u8 q3, q3, d19
++ vqmovun.s16 d4, q2
++ vst1.64 {d2}, [r3,:64], r2
++ vld1.64 {d16}, [r1,:64], r2
++ vqmovun.s16 d6, q3
++ vld1.64 {d0-d1}, [r0,:128]!
++ vaddw.u8 q0, q0, d16
++ vst1.64 {d4}, [r3,:64], r2
++ vld1.64 {d17}, [r1,:64], r2
++ vld1.64 {d2-d3}, [r0,:128]!
++ vaddw.u8 q1, q1, d17
++ vst1.64 {d6}, [r3,:64], r2
++ vqmovun.s16 d0, q0
++ vld1.64 {d18}, [r1,:64], r2
++ vld1.64 {d4-d5}, [r0,:128]!
++ vaddw.u8 q2, q2, d18
++ vst1.64 {d0}, [r3,:64], r2
++ vqmovun.s16 d2, q1
++ vld1.64 {d19}, [r1,:64], r2
++ vqmovun.s16 d4, q2
++ vld1.64 {d6-d7}, [r0,:128]!
++ vaddw.u8 q3, q3, d19
++ vst1.64 {d2}, [r3,:64], r2
++ vqmovun.s16 d6, q3
++ vst1.64 {d4}, [r3,:64], r2
++ vst1.64 {d6}, [r3,:64], r2
++ bx lr
++ .endfunc
++
+ function ff_float_to_int16_neon, export=1
+ subs r2, r2, #8
+ vld1.64 {d0-d1}, [r1,:128]!
+diff -Nurd ffmpeg.old/libavcodec/arm/simple_idct_neon.S ffmpeg-0.5/libavcodec/arm/simple_idct_neon.S
+--- ffmpeg.old/libavcodec/arm/simple_idct_neon.S 2008-12-30 04:13:52.000000000 +0100
++++ ffmpeg-0.5/libavcodec/arm/simple_idct_neon.S 2009-05-30 11:27:54.000000000 +0200
+@@ -68,6 +68,19 @@
+ .text
+ .align 6
+
++function idct_row4_pld_neon
++ pld [r0]
++ add r3, r0, r1, lsl #2
++ pld [r0, r1]
++ pld [r0, r1, lsl #1]
++ pld [r3, -r1]
++ pld [r3]
++ pld [r3, r1]
++ add r3, r3, r1, lsl #1
++ pld [r3]
++ pld [r3, r1]
++ .endfunc
++
+ function idct_row4_neon
+ vmov.i32 q15, #(1<<(ROW_SHIFT-1))
+ vld1.64 {d2-d5}, [r2,:128]!
+@@ -252,7 +265,7 @@
+ function ff_simple_idct_put_neon, export=1
+ idct_start r2
+
+- bl idct_row4_neon
++ bl idct_row4_pld_neon
+ bl idct_row4_neon
+ add r2, r2, #-128
+ bl idct_col4_neon
+@@ -307,7 +320,7 @@
+ function ff_simple_idct_add_neon, export=1
+ idct_start r2
+
+- bl idct_row4_neon
++ bl idct_row4_pld_neon
+ bl idct_row4_neon
+ add r2, r2, #-128
+ bl idct_col4_neon
+diff -Nurd ffmpeg.old/libavcodec/arm/vp3dsp_neon.S ffmpeg-0.5/libavcodec/arm/vp3dsp_neon.S
+--- ffmpeg.old/libavcodec/arm/vp3dsp_neon.S 1970-01-01 01:00:00.000000000 +0100
++++ ffmpeg-0.5/libavcodec/arm/vp3dsp_neon.S 2009-05-30 11:27:54.000000000 +0200
+@@ -0,0 +1,94 @@
++/*
++ * Copyright (c) 2009 David Conrad
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include "asm.S"
++
++.macro vp3_loop_filter
++ vsubl.u8 q3, d18, d17
++ vsubl.u8 q2, d16, d19
++ vadd.i16 q1, q3, q3
++ vadd.i16 q2, q2, q3
++ vadd.i16 q0, q1, q2
++ vrshr.s16 q0, q0, #3
++ vmovl.u8 q9, d18
++ vdup.u16 q15, r2
++
++ vabs.s16 q1, q0
++ vshr.s16 q0, q0, #15
++ vqsub.u16 q2, q15, q1
++ vqsub.u16 q3, q2, q1
++ vsub.i16 q1, q2, q3
++ veor q1, q1, q0
++ vsub.i16 q0, q1, q0
++
++ vaddw.u8 q2, q0, d17
++ vsub.i16 q3, q9, q0
++ vqmovun.s16 d0, q2
++ vqmovun.s16 d1, q3
++.endm
++
++function ff_vp3_v_loop_filter_neon, export=1
++ sub ip, r0, r1
++ sub r0, r0, r1, lsl #1
++ vld1.64 {d16}, [r0,:64], r1
++ vld1.64 {d17}, [r0,:64], r1
++ vld1.64 {d18}, [r0,:64], r1
++ vld1.64 {d19}, [r0,:64], r1
++ ldrb r2, [r2, #129*4]
++
++ vp3_loop_filter
++
++ vst1.64 {d0}, [ip,:64], r1
++ vst1.64 {d1}, [ip,:64], r1
++ bx lr
++.endfunc
++
++function ff_vp3_h_loop_filter_neon, export=1
++ sub ip, r0, #1
++ sub r0, r0, #2
++ vld1.32 {d16[]}, [r0], r1
++ vld1.32 {d17[]}, [r0], r1
++ vld1.32 {d18[]}, [r0], r1
++ vld1.32 {d19[]}, [r0], r1
++ vld1.32 {d16[1]}, [r0], r1
++ vld1.32 {d17[1]}, [r0], r1
++ vld1.32 {d18[1]}, [r0], r1
++ vld1.32 {d19[1]}, [r0], r1
++ ldrb r2, [r2, #129*4]
++
++ vtrn.8 d16, d17
++ vtrn.8 d18, d19
++ vtrn.16 d16, d18
++ vtrn.16 d17, d19
++
++ vp3_loop_filter
++
++ vtrn.8 d0, d1
++
++ vst1.16 {d0[0]}, [ip], r1
++ vst1.16 {d1[0]}, [ip], r1
++ vst1.16 {d0[1]}, [ip], r1
++ vst1.16 {d1[1]}, [ip], r1
++ vst1.16 {d0[2]}, [ip], r1
++ vst1.16 {d1[2]}, [ip], r1
++ vst1.16 {d0[3]}, [ip], r1
++ vst1.16 {d1[3]}, [ip], r1
++ bx lr
++.endfunc
+diff -Nurd ffmpeg.old/libavcodec/Makefile ffmpeg-0.5/libavcodec/Makefile
+--- ffmpeg.old/libavcodec/Makefile 2009-02-26 03:29:24.000000000 +0100
++++ ffmpeg-0.5/libavcodec/Makefile 2009-05-30 11:29:51.000000000 +0200
+@@ -477,11 +477,15 @@
+ OBJS-$(HAVE_IWMMXT) += arm/dsputil_iwmmxt.o \
+ arm/mpegvideo_iwmmxt.o \
+
++NEON-OBJS-$(CONFIG_THEORA_DECODER) += arm/vp3dsp_neon.o
++NEON-OBJS-$(CONFIG_VP3_DECODER) += arm/vp3dsp_neon.o
++
+ OBJS-$(HAVE_NEON) += arm/dsputil_neon.o \
+ arm/dsputil_neon_s.o \
+ arm/h264dsp_neon.o \
+ arm/h264idct_neon.o \
+ arm/simple_idct_neon.o \
++ $(NEON-OBJS-yes)
+
+ OBJS-$(ARCH_BFIN) += bfin/dsputil_bfin.o \
+ bfin/fdct_bfin.o \
diff --git a/recipes/ffmpeg/ffmpeg_0.5.bb b/recipes/ffmpeg/ffmpeg_0.5.bb
index 54db0042e3..63549b7ce4 100644
--- a/recipes/ffmpeg/ffmpeg_0.5.bb
+++ b/recipes/ffmpeg/ffmpeg_0.5.bb
@@ -3,13 +3,14 @@ require ffmpeg.inc
DEPENDS += "schroedinger libgsm"
PE = "1"
-PR = "r1"
+PR = "r2"
DEFAULT_PREFERENCE = "1"
SRCREV_libswscale = "b2e1c8222eeef74b0ca8053b400957dd69e18e4d"
SRC_URI = "http://ffmpeg.org/releases/ffmpeg-${PV}.tar.bz2 \
file://armv4.patch;patch=1 \
+ file://ffmpeg-arm-update.diff;patch=1 \
"
#S = "${WORKDIR}/git"
diff --git a/recipes/ffmpeg/ffmpeg_git.bb b/recipes/ffmpeg/ffmpeg_git.bb
index fa82fb2044..eaab7f5561 100644
--- a/recipes/ffmpeg/ffmpeg_git.bb
+++ b/recipes/ffmpeg/ffmpeg_git.bb
@@ -7,8 +7,6 @@ PV = "0.4.9+${PR}+gitr${SRCREV}"
PR = "r39"
DEFAULT_PREFERENCE = "-1"
-DEFAULT_PREFERENCE_arm = "1"
-DEFAULT_PREFERENCE_avr32 = "1"
FFBRANCH_arm = "arm"
FFBRANCH ?= "master"
diff --git a/recipes/ffmpeg/omapfbplay_git.bb b/recipes/ffmpeg/omapfbplay_git.bb
index 67189c5c3c..9962ec2688 100644
--- a/recipes/ffmpeg/omapfbplay_git.bb
+++ b/recipes/ffmpeg/omapfbplay_git.bb
@@ -2,11 +2,11 @@ DESCRIPTION = "Simple ffmpeg-based player that uses the omapfb overlays"
DEPENDS = "bzip2 lame ffmpeg virtual/kernel"
LICENSE = "MIT"
-PR = "r15"
+PR = "r16"
PV = "0.0+${PR}+gitr${SRCREV}"
-SRCREV = "f4765e699090872679d4fb2799e35fff5ed4c8df"
+SRCREV = "26df4208b57ccb0f0ca101ae4ddb92c956a0ecc0"
SRC_URI = "git://git.mansr.com/${PN};protocol=git \
file://fbplay-static.diff;patch=1 "
diff --git a/recipes/figment/figment_0.3.5.bb b/recipes/figment/figment_0.3.5.bb
index 03d07a1b8a..548110535f 100644
--- a/recipes/figment/figment_0.3.5.bb
+++ b/recipes/figment/figment_0.3.5.bb
@@ -4,7 +4,8 @@ LICENSE = "GPLv2"
DEPENDS = "gtk+ libxml2"
PR = "r1"
-SRC_URI = "http://handhelds.org/~mallum/downloadables/figment/figment-${PV}.tar.gz \
+# original src_uri, http://handhelds.org/~mallum/downloadables/figment/figment-${PV}.tar.gz, is now unfetchable
+SRC_URI = "http://ftp.sh.cvut.cz/MIRRORS/rock/ROCK-2.0/gnome2/figment/figment-${PV}.tar.bz2 \
file://dotdesktop-name-comment.patch;patch=1"
S = "${WORKDIR}/figment-${PV}"
diff --git a/recipes/flac/files/flac-gcc43-fixes.diff b/recipes/flac/files/flac-gcc43-fixes.diff
new file mode 100644
index 0000000000..8d41490975
--- /dev/null
+++ b/recipes/flac/files/flac-gcc43-fixes.diff
@@ -0,0 +1,10 @@
+--- examples/cpp/encode/file/main.cpp-dist 2007-10-22 15:14:12.000000000 +0200
++++ examples/cpp/encode/file/main.cpp 2007-10-22 15:14:41.000000000 +0200
+@@ -30,6 +30,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "FLAC++/metadata.h"
+ #include "FLAC++/encoder.h"
+
diff --git a/recipes/flac/files/flac-printf-format-fix.diff b/recipes/flac/files/flac-printf-format-fix.diff
new file mode 100644
index 0000000000..2296cdbe91
--- /dev/null
+++ b/recipes/flac/files/flac-printf-format-fix.diff
@@ -0,0 +1,43 @@
+--- src/test_grabbag/cuesheet/main.c-dist 2007-04-10 19:14:42.000000000 +0200
++++ src/test_grabbag/cuesheet/main.c 2007-04-10 19:15:33.000000000 +0200
+@@ -115,12 +115,12 @@ int main(int argc, char *argv[])
+ const char *usage = "usage: test_cuesheet cuesheet_file lead_out_offset [ cdda ]\n";
+
+ if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
+- printf(usage);
++ fputs(usage, stdout);
+ return 0;
+ }
+
+ if(argc < 3 || argc > 4) {
+- fprintf(stderr, usage);
++ fputs(usage, stderr);
+ return 255;
+ }
+
+@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
+ if(0 == strcmp(argv[3], "cdda"))
+ is_cdda = true;
+ else {
+- fprintf(stderr, usage);
++ fputs(usage, stderr);
+ return 255;
+ }
+ }
+--- src/test_grabbag/picture/main.c-dist 2007-04-10 19:15:47.000000000 +0200
++++ src/test_grabbag/picture/main.c 2007-04-10 19:16:02.000000000 +0200
+@@ -211,12 +211,12 @@ int main(int argc, char *argv[])
+ const char *usage = "usage: test_pictures path_prefix\n";
+
+ if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
+- printf(usage);
++ fputs(usage, stdout);
+ return 0;
+ }
+
+ if(argc != 2) {
+- fprintf(stderr, usage);
++ fputs(usage, stderr);
+ return 255;
+ }
+
diff --git a/recipes/flac/flac.inc b/recipes/flac/flac.inc
index 79fa504fec..cadc32ff33 100644
--- a/recipes/flac/flac.inc
+++ b/recipes/flac/flac.inc
@@ -1,10 +1,10 @@
DESCRIPTION = "FLAC is a Free Lossless Audio Codec."
+HOMEPAGE = "http://flac.sourceforge.net"
LICENSE = "BSD GPL"
SECTION = "libs"
DEPENDS = "libogg"
SRC_URI = "${SOURCEFORGE_MIRROR}/flac/flac-${PV}.tar.gz \
- file://disable-xmms-plugin.patch;patch=1 \
file://xmms.m4"
inherit autotools
@@ -27,50 +27,7 @@ do_configure () {
}
do_stage () {
- install -d ${STAGING_DATADIR}/aclocal
-
- oe_libinstall -a -so -C src/libOggFLAC libOggFLAC ${STAGING_LIBDIR}/
- install -d ${STAGING_INCDIR}/OggFLAC
- install -m 0644 ${S}/include/OggFLAC/export.h ${STAGING_INCDIR}/OggFLAC/export.h
-
- install -m 0644 ${S}/include/OggFLAC/all.h ${STAGING_INCDIR}/OggFLAC/all.h
- install -m 0644 ${S}/include/OggFLAC/stream_encoder.h ${STAGING_INCDIR}/OggFLAC/stream_encoder.h
- install -m 0644 ${S}/include/OggFLAC/stream_decoder.h ${STAGING_INCDIR}/OggFLAC/stream_decoder.h
- install -m 0644 ${S}/src/libOggFLAC/libOggFLAC.m4 ${STAGING_DATADIR}/aclocal/
-
- oe_libinstall -a -so -C src/libFLAC libFLAC ${STAGING_LIBDIR}/
- install -d ${STAGING_INCDIR}/FLAC
- install -m 0644 ${S}/include/FLAC/export.h ${STAGING_INCDIR}/FLAC/export.h
- install -m 0644 ${S}/include/FLAC/metadata.h ${STAGING_INCDIR}/FLAC/metadata.h
- install -m 0644 ${S}/include/FLAC/all.h ${STAGING_INCDIR}/FLAC/all.h
- install -m 0644 ${S}/include/FLAC/format.h ${STAGING_INCDIR}/FLAC/format.h
- install -m 0644 ${S}/include/FLAC/stream_encoder.h ${STAGING_INCDIR}/FLAC/stream_encoder.h
- install -m 0644 ${S}/include/FLAC/stream_decoder.h ${STAGING_INCDIR}/FLAC/stream_decoder.h
- install -m 0644 ${S}/include/FLAC/ordinals.h ${STAGING_INCDIR}/FLAC/ordinals.h
- install -m 0644 ${S}/include/FLAC/seekable_stream_encoder.h ${STAGING_INCDIR}/FLAC/seekable_stream_encoder.h
- install -m 0644 ${S}/include/FLAC/file_encoder.h ${STAGING_INCDIR}/FLAC/file_encoder.h
- install -m 0644 ${S}/include/FLAC/seekable_stream_decoder.h ${STAGING_INCDIR}/FLAC/seekable_stream_decoder.h
- install -m 0644 ${S}/include/FLAC/file_decoder.h ${STAGING_INCDIR}/FLAC/file_decoder.h
- install -m 0644 ${S}/include/FLAC/assert.h ${STAGING_INCDIR}/FLAC/assert.h
- install -m 0644 ${S}/include/FLAC/callback.h ${STAGING_INCDIR}/FLAC/callback.h
- install -m 0644 ${S}/src/libFLAC/libFLAC.m4 ${STAGING_DATADIR}/aclocal/
-
- oe_libinstall -a -so -C src/libFLAC++ libFLAC++ ${STAGING_LIBDIR}/
- install -d ${STAGING_INCDIR}/FLAC++
- install -m 0644 ${S}/include/FLAC++/export.h ${STAGING_INCDIR}/FLAC++/export.h
- install -m 0644 ${S}/include/FLAC++/metadata.h ${STAGING_INCDIR}/FLAC++/metadata.h
- install -m 0644 ${S}/include/FLAC++/all.h ${STAGING_INCDIR}/FLAC++/all.h
- install -m 0644 ${S}/include/FLAC++/encoder.h ${STAGING_INCDIR}/FLAC++/encoder.h
- install -m 0644 ${S}/include/FLAC++/decoder.h ${STAGING_INCDIR}/FLAC++/decoder.h
- install -m 0644 ${S}/src/libFLAC++/libFLAC++.m4 ${STAGING_DATADIR}/aclocal/
-
- oe_libinstall -a -so -C src/libOggFLAC++ libOggFLAC++ ${STAGING_LIBDIR}/
- install -d ${STAGING_INCDIR}/OggFLAC++
- install -m 0644 ${S}/include/OggFLAC++/export.h ${STAGING_INCDIR}/OggFLAC++/export.h
- install -m 0644 ${S}/include/OggFLAC++/all.h ${STAGING_INCDIR}/OggFLAC++/all.h
- install -m 0644 ${S}/include/OggFLAC++/encoder.h ${STAGING_INCDIR}/OggFLAC++/encoder.h
- install -m 0644 ${S}/include/OggFLAC++/decoder.h ${STAGING_INCDIR}/OggFLAC++/decoder.h
- install -m 0644 ${S}/src/libOggFLAC++/libOggFLAC++.m4 ${STAGING_DATADIR}/aclocal/
+ autotools_stage_all
}
PACKAGES += "libflac libflac++ liboggflac liboggflac++"
diff --git a/recipes/flac/flac_1.1.0.bb b/recipes/flac/flac_1.1.0.bb
index debe8d73de..5bb0d6c3cf 100644
--- a/recipes/flac/flac_1.1.0.bb
+++ b/recipes/flac/flac_1.1.0.bb
@@ -1,3 +1,5 @@
require flac.inc
-PR = "r6"
+PR = "r7"
+
+SRC_URI += "file://disable-xmms-plugin.patch;patch=1"
diff --git a/recipes/flac/flac_1.1.2.bb b/recipes/flac/flac_1.1.2.bb
index 69eb07125e..70d30c98d7 100644
--- a/recipes/flac/flac_1.1.2.bb
+++ b/recipes/flac/flac_1.1.2.bb
@@ -1,6 +1,8 @@
require flac.inc
-PR = "r6"
+PR = "r7"
+
+SRC_URI += "file://disable-xmms-plugin.patch;patch=1"
do_configure_append () {
# removes '-read-only-relocs' which is enabled for PowerPC builds.
diff --git a/recipes/flac/flac_1.2.1.bb b/recipes/flac/flac_1.2.1.bb
new file mode 100644
index 0000000000..eea1cbb9a5
--- /dev/null
+++ b/recipes/flac/flac_1.2.1.bb
@@ -0,0 +1,7 @@
+require flac.inc
+
+PR = "r1"
+
+# fixes from openSUSE:
+SRC_URI += "file://flac-gcc43-fixes.diff;patch=1;pnum=0 \
+ file://flac-printf-format-fix.diff;patch=1;pnum=0"
diff --git a/recipes/fltk/fltk_1.1.9.bb b/recipes/fltk/fltk_1.1.9.bb
index a2c5dcb5ab..b30da2eeea 100644
--- a/recipes/fltk/fltk_1.1.9.bb
+++ b/recipes/fltk/fltk_1.1.9.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
PRIORITY = "optional"
LICENSE = "LGPL"
DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
-PR = "r0"
+PR = "r1"
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 \
@@ -12,7 +12,9 @@ SRC_URI = "ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/fltk/${PV}/fl
S = "${WORKDIR}/fltk-${PV}"
-inherit lib_package autotools binconfig
+inherit lib_package autotools_stage binconfig
+
+TARGET_CC_ARCH += "${LDFLAGS}"
EXTRA_OECONF = "--enable-shared \
--enable-threads \
@@ -23,10 +25,6 @@ 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)
diff --git a/recipes/fontconfig/fontconfig_2.6.99.bb b/recipes/fontconfig/fontconfig_2.6.99.bb
new file mode 100644
index 0000000000..c812350b41
--- /dev/null
+++ b/recipes/fontconfig/fontconfig_2.6.99.bb
@@ -0,0 +1,66 @@
+SECTION = "libs"
+LICENSE = "BSD"
+DESCRIPTION = "A library for configuring and customizing font access."
+DEPENDS = "expat freetype zlib"
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_angstrom = "1"
+
+SRCREV = "96194cc3fa484837bf41598ff3f3d09b97c8dba4"
+SRC_URI = "git://anongit.freedesktop.org/~behdad/fontconfig;protocol=git \
+"
+
+S = "${WORKDIR}/git"
+
+PACKAGES =+ "fontconfig-utils-dbg fontconfig-utils "
+FILES_fontconfig-utils-dbg = "${bindir}/*.dbg"
+FILES_fontconfig-utils = "${bindir}/*"
+
+# Work around past breakage in debian.bbclass
+RPROVIDES_fontconfig-utils = "libfontconfig-utils"
+RREPLACES_fontconfig-utils = "libfontconfig-utils"
+RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
+DEBIAN_NOAUTONAME_fontconfig-utils = "1"
+
+PARALLEL_MAKE = ""
+
+inherit autotools_stage
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+export HASDOCBOOK="no"
+
+EXTRA_OECONF = " --disable-docs --with-arch=${HOST_ARCH} --with-cache-dir=/var/lib/fontconfig"
+EXTRA_OEMAKE = "FC_LANG=fc-lang FC_GLYPHNAME=fc-glyphname"
+
+BUILD_CFLAGS += " -I${STAGING_INCDIR}/freetype2"
+
+do_configure_append () {
+ sed -i 's|LDFLAGS =.*|LDFLAGS =|' fc-case/Makefile
+ sed -i 's|LDFLAGS =.*|LDFLAGS =|' fc-glyphname/Makefile
+ sed -i 's|LDFLAGS =.*|LDFLAGS =|' fc-lang/Makefile
+ sed -i 's|LDFLAGS =.*|LDFLAGS =|' fc-arch/Makefile
+
+ sed -i 's|CFLAGS =.*|CFLAGS =${BUILD_CFLAGS}|' fc-case/Makefile
+ sed -i 's|CFLAGS =.*|CFLAGS =${BUILD_CFLAGS}|' fc-glyphname/Makefile
+ sed -i 's|CFLAGS =.*|CFLAGS =${BUILD_CFLAGS}|' fc-lang/Makefile
+ sed -i 's|CFLAGS =.*|CFLAGS =${BUILD_CFLAGS}|' fc-arch/Makefile
+
+ sed -i 's|CPPFLAGS =.*|CPPFLAGS =${BUILD_CPPFLAGS}|' fc-case/Makefile
+ sed -i 's|CPPFLAGS =.*|CPPFLAGS =${BUILD_CPPFLAGS}|' fc-glyphname/Makefile
+ sed -i 's|CPPFLAGS =.*|CPPFLAGS =${BUILD_CPPFLAGS}|' fc-lang/Makefile
+ sed -i 's|CPPFLAGS =.*|CPPFLAGS =${BUILD_CPPFLAGS}|' fc-arch/Makefile
+
+ sed -i 's|CXXFLAGS =.*|CFLAGS =${BUILD_CXXFLAGS}|' fc-case/Makefile
+ sed -i 's|CXXFLAGS =.*|CFLAGS =${BUILD_CXXFLAGS}|' fc-glyphname/Makefile
+ sed -i 's|CXXFLAGS =.*|CFLAGS =${BUILD_CXXFLAGS}|' fc-lang/Makefile
+ sed -i 's|CXXFLAGS =.*|CFLAGS =${BUILD_CXXFLAGS}|' fc-arch/Makefile
+}
+
+do_compile_append() {
+ sed -i -e s:${STAGING_LIBDIR}:\$\{libdir\}:g fontconfig.pc
+}
+
+do_install () {
+ autotools_do_install
+}
+
diff --git a/recipes/fping/files/sourceforge-truckload.patch b/recipes/fping/files/sourceforge-truckload.patch
new file mode 100644
index 0000000000..ef9971ad32
--- /dev/null
+++ b/recipes/fping/files/sourceforge-truckload.patch
@@ -0,0 +1,257 @@
+upstream: http://sourceforge.net/tracker/?func=detail&aid=2748675&group_id=183434&atid=905228
+status: submitted to SF by anonymous poster on Apr 9 2009
+origin: anonymous on SourceForge
+comment: various minor fixes - ID: 2748675
+
+The attached patch fixes a truckload of compiler warnings and fflushes the
+output stream after each line. The new function `lf_and_flush' was
+introduced to accomplish this. `recvfrom' now gets a real socklen_t if its
+existance is detected via autoconf.
+
+Submitted: Nobody/Anonymous ( nobody ) - 2009-04-09 21:26
+
+--- fping-2.4b2_to/configure.in 2001-11-03 16:36:49.000000000 +0100
++++ fping/configure.in 2009-04-09 22:57:32.000000000 +0200
+@@ -29,4 +29,7 @@
+ dnl Checks for header files.
+ AC_CHECK_HEADERS(unistd.h sys/file.h stdlib.h sys/select.h)
+
++AC_CHECK_TYPES([socklen_t], , , [#include <sys/types.h>
++ #include <sys/socket.h>])
++
+ AC_OUTPUT(Makefile)
+--- fping-2.4b2_to/fping.c 2001-07-20 19:10:26.000000000 +0200
++++ fping/fping.c 2009-04-09 23:10:08.000000000 +0200
+@@ -114,6 +114,10 @@
+
+ #include "options.h"
+
++#ifndef HAVE_SOCKLEN_T
++typedef int socklen_t;
++#endif
++
+ /*** externals ***/
+
+ extern char *optarg;
+@@ -314,6 +318,7 @@
+ void add_addr();
+ char *na_cat();
+ char *cpystr();
++void lf_and_flush();
+ void crash_and_burn();
+ void errno_crash_and_burn();
+ char *get_host_by_address();
+@@ -338,6 +343,7 @@
+ void add_addr( char *name, char *host, struct in_addr ipaddr );
+ char *na_cat( char *name, struct in_addr ipaddr );
+ char *cpystr( char *string );
++void lf_and_flush( FILE *stream );
+ void crash_and_burn( char *message );
+ void errno_crash_and_burn( char *message );
+ char *get_host_by_address( struct in_addr in );
+@@ -411,7 +417,7 @@
+
+ if( ( uid = getuid() ) )
+ {
+- seteuid( getuid() );
++ seteuid( uid );
+
+ }/* IF */
+
+@@ -610,7 +616,7 @@
+
+ if( ( ping_data_size > MAX_PING_DATA ) || ( ping_data_size < MIN_PING_DATA ) )
+ {
+- fprintf( stderr, "%s: data size %u not valid, must be between %u and %u\n",
++ fprintf( stderr, "%s: data size %u not valid, must be between %lu and %u\n",
+ prog, ping_data_size, MIN_PING_DATA, MAX_PING_DATA );
+ usage();
+
+@@ -783,7 +789,6 @@
+ int iBitpos;
+ int iMask = 1;
+ int failed = 0;
+- unsigned long uTemp;
+
+ /* two possible forms are allowed here */
+
+@@ -1085,6 +1090,7 @@
+ }/* WHILE */
+
+ finish();
++ return 0;
+
+ } /* main() */
+
+@@ -1130,7 +1136,7 @@
+ if( verbose_flag )
+ printf( " is unreachable" );
+
+- printf( "\n" );
++ lf_and_flush( stdout );
+
+ }/* IF */
+ }/* IF */
+@@ -1175,7 +1181,7 @@
+ void print_per_system_stats( void )
+ #endif /* _NO_PROTO */
+ {
+- int i, j, k, avg;
++ int i, j, avg;
+ HOST_ENTRY *h;
+ char *buf;
+ int bufsize;
+@@ -1210,7 +1216,7 @@
+
+ }/* FOR */
+
+- fprintf( stderr, "\n" );
++ lf_and_flush( stderr );
+
+ }/* IF */
+ else
+@@ -1253,7 +1259,7 @@
+ else
+ fprintf( stderr, " -" );
+
+- fprintf( stderr, "\n" );
++ lf_and_flush( stderr );
+
+ }/* FOR */
+ }/* IF */
+@@ -1284,11 +1290,10 @@
+ void print_per_system_splits( void )
+ #endif /* _NO_PROTO */
+ {
+- int i, j, k, avg;
++ int i, avg;
+ HOST_ENTRY *h;
+ char *buf;
+ int bufsize;
+- int resp;
+ struct tm *curr_tm;
+
+ bufsize = max_hostname_len + 1;
+@@ -1463,9 +1468,9 @@
+ {
+ printf( "%s", h->host );
+ if( verbose_flag )
+- printf( " error while sending ping: %s\n", strerror( errno ) );
++ printf( " error while sending ping: %s", strerror( errno ) );
+
+- printf( "\n" );
++ lf_and_flush( stdout );
+
+ }/* IF */
+
+@@ -1631,7 +1636,7 @@
+ if( response_addr.sin_addr.s_addr != h->saddr.sin_addr.s_addr )
+ fprintf( stderr, " [<- %s]", inet_ntoa( response_addr.sin_addr ) );
+
+- fprintf( stderr, "\n" );
++ lf_and_flush( stderr );
+
+ }/* IF */
+ }/* IF */
+@@ -1664,7 +1669,7 @@
+ if( response_addr.sin_addr.s_addr != h->saddr.sin_addr.s_addr )
+ printf( " [<- %s]", inet_ntoa( response_addr.sin_addr ) );
+
+- printf( "\n" );
++ lf_and_flush( stdout );
+
+ }/* IF */
+ }/* IF */
+@@ -1692,7 +1697,7 @@
+ if( response_addr.sin_addr.s_addr != h->saddr.sin_addr.s_addr )
+ printf( " [<- %s]", inet_ntoa( response_addr.sin_addr ) );
+
+- printf( "\n" );
++ lf_and_flush( stdout );
+
+ }/* IF */
+
+@@ -1725,7 +1730,6 @@
+ #endif /* _NO_PROTO */
+ {
+ struct icmp *sent_icmp;
+- struct ip *sent_ip;
+ u_char *c;
+ HOST_ENTRY *h;
+
+@@ -1758,7 +1762,7 @@
+ if( inet_addr( h->host ) == -1 )
+ fprintf( stderr, " (%s)", inet_ntoa( h->saddr.sin_addr ) );
+
+- fprintf( stderr, "\n" );
++ lf_and_flush( stderr );
+
+ }/* IF */
+
+@@ -1781,7 +1785,7 @@
+ if( inet_addr( h->host ) == -1 )
+ fprintf( stderr, " (%s)", inet_ntoa( h->saddr.sin_addr ) );
+
+- fprintf( stderr, "\n" );
++ lf_and_flush( stderr );
+
+ }/* IF */
+
+@@ -2241,6 +2245,29 @@
+
+ } /* cpystr() */
+
++/************************************************************
++
++ Function: lf_and_flush
++
++*************************************************************
++
++ Inputs: FILE *stream
++
++ Description:
++
++************************************************************/
++
++#ifdef _NO_PROTO
++void lf_and_flush( stream )
++FILE *stream;
++#else
++void lf_and_flush( FILE *stream )
++#endif /* _NO_PROTO */
++{
++ putc( '\n', stream );
++ fflush( stream );
++} /* lf_and_flush() */
++
+
+ /************************************************************
+
+@@ -2405,7 +2432,7 @@
+ void u_sleep( int u_sec )
+ #endif /* _NO_PROTO */
+ {
+- int nfound, slen, n;
++ int nfound;
+ struct timeval to;
+ fd_set readset, writeset;
+
+@@ -2418,8 +2445,6 @@
+ if( nfound < 0 )
+ errno_crash_and_burn( "select" );
+
+- return;
+-
+ } /* u_sleep() */
+
+
+@@ -2448,7 +2473,8 @@
+ int recvfrom_wto( int s, char *buf, int len, struct sockaddr *saddr, int timo )
+ #endif /* _NO_PROTO */
+ {
+- int nfound, slen, n;
++ int nfound, n;
++ socklen_t slen;
+ struct timeval to;
+ fd_set readset, writeset;
+
diff --git a/recipes/fping/fping_2.3+2.4b2to.bb b/recipes/fping/fping_2.3+2.4b2to.bb
new file mode 100644
index 0000000000..20b7bb07a0
--- /dev/null
+++ b/recipes/fping/fping_2.3+2.4b2to.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "Fast, scriptable ping"
+LICENSE = "Stanford"
+PR = "r0"
+
+SRC_URI = " \
+ http://fping.sourceforge.net/download/fping.tar.gz \
+ file://sourceforge-truckload.patch;patch=1 \
+"
+
+S = "${WORKDIR}/fping-2.4b2_to"
+
+inherit autotools
diff --git a/recipes/freesmartphone/frameworkd-devel_git.bb b/recipes/freesmartphone/frameworkd-devel_git.bb
index f5f6c0bc2d..a6439ee653 100644
--- a/recipes/freesmartphone/frameworkd-devel_git.bb
+++ b/recipes/freesmartphone/frameworkd-devel_git.bb
@@ -1,5 +1,5 @@
require frameworkd_git.bb
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/frameworkd', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "frameworkd:"
PROVIDES = "frameworkd"
RPROVIDES = "frameworkd"
PV = "0.8.5.x+gitr${SRCREV}"
diff --git a/recipes/gammu/gammu-1.24.0/findmysql.patch b/recipes/gammu/gammu-1.24.0/findmysql.patch
new file mode 100644
index 0000000000..b6345b1bd0
--- /dev/null
+++ b/recipes/gammu/gammu-1.24.0/findmysql.patch
@@ -0,0 +1,35 @@
+Index: gammu-1.24.0/cmake/FindMySQL.cmake
+===================================================================
+--- gammu-1.24.0.orig/cmake/FindMySQL.cmake 2008-11-20 15:37:28.000000000 +0000
++++ gammu-1.24.0/cmake/FindMySQL.cmake 2009-06-12 12:18:06.000000000 +0000
+@@ -30,7 +30,7 @@
+ ARGS --include
+ OUTPUT_VARIABLE MY_TMP)
+
+- string(REGEX REPLACE "-I([^ ]*)( .*)?" "\\1" MY_TMP "${MY_TMP}")
++ string(REGEX REPLACE "-I([^ ]+)( .*)?" "\\1" MY_TMP "${MY_TMP}")
+
+ set(MYSQL_ADD_INCLUDE_DIR ${MY_TMP} CACHE FILEPATH INTERNAL)
+
+@@ -41,17 +41,19 @@
+
+ set(MYSQL_ADD_LIBRARIES "")
+
+- string(REGEX MATCHALL "-l[^ ]*" MYSQL_LIB_LIST "${MY_TMP}")
++ string(REGEX MATCHALL "(^| )-l[^ ]+" MYSQL_LIB_LIST "${MY_TMP}")
+ foreach(LIB ${MYSQL_LIB_LIST})
+ string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" LIB "${LIB}")
++ message("${LIB}")
+ list(APPEND MYSQL_ADD_LIBRARIES "${LIB}")
+ endforeach(LIB ${MYSQL_LIBS})
+
+ set(MYSQL_ADD_LIBRARY_PATH "")
+
+- string(REGEX MATCHALL "-L[^ ]*" MYSQL_LIBDIR_LIST "${MY_TMP}")
++ string(REGEX MATCHALL "-L[^ ]+" MYSQL_LIBDIR_LIST "${MY_TMP}")
+ foreach(LIB ${MYSQL_LIBDIR_LIST})
+ string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" LIB "${LIB}")
++ message("${LIB}")
+ list(APPEND MYSQL_ADD_LIBRARY_PATH "${LIB}")
+ endforeach(LIB ${MYSQL_LIBS})
+
diff --git a/recipes/gammu/gammu_1.24.0.bb b/recipes/gammu/gammu_1.24.0.bb
new file mode 100644
index 0000000000..56a1a91729
--- /dev/null
+++ b/recipes/gammu/gammu_1.24.0.bb
@@ -0,0 +1,42 @@
+DESCRIPTION = "GNU All Mobile Managment Utilities"
+SECTION = "console/network"
+DEPENDS = "bluez-libs cmake-native python mysql"
+RDEPENDS_python-${PN} = "python-core"
+LICENSE = "GPL"
+HOMEPAGE = "http://www.gammu.org/"
+PR = "r0"
+
+SRC_URI = "http://dl.cihar.com/gammu/releases/gammu-${PV}.tar.bz2 \
+ file://findmysql.patch;patch=1"
+
+inherit distutils-common-base cmake
+
+PYTHON_DIR = "${@python_dir(d)}"
+
+do_configure() {
+ cd ${S}
+ sed -i 's@^cmake [^$]*\$@cmake -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_TARGET} $@' configure
+ sed -i 's@\${PYTHON_SITEDIR}@${libdir}/${PYTHON_DIR}/site-packages@g' python/gammu/CMakeLists.txt
+ ./configure --prefix=${prefix} --enable-shared --enable-backup
+}
+
+do_stage() {
+ autotools_stage_all
+}
+
+# gammu has a non-standard uninstalled .pc file, which confuses pkgconfig.bbclass.
+# Replace it by custom do_stage_append():
+#do_stage_append () {
+# install -d ${PKG_CONFIG_DIR}
+# cat build-configure/cfg/gammu.pc > ${PKG_CONFIG_DIR}/gammu.pc
+#}
+
+PACKAGES =+ "${PN}-smsd libgammu libgsmsd python-${PN}"
+
+FILES_${PN} = "${bindir}/gammu ${bindir}/jadmaker ${sysconfdir}/bash_completion.d/gammu"
+FILES_${PN}-smsd = "${bindir}/gammu-smsd*"
+FILES_${PN}-dev += "${bindir}/gammu-config ${libdir}/*.so"
+FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/.debug ${libdir}/python*/site-packages/gammu/.debug"
+FILES_libgammu = "${libdir}/libGammu.so.*"
+FILES_libgsmsd = "${libdir}/libgsmsd.so.*"
+FILES_python-${PN} = "${libdir}/${PYTHON_DIR}/site-packages/gammu/*.??"
diff --git a/recipes/gcc/gcc-3.3.4.inc b/recipes/gcc/gcc-3.3.4.inc
index eec46d556d..635e617a78 100644
--- a/recipes/gcc/gcc-3.3.4.inc
+++ b/recipes/gcc/gcc-3.3.4.inc
@@ -1,5 +1,7 @@
require gcc-common.inc
+INC_PR = "r10"
+
SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://arm-gotoff.dpatch;patch=1;pnum=0 \
file://arm-ldm.dpatch;patch=1;pnum=0 \
diff --git a/recipes/gcc/gcc-3.4.3.inc b/recipes/gcc/gcc-3.4.3.inc
index 6511dfbd17..72f9042212 100644
--- a/recipes/gcc/gcc-3.4.3.inc
+++ b/recipes/gcc/gcc-3.4.3.inc
@@ -1,5 +1,7 @@
require gcc-common.inc
+INC_PR = "r18"
+
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://gcc34-reverse-compare.patch;patch=1 \
file://gcc34-arm-ldm.patch;patch=1 \
diff --git a/recipes/gcc/gcc-3.4.4.inc b/recipes/gcc/gcc-3.4.4.inc
index 2bed5f8959..9a02c5d20b 100644
--- a/recipes/gcc/gcc-3.4.4.inc
+++ b/recipes/gcc/gcc-3.4.4.inc
@@ -1,5 +1,7 @@
require gcc-common.inc
+INC_PR = "r14"
+
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://gcc34-reverse-compare.patch;patch=1 \
file://gcc34-arm-ldm.patch;patch=1 \
diff --git a/recipes/gcc/gcc-4.1.0.inc b/recipes/gcc/gcc-4.1.0.inc
index d6f6198013..7bb1a34f76 100644
--- a/recipes/gcc/gcc-4.1.0.inc
+++ b/recipes/gcc/gcc-4.1.0.inc
@@ -1,5 +1,7 @@
require gcc-common.inc
+INC_PR = "r9"
+
DEFAULT_PREFERENCE = "-1"
# Use the same patches as gcc-4.1.1 does
diff --git a/recipes/gcc/gcc-4.1.1.inc b/recipes/gcc/gcc-4.1.1.inc
index f16928479b..20da89aee6 100644
--- a/recipes/gcc/gcc-4.1.1.inc
+++ b/recipes/gcc/gcc-4.1.1.inc
@@ -2,6 +2,8 @@ require gcc-common.inc
DEPENDS = "mpfr gmp"
+INC_PR = "r23"
+
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://100-uclibc-conf.patch;patch=1 \
file://110-arm-eabi.patch;patch=1 \
diff --git a/recipes/gcc/gcc-4.1.2.inc b/recipes/gcc/gcc-4.1.2.inc
index ed4e3c408d..2eaa133f97 100644
--- a/recipes/gcc/gcc-4.1.2.inc
+++ b/recipes/gcc/gcc-4.1.2.inc
@@ -2,6 +2,8 @@ require gcc-common.inc
DEPENDS = "mpfr gmp"
+INC_PR = "r20"
+
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://100-uclibc-conf.patch;patch=1 \
file://110-arm-eabi.patch;patch=1 \
diff --git a/recipes/gcc/gcc-4.2.1.inc b/recipes/gcc/gcc-4.2.1.inc
index b48d709115..c4e2c3a0c6 100644
--- a/recipes/gcc/gcc-4.2.1.inc
+++ b/recipes/gcc/gcc-4.2.1.inc
@@ -29,7 +29,6 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://arm-thumb-cache.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://pr34130.patch;patch=1 \
diff --git a/recipes/gcc/gcc-4.2.1/fix-ICE-in-arm_unwind_emit_set.diff b/recipes/gcc/gcc-4.2.1/fix-ICE-in-arm_unwind_emit_set.diff
deleted file mode 100644
index 568e15abff..0000000000
--- a/recipes/gcc/gcc-4.2.1/fix-ICE-in-arm_unwind_emit_set.diff
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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/recipes/gcc/gcc-4.2.2.inc b/recipes/gcc/gcc-4.2.2.inc
index 7bb17cefed..0eb1223727 100644
--- a/recipes/gcc/gcc-4.2.2.inc
+++ b/recipes/gcc/gcc-4.2.2.inc
@@ -3,6 +3,8 @@ LICENSE = "GPLv3"
DEPENDS = "mpfr gmp"
+INC_PR = "r15"
+
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://100-uclibc-conf.patch;patch=1 \
file://103-uclibc-conf-noupstream.patch;patch=1 \
@@ -31,7 +33,6 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://arm-thumb-cache.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 \
diff --git a/recipes/gcc/gcc-4.2.2/fix-ICE-in-arm_unwind_emit_set.diff b/recipes/gcc/gcc-4.2.2/fix-ICE-in-arm_unwind_emit_set.diff
deleted file mode 100644
index 568e15abff..0000000000
--- a/recipes/gcc/gcc-4.2.2/fix-ICE-in-arm_unwind_emit_set.diff
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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/recipes/gcc/gcc-4.2.3.inc b/recipes/gcc/gcc-4.2.3.inc
index 7d623f53e3..1627a96e38 100644
--- a/recipes/gcc/gcc-4.2.3.inc
+++ b/recipes/gcc/gcc-4.2.3.inc
@@ -3,6 +3,8 @@ LICENSE = "GPLv3"
DEPENDS = "mpfr gmp"
+INC_PR = "r11"
+
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://100-uclibc-conf.patch;patch=1 \
file://103-uclibc-conf-noupstream.patch;patch=1 \
@@ -31,7 +33,6 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://arm-thumb-cache.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 \
diff --git a/recipes/gcc/gcc-4.2.3/fix-ICE-in-arm_unwind_emit_set.diff b/recipes/gcc/gcc-4.2.3/fix-ICE-in-arm_unwind_emit_set.diff
deleted file mode 100644
index 568e15abff..0000000000
--- a/recipes/gcc/gcc-4.2.3/fix-ICE-in-arm_unwind_emit_set.diff
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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/recipes/gcc/gcc-4.2.4.inc b/recipes/gcc/gcc-4.2.4.inc
index 80d38f91cf..5afd08ba7c 100644
--- a/recipes/gcc/gcc-4.2.4.inc
+++ b/recipes/gcc/gcc-4.2.4.inc
@@ -3,7 +3,7 @@ LICENSE = "GPLv3"
DEPENDS = "mpfr gmp"
-INC_PR = "r6"
+INC_PR = "r7"
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://100-uclibc-conf.patch;patch=1 \
@@ -33,7 +33,6 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://arm-thumb-cache.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 \
diff --git a/recipes/gcc/gcc-4.2.4/fix-ICE-in-arm_unwind_emit_set.diff b/recipes/gcc/gcc-4.2.4/fix-ICE-in-arm_unwind_emit_set.diff
deleted file mode 100644
index 568e15abff..0000000000
--- a/recipes/gcc/gcc-4.2.4/fix-ICE-in-arm_unwind_emit_set.diff
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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/recipes/gcc/gcc-4.3.1.inc b/recipes/gcc/gcc-4.3.1.inc
index d5390d7f27..0b05f0a88c 100644
--- a/recipes/gcc/gcc-4.3.1.inc
+++ b/recipes/gcc/gcc-4.3.1.inc
@@ -7,6 +7,8 @@ LICENSE = "GPLv3"
DEPENDS = "mpfr gmp"
+INC_PR = "r19"
+
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \
file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \
@@ -48,7 +50,6 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://arm-softfloat.patch;patch=1 \
file://arm-thumb.patch;patch=1 \
file://arm-thumb-cache.patch;patch=1 \
- file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
file://gfortran-4.3.x.patch;patch=1 \
file://gcc-4.0.2-e300c2c3.patch;patch=1 \
diff --git a/recipes/gcc/gcc-4.3.1/fix-ICE-in-arm_unwind_emit_set.diff b/recipes/gcc/gcc-4.3.1/fix-ICE-in-arm_unwind_emit_set.diff
deleted file mode 100644
index b8a147d3d9..0000000000
--- a/recipes/gcc/gcc-4.3.1/fix-ICE-in-arm_unwind_emit_set.diff
+++ /dev/null
@@ -1,28 +0,0 @@
---- /tmp/arm.c 2008-03-17 14:24:39.590464969 +0100
-+++ gcc-4.3.0/gcc/config/arm/arm.c 2008-03-17 14:12:21.614701982 +0100
-@@ -15959,6 +15959,9 @@
- int regno;
- int lo_mask = mask & 0xFF;
- int pushed_words = 0;
-+ rtx e0;
-+ rtx e1;
-+ unsigned reg;
-
- gcc_assert (mask);
-
-@@ -16025,6 +16028,15 @@
-
- return;
- }
-+ 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
- {
- if (mask & 0xFF)
diff --git a/recipes/gcc/gcc-4.3.2.inc b/recipes/gcc/gcc-4.3.2.inc
index 967eb92285..5483b8fd66 100644
--- a/recipes/gcc/gcc-4.3.2.inc
+++ b/recipes/gcc/gcc-4.3.2.inc
@@ -7,6 +7,8 @@ LICENSE = "GPLv3"
DEPENDS = "mpfr gmp"
+INC_PR = "r9"
+
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \
file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \
@@ -45,7 +47,6 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://904-flatten-switch-stmt-00.patch;patch=1 \
file://arm-nolibfloat.patch;patch=1 \
file://arm-softfloat.patch;patch=1 \
- file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
file://gfortran-4.3.x.patch;patch=1 \
file://gcc-4.0.2-e300c2c3.patch;patch=1 \
diff --git a/recipes/gcc/gcc-4.3.2/fix-ICE-in-arm_unwind_emit_set.diff b/recipes/gcc/gcc-4.3.2/fix-ICE-in-arm_unwind_emit_set.diff
deleted file mode 100644
index b8a147d3d9..0000000000
--- a/recipes/gcc/gcc-4.3.2/fix-ICE-in-arm_unwind_emit_set.diff
+++ /dev/null
@@ -1,28 +0,0 @@
---- /tmp/arm.c 2008-03-17 14:24:39.590464969 +0100
-+++ gcc-4.3.0/gcc/config/arm/arm.c 2008-03-17 14:12:21.614701982 +0100
-@@ -15959,6 +15959,9 @@
- int regno;
- int lo_mask = mask & 0xFF;
- int pushed_words = 0;
-+ rtx e0;
-+ rtx e1;
-+ unsigned reg;
-
- gcc_assert (mask);
-
-@@ -16025,6 +16028,15 @@
-
- return;
- }
-+ 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
- {
- if (mask & 0xFF)
diff --git a/recipes/gcc/gcc-4.3.2/zecke-no-host-includes.patch b/recipes/gcc/gcc-4.3.2/zecke-no-host-includes.patch
index 6afb10d6ef..1f3b062feb 100644
--- a/recipes/gcc/gcc-4.3.2/zecke-no-host-includes.patch
+++ b/recipes/gcc/gcc-4.3.2/zecke-no-host-includes.patch
@@ -6,7 +6,7 @@ Index: gcc-4.0.2/gcc/c-incpath.c
p->construct = 0;
p->user_supplied_p = user_supplied_p;
-+#ifdef CROSS_COMPILE
++#ifdef CROSS_DIRECTORY_STRUCTURE
+ /* 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,
diff --git a/recipes/gcc/gcc-4.3.3.inc b/recipes/gcc/gcc-4.3.3.inc
index 3e6c0979ce..5802492d58 100644
--- a/recipes/gcc/gcc-4.3.3.inc
+++ b/recipes/gcc/gcc-4.3.3.inc
@@ -7,7 +7,7 @@ LICENSE = "GPLv3"
DEPENDS = "mpfr gmp"
-INC_PR = "r3"
+INC_PR = "r5"
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \
@@ -47,7 +47,6 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://904-flatten-switch-stmt-00.patch;patch=1 \
file://arm-nolibfloat.patch;patch=1 \
file://arm-softfloat.patch;patch=1 \
- file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
file://gfortran-4.3.x.patch;patch=1 \
file://gcc-4.0.2-e300c2c3.patch;patch=1 \
@@ -65,6 +64,33 @@ SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
SRC_URI_append_sh4 = " file://sh_unwind.patch;patch=1 \
file://gcc-4.2.3-linux-multilib-fix.patch;patch=1 \
"
+SRC_URI_append_ep93xx = " \
+ file://ep93xx/arm-crunch-readme.patch;patch=1 \
+ file://ep93xx/arm-crunch-saveregs.patch;patch=1 \
+ file://ep93xx/arm-crunch-scratch.patch;patch=1 \
+ file://ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch;patch=1 \
+ file://ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch;patch=1 \
+ file://ep93xx/arm-crunch-20000320.patch;patch=1 \
+ file://ep93xx/arm-crunch-disable-cmpdi.patch;patch=1 \
+ file://ep93xx/arm-crunch-fix-64bit-const-offsets.patch;patch=1 \
+ file://ep93xx/arm-crunch-fp_consts.patch;patch=1 \
+ file://ep93xx/arm-crunch-neg-enable.patch;patch=1 \
+ file://ep93xx/arm-crunch-neg-protect.patch;patch=1 \
+ file://ep93xx/arm-crunch-repair-truncxfsi.patch;patch=1 \
+ file://ep93xx/arm-crunch-floatsi-no-scratch.patch;patch=1 \
+ file://ep93xx/arm-crunch-movsf-movdf-Uy.patch;patch=1 \
+ file://ep93xx/arm-crunch-drop-thumb2.patch;patch=1 \
+ file://ep93xx/arm-crunch-arm_dbx_register_number.patch;patch=1 \
+ file://ep93xx/arm-crunch-pipeline.patch;patch=1 \
+ file://ep93xx/arm-crunch-ccmav-mode.patch;patch=1 \
+ file://ep93xx/arm-crunch-cfcpy-with-cfsh64.patch;patch=1 \
+ file://ep93xx/arm-crunch-mieee.patch;patch=1 \
+ file://ep93xx/arm-size-bugfix.patch;patch=1 \
+ file://ep93xx/arm-prologue_use-length.patch;patch=1 \
+ file://ep93xx/arm-crunch-cftruncd32-attr.patch;patch=1 \
+ file://ep93xx/arm-crunch-fix-cirrus-reorg5.patch;patch=1 \
+ file://ep93xx/arm-crunch-cirrus-di-flag.patch;patch=1 \
+"
# Language Overrides
FORTRAN = ""
FORTRAN_linux-gnueabi = ",fortran"
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/README b/recipes/gcc/gcc-4.3.3/ep93xx/README
new file mode 100644
index 0000000000..a656a850cb
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/README
@@ -0,0 +1,11 @@
+This is a set of patches for gcc-4.3 that fix code generation for the
+Maverick Crunch FPU present in Cirrus Logic EP93xx devices.
+
+They are based on the patch ideas for OpenEmbedded that Hasjim Williams sent me
+privately in April 2008, with my own reimplementation of the CCMAV mode and the
+addition of a -mieee switch to fully respect denormalized values (with a 50%
+speed penalty).
+
+See the comments at the top of each patch file for further details.
+
+ Martin Guy <martinwguy@yahoo.it>, 21 November 2008 - 12 March 2009
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/URL b/recipes/gcc/gcc-4.3.3/ep93xx/URL
new file mode 100644
index 0000000000..7761ed8cee
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/URL
@@ -0,0 +1 @@
+http://martinwguy.co.uk/martin/crunch/gcc-4.3.3-patches/
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-20000320.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-20000320.patch
new file mode 100644
index 0000000000..8a9836bb2e
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-20000320.patch
@@ -0,0 +1,13 @@
+Fix one test in the testsuite to know about Maverick crunch word order
+
+--- gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c.original 2007-06-07 16:33:44.000000000 +1000
++++ gcc-4.3.2/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c 2007-06-07 16:34:05.000000000 +1000
+@@ -48,7 +48,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/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-arm_dbx_register_number.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-arm_dbx_register_number.patch
new file mode 100644
index 0000000000..4d4b9da298
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-arm_dbx_register_number.patch
@@ -0,0 +1,15 @@
+Include the Maverick Crunch registers in the GCC->DWARF2 register number
+mapping. Without this, cc -g with maverick hardfloat fails.
+
+--- gcc-4.3.2/gcc/config/arm/arm.c-original 2008-04-11 16:16:25.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/arm.c 2008-04-11 16:19:15.000000000 +1000
+@@ -18298,6 +18298,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;
++
+ /* FIXME: VFPv3 register numbering. */
+ if (IS_VFP_REGNUM (regno))
+ return 64 + regno - FIRST_VFP_REGNUM;
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-ccmav-mode.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-ccmav-mode.patch
new file mode 100644
index 0000000000..0edb1c0334
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-ccmav-mode.patch
@@ -0,0 +1,734 @@
+These modifications implement a new condition code mode CCMAV which is used
+on floating point comparisons that were performed in the Maverick Crunch FPU.
+
+This is necessary because the Maverick sets the conditions codes differently
+from the ARM/FPA/VFP. Since we do not use the Maverick's 32-bit int modes nor
+its 64-bit comparison, these different conditions pertain to all floating point
+comparisons when compiling for Maverick hardfloat.
+
+ ARM/FPA/VFP - (cmp*): MaverickCrunch - (cfcmp*):
+ N Z C V N Z C V
+ A == B 0 1 1 0 A == B 0 1 0 0
+ A < B 1 0 0 0 A < B 1 0 0 0
+ A > B 0 0 1 0 A > B 1 0 0 1
+ unord 0 0 1 1 unord 0 0 0 0
+
+The new mode is set on floating point comparisons instead of the usual
+CCFP and CCFPE, then acted upon when the conditional instruction flags
+are output.
+
+Furthermore, the list of conditions that cannot be tested with a single
+conditional test is different. On ARM/FPA/VFP it is UNEQ and LTGT while
+on Maverick it is GE UNLT ORDERED and UNORDERED.
+We handle this with a new predicate "maverick_comparison_operator" that omits
+the comparisons that cannot be represented and we split the cond_exec pattern
+into for CCMAV mode plus a separate rule for every non-Maverick CC mode.
+This prevents generation of conditional instructions that cannot be represented.
+
+Although Maverick can also represent LTGT and UNEQ with a single test, we do not
+include these since it would mean splitting every other rule that uses
+"arm_comparison_operator" in a similar way for very little gain.
+
+A few other tests are added to prevent optimisations that would
+generate these unrepresentable conditions.
+
+None of these changes affect code generation for ARM or for other FPUs.
+
+One missed optimisation: movsfcc and movdfcc have been
+disabled for Maverick because we don't use the Maverick's instructions
+conditionally to avoid hardware bugs. But a limited movsfcc and movdfcc
+could be included when Maverick, that applies to all modes where the things
+to be moved do not involve the Maverick registers, if such a thing is feasible
+without the optimizer moving things into registers between the expand and the
+instruction generation.
+
+ Martin Guy <martinwguy@yahoo.it>, November 2008
+
+--- gcc-4.3.2/gcc/config/arm/arm-modes.def.old 2007-08-02 11:49:31.000000000 +0100
++++ gcc-4.3.2/gcc/config/arm/arm-modes.def 2008-11-18 14:39:39.000000000 +0000
+@@ -27,6 +27,7 @@
+
+ /* CCFPEmode should be used with floating inequalities,
+ CCFPmode should be used with floating equalities.
++ CCMAVmode should be used with comparisons performed in the Maverick FPU
+ CC_NOOVmode should be used with SImode integer equalities.
+ CC_Zmode should be used if only the Z flag is set correctly
+ CC_Nmode should be used if only the N (sign) flag is set correctly
+@@ -37,6 +38,7 @@
+ CC_MODE (CC_SWP);
+ CC_MODE (CCFP);
+ CC_MODE (CCFPE);
++CC_MODE (CCMAV);
+ CC_MODE (CC_DNE);
+ CC_MODE (CC_DEQ);
+ CC_MODE (CC_DLE);
+--- gcc-4.3.2/gcc/config/arm/arm.h 2008-11-18 15:32:10.000000000 +0000
++++ cluster/gcc-4.3.2/gcc/config/arm/arm.h 2008-11-21 19:24:10.000000000 +0000
+@@ -2306,7 +2306,7 @@
+ #define REVERSIBLE_CC_MODE(MODE) 1
+
+ #define REVERSE_CONDITION(CODE,MODE) \
+- (((MODE) == CCFPmode || (MODE) == CCFPEmode) \
++ (((MODE) == CCFPmode || (MODE) == CCFPEmode || (MODE) == CCMAVmode) \
+ ? reverse_condition_maybe_unordered (code) \
+ : reverse_condition (code))
+
+--- gcc-4.3.2/gcc/config/arm/predicates.md.old 2007-08-02 11:49:31.000000000 +0100
++++ gcc-4.3.2/gcc/config/arm/predicates.md 2008-11-20 15:05:50.000000000 +0000
+@@ -195,6 +195,16 @@
+ (define_special_predicate "arm_comparison_operator"
+ (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltu,unordered,ordered,unlt,unle,unge,ungt"))
+
++;; Comparisons that can be predicated after a Maverick FP comparison, true for
++;; floating point comparisons other than GE, UNLT, UNORDERED or ORDERED
++;;
++;; Maverick can also match LTGT and UNEQ with a single condition
++;; but including these means duplicating every rule containing
++;; arm_comparison_operator including cond_branch and all the *cc rules.
++;; Extra speed when predicating ltgt and uneq is rare enough not to be worth it.
++(define_special_predicate "maverick_comparison_operator"
++(match_code "eq,ne,le,lt,gt,unle,unge,ungt"))
++
+ (define_special_predicate "minmax_operator"
+ (and (match_code "smin,smax,umin,umax")
+ (match_test "mode == GET_MODE (op)")))
+--- gcc-4.3.2/gcc/config/arm/arm.c.old 2008-11-19 10:01:53.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.c 2008-11-21 12:49:48.000000000 +0000
+@@ -1720,6 +1720,14 @@
+ return 0;
+ }
+
++ /* Optimisation of __builtin_inunordered at the end of a
++ * function would generate conditional return on (UN)ORDERED, which cannot
++ * be represented by a single condition code test on Maverick.
++ * Since we do not have access to the specific condition used,
++ * we just disable all conditional returns on Maverick. */
++ if (iscond && TARGET_MAVERICK && TARGET_HARD_FLOAT)
++ return 0;
++
+ /* If there are saved registers but the LR isn't saved, then we need
+ two instructions for the return. */
+ if (saved_int_regs && !(saved_int_regs & (1 << LR_REGNUM)))
+@@ -7733,6 +7741,10 @@
+ comparison, and CCFPE otherwise. */
+ if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
+ {
++ /* Comparisons performed in the Maverick FPU set the CCs their own way. */
++ if (TARGET_HARD_FLOAT && TARGET_MAVERICK)
++ return CCMAVmode;
++
+ switch (op)
+ {
+ case EQ:
+@@ -7751,8 +7763,6 @@
+ case LE:
+ case GT:
+ case GE:
+- if (TARGET_HARD_FLOAT && TARGET_MAVERICK)
+- return CCFPmode;
+ return CCFPEmode;
+
+ default:
+@@ -13367,6 +13377,29 @@
+ default: gcc_unreachable ();
+ }
+
++ case CCMAVmode:
++ /* Maverick cmp sets the condition codes differently from ARM/FPA/VFP */
++ switch (comp_code)
++ {
++ 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 cannot be represented by a single condition code. */
++ case GE: /* Fall through */
++ case UNLT:/* Fall through */
++ case ORDERED:/* Fall through */
++ case UNORDERED:/* Fall through */
++ default:
++ gcc_unreachable ();
++ }
++
+ case CC_SWPmode:
+ switch (comp_code)
+ {
+--- gcc-4.3.2/gcc/config/arm/arm.md.old 2008-11-21 19:08:44.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md 2008-11-21 19:09:18.000000000 +0000
+@@ -258,7 +258,9 @@
+ ; they are altered at all
+ ;
+ ; JUMP_CLOB is used when the condition cannot be represented by a single
+-; instruction (UNEQ and LTGT). These cannot be predicated.
++; instruction. This applies to UNEQ and LTGT for ARM/FPA/VFP comparisons,
++; GE UNLT ORDERED and UNORDERED for Maverick comparisons.
++; These cannot be predicated.
+ ;
+ ; NOCOND means that the condition codes are neither altered nor affect the
+ ; output of this insn
+@@ -7332,9 +7334,9 @@
+
+ ;; Cirrus SF compare instruction
+ (define_insn "*cirrus_cmpsf"
+- [(set (reg:CCFP CC_REGNUM)
+- (compare:CCFP (match_operand:SF 0 "cirrus_fp_register" "v")
+- (match_operand:SF 1 "cirrus_fp_register" "v")))]
++ [(set (reg:CCMAV CC_REGNUM)
++ (compare:CCMAV (match_operand:SF 0 "cirrus_fp_register" "v")
++ (match_operand:SF 1 "cirrus_fp_register" "v")))]
+ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfcmps%?\\tr15, %V0, %V1"
+ [(set_attr "type" "farith")
+@@ -7343,9 +7347,9 @@
+
+ ;; Cirrus DF compare instruction
+ (define_insn "*cirrus_cmpdf"
+- [(set (reg:CCFP CC_REGNUM)
+- (compare:CCFP (match_operand:DF 0 "cirrus_fp_register" "v")
+- (match_operand:DF 1 "cirrus_fp_register" "v")))]
++ [(set (reg:CCMAV CC_REGNUM)
++ (compare:CCMAV (match_operand:DF 0 "cirrus_fp_register" "v")
++ (match_operand:DF 1 "cirrus_fp_register" "v")))]
+ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfcmpd%?\\tr15, %V0, %V1"
+ [(set_attr "type" "farith")
+@@ -7482,12 +7484,18 @@
+ "operands[1] = arm_gen_compare_reg (LTU, arm_compare_op0, arm_compare_op1);"
+ )
+
++;; Some of the following patterns may need two branch instructions, since
++;; there is no single instruction that will handle all cases. Specifically:
++;; ARM/FPA/VFP cannot test UNEQ and LTGT
++;; Maverick cannot test GE on floating point values, UNLT, ORDERED or UNORDERED.
++
+ (define_expand "bunordered"
+ [(set (pc)
+ (if_then_else (unordered (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNORDERED, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -7497,7 +7505,8 @@
+ (if_then_else (ordered (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (ORDERED, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -7507,7 +7516,8 @@
+ (if_then_else (ungt (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGT, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7516,7 +7526,8 @@
+ (if_then_else (unlt (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLT, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7525,7 +7536,8 @@
+ (if_then_else (unge (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGE, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7534,18 +7546,18 @@
+ (if_then_else (unle (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLE, arm_compare_op0, arm_compare_op1);"
+ )
+
+-;; The following two patterns need two branch instructions, since there is
+-;; no single instruction that will handle all cases.
+ (define_expand "buneq"
+ [(set (pc)
+ (if_then_else (uneq (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNEQ, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7554,7 +7566,8 @@
+ (if_then_else (ltgt (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (LTGT, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7562,7 +7575,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))
+@@ -7578,7 +7591,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))
+@@ -7594,6 +7607,101 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match floating point GE for Maverick.
++(define_insn "*cirrus_bge"
++ [(set (pc)
++ (if_then_else (ge (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_32BIT && 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 UNORDERED for Maverick.
++(define_insn "*cirrus_bunordered"
++ [(set (pc)
++ (if_then_else (unordered (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_32BIT && 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 "*cirrus_bordered"
++ [(set (pc)
++ (if_then_else (ordered (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_32BIT && 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 UNLT for Maverick.
++(define_insn "*cirrus_bunlt"
++ [(set (pc)
++ (if_then_else (unlt (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_32BIT && 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 atterns to match UNEQ and LTGT for Maverick, to handle
++; the two cases not covered by generic *arm_cond_branch
++
++(define_insn "*cirrus_buneq"
++ [(set (pc)
++ (if_then_else (uneq (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"bpl\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")]
++)
++
++(define_insn "*cirrus_bltgt"
++ [(set (pc)
++ (if_then_else (ltgt (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"bmi\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")]
++)
++
+ (define_insn "*arm_cond_branch"
+ [(set (pc)
+ (if_then_else (match_operator 1 "arm_comparison_operator"
+@@ -7613,7 +7721,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))
+@@ -7629,7 +7737,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))
+@@ -7645,6 +7753,101 @@
+ (set_attr "length" "8")]
+ )
+
++; Patterns to match reversed UNEQ and LTGT for Maverick, the two cases
++; not covered by generic "*arm_cond_branch_reversed"
++
++(define_insn "*cirrus_buneq_reversed"
++ [(set (pc)
++ (if_then_else (uneq (match_operand:CCMAV 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 \"bmi\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")]
++)
++
++(define_insn "*cirrus_bltgt_reversed"
++ [(set (pc)
++ (if_then_else (ltgt (match_operand:CCMAV 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 \"bpl\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")]
++)
++
++; Special pattern to match reversed floating point GE for Maverick.
++(define_insn "*cirrus_bge_reversed"
++ [(set (pc)
++ (if_then_else (ge (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_32BIT && 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 UNORDERED for Maverick.
++(define_insn "*cirrus_bunordered_reversed"
++ [(set (pc)
++ (if_then_else (unordered (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_32BIT && 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.
++(define_insn "*cirrus_bordered_reversed"
++ [(set (pc)
++ (if_then_else (ordered (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_32BIT && 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 reversed UNLT for Maverick.
++(define_insn "*cirrus_bunlt_reversed"
++ [(set (pc)
++ (if_then_else (unlt (match_operand:CCMAV 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_32BIT && 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"
+@@ -7696,11 +7899,16 @@
+ "operands[1] = arm_gen_compare_reg (LE, arm_compare_op0, arm_compare_op1);"
+ )
+
++; SGE can only be represented as a single condition code on ARM/VFP/FPA,
++; not with Maverick when the operands are floating point.
+ (define_expand "sge"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ge:SI (match_dup 1) (const_int 0)))]
+ "TARGET_32BIT"
+- "operands[1] = arm_gen_compare_reg (GE, arm_compare_op0, arm_compare_op1);"
++ "if (TARGET_HARD_FLOAT && TARGET_MAVERICK
++ && GET_MODE_CLASS (GET_MODE (arm_compare_op0)) == MODE_FLOAT)
++ FAIL;
++ operands[1] = arm_gen_compare_reg (GE, arm_compare_op0, arm_compare_op1);"
+ )
+
+ (define_expand "slt"
+@@ -7738,6 +7946,7 @@
+ "operands[1] = arm_gen_compare_reg (LTU, arm_compare_op0, arm_compare_op1);"
+ )
+
++; SORDERED and SUNORDERED cannot be represented on Maverick
+ (define_expand "sunordered"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unordered:SI (match_dup 1) (const_int 0)))]
+@@ -7757,7 +7966,8 @@
+ (define_expand "sungt"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ungt:SI (match_dup 1) (const_int 0)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGT, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -7765,11 +7975,13 @@
+ (define_expand "sunge"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unge:SI (match_dup 1) (const_int 0)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGE, arm_compare_op0,
+ arm_compare_op1);"
+ )
+
++; SUNLT cannot be represented on Maverick
+ (define_expand "sunlt"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unlt:SI (match_dup 1) (const_int 0)))]
+@@ -7781,7 +7993,8 @@
+ (define_expand "sunle"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unle:SI (match_dup 1) (const_int 0)))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLE, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -8039,20 +8252,32 @@
+ enum rtx_code code = GET_CODE (operands[1]);
+ rtx ccreg;
+
+- if (code == UNEQ || code == LTGT)
+- FAIL;
++ /* Reject comparisons not representable by a single condition code */
++ if (TARGET_HARD_FLOAT && TARGET_MAVERICK
++ && GET_MODE_CLASS (GET_MODE (arm_compare_op0)) == MODE_FLOAT)
++ {
++ if (code == GE || code == UNLT || code == ORDERED || code == UNORDERED)
++ FAIL;
++ }
++ else
++ {
++ if (code == UNEQ || code == LTGT)
++ FAIL;
++ }
+
+ ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1);
+ operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx);
+ }"
+ )
+
++; We do not use Maverick conditional FP instructions to avoid hardware bugs
++
+ (define_expand "movsfcc"
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (if_then_else:SF (match_operand 1 "arm_comparison_operator" "")
+ (match_operand:SF 2 "s_register_operand" "")
+ (match_operand:SF 3 "nonmemory_operand" "")))]
+- "TARGET_32BIT"
++ "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
+ "
+ {
+ enum rtx_code code = GET_CODE (operands[1]);
+@@ -10419,7 +10644,7 @@
+
+ operands[5] = gen_rtx_REG (mode, CC_REGNUM);
+ operands[6] = gen_rtx_COMPARE (mode, operands[2], operands[3]);
+- if (mode == CCFPmode || mode == CCFPEmode)
++ if (mode == CCFPmode || mode == CCFPEmode || mode == CCMAVmode)
+ rc = reverse_condition_maybe_unordered (rc);
+ else
+ rc = reverse_condition (rc);
+@@ -10470,7 +10695,7 @@
+
+ operands[6] = gen_rtx_REG (mode, CC_REGNUM);
+ operands[7] = gen_rtx_COMPARE (mode, operands[2], operands[3]);
+- if (mode == CCFPmode || mode == CCFPEmode)
++ if (mode == CCFPmode || mode == CCFPEmode || mode == CCMAVmode)
+ rc = reverse_condition_maybe_unordered (rc);
+ else
+ rc = reverse_condition (rc);
+@@ -10502,7 +10727,7 @@
+
+ operands[6] = gen_rtx_REG (mode, CC_REGNUM);
+ operands[7] = gen_rtx_COMPARE (mode, operands[2], operands[3]);
+- if (mode == CCFPmode || mode == CCFPEmode)
++ if (mode == CCFPmode || mode == CCFPEmode || mode == CCMAVmode)
+ rc = reverse_condition_maybe_unordered (rc);
+ else
+ rc = reverse_condition (rc);
+@@ -10809,13 +11034,75 @@
+ "TARGET_32BIT && arm_arch5e"
+ "pld\\t%a0")
+
++;; Special predication patterns for Maverick Crunch floating-point
++;; which has a different set of predicable conditions after a floating
++;; point comparison.
++
++(define_cond_exec
++ [(match_operator 0 "maverick_comparison_operator"
++ [(match_operand:CCMAV 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ ""
++)
++
++;; Every else is the same as the general ARM pattern.
++
++(define_cond_exec
++ [(match_operator 0 "arm_comparison_operator"
++ [(match_operand:CC_NOOV 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_32BIT && 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_32BIT && 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_32BIT && 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_32BIT && 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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ ""
++)
++
++(define_cond_exec
++ [(match_operator 0 "arm_comparison_operator"
++ [(match_operand:CC 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_32BIT && 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_32BIT"
++ "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
+ ""
+ )
+
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cfcpy-with-cfsh64.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cfcpy-with-cfsh64.patch
new file mode 100644
index 0000000000..6260699167
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cfcpy-with-cfsh64.patch
@@ -0,0 +1,27 @@
+cfcpys and cfcpyd have hardware bugs which mean they truncate denormalized
+values to zero and convert minus zero to plus zero.
+
+A 64-bit shift with a shift count of 0 copies them bitwise.
+
+ Martin Guy <martinwguy@yahoo.it>, December 2008
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old 2008-11-21 19:06:37.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md 2008-12-03 12:13:08.000000000 +0000
+@@ -485,7 +485,7 @@
+ && (GET_CODE (operands[0]) != MEM
+ || register_operand (operands[1], SFmode))"
+ "@
+- cfcpys%?\\t%V0, %V1
++ cfsh64%?\\t%Z0, %Z1, #0\\t%@ float
+ cfldrs%?\\t%V0, %1
+ cfmvsr%?\\t%V0, %1
+ cfmvrs%?\\t%0, %V1
+@@ -514,7 +514,7 @@
+ case 1: return \"stm%?ia\\t%m0, %M1\\t%@ double\";
+ case 2: return \"#\";
+ case 3: case 4: return output_move_double (operands);
+- case 5: return \"cfcpyd%?\\t%V0, %V1\";
++ case 5: return \"cfsh64%?\\t%Z0, %Z1, #0\\t%@ double\";
+ case 6: return \"cfldrd%?\\t%V0, %1\";
+ case 7: return \"cfmvdlr\\t%V0, %Q1\;cfmvdhr%?\\t%V0, %R1\";
+ case 8: return \"cfmvrdl%?\\t%Q0, %V1\;cfmvrdh%?\\t%R0, %V1\";
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cftruncd32-attr.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cftruncd32-attr.patch
new file mode 100644
index 0000000000..bdc603ac91
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cftruncd32-attr.patch
@@ -0,0 +1,12 @@
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old 2009-02-16 16:19:19.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md 2009-03-10 12:13:10.000000000 +0000
+@@ -425,7 +425,8 @@
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cftruncd32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+ [(set_attr "type" "f_cvt")
+- (set_attr "length" "8")]
++ (set_attr "length" "8")
++ (set_attr "cirrus" "normal")]
+ )
+
+ ; Cirrus hardware bugs: denormalized values on input are truncated to zero
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cirrus-di-flag.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cirrus-di-flag.patch
new file mode 100644
index 0000000000..c25c108eaa
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-cirrus-di-flag.patch
@@ -0,0 +1,248 @@
+This patch disables all 64-bit integer operations of the MaverickCrunch unit
+unless the new flag -mcirrus-di is supplied (as well as -mcpu-ep9312
+-mfpu=maverick -mfloat-abi=softfp).
+
+The 64-bit instructions (or their GCC support) are known to be buggy, as shown
+for example by openssl-0.9.8g's testsuite:
+In the unpacked openssl source directory:
+ $ ./config
+ $ vi Makefile
+ > /^CC= /s/$/-4.3-crunch/
+ > /^CFLAG= /s/$/ -mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp -mcirrus-di/
+ > :wq
+ $ make
+ $ make test
+fails if either of the two files: */sha/sha512.c and */bn/bn_asm.c are compiled
+with cirrus 64-bit support enabled. If you disable cfmul64, sha512.c works ok,
+but I've disabled everything down to cfadd64, cfsub64 and 64-bit load and store
+and bn_asm still fails, which suggests another hardware timing bug.
+
+--- gcc-4.3.2/gcc/config/arm/arm.opt.old 2009-03-10 22:08:13.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.opt 2009-03-10 12:47:31.000000000 +0000
+@@ -63,6 +63,10 @@
+ Target Report Mask(CALLER_INTERWORKING)
+ Thumb: Assume function pointers may go to non-Thumb aware code
+
++mcirrus-di
++Target Report Mask(CIRRUS_DI)
++Cirrus: Enable processing of 64-bit integers in the MaverickCrunch unit (buggy)
++
+ mcpu=
+ Target RejectNegative Joined
+ Specify the name of the target CPU
+--- gcc-4.3.2/gcc/config/arm/arm.c.old 2009-03-10 09:32:31.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.c 2009-03-10 12:44:48.000000000 +0000
+@@ -13917,7 +13917,8 @@
+ upper 32 bits. This causes gcc all sorts of grief. We can't
+ even split the registers into pairs because Cirrus SI values
+ get sign extended to 64bits-- aldyh. */
+- return (GET_MODE_CLASS (mode) == MODE_FLOAT) || (mode == DImode);
++ return (GET_MODE_CLASS (mode) == MODE_FLOAT)
++ || (mode == DImode && TARGET_CIRRUS_DI);
+
+ if (TARGET_HARD_FLOAT && TARGET_VFP
+ && IS_VFP_REGNUM (regno))
+--- gcc-4.3.2/gcc/config/arm/arm.md.old 2009-03-10 12:14:01.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md 2009-03-10 12:42:55.000000000 +0000
+@@ -369,7 +369,7 @@
+ (clobber (reg:CC CC_REGNUM))])]
+ "TARGET_EITHER"
+ "
+- if (TARGET_HARD_FLOAT && TARGET_MAVERICK)
++ if (TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI)
+ {
+ if (!cirrus_fp_register (operands[0], DImode))
+ operands[0] = force_reg (DImode, operands[0]);
+@@ -405,7 +405,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_32BIT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
++ "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI)"
+ "#"
+ "TARGET_32BIT && reload_completed"
+ [(parallel [(set (reg:CC_C CC_REGNUM)
+@@ -433,7 +433,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_32BIT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
++ "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI)"
+ "#"
+ "TARGET_32BIT && reload_completed"
+ [(parallel [(set (reg:CC_C CC_REGNUM)
+@@ -462,7 +462,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_32BIT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
++ "TARGET_32BIT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI)"
+ "#"
+ "TARGET_32BIT && reload_completed"
+ [(parallel [(set (reg:CC_C CC_REGNUM)
+@@ -857,7 +857,7 @@
+ (clobber (reg:CC CC_REGNUM))])]
+ "TARGET_EITHER"
+ "
+- if (TARGET_HARD_FLOAT && TARGET_MAVERICK
++ if (TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI
+ && TARGET_32BIT
+ && cirrus_fp_register (operands[0], DImode)
+ && cirrus_fp_register (operands[1], DImode))
+@@ -2979,7 +2979,8 @@
+ values to iwmmxt regs and back. */
+ FAIL;
+ }
+- else if (!TARGET_REALLY_IWMMXT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK))
++ else if (!TARGET_REALLY_IWMMXT
++ && !(TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI))
+ FAIL;
+ "
+ )
+@@ -4544,7 +4545,8 @@
+ [(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_CIRRUS_DI) || TARGET_VFP))
+ && !TARGET_IWMMXT
+ && ( register_operand (operands[0], DImode)
+ || register_operand (operands[1], DImode))"
+@@ -4664,7 +4666,7 @@
+ [(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_THUMB1
+- && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)
++ && !(TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI)
+ && ( register_operand (operands[0], DImode)
+ || register_operand (operands[1], DImode))"
+ "*
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old 2009-03-10 12:13:10.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md 2009-03-10 12:32:00.000000000 +0000
+@@ -85,7 +85,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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfadd64%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -126,7 +126,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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfsub64%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -176,7 +176,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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfmul64%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "fmul")
+ (set_attr "cirrus" "normal")]
+@@ -261,7 +261,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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfrshl64%?\\t%V1, %V0, %s2"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -271,7 +271,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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfsh64%?\\t%V0, %V1, #%s2"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -281,7 +281,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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfsh64%?\\t%V0, %V1, #-%s2"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -290,7 +290,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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfabs64%?\\t%V0, %V1"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -301,7 +301,7 @@
+ [(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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfneg64%?\\t%V0, %V1"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -392,7 +392,7 @@
+ (define_insn "floatdisf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (float:SF (match_operand:DI 1 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfcvt64s%?\\t%V0, %V1"
+ [(set_attr "type" "f_cvt")
+ (set_attr "cirrus" "normal")]
+@@ -401,7 +401,7 @@
+ (define_insn "floatdidf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (float:DF (match_operand:DI 1 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && TARGET_CIRRUS_DI"
+ "cfcvt64d%?\\t%V0, %V1"
+ [(set_attr "type" "f_cvt")
+ (set_attr "cirrus" "normal")]
+@@ -454,7 +454,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 && TARGET_CIRRUS_DI"
+ "*
+ {
+ switch (which_alternative)
+--- gcc-4.3.2/gcc/doc/invoke.texi.old 2009-03-10 17:17:19.000000000 +0000
++++ gcc-4.3.2/gcc/doc/invoke.texi 2009-03-10 17:24:19.000000000 +0000
+@@ -429,6 +429,7 @@
+ -msingle-pic-base -mno-single-pic-base @gol
+ -mpic-register=@var{reg} @gol
+ -mnop-fun-dllimport @gol
++-mirrus-di @gol
+ -mieee @gol
+ -mpoke-function-name @gol
+ -mthumb -marm @gol
+@@ -8670,6 +8671,16 @@
+ Specify the register to be used for PIC addressing. The default is R10
+ unless stack-checking is enabled, when R9 is used.
+
++@item -mcirrus-di
++When compiling for the Maverick FPU, enable handling of 64-bit integers
++in the FPU (add, subtract, multiply, arithmetic shifts and conversions).
++Normally they are disabled because some instruction sequences can give
++erroneous results.
++This option only has any effect if the
++@option{-mcpu=ep9312} @option{-mfpu=maverick} options have been used and is
++disabled by default.
++The default can be re-enabled by use of the @option{-mno-cirrus-di} switch.
++
+ @item -mieee
+ When compiling for the Maverick FPU, disable the instructions that fail
+ to honor denormalized values. As these include floating point add, sub,
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-disable-cmpdi.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-disable-cmpdi.patch
new file mode 100644
index 0000000000..7db1274ef9
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-disable-cmpdi.patch
@@ -0,0 +1,29 @@
+Disable the Maverick's cmpdi instruction which cannot perform the simultaneous
+signed/unsigned comparison expected by GCC.
+
+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
+@@ -7354,10 +7366,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];
+@@ -7368,7 +7382,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")]
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-drop-thumb2.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-drop-thumb2.patch
new file mode 100644
index 0000000000..2722e2d0d1
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-drop-thumb2.patch
@@ -0,0 +1,98 @@
+MaverickCrunch FPUs only exist in silicon with an arm920t core and Cirrus have
+stopped development of their ARM processors (1 April 2008, no joke!)
+
+This means Maverick-Thumb2 combinations will never exist in hardware,
+so remove all existing Maverick+Thumb2 descriptions.
+
+ Martin Guy <martinwguy@yahoo.it> November 2008
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old 2008-11-18 12:09:40.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md 2008-11-18 12:12:38.000000000 +0000
+@@ -452,87 +452,3 @@
+ (set_attr "neg_pool_range" " *, *, *, *, 1008, *, 1008, *, *, *")
+ (set_attr "cirrus" " not, not,not, not, not,normal,double,move,normal,double")]
+ )
+-
+-(define_insn "*cirrus_thumb2_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_THUMB2 && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+- "*
+- {
+- switch (which_alternative)
+- {
+- case 0:
+- case 1:
+- case 2:
+- return (output_move_double (operands));
+-
+- case 3: return \"cfmv64lr%?\\t%V0, %Q1\;cfmv64hr%?\\t%V0, %R1\";
+- case 4: return \"cfmvr64l%?\\t%Q0, %V1\;cfmvr64h%?\\t%R0, %V1\";
+-
+- case 5: return \"cfldr64%?\\t%V0, %1\";
+- case 6: return \"cfstr64%?\\t%V1, %0\";
+-
+- /* Shifting by 0 will just copy %1 into %0. */
+- case 7: return \"cfsh64%?\\t%V0, %V1, #0\";
+-
+- default: abort ();
+- }
+- }"
+- [(set_attr "length" " 8, 8, 8, 8, 8, 4, 4, 4")
+- (set_attr "type" " *,load2,store2, *, *, load2,store2, *")
+- (set_attr "pool_range" " *,4096, *, *, *, 1020, *, *")
+- (set_attr "neg_pool_range" " *, 0, *, *, *, 1008, *, *")
+- (set_attr "cirrus" "not, not, not,move,normal,double,double,normal")]
+-)
+-
+-(define_insn "*thumb2_cirrus_movsf_hard_insn"
+- [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m")
+- (match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))]
+- "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_MAVERICK
+- && (GET_CODE (operands[0]) != MEM
+- || register_operand (operands[1], SFmode))"
+- "@
+- cfcpys%?\\t%V0, %V1
+- cfldrs%?\\t%V0, %1
+- cfmvsr%?\\t%V0, %1
+- cfmvrs%?\\t%0, %V1
+- cfstrs%?\\t%V1, %0
+- mov%?\\t%0, %1
+- ldr%?\\t%0, %1\\t%@ float
+- str%?\\t%1, %0\\t%@ float"
+- [(set_attr "length" " *, *, *, *, *, 4, 4, 4")
+- (set_attr "type" " *, load1, *, *,store1, *,load1,store1")
+- (set_attr "pool_range" " *, 1020, *, *, *, *,4096, *")
+- (set_attr "neg_pool_range" " *, 1008, *, *, *, *, 0, *")
+- (set_attr "cirrus" "normal,normal,move,normal,normal,not, not, not")]
+-)
+-
+-(define_insn "*thumb2_cirrus_movdf_hard_insn"
+- [(set (match_operand:DF 0 "nonimmediate_operand" "=r,Q,r,m,r,v,v,v,r,m")
+- (match_operand:DF 1 "general_operand" "Q,r,r,r,mF,v,mF,r,v,v"))]
+- "TARGET_THUMB2
+- && TARGET_HARD_FLOAT && TARGET_MAVERICK
+- && (GET_CODE (operands[0]) != MEM
+- || register_operand (operands[1], DFmode))"
+- "*
+- {
+- switch (which_alternative)
+- {
+- case 0: return \"ldm%?ia\\t%m1, %M0\\t%@ double\";
+- case 1: return \"stm%?ia\\t%m0, %M1\\t%@ double\";
+- case 2: case 3: case 4: return output_move_double (operands);
+- case 5: return \"cfcpyd%?\\t%V0, %V1\";
+- case 6: return \"cfldrd%?\\t%V0, %1\";
+- case 7: return \"cfmvdlr\\t%V0, %Q1\;cfmvdhr%?\\t%V0, %R1\";
+- case 8: return \"cfmvrdl%?\\t%Q0, %V1\;cfmvrdh%?\\t%R0, %V1\";
+- case 9: return \"cfstrd%?\\t%V1, %0\";
+- default: abort ();
+- }
+- }"
+- [(set_attr "type" "load1,store2, *,store2,load1, *, load1, *, *,store2")
+- (set_attr "length" " 4, 4, 8, 8, 8, 4, 4, 8, 8, 4")
+- (set_attr "pool_range" " *, *, *, *,4092, *, 1020, *, *, *")
+- (set_attr "neg_pool_range" " *, *, *, *, 0, *, 1008, *, *, *")
+- (set_attr "cirrus" " not, not,not, not, not,normal,double,move,normal,double")]
+-)
+-
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch
new file mode 100644
index 0000000000..f16336d05d
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch
@@ -0,0 +1,15 @@
+Define Maverick floating point word order in libgcc's assemble support routines
+
+--- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/ieee754-df.S 2008-04-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
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch
new file mode 100644
index 0000000000..72283f5381
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch
@@ -0,0 +1,89 @@
+Don't try to copy results into an FPA register when compiling for Maverick
+
+diff -urN gcc-4.3.0/gcc/config/arm-original/arm/ieee754-df.S gcc-4.3.0/gcc/config/arm/ieee754-df.S
+--- gcc-4.3.0/gcc/config/arm-original/arm/ieee754-df.S 2008-02-19 14:32:15.000000000 +1000
++++ gcc-4.3.0/gcc/config/arm/ieee754-df.S 2008-04-10 16:38:45.000000000 +1000
+@@ -500,7 +500,7 @@
+ ARM_FUNC_ALIAS aeabi_ul2d floatundidf
+
+ orrs r2, r0, r1
+-#if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if !defined (__VFP_FP__) && !defined (__MAVERICK__) && !defined(__SOFTFP__)
+ do_it eq, t
+ mvfeqd f0, #0.0
+ #else
+@@ -508,7 +508,7 @@
+ #endif
+ RETc(eq)
+
+-#if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if !defined (__VFP_FP__) && !defined (__MAVERICK__) && !defined(__SOFTFP__)
+ @ For hard FPA code we want to return via the tail below so that
+ @ we can return the result in f0 as well as in r0/r1 for backwards
+ @ compatibility.
+@@ -526,7 +526,7 @@
+ ARM_FUNC_ALIAS aeabi_l2d floatdidf
+
+ orrs r2, r0, r1
+-#if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if !defined (__VFP_FP__) && !defined (__MAVERICK__) && !defined(__SOFTFP__)
+ do_it eq, t
+ mvfeqd f0, #0.0
+ #else
+@@ -534,7 +534,7 @@
+ #endif
+ RETc(eq)
+
+-#if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if !defined (__VFP_FP__) && !defined (__MAVERICK__) && !defined(__SOFTFP__)
+ @ For hard FPA code we want to return via the tail below so that
+ @ we can return the result in f0 as well as in r0/r1 for backwards
+ @ compatibility.
+@@ -586,7 +586,7 @@
+ add r4, r4, r2
+ b LSYM(Lad_p)
+
+-#if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if !defined (__VFP_FP__) && !defined (__MAVERICK__) && !defined(__SOFTFP__)
+
+ @ Legacy code expects the result to be returned in f0. Copy it
+ @ there as well.
+diff -urN gcc-4.3.0/gcc/config/arm-original/arm/ieee754-sf.S gcc-4.3.0/gcc/config/arm/ieee754-sf.S
+--- gcc-4.3.0/gcc/config/arm-original/arm/ieee754-sf.S 2008-02-19 14:32:15.000000000 +1000
++++ gcc-4.3.0/gcc/config/arm/ieee754-sf.S 2008-04-10 16:39:15.000000000 +1000
+@@ -330,7 +330,7 @@
+ ARM_FUNC_ALIAS aeabi_ul2f floatundisf
+
+ orrs r2, r0, r1
+-#if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if !defined (__VFP_FP__) && !defined (__MAVERICK__) && !defined(__SOFTFP__)
+ do_it eq, t
+ mvfeqs f0, #0.0
+ #else
+@@ -345,7 +345,7 @@
+ ARM_FUNC_ALIAS aeabi_l2f floatdisf
+
+ orrs r2, r0, r1
+-#if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if !defined (__VFP_FP__) && !defined (__MAVERICK__) && !defined(__SOFTFP__)
+ do_it eq, t
+ mvfeqs f0, #0.0
+ #else
+@@ -363,7 +363,7 @@
+ rsc ah, ah, #0
+ #endif
+ 1:
+-#if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if !defined (__VFP_FP__) && !defined (__MAVERICK__) && !defined(__SOFTFP__)
+ @ For hard FPA code we want to return via the tail below so that
+ @ we can return the result in f0 as well as in r0 for backwards
+ @ compatibility.
+@@ -432,7 +432,7 @@
+ biceq r0, r0, ip, lsr #31
+ RET
+
+-#if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if !defined (__VFP_FP__) && !defined (__MAVERICK__) && !defined(__SOFTFP__)
+
+ LSYM(f0_ret):
+ str r0, [sp, #-4]!
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-64bit-const-offsets.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-64bit-const-offsets.patch
new file mode 100644
index 0000000000..e3d67013d4
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-64bit-const-offsets.patch
@@ -0,0 +1,25 @@
+Fixup possible address offsets for constant double integers
+also when using Maverick to handle 64-bit integers.
+
+--- gcc-4.3.2/gcc/config/arm/arm.c-original 2007-06-12 14:46:20.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/arm.c 2007-06-12 14:48:06.000000000 +1000
+@@ -3815,7 +3815,8 @@
+
+ use_ldrd = (TARGET_LDRD
+ && (mode == DImode
+- || (mode == DFmode && (TARGET_SOFT_FLOAT || TARGET_VFP))));
++ || (mode == DFmode
++ && (TARGET_SOFT_FLOAT || TARGET_VFP || TARGET_MAVERICK))));
+
+ if (code == POST_INC || code == PRE_DEC
+ || ((code == PRE_INC || code == POST_DEC)
+@@ -4424,7 +4424,8 @@
+ /* 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))
++ || (mode == DFmode
++ && (TARGET_SOFT_FLOAT || TARGET_VFP || TARGET_MAVERICK)))
+ {
+ low_n = n & 0x0f;
+ n &= ~0x0f;
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-cirrus-reorg5.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-cirrus-reorg5.patch
new file mode 100644
index 0000000000..313b7001bd
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fix-cirrus-reorg5.patch
@@ -0,0 +1,313 @@
+This patch:
+- maps branch-cirrus_insn to branch-nop-nop-cirrus_insn
+- maps branch-noncirrus-cirrus to branch-noncirrus-nop-cirrus
+- inserts a nop in load rN - load/store64 mvX,[rN] sequences to avoid an
+ undocumented hardware bug.
+- always fixes up invalid code sequences when compiling hard Maverick insns
+ and removes the -mcirrus-fix-invalid-insns flag because chip development
+ has stopped and all existing silicon has these bugs, while the extra code
+ that claimed to do other things for the extra bugs in the old revision D0
+ silicon was complete junk.
+- Takes the cirrus checking out of the main arm_reorg loop, to remove the
+ speed penalty it caused when not compiling for Maverick.
+
+ Martin Guy <martinwguy@yahoo.it> 3 March 2009
+
+--- gcc-4.3.2/gcc/config/arm/arm.c.orig 2009-02-18 14:59:22.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.c 2009-03-10 09:32:31.000000000 +0000
+@@ -134,7 +134,7 @@
+ static int arm_address_cost (rtx);
+ static bool arm_memory_load_p (rtx);
+ static bool arm_cirrus_insn_p (rtx);
+-static void cirrus_reorg (rtx);
++static void cirrus_reorg (void);
+ 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);
+@@ -6580,122 +6580,122 @@
+
+ /* Cirrus reorg for invalid instruction combinations. */
+ static void
+-cirrus_reorg (rtx first)
++cirrus_reorg (void)
+ {
+- enum attr_cirrus attr;
+- rtx body = PATTERN (first);
+- rtx t;
+- int nops;
+-
+- /* 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);
+-
+- if (arm_cirrus_insn_p (t))
+- ++ nops;
+-
+- if (arm_cirrus_insn_p (next_nonnote_insn (t)))
+- ++ nops;
+-
+- while (nops --)
+- emit_insn_after (gen_nop (), first);
+-
+- return;
+- }
+-
+- /* (float (blah)) is in parallel with a clobber. */
+- if (GET_CODE (body) == PARALLEL && XVECLEN (body, 0) > 0)
+- body = XVECEXP (body, 0, 0);
+-
+- if (GET_CODE (body) == SET)
+- {
+- rtx lhs = XEXP (body, 0), rhs = XEXP (body, 1);
+-
+- /* 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);
++ rtx insn, body;
+
+- return;
+- }
+- else if (arm_memory_load_p (first))
+- {
+- unsigned int arm_regno;
++ /* Examine every instruction and see if it needs adjusting */
++ for (insn = get_insns (); insn; insn = next_insn (insn))
++ switch (GET_CODE (insn))
++ {
++ case JUMP_INSN:
++ /* Any branch must be followed by 2 non Cirrus instructions. */
++ body = PATTERN (insn);
++ if (GET_CODE (body) != RETURN)
++ {
++ rtx next = next_real_insn (insn);
+
+- /* 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:
++ if (arm_cirrus_insn_p (next))
++ {
++ emit_insn_after (gen_nop (), insn);
++ emit_insn_after (gen_nop (), insn);
++ }
++ else
++ if (arm_cirrus_insn_p (next_real_insn (next)))
++ emit_insn_after (gen_nop (), next);
++ }
++ break;
+
++ case INSN:
++ /* Any ldr/cfstrd 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);
+- }
++ cfstrd mvd0, [r0]
++ otherwise the FPU stores to random memory locations.
++ */
++ body = PATTERN (insn);
+
+- /* Next insn. */
+- first = next_nonnote_insn (first);
+-
+- if (! arm_cirrus_insn_p (first))
+- return;
++ /* If first insn is ldr rN, <mem>... */
++ if (GET_CODE (body) == SET && arm_memory_load_p (insn))
++ {
++ rtx next = next_real_insn (insn);
+
+- body = PATTERN (first);
++ /* ...and second is cirrus double word load or store... */
++ if (arm_cirrus_insn_p (next)
++ && get_attr_cirrus (next) == CIRRUS_DOUBLE)
++ {
++ rtx nextbody = PATTERN (next);
++ rtx ldr_target; /* destination of ldr insn: rN */
++ rtx arm_part; /* src or dest espression involving [rN] */
++ unsigned int arm_regno; /* the arm reg in the [rN] part */
+
+- /* (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);
++ ldr_target = XEXP (body, 0);
++ gcc_assert (GET_CODE (ldr_target) == REG);
+
+- return;
+- }
+- }
++ gcc_assert (GET_CODE (nextbody) == SET);
+
+- /* get_attr cannot accept USE or CLOBBER. */
+- if (!first
+- || GET_CODE (first) != INSN
+- || GET_CODE (PATTERN (first)) == USE
+- || GET_CODE (PATTERN (first)) == CLOBBER)
+- return;
++ /* Find the load or store address of the insn */
++ switch (GET_CODE (XEXP (nextbody, 0)))
++ {
++ case MEM: /* it's cfstrd/64 */
++ gcc_assert (GET_CODE (XEXP (nextbody, 1)) == REG);
++ arm_part = XEXP (XEXP (nextbody, 0), 0);
++ break;
+
+- attr = get_attr_cirrus (first);
++ case REG: /* it's cfldrd/64 */
++ if (GET_CODE (XEXP (nextbody, 1)) == MEM)
++ arm_part = XEXP (XEXP (nextbody, 1), 0);
++ else
++ /* It can also be const_double or const_int, which will
++ * turn into harmless [pc, #offset] in arm_reorg() */
++ continue;
++ break;
+
+- /* Any coprocessor compare instruction (cfcmps, cfcmpd, ...)
+- must be followed by a non-coprocessor instruction. */
+- if (attr == CIRRUS_COMPARE)
+- {
+- nops = 0;
++ default:
++ gcc_unreachable ();
++ }
+
+- t = next_nonnote_insn (first);
++ /* Find the arm register number in the [rN] expression */
++ arm_regno = 0; /* none */
++ switch (GET_CODE (arm_part))
++ {
++ case REG: /* it's [rN] */
++ arm_regno = REGNO (arm_part);
++ break;
+
+- if (arm_cirrus_insn_p (t))
+- ++ nops;
++ case PLUS: /* it's [rN, #XXX] or [rN, -#YYY]. */
++ if (GET_CODE (XEXP (arm_part, 0)) == REG)
++ arm_regno = REGNO (XEXP (arm_part, 0)); /* usual case */
++ else if (GET_CODE (XEXP (arm_part, 1)) == REG)
++ arm_regno = REGNO (XEXP (arm_part, 1)); /* inverted */
++ else
++ gcc_unreachable();
++ break;
+
+- if (arm_cirrus_insn_p (next_nonnote_insn (t)))
+- ++ nops;
++ case PRE_INC:
++ case POST_INC:
++ case PRE_DEC:
++ case POST_DEC:
++ gcc_assert (GET_CODE (XEXP (arm_part, 0)) == REG);
++ arm_regno = REGNO (XEXP (arm_part, 0));
++ break;
+
+- while (nops --)
+- emit_insn_after (gen_nop (), first);
++ default:
++ /* Do nothing */
++ continue;
++ }
+
+- return;
+- }
++ if (arm_regno == REGNO (ldr_target))
++ emit_insn_after (gen_nop (), insn);
++ }
++ }
++ break;
++
++ default:
++ break;
++ }
+ }
+
+ /* Return TRUE if X references a SYMBOL_REF. */
+@@ -9293,6 +9296,10 @@
+
+ minipool_fix_head = minipool_fix_tail = NULL;
+
++ /* Do cirrus_reorg() first as it may insert extra instructions */
++ if (TARGET_MAVERICK && TARGET_HARD_FLOAT)
++ cirrus_reorg ();
++
+ /* The first insn must always be a note, or the code below won't
+ scan it properly. */
+ insn = get_insns ();
+@@ -9302,12 +9309,6 @@
+ /* 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))
+--- gcc-4.3.2/gcc/config/arm/arm.opt.orig 2009-03-02 10:17:08.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.opt 2009-03-02 10:27:30.000000000 +0000
+@@ -63,10 +63,6 @@
+ Target Report Mask(CALLER_INTERWORKING)
+ Thumb: Assume function pointers may go to non-Thumb aware code
+
+-mcirrus-fix-invalid-insns
+-Target Report Mask(CIRRUS_FIX_INVALID_INSNS)
+-Cirrus: Place NOPs to avoid invalid instruction combinations
+-
+ mcpu=
+ Target RejectNegative Joined
+ Specify the name of the target CPU
+--- gcc-4.3.2/gcc/doc/invoke.texi.old 2008-12-04 11:48:54.000000000 +0000
++++ gcc-4.3.2/gcc/doc/invoke.texi 2009-03-02 10:26:45.000000000 +0000
+@@ -429,7 +429,6 @@
+ -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
+ -mieee @gol
+ -mpoke-function-name @gol
+ -mthumb -marm @gol
+@@ -8671,18 +8671,6 @@
+ 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 -mieee
+ When compiling for the Maverick FPU, disable the instructions that fail
+ to honor denormalized values. As these include floating point add, sub,
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-floatsi-no-scratch.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-floatsi-no-scratch.patch
new file mode 100644
index 0000000000..d5eaa89152
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-floatsi-no-scratch.patch
@@ -0,0 +1,35 @@
+When converting from 32-bit integers (in ARM registers) to single and double
+precision floating points (in Maverick registers), transfer the 32-bit value
+straight to the destination register and convert it in place there,
+instead of pointlessly using an extra Maverick register.
+
+ Martin Guy <martinwguy@yahoo.it> 15 Nov 2008
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old 2008-11-15 18:17:52.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md 2008-11-15 18:24:41.000000000 +0000
+@@ -300,10 +300,9 @@
+ ;; Convert Cirrus-SI to Cirrus-SF
+ (define_insn "cirrus_floatsisf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+- (float:SF (match_operand:SI 1 "s_register_operand" "r")))
++ (float:SF (match_operand:SI 1 "s_register_operand" "r")))]
+- (clobber (match_scratch:DF 2 "=v"))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+- "cfmv64lr%?\\t%Z2, %1\;cfcvt32s%?\\t%V0, %Y2"
++ "cfmv64lr%?\\t%Z0, %1\;cfcvt32s%?\\t%V0, %Y0"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "move")]
+ )
+@@ -310,10 +309,9 @@
+
+ (define_insn "cirrus_floatsidf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+- (float:DF (match_operand:SI 1 "s_register_operand" "r")))
++ (float:DF (match_operand:SI 1 "s_register_operand" "r")))]
+- (clobber (match_scratch:DF 2 "=v"))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+- "cfmv64lr%?\\t%Z2, %1\;cfcvt32d%?\\t%V0, %Y2"
++ "cfmv64lr%?\\t%Z0, %1\;cfcvt32d%?\\t%V0, %Y0"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "move")]
+ )
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fp_consts.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fp_consts.patch
new file mode 100644
index 0000000000..0bc886bd99
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-fp_consts.patch
@@ -0,0 +1,15 @@
+Maverick does not have immediate FP constants.
+
+--- gcc-4.3.2/gcc/config/arm/arm.c-original 2007-06-12 16:17:14.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/arm.c 2007-06-12 16:17:28.000000000 +1000
+@@ -5699,7 +5699,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/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-mieee.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-mieee.patch
new file mode 100644
index 0000000000..793f52506d
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-mieee.patch
@@ -0,0 +1,267 @@
+This patch adds an -mieee flag to GCC for ARM, that only has any effect when
+hard MaverickCrunch FPU code generation is selected.
+It disables the buggy instructions that do not recognise or do not generate
+denormalized values when they should:
+ add, sub, neg, abs and float<->double conversions.
+That leaves only floating point multiplication, comparison, conversions to/from
+integers and the 64-bit integer operations.
+
+ Martin Guy <martinwguy@yahoo.it>, December 2008
+
+--- gcc-4.3.2/gcc/doc/invoke.texi.old 2008-06-25 02:37:53.000000000 +0100
++++ gcc-4.3.2/gcc/doc/invoke.texi 2008-12-04 11:48:54.000000000 +0000
+@@ -430,6 +430,7 @@
+ -mpic-register=@var{reg} @gol
+ -mnop-fun-dllimport @gol
+ -mcirrus-fix-invalid-insns -mno-cirrus-fix-invalid-insns @gol
++-mieee @gol
+ -mpoke-function-name @gol
+ -mthumb -marm @gol
+ -mtpcs-frame -mtpcs-leaf-frame @gol
+@@ -8682,6 +8683,15 @@
+ can be re-enabled by use of the @option{-mno-cirrus-fix-invalid-insns}
+ switch.
+
++@item -mieee
++When compiling for the Maverick FPU, disable the instructions that fail
++to honor denormalized values. As these include floating point add, sub,
++neg, abs and float<->double conversions, it incurs a severe speed penalty.
++This option only has an effect if the
++@option{-mcpu=ep9312} @option{-mfpu=maverick} options have been used and is
++disabled by default.
++The default can be re-enabled by use of the @option{-mno-ieee} switch.
++
+ @item -mpoke-function-name
+ @opindex mpoke-function-name
+ Write the name of each function into the text section, directly
+--- gcc-4.3.2/gcc/config/arm/arm.opt.old 2007-08-02 11:49:31.000000000 +0100
++++ gcc-4.3.2/gcc/config/arm/arm.opt 2008-12-04 11:42:50.000000000 +0000
+@@ -93,6 +93,10 @@
+ Target RejectNegative
+ Alias for -mfloat-abi=hard
+
++mieee
++Target Report Mask(IEEE)
++Cirrus: Enable denormalized values by disabling buggy Maverick instructions
++
+ mlittle-endian
+ Target Report RejectNegative InverseMask(BIG_END)
+ Assume target CPU is configured as little endian
+--- gcc-4.3.2/gcc/config/arm/arm.c.old 2008-11-21 19:09:18.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.c 2008-12-03 12:03:31.000000000 +0000
+@@ -902,6 +902,10 @@
+ target_float_abi_name = "hard";
+ return true;
+
++ case OPT_mieee:
++ target_flags |= MASK_IEEE;
++ return true;
++
+ case OPT_msoft_float:
+ target_float_abi_name = "soft";
+ return true;
+--- gcc-4.3.2/gcc/config/arm/arm.md.old 2008-12-03 15:29:38.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md 2008-12-04 12:14:56.000000000 +0000
+@@ -831,7 +831,7 @@
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (plus:SF (match_operand:SF 1 "s_register_operand" "")
+ (match_operand:SF 2 "arm_float_add_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && !(TARGET_MAVERICK && TARGET_IEEE)"
+ "
+ if (TARGET_MAVERICK
+ && !cirrus_fp_register (operands[2], SFmode))
+@@ -842,7 +842,7 @@
+ [(set (match_operand:DF 0 "s_register_operand" "")
+ (plus:DF (match_operand:DF 1 "s_register_operand" "")
+ (match_operand:DF 2 "arm_float_add_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && !(TARGET_MAVERICK && TARGET_IEEE)"
+ "
+ if (TARGET_MAVERICK
+ && !cirrus_fp_register (operands[2], DFmode))
+@@ -1064,7 +1064,7 @@
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (minus:SF (match_operand:SF 1 "arm_float_rhs_operand" "")
+ (match_operand:SF 2 "arm_float_rhs_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && !(TARGET_MAVERICK && TARGET_IEEE)"
+ "
+ if (TARGET_MAVERICK)
+ {
+@@ -1079,7 +1079,7 @@
+ [(set (match_operand:DF 0 "s_register_operand" "")
+ (minus:DF (match_operand:DF 1 "arm_float_rhs_operand" "")
+ (match_operand:DF 2 "arm_float_rhs_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && !(TARGET_MAVERICK && TARGET_IEEE)"
+ "
+ if (TARGET_MAVERICK)
+ {
+@@ -3367,7 +3367,7 @@
+ (neg:SF (match_operand:SF 1 "s_register_operand" "")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT
+ && (TARGET_FPA || TARGET_VFP
+- || (TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS(SFmode))"
++ || (TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS(SFmode) && ! TARGET_IEEE))"
+ ""
+ )
+
+@@ -3376,7 +3376,7 @@
+ (neg:DF (match_operand:DF 1 "s_register_operand" "")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT
+ && (TARGET_FPA || TARGET_VFP
+- || (TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS(DFmode))"
++ || (TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS(DFmode) && ! TARGET_IEEE))"
+ "")
+
+ ;; abssi2 doesn't really clobber the condition codes if a different register
+@@ -3456,13 +3456,13 @@
+ (define_expand "abssf2"
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (abs:SF (match_operand:SF 1 "s_register_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && !(TARGET_MAVERICK && TARGET_IEEE)"
+ "")
+
+ (define_expand "absdf2"
+ [(set (match_operand:DF 0 "s_register_operand" "")
+ (abs:DF (match_operand:DF 1 "s_register_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && !(TARGET_MAVERICK && TARGET_IEEE)"
+ "")
+
+ (define_expand "sqrtsf2"
+@@ -3600,7 +3600,7 @@
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (float_truncate:SF
+ (match_operand:DF 1 "s_register_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && !(TARGET_MAVERICK && TARGET_IEEE)"
+ ""
+ )
+
+@@ -4462,7 +4462,7 @@
+ (define_expand "extendsfdf2"
+ [(set (match_operand:DF 0 "s_register_operand" "")
+ (float_extend:DF (match_operand:SF 1 "s_register_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && !(TARGET_MAVERICK && TARGET_IEEE)"
+ ""
+ )
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old 2008-12-03 12:13:08.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md 2008-12-04 14:01:59.000000000 +0000
+@@ -101,11 +101,12 @@
+ (set_attr "cirrus" "normal")]
+ )
+
++; Cirrus hardware bug: denormalized values on input are truncated to zero
+ (define_insn "*cirrus_addsf3"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (plus:SF (match_operand:SF 1 "cirrus_fp_register" "v")
+ (match_operand:SF 2 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! TARGET_IEEE"
+ "cfadds%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -115,7 +116,7 @@
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (plus:DF (match_operand:DF 1 "cirrus_fp_register" "v")
+ (match_operand:DF 2 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! TARGET_IEEE"
+ "cfaddd%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -145,7 +146,7 @@
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (minus:SF (match_operand:SF 1 "cirrus_fp_register" "v")
+ (match_operand:SF 2 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! TARGET_IEEE"
+ "cfsubs%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -155,7 +156,7 @@
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (minus:DF (match_operand:DF 1 "cirrus_fp_register" "v")
+ (match_operand:DF 2 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! TARGET_IEEE"
+ "cfsubd%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -316,10 +317,12 @@
+ )
+
+ ; Cirrus hardware bug: neg 0 -> 0 instead of -0
++; Cirrus hardware bug: denormalized values on input are truncated to zero
+ (define_insn "*cirrus_negsf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (neg:SF (match_operand:SF 1 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS (SFmode)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK
++ && ! HONOR_SIGNED_ZEROS (SFmode) && ! TARGET_IEEE"
+ "cfnegs%?\\t%V0, %V1"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -328,7 +331,8 @@
+ (define_insn "*cirrus_negdf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (neg:DF (match_operand:DF 1 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS (DFmode)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK
++ && ! HONOR_SIGNED_ZEROS (DFmode) && ! TARGET_IEEE"
+ "cfnegd%?\\t%V0, %V1"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -345,10 +349,11 @@
+ (set_attr "cirrus" "normal")]
+ )
+
++; Cirrus hardware bug: denormalized values on input are truncated to zero
+ (define_insn "*cirrus_abssf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (abs:SF (match_operand:SF 1 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! TARGET_IEEE"
+ "cfabss%?\\t%V0, %V1"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -357,7 +362,7 @@
+ (define_insn "*cirrus_absdf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (abs:DF (match_operand:DF 1 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! TARGET_IEEE"
+ "cfabsd%?\\t%V0, %V1"
+ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+@@ -423,20 +428,23 @@
+ (set_attr "length" "8")]
+ )
+
++; Cirrus hardware bugs: denormalized values on input are truncated to zero
++; and double-to-single float never produces denormalized values.
+ (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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! TARGET_IEEE"
+ "cfcvtds%?\\t%V0, %V1"
+ [(set_attr "type" "f_cvt")
+ (set_attr "cirrus" "normal")]
+ )
+
++; Cirrus hardware bug: denormalized values on input are truncated to zero
+ (define_insn "*cirrus_extendsfdf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (float_extend:DF (match_operand:SF 1 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! TARGET_IEEE"
+ "cfcvtsd%?\\t%V0, %V1"
+ [(set_attr "type" "f_cvt")
+ (set_attr "cirrus" "normal")]
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-movsf-movdf-Uy.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-movsf-movdf-Uy.patch
new file mode 100644
index 0000000000..b0cd7f84eb
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-movsf-movdf-Uy.patch
@@ -0,0 +1,65 @@
+This is a rewriting of the OE patch of the same name.
+
+The OE patch is different to this in that it:
+- reorders the constraints (we keep them in the same order)
+- its definition of attr "type" seem not to correspond to the insns it uses
+ (so here we define them to what seems right)
+- in movdf, it replaces operand 1 "general_operand" with "soft_df_operand" and
+ removes the first two clauses (r<->Q = memory indexed by base register)
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old 2008-11-15 18:46:25.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md 2008-11-18 11:51:52.000000000 +0000
+@@ -403,8 +403,8 @@
+ ;; on HARD_REGNO_MODE_OK.
+
+ (define_insn "*cirrus_movsf_hard_insn"
+- [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m")
+- (match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))]
++ [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v ,v,r,Uy,r,r,m")
++ (match_operand:SF 1 "general_operand" "v,UyE,r,v,v ,r,mE,r"))]
+ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK
+ && (GET_CODE (operands[0]) != MEM
+ || register_operand (operands[1], SFmode))"
+@@ -414,19 +414,18 @@
+ cfmvsr%?\\t%V0, %1
+ cfmvrs%?\\t%0, %V1
+ cfstrs%?\\t%V1, %0
+- mov%?\\t%0, %1
++ mov%?\\t%0, %1\\t%@ float
+ ldr%?\\t%0, %1\\t%@ float
+ str%?\\t%1, %0\\t%@ float"
+- [(set_attr "length" " *, *, *, *, *, 4, 4, 4")
+- (set_attr "type" " *, load1, *, *,store1, *,load1,store1")
+- (set_attr "pool_range" " *, 1020, *, *, *, *,4096, *")
+- (set_attr "neg_pool_range" " *, 1008, *, *, *, *,4084, *")
++ [(set_attr "type" "ffarith,f_loads,r_2_f,f_2_r,f_stores,*,load1,store1")
++ (set_attr "pool_range" " *, 1020, *, *, *, *,4096, *")
++ (set_attr "neg_pool_range" " *, 1008, *, *, *, *,4080, *")
+ (set_attr "cirrus" "normal,normal,move,normal,normal,not, not, not")]
+ )
+
+ (define_insn "*cirrus_movdf_hard_insn"
+- [(set (match_operand:DF 0 "nonimmediate_operand" "=r,Q,r,m,r,v,v,v,r,m")
+- (match_operand:DF 1 "general_operand" "Q,r,r,r,mF,v,mF,r,v,v"))]
++ [(set (match_operand:DF 0 "nonimmediate_operand" "=r,Q,r,m,r ,v,v ,v,r,Uy")
++ (match_operand:DF 1 "general_operand" "Q,r,r,r,mF,v,UyF,r,v,v"))]
+ "TARGET_ARM
+ && TARGET_HARD_FLOAT && TARGET_MAVERICK
+ && (GET_CODE (operands[0]) != MEM
+@@ -447,11 +446,11 @@
+ default: gcc_unreachable ();
+ }
+ }"
+- [(set_attr "type" "load1,store2, *,store2,load1, *, load1, *, *,store2")
+- (set_attr "length" " 4, 4, 8, 8, 8, 4, 4, 8, 8, 4")
+- (set_attr "pool_range" " *, *, *, *, 252, *, 1020, *, *, *")
+- (set_attr "neg_pool_range" " *, *, *, *, 244, *, 1008, *, *, *")
+- (set_attr "cirrus" " not, not,not, not, not,normal,double,move,normal,double")]
++ [(set_attr "type" "load2,store2, *,store2,load2,ffarith,f_loadd,r_2_f,f_2_r,store2")
++ (set_attr "length" " 4, 4, 8, 8, 8, 4, 4, 8, 8, 4")
++ (set_attr "pool_range" " *, *, *, *, 1020, *, 1020, *, *, *")
++ (set_attr "neg_pool_range" " *, *, *, *, 1008, *, 1008, *, *, *")
++ (set_attr "cirrus" " not, not,not, not, not,normal,double,move,normal,double")]
+ )
+
+ (define_insn "*cirrus_thumb2_movdi"
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-enable.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-enable.patch
new file mode 100644
index 0000000000..d675407435
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-enable.patch
@@ -0,0 +1,31 @@
+In arm.md, enable expansion for neg[sd]f for Maverick - the instructions are
+already already defined in cirrus.md
+
+Without this patch for some reason it still manages to produce cfnegd
+instructions but not cfnegs, presumably via some optimization path.
+
+ Martin Guy <martinwguy@yahoo.it> December 2008
+
+--- gcc-4.3.2/gcc/config/arm/arm.md.old 2008-12-03 15:22:43.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md 2008-12-03 15:29:38.000000000 +0000
+@@ -3366,14 +3366,18 @@
+ (define_expand "negsf2"
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (neg:SF (match_operand:SF 1 "s_register_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP
++ || (TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS(SFmode))"
+ ""
+ )
+
+ (define_expand "negdf2"
+ [(set (match_operand:DF 0 "s_register_operand" "")
+ (neg:DF (match_operand:DF 1 "s_register_operand" "")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_32BIT && TARGET_HARD_FLOAT
++ && (TARGET_FPA || TARGET_VFP
++ || (TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS(DFmode))"
+ "")
+
+ ;; abssi2 doesn't really clobber the condition codes if a different register
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-protect.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-protect.patch
new file mode 100644
index 0000000000..63d3090e94
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-neg-protect.patch
@@ -0,0 +1,33 @@
+The Crunch cfnegs and cfnegd instructions have a hardware bug in all silicon
+revisions (D0 to E2) whereby neg(0) returns 0 (not -0). See erratum 12.
+
+For ieee-correctness, and to pass another case in GCC's IEEE testsuite,
+we disable the instruction and do it in software unless
+-funsafe-math-optimizations (included in -ffast-math) is given.
+
+ Martin Guy <martinwguy@yahoo.it>, September 2008
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md-original 2007-06-12 17:01:24.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md 2007-06-12 17:03:26.000000000 +1000
+@@ -254,18 +254,19 @@
+ [(set_attr "cirrus" "normal")]
+ )
+
++; Cirrus hardware bug: neg 0 -> 0 instead of -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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS (SFmode)"
+ "cfnegs%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "*cirrus_negdf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (neg:DF (match_operand:DF 1 "cirrus_fp_register" "v")))]
+- "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS (DFmode)"
+ "cfnegd%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")]
+ )
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-pipeline.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-pipeline.patch
new file mode 100644
index 0000000000..a6ae3f6a29
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-pipeline.patch
@@ -0,0 +1,461 @@
+Patch to add description of MaverickCrunch pipelines.
+
+This increases the speed as measured by the fftw benchmark from
+5.4 to 5.8 mflops and reduced LAME's execution time from 2m30 to 2m20.
+
+I don't know who wrote this - I got it from Hasjim Williams.
+
+ -martinwguy
+
+--- gcc-4.3.2/gcc/config/arm/arm.md.old 2008-11-21 19:06:18.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md 2008-11-21 19:06:37.000000000 +0000
+@@ -230,13 +230,10 @@
+ ; store2 store 2 words
+ ; store3 store 3 words
+ ; store4 store 4 (or more) words
+-; Additions for Cirrus Maverick co-processor:
+-; mav_farith Floating point arithmetic (4 cycle)
+-; mav_dmult Double multiplies (7 cycle)
+ ;
+
+ (define_attr "type"
+- "alu,alu_shift,alu_shift_reg,mult,block,float,fdivx,fdivd,fdivs,fmul,fmuls,fmuld,fmacs,fmacd,ffmul,farith,ffarith,f_flag,float_em,f_load,f_store,f_loads,f_loadd,f_stores,f_stored,f_mem_r,r_mem_f,f_2_r,r_2_f,f_cvt,branch,call,load_byte,load1,load2,load3,load4,store1,store2,store3,store4,mav_farith,mav_dmult"
++ "alu,alu_shift,alu_shift_reg,mult,block,float,fdivx,fdivd,fdivs,fmul,fmuls,fmuld,fmacs,fmacd,ffmul,farith,ffarith,f_flag,float_em,f_load,f_store,f_loads,f_loadd,f_stores,f_stored,f_mem_r,r_mem_f,f_2_r,r_2_f,f_cvt,branch,call,load_byte,load1,load2,load3,load4,store1,store2,store3,store4"
+ (if_then_else
+ (eq_attr "insn" "smulxy,smlaxy,smlalxy,smulwy,smlawx,mul,muls,mla,mlas,umull,umulls,umlal,umlals,smull,smulls,smlal,smlals")
+ (const_string "mult")
+@@ -7340,7 +7337,7 @@
+ (match_operand:SF 1 "cirrus_fp_register" "v")))]
+ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfcmps%?\\tr15, %V0, %V1"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "compare")]
+ )
+
+@@ -7351,7 +7348,7 @@
+ (match_operand:DF 1 "cirrus_fp_register" "v")))]
+ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfcmpd%?\\tr15, %V0, %V1"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "compare")]
+ )
+
+@@ -7374,7 +7371,7 @@
+ (match_operand:DI 1 "cirrus_fp_register" "v")))]
+ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK & 0"
+ "cfcmp64%?\\tr15, %V0, %V1"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "compare")]
+ )
+
+--- gcc-4.3.2/gcc/config/arm/cirrus.md.old 2008-11-21 14:25:50.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/cirrus.md 2008-11-21 14:42:01.000000000 +0000
+@@ -19,6 +19,58 @@
+ ;; along with GCC; see the file COPYING3. If not see
+ ;; <http://www.gnu.org/licenses/>.
+
++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
++;; Pipeline description
++;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
++
++(define_automaton "crunch")
++
++;; There are 2 pipelines in the CRUNCH unit.
++;;
++;; - A 8/9-stage? FMAC pipeline (7/8? execute + writeback)
++;;
++;; - A 4-stage LS pipeline (execute + 2 memory + writeback) with forward from
++;; second memory stage for loads.
++
++(define_cpu_unit "crunch_fmac" "crunch")
++
++(define_cpu_unit "crunch_ls" "crunch")
++
++;; The CRUNCH "type" attributes differ from those used in the FPA and VFP model.
++;; ffarith Fast floating point insns.
++;; farith Most arithmetic insns.
++;; fmul Double precision multiply.
++;; f_load[sd] Floating point load from memory.
++;; f_store[sd] Floating point store to memory.
++;; f_2_r Transfer crunch to arm reg.
++;; r_2_f Transfer arm to crunch reg.
++;; f_cvt Convert floating<->integral
++
++(define_insn_reservation "crunch_ffarith" 18
++ (and (eq_attr "fpu" "maverick")
++ (eq_attr "type" "ffarith"))
++ "crunch_fmac")
++
++(define_insn_reservation "crunch_farith" 18
++ (and (eq_attr "fpu" "maverick")
++ (eq_attr "type" "farith,f_cvt"))
++ "crunch_fmac")
++
++(define_insn_reservation "crunch_fmul" 30
++ (and (eq_attr "fpu" "maverick")
++ (eq_attr "type" "fmul"))
++ "crunch_fmac*2")
++
++;; Moves to/from arm regs also use the load/store pipeline.
++(define_insn_reservation "crunch_fload" 8
++ (and (eq_attr "fpu" "maverick")
++ (eq_attr "type" "f_loads,f_loadd,r_2_f"))
++ "crunch_ls")
++
++(define_insn_reservation "crunch_fstore" 8
++ (and (eq_attr "fpu" "maverick")
++ (eq_attr "type" "f_stores,f_stored,f_2_r"))
++ "crunch_ls")
+
+ ; Cirrus types for invalid insn combinations
+ ; not Not a cirrus insn
+@@ -35,7 +87,7 @@
+ (match_operand:DI 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfadd64%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -45,7 +97,7 @@
+ (match_operand:SI 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfadd32%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -55,7 +107,7 @@
+ (match_operand:SF 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfadds%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -65,7 +117,7 @@
+ (match_operand:DF 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfaddd%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -75,7 +127,7 @@
+ (match_operand:DI 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfsub64%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -85,7 +137,7 @@
+ (match_operand:SI 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfsub32%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -95,7 +147,7 @@
+ (match_operand:SF 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfsubs%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -105,7 +157,7 @@
+ (match_operand:DF 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfsubd%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -115,7 +167,7 @@
+ (match_operand:SI 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfmul32%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -125,7 +177,7 @@
+ (match_operand:DI 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfmul64%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_dmult")
++ [(set_attr "type" "fmul")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -137,7 +189,7 @@
+ (match_operand:SI 3 "cirrus_fp_register" "0")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfmac32%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -150,7 +202,7 @@
+ (match_operand:SI 3 "cirrus_fp_register" "v"))))]
+ "0 && TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfmsc32%?\\t%V0, %V2, %V3"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -160,7 +212,7 @@
+ (match_operand:SF 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfmuls%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_farith")
++ [(set_attr "type" "farith")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -170,7 +222,7 @@
+ (match_operand:DF 2 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfmuld%?\\t%V0, %V1, %V2"
+- [(set_attr "type" "mav_dmult")
++ [(set_attr "type" "fmul")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -180,7 +232,8 @@
+ (match_operand:SI 2 "cirrus_shift_const" "")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfsh32%?\\t%V0, %V1, #%s2"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "cirrus_ashiftrt_const"
+@@ -189,7 +242,8 @@
+ (match_operand:SI 2 "cirrus_shift_const" "")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfsh32%?\\t%V0, %V1, #-%s2"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "cirrus_ashlsi3"
+@@ -198,7 +252,8 @@
+ (match_operand:SI 2 "register_operand" "r")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfrshl32%?\\t%V1, %V0, %s2"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "ashldi3_cirrus"
+@@ -207,7 +262,8 @@
+ (match_operand:SI 2 "register_operand" "r")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfrshl64%?\\t%V1, %V0, %s2"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "cirrus_ashldi_const"
+@@ -216,7 +272,8 @@
+ (match_operand:SI 2 "cirrus_shift_const" "")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfsh64%?\\t%V0, %V1, #%s2"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "cirrus_ashiftrtdi_const"
+@@ -225,7 +282,8 @@
+ (match_operand:SI 2 "cirrus_shift_const" "")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfsh64%?\\t%V0, %V1, #-%s2"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "*cirrus_absdi2"
+@@ -233,7 +291,8 @@
+ (abs:DI (match_operand:DI 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfabs64%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ ;; This doesn't really clobber ``cc''. Fixme: aldyh.
+@@ -243,7 +302,8 @@
+ (clobber (reg:CC CC_REGNUM))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfneg64%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "*cirrus_negsi2"
+@@ -251,7 +311,8 @@
+ (neg:SI (match_operand:SI 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfneg32%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ ; Cirrus hardware bug: neg 0 -> 0 instead of -0
+@@ -260,7 +321,8 @@
+ (neg:SF (match_operand:SF 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS (SFmode)"
+ "cfnegs%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "*cirrus_negdf2"
+@@ -268,7 +330,8 @@
+ (neg:DF (match_operand:DF 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && ! HONOR_SIGNED_ZEROS (DFmode)"
+ "cfnegd%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ ;; This doesn't really clobber the condition codes either.
+@@ -278,7 +341,8 @@
+ (clobber (reg:CC CC_REGNUM))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfabs32%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "*cirrus_abssf2"
+@@ -286,7 +350,8 @@
+ (abs:SF (match_operand:SF 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfabss%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "*cirrus_absdf2"
+@@ -294,7 +359,8 @@
+ (abs:DF (match_operand:DF 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfabsd%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "farith")
++ (set_attr "cirrus" "normal")]
+ )
+
+ ;; Convert Cirrus-SI to Cirrus-SF
+@@ -303,7 +369,8 @@
+ (float:SF (match_operand:SI 1 "s_register_operand" "r")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfmv64lr%?\\t%Z0, %1\;cfcvt32s%?\\t%V0, %Y0"
+- [(set_attr "length" "8")
++ [(set_attr "type" "f_cvt")
++ (set_attr "length" "8")
+ (set_attr "cirrus" "move")]
+ )
+
+@@ -312,7 +379,8 @@
+ (float:DF (match_operand:SI 1 "s_register_operand" "r")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfmv64lr%?\\t%Z0, %1\;cfcvt32d%?\\t%V0, %Y0"
+- [(set_attr "length" "8")
++ [(set_attr "type" "f_cvt")
++ (set_attr "length" "8")
+ (set_attr "cirrus" "move")]
+ )
+
+@@ -321,14 +389,18 @@
+ (float:SF (match_operand:DI 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfcvt64s%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")])
++ [(set_attr "type" "f_cvt")
++ (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_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfcvt64d%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")])
++ [(set_attr "type" "f_cvt")
++ (set_attr "cirrus" "normal")]
++)
+
+ (define_insn "cirrus_truncsfsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+@@ -336,7 +408,8 @@
+ (clobber (match_scratch:DF 2 "=v"))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cftruncs32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+- [(set_attr "length" "8")
++ [(set_attr "type" "f_cvt")
++ (set_attr "length" "8")
+ (set_attr "cirrus" "normal")]
+ )
+
+@@ -346,7 +419,8 @@
+ (clobber (match_scratch:DF 2 "=v"))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cftruncd32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+- [(set_attr "length" "8")]
++ [(set_attr "type" "f_cvt")
++ (set_attr "length" "8")]
+ )
+
+ (define_insn "*cirrus_truncdfsf2"
+@@ -355,7 +429,8 @@
+ (match_operand:DF 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfcvtds%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "f_cvt")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "*cirrus_extendsfdf2"
+@@ -363,7 +438,8 @@
+ (float_extend:DF (match_operand:SF 1 "cirrus_fp_register" "v")))]
+ "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cfcvtsd%?\\t%V0, %V1"
+- [(set_attr "cirrus" "normal")]
++ [(set_attr "type" "f_cvt")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "*cirrus_arm_movdi"
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-readme.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-readme.patch
new file mode 100644
index 0000000000..9d75abd08a
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-readme.patch
@@ -0,0 +1,107 @@
+--- gcc-4.3.2-orig/gcc/config/arm/README-Maverick 1970-01-01 01:00:00.000000000 +0100
++++ gcc-4.3.2/gcc/config/arm/README-Maverick 2009-03-10 22:04:26.000000000 +0000
+@@ -0,0 +1,104 @@
++Cirrus Logic MaverickCrunch FPU support
++=======================================
++
++The MaverickCrunch is an FPU coprocessor that only exists in combination
++with an arm920t (ARMv4t arch) integer core in the 200MHz EP93xx devices.
++Code generation for it is usually selected with
++ -mcpu=ep9312 -mfpu=maverick (and most likely -mfloat-abi=softfp)
++
++Within GCC, the names "cirrus" "maverick" and "crunch" are used randomly
++in filenames and identifiers, but they all refer to the same thing.
++
++Initial support was mainlined by RedHat in gcc-3 but this never generated
++working code. Cirrus Logic funded the company Nucleusys to produce a modified
++GCC for it, but this never worked either. The first set of patches to pass
++the testsuite were made by Hasjim Williams for Open Embedded, though they
++did this by disabling various features and optimisations, therby incurring
++a small negative impact on regular ARM code generation.
++The OE ideas were reimplemented by Martin Guy to produce a working compiler
++with no negwative impact on regular code generation.
++
++The FPU's characteristics
++-------------------------
++Like most ARM coprocessors, it runs in parallel with the ARM though its
++instructions are inserted into the regular ARM instructions stream.
++It has 16 64-bit registers that can be operated as 32-bit or 64-bit integers
++or as 32-bit or 64-bit floats, three 72-bit saturating multiplier-accumulators.
++It can add, sub, mul, cmp, abs and neg these types, convert between them and
++transfer values between its registers and the ARM registers or main memory.
++
++Comparisons performed in the Maverick unit set the condition codes differently
++from the ARM/FPA/VFP instructions:
++
++ ARM/FPA/VFP - (cmp*): MaverickCrunch - (cfcmp*):
++ N Z C V N Z C V
++ A == B 0 1 1 0 A == B 0 1 0 0
++ A < B 1 0 0 0 A < B 1 0 0 0
++ A > B 0 0 1 0 A > B 1 0 0 1
++ unord 0 0 1 1 unord 0 0 0 0
++
++which means that the same conditions have to be tested for with different ARM
++conditions after a Maverick comparison. Furthermore, some conditions cannot
++be tested with a single condition.
++This was already true on ARM/FPA/VFP for conditions UNEQ and LTGT;
++on Maverick comparisons it is GE UNLT ORDERED and UNORDERED that cannot.
++(GE after a floating point comparison, that is, not after an integer comarison)
++
++GCC's use of the Maverick unit
++------------------------------
++GCC only uses the 32-bit and 64-bit floating point modes and the 64-bit
++integer mode. It does not use the 72-bit accumulators or the 32-bit integer
++mode because, from "GCC Machine Descriptions":
++ "It is obligatory to support floating point `movm' instructions
++ into and out of any registers that can hold fixed point values,
++ because unions and structures (which have modes SImode or DImode)
++ can be in those registers and they may have floating point members."
++(search also for "grief" in arm.c).
++
++It does not use the 64-bit integer comparison instruction because it can only
++do a signed or an unsigned comparison, while GCC expect the comparison to set
++the conditions codes for both modes and then to use the signed or unsigned
++mode when the condition code bits are tested.
++
++The different setting of the condition codes is tracked with an additional
++CCMAV mode for the condition code register, set when a comparison is performed
++in the Maverick unit. This always indicates a floating point comparison since
++the Maverick's 64-bit comparison is not used.
++
++Hardware bugs and workarounds
++-----------------------------
++All silicon implementations of the FPU have a dozen hardware bugs, mostly
++timing-dependent bugs that can write garbage into registers or memory or get
++conditional tests wrong, as well as a widespread failure to respect
++denormalised values. See http://wiki.debian.org/ArmEabiMaverickCrunch
++
++There used to be a -mcirrus-fix-invalid-instructions flag that claimed
++to avoid bugs in revision D0 silicon but its code was broken junk.
++Currently GCC always avoids the timing bugs in revision D1 to E2 silicon,
++while the many extra timing bugs in the now rare revision D0 are not handled.
++
++By default, the instructions that drop denoermalized values are enabled
++so as to obtain maximum speed at lower precision. By default, the cfnegs
++and cfnegd instrutions are disabled, since they also fail to produce negative
++zero. They can be enabled with -fno-signed-zeros.
++
++When -mfpu=maverick is selected, an additional -mieee flag is active that
++gives full IEEE precision by performs all the non-denorm-respecting
++floating point instructions in the softfloat library routines or in the
++integer registers.
++
++The 64-bit integer support is still buggy so it is disabled unless the
++-mcirrus-di flag is supplied. As well as the having unidentified
++hardware bugs which make openssl's testsuite fail in */sha/sha512.c and in
++*/bn/bn_adm.c, 64-bit shifts only work up to 31 places left or 32 right.
++
++Other bugs
++----------
++There seems to be no way to configure GCC to select Maverick code generation
++as the default.
++
++--with-arch=ep9312 the assembler barfs saying that ep9312 is not a
++recognised architecture.
++--with-arch=armv4t the build fails when it tries to compile hard FPA
++instructions into libgcc,
++--with-cpu=ep9312 it compiles armv5t instructions into libgcc
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-repair-truncxfsi.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-repair-truncxfsi.patch
new file mode 100644
index 0000000000..b15ad24a85
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-repair-truncxfsi.patch
@@ -0,0 +1,29 @@
+Fix two bugs in the Maverick trunc[sd]fsi expansions:
+- the target of cirrus_truncsfsi2 is an ARM register, not a Maverick register.
+- a typo in both descriptions transfers info for operand 0 into operand 1
+
+ Martin Guy <martinwguy"yahoo.it> 15 Nov 2008
+
+--- gcc-4.3.2/gcc/config/arm/arm.md.old 2008-11-09 19:13:54.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md 2008-11-15 18:11:08.000000000 +0000
+@@ -3574,10 +3574,8 @@
+ "
+ if (TARGET_MAVERICK)
+ {
+- if (!cirrus_fp_register (operands[0], SImode))
+- operands[0] = force_reg (SImode, operands[0]);
+ if (!cirrus_fp_register (operands[1], SFmode))
+- operands[1] = force_reg (SFmode, operands[0]);
++ operands[1] = force_reg (SFmode, operands[1]);
+ emit_insn (gen_cirrus_truncsfsi2 (operands[0], operands[1]));
+ DONE;
+ }
+@@ -3591,7 +3589,7 @@
+ if (TARGET_MAVERICK)
+ {
+ if (!cirrus_fp_register (operands[1], DFmode))
+- operands[1] = force_reg (DFmode, operands[0]);
++ operands[1] = force_reg (DFmode, operands[1]);
+ emit_insn (gen_cirrus_truncdfsi2 (operands[0], operands[1]));
+ DONE;
+ }
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-saveregs.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-saveregs.patch
new file mode 100644
index 0000000000..6bbc959bde
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-saveregs.patch
@@ -0,0 +1,88 @@
+Save Maverick registers on function entry and restore them on exit if they
+are modified within the function and are among those that must be preserved
+across function calls.
+
+Also check whether Maverik registers need restoring when deciding whether to
+return directly from the middle of a function without an epilogue.
+
+This combines futaris' [saveregs] and [use_return_insn] patches.
+
+--- gcc-4.3.2-orig/gcc/config/arm/arm.c 2008-06-11 11:52:55.000000000 +0100
++++ gcc-4.3.2/gcc/config/arm/arm.c 2008-09-27 12:40:19.000000000 +0100
+@@ -1738,6 +1738,12 @@
+ if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
+ return 0;
+
++ /* Likewise Maverick regs. */
++ if (TARGET_MAVERICK)
++ for (regno = FIRST_CIRRUS_FP_REGNUM; regno <= LAST_CIRRUS_FP_REGNUM; regno++)
++ if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
++ return 0;
++
+ if (TARGET_REALLY_IWMMXT)
+ for (regno = FIRST_IWMMXT_REGNUM; regno <= LAST_IWMMXT_REGNUM; regno++)
+ if (df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+@@ -11315,6 +11321,17 @@
+ reg, FP_REGNUM, floats_offset - vfp_offset);
+ }
+ }
++ else if (arm_fpu_arch == FPUTYPE_MAVERICK)
++ {
++ for (reg = LAST_CIRRUS_FP_REGNUM; reg >= FIRST_CIRRUS_FP_REGNUM; reg--)
++ if (df_regs_ever_live_p (reg) && !call_used_regs[reg])
++ {
++ floats_offset += 8;
++ asm_fprintf (f, "\tcfldrd\tmvd%d, [%r, #-%d]\n",
++ reg - FIRST_CIRRUS_FP_REGNUM, FP_REGNUM,
++ floats_offset - vfp_offset);
++ }
++ }
+ else
+ {
+ start_reg = LAST_FPA_REGNUM;
+@@ -11480,6 +11497,13 @@
+ asm_fprintf (f, "\tldfe\t%r, [%r], #12\n",
+ reg, SP_REGNUM);
+ }
++ else if (arm_fpu_arch == FPUTYPE_MAVERICK)
++ {
++ for (reg = FIRST_CIRRUS_FP_REGNUM; reg <= LAST_CIRRUS_FP_REGNUM; reg++)
++ if (df_regs_ever_live_p (reg) && !call_used_regs[reg])
++ asm_fprintf (f, "\tcfldrd\tmvd%u, [%r], #8\n",
++ reg - FIRST_CIRRUS_FP_REGNUM, SP_REGNUM);
++ }
+ else
+ {
+ start_reg = FIRST_FPA_REGNUM;
+@@ -11991,6 +12015,11 @@
+ func_type = arm_current_func_type ();
+ if (! IS_VOLATILE (func_type))
+ {
++ /* Space for saved MAVERICK registers. */
++ for (regno = FIRST_CIRRUS_FP_REGNUM; regno <= LAST_CIRRUS_FP_REGNUM; regno++)
++ if (df_regs_ever_live_p (regno) && !call_used_regs[regno])
++ saved += 8;
++
+ /* Space for saved FPA registers. */
+ for (regno = FIRST_FPA_REGNUM; regno <= LAST_FPA_REGNUM; regno++)
+ if (df_regs_ever_live_p (regno) && ! call_used_regs[regno])
+@@ -12156,6 +12185,19 @@
+ saved_size += 12;
+ }
+ }
++ else if (arm_fpu_arch == FPUTYPE_MAVERICK)
++ {
++ for (reg = LAST_CIRRUS_FP_REGNUM; reg >= FIRST_CIRRUS_FP_REGNUM; reg--)
++ if (df_regs_ever_live_p (reg) && !call_used_regs[reg])
++ {
++ insn = gen_rtx_PRE_DEC (DFmode, stack_pointer_rtx);
++ 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_size += 8;
++ }
++ }
+ else
+ {
+ start_reg = LAST_FPA_REGNUM;
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-scratch.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-scratch.patch
new file mode 100644
index 0000000000..fa3dc80b70
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-scratch.patch
@@ -0,0 +1,27 @@
+Increase the number of Cirrus scratch registers from 4 to 8 (ie half of them)
+
+--- gcc-4.3.2/gcc/config/arm/arm.h.old 2008-09-26 16:01:45.000000000 +0100
++++ gcc-4.3.2/gcc/config/arm/arm.h 2008-09-28 11:20:19.000000000 +0100
+@@ -626,8 +626,8 @@
+
+ /*
+ mvf0 Cirrus floating point result
+- mvf1-mvf3 Cirrus floating point scratch
+- mvf4-mvf15 S Cirrus floating point variable. */
++ mvf1-mvf7 Cirrus floating point scratch
++ mvf8-mvf15 S Cirrus floating point variable. */
+
+ /* s0-s15 VFP scratch (aka d0-d7).
+ s16-s31 S VFP variable (aka d8-d15).
+diff -urN gcc-4.3.0/gcc/config/arm/arm.h gcc-4.3.0/gcc/config/arm/arm.h
+--- gcc-4.3.2/gcc/config/arm/arm.h 2008-04-07 12:17:46.000000000 +1000
++++ gcc-4.3.2/gcc/config/arm/arm.h 2008-04-07 12:18:10.000000000 +1000
+@@ -753,7 +752,7 @@
+ regno <= LAST_CIRRUS_FP_REGNUM; ++ regno) \
+ { \
+ fixed_regs[regno] = 0; \
+- call_used_regs[regno] = regno < FIRST_CIRRUS_FP_REGNUM + 4; \
++ call_used_regs[regno] = regno < FIRST_CIRRUS_FP_REGNUM + 8; \
+ } \
+ } \
+ if (TARGET_VFP) \
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-prologue_use-length.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-prologue_use-length.patch
new file mode 100644
index 0000000000..d08b4fcad1
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-prologue_use-length.patch
@@ -0,0 +1,10 @@
+--- gcc-4.3.2/gcc/config/arm/arm.md.old 2008-12-09 10:23:57.000000000 +0000
++++ gcc-4.3.2/gcc/config/arm/arm.md 2009-03-10 12:14:01.000000000 +0000
+@@ -11110,6 +11110,7 @@
+ [(unspec:SI [(match_operand:SI 0 "register_operand" "")] UNSPEC_PROLOGUE_USE)]
+ ""
+ "%@ %0 needed for prologue"
++ [(set_attr "length" "0")]
+ )
+
+
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-size-bugfix.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-size-bugfix.patch
new file mode 100644
index 0000000000..c3f3f3d288
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-size-bugfix.patch
@@ -0,0 +1,33 @@
+Fix an obvious bug in GCC-4.3.2's ARM code generator.
+
+PR target/37668
+ * arm.c (arm_size_rtx_costs, case NEG): Don't fall through if the
+ result will be in an FPU register.
+
+This has been applied in gcc-4.4.0
+
+ Martin Guy <martinwguy@yahoo.it>
+
+*** gcc-4.3.2/gcc/config/arm/arm.c (revision 142660)
+--- gcc-4.3.2/gcc/config/arm/arm.c (local)
+*************** arm_size_rtx_costs (rtx x, int code, int
+*** 5201,5207 ****
+
+ case NEG:
+ if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT)
+! *total = COSTS_N_INSNS (1);
+ /* Fall through */
+ case NOT:
+ *total = COSTS_N_INSNS (ARM_NUM_REGS (mode));
+--- 5201,5211 ----
+
+ case NEG:
+ if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT)
+! {
+! *total = COSTS_N_INSNS (1);
+! return false;
+! }
+!
+ /* Fall through */
+ case NOT:
+ *total = COSTS_N_INSNS (ARM_NUM_REGS (mode));
diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/series b/recipes/gcc/gcc-4.3.3/ep93xx/series
new file mode 100644
index 0000000000..e6bfe421f1
--- /dev/null
+++ b/recipes/gcc/gcc-4.3.3/ep93xx/series
@@ -0,0 +1,25 @@
+arm-crunch-readme.patch
+arm-crunch-saveregs.patch
+arm-crunch-scratch.patch
+arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch
+arm-crunch-eabi-mvf0-scratch-ieee754.patch
+arm-crunch-20000320.patch
+arm-crunch-disable-cmpdi.patch
+arm-crunch-fix-64bit-const-offsets.patch
+arm-crunch-fp_consts.patch
+arm-crunch-neg-enable.patch
+arm-crunch-neg-protect.patch
+arm-crunch-repair-truncxfsi.patch
+arm-crunch-floatsi-no-scratch.patch
+arm-crunch-movsf-movdf-Uy.patch
+arm-crunch-drop-thumb2.patch
+arm-crunch-arm_dbx_register_number.patch
+arm-crunch-pipeline.patch
+arm-crunch-ccmav-mode.patch
+arm-crunch-cfcpy-with-cfsh64.patch
+arm-crunch-mieee.patch
+arm-size-bugfix.patch
+arm-prologue_use-length.patch
+arm-crunch-cftruncd32-attr.patch
+arm-crunch-fix-cirrus-reorg5.patch
+arm-crunch-cirrus-di-flag.patch
diff --git a/recipes/gcc/gcc-4.3.3/fix-ICE-in-arm_unwind_emit_set.diff b/recipes/gcc/gcc-4.3.3/fix-ICE-in-arm_unwind_emit_set.diff
deleted file mode 100644
index b8a147d3d9..0000000000
--- a/recipes/gcc/gcc-4.3.3/fix-ICE-in-arm_unwind_emit_set.diff
+++ /dev/null
@@ -1,28 +0,0 @@
---- /tmp/arm.c 2008-03-17 14:24:39.590464969 +0100
-+++ gcc-4.3.0/gcc/config/arm/arm.c 2008-03-17 14:12:21.614701982 +0100
-@@ -15959,6 +15959,9 @@
- int regno;
- int lo_mask = mask & 0xFF;
- int pushed_words = 0;
-+ rtx e0;
-+ rtx e1;
-+ unsigned reg;
-
- gcc_assert (mask);
-
-@@ -16025,6 +16028,15 @@
-
- return;
- }
-+ 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
- {
- if (mask & 0xFF)
diff --git a/recipes/gcc/gcc-4.3.3/zecke-no-host-includes.patch b/recipes/gcc/gcc-4.3.3/zecke-no-host-includes.patch
index 6afb10d6ef..1f3b062feb 100644
--- a/recipes/gcc/gcc-4.3.3/zecke-no-host-includes.patch
+++ b/recipes/gcc/gcc-4.3.3/zecke-no-host-includes.patch
@@ -6,7 +6,7 @@ Index: gcc-4.0.2/gcc/c-incpath.c
p->construct = 0;
p->user_supplied_p = user_supplied_p;
-+#ifdef CROSS_COMPILE
++#ifdef CROSS_DIRECTORY_STRUCTURE
+ /* 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,
diff --git a/recipes/gcc/gcc-4.4.0.inc b/recipes/gcc/gcc-4.4.0.inc
index f0903ff76a..6ea9123460 100644
--- a/recipes/gcc/gcc-4.4.0.inc
+++ b/recipes/gcc/gcc-4.4.0.inc
@@ -7,10 +7,17 @@ LICENSE = "GPLv3"
DEPENDS = "mpfr gmp"
+INC_PR = "r1"
+
FILESPATHPKG .= ":gcc-$PV"
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \
+ file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \
+ file://100-uclibc-conf.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 \
"
# Language Overrides
FORTRAN = ""
diff --git a/recipes/gcc/gcc-4.4.0/200-uclibc-locale.patch b/recipes/gcc/gcc-4.4.0/200-uclibc-locale.patch
index 70ba98eed7..78570f0da7 100644
--- a/recipes/gcc/gcc-4.4.0/200-uclibc-locale.patch
+++ b/recipes/gcc/gcc-4.4.0/200-uclibc-locale.patch
@@ -2794,15 +2794,6 @@ Index: gcc-4.3.2/libstdc++-v3/configure
esac
# This is where the testsuite looks for locale catalogs, using the
-@@ -17016,7 +17089,7 @@
-
- # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
- cat > conftest.$ac_ext << EOF
--#line 17019 "configure"
-+#line 17092 "configure"
- int main()
- {
- // NB: _Atomic_word not necessarily int.
Index: gcc-4.3.2/libstdc++-v3/include/c_compatibility/wchar.h
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/include/c_compatibility/wchar.h 2007-03-04 14:59:49.000000000 -0800
diff --git a/recipes/gcc/gcc-4.4.0/fix-ICE-in-arm_unwind_emit_set.diff b/recipes/gcc/gcc-4.4.0/fix-ICE-in-arm_unwind_emit_set.diff
deleted file mode 100644
index b8a147d3d9..0000000000
--- a/recipes/gcc/gcc-4.4.0/fix-ICE-in-arm_unwind_emit_set.diff
+++ /dev/null
@@ -1,28 +0,0 @@
---- /tmp/arm.c 2008-03-17 14:24:39.590464969 +0100
-+++ gcc-4.3.0/gcc/config/arm/arm.c 2008-03-17 14:12:21.614701982 +0100
-@@ -15959,6 +15959,9 @@
- int regno;
- int lo_mask = mask & 0xFF;
- int pushed_words = 0;
-+ rtx e0;
-+ rtx e1;
-+ unsigned reg;
-
- gcc_assert (mask);
-
-@@ -16025,6 +16028,15 @@
-
- return;
- }
-+ 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
- {
- if (mask & 0xFF)
diff --git a/recipes/gcc/gcc-4.4.0/zecke-no-host-includes.patch b/recipes/gcc/gcc-4.4.0/zecke-no-host-includes.patch
index 4ccf35f627..abf829c60d 100644
--- a/recipes/gcc/gcc-4.4.0/zecke-no-host-includes.patch
+++ b/recipes/gcc/gcc-4.4.0/zecke-no-host-includes.patch
@@ -6,7 +6,7 @@ Index: gcc-4.4+svnr145550/gcc/incpath.c
p->construct = 0;
p->user_supplied_p = user_supplied_p;
-+#ifdef CROSS_COMPILE
++#ifdef CROSS_DIRECTORY_STRUCTURE
+ /* 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,
diff --git a/recipes/gcc/gcc-canadian-sdk_4.2.4.bb b/recipes/gcc/gcc-canadian-sdk_4.2.4.bb
index 409970be5f..dadb5b04f6 100644
--- a/recipes/gcc/gcc-canadian-sdk_4.2.4.bb
+++ b/recipes/gcc/gcc-canadian-sdk_4.2.4.bb
@@ -1,6 +1,6 @@
inherit canadian-sdk
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
diff --git a/recipes/gcc/gcc-configure-common.inc b/recipes/gcc/gcc-configure-common.inc
index ee5784afc3..9363585de1 100644
--- a/recipes/gcc/gcc-configure-common.inc
+++ b/recipes/gcc/gcc-configure-common.inc
@@ -89,4 +89,7 @@ do_configure () {
echo "#define STANDARD_INCLUDE_DIR \"${layout_includedir}\"" >> ${S}/gcc/defaults.h
oe_runconf
+
+ # make sure that no @LDFLAG@ is left in the generated Makefile
+ sed -i "s/@LDFLAGS@//g" ${B}/Makefile
}
diff --git a/recipes/gcc/gcc-cross-sdk_3.3.4.bb b/recipes/gcc/gcc-cross-sdk_3.3.4.bb
index ed9c18c557..525d1822b8 100644
--- a/recipes/gcc/gcc-cross-sdk_3.3.4.bb
+++ b/recipes/gcc/gcc-cross-sdk_3.3.4.bb
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "${INC_PR}.1"
inherit sdk
diff --git a/recipes/gcc/gcc-cross-sdk_3.4.3.bb b/recipes/gcc/gcc-cross-sdk_3.4.3.bb
index 0b1f6613bf..78c4cc0f4f 100644
--- a/recipes/gcc/gcc-cross-sdk_3.4.3.bb
+++ b/recipes/gcc/gcc-cross-sdk_3.4.3.bb
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross-sdk.inc
diff --git a/recipes/gcc/gcc-cross-sdk_3.4.4.bb b/recipes/gcc/gcc-cross-sdk_3.4.4.bb
index e3346590d5..6cb136a3d2 100644
--- a/recipes/gcc/gcc-cross-sdk_3.4.4.bb
+++ b/recipes/gcc/gcc-cross-sdk_3.4.4.bb
@@ -1,4 +1,4 @@
-PR = "r8"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross-sdk.inc
diff --git a/recipes/gcc/gcc-cross-sdk_4.1.0.bb b/recipes/gcc/gcc-cross-sdk_4.1.0.bb
index 6b6097fb00..f133db31b1 100644
--- a/recipes/gcc/gcc-cross-sdk_4.1.0.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.1.0.bb
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross-sdk.inc
diff --git a/recipes/gcc/gcc-cross-sdk_4.1.1.bb b/recipes/gcc/gcc-cross-sdk_4.1.1.bb
index a6418f6404..f133db31b1 100644
--- a/recipes/gcc/gcc-cross-sdk_4.1.1.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.1.1.bb
@@ -1,4 +1,4 @@
-PR = "r8"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross-sdk.inc
diff --git a/recipes/gcc/gcc-cross-sdk_4.1.2.bb b/recipes/gcc/gcc-cross-sdk_4.1.2.bb
index 7bc24806bb..9a9eb8ca56 100644
--- a/recipes/gcc/gcc-cross-sdk_4.1.2.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.1.2.bb
@@ -1,4 +1,4 @@
-PR = "r10"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross-sdk.inc
diff --git a/recipes/gcc/gcc-cross-sdk_4.2.2.bb b/recipes/gcc/gcc-cross-sdk_4.2.2.bb
index a326263c06..27a7ae0a7f 100644
--- a/recipes/gcc/gcc-cross-sdk_4.2.2.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.2.2.bb
@@ -1,4 +1,4 @@
-PR = "r8"
+PR = "${INC_PR}.1"
inherit sdk
diff --git a/recipes/gcc/gcc-cross-sdk_4.2.3.bb b/recipes/gcc/gcc-cross-sdk_4.2.3.bb
index 297bd8ece8..27a7ae0a7f 100644
--- a/recipes/gcc/gcc-cross-sdk_4.2.3.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.2.3.bb
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "${INC_PR}.1"
inherit sdk
diff --git a/recipes/gcc/gcc-cross-sdk_4.2.4.bb b/recipes/gcc/gcc-cross-sdk_4.2.4.bb
index c5a0a1aa88..ab52a9ae04 100644
--- a/recipes/gcc/gcc-cross-sdk_4.2.4.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.2.4.bb
@@ -1,4 +1,4 @@
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
inherit sdk
diff --git a/recipes/gcc/gcc-cross-sdk_4.3.1.bb b/recipes/gcc/gcc-cross-sdk_4.3.1.bb
index 45557b6003..27a7ae0a7f 100644
--- a/recipes/gcc/gcc-cross-sdk_4.3.1.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.3.1.bb
@@ -1,4 +1,4 @@
-PR = "r15"
+PR = "${INC_PR}.1"
inherit sdk
diff --git a/recipes/gcc/gcc-cross-sdk_4.3.2.bb b/recipes/gcc/gcc-cross-sdk_4.3.2.bb
index 297bd8ece8..27a7ae0a7f 100644
--- a/recipes/gcc/gcc-cross-sdk_4.3.2.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.3.2.bb
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "${INC_PR}.1"
inherit sdk
diff --git a/recipes/gcc/gcc-cross-sdk_4.3.3.bb b/recipes/gcc/gcc-cross-sdk_4.3.3.bb
index 27a7ae0a7f..6be2538cd5 100644
--- a/recipes/gcc/gcc-cross-sdk_4.3.3.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.3.3.bb
@@ -1,4 +1,4 @@
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
inherit sdk
diff --git a/recipes/gcc/gcc-cross-sdk_4.4.0.bb b/recipes/gcc/gcc-cross-sdk_4.4.0.bb
index a62d13bd2c..513cca1ddc 100644
--- a/recipes/gcc/gcc-cross-sdk_4.4.0.bb
+++ b/recipes/gcc/gcc-cross-sdk_4.4.0.bb
@@ -4,7 +4,7 @@ require gcc-${PV}.inc
require gcc-cross-sdk.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc
-PR = "r0"
+PR = "${INC_PR}.1"
DEPENDS += "gmp-native mpfr-native"
diff --git a/recipes/gcc/gcc-cross_3.3.4.bb b/recipes/gcc/gcc-cross_3.3.4.bb
index 462b9cdc66..0bf1951bea 100644
--- a/recipes/gcc/gcc-cross_3.3.4.bb
+++ b/recipes/gcc/gcc-cross_3.3.4.bb
@@ -1,4 +1,4 @@
-PR ="r10"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross.inc
diff --git a/recipes/gcc/gcc-cross_3.4.3.bb b/recipes/gcc/gcc-cross_3.4.3.bb
index 0ecee8ad89..0bf1951bea 100644
--- a/recipes/gcc/gcc-cross_3.4.3.bb
+++ b/recipes/gcc/gcc-cross_3.4.3.bb
@@ -1,4 +1,4 @@
-PR = "r18"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross.inc
diff --git a/recipes/gcc/gcc-cross_3.4.4.bb b/recipes/gcc/gcc-cross_3.4.4.bb
index 43d4b76037..0bf1951bea 100644
--- a/recipes/gcc/gcc-cross_3.4.4.bb
+++ b/recipes/gcc/gcc-cross_3.4.4.bb
@@ -1,4 +1,4 @@
-PR = "r14"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross.inc
diff --git a/recipes/gcc/gcc-cross_4.1.0.bb b/recipes/gcc/gcc-cross_4.1.0.bb
index 7675e473d3..9513c657f3 100644
--- a/recipes/gcc/gcc-cross_4.1.0.bb
+++ b/recipes/gcc/gcc-cross_4.1.0.bb
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/recipes/gcc/gcc-cross_4.1.1.bb b/recipes/gcc/gcc-cross_4.1.1.bb
index da797597d7..08ae7a552c 100644
--- a/recipes/gcc/gcc-cross_4.1.1.bb
+++ b/recipes/gcc/gcc-cross_4.1.1.bb
@@ -1,4 +1,4 @@
-PR = "r22"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/recipes/gcc/gcc-cross_4.1.2.bb b/recipes/gcc/gcc-cross_4.1.2.bb
index 2effd3e62e..85f90b31a1 100644
--- a/recipes/gcc/gcc-cross_4.1.2.bb
+++ b/recipes/gcc/gcc-cross_4.1.2.bb
@@ -1,4 +1,4 @@
-PR = "r20"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/recipes/gcc/gcc-cross_4.2.1.bb b/recipes/gcc/gcc-cross_4.2.1.bb
index b2dba3956a..c080143517 100644
--- a/recipes/gcc/gcc-cross_4.2.1.bb
+++ b/recipes/gcc/gcc-cross_4.2.1.bb
@@ -1,4 +1,4 @@
-PR = "r20"
+PR = "r21"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/recipes/gcc/gcc-cross_4.2.2.bb b/recipes/gcc/gcc-cross_4.2.2.bb
index 8e20d03e68..4e7fc479d1 100644
--- a/recipes/gcc/gcc-cross_4.2.2.bb
+++ b/recipes/gcc/gcc-cross_4.2.2.bb
@@ -1,4 +1,4 @@
-PR = "r14"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/recipes/gcc/gcc-cross_4.2.3.bb b/recipes/gcc/gcc-cross_4.2.3.bb
index 816eddba19..4e7fc479d1 100644
--- a/recipes/gcc/gcc-cross_4.2.3.bb
+++ b/recipes/gcc/gcc-cross_4.2.3.bb
@@ -1,4 +1,4 @@
-PR = "r10"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/recipes/gcc/gcc-cross_4.3.1.bb b/recipes/gcc/gcc-cross_4.3.1.bb
index 2764039081..398ee2ee79 100644
--- a/recipes/gcc/gcc-cross_4.3.1.bb
+++ b/recipes/gcc/gcc-cross_4.3.1.bb
@@ -1,4 +1,4 @@
-PR = "r18"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross4.inc
diff --git a/recipes/gcc/gcc-cross_4.3.2.bb b/recipes/gcc/gcc-cross_4.3.2.bb
index 7116611cd5..5eb6b5fbe8 100644
--- a/recipes/gcc/gcc-cross_4.3.2.bb
+++ b/recipes/gcc/gcc-cross_4.3.2.bb
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-cross4.inc
require gcc-configure-cross.inc
diff --git a/recipes/gcc/gcc-cross_4.4.0.bb b/recipes/gcc/gcc-cross_4.4.0.bb
index e3941b9bd2..4db1b33945 100644
--- a/recipes/gcc/gcc-cross_4.4.0.bb
+++ b/recipes/gcc/gcc-cross_4.4.0.bb
@@ -2,7 +2,7 @@ require gcc-${PV}.inc
require gcc-cross4.inc
require gcc-configure-cross.inc
require gcc-package-cross.inc
-PR = "r0"
+PR = "${INC_PR}.1"
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
diff --git a/recipes/gcc/gcc-native_3.4.4.bb b/recipes/gcc/gcc-native_3.4.4.bb
index c3f8106d3a..5686b4bc93 100644
--- a/recipes/gcc/gcc-native_3.4.4.bb
+++ b/recipes/gcc/gcc-native_3.4.4.bb
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
index 77da3fe3fa..fa1f47f51a 100644
--- a/recipes/gcc/gcc-package-cross.inc
+++ b/recipes/gcc/gcc-package-cross.inc
@@ -56,7 +56,7 @@ do_install () {
# Manually run the target stripper since we won't get it run by
# the packaging.
if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
- ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.*
+ ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.* || true
${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
diff --git a/recipes/gcc/gcc-package-sdk.inc b/recipes/gcc/gcc-package-sdk.inc
index 3d9cc0c53a..dcf2c890e4 100644
--- a/recipes/gcc/gcc-package-sdk.inc
+++ b/recipes/gcc/gcc-package-sdk.inc
@@ -48,10 +48,9 @@ do_install () {
# Create the ${prefix}/${TARGET_SYS}/bin/* symlinks
install -d ${D}${prefix}/${TARGET_SYS}/bin/
for l in ${D}${bindir}/*; do
- echo $l
- ln -sf "../../${layout_base_bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
+ ln -sf "../../`basename ${bindir}`/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
done
- ln -sf "${bindir}/${TARGET_PREFIX}gcc${EXEEXT}" "${D}${prefix}/${TARGET_SYS}/bin/cc${EXEEXT}"
+ ln -sf "../../`basename ${bindir}`/${TARGET_PREFIX}gcc${EXEEXT}" "${D}${prefix}/${TARGET_SYS}/bin/cc${EXEEXT}"
# Manually run the target stripper since we won't get it run by
# the packaging.
diff --git a/recipes/gcc/gcc_3.3.4.bb b/recipes/gcc/gcc_3.3.4.bb
index 1bbab50930..fdafce2474 100644
--- a/recipes/gcc/gcc_3.3.4.bb
+++ b/recipes/gcc/gcc_3.3.4.bb
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_3.4.3.bb b/recipes/gcc/gcc_3.4.3.bb
index fb5a85a4b5..fdafce2474 100644
--- a/recipes/gcc/gcc_3.4.3.bb
+++ b/recipes/gcc/gcc_3.4.3.bb
@@ -1,4 +1,4 @@
-PR = "r17"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_3.4.4.bb b/recipes/gcc/gcc_3.4.4.bb
index 73e908ae24..fdafce2474 100644
--- a/recipes/gcc/gcc_3.4.4.bb
+++ b/recipes/gcc/gcc_3.4.4.bb
@@ -1,4 +1,4 @@
-PR = "r12"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_4.1.0.bb b/recipes/gcc/gcc_4.1.0.bb
index 5e2598079b..fdafce2474 100644
--- a/recipes/gcc/gcc_4.1.0.bb
+++ b/recipes/gcc/gcc_4.1.0.bb
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_4.1.1.bb b/recipes/gcc/gcc_4.1.1.bb
index 3d202f9930..fdafce2474 100644
--- a/recipes/gcc/gcc_4.1.1.bb
+++ b/recipes/gcc/gcc_4.1.1.bb
@@ -1,4 +1,4 @@
-PR = "r23"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_4.1.2.bb b/recipes/gcc/gcc_4.1.2.bb
index 711aa35a32..22465d50d7 100644
--- a/recipes/gcc/gcc_4.1.2.bb
+++ b/recipes/gcc/gcc_4.1.2.bb
@@ -1,4 +1,4 @@
-PR = "r15"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_4.2.1.bb b/recipes/gcc/gcc_4.2.1.bb
index dd88ccdc27..711aa35a32 100644
--- a/recipes/gcc/gcc_4.2.1.bb
+++ b/recipes/gcc/gcc_4.2.1.bb
@@ -1,4 +1,4 @@
-PR = "r14"
+PR = "r15"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_4.2.2.bb b/recipes/gcc/gcc_4.2.2.bb
index f0471d473f..6b20b47f1a 100644
--- a/recipes/gcc/gcc_4.2.2.bb
+++ b/recipes/gcc/gcc_4.2.2.bb
@@ -1,4 +1,4 @@
-PR = "r11"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_4.2.3.bb b/recipes/gcc/gcc_4.2.3.bb
index ca22e0f69c..6b20b47f1a 100644
--- a/recipes/gcc/gcc_4.2.3.bb
+++ b/recipes/gcc/gcc_4.2.3.bb
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_4.3.1.bb b/recipes/gcc/gcc_4.3.1.bb
index af35244ec1..2153f272ee 100644
--- a/recipes/gcc/gcc_4.3.1.bb
+++ b/recipes/gcc/gcc_4.3.1.bb
@@ -1,4 +1,4 @@
-PR = "r12"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
diff --git a/recipes/gcc/gcc_4.3.2.bb b/recipes/gcc/gcc_4.3.2.bb
index fddf437351..60180755c9 100644
--- a/recipes/gcc/gcc_4.3.2.bb
+++ b/recipes/gcc/gcc_4.3.2.bb
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "${INC_PR}.1"
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
diff --git a/recipes/gcc/gcc_4.4.0.bb b/recipes/gcc/gcc_4.4.0.bb
index 6ac2b58305..9773205c52 100644
--- a/recipes/gcc/gcc_4.4.0.bb
+++ b/recipes/gcc/gcc_4.4.0.bb
@@ -1,7 +1,7 @@
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
-PR = "r0"
+PR = "${INC_PR}.1"
# GCC 4.4.0 installs crt* in a '4.4.0' dir....
FILES_${PN} += "\
diff --git a/recipes/gdb/gdbserver.inc b/recipes/gdb/gdbserver.inc
index a1610daff8..e02f276cb6 100644
--- a/recipes/gdb/gdbserver.inc
+++ b/recipes/gdb/gdbserver.inc
@@ -1,8 +1,8 @@
require gdb-common.inc
-DEFAULT_PREFERENCE_avr32 = "-99"
+INC_PR = "r1"
-DEPENDS = "ncurses readline"
+DEFAULT_PREFERENCE_avr32 = "-99"
FILES_gdbserver = "${bindir}/gdbserver"
@@ -15,10 +15,10 @@ SRC_URI += "file://kill_arm_map_symbols.patch;patch=1 \
file://gdbserver-cflags-last.diff;patch=1;pnum=0"
#FIXME file://uclibc.patch;patch=1 \
-EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils'"
+EXTRA_OEMAKE = "gdbserver"
-EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x \
- --with-curses --disable-multilib --with-readline --disable-sim \
+EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --without-curses \
+ --disable-multilib --without-readline --disable-sim \
--program-prefix=''"
LDFLAGS_append = " -s"
diff --git a/recipes/gdb/gdbserver_6.7.1.bb b/recipes/gdb/gdbserver_6.7.1.bb
index fb92ebc424..cb83d6f2c7 100644
--- a/recipes/gdb/gdbserver_6.7.1.bb
+++ b/recipes/gdb/gdbserver_6.7.1.bb
@@ -1,5 +1,9 @@
require gdbserver.inc
+LICENSE = "GPLv3"
+
+PR = "${INC_PR}.1"
+
DEFAULT_PREFERENCE_avr32 = "99"
SRC_URI_avr32 = " http://avr32linux.org/twiki/pub/Main/GDBPatches/gdb-6.7.1.atmel.1.0.3.tar.bz2"
S_avr32 = "${WORKDIR}/gdb-6.7.1.atmel.1.0.3"
diff --git a/recipes/gdb/gdbserver_6.8.bb b/recipes/gdb/gdbserver_6.8.bb
index 67fc280ea2..a6639b420d 100644
--- a/recipes/gdb/gdbserver_6.8.bb
+++ b/recipes/gdb/gdbserver_6.8.bb
@@ -1 +1,5 @@
require gdbserver.inc
+
+LICENSE = "GPLv3"
+
+PR = "${INC_PR}.1"
diff --git a/recipes/geda/geda-docs_1.4.1.bb b/recipes/geda/geda-docs_1.4.3.bb
index a35d41514b..a35d41514b 100644
--- a/recipes/geda/geda-docs_1.4.1.bb
+++ b/recipes/geda/geda-docs_1.4.3.bb
diff --git a/recipes/geda/geda-examples_1.4.1.bb b/recipes/geda/geda-examples_1.4.3.bb
index a35d41514b..a35d41514b 100644
--- a/recipes/geda/geda-examples_1.4.1.bb
+++ b/recipes/geda/geda-examples_1.4.3.bb
diff --git a/recipes/geda/geda-gattrib_1.4.1.bb b/recipes/geda/geda-gattrib_1.4.3.bb
index af4ea94153..af4ea94153 100644
--- a/recipes/geda/geda-gattrib_1.4.1.bb
+++ b/recipes/geda/geda-gattrib_1.4.3.bb
diff --git a/recipes/geda/geda-gnetlist_1.4.1.bb b/recipes/geda/geda-gnetlist_1.4.3.bb
index 4f560d3d37..4f560d3d37 100644
--- a/recipes/geda/geda-gnetlist_1.4.1.bb
+++ b/recipes/geda/geda-gnetlist_1.4.3.bb
diff --git a/recipes/geda/geda-gschem_1.4.1.bb b/recipes/geda/geda-gschem_1.4.3.bb
index 7613f3c6a5..7613f3c6a5 100644
--- a/recipes/geda/geda-gschem_1.4.1.bb
+++ b/recipes/geda/geda-gschem_1.4.3.bb
diff --git a/recipes/geda/geda-gsymcheck_1.4.1.bb b/recipes/geda/geda-gsymcheck_1.4.3.bb
index 463da2de99..463da2de99 100644
--- a/recipes/geda/geda-gsymcheck_1.4.1.bb
+++ b/recipes/geda/geda-gsymcheck_1.4.3.bb
diff --git a/recipes/geda/geda-symbols_1.4.1.bb b/recipes/geda/geda-symbols_1.4.3.bb
index 4f560d3d37..4f560d3d37 100644
--- a/recipes/geda/geda-symbols_1.4.1.bb
+++ b/recipes/geda/geda-symbols_1.4.3.bb
diff --git a/recipes/geda/geda-utils_1.4.1.bb b/recipes/geda/geda-utils_1.4.3.bb
index ea61665d9d..ea61665d9d 100644
--- a/recipes/geda/geda-utils_1.4.1.bb
+++ b/recipes/geda/geda-utils_1.4.3.bb
diff --git a/recipes/geda/geda_1.4.1.bb b/recipes/geda/geda_1.4.3.bb
index ee9394d9f2..ee9394d9f2 100644
--- a/recipes/geda/geda_1.4.1.bb
+++ b/recipes/geda/geda_1.4.3.bb
diff --git a/recipes/geda/libgeda_1.4.1.bb b/recipes/geda/libgeda_1.4.3.bb
index a00a1d5cde..a00a1d5cde 100644
--- a/recipes/geda/libgeda_1.4.1.bb
+++ b/recipes/geda/libgeda_1.4.3.bb
diff --git a/recipes/genext2fs/genext2fs-native_1.3.bb b/recipes/genext2fs/genext2fs-native_1.3.bb
index 2e26fa0110..50b371b97e 100644
--- a/recipes/genext2fs/genext2fs-native_1.3.bb
+++ b/recipes/genext2fs/genext2fs-native_1.3.bb
@@ -1,6 +1,5 @@
require genext2fs_${PV}.bb
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/genext2fs-${PV}', '${FILE_DIRNAME}/genext2fs', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
do_stage () {
install -m 0755 genext2fs ${STAGING_BINDIR}/
diff --git a/recipes/geoclue/files/gtk-doc.make b/recipes/geoclue/files/gtk-doc.make
new file mode 100644
index 0000000000..354ffb7c66
--- /dev/null
+++ b/recipes/geoclue/files/gtk-doc.make
@@ -0,0 +1,173 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST = \
+ $(content_files) \
+ $(HTML_IMAGES) \
+ $(DOC_MAIN_SGML_FILE) \
+ $(DOC_MODULE)-sections.txt \
+ $(DOC_MODULE)-overrides.txt
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
+ $(DOC_MODULE).hierarchy \
+ $(DOC_MODULE).interfaces \
+ $(DOC_MODULE).prerequisites \
+ $(DOC_MODULE).signals
+
+REPORT_FILES = \
+ $(DOC_MODULE)-undocumented.txt \
+ $(DOC_MODULE)-undeclared.txt \
+ $(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+else
+all-local:
+endif
+
+docs: html-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ @echo 'gtk-doc: Scanning header files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+ else \
+ cd $(srcdir) ; \
+ for i in $(SCANOBJ_FILES) ; do \
+ test -f $$i || touch $$i ; \
+ done \
+ fi
+ touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+ @true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+ @echo 'gtk-doc: Rebuilding template files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+ touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+ @true
+
+tmpl/*.sgml:
+ @true
+
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+ @echo 'gtk-doc: Building XML'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+ touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+ @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo 'gtk-doc: Building HTML'
+ @-chmod -R u+w $(srcdir)
+ rm -rf $(srcdir)/html
+ mkdir $(srcdir)/html
+ cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+ @echo 'gtk-doc: Fixing cross-references'
+ cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ touch html-build.stamp
+
+##############
+
+clean-local:
+ rm -f *~ *.bak
+ rm -rf .libs
+
+distclean-local:
+ cd $(srcdir) && \
+ rm -rf xml $(REPORT_FILES) \
+ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+maintainer-clean-local: clean
+ cd $(srcdir) && rm -rf xml html
+
+install-data-local:
+ -installfiles=`echo $(srcdir)/html/*`; \
+ if test "$$installfiles" = '$(srcdir)/html/*'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+ done; \
+ echo '-- Installing $(srcdir)/html/index.sgml' ; \
+ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+ which gtkdoc-rebase >/dev/null && \
+ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
+ fi
+
+
+uninstall-local:
+ rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+ @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+ mkdir $(distdir)/tmpl
+ mkdir $(distdir)/xml
+ mkdir $(distdir)/html
+ -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+ -cp $(srcdir)/xml/*.xml $(distdir)/xml
+ cp $(srcdir)/html/* $(distdir)/html
+ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+ cd $(distdir) && rm -f $(DISTCLEANFILES)
+ -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
diff --git a/recipes/geoclue/geoclue_git.bb b/recipes/geoclue/geoclue_git.bb
index b4a0cbda3a..bb5ce10163 100644
--- a/recipes/geoclue/geoclue_git.bb
+++ b/recipes/geoclue/geoclue_git.bb
@@ -1,42 +1,31 @@
DESCRIPTION = "GeoClue is a project that provide all kinds of geography information to an application"
-HOMEPAGE = "http://live.gnome.org/GeoClue"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/GeoClue"
-DEPENDS = "libgpsmgr libgpsbt gtk+ gpsd libxml2 gconf-dbus libsoup dbus-glib"
+DEPENDS = "libgpsmgr libgpsbt gtk+ gypsy libxml2 gconf-dbus libsoup dbus-glib"
-PV = "0.0+git${SRCDATE}"
-PR = "r1"
+SRCREV = "3a31d260074397a968afaf1065856ab763befb01"
+PV = "0.11.1"
+PR_append = "+gitr${SRCREV}"
PE = "1"
-inherit autotools pkgconfig
+inherit gnome autotools_stage
-SRC_URI = "git://anongit.freedesktop.org/git/geoclue;protocol=git"
+SRC_URI = "git://anongit.freedesktop.org/git/geoclue;protocol=git \
+ file://gtk-doc.make"
S = "${WORKDIR}/git"
LDFLAGS_append = " -lgthread-2.0 "
-EXTRA_OECONF = " --enable-applet=no \
- --enable-gpsd \
+EXTRA_OECONF = " \
--enable-system-bus"
-do_stage() {
- autotools_stage_all
+do_configure_prepend() {
+ cp ${WORKDIR}/gtk-doc.make ${S}
}
-do_install_append() {
- mkdir -p ${D}/usr/share/
- cp -pPr ${D}${STAGING_DATADIR}/* ${D}/usr/share
- rm -rf ${D}${STAGING_DATADIR}/
-}
-
-PACKAGES =+ "geoclue-applet"
-
-FILES_geoclue-applet += " \
- ${libdir}/bonobo/servers/* \
- ${libdir}/gnome-panel/*"
-
FILES_${PN} += " \
- ${libdir}/gnome-panel/* \
- ${datadir}/dbus-1"
+ ${datadir}/geoclue-providers/ \
+ ${datadir}/dbus-1"
diff --git a/recipes/gimp/gimp_2.6.3.bb b/recipes/gimp/gimp_2.6.3.bb
index 6bfbd1b5d1..d6cec2bcd6 100644
--- a/recipes/gimp/gimp_2.6.3.bb
+++ b/recipes/gimp/gimp_2.6.3.bb
@@ -1,6 +1,6 @@
require gimp.inc
-PR = "r1"
+PR = "r2"
DEPENDS += "webkit-gtk lcms gegl hal"
diff --git a/recipes/glibc/files/arm-check-pf.patch b/recipes/glibc/files/arm-check-pf.patch
new file mode 100644
index 0000000000..b9c72262f2
--- /dev/null
+++ b/recipes/glibc/files/arm-check-pf.patch
@@ -0,0 +1,14 @@
+Index: glibc-2.9/ports/sysdeps/unix/sysv/linux/arm/check_pf.c
+===================================================================
+--- glibc-2.9.orig/ports/sysdeps/unix/sysv/linux/arm/check_pf.c 2009-06-19 20:45:32.451372131 +0400
++++ glibc-2.9/ports/sysdeps/unix/sysv/linux/arm/check_pf.c 2009-06-19 20:45:51.351313426 +0400
+@@ -207,9 +207,6 @@
+ newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED)
+ ? in6ai_deprecated : 0)
+ | ((ifam->ifa_flags
+- & IFA_F_TEMPORARY)
+- ? in6ai_temporary : 0)
+- | ((ifam->ifa_flags
+ & IFA_F_HOMEADDRESS)
+ ? in6ai_homeaddress : 0));
+ memcpy (newp->info.addr, address ?: local,
diff --git a/recipes/glibc/files/arm-lowlevellock-include-tls.patch b/recipes/glibc/files/arm-lowlevellock-include-tls.patch
new file mode 100644
index 0000000000..5c8062ecee
--- /dev/null
+++ b/recipes/glibc/files/arm-lowlevellock-include-tls.patch
@@ -0,0 +1,12 @@
+Index: glibc-2.9/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+===================================================================
+--- glibc-2.9.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-06-19 20:54:35.446686910 +0400
++++ glibc-2.9/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-06-19 20:54:43.774683370 +0400
+@@ -25,6 +25,7 @@
+ #include <atomic.h>
+ #include <sysdep.h>
+ #include <kernel-features.h>
++#include <tls.h>
+
+ #define FUTEX_WAIT 0
+ #define FUTEX_WAKE 1
diff --git a/recipes/glibc/files/local-args6.diff b/recipes/glibc/files/local-args6.diff
new file mode 100644
index 0000000000..28c957f243
--- /dev/null
+++ b/recipes/glibc/files/local-args6.diff
@@ -0,0 +1,12 @@
+--- glibc-2.7/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h.orig
++++ glibc-2.7/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
+@@ -73,6 +73,9 @@
+ # define DOCARGS_5 DOCARGS_4
+ # define UNDOCARGS_5 UNDOCARGS_4
+
++# define DOCARGS_6 DOCARGS_5
++# define UNDOCARGS_6 UNDOCARGS_5
++
+ # ifdef IS_IN_libpthread
+ # define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+ # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
diff --git a/recipes/glibc/glibc-2.3.2/allow-gcc.patch b/recipes/glibc/glibc-2.3.2/allow-gcc.patch
new file mode 100644
index 0000000000..1e38f0ef14
--- /dev/null
+++ b/recipes/glibc/glibc-2.3.2/allow-gcc.patch
@@ -0,0 +1,70 @@
+--- glibc-2.3.2/configure-orig 2009-03-26 15:46:33.000000000 +0100
++++ glibc-2.3.2/configure 2009-03-26 15:49:15.000000000 +0100
+@@ -3850,67 +3850,6 @@
+
+ # These programs are version sensitive.
+
+-for ac_prog in ${ac_tool_prefix}gcc ${ac_tool_prefix}cc
+-do
+- # Extract the first word of "$ac_prog", so it can be a program name with args.
+-set dummy $ac_prog; 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_CC+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- if test -n "$CC"; then
+- ac_cv_prog_CC="$CC" # 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_CC="$ac_prog"
+- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+-done
+-
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+- test -n "$CC" && break
+-done
+-
+-if test -z "$CC"; then
+- ac_verc_fail=yes
+-else
+- # Found it, now check the version.
+- echo "$as_me:$LINENO: checking version of $CC" >&5
+-echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
+- ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
+- case $ac_prog_version in
+- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 3.[2-9]*)
+- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+-
+- esac
+- echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+-echo "${ECHO_T}$ac_prog_version" >&6
+-fi
+-if test $ac_verc_fail = yes; then
+- critic_missing="$critic_missing gcc"
+-fi
+-
+ for ac_prog in gnumake gmake make
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
diff --git a/recipes/glibc/glibc-2.3.2/mips-abio32.patch b/recipes/glibc/glibc-2.3.2/mips-abio32.patch
new file mode 100644
index 0000000000..49c46f9113
--- /dev/null
+++ b/recipes/glibc/glibc-2.3.2/mips-abio32.patch
@@ -0,0 +1,12 @@
+--- glibc-2.3.3-r16/sysdeps/mips/sgidefs.h-orig 2009-02-27 16:05:55.000000000 +0100
++++ glibc-2.3.3-r16/sysdeps/mips/sgidefs.h 2009-02-27 16:06:26.000000000 +0100
+@@ -43,4 +43,9 @@
+ #define _MIPS_SIM_NABI32 2
+ #define _MIPS_SIM_ABI64 3
+
++/* compatibility stuff needed e.g. by gdb */
++#ifndef _ABIO32
++# define _ABIO32 _MIPS_SIM_ABI32
++#endif
++
+ #endif /* sgidefs.h */
diff --git a/recipes/glibc/glibc-2.3.3/allow-gcc.patch b/recipes/glibc/glibc-2.3.3/allow-gcc.patch
new file mode 100644
index 0000000000..1e38f0ef14
--- /dev/null
+++ b/recipes/glibc/glibc-2.3.3/allow-gcc.patch
@@ -0,0 +1,70 @@
+--- glibc-2.3.2/configure-orig 2009-03-26 15:46:33.000000000 +0100
++++ glibc-2.3.2/configure 2009-03-26 15:49:15.000000000 +0100
+@@ -3850,67 +3850,6 @@
+
+ # These programs are version sensitive.
+
+-for ac_prog in ${ac_tool_prefix}gcc ${ac_tool_prefix}cc
+-do
+- # Extract the first word of "$ac_prog", so it can be a program name with args.
+-set dummy $ac_prog; 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_CC+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- if test -n "$CC"; then
+- ac_cv_prog_CC="$CC" # 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_CC="$ac_prog"
+- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+-done
+-
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+- test -n "$CC" && break
+-done
+-
+-if test -z "$CC"; then
+- ac_verc_fail=yes
+-else
+- # Found it, now check the version.
+- echo "$as_me:$LINENO: checking version of $CC" >&5
+-echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
+- ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
+- case $ac_prog_version in
+- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 3.[2-9]*)
+- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+-
+- esac
+- echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+-echo "${ECHO_T}$ac_prog_version" >&6
+-fi
+-if test $ac_verc_fail = yes; then
+- critic_missing="$critic_missing gcc"
+-fi
+-
+ for ac_prog in gnumake gmake make
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
diff --git a/recipes/glibc/glibc-2.3.3/etc/ld.so.conf b/recipes/glibc/glibc-2.3.3/etc/ld.so.conf
new file mode 100644
index 0000000000..dfa65edb85
--- /dev/null
+++ b/recipes/glibc/glibc-2.3.3/etc/ld.so.conf
@@ -0,0 +1,2 @@
+/usr/local/lib
+/usr/X11R6/lib
diff --git a/recipes/glibc/glibc-2.3.3/mips-abio32.patch b/recipes/glibc/glibc-2.3.3/mips-abio32.patch
new file mode 100644
index 0000000000..49c46f9113
--- /dev/null
+++ b/recipes/glibc/glibc-2.3.3/mips-abio32.patch
@@ -0,0 +1,12 @@
+--- glibc-2.3.3-r16/sysdeps/mips/sgidefs.h-orig 2009-02-27 16:05:55.000000000 +0100
++++ glibc-2.3.3-r16/sysdeps/mips/sgidefs.h 2009-02-27 16:06:26.000000000 +0100
+@@ -43,4 +43,9 @@
+ #define _MIPS_SIM_NABI32 2
+ #define _MIPS_SIM_ABI64 3
+
++/* compatibility stuff needed e.g. by gdb */
++#ifndef _ABIO32
++# define _ABIO32 _MIPS_SIM_ABI32
++#endif
++
+ #endif /* sgidefs.h */
diff --git a/recipes/glibc/glibc-2.4/glibc-crunch-eabi-force.patch b/recipes/glibc/glibc-2.4/glibc-crunch-eabi-force.patch
new file mode 100644
index 0000000000..b509b133c7
--- /dev/null
+++ b/recipes/glibc/glibc-2.4/glibc-crunch-eabi-force.patch
@@ -0,0 +1,133 @@
+diff -urN glibc-2.6.1/ports/sysdeps/arm/eabi/bits/fenv.h glibc-2.6.1/ports/sysdeps/arm/eabi/bits/fenv.h
+--- glibc-2.6.1/ports/sysdeps/arm/eabi/bits/fenv.h 2008-04-04 18:32:58.000000000 +1000
++++ glibc-2.6.1/ports/sysdeps/arm/eabi/bits/fenv.h 2008-04-07 10:40:28.000000000 +1000
+@@ -20,6 +20,8 @@
+ # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+ #endif
+
++#if 0
++
+ /* Define bits representing exceptions in the VFP FPU status word. */
+ enum
+ {
+@@ -55,37 +57,50 @@
+ #define FE_TOWARDZERO FE_TOWARDZERO
+ };
+
++#endif
++
+ /* Define bits representing exceptions in the CRUNCH FPU status word. */
+ enum
+ {
+ FE_CRUNCH_INVALID = (1),
+ #define FE_CRUNCH_INVALID FE_CRUNCH_INVALID
++#define FE_INVALID FE_CRUNCH_INVALID
++#define FE_DIVBYZERO 0
+ FE_CRUNCH_OVERFLOW = (4),
+ #define FE_CRUNCH_OVERFLOW FE_CRUNCH_OVERFLOW
++#define FE_OVERFLOW FE_CRUNCH_OVERFLOW
+ FE_CRUNCH_UNDERFLOW = (8),
+ #define FE_CRUNCH_UNDERFLOW FE_CRUNCH_UNDERFLOW
++#define FE_UNDERFLOW FE_CRUNCH_UNDERFLOW
+ FE_CRUNCH_INEXACT = (16),
+ #define FE_CRUNCH_INEXACT FE_CRUNCH_INEXACT
++#define FE_INEXACT FE_CRUNCH_INEXACT
+ };
+
+ /* Amount to shift by to convert an exception to a mask bit. */
+ #define FE_CRUNCH_EXCEPT_SHIFT 5
++#define FE_EXCEPT_SHIFT FE_CRUNCH_EXCEPT_SHIFT
+
+ /* All supported exceptions, except DIVBYZERO. */
+ #define FE_CRUNCH_ALL_EXCEPT \
+ (FE_CRUNCH_INVALID | FE_CRUNCH_OVERFLOW | FE_CRUNCH_UNDERFLOW | FE_CRUNCH_INEXACT)
++#define FE_ALL_EXCEPT FE_CRUNCH_ALL_EXCEPT
+
+ /* CRUNCH supports all of the four defined rounding modes. */
+ enum
+ {
+ FE_CRUNCH_TONEAREST = 0,
+ #define FE_CRUNCH_TONEAREST FE_CRUNCH_TONEAREST
++#define FE_TONEAREST FE_CRUNCH_TONEAREST
+ FE_CRUNCH_TOWARDZERO = 0x400,
+ #define FE_CRUNCH_TOWARDZERO FE_CRUNCH_TOWARDZERO
++#define FE_TOWARDZERO FE_CRUNCH_TOWARDZERO
+ FE_CRUNCH_DOWNWARD = 0x800,
+ #define FE_CRUNCH_DOWNWARD FE_CRUNCH_DOWNWARD
++#define FE_DOWNWARD FE_CRUNCH_DOWNWARD
+ FE_CRUNCH_UPWARD = 0xc00
+ #define FE_CRUNCH_UPWARD FE_CRUNCH_UPWARD
++#define FE_UPWARD FE_CRUNCH_UPWARD
+ };
+
+
+diff -urN glibc-2.6.1/ports/sysdeps/arm/eabi/fpu_control.h glibc-2.6.1/ports/sysdeps/arm/eabi/fpu_control.h
+--- glibc-2.6.1/ports/sysdeps/arm/eabi/fpu_control.h 2008-04-04 18:32:58.000000000 +1000
++++ glibc-2.6.1/ports/sysdeps/arm/eabi/fpu_control.h 2008-04-07 11:02:13.000000000 +1000
+@@ -20,6 +20,8 @@
+ #ifndef _FPU_CONTROL_H
+ #define _FPU_CONTROL_H
+
++#if 0
++
+ /* masking of interrupts */
+ #define _FPU_MASK_IM 0x00000100 /* invalid operation */
+ #define _FPU_MASK_ZM 0x00000200 /* divide by zero */
+@@ -45,6 +47,11 @@
+ #define _FPU_SETCW(cw) \
+ __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw))
+
++#endif
++
+ /* CRUNCH SECTION */
+
++/* Type of the control word. */
++typedef unsigned int fpu_control_t;
++
+ /* DSPSC register: (from EP9312 User's Guide)
+@@ -69,19 +73,27 @@
+
+ /* masking of interrupts */
+ #define _FPU_CRUNCH_MASK_IM (1 << 5) /* invalid operation */
++#define _FPU_MASK_IM _FPU_CRUNCH_MASK_IM
+ #define _FPU_CRUNCH_MASK_ZM 0 /* divide by zero */
++#define _FPU_MASK_ZM _FPU_CRUNCH_MASK_ZM
+ #define _FPU_CRUNCH_MASK_OM (1 << 7) /* overflow */
++#define _FPU_MASK_OM _FPU_CRUNCH_MASK_OM
+ #define _FPU_CRUNCH_MASK_UM (1 << 8) /* underflow */
++#define _FPU_MASK_UM _FPU_CRUNCH_MASK_UM
+ #define _FPU_CRUNCH_MASK_PM (1 << 9) /* inexact */
++#define _FPU_MASK_PM _FPU_CRUNCH_MASK_PM
+ #define _FPU_CRUNCH_MASK_DM 0 /* denormalized operation */
++#undef _FPU_MASK_DM
+
+ /* Some bits in the FPSCR are not yet defined. They must be preserved when
+ modifying the contents. */
+ #define _FPU_CRUNCH_RESERVED 0x03000042
++#define _FPU_RESERVED _FPU_CRUNCH_RESERVED
+ #define _FPU_CRUNCH_DEFAULT 0x00b00000
++#define _FPU_DEFAULT _FPU_CRUNCH_DEFAULT
+ /* Default + exceptions enabled. */
+ #define _FPU_CRUNCH_IEEE (_FPU_CRUNCH_DEFAULT | 0x000003a0)
+-
++#define _FPU_IEEE _FPU_CRUNCH_IEEE
+
+ /* Macros for accessing the hardware control word. */
+ /* cfmvr64l %1, mvdx0 */
+@@ -103,6 +115,7 @@
+ : "=r" (cw), "=r" (__t1), "=r" (__t2) \
+ ); \
+ })
++#define _FPU_GETCW(cw) _FPU_CRUNCH_GETCW(cw)
+
+ /* cfmvr64l %1, mvdx0 */
+ /* cfmvr64h %2, mvdx0 */
+@@ -123,7 +136,7 @@
+ : "=r" (__t1), "=r" (__t2) : "r" (cw) \
+ ); \
+ })
+-
++#define _FPU_SETCW(cw) _FPU_CRUNCH_SETCW(cw)
+
+ /* Default control word set at startup. */
+ extern fpu_control_t __fpu_control;
diff --git a/recipes/glibc/glibc-2.4/glibc-crunch-eabi-fraiseexcpt.patch b/recipes/glibc/glibc-2.4/glibc-crunch-eabi-fraiseexcpt.patch
new file mode 100644
index 0000000000..dcee3fad0a
--- /dev/null
+++ b/recipes/glibc/glibc-2.4/glibc-crunch-eabi-fraiseexcpt.patch
@@ -0,0 +1,88 @@
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fraiseexcpt.c glibc-2.5/ports/sysdeps/arm/eabi-new/fraiseexcpt.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fraiseexcpt.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi-new/fraiseexcpt.c 2008-04-14 17:21:09.000000000 +1000
+@@ -25,6 +25,7 @@
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+ #include <sysdep.h>
++#include <math.h>
+
+ int
+ feraiseexcept (int excepts)
+@@ -105,8 +105,74 @@
+
+ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
+ {
+- /* Unsupported, for now. */
+- return 1;
++ unsigned int dspsc;
++ const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
++ fp_min = FLT_MIN, fp_1e32 = 1.0e32f, fp_two = 2.0,
++ fp_three = 3.0, fp_inf = HUGE_VALF;
++
++ /* Raise exceptions represented by EXPECTS. But we must raise only
++ one signal at a time. It is important that if the overflow/underflow
++ exception and the inexact exception are given at the same time,
++ the overflow/underflow exception follows the inexact exception. After
++ each exception we read from the dspsc, to force the exception to be
++ raised immediately. */
++
++ /* There are additional complications because this file may be compiled
++ without CRUNCH support enabled, and we also can't assume that the
++ assembler has CRUNCH instructions enabled. To get around this we use the
++ generic coprocessor mnemonics and avoid asking GCC to put float values
++ in CRUNCH registers. */
++
++ /* First: invalid exception. */
++ if (FE_CRUNCH_INVALID & excepts)
++ /* (ZERO * INFINITY) */
++ __asm__ __volatile__ (
++ "ldc p4, cr0, %1\n\t" /* cflds mvf0, %1 */
++ "ldc p4, cr1, %2\n\t" /* cflds mvf1, %2 */
++ "cdp p4, 1, cr0, cr0, cr1, 0\n\t" /* cfmuls mvf0, mvf0, mvf1 */
++ "cdp p4, 0, cr0, cr0, cr0, 7\n\t" /* cfmv32sc mvdx0, dspsc */
++ "mrc p5, 0, %0, cr0, cr0, 0" : "=r" (dspsc) /* cfmvr64l dspsc, mvdx0 */
++ : "m" (fp_zero), "m" (fp_inf)
++ : "s0", "s1");
++
++ /* Next: overflow. */
++ if (FE_CRUNCH_OVERFLOW & excepts)
++ /* There's no way to raise overflow without also raising inexact. */
++ __asm__ __volatile__ (
++ "ldc p4, cr0, %1\n\t" /* cflds mvf0, %1 */
++ "ldc p4, cr1, %2\n\t" /* cflds mvf1, %2 */
++ "cdp p4, 3, cr0, cr0, cr1, 4\n\t" /* cfadds mvf0, mvf0, mvf1 */
++ "cdp p4, 0, cr0, cr0, cr0, 7\n\t" /* cfmv32sc mvdx0, dspsc */
++ "mrc p5, 0, %0, cr0, cr0, 0" : "=r" (dspsc) /* cfmvr64l dspsc, mvdx0 */
++ : "m" (fp_max), "m" (fp_1e32)
++ : "s0", "s1");
++
++ /* Next: underflow. */
++ if (FE_CRUNCH_UNDERFLOW & excepts)
++ /* (FLT_MIN * FLT_MIN) */
++ __asm__ __volatile__ (
++ "ldc p4, cr0, %1\n\t" /* cflds mvf0, %1 */
++ "ldc p4, cr1, %2\n\t" /* cflds mvf1, %2 */
++ "cdp p4, 1, cr0, cr0, cr1, 0\n\t" /* cfmul mvf0, mvf0, mvf1 */
++ "cdp p4, 0, cr0, cr0, cr0, 7\n\t" /* cfmv32sc mvdx0, dspsc */
++ "mrc p5, 0, %0, cr0, cr0, 0" : "=r" (dspsc) /* cfmvr64l dspsc, mvdx0 */
++ : "m" (fp_min), "m" (fp_min)
++ : "s0", "s1");
++
++ /* Last: inexact. */
++ if (FE_CRUNCH_INEXACT & excepts)
++ /* There's no way to raise inexact without also raising overflow. */
++ __asm__ __volatile__ (
++ "ldc p4, cr0, %1\n\t" /* cflds mvf0, %1 */
++ "ldc p4, cr1, %2\n\t" /* cflds mvf1, %2 */
++ "cdp p4, 3, cr0, cr0, cr1, 4\n\t" /* cfadds mvf0, mvf0, mvf1 */
++ "cdp p4, 0, cr0, cr0, cr0, 7\n\t" /* cfmv32sc mvdx0, dspsc */
++ "mrc p5, 0, %0, cr0, cr0, 0" : "=r" (dspsc) /* cfmvr64l dspsc, mvdx0 */
++ : "m" (fp_max), "m" (fp_1e32)
++ : "s0", "s1");
++
++ /* Success. */
++ return 0;
+ }
+
+ /* Unsupported, so fail. */
diff --git a/recipes/glibc/glibc-2.4/glibc-crunch-eabi-setjmp_longjmp.patch b/recipes/glibc/glibc-2.4/glibc-crunch-eabi-setjmp_longjmp.patch
new file mode 100644
index 0000000000..cf4ed6060b
--- /dev/null
+++ b/recipes/glibc/glibc-2.4/glibc-crunch-eabi-setjmp_longjmp.patch
@@ -0,0 +1,112 @@
+--- glibc-2.5/ports/sysdeps/arm/eabi/setjmp.S 2006-09-22 04:39:51.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/setjmp.S 2007-05-24 13:31:20.000000000 +1000
+@@ -74,6 +74,34 @@
+ stcl p1, cr15, [r12], #8
+ Lno_iwmmxt:
+
++ tst a3, #HWCAP_ARM_CRUNCH
++ beq Lno_crunch
++
++ /* Save the call-preserved crunch registers. */
++ /* Following instructions are cfstrd cr10, [ip], #8 (etc.) */
++ /* stcl p4, cr4, [r12], #8 */
++ /* stcl p4, cr5, [r12], #8 */
++ /* stcl p4, cr6, [r12], #8 */
++ /* stcl p4, cr7, [r12], #8 */
++ stcl p4, cr8, [r12], #8
++ stcl p4, cr9, [r12], #8
++ stcl p4, cr10, [r12], #8
++ stcl p4, cr11, [r12], #8
++ stcl p4, cr12, [r12], #8
++ stcl p4, cr13, [r12], #8
++ stcl p4, cr14, [r12], #8
++ stcl p4, cr15, [r12], #8
++ /* Store the floating-point status register.
++ /* Following 6 instructions are FPU_CRUNCH_GETCW (r2) clob (r3, r4) */
++ /* mrc p5, 0, r3, cr0, cr0, 0 */
++ /* mrc p5, 0, r4, cr0, cr0, 1 */
++ /* cdp p4, 0, cr0, cr0, cr0, 7 */
++ /* mrc p5, 0, r2, cr0, cr0, 0 */
++ /* mcr p5, 0, r3, cr0, cr0, 0 */
++ /* mcr p5, 0, r4, cr0, cr0, 1 */
++ /* str r2, [ip], #4 */
++Lno_crunch:
++
+ /* Make a tail call to __sigjmp_save; it takes the same args. */
+ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
+
+--- glibc-2.5/ports/sysdeps/arm/eabi/__longjmp.S 2006-09-22 04:39:51.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/__longjmp.S 2007-05-24 13:31:23.000000000 +1000
+@@ -76,6 +76,34 @@
+ ldcl p1, cr15, [r12], #8
+ Lno_iwmmxt:
+
++ tst a2, #HWCAP_ARM_CRUNCH
++ beq Lno_crunch
++
++ /* Restore the call-preserved crunch registers. */
++ /* Following instructions are cfldrd cr10, [ip], #8 (etc.) */
++ /* ldcl p4, cr4, [r12], #8 */
++ /* ldcl p4, cr5, [r12], #8 */
++ /* ldcl p4, cr6, [r12], #8 */
++ /* ldcl p4, cr7, [r12], #8 */
++ ldcl p4, cr8, [r12], #8
++ ldcl p4, cr9, [r12], #8
++ ldcl p4, cr10, [r12], #8
++ ldcl p4, cr11, [r12], #8
++ ldcl p4, cr12, [r12], #8
++ ldcl p4, cr13, [r12], #8
++ ldcl p4, cr14, [r12], #8
++ ldcl p4, cr15, [r12], #8
++ /* Restore the floating-point status register. */
++ ldr r1, [ip], #4
++ /* Following 6 instructions are FPU_CRUNCH_SETCW (r1) clob (r2, r3). */
++ /* mrc p5, 0, r2, cr0, cr0, 0 */
++ /* mrc p5, 0, r3, cr0, cr0, 1 */
++ /* mcr p5, 0, r1, cr0, cr0, 0 */
++ /* cdp p4, 1, cr0, cr0, cr0, 7 */
++ /* mcr p5, 0, r2, cr0, cr0, 0 */
++ /* mcr p5, 0, r3, cr0, cr0, 1 */
++Lno_crunch:
++
+ DO_RET(lr)
+
+ #ifdef IS_IN_rtld
+--- glibc-2.5/ports/sysdeps/unix/sysv/linux/arm/sysdep.h 2006-09-22 04:39:51.000000000 +1000
++++ glibc-2.5/ports/sysdeps/unix/sysv/linux/arm/sysdep.h 2007-05-24 12:59:03.000000000 +1000
+@@ -48,6 +48,7 @@
+ #define HWCAP_ARM_EDSP 128
+ #define HWCAP_ARM_JAVA 256
+ #define HWCAP_ARM_IWMMXT 512
++#define HWCAP_ARM_CRUNCH 1024
+
+ #ifdef __ASSEMBLER__
+
+--- glibc-2.5/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.c 2007-07-02 13:20:36.000000000 +1000
++++ glibc-2.5/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.c 2007-07-02 13:23:19.000000000 +1000
+@@ -47,12 +47,12 @@
+ #if !defined PROCINFO_DECL && defined SHARED
+ ._dl_arm_cap_flags
+ #else
+-PROCINFO_CLASS const char _dl_arm_cap_flags[10][10]
++PROCINFO_CLASS const char _dl_arm_cap_flags[11][10]
+ #endif
+ #ifndef PROCINFO_DECL
+ = {
+ "swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp",
+- "java", "iwmmxt",
++ "java", "iwmmxt", "crunch",
+ }
+ #endif
+ #if !defined SHARED || defined PROCINFO_DECL
+--- glibc-2.5/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.h 2007-07-02 13:25:23.000000000 +1000
++++ glibc-2.5/ports/sysdeps/unix/sysv/linux/arm/dl-procinfo.h 2007-07-02 13:25:38.000000000 +1000
+@@ -24,7 +24,7 @@
+ #include <ldsodefs.h>
+ #include <sysdep.h>
+
+-#define _DL_HWCAP_COUNT 10
++#define _DL_HWCAP_COUNT 11
+
+ /* The kernel provides platform data but it is not interesting. */
+ #define _DL_HWCAP_PLATFORM 0
diff --git a/recipes/glibc/glibc-2.4/glibc-crunch-eabi-unwind.patch b/recipes/glibc/glibc-2.4/glibc-crunch-eabi-unwind.patch
new file mode 100644
index 0000000000..d91d4fd356
--- /dev/null
+++ b/recipes/glibc/glibc-2.4/glibc-crunch-eabi-unwind.patch
@@ -0,0 +1,12 @@
+--- glibc-2.7/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h 2008-04-04 15:57:19.000000000 +1000
++++ glibc-2.7/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h 2008-04-04 16:00:41.000000000 +1000
+@@ -138,7 +138,8 @@
+ _UVRSC_VFP = 1, /* vfp */
+ _UVRSC_FPA = 2, /* fpa */
+ _UVRSC_WMMXD = 3, /* Intel WMMX data register */
+- _UVRSC_WMMXC = 4 /* Intel WMMX control register */
++ _UVRSC_WMMXC = 4, /* Intel WMMX control register */
++ _UVRSC_CRUNCH = 5 /* Maverick crunch register */
+ }
+ _Unwind_VRS_RegClass;
+
diff --git a/recipes/glibc/glibc-2.4/glibc-crunch-eabi.patch b/recipes/glibc/glibc-2.4/glibc-crunch-eabi.patch
new file mode 100644
index 0000000000..8af4baf9d7
--- /dev/null
+++ b/recipes/glibc/glibc-2.4/glibc-crunch-eabi.patch
@@ -0,0 +1,461 @@
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/bits/fenv.h glibc-2.5/ports/sysdeps/arm/eabi/bits/fenv.h
+--- glibc-2.5/ports/sysdeps/arm/eabi/bits/fenv.h 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/bits/fenv.h 2008-04-02 13:35:39.000000000 +1000
+@@ -20,7 +20,7 @@
+ # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+ #endif
+
+-/* Define bits representing exceptions in the FPU status word. */
++/* Define bits representing exceptions in the VFP FPU status word. */
+ enum
+ {
+ FE_INVALID = 1,
+@@ -55,6 +55,40 @@
+ #define FE_TOWARDZERO FE_TOWARDZERO
+ };
+
++/* Define bits representing exceptions in the CRUNCH FPU status word. */
++enum
++ {
++ FE_CRUNCH_INVALID = (1),
++#define FE_CRUNCH_INVALID FE_CRUNCH_INVALID
++ FE_CRUNCH_OVERFLOW = (4),
++#define FE_CRUNCH_OVERFLOW FE_CRUNCH_OVERFLOW
++ FE_CRUNCH_UNDERFLOW = (8),
++#define FE_CRUNCH_UNDERFLOW FE_CRUNCH_UNDERFLOW
++ FE_CRUNCH_INEXACT = (16),
++#define FE_CRUNCH_INEXACT FE_CRUNCH_INEXACT
++ };
++
++/* Amount to shift by to convert an exception to a mask bit. */
++#define FE_CRUNCH_EXCEPT_SHIFT 5
++
++/* All supported exceptions, except DIVBYZERO. */
++#define FE_CRUNCH_ALL_EXCEPT \
++ (FE_CRUNCH_INVALID | FE_CRUNCH_OVERFLOW | FE_CRUNCH_UNDERFLOW | FE_CRUNCH_INEXACT)
++
++/* CRUNCH supports all of the four defined rounding modes. */
++enum
++ {
++ FE_CRUNCH_TONEAREST = 0,
++#define FE_CRUNCH_TONEAREST FE_CRUNCH_TONEAREST
++ FE_CRUNCH_TOWARDZERO = 0x400,
++#define FE_CRUNCH_TOWARDZERO FE_CRUNCH_TOWARDZERO
++ FE_CRUNCH_DOWNWARD = 0x800,
++#define FE_CRUNCH_DOWNWARD FE_CRUNCH_DOWNWARD
++ FE_CRUNCH_UPWARD = 0xc00
++#define FE_CRUNCH_UPWARD FE_CRUNCH_UPWARD
++ };
++
++
+ /* Type representing exception flags. */
+ typedef unsigned int fexcept_t;
+
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fclrexcpt.c glibc-2.5/ports/sysdeps/arm/eabi/fclrexcpt.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fclrexcpt.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fclrexcpt.c 2008-04-02 13:25:09.000000000 +1000
+@@ -48,6 +48,26 @@
+ return 0;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ unsigned long int temp;
++
++ /* Mask out unsupported bits/exceptions. */
++ excepts &= FE_CRUNCH_ALL_EXCEPT;
++
++ /* Get the current floating point status. */
++ _FPU_CRUNCH_GETCW (temp);
++
++ /* Clear the relevant bits. */
++ temp = (temp & ~FE_CRUNCH_ALL_EXCEPT) | (temp & FE_CRUNCH_ALL_EXCEPT & ~excepts);
++
++ /* Put the new data in effect. */
++ _FPU_CRUNCH_SETCW (temp);
++
++ /* Success. */
++ return 0;
++ }
++
+ /* Unsupported, so fail. */
+ return 1;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fedisblxcpt.c glibc-2.5/ports/sysdeps/arm/eabi/fedisblxcpt.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fedisblxcpt.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fedisblxcpt.c 2008-04-02 13:29:44.000000000 +1000
+@@ -46,6 +46,23 @@
+ return old_exc;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ unsigned long int new_exc, old_exc;
++
++ _FPU_CRUNCH_GETCW(new_exc);
++
++ old_exc = (new_exc >> FE_CRUNCH_EXCEPT_SHIFT) & FE_CRUNCH_ALL_EXCEPT;
++
++ excepts &= FE_CRUNCH_ALL_EXCEPT;
++
++ new_exc &= ~(excepts << FE_CRUNCH_EXCEPT_SHIFT);
++
++ _FPU_CRUNCH_SETCW(new_exc);
++
++ return old_exc;
++ }
++
+ /* Unsupported, so return -1 for failure. */
+ return -1;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/feenablxcpt.c glibc-2.5/ports/sysdeps/arm/eabi/feenablxcpt.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/feenablxcpt.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/feenablxcpt.c 2008-04-02 13:30:30.000000000 +1000
+@@ -46,6 +46,23 @@
+ return old_exc;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ unsigned long int new_exc, old_exc;
++
++ _FPU_CRUNCH_GETCW(new_exc);
++
++ old_exc = (new_exc >> FE_CRUNCH_EXCEPT_SHIFT) & FE_CRUNCH_ALL_EXCEPT;
++
++ excepts &= FE_CRUNCH_ALL_EXCEPT;
++
++ new_exc |= (excepts << FE_CRUNCH_EXCEPT_SHIFT);
++
++ _FPU_CRUNCH_SETCW(new_exc);
++
++ return old_exc;
++ }
++
+ /* Unsupported, so return -1 for failure. */
+ return -1;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fegetenv.c glibc-2.5/ports/sysdeps/arm/eabi/fegetenv.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fegetenv.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fegetenv.c 2008-04-02 13:31:08.000000000 +1000
+@@ -38,6 +38,16 @@
+ return 0;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ unsigned long int temp;
++ _FPU_CRUNCH_GETCW (temp);
++ envp->__cw = temp;
++
++ /* Success. */
++ return 0;
++ }
++
+ /* Unsupported, so fail. */
+ return 1;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fegetexcept.c glibc-2.5/ports/sysdeps/arm/eabi/fegetexcept.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fegetexcept.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fegetexcept.c 2008-04-02 13:31:40.000000000 +1000
+@@ -38,6 +38,15 @@
+ return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ unsigned long temp;
++
++ _FPU_CRUNCH_GETCW (temp);
++
++ return (temp >> FE_CRUNCH_EXCEPT_SHIFT) & FE_CRUNCH_ALL_EXCEPT;
++ }
++
+ /* Unsupported. Return all exceptions disabled. */
+ return 0;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fegetround.c glibc-2.5/ports/sysdeps/arm/eabi/fegetround.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fegetround.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fegetround.c 2008-04-02 13:32:18.000000000 +1000
+@@ -38,6 +38,16 @@
+ return temp & FE_TOWARDZERO;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ unsigned int temp;
++
++ /* Get the current environment. */
++ _FPU_CRUNCH_GETCW (temp);
++
++ return temp & FE_CRUNCH_UPWARD;
++ }
++
+ /* The current soft-float implementation only handles TONEAREST. */
+ return FE_TONEAREST;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/feholdexcpt.c glibc-2.5/ports/sysdeps/arm/eabi/feholdexcpt.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/feholdexcpt.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/feholdexcpt.c 2008-04-02 13:36:24.000000000 +1000
+@@ -47,6 +47,25 @@
+ return 0;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ unsigned long int temp;
++
++ /* Store the environment. */
++ _FPU_CRUNCH_GETCW(temp);
++ envp->__cw = temp;
++
++ /* Now set all exceptions to non-stop. */
++ temp &= ~(FE_CRUNCH_ALL_EXCEPT << FE_CRUNCH_EXCEPT_SHIFT);
++
++ /* And clear all exception flags. */
++ temp &= ~FE_CRUNCH_ALL_EXCEPT;
++
++ _FPU_CRUNCH_SETCW(temp);
++
++ return 0;
++ }
++
+ /* Unsupported, so fail. */
+ return 1;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fesetenv.c glibc-2.5/ports/sysdeps/arm/eabi/fesetenv.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fesetenv.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fesetenv.c 2008-04-02 13:43:31.000000000 +1000
+@@ -48,6 +48,26 @@
+ return 0;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ unsigned int temp;
++
++ _FPU_CRUNCH_GETCW (temp);
++ temp &= _FPU_CRUNCH_RESERVED;
++
++ if (envp == FE_DFL_ENV)
++ temp |= _FPU_CRUNCH_DEFAULT;
++ else if (envp == FE_NOMASK_ENV)
++ temp |= _FPU_CRUNCH_IEEE;
++ else
++ temp |= envp->__cw & ~_FPU_CRUNCH_RESERVED;
++
++ _FPU_CRUNCH_SETCW (temp);
++
++ /* Success. */
++ return 0;
++ }
++
+ /* Unsupported, so fail. */
+ return 1;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fesetround.c glibc-2.5/ports/sysdeps/arm/eabi/fesetround.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fesetround.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fesetround.c 2008-04-02 13:57:35.000000000 +1000
+@@ -45,6 +45,24 @@
+ default:
+ return 1;
+ }
+ }
++ else if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ fpu_control_t temp;
++
++ switch (round)
++ {
++ case FE_CRUNCH_TONEAREST:
++ case FE_CRUNCH_UPWARD:
++ case FE_CRUNCH_DOWNWARD:
++ case FE_CRUNCH_TOWARDZERO:
++ _FPU_CRUNCH_GETCW (temp);
++ temp = (temp & ~FE_CRUNCH_UPWARD) | round;
++ _FPU_CRUNCH_SETCW (temp);
++ return 0;
++ default:
++ return 1;
++ }
++ }
+ else if (round == FE_TONEAREST)
+ /* This is the only supported rounding mode for soft-fp. */
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fpu_control.h glibc-2.5/ports/sysdeps/arm/eabi/fpu_control.h
+--- glibc-2.5/ports/sysdeps/arm/eabi/fpu_control.h 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fpu_control.h 2008-04-02 13:43:05.000000000 +1000
+@@ -45,6 +45,86 @@
+ #define _FPU_SETCW(cw) \
+ __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw))
+
++/* CRUNCH SECTION */
++
++/* DSPSC register: (from EP9312 User's Guide)
++ *
++ * bits 31..29 - DAID
++ * bits 28..26 - HVID
++ * bits 25..24 - RSVD
++ * bit 23 - ISAT
++ * bit 22 - UI
++ * bit 21 - INT
++ * bit 20 - AEXC
++ * bits 19..18 - SAT
++ * bits 17..16 - FCC
++ * bit 15 - V
++ * bit 14 - FWDEN
++ * bit 13 - Invalid
++ * bit 12 - Denorm
++ * bits 11..10 - RM
++ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE
++ * bits 4..0 - IX, UF, OF, RSVD, IO
++ */
++
++/* masking of interrupts */
++#define _FPU_CRUNCH_MASK_IM (1 << 5) /* invalid operation */
++#define _FPU_CRUNCH_MASK_ZM 0 /* divide by zero */
++#define _FPU_CRUNCH_MASK_OM (1 << 7) /* overflow */
++#define _FPU_CRUNCH_MASK_UM (1 << 8) /* underflow */
++#define _FPU_CRUNCH_MASK_PM (1 << 9) /* inexact */
++#define _FPU_CRUNCH_MASK_DM 0 /* denormalized operation */
++
++/* Some bits in the FPSCR are not yet defined. They must be preserved when
++ modifying the contents. */
++#define _FPU_CRUNCH_RESERVED 0x03000042
++#define _FPU_CRUNCH_DEFAULT 0x00b00000
++/* Default + exceptions enabled. */
++#define _FPU_CRUNCH_IEEE (_FPU_CRUNCH_DEFAULT | 0x000003a0)
++
++
++/* Macros for accessing the hardware control word. */
++/* cfmvr64l %1, mvdx0 */
++/* cfmvr64h %2, mvdx0 */
++/* cfmv32sc mvdx0, dspsc */
++/* cfmvr64l %0, mvdx0 */
++/* cfmv64lr mvdx0, %1 */
++/* cfmv64hr mvdx0, %2 */
++#define _FPU_CRUNCH_GETCW(cw) ({ \
++ register int __t1, __t2; \
++ \
++ __asm__ volatile ( \
++ "mrc p5, 0, %1, cr0, cr0, 0\n\t" \
++ "mrc p5, 0, %2, cr0, cr0, 1\n\t" \
++ "cdp p4, 0, cr0, cr0, cr0, 7\n\t" \
++ "mrc p5, 0, %0, cr0, cr0, 0\n\t" \
++ "mcr p5, 0, %1, cr0, cr0, 0\n\t" \
++ "mcr p5, 0, %2, cr0, cr0, 1" \
++ : "=r" (cw), "=r" (__t1), "=r" (__t2) \
++ ); \
++})
++
++/* cfmvr64l %1, mvdx0 */
++/* cfmvr64h %2, mvdx0 */
++/* cfmv64lr mvdx0, %0 */
++/* cfmvsc32 dspsc, mvdx0 */
++/* cfmv64lr mvdx0, %1 */
++/* cfmv64hr mvdx0, %2 */
++#define _FPU_CRUNCH_SETCW(cw) ({ \
++ register int __t1, __t2; \
++ \
++ __asm__ volatile ( \
++ "mrc p5, 0, %0, cr0, cr0, 0\n\t" \
++ "mrc p5, 0, %1, cr0, cr0, 1\n\t" \
++ "mcr p5, 0, %2, cr0, cr0, 0\n\t" \
++ "cdp p4, 1, cr0, cr0, cr0, 7\n\t" \
++ "mcr p5, 0, %0, cr0, cr0, 0\n\t" \
++ "mcr p5, 0, %1, cr0, cr0, 1\n\t" \
++ : "=r" (__t1), "=r" (__t2) : "r" (cw) \
++ ); \
++})
++
++
+ /* Default control word set at startup. */
+ extern fpu_control_t __fpu_control;
+
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fraiseexcpt.c glibc-2.5/ports/sysdeps/arm/eabi/fraiseexcpt.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fraiseexcpt.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fraiseexcpt.c 2008-04-07 16:48:09.000000000 +1000
+@@ -103,6 +103,12 @@
+ return 0;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ /* Unsupported, for now. */
++ return 1;
++ }
++
+ /* Unsupported, so fail. */
+ return 1;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/fsetexcptflg.c glibc-2.5/ports/sysdeps/arm/eabi/fsetexcptflg.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/fsetexcptflg.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/fsetexcptflg.c 2008-04-02 13:49:34.000000000 +1000
+@@ -47,6 +47,24 @@
+ return 0;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ fexcept_t temp;
++
++ /* Get the current environment. */
++ _FPU_CRUNCH_GETCW (temp);
++
++ /* Set the desired exception mask. */
++ temp &= ~((excepts & FE_CRUNCH_ALL_EXCEPT) << FE_CRUNCH_EXCEPT_SHIFT);
++ temp |= (*flagp & excepts & FE_CRUNCH_ALL_EXCEPT) << FE_CRUNCH_EXCEPT_SHIFT;
++
++ /* Save state back to the FPU. */
++ _FPU_CRUNCH_SETCW (temp);
++
++ /* Success. */
++ return 0;
++ }
++
+ /* Unsupported, so fail. */
+ return 1;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/ftestexcept.c glibc-2.5/ports/sysdeps/arm/eabi/ftestexcept.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/ftestexcept.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/ftestexcept.c 2008-04-02 13:50:10.000000000 +1000
+@@ -38,6 +38,16 @@
+ return temp & excepts & FE_ALL_EXCEPT;
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ fexcept_t temp;
++
++ /* Get current exceptions. */
++ _FPU_CRUNCH_GETCW(temp);
++
++ return temp & excepts & FE_CRUNCH_ALL_EXCEPT;
++ }
++
+ /* Unsupported, return 0. */
+ return 0;
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/eabi/setfpucw.c glibc-2.5/ports/sysdeps/arm/eabi/setfpucw.c
+--- glibc-2.5/ports/sysdeps/arm/eabi/setfpucw.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/eabi/setfpucw.c 2008-04-02 13:51:28.000000000 +1000
+@@ -43,5 +43,20 @@
+ _FPU_SETCW (cw);
+ }
+
++ if (GLRO (dl_hwcap) & HWCAP_ARM_CRUNCH)
++ {
++ fpu_control_t cw;
++
++ /* Fetch the current control word. */
++ _FPU_CRUNCH_GETCW (cw);
++
++ /* Preserve the reserved bits, and set the rest as the user
++ specified (or the default, if the user gave zero). */
++ cw &= _FPU_CRUNCH_RESERVED;
++ cw |= set & ~_FPU_CRUNCH_RESERVED;
++
++ _FPU_CRUNCH_SETCW (cw);
++ }
++
+ /* Do nothing if a VFP unit isn't present. */
+ }
diff --git a/recipes/glibc/glibc-2.4/glibc-crunch-endian-bigword-littlebyte.patch b/recipes/glibc/glibc-2.4/glibc-crunch-endian-bigword-littlebyte.patch
new file mode 100644
index 0000000000..e181e97ca5
--- /dev/null
+++ b/recipes/glibc/glibc-2.4/glibc-crunch-endian-bigword-littlebyte.patch
@@ -0,0 +1,40 @@
+diff -urN glibc-2.5/ports/sysdeps/arm/bits/endian.h glibc-2.5/ports/sysdeps/arm/bits/endian.h
+--- glibc-2.5/ports/sysdeps/arm/bits/endian.h 2005-06-13 20:11:47.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/bits/endian.h 2007-05-18 08:41:52.000000000 +1000
+@@ -15,5 +15,9 @@
+ #ifdef __VFP_FP__
+ #define __FLOAT_WORD_ORDER __BYTE_ORDER
+ #else
++#ifdef __MAVERICK__
++#define __FLOAT_WORD_ORDER __BIG_ENDIAN
++#else
+ #define __FLOAT_WORD_ORDER __BIG_ENDIAN
+ #endif
++#endif
+diff -urN glibc-2.5/ports/sysdeps/arm/gccframe.h glibc-2.5/ports/sysdeps/arm/gccframe.h
+--- glibc-2.5/ports/sysdeps/arm/gccframe.h 2001-11-16 11:07:20.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/gccframe.h 2007-05-18 08:53:38.000000000 +1000
+@@ -17,6 +17,10 @@
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
++#ifdef __MAVERICK__
++#define FIRST_PSEUDO_REGISTER 43
++#else
+ #define FIRST_PSEUDO_REGISTER 27
++#endif
+
+ #include <sysdeps/generic/gccframe.h>
+diff -urN glibc-2.5/ports/sysdeps/arm/gmp-mparam.h glibc-2.5/ports/sysdeps/arm/gmp-mparam.h
+--- glibc-2.5/ports/sysdeps/arm/gmp-mparam.h 2005-06-13 20:11:47.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/gmp-mparam.h 2007-05-18 08:54:21.000000000 +1000
+@@ -29,6 +29,9 @@
+ #if defined(__ARMEB__)
+ # define IEEE_DOUBLE_MIXED_ENDIAN 0
+ # define IEEE_DOUBLE_BIG_ENDIAN 1
++#elif defined(__MAVERICK__)
++#define IEEE_DOUBLE_MIXED_ENDIAN 0
++#define IEEE_DOUBLE_BIG_ENDIAN 1
+ #elif defined(__VFP_FP__)
+ # define IEEE_DOUBLE_MIXED_ENDIAN 0
+ # define IEEE_DOUBLE_BIG_ENDIAN 0
diff --git a/recipes/glibc/glibc-2.4/glibc-crunch-endian-littleword-littlebyte.patch b/recipes/glibc/glibc-2.4/glibc-crunch-endian-littleword-littlebyte.patch
new file mode 100644
index 0000000000..e8559d4f67
--- /dev/null
+++ b/recipes/glibc/glibc-2.4/glibc-crunch-endian-littleword-littlebyte.patch
@@ -0,0 +1,40 @@
+diff -urN glibc-2.5/ports/sysdeps/arm/bits/endian.h glibc-2.5/ports/sysdeps/arm/bits/endian.h
+--- glibc-2.5/ports/sysdeps/arm/bits/endian.h 2005-06-13 20:11:47.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/bits/endian.h 2007-05-18 08:41:52.000000000 +1000
+@@ -15,5 +15,9 @@
+ #ifdef __VFP_FP__
+ #define __FLOAT_WORD_ORDER __BYTE_ORDER
+ #else
++#ifdef __MAVERICK__
++#define __FLOAT_WORD_ORDER __LITTLE_ENDIAN
++#else
+ #define __FLOAT_WORD_ORDER __BIG_ENDIAN
+ #endif
++#endif
+diff -urN glibc-2.5/ports/sysdeps/arm/gccframe.h glibc-2.5/ports/sysdeps/arm/gccframe.h
+--- glibc-2.5/ports/sysdeps/arm/gccframe.h 2001-11-16 11:07:20.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/gccframe.h 2007-05-18 08:53:38.000000000 +1000
+@@ -17,6 +17,10 @@
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
++#ifdef __MAVERICK__
++#define FIRST_PSEUDO_REGISTER 43
++#else
+ #define FIRST_PSEUDO_REGISTER 27
++#endif
+
+ #include <sysdeps/generic/gccframe.h>
+diff -urN glibc-2.5/ports/sysdeps/arm/gmp-mparam.h glibc-2.5/ports/sysdeps/arm/gmp-mparam.h
+--- glibc-2.5/ports/sysdeps/arm/gmp-mparam.h 2005-06-13 20:11:47.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/gmp-mparam.h 2007-05-18 08:54:21.000000000 +1000
+@@ -29,6 +29,9 @@
+ #if defined(__ARMEB__)
+ # define IEEE_DOUBLE_MIXED_ENDIAN 0
+ # define IEEE_DOUBLE_BIG_ENDIAN 1
++#elif defined(__MAVERICK__)
++#define IEEE_DOUBLE_MIXED_ENDIAN 0
++#define IEEE_DOUBLE_BIG_ENDIAN 0
+ #elif defined(__VFP_FP__)
+ # define IEEE_DOUBLE_MIXED_ENDIAN 0
+ # define IEEE_DOUBLE_BIG_ENDIAN 0
diff --git a/recipes/glibc/glibc-2.4/glibc-crunch-oabi.patch b/recipes/glibc/glibc-2.4/glibc-crunch-oabi.patch
new file mode 100644
index 0000000000..964abb46d6
--- /dev/null
+++ b/recipes/glibc/glibc-2.4/glibc-crunch-oabi.patch
@@ -0,0 +1,310 @@
+diff -urN glibc-2.5/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.5/ports/sysdeps/arm/fpu/bits/fenv.h
+--- glibc-2.5/ports/sysdeps/arm/fpu/bits/fenv.h 2001-07-06 14:55:48.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/fpu/bits/fenv.h 2007-05-18 08:44:33.000000000 +1000
+@@ -20,6 +20,45 @@
+ # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+ #endif
+
++#if defined(__MAVERICK__)
++
++/* Define bits representing exceptions in the FPU status word. */
++enum
++ {
++ FE_INVALID = 1,
++#define FE_INVALID FE_INVALID
++ FE_OVERFLOW = 4,
++#define FE_OVERFLOW FE_OVERFLOW
++ FE_UNDERFLOW = 8,
++#define FE_UNDERFLOW FE_UNDERFLOW
++ FE_INEXACT = 16,
++#define FE_INEXACT FE_INEXACT
++ };
++
++/* Amount to shift by to convert an exception to a mask bit. */
++#define FE_EXCEPT_SHIFT 5
++
++/* All supported exceptions. */
++#define FE_ALL_EXCEPT \
++ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
++
++/* IEEE rounding modes. */
++enum
++ {
++ FE_TONEAREST = 0,
++#define FE_TONEAREST FE_TONEAREST
++ FE_TOWARDZERO = 0x400,
++#define FE_TOWARDZERO FE_TOWARDZERO
++ FE_DOWNWARD = 0x800,
++#define FE_DOWNWARD FE_DOWNWARD
++ FE_UPWARD = 0xc00,
++#define FE_UPWARD FE_UPWARD
++ };
++
++#define FE_ROUND_MASK (FE_UPWARD)
++
++#else /* FPA */
++
+ /* Define bits representing exceptions in the FPU status word. */
+ enum
+ {
+@@ -31,6 +70,7 @@
+ #define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = 8,
+ #define FE_UNDERFLOW FE_UNDERFLOW
++
+ };
+
+ /* Amount to shift by to convert an exception to a mask bit. */
+@@ -44,6 +84,8 @@
+ modes exist, but you have to encode them in the actual instruction. */
+ #define FE_TONEAREST 0
+
++#endif /* FPA */
++
+ /* Type representing exception flags. */
+ typedef unsigned long int fexcept_t;
+
+diff -urN glibc-2.5/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.5/ports/sysdeps/arm/fpu/bits/setjmp.h
+--- glibc-2.5/ports/sysdeps/arm/fpu/bits/setjmp.h 2006-01-10 19:22:16.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/fpu/bits/setjmp.h 2007-05-18 08:45:22.000000000 +1000
+@@ -28,7 +28,11 @@
+ #ifndef _ASM
+ /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
+ saved. */
++#ifdef __MAVERICK__
++typedef int __jmp_buf[34];
++#else
+ typedef int __jmp_buf[22];
+ #endif
++#endif
+
+ #endif
+diff -urN glibc-2.5/ports/sysdeps/arm/fpu/fegetround.c glibc-2.5/ports/sysdeps/arm/fpu/fegetround.c
+--- glibc-2.5/ports/sysdeps/arm/fpu/fegetround.c 2001-07-06 14:55:48.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/fpu/fegetround.c 2007-05-18 08:47:52.000000000 +1000
+@@ -18,9 +18,21 @@
+ 02111-1307 USA. */
+
+ #include <fenv.h>
++#include <fpu_control.h>
+
+ int
+ fegetround (void)
+ {
++#if defined(__MAVERICK__)
++
++ unsigned long temp;
++
++ _FPU_GETCW (temp);
++ return temp & FE_ROUND_MASK;
++
++#else /* FPA */
++
+ return FE_TONEAREST; /* Easy. :-) */
++
++#endif
+ }
+diff -urN glibc-2.5/ports/sysdeps/arm/fpu/fesetround.c glibc-2.5/ports/sysdeps/arm/fpu/fesetround.c
+--- glibc-2.5/ports/sysdeps/arm/fpu/fesetround.c 2005-10-11 01:29:32.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/fpu/fesetround.c 2007-05-18 08:48:32.000000000 +1000
+@@ -20,10 +20,26 @@
+ #include <fenv.h>
++#include <fpu_control.h>
+
+ int
+ fesetround (int round)
+ {
++#if defined(__MAVERICK__)
++ unsigned long temp;
++
++ if (round & ~FE_ROUND_MASK)
++ return 1;
++
++ _FPU_GETCW (temp);
++ temp = (temp & ~FE_ROUND_MASK) | round;
++ _FPU_SETCW (temp);
++ return 0;
++
++#else /* FPA */
++
+ /* We only support FE_TONEAREST, so there is no need for any work. */
+ return (round == FE_TONEAREST)?0:1;
++
++#endif
+ }
+
+ libm_hidden_def (fesetround)
+diff -urN glibc-2.5/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.5/ports/sysdeps/arm/fpu/fpu_control.h
+--- glibc-2.5/ports/sysdeps/arm/fpu/fpu_control.h 2001-07-06 14:55:48.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/fpu/fpu_control.h 2007-05-18 08:50:28.000000000 +1000
+@@ -20,6 +20,81 @@
+ #ifndef _FPU_CONTROL_H
+ #define _FPU_CONTROL_H
+
++#if defined(__MAVERICK__)
++
++/* DSPSC register: (from EP9312 User's Guide)
++ *
++ * bits 31..29 - DAID
++ * bits 28..26 - HVID
++ * bits 25..24 - RSVD
++ * bit 23 - ISAT
++ * bit 22 - UI
++ * bit 21 - INT
++ * bit 20 - AEXC
++ * bits 19..18 - SAT
++ * bits 17..16 - FCC
++ * bit 15 - V
++ * bit 14 - FWDEN
++ * bit 13 - Invalid
++ * bit 12 - Denorm
++ * bits 11..10 - RM
++ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE
++ * bits 4..0 - IX, UF, OF, RSVD, IO
++ */
++
++/* masking of interrupts */
++#define _FPU_MASK_IM (1 << 5) /* invalid operation */
++#define _FPU_MASK_ZM 0 /* divide by zero */
++#define _FPU_MASK_OM (1 << 7) /* overflow */
++#define _FPU_MASK_UM (1 << 8) /* underflow */
++#define _FPU_MASK_PM (1 << 9) /* inexact */
++#define _FPU_MASK_DM 0 /* denormalized operation */
++
++#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */
++
++#define _FPU_DEFAULT 0x00b00000 /* Default value. */
++#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */
++
++/* Type of the control word. */
++typedef unsigned int fpu_control_t;
++
++/* Macros for accessing the hardware control word. */
++#define _FPU_GETCW(cw) ({ \
++ register int __t1, __t2; \
++ \
++ __asm__ volatile ( \
++ "cfmvr64l %1, mvdx0\n\t" \
++ "cfmvr64h %2, mvdx0\n\t" \
++ "cfmv32sc mvdx0, dspsc\n\t" \
++ "cfmvr64l %0, mvdx0\n\t" \
++ "cfmv64lr mvdx0, %1\n\t" \
++ "cfmv64hr mvdx0, %2" \
++ : "=r" (cw), "=r" (__t1), "=r" (__t2) \
++ ); \
++})
++
++#define _FPU_SETCW(cw) ({ \
++ register int __t0, __t1, __t2; \
++ \
++ __asm__ volatile ( \
++ "cfmvr64l %1, mvdx0\n\t" \
++ "cfmvr64h %2, mvdx0\n\t" \
++ "cfmv64lr mvdx0, %0\n\t" \
++ "cfmvsc32 dspsc, mvdx0\n\t" \
++ "cfmv64lr mvdx0, %1\n\t" \
++ "cfmv64hr mvdx0, %2" \
++ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \
++ : "0" (cw) \
++ ); \
++})
++
++/* Default control word set at startup. */
++extern fpu_control_t __fpu_control;
++
++#else /* FPA */
++
++
++
+ /* We have a slight terminology confusion here. On the ARM, the register
+ * we're interested in is actually the FPU status word - the FPU control
+ * word is something different (which is implementation-defined and only
+@@ -99,4 +174,6 @@
+ /* Default control word set at startup. */
+ extern fpu_control_t __fpu_control;
+
++#endif /* FPA */
++
+ #endif /* _FPU_CONTROL_H */
+diff -urN glibc-2.5/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.5/ports/sysdeps/arm/fpu/__longjmp.S
+--- glibc-2.5/ports/sysdeps/arm/fpu/__longjmp.S 2001-07-06 14:55:48.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/fpu/__longjmp.S 2007-05-18 08:51:36.000000000 +1000
+@@ -30,7 +30,33 @@
+ movs r0, r1 /* get the return value in place */
+ moveq r0, #1 /* can't let setjmp() return zero! */
+
++#ifdef __MAVERICK__
++ cfldrd mvd4, [ip], #8
++ nop
++ cfldrd mvd5, [ip], #8
++ nop
++ cfldrd mvd6, [ip], #8
++ nop
++ cfldrd mvd7, [ip], #8
++ nop
++ cfldrd mvd8, [ip], #8
++ nop
++ cfldrd mvd9, [ip], #8
++ nop
++ cfldrd mvd10, [ip], #8
++ nop
++ cfldrd mvd11, [ip], #8
++ nop
++ cfldrd mvd12, [ip], #8
++ nop
++ cfldrd mvd13, [ip], #8
++ nop
++ cfldrd mvd14, [ip], #8
++ nop
++ cfldrd mvd15, [ip], #8
++#else
+ lfmfd f4, 4, [ip] ! /* load the floating point regs */
++#endif
+
+ LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
+ END (__longjmp)
+diff -urN glibc-2.5/ports/sysdeps/arm/fpu/setjmp.S glibc-2.5/ports/sysdeps/arm/fpu/setjmp.S
+--- glibc-2.5/ports/sysdeps/arm/fpu/setjmp.S 2001-07-06 14:55:48.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/fpu/setjmp.S 2007-05-18 08:53:00.000000000 +1000
+@@ -24,11 +24,41 @@
+
+ ENTRY (__sigsetjmp)
+ /* Save registers */
++#ifdef __MAVERICK__
++ cfstrd mvd4, [r0], #8
++ nop
++ cfstrd mvd5, [r0], #8
++ nop
++ cfstrd mvd6, [r0], #8
++ nop
++ cfstrd mvd7, [r0], #8
++ nop
++ cfstrd mvd8, [r0], #8
++ nop
++ cfstrd mvd9, [r0], #8
++ nop
++ cfstrd mvd10, [r0], #8
++ nop
++ cfstrd mvd11, [r0], #8
++ nop
++ cfstrd mvd12, [r0], #8
++ nop
++ cfstrd mvd13, [r0], #8
++ nop
++ cfstrd mvd14, [r0], #8
++ nop
++ cfstrd mvd15, [r0], #8
++#else
+ sfmea f4, 4, [r0]!
++#endif
+ stmia r0, {v1-v6, sl, fp, sp, lr}
+
+ /* Restore pointer to jmp_buf */
++#ifdef __MAVERICK__
++ sub r0, r0, #96
++#else
+ sub r0, r0, #48
++#endif
+
+ /* Make a tail call to __sigjmp_save; it takes the same args. */
+ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
diff --git a/recipes/glibc/glibc-2.4/glibc-crunch-oabi2.patch b/recipes/glibc/glibc-2.4/glibc-crunch-oabi2.patch
new file mode 100644
index 0000000000..fe5a05014f
--- /dev/null
+++ b/recipes/glibc/glibc-2.4/glibc-crunch-oabi2.patch
@@ -0,0 +1,18 @@
+--- glibc-2.5/ports/sysdeps/arm/sysdep.h 2007-07-02 13:05:53.000000000 +1000
++++ glibc-2.5/ports/sysdeps/arm/sysdep.h 2007-07-02 13:06:26.000000000 +1000
+@@ -51,6 +51,7 @@
+
+ #endif
+
++#if 0 // ndef __MAVERICK__
+ /* APCS-32 doesn't preserve the condition codes across function call. */
+ #ifdef __APCS_32__
+ #define LOADREGS(cond, base, reglist...)\
+@@ -74,6 +75,7 @@
+ #define DO_RET(_reg) \
+ movs pc, _reg
+ #endif
++#endif
+
+ /* Define an entry point visible from C. */
+ #define ENTRY(name) \
diff --git a/recipes/glibc/glibc-cvs-2.3.5/etc/ld.so.conf b/recipes/glibc/glibc-cvs-2.3.5/etc/ld.so.conf
new file mode 100644
index 0000000000..46e06d3f0a
--- /dev/null
+++ b/recipes/glibc/glibc-cvs-2.3.5/etc/ld.so.conf
@@ -0,0 +1,2 @@
+/usr/local/lib
+
diff --git a/recipes/glibc/glibc-initial.inc b/recipes/glibc/glibc-initial.inc
index 5528cf8edb..cd65924047 100644
--- a/recipes/glibc/glibc-initial.inc
+++ b/recipes/glibc/glibc-initial.inc
@@ -1,7 +1,7 @@
SECTION = "libs"
DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "glibc-2.4:"
PACKAGES = ""
PACKAGES_DYNAMIC = ""
diff --git a/recipes/glibc/glibc-initial_2.2.5.bb b/recipes/glibc/glibc-initial_2.2.5.bb
index 84412bd596..c7dde2310e 100644
--- a/recipes/glibc/glibc-initial_2.2.5.bb
+++ b/recipes/glibc/glibc-initial_2.2.5.bb
@@ -2,4 +2,3 @@ require glibc_${PV}.bb
require glibc-initial.inc
DEFAULT_PREFERENCE_sh3 = "-99"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
diff --git a/recipes/glibc/glibc-initial_2.3.2+cvs20040726.bb b/recipes/glibc/glibc-initial_2.3.2+cvs20040726.bb
index 4d7129b7b8..c7dde2310e 100644
--- a/recipes/glibc/glibc-initial_2.3.2+cvs20040726.bb
+++ b/recipes/glibc/glibc-initial_2.3.2+cvs20040726.bb
@@ -2,4 +2,3 @@ require glibc_${PV}.bb
require glibc-initial.inc
DEFAULT_PREFERENCE_sh3 = "-99"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-cvs', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
diff --git a/recipes/glibc/glibc-initial_2.3.2.bb b/recipes/glibc/glibc-initial_2.3.2.bb
index 84412bd596..c7dde2310e 100644
--- a/recipes/glibc/glibc-initial_2.3.2.bb
+++ b/recipes/glibc/glibc-initial_2.3.2.bb
@@ -2,4 +2,3 @@ require glibc_${PV}.bb
require glibc-initial.inc
DEFAULT_PREFERENCE_sh3 = "-99"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
diff --git a/recipes/glibc/glibc-initial_2.3.6.bb b/recipes/glibc/glibc-initial_2.3.6.bb
index 8249cd696d..fa7836ad88 100644
--- a/recipes/glibc/glibc-initial_2.3.6.bb
+++ b/recipes/glibc/glibc-initial_2.3.6.bb
@@ -1,4 +1,2 @@
require glibc_${PV}.bb
require glibc-initial.inc
-
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
diff --git a/recipes/glibc/glibc-initial_2.6.1.bb b/recipes/glibc/glibc-initial_2.6.1.bb
index 3ad96569f5..d66297090f 100644
--- a/recipes/glibc/glibc-initial_2.6.1.bb
+++ b/recipes/glibc/glibc-initial_2.6.1.bb
@@ -3,4 +3,4 @@ require glibc-initial.inc
do_configure_prepend () {
unset CFLAGS
-} \ No newline at end of file
+}
diff --git a/recipes/glibc/glibc-initial_cvs.bb b/recipes/glibc/glibc-initial_cvs.bb
index 81be5fc49b..0bfd665a59 100644
--- a/recipes/glibc/glibc-initial_cvs.bb
+++ b/recipes/glibc/glibc-initial_cvs.bb
@@ -1,4 +1,5 @@
require glibc_${PV}.bb
require glibc-initial.inc
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-cvs', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+# glibc_cvs.bb overrides PV; glibc-cvs won't automatically be in FILESPATHPKG
+FILESPATHPKG =. "glibc-cvs:"
diff --git a/recipes/glibc/glibc-package.bbclass b/recipes/glibc/glibc-package.bbclass
index 89fbd1ca72..2bf08cec75 100644
--- a/recipes/glibc/glibc-package.bbclass
+++ b/recipes/glibc/glibc-package.bbclass
@@ -24,7 +24,7 @@ python __anonymous () {
ENABLE_BINARY_LOCALE_GENERATION ?= "0"
# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
-BINARY_LOCALE_ARCHES ?= "arm.*"
+BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc"
# Set this to zero if you don't want ldconfig in the output package
USE_LDCONFIG ?= "1"
@@ -32,12 +32,14 @@ USE_LDCONFIG ?= "1"
PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* locale-base-* glibc-binary-localedata-*"
-libc_baselibs = "/lib/libc* /lib/libm* /lib/ld* /lib/libpthread* /lib/libresolv* /lib/librt* /lib/libutil* /lib/libnsl* /lib/libnss_files* /lib/libnss_compat* /lib/libnss_dns* /lib/libdl* /lib/libanl* /lib/libBrokenLocale*"
+INSANE_SKIP_glibc-dbg = True
+
+libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc*.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${datadir}/zoneinfo ${@base_conditional('USE_LDCONFIG', '1', '/sbin/ldconfig', '', d)}"
FILES_ldd = "${bindir}/ldd"
-FILES_libsegfault = "/lib/libSegFault*"
-FILES_glibc-extra-nss = "/lib/libnss*"
+FILES_libsegfault = "${base_libdir}/libSegFault*"
+FILES_glibc-extra-nss = "${base_libdir}/libnss*"
FILES_sln = "/sbin/sln"
FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
FILES_nscd = "${sbindir}/nscd*"
@@ -46,8 +48,8 @@ FILES_glibc-gconv = "${libdir}/gconv/*"
FILES_${PN}-dbg += " ${libdir}/gconv/.debug ${libexecdir}/*/.debug"
FILES_catchsegv = "${bindir}/catchsegv"
RDEPENDS_catchsegv = "libsegfault"
-FILES_glibc-pcprofile = "/lib/libpcprofile.so"
-FILES_glibc-thread-db = "/lib/libthread_db*"
+FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so"
+FILES_glibc-thread-db = "${base_libdir}/libthread_db*"
FILES_localedef = "${bindir}/localedef"
RPROVIDES_glibc-dev += "libc-dev"
@@ -145,7 +147,7 @@ do_prep_locale_tree() {
for i in $treedir/${datadir}/i18n/charmaps/*gz; do
gunzip $i
done
- ls ${D}/lib/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
+ ls ${D}${base_libdir}/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so ]; then
cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
fi
@@ -250,9 +252,15 @@ python package_do_split_gconvs () {
def output_locale_binary(name, locale, encoding):
target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
if target_arch in ("i486", "i586", "i686"):
- target_arch = "i386"
+ target_arch = "i386"
+ elif target_arch == "powerpc":
+ target_arch = "ppc"
- qemu = "qemu-%s -s 1048576 -r 2.6.16" % target_arch
+ kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1)
+ if kernel_ver is None:
+ qemu = "qemu-%s -s 1048576" % target_arch
+ else:
+ qemu = "qemu-%s -s 1048576 -r %s" % (target_arch, kernel_ver)
pkgname = 'locale-base-' + legitimize_package_name(name)
m = re.match("(.*)\.(.*)", name)
if m:
@@ -269,6 +277,7 @@ python package_do_split_gconvs () {
bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d)
treedir = base_path_join(bb.data.getVar("WORKDIR", d, 1), "locale-tree")
+ ldlibdir = "%s/lib" % treedir
path = bb.data.getVar("PATH", d, 1)
i18npath = base_path_join(treedir, datadir, "i18n")
@@ -278,7 +287,7 @@ python package_do_split_gconvs () {
if not qemu_options:
qemu_options = bb.data.getVar('QEMU_OPTIONS', d, 1)
- cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, qemu_options, treedir, localedef_opts)
+ cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, ldlibdir, qemu_options, treedir, localedef_opts)
bb.note("generating locale %s (%s)" % (locale, encoding))
if os.system(cmd):
raise bb.build.FuncFailed("localedef returned an error (command was %s)." % cmd)
diff --git a/recipes/glibc/glibc_2.3.2.bb b/recipes/glibc/glibc_2.3.2.bb
index 2d2663f56b..0ed7d3e723 100644
--- a/recipes/glibc/glibc_2.3.2.bb
+++ b/recipes/glibc/glibc_2.3.2.bb
@@ -104,6 +104,11 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/glibc/glibc-${PV}.tar.gz \
file://etc/ld.so.conf \
file://generate-supported.mk"
+SRC_URI_append_mtx-1 = " file://mips-abio32.patch;patch=1 \
+ file://allow-gcc.patch;patch=1 "
+SRC_URI_append_mtx-2 = " file://mips-abio32.patch;patch=1 \
+ file://allow-gcc.patch;patch=1 "
+
S = "${WORKDIR}/glibc-${PV}"
B = "${WORKDIR}/build-${TARGET_SYS}"
diff --git a/recipes/glibc/glibc_2.3.3.bb b/recipes/glibc/glibc_2.3.3.bb
index 05a8581957..dada4bb2fb 100644
--- a/recipes/glibc/glibc_2.3.3.bb
+++ b/recipes/glibc/glibc_2.3.3.bb
@@ -49,6 +49,11 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/glibc/glibc-${PV}.tar.gz \
file://etc/ld.so.conf \
file://generate-supported.mk"
+SRC_URI_append_mtx-1 = " file://mips-abio32.patch;patch=1 \
+ file://allow-gcc.patch;patch=1 "
+SRC_URI_append_mtx-2 = " file://mips-abio32.patch;patch=1 \
+ file://allow-gcc.patch;patch=1 "
+
S = "${WORKDIR}/glibc-${PV}"
B = "${WORKDIR}/build-${TARGET_SYS}"
diff --git a/recipes/glibc/glibc_2.3.5+cvs20050627.bb b/recipes/glibc/glibc_2.3.5+cvs20050627.bb
index 5fa4010a69..1d4dd0d393 100644
--- a/recipes/glibc/glibc_2.3.5+cvs20050627.bb
+++ b/recipes/glibc/glibc_2.3.5+cvs20050627.bb
@@ -51,7 +51,7 @@ SRC_URI = "http://familiar.handhelds.org/source/v0.8.3/stash_libc_sources.redhat
file://zecke-sane-readelf.patch;patch=1 \
file://glibc-2.3.5-fix-weak-alias-arm.patch;patch=1 \
file://glibc-2.3.5-fix-weak-alias-arm-2.patch;patch=1 \
- file://etc/ld.so.conf \
+ file://etc/ld.so.conf \
file://generate-supported.mk"
# seems to fail on tls platforms
@@ -74,7 +74,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${STAGING_INCDIR \
+ --with-headers=${STAGING_INCDIR} \
--without-selinux \
${GLIBC_EXTRA_OECONF}"
diff --git a/recipes/glibc/glibc_2.3.6.bb b/recipes/glibc/glibc_2.3.6.bb
index ab167daaa8..8d645409dd 100644
--- a/recipes/glibc/glibc_2.3.6.bb
+++ b/recipes/glibc/glibc_2.3.6.bb
@@ -2,8 +2,6 @@ require glibc.inc
PR = "r5"
-#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"
# ${CROSSTOOL_PATCH_URL}glibc-2.3.5-cygwin.patch;patch=1
diff --git a/recipes/glibc/glibc_2.6.1.bb b/recipes/glibc/glibc_2.6.1.bb
index c1a95987bf..0a8708c1e3 100644
--- a/recipes/glibc/glibc_2.6.1.bb
+++ b/recipes/glibc/glibc_2.6.1.bb
@@ -1,5 +1,5 @@
require glibc.inc
-PR = "r15"
+PR = "r17"
PACKAGES_DYNAMIC = "libc6*"
RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
@@ -60,7 +60,14 @@ SRC_URI = "\
file://march-i686.patch;patch=1;pnum=0 \
"
-# file://ldsocache-varrun.patch;patch=1 \
+SRC_URI_append_ep9312 = "\
+ file://glibc-crunch-endian-littleword-littlebyte.patch;patch=1 \
+ file://glibc-crunch-eabi-setjmp_longjmp.patch;patch=1 \
+ file://glibc-crunch-eabi-unwind.patch;patch=1 \
+ file://glibc-crunch-eabi.patch;patch=1 \
+ file://glibc-crunch-eabi-force.patch;patch=1 \
+ file://glibc-crunch-eabi-fraiseexcpt.patch;patch=1 \
+"
# Build fails on sh3 and sh4 without additional patches
SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
diff --git a/recipes/glibc/glibc_2.7.bb b/recipes/glibc/glibc_2.7.bb
index 8ae84c1c7e..447a6956ec 100644
--- a/recipes/glibc/glibc_2.7.bb
+++ b/recipes/glibc/glibc_2.7.bb
@@ -12,7 +12,7 @@ BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "glibc-2.4:"
GLIBC_ADDONS ?= "ports,nptl,libidn"
@@ -76,8 +76,7 @@ SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1"
#powerpc patches to add support for soft-float
-SRC_URI_append_powerpc= " \
- file://powerpc-sqrt-hack.diff;patch=1""
+SRC_URI_append_powerpc= " file://powerpc-sqrt-hack.diff;patch=1"
S = "${WORKDIR}/glibc-${PV}"
B = "${WORKDIR}/build-${TARGET_SYS}"
diff --git a/recipes/glibc/glibc_2.9.bb b/recipes/glibc/glibc_2.9.bb
index 7859876cb0..be66e2b727 100644
--- a/recipes/glibc/glibc_2.9.bb
+++ b/recipes/glibc/glibc_2.9.bb
@@ -12,7 +12,7 @@ BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "glibc-2.4:"
GLIBC_ADDONS ?= "ports,nptl,libidn"
@@ -54,6 +54,9 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
file://glibc-check_pf.patch;patch=1;pnum=0 \
file://ldd-unbash.patch;patch=1 \
file://glibc-arm-IO-acquire-lock-fix.diff;patch=1 \
+ file://local-args6.diff;patch=1 \
+ file://arm-check-pf.patch;patch=1 \
+ file://arm-lowlevellock-include-tls.patch;patch=1 \
file://generic-bits_select.h \
file://generic-bits_types.h \
file://generic-bits_typesizes.h \
@@ -69,8 +72,7 @@ SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1"
#powerpc patches to add support for soft-float
-SRC_URI_append_powerpc= " \
- file://powerpc-sqrt-hack.diff;patch=1""
+SRC_URI_append_powerpc= " file://powerpc-sqrt-hack.diff;patch=1"
S = "${WORKDIR}/glibc-${PV}"
B = "${WORKDIR}/build-${TARGET_SYS}"
diff --git a/recipes/gnash/gnash-minimal.inc b/recipes/gnash/gnash-minimal.inc
index a8e5229f46..5a8a91e5e0 100644
--- a/recipes/gnash/gnash-minimal.inc
+++ b/recipes/gnash/gnash-minimal.inc
@@ -1,6 +1,6 @@
DESCRIPTION = "Gnash is a GNU Flash movie player that supports many SWF v7 features"
HOMEPAGE = "http://www.gnu.org/software/gnash"
-LICENSE = "GPL-2"
+LICENSE = "GPLv2"
DEPENDS = "virtual/libiconv virtual/libintl libtool agg libxml2 zlib boost jpeg pango curl freetype \
${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'ffmpeg libmad', d)}"
diff --git a/recipes/gnash/gnash.inc b/recipes/gnash/gnash.inc
index 3602f6fa90..ea20524cad 100644
--- a/recipes/gnash/gnash.inc
+++ b/recipes/gnash/gnash.inc
@@ -1,6 +1,6 @@
DESCRIPTION = "Gnash is a GNU Flash movie player that supports many SWF v7 features"
HOMEPAGE = "http://www.gnu.org/software/gnash"
-LICENSE = "GPL-2"
+LICENSE = "GPLv2"
DEPENDS = "giflib libtool gtk+ cairo libxml2 libsdl-mixer zlib boost jpeg pango curl freetype \
${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'ffmpeg libmad', d)}"
diff --git a/recipes/gnet/files/configure_fix.patch b/recipes/gnet/files/configure_fix.patch
new file mode 100644
index 0000000000..e6aadcc6a9
--- /dev/null
+++ b/recipes/gnet/files/configure_fix.patch
@@ -0,0 +1,58 @@
+Index: trunk/configure.ac
+===================================================================
+--- trunk.orig/configure.ac
++++ trunk/configure.ac
+@@ -332,53 +332,6 @@ AC_DEFINE_UNQUOTED(GNET_SOCKADDR_FAMILY_
+ [$gnet_sockaddr_family_field_name],
+ [Name of sockaddr_storage family field])
+
+-dnl #######################################
+-dnl Check if abstract sockets are supported
+-dnl #######################################
+-
+-AC_LANG_PUSH(C)
+-AC_CACHE_CHECK([for abstract socket namespace availability],
+- ac_cv_gnet_have_abstract_sockets,
+- [AC_RUN_IFELSE([AC_LANG_PROGRAM(
+-[[
+-#include <sys/types.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <stdio.h>
+-#include <sys/socket.h>
+-#include <sys/un.h>
+-#include <errno.h>
+-]],
+-[[
+- int listen_fd, len;
+- struct sockaddr_un addr;
+-
+- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
+- if (listen_fd < 0) {
+- perror ("socket() failed: ");
+- exit (1);
+- }
+- memset (&addr, '\0', sizeof (addr));
+- addr.sun_family = AF_UNIX;
+- strcpy (addr.sun_path, "X/tmp/gnet-fake-socket-path-used-in-configure-test");
+- len = SUN_LEN (&addr); /* calculate size before adding the \0 */
+- addr.sun_path[0] = '\0'; /* this is what makes it abstract */
+-
+- if (bind (listen_fd, (struct sockaddr*) &addr, len) < 0) {
+- perror ("Abstract socket namespace bind() failed: ");
+- exit (1);
+- }
+- exit (0);
+-]])],
+- [ac_cv_gnet_have_abstract_sockets=yes],
+- [ac_cv_gnet_have_abstract_sockets=no]
+-)])
+-AC_LANG_POP(C)
+-
+-if test x$ac_cv_gnet_have_abstract_sockets = xyes ; then
+- AC_DEFINE(HAVE_ABSTRACT_SOCKETS,1,[Have abstract socket namespace])
+-fi
+-
+ ###############################
+ # Compiler characteristics
+ AC_C_CONST
diff --git a/recipes/gnet/files/pkgconfig_fix.patch b/recipes/gnet/files/pkgconfig_fix.patch
new file mode 100644
index 0000000000..a4a433f1ce
--- /dev/null
+++ b/recipes/gnet/files/pkgconfig_fix.patch
@@ -0,0 +1,12 @@
+Index: trunk/gnet-2.0.pc.in
+===================================================================
+--- trunk.orig/gnet-2.0.pc.in 2008-11-06 16:41:25.000000000 +0000
++++ trunk/gnet-2.0.pc.in 2008-11-06 16:42:23.000000000 +0000
+@@ -6,5 +6,6 @@
+ Name: Gnet
+ Description: A network compatibility layer library
+ Version: @VERSION@
++Requires: glib-2.0 gthread-2.0
+ Libs: -L${libdir} -lgnet-@GNET_MAJOR_VERSION@.@GNET_MINOR_VERSION@ @GLIB_LIBS@ @GTHREAD_LIBS@
+-Cflags: -I${includedir}/gnet-@GNET_MAJOR_VERSION@.@GNET_MINOR_VERSION@ -I${libdir}/gnet-@GNET_MAJOR_VERSION@.@GNET_MINOR_VERSION@/include/ @GLIB_CFLAGS@ @GTHREAD_CFLAGS@
++Cflags: -I${includedir}/gnet-@GNET_MAJOR_VERSION@.@GNET_MINOR_VERSION@ -I${libdir}/gnet-@GNET_MAJOR_VERSION@.@GNET_MINOR_VERSION@/include/
diff --git a/recipes/gnet/gnet_svn.bb b/recipes/gnet/gnet_svn.bb
index c09b7f8b9c..ea2c92ff1a 100644
--- a/recipes/gnet/gnet_svn.bb
+++ b/recipes/gnet/gnet_svn.bb
@@ -3,10 +3,13 @@ LICENSE = "LGPL"
SECTION = "libs/network"
HOMEPAGE = "http://www.gnetlibrary.org"
DEPENDS = "glib-2.0"
-PV = "2.0.7+svn${SRCDATE}"
+PV = "2.0.7+svnr${SRCREV}"
+PR = "r1"
-SRC_URI = "svn://svn.gnome.org/svn/${PN}/;module=trunk \
- file://buildfix.patch;patch=1"
+SRC_URI = "svn://svn.gnome.org/svn/${PN}/;module=trunk;proto=http \
+ file://buildfix.patch;patch=1 \
+ file://configure_fix.patch;patch=1 \
+ file://pkgconfig_fix.patch;patch=1 "
S = "${WORKDIR}/trunk"
@@ -14,8 +17,4 @@ EXTRA_OECONF = "--disable-pthreads"
FILES_${PN}-dev += "${libdir}/gnet-2.0"
-inherit autotools pkgconfig
-
-do_stage() {
- autotools_stage_all
-}
+inherit autotools_stage pkgconfig
diff --git a/recipes/gnome-mplayer/gnome-mplayer.inc b/recipes/gnome-mplayer/gnome-mplayer.inc
new file mode 100644
index 0000000000..15808a11b4
--- /dev/null
+++ b/recipes/gnome-mplayer/gnome-mplayer.inc
@@ -0,0 +1,11 @@
+DESCRIPTION = "Simple MPlayer frontend with lite Gnome integration"
+AUTHOR = "Kevin DeKorte <kdekorte@gmail.com>"
+HOMEPAGE = "http://code.google.com/p/gnome-mplayer/"
+SECTION = "x11/multimedia"
+LICENSE = "GPL"
+DEPENDS = "gtk+ gconf dbus-glib"
+RDEPENDS = "mplayer"
+
+inherit autotools pkgconfig gconf
+
+SRC_URI = "http://gnome-mplayer.googlecode.com/files/${P}.tar.gz"
diff --git a/recipes/gnome-mplayer/gnome-mplayer_0.5.3.bb b/recipes/gnome-mplayer/gnome-mplayer_0.5.3.bb
index c01152cfb8..81031d0ba2 100644
--- a/recipes/gnome-mplayer/gnome-mplayer_0.5.3.bb
+++ b/recipes/gnome-mplayer/gnome-mplayer_0.5.3.bb
@@ -1,14 +1,3 @@
-DESCRIPTION = "Simple MPlayer frontend with lite Gnome integration"
-HOMEPAGE = "http://dekorte.homeip.net/download/gnome-mplayer/"
-LICENSE = "GPL"
-DEPENDS = "gtk+ gconf dbus-glib"
-RDEPENDS = "mplayer"
-PR = "r3"
+require gnome-mplayer.inc
-inherit autotools pkgconfig gconf
-
-SRC_URI = "http://dekorte.homeip.net/download/${PN}/${P}.tar.gz \
- file://ac-gthread.patch;patch=1 \
- file://1.patch;patch=1 \
- file://uchar-for-utf8-check.patch;patch=1 \
- file://non-utf8-id3-fallback.patch;patch=1"
+PR = "r5"
diff --git a/recipes/gnome-mplayer/gnome-mplayer_0.9.5.bb b/recipes/gnome-mplayer/gnome-mplayer_0.9.5.bb
new file mode 100644
index 0000000000..81031d0ba2
--- /dev/null
+++ b/recipes/gnome-mplayer/gnome-mplayer_0.9.5.bb
@@ -0,0 +1,3 @@
+require gnome-mplayer.inc
+
+PR = "r5"
diff --git a/recipes/gnome-mplayer/gnome-mplayer_cvs.bb b/recipes/gnome-mplayer/gnome-mplayer_cvs.bb
deleted file mode 100644
index 5b0cb41707..0000000000
--- a/recipes/gnome-mplayer/gnome-mplayer_cvs.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-DESCRIPTION = "Simple MPlayer frontend with lite Gnome integration"
-HOMEPAGE = "http://dekorte.homeip.net/download/gnome-mplayer/"
-LICENSE = "GPL"
-DEPENDS = "gtk+ gconf dbus-glib"
-RDEPENDS = "mplayer"
-SRCDATE = "20080101"
-PV = "0.5.3+cvs${SRCDATE}"
-PR = "r5"
-
-inherit autotools pkgconfig gconf
-
-S = "${WORKDIR}/${PN}"
-
-SRC_URI = "cvs://anonymous@dekorte.homeip.net/data/cvs;module=${PN} \
- file://ac-gthread.patch;patch=1 \
- file://1.patch;patch=1 \
- file://uchar-for-utf8-check.patch;patch=1 \
- file://non-utf8-id3-fallback.patch;patch=1"
-
-do_install_append() {
- sed -i "s/OnlyShowIn=GNOME;//" ${D}${datadir}/applications/gnome-mplayer.desktop
-}
-
diff --git a/recipes/gnome-mplayer/gnome-mplayer_svn.bb b/recipes/gnome-mplayer/gnome-mplayer_svn.bb
new file mode 100644
index 0000000000..fa270f674e
--- /dev/null
+++ b/recipes/gnome-mplayer/gnome-mplayer_svn.bb
@@ -0,0 +1,17 @@
+require gnome-mplayer.inc
+
+SRCDATE = "20080101"
+PV = "0.9.5+svn${SRCDATE}"
+PR = "r6"
+S = "${WORKDIR}/trunk"
+
+SRC_URI = "svn://gnome-mplayer.googlecode.com/svn/;module=trunk;proto=http \
+ file://ac-gthread.patch;patch=1 \
+ file://1.patch;patch=1 \
+ file://uchar-for-utf8-check.patch;patch=1 \
+ file://non-utf8-id3-fallback.patch;patch=1"
+
+do_install_append() {
+ sed -i "s/OnlyShowIn=GNOME;//" ${D}${datadir}/applications/gnome-mplayer.desktop
+}
+
diff --git a/recipes/gnome/files/gtk-doc.make b/recipes/gnome/files/gtk-doc.make
index c319e7ad7c..354ffb7c66 100644
--- a/recipes/gnome/files/gtk-doc.make
+++ b/recipes/gnome/files/gtk-doc.make
@@ -5,11 +5,11 @@
####################################
if GTK_DOC_USE_LIBTOOL
-GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
else
-GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
endif
# We set GPATH here; this gives us semantics for GNU make
@@ -25,7 +25,6 @@ EXTRA_DIST = \
$(content_files) \
$(HTML_IMAGES) \
$(DOC_MAIN_SGML_FILE) \
- $(DOC_MODULE).types \
$(DOC_MODULE)-sections.txt \
$(DOC_MODULE)-overrides.txt
@@ -39,17 +38,29 @@ SCANOBJ_FILES = \
$(DOC_MODULE).prerequisites \
$(DOC_MODULE).signals
-CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-scan.o $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
+REPORT_FILES = \
+ $(DOC_MODULE)-undocumented.txt \
+ $(DOC_MODULE)-undeclared.txt \
+ $(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
if ENABLE_GTK_DOC
all-local: html-build.stamp
+else
+all-local:
+endif
+
+docs: html-build.stamp
#### scan ####
-scan-build.stamp: $(HFILE_GLOB)
- @echo '*** Scanning header files ***'
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ @echo 'gtk-doc: Scanning header files'
@-chmod -R u+w $(srcdir)
- if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
+ cd $(srcdir) && \
+ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
else \
cd $(srcdir) ; \
@@ -57,31 +68,33 @@ scan-build.stamp: $(HFILE_GLOB)
test -f $$i || touch $$i ; \
done \
fi
- cd $(srcdir) && \
- gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
touch scan-build.stamp
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
@true
#### templates ####
tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
- @echo '*** Rebuilding template files ***'
+ @echo 'gtk-doc: Rebuilding template files'
@-chmod -R u+w $(srcdir)
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
+ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
touch tmpl-build.stamp
tmpl.stamp: tmpl-build.stamp
@true
+tmpl/*.sgml:
+ @true
+
+
#### xml ####
-sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
- @echo '*** Building XML ***'
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+ @echo 'gtk-doc: Building XML'
@-chmod -R u+w $(srcdir)
cd $(srcdir) && \
- gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml $(MKDB_OPTIONS)
+ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
touch sgml-build.stamp
sgml.stamp: sgml-build.stamp
@@ -90,38 +103,46 @@ sgml.stamp: sgml-build.stamp
#### html ####
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
- @echo '*** Building HTML ***'
+ @echo 'gtk-doc: Building HTML'
@-chmod -R u+w $(srcdir)
- rm -rf $(srcdir)/html
+ rm -rf $(srcdir)/html
mkdir $(srcdir)/html
cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
- @echo '-- Fixing Crossreferences'
+ @echo 'gtk-doc: Fixing cross-references'
cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
touch html-build.stamp
-endif
##############
clean-local:
rm -f *~ *.bak
+ rm -rf .libs
+
+distclean-local:
+ cd $(srcdir) && \
+ rm -rf xml $(REPORT_FILES) \
+ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
maintainer-clean-local: clean
- cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+ cd $(srcdir) && rm -rf xml html
install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
- (installfiles=`echo $(srcdir)/html/*`; \
+ -installfiles=`echo $(srcdir)/html/*`; \
if test "$$installfiles" = '$(srcdir)/html/*'; \
then echo '-- Nothing to install' ; \
else \
+ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
for i in $$installfiles; do \
echo '-- Installing '$$i ; \
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
done; \
echo '-- Installing $(srcdir)/html/index.sgml' ; \
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
- fi)
+ which gtkdoc-rebase >/dev/null && \
+ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
+ fi
+
uninstall-local:
rm -f $(DESTDIR)$(TARGET_DIR)/*
@@ -143,6 +164,10 @@ dist-hook: dist-check-gtkdoc dist-hook-local
mkdir $(distdir)/html
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-cp $(srcdir)/xml/*.xml $(distdir)/xml
- -cp $(srcdir)/html/* $(distdir)/html
+ cp $(srcdir)/html/* $(distdir)/html
+ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+ cd $(distdir) && rm -f $(DISTCLEANFILES)
+ -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
-.PHONY : dist-hook-local
+.PHONY : dist-hook-local docs
diff --git a/recipes/gnome/gnome-bluetooth_git.bb b/recipes/gnome/gnome-bluetooth_git.bb
new file mode 100644
index 0000000000..23c4ca92ac
--- /dev/null
+++ b/recipes/gnome/gnome-bluetooth_git.bb
@@ -0,0 +1,28 @@
+LICENSE = "GPL"
+SECTION = "x11/gnome"
+
+DEFAULT_PREFERENCE = "-1"
+
+inherit autotools gnome pkgconfig
+
+SRC_URI = "git://git.gnome.org/gnome-bluetooth;protocol=git \
+ file://gtk-doc.make \
+"
+
+S = "${WORKDIR}/git"
+
+SRCREV = "93fd8de2cc717b96ad719ab2fb5ed38b8a0fc707"
+PV = "2.27.5"
+PR = "r2"
+PR_append = "+gitr${SRCREV}"
+
+DEPENDS = "obexd gconf-dbus gtk+ dbus-glib libunique libnotify hal bluez4 gnome-keyring"
+RRECOMMENDS_${PN} += "obexd"
+RCONFLICTS_${PN} = "bluez-gnome"
+
+do_configure_prepend() {
+ cp ${WORKDIR}/gtk-doc.make ${S}/
+ sed -i -e s:docs::g ${S}/Makefile.am
+ echo "EXTRA_DIST = version.xml" > gnome-doc-utils.make
+}
+
diff --git a/recipes/gnome/gnome-vfs_2.22.0.bb b/recipes/gnome/gnome-vfs_2.22.0.bb
index 875aa76aaa..5cab09bb62 100644
--- a/recipes/gnome/gnome-vfs_2.22.0.bb
+++ b/recipes/gnome/gnome-vfs_2.22.0.bb
@@ -3,7 +3,7 @@ DEPENDS = "libxml2 gconf gnutls avahi dbus dbus-glib bzip2 gnome-mime-data zlib"
RRECOMMENDS = "gnome-vfs-plugin-file shared-mime-info"
# Some legacy packages will require gnome-mime-data to be installed, but use of
# it is deprecated.
-PR = "r0"
+PR = "r1"
inherit gnome
diff --git a/recipes/gnome/gnote_0.5.0.bb b/recipes/gnome/gnote_0.5.0.bb
new file mode 100644
index 0000000000..cc11022b7c
--- /dev/null
+++ b/recipes/gnome/gnote_0.5.0.bb
@@ -0,0 +1,8 @@
+DESCRIPTION = "Note taking application"
+LICENSE = "GPL"
+
+DEPENDS = "libpcre libgnomeui gconf-dbus gtkmm boost"
+
+inherit gnome
+
+FILES_${PN}-dbg += "${libdir}/gnote/*/*/.debug"
diff --git a/recipes/gnome/libgnomeprintui_2.18.3.bb b/recipes/gnome/libgnomeprintui_2.18.3.bb
index 7c6d289e3a..021b9ad068 100644
--- a/recipes/gnome/libgnomeprintui_2.18.3.bb
+++ b/recipes/gnome/libgnomeprintui_2.18.3.bb
@@ -1,6 +1,7 @@
LICENSE = "GPL"
SECTION = "x11/gnome/libs"
-DEPENDS = "libgnomeprint gtk+ libgnomecanvas gnome-icon-theme gnome-common"
+DEPENDS = "libgnomeprint gtk+ libgnomecanvas gnome-icon-theme"
+PR = "r1"
inherit gnome pkgconfig
diff --git a/recipes/gnome/libsoup-2.4_2.26.0.bb b/recipes/gnome/libsoup-2.4_2.26.2.bb
index 73824f9da7..ae503065c0 100644
--- a/recipes/gnome/libsoup-2.4_2.26.0.bb
+++ b/recipes/gnome/libsoup-2.4_2.26.2.bb
@@ -3,8 +3,6 @@ SECTION = "x11/gnome/libs"
LICENSE = "GPL"
DEPENDS = "libproxy glib-2.0 gnutls libxml2 sqlite3"
-PR = "r2"
-
inherit gnome
SRC_URI = "${GNOME_MIRROR}/libsoup/${@gnome_verdir("${PV}")}/libsoup-${PV}.tar.bz2"
diff --git a/recipes/gnome/zenity_2.26.0.bb b/recipes/gnome/zenity_2.26.0.bb
new file mode 100644
index 0000000000..0d8d208f16
--- /dev/null
+++ b/recipes/gnome/zenity_2.26.0.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "A tool to display dialogs from the command line and shell scripts."
+LICENSE = "GPL"
+
+DEPENDS = "gtk+ libglade glib-2.0 libnotify"
+
+inherit gnome
+
+do_configure_prepend() {
+ sed -i -e '/-I$(includedir)/d' src/Makefile.am
+}
+
diff --git a/recipes/gnumeric/gnumeric_1.8.2.bb b/recipes/gnumeric/gnumeric_1.8.2.bb
deleted file mode 100644
index 8d3b1b5fb7..0000000000
--- a/recipes/gnumeric/gnumeric_1.8.2.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-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 = "r1"
-
-PARALLEL_MAKE = ""
-
-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/1.8.2/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/recipes/gnumeric/gnumeric_1.8.3.bb b/recipes/gnumeric/gnumeric_1.8.4.bb
index 92cdc4c6c9..e375f278f2 100644
--- a/recipes/gnumeric/gnumeric_1.8.3.bb
+++ b/recipes/gnumeric/gnumeric_1.8.4.bb
@@ -1,7 +1,7 @@
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"
+DEPENDS = "gdk-pixbuf-csource-native libgsf gtk+ libxml2 goffice libglade libart-lgpl intltool-native libgnomecanvas libgnomeprint libgnomeprintui libbonoboui orbit2-native"
DESCRIPTION = "Gnumeric spreadsheet for GNOME"
PR = "r0"
diff --git a/recipes/gnuradio/gnuradio-3.1.2/gcc43.patch b/recipes/gnuradio/gnuradio-3.1.2/gcc43.patch
deleted file mode 100644
index e9e3aa4a80..0000000000
--- a/recipes/gnuradio/gnuradio-3.1.2/gcc43.patch
+++ /dev/null
@@ -1,900 +0,0 @@
-Index: gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc (revision 8292)
-@@ -39,4 +39,5 @@
-
- #include <iostream>
-+#include <string.h>
-
- gr_fft_filter_ccc_sptr gr_make_fft_filter_ccc (int decimation, const std::vector<gr_complex> &taps)
-Index: gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc (revision 8292)
-@@ -34,4 +34,5 @@
-
- #include <iostream>
-+#include <string.h>
-
- gr_fft_filter_fff_sptr gr_make_fft_filter_fff (int decimation, const std::vector<float> &taps)
-Index: gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.cc (revision 6574)
-+++ gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.cc (revision 8292)
-@@ -48,4 +48,5 @@
- #include <random.h>
- #include <malloc16.h>
-+#include <string.h>
-
- using std::vector;
-Index: gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.cc (revision 6574)
-+++ gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.cc (revision 8292)
-@@ -48,4 +48,5 @@
- #include <random.h>
- #include <malloc16.h>
-+#include <string.h>
-
- using std::vector;
-Index: gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.cc (revision 6574)
-+++ gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.cc (revision 8292)
-@@ -47,4 +47,5 @@
- #include <cppunit/TestAssert.h>
- #include <random.h>
-+#include <string.h>
-
- using std::vector;
-Index: gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_fff.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_fff.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/filter/qa_gr_fir_fff.cc (revision 8292)
-@@ -33,4 +33,5 @@
- #include <cppunit/TestAssert.h>
- #include <random.h>
-+#include <string.h>
-
- using std::vector;
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.cc (revision 8292)
-@@ -29,4 +29,5 @@
- #include <assert.h>
- #include <stdexcept>
-+#include <string.h>
-
- //define ALIGN_ADVANCED_IMPLEMENTATION to have an alternative implementation of the align algoritm which exactly follows the align_interval spec.
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_bin_statistics_f.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_bin_statistics_f.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_bin_statistics_f.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_bin_statistics_f.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_bin_statistics_f_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_circular_file.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_circular_file.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_circular_file.cc (revision 8292)
-@@ -40,4 +40,6 @@
-
- #include <algorithm>
-+#include <stdio.h>
-+#include <string.h>
-
- static const int HEADER_SIZE = 4096;
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_delay.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_delay.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_delay.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_delay.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_delay_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.cc (revision 8292)
-@@ -29,4 +29,5 @@
- #include <string.h>
- #include <stdexcept>
-+#include <string.h>
-
- static const int PAD_VAL = 0xAA;
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_fft_vcc.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_fft_vcc.cc (revision 8244)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_fft_vcc.cc (revision 8292)
-@@ -30,4 +30,5 @@
- #include <gri_fft.h>
- #include <math.h>
-+#include <string.h>
-
- gr_fft_vcc_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_fft_vfc.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_fft_vfc.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_fft_vfc.cc (revision 8292)
-@@ -30,4 +30,5 @@
- #include <math.h>
- #include <stdexcept>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_framer_sink_1.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_framer_sink_1.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_framer_sink_1.cc (revision 8292)
-@@ -29,4 +29,5 @@
- #include <cstdio>
- #include <stdexcept>
-+#include <string.h>
-
- #define VERBOSE 0
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_head.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_head.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_head.cc (revision 8292)
-@@ -26,4 +26,5 @@
- #include <gr_head.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_head::gr_head (size_t sizeof_stream_item, int nitems)
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_keep_one_in_n.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_keep_one_in_n.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_keep_one_in_n.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_keep_one_in_n.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_keep_one_in_n_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_log2_const.h
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_log2_const.h (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_log2_const.h (revision 8292)
-@@ -32,15 +32,15 @@
- template<unsigned int k> static inline int gr_log2_const() { assert(0); return 0; }
-
--template<> static inline int gr_log2_const<1>() { return 0; }
--template<> static inline int gr_log2_const<2>() { return 1; }
--template<> static inline int gr_log2_const<4>() { return 2; }
--template<> static inline int gr_log2_const<8>() { return 3; }
--template<> static inline int gr_log2_const<16>() { return 4; }
--template<> static inline int gr_log2_const<32>() { return 5; }
--template<> static inline int gr_log2_const<64>() { return 6; }
--template<> static inline int gr_log2_const<128>() { return 7; }
--template<> static inline int gr_log2_const<256>() { return 8; }
--template<> static inline int gr_log2_const<512>() { return 9; }
--template<> static inline int gr_log2_const<1024>(){ return 10; }
-+template<> inline int gr_log2_const<1>() { return 0; }
-+template<> inline int gr_log2_const<2>() { return 1; }
-+template<> inline int gr_log2_const<4>() { return 2; }
-+template<> inline int gr_log2_const<8>() { return 3; }
-+template<> inline int gr_log2_const<16>() { return 4; }
-+template<> inline int gr_log2_const<32>() { return 5; }
-+template<> inline int gr_log2_const<64>() { return 6; }
-+template<> inline int gr_log2_const<128>() { return 7; }
-+template<> inline int gr_log2_const<256>() { return 8; }
-+template<> inline int gr_log2_const<512>() { return 9; }
-+template<> inline int gr_log2_const<1024>(){ return 10; }
-
- #endif /* INCLUDED_GR_LOG2_CONST_H */
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_null_source.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_null_source.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_null_source.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_null_source.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_null_source::gr_null_source (size_t sizeof_stream_item)
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_packet_sink.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_packet_sink.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_packet_sink.cc (revision 8292)
-@@ -34,4 +34,5 @@
- #include <stdexcept>
- #include <gr_count_bits.h>
-+#include <string.h>
-
- #define VERBOSE 0
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_peak_detector2_fb.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_peak_detector2_fb.cc (revision 7324)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_peak_detector2_fb.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_peak_detector2_fb.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_peak_detector2_fb_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_simple_correlator.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_simple_correlator.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_simple_correlator.cc (revision 8292)
-@@ -31,4 +31,5 @@
- #include <stdexcept>
- #include <gr_count_bits.h>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_simple_framer.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_simple_framer.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_simple_framer.cc (revision 8292)
-@@ -30,4 +30,5 @@
- #include <assert.h>
- #include <stdexcept>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_skiphead.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_skiphead.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_skiphead.cc (revision 8292)
-@@ -26,4 +26,5 @@
- #include <gr_skiphead.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_skiphead::gr_skiphead (size_t itemsize, size_t nitems_to_skip)
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_stream_mux.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_stream_mux.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_stream_mux.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_stream_mux.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- #define VERBOSE 0
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_stream_to_streams.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_stream_to_streams.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_stream_to_streams.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_stream_to_streams.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_stream_to_streams_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_stream_to_vector.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_stream_to_vector.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_stream_to_vector.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_stream_to_vector.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_stream_to_vector_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_streams_to_stream.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_streams_to_stream.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_streams_to_stream.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_streams_to_stream.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_streams_to_stream_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_streams_to_vector.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_streams_to_vector.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_streams_to_vector.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_streams_to_vector.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_streams_to_vector_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_test.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_test.cc (revision 7847)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_test.cc (revision 8292)
-@@ -29,4 +29,5 @@
- #include <stdexcept>
- #include <iostream>
-+#include <string.h>
-
- gr_test_sptr gr_make_test (const std::string &name,
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_throttle.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_throttle.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_throttle.cc (revision 8292)
-@@ -30,4 +30,5 @@
- #include <stdio.h>
- #include <math.h>
-+#include <string.h>
- #ifdef HAVE_TIME_H
- #include <time.h>
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_vector_to_stream.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_vector_to_stream.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_vector_to_stream.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_vector_to_stream.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_vector_to_stream_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/gr_vector_to_streams.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/general/gr_vector_to_streams.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_vector_to_streams.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_vector_to_streams.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- gr_vector_to_streams_sptr
-Index: gnuradio/trunk/gnuradio-core/src/lib/general/malloc16.c
-===================================================================
---- import/gnuradio-savannah-20060726/trunk/gnuradio-core/src/lib/general/malloc16.c (revision 1313)
-+++ gnuradio/trunk/gnuradio-core/src/lib/general/malloc16.c (revision 8292)
-@@ -8,4 +8,5 @@
- #include "malloc16.h"
- #include <string.h>
-+#include <strings.h>
-
- void *malloc16Align(int size){
-Index: gnuradio/trunk/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.cc.t
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.cc.t (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.cc.t (revision 8292)
-@@ -31,4 +31,5 @@
- #include <assert.h>
- #include <iostream>
-+#include <string.h>
-
- @SPTR_NAME@
-Index: gnuradio/trunk/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t (revision 7587)
-+++ gnuradio/trunk/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t (revision 8292)
-@@ -29,4 +29,5 @@
- #include <@NAME@.h>
- #include <gr_io_signature.h>
-+#include <string.h>
-
- @SPTR_NAME@
-Index: gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc (revision 8292)
-@@ -33,4 +33,5 @@
- #include <fcntl.h>
- #include <stdexcept>
-+#include <stdio.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc (revision 8292)
-@@ -33,4 +33,6 @@
- #include <fcntl.h>
- #include <stdexcept>
-+#include <stdio.h>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_sink_base.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_sink_base.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_sink_base.cc (revision 8292)
-@@ -31,4 +31,5 @@
- #include <fcntl.h>
- #include <stdexcept>
-+#include <stdio.h>
-
- // win32 (mingw/msvc) specific
-Index: gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_source.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_source.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/io/gr_file_source.cc (revision 8292)
-@@ -32,4 +32,5 @@
- #include <fcntl.h>
- #include <stdexcept>
-+#include <stdio.h>
-
- // win32 (mingw/msvc) specific
-Index: gnuradio/trunk/gnuradio-core/src/lib/io/gr_message_sink.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/io/gr_message_sink.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/io/gr_message_sink.cc (revision 8292)
-@@ -33,4 +33,5 @@
- #include <fcntl.h>
- #include <stdexcept>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/io/gr_message_source.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/io/gr_message_source.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/io/gr_message_source.cc (revision 8292)
-@@ -33,4 +33,5 @@
- #include <fcntl.h>
- #include <stdexcept>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/io/gr_udp_sink.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/io/gr_udp_sink.cc (revision 8097)
-+++ gnuradio/trunk/gnuradio-core/src/lib/io/gr_udp_sink.cc (revision 8292)
-@@ -29,4 +29,5 @@
- #if defined(HAVE_SOCKET)
- #include <netdb.h>
-+#include <stdio.h>
- typedef void* optval_t;
- #else
-Index: gnuradio/trunk/gnuradio-core/src/lib/io/gr_udp_source.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/io/gr_udp_source.cc (revision 8097)
-+++ gnuradio/trunk/gnuradio-core/src/lib/io/gr_udp_source.cc (revision 8292)
-@@ -28,4 +28,6 @@
- #include <stdexcept>
- #include <errno.h>
-+#include <stdio.h>
-+#include <string.h>
- #if defined(HAVE_SOCKET)
- #include <netdb.h>
-Index: gnuradio/trunk/gnuradio-core/src/lib/io/gri_logger.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/io/gri_logger.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/io/gri_logger.cc (revision 8292)
-@@ -30,4 +30,5 @@
- #include <stdexcept>
- #include <boost/weak_ptr.hpp>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/reed-solomon/decode_rs.c
-===================================================================
---- import/gnuradio-savannah-20060726/trunk/gnuradio-core/src/lib/reed-solomon/decode_rs.c (revision 605)
-+++ gnuradio/trunk/gnuradio-core/src/lib/reed-solomon/decode_rs.c (revision 8292)
-@@ -9,4 +9,5 @@
-
- #include <string.h>
-+#include <strings.h>
-
- #define NULL ((void *)0)
-Index: gnuradio/trunk/gnuradio-core/src/lib/reed-solomon/encode_rs.c
-===================================================================
---- import/gnuradio-savannah-20060726/trunk/gnuradio-core/src/lib/reed-solomon/encode_rs.c (revision 605)
-+++ gnuradio/trunk/gnuradio-core/src/lib/reed-solomon/encode_rs.c (revision 8292)
-@@ -4,4 +4,5 @@
- */
- #include <string.h>
-+#include <strings.h>
-
- #ifdef FIXED
-Index: gnuradio/trunk/gnuradio-core/src/lib/reed-solomon/exercise.c
-===================================================================
---- import/gnuradio-savannah-20060726/trunk/gnuradio-core/src/lib/reed-solomon/exercise.c (revision 605)
-+++ gnuradio/trunk/gnuradio-core/src/lib/reed-solomon/exercise.c (revision 8292)
-@@ -14,4 +14,5 @@
- #include <stdlib.h>
- #include <string.h>
-+#include <strings.h>
-
- #ifdef FIXED
-Index: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_dispatcher.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_dispatcher.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_dispatcher.cc (revision 8292)
-@@ -28,4 +28,5 @@
- #include <math.h>
- #include <errno.h>
-+#include <stdio.h>
-
- #ifdef HAVE_SELECT
-Index: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_error_handler.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_error_handler.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_error_handler.cc (revision 8292)
-@@ -49,4 +49,5 @@
- #include <stdexcept>
- #include <unistd.h>
-+#include <stdio.h>
-
- #ifdef HAVE_IO_H
-Index: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_local_sighandler.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_local_sighandler.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_local_sighandler.cc (revision 8292)
-@@ -28,4 +28,5 @@
- #include <stdexcept>
- #include <stdio.h>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_message.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_message.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_message.cc (revision 8292)
-@@ -26,4 +26,5 @@
- #include <gr_message.h>
- #include <assert.h>
-+#include <string.h>
-
- static long s_ncurrently_allocated = 0;
-Index: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_preferences.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_preferences.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_preferences.cc (revision 8292)
-@@ -32,4 +32,5 @@
- #include <sys/stat.h>
- #include <unistd.h>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_realtime.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_realtime.cc (revision 6427)
-+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_realtime.cc (revision 8292)
-@@ -62,4 +62,5 @@
-
- #include <pthread.h>
-+#include <stdio.h>
-
- gr_rt_status_t
-Index: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_scheduler_thread.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_scheduler_thread.cc (revision 6201)
-+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_scheduler_thread.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <gr_scheduler_thread.h>
- #include <iostream>
-+#include <stdio.h>
-
- #ifdef HAVE_SIGNAL_H
-Index: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc (revision 8292)
-@@ -29,4 +29,5 @@
- #include <gr_preferences.h>
- #include <stdio.h>
-+#include <string.h>
- #include <gr_local_sighandler.h>
-
-Index: gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.cc (revision 8292)
-@@ -41,5 +41,4 @@
- #include <gr_pagesize.h>
- #include <gr_tmp_path.h>
--
-
- gr_vmcircbuf_mmap_tmpfile::gr_vmcircbuf_mmap_tmpfile (int size)
-Index: gnuradio/trunk/gnuradio-core/src/tests/benchmark_nco.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/tests/benchmark_nco.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/tests/benchmark_nco.cc (revision 8292)
-@@ -31,4 +31,5 @@
- #include <gr_nco.h>
- #include <gr_fxpt_nco.h>
-+#include <string.h>
-
- #define ITERATIONS 20000000
-Index: gnuradio/trunk/gnuradio-core/src/tests/benchmark_vco.cc
-===================================================================
---- gnuradio/trunk/gnuradio-core/src/tests/benchmark_vco.cc (revision 6044)
-+++ gnuradio/trunk/gnuradio-core/src/tests/benchmark_vco.cc (revision 8292)
-@@ -31,4 +31,5 @@
- #include <gr_vco.h>
- #include <gr_fxpt_vco.h>
-+#include <string.h>
-
- #define ITERATIONS 5000000
-Index: gnuradio/trunk/gr-atsc/src/lib/atsc_bit_timing_loop.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/atsc_bit_timing_loop.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/atsc_bit_timing_loop.cc (revision 8292)
-@@ -28,4 +28,5 @@
- #include <gr_io_signature.h>
- #include <atsc_consts.h>
-+#include <string.h>
-
- // Input rate changed from 20MHz to 19.2 to support usrp at 3 * 6.4MHz
-Index: gnuradio/trunk/gr-atsc/src/lib/atsci_reed_solomon.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/atsci_reed_solomon.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/atsci_reed_solomon.cc (revision 8292)
-@@ -23,4 +23,5 @@
- #include <atsci_reed_solomon.h>
- #include <assert.h>
-+#include <string.h>
-
- extern "C" {
-Index: gnuradio/trunk/gr-atsc/src/lib/atsci_sliding_correlator.h
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/atsci_sliding_correlator.h (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/atsci_sliding_correlator.h (revision 8292)
-@@ -20,8 +20,9 @@
- * Boston, MA 02110-1301, USA.
- */
-+#include <string>
-+#include <string.h>
-+
- #ifndef _ATSC_SLIDING_CORRELATOR_H_
- #define _ATSC_SLIDING_CORRELATOR_H_
--
--#include <string>
-
- extern const unsigned char atsc_pn511[511];
-Index: gnuradio/trunk/gr-atsc/src/lib/atsci_sssr.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/atsci_sssr.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/atsci_sssr.cc (revision 8292)
-@@ -28,4 +28,5 @@
- #include <atsci_diag_output.h>
- #include <gr_math.h>
-+#include <stdio.h>
-
- /*
-Index: gnuradio/trunk/gr-atsc/src/lib/atsci_trellis_encoder.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/atsci_trellis_encoder.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/atsci_trellis_encoder.cc (revision 8292)
-@@ -24,4 +24,5 @@
- #include <assert.h>
- #include <stdio.h>
-+#include <string.h>
-
- static const int DIBITS_PER_BYTE = 4;
-Index: gnuradio/trunk/gr-atsc/src/lib/atsci_viterbi_decoder.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/atsci_viterbi_decoder.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/atsci_viterbi_decoder.cc (revision 8292)
-@@ -26,4 +26,5 @@
- #include <cmath>
- #include "atsci_viterbi_mux.cc"
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gr-atsc/src/lib/interleaver_fifo.h
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/interleaver_fifo.h (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/interleaver_fifo.h (revision 8292)
-@@ -27,4 +27,5 @@
- #include <interleaver_fifo.h>
- #include <string.h>
-+#include <strings.h>
-
- /*!
-Index: gnuradio/trunk/gr-atsc/src/lib/qa_atsci_data_interleaver.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/qa_atsci_data_interleaver.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/qa_atsci_data_interleaver.cc (revision 8292)
-@@ -23,4 +23,5 @@
- #include <cppunit/TestAssert.h>
- #include <qa_atsci_data_interleaver.h>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gr-atsc/src/lib/qa_atsci_equalizer_nop.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/qa_atsci_equalizer_nop.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/qa_atsci_equalizer_nop.cc (revision 8292)
-@@ -29,4 +29,5 @@
- #include <assert.h>
- #include <iostream>
-+#include <string.h>
-
- using std::cerr;
-Index: gnuradio/trunk/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.cc (revision 8292)
-@@ -30,4 +30,5 @@
- #include <qa_atsci_fake_single_viterbi.h>
- #include <random.h>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gr-atsc/src/lib/qa_atsci_randomizer.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/qa_atsci_randomizer.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/qa_atsci_randomizer.cc (revision 8292)
-@@ -24,4 +24,5 @@
-
- #include <cppunit/TestAssert.h>
-+#include <string.h>
-
- static unsigned int expected_initial_states[] = {
-Index: gnuradio/trunk/gr-atsc/src/lib/qa_atsci_reed_solomon.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/qa_atsci_reed_solomon.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/qa_atsci_reed_solomon.cc (revision 8292)
-@@ -30,4 +30,5 @@
- #include <atsci_reed_solomon.h>
- #include <qa_atsci_reed_solomon.h>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gr-atsc/src/lib/qa_atsci_single_viterbi.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/qa_atsci_single_viterbi.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/qa_atsci_single_viterbi.cc (revision 8292)
-@@ -31,4 +31,5 @@
- #include <qa_atsci_single_viterbi.h>
- #include <random.h>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gr-atsc/src/lib/qa_atsci_trellis_encoder.cc
-===================================================================
---- gnuradio/trunk/gr-atsc/src/lib/qa_atsci_trellis_encoder.cc (revision 6044)
-+++ gnuradio/trunk/gr-atsc/src/lib/qa_atsci_trellis_encoder.cc (revision 8292)
-@@ -31,4 +31,5 @@
- #include <stdlib.h>
- #include <time.h>
-+#include <string.h>
-
- #define NELEM(x) (sizeof (x) / sizeof (x[0]))
-Index: gnuradio/trunk/gr-audio-portaudio/src/audio_portaudio_sink.cc
-===================================================================
---- gnuradio/trunk/gr-audio-portaudio/src/audio_portaudio_sink.cc (revision 6044)
-+++ gnuradio/trunk/gr-audio-portaudio/src/audio_portaudio_sink.cc (revision 8292)
-@@ -34,4 +34,5 @@
- #include <gri_portaudio.h>
- #include <omnithread.h>
-+#include <string.h>
-
- #define LOGGING 0 // define to 0 or 1
-Index: gnuradio/trunk/gr-audio-portaudio/src/audio_portaudio_source.cc
-===================================================================
---- gnuradio/trunk/gr-audio-portaudio/src/audio_portaudio_source.cc (revision 6044)
-+++ gnuradio/trunk/gr-audio-portaudio/src/audio_portaudio_source.cc (revision 8292)
-@@ -34,4 +34,5 @@
- #include <gri_portaudio.h>
- #include <omnithread.h>
-+#include <string.h>
-
- #define LOGGING 0 // define to 0 or 1
-Index: gnuradio/trunk/gr-gsm-fr-vocoder/src/lib/gsm/code.c
-===================================================================
---- import/gnuradio-savannah-20060726/trunk/gr-gsm-fr-vocoder/src/lib/gsm/code.c (revision 968)
-+++ gnuradio/trunk/gr-gsm-fr-vocoder/src/lib/gsm/code.c (revision 8292)
-@@ -20,4 +20,5 @@
- #include "gsm.h"
- #include "proto.h"
-+#include <string.h>
-
- /*
-Index: gnuradio/trunk/gr-gsm-fr-vocoder/src/lib/gsm/gsm_create.c
-===================================================================
---- import/gnuradio-savannah-20060726/trunk/gr-gsm-fr-vocoder/src/lib/gsm/gsm_create.c (revision 968)
-+++ gnuradio/trunk/gr-gsm-fr-vocoder/src/lib/gsm/gsm_create.c (revision 8292)
-@@ -31,4 +31,5 @@
- #include "private.h"
- #include "proto.h"
-+#include <strings.h>
-
- gsm gsm_create P0()
-Index: gnuradio/trunk/gr-trellis/src/lib/fsm.cc
-===================================================================
---- gnuradio/trunk/gr-trellis/src/lib/fsm.cc (revision 6044)
-+++ gnuradio/trunk/gr-trellis/src/lib/fsm.cc (revision 8292)
-@@ -27,4 +27,5 @@
- #include <stdexcept>
- #include <cmath>
-+#include <stdlib.h>
- #include "base.h"
- #include "fsm.h"
-Index: gnuradio/trunk/gr-trellis/src/lib/fsm.h
-===================================================================
---- gnuradio/trunk/gr-trellis/src/lib/fsm.h (revision 6044)
-+++ gnuradio/trunk/gr-trellis/src/lib/fsm.h (revision 8292)
-@@ -25,4 +25,5 @@
-
- #include <vector>
-+#include <iosfwd>
-
- /*!
-Index: gnuradio/trunk/gr-trellis/src/lib/trellis_permutation.cc
-===================================================================
---- gnuradio/trunk/gr-trellis/src/lib/trellis_permutation.cc (revision 6044)
-+++ gnuradio/trunk/gr-trellis/src/lib/trellis_permutation.cc (revision 8292)
-@@ -28,4 +28,5 @@
- #include <gr_io_signature.h>
- #include <iostream>
-+#include <string.h>
-
- trellis_permutation_sptr
-Index: gnuradio/trunk/gr-video-sdl/src/video_sdl_sink_s.cc
-===================================================================
---- gnuradio/trunk/gr-video-sdl/src/video_sdl_sink_s.cc (revision 6044)
-+++ gnuradio/trunk/gr-video-sdl/src/video_sdl_sink_s.cc (revision 8292)
-@@ -36,4 +36,5 @@
- #include <iostream>
- #include <stdexcept>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/gr-video-sdl/src/video_sdl_sink_uc.cc
-===================================================================
---- gnuradio/trunk/gr-video-sdl/src/video_sdl_sink_uc.cc (revision 6044)
-+++ gnuradio/trunk/gr-video-sdl/src/video_sdl_sink_uc.cc (revision 8292)
-@@ -36,4 +36,5 @@
- #include <iostream>
- #include <stdexcept>
-+#include <string.h>
-
-
-Index: gnuradio/trunk/usrp/host/apps/usrper.cc
-===================================================================
---- gnuradio/trunk/usrp/host/apps/usrper.cc (revision 6044)
-+++ gnuradio/trunk/usrp/host/apps/usrper.cc (revision 8292)
-@@ -31,4 +31,5 @@
- #include "usrp_prims.h"
- #include "usrp_spi_defs.h"
-+#include <string.h>
-
- char *prog_name;
-Index: gnuradio/trunk/usrp/host/lib/legacy/fusb_win32.cc
-===================================================================
---- gnuradio/trunk/usrp/host/lib/legacy/fusb_win32.cc (revision 6044)
-+++ gnuradio/trunk/usrp/host/lib/legacy/fusb_win32.cc (revision 8292)
-@@ -29,4 +29,5 @@
- #include <assert.h>
- #include <stdexcept>
-+#include <string.h>
-
- static const int MAX_BLOCK_SIZE = fusb_sysconfig::max_block_size();
-Index: gnuradio/trunk/usrp/host/lib/legacy/usrp_basic.cc
-===================================================================
---- gnuradio/trunk/usrp/host/lib/legacy/usrp_basic.cc (revision 6044)
-+++ gnuradio/trunk/usrp/host/lib/legacy/usrp_basic.cc (revision 8292)
-@@ -35,4 +35,5 @@
- #include <math.h>
- #include <ad9862.h>
-+#include <string.h>
-
- using namespace ad9862;
-Index: gnuradio/trunk/usrp/host/lib/legacy/usrp_local_sighandler.cc
-===================================================================
---- gnuradio/trunk/usrp/host/lib/legacy/usrp_local_sighandler.cc (revision 6044)
-+++ gnuradio/trunk/usrp/host/lib/legacy/usrp_local_sighandler.cc (revision 8292)
-@@ -33,4 +33,5 @@
- #include <stdexcept>
- #include <stdio.h>
-+#include <string.h>
-
- usrp_local_sighandler::usrp_local_sighandler (int signum,
-Index: gnuradio/trunk/usrp/host/lib/legacy/usrp_prims.cc
-===================================================================
---- gnuradio/trunk/usrp/host/lib/legacy/usrp_prims.cc (revision 6044)
-+++ gnuradio/trunk/usrp/host/lib/legacy/usrp_prims.cc (revision 8292)
-@@ -63,4 +63,5 @@
-
- #include "std_paths.h"
-+#include <stdio.h>
-
- static char *
-Index: gnuradio/trunk/usrp/host/misc/getopt.c
-===================================================================
---- gnuradio/trunk/usrp/host/misc/getopt.c (revision 6044)
-+++ gnuradio/trunk/usrp/host/misc/getopt.c (revision 8292)
-@@ -53,4 +53,5 @@
-
- #include <stdio.h>
-+#include <string.h>
-
- /* Comment out all this code if we are using the GNU C Library, and are not
diff --git a/recipes/gnuradio/gnuradio-3.1.2/no-trellis-doc.patch b/recipes/gnuradio/gnuradio-3.1.2/no-trellis-doc.patch
deleted file mode 100644
index a5c1b90bd2..0000000000
--- a/recipes/gnuradio/gnuradio-3.1.2/no-trellis-doc.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- /tmp/Makefile.am 2008-04-01 10:50:58.848945668 +0200
-+++ gnuradio-3.1.2/usrp/Makefile.am 2008-04-01 10:51:06.095612812 +0200
-@@ -24,7 +24,7 @@
- usrp.iss.in \
- usrp.inf
-
--SUBDIRS = host firmware fpga doc
-+SUBDIRS = host firmware fpga
-
- pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = \
---- /tmp/Makefile.am 2008-04-01 10:52:10.615605452 +0200
-+++ gnuradio-3.1.2/gr-trellis/Makefile.am 2008-04-01 10:52:19.807923018 +0200
-@@ -21,5 +21,5 @@
-
- include $(top_srcdir)/Makefile.common
-
--SUBDIRS = src doc
-+SUBDIRS = src
-
diff --git a/recipes/gnuradio/gnuradio.inc b/recipes/gnuradio/gnuradio.inc
index 88462404d1..80536e7f86 100644
--- a/recipes/gnuradio/gnuradio.inc
+++ b/recipes/gnuradio/gnuradio.inc
@@ -1,8 +1,9 @@
DESCRIPTION = "GNU Radio"
SECTION = "apps"
PRIORITY = "optional"
-LICENSE = "GPL"
-DEPENDS = "guile-native fftwf python virtual/libsdl alsa-lib jack boost cppunit sdcc-native swig-native python-numpy"
+LICENSE = "GPLv3"
+DEPENDS = "libusb guile-native fftwf python virtual/libsdl alsa-lib jack boost cppunit sdcc-native swig-native python-numpy"
+INC_PR = "r7"
inherit distutils-base autotools autotools_stage pkgconfig
@@ -12,6 +13,7 @@ export HOST_SYS=${MULTIMACH_TARGET_SYS}
CXXFLAGS_powerpc += "-lstdc++"
EXTRA_OECONF = " \
+ --program-prefix= \
${GR_CPU_SELECTION} \
--disable-gr-atsc \
--enable-gr-video-sdl \
@@ -26,6 +28,27 @@ EXTRA_OECONF = " \
GR_CPU_SELECTION_armv7a = " --with-md-cpu=arm "
+# This is an awful hack to allow GNU Radio to use libusb-0.12, regardless
+# of what is used by the rest of OE
+
+export USB_CFLAGS=""
+export USB_LIBS="-L${WORKDIR}/libusb-0.1.12/.libs/ -l:libusb-gnur.a"
+
+do_buildlibusb() {
+ cd ${WORKDIR}/libusb-0.1.12
+ sed -e 's/AC_LANG_CPLUSPLUS/AC_PROG_CXX/' -i configure.in
+ sed -e s:tests::g -i Makefile.am
+ sed -e s:tests::g -i Makefile.in || true
+ ./configure --build=${BUILD_SYS} --host=${HOST_SYS} --target=${TARGET_SYS} --prefix=${prefix} --exec_prefix=${exec_prefix} --bindir=${bindir} --sbindir=${sbindir} --libexecdir=${libexecdir} --datadir=${datadir} --sysconfdir=${sysconfdir} --sharedstatedir=${sharedstatedir} --localstatedir=${localstatedir} --libdir=${libdir} --includedir=${includedir} --oldincludedir=${oldincludedir} --infodir=${infodir} --mandir=${mandir} --disable-shared --disable-build-docs
+ make
+ mv .libs/libusb.a .libs/libusb-gnur.a || true
+ cd ${WORKDIR}
+}
+
+addtask buildlibusb before do_configure after do_unpack
+
+do_buildlibusb[deptask] = "do_populate_staging"
+
do_configure_prepend() {
if [ -e ${WORKDIR}/acinclude.m4 ] ; then
cp ${WORKDIR}/acinclude.m4 ${S}
@@ -36,6 +59,11 @@ do_configure_append() {
find ${S} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g
}
+do_stage() {
+ autotools_stage_all
+ sed -i s,-l:libusb-gnur.a,,g ${STAGING_LIBDIR}/libusrp.la
+}
+
RDEPENDS_${PN} = "python-core python-audio python-threading python-codecs python-lang python-textutils \
python-shell python-pickle python-compiler python-pkgutil python-pydoc python-mmap \
python-netclient python-unittest python-difflib python-pprint python-numpy \
@@ -73,9 +101,10 @@ FILES_libgromnithread = "${libdir}/libgromnithread.so*"
FILES_${PN} += "${libdir}/python*/site-packages/gnuradio/*"
FILES_${PN}-dbg += "${libdir}/python*/site-packages/gnuradio/.debug \
- ${libdir}/python*/site-packages/gnuradio/*/.debug \
+ ${libdir}/python*/site-packages/gnuradio/*/.debug \
"
-FILES_gnuradio-usrp = "${libdir}/python*/site-packages/usrpm/* \
+FILES_gnuradio-usrp = "${libdir}/python*/site-packages/usrp/* \
+ ${bindir}/usrp* \
${datadir}/usrp/*/*"
-FILES_gnuradio-usrp-dbg = "${libdir}/python*/site-packages/usrpm/.debug"
+FILES_gnuradio-usrp-dbg = "${libdir}/python*/site-packages/usrp/.debug"
diff --git a/recipes/gnuradio/gnuradio_3.0.4.bb b/recipes/gnuradio/gnuradio_3.0.4.bb
deleted file mode 100644
index 8a3e25bedb..0000000000
--- a/recipes/gnuradio/gnuradio_3.0.4.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require gnuradio.inc
-
-PR = "r4"
-
-SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \
- file://no-trellis-doc.patch;patch=1 \
- "
-
diff --git a/recipes/gnuradio/gnuradio_3.1.2.bb b/recipes/gnuradio/gnuradio_3.1.2.bb
deleted file mode 100644
index 3a6b977288..0000000000
--- a/recipes/gnuradio/gnuradio_3.1.2.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require gnuradio.inc
-
-PR = "r7"
-
-SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \
- file://no-trellis-doc.patch;patch=1 \
- file://gcc43.patch;patch=1;pnum=2 \
- file://gnuradio-libusb.patch;patch=1 \
- "
-
diff --git a/recipes/gnuradio/gnuradio_3.1.3.bb b/recipes/gnuradio/gnuradio_3.1.3.bb
index 17089dd487..fbce7bdf74 100644
--- a/recipes/gnuradio/gnuradio_3.1.3.bb
+++ b/recipes/gnuradio/gnuradio_3.1.3.bb
@@ -1,8 +1,9 @@
require gnuradio.inc
-PR = "r3"
+PR = "${INC_PR}.1"
SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \
-# file://gnuradio-libusb.patch;patch=1 \
- file://acinclude.m4"
+ file://acinclude.m4 \
+ ${SOURCEFORGE_MIRROR}/libusb/libusb-0.1.12.tar.gz \
+"
diff --git a/recipes/gnuradio/gnuradio_3.2.0.bb b/recipes/gnuradio/gnuradio_3.2.0.bb
new file mode 100644
index 0000000000..8c3a77e20b
--- /dev/null
+++ b/recipes/gnuradio/gnuradio_3.2.0.bb
@@ -0,0 +1,22 @@
+require gnuradio.inc
+
+DEPENDS += " gsl "
+
+PR = "${INC_PR}.1"
+
+S = "${WORKDIR}/gnuradio-3.2"
+
+EXTRA_OECONF += "--with-boost=${STAGING_DIR_TARGET}/usr CXXFLAGS=-DBOOST_SP_USE_PTHREADS --disable--usrp2"
+
+SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.2.tar.gz \
+ file://no-usrp2.patch;patch=1 \
+ file://gnuradio-neon.patch;patch=1;pnum=0 \
+ ${SOURCEFORGE_MIRROR}/libusb/libusb-0.1.12.tar.gz \
+"
+
+do_compile_append() {
+ sed -i -e s:${STAGING_DIR_TARGET}::g \
+ -e s:/${TARGET_SYS}::g \
+ gnuradio-core/gnuradio-core.pc
+}
+
diff --git a/recipes/gnuradio/gnuradio_svn.bb b/recipes/gnuradio/gnuradio_svn.bb
index 56db9187c4..dc693b78de 100644
--- a/recipes/gnuradio/gnuradio_svn.bb
+++ b/recipes/gnuradio/gnuradio_svn.bb
@@ -4,15 +4,16 @@ DEFAULT_PREFERENCE = "-1"
DEPENDS += " gsl "
-PV = "3.1.3+svnr${SRCREV}"
-PR = "r6"
+PV = "3.2.0+svnr${SRCREV}"
+PR = "${INC_PR}.1"
-EXTRA_OECONF += "--with-boost=${STAGING_DIR_TARGET}/usr CXXFLAGS=-DBOOST_SP_USE_PTHREADS --disable-usrp1 --disable--usrp2"
+EXTRA_OECONF += "--with-boost=${STAGING_DIR_TARGET}/usr CXXFLAGS=-DBOOST_SP_USE_PTHREADS --disable--usrp2"
SRC_URI = "svn://gnuradio.org/svn/gnuradio/;module=trunk;proto=http \
file://no-usrp2.patch;patch=1 \
file://gnuradio-neon.patch;patch=1;pnum=0 \
- "
+ ${SOURCEFORGE_MIRROR}/libusb/libusb-0.1.12.tar.gz \
+"
S="${WORKDIR}/trunk"
diff --git a/recipes/gnutls/gnutls.inc b/recipes/gnutls/gnutls.inc
index e438423c9c..004161a9f6 100644
--- a/recipes/gnutls/gnutls.inc
+++ b/recipes/gnutls/gnutls.inc
@@ -1,6 +1,6 @@
DESCRIPTION = "GNU Transport Layer Security Library"
HOMEPAGE = "http://www.gnu.org/software/gnutls/"
-DEPENDS = "zlib libgcrypt lzo"
+DEPENDS = "zlib libgcrypt lzo guile-native"
LICENSE = "LGPL"
SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/gnutls-${PV}.tar.bz2"
diff --git a/recipes/gpe-dm/gpe-dm_0.52.bb b/recipes/gpe-dm/gpe-dm_0.52.bb
new file mode 100644
index 0000000000..6cf1f002a0
--- /dev/null
+++ b/recipes/gpe-dm/gpe-dm_0.52.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "GPE Display Manager"
+SECTION = "gpe"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "glib-2.0 xserver-common"
+RDEPENDS_${PN} += " xserver-common"
+
+GPE_TARBALL_SUFFIX ?= "bz2"
+
+inherit gpe autotools update-rc.d
+
+INITSCRIPT_NAME = "gpe-dm"
+INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
diff --git a/recipes/gpe-login/files/no-deprecated-sysfs.patch b/recipes/gpe-login/files/no-deprecated-sysfs.patch
new file mode 100644
index 0000000000..ed5a6b2362
--- /dev/null
+++ b/recipes/gpe-login/files/no-deprecated-sysfs.patch
@@ -0,0 +1,17 @@
+Do not depends on kernel with CONFIG_SYSFS_DEPRECATED*=y.
+With the new sysfs layout, /sys/class/backlight/* contains only symlinks.
+chown -R skips symlinks, keeping device accessible only for root.
+
+Index: gpe-login-0.95/X11/gpe-login.pre-session
+===================================================================
+--- gpe-login-0.95.orig/X11/gpe-login.pre-session 2008-08-06 21:23:40.000000000 +0000
++++ gpe-login-0.95/X11/gpe-login.pre-session 2009-05-28 13:28:37.000000000 +0000
+@@ -57,7 +57,7 @@
+ # screen light control #
+
+ if [ -d /sys/class/backlight ]; then
+-chown -R $USER /sys/class/backlight/*
++chown -R $USER /sys/class/backlight/*/*
+ chmod u+rw /sys/class/backlight/*/*
+ fi
+
diff --git a/recipes/gpe-login/gpe-login_0.95.bb b/recipes/gpe-login/gpe-login_0.95.bb
index 0b3f480e6e..f86c693522 100644
--- a/recipes/gpe-login/gpe-login_0.95.bb
+++ b/recipes/gpe-login/gpe-login_0.95.bb
@@ -3,9 +3,11 @@ SECTION = "gpe"
PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "gtk+ libgpewidget gpe-ownerinfo xkbd"
-RDEPENDS = "xkbd gpe-theme-clearlooks"
+RDEPENDS_${PN} = "xkbd"
+RRECOMMENDS_${PN} = "gpe-theme-clearlooks"
RPROVIDES_${PN} = "gpe-session-starter"
-PR = "r0"
+
+PR = "r2"
SRC_URI_OVERRIDES_PACKAGE_ARCH = "1"
@@ -17,6 +19,7 @@ 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 += " file://no-deprecated-sysfs.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"
diff --git a/recipes/gpe-session-scripts/gpe-session-scripts_0.67.bb b/recipes/gpe-session-scripts/gpe-session-scripts_0.67.bb
index bab26e7df0..979ed5aa8a 100644
--- a/recipes/gpe-session-scripts/gpe-session-scripts_0.67.bb
+++ b/recipes/gpe-session-scripts/gpe-session-scripts_0.67.bb
@@ -41,15 +41,15 @@ do_install_append() {
install -d ${D}${sysconfdir}/gpe/xsettings-default.d
install -m 0644 ${WORKDIR}/disable-composite.xsettings ${D}${sysconfdir}/gpe/xsettings-default.d/disable-composite
- mv ${D}/usr/bin/gpe-logout ${D}/usr/bin/gpe-logout.matchbox
+ mv ${D}${bindir}gpe-logout ${D}${bindir}gpe-logout.matchbox
}
pkg_postinst_${PN}() {
- update-alternatives --install /usr/bin/gpe-logout gpe-logout /usr/bin/gpe-logout.matchbox 10
+ update-alternatives --install ${bindir}gpe-logout gpe-logout ${bindir}gpe-logout.matchbox 10
}
pkg_postrm_${PN}() {
- update-alternatives --remove gpe-logout /usr/bin/gpe-logout.matchbox
+ update-alternatives --remove gpe-logout ${bindir}gpe-logout.matchbox
}
# This makes use of GUI_MACHINE_CLASS, so set PACKAGE_ARCH appropriately
diff --git a/recipes/gpe-session-scripts/gpe-session-scripts_0.68.bb b/recipes/gpe-session-scripts/gpe-session-scripts_0.68.bb
index 5daf39c836..38bc9298ed 100644
--- a/recipes/gpe-session-scripts/gpe-session-scripts_0.68.bb
+++ b/recipes/gpe-session-scripts/gpe-session-scripts_0.68.bb
@@ -41,15 +41,15 @@ do_install_append() {
install -d ${D}${sysconfdir}/gpe/xsettings-default.d
install -m 0644 ${WORKDIR}/disable-composite.xsettings ${D}${sysconfdir}/gpe/xsettings-default.d/disable-composite
- mv ${D}/usr/bin/gpe-logout.sh ${D}/usr/bin/gpe-logout.sh.matchbox
+ mv ${D}${bindir}/gpe-logout.sh ${D}${bindir}/gpe-logout.sh.matchbox
}
pkg_postinst_${PN}() {
- update-alternatives --install /usr/bin/gpe-logout.sh gpe-logout.sh /usr/bin/gpe-logout.sh.matchbox 10
+ update-alternatives --install ${bindir}/gpe-logout.sh gpe-logout.sh ${bindir}/gpe-logout.sh.matchbox 10
}
pkg_postrm_${PN}() {
- update-alternatives --remove gpe-logout.sh /usr/bin/gpe-logout.sh.matchbox
+ update-alternatives --remove gpe-logout.sh ${bindir}/gpe-logout.sh.matchbox
}
# This makes use of GUI_MACHINE_CLASS, so set PACKAGE_ARCH appropriately
diff --git a/recipes/gpephone/libidn_0.5.19.bb b/recipes/gpephone/libidn_0.5.19.bb
index 322790b8ab..779a605f3a 100644
--- a/recipes/gpephone/libidn_0.5.19.bb
+++ b/recipes/gpephone/libidn_0.5.19.bb
@@ -1,12 +1,12 @@
-LICENSE = "LGPL"
DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
SECTION = "libs"
-PRIORITY = "optional"
-PR = "r0"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+PR = "r0"
inherit pkgconfig autotools
-SRC_URI = "http://josefsson.org/libidn/releases/${P}.tar.gz"
+SRC_URI = "http://alpha.gnu.org/gnu/libidn/libidn-${PV}.tar.gz"
EXTRA_OECONF = " --disable-tld"
diff --git a/recipes/gphoto2/ptp-gadget/0001-Fix-musb_hdrc-EP_STATUS_NAME.patch b/recipes/gphoto2/ptp-gadget/0001-Fix-musb_hdrc-EP_STATUS_NAME.patch
new file mode 100644
index 0000000000..80ddf2c19c
--- /dev/null
+++ b/recipes/gphoto2/ptp-gadget/0001-Fix-musb_hdrc-EP_STATUS_NAME.patch
@@ -0,0 +1,33 @@
+From b78a6fe59f5d093c8841a7c2da661af81f762018 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Fri, 29 May 2009 16:52:10 +0200
+Subject: [ptp-gadget][PATCH 1/2] Fix musb_hdrc EP_STATUS_NAME
+
+There is no 'ep3', only 'epX{in,out}':
+root@beagleboard:~# ls /dev/gadget/
+ep10in ep11in ep12in ep13 ep15 ep1out ep2out ep3out ep4out ep5out ep6out ep7out ep8out ep9out
+ep10out ep11out ep12out ep14 ep1in ep2in ep3in ep4in ep5in ep6in ep7in ep8in ep9in musb_hdrc
+
+Tested on OMAP3530 based beagleboard with iPhoto as PTP application on a macbook
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ ptp.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/ptp.c b/ptp.c
+index edb307f..ec80199 100644
+--- a/ptp.c
++++ b/ptp.c
+@@ -701,7 +701,7 @@ static int autoconfig(void)
+ fs_status_desc.bEndpointAddress
+ = hs_status_desc.bEndpointAddress
+ = USB_DIR_IN | 3;
+- EP_STATUS_NAME = "ep3";
++ EP_STATUS_NAME = "ep3in";
+
+ /* Atmel AT91 processors, full speed only */
+ } else if (stat(DEVNAME = "at91_udc", &statb) == 0) {
+--
+1.6.1
+
diff --git a/recipes/gphoto2/ptp-gadget_git.bb b/recipes/gphoto2/ptp-gadget_git.bb
new file mode 100644
index 0000000000..376ee2120f
--- /dev/null
+++ b/recipes/gphoto2/ptp-gadget_git.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "This is a device-side implementation of the PTP (Picture Transfer Protocol)"
+LICENSE = "GPLv3"
+
+DEPENDS = "virtual/kernel"
+RDEPENDS = "imagemagick"
+
+PV = "1.1"
+PR = "r1"
+PR_append = "+gitr${SRCREV}"
+
+SRCREV = "ef7ef29b5cdcf8630c901362a66905b956242e0d"
+SRC_URI = "git://git.denx.de/ptp-gadget.git;protocol=git \
+ file://0001-Fix-musb_hdrc-EP_STATUS_NAME.patch;patch=1"
+
+S = "${WORKDIR}/git"
+
+do_compile () {
+ export CPPFLAGS="${CPPFLAGS} ${CFLAGS}"
+ sed -i -e 's:pthread:pthread ${LDFLAGS}:' Makefile
+ oe_runmake KERNEL_SRC=${STAGING_KERNEL_DIR} CROSS_COMPILE=${TARGET_PREFIX}
+}
+
+do_install () {
+ sed -i -e s:local/::g Makefile
+ # "/usr/bin" is hardcoded in the makefile
+ install -d ${D}/usr/bin
+ oe_runmake install DESTDIR="${D}"
+}
+
+#Need specific kernel headers
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes/gpsbabel/gpsbabel-1.3.6/autotools.patch b/recipes/gpsbabel/gpsbabel-1.3.6/autotools.patch
new file mode 100644
index 0000000000..e95bd64048
--- /dev/null
+++ b/recipes/gpsbabel/gpsbabel-1.3.6/autotools.patch
@@ -0,0 +1,13 @@
+Index: gpsbabel-1.3.6/configure.in
+===================================================================
+--- gpsbabel-1.3.6.orig/configure.in 2008-10-31 12:43:21.000000000 +0000
++++ gpsbabel-1.3.6/configure.in 2009-06-11 17:15:12.000000000 +0000
+@@ -36,7 +36,7 @@
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
+ AC_EXEEXT
+-AC_SUBST(AC_EXEEXT)
++AC_SUBST(EXEEXT)
+ AC_C_BIGENDIAN
+
+ # Checks for libraries.
diff --git a/recipes/gpsbabel/gpsbabel_1.3.6.bb b/recipes/gpsbabel/gpsbabel_1.3.6.bb
index 26f87a75e8..e0888b5993 100644
--- a/recipes/gpsbabel/gpsbabel_1.3.6.bb
+++ b/recipes/gpsbabel/gpsbabel_1.3.6.bb
@@ -4,6 +4,7 @@ DEPENDS = "expat libusb-compat"
HOMEPAGE = "http://www.gpsbabel.org/"
LICENSE = "GPL"
-SRC_URI = "http://www.gpsbabel.org/plan9.php?dl=gpsbabel-${PV}.tar.gz"
+SRC_URI = "http://www.gpsbabel.org/plan9.php?dl=gpsbabel-${PV}.tar.gz \
+ file://autotools.patch;patch=1"
inherit autotools pkgconfig
diff --git a/recipes/granule/granule.inc b/recipes/granule/granule.inc
index ba32d489f4..71ac55db2d 100644
--- a/recipes/granule/granule.inc
+++ b/recipes/granule/granule.inc
@@ -6,7 +6,7 @@ PRIORITY = "optional"
LICENSE = "GPLv2"
DEPENDS = "glib-2.0-native intltool-native gtkmm libxml2 libassa"
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${PV}-${MINVER}.tar.gz"
inherit autotools pkgconfig
diff --git a/recipes/granule/granule_1.2.4.bb b/recipes/granule/granule_1.2.4.bb
deleted file mode 100644
index cb01eb0388..0000000000
--- a/recipes/granule/granule_1.2.4.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require granule.inc
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${PV}-1.tar.gz"
-
diff --git a/recipes/granule/granule_1.4.0.bb b/recipes/granule/granule_1.4.0.bb
new file mode 100644
index 0000000000..109a3b4c97
--- /dev/null
+++ b/recipes/granule/granule_1.4.0.bb
@@ -0,0 +1,4 @@
+require granule.inc
+
+MINVER = "7"
+S = "${WORKDIR}/${P}-${MINVER}"
diff --git a/recipes/granule/libassa_3.4.2.bb b/recipes/granule/libassa_3.5.0.bb
index 0598a6f5c2..af496c7e47 100644
--- a/recipes/granule/libassa_3.4.2.bb
+++ b/recipes/granule/libassa_3.5.0.bb
@@ -6,8 +6,7 @@ PRIORITY = "optional"
LICENSE = "LGPL"
PR = "r0"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${PV}-2.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz"
inherit autotools pkgconfig
diff --git a/recipes/grub/grub-0.93/autohell.patch b/recipes/grub/grub-0.93/autohell.patch
deleted file mode 100644
index ca1f2d1cb5..0000000000
--- a/recipes/grub/grub-0.93/autohell.patch
+++ /dev/null
@@ -1,166 +0,0 @@
---- grub-0.93/configure.in~ 2002-11-29 20:12:08.000000000 +0000
-+++ grub-0.93/configure.in 2004-01-04 12:03:05.000000000 +0000
-@@ -54,7 +54,7 @@
- _AM_DEPENDENCIES(CC)
-
- dnl Because recent automake complains about AS, set it here.
--AS="$CC"
-+AM_PROG_AS
- AC_SUBST(AS)
-
- AC_ARG_WITH(binutils,
---- grub-0.93/stage1/Makefile.am~ 2002-09-08 02:58:08.000000000 +0100
-+++ grub-0.93/stage1/Makefile.am 2004-01-04 12:31:38.000000000 +0000
-@@ -4,7 +4,7 @@
- CLEANFILES = $(nodist_pkgdata_DATA)
-
- # We can't use builtins or standard includes.
--AM_ASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
-+AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc $(DEFAULT_INCLUDES)
- LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
-
- noinst_PROGRAMS = stage1.exec
---- grub-0.93/stage2/Makefile.am~ 2002-11-29 18:00:53.000000000 +0000
-+++ grub-0.93/stage2/Makefile.am 2004-01-04 12:30:29.000000000 +0000
-@@ -12,6 +12,7 @@
-
- # For <stage1.h>.
- INCLUDES = -I$(top_srcdir)/stage1
-+AM_CCASFLAGS = $(DEFAULT_INCLUDES) $(INCLUDES)
-
- # The library for /sbin/grub.
- noinst_LIBRARIES = libgrub.a
-@@ -88,7 +89,7 @@
- fsys_vstafs.c fsys_xfs.c gunzip.c hercules.c md5.c serial.c \
- smp-imps.c stage2.c terminfo.c tparm.c
- pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
--pre_stage2_exec_ASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
-+pre_stage2_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) $(AM_CCASFLAGS)
- pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK)
-
- if NETBOOT_SUPPORT
-@@ -109,7 +110,7 @@
- echo "#define STAGE2_SIZE $$6" > stage2_size.h
-
- start_exec_SOURCES = start.S
--start_exec_ASFLAGS = $(STAGE2_COMPILE)
-+start_exec_CCASFLAGS = $(STAGE2_COMPILE) $(AM_CCASFLAGS)
- start_exec_LDFLAGS = $(START_LINK)
-
- # XXX: automake doesn't provide a way to specify dependencies for object
-@@ -127,8 +128,8 @@
- stage1_5.c fsys_ext2fs.c bios.c
- e2fs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_EXT2FS=1 \
- -DNO_BLOCK_FILES=1
--e2fs_stage1_5_exec_ASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_EXT2FS=1 \
-- -DNO_BLOCK_FILES=1
-+e2fs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_EXT2FS=1 \
-+ -DNO_BLOCK_FILES=1 $(AM_CCASFLAGS)
- e2fs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
-
- # For fat_stage1_5 target.
-@@ -136,8 +137,8 @@
- stage1_5.c fsys_fat.c bios.c
- fat_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FAT=1 \
- -DNO_BLOCK_FILES=1
--fat_stage1_5_exec_ASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FAT=1 \
-- -DNO_BLOCK_FILES=1
-+fat_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FAT=1 \
-+ -DNO_BLOCK_FILES=1 $(AM_CCASFLAGS)
- fat_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
-
- # For ffs_stage1_5 target.
-@@ -145,8 +146,8 @@
- stage1_5.c fsys_ffs.c bios.c
- ffs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FFS=1 \
- -DNO_BLOCK_FILES=1
--ffs_stage1_5_exec_ASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FFS=1 \
-- -DNO_BLOCK_FILES=1
-+ffs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FFS=1 \
-+ -DNO_BLOCK_FILES=1 $(AM_CCASFLAGS)
- ffs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
-
- # For minix_stage1_5 target.
-@@ -154,8 +155,8 @@
- stage1_5.c fsys_minix.c bios.c
- minix_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_MINIX=1 \
- -DNO_BLOCK_FILES=1
--minix_stage1_5_exec_ASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_MINIX=1 \
-- -DNO_BLOCK_FILES=1
-+minix_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_MINIX=1 \
-+ -DNO_BLOCK_FILES=1 $(AM_CCASFLAGS)
- minix_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
-
- # For reiserfs_stage1_5 target.
-@@ -163,8 +164,8 @@
- disk_io.c stage1_5.c fsys_reiserfs.c bios.c
- reiserfs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_REISERFS=1 \
- -DNO_BLOCK_FILES=1
--reiserfs_stage1_5_exec_ASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_REISERFS=1 \
-- -DNO_BLOCK_FILES=1
-+reiserfs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_REISERFS=1 \
-+ -DNO_BLOCK_FILES=1 $(AM_CCASFLAGS)
- reiserfs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
-
- # For vstafs_stage1_5 target.
-@@ -172,8 +173,8 @@
- disk_io.c stage1_5.c fsys_vstafs.c bios.c
- vstafs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_VSTAFS=1 \
- -DNO_BLOCK_FILES=1
--vstafs_stage1_5_exec_ASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_VSTAFS=1 \
-- -DNO_BLOCK_FILES=1
-+vstafs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_VSTAFS=1 \
-+ -DNO_BLOCK_FILES=1 $(AM_CCASFLAGS)
- vstafs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
-
- # For jfs_stage1_5 target.
-@@ -181,8 +182,8 @@
- disk_io.c stage1_5.c fsys_jfs.c bios.c
- jfs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_JFS=1 \
- -DNO_BLOCK_FILES=1
--jfs_stage1_5_exec_ASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_JFS=1 \
-- -DNO_BLOCK_FILES=1
-+jfs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_JFS=1 \
-+ -DNO_BLOCK_FILES=1 $(AM_CCASFLAGS)
- jfs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
-
- # For xfs_stage1_5 target.
-@@ -190,16 +191,16 @@
- disk_io.c stage1_5.c fsys_xfs.c bios.c
- xfs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_XFS=1 \
- -DNO_BLOCK_FILES=1
--xfs_stage1_5_exec_ASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_XFS=1 \
-- -DNO_BLOCK_FILES=1
-+xfs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_XFS=1 \
-+ -DNO_BLOCK_FILES=1 $(AM_CCASFLAGS)
- xfs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
-
- # For diskless target.
- diskless_exec_SOURCES = $(pre_stage2_exec_SOURCES)
- diskless_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) \
- -DSUPPORT_DISKLESS=1
--diskless_exec_ASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) \
-- -DSUPPORT_DISKLESS=1
-+diskless_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) \
-+ -DSUPPORT_DISKLESS=1 $(AM_CCASFLAGS)
- diskless_exec_LDFLAGS = $(PRE_STAGE2_LINK)
- diskless_exec_LDADD = ../netboot/libdrivers.a
-
-@@ -210,7 +211,7 @@
-
- # For nbloader target.
- nbloader_exec_SOURCES = nbloader.S
--nbloader_exec_ASFLAGS = $(STAGE2_COMPILE)
-+nbloader_exec_CCASFLAGS = $(STAGE2_COMPILE) $(AM_CCASFLAGS)
- nbloader_exec_LDFLAGS = $(NBLOADER_LINK)
-
- # XXX: See the comment for start_exec-start.o.
-@@ -223,7 +224,7 @@
-
- # For pxeloader target.
- pxeloader_exec_SOURCES = pxeloader.S
--pxeloader_exec_ASFLAGS = $(STAGE2_COMPILE)
-+pxeloader_exec_CCASFLAGS = $(STAGE2_COMPILE) $(AM_CCASFLAGS)
- pxeloader_exec_LDFLAGS = $(PXELOADER_LINK)
-
- # XXX: See the comment for start_exec-start.o.
diff --git a/recipes/grub/grub-0.93/memcpy.patch b/recipes/grub/grub-0.93/memcpy.patch
deleted file mode 100644
index dd5da33a8b..0000000000
--- a/recipes/grub/grub-0.93/memcpy.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- grub-0.93/stage2/asm.S~ 2002-12-02 23:18:56.000000000 +0000
-+++ grub-0.93/stage2/asm.S 2004-01-04 12:50:11.000000000 +0000
-@@ -62,6 +62,10 @@
- start:
- _start:
- #endif /* ! STAGE1_5 */
-+
-+#undef memcpy
-+ENTRY(memcpy)
-+ jmp EXT_C(grub_memmove)
-
- ENTRY(main)
- /*
diff --git a/recipes/grub/grub-0.93/reiserfs.patch b/recipes/grub/grub-0.93/reiserfs.patch
deleted file mode 100644
index 5b4fb5bfa4..0000000000
--- a/recipes/grub/grub-0.93/reiserfs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- grub-0.93/stage2/fsys_reiserfs.c~ 2002-11-29 17:46:01.000000000 +0000
-+++ grub-0.93/stage2/fsys_reiserfs.c 2004-01-04 12:16:34.000000000 +0000
-@@ -112,7 +112,7 @@
- /* offset in the log of where to start replay after a crash */
- __u32 j_first_unflushed_offset;
- /* mount id to detect very old transactions */
-- __u32 long j_mount_id;
-+ __u32 j_mount_id;
- };
-
- /* magic string to find desc blocks in the journal */
diff --git a/recipes/grub/grub_0.93.bb b/recipes/grub/grub_0.93.bb
deleted file mode 100644
index 9fc008412d..0000000000
--- a/recipes/grub/grub_0.93.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-DESCRIPTION = "GRUB is the GRand Unified Bootloader"
-HOMEPAGE = "http://www.gnu.org/software/grub"
-SECTION = "bootloaders"
-PRIORITY = "optional"
-
-SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz; \
- file://autohell.patch;patch=1 \
- file://memcpy.patch;patch=1 \
- file://reiserfs.patch;patch=1"
-
-inherit autotools
-
-COMPATIBLE_HOST = 'i.86.*-linux'
-
-FILES_${PN}-doc = "${datadir}"
diff --git a/recipes/grub/grub_0.97.bb b/recipes/grub/grub_0.97.bb
index ef37af19e0..40adff9ee9 100644
--- a/recipes/grub/grub_0.97.bb
+++ b/recipes/grub/grub_0.97.bb
@@ -2,8 +2,8 @@ DESCRIPTION = "GRand Unified Bootloader"
HOMEPAGE = "http://www.gnu.org/software/grub"
SECTION = "bootloaders"
PRIORITY = "optional"
-RDEPENDS = "diffutils"
-PR = "r4"
+RDEPENDS_${PN}-install = "diffutils"
+PR = "r5"
SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://automake-1.10.patch;patch=1 \
@@ -11,20 +11,26 @@ SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz \
inherit autotools
-python __anonymous () {
- import re
- host = bb.data.getVar('HOST_SYS', d, 1)
- if not re.match('i.86.*-linux', host):
- raise bb.parse.SkipPackage("incompatible with host %s" % host)
-}
-
do_install_append() {
- install -d ${D}/boot/
- ln -sf ../usr/lib/grub/i386${TARGET_VENDOR}/ ${D}/boot/grub
+ install -m 0644 -D ${WORKDIR}/menu.lst ${D}/boot/grub/menu.lst
- # TODO: better use grub-set-default script here?
- install -m 0644 ${WORKDIR}/menu.lst ${D}/boot/grub
+ # Copy stage1/1_5/2 files to /boot/grub
+ GRUB_TARGET_ARCH=$(echo ${TARGET_ARCH} | sed -e 's/.86/386/')
+ install -m 0644 \
+ ${D}/${libdir}/grub/${GRUB_TARGET_ARCH}${TARGET_VENDOR}/* \
+ ${D}/boot/grub/
}
-FILES_${PN}-doc = "${datadir}"
-FILES_${PN} = "/boot /usr"
+PACKAGES =+ "${PN}-install ${PN}-eltorito"
+
+FILES_${PN}-install = " \
+ ${sbindir}/grub-install \
+ ${sbindir}/grub-terminfo \
+ ${sbindir}/grub-md5-crypt \
+ ${bindir}/mbchk \
+ ${libdir}/grub \
+"
+FILES_${PN}-eltorito = "/boot/grub/stage2_eltorito"
+FILES_${PN} += "/boot"
+
+COMPATIBLE_HOST = "i.86.*-linux"
diff --git a/recipes/gstreamer/gst-plugins-bad_0.10.11.bb b/recipes/gstreamer/gst-plugins-bad_0.10.11.bb
new file mode 100644
index 0000000000..a90b88ee45
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-bad_0.10.11.bb
@@ -0,0 +1,12 @@
+require gst-plugins.inc
+
+PR = "${INC_PR}.1"
+
+SRC_URI += "file://vorbisenc.h file://vorbisdec.h \
+ file://ivorbis-thumb.patch;patch=1"
+DEPENDS += "gst-plugins-base directfb"
+
+do_compile_prepend() {
+ # work around missing files in upstream tarball (upstream bug #454078)
+ install -m 0644 ${WORKDIR}/vorbis*.h ${S}/ext/ivorbis/
+}
diff --git a/recipes/gstreamer/gst-plugins-bad_0.10.6.bb b/recipes/gstreamer/gst-plugins-bad_0.10.6.bb
index df7bf75852..bfc7217b50 100644
--- a/recipes/gstreamer/gst-plugins-bad_0.10.6.bb
+++ b/recipes/gstreamer/gst-plugins-bad_0.10.6.bb
@@ -1,5 +1,6 @@
require gst-plugins.inc
-PR = "r2"
+
+PR = "${INC_PR}.1"
SRC_URI += "file://vorbisenc.h file://vorbisdec.h \
file://gst-plugins-directfb-fix.patch;patch=1;pnum=2 \
diff --git a/recipes/gstreamer/gst-plugins-base_0.10.17.bb b/recipes/gstreamer/gst-plugins-base_0.10.17.bb
index 0a1f17fcd8..3b07668902 100644
--- a/recipes/gstreamer/gst-plugins-base_0.10.17.bb
+++ b/recipes/gstreamer/gst-plugins-base_0.10.17.bb
@@ -1,5 +1,7 @@
require gst-plugins.inc
+PR = "${INC_PR}.1"
+
PROVIDES += "gst-plugins"
# gst-plugins-base only builds the alsa plugin
diff --git a/recipes/gstreamer/gst-plugins-base_0.10.22.bb b/recipes/gstreamer/gst-plugins-base_0.10.22.bb
index 3086d93ffd..bcbfd6871d 100644
--- a/recipes/gstreamer/gst-plugins-base_0.10.22.bb
+++ b/recipes/gstreamer/gst-plugins-base_0.10.22.bb
@@ -1,5 +1,7 @@
require gst-plugins.inc
+PR = "${INC_PR}.1"
+
PROVIDES += "gst-plugins"
PR = "r2"
diff --git a/recipes/gstreamer/gst-plugins-base_0.10.23.bb b/recipes/gstreamer/gst-plugins-base_0.10.23.bb
new file mode 100644
index 0000000000..26dcfe3e3b
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-base_0.10.23.bb
@@ -0,0 +1,12 @@
+require gst-plugins.inc
+
+PR = "${INC_PR}.1"
+
+PROVIDES += "gst-plugins"
+
+# gst-plugins-base only builds the alsa plugin
+# 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 += "libtheora alsa-lib libsm virtual/libx11 freetype gnome-vfs libxv"
+
diff --git a/recipes/gstreamer/gst-plugins-good_0.10.13.bb b/recipes/gstreamer/gst-plugins-good_0.10.13.bb
index b77d1fcf47..d077d06d1c 100644
--- a/recipes/gstreamer/gst-plugins-good_0.10.13.bb
+++ b/recipes/gstreamer/gst-plugins-good_0.10.13.bb
@@ -1,6 +1,6 @@
require gst-plugins.inc
-PR = "r1"
+PR = "${INC_PR}.1"
inherit gconf
diff --git a/recipes/gstreamer/gst-plugins-good_0.10.14.bb b/recipes/gstreamer/gst-plugins-good_0.10.14.bb
new file mode 100644
index 0000000000..d077d06d1c
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-good_0.10.14.bb
@@ -0,0 +1,11 @@
+require gst-plugins.inc
+
+PR = "${INC_PR}.1"
+
+inherit gconf
+
+EXTRA_OECONF += " --enable-experimental --enable-gst_v4l2 --enable-gconftool --enable-external --with-check=no"
+DEPENDS += "jpeg libtheora gst-plugins-base esound"
+
+PACKAGES =+ "gst-plugin-gconfelements"
+FILES_gst-plugin-gconfelements += "${sysconfdir}/gconf"
diff --git a/recipes/gstreamer/gst-plugins-ugly-sid_0.10.7.bb b/recipes/gstreamer/gst-plugins-ugly-sid_0.10.7.bb
index 77c4184c29..0d024e15ea 100644
--- a/recipes/gstreamer/gst-plugins-ugly-sid_0.10.7.bb
+++ b/recipes/gstreamer/gst-plugins-ugly-sid_0.10.7.bb
@@ -1,7 +1,8 @@
require gst-plugins.inc
DEPENDS += "gst-plugins-base libsidplay"
PROVIDES += "gst-plugin-sid"
-PR = "r5"
+
+PR = "${INC_PR}.1"
SRC_URI = "\
http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.bz2 \
@@ -10,8 +11,8 @@ SRC_URI = "\
S = "${WORKDIR}/gst-plugins-ugly-${PV}"
python() {
- # Don't build, if we are building an ENTERPRISE distro
- enterprise = bb.data.getVar("ENTERPRISE_DISTRO", d, 1)
- if enterprise != "1":
- raise bb.parse.SkipPackage("gst-plugins-ugly-sid will only build if ENTERPRISE_DISTRO == 1")
+ # Don't build, if we are building an ENTERPRISE distro
+ enterprise = bb.data.getVar("ENTERPRISE_DISTRO", d, 1)
+ if enterprise != "1":
+ raise bb.parse.SkipPackage("gst-plugins-ugly-sid will only build if ENTERPRISE_DISTRO == 1")
}
diff --git a/recipes/gstreamer/gst-plugins-ugly_0.10.10.bb b/recipes/gstreamer/gst-plugins-ugly_0.10.10.bb
index 0678e229f8..4d4f893075 100644
--- a/recipes/gstreamer/gst-plugins-ugly_0.10.10.bb
+++ b/recipes/gstreamer/gst-plugins-ugly_0.10.10.bb
@@ -1,6 +1,6 @@
require gst-plugins.inc
-PR = "r1"
+PR = "${INC_PR}.1"
DEPENDS += "gst-plugins-base mpeg2dec libsidplay"
@@ -10,9 +10,9 @@ SRC_URI += "\
"
python() {
- # Don't build, if we are building an ENTERPRISE distro
- enterprise = bb.data.getVar("ENTERPRISE_DISTRO", d, 1)
- if enterprise == "1":
- raise bb.parse.SkipPackage("gst-plugins-ugly will only build if ENTERPRISE_DISTRO != 1")
+ # Don't build, if we are building an ENTERPRISE distro
+ enterprise = bb.data.getVar("ENTERPRISE_DISTRO", d, 1)
+ if enterprise == "1":
+ raise bb.parse.SkipPackage("gst-plugins-ugly will only build if ENTERPRISE_DISTRO != 1")
}
diff --git a/recipes/gstreamer/gst-plugins-ugly_0.10.11.bb b/recipes/gstreamer/gst-plugins-ugly_0.10.11.bb
new file mode 100644
index 0000000000..9c28d208df
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-ugly_0.10.11.bb
@@ -0,0 +1,18 @@
+require gst-plugins.inc
+
+PR = "${INC_PR}.1"
+
+DEPENDS += "gst-plugins-base mpeg2dec libsidplay"
+
+SRC_URI += "\
+ file://gstmad_16bit.patch;patch=1 \
+ file://gstsid_autofoo_HACK.patch;patch=1 \
+"
+
+python() {
+ # Don't build, if we are building an ENTERPRISE distro
+ enterprise = bb.data.getVar("ENTERPRISE_DISTRO", d, 1)
+ if enterprise == "1":
+ raise bb.parse.SkipPackage("gst-plugins-ugly will only build if ENTERPRISE_DISTRO != 1")
+}
+
diff --git a/recipes/gstreamer/gst-plugins.inc b/recipes/gstreamer/gst-plugins.inc
index 3bf29ad3e9..5d72eb8d02 100644
--- a/recipes/gstreamer/gst-plugins.inc
+++ b/recipes/gstreamer/gst-plugins.inc
@@ -3,6 +3,8 @@ DESCRIPTION = "Plugins for GStreamer"
DEPENDS = "gstreamer libmikmod liboil libogg tremor libvorbis"
DEPENDS += "${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'libmad libid3tag', d)}"
+INC_PR = "r6"
+
PACKAGES_DYNAMIC = "gst-plugin-*"
SRC_URI = "http://gstreamer.freedesktop.org/src/${PN}/${PN}-${PV}.tar.bz2"
@@ -33,7 +35,7 @@ python populate_packages_prepend () {
metapkg_rdepends = []
packages = bb.data.getVar('PACKAGES', d, 1).split()
for pkg in packages[1:]:
- if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.count('dev') and not pkg.count( 'locale' ):
+ if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.count('locale'):
metapkg_rdepends.append(pkg)
bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d)
bb.data.setVar('DESCRIPTION_' + metapkg, pn + ' meta package', d)
@@ -47,7 +49,7 @@ ALLOW_EMPTY = "1"
PACKAGES += "${PN}-apps"
FILES_${PN}-apps = "${bindir}"
-FILES_${PN} = ""
+FILES_${PN} = "${datadir}/gstreamer-0.10"
FILES_${PN}-dbg += "${libdir}/gstreamer-${LIBV}/.debug"
diff --git a/recipes/gstreamer/gstreamer_0.10.23.bb b/recipes/gstreamer/gstreamer_0.10.23.bb
new file mode 100644
index 0000000000..906aa239ac
--- /dev/null
+++ b/recipes/gstreamer/gstreamer_0.10.23.bb
@@ -0,0 +1,6 @@
+require gstreamer.inc
+
+do_configure_prepend() {
+ sed -i -e s:docs::g Makefile.am
+}
+
diff --git a/recipes/gtk+/gtk+.inc b/recipes/gtk+/gtk+.inc
index c0b9ed5c80..9322d709e4 100644
--- a/recipes/gtk+/gtk+.inc
+++ b/recipes/gtk+/gtk+.inc
@@ -6,6 +6,7 @@ LICENSE = "LGPL"
PRIORITY = "optional"
DEPENDS = "glib-2.0 tiff pango atk jpeg libpng libxext libxcursor gtk-doc libgcrypt cups \
libxrandr libxdamage libxrender libxcomposite"
+PROVIDES = "gdk-pixbuf"
inherit autotools pkgconfig
diff --git a/recipes/gtk-engines/gtk-engines_2.18.1.bb b/recipes/gtk-engines/gtk-engines_2.18.1.bb
new file mode 100644
index 0000000000..b252647bfd
--- /dev/null
+++ b/recipes/gtk-engines/gtk-engines_2.18.1.bb
@@ -0,0 +1,34 @@
+LICENSE = "GPL"
+SECTION = "x11/base"
+DESCRIPTION = "GTK theme engines"
+DEPENDS = "gtk+ cairo"
+
+PR = "r1"
+
+RDEPENDS_gtk-theme-redmond = "gtk-engine-redmond95"
+RDEPENDS_gtk-theme-metal = "gtk-engine-metal"
+RDEPENDS_gtk-theme-mist = "gtk-engine-mist"
+RDEPENDS_gtk-theme-crux = "gtk-engine-crux-engine"
+RDEPENDS_gtk-theme-lighthouseblue = "gtk-engine-lighthouseblue"
+RDEPENDS_gtk-theme-thinice = "gtk-engine-thinice"
+RDEPENDS_gtk-theme-industrial = "gtk-engine-industrial"
+RDEPENDS_gtk-theme-clearlooks = "gtk-engine-clearlooks"
+
+RREPLACES_gtk-theme-clearlooks = "gpe-theme-clearlooks"
+
+inherit gnome gtk-binver
+
+PACKAGES_DYNAMIC = "gtk-engine-* gtk-theme-*"
+
+python populate_packages_prepend() {
+ import os.path
+
+ engines_ver = ['gtk-2.0/', gtkbinver_find(d), '/engines']
+
+ engines_root = os.path.join(bb.data.getVar('libdir', d, 1), ''.join(engines_ver))
+ themes_root = os.path.join(bb.data.getVar('datadir', d, 1), "themes")
+
+ do_split_packages(d, engines_root, '^lib(.*)\.so$', 'gtk-engine-%s', 'GTK %s theme engine', extra_depends='')
+ do_split_packages(d, themes_root, '(.*)', 'gtk-theme-%s', 'GTK theme %s', allow_dirs=True, extra_depends='')
+}
+
diff --git a/recipes/gtk-webcore/midori_0.1.7.bb b/recipes/gtk-webcore/midori_0.1.7.bb
new file mode 100644
index 0000000000..c1d1f66fe7
--- /dev/null
+++ b/recipes/gtk-webcore/midori_0.1.7.bb
@@ -0,0 +1,31 @@
+require midori.inc
+
+DEPENDS += "python-native python-docutils-native"
+
+SRC_URI = "http://goodies.xfce.org/releases/midori/midori-${PV}.tar.bz2 \
+ file://waf"
+
+
+do_configure() {
+ cp -f ${WORKDIR}/waf ${S}/
+ ./configure \
+ --prefix=${prefix} \
+ --bindir=${bindir} \
+ --sbindir=${sbindir} \
+ --libexecdir=${libexecdir} \
+ --datadir=${datadir} \
+ --sysconfdir=${sysconfdir} \
+ --sharedstatedir=${sharedstatedir} \
+ --localstatedir=${localstatedir} \
+ --libdir=${libdir} \
+ --includedir=${includedir} \
+ --infodir=${infodir} \
+ --mandir=${mandir} \
+ ${EXTRA_OECONF}
+
+ sed -i /LINK_CC/d ./_build_/c4che/default.cache.py
+ echo "LINK_CC = '${CXX}'" >> ./_build_/c4che/default.cache.py
+}
+
+
+
diff --git a/recipes/gtk-webcore/midori_git.bb b/recipes/gtk-webcore/midori_git.bb
index a21058bcbf..aa5a213f78 100644
--- a/recipes/gtk-webcore/midori_git.bb
+++ b/recipes/gtk-webcore/midori_git.bb
@@ -3,13 +3,18 @@ require midori.inc
DEPENDS += "python-native python-docutils-native"
# increment PR every time SRCREV is updated!
-PR = "r2"
-PV = "0.1.2+${PR}+gitr${SRCREV}"
+PR = "r1"
+PV = "0.1.7+${PR}+gitr${SRCREV}"
+
+SRC_URI = "git://git.xfce.org/kalikiana/midori;protocol=git \
+ file://waf"
-SRC_URI = "git://git.xfce.org/kalikiana/midori;protocol=git"
S = "${WORKDIR}/git"
+
+
do_configure() {
+ cp -f ${WORKDIR}/waf ${S}/
./configure \
--prefix=${prefix} \
--bindir=${bindir} \
diff --git a/recipes/gtksourceview/gtksourceview2_2.6.0.bb b/recipes/gtksourceview/gtksourceview2_2.6.0.bb
new file mode 100644
index 0000000000..ee9f6549ac
--- /dev/null
+++ b/recipes/gtksourceview/gtksourceview2_2.6.0.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Portable C library for multiline text editing"
+HOMEPAGE = "http://projects.gnome.org/gtksourceview/"
+LICENSE = "LGPL"
+DEPENDS = "gtk+ libgnomeprint"
+PR = "r0"
+PNAME = "gtksourceview"
+
+S = "${WORKDIR}/${PNAME}-${PV}"
+
+inherit gnome pkgconfig
+
+# overrule SRC_URI from gnome.conf
+SRC_URI = "${GNOME_MIRROR}/${PNAME}/${@gnome_verdir("${PV}")}/${PNAME}-${PV}.tar.bz2"
+
+do_stage() {
+autotools_stage_all
+}
+
diff --git a/recipes/guile/guile-native.inc b/recipes/guile/guile-native.inc
new file mode 100644
index 0000000000..28cb2e0f15
--- /dev/null
+++ b/recipes/guile/guile-native.inc
@@ -0,0 +1,132 @@
+SECTION = "unknown"
+LICENSE = "GPL"
+DEPENDS = "gettext-native gmp-native"
+
+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}
+}
+
+do_configure_append() {
+ find ${S} -name Makefile | xargs sed -i s:'-Werror':'':g
+}
+
diff --git a/recipes/guile/guile-native_1.8.2.bb b/recipes/guile/guile-native_1.8.2.bb
index ac2b189d37..7c4b26e873 100644
--- a/recipes/guile/guile-native_1.8.2.bb
+++ b/recipes/guile/guile-native_1.8.2.bb
@@ -1,6 +1,6 @@
SECTION = "unknown"
LICENSE = "GPL"
-DEPENDS = "gmp-native"
+DEPENDS = "gmp-native libtool (< 2)"
SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \
"
diff --git a/recipes/guile/guile-native_1.8.5.bb b/recipes/guile/guile-native_1.8.5.bb
index e73616e6eb..9c2eb13d8d 100644
--- a/recipes/guile/guile-native_1.8.5.bb
+++ b/recipes/guile/guile-native_1.8.5.bb
@@ -1,137 +1,10 @@
-SECTION = "unknown"
-LICENSE = "GPL"
-DEPENDS = "gmp-native"
+require guile-native.inc
+
+DEPENDS = "libtool (< 2)"
+
SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \
file://configure-fix.patch;patch=1 \
-"
+ "
PR = "r1"
-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}
-}
-
-do_configure_append() {
- find ${S} -name Makefile | xargs sed -i s:'-Werror':'':g
-}
-
diff --git a/recipes/guile/guile-native_1.8.6.bb b/recipes/guile/guile-native_1.8.6.bb
new file mode 100644
index 0000000000..d511807e09
--- /dev/null
+++ b/recipes/guile/guile-native_1.8.6.bb
@@ -0,0 +1,4 @@
+require guile-native.inc
+SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \
+ file://configure-fix.patch;patch=1 \
+ "
diff --git a/recipes/guile/guile.inc b/recipes/guile/guile.inc
new file mode 100644
index 0000000000..b2d6833c94
--- /dev/null
+++ b/recipes/guile/guile.inc
@@ -0,0 +1,45 @@
+DESCRIPTION = "Guile is an interpreter for the Scheme programming language, \
+packaged as a library which can be incorporated into your programs."
+HOMEPAGE = "http://www.gnu.org/software/guile/guile.html"
+SECTION = "devel/scheme"
+DEPENDS = "guile-native gmp libtool"
+LICENSE = "GPL"
+PACKAGES =+ "${PN}-el"
+FILES_${PN}-el = "${datadir}/emacs"
+DESCRIPTION_${PN}-el = "Emacs lisp files for Guile"
+
+inherit autotools
+
+acpaths = "-I ${S}/guile-config"
+
+EXTRA_OECONF = " \
+ --without-threads \
+ --without-included-ltdl \
+ "
+
+do_compile() {
+ for i in $(find ${S} -name "Makefile") ; do
+ sed -i -e s:-Werror::g $i
+ done
+
+ (cd libguile; oe_runmake CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" LDFLAGS="${BUILD_LDFLAGS}" guile_filter_doc_snarfage)
+ oe_runmake preinstguile="`which guile`"
+
+ sed -i -e s:${STAGING_DIR_TARGET}::g \
+ -e s:/${TARGET_SYS}::g \
+ -e s:-L/usr/lib::g \
+ -e s:-isystem/usr/include::g \
+ -e s:,/usr/lib:,\$\{libdir\}:g \
+ guile-1.8.pc
+}
+
+do_stage() {
+ autotools_stage_all
+ # Create guile-config returning target values instead of native values
+ install -d ${STAGING_BINDIR_CROSS}
+ echo '#!'`which guile`$' \\\n-e main -s\n!#\n(define %guile-build-info '\'\( >guile-config.cross
+ sed -n $'s:-isystem[^ ]* ::;s:-Wl,-rpath-link,[^ ]* ::;s:^[ \t]*{[ \t]*": (:;s:",[ \t]*": . ":;s:" *}, *\\\\:"):;/^ (/p' <libguile/libpath.h >>guile-config.cross
+ echo '))' >>guile-config.cross
+ cat guile-config/guile-config >>guile-config.cross
+ install guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
+}
diff --git a/recipes/guile/guile_1.8.5.bb b/recipes/guile/guile_1.8.5.bb
index 6d320d8158..e16cabd91d 100644
--- a/recipes/guile/guile_1.8.5.bb
+++ b/recipes/guile/guile_1.8.5.bb
@@ -1,46 +1,10 @@
-DESCRIPTION = "Guile is an interpreter for the Scheme programming language, \
-packaged as a library which can be incorporated into your programs."
-HOMEPAGE = "http://www.gnu.org/software/guile/guile.html"
-SECTION = "devel/scheme"
-DEPENDS = "guile-native gmp libtool"
-LICENSE = "GPL"
-PACKAGES =+ "${PN}-el"
-FILES_${PN}-el = "${datadir}/emacs"
-DESCRIPTION_${PN}-el = "Emacs lisp files for Guile"
+require guile.inc
-PR = "r4"
+DEPENDS = "libtool (< 2)"
SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \
- file://configure-fix.patch;patch=1 "
-
-inherit autotools
-
-acpaths = "-I ${S}/guile-config"
+ file://configure-fix.patch;patch=1 \
+ "
-EXTRA_OECONF = " \
- --without-threads \
- --without-included-ltdl \
- "
-
-do_compile() {
- (cd libguile; oe_runmake CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" LDFLAGS="${BUILD_LDFLAGS}" guile_filter_doc_snarfage)
- oe_runmake preinstguile="`which guile`"
-
- sed -i -e s:${STAGING_DIR_TARGET}::g \
- -e s:/${TARGET_SYS}::g \
- -e s:-L/usr/lib::g \
- -e s:-isystem/usr/include::g \
- -e s:,/usr/lib:,\$\{libdir\}:g \
- guile-1.8.pc
-}
+PR = "r4"
-do_stage() {
- autotools_stage_all
- # Create guile-config returning target values instead of native values
- install -d ${STAGING_BINDIR_CROSS}
- echo '#!'`which guile`$' \\\n-e main -s\n!#\n(define %guile-build-info '\'\( >guile-config.cross
- sed -n $'s:-isystem[^ ]* ::;s:-Wl,-rpath-link,[^ ]* ::;s:^[ \t]*{[ \t]*": (:;s:",[ \t]*": . ":;s:" *}, *\\\\:"):;/^ (/p' <libguile/libpath.h >>guile-config.cross
- echo '))' >>guile-config.cross
- cat guile-config/guile-config >>guile-config.cross
- install guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
-}
diff --git a/recipes/guile/guile_1.8.6.bb b/recipes/guile/guile_1.8.6.bb
new file mode 100644
index 0000000000..6889f33042
--- /dev/null
+++ b/recipes/guile/guile_1.8.6.bb
@@ -0,0 +1,6 @@
+require guile.inc
+
+SRC_URI = "http://ftp.gnu.org/pub/gnu/guile/guile-${PV}.tar.gz \
+ file://configure-fix.patch;patch=1 \
+ "
+
diff --git a/recipes/h2200-bootloader/h2200-bootloader.bb b/recipes/h2200-bootloader/h2200-bootloader.bb
index 5db3cd058d..69214c76f2 100644
--- a/recipes/h2200-bootloader/h2200-bootloader.bb
+++ b/recipes/h2200-bootloader/h2200-bootloader.bb
@@ -1,7 +1,6 @@
DESCRIPTION = "Bootloader firmware extractor for the h2200 iPAQ"
-RRECOMMENDS_${PN} = "kernel-module-mtdblock"
ALLOW_EMPTY = "1"
-PR = "r3"
+PR = "r4"
COMPATIBLE_MACHINE = "h2200"
#it is a shell script, but lets protect the innocent some more
@@ -10,6 +9,5 @@ PACKAGE_ARCH = "h2200"
pkg_postinst() {
#!/bin/sh
mkdir -p /lib/firmware
-modprobe mtdblock
dd if=/dev/mtdblock0 of=/lib/firmware/h2200_bootloader.bin 2>/dev/null
}
diff --git a/recipes/hal/consolekit_0.3.0.bb b/recipes/hal/consolekit_0.3.0.bb
index 9e100b60ca..10f1879e38 100644
--- a/recipes/hal/consolekit_0.3.0.bb
+++ b/recipes/hal/consolekit_0.3.0.bb
@@ -1,6 +1,8 @@
DESCRIPTION = "ConsoleKit is a framework for defining and tracking users, login sessions, and seats."
LICENSE = "GPLv2"
-DEPENDS = "libpam dbus"
+DEPENDS = "policykit libpam dbus"
+
+PR = "r1"
inherit gnome
@@ -11,7 +13,7 @@ do_stage () {
autotools_stage_all
}
-FILES_${PN} += "${libdir}/ConsoleKit ${datadir}/dbus-1"
+FILES_${PN} += "${libdir}/ConsoleKit ${datadir}/dbus-1 ${datadir}/PolicyKit"
diff --git a/recipes/hal/hal-cups-utils_0.6.19.bb b/recipes/hal/hal-cups-utils_0.6.19.bb
new file mode 100644
index 0000000000..289990e0f0
--- /dev/null
+++ b/recipes/hal/hal-cups-utils_0.6.19.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "Utilities to detect and configure printers automatically"
+HOMEPAGE = "https://fedorahosted.org/hal-cups-utils/"
+SECTION = "console/utils"
+LICENSE = "GPLv2 CUPS"
+DEPENDS = "hal dbus cups"
+RDEPENDS_${PN} += "python-dbus python-pycups python-cupshelpers python-subprocess python-syslog usbutils"
+
+SRC_URI = "https://fedorahosted.org/releases/h/a/hal-cups-utils/hal-cups-utils-${PV}.tar.gz"
+S = "${WORKDIR}/${PN}-${PV}"
+
+inherit autotools
+
+PACKAGES += "cups-backend-hal"
+
+FILES_${PN} += "${libdir}/hal/* ${datadir}/hal/*"
+FILES_${PN}-dbg += "${libdir}/hal/.debug ${libdir}/cups/backend/.debug"
+FILES_cups-backend-hal += "${libdir}/cups/backend/*"
+
+EXTRA_OECONF = "--libexecdir=${libdir}/hal/scripts"
+
+do_configure_append() {
+ sed -i 's,^#!/bin/env python,#!/usr/bin/python,' systemv/hal_lpadmin
+}
diff --git a/recipes/hal/hal-info_20090414.bb b/recipes/hal/hal-info_20090414.bb
new file mode 100644
index 0000000000..e6d50e3981
--- /dev/null
+++ b/recipes/hal/hal-info_20090414.bb
@@ -0,0 +1 @@
+require hal-info.inc
diff --git a/recipes/hal/hal.inc b/recipes/hal/hal.inc
index d17907ae79..da24afe25a 100644
--- a/recipes/hal/hal.inc
+++ b/recipes/hal/hal.inc
@@ -9,8 +9,9 @@ S = "${WORKDIR}/hal-${PV}"
inherit autotools pkgconfig
-DEPENDS = "virtual/kernel dbus-glib udev intltool intltool-native expat libusb gperf-native"
+DEPENDS = "virtual/kernel util-linux-ng dbus-glib udev intltool intltool-native expat libusb gperf-native"
RDEPENDS += "hal-info udev-utils"
+RRECOMMENDS += "eject"
SRC_URI += "file://99_hal \
file://20hal \
@@ -27,6 +28,7 @@ EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
--disable-policy-kit \
--disable-pmu \
--disable-pnp-ids \
+ --with-udev-prefix=${sysconfdir} \
${@base_contains('COMBINED_FEATURES', 'pci', '--enable-pci --enable-pci-ids', '--disable-pci --disable-pci-ids',d)} \
${@base_contains('MACHINE_FEATURES', 'acpi', '--enable-acpi', '--disable-acpi',d)} \
"
diff --git a/recipes/hal/hal_0.5.12.bb b/recipes/hal/hal_0.5.12.bb
new file mode 100644
index 0000000000..b6531e8235
--- /dev/null
+++ b/recipes/hal/hal_0.5.12.bb
@@ -0,0 +1,11 @@
+require hal.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+# The following code finds the right linux/input.h,
+# which also works with external-toolchain/SDK
+do_configure() {
+ linux_input_h=`echo "#include <linux/input.h>" | ${CPP} - | \
+ grep "linux\/input.h" | head -n 1 | awk -F '"' '{print $2}'`
+ autotools_do_configure --with-linux-input-header=${linux_input_h}
+}
diff --git a/recipes/hostap/files/hostap-no-bsd.patch b/recipes/hostap/files/hostap-no-bsd.patch
new file mode 100644
index 0000000000..c40d98c959
--- /dev/null
+++ b/recipes/hostap/files/hostap-no-bsd.patch
@@ -0,0 +1,19 @@
+--- hostapd-0.4.4/driver_madwifi.c-orig 2008-04-16 15:11:49.000000000 +0200
++++ hostapd-0.4.4/driver_madwifi.c 2008-04-16 15:10:38.000000000 +0200
+@@ -26,14 +26,14 @@
+ #include <net80211/ieee80211.h>
+ #ifdef WME_NUM_AC
+ /* Assume this is built against BSD branch of madwifi driver. */
+-#define MADWIFI_BSD
++/*#define MADWIFI_BSD*/
++#include <linux/wireless.h>
+ #include <net80211/_ieee80211.h>
+ #endif /* WME_NUM_AC */
+ #include <net80211/ieee80211_crypto.h>
+ #include <net80211/ieee80211_ioctl.h>
+
+ #include <net/if_arp.h>
+-#include <linux/wireless.h>
+
+ #include <netinet/in.h>
+ #include <netpacket/packet.h>
diff --git a/recipes/hostap/hostap-daemon_0.4.4.bb b/recipes/hostap/hostap-daemon_0.4.4.bb
index bece7d1450..83a5386f3a 100644
--- a/recipes/hostap/hostap-daemon_0.4.4.bb
+++ b/recipes/hostap/hostap-daemon_0.4.4.bb
@@ -1,3 +1,7 @@
require hostap-daemon.inc
+SRC_URI_append_nylon = "\
+ file://hostap-no-bsd.patch;patch=1"
+
+
PR = "r2"
diff --git a/recipes/hostap/hostap-daemon_0.5.10.bb b/recipes/hostap/hostap-daemon_0.5.10.bb
index 3fc1d8dc11..ea493017fe 100644
--- a/recipes/hostap/hostap-daemon_0.5.10.bb
+++ b/recipes/hostap/hostap-daemon_0.5.10.bb
@@ -5,6 +5,10 @@ PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "openssl ${@base_contains("COMBINED_FEATURES", "pci", "madwifi-ng", "",d)}"
PR = "r1"
+DEPENDS_append_mtx-1 = " madwifi-modules"
+DEPENDS_append_mtx-2 = " madwifi-modules"
+CPPFLAGS_append_mtx-1 = " -I${STAGING_INCDIR}/madwifi/"
+CPPFLAGS_append_mtx-2 = " -I${STAGING_INCDIR}/madwifi/"
#we introduce MY_ARCH to get 'armv5te' as arch instead of the misleading 'arm' on armv5te builds
MY_ARCH := "${PACKAGE_ARCH}"
diff --git a/recipes/icu/files/rematch-gcc-bug.patch b/recipes/icu/files/rematch-gcc-bug.patch
new file mode 100644
index 0000000000..4d47056ac5
--- /dev/null
+++ b/recipes/icu/files/rematch-gcc-bug.patch
@@ -0,0 +1,12 @@
+--- a/i18n/Makefile.in 2009-05-18 13:55:49.000000000 +0200
++++ b/i18n/Makefile.in 2009-05-18 13:55:49.000000000 +0200
+@@ -105,6 +105,9 @@
+
+ all-local: $(ALL_TARGETS)
+
++rematch.o: $(srcdir)/rematch.cpp
++ $(CXX) $(CPPFLAGS) $(DEFS) -c -o $@ $<
++
+ install-local: install-headers install-library
+
+ install-library: all-local
diff --git a/recipes/icu/icu_3.6.bb b/recipes/icu/icu_3.6.bb
index 1dbdf94b3a..3eccfb53d9 100644
--- a/recipes/icu/icu_3.6.bb
+++ b/recipes/icu/icu_3.6.bb
@@ -3,7 +3,8 @@ require icu-3.6.inc
DEPENDS += "icu-native"
PR = "r4"
-SRC_URI += "file://use-g++-for-linking.patch;patch=1"
+SRC_URI += "file://use-g++-for-linking.patch;patch=1 \
+ file://rematch-gcc-bug.patch;patch=1"
do_configure_append() {
for i in */Makefile */*.inc */*/Makefile */*/*.inc ; do
diff --git a/recipes/imagemagick/imagemagick_6.4.4-1.bb b/recipes/imagemagick/imagemagick_6.4.4-1.bb
index 42bf1b8bb6..546defc4ad 100644
--- a/recipes/imagemagick/imagemagick_6.4.4-1.bb
+++ b/recipes/imagemagick/imagemagick_6.4.4-1.bb
@@ -3,6 +3,8 @@ SECTION = "console/utils"
LICENSE = "GPL"
DEPENDS = "tiff"
+PR = "r1"
+
SRC_URI = "ftp://ftp.nluug.nl/pub/ImageMagick/ImageMagick-${PV}.tar.bz2 \
file://PerlMagic_MakePatch;patch=1 \
"
@@ -14,13 +16,7 @@ S = "${WORKDIR}/ImageMagick-${IMVER}"
inherit autotools binconfig pkgconfig
EXTRA_AUTORECONF += "--exclude=libtoolize"
-EXTRA_OECONF = "--without-x --without-freetype --without-perl --disable-openmp"
-
-do_configure() {
- gnu-configize
- cp config.{sub,guess} config/
- oe_runconf
-}
+EXTRA_OECONF = "--program-prefix= --without-x --without-freetype --without-perl --disable-openmp"
do_stage() {
autotools_stage_all
diff --git a/recipes/images/beagleboard-demo-image.bb b/recipes/images/beagleboard-demo-image.bb
index 441e99383c..d83281c231 100644
--- a/recipes/images/beagleboard-demo-image.bb
+++ b/recipes/images/beagleboard-demo-image.bb
@@ -25,6 +25,6 @@ IMAGE_INSTALL = "\
IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
#zap root password for release images
-ROOTFS_POSTPROCESS_COMMAND += '${@base_conditional("DISTRO_TYPE", "release", "zap_root_password; ", "",d)}'
+ROOTFS_POSTPROCESS_COMMAND += 'install_linguas; ${@base_conditional("DISTRO_TYPE", "release", "zap_root_password; ", "",d)}'
inherit image
diff --git a/recipes/images/micro-base-image.bb b/recipes/images/micro-base-image.bb
new file mode 100644
index 0000000000..32e317367a
--- /dev/null
+++ b/recipes/images/micro-base-image.bb
@@ -0,0 +1,19 @@
+# micro-base-image
+#
+# Image configuration for the OE Micro Linux Distribuion (micro, micro-uclibc)
+#
+
+# Install basic files only
+IMAGE_INSTALL = "base-files base-passwd dropbear netbase"
+IMAGE_LINGUAS = ""
+
+# Use busybox as login manager
+IMAGE_LOGIN_MANAGER = "busybox"
+
+# Include minimum init and init scripts
+IMAGE_DEV_MANAGER = "mdev"
+IMAGE_INIT_MANAGER = "sysvinit sysvinit-pidof"
+IMAGE_INITSCRIPTS = ""
+
+inherit image
+
diff --git a/recipes/images/micro-image.bb b/recipes/images/micro-image.bb
index b31365d1d1..c2cff93401 100644
--- a/recipes/images/micro-image.bb
+++ b/recipes/images/micro-image.bb
@@ -27,8 +27,4 @@ IMAGE_DEV_MANAGER = "udev"
IMAGE_INIT_MANAGER = "sysvinit sysvinit-pidof"
IMAGE_INITSCRIPTS = ""
-# Do not install target package management system
-ONLINE_PACKAGE_MANAGEMENT = "none"
-
inherit image
-
diff --git a/recipes/images/nylon-image-base.bb b/recipes/images/nylon-image-base.bb
index 27dc165800..416be1fae5 100644
--- a/recipes/images/nylon-image-base.bb
+++ b/recipes/images/nylon-image-base.bb
@@ -1,25 +1,36 @@
inherit image
inherit nylon-image
+IMAGE_FSTYPES = "jffs2 tar.gz"
+
export IMAGE_BASENAME = "nylon-base"
NYLON_BASE = "base-files base-passwd bash busybox \
ipkg initscripts less \
+ madwifi-modules \
mtd-utils \
+ nylon-scripts \
nano ncurses netbase \
- openssh sysvinit \
- tzdata tinylogin udev"
+ openssh \
+ pciutils \
+ sysvinit \
+ tinylogin \
+ tzdata \
+ wireless-tools wlan-ng-utils"
DEPENDS += "virtual/kernel less nano"
-IMAGE_INSTALL = "kernel less nano elvis-tiny \
- ${NYLON_BASE} ${BOOTSTRAP_EXTRA_RDEPENDS}"
## kernel 2.4 ##
-RDEPENDS_append_mtx-1 = " modutils modutils-initscripts modutils-depmod modutils-modinfo"
-RDEPENDS_append_mtx-2 = " modutils modutils-initscripts modutils-depmod modutils-modinfo"
+NYLON_IMAGE_RDEPENDS_mtx-1 = " modutils modutils-initscripts modutils-depmod modutils-modinfo"
+NYLON_IMAGE_RDEPENDS_mtx-2 = " modutils modutils-initscripts modutils-depmod modutils-modinfo"
## kernel 2.6 ##
-RDEPENDS_append_mtx-3 = " module-init-tools udev"
-RDEPENDS_append_mtx-3a = " module-init-tools"
+NYLON_IMAGE_RDEPENDS_mtx-3 = " module-init-tools udev"
+NYLON_IMAGE_RDEPENDS_mtx-3a = " module-init-tools"
+
+RDEPENDS_append = ${NYLON_IMAGE_RDEPENDS}
+
+IMAGE_INSTALL = "kernel less nano elvis-tiny \
+ ${NYLON_BASE} ${BOOTSTRAP_EXTRA_RDEPENDS} ${NYLON_IMAGE_RDEPENDS}"
IMAGE_LINGUAS = ""
diff --git a/recipes/images/nylon-image-extended.bb b/recipes/images/nylon-image-extended.bb
index 7a4e5b6c88..4fb324d52f 100644
--- a/recipes/images/nylon-image-extended.bb
+++ b/recipes/images/nylon-image-extended.bb
@@ -61,7 +61,6 @@ KERNEL_MODULES = " \
kernel-module-ds \
kernel-module-fat \
kernel-module-mii \
- kernel-module-pcmcia-core \
kernel-module-scsi-mod \
kernel-module-sd-mod \
kernel-module-usb-storage \
diff --git a/recipes/images/nylon-image-standard.bb b/recipes/images/nylon-image-standard.bb
index 5f79402c99..9238b0f8b2 100644
--- a/recipes/images/nylon-image-standard.bb
+++ b/recipes/images/nylon-image-standard.bb
@@ -3,15 +3,21 @@ require nylon-image-base.bb
export IMAGE_BASENAME = "nylon-standard"
NYLON_STANDARD = "\
- hostap-utils \
+ dash \
+ dnsmasq \
+ hostap-daemon hostap-utils \
linux-hotplug \
ifplugd \
+ iproute2 \
+ madwifi-modules \
+ nylon-config \
olsrd \
ppp \
rp-pppoe \
- shorewall \
+ simple-firewall \
tcpdump \
- wpa-supplicant"
+ wpa-supplicant \
+ yamonenv"
DEPENDS += "hostap-modules ntp \
${NYLON_STANDARD}"
diff --git a/recipes/images/opie-image.bb b/recipes/images/opie-image.bb
index fec6103ca9..4a984a03b8 100644
--- a/recipes/images/opie-image.bb
+++ b/recipes/images/opie-image.bb
@@ -8,7 +8,8 @@ IMAGE_INSTALL = "task-base-extended task-opie-base task-opie-base-applets \
task-opie-base-settings task-opie-base-decorations \
task-opie-base-styles task-opie-base-pim \
task-opie-extra-settings \
- task-opie-bluetooth task-opie-irda \
+ ${@base_contains("COMBINED_FEATURES", "bluetooth", "task-opie-bluetooth", "",d)} \
+ ${@base_contains("COMBINED_FEATURES", "irda", "task-opie-irda", "",d)} \
${ANGSTROM_EXTRA_INSTALL} "
# create /etc/timestamp from build date
diff --git a/recipes/images/x11-jvm-image.bb b/recipes/images/x11-jvm-image.bb
new file mode 100644
index 0000000000..fd0e5f09ad
--- /dev/null
+++ b/recipes/images/x11-jvm-image.bb
@@ -0,0 +1,41 @@
+# KaeilOS X11 image
+# plus JVM and OTHER
+
+ANGSTROM_EXTRA_INSTALL ?= ""
+XSERVER ?= "xserver-kdrive-fbdev"
+
+export IMAGE_BASENAME = "x11-jvm-image"
+
+DEPENDS = "task-base"
+
+ADD_JVM = "\
+ classpath \
+ classpath-common \
+ classpath-dev \
+ classpath-examples \
+ classpath-gconf \
+ classpath-gtk \
+ classpath-tools \
+ jamvm \
+ cacao "
+
+ADD_OTHER = "\
+ ipkg "
+
+IMAGE_INSTALL = "\
+ ${XSERVER} \
+ task-base-extended \
+ angstrom-x11-base-depends \
+ angstrom-gpe-task-base \
+ angstrom-gpe-task-settings \
+ ${SPLASH} \
+ ${ADD_JVM} \
+ ${ADD_OTHER} \
+ ${ANGSTROM_EXTRA_INSTALL}"
+
+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/recipes/initrdscripts/files/init.sh b/recipes/initrdscripts/files/init.sh
index 221b8f56b9..26fd57fce4 100644
--- a/recipes/initrdscripts/files/init.sh
+++ b/recipes/initrdscripts/files/init.sh
@@ -5,9 +5,11 @@ BOOT_ROOT=
ROOT_DEVICE=
early_setup() {
- mkdir /proc
+ mkdir -p /proc /sys /mnt /tmp
+
mount -t proc proc /proc
- mkdir /mnt
+ mount -t sysfs sysfs /sys
+
modprobe -q mtdblock
}
diff --git a/recipes/initrdscripts/initramfs-module-kexecboot_1.0.bb b/recipes/initrdscripts/initramfs-module-kexecboot_1.0.bb
index 3080269920..7f1e7cd5f9 100644
--- a/recipes/initrdscripts/initramfs-module-kexecboot_1.0.bb
+++ b/recipes/initrdscripts/initramfs-module-kexecboot_1.0.bb
@@ -1,7 +1,7 @@
SRC_URI = "file://87-kexecboot.sh"
PR = "r2"
DESCRIPTION = "An initramfs module for kexecing kernel from rootfs."
-RDEPENDS = "initramfs-uniboot kexec-static"
+RDEPENDS = "initramfs-uniboot kexec-klibc-static"
do_install() {
install -d ${D}/initrd.d
diff --git a/recipes/initrdscripts/initramfs-module-psplash_1.0.bb b/recipes/initrdscripts/initramfs-module-psplash_1.0.bb
index 8d61257220..08d1cc69c4 100644
--- a/recipes/initrdscripts/initramfs-module-psplash_1.0.bb
+++ b/recipes/initrdscripts/initramfs-module-psplash_1.0.bb
@@ -1,6 +1,6 @@
SRC_URI = "file://00-psplash.sh file://99-psplash.sh"
-PR = "r4"
-RDEPENDS = "initramfs-uniboot virtual/psplash"
+PR = "r5"
+RDEPENDS = "initramfs-uniboot virtual-psplash"
DESCRIPTION = "An initramfs module to enable psplash."
do_install() {
diff --git a/recipes/initrdscripts/initramfs-uniboot_1.0.bb b/recipes/initrdscripts/initramfs-uniboot_1.0.bb
index 07e94f1dfc..fcbbdbd2cc 100644
--- a/recipes/initrdscripts/initramfs-uniboot_1.0.bb
+++ b/recipes/initrdscripts/initramfs-uniboot_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://init.sh"
-PR = "r10"
+PR = "r11"
DESCRIPTON = "A modular initramfs init script system."
RRECOMMENDS = "kernel-module-mtdblock"
diff --git a/recipes/initscripts/initscripts-1.0/banner b/recipes/initscripts/initscripts-1.0/banner
index 0349ce1954..4e69c29e50 100644
--- a/recipes/initscripts/initscripts-1.0/banner
+++ b/recipes/initscripts/initscripts-1.0/banner
@@ -1,17 +1,3 @@
#!/bin/sh
-if [ ! -e /dev/tty ]; then
- /bin/mknod -m 0666 /dev/tty c 5 0
-fi
-
-if ( > /dev/tty0 ) 2>/dev/null; then
- vtmaster=/dev/tty0
-elif ( > /dev/vc/0 ) 2>/dev/null; then
- vtmaster=/dev/vc/0
-elif ( > /dev/console ) 2>/dev/null; then
- vtmaster=/dev/console
-else
- vtmaster=/dev/null
-fi
-echo > $vtmaster
-echo "Please wait: booting..." > $vtmaster
+echo "Please wait: booting..."
diff --git a/recipes/initscripts/initscripts-1.0/bootmisc.sh b/recipes/initscripts/initscripts-1.0/bootmisc.sh
index dde1209be5..d19477be87 100755
--- a/recipes/initscripts/initscripts-1.0/bootmisc.sh
+++ b/recipes/initscripts/initscripts-1.0/bootmisc.sh
@@ -66,7 +66,7 @@ fi
# Set the system clock from hardware clock
# If the timestamp is 1 day or more recent than the current time,
# use the timestamp instead.
-/etc/init.d/hwclock.sh start
+test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
if test -e /etc/timestamp
then
SYSTEMDATE=`date "+%Y%m%d"`
diff --git a/recipes/initscripts/initscripts-1.0/slugos/banner b/recipes/initscripts/initscripts-1.0/slugos/banner
deleted file mode 100644
index 8e64235acb..0000000000
--- a/recipes/initscripts/initscripts-1.0/slugos/banner
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-#NOTE: this script may execute with absolutely nothing
-# in /dev
-echo "SlugOS booting..."
diff --git a/recipes/initscripts/initscripts-openprotium_1.0.bb b/recipes/initscripts/initscripts-openprotium_1.0.bb
index e787eede92..aa20e29644 100644
--- a/recipes/initscripts/initscripts-openprotium_1.0.bb
+++ b/recipes/initscripts/initscripts-openprotium_1.0.bb
@@ -13,7 +13,7 @@ RCONFLICTS = "initscripts"
# a suffix
PR := "${PR}.11"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${P}', '${FILE_DIRNAME}/initscripts-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "${P}:initscripts-${PV}:"
PACKAGES = "${PN}-dbg ${PN}"
diff --git a/recipes/initscripts/initscripts_1.0.bb b/recipes/initscripts/initscripts_1.0.bb
index cbcfec5e18..664214436e 100644
--- a/recipes/initscripts/initscripts_1.0.bb
+++ b/recipes/initscripts/initscripts_1.0.bb
@@ -4,7 +4,7 @@ PRIORITY = "required"
DEPENDS = "makedevs"
RDEPENDS = "makedevs"
LICENSE = "GPL"
-PR = "r114"
+PR = "r115"
SRC_URI = "file://functions \
file://halt \
diff --git a/recipes/iproute2/iproute2-2.6.29/compilation-fix.patch b/recipes/iproute2/iproute2-2.6.29/compilation-fix.patch
new file mode 100644
index 0000000000..201280732b
--- /dev/null
+++ b/recipes/iproute2/iproute2-2.6.29/compilation-fix.patch
@@ -0,0 +1,12 @@
+Index: iproute2-2.6.29/ip/link_gre.c
+===================================================================
+--- iproute2-2.6.29.orig/ip/link_gre.c 2009-06-22 11:10:24.212963299 +0400
++++ iproute2-2.6.29/ip/link_gre.c 2009-06-22 11:10:33.940691491 +0400
+@@ -12,6 +12,7 @@
+
+ #include <string.h>
+ #include <net/if.h>
++#include <linux/ip.h>
+ #include <linux/if_tunnel.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
diff --git a/recipes/iproute2/iproute2-2.6.29/new-flex-fix.patch b/recipes/iproute2/iproute2-2.6.29/new-flex-fix.patch
new file mode 100644
index 0000000000..af7272163e
--- /dev/null
+++ b/recipes/iproute2/iproute2-2.6.29/new-flex-fix.patch
@@ -0,0 +1,83 @@
+The tc command was failing to build due to flex errors. These errors are
+caused by an incompatible change to flex in recent versions, including the
+version shipped with OE.
+
+This fix is as per the one used by opensure:
+
+ http://lists.opensuse.org/opensuse-commit/2006-04/msg00090.html
+
+and simple renames str to prevent it conflicting.
+
+--- iproute-2.6.20-070313/tc/emp_ematch.l 2007/03/17 02:52:20 1.1
++++ iproute-2.6.20-070313/tc/emp_ematch.l 2007/03/17 02:54:01
+@@ -63,7 +63,7 @@
+
+ %}
+
+-%x str
++%x STR
+
+ %option 8bit stack warn noyywrap prefix="ematch_"
+ %%
+@@ -78,17 +78,17 @@
+ }
+ strbuf_index = 0;
+
+- BEGIN(str);
++ BEGIN(STR);
+ }
+
+-<str>\" {
++<STR>\" {
+ BEGIN(INITIAL);
+ yylval.b = bstr_new(strbuf, strbuf_index);
+ yylval.b->quoted = 1;
+ return ATTRIBUTE;
+ }
+
+-<str>\\[0-7]{1,3} { /* octal escape sequence */
++<STR>\\[0-7]{1,3} { /* octal escape sequence */
+ int res;
+
+ sscanf(yytext + 1, "%o", &res);
+@@ -100,12 +100,12 @@
+ strbuf_append_char((unsigned char) res);
+ }
+
+-<str>\\[0-9]+ { /* catch wrong octal escape seq. */
++<STR>\\[0-9]+ { /* catch wrong octal escape seq. */
+ fprintf(stderr, "error: invalid octale escape sequence\n");
+ return ERROR;
+ }
+
+-<str>\\x[0-9a-fA-F]{1,2} {
++<STR>\\x[0-9a-fA-F]{1,2} {
+ int res;
+
+ sscanf(yytext + 2, "%x", &res);
+@@ -118,16 +118,16 @@
+ strbuf_append_char((unsigned char) res);
+ }
+
+-<str>\\n strbuf_append_char('\n');
+-<str>\\r strbuf_append_char('\r');
+-<str>\\t strbuf_append_char('\t');
+-<str>\\v strbuf_append_char('\v');
+-<str>\\b strbuf_append_char('\b');
+-<str>\\f strbuf_append_char('\f');
+-<str>\\a strbuf_append_char('\a');
++<STR>\\n strbuf_append_char('\n');
++<STR>\\r strbuf_append_char('\r');
++<STR>\\t strbuf_append_char('\t');
++<STR>\\v strbuf_append_char('\v');
++<STR>\\b strbuf_append_char('\b');
++<STR>\\f strbuf_append_char('\f');
++<STR>\\a strbuf_append_char('\a');
+
+-<str>\\(.|\n) strbuf_append_char(yytext[1]);
+-<str>[^\\\n\"]+ strbuf_append_charp(yytext);
++<STR>\\(.|\n) strbuf_append_char(yytext[1]);
++<STR>[^\\\n\"]+ strbuf_append_charp(yytext);
+
+ [aA][nN][dD] return AND;
+ [oO][rR] return OR;
diff --git a/recipes/iproute2/iproute2_2.6.29.bb b/recipes/iproute2/iproute2_2.6.29.bb
new file mode 100644
index 0000000000..d02573a359
--- /dev/null
+++ b/recipes/iproute2/iproute2_2.6.29.bb
@@ -0,0 +1,11 @@
+require iproute2.inc
+
+PR = "r1"
+
+SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}.tar.bz2 \
+ file://new-flex-fix.patch;patch=1 \
+ file://compilation-fix.patch;patch=1 \
+ "
+
+S = "${WORKDIR}/iproute2-${PV}"
+
diff --git a/recipes/iptraf/iptraf-3.0.0/support-makefile.patch b/recipes/iptraf/iptraf-3.0.0/support-makefile.patch
new file mode 100644
index 0000000000..59fe43b590
--- /dev/null
+++ b/recipes/iptraf/iptraf-3.0.0/support-makefile.patch
@@ -0,0 +1,18 @@
+--- iptraf-3.0.0/support/Makefile.orig 2002-07-19 12:31:48.000000000 -0400
++++ iptraf-3.0.0/support/Makefile 2009-06-08 01:21:19.000000000 -0400
+@@ -7,12 +7,12 @@
+
+ libtextbox.a: $(OBJS)
+ rm -rf libtextbox.a
+- ar cq libtextbox.a $(OBJS)
+- ranlib libtextbox.a
++ $(AR) cq libtextbox.a $(OBJS)
++ $(RANLIB) libtextbox.a
+ # gcc -shared -o libtextbox.so $(OBJS)
+
+ %.o: %.c *.h
+- gcc -O2 -g -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $<
++# gcc -O2 -g -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $<
+
+ clean:
+ rm -rf *.o *~ libtextbox.a libtextbox.so
diff --git a/recipes/iptraf/iptraf_3.0.0.bb b/recipes/iptraf/iptraf_3.0.0.bb
new file mode 100644
index 0000000000..bbfad48d38
--- /dev/null
+++ b/recipes/iptraf/iptraf_3.0.0.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "Heavyweight console network bandwidth monitor"
+LICENSE = "GPLv2"
+DEPENDS = "ncurses"
+PR = "r0"
+
+SRC_URI = " \
+ ${DEBIAN_MIRROR}/main/i/iptraf/iptraf_${PV}.orig.tar.gz \
+ ${DEBIAN_MIRROR}/main/i/iptraf/iptraf_3.0.0-6.diff.gz;patch=1 \
+ file://support-makefile.patch;patch=1 \
+"
+
+# iptraf will store user filters etc. in /var/run/iptraf, which is probably
+# volatile.
+EXTRA_OEMAKE_append = " \
+ TARGET=${bindir} WORKDIR=${localstatedir}/run/iptraf DESTDIR=${D} \
+ INCLUDEDIR=-I../support \
+"
+
+do_compile(){
+ oe_runmake -C ${S}/src
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/src/iptraf ${D}${bindir}
+ install -m 0755 ${S}/src/rvnamed ${D}${bindir}
+
+ install -d ${D}${mandir}/man8
+ install -m 0644 ${S}/Documentation/iptraf.8 ${D}${mandir}/man8
+}
+
+PACKAGES =+ "${PN}-dns"
+DESCRIPTION_${PN}-dns = "Asynchronous reverse DNS lookup daemon for iptraf"
+FILES_${PN}-dns = "${bindir}/rvnamed"
diff --git a/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff b/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff
index 7ae92df468..0c9bbd8ea0 100644
--- a/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff
+++ b/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff
@@ -17,3 +17,21 @@
ICMP6_FILTER_SETBLOCKALL(&filter);
if (!working_recverr) {
+--- /tmp/ping6.c 2009-06-15 19:13:57.000000000 +0200
++++ iputils_20071127.orig/ping6.c 2009-06-15 19:14:40.000000000 +0200
+@@ -415,14 +415,9 @@
+ exit(2);
+ }
+ cmsg = (struct cmsghdr*)(cmsgbuf+cmsglen);
+- cmsglen += CMSG_SPACE(sizeof(*ipi));
+- cmsg->cmsg_len = CMSG_LEN(sizeof(*ipi));
++ cmsglen += CMSG_SPACE(sizeof(ipi));
+ cmsg->cmsg_level = SOL_IPV6;
+ cmsg->cmsg_type = IPV6_PKTINFO;
+-
+- ipi = (struct in6_pktinfo*)CMSG_DATA(cmsg);
+- memset(ipi, 0, sizeof(*ipi));
+- ipi->ipi6_ifindex = ifr.ifr_ifindex;
+ }
+
+ if ((whereto.sin6_addr.s6_addr16[0]&htons(0xff00)) == htons (0xff00)) {
diff --git a/recipes/iputils/iputils_20071127.bb b/recipes/iputils/iputils_20071127.bb
index 9235a65c52..3d0c8dcde5 100644
--- a/recipes/iputils/iputils_20071127.bb
+++ b/recipes/iputils/iputils_20071127.bb
@@ -3,9 +3,13 @@ DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
tracepath, tracepath6, ping, ping6 and arping."
SECTION = "console/network"
LICENSE ="BSD"
+DEPENDS = "docbook-utils-native"
+
+PR = "r1"
#Need more testing
DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_angstrom = "2"
SRC_URI = "http://ftp.de.debian.org/debian/pool/main/i/iputils/iputils_${PV}.orig.tar.gz \
file://debian/fix-dead-host-ping-stats.diff;patch=1 \
@@ -37,7 +41,7 @@ FILES_${PN}-doc = "${mandir}/man8"
do_compile () {
oe_runmake 'CC=${CC}' \
KERNEL_INCLUDE="${STAGING_INCDIR}" \
- LIBC_INCLUDE="${STAGING_INCDIR}"
+ LIBC_INCLUDE="${STAGING_INCDIR}" all man
}
do_install () {
@@ -52,7 +56,7 @@ do_install () {
done
# Manual pages for things we build packages for
for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
- install -m 0644 doc/$i ${D}${mandir}/man8/
+ install -m 0644 doc/$i ${D}${mandir}/man8/ || true
done
}
diff --git a/recipes/irda-utils/irda-utils/sbindir.patch b/recipes/irda-utils/irda-utils/sbindir.patch
new file mode 100644
index 0000000000..d985d3dc92
--- /dev/null
+++ b/recipes/irda-utils/irda-utils/sbindir.patch
@@ -0,0 +1,40 @@
+upstream: oe-only
+
+diff -upr irda-utils-0.9.16.old/irattach/Makefile irda-utils-0.9.16/irattach/Makefile
+--- irda-utils-0.9.16.old/irattach/Makefile 2009-06-13 12:54:18.000000000 +0100
++++ irda-utils-0.9.16/irattach/Makefile 2009-06-13 12:51:58.000000000 +0100
+@@ -62,8 +62,8 @@ dongle_attach: dongle_attach.o
+ $(CC) $(CFLAGS) $(INCLUDES) -c $<
+
+ install: $(TARGETS)
+- install irattach $(ROOT)/usr/sbin
+- install dongle_attach $(ROOT)/usr/sbin
++ install irattach $(ROOT)$(sbindir)
++ install dongle_attach $(ROOT)$(sbindir)
+
+ clean:
+ $(RM_CMD)
+diff -upr irda-utils-0.9.16.old/irdaping/Makefile irda-utils-0.9.16/irdaping/Makefile
+--- irda-utils-0.9.16.old/irdaping/Makefile 2009-06-13 12:54:18.000000000 +0100
++++ irda-utils-0.9.16/irdaping/Makefile 2009-06-13 12:52:15.000000000 +0100
+@@ -58,7 +58,7 @@ irdaping: $(OBJS)
+ $(CC) $(CFLAGS) $(INCLUDES) -c $<
+
+ install: all
+- install irdaping $(ROOT)/usr/sbin
++ install irdaping $(ROOT)$(sbindir)
+
+ clean::
+ $(RM_CMD)
+diff -upr irda-utils-0.9.16.old/Makefile irda-utils-0.9.16/Makefile
+--- irda-utils-0.9.16.old/Makefile 2004-03-31 22:55:40.000000000 +0100
++++ irda-utils-0.9.16/Makefile 2009-06-13 12:51:37.000000000 +0100
+@@ -40,7 +40,7 @@ all:
+
+ install:
+ for i in $(DIRS); do \
+- cd $$i;make install; cd ..; \
++ cd $$i;make bindir="$(bindir)" sbindir="$(sbindir)" install; cd ..; \
+ done
+
+ clean:
diff --git a/recipes/irda-utils/irda-utils_0.9.16.bb b/recipes/irda-utils/irda-utils_0.9.16.bb
index 1d9d184a9b..d5c36f650e 100644
--- a/recipes/irda-utils/irda-utils_0.9.16.bb
+++ b/recipes/irda-utils/irda-utils_0.9.16.bb
@@ -9,6 +9,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
file://configure.patch;patch=1 \
file://m4.patch;patch=1 \
file://ldflags.patch;patch=1 \
+ file://sbindir.patch;patch=1 \
file://init"
export SYS_INCLUDES="-I${STAGING_INCDIR}"
@@ -25,8 +26,8 @@ do_compile () {
do_install () {
install -d ${D}${sbindir}
- oe_runmake -C irattach ROOT="${D}" install
- oe_runmake -C irdaping ROOT="${D}" install
+ oe_runmake -C irattach ROOT="${D}" sbindir="${sbindir}" install
+ oe_runmake -C irdaping ROOT="${D}" sbindir="${sbindir}" install
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
diff --git a/recipes/irssi/irssi_0.8.13.bb b/recipes/irssi/irssi_0.8.13.bb
new file mode 100644
index 0000000000..9091ddc4bf
--- /dev/null
+++ b/recipes/irssi/irssi_0.8.13.bb
@@ -0,0 +1,61 @@
+DESCRIPTION = "Irssi is a modular IRC client with Perl scripting."
+HOMEPAGE = "http://irssi.org/"
+SECTION = "console/network"
+LICENSE = "GPL"
+DEPENDS += "ncurses glib-2.0"
+
+PACKAGES += "${PN}-common"
+FILES_${PN} = "${bindir}/irssi"
+FILES_${PN}-common = "${datadir}/irssi ${sysconfdir}"
+RDEPENDS_${PN} += "${PN}-common"
+
+inherit autotools
+
+SRC_URI = "http://www.irssi.org/files/${P}.tar.bz2 \
+"
+
+EXTRA_OECONF = "--enable-ipv6 \
+ --disable-ssl \
+ --disable-glibtest \
+ --without-socks \
+ --with-textui \
+ --without-bot \
+ --without-proxy \
+ --with-perl=no \
+ --with-ncurses=${STAGING_LIBDIR}/.."
+
+do_configure () {
+ # create help files
+ echo "Creating help files..."
+ perl syntax.pl
+
+ files=`echo docs/help/in/*.in|sed -e 's,docs/help/in/Makefile.in ,,' -e 's,docs/help/in/,!,g' -e 's/\.in /.in ?/g'`
+ cat docs/help/in/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/in/Makefile.am
+
+ files=`echo $files|sed 's/\.in//g'`
+ cat docs/help/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/Makefile.am
+
+ # .HTML -> .txt with lynx
+ # echo "Documentation: html -> txt..."
+ # lynx -dump -nolist docs/faq.html|perl -pe 's/^ *//; if ($_ eq "\n" && $state eq "Q") { $_ = ""; } elsif (/^([QA]):/) { $state = $1 } elsif ($_ ne "\n") { $_ = " $_"; };' > docs/faq.txt
+ > docs/faq.txt
+
+ autotools_do_configure
+}
+
+do_stage () {
+ find . -name \*.h | for h in `cat`; do
+ install -d ${STAGING_LIBDIR}/../irssi/`dirname $h`
+ install -m 0644 $h ${STAGING_LIBDIR}/../irssi/$h
+ done
+ find . -name lib\*.a | for l in `cat`; do
+ install -d ${STAGING_LIBDIR}/../irssi/`dirname $l`
+ install -m 0644 $l ${STAGING_LIBDIR}/../irssi/$l
+ done
+ install -m 0644 irssi-config ${STAGING_LIBDIR}/../irssi/
+}
+
+do_install () {
+ autotools_do_install
+ rm -f ${D}${docdir}/irssi/faq.txt
+}
diff --git a/recipes/jamvm/jamvm-native_1.5.2.bb b/recipes/jamvm/jamvm-native_1.5.2.bb
deleted file mode 100644
index e174e2a312..0000000000
--- a/recipes/jamvm/jamvm-native_1.5.2.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require jamvm-native.inc
-
-PR = "r0"
-
diff --git a/recipes/jamvm/jamvm-native_1.5.3.bb b/recipes/jamvm/jamvm-native_1.5.3.bb
new file mode 100644
index 0000000000..07a213c260
--- /dev/null
+++ b/recipes/jamvm/jamvm-native_1.5.3.bb
@@ -0,0 +1,6 @@
+# Note: You *must* use this together with classpath-native 0.98. Otherwise it won't work!
+
+require jamvm-native.inc
+
+PR = "r0"
+
diff --git a/recipes/jards/jards_1.0.bb b/recipes/jards/jards_1.0.bb
index c0504ae88c..8f51b4309d 100644
--- a/recipes/jards/jards_1.0.bb
+++ b/recipes/jards/jards_1.0.bb
@@ -4,8 +4,8 @@ HOMEPAGE = "http://gakusei.sf.net"
SECTION = "opie/applications"
PRIORITY = "optional"
LICENSE = "GPL"
-RDEPENDS = "virtual/japanese-font qte-mt libpng (>= 1) kpengine"
-PR = "r7"
+RDEPENDS = "virtual-japanese-font qte-mt libpng (>= 1) kpengine"
+PR = "r8"
# stuff that still needs fixing
#) is the RDEPENDS line correct and sufficient?
diff --git a/recipes/justreader/files/correct-settings-path.patch b/recipes/justreader/files/correct-settings-path.patch
index e33bf37620..695edc1828 100644
--- a/recipes/justreader/files/correct-settings-path.patch
+++ b/recipes/justreader/files/correct-settings-path.patch
@@ -1,3 +1,4 @@
+upstream: http://sf.net/tracker/?func=detail&aid=1115394&group_id=61928&atid=498857
#
# Patch managed by http://www.holgerschurig.de/patcher.html
diff --git a/recipes/kakasi/kakasi-native_2.3.4.bb b/recipes/kakasi/kakasi-native_2.3.4.bb
index 86a4c81b44..18f0061cfe 100644
--- a/recipes/kakasi/kakasi-native_2.3.4.bb
+++ b/recipes/kakasi/kakasi-native_2.3.4.bb
@@ -2,8 +2,6 @@ require kakasi.inc
inherit native
-S = "${WORKDIR}/kakasi-${PV}"
-
do_stage() {
install src/mkkanwa ${STAGING_BINDIR}
}
diff --git a/recipes/kanatest/kanatest.inc b/recipes/kanatest/kanatest.inc
index 254091c60c..64f87616c2 100644
--- a/recipes/kanatest/kanatest.inc
+++ b/recipes/kanatest/kanatest.inc
@@ -1,14 +1,19 @@
-SECTION = "gpe/games"
DESCRIPTION = "Hiragana and Katakana drill tool"
+HOMEPAGE = "http://clayo.org/kanatest/
+SECTION = "gpe/games"
LICENSE = "GPL"
-
DEPENDS = "gtk+"
-FILES_${PN} = "${bindir}/${PN} ${datadir}/${PN} ${datadir}/pixmaps ${datadir}/applications"
+SRC_URI = "http://clayo.org/kanatest/${PN}-${PV}.tar.gz \
+ file://${PN}.desktop"
inherit autotools gettext
+CFLAGS += "-D_GNU_SOURCE"
+
do_install_append () {
install -d ${D}${datadir}/applications/
install -m 0644 ${WORKDIR}/${PN}.desktop ${D}${datadir}/applications/${PN}.desktop
}
+
+FILES_${PN} = "${bindir}/${PN} ${datadir}/${PN} ${datadir}/pixmaps ${datadir}/applications"
diff --git a/recipes/kanatest/kanatest_0.3.6.bb b/recipes/kanatest/kanatest_0.3.6.bb
index f0b17a2af9..809812f1ce 100644
--- a/recipes/kanatest/kanatest_0.3.6.bb
+++ b/recipes/kanatest/kanatest_0.3.6.bb
@@ -1,8 +1,5 @@
-PR = "r0"
-
-SRC_URI = "http://clay.ll.pl/download/${PN}-${PV}.tar.gz file://${PN}.desktop"
-
require kanatest.inc
-CFLAGS += "-D_GNU_SOURCE"
-
+PR = "r1"
+SRC_URI = "${DEBIAN_MIRROR}/main/k/kanatest/${PN}_${PV}.orig.tar.gz \
+ file://${PN}.desktop"
diff --git a/recipes/kanatest/kanatest_0.4.8.bb b/recipes/kanatest/kanatest_0.4.8.bb
new file mode 100644
index 0000000000..1d71e27db2
--- /dev/null
+++ b/recipes/kanatest/kanatest_0.4.8.bb
@@ -0,0 +1,3 @@
+require kanatest.inc
+
+PR = "r0"
diff --git a/recipes/kexec/files/kexec2-klibc.patch b/recipes/kexec/files/kexec2-klibc.patch
index b80848d291..a7dbe61d13 100644
--- a/recipes/kexec/files/kexec2-klibc.patch
+++ b/recipes/kexec/files/kexec2-klibc.patch
@@ -55,19 +55,16 @@ Index: kexec-tools-2.0.0/kexec/ifdown.c
#include <netinet/in.h>
Index: kexec-tools-2.0.0/purgatory/Makefile
===================================================================
---- kexec-tools-2.0.0.orig/purgatory/Makefile 2009-04-24 14:15:34.037827479 +0100
-+++ kexec-tools-2.0.0/purgatory/Makefile 2009-04-24 14:15:47.022825503 +0100
-@@ -55,9 +54,7 @@
- -I$(srcdir)/purgatory/arch/$(ARCH)/include \
- -I$(srcdir)/util_lib/include \
- -I$(shell $(CC) -print-file-name=include)
--$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
-- --no-undefined -nostartfiles -nostdlib -nodefaultlibs \
-- -e purgatory_start -r
-+$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)
+--- kexec-tools-2.0.0.orig/purgatory/Makefile 2009-05-19 14:15:34.037827479 +0100
++++ kexec-tools-2.0.0/purgatory/Makefile 2009-05-19 14:15:47.022825503 +0100
+@@ -47,6 +47,7 @@
+ $(PURGATORY): CC=$(TARGET_CC)
+ $(PURGATORY): CFLAGS+=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
+ -Os -fno-builtin -ffreestanding \
++ -nostdinc \
+ -fno-zero-initialized-in-bss
- $(PURGATORY): $(PURGATORY_OBJS)
- $(MKDIR) -p $(@D)
+ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
Index: kexec-tools-2.0.0/purgatory/purgatory.c
===================================================================
--- kexec-tools-2.0.0.orig/purgatory/purgatory.old 2009-05-16 13:28:19.000000000 +0200
diff --git a/recipes/kexec/kexec-tools-static_1.101.bb b/recipes/kexec/kexec-tools-klibc-static_1.101.bb
index ea44b57cf1..4ad59ce257 100644
--- a/recipes/kexec/kexec-tools-static_1.101.bb
+++ b/recipes/kexec/kexec-tools-klibc-static_1.101.bb
@@ -16,8 +16,7 @@ export CFLAGS=""
export CPPFLAGS=""
export LDFLAGS=""
-PACKAGES =+ "kexec-static kdump-static"
-
-FILES_kexec-static = "${sbindir}/kexec"
-FILES_kdump-static = "${sbindir}/kdump"
+PACKAGES =+ "kexec-klibc-static kdump-klibc-static"
+FILES_kexec-klibc-static = "${sbindir}/kexec"
+FILES_kdump-klibc-static = "${sbindir}/kdump"
diff --git a/recipes/kexec/kexec-tools-static_2.0.0.bb b/recipes/kexec/kexec-tools-klibc-static_2.0.0.bb
index a0d02aa9ac..da12db185b 100644
--- a/recipes/kexec/kexec-tools-static_2.0.0.bb
+++ b/recipes/kexec/kexec-tools-klibc-static_2.0.0.bb
@@ -18,7 +18,7 @@ export CFLAGS=""
export CPPFLAGS=""
export LDFLAGS=""
-PACKAGES =+ "kexec-static kdump-static"
+PACKAGES =+ "kexec-klibc-static kdump-klibc-static"
-FILES_kexec-static = "${sbindir}/kexec"
-FILES_kdump-static = "${sbindir}/kdump"
+FILES_kexec-klibc-static = "${sbindir}/kexec"
+FILES_kdump-klibc-static = "${sbindir}/kdump"
diff --git a/recipes/kexecboot/kexecboot.inc b/recipes/kexecboot/kexecboot.inc
index 5f3f34948e..ebd193beea 100644
--- a/recipes/kexecboot/kexecboot.inc
+++ b/recipes/kexecboot/kexecboot.inc
@@ -1,7 +1,7 @@
LICENSE = "GPL"
DEPENDS = "klibc"
-RDEPENDS = "kexec-static"
+RDEPENDS_${PN} = "kexec-klibc-static"
inherit autotools
diff --git a/recipes/kexecboot/kexecboot_0.4.bb b/recipes/kexecboot/kexecboot_0.4.bb
index da93aeb34e..cf647a2c87 100644
--- a/recipes/kexecboot/kexecboot_0.4.bb
+++ b/recipes/kexecboot/kexecboot_0.4.bb
@@ -1,6 +1,6 @@
PR = "r6"
-SRC_URI = "http://projects.linuxtogo.org/frs/?group_id=50/kexecboot-${PV}.tar.gz \
+SRC_URI = "http://kexecboot.home.linuxtogo.org/kexecboot-${PV}.tar.gz \
file://add-reboot-option.patch;patch=1 \
file://scan_devices-top.patch;patch=1 \
file://graphical-no-devices.patch;patch=1 \
diff --git a/recipes/kexecboot/kexecboot_0.5.bb b/recipes/kexecboot/kexecboot_0.5.bb
index f4474f7136..04ab2772b4 100644
--- a/recipes/kexecboot/kexecboot_0.5.bb
+++ b/recipes/kexecboot/kexecboot_0.5.bb
@@ -1,5 +1,5 @@
PR = "r1"
-SRC_URI = "http://projects.linuxtogo.org/frs/?group_id=50/kexecboot-${PV}.tar.gz "
+SRC_URI = "http://kexecboot.home.linuxtogo.org/kexecboot-${PV}.tar.gz"
require kexecboot.inc
diff --git a/recipes/kexecboot/linux-kexecboot-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch b/recipes/kexecboot/linux-kexecboot-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
new file mode 100644
index 0000000000..9d7020d9f1
--- /dev/null
+++ b/recipes/kexecboot/linux-kexecboot-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
@@ -0,0 +1,15 @@
+Index: linux-2.6.24/include/linux/time.h
+===================================================================
+--- a/include/linux/time.h
++++ b/include/linux/time.h
+@@ -172,6 +172,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
+ {
+ 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/recipes/kexecboot/linux-kexecboot.inc b/recipes/kexecboot/linux-kexecboot.inc
index fb3816b348..5193212912 100644
--- a/recipes/kexecboot/linux-kexecboot.inc
+++ b/recipes/kexecboot/linux-kexecboot.inc
@@ -1,12 +1,12 @@
# We set PR here, since a change in the kexecboot recipe will need to get picked up by *all* the kernels:
-PR = "r12"
+PR = "r13"
SRC_URI = "file://defconfig"
LOGO_SIZE = '${@base_conditional("GUI_MACHINE_CLASS", "bigscreen", "vga", "qvga", d)}'
SRC_URI += "file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2"
-require recipes/linux/linux.inc
+require ../linux/linux.inc
DONT_CHECK_KERNELSIZE = ""
INITRAMFS_IMAGE = "initramfs-kexecboot-image"
diff --git a/recipes/kexecboot/linux-kexecboot_2.6.24.bb b/recipes/kexecboot/linux-kexecboot_2.6.24.bb
index f728c7adc1..82484f45a0 100644
--- a/recipes/kexecboot/linux-kexecboot_2.6.24.bb
+++ b/recipes/kexecboot/linux-kexecboot_2.6.24.bb
@@ -21,6 +21,7 @@ DEFAULT_PREFERENCE_spitz = "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.24.tar.bz2 \
+ file://0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch;patch=1 \
${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 \
diff --git a/recipes/keymaps/keymaps_1.0.bb b/recipes/keymaps/keymaps_1.0.bb
index 5b48fd0f90..4a31fefd2b 100644
--- a/recipes/keymaps/keymaps_1.0.bb
+++ b/recipes/keymaps/keymaps_1.0.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "Keyboard map"
SECTION = "base"
-RDEPENDS = "initscripts console-tools"
+RDEPENDS_${PN} = "initscripts console-tools"
LICENSE = "GPL"
PACKAGE_ARCH = "${MACHINE}"
PR = "r21"
diff --git a/recipes/kismet/kismet-2007-10-R1/fix_strip.patch b/recipes/kismet/files/fix_strip.patch
index 54e7a9b1b7..54e7a9b1b7 100644
--- a/recipes/kismet/kismet-2007-10-R1/fix_strip.patch
+++ b/recipes/kismet/files/fix_strip.patch
diff --git a/recipes/kismet/kismet-2007-10-R1/string_h.patch b/recipes/kismet/kismet-2007-10-R1/string_h.patch
new file mode 100644
index 0000000000..363664fb6f
--- /dev/null
+++ b/recipes/kismet/kismet-2007-10-R1/string_h.patch
@@ -0,0 +1,36 @@
+Index: kismet-2007-10-R1/kismet_wrapper.cc
+===================================================================
+--- kismet-2007-10-R1.orig/kismet_wrapper.cc 2007-10-06 21:50:03.000000000 +0000
++++ kismet-2007-10-R1/kismet_wrapper.cc 2009-05-26 12:58:01.000000000 +0000
+@@ -25,6 +25,7 @@
+ #include <sys/wait.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include <string.h>
+
+ #include "config.h"
+
+Index: kismet-2007-10-R1/ringbuf.cc
+===================================================================
+--- kismet-2007-10-R1.orig/ringbuf.cc 2005-12-11 19:14:39.000000000 +0000
++++ kismet-2007-10-R1/ringbuf.cc 2009-05-26 12:56:17.000000000 +0000
+@@ -17,6 +17,7 @@
+ */
+
+ #include "ringbuf.h"
++#include <string.h>
+
+ RingBuffer::RingBuffer(int in_size) {
+ ring_len = in_size;
+Index: kismet-2007-10-R1/util.cc
+===================================================================
+--- kismet-2007-10-R1.orig/util.cc 2006-08-28 20:37:29.000000000 +0000
++++ kismet-2007-10-R1/util.cc 2009-05-26 12:57:00.000000000 +0000
+@@ -22,6 +22,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <string.h>
+
+ // We need this to make uclibc happy since they don't even have rintf...
+ #ifndef rintf
diff --git a/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-crash.diff b/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-crash.diff
new file mode 100644
index 0000000000..4c1d3a2360
--- /dev/null
+++ b/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-crash.diff
@@ -0,0 +1,20 @@
+--- kismet_wrapper.cc
++++ kismet_wrapper.cc
+@@ -79,7 +79,7 @@ void reap(int sig) {
+ if (FD_ISSET(epipe[0], &rset)) {
+ if (fgets(ret, 2048, err) == NULL ||
+ feof(err)) {
+- if (feof(out))
++ if (!check_out || feof(out))
+ break;
+
+ fclose(err);
+@@ -98,7 +98,7 @@ void reap(int sig) {
+ if (FD_ISSET(rpipe[0], &rset)) {
+ if (fgets(ret, 2048, out) == NULL ||
+ feof(out)) {
+- if (feof(err))
++ if (!check_err || feof(err))
+ break;
+
+ fclose(out);
diff --git a/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-fmt.diff b/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-fmt.diff
new file mode 100644
index 0000000000..032f92ba22
--- /dev/null
+++ b/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-fmt.diff
@@ -0,0 +1,11 @@
+--- gpsmap.cc
++++ gpsmap.cc
+@@ -3825,7 +3825,7 @@
+ else if (tok == "location")
+ network_labels.push_back(NETLABEL_LOCATION);
+ else {
+- fprintf(stderr, "Invalid label '%s'\n", tok.c_str());
++ fprintf(stderr, "Invalid label '%zs'\n", tok.c_str());
+ exit(1);
+ }
+ }
diff --git a/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-infinite-loop.diff b/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-infinite-loop.diff
new file mode 100644
index 0000000000..f8417943e8
--- /dev/null
+++ b/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-infinite-loop.diff
@@ -0,0 +1,20 @@
+--- gpsmap.cc
++++ gpsmap.cc
+@@ -874,7 +874,7 @@
+
+ // Break up the path to the gpsxml file and form a path based on that
+ unsigned int lastslash = 0;
+- for (unsigned int x = origxmlfile.find('/'); x != string::npos;
++ for (string::size_type x = origxmlfile.find('/'); x != string::npos;
+ lastslash = x, x = origxmlfile.find('/', lastslash+1)) {
+ // We don't actually need to do anything...
+ }
+@@ -882,7 +882,7 @@
+ comp = origxmlfile.substr(0, lastslash);
+
+ lastslash = 0;
+- for (unsigned int x = orignetfile.find('/'); x != string::npos;
++ for (string::size_type x = orignetfile.find('/'); x != string::npos;
+ lastslash = x, x = orignetfile.find('/', lastslash+1)) {
+ // We don't actually need to do anything...
+ }
diff --git a/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-nonvoid.diff b/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-nonvoid.diff
new file mode 100644
index 0000000000..e068f8dac5
--- /dev/null
+++ b/recipes/kismet/kismet-2008-05-R1/kismet-2008-05-R1-nonvoid.diff
@@ -0,0 +1,10 @@
+--- pcapsource.cc
++++ pcapsource.cc
+@@ -2914,6 +2914,7 @@
+ return -1;
+
+ }
++ return -1;
+ }
+ #endif
+
diff --git a/recipes/kismet/kismet_2007-10-R1.bb b/recipes/kismet/kismet_2007-10-R1.bb
index 4786543ec8..ac3c56f156 100644
--- a/recipes/kismet/kismet_2007-10-R1.bb
+++ b/recipes/kismet/kismet_2007-10-R1.bb
@@ -1,5 +1,6 @@
require kismet.inc
-SRC_URI += "file://fix_strip.patch;patch=1"
+SRC_URI += "file://fix_strip.patch;patch=1 \
+ file://string_h.patch;patch=1"
PR = "r5"
diff --git a/recipes/kismet/kismet_2008-05-R1.bb b/recipes/kismet/kismet_2008-05-R1.bb
new file mode 100644
index 0000000000..c413ed508a
--- /dev/null
+++ b/recipes/kismet/kismet_2008-05-R1.bb
@@ -0,0 +1,10 @@
+require kismet.inc
+
+# patches *.diff are from openSUSE
+SRC_URI += "file://kismet-2008-05-R1-crash.diff;patch=1;pnum=0 \
+ file://kismet-2008-05-R1-fmt.diff;patch=1;pnum=0 \
+ file://kismet-2008-05-R1-infinite-loop.diff;patch=1;pnum=0 \
+ file://kismet-2008-05-R1-nonvoid.diff;patch=1;pnum=0 \
+ file://fix_strip.patch;patch=1"
+
+PR = "r0"
diff --git a/recipes/krb/files/copyperms.patch b/recipes/krb/files/copyperms.patch
new file mode 100644
index 0000000000..b0abb72cf0
--- /dev/null
+++ b/recipes/krb/files/copyperms.patch
@@ -0,0 +1,12 @@
+diff -urN src.old/config/pre.in src/config/pre.in
+--- src.old/config/pre.in 2006-10-15 19:19:28.000000000 +0100
++++ src/config/pre.in 2009-05-17 21:28:54.000000000 +0100
+@@ -258,7 +258,7 @@
+ transform = @program_transform_name@
+
+ RM = rm -f
+-CP = cp
++CP = cp -f
+ MV = mv -f
+ CHMOD=chmod
+ RANLIB = @RANLIB@
diff --git a/recipes/krb/krb5_1.6.3.bb b/recipes/krb/krb5_1.6.3.bb
index 5fc75b4c7e..f11bdb2192 100644
--- a/recipes/krb/krb5_1.6.3.bb
+++ b/recipes/krb/krb5_1.6.3.bb
@@ -1,14 +1,15 @@
DESCRIPTION = "A network authentication protocol"
HOMEPAGE = "http://web.mit.edu/Kerberos/"
SECTION = "console/network"
-PR = "r5"
+PR = "r6"
LICENSE = "MIT"
-DEPENDS = "perl-native ncurses e2fsprogs-libs"
+DEPENDS = "perl-native ncurses e2fsprogs-libs e2fsprogs-native"
inherit autotools binconfig
SRC_URI = "http://web.mit.edu/kerberos/dist/krb5/1.6/krb5-1.6.3-signed.tar \
- file://fix-uclibc-ruserpass-collision.patch"
+ file://fix-uclibc-ruserpass-collision.patch \
+ file://copyperms.patch"
S = "${WORKDIR}/${PN}-${PV}/src/"
# Will clean this up...
@@ -23,6 +24,7 @@ FILES_${PN}-doc += /usr/share/examples
krb5_do_unpack() {
tar xzf ${WORKDIR}/krb5-1.6.3.tar.gz -C ${WORKDIR}/
patch -d ${S} -p1 < ${WORKDIR}/fix-uclibc-ruserpass-collision.patch
+ patch -d ${S} -p1 < ${WORKDIR}/copyperms.patch
}
python do_unpack() {
diff --git a/recipes/libaio/libaio-oracle_0.3.0.bb b/recipes/libaio/libaio-oracle_0.3.0.bb
index 04cacae4fd..9a11c7c658 100644
--- a/recipes/libaio/libaio-oracle_0.3.0.bb
+++ b/recipes/libaio/libaio-oracle_0.3.0.bb
@@ -4,7 +4,8 @@
DESCRIPTION="This is a library for accessing the new AIO system calls (asynchronous i/o) for the Linux kernel."
HOMEPAGE="http://oss.oracle.com/projects/libaio-oracle"
-LICENSE="GPL"
+LICENSE="LGPL"
+PR = "r1"
SRC_URI="http://oss.oracle.com/projects/libaio-oracle/dist/files/${PN}-${PV}.tar.gz"
@@ -31,4 +32,3 @@ do_stage() {
rm -f ${STAGE_TEMP}/usr/lib/*.la
oe_libinstall -a -so -C ${STAGE_TEMP}/usr/lib libaio-oracle ${STAGING_LIBDIR}
}
-
diff --git a/recipes/libdlo/kernel-module-udlfb.bb b/recipes/libdlo/kernel-module-udlfb.bb
new file mode 100644
index 0000000000..10e83c4caa
--- /dev/null
+++ b/recipes/libdlo/kernel-module-udlfb.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Framebuffer console driver for displaylink based usb devices"
+LICENSE = "GPLv2"
+
+PV = "0.2.3"
+
+SRC_URI = "file://udlfb.c \
+ file://udlfb.h \
+ file://Makefile \
+"
+
+inherit module
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/drivers/usb/
+ install -m 0644 *.ko ${D}/lib/modules/${KERNEL_VERSION}/drivers/usb/
+}
+
diff --git a/recipes/libdlo/kernel-module-udlfb/Makefile b/recipes/libdlo/kernel-module-udlfb/Makefile
new file mode 100644
index 0000000000..255d3f5480
--- /dev/null
+++ b/recipes/libdlo/kernel-module-udlfb/Makefile
@@ -0,0 +1,15 @@
+ifndef KERNELRELEASE
+
+PWD := $(shell pwd)
+all:
+ $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules
+clean:
+ rm -f *.o *.ko *.mod.* .*.cmd Module.symvers
+ rm -rf .tmp_versions
+
+install:
+ $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules_install
+
+else
+ obj-m := udlfb.o
+endif
diff --git a/recipes/libdlo/kernel-module-udlfb/udlfb.c b/recipes/libdlo/kernel-module-udlfb/udlfb.c
new file mode 100644
index 0000000000..7468bca476
--- /dev/null
+++ b/recipes/libdlo/kernel-module-udlfb/udlfb.c
@@ -0,0 +1,938 @@
+/*****************************************************************************
+ * DLFB Kernel Driver *
+ * Version 0.2 (udlfb) *
+ * (C) 2009 Roberto De Ioris <roberto@unbit.it> *
+ * *
+ * This file is licensed under the GPLv2. See COPYING in the package. *
+ * Based on the amazing work of Florian Echtler and libdlo 0.1 *
+ * *
+ * *
+ * 10.06.09 release 0.2.3 (edid ioctl, fallback for unsupported modes) *
+ * 05.06.09 release 0.2.2 (real screen blanking, rle compression, double buffer) *
+ * 31.05.09 release 0.2 *
+ * 22.05.09 First public (ugly) release *
+ *****************************************************************************/
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+#include <linux/uaccess.h>
+#include <linux/mm.h>
+#include <linux/fb.h>
+#include <linux/mutex.h>
+#include <linux/vmalloc.h>
+
+#include "udlfb.h"
+
+#define DRIVER_VERSION "DLFB 0.2"
+
+/* memory functions taken from vfb */
+
+static void *rvmalloc(unsigned long size)
+{
+ void *mem;
+ unsigned long adr;
+
+ size = PAGE_ALIGN(size);
+ mem = vmalloc_32(size);
+ if (!mem)
+ return NULL;
+
+ memset(mem, 0, size); /* Clear the ram out, no junk to the user */
+ adr = (unsigned long)mem;
+ while (size > 0) {
+ SetPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+
+ return mem;
+}
+
+static void rvfree(void *mem, unsigned long size)
+{
+ unsigned long adr;
+
+ if (!mem)
+ return;
+
+ adr = (unsigned long)mem;
+ while ((long)size > 0) {
+ ClearPageReserved(vmalloc_to_page((void *)adr));
+ adr += PAGE_SIZE;
+ size -= PAGE_SIZE;
+ }
+ vfree(mem);
+}
+
+static int dlfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
+{
+ unsigned long start = vma->vm_start;
+ unsigned long size = vma->vm_end - vma->vm_start;
+ unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
+ unsigned long page, pos;
+
+ printk("MMAP: %lu %u\n", offset + size, info->fix.smem_len);
+
+ if (offset + size > info->fix.smem_len)
+ return -EINVAL;
+
+ pos = (unsigned long)info->fix.smem_start + offset;
+
+ while (size > 0) {
+ page = vmalloc_to_pfn((void *)pos);
+ if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
+ return -EAGAIN;
+
+ start += PAGE_SIZE;
+ pos += PAGE_SIZE;
+ if (size > PAGE_SIZE)
+ size -= PAGE_SIZE;
+ else
+ size = 0;
+ }
+
+ vma->vm_flags |= VM_RESERVED; /* avoid to swap out this VMA */
+ return 0;
+
+}
+
+/* ioctl structure */
+struct dloarea {
+ int x, y;
+ int w, h;
+ int x2, y2;
+};
+
+/*
+static struct usb_device_id id_table [] = {
+ { USB_DEVICE(0x17e9, 0x023d) },
+ { }
+};
+*/
+
+static struct usb_device_id id_table[] = {
+ {.idVendor = 0x17e9, .match_flags = USB_DEVICE_ID_MATCH_VENDOR,},
+ {},
+};
+MODULE_DEVICE_TABLE(usb, id_table);
+
+static struct usb_driver dlfb_driver;
+
+// thanks to Henrik Bjerregaard Pedersen for this function
+static char *rle_compress16(uint16_t * src, char *dst, int rem)
+{
+
+ int rl;
+ uint16_t pix0;
+ char *end_if_raw = dst + 6 + 2 * rem;
+
+ dst += 6; // header will be filled in if RLE is worth it
+
+ while (rem && dst < end_if_raw) {
+ char *start = (char *)src;
+
+ pix0 = *src++;
+ rl = 1;
+ rem--;
+ while (rem && *src == pix0)
+ rem--, rl++, src++;
+ *dst++ = rl;
+ *dst++ = start[1];
+ *dst++ = start[0];
+ }
+
+ return dst;
+}
+
+/*
+Thanks to Henrik Bjerregaard Pedersen for rle implementation and code refactoring.
+Next step is huffman compression.
+*/
+
+static int
+image_blit(struct dlfb_data *dev_info, int x, int y, int width, int height,
+ char *data)
+{
+
+ int i, j, base;
+ int rem = width;
+ int ret;
+
+ int firstdiff, thistime;
+
+ char *bufptr;
+
+ if (x + width > dev_info->info->var.xres)
+ return -EINVAL;
+
+ if (y + height > dev_info->info->var.yres)
+ return -EINVAL;
+
+ mutex_lock(&dev_info->bulk_mutex);
+
+ base =
+ dev_info->base16 + ((dev_info->info->var.xres * 2 * y) + (x * 2));
+
+ data += (dev_info->info->var.xres * 2 * y) + (x * 2);
+
+ /* printk("IMAGE_BLIT\n"); */
+
+ bufptr = dev_info->buf;
+
+ for (i = y; i < y + height; i++) {
+
+ if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) {
+ ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+ bufptr = dev_info->buf;
+ }
+
+ rem = width;
+
+ /* printk("WRITING LINE %d\n", i); */
+
+ while (rem) {
+
+ if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) {
+ ret =
+ dlfb_bulk_msg(dev_info,
+ bufptr - dev_info->buf);
+ bufptr = dev_info->buf;
+ }
+ // number of pixels to consider this time
+ thistime = rem;
+ if (thistime > 255)
+ thistime = 255;
+
+ // find position of first pixel that has changed
+ firstdiff = -1;
+ for (j = 0; j < thistime * 2; j++) {
+ if (dev_info->backing_buffer
+ [base - dev_info->base16 + j] != data[j]) {
+ firstdiff = j / 2;
+ break;
+ }
+ }
+
+ if (firstdiff >= 0) {
+ char *end_of_rle;
+
+ end_of_rle =
+ rle_compress16((uint16_t *) (data +
+ firstdiff * 2),
+ bufptr,
+ thistime - firstdiff);
+
+ if (end_of_rle <
+ bufptr + 6 + 2 * (thistime - firstdiff)) {
+ bufptr[0] = 0xAF;
+ bufptr[1] = 0x69;
+
+ bufptr[2] =
+ (char)((base +
+ firstdiff * 2) >> 16);
+ bufptr[3] =
+ (char)((base + firstdiff * 2) >> 8);
+ bufptr[4] =
+ (char)(base + firstdiff * 2);
+ bufptr[5] = thistime - firstdiff;
+
+ bufptr = end_of_rle;
+
+ } else {
+ // fallback to raw (or some other encoding?)
+ *bufptr++ = 0xAF;
+ *bufptr++ = 0x68;
+
+ *bufptr++ =
+ (char)((base +
+ firstdiff * 2) >> 16);
+ *bufptr++ =
+ (char)((base + firstdiff * 2) >> 8);
+ *bufptr++ =
+ (char)(base + firstdiff * 2);
+ *bufptr++ = thistime - firstdiff;
+ // PUT COMPRESSION HERE
+ for (j = firstdiff * 2;
+ j < thistime * 2; j += 2) {
+ *bufptr++ = data[j + 1];
+ *bufptr++ = data[j];
+ }
+ }
+ }
+
+ base += thistime * 2;
+ data += thistime * 2;
+ rem -= thistime;
+ }
+
+ memcpy(dev_info->backing_buffer + (base - dev_info->base16) -
+ (width * 2), data - (width * 2), width * 2);
+
+ base += (dev_info->info->var.xres * 2) - (width * 2);
+ data += (dev_info->info->var.xres * 2) - (width * 2);
+
+ }
+
+ if (bufptr > dev_info->buf) {
+ ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+ }
+
+ mutex_unlock(&dev_info->bulk_mutex);
+
+ return base;
+
+}
+
+static int
+draw_rect(struct dlfb_data *dev_info, int x, int y, int width, int height,
+ unsigned char red, unsigned char green, unsigned char blue)
+{
+
+ int i, j, base;
+ int ret;
+ unsigned short col =
+ (((((red) & 0xF8) | ((green) >> 5)) & 0xFF) << 8) +
+ (((((green) & 0x1C) << 3) | ((blue) >> 3)) & 0xFF);
+ int rem = width;
+
+ char *bufptr;
+
+ if (x + width > dev_info->info->var.xres)
+ return -EINVAL;
+
+ if (y + height > dev_info->info->var.yres)
+ return -EINVAL;
+
+ mutex_lock(&dev_info->bulk_mutex);
+
+ base = dev_info->base16 + (dev_info->info->var.xres * 2 * y) + (x * 2);
+
+ bufptr = dev_info->buf;
+
+ for (i = y; i < y + height; i++) {
+
+ for (j = 0; j < width * 2; j += 2) {
+ dev_info->backing_buffer[base - dev_info->base16 + j] =
+ (char)(col >> 8);
+ dev_info->backing_buffer[base - dev_info->base16 + j +
+ 1] = (char)(col);
+ }
+ if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) {
+ ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+ bufptr = dev_info->buf;
+ }
+
+ rem = width;
+
+ while (rem) {
+
+ if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) {
+ ret =
+ dlfb_bulk_msg(dev_info,
+ bufptr - dev_info->buf);
+ bufptr = dev_info->buf;
+ }
+
+ *bufptr++ = 0xAF;
+ *bufptr++ = 0x69;
+
+ *bufptr++ = (char)(base >> 16);
+ *bufptr++ = (char)(base >> 8);
+ *bufptr++ = (char)(base);
+
+ if (rem > 255) {
+ *bufptr++ = 255;
+ *bufptr++ = 255;
+ rem -= 255;
+ base += 255 * 2;
+ } else {
+ *bufptr++ = rem;
+ *bufptr++ = rem;
+ base += rem * 2;
+ rem = 0;
+ }
+
+ *bufptr++ = (char)(col >> 8);
+ *bufptr++ = (char)(col);
+
+ }
+
+ base += (dev_info->info->var.xres * 2) - (width * 2);
+
+ }
+
+ if (bufptr > dev_info->buf)
+ ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+
+ mutex_unlock(&dev_info->bulk_mutex);
+
+ return 1;
+}
+
+static void swapfb(struct dlfb_data *dev_info)
+{
+
+ int tmpbase;
+ char *bufptr;
+
+ mutex_lock(&dev_info->bulk_mutex);
+
+ tmpbase = dev_info->base16;
+
+ dev_info->base16 = dev_info->base16d;
+ dev_info->base16d = tmpbase;
+
+ bufptr = dev_info->buf;
+
+ bufptr = dlfb_set_register(bufptr, 0xFF, 0x00);
+
+ // set addresses
+ bufptr =
+ dlfb_set_register(bufptr, 0x20, (char)(dev_info->base16 >> 16));
+ bufptr = dlfb_set_register(bufptr, 0x21, (char)(dev_info->base16 >> 8));
+ bufptr = dlfb_set_register(bufptr, 0x22, (char)(dev_info->base16));
+
+ bufptr = dlfb_set_register(bufptr, 0xFF, 0x00);
+
+ dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+
+ mutex_unlock(&dev_info->bulk_mutex);
+}
+
+static int copyfb(struct dlfb_data *dev_info)
+{
+ int base;
+ int source;
+ int rem;
+ int i, ret;
+
+ char *bufptr;
+
+ base = dev_info->base16d;
+
+ mutex_lock(&dev_info->bulk_mutex);
+
+ source = dev_info->base16;
+
+ bufptr = dev_info->buf;
+
+ for (i = 0; i < dev_info->info->var.yres; i++) {
+
+ if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) {
+ ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+ bufptr = dev_info->buf;
+ }
+
+ rem = dev_info->info->var.xres;
+
+ while (rem) {
+
+ if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) {
+ ret =
+ dlfb_bulk_msg(dev_info,
+ bufptr - dev_info->buf);
+ bufptr = dev_info->buf;
+
+ }
+
+ *bufptr++ = 0xAF;
+ *bufptr++ = 0x6A;
+
+ *bufptr++ = (char)(base >> 16);
+ *bufptr++ = (char)(base >> 8);
+ *bufptr++ = (char)(base);
+
+ if (rem > 255) {
+ *bufptr++ = 255;
+ *bufptr++ = (char)(source >> 16);
+ *bufptr++ = (char)(source >> 8);
+ *bufptr++ = (char)(source);
+
+ rem -= 255;
+ base += 255 * 2;
+ source += 255 * 2;
+
+ } else {
+ *bufptr++ = rem;
+ *bufptr++ = (char)(source >> 16);
+ *bufptr++ = (char)(source >> 8);
+ *bufptr++ = (char)(source);
+
+ base += rem * 2;
+ source += rem * 2;
+ rem = 0;
+ }
+ }
+ }
+
+ if (bufptr > dev_info->buf)
+ ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+
+ mutex_unlock(&dev_info->bulk_mutex);
+
+ return 1;
+
+}
+
+static int
+copyarea(struct dlfb_data *dev_info, int dx, int dy, int sx, int sy,
+ int width, int height)
+{
+ int base;
+ int source;
+ int rem;
+ int i, ret;
+
+ char *bufptr;
+
+ if (dx + width > dev_info->info->var.xres)
+ return -EINVAL;
+
+ if (dy + height > dev_info->info->var.yres)
+ return -EINVAL;
+
+ mutex_lock(&dev_info->bulk_mutex);
+
+ base =
+ dev_info->base16 + (dev_info->info->var.xres * 2 * dy) + (dx * 2);
+ source = (dev_info->info->var.xres * 2 * sy) + (sx * 2);
+
+ bufptr = dev_info->buf;
+
+ for (i = sy; i < sy + height; i++) {
+
+ memcpy(dev_info->backing_buffer + base - dev_info->base16,
+ dev_info->backing_buffer + source, width * 2);
+
+ if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) {
+ ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+ bufptr = dev_info->buf;
+ }
+
+ rem = width;
+
+ while (rem) {
+
+ if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) {
+ ret =
+ dlfb_bulk_msg(dev_info,
+ bufptr - dev_info->buf);
+ bufptr = dev_info->buf;
+ }
+
+ *bufptr++ = 0xAF;
+ *bufptr++ = 0x6A;
+
+ *bufptr++ = (char)(base >> 16);
+ *bufptr++ = (char)(base >> 8);
+ *bufptr++ = (char)(base);
+
+ if (rem > 255) {
+ *bufptr++ = 255;
+ *bufptr++ = (char)(source >> 16);
+ *bufptr++ = (char)(source >> 8);
+ *bufptr++ = (char)(source);
+
+ rem -= 255;
+ base += 255 * 2;
+ source += 255 * 2;
+
+ } else {
+ *bufptr++ = rem;
+ *bufptr++ = (char)(source >> 16);
+ *bufptr++ = (char)(source >> 8);
+ *bufptr++ = (char)(source);
+
+ base += rem * 2;
+ source += rem * 2;
+ rem = 0;
+ }
+ }
+
+ base += (dev_info->info->var.xres * 2) - (width * 2);
+ source += (dev_info->info->var.xres * 2) - (width * 2);
+ }
+
+ if (bufptr > dev_info->buf)
+ ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+
+ mutex_unlock(&dev_info->bulk_mutex);
+
+ return 1;
+}
+
+static void dlfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
+{
+
+ struct dlfb_data *dev = info->par;
+
+ copyarea(dev, area->dx, area->dy, area->sx, area->sy, area->width,
+ area->height);
+
+ /* printk("COPY AREA %d %d %d %d %d %d !!!\n", area->dx, area->dy, area->sx, area->sy, area->width, area->height); */
+
+}
+
+static void dlfb_imageblit(struct fb_info *info, const struct fb_image *image)
+{
+
+ int ret;
+ struct dlfb_data *dev = info->par;
+ /* printk("IMAGE BLIT (1) %d %d %d %d DEPTH %d {%p}!!!\n", image->dx, image->dy, image->width, image->height, image->depth, dev->udev); */
+ cfb_imageblit(info, image);
+ ret =
+ image_blit(dev, image->dx, image->dy, image->width, image->height,
+ info->screen_base);
+ /* printk("IMAGE BLIT (2) %d %d %d %d DEPTH %d {%p} %d!!!\n", image->dx, image->dy, image->width, image->height, image->depth, dev->udev, ret); */
+}
+
+static void dlfb_fillrect(struct fb_info *info,
+ const struct fb_fillrect *region)
+{
+
+ unsigned char red, green, blue;
+ struct dlfb_data *dev = info->par;
+
+ memcpy(&red, &region->color, 1);
+ memcpy(&green, &region->color + 1, 1);
+ memcpy(&blue, &region->color + 2, 1);
+ draw_rect(dev, region->dx, region->dy, region->width, region->height,
+ red, green, blue);
+ /* printk("FILL RECT %d %d !!!\n", region->dx, region->dy); */
+
+}
+
+static int dlfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
+{
+
+ struct dlfb_data *dev_info = info->par;
+ struct dloarea *area = NULL;
+
+ if (cmd == 0xAD) {
+ char *edid = (char *)arg;
+ dlfb_edid(dev_info);
+ if (copy_to_user(edid, dev_info->edid, 128)) {
+ return -EFAULT;
+ }
+ return 0;
+ }
+
+ if (cmd == 0xAA || cmd == 0xAB || cmd == 0xAC) {
+
+ area = (struct dloarea *)arg;
+
+ if (area->x < 0)
+ area->x = 0;
+
+ if (area->x > info->var.xres)
+ area->x = info->var.xres;
+
+ if (area->y < 0)
+ area->y = 0;
+
+ if (area->y > info->var.yres)
+ area->y = info->var.yres;
+ }
+
+ if (cmd == 0xAA) {
+ image_blit(dev_info, area->x, area->y, area->w, area->h,
+ info->screen_base);
+ }
+ if (cmd == 0xAC) {
+ copyfb(dev_info);
+ image_blit(dev_info, area->x, area->y, area->w, area->h,
+ info->screen_base);
+ swapfb(dev_info);
+ } else if (cmd == 0xAB) {
+
+ if (area->x2 < 0)
+ area->x2 = 0;
+
+ if (area->y2 < 0)
+ area->y2 = 0;
+
+ copyarea(dev_info,
+ area->x2, area->y2, area->x, area->y, area->w,
+ area->h);
+ }
+ return 0;
+}
+
+/* taken from vesafb */
+
+static int
+dlfb_setcolreg(unsigned regno, unsigned red, unsigned green,
+ unsigned blue, unsigned transp, struct fb_info *info)
+{
+ int err = 0;
+
+ if (regno >= info->cmap.len)
+ return 1;
+
+ if (regno < 16) {
+ if (info->var.red.offset == 10) {
+ /* 1:5:5:5 */
+ ((u32 *) (info->pseudo_palette))[regno] =
+ ((red & 0xf800) >> 1) |
+ ((green & 0xf800) >> 6) | ((blue & 0xf800) >> 11);
+ } else {
+ /* 0:5:6:5 */
+ ((u32 *) (info->pseudo_palette))[regno] =
+ ((red & 0xf800)) |
+ ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11);
+ }
+ }
+
+ return err;
+}
+
+static int dlfb_release(struct fb_info *info, int user)
+{
+ struct dlfb_data *dev_info = info->par;
+ image_blit(dev_info, 0, 0, info->var.xres, info->var.yres,
+ info->screen_base);
+ return 0;
+}
+
+static int dlfb_blank(int blank_mode, struct fb_info *info)
+{
+ struct dlfb_data *dev_info = info->par;
+ char *bufptr = dev_info->buf;
+
+ bufptr = dlfb_set_register(bufptr, 0xFF, 0x00);
+ if (blank_mode != FB_BLANK_UNBLANK) {
+ bufptr = dlfb_set_register(bufptr, 0x1F, 0x01);
+ } else {
+ bufptr = dlfb_set_register(bufptr, 0x1F, 0x00);
+ }
+ bufptr = dlfb_set_register(bufptr, 0xFF, 0xFF);
+
+ dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+
+ return 0;
+}
+
+static struct fb_ops dlfb_ops = {
+ .fb_setcolreg = dlfb_setcolreg,
+ .fb_fillrect = dlfb_fillrect,
+ .fb_copyarea = dlfb_copyarea,
+ .fb_imageblit = dlfb_imageblit,
+ .fb_mmap = dlfb_mmap,
+ .fb_ioctl = dlfb_ioctl,
+ .fb_release = dlfb_release,
+ .fb_blank = dlfb_blank,
+};
+
+static int
+dlfb_probe(struct usb_interface *interface, const struct usb_device_id *id)
+{
+ struct dlfb_data *dev_info;
+ struct fb_info *info;
+
+ int ret;
+ char rbuf[4];
+
+ dev_info = kzalloc(sizeof(*dev_info), GFP_KERNEL);
+ if (dev_info == NULL) {
+ printk("cannot allocate dev_info structure.\n");
+ return -ENOMEM;
+ }
+
+ mutex_init(&dev_info->bulk_mutex);
+
+ dev_info->udev = usb_get_dev(interface_to_usbdev(interface));
+ dev_info->interface = interface;
+
+ printk("DisplayLink device attached\n");
+
+ /* add framebuffer info to usb interface */
+ usb_set_intfdata(interface, dev_info);
+
+ dev_info->buf = kmalloc(BUF_SIZE, GFP_KERNEL);
+ /* usb_buffer_alloc(dev_info->udev, BUF_SIZE , GFP_KERNEL, &dev_info->tx_urb->transfer_dma); */
+
+ if (dev_info->buf == NULL) {
+ printk("unable to allocate memory for dlfb commands\n");
+ goto out;
+ }
+ dev_info->bufend = dev_info->buf + BUF_SIZE;
+
+ dev_info->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ usb_fill_bulk_urb(dev_info->tx_urb, dev_info->udev,
+ usb_sndbulkpipe(dev_info->udev, 1), dev_info->buf, 0,
+ dlfb_bulk_callback, dev_info);
+
+ ret =
+ usb_control_msg(dev_info->udev, usb_rcvctrlpipe(dev_info->udev, 0),
+ (0x06), (0x80 | (0x02 << 5)), 0, 0, rbuf, 4, 0);
+ printk("ret control msg 0: %d %x%x%x%x\n", ret, rbuf[0], rbuf[1],
+ rbuf[2], rbuf[3]);
+
+ dlfb_edid(dev_info);
+
+ info = framebuffer_alloc(sizeof(u32) * 256, &dev_info->udev->dev);
+
+ if (!info) {
+ printk("non posso allocare il framebuffer displaylink");
+ goto out;
+ }
+
+ fb_parse_edid(dev_info->edid, &info->var);
+
+ printk("EDID XRES %d YRES %d\n", info->var.xres, info->var.yres);
+
+ if (dlfb_set_video_mode(dev_info, info->var.xres, info->var.yres) != 0) {
+ info->var.xres = 800;
+ info->var.yres = 480;
+ if (dlfb_set_video_mode
+ (dev_info, info->var.xres, info->var.yres) != 0) {
+ goto out;
+ }
+ }
+
+ printk("found valid mode...%d\n", info->var.pixclock);
+
+ info->pseudo_palette = info->par;
+ info->par = dev_info;
+
+ dev_info->info = info;
+
+ info->flags =
+ FBINFO_DEFAULT | FBINFO_READS_FAST | FBINFO_HWACCEL_IMAGEBLIT |
+ FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT;
+ info->fbops = &dlfb_ops;
+ info->screen_base = rvmalloc(dev_info->screen_size);
+
+ if (info->screen_base == NULL) {
+ printk
+ ("cannot allocate framebuffer virtual memory of %d bytes\n",
+ dev_info->screen_size);
+ goto out0;
+ }
+
+ printk("screen base allocated !!!\n");
+
+ dev_info->backing_buffer = kzalloc(dev_info->screen_size, GFP_KERNEL);
+
+ if (!dev_info->backing_buffer)
+ printk("non posso allocare il backing buffer\n");
+
+ /* info->var = dev_info->si; */
+
+ info->var.bits_per_pixel = 16;
+ info->var.activate = FB_ACTIVATE_TEST;
+ info->var.vmode = FB_VMODE_NONINTERLACED;
+
+ info->var.red.offset = 11;
+ info->var.red.length = 5;
+ info->var.red.msb_right = 0;
+
+ info->var.green.offset = 5;
+ info->var.green.length = 6;
+ info->var.green.msb_right = 0;
+
+ info->var.blue.offset = 0;
+ info->var.blue.length = 5;
+ info->var.blue.msb_right = 0;
+
+ /* info->var.pixclock = (10000000 / FB_W * 1000 / FB_H)/2 ; */
+
+ info->fix.smem_start = (unsigned long)info->screen_base;
+ info->fix.smem_len = PAGE_ALIGN(dev_info->screen_size);
+ if (strlen(dev_info->udev->product) > 15) {
+ memcpy(info->fix.id, dev_info->udev->product, 15);
+ } else {
+ memcpy(info->fix.id, dev_info->udev->product,
+ strlen(dev_info->udev->product));
+ }
+ info->fix.type = FB_TYPE_PACKED_PIXELS;
+ info->fix.visual = FB_VISUAL_TRUECOLOR;
+ info->fix.accel = info->flags;
+ info->fix.line_length = dev_info->line_length;
+
+ if (fb_alloc_cmap(&info->cmap, 256, 0) < 0)
+ goto out1;
+
+ printk("colormap allocated\n");
+ if (register_framebuffer(info) < 0)
+ goto out2;
+
+ draw_rect(dev_info, 0, 0, dev_info->info->var.xres,
+ dev_info->info->var.yres, 0x30, 0xff, 0x30);
+
+ return 0;
+
+out2:
+ fb_dealloc_cmap(&info->cmap);
+out1:
+ rvfree(info->screen_base, dev_info->screen_size);
+out0:
+ framebuffer_release(info);
+out:
+ usb_set_intfdata(interface, NULL);
+ usb_put_dev(dev_info->udev);
+ kfree(dev_info);
+ return -ENOMEM;
+
+}
+
+static void dlfb_disconnect(struct usb_interface *interface)
+{
+ struct dlfb_data *dev_info = usb_get_intfdata(interface);
+
+ mutex_unlock(&dev_info->bulk_mutex);
+
+ usb_kill_urb(dev_info->tx_urb);
+ usb_free_urb(dev_info->tx_urb);
+ usb_set_intfdata(interface, NULL);
+ usb_put_dev(dev_info->udev);
+
+ if (dev_info->info) {
+ unregister_framebuffer(dev_info->info);
+ fb_dealloc_cmap(&dev_info->info->cmap);
+ rvfree(dev_info->info->screen_base, dev_info->screen_size);
+ kfree(dev_info->backing_buffer);
+ framebuffer_release(dev_info->info);
+
+ }
+
+ kfree(dev_info);
+
+ printk("DisplayLink device disconnected\n");
+}
+
+static struct usb_driver dlfb_driver = {
+ .name = "udlfb",
+ .probe = dlfb_probe,
+ .disconnect = dlfb_disconnect,
+ .id_table = id_table,
+};
+
+static int __init dlfb_init(void)
+{
+ int res;
+
+ dlfb_init_modes();
+
+ res = usb_register(&dlfb_driver);
+ if (res)
+ err("usb_register failed. Error number %d", res);
+
+ printk("VMODES initialized\n");
+
+ return res;
+}
+
+static void __exit dlfb_exit(void)
+{
+ usb_deregister(&dlfb_driver);
+}
+
+module_init(dlfb_init);
+module_exit(dlfb_exit);
+
+MODULE_AUTHOR("Roberto De Ioris <roberto@unbit.it>");
+MODULE_DESCRIPTION(DRIVER_VERSION);
+MODULE_LICENSE("GPL");
diff --git a/recipes/libdlo/kernel-module-udlfb/udlfb.h b/recipes/libdlo/kernel-module-udlfb/udlfb.h
new file mode 100644
index 0000000000..08bd671204
--- /dev/null
+++ b/recipes/libdlo/kernel-module-udlfb/udlfb.h
@@ -0,0 +1,225 @@
+#ifndef UDLFB_H
+#define UDLFB_H
+
+#define MAX_VMODES 4
+#define FB_BPP 16
+
+#define STD_CHANNEL "\x57\xCD\xDC\xA7\x1C\x88\x5E\x15" \
+ "\x60\xFE\xC6\x97\x16\x3D\x47\xF2"
+
+/* as libdlo */
+#define BUF_HIGH_WATER_MARK 1024
+#define BUF_SIZE (64*1024)
+
+struct dlfb_data {
+ struct usb_device *udev;
+ struct usb_interface *interface;
+ struct urb *tx_urb, *ctrl_urb;
+ struct usb_ctrlrequest dr;
+ struct fb_info *info;
+ char *buf;
+ char *bufend;
+ char *backing_buffer;
+ struct mutex bulk_mutex;
+ char edid[128];
+ int screen_size;
+ int line_length;
+ struct completion done;
+ int base16;
+ int base16d;
+ int base8;
+ int base8d;
+};
+
+struct dlfb_video_mode {
+ uint8_t col;
+ uint32_t hclock;
+ uint32_t vclock;
+ uint8_t unknown1[6];
+ uint16_t xres;
+ uint8_t unknown2[6];
+ uint16_t yres;
+ uint8_t unknown3[4];
+} __attribute__ ((__packed__));
+
+static struct dlfb_video_mode dlfb_video_modes[MAX_VMODES];
+
+static void dlfb_bulk_callback(struct urb *urb)
+{
+ struct dlfb_data *dev_info = urb->context;
+ complete(&dev_info->done);
+}
+
+static void dlfb_edid(struct dlfb_data *dev_info)
+{
+ int i;
+ int ret;
+ char rbuf[2];
+
+ for (i = 0; i < 128; i++) {
+ ret =
+ usb_control_msg(dev_info->udev,
+ usb_rcvctrlpipe(dev_info->udev, 0), (0x02),
+ (0x80 | (0x02 << 5)), i << 8, 0xA1, rbuf, 2,
+ 0);
+ /*printk("ret control msg edid %d: %d [%d]\n",i, ret, rbuf[1]); */
+ dev_info->edid[i] = rbuf[1];
+ }
+
+}
+
+static int dlfb_bulk_msg(struct dlfb_data *dev_info, int len)
+{
+ int ret;
+
+ init_completion(&dev_info->done);
+
+ dev_info->tx_urb->actual_length = 0;
+ dev_info->tx_urb->transfer_buffer_length = len;
+
+ ret = usb_submit_urb(dev_info->tx_urb, GFP_KERNEL);
+ if (!wait_for_completion_timeout(&dev_info->done, 1000)) {
+ usb_kill_urb(dev_info->tx_urb);
+ printk("usb timeout !!!\n");
+ }
+
+ return dev_info->tx_urb->actual_length;
+}
+
+static void dlfb_init_modes(void)
+{
+ dlfb_video_modes[0].col = 0;
+ memcpy(&dlfb_video_modes[0].hclock, "\x20\x3C\x7A\xC9", 4);
+ memcpy(&dlfb_video_modes[0].vclock, "\xF2\x6C\x48\xF9", 4);
+ memcpy(&dlfb_video_modes[0].unknown1, "\x70\x53\xFF\xFF\x21\x27", 6);
+ dlfb_video_modes[0].xres = 800;
+ memcpy(&dlfb_video_modes[0].unknown2, "\x91\xF3\xFF\xFF\xFF\xF9", 6);
+ dlfb_video_modes[0].yres = 480;
+ memcpy(&dlfb_video_modes[0].unknown3, "\x01\x02\xC8\x19", 4);
+
+ dlfb_video_modes[1].col = 0;
+ memcpy(&dlfb_video_modes[1].hclock, "\x36\x18\xD5\x10", 4);
+ memcpy(&dlfb_video_modes[1].vclock, "\x60\xA9\x7B\x33", 4);
+ memcpy(&dlfb_video_modes[1].unknown1, "\xA1\x2B\x27\x32\xFF\xFF", 6);
+ dlfb_video_modes[1].xres = 1024;
+ memcpy(&dlfb_video_modes[1].unknown2, "\xD9\x9A\xFF\xCA\xFF\xFF", 6);
+ dlfb_video_modes[1].yres = 768;
+ memcpy(&dlfb_video_modes[1].unknown3, "\x04\x03\xC8\x32", 4);
+
+ dlfb_video_modes[2].col = 0;
+ memcpy(&dlfb_video_modes[2].hclock, "\x98\xF8\x0D\x57", 4);
+ memcpy(&dlfb_video_modes[2].vclock, "\x2A\x55\x4D\x54", 4);
+ memcpy(&dlfb_video_modes[2].unknown1, "\xCA\x0D\xFF\xFF\x94\x43", 6);
+ dlfb_video_modes[2].xres = 1280;
+ memcpy(&dlfb_video_modes[2].unknown2, "\x9A\xA8\xFF\xFF\xFF\xF9", 6);
+ dlfb_video_modes[2].yres = 1024;
+ memcpy(&dlfb_video_modes[2].unknown3, "\x04\x02\x60\x54", 4);
+
+ dlfb_video_modes[3].col = 0;
+ memcpy(&dlfb_video_modes[3].hclock, "\x42\x24\x38\x36", 4);
+ memcpy(&dlfb_video_modes[3].vclock, "\xC1\x52\xD9\x29", 4);
+ memcpy(&dlfb_video_modes[3].unknown1, "\xEA\xB8\x32\x60\xFF\xFF", 6);
+ dlfb_video_modes[3].xres = 1400;
+ memcpy(&dlfb_video_modes[3].unknown2, "\xC9\x4E\xFF\xFF\xFF\xF2", 6);
+ dlfb_video_modes[3].yres = 1050;
+ memcpy(&dlfb_video_modes[3].unknown3, "\x04\x02\x1E\x5F", 4);
+}
+
+static char *dlfb_set_register(char *bufptr, uint8_t reg, uint8_t val)
+{
+ *bufptr++ = 0xAF;
+ *bufptr++ = 0x20;
+ *bufptr++ = reg;
+ *bufptr++ = val;
+
+ return bufptr;
+}
+
+static int dlfb_set_video_mode(struct dlfb_data *dev_info, int width, int height)
+{
+ int i, ret;
+ unsigned char j;
+ char *bufptr = dev_info->buf;
+ uint8_t *vdata;
+
+ for (i = 0; i < MAX_VMODES; i++) {
+ printk("INIT VIDEO %d %d %d\n", i, dlfb_video_modes[i].xres,
+ dlfb_video_modes[i].yres);
+ if (dlfb_video_modes[i].xres == width
+ && dlfb_video_modes[i].yres == height) {
+
+ dev_info->base16 = 0;
+ dev_info->base16d = width * height * (FB_BPP / 8);
+
+ //dev_info->base8 = width * height * (FB_BPP / 8);
+
+ dev_info->base8 = dev_info->base16;
+ dev_info->base8d = dev_info->base16d;
+
+ /* set encryption key (null) */
+ memcpy(dev_info->buf, STD_CHANNEL, 16);
+ ret =
+ usb_control_msg(dev_info->udev,
+ usb_sndctrlpipe(dev_info->udev, 0),
+ 0x12, (0x02 << 5), 0, 0,
+ dev_info->buf, 16, 0);
+ printk("ret control msg 1 (STD_CHANNEL): %d\n", ret);
+
+ /* set registers */
+ bufptr = dlfb_set_register(bufptr, 0xFF, 0x00);
+
+ /* set color depth */
+ bufptr = dlfb_set_register(bufptr, 0x00, 0x00);
+
+ /* set addresses */
+ bufptr =
+ dlfb_set_register(bufptr, 0x20,
+ (char)(dev_info->base16 >> 16));
+ bufptr =
+ dlfb_set_register(bufptr, 0x21,
+ (char)(dev_info->base16 >> 8));
+ bufptr =
+ dlfb_set_register(bufptr, 0x22,
+ (char)(dev_info->base16));
+
+ bufptr =
+ dlfb_set_register(bufptr, 0x26,
+ (char)(dev_info->base8 >> 16));
+ bufptr =
+ dlfb_set_register(bufptr, 0x27,
+ (char)(dev_info->base8 >> 8));
+ bufptr =
+ dlfb_set_register(bufptr, 0x28,
+ (char)(dev_info->base8));
+
+ /* set video mode */
+ vdata = (uint8_t *)&dlfb_video_modes[i];
+ for (j = 0; j < 29; j++)
+ bufptr = dlfb_set_register(bufptr, j, vdata[j]);
+
+ /* blank */
+ bufptr = dlfb_set_register(bufptr, 0x1F, 0x00);
+
+ /* end registers */
+ bufptr = dlfb_set_register(bufptr, 0xFF, 0xFF);
+
+ /* send */
+ ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf);
+ printk("ret bulk 2: %d %d\n", ret,
+ bufptr - dev_info->buf);
+
+ /* flush */
+ ret = dlfb_bulk_msg(dev_info, 0);
+ printk("ret bulk 3: %d\n", ret);
+
+ dev_info->screen_size = width * height * (FB_BPP / 8);
+ dev_info->line_length = width * (FB_BPP / 8);
+
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+#endif
diff --git a/recipes/libdlo/libdlo_git.bb b/recipes/libdlo/libdlo_git.bb
new file mode 100644
index 0000000000..290dcf1aca
--- /dev/null
+++ b/recipes/libdlo/libdlo_git.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Library for controlling displaylink based usb devices"
+LICENSE = "LGPLv2"
+
+SRCREV = "d50f082699787c3c6531df431b35c9ad52a82667"
+PV = "0.1.0"
+PR_append = "+gitr${SRCREV}"
+
+SRC_URI = "git://anongit.freedesktop.org/libdlo;protocol=git"
+S = "${WORKDIR}/git"
+
+inherit lib_package autotools_stage
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+do_configure_prepend() {
+ sed -i -e s:63:61: configure.ac
+}
+
+do_install_append() {
+ mv ${D}${bindir}/test1 ${D}${bindir}/libdlo-test1
+}
+
diff --git a/recipes/libidn/libidn_1.15.bb b/recipes/libidn/libidn_1.15.bb
new file mode 100644
index 0000000000..0a68a796c7
--- /dev/null
+++ b/recipes/libidn/libidn_1.15.bb
@@ -0,0 +1,19 @@
+LICENSE = "LGPL"
+DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
+SECTION = "libs"
+PRIORITY = "optional"
+PR = "r0"
+
+inherit pkgconfig autotools
+
+SRC_URI = "${GNU_MIRROR}/${PN}/${P}.tar.gz"
+
+EXTRA_OECONF = " --disable-tld"
+
+do_configure_prepend () {
+ autoreconf -f -i -s
+}
+
+do_stage () {
+ autotools_stage_all
+}
diff --git a/recipes/libmicrohttpd/libmicrohttpd_0.4.2.bb b/recipes/libmicrohttpd/libmicrohttpd_0.4.2.bb
new file mode 100644
index 0000000000..cdf721c26e
--- /dev/null
+++ b/recipes/libmicrohttpd/libmicrohttpd_0.4.2.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "easy to embed and small HTTP server as a C library"
+AUTHOR = "Christian Grothoff <christian@grothoff.org>"
+HOMEPAGE = "http://www.gnu.org/software/libmicrohttpd/"
+SECTION = "libs"
+LICENSE = "LGPL"
+PR = "r2"
+
+SRC_URI = "ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${PV}.tar.gz"
+
+inherit autotools pkgconfig
+
+do_stage() {
+ oe_runmake DESTDIR="${D}" install
+ autotools_stage_all
+}
diff --git a/recipes/libnl/files/netlink-local-fix.patch b/recipes/libnl/files/netlink-local-fix.patch
new file mode 100644
index 0000000000..51c6736025
--- /dev/null
+++ b/recipes/libnl/files/netlink-local-fix.patch
@@ -0,0 +1,12 @@
+Index: libnl-1.1/include/netlink-local.h
+===================================================================
+--- libnl-1.1.orig/include/netlink-local.h 2009-06-18 15:28:32.614209645 +0400
++++ libnl-1.1/include/netlink-local.h 2009-06-18 15:28:44.094190518 +0400
+@@ -26,6 +26,7 @@
+ #include <sys/socket.h>
+ #include <inttypes.h>
+ #include <assert.h>
++#include <limits.h>
+
+ #include <arpa/inet.h>
+ #include <netdb.h>
diff --git a/recipes/libnl/libnl_1.1.bb b/recipes/libnl/libnl_1.1.bb
index 5f2d6f1a07..3895ec5558 100644
--- a/recipes/libnl/libnl_1.1.bb
+++ b/recipes/libnl/libnl_1.1.bb
@@ -13,6 +13,7 @@ SRC_URI = "\
file://local-includes.patch;patch=1 \
file://fix-includes.patch;patch=1 \
file://respect-ldflags.patch;patch=1 \
+ file://netlink-local-fix.patch;patch=1 \
"
do_stage () {
diff --git a/recipes/libnss-mdns/libnss-mdns_0.10.bb b/recipes/libnss-mdns/libnss-mdns_0.10.bb
new file mode 100644
index 0000000000..b325f826d6
--- /dev/null
+++ b/recipes/libnss-mdns/libnss-mdns_0.10.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "NSS module for Multicast DNS name resolution"
+HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/"
+LICENSE = "GPL"
+SECTION = "libs"
+PRIORITY = "optional"
+
+RRECOMMENDS_${PN} = "zeroconf"
+PR = "r0"
+
+EXTRA_OECONF = "--libdir=/lib"
+S = "${WORKDIR}/nss-mdns-${PV}"
+
+SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
+
+inherit autotools
+
+pkg_postinst_${PN} () {
+ # can't do this offline
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
+ cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files \)dns/\1mdns4_minimal [NOTFOUND=return] dns mdns4/' > /tmp/nsswitch.conf
+ mv /tmp/nsswitch.conf /etc/nsswitch.conf
+ }
+}
+
+pkg_prerm_${PN} () {
+ cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns$" > /dev/null && {
+ cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files \)mdns4_minimal [NOTFOUND=return] dns mdns4/\1dns/' > /tmp/nsswitch.conf
+ mv /tmp/nsswitch.conf /etc/nsswitch.conf
+ }
+}
diff --git a/recipes/libopie/libopie2/rotate_fix.patch b/recipes/libopie/libopie2/rotate_fix.patch
new file mode 100644
index 0000000000..c6a59846a0
--- /dev/null
+++ b/recipes/libopie/libopie2/rotate_fix.patch
@@ -0,0 +1,87 @@
+--- libopie2/opiecore/device/odevice_ipaq.cpp 24 May 2009 20:09:49 -0000 1.40
++++ libopie2/opiecore/device/odevice_ipaq.cpp 27 May 2009 21:16:24 -0000
+@@ -35,6 +35,7 @@
+ #include <qfile.h>
+ #include <qtextstream.h>
+ #include <qwindowsystem_qws.h>
++#include <qgfx_qws.h>
+
+ /* OPIE */
+ #include <qpe/config.h>
+@@ -335,11 +336,11 @@
+ int quarters;
+ switch (d->m_rotation) {
+ case Rot0: quarters = 0/*0deg*/; break;
+- case Rot90: quarters = 1/*90deg*/; break;
++ case Rot90: quarters = 3/*90deg*/; break;
+ case Rot180: quarters = 2/*180deg*/; break;
+- case Rot270: quarters = 3/*270deg*/; break;
++ case Rot270: quarters = 1/*270deg*/; break;
+ }
+- newkeycode = Key_Left + ( keycode - Key_Left + quarters ) % 4;
++ newkeycode = Key_Left + ( keycode - Key_Left + quarters + qt_screen->transformOrientation() ) % 4;
+ break;
+ }
+
+--- libopie2/opiecore/device/odevice_zaurus.cpp 24 May 2009 20:09:49 -0000 1.57
++++ libopie2/opiecore/device/odevice_zaurus.cpp 27 May 2009 21:16:24 -0000
+@@ -807,16 +807,8 @@
+ case Key_Up :
+ case Key_Down :
+ {
+- if (d->m_model == Model_Zaurus_SLC3000) {
+- // This ensures that the cursor keys work correctly and that the
+- // side wheel works as expected when the screen is flipped over
+- if (rotation() == Rot270)
+- newkeycode = Key_Left + ( keycode - Key_Left + 1 ) % 4;
+- }
+- else {
+- if (rotation()==Rot90)
+- newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4;
+- }
++ if (rotation()==Rot90)
++ newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4;
+ break;
+
+ }
+--- libopie2/opiecore/device/odevice_palm.cpp 2009-05-27 22:28:37.000000000 +0100
++++ libopie2/opiecore/device/odevice_palm.cpp 2009-05-27 22:28:09.000000000 +0100
+@@ -295,25 +295,21 @@
+ {
+ int newkeycode = keycode;
+
+- if (qt_screen->transformOrientation() != Rot0){
+-
+- switch ( keycode ) {
+- case Key_Left :
+- case Key_Right:
+- case Key_Up :
+- case Key_Down :
+- newkeycode = Key_Left + ( keycode - Key_Left + 4 ) % 4;
+- default:
+- break;
+- }
++ switch ( keycode ) {
++ case Key_Left :
++ case Key_Right:
++ case Key_Up :
++ case Key_Down :
++ newkeycode = Key_Left + ( keycode - Key_Left + qt_screen->transformOrientation() ) % 4;
++ default:
++ break;
++ }
+
+- if (newkeycode!=keycode) {
+- if ( newkeycode != Key_unknown ) {
+- QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat );
+- }
+- return true;
++ if (newkeycode!=keycode) {
++ if ( newkeycode != Key_unknown ) {
++ QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat );
+ }
+-
++ return true;
+ }
+
+ return false;
diff --git a/recipes/libopie/libopie2_1.2.4.bb b/recipes/libopie/libopie2_1.2.4.bb
index 0634ad7d22..d66cf3fea5 100644
--- a/recipes/libopie/libopie2_1.2.4.bb
+++ b/recipes/libopie/libopie2_1.2.4.bb
@@ -1,10 +1,11 @@
require ${PN}.inc
-PR = "r1"
+PR = "r2"
SRC_URI = "${HANDHELDS_CVS};tag=${TAG};module=opie/libopie2 \
file://include.pro \
file://libopie2-tosa.patch;patch=1 \
- file://c7x0_w100_disable.patch;patch=1"
+ file://c7x0_w100_disable.patch;patch=1 \
+ file://rotate_fix.patch;patch=1"
SRC_URI_append_poodle = " file://poodle-2.6-hotkeys.patch;patch=1"
diff --git a/recipes/libpcre/libpcre_7.6.bb b/recipes/libpcre/libpcre_7.6.bb
index eb5af03db0..aa038c6e95 100644
--- a/recipes/libpcre/libpcre_7.6.bb
+++ b/recipes/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 = "r3"
+PR = "r4"
LICENSE = "BSD"
SRC_URI = "${SOURCEFORGE_MIRROR}/pcre/pcre-${PV}.tar.bz2 \
file://pcre-cross.patch;patch=1"
@@ -17,7 +17,6 @@ inherit autotools binconfig
PARALLEL_MAKE = ""
-LEAD_SONAME = "libpcre.so"
CFLAGS_append = " -D_REENTRANT"
CXXFLAGS_powerpc += "-lstdc++"
EXTRA_OECONF = " --with-link-size=2 --enable-newline-is-lf --with-match-limit=10000000 --enable-rebuild-chartables --enable-utf8"
@@ -40,13 +39,19 @@ do_compile () {
}
do_stage () {
- oe_libinstall -a -so libpcre ${STAGING_LIBDIR}
- oe_libinstall -a -so libpcreposix ${STAGING_LIBDIR}
- install -m 0644 pcre.h ${STAGING_INCDIR}/
- install -m 0644 pcreposix.h ${STAGING_INCDIR}/
- install -d ${STAGING_BINDIR_NATIVE}
+ autotools_stage_all
+ install -d ${STAGING_BINDIR_NATIVE}
install -m 0755 ${S}/dftables ${STAGING_BINDIR_NATIVE}/
}
-FILES_${PN} = "${libdir}/lib*.so.*"
+python populate_packages_prepend () {
+ pcre_libdir = bb.data.expand('${libdir}', d)
+ pcre_libdir_dbg = bb.data.expand('${libdir}/.debug', d)
+ do_split_packages(d, pcre_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'libpcre %s development package', extra_depends='${PN}-dev', allow_links=True)
+ do_split_packages(d, pcre_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'libpcre %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, pcre_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'libpcre %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, pcre_libdir, '^lib(.*)\.so\.*', 'lib%s', 'libpcre %s library', extra_depends='', allow_links=True)
+}
+
+FILES_${PN} = "${libdir}/libpcre.so.*"
FILES_${PN}-dev += "${bindir}/*"
diff --git a/recipes/librsvg/librsvg_2.26.0.bb b/recipes/librsvg/librsvg_2.26.0.bb
new file mode 100644
index 0000000000..df238048fb
--- /dev/null
+++ b/recipes/librsvg/librsvg_2.26.0.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "Library for rendering SVG files"
+SECTION = "x11/utils"
+DEPENDS = "gtk+ libcroco cairo libart-lgpl libxml2 popt"
+LICENSE = "LGPL"
+
+inherit gnome
+
+EXTRA_OECONF = "--disable-mozilla-plugin"
+
+PACKAGES =+ "librsvg-gtk librsvg-gtk-dbg librsvg-gtk-dev rsvg"
+FILES_${PN} = "${libdir}/*.so.*"
+FILES_rsvg = "${bindir}/rsvg \
+ ${bindir}/rsvg-view \
+ ${bindir}/rsvg-convert \
+ ${datadir}/pixmaps/svg-viewer.svg"
+FILES_librsvg-gtk = "${libdir}/gtk-2.0/*/*/*.so"
+FILES_librsvg-gtk-dev += "${libdir}/gtk-2.0/*.la \
+ ${libdir}/gtk-2.0/*/*.la \
+ ${libdir}/gtk-2.0/*/*/*.la \
+ "
+FILES_librsvg-gtk-dbg += "${libdir}/gtk-2.0/.debug \
+ ${libdir}/gtk-2.0/*/*/.debug"
+
+pkg_postinst_librsvg-gtk() {
+if [ "x$D" != "x" ]; then
+ exit 1
+fi
+ gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders
+}
+
+do_stage() {
+ autotools_stage_all
+}
diff --git a/recipes/libsamplerate/libsamplerate0_0.1.7.bb b/recipes/libsamplerate/libsamplerate0_0.1.7.bb
new file mode 100644
index 0000000000..1d377f1260
--- /dev/null
+++ b/recipes/libsamplerate/libsamplerate0_0.1.7.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "An audio Sample Rate Conversion library"
+SECTION = "libs"
+LICENSE = "GPL libsamplerate"
+
+SRC_URI = "http://www.mega-nerd.com/SRC/libsamplerate-${PV}.tar.gz"
+S = "${WORKDIR}/libsamplerate-${PV}"
+
+inherit autotools_stage pkgconfig
+
+do_configure() {
+ gnu-configize --force
+ oe_runconf
+}
+
diff --git a/recipes/libsdl/libsdl-gfx_2.0.17.bb b/recipes/libsdl/libsdl-gfx_2.0.17.bb
index 79af40ae1d..b07be45ac5 100644
--- a/recipes/libsdl/libsdl-gfx_2.0.17.bb
+++ b/recipes/libsdl/libsdl-gfx_2.0.17.bb
@@ -10,6 +10,7 @@ S = "${WORKDIR}/SDL_gfx-${PV}"
inherit autotools
EXTRA_OECONF = "--disable-mmx"
+TARGET_CC_ARCH += "${LDFLAGS}"
do_stage() {
autotools_stage_all
diff --git a/recipes/libsdl/libsdl-ttf_2.0.3.bb b/recipes/libsdl/libsdl-ttf_2.0.3.bb
index 250fb698ce..b1da5b47f8 100644
--- a/recipes/libsdl/libsdl-ttf_2.0.3.bb
+++ b/recipes/libsdl/libsdl-ttf_2.0.3.bb
@@ -11,6 +11,8 @@ S = "${WORKDIR}/SDL_ttf-${PV}"
inherit autotools
+TARGET_CC_ARCH += "${LDFLAGS}"
+
do_stage() {
autotools_stage_all
}
diff --git a/recipes/libsndfile/libsndfile1_1.0.20.bb b/recipes/libsndfile/libsndfile1_1.0.20.bb
new file mode 100644
index 0000000000..2562271af2
--- /dev/null
+++ b/recipes/libsndfile/libsndfile1_1.0.20.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "An audio format Conversion library"
+HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
+AUTHOR = "Erik de Castro Lopo"
+SECTION = "libs/multimedia"
+LICENSE = "LGPL"
+
+SRC_URI = "http://www.mega-nerd.com/libsndfile/libsndfile-${PV}.tar.gz \
+ "
+
+S = "${WORKDIR}/libsndfile-${PV}"
+
+inherit autotools_stage lib_package pkgconfig
+
+do_configure_prepend_arm() {
+ export ac_cv_sys_largefile_source=1
+ export ac_cv_sys_file_offset_bits=64
+ ac_cv_sizeof_off_t=8
+}
+
+PACKAGES =+ "${PN}-octave"
+FILES_${PN}-octave += "/usr/share/octave/site/m"
diff --git a/recipes/libusb/libusb-compat-0.1.0/gcc-3-compatibility.patch b/recipes/libusb/libusb-compat-0.1.0/gcc-3-compatibility.patch
new file mode 100644
index 0000000000..f07b5383bf
--- /dev/null
+++ b/recipes/libusb/libusb-compat-0.1.0/gcc-3-compatibility.patch
@@ -0,0 +1,22 @@
+--- libusb-compat-0.1.0/configure.ac-orig 2009-02-26 15:30:51.000000000 +0100
++++ libusb-compat-0.1.0/configure.ac 2009-02-26 15:31:04.000000000 +0100
+@@ -55,7 +55,7 @@
+ CFLAGS="$saved_cflags"
+
+ AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
+-AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
++AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wshadow"
+ AC_SUBST(AM_CFLAGS)
+
+ AC_CONFIG_FILES([libusb.pc] [libusb-config] [Makefile] [libusb/Makefile] [examples/Makefile])
+--- libusb-compat-0.1.0/libusb/Makefile.am-orig 2009-02-26 15:33:30.000000000 +0100
++++ libusb-compat-0.1.0/libusb/Makefile.am 2009-02-26 15:33:40.000000000 +0100
+@@ -2,7 +2,7 @@
+ lib_LTLIBRARIES = libusb.la
+
+ libusb_la_SOURCES = core.c usbi.h
+-libusb_la_CFLAGS = -fvisibility=hidden $(AM_CFLAGS) $(LIBUSB_1_0_CFLAGS)
++libusb_la_CFLAGS = $(AM_CFLAGS) $(LIBUSB_1_0_CFLAGS)
+ libusb_la_LIBADD = $(LIBUSB_1_0_LIBS)
+ libusb_la_LDFLAGS = -version-info $(LT_MAJOR):$(LT_REVISION):$(LT_AGE) \
+ -release 0.1
diff --git a/recipes/libusb/libusb-compat_0.1.0.bb b/recipes/libusb/libusb-compat_0.1.0.bb
index 887765133a..48694403e5 100644
--- a/recipes/libusb/libusb-compat_0.1.0.bb
+++ b/recipes/libusb/libusb-compat_0.1.0.bb
@@ -11,7 +11,8 @@ DEPENDS = "libusb1"
SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-compat-${PV}.tar.bz2 \
"
-
+SRC_URI_append_nylon = " file://gcc-3-compatibility.patch;patch=1 \
+"
inherit autotools pkgconfig binconfig lib_package
PARALLEL_MAKE = ""
diff --git a/recipes/libusb/libusb1-1.0.0/gcc-3-compatibility.patch b/recipes/libusb/libusb1-1.0.0/gcc-3-compatibility.patch
new file mode 100644
index 0000000000..d1bc6803d8
--- /dev/null
+++ b/recipes/libusb/libusb1-1.0.0/gcc-3-compatibility.patch
@@ -0,0 +1,22 @@
+--- libusb-1.0.0/configure.ac-orig 2009-02-26 13:18:31.000000000 +0100
++++ libusb-1.0.0/configure.ac 2009-02-26 13:18:43.000000000 +0100
+@@ -62,7 +62,7 @@
+ CFLAGS="$saved_cflags"
+
+ AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
+-AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
++AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wshadow"
+ AC_SUBST(AM_CFLAGS)
+
+ AC_CONFIG_FILES([libusb-1.0.pc] [Makefile] [libusb/Makefile] [examples/Makefile] [doc/Makefile] [doc/doxygen.cfg])
+--- libusb-1.0.0/libusb/Makefile.am-orig 2009-02-26 13:18:11.000000000 +0100
++++ libusb-1.0.0/libusb/Makefile.am 2009-02-26 13:18:23.000000000 +0100
+@@ -8,7 +8,7 @@
+ OS_SRC = $(LINUX_USBFS_SRC)
+ endif
+
+-libusb_1_0_la_CFLAGS = -fvisibility=hidden $(AM_CFLAGS) -pthread
++libusb_1_0_la_CFLAGS = $(AM_CFLAGS) -pthread
+ libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC)
+ libusb_1_0_la_LIBADD = -lrt
+
diff --git a/recipes/libusb/libusb1-1.0.1/gcc-3-compatibility.patch b/recipes/libusb/libusb1-1.0.1/gcc-3-compatibility.patch
new file mode 100644
index 0000000000..98c3674bca
--- /dev/null
+++ b/recipes/libusb/libusb1-1.0.1/gcc-3-compatibility.patch
@@ -0,0 +1,33 @@
+--- libusb-1.0.1/libusb/Makefile.am-orig 2009-05-19 22:41:07.000000000 +0200
++++ libusb-1.0.1/libusb/Makefile.am 2009-05-19 22:41:27.000000000 +0200
+@@ -14,7 +14,7 @@
+ AM_CFLAGS_EXT = -no-cpp-precomp
+ endif
+
+-libusb_1_0_la_CFLAGS = -fvisibility=hidden $(AM_CFLAGS) -pthread
++libusb_1_0_la_CFLAGS = $(AM_CFLAGS) -pthread
+ libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC)
+
+ hdrdir = $(includedir)/libusb-1.0
+--- libusb-1.0.1/libusb/Makefile.in-orig 2009-05-19 22:41:13.000000000 +0200
++++ libusb-1.0.1/libusb/Makefile.in 2009-05-19 22:41:42.000000000 +0200
+@@ -210,7 +210,7 @@
+ @OS_DARWIN_TRUE@OS_SRC = $(DARWIN_USB_SRC)
+ @OS_LINUX_TRUE@OS_SRC = $(LINUX_USBFS_SRC)
+ @OS_DARWIN_TRUE@AM_CFLAGS_EXT = -no-cpp-precomp
+-libusb_1_0_la_CFLAGS = -fvisibility=hidden $(AM_CFLAGS) -pthread
++libusb_1_0_la_CFLAGS = $(AM_CFLAGS) -pthread
+ libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC)
+ hdrdir = $(includedir)/libusb-1.0
+ hdr_HEADERS = libusb.h
+--- libusb-1.0.1/configure.ac-orig 2009-05-19 22:44:06.000000000 +0200
++++ libusb-1.0.1/configure.ac 2009-05-19 22:44:16.000000000 +0200
+@@ -72,7 +72,7 @@
+ CFLAGS="$saved_cflags"
+
+ AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
+-AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
++AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wshadow"
+
+ AC_SUBST(AM_CFLAGS)
+ AC_SUBST(AM_LDFLAGS)
diff --git a/recipes/libusb/libusb1_1.0.0.bb b/recipes/libusb/libusb1_1.0.0.bb
index 8450a7c946..978d819a6f 100644
--- a/recipes/libusb/libusb1_1.0.0.bb
+++ b/recipes/libusb/libusb1_1.0.0.bb
@@ -9,6 +9,8 @@ PR = "r0"
SRC_URI = "\
${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
"
+SRC_URI_append_nylon = " file://gcc-3-compatibility.patch;patch=1 \
+"
S = "${WORKDIR}/libusb-${PV}"
inherit autotools pkgconfig binconfig lib_package
diff --git a/recipes/libusb/libusb1_1.0.1.bb b/recipes/libusb/libusb1_1.0.1.bb
new file mode 100644
index 0000000000..3856812965
--- /dev/null
+++ b/recipes/libusb/libusb1_1.0.1.bb
@@ -0,0 +1,28 @@
+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 \
+"
+SRC_URI_append_nylon = " file://gcc-3-compatibility.patch;patch=1 \
+"
+S = "${WORKDIR}/libusb-${PV}"
+
+inherit autotools_stage binconfig lib_package
+
+PARALLEL_MAKE = ""
+EXTRA_OECONF = "--disable-build-docs"
+
+export CXXFLAGS += "-lstdc++ -I${STAGING_INCDIR}"
+
+LIBTOOL = "${HOST_SYS}-libtool"
+EXTRA_OEMAKE = "'LIBTOOL=${LIBTOOL}'"
+
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+PACKAGES =+ "libusbpp"
+FILES_libusbpp = "${libdir}/libusbpp*.so.*"
diff --git a/recipes/libxine/libxine_1.1.16.3.bb b/recipes/libxine/libxine_1.1.16.3.bb
new file mode 100644
index 0000000000..21e5a6bd21
--- /dev/null
+++ b/recipes/libxine/libxine_1.1.16.3.bb
@@ -0,0 +1,39 @@
+require libxine.inc
+
+PPDIR = "1.26"
+PR = "r0"
+
+FILESPATHPKG .= ":libxine-1.1.16"
+
+SRC_URI += " \
+ file://libxine-arm-configure.patch;patch=1 \
+ file://iconv.patch;patch=1 \
+ "
+
+python populate_packages_prepend () {
+ bb.data.setVar('PKG_libxine', 'libxine', d)
+
+ plugindir = bb.data.expand('${libdir}/xine/plugins/${PPDIR}', d)
+ do_split_packages(d, plugindir, '^xineplug_(.*)\.so$', 'libxine-plugin-%s', 'Xine plugin for %s', extra_depends='' )
+
+ vidixdir = bb.data.expand('${libdir}/xine/plugins/${PPDIR}/vidix', d)
+ do_split_packages(d, vidixdir, '^(.*)\.so$', 'libxine-plugin-%s', 'Xine plugin for %s', extra_depends='' )
+
+ postdir = bb.data.expand('${libdir}/xine/plugins/${PPDIR}/post', d)
+ do_split_packages(d, postdir, '^xineplug_(.*)\.so$', 'libxine-plugin-%s', 'Xine plugin for %s', extra_depends='' )
+
+ fontdir = bb.data.expand('${datadir}/xine/libxine1/fonts', d)
+ do_split_packages(d, fontdir, '^(.*).xinefont.gz$', 'libxine-font-%s', 'Xine font %s', extra_depends='' )
+
+}
+
+FILES_${PN}-dbg =+ "${libdir}/xine/plugins/${PPDIR}/.debug \
+ ${libdir}/xine/plugins/${PPDIR}/post/.debug \
+ ${libdir}/xine/plugins/${PPDIR}/vidix/.debug \
+ "
+
+FILES_${PN}-dev =+ "${libdir}/xine/plugins/${PPDIR}/*.a \
+ ${libdir}/xine/plugins/${PPDIR}/post/*.a \
+ ${libdir}/xine/plugins/${PPDIR}/vidix/*.a \
+ "
+
diff --git a/recipes/linphone/linphone_1.3.99.8.bb b/recipes/linphone/linphone_1.3.99.8.bb
index f96bd66b82..4e9b130c9a 100644
--- a/recipes/linphone/linphone_1.3.99.8.bb
+++ b/recipes/linphone/linphone_1.3.99.8.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "SIP-based IP phone (Console edition)"
HOMEPAGE = "http://www.linphone.org/?lang=us"
-LICENSE = "GPL-2"
+LICENSE = "GPLv2"
DEPENDS = "libosip2 speex libogg alsa-lib readline"
PR = "r0"
diff --git a/recipes/linux-firmware/linux-firmware_git.bb b/recipes/linux-firmware/linux-firmware_git.bb
new file mode 100644
index 0000000000..2f408409aa
--- /dev/null
+++ b/recipes/linux-firmware/linux-firmware_git.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "Firmware files for use with Linux kernel"
+
+PR_append = "+gitr${SRCREV}"
+SRCREV = "80a203275fc368db0a5f166c42dd35a4a22f2453"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git;protocol=git"
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}/lib/firmware/
+ cp -rpP * ${D}/lib/firmware/
+}
+
+FILES_${PN} += "/lib/firmware/*"
+PACKAGE_ARCH = "all"
+
+
diff --git a/recipes/linux-firmware/zd1211-firmware_1.4.bb b/recipes/linux-firmware/zd1211-firmware_1.4.bb
new file mode 100644
index 0000000000..c297921373
--- /dev/null
+++ b/recipes/linux-firmware/zd1211-firmware_1.4.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "zd1211 wifi files for the Linux kernel"
+HOMEPAGE = "http://zd1211.ath.cx/"
+LICENSE = "GPL"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/zd1211/zd1211-firmware-${PV}.tar.bz2"
+
+S = "${WORKDIR}"
+
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}/lib/firmware/zd1211
+ cp -rpP zd1211-firmware/* ${D}/lib/firmware/zd1211
+}
+
+FILES_${PN} += "/lib/firmware/zd1211/*"
+PACKAGE_ARCH = "all"
+
diff --git a/recipes/linux-hotplug/linux-hotplug-20040920/hotplug-binary-path.patch b/recipes/linux-hotplug/linux-hotplug-20040920/hotplug-binary-path.patch
new file mode 100644
index 0000000000..c68a0099fa
--- /dev/null
+++ b/recipes/linux-hotplug/linux-hotplug-20040920/hotplug-binary-path.patch
@@ -0,0 +1,20 @@
+--- hotplug-2004_09_20/etc/hotplug/pci.rc-orig 2009-04-07 21:00:18.000000000 +0200
++++ hotplug-2004_09_20/etc/hotplug/pci.rc 2009-04-07 21:00:43.000000000 +0200
+@@ -38,7 +38,7 @@
+ sub_vendor_id=`cat $PCI_DEVICE/subsystem_vendor`
+ sub_device_id=`cat $PCI_DEVICE/subsystem_device`
+ PCI_SUBSYS_ID="${sub_vendor_id#0x}:${sub_device_id#0x}"
+- /sbin/hotplug pci
++ /usr/sbin/hotplug pci
+ done
+ fi
+ else
+@@ -53,7 +53,7 @@
+ for BUS in `cd /proc/bus/pci;find * -type d -print`; do
+ for SLOT_FUNC in `cd /proc/bus/pci/$BUS; echo *`; do
+ PCI_SLOT=$BUS:$SLOT_FUNC
+- /sbin/hotplug pci
++ /usr/sbin/hotplug pci
+ done
+ done
+ fi
diff --git a/recipes/linux-hotplug/linux-hotplug_20040920.bb b/recipes/linux-hotplug/linux-hotplug_20040920.bb
index 6209504c20..5cab3b81d8 100644
--- a/recipes/linux-hotplug/linux-hotplug_20040920.bb
+++ b/recipes/linux-hotplug/linux-hotplug_20040920.bb
@@ -27,7 +27,8 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/kernel/hotplug/hotplug-2004_09_20
file://sysconfig-usb \
file://isapnp-exit.diff;patch=1 \
file://usb-storage \
- file://soc.agent"
+ file://soc.agent \
+ file://hotplug-binary-path.patch;patch=1"
SRC_URI_append_openzaurus = " file://quiet-pci.patch;patch=1"
diff --git a/recipes/linux-libc-headers/linux-libc-headers_2.6.18+2.6.19-rc1.bb b/recipes/linux-libc-headers/linux-libc-headers_2.6.18+2.6.19-rc1.bb
index 73e9b07d7f..3a6de1c72e 100644
--- a/recipes/linux-libc-headers/linux-libc-headers_2.6.18+2.6.19-rc1.bb
+++ b/recipes/linux-libc-headers/linux-libc-headers_2.6.18+2.6.19-rc1.bb
@@ -49,9 +49,12 @@ do_stage () {
}
do_stage_append_nylon () {
- cp -pPR include/asm-${ARCH}/* ${STAGING_INCDIR}/asm/
- cp -pPR include/asm-${ARCH}/* ${CROSS_DIR}/${TARGET_SYS}/include/asm/
- cp -pPR include/linux/* ${STAGING_INCDIR}/linux/
- cp -pPR include/linux/* ${CROSS_DIR}/${TARGET_SYS}/include/linux/
+ install -d ${STAGING_INCDIR}/asm/
+ cp -vpPR include/asm-${ARCH}/* ${STAGING_INCDIR}/asm/
+ install -d ${CROSS_DIR}/${TARGET_SYS}/include/asm/
+ cp -vpPR include/asm-${ARCH}/* ${CROSS_DIR}/${TARGET_SYS}/include/asm/
+ cp -vpPR include/linux/* ${STAGING_INCDIR}/linux/
+ install -d ${CROSS_DIR}/${TARGET_SYS}/include/linux/
+ cp -vpPR include/linux/* ${CROSS_DIR}/${TARGET_SYS}/include/linux/
}
diff --git a/recipes/linux-libc-headers/linux-libc-headers_2.6.18.bb b/recipes/linux-libc-headers/linux-libc-headers_2.6.18.bb
index d71b68a930..60d621b1dc 100644
--- a/recipes/linux-libc-headers/linux-libc-headers_2.6.18.bb
+++ b/recipes/linux-libc-headers/linux-libc-headers_2.6.18.bb
@@ -69,9 +69,12 @@ do_stage () {
}
do_stage_append_nylon () {
- cp -pPR include/asm-${ARCH}/* ${STAGING_INCDIR}/asm/
- cp -pPR include/asm-${ARCH}/* ${CROSS_DIR}/${TARGET_SYS}/include/asm/
- cp -pPR include/linux/* ${STAGING_INCDIR}/linux/
- cp -pPR include/linux/* ${CROSS_DIR}/${TARGET_SYS}/include/linux/
+ install -d ${STAGING_INCDIR}/asm/
+ cp -vpPR include/asm-${ARCH}/* ${STAGING_INCDIR}/asm/
+ install -d ${CROSS_DIR}/${TARGET_SYS}/include/asm/
+ cp -vpPR include/asm-${ARCH}/* ${CROSS_DIR}/${TARGET_SYS}/include/asm/
+ cp -vpPR include/linux/* ${STAGING_INCDIR}/linux/
+ install -d ${CROSS_DIR}/${TARGET_SYS}/include/linux/
+ cp -vpPR include/linux/* ${CROSS_DIR}/${TARGET_SYS}/include/linux/
}
diff --git a/recipes/linux/c7x0-kernels-2.4-embedix.bb b/recipes/linux/c7x0-kernels-2.4-embedix.bb
index 44c9ad2036..60b7a5cafb 100644
--- a/recipes/linux/c7x0-kernels-2.4-embedix.bb
+++ b/recipes/linux/c7x0-kernels-2.4-embedix.bb
@@ -5,7 +5,10 @@ PROVIDES = "virtual/kernel"
PR = "r1"
COMPATIBLE_HOST = "arm.*-linux"
-COMPATIBLE_MACHINE = '(corgi|husky|shepherd)'
+
+# For these old 2.4 kernels we override in sharprom-compatible.conf
+#COMPATIBLE_MACHINE = "(corgi|husky|shepherd)"
+COMPATIBLE_MACHINE = "none"
DEPENDS = "corgi-kernel-2.4-embedix shepherd-kernel-2.4-embedix husky-kernel-2.4-embedix"
diff --git a/recipes/linux/collie-kernels-2.4-embedix.bb b/recipes/linux/collie-kernels-2.4-embedix.bb
index b7dfa377f2..1445e41151 100644
--- a/recipes/linux/collie-kernels-2.4-embedix.bb
+++ b/recipes/linux/collie-kernels-2.4-embedix.bb
@@ -5,7 +5,11 @@ PROVIDES = "virtual/kernel"
PR = "r2"
COMPATIBLE_HOST = "arm.*-linux"
-COMPATIBLE_MACHINE = "collie"
+
+# For these old 2.4 kernels we override in sharprom-compatible.conf
+#COMPATIBLE_MACHINE = "collie"
+COMPATIBLE_MACHINE = "none"
+
DEPENDS = '${@base_conditional("DISTRO_TYPE", "debug", "openzaurus-sa", "collie-kernel-64-0 collie-kernel-24-8 collie-kernel-32-0 collie-kernel-32-32 collie-kernel-40-24 collie-kernel-48-16 collie-kernel-58-6",d)}'
PACKAGES = ""
diff --git a/recipes/linux/corgi-kernel-2.4-embedix.bb b/recipes/linux/corgi-kernel-2.4-embedix.bb
index 594a431ffb..986ee7ac40 100644
--- a/recipes/linux/corgi-kernel-2.4-embedix.bb
+++ b/recipes/linux/corgi-kernel-2.4-embedix.bb
@@ -1,3 +1,3 @@
-COMPATIBLE_MACHINE = "corgi"
+MACHINE = "corgi"
COMPATIBLE_HOST = "arm.*-linux"
require openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc
diff --git a/recipes/linux/husky-kernel-2.4-embedix.bb b/recipes/linux/husky-kernel-2.4-embedix.bb
index ac253cc7c2..81f859594c 100644
--- a/recipes/linux/husky-kernel-2.4-embedix.bb
+++ b/recipes/linux/husky-kernel-2.4-embedix.bb
@@ -1,5 +1,5 @@
COMPATIBLE_HOST = "arm.*-linux"
-COMPATIBLE_MACHINE = "husky"
+MACHINE = "husky"
require openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc
diff --git a/recipes/linux/linux-2.6.28/tx27/defconfig b/recipes/linux/linux-2.6.28/tx27/defconfig
new file mode 100644
index 0000000000..d46f4401f0
--- /dev/null
+++ b/recipes/linux/linux-2.6.28/tx27/defconfig
@@ -0,0 +1,1791 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.28
+# Sun Jun 7 01:39:35 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+# 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_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=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=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+# CONFIG_AIO 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 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_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD 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
+# CONFIG_BLK_DEV_INTEGRITY 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
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+CONFIG_ARCH_MXC=y
+# 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 is not set
+# CONFIG_ARCH_MSM is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Freescale MXC Implementations
+#
+CONFIG_ARCH_MX2=y
+# CONFIG_ARCH_MX3 is not set
+
+#
+# MX2 family CPU support
+#
+CONFIG_MACH_MX27=y
+
+#
+# MX2 Platforms
+#
+# CONFIG_MACH_MX27ADS is not set
+# CONFIG_MACH_PCM038 is not set
+CONFIG_MACH_TX27=y
+CONFIG_BASE_CLK_26MHz=y
+# CONFIG_KARO_DEBUG is not set
+CONFIG_MXC_EMMA=y
+# CONFIG_MXC_IRQ_PRIOR is not set
+CONFIG_MXC_ULPI=y
+
+#
+# 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
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=" debug "
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_VFP=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_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 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=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_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_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
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-5
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
+CONFIG_MTD_REDBOOT_PARTS_READONLY=y
+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 is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_GPIO is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_MXC_FLASH_BBT=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+CONFIG_MTD_NAND_MXC=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=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 is not set
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
+# 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 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 is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+CONFIG_SMSC_PHY=y
+# 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_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 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_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+CONFIG_FEC=y
+# CONFIG_FEC2 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+# CONFIG_LIBERTAS_SDIO is not set
+# CONFIG_LIBERTAS_DEBUG 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 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=m
+# CONFIG_USB_NET_AX8817X is not set
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_SMSC95XX is not set
+# CONFIG_USB_NET_GL620A is not set
+# CONFIG_USB_NET_NET1080 is not set
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+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 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_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=m
+# CONFIG_INPUT_APMPOWER 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=m
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
+CONFIG_TOUCHSCREEN_USB_EGALAX=y
+# CONFIG_TOUCHSCREEN_USB_PANJIT is not set
+# CONFIG_TOUCHSCREEN_USB_3M is not set
+# CONFIG_TOUCHSCREEN_USB_ITM is not set
+# CONFIG_TOUCHSCREEN_USB_ETURBO is not set
+# CONFIG_TOUCHSCREEN_USB_GUNZE is not set
+# CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set
+CONFIG_TOUCHSCREEN_USB_IRTOUCH=y
+CONFIG_TOUCHSCREEN_USB_IDEALTEK=y
+CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
+CONFIG_TOUCHSCREEN_USB_GOTOP=y
+# CONFIG_TOUCHSCREEN_TOUCHIT213 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_CONSOLE_TRANSLATIONS is not set
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_DEVKMEM is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=16
+# 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=m
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_ALGOBIT=m
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_GPIO=m
+CONFIG_I2C_MXC=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+CONFIG_AT24=m
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 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=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_MXC=y
+# CONFIG_SPI_MXC_TEST_LOOPBACK is not set
+CONFIG_SPI_MXC_SELECT1=y
+# CONFIG_SPI_MXC_SELECT2 is not set
+# CONFIG_SPI_MXC_SELECT3 is not set
+CONFIG_SPI_MXC_REV0=y
+# CONFIG_SPI_MXC_REV4 is not set
+# CONFIG_SPI_MXC_REV5 is not set
+# CONFIG_SPI_MXC_REV7 is not set
+
+#
+# SPI Protocol Masters
+#
+CONFIG_SPI_AT25=m
+CONFIG_SPI_SPIDEV=m
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+CONFIG_W1=m
+CONFIG_W1_CON=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2490 is not set
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_MXC=m
+# CONFIG_W1_MASTER_GPIO is not set
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+CONFIG_W1_SLAVE_SMEM=m
+CONFIG_W1_SLAVE_DS2433=m
+CONFIG_W1_SLAVE_DS2433_CRC=y
+# CONFIG_W1_SLAVE_DS2760 is not set
+# CONFIG_W1_SLAVE_BQ27000 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_LP3972=m
+CONFIG_HWMON=m
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 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=m
+# 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_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_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_THERMAL is not set
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+
+#
+# Multimedia devices
+#
+
+#
+# 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
+
+#
+# Multimedia drivers
+#
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=y
+CONFIG_MEDIA_TUNER_CUSTOMIZE=y
+# CONFIG_MEDIA_TUNER_SIMPLE is not set
+# CONFIG_MEDIA_TUNER_TDA8290 is not set
+# CONFIG_MEDIA_TUNER_TDA827X is not set
+# CONFIG_MEDIA_TUNER_TDA18271 is not set
+# CONFIG_MEDIA_TUNER_TDA9887 is not set
+# CONFIG_MEDIA_TUNER_TEA5761 is not set
+# CONFIG_MEDIA_TUNER_TEA5767 is not set
+# CONFIG_MEDIA_TUNER_MT20XX is not set
+# CONFIG_MEDIA_TUNER_MT2060 is not set
+# CONFIG_MEDIA_TUNER_MT2266 is not set
+# CONFIG_MEDIA_TUNER_MT2131 is not set
+# CONFIG_MEDIA_TUNER_QT1010 is not set
+# CONFIG_MEDIA_TUNER_XC2028 is not set
+# CONFIG_MEDIA_TUNER_XC5000 is not set
+# CONFIG_MEDIA_TUNER_MXL5005S is not set
+# CONFIG_MEDIA_TUNER_MXL5007T is not set
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEOBUF_GEN=y
+CONFIG_VIDEOBUF_DMA_CONTIG=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
+
+#
+# Encoders/decoders and other helper chips
+#
+
+#
+# Audio decoders
+#
+# CONFIG_VIDEO_TVAUDIO is not set
+# CONFIG_VIDEO_TDA7432 is not set
+# CONFIG_VIDEO_TDA9840 is not set
+# CONFIG_VIDEO_TDA9875 is not set
+# CONFIG_VIDEO_TEA6415C is not set
+# CONFIG_VIDEO_TEA6420 is not set
+# CONFIG_VIDEO_MSP3400 is not set
+# CONFIG_VIDEO_CS5345 is not set
+# CONFIG_VIDEO_CS53L32A is not set
+# CONFIG_VIDEO_M52790 is not set
+# CONFIG_VIDEO_TLV320AIC23B is not set
+# CONFIG_VIDEO_WM8775 is not set
+# CONFIG_VIDEO_WM8739 is not set
+# CONFIG_VIDEO_VP27SMPX is not set
+
+#
+# Video decoders
+#
+# CONFIG_VIDEO_OV7670 is not set
+# CONFIG_VIDEO_TCM825X is not set
+# CONFIG_VIDEO_SAA711X is not set
+# CONFIG_VIDEO_SAA717X is not set
+# CONFIG_VIDEO_TVP5150 is not set
+
+#
+# Video and audio decoders
+#
+# CONFIG_VIDEO_CX25840 is not set
+
+#
+# MPEG video encoders
+#
+# CONFIG_VIDEO_CX2341X is not set
+
+#
+# Video encoders
+#
+# CONFIG_VIDEO_SAA7127 is not set
+
+#
+# Video improvement chips
+#
+# CONFIG_VIDEO_UPD64031A is not set
+# CONFIG_VIDEO_UPD64083 is not set
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_MXC_CAMERA is not set
+CONFIG_VIDEO_MXC_OUTPUT=y
+# CONFIG_VIDEO_MXC_OUTPUT_DEBUG is not set
+CONFIG_VIDEO_MXC_EMMA_OUTPUT=y
+# CONFIG_VIDEO_MXC_OPL is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+CONFIG_SOC_CAMERA=y
+# CONFIG_SOC_CAMERA_MT9M001 is not set
+# CONFIG_SOC_CAMERA_MT9M111 is not set
+# CONFIG_SOC_CAMERA_MT9V022 is not set
+CONFIG_SOC_CAMERA_PLATFORM=y
+# CONFIG_VIDEO_SH_MOBILE_CEU is not set
+# CONFIG_V4L_USB_DRIVERS is not set
+CONFIG_VIDEO_MX27=y
+# CONFIG_RADIO_ADAPTERS is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+
+#
+# Frame buffer hardware drivers
+#
+CONFIG_FB_IMX=y
+# CONFIG_FB_UVESA is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT 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
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+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
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+CONFIG_SND_ARM=y
+CONFIG_SND_SPI=y
+# CONFIG_SND_USB is not set
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_ALL_CODECS=y
+CONFIG_SND_SOC_AD73311=y
+CONFIG_SND_SOC_AK4535=y
+CONFIG_SND_SOC_CS4270=y
+CONFIG_SND_SOC_SSM2602=y
+CONFIG_SND_SOC_TLV320AIC23=y
+CONFIG_SND_SOC_TLV320AIC26=y
+CONFIG_SND_SOC_TLV320AIC3X=y
+CONFIG_SND_SOC_UDA1380=y
+CONFIG_SND_SOC_WM8510=y
+CONFIG_SND_SOC_WM8580=y
+CONFIG_SND_SOC_WM8731=y
+CONFIG_SND_SOC_WM8750=y
+CONFIG_SND_SOC_WM8753=y
+CONFIG_SND_SOC_WM8900=y
+CONFIG_SND_SOC_WM8903=y
+CONFIG_SND_SOC_WM8971=y
+CONFIG_SND_SOC_WM8990=y
+# 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=y
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+# CONFIG_HID_A4TECH is not set
+# CONFIG_HID_APPLE is not set
+# CONFIG_HID_BELKIN is not set
+# CONFIG_HID_BRIGHT is not set
+# CONFIG_HID_CHERRY is not set
+# CONFIG_HID_CHICONY is not set
+# CONFIG_HID_CYPRESS is not set
+# CONFIG_HID_DELL is not set
+# CONFIG_HID_EZKEY is not set
+# CONFIG_HID_GYRATION is not set
+# CONFIG_HID_LOGITECH is not set
+# CONFIG_HID_MICROSOFT is not set
+# CONFIG_HID_MONTEREY is not set
+# CONFIG_HID_PANTHERLORD is not set
+# CONFIG_HID_PETALYNX is not set
+# CONFIG_HID_SAMSUNG is not set
+# CONFIG_HID_SONY is not set
+# CONFIG_HID_SUNPLUS is not set
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MON is not set
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_EHCI_MXC=y
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more 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 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_EZUSB is not set
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE 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 is not set
+# CONFIG_USB_SERIAL_CP2101 is not set
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+# CONFIG_USB_SERIAL_FTDI_SIO is not set
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+# CONFIG_USB_SERIAL_GARMIN is not set
+# CONFIG_USB_SERIAL_IPW is not set
+# CONFIG_USB_SERIAL_IUU is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_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 is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+# CONFIG_USB_SERIAL_TI is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OPTION is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_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_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_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=m
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+# CONFIG_USB_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+CONFIG_MMC_MXC=y
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_PCA955X is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT 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_DS13XX=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
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_MXC=y
+# CONFIG_DMADEVICES is not set
+CONFIG_DRIVERS_MXC=y
+
+#
+# MXC VPU(Video Processing Unit) support
+#
+CONFIG_MXC_VPU=y
+# CONFIG_MXC_VPU_DEBUG is not set
+# CONFIG_REGULATOR is not set
+# 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=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=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=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=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_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=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_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 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=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="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=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 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=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=m
+# 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 is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+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 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 is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=m
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_ALGAPI2=m
+CONFIG_CRYPTO_AEAD2=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER2=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=m
+CONFIG_CRYPTO_RNG2=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER2=m
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=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 is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-2.6.28/tx27/linux-2.6.28-karo4.diff b/recipes/linux/linux-2.6.28/tx27/linux-2.6.28-karo4.diff
new file mode 100644
index 0000000000..a1be6cabb4
--- /dev/null
+++ b/recipes/linux/linux-2.6.28/tx27/linux-2.6.28-karo4.diff
@@ -0,0 +1,40137 @@
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/Kconfig linux-2.6.28-karo/arch/arm/Kconfig
+--- linux-2.6.28/arch/arm/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -1268,6 +1268,8 @@ source "drivers/rtc/Kconfig"
+
+ source "drivers/dma/Kconfig"
+
++source "drivers/mxc/Kconfig"
++
+ source "drivers/dca/Kconfig"
+
+ source "drivers/auxdisplay/Kconfig"
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/configs/karo_tx27_defconfig linux-2.6.28-karo/arch/arm/configs/karo_tx27_defconfig
+--- linux-2.6.28/arch/arm/configs/karo_tx27_defconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/configs/karo_tx27_defconfig 2009-03-12 16:52:26.000000000 +0100
+@@ -0,0 +1,1799 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.28
++# Thu Mar 12 15:05:31 2009
++#
++CONFIG_ARM=y
++CONFIG_SYS_SUPPORTS_APM_EMULATION=y
++CONFIG_GENERIC_GPIO=y
++CONFIG_GENERIC_TIME=y
++CONFIG_GENERIC_CLOCKEVENTS=y
++CONFIG_MMU=y
++# CONFIG_NO_IOPORT is not set
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_HAVE_LATENCYTOP_SUPPORT=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++CONFIG_HARDIRQS_SW_RESEND=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++# CONFIG_ARCH_HAS_ILOG2_U32 is not set
++# CONFIG_ARCH_HAS_ILOG2_U64 is not set
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_ARCH_MTD_XIP=y
++CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
++CONFIG_VECTORS_BASE=0xffff0000
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# General setup
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_BROKEN_ON_SMP=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++CONFIG_LOCALVERSION=""
++# CONFIG_LOCALVERSION_AUTO is not set
++# CONFIG_SWAP 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_AUDIT is not set
++# CONFIG_IKCONFIG is not set
++CONFIG_LOG_BUF_SHIFT=17
++# CONFIG_CGROUPS is not set
++# CONFIG_GROUP_SCHED is not set
++# CONFIG_SYSFS_DEPRECATED_V2 is not set
++# CONFIG_RELAY is not set
++# CONFIG_NAMESPACES is not set
++# CONFIG_BLK_DEV_INITRD is not set
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++CONFIG_SYSCTL=y
++CONFIG_EMBEDDED=y
++CONFIG_UID16=y
++CONFIG_SYSCTL_SYSCALL=y
++CONFIG_KALLSYMS=y
++CONFIG_KALLSYMS_ALL=y
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++# CONFIG_ELF_CORE is not set
++CONFIG_COMPAT_BRK=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_ANON_INODES=y
++CONFIG_EPOLL=y
++CONFIG_SIGNALFD=y
++CONFIG_TIMERFD=y
++CONFIG_EVENTFD=y
++CONFIG_SHMEM=y
++# CONFIG_AIO 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 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_GENERIC_DMA_COHERENT=y
++CONFIG_SLABINFO=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++CONFIG_MODULES=y
++# CONFIG_MODULE_FORCE_LOAD is not set
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD 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
++# CONFIG_BLK_DEV_INTEGRITY 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
++CONFIG_FREEZER=y
++
++#
++# System Type
++#
++# CONFIG_ARCH_AAEC2000 is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_REALVIEW is not set
++# CONFIG_ARCH_VERSATILE is not set
++# CONFIG_ARCH_AT91 is not set
++# CONFIG_ARCH_CLPS7500 is not set
++# CONFIG_ARCH_CLPS711X is not set
++# CONFIG_ARCH_EBSA110 is not set
++# CONFIG_ARCH_EP93XX is not set
++# CONFIG_ARCH_FOOTBRIDGE is not set
++# CONFIG_ARCH_NETX is not set
++# CONFIG_ARCH_H720X is not set
++# CONFIG_ARCH_IMX is not set
++# CONFIG_ARCH_IOP13XX is not set
++# CONFIG_ARCH_IOP32X is not set
++# CONFIG_ARCH_IOP33X is not set
++# CONFIG_ARCH_IXP23XX is not set
++# CONFIG_ARCH_IXP2000 is not set
++# CONFIG_ARCH_IXP4XX is not set
++# CONFIG_ARCH_L7200 is not set
++# CONFIG_ARCH_KIRKWOOD is not set
++# CONFIG_ARCH_KS8695 is not set
++# CONFIG_ARCH_NS9XXX is not set
++# CONFIG_ARCH_LOKI is not set
++# CONFIG_ARCH_MV78XX0 is not set
++CONFIG_ARCH_MXC=y
++# 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 is not set
++# CONFIG_ARCH_MSM is not set
++
++#
++# Boot options
++#
++
++#
++# Power management
++#
++
++#
++# Freescale MXC Implementations
++#
++CONFIG_ARCH_MX2=y
++# CONFIG_ARCH_MX3 is not set
++
++#
++# MX2 family CPU support
++#
++CONFIG_MACH_MX27=y
++
++#
++# MX2 Platforms
++#
++# CONFIG_MACH_MX27ADS is not set
++# CONFIG_MACH_PCM038 is not set
++CONFIG_MACH_TX27=y
++CONFIG_BASE_CLK_26MHz=y
++# CONFIG_KARO_DEBUG is not set
++CONFIG_MXC_EMMA=y
++# CONFIG_MXC_IRQ_PRIOR is not set
++CONFIG_MXC_ULPI=y
++
++#
++# 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
++# CONFIG_PCCARD is not set
++
++#
++# Kernel Features
++#
++CONFIG_TICK_ONESHOT=y
++CONFIG_NO_HZ=y
++CONFIG_HIGH_RES_TIMERS=y
++CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
++CONFIG_VMSPLIT_3G=y
++# CONFIG_VMSPLIT_2G is not set
++# CONFIG_VMSPLIT_1G is not set
++CONFIG_PAGE_OFFSET=0xC0000000
++CONFIG_PREEMPT=y
++CONFIG_HZ=100
++CONFIG_AEABI=y
++CONFIG_OABI_COMPAT=y
++CONFIG_ARCH_FLATMEM_HAS_HOLES=y
++# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
++# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++CONFIG_PAGEFLAGS_EXTENDED=y
++CONFIG_SPLIT_PTLOCK_CPUS=4096
++# CONFIG_RESOURCES_64BIT is not set
++# CONFIG_PHYS_ADDR_T_64BIT is not set
++CONFIG_ZONE_DMA_FLAG=0
++CONFIG_VIRT_TO_BUS=y
++CONFIG_UNEVICTABLE_LRU=y
++CONFIG_ALIGNMENT_TRAP=y
++
++#
++# Boot options
++#
++CONFIG_ZBOOT_ROM_TEXT=0x0
++CONFIG_ZBOOT_ROM_BSS=0x0
++CONFIG_CMDLINE="root=/dev/mtdblock1 rootfstype=jffs2 console=ttymxc0,115200 ro panic=5"
++# CONFIG_XIP_KERNEL is not set
++# CONFIG_KEXEC is not set
++
++#
++# CPU Power Management
++#
++# CONFIG_CPU_IDLE is not set
++
++#
++# Floating point emulation
++#
++
++#
++# At least one emulation must be selected
++#
++CONFIG_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_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
++CONFIG_HAVE_AOUT=y
++# CONFIG_BINFMT_AOUT is not set
++# CONFIG_BINFMT_MISC is not set
++
++#
++# Power management options
++#
++CONFIG_PM=y
++# CONFIG_PM_DEBUG is not set
++CONFIG_PM_SLEEP=y
++CONFIG_SUSPEND=y
++CONFIG_SUSPEND_FREEZER=y
++CONFIG_APM_EMULATION=y
++CONFIG_ARCH_SUSPEND_POSSIBLE=y
++CONFIG_NET=y
++
++#
++# Networking options
++#
++CONFIG_PACKET=y
++CONFIG_PACKET_MMAP=y
++CONFIG_UNIX=y
++# CONFIG_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 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=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_NETWORK_SECMARK is not set
++# CONFIG_NETFILTER is not set
++# CONFIG_IP_DCCP is not set
++# CONFIG_IP_SCTP is not set
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_NET_DSA is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++# CONFIG_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
++# CONFIG_PHONET is not set
++CONFIG_WIRELESS=y
++CONFIG_CFG80211=m
++CONFIG_NL80211=y
++CONFIG_WIRELESS_OLD_REGULATORY=y
++CONFIG_WIRELESS_EXT=y
++CONFIG_WIRELESS_EXT_SYSFS=y
++CONFIG_MAC80211=m
++
++#
++# Rate control algorithm selection
++#
++CONFIG_MAC80211_RC_PID=y
++# CONFIG_MAC80211_RC_MINSTREL is not set
++CONFIG_MAC80211_RC_DEFAULT_PID=y
++# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
++CONFIG_MAC80211_RC_DEFAULT="pid"
++# CONFIG_MAC80211_MESH is not set
++# CONFIG_MAC80211_LEDS is not set
++# CONFIG_MAC80211_DEBUG_MENU 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=m
++CONFIG_FIRMWARE_IN_KERNEL=y
++CONFIG_EXTRA_FIRMWARE=""
++# CONFIG_DEBUG_DRIVER is not set
++# CONFIG_DEBUG_DEVRES is not set
++# CONFIG_SYS_HYPERVISOR is not set
++CONFIG_CONNECTOR=y
++CONFIG_PROC_EVENTS=y
++CONFIG_MTD=y
++# CONFIG_MTD_DEBUG is not set
++# CONFIG_MTD_CONCAT is not set
++CONFIG_MTD_PARTITIONS=y
++CONFIG_MTD_REDBOOT_PARTS=y
++CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-5
++CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
++CONFIG_MTD_REDBOOT_PARTS_READONLY=y
++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 is not set
++# CONFIG_MTD_JEDECPROBE is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++# CONFIG_MTD_RAM is not set
++# CONFIG_MTD_ROM is not set
++# CONFIG_MTD_ABSENT is not set
++
++#
++# Mapping drivers for chip access
++#
++# CONFIG_MTD_COMPLEX_MAPPINGS is not set
++# CONFIG_MTD_PLATRAM is not set
++
++#
++# Self-contained MTD device drivers
++#
++# CONFIG_MTD_DATAFLASH is not set
++# CONFIG_MTD_M25P80 is not set
++# CONFIG_MTD_SLRAM is not set
++# CONFIG_MTD_PHRAM is not set
++# CONFIG_MTD_MTDRAM is not set
++# CONFIG_MTD_BLOCK2MTD is not set
++
++#
++# Disk-On-Chip Device Drivers
++#
++# CONFIG_MTD_DOC2000 is not set
++# CONFIG_MTD_DOC2001 is not set
++# CONFIG_MTD_DOC2001PLUS is not set
++CONFIG_MTD_NAND=y
++# CONFIG_MTD_NAND_VERIFY_WRITE is not set
++# CONFIG_MTD_NAND_ECC_SMC is not set
++# CONFIG_MTD_NAND_MUSEUM_IDS is not set
++# CONFIG_MTD_NAND_GPIO is not set
++CONFIG_MTD_NAND_IDS=y
++# CONFIG_MTD_NAND_DISKONCHIP is not set
++CONFIG_MTD_NAND_MXC_FLASH_BBT=y
++# CONFIG_MTD_NAND_NANDSIM is not set
++# CONFIG_MTD_NAND_PLATFORM is not set
++# CONFIG_MTD_ALAUDA is not set
++CONFIG_MTD_NAND_MXC=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=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 is not set
++# CONFIG_ICS932S401 is not set
++# CONFIG_ENCLOSURE_SERVICES is not set
++# CONFIG_C2PORT is not set
++CONFIG_HAVE_IDE=y
++# 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 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 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_DH is not set
++# CONFIG_ATA is not set
++# CONFIG_MD is not set
++CONFIG_NETDEVICES=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_MACVLAN is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++# CONFIG_VETH is not set
++CONFIG_PHYLIB=y
++
++#
++# MII PHY device drivers
++#
++# CONFIG_MARVELL_PHY is not set
++# CONFIG_DAVICOM_PHY is not set
++# CONFIG_QSEMI_PHY is not set
++# CONFIG_LXT_PHY is not set
++# CONFIG_CICADA_PHY is not set
++# CONFIG_VITESSE_PHY is not set
++CONFIG_SMSC_PHY=y
++# 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_AX88796 is not set
++# CONFIG_SMC91X is not set
++# CONFIG_DM9000 is not set
++# CONFIG_ENC28J60 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_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
++# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
++# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
++# CONFIG_B44 is not set
++CONFIG_FEC=y
++# CONFIG_FEC2 is not set
++# CONFIG_NETDEV_1000 is not set
++# CONFIG_NETDEV_10000 is not set
++
++#
++# Wireless LAN
++#
++# CONFIG_WLAN_PRE80211 is not set
++CONFIG_WLAN_80211=y
++CONFIG_LIBERTAS=m
++CONFIG_LIBERTAS_USB=m
++# CONFIG_LIBERTAS_SDIO is not set
++# CONFIG_LIBERTAS_DEBUG is not set
++# CONFIG_LIBERTAS_THINFIRM is not set
++# CONFIG_USB_ZD1201 is not set
++# CONFIG_USB_NET_RNDIS_WLAN is not set
++# CONFIG_RTL8187 is not set
++# CONFIG_MAC80211_HWSIM is not set
++# CONFIG_P54_COMMON is not set
++# CONFIG_IWLWIFI_LEDS is not set
++# CONFIG_HOSTAP is not set
++# 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 is not set
++# CONFIG_USB_KAWETH is not set
++# CONFIG_USB_PEGASUS is not set
++# CONFIG_USB_RTL8150 is not set
++CONFIG_USB_USBNET=m
++# CONFIG_USB_NET_AX8817X is not set
++CONFIG_USB_NET_CDCETHER=m
++# CONFIG_USB_NET_DM9601 is not set
++# CONFIG_USB_NET_SMSC95XX is not set
++# CONFIG_USB_NET_GL620A is not set
++# CONFIG_USB_NET_NET1080 is not set
++# CONFIG_USB_NET_PLUSB is not set
++# CONFIG_USB_NET_MCS7830 is not set
++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 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_WAN is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NETCONSOLE is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++# CONFIG_ISDN is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++# CONFIG_INPUT_FF_MEMLESS is not set
++# CONFIG_INPUT_POLLDEV is not set
++
++#
++# Userland interfaces
++#
++# CONFIG_INPUT_MOUSEDEV is not set
++# CONFIG_INPUT_JOYDEV is not set
++CONFIG_INPUT_EVDEV=y
++CONFIG_INPUT_EVBUG=m
++# CONFIG_INPUT_APMPOWER 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=m
++# CONFIG_INPUT_MOUSE is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TABLET is not set
++CONFIG_INPUT_TOUCHSCREEN=y
++# CONFIG_TOUCHSCREEN_ADS7846 is not set
++# CONFIG_TOUCHSCREEN_FUJITSU is not set
++# CONFIG_TOUCHSCREEN_GUNZE is not set
++# CONFIG_TOUCHSCREEN_ELO is not set
++# CONFIG_TOUCHSCREEN_MTOUCH is not set
++# CONFIG_TOUCHSCREEN_INEXIO is not set
++# CONFIG_TOUCHSCREEN_MK712 is not set
++# CONFIG_TOUCHSCREEN_PENMOUNT is not set
++# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
++# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
++CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
++CONFIG_TOUCHSCREEN_USB_EGALAX=y
++# CONFIG_TOUCHSCREEN_USB_PANJIT is not set
++# CONFIG_TOUCHSCREEN_USB_3M is not set
++# CONFIG_TOUCHSCREEN_USB_ITM is not set
++# CONFIG_TOUCHSCREEN_USB_ETURBO is not set
++# CONFIG_TOUCHSCREEN_USB_GUNZE is not set
++# CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set
++CONFIG_TOUCHSCREEN_USB_IRTOUCH=y
++CONFIG_TOUCHSCREEN_USB_IDEALTEK=y
++CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
++CONFIG_TOUCHSCREEN_USB_GOTOP=y
++# CONFIG_TOUCHSCREEN_TOUCHIT213 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_CONSOLE_TRANSLATIONS is not set
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++CONFIG_VT_HW_CONSOLE_BINDING=y
++# CONFIG_DEVKMEM is not set
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++# CONFIG_SERIAL_8250 is not set
++
++#
++# Non-8250 serial port support
++#
++CONFIG_SERIAL_IMX=y
++CONFIG_SERIAL_IMX_CONSOLE=y
++CONFIG_SERIAL_CORE=y
++CONFIG_SERIAL_CORE_CONSOLE=y
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=16
++# 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=m
++CONFIG_I2C_HELPER_AUTO=y
++CONFIG_I2C_ALGOBIT=m
++
++#
++# I2C Hardware Bus support
++#
++
++#
++# I2C system bus drivers (mostly embedded / system-on-chip)
++#
++CONFIG_I2C_GPIO=m
++CONFIG_I2C_MXC=y
++# CONFIG_I2C_OCORES is not set
++# CONFIG_I2C_SIMTEC is not set
++
++#
++# External I2C/SMBus adapter drivers
++#
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_TAOS_EVM is not set
++# CONFIG_I2C_TINY_USB is not set
++
++#
++# Other I2C/SMBus bus drivers
++#
++# CONFIG_I2C_PCA_PLATFORM is not set
++# CONFIG_I2C_STUB is not set
++
++#
++# Miscellaneous I2C Chip support
++#
++# CONFIG_DS1682 is not set
++CONFIG_AT24=m
++# CONFIG_SENSORS_EEPROM is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_PCF8575 is not set
++# CONFIG_SENSORS_PCA9539 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=y
++# CONFIG_SPI_DEBUG is not set
++CONFIG_SPI_MASTER=y
++
++#
++# SPI Master Controller Drivers
++#
++CONFIG_SPI_BITBANG=m
++CONFIG_SPI_MXC=m
++# CONFIG_SPI_MXC_TEST_LOOPBACK is not set
++CONFIG_SPI_MXC_SELECT1=y
++# CONFIG_SPI_MXC_SELECT2 is not set
++# CONFIG_SPI_MXC_SELECT3 is not set
++CONFIG_SPI_MXC_REV0=y
++# CONFIG_SPI_MXC_REV4 is not set
++# CONFIG_SPI_MXC_REV5 is not set
++# CONFIG_SPI_MXC_REV7 is not set
++
++#
++# SPI Protocol Masters
++#
++CONFIG_SPI_AT25=m
++CONFIG_SPI_SPIDEV=m
++# CONFIG_SPI_TLE62X0 is not set
++CONFIG_ARCH_REQUIRE_GPIOLIB=y
++CONFIG_GPIOLIB=y
++# CONFIG_DEBUG_GPIO is not set
++CONFIG_GPIO_SYSFS=y
++
++#
++# Memory mapped GPIO expanders:
++#
++
++#
++# I2C GPIO expanders:
++#
++# CONFIG_GPIO_MAX732X is not set
++# CONFIG_GPIO_PCA953X is not set
++# CONFIG_GPIO_PCF857X is not set
++
++#
++# PCI GPIO expanders:
++#
++
++#
++# SPI GPIO expanders:
++#
++# CONFIG_GPIO_MAX7301 is not set
++# CONFIG_GPIO_MCP23S08 is not set
++CONFIG_W1=m
++CONFIG_W1_CON=y
++
++#
++# 1-wire Bus Masters
++#
++# CONFIG_W1_MASTER_DS2490 is not set
++# CONFIG_W1_MASTER_DS2482 is not set
++CONFIG_W1_MASTER_MXC=m
++# CONFIG_W1_MASTER_GPIO is not set
++
++#
++# 1-wire Slaves
++#
++# CONFIG_W1_SLAVE_THERM is not set
++CONFIG_W1_SLAVE_SMEM=m
++CONFIG_W1_SLAVE_DS2433=m
++CONFIG_W1_SLAVE_DS2433_CRC=y
++# CONFIG_W1_SLAVE_DS2760 is not set
++# CONFIG_W1_SLAVE_BQ27000 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_LP3972=m
++CONFIG_HWMON=m
++# CONFIG_HWMON_VID is not set
++# CONFIG_SENSORS_AD7414 is not set
++# CONFIG_SENSORS_AD7418 is not set
++# CONFIG_SENSORS_ADCXX is not set
++# CONFIG_SENSORS_ADM1021 is not set
++# CONFIG_SENSORS_ADM1025 is not set
++# CONFIG_SENSORS_ADM1026 is not set
++# CONFIG_SENSORS_ADM1029 is not set
++# CONFIG_SENSORS_ADM1031 is not set
++# CONFIG_SENSORS_ADM9240 is not set
++# CONFIG_SENSORS_ADT7462 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=m
++# 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_MAX1111 is not set
++# CONFIG_SENSORS_MAX1619 is not set
++# CONFIG_SENSORS_MAX6650 is not set
++# CONFIG_SENSORS_PC87360 is not set
++# CONFIG_SENSORS_PC87427 is not set
++# CONFIG_SENSORS_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_THERMAL is not set
++CONFIG_WATCHDOG=y
++CONFIG_WATCHDOG_NOWAYOUT=y
++
++#
++# Watchdog Device Drivers
++#
++# CONFIG_SOFT_WATCHDOG is not set
++
++#
++# USB-based Watchdog Cards
++#
++# CONFIG_USBPCWATCHDOG is not set
++CONFIG_SSB_POSSIBLE=y
++
++#
++# Sonics Silicon Backplane
++#
++# CONFIG_SSB is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_CORE is not set
++# CONFIG_MFD_SM501 is not set
++# CONFIG_MFD_ASIC3 is not set
++# CONFIG_HTC_EGPIO is not set
++# CONFIG_HTC_PASIC3 is not set
++# CONFIG_MFD_TMIO is not set
++# CONFIG_MFD_TC6393XB is not set
++# CONFIG_PMIC_DA903X is not set
++# CONFIG_MFD_WM8400 is not set
++# CONFIG_MFD_WM8350_I2C is not set
++
++#
++# Multimedia devices
++#
++
++#
++# Multimedia core support
++#
++CONFIG_VIDEO_DEV=m
++CONFIG_VIDEO_V4L2_COMMON=m
++# CONFIG_VIDEO_ALLOW_V4L1 is not set
++# CONFIG_VIDEO_V4L1_COMPAT is not set
++# 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=y
++# CONFIG_MEDIA_TUNER_SIMPLE is not set
++# CONFIG_MEDIA_TUNER_TDA8290 is not set
++# CONFIG_MEDIA_TUNER_TDA827X is not set
++# CONFIG_MEDIA_TUNER_TDA18271 is not set
++# CONFIG_MEDIA_TUNER_TDA9887 is not set
++# CONFIG_MEDIA_TUNER_TEA5761 is not set
++# CONFIG_MEDIA_TUNER_TEA5767 is not set
++# CONFIG_MEDIA_TUNER_MT20XX is not set
++# CONFIG_MEDIA_TUNER_MT2060 is not set
++# CONFIG_MEDIA_TUNER_MT2266 is not set
++# CONFIG_MEDIA_TUNER_MT2131 is not set
++# CONFIG_MEDIA_TUNER_QT1010 is not set
++# CONFIG_MEDIA_TUNER_XC2028 is not set
++# CONFIG_MEDIA_TUNER_XC5000 is not set
++# CONFIG_MEDIA_TUNER_MXL5005S is not set
++# CONFIG_MEDIA_TUNER_MXL5007T is not set
++CONFIG_VIDEO_V4L2=m
++CONFIG_VIDEOBUF_GEN=m
++CONFIG_VIDEOBUF_DMA_CONTIG=m
++CONFIG_VIDEO_CAPTURE_DRIVERS=y
++# CONFIG_VIDEO_ADV_DEBUG is not set
++# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
++# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
++
++#
++# Encoders/decoders and other helper chips
++#
++
++#
++# Audio decoders
++#
++# CONFIG_VIDEO_TVAUDIO is not set
++# CONFIG_VIDEO_TDA7432 is not set
++# CONFIG_VIDEO_TDA9840 is not set
++# CONFIG_VIDEO_TDA9875 is not set
++# CONFIG_VIDEO_TEA6415C is not set
++# CONFIG_VIDEO_TEA6420 is not set
++# CONFIG_VIDEO_MSP3400 is not set
++# CONFIG_VIDEO_CS5345 is not set
++# CONFIG_VIDEO_CS53L32A is not set
++# CONFIG_VIDEO_M52790 is not set
++# CONFIG_VIDEO_TLV320AIC23B is not set
++# CONFIG_VIDEO_WM8775 is not set
++# CONFIG_VIDEO_WM8739 is not set
++# CONFIG_VIDEO_VP27SMPX is not set
++
++#
++# Video decoders
++#
++# CONFIG_VIDEO_OV7670 is not set
++# CONFIG_VIDEO_TCM825X is not set
++# CONFIG_VIDEO_SAA711X is not set
++# CONFIG_VIDEO_SAA717X is not set
++# CONFIG_VIDEO_TVP5150 is not set
++
++#
++# Video and audio decoders
++#
++# CONFIG_VIDEO_CX25840 is not set
++
++#
++# MPEG video encoders
++#
++# CONFIG_VIDEO_CX2341X is not set
++
++#
++# Video encoders
++#
++# CONFIG_VIDEO_SAA7127 is not set
++
++#
++# Video improvement chips
++#
++# CONFIG_VIDEO_UPD64031A is not set
++# CONFIG_VIDEO_UPD64083 is not set
++# CONFIG_VIDEO_VIVI is not set
++CONFIG_VIDEO_MXC_CAMERA=m
++
++#
++# MXC Camera/V4L2 PRP Features support
++#
++# CONFIG_MXC_CAMERA_MICRON111 is not set
++# CONFIG_MXC_CAMERA_MC521DA is not set
++# CONFIG_MXC_CAMERA_OV2640 is not set
++CONFIG_VIDEO_MXC_OUTPUT=m
++# CONFIG_VIDEO_MXC_OUTPUT_DEBUG is not set
++CONFIG_VIDEO_MXC_EMMA_OUTPUT=m
++# CONFIG_VIDEO_MXC_OPL is not set
++# CONFIG_VIDEO_SAA5246A is not set
++# CONFIG_VIDEO_SAA5249 is not set
++CONFIG_SOC_CAMERA=m
++# CONFIG_SOC_CAMERA_MT9M001 is not set
++# CONFIG_SOC_CAMERA_MT9M111 is not set
++# CONFIG_SOC_CAMERA_MT9V022 is not set
++CONFIG_SOC_CAMERA_PLATFORM=m
++# CONFIG_VIDEO_SH_MOBILE_CEU is not set
++# CONFIG_V4L_USB_DRIVERS is not set
++CONFIG_VIDEO_MX27=m
++# CONFIG_RADIO_ADAPTERS is not set
++# CONFIG_DAB is not set
++
++#
++# Graphics support
++#
++# CONFIG_VGASTATE is not set
++# CONFIG_VIDEO_OUTPUT_CONTROL is not set
++CONFIG_FB=y
++# CONFIG_FIRMWARE_EDID is not set
++# CONFIG_FB_DDC is not set
++# CONFIG_FB_BOOT_VESA_SUPPORT is not set
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
++# CONFIG_FB_SYS_FILLRECT is not set
++# CONFIG_FB_SYS_COPYAREA is not set
++# CONFIG_FB_SYS_IMAGEBLIT is not set
++# CONFIG_FB_FOREIGN_ENDIAN is not set
++# CONFIG_FB_SYS_FOPS is not set
++# CONFIG_FB_SVGALIB is not set
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++CONFIG_FB_MODE_HELPERS=y
++CONFIG_FB_TILEBLITTING=y
++
++#
++# Frame buffer hardware drivers
++#
++CONFIG_FB_IMX=y
++# CONFIG_FB_UVESA is not set
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_VIRTUAL is not set
++# CONFIG_FB_METRONOME is not set
++# CONFIG_FB_MB862XX is not set
++# CONFIG_BACKLIGHT_LCD_SUPPORT 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=y
++CONFIG_LOGO_LINUX_MONO=y
++CONFIG_LOGO_LINUX_VGA16=y
++CONFIG_LOGO_LINUX_CLUT224=y
++# 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_HID_PID 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
++
++#
++# Special HID drivers
++#
++# CONFIG_HID_COMPAT is not set
++# CONFIG_HID_A4TECH is not set
++# CONFIG_HID_APPLE is not set
++# CONFIG_HID_BELKIN is not set
++# CONFIG_HID_BRIGHT is not set
++# CONFIG_HID_CHERRY is not set
++# CONFIG_HID_CHICONY is not set
++# CONFIG_HID_CYPRESS is not set
++# CONFIG_HID_DELL is not set
++# CONFIG_HID_EZKEY is not set
++# CONFIG_HID_GYRATION is not set
++# CONFIG_HID_LOGITECH is not set
++# CONFIG_HID_MICROSOFT is not set
++# CONFIG_HID_MONTEREY is not set
++# CONFIG_HID_PANTHERLORD is not set
++# CONFIG_HID_PETALYNX is not set
++# CONFIG_HID_SAMSUNG is not set
++# CONFIG_HID_SONY is not set
++# CONFIG_HID_SUNPLUS is not set
++# CONFIG_THRUSTMASTER_FF is not set
++# CONFIG_ZEROPLUS_FF is not set
++CONFIG_USB_SUPPORT=y
++CONFIG_USB_ARCH_HAS_HCD=y
++# CONFIG_USB_ARCH_HAS_OHCI is not set
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=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=y
++# CONFIG_USB_OTG is not set
++# CONFIG_USB_OTG_WHITELIST is not set
++# CONFIG_USB_OTG_BLACKLIST_HUB is not set
++# CONFIG_USB_MON is not set
++# CONFIG_USB_WUSB is not set
++# CONFIG_USB_WUSB_CBAF is not set
++
++#
++# USB Host Controller Drivers
++#
++# CONFIG_USB_C67X00_HCD is not set
++CONFIG_USB_EHCI_HCD=m
++CONFIG_USB_EHCI_ROOT_HUB_TT=y
++# CONFIG_USB_EHCI_TT_NEWSCHED is not set
++CONFIG_USB_EHCI_MXC=y
++# CONFIG_USB_ISP116X_HCD is not set
++# CONFIG_USB_SL811_HCD is not set
++# CONFIG_USB_R8A66597_HCD is not set
++# CONFIG_USB_HWA_HCD is not set
++
++#
++# Enable Host or Gadget support to see Inventra options
++#
++
++#
++# USB Device Class drivers
++#
++# CONFIG_USB_ACM is not set
++# CONFIG_USB_PRINTER is not set
++# CONFIG_USB_WDM is not set
++# CONFIG_USB_TMC is not set
++
++#
++# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
++#
++
++#
++# see USB_STORAGE Help for more 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 is not set
++# CONFIG_USB_MICROTEK is not set
++
++#
++# USB port drivers
++#
++CONFIG_USB_SERIAL=m
++# CONFIG_USB_EZUSB is not set
++CONFIG_USB_SERIAL_GENERIC=y
++# CONFIG_USB_SERIAL_AIRCABLE 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 is not set
++# CONFIG_USB_SERIAL_CP2101 is not set
++# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
++# CONFIG_USB_SERIAL_EMPEG is not set
++# CONFIG_USB_SERIAL_FTDI_SIO is not set
++# CONFIG_USB_SERIAL_FUNSOFT is not set
++# CONFIG_USB_SERIAL_VISOR is not set
++# CONFIG_USB_SERIAL_IPAQ is not set
++# CONFIG_USB_SERIAL_IR is not set
++# CONFIG_USB_SERIAL_EDGEPORT is not set
++# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
++# CONFIG_USB_SERIAL_GARMIN is not set
++# CONFIG_USB_SERIAL_IPW is not set
++# CONFIG_USB_SERIAL_IUU is not set
++# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
++# CONFIG_USB_SERIAL_KEYSPAN is not set
++# CONFIG_USB_SERIAL_KLSI is not set
++# CONFIG_USB_SERIAL_KOBIL_SCT is not set
++# CONFIG_USB_SERIAL_MCT_U232 is not set
++# CONFIG_USB_SERIAL_MOS7720 is not set
++# CONFIG_USB_SERIAL_MOS7840 is not set
++# CONFIG_USB_SERIAL_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 is not set
++# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
++# CONFIG_USB_SERIAL_TI is not set
++# CONFIG_USB_SERIAL_CYBERJACK is not set
++# CONFIG_USB_SERIAL_XIRCOM is not set
++# CONFIG_USB_SERIAL_OPTION is not set
++# CONFIG_USB_SERIAL_OMNINET is not set
++# CONFIG_USB_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_SEVSEG is not set
++# CONFIG_USB_RIO500 is not set
++# CONFIG_USB_LEGOTOWER is not set
++# CONFIG_USB_LCD is not set
++# CONFIG_USB_BERRY_CHARGE is not set
++# CONFIG_USB_LED is not set
++# CONFIG_USB_CYPRESS_CY7C63 is not set
++# CONFIG_USB_CYTHERM is not set
++# CONFIG_USB_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=m
++# CONFIG_USB_ISIGHTFW is not set
++# CONFIG_USB_VST is not set
++# CONFIG_USB_GADGET is not set
++CONFIG_MMC=m
++# CONFIG_MMC_DEBUG is not set
++# CONFIG_MMC_UNSAFE_RESUME is not set
++
++#
++# MMC/SD/SDIO Card Drivers
++#
++CONFIG_MMC_BLOCK=m
++CONFIG_MMC_BLOCK_BOUNCE=y
++# CONFIG_SDIO_UART is not set
++# CONFIG_MMC_TEST is not set
++
++#
++# MMC/SD/SDIO Host Controller Drivers
++#
++# CONFIG_MMC_SDHCI is not set
++CONFIG_MMC_MXC=m
++# CONFIG_MMC_SPI is not set
++# CONFIG_MEMSTICK is not set
++# CONFIG_ACCESSIBILITY is not set
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=y
++
++#
++# LED drivers
++#
++# CONFIG_LEDS_PCA9532 is not set
++CONFIG_LEDS_GPIO=y
++# CONFIG_LEDS_PCA955X is not set
++
++#
++# LED Triggers
++#
++CONFIG_LEDS_TRIGGERS=y
++CONFIG_LEDS_TRIGGER_TIMER=m
++CONFIG_LEDS_TRIGGER_HEARTBEAT=y
++# CONFIG_LEDS_TRIGGER_BACKLIGHT 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_DS13XX=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
++# CONFIG_RTC_DRV_FM3130 is not set
++# CONFIG_RTC_DRV_RX8581 is not set
++
++#
++# SPI RTC drivers
++#
++# CONFIG_RTC_DRV_M41T94 is not set
++# CONFIG_RTC_DRV_DS1305 is not set
++# CONFIG_RTC_DRV_DS1390 is not set
++# CONFIG_RTC_DRV_MAX6902 is not set
++# CONFIG_RTC_DRV_R9701 is not set
++# CONFIG_RTC_DRV_RS5C348 is not set
++# CONFIG_RTC_DRV_DS3234 is not set
++
++#
++# Platform RTC drivers
++#
++# CONFIG_RTC_DRV_CMOS is not set
++# CONFIG_RTC_DRV_DS1286 is not set
++# CONFIG_RTC_DRV_DS1511 is not set
++# CONFIG_RTC_DRV_DS1553 is not set
++# CONFIG_RTC_DRV_DS1742 is not set
++# CONFIG_RTC_DRV_STK17TA8 is not set
++# CONFIG_RTC_DRV_M48T86 is not set
++# CONFIG_RTC_DRV_M48T35 is not set
++# CONFIG_RTC_DRV_M48T59 is not set
++# CONFIG_RTC_DRV_BQ4802 is not set
++# CONFIG_RTC_DRV_V3020 is not set
++
++#
++# on-CPU RTC drivers
++#
++CONFIG_RTC_MXC=y
++# CONFIG_DMADEVICES is not set
++CONFIG_DRIVERS_MXC=y
++
++#
++# MXC VPU(Video Processing Unit) support
++#
++CONFIG_MXC_VPU=m
++# CONFIG_MXC_VPU_DEBUG is not set
++# CONFIG_REGULATOR is not set
++# 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=m
++CONFIG_EXT3_FS_XATTR=y
++# CONFIG_EXT3_FS_POSIX_ACL is not set
++# CONFIG_EXT3_FS_SECURITY is not set
++# CONFIG_EXT4_FS is not set
++CONFIG_JBD=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_FILE_LOCKING=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=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=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_PROC_PAGE_MONITOR=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_TMPFS_POSIX_ACL is not set
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_CONFIGFS_FS=m
++
++#
++# Miscellaneous filesystems
++#
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_JFFS2_FS=y
++CONFIG_JFFS2_FS_DEBUG=0
++CONFIG_JFFS2_FS_WRITEBUFFER=y
++# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
++CONFIG_JFFS2_SUMMARY=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_MINIX_FS is not set
++# CONFIG_OMFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_ROMFS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++CONFIG_NETWORK_FILESYSTEMS=y
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++# CONFIG_NFS_V4 is not set
++CONFIG_ROOT_NFS=y
++# CONFIG_NFSD is not set
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++# CONFIG_SUNRPC_REGISTER_V4 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=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="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=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 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=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=m
++# 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 is not set
++# CONFIG_ENABLE_MUST_CHECK is not set
++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 is not set
++# CONFIG_DEBUG_OBJECTS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_PREEMPT is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_LOCK_STAT is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++CONFIG_DEBUG_BUGVERBOSE=y
++# CONFIG_DEBUG_INFO is not set
++# CONFIG_DEBUG_VM is not set
++# CONFIG_DEBUG_WRITECOUNT is not set
++# CONFIG_DEBUG_MEMORY_INIT is not set
++# CONFIG_DEBUG_LIST is not set
++# CONFIG_DEBUG_SG is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_BOOT_PRINTK_DELAY is not set
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_RCU_CPU_STALL_DETECTOR is not set
++# CONFIG_BACKTRACE_SELF_TEST is not set
++# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
++# CONFIG_FAULT_INJECTION is not set
++# CONFIG_LATENCYTOP is not set
++# CONFIG_SYSCTL_SYSCALL_CHECK is not set
++CONFIG_HAVE_FUNCTION_TRACER=y
++
++#
++# Tracers
++#
++# CONFIG_FUNCTION_TRACER is not set
++# CONFIG_IRQSOFF_TRACER is not set
++# CONFIG_PREEMPT_TRACER is not set
++# CONFIG_SCHED_TRACER is not set
++# CONFIG_CONTEXT_SWITCH_TRACER is not set
++# CONFIG_BOOT_TRACER is not set
++# CONFIG_STACK_TRACER is not set
++# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
++# CONFIG_SAMPLES is not set
++CONFIG_HAVE_ARCH_KGDB=y
++# CONFIG_KGDB is not set
++CONFIG_DEBUG_USER=y
++CONFIG_DEBUG_ERRORS=y
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_LL is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++# CONFIG_SECURITYFS is not set
++# CONFIG_SECURITY_FILE_CAPABILITIES is not set
++CONFIG_CRYPTO=m
++
++#
++# Crypto core or helper
++#
++# CONFIG_CRYPTO_FIPS is not set
++CONFIG_CRYPTO_ALGAPI=m
++CONFIG_CRYPTO_ALGAPI2=m
++CONFIG_CRYPTO_AEAD2=m
++CONFIG_CRYPTO_BLKCIPHER=m
++CONFIG_CRYPTO_BLKCIPHER2=m
++CONFIG_CRYPTO_HASH=m
++CONFIG_CRYPTO_HASH2=m
++CONFIG_CRYPTO_RNG2=m
++CONFIG_CRYPTO_MANAGER=m
++CONFIG_CRYPTO_MANAGER2=m
++# CONFIG_CRYPTO_GF128MUL is not set
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_CRYPTD is not set
++# CONFIG_CRYPTO_AUTHENC is not set
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Authenticated Encryption with Associated Data
++#
++# CONFIG_CRYPTO_CCM is not set
++# CONFIG_CRYPTO_GCM is not set
++# CONFIG_CRYPTO_SEQIV is not set
++
++#
++# Block modes
++#
++# CONFIG_CRYPTO_CBC is not set
++# CONFIG_CRYPTO_CTR is not set
++# CONFIG_CRYPTO_CTS is not set
++CONFIG_CRYPTO_ECB=m
++# CONFIG_CRYPTO_LRW is not set
++# CONFIG_CRYPTO_PCBC is not set
++# CONFIG_CRYPTO_XTS is not set
++
++#
++# Hash modes
++#
++CONFIG_CRYPTO_HMAC=m
++# CONFIG_CRYPTO_XCBC is not set
++
++#
++# Digest
++#
++# CONFIG_CRYPTO_CRC32C is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=m
++CONFIG_CRYPTO_MICHAEL_MIC=m
++# CONFIG_CRYPTO_RMD128 is not set
++# CONFIG_CRYPTO_RMD160 is not set
++# CONFIG_CRYPTO_RMD256 is not set
++# CONFIG_CRYPTO_RMD320 is not set
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++# CONFIG_CRYPTO_WP512 is not set
++
++#
++# Ciphers
++#
++CONFIG_CRYPTO_AES=m
++# CONFIG_CRYPTO_ANUBIS is not set
++CONFIG_CRYPTO_ARC4=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 is not set
++# CONFIG_CRYPTO_FCRYPT is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_SALSA20 is not set
++# CONFIG_CRYPTO_SEED is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++
++#
++# Compression
++#
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_LZO is not set
++
++#
++# Random Number Generation
++#
++# CONFIG_CRYPTO_ANSI_CPRNG is not set
++CONFIG_CRYPTO_HW=y
++
++#
++# Library routines
++#
++CONFIG_BITREVERSE=y
++CONFIG_CRC_CCITT=m
++CONFIG_CRC16=m
++# CONFIG_CRC_T10DIF is not set
++# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC32=y
++# CONFIG_CRC7 is not set
++# CONFIG_LIBCRC32C is not set
++CONFIG_ZLIB_INFLATE=y
++CONFIG_ZLIB_DEFLATE=y
++CONFIG_PLIST=y
++CONFIG_HAS_IOMEM=y
++CONFIG_HAS_IOPORT=y
++CONFIG_HAS_DMA=y
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-imx/include/mach/imx-regs.h linux-2.6.28-karo/arch/arm/mach-imx/include/mach/imx-regs.h
+--- linux-2.6.28/arch/arm/mach-imx/include/mach/imx-regs.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-imx/include/mach/imx-regs.h 2009-03-11 13:16:24.000000000 +0100
+@@ -416,7 +416,8 @@
+ #define PCR_BPIX_4 (2<<25)
+ #define PCR_BPIX_8 (3<<25)
+ #define PCR_BPIX_12 (4<<25)
+-#define PCR_BPIX_16 (4<<25)
++#define PCR_BPIX_16 (5<<25)
++#define PCR_BPIX_18 (6<<25)
+ #define PCR_PIXPOL (1<<24)
+ #define PCR_FLMPOL (1<<23)
+ #define PCR_LPPOL (1<<22)
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-imx/include/mach/imxfb.h linux-2.6.28-karo/arch/arm/mach-imx/include/mach/imxfb.h
+--- linux-2.6.28/arch/arm/mach-imx/include/mach/imxfb.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-imx/include/mach/imxfb.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,37 +0,0 @@
+-/*
+- * This structure describes the machine which we are running on.
+- */
+-struct imxfb_mach_info {
+- u_long pixclock;
+-
+- u_short xres;
+- u_short yres;
+-
+- u_int nonstd;
+- u_char bpp;
+- u_char hsync_len;
+- u_char left_margin;
+- u_char right_margin;
+-
+- u_char vsync_len;
+- u_char upper_margin;
+- u_char lower_margin;
+- u_char sync;
+-
+- u_int cmap_greyscale:1,
+- cmap_inverse:1,
+- cmap_static:1,
+- unused:29;
+-
+- u_int pcr;
+- u_int pwmr;
+- u_int lscr1;
+- u_int dmacr;
+-
+- u_char * fixed_screen_cpu;
+- dma_addr_t fixed_screen_dma;
+-
+- void (*lcd_power)(int);
+- void (*backlight_power)(int);
+-};
+-void set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/Kconfig linux-2.6.28-karo/arch/arm/mach-mx2/Kconfig
+--- linux-2.6.28/arch/arm/mach-mx2/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -24,6 +24,28 @@ config MACH_PCM038
+ Include support for phyCORE-i.MX27 (aka pcm038) platform. This
+ includes specific configurations for the module and its peripherals.
+
++config MACH_TX27
++ bool "Support Ka-Ro electronics TX27 module"
++ depends on MACH_MX27
++ select MXC_ULPI
++ help
++ Include support for Ka-Ro TX27 processor module
++
++config BASE_CLK_26MHz
++ bool "Use external 26MHz oscillator"
++ depends on MACH_TX27
++ default yes
++ help
++ Unselect this option to switch off the external 26MHz oscillator
++ and use the 32.768kHz reference and i.MX27 internal FPM
++
++config KARO_DEBUG
++ bool "Enable Ka-Ro specific debug messages"
++ depends on MACH_TX27
++ help
++ Compile the architecture specific files with -DDEBUG to enable
++ additional debug messages
++
+ choice
+ prompt "Baseboard"
+ depends on MACH_PCM038
+@@ -32,6 +54,7 @@ choice
+ config MACH_PCM970_BASEBOARD
+ prompt "PHYTEC PCM970 development board"
+ bool
++ select MXC_ULPI
+ help
+ This adds board specific devices that can be found on Phytec's
+ PCM970 evaluation board.
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/Makefile linux-2.6.28-karo/arch/arm/mach-mx2/Makefile
+--- linux-2.6.28/arch/arm/mach-mx2/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -2,13 +2,19 @@
+ # Makefile for the linux kernel.
+ #
+
++ifeq ($(CONFIG_KARO_DEBUG),y)
++ EXTRA_CFLAGS += -DDEBUG
++endif
++
+ # Object file lists.
+
+ obj-y := system.o generic.o devices.o serial.o
+
+ obj-$(CONFIG_MACH_MX27) += cpu_imx27.o
+ obj-$(CONFIG_MACH_MX27) += clock_imx27.o
++obj-$(CONFIG_PM) += pm.o mxc_pm.o
+
+-obj-$(CONFIG_MACH_MX27ADS) += mx27ads.o
+-obj-$(CONFIG_MACH_PCM038) += pcm038.o
+-obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
++obj-$(CONFIG_MACH_MX27ADS) += mx27ads.o
++obj-$(CONFIG_MACH_PCM038) += pcm038.o
++obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
++obj-$(CONFIG_MACH_TX27) += karo-tx27.o tx27_gpio.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/clock_imx27.c linux-2.6.28-karo/arch/arm/mach-mx2/clock_imx27.c
+--- linux-2.6.28/arch/arm/mach-mx2/clock_imx27.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/clock_imx27.c 2009-03-11 13:16:24.000000000 +0100
+@@ -21,6 +21,7 @@
+ #include <linux/io.h>
+ #include <linux/module.h>
+ #include <linux/spinlock.h>
++#include <linux/delay.h>
+
+ #include <mach/clock.h>
+ #include <mach/common.h>
+@@ -233,9 +234,23 @@ static void _clk_mstick1_disable(struct
+ _clk_pccr10_disable(CCM_PCCR1_MSHC_BAUD_MASK, CCM_PCCR0_MSHC_MASK);
+ }
+
+-#define CSCR() (__raw_readl(CCM_CSCR))
+-#define PCDR0() (__raw_readl(CCM_PCDR0))
+-#define PCDR1() (__raw_readl(CCM_PCDR1))
++static int _clk_wdog_enable(struct clk *clk)
++{
++ u32 cscr;
++
++ cscr = __raw_readl(CCM_CSCR);
++ if (!(cscr & CCM_CSCR_FPM)) {
++ cscr |= CCM_CSCR_FPM;
++ __raw_writel(cscr, CCM_CSCR);
++ /* wait for FPM startup */
++ udelay(90);
++ }
++ return _clk_enable(clk);
++}
++
++#define CSCR() __raw_readl(CCM_CSCR)
++#define PCDR0() __raw_readl(CCM_PCDR0)
++#define PCDR1() __raw_readl(CCM_PCDR1)
+
+ static int _clk_cpu_set_parent(struct clk *clk, struct clk *parent)
+ {
+@@ -288,7 +303,7 @@ static int _clk_cpu_set_rate(struct clk
+
+ div = parent_rate / rate;
+
+- if (div > 4 || div < 1 || ((parent_rate / div) != rate))
++ if (div > 4 || div < 1 || ((parent_rate / div / 100) != rate / 100))
+ return -EINVAL;
+
+ div--;
+@@ -297,10 +312,13 @@ static int _clk_cpu_set_rate(struct clk
+ if (mx27_revision() >= CHIP_REV_2_0) {
+ reg &= ~CCM_CSCR_ARM_MASK;
+ reg |= div << CCM_CSCR_ARM_OFFSET;
++#if 0
++ // FIXME: What's this? This breaks _clk_spll_enable()!
+ reg &= ~0x06;
++#endif
+ __raw_writel(reg | 0x80000000, CCM_CSCR);
+ } else {
+- printk(KERN_ERR "Cant set CPU frequency!\n");
++ printk(KERN_ERR "Can't set CPU frequency!\n");
+ }
+
+ return 0;
+@@ -361,6 +379,24 @@ static unsigned long _clk_usb_recalc(str
+ return parent_rate / (usb_pdf + 1U);
+ }
+
++static int _clk_usb_set_rate(struct clk *clk, unsigned long rate)
++{
++ u32 div, reg;
++ unsigned long parent_rate;
++
++ parent_rate = clk_get_rate(clk->parent);
++ div = parent_rate / rate;
++
++ if (div > 8 || div < 1 || ((parent_rate / div) != rate)) {
++ return -EINVAL;
++ }
++ div--;
++
++ reg = (CSCR() & ~CCM_CSCR_USB_MASK) | (div << CCM_CSCR_USB_OFFSET);
++ __raw_writel(reg, CCM_CSCR);
++ return 0;
++}
++
+ static unsigned long _clk_ssi1_recalc(struct clk *clk)
+ {
+ unsigned long ssi1_pdf;
+@@ -488,10 +524,13 @@ static unsigned long get_mpll_clk(struct
+ {
+ uint32_t reg;
+ unsigned long ref_clk;
+- unsigned long mfi = 0, mfn = 0, mfd = 0, pdf = 0;
++ int mfi, mfn, mfd, pdf;
+ unsigned long long temp;
++ int sign = 1;
+
+ ref_clk = clk_get_rate(clk->parent);
++ if (clk->parent == &ckil_clk)
++ ref_clk *= 1024;
+
+ reg = __raw_readl(CCM_MPCTL0);
+ pdf = (reg & CCM_MPCTL0_PD_MASK) >> CCM_MPCTL0_PD_OFFSET;
+@@ -500,9 +539,13 @@ static unsigned long get_mpll_clk(struct
+ mfn = (reg & CCM_MPCTL0_MFN_MASK) >> CCM_MPCTL0_MFN_OFFSET;
+
+ mfi = (mfi <= 5) ? 5 : mfi;
++ if (mfn >= 512) {
++ mfn = 1024 - mfn;
++ sign = -1;
++ }
+ temp = 2LL * ref_clk * mfn;
+ do_div(temp, mfd + 1);
+- temp = 2LL * ref_clk * mfi + temp;
++ temp = temp * sign + 2LL * ref_clk * mfi;
+ do_div(temp, pdf + 1);
+
+ return (unsigned long)temp;
+@@ -555,10 +598,13 @@ static unsigned long get_spll_clk(struct
+ {
+ uint32_t reg;
+ unsigned long ref_clk;
+- unsigned long mfi = 0, mfn = 0, mfd = 0, pdf = 0;
+- unsigned long long temp;
++ int mfi, mfn, mfd, pdf;
++ u64 temp;
++ int sign = 1;
+
+ ref_clk = clk_get_rate(clk->parent);
++ if (clk->parent == &ckil_clk)
++ ref_clk *= 1024;
+
+ reg = __raw_readl(CCM_SPCTL0);
+ /*TODO: This is TO2 Bug */
+@@ -571,9 +617,13 @@ static unsigned long get_spll_clk(struct
+ mfn = (reg & CCM_SPCTL0_MFN_MASK) >> CCM_SPCTL0_MFN_OFFSET;
+
+ mfi = (mfi <= 5) ? 5 : mfi;
++ if (mfn >= 512) {
++ sign = -1;
++ mfn = 1024 - mfn;
++ }
+ temp = 2LL * ref_clk * mfn;
+ do_div(temp, mfd + 1);
+- temp = 2LL * ref_clk * mfi + temp;
++ temp = temp * sign + 2LL * ref_clk * mfi;
+ do_div(temp, pdf + 1);
+
+ return (unsigned long)temp;
+@@ -1079,6 +1129,7 @@ static struct clk usb_clk[] = {
+ .name = "usb_clk",
+ .parent = &spll_clk,
+ .get_rate = _clk_usb_recalc,
++ .set_rate = _clk_usb_set_rate,
+ .enable = _clk_enable,
+ .enable_reg = CCM_PCCR1,
+ .enable_shift = CCM_PCCR1_USBOTG_OFFSET,
+@@ -1234,7 +1285,7 @@ static struct clk mstick1_clk = {
+ static struct clk wdog_clk = {
+ .name = "wdog_clk",
+ .parent = &ipg_clk,
+- .enable = _clk_enable,
++ .enable = _clk_wdog_enable,
+ .enable_reg = CCM_PCCR1,
+ .enable_shift = CCM_PCCR1_WDT_OFFSET,
+ .disable = _clk_disable,
+@@ -1537,26 +1588,22 @@ void __init change_external_low_referenc
+ external_low_reference = new_ref;
+ }
+
+-unsigned long __init clk_early_get_timer_rate(void)
+-{
+- return clk_get_rate(&per_clk[0]);
+-}
+-
+ static void __init probe_mxc_clocks(void)
+ {
+ int i;
++ u32 cscr = CSCR();
+
+ if (mx27_revision() >= CHIP_REV_2_0) {
+- if (CSCR() & 0x8000)
++ if (cscr & 0x8000)
+ cpu_clk.parent = &mpll_main_clk[0];
+
+- if (!(CSCR() & 0x00800000))
++ if (!(cscr & 0x00800000))
+ ssi2_clk[0].parent = &spll_clk;
+
+- if (!(CSCR() & 0x00400000))
++ if (!(cscr & 0x00400000))
+ ssi1_clk[0].parent = &spll_clk;
+
+- if (!(CSCR() & 0x00200000))
++ if (!(cscr & 0x00200000))
+ vpu_clk.parent = &spll_clk;
+ } else {
+ cpu_clk.parent = &mpll_clk;
+@@ -1618,7 +1665,7 @@ int __init mxc_clocks_init(unsigned long
+ clk_enable(&gpio_clk);
+ clk_enable(&iim_clk);
+ clk_enable(&gpt1_clk[0]);
+-#ifdef CONFIG_DEBUG_LL_CONSOLE
++#ifdef CONFIG_DEBUG_LL
+ clk_enable(&uart1_clk[0]);
+ #endif
+ return 0;
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/crm_regs.h linux-2.6.28-karo/arch/arm/mach-mx2/crm_regs.h
+--- linux-2.6.28/arch/arm/mach-mx2/crm_regs.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/crm_regs.h 2009-03-11 13:16:24.000000000 +0100
+@@ -22,252 +22,276 @@
+
+ #include <mach/hardware.h>
+
++#define SYSCTRL_BASE IO_ADDRESS(SYSCTRL_BASE_ADDR)
++
+ /* Register offsets */
+-#define CCM_CSCR (IO_ADDRESS(CCM_BASE_ADDR) + 0x0)
+-#define CCM_MPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x4)
+-#define CCM_MPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x8)
+-#define CCM_SPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0xC)
+-#define CCM_SPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x10)
+-#define CCM_OSC26MCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x14)
+-#define CCM_PCDR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x18)
+-#define CCM_PCDR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x1c)
+-#define CCM_PCCR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x20)
+-#define CCM_PCCR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x24)
+-#define CCM_CCSR (IO_ADDRESS(CCM_BASE_ADDR) + 0x28)
+-#define CCM_PMCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x2c)
+-#define CCM_PMCOUNT (IO_ADDRESS(CCM_BASE_ADDR) + 0x30)
+-#define CCM_WKGDCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x34)
+-
+-#define CCM_CSCR_USB_OFFSET 28
+-#define CCM_CSCR_USB_MASK (0x7 << 28)
+-#define CCM_CSCR_SD_OFFSET 24
+-#define CCM_CSCR_SD_MASK (0x3 << 24)
+-#define CCM_CSCR_SSI2 (1 << 23)
+-#define CCM_CSCR_SSI2_OFFSET 23
+-#define CCM_CSCR_SSI1 (1 << 22)
+-#define CCM_CSCR_SSI1_OFFSET 22
+-#define CCM_CSCR_VPU (1 << 21)
+-#define CCM_CSCR_VPU_OFFSET 21
+-#define CCM_CSCR_MSHC (1 << 20)
+-#define CCM_CSCR_SPLLRES (1 << 19)
+-#define CCM_CSCR_MPLLRES (1 << 18)
+-#define CCM_CSCR_SP (1 << 17)
+-#define CCM_CSCR_MCU (1 << 16)
++#define CCM_CSCR (IO_ADDRESS(CCM_BASE_ADDR) + 0x0)
++#define CCM_MPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x4)
++#define CCM_MPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x8)
++#define CCM_SPCTL0 (IO_ADDRESS(CCM_BASE_ADDR) + 0xC)
++#define CCM_SPCTL1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x10)
++#define CCM_OSC26MCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x14)
++#define CCM_PCDR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x18)
++#define CCM_PCDR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x1c)
++#define CCM_PCCR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x20)
++#define CCM_PCCR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x24)
++#define CCM_CCSR (IO_ADDRESS(CCM_BASE_ADDR) + 0x28)
++#define CCM_PMCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x2c)
++#define CCM_PMCOUNT (IO_ADDRESS(CCM_BASE_ADDR) + 0x30)
++#define CCM_WKGDCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x34)
++#define MXC_CCM_PMCR0 (SYSCTRL_BASE + 0x60)
++#define MXC_CCM_DCVR0 (SYSCTRL_BASE + 0x64)
++#define MXC_CCM_DCVR1 (SYSCTRL_BASE + 0x68)
++#define MXC_CCM_DCVR2 (SYSCTRL_BASE + 0x72)
++#define MXC_CCM_DCVR3 (SYSCTRL_BASE + 0x76)
++#define MXC_CCM_PMCR0_DPTEN 0x00000001
++#define MXC_CCM_DIE 0x00000002
++#define MXC_CCM_DIM 0x0000000C
++#define MXC_CCM_DCR 0x00000200
++#define MXC_CCM_PMCR0_DRCE0 0x00000010
++#define MXC_CCM_PMCR0_DRCE1 0x00000020
++#define MXC_CCM_PMCR0_DRCE2 0x00000040
++#define MXC_CCM_PMCR0_DRCE3 0x00000080
++#define MXC_CCM_PMCR0_PTVAIM MXC_CCM_DIM
++
++#define CCM_CSCR_USB_OFFSET 28
++#define CCM_CSCR_USB_MASK (0x7 << CCM_CSCR_USB_OFFSET)
++#define CCM_CSCR_SD_OFFSET 24
++#define CCM_CSCR_SD_MASK (0x3 << CCM_CSCR_SD_OFFSET)
++#define CCM_CSCR_SSI2_OFFSET 23
++#define CCM_CSCR_SSI2 (1 << CCM_CSCR_SSI2_OFFSET)
++#define CCM_CSCR_SSI1_OFFSET 22
++#define CCM_CSCR_SSI1 (1 << CCM_CSCR_SSI1_OFFSET)
++#define CCM_CSCR_VPU_OFFSET 21
++#define CCM_CSCR_VPU (1 << CCM_CSCR_VPU_OFFSET)
++#define CCM_CSCR_MSHC (1 << 20)
++#define CCM_CSCR_SPLLRES (1 << 19)
++#define CCM_CSCR_MPLLRES (1 << 18)
++#define CCM_CSCR_SP (1 << 17)
++#define CCM_CSCR_MCU (1 << 16)
+ /* CCM_CSCR_ARM_xxx just be avaliable on i.MX27 TO2*/
+-#define CCM_CSCR_ARM_SRC (1 << 15)
+-#define CCM_CSCR_ARM_OFFSET 12
+-#define CCM_CSCR_ARM_MASK (0x3 << 12)
++#define CCM_CSCR_ARM_SRC (1 << 15)
++#define CCM_CSCR_ARM_OFFSET 12
++#define CCM_CSCR_ARM_MASK (0x3 << CCM_CSCR_ARM_OFFSET)
+ /* CCM_CSCR_ARM_xxx just be avaliable on i.MX27 TO2*/
+-#define CCM_CSCR_PRESC_OFFSET 13
+-#define CCM_CSCR_PRESC_MASK (0x7 << 13)
+-#define CCM_CSCR_BCLK_OFFSET 9
+-#define CCM_CSCR_BCLK_MASK (0xf << 9)
+-#define CCM_CSCR_IPDIV_OFFSET 8
+-#define CCM_CSCR_IPDIV (1 << 8)
++#define CCM_CSCR_PRESC_OFFSET 13
++#define CCM_CSCR_PRESC_MASK (0x7 << CCM_CSCR_PRESC_OFFSET)
++#define CCM_CSCR_BCLK_OFFSET 9
++#define CCM_CSCR_BCLK_MASK (0xf << CCM_CSCR_BCLK_OFFSET)
++#define CCM_CSCR_IPDIV_OFFSET 8
++#define CCM_CSCR_IPDIV (1 << CCM_CSCR_IPDIV_OFFSET)
+ /* CCM_CSCR_AHB_xxx just be avaliable on i.MX27 TO2*/
+-#define CCM_CSCR_AHB_OFFSET 8
+-#define CCM_CSCR_AHB_MASK (0x3 << 8)
++#define CCM_CSCR_AHB_OFFSET 8
++#define CCM_CSCR_AHB_MASK (0x3 << CCM_CSCR_AHB_OFFSET)
+ /* CCM_CSCR_AHB_xxx just be avaliable on i.MX27 TO2*/
+-#define CCM_CSCR_OSC26MDIV (1 << 4)
+-#define CCM_CSCR_OSC26M (1 << 3)
+-#define CCM_CSCR_FPM (1 << 2)
+-#define CCM_CSCR_SPEN (1 << 1)
+-#define CCM_CSCR_MPEN 1
+-
+-#define CCM_MPCTL0_CPLM (1 << 31)
+-#define CCM_MPCTL0_PD_OFFSET 26
+-#define CCM_MPCTL0_PD_MASK (0xf << 26)
+-#define CCM_MPCTL0_MFD_OFFSET 16
+-#define CCM_MPCTL0_MFD_MASK (0x3ff << 16)
+-#define CCM_MPCTL0_MFI_OFFSET 10
+-#define CCM_MPCTL0_MFI_MASK (0xf << 10)
+-#define CCM_MPCTL0_MFN_OFFSET 0
+-#define CCM_MPCTL0_MFN_MASK 0x3ff
+-
+-#define CCM_MPCTL1_LF (1 << 15)
+-#define CCM_MPCTL1_BRMO (1 << 6)
+-
+-#define CCM_SPCTL0_CPLM (1 << 31)
+-#define CCM_SPCTL0_PD_OFFSET 26
+-#define CCM_SPCTL0_PD_MASK (0xf << 26)
+-#define CCM_SPCTL0_MFD_OFFSET 16
+-#define CCM_SPCTL0_MFD_MASK (0x3ff << 16)
+-#define CCM_SPCTL0_MFI_OFFSET 10
+-#define CCM_SPCTL0_MFI_MASK (0xf << 10)
+-#define CCM_SPCTL0_MFN_OFFSET 0
+-#define CCM_SPCTL0_MFN_MASK 0x3ff
+-
+-#define CCM_SPCTL1_LF (1 << 15)
+-#define CCM_SPCTL1_BRMO (1 << 6)
+-
+-#define CCM_OSC26MCTL_PEAK_OFFSET 16
+-#define CCM_OSC26MCTL_PEAK_MASK (0x3 << 16)
+-#define CCM_OSC26MCTL_AGC_OFFSET 8
+-#define CCM_OSC26MCTL_AGC_MASK (0x3f << 8)
+-#define CCM_OSC26MCTL_ANATEST_OFFSET 0
+-#define CCM_OSC26MCTL_ANATEST_MASK 0x3f
+-
+-#define CCM_PCDR0_SSI2BAUDDIV_OFFSET 26
+-#define CCM_PCDR0_SSI2BAUDDIV_MASK (0x3f << 26)
+-#define CCM_PCDR0_CLKO_EN 25
+-#define CCM_PCDR0_CLKODIV_OFFSET 22
+-#define CCM_PCDR0_CLKODIV_MASK (0x7 << 22)
+-#define CCM_PCDR0_SSI1BAUDDIV_OFFSET 16
+-#define CCM_PCDR0_SSI1BAUDDIV_MASK (0x3f << 16)
++#define CCM_CSCR_OSC26MDIV (1 << 4)
++#define CCM_CSCR_OSC26M (1 << 3)
++#define CCM_CSCR_FPM (1 << 2)
++#define CCM_CSCR_SPEN (1 << 1)
++#define CCM_CSCR_MPEN 1
++
++#define CCM_MPCTL0_CPLM (1 << 31)
++#define CCM_MPCTL0_PD_OFFSET 26
++#define CCM_MPCTL0_PD_MASK (0xf << CCM_MPCTL0_PD_OFFSET)
++#define CCM_MPCTL0_PD_VAL(n) (((n) << CCM_MPCTL0_PD_OFFSET) & CCM_MPCTL0_PD_MASK)
++#define CCM_MPCTL0_MFD_OFFSET 16
++#define CCM_MPCTL0_MFD_MASK (0x3ff << CCM_MPCTL0_MFD_OFFSET)
++#define CCM_MPCTL0_MFD_VAL(n) (((n) << CCM_MPCTL0_MFD_OFFSET) & CCM_MPCTL0_MFD_MASK)
++#define CCM_MPCTL0_MFI_OFFSET 10
++#define CCM_MPCTL0_MFI_MASK (0xf << CCM_MPCTL0_MFI_OFFSET)
++#define CCM_MPCTL0_MFI_VAL(n) (((n) << CCM_MPCTL0_MFI_OFFSET) & CCM_MPCTL0_MFI_MASK)
++#define CCM_MPCTL0_MFN_OFFSET 0
++#define CCM_MPCTL0_MFN_MASK (0x3ff << CCM_MPCTL0_MFN_OFFSET)
++#define CCM_MPCTL0_MFN_VAL(n) (((n) << CCM_MPCTL0_MFN_OFFSET) & CCM_MPCTL0_MFN_MASK)
++
++#define CCM_MPCTL1_LF (1 << 15)
++#define CCM_MPCTL1_BRMO (1 << 6)
++
++#define CCM_SPCTL0_CPLM (1 << 31)
++#define CCM_SPCTL0_PD_OFFSET 26
++#define CCM_SPCTL0_PD_MASK (0xf << CCM_SPCTL0_PD_OFFSET)
++#define CCM_SPCTL0_PD_VAL(n) (((n) << CCM_SPCTL0_PD_OFFSET) & CCM_SPCTL0_PD_MASK)
++#define CCM_SPCTL0_MFD_OFFSET 16
++#define CCM_SPCTL0_MFD_MASK (0x3ff << CCM_SPCTL0_MFD_OFFSET)
++#define CCM_SPCTL0_MFD_VAL(n) (((n) << CCM_SPCTL0_MFD_OFFSET) & CCM_SPCTL0_MFD_MASK)
++#define CCM_SPCTL0_MFI_OFFSET 10
++#define CCM_SPCTL0_MFI_MASK (0xf << CCM_SPCTL0_MFI_OFFSET)
++#define CCM_SPCTL0_MFI_VAL(n) (((n) << CCM_SPCTL0_MFI_OFFSET) & CCM_SPCTL0_MFI_MASK)
++#define CCM_SPCTL0_MFN_OFFSET 0
++#define CCM_SPCTL0_MFN_MASK (0x3ff << CCM_SPCTL0_MFN_OFFSET)
++#define CCM_SPCTL0_MFN_VAL(n) (((n) << CCM_SPCTL0_MFN_OFFSET) & CCM_SPCTL0_MFN_MASK)
++
++#define CCM_SPCTL1_LF (1 << 15)
++#define CCM_SPCTL1_BRMO (1 << 6)
++
++#define CCM_OSC26MCTL_PEAK_OFFSET 16
++#define CCM_OSC26MCTL_PEAK_MASK (0x3 << CCM_OSC26MCTL_PEAK_OFFSET)
++#define CCM_OSC26MCTL_AGC_OFFSET 8
++#define CCM_OSC26MCTL_AGC_MASK (0x3f << CCM_OSC26MCTL_AGC_OFFSET)
++#define CCM_OSC26MCTL_ANATEST_OFFSET 0
++#define CCM_OSC26MCTL_ANATEST_MASK 0x3f
++
++#define CCM_PCDR0_SSI2BAUDDIV_OFFSET 26
++#define CCM_PCDR0_SSI2BAUDDIV_MASK (0x3f << CCM_PCDR0_SSI2BAUDDIV_OFFSET)
++#define CCM_PCDR0_CLKO_EN 25
++#define CCM_PCDR0_CLKODIV_OFFSET 22
++#define CCM_PCDR0_CLKODIV_MASK (0x7 << CCM_PCDR0_CLKODIV_OFFSET)
++#define CCM_PCDR0_SSI1BAUDDIV_OFFSET 16
++#define CCM_PCDR0_SSI1BAUDDIV_MASK (0x3f << CCM_PCDR0_SSI1BAUDDIV_OFFSET)
+ /*The difinition for i.MX27 TO2*/
+-#define CCM_PCDR0_VPUDIV2_OFFSET 10
+-#define CCM_PCDR0_VPUDIV2_MASK (0x3f << 10)
+-#define CCM_PCDR0_NFCDIV2_OFFSET 6
+-#define CCM_PCDR0_NFCDIV2_MASK (0xf << 6)
+-#define CCM_PCDR0_MSHCDIV2_MASK 0x3f
++#define CCM_PCDR0_VPUDIV2_OFFSET 10
++#define CCM_PCDR0_VPUDIV2_MASK (0x3f << CCM_PCDR0_VPUDIV2_OFFSET)
++#define CCM_PCDR0_NFCDIV2_OFFSET 6
++#define CCM_PCDR0_NFCDIV2_MASK (0xf << CCM_PCDR0_NFCDIV2_OFFSET)
++#define CCM_PCDR0_MSHCDIV2_MASK 0x3f
+ /*The difinition for i.MX27 TO2*/
+-#define CCM_PCDR0_NFCDIV_OFFSET 12
+-#define CCM_PCDR0_NFCDIV_MASK (0xf << 12)
+-#define CCM_PCDR0_VPUDIV_OFFSET 8
+-#define CCM_PCDR0_VPUDIV_MASK (0xf << 8)
+-#define CCM_PCDR0_MSHCDIV_OFFSET 0
+-#define CCM_PCDR0_MSHCDIV_MASK 0x1f
+-
+-#define CCM_PCDR1_PERDIV4_OFFSET 24
+-#define CCM_PCDR1_PERDIV4_MASK (0x3f << 24)
+-#define CCM_PCDR1_PERDIV3_OFFSET 16
+-#define CCM_PCDR1_PERDIV3_MASK (0x3f << 16)
+-#define CCM_PCDR1_PERDIV2_OFFSET 8
+-#define CCM_PCDR1_PERDIV2_MASK (0x3f << 8)
+-#define CCM_PCDR1_PERDIV1_OFFSET 0
+-#define CCM_PCDR1_PERDIV1_MASK 0x3f
+-
+-#define CCM_PCCR0_CSPI1_OFFSET 31
+-#define CCM_PCCR0_CSPI1_MASK (1 << 31)
+-#define CCM_PCCR0_CSPI2_OFFSET 30
+-#define CCM_PCCR0_CSPI2_MASK (1 << 30)
+-#define CCM_PCCR0_CSPI3_OFFSET 29
+-#define CCM_PCCR0_CSPI3_MASK (1 << 29)
+-#define CCM_PCCR0_DMA_OFFSET 28
+-#define CCM_PCCR0_DMA_MASK (1 << 28)
+-#define CCM_PCCR0_EMMA_OFFSET 27
+-#define CCM_PCCR0_EMMA_MASK (1 << 27)
+-#define CCM_PCCR0_FEC_OFFSET 26
+-#define CCM_PCCR0_FEC_MASK (1 << 26)
+-#define CCM_PCCR0_GPIO_OFFSET 25
+-#define CCM_PCCR0_GPIO_MASK (1 << 25)
+-#define CCM_PCCR0_GPT1_OFFSET 24
+-#define CCM_PCCR0_GPT1_MASK (1 << 24)
+-#define CCM_PCCR0_GPT2_OFFSET 23
+-#define CCM_PCCR0_GPT2_MASK (1 << 23)
+-#define CCM_PCCR0_GPT3_OFFSET 22
+-#define CCM_PCCR0_GPT3_MASK (1 << 22)
+-#define CCM_PCCR0_GPT4_OFFSET 21
+-#define CCM_PCCR0_GPT4_MASK (1 << 21)
+-#define CCM_PCCR0_GPT5_OFFSET 20
+-#define CCM_PCCR0_GPT5_MASK (1 << 20)
+-#define CCM_PCCR0_GPT6_OFFSET 19
+-#define CCM_PCCR0_GPT6_MASK (1 << 19)
+-#define CCM_PCCR0_I2C1_OFFSET 18
+-#define CCM_PCCR0_I2C1_MASK (1 << 18)
+-#define CCM_PCCR0_I2C2_OFFSET 17
+-#define CCM_PCCR0_I2C2_MASK (1 << 17)
+-#define CCM_PCCR0_IIM_OFFSET 16
+-#define CCM_PCCR0_IIM_MASK (1 << 16)
+-#define CCM_PCCR0_KPP_OFFSET 15
+-#define CCM_PCCR0_KPP_MASK (1 << 15)
+-#define CCM_PCCR0_LCDC_OFFSET 14
+-#define CCM_PCCR0_LCDC_MASK (1 << 14)
+-#define CCM_PCCR0_MSHC_OFFSET 13
+-#define CCM_PCCR0_MSHC_MASK (1 << 13)
+-#define CCM_PCCR0_OWIRE_OFFSET 12
+-#define CCM_PCCR0_OWIRE_MASK (1 << 12)
+-#define CCM_PCCR0_PWM_OFFSET 11
+-#define CCM_PCCR0_PWM_MASK (1 << 11)
+-#define CCM_PCCR0_RTC_OFFSET 9
+-#define CCM_PCCR0_RTC_MASK (1 << 9)
+-#define CCM_PCCR0_RTIC_OFFSET 8
+-#define CCM_PCCR0_RTIC_MASK (1 << 8)
+-#define CCM_PCCR0_SAHARA_OFFSET 7
+-#define CCM_PCCR0_SAHARA_MASK (1 << 7)
+-#define CCM_PCCR0_SCC_OFFSET 6
+-#define CCM_PCCR0_SCC_MASK (1 << 6)
+-#define CCM_PCCR0_SDHC1_OFFSET 5
+-#define CCM_PCCR0_SDHC1_MASK (1 << 5)
+-#define CCM_PCCR0_SDHC2_OFFSET 4
+-#define CCM_PCCR0_SDHC2_MASK (1 << 4)
+-#define CCM_PCCR0_SDHC3_OFFSET 3
+-#define CCM_PCCR0_SDHC3_MASK (1 << 3)
+-#define CCM_PCCR0_SLCDC_OFFSET 2
+-#define CCM_PCCR0_SLCDC_MASK (1 << 2)
+-#define CCM_PCCR0_SSI1_IPG_OFFSET 1
+-#define CCM_PCCR0_SSI1_IPG_MASK (1 << 1)
+-#define CCM_PCCR0_SSI2_IPG_OFFSET 0
+-#define CCM_PCCR0_SSI2_IPG_MASK (1 << 0)
+-
+-#define CCM_PCCR1_UART1_OFFSET 31
+-#define CCM_PCCR1_UART1_MASK (1 << 31)
+-#define CCM_PCCR1_UART2_OFFSET 30
+-#define CCM_PCCR1_UART2_MASK (1 << 30)
+-#define CCM_PCCR1_UART3_OFFSET 29
+-#define CCM_PCCR1_UART3_MASK (1 << 29)
+-#define CCM_PCCR1_UART4_OFFSET 28
+-#define CCM_PCCR1_UART4_MASK (1 << 28)
+-#define CCM_PCCR1_UART5_OFFSET 27
+-#define CCM_PCCR1_UART5_MASK (1 << 27)
+-#define CCM_PCCR1_UART6_OFFSET 26
+-#define CCM_PCCR1_UART6_MASK (1 << 26)
+-#define CCM_PCCR1_USBOTG_OFFSET 25
+-#define CCM_PCCR1_USBOTG_MASK (1 << 25)
+-#define CCM_PCCR1_WDT_OFFSET 24
+-#define CCM_PCCR1_WDT_MASK (1 << 24)
+-#define CCM_PCCR1_HCLK_ATA_OFFSET 23
+-#define CCM_PCCR1_HCLK_ATA_MASK (1 << 23)
+-#define CCM_PCCR1_HCLK_BROM_OFFSET 22
+-#define CCM_PCCR1_HCLK_BROM_MASK (1 << 22)
+-#define CCM_PCCR1_HCLK_CSI_OFFSET 21
+-#define CCM_PCCR1_HCLK_CSI_MASK (1 << 21)
+-#define CCM_PCCR1_HCLK_DMA_OFFSET 20
+-#define CCM_PCCR1_HCLK_DMA_MASK (1 << 20)
+-#define CCM_PCCR1_HCLK_EMI_OFFSET 19
+-#define CCM_PCCR1_HCLK_EMI_MASK (1 << 19)
+-#define CCM_PCCR1_HCLK_EMMA_OFFSET 18
+-#define CCM_PCCR1_HCLK_EMMA_MASK (1 << 18)
+-#define CCM_PCCR1_HCLK_FEC_OFFSET 17
+-#define CCM_PCCR1_HCLK_FEC_MASK (1 << 17)
+-#define CCM_PCCR1_HCLK_VPU_OFFSET 16
+-#define CCM_PCCR1_HCLK_VPU_MASK (1 << 16)
+-#define CCM_PCCR1_HCLK_LCDC_OFFSET 15
+-#define CCM_PCCR1_HCLK_LCDC_MASK (1 << 15)
+-#define CCM_PCCR1_HCLK_RTIC_OFFSET 14
+-#define CCM_PCCR1_HCLK_RTIC_MASK (1 << 14)
+-#define CCM_PCCR1_HCLK_SAHARA_OFFSET 13
+-#define CCM_PCCR1_HCLK_SAHARA_MASK (1 << 13)
+-#define CCM_PCCR1_HCLK_SLCDC_OFFSET 12
+-#define CCM_PCCR1_HCLK_SLCDC_MASK (1 << 12)
+-#define CCM_PCCR1_HCLK_USBOTG_OFFSET 11
+-#define CCM_PCCR1_HCLK_USBOTG_MASK (1 << 11)
+-#define CCM_PCCR1_PERCLK1_OFFSET 10
+-#define CCM_PCCR1_PERCLK1_MASK (1 << 10)
+-#define CCM_PCCR1_PERCLK2_OFFSET 9
+-#define CCM_PCCR1_PERCLK2_MASK (1 << 9)
+-#define CCM_PCCR1_PERCLK3_OFFSET 8
+-#define CCM_PCCR1_PERCLK3_MASK (1 << 8)
+-#define CCM_PCCR1_PERCLK4_OFFSET 7
+-#define CCM_PCCR1_PERCLK4_MASK (1 << 7)
+-#define CCM_PCCR1_VPU_BAUD_OFFSET 6
+-#define CCM_PCCR1_VPU_BAUD_MASK (1 << 6)
+-#define CCM_PCCR1_SSI1_BAUD_OFFSET 5
+-#define CCM_PCCR1_SSI1_BAUD_MASK (1 << 5)
+-#define CCM_PCCR1_SSI2_BAUD_OFFSET 4
+-#define CCM_PCCR1_SSI2_BAUD_MASK (1 << 4)
+-#define CCM_PCCR1_NFC_BAUD_OFFSET 3
+-#define CCM_PCCR1_NFC_BAUD_MASK (1 << 3)
+-#define CCM_PCCR1_MSHC_BAUD_OFFSET 2
+-#define CCM_PCCR1_MSHC_BAUD_MASK (1 << 2)
+-
+-#define CCM_CCSR_32KSR (1 << 15)
+-#define CCM_CCSR_CLKMODE1 (1 << 9)
+-#define CCM_CCSR_CLKMODE0 (1 << 8)
+-#define CCM_CCSR_CLKOSEL_OFFSET 0
+-#define CCM_CCSR_CLKOSEL_MASK 0x1f
++#define CCM_PCDR0_NFCDIV_OFFSET 12
++#define CCM_PCDR0_NFCDIV_MASK (0xf << CCM_PCDR0_NFCDIV_OFFSET)
++#define CCM_PCDR0_VPUDIV_OFFSET 8
++#define CCM_PCDR0_VPUDIV_MASK (0xf << CCM_PCDR0_VPUDIV_OFFSET)
++#define CCM_PCDR0_MSHCDIV_OFFSET 0
++#define CCM_PCDR0_MSHCDIV_MASK (0x1f << CCM_PCDR0_MSHCDIV_OFFSET)
++
++#define CCM_PCDR1_PERDIV4_OFFSET 24
++#define CCM_PCDR1_PERDIV4_MASK (0x3f << CCM_PCDR1_PERDIV4_OFFSET)
++#define CCM_PCDR1_PERDIV3_OFFSET 16
++#define CCM_PCDR1_PERDIV3_MASK (0x3f << CCM_PCDR1_PERDIV3_OFFSET)
++#define CCM_PCDR1_PERDIV2_OFFSET 8
++#define CCM_PCDR1_PERDIV2_MASK (0x3f << CCM_PCDR1_PERDIV2_OFFSET)
++#define CCM_PCDR1_PERDIV1_OFFSET 0
++#define CCM_PCDR1_PERDIV1_MASK (0x3f << CCM_PCDR1_PERDIV1_OFFSET)
++
++#define CCM_PCCR0_CSPI1_OFFSET 31
++#define CCM_PCCR0_CSPI1_MASK (1 << CCM_PCCR0_CSPI1_OFFSET)
++#define CCM_PCCR0_CSPI2_OFFSET 30
++#define CCM_PCCR0_CSPI2_MASK (1 << CCM_PCCR0_CSPI2_OFFSET)
++#define CCM_PCCR0_CSPI3_OFFSET 29
++#define CCM_PCCR0_CSPI3_MASK (1 << CCM_PCCR0_CSPI3_OFFSET)
++#define CCM_PCCR0_DMA_OFFSET 28
++#define CCM_PCCR0_DMA_MASK (1 << CCM_PCCR0_DMA_OFFSET)
++#define CCM_PCCR0_EMMA_OFFSET 27
++#define CCM_PCCR0_EMMA_MASK (1 << CCM_PCCR0_EMMA_OFFSET)
++#define CCM_PCCR0_FEC_OFFSET 26
++#define CCM_PCCR0_FEC_MASK (1 << CCM_PCCR0_FEC_OFFSET)
++#define CCM_PCCR0_GPIO_OFFSET 25
++#define CCM_PCCR0_GPIO_MASK (1 << CCM_PCCR0_GPIO_OFFSET)
++#define CCM_PCCR0_GPT1_OFFSET 24
++#define CCM_PCCR0_GPT1_MASK (1 << CCM_PCCR0_GPT1_OFFSET)
++#define CCM_PCCR0_GPT2_OFFSET 23
++#define CCM_PCCR0_GPT2_MASK (1 << CCM_PCCR0_GPT2_OFFSET)
++#define CCM_PCCR0_GPT3_OFFSET 22
++#define CCM_PCCR0_GPT3_MASK (1 << CCM_PCCR0_GPT3_OFFSET)
++#define CCM_PCCR0_GPT4_OFFSET 21
++#define CCM_PCCR0_GPT4_MASK (1 << CCM_PCCR0_GPT4_OFFSET)
++#define CCM_PCCR0_GPT5_OFFSET 20
++#define CCM_PCCR0_GPT5_MASK (1 << CCM_PCCR0_GPT5_OFFSET)
++#define CCM_PCCR0_GPT6_OFFSET 19
++#define CCM_PCCR0_GPT6_MASK (1 << CCM_PCCR0_GPT6_OFFSET)
++#define CCM_PCCR0_I2C1_OFFSET 18
++#define CCM_PCCR0_I2C1_MASK (1 << CCM_PCCR0_I2C1_OFFSET)
++#define CCM_PCCR0_I2C2_OFFSET 17
++#define CCM_PCCR0_I2C2_MASK (1 << CCM_PCCR0_I2C2_OFFSET)
++#define CCM_PCCR0_IIM_OFFSET 16
++#define CCM_PCCR0_IIM_MASK (1 << CCM_PCCR0_IIM_OFFSET)
++#define CCM_PCCR0_KPP_OFFSET 15
++#define CCM_PCCR0_KPP_MASK (1 << CCM_PCCR0_KPP_OFFSET)
++#define CCM_PCCR0_LCDC_OFFSET 14
++#define CCM_PCCR0_LCDC_MASK (1 << CCM_PCCR0_LCDC_OFFSET)
++#define CCM_PCCR0_MSHC_OFFSET 13
++#define CCM_PCCR0_MSHC_MASK (1 << CCM_PCCR0_MSHC_OFFSET)
++#define CCM_PCCR0_OWIRE_OFFSET 12
++#define CCM_PCCR0_OWIRE_MASK (1 << CCM_PCCR0_OWIRE_OFFSET)
++#define CCM_PCCR0_PWM_OFFSET 11
++#define CCM_PCCR0_PWM_MASK (1 << CCM_PCCR0_PWM_OFFSET)
++#define CCM_PCCR0_RTC_OFFSET 9
++#define CCM_PCCR0_RTC_MASK (1 << CCM_PCCR0_RTC_OFFSET)
++#define CCM_PCCR0_RTIC_OFFSET 8
++#define CCM_PCCR0_RTIC_MASK (1 << CCM_PCCR0_RTIC_OFFSET)
++#define CCM_PCCR0_SAHARA_OFFSET 7
++#define CCM_PCCR0_SAHARA_MASK (1 << CCM_PCCR0_SAHARA_OFFSET)
++#define CCM_PCCR0_SCC_OFFSET 6
++#define CCM_PCCR0_SCC_MASK (1 << CCM_PCCR0_SCC_OFFSET)
++#define CCM_PCCR0_SDHC1_OFFSET 5
++#define CCM_PCCR0_SDHC1_MASK (1 << CCM_PCCR0_SDHC1_OFFSET)
++#define CCM_PCCR0_SDHC2_OFFSET 4
++#define CCM_PCCR0_SDHC2_MASK (1 << CCM_PCCR0_SDHC2_OFFSET)
++#define CCM_PCCR0_SDHC3_OFFSET 3
++#define CCM_PCCR0_SDHC3_MASK (1 << CCM_PCCR0_SDHC3_OFFSET)
++#define CCM_PCCR0_SLCDC_OFFSET 2
++#define CCM_PCCR0_SLCDC_MASK (1 << CCM_PCCR0_SLCDC_OFFSET)
++#define CCM_PCCR0_SSI1_IPG_OFFSET 1
++#define CCM_PCCR0_SSI1_IPG_MASK (1 << CCM_PCCR0_SSI1_IPG_OFFSET)
++#define CCM_PCCR0_SSI2_IPG_OFFSET 0
++#define CCM_PCCR0_SSI2_IPG_MASK (1 << CCM_PCCR0_SSI2_IPG_OFFSET)
++
++#define CCM_PCCR1_UART1_OFFSET 31
++#define CCM_PCCR1_UART1_MASK (1 << CCM_PCCR1_UART1_OFFSET)
++#define CCM_PCCR1_UART2_OFFSET 30
++#define CCM_PCCR1_UART2_MASK (1 << CCM_PCCR1_UART2_OFFSET)
++#define CCM_PCCR1_UART3_OFFSET 29
++#define CCM_PCCR1_UART3_MASK (1 << CCM_PCCR1_UART3_OFFSET)
++#define CCM_PCCR1_UART4_OFFSET 28
++#define CCM_PCCR1_UART4_MASK (1 << CCM_PCCR1_UART4_OFFSET)
++#define CCM_PCCR1_UART5_OFFSET 27
++#define CCM_PCCR1_UART5_MASK (1 << CCM_PCCR1_UART5_OFFSET)
++#define CCM_PCCR1_UART6_OFFSET 26
++#define CCM_PCCR1_UART6_MASK (1 << CCM_PCCR1_UART6_OFFSET)
++#define CCM_PCCR1_USBOTG_OFFSET 25
++#define CCM_PCCR1_USBOTG_MASK (1 << CCM_PCCR1_USBOTG_OFFSET)
++#define CCM_PCCR1_WDT_OFFSET 24
++#define CCM_PCCR1_WDT_MASK (1 << CCM_PCCR1_WDT_OFFSET)
++#define CCM_PCCR1_HCLK_ATA_OFFSET 23
++#define CCM_PCCR1_HCLK_ATA_MASK (1 << CCM_PCCR1_HCLK_ATA_OFFSET)
++#define CCM_PCCR1_HCLK_BROM_OFFSET 22
++#define CCM_PCCR1_HCLK_BROM_MASK (1 << CCM_PCCR1_HCLK_BROM_OFFSET)
++#define CCM_PCCR1_HCLK_CSI_OFFSET 21
++#define CCM_PCCR1_HCLK_CSI_MASK (1 << CCM_PCCR1_HCLK_CSI_OFFSET)
++#define CCM_PCCR1_HCLK_DMA_OFFSET 20
++#define CCM_PCCR1_HCLK_DMA_MASK (1 << CCM_PCCR1_HCLK_DMA_OFFSET)
++#define CCM_PCCR1_HCLK_EMI_OFFSET 19
++#define CCM_PCCR1_HCLK_EMI_MASK (1 << CCM_PCCR1_HCLK_EMI_OFFSET)
++#define CCM_PCCR1_HCLK_EMMA_OFFSET 18
++#define CCM_PCCR1_HCLK_EMMA_MASK (1 << CCM_PCCR1_HCLK_EMMA_OFFSET)
++#define CCM_PCCR1_HCLK_FEC_OFFSET 17
++#define CCM_PCCR1_HCLK_FEC_MASK (1 << CCM_PCCR1_HCLK_FEC_OFFSET)
++#define CCM_PCCR1_HCLK_VPU_OFFSET 16
++#define CCM_PCCR1_HCLK_VPU_MASK (1 << CCM_PCCR1_HCLK_VPU_OFFSET)
++#define CCM_PCCR1_HCLK_LCDC_OFFSET 15
++#define CCM_PCCR1_HCLK_LCDC_MASK (1 << CCM_PCCR1_HCLK_LCDC_OFFSET)
++#define CCM_PCCR1_HCLK_RTIC_OFFSET 14
++#define CCM_PCCR1_HCLK_RTIC_MASK (1 << CCM_PCCR1_HCLK_RTIC_OFFSET)
++#define CCM_PCCR1_HCLK_SAHARA_OFFSET 13
++#define CCM_PCCR1_HCLK_SAHARA_MASK (1 << CCM_PCCR1_HCLK_SAHARA_OFFSET)
++#define CCM_PCCR1_HCLK_SLCDC_OFFSET 12
++#define CCM_PCCR1_HCLK_SLCDC_MASK (1 << CCM_PCCR1_HCLK_SLCDC_OFFSET)
++#define CCM_PCCR1_HCLK_USBOTG_OFFSET 11
++#define CCM_PCCR1_HCLK_USBOTG_MASK (1 << CCM_PCCR1_HCLK_USBOTG_OFFSET)
++#define CCM_PCCR1_PERCLK1_OFFSET 10
++#define CCM_PCCR1_PERCLK1_MASK (1 << CCM_PCCR1_PERCLK1_OFFSET)
++#define CCM_PCCR1_PERCLK2_OFFSET 9
++#define CCM_PCCR1_PERCLK2_MASK (1 << CCM_PCCR1_PERCLK2_OFFSET)
++#define CCM_PCCR1_PERCLK3_OFFSET 8
++#define CCM_PCCR1_PERCLK3_MASK (1 << CCM_PCCR1_PERCLK3_OFFSET)
++#define CCM_PCCR1_PERCLK4_OFFSET 7
++#define CCM_PCCR1_PERCLK4_MASK (1 << CCM_PCCR1_PERCLK4_OFFSET)
++#define CCM_PCCR1_VPU_BAUD_OFFSET 6
++#define CCM_PCCR1_VPU_BAUD_MASK (1 << CCM_PCCR1_VPU_BAUD_OFFSET)
++#define CCM_PCCR1_SSI1_BAUD_OFFSET 5
++#define CCM_PCCR1_SSI1_BAUD_MASK (1 << CCM_PCCR1_SSI1_BAUD_OFFSET)
++#define CCM_PCCR1_SSI2_BAUD_OFFSET 4
++#define CCM_PCCR1_SSI2_BAUD_MASK (1 << CCM_PCCR1_SSI2_BAUD_OFFSET)
++#define CCM_PCCR1_NFC_BAUD_OFFSET 3
++#define CCM_PCCR1_NFC_BAUD_MASK (1 << CCM_PCCR1_NFC_BAUD_OFFSET)
++#define CCM_PCCR1_MSHC_BAUD_OFFSET 2
++#define CCM_PCCR1_MSHC_BAUD_MASK (1 << CCM_PCCR1_MSHC_BAUD_OFFSET)
++
++#define CCM_CCSR_32KSR (1 << 15)
++#define CCM_CCSR_CLKMODE1 (1 << 9)
++#define CCM_CCSR_CLKMODE0 (1 << 8)
++#define CCM_CCSR_CLKOSEL_OFFSET 0
++#define CCM_CCSR_CLKOSEL_MASK (0x1f << CCM_CCSR_CLKOSEL_OFFSET)
+
+-#define SYS_FMCR 0x14 /* Functional Muxing Control Reg */
+-#define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */
++#define SYS_FMCR 0x14 /* Functional Muxing Control Reg */
++#define SYS_CHIP_ID 0x00 /* The offset of CHIP ID register */
+
+ #endif /* __ARCH_ARM_MACH_MX2_CRM_REGS_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/devices.c linux-2.6.28-karo/arch/arm/mach-mx2/devices.c
+--- linux-2.6.28/arch/arm/mach-mx2/devices.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/devices.c 2009-03-11 13:16:24.000000000 +0100
+@@ -33,6 +33,7 @@
+ #include <linux/gpio.h>
+
+ #include <mach/hardware.h>
++#include <mach/mmc.h>
+
+ /*
+ * Resource definition for the MXC IrDA
+@@ -58,6 +59,118 @@ struct platform_device mxc_irda_device =
+ .resource = mxc_irda_resources,
+ };
+
++static u64 mxc_vpu_dmamask = 0xffffffffUL;
++
++/* Platform Data for MXC VPU */
++struct platform_device mxc_vpu_device = {
++ .name = "mxc_vpu",
++ .id = 0,
++ .dev = {
++ .dma_mask = &mxc_vpu_dmamask,
++ .coherent_dma_mask = ~0UL,
++ },
++};
++
++#ifdef CONFIG_MACH_MX27
++static struct resource mx27_camera_resources[] = {
++ {
++ .start = CSI_BASE_ADDR,
++ .end = CSI_BASE_ADDR + 0x1f,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = EMMA_PRP_BASE_ADDR,
++ .end = EMMA_PRP_BASE_ADDR + 0x1f,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = MXC_INT_CSI,
++ .end = MXC_INT_CSI,
++ .flags = IORESOURCE_IRQ,
++ }, {
++ .start = MXC_INT_EMMAPRP,
++ .end = MXC_INT_EMMAPRP,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device mx27_camera_device = {
++ .name = "mx27-camera",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(mx27_camera_resources),
++ .resource = mx27_camera_resources,
++};
++#endif
++
++/*
++ * SPI master controller
++ *
++ * - i.MX1: 2 channel (slighly different register setting)
++ * - i.MX21: 2 channel
++ * - i.MX27: 3 channel
++ */
++static struct resource mxc_spi_resources0[] = {
++ [0] = {
++ .start = CSPI1_BASE_ADDR,
++ .end = CSPI1_BASE_ADDR + 0x1F,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_CSPI1,
++ .end = MXC_INT_CSPI1,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct resource mxc_spi_resources1[] = {
++ [0] = {
++ .start = CSPI2_BASE_ADDR,
++ .end = CSPI2_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_CSPI2,
++ .end = MXC_INT_CSPI2,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++#ifdef CONFIG_MACH_MX27
++static struct resource mxc_spi_resources2[] = {
++ [0] = {
++ .start = CSPI3_BASE_ADDR,
++ .end = CSPI3_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_CSPI3,
++ .end = MXC_INT_CSPI3,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++#endif
++
++struct platform_device mxc_spi_device0 = {
++ .name = "mxc_spi",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(mxc_spi_resources0),
++ .resource = mxc_spi_resources0,
++};
++
++struct platform_device mxc_spi_device1 = {
++ .name = "mxc_spi",
++ .id = 1,
++ .num_resources = ARRAY_SIZE(mxc_spi_resources1),
++ .resource = mxc_spi_resources1,
++};
++
++#ifdef CONFIG_MACH_MX27
++struct platform_device mxc_spi_device2 = {
++ .name = "mxc_spi",
++ .id = 2,
++ .num_resources = ARRAY_SIZE(mxc_spi_resources2),
++ .resource = mxc_spi_resources2,
++};
++#endif
++
+ /*
+ * General Purpose Timer
+ * - i.MX1: 2 timer (slighly different register handling)
+@@ -169,6 +282,72 @@ struct platform_device mxc_gpt5 = {
+ };
+ #endif
+
++/* I2C channel #1 */
++static struct resource imx_i2c_1_resources[] = {
++ [0] = {
++ .start = I2C_BASE_ADDR,
++ .end = I2C_BASE_ADDR + 0x0F,
++ .flags = IORESOURCE_MEM
++ },
++ [1] = {
++ .start = MXC_INT_I2C,
++ .end = MXC_INT_I2C,
++ .flags = IORESOURCE_IRQ
++ }
++};
++
++#ifdef CONFIG_MACH_MX27
++static struct resource imx_i2c_2_resources[] = {
++ [0] = {
++ .start = I2C2_BASE_ADDR,
++ .end = I2C2_BASE_ADDR + 0x0F,
++ .flags = IORESOURCE_MEM
++ },
++ [1] = {
++ .start = MXC_INT_I2C2,
++ .end = MXC_INT_I2C2,
++ .flags = IORESOURCE_IRQ
++ }
++};
++#endif
++
++struct platform_device imx_i2c_device0 = {
++ .name = "imx_i2c",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(imx_i2c_1_resources),
++ .resource = imx_i2c_1_resources
++};
++
++#ifdef CONFIG_MACH_MX27
++struct platform_device imx_i2c_device1 = {
++ .name = "imx_i2c",
++ .id = 1,
++ .num_resources = ARRAY_SIZE(imx_i2c_2_resources),
++ .resource = imx_i2c_2_resources
++};
++#endif
++
++#if defined(CONFIG_RTC_MXC) || defined(CONFIG_RTC_MXC_MODULE)
++static struct resource rtc_resources[] = {
++ {
++ .start = RTC_BASE_ADDR,
++ .end = RTC_BASE_ADDR + 0x30,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = MXC_INT_RTC,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device mxc_rtc_device = {
++ .name = "mxc_rtc",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(rtc_resources),
++ .resource = rtc_resources,
++};
++#endif
++
+ /*
+ * Watchdog:
+ * - i.MX1
+@@ -190,6 +369,291 @@ struct platform_device mxc_wdt = {
+ .resource = mxc_wdt_resources,
+ };
+
++static struct resource mxc_nand_resources[] = {
++ {
++ .start = NFC_BASE_ADDR,
++ .end = NFC_BASE_ADDR + 0xfff,
++ .flags = IORESOURCE_MEM
++ }, {
++ .start = MXC_INT_NANDFC,
++ .end = MXC_INT_NANDFC,
++ .flags = IORESOURCE_IRQ
++ },
++};
++
++struct platform_device mxc_nand_device = {
++ .name = "mxc_nand",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(mxc_nand_resources),
++ .resource = mxc_nand_resources,
++};
++
++static struct resource mxc_w1_master_resources[] = {
++ {
++ .start = OWIRE_BASE_ADDR,
++ .end = OWIRE_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++};
++
++struct platform_device mxc_w1_master_device = {
++ .name = "mxc_w1",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(mxc_w1_master_resources),
++ .resource = mxc_w1_master_resources,
++};
++
++/*
++ * Resource definition for the MXC SDHC
++ */
++static struct resource mxc_sdhc1_resources[] = {
++ [0] = {
++ .start = SDHC1_BASE_ADDR,
++ .end = SDHC1_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_SDHC1,
++ .end = MXC_INT_SDHC1,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .name = "sdhc1",
++ .start = DMA_REQ_SDHC1,
++ .end = DMA_REQ_SDHC1,
++ .flags = IORESOURCE_DMA
++ },
++};
++
++static u64 mxc_sdhc1_dmamask = 0xffffffffUL;
++
++struct platform_device mxc_sdhc_device0 = {
++ .name = "imx-mmc",
++ .id = 0,
++ .dev = {
++ .dma_mask = &mxc_sdhc1_dmamask,
++ .coherent_dma_mask = 0xffffffff,
++ },
++ .num_resources = ARRAY_SIZE(mxc_sdhc1_resources),
++ .resource = mxc_sdhc1_resources,
++};
++
++static struct resource mxc_sdhc2_resources[] = {
++ [0] = {
++ .start = SDHC2_BASE_ADDR,
++ .end = SDHC2_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_SDHC2,
++ .end = MXC_INT_SDHC2,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .name = "sdhc2",
++ .start = DMA_REQ_SDHC2,
++ .end = DMA_REQ_SDHC2,
++ .flags = IORESOURCE_DMA
++ },
++};
++
++static u64 mxc_sdhc2_dmamask = 0xffffffffUL;
++
++struct platform_device mxc_sdhc_device1 = {
++ .name = "imx-mmc",
++ .id = 1,
++ .dev = {
++ .dma_mask = &mxc_sdhc2_dmamask,
++ .coherent_dma_mask = 0xffffffff,
++ },
++ .num_resources = ARRAY_SIZE(mxc_sdhc2_resources),
++ .resource = mxc_sdhc2_resources,
++};
++
++static u64 otg_dmamask = ~(u32) 0;
++
++static struct resource mxc_otg_resources[] = {
++ {
++ .start = OTG_BASE_ADDR + 0x000,
++ .end = OTG_BASE_ADDR + 0x1ff,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = MXC_INT_USB1,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/*
++ * lcdc:
++ * - i.MX1: the basic controller
++ * - i.MX21: to be checked
++ * - i.MX27: like i.MX1, with slightly variations
++ */
++static struct resource mxc_fb[] = {
++ {
++ .start = LCDC_BASE_ADDR,
++ .end = LCDC_BASE_ADDR + 0xFFF,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = MXC_INT_LCDC,
++ .end = MXC_INT_LCDC,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/* mxc lcd driver */
++struct platform_device mxc_fb_device = {
++ .name = "imx-fb",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(mxc_fb),
++ .resource = mxc_fb,
++ .dev = {
++ .coherent_dma_mask = 0xFFFFFFFF,
++ },
++};
++
++struct platform_device mxc_otg = {
++ .name = "mxc-ehci",
++ .id = 0,
++ .dev = {
++ .coherent_dma_mask = 0xffffffff,
++ .dma_mask = &otg_dmamask,
++ },
++ .resource = mxc_otg_resources,
++ .num_resources = ARRAY_SIZE(mxc_otg_resources),
++};
++
++static struct resource mxc_ehci2_resources[] = {
++ {
++ .start = OTG_BASE_ADDR + 0x400,
++ .end = OTG_BASE_ADDR + 0x5ff,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = MXC_INT_USB2,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static u64 ehci2_dmamask = ~(u32) 0;
++
++struct platform_device mxc_ehci2 = {
++ .name = "mxc-ehci",
++ .id = 1,
++ .dev = {
++ .coherent_dma_mask = 0xffffffff,
++ .dma_mask = &ehci2_dmamask,
++ },
++ .num_resources = ARRAY_SIZE(mxc_ehci2_resources),
++ .resource = mxc_ehci2_resources,
++};
++
++/*
++ * SSI bus:
++ * - i.MX1: 2 channels
++ * - i.MX21: 2 channels
++ * - i.MX27: 2 channels
++ */
++static struct resource imx_ssi_resources0[] = {
++ [0] = {
++ .start = SSI1_BASE_ADDR,
++ .end = SSI1_BASE_ADDR + 0x6F,
++ .flags = IORESOURCE_MEM
++ },
++ [1] = {
++ .start = MXC_INT_SSI1,
++ .end = MXC_INT_SSI1,
++ .flags = IORESOURCE_IRQ
++ },
++ [2] = {
++ .name = "tx0",
++ .start = DMA_REQ_SSI1_TX0,
++ .end = DMA_REQ_SSI1_TX0,
++ .flags = IORESOURCE_DMA
++ },
++ [3] = {
++ .name = "rx0",
++ .start = DMA_REQ_SSI1_RX0,
++ .end = DMA_REQ_SSI1_RX0,
++ .flags = IORESOURCE_DMA
++ },
++ [4] = {
++ .name = "tx1",
++ .start = DMA_REQ_SSI1_TX1,
++ .end = DMA_REQ_SSI1_TX1,
++ .flags = IORESOURCE_DMA
++ },
++ [5] = {
++ .name = "rx1",
++ .start = DMA_REQ_SSI1_RX1,
++ .end = DMA_REQ_SSI1_RX1,
++ .flags = IORESOURCE_DMA
++ }
++};
++
++static struct resource imx_ssi_resources1[] = {
++ [0] = {
++ .start = SSI2_BASE_ADDR,
++ .end = SSI2_BASE_ADDR + 0x6F,
++ .flags = IORESOURCE_MEM
++ },
++ [1] = {
++ .start = MXC_INT_SSI2,
++ .end = MXC_INT_SSI2,
++ .flags = IORESOURCE_IRQ
++ },
++ [2] = {
++ .name = "tx0",
++ .start = DMA_REQ_SSI2_TX0,
++ .end = DMA_REQ_SSI2_TX0,
++ .flags = IORESOURCE_DMA
++ },
++ [3] = {
++ .name = "rx0",
++ .start = DMA_REQ_SSI2_RX0,
++ .end = DMA_REQ_SSI2_RX0,
++ .flags = IORESOURCE_DMA
++ },
++ [4] = {
++ .name = "tx1",
++ .start = DMA_REQ_SSI2_TX1,
++ .end = DMA_REQ_SSI2_TX1,
++ .flags = IORESOURCE_DMA
++ },
++ [5] = {
++ .name = "rx1",
++ .start = DMA_REQ_SSI2_RX1,
++ .end = DMA_REQ_SSI2_RX1,
++ .flags = IORESOURCE_DMA
++ }
++};
++
++struct platform_device imx_ssi_device0 = {
++ .name = "mxc-ssi",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(imx_ssi_resources0),
++ .resource = imx_ssi_resources0
++};
++
++struct platform_device imx_ssi_device1 = {
++ .name = "mxc-ssi",
++ .id = 1,
++ .num_resources = ARRAY_SIZE(imx_ssi_resources1),
++ .resource = imx_ssi_resources1
++};
++
++static struct resource mxc_dam_resources = {
++ .start = AUDMUX_BASE_ADDR,
++ .end = AUDMUX_BASE_ADDR + 0x1F,
++ .flags = IORESOURCE_MEM
++};
++
++struct platform_device mxc_dam_device = {
++ .name = "mxc-dam",
++ .id = 0,
++ .num_resources = 1,
++ .resource = &mxc_dam_resources
++};
++
+ /* GPIO port description */
+ static struct mxc_gpio_port imx_gpio_ports[] = {
+ [0] = {
+@@ -229,3 +693,4 @@ int __init mxc_register_gpios(void)
+ {
+ return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
+ }
++//arch_initcall(mxc_register_gpios);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/devices.h linux-2.6.28-karo/arch/arm/mach-mx2/devices.h
+--- linux-2.6.28/arch/arm/mach-mx2/devices.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/devices.h 2009-03-11 13:16:24.000000000 +0100
+@@ -4,6 +4,7 @@ extern struct platform_device mxc_gpt2;
+ extern struct platform_device mxc_gpt3;
+ extern struct platform_device mxc_gpt4;
+ extern struct platform_device mxc_gpt5;
++extern struct platform_device mxc_rtc_device;
+ extern struct platform_device mxc_wdt;
+ extern struct platform_device mxc_irda_device;
+ extern struct platform_device mxc_uart_device0;
+@@ -12,4 +13,20 @@ extern struct platform_device mxc_uart_d
+ extern struct platform_device mxc_uart_device3;
+ extern struct platform_device mxc_uart_device4;
+ extern struct platform_device mxc_uart_device5;
+-
++extern struct platform_device mxc_nand_device;
++extern struct platform_device mxc_w1_master_device;
++extern struct platform_device mxc_sdhc_device0;
++extern struct platform_device mxc_sdhc_device1;
++extern struct platform_device mxc_otg;
++extern struct platform_device mxc_ehci2;
++extern struct platform_device mxc_spi_device0;
++extern struct platform_device mxc_spi_device1;
++extern struct platform_device mxc_spi_device2;
++extern struct platform_device imx_ssi_device0;
++extern struct platform_device imx_ssi_device1;
++extern struct platform_device mxc_dam_device;
++extern struct platform_device imx_i2c_device0;
++extern struct platform_device imx_i2c_device1;
++extern struct platform_device mx27_camera_device;
++extern struct platform_device mxc_fb_device;
++extern struct platform_device mxc_vpu_device;
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/generic.c linux-2.6.28-karo/arch/arm/mach-mx2/generic.c
+--- linux-2.6.28/arch/arm/mach-mx2/generic.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/generic.c 2009-03-11 13:16:24.000000000 +0100
+@@ -35,7 +35,7 @@ static struct map_desc mxc_io_desc[] __i
+ * - and some reserved space
+ */
+ {
+- .virtual = AIPI_BASE_ADDR_VIRT,
++ .virtual = (unsigned long)AIPI_BASE_ADDR_VIRT,
+ .pfn = __phys_to_pfn(AIPI_BASE_ADDR),
+ .length = AIPI_SIZE,
+ .type = MT_DEVICE
+@@ -46,7 +46,7 @@ static struct map_desc mxc_io_desc[] __i
+ * - ATA
+ */
+ {
+- .virtual = SAHB1_BASE_ADDR_VIRT,
++ .virtual = (unsigned long)SAHB1_BASE_ADDR_VIRT,
+ .pfn = __phys_to_pfn(SAHB1_BASE_ADDR),
+ .length = SAHB1_SIZE,
+ .type = MT_DEVICE
+@@ -56,7 +56,7 @@ static struct map_desc mxc_io_desc[] __i
+ * - EMI
+ */
+ {
+- .virtual = X_MEMC_BASE_ADDR_VIRT,
++ .virtual = (unsigned long)X_MEMC_BASE_ADDR_VIRT,
+ .pfn = __phys_to_pfn(X_MEMC_BASE_ADDR),
+ .length = X_MEMC_SIZE,
+ .type = MT_DEVICE
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/include/mach/board-tx27.h linux-2.6.28-karo/arch/arm/mach-mx2/include/mach/board-tx27.h
+--- linux-2.6.28/arch/arm/mach-mx2/include/mach/board-tx27.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/include/mach/board-tx27.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,94 @@
++/*
++ * arch/arm/mach-mx27/board-tx27.h
++ *
++ * Copyright 2008 <LW@KARO-electronics.de>
++ * based on arch/arm/mach-mx27/board-mx27ads.h by eescale Semiconductor, Inc.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++//#define FEC_MII_IRQ
++
++#define MXC_LL_UART_PADDR UART1_BASE_ADDR
++#define MXC_LL_UART_VADDR AIPI_IO_ADDRESS(UART1_BASE_ADDR)
++
++/*!
++ * These defines are used to enable or disable a particular UART port. If
++ * disabled, the UART will not be registered in the file system and the user
++ * will not be able to access it.
++ * Specify a value of 1 to enable the UART and 0 to disable it.
++ */
++#define UART1_ENABLED 1
++/* UART 2 configuration */
++#define UART2_ENABLED 1
++/* UART 3 configuration */
++#define UART3_ENABLED 1
++/* UART 4 configuration */
++#define UART4_ENABLED 0 /* Disable UART 4 as its pins are shared with ATA */
++#define UART5_ENABLED 0
++#define UART6_ENABLED 0
++
++#ifndef __ASSEMBLY__
++#include <mach/iomux.h>
++
++#define MXC_BD_LED1 0
++#define MXC_BD_LED2 (1 << 5)
++static inline void MXC_BD_LED_ON(unsigned int led)
++{
++ if (led & MXC_BD_LED2) {
++ __gpio_set_value(GPIO_PORTF | 13, 1);
++ }
++}
++static inline void MXC_BD_LED_OFF(unsigned int led)
++{
++ if (led & MXC_BD_LED2) {
++ __gpio_set_value(GPIO_PORTF | 13, 0);
++ }
++}
++
++extern int gpio_fec_active(void);
++extern void gpio_fec_inactive(void);
++extern int gpio_sdhc_active(int module);
++extern int gpio_sdhc_inactive(int module);
++extern int gpio_usbh2_active(void);
++extern void gpio_usbh2_inactive(void);
++#if 0
++extern int gpio_uart_active(int port, int irda);
++extern int gpio_uart_inactive(int port);
++extern int config_uartdma_event(int port);
++extern int gpio_usbh1_active(void);
++extern void gpio_usbh1_inactive(void);
++extern int gpio_usbotg_fs_active(void);
++extern void gpio_usbotg_fs_inactive(void);
++extern int gpio_i2c_active(int i2c_num);
++extern int gpio_i2c_inactive(int i2c_num);
++extern int gpio_spi_active(int cspi_mod);
++extern int gpio_spi_inactive(int cspi_mod);
++extern int gpio_nand_active(void);
++extern void gpio_nand_inactive(void);
++extern int gpio_sensor_active(void);
++extern void gpio_sensor_inactive(void);
++extern int gpio_keypad_active(void);
++extern void gpio_keypad_inactive(void);
++extern int gpio_ata_active(void);
++extern void gpio_ata_inactive(void);
++extern int gpio_slcdc_active(int type);
++extern int gpio_slcdc_inactive(int type);
++extern int gpio_ssi_active(int ssi_num);
++extern int gpio_ssi_inactive(int ssi_num);
++extern int gpio_owire_active(void);
++extern void gpio_owire_inactive(void);
++#endif
++extern int gpio_usbotg_hs_active(void);
++extern void gpio_usbotg_hs_inactive(void);
++extern int gpio_ac97_active(void);
++extern void gpio_ac97_inactive(void);
++
++#endif // __ASSEMBLY__
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/include/mach/iomux.h linux-2.6.28-karo/arch/arm/mach-mx2/include/mach/iomux.h
+--- linux-2.6.28/arch/arm/mach-mx2/include/mach/iomux.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/include/mach/iomux.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,460 @@
++/*
++ * arch/arm/mach-mx1/include/mach/iomux.h
++ *
++ * Copyright (C) 2008 by Lothar Wassmann <LW@KARO-electronics.de>
++ * derived from: arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h
++ * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ * MA 02110-1301, USA.
++ *
++ * Pin definitions for the Freescale MX2 architecture
++ */
++
++#ifndef _MXC_GPIO_MX2_H
++#define _MXC_GPIO_MX2_H
++
++#define GPIO_PORT_MAX 5
++
++#include <mach/iomux-mx1-mx2.h>
++
++enum {
++ MXC_DEFINE_PIN(A, 0, PF, USBH2_CLK, 0),
++ MXC_DEFINE_PIN(A, 1, PF, USBH2_DIR, 0),
++ MXC_DEFINE_PIN(A, 2, PF, USBH2_DATA7, 0),
++ MXC_DEFINE_PIN(A, 3, PF, USBH2_NXT, 0),
++ MXC_DEFINE_PIN(A, 4, PF, USBH2_STP, 0),
++
++ MXC_DEFINE_PIN(A, 5, PF, LSCLK, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 6, PF, LD0, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 7, PF, LD1, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 8, PF, LD2, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 9, PF, LD3, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 10, PF, LD4, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 11, PF, LD5, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 12, PF, LD6, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 13, PF, LD7, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 14, PF, LD8, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 15, PF, LD9, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 16, PF, LD10, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 17, PF, LD11, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 18, PF, LD12, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 19, PF, LD13, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 20, PF, LD14, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 21, PF, LD15, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 22, PF, LD16, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 23, PF, LD17, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 24, PF, REV, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 25, PF, CLS, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 26, PF, PS, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 27, PF, SPL_SPR, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 28, PF, HSYNC, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 29, PF, VSYNC, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 30, PF, CONTRAST, GPIO_OUT),
++ MXC_DEFINE_PIN(A, 31, PF, OE_ACD, GPIO_OUT),
++
++ MXC_DEFINE_PIN(B, 10, PF, CSI_D0, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 11, PF, CSI_D1, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 12, PF, CSI_D2, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 13, PF, CSI_D3, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 14, PF, CSI_D4, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 15, PF, CSI_MCLK, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 16, PF, CSI_PIXCLK, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 17, PF, CSI_D5, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 18, PF, CSI_D6, GPIO_OUT),
++
++ MXC_DEFINE_PIN(B, 10, AF, UART6_TXD, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 11, AF, UART6_RXD, GPIO_IN),
++ MXC_DEFINE_PIN(B, 12, AF, UART6_CTS, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 13, AF, UART6_RTS, GPIO_IN),
++
++ MXC_DEFINE_PIN(B, 18, AF, UART5_TXD, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 19, AF, UART5_RXD, GPIO_IN),
++ MXC_DEFINE_PIN(B, 20, AF, UART5_CTS, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 21, AF, UART5_RTS, GPIO_IN),
++
++ MXC_DEFINE_PIN(B, 19, PF, CSI_D7, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 20, PF, CSI_VSYNC, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 21, PF, CSI_HSYNC, GPIO_OUT),
++
++ MXC_DEFINE_PIN(B, 22, PF, USBH1_SUSP, 0),
++ MXC_DEFINE_PIN(B, 23, PF, USB_PWR, 0),
++ MXC_DEFINE_PIN(B, 24, PF, USB_OC_B, 0),
++ MXC_DEFINE_PIN(B, 25, PF, USBH1_RCV, 0),
++ MXC_DEFINE_PIN(B, 26, PF, USBH1_FS, 0),
++ MXC_DEFINE_PIN(B, 27, PF, USBH1_OE_B, 0),
++ MXC_DEFINE_PIN(B, 28, PF, USBH1_TXDM, 0),
++ MXC_DEFINE_PIN(B, 29, PF, USBH1_TXDP, 0),
++ MXC_DEFINE_PIN(B, 30, PF, USBH1_RXDM, 0),
++ MXC_DEFINE_PIN(B, 31, PF, USBH1_RXDP, 0),
++
++ MXC_DEFINE_PIN(B, 26, AF, UART4_RTS, GPIO_IN),
++ MXC_DEFINE_PIN(B, 28, AF, UART4_TXD, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 29, AF, UART4_CTS, GPIO_OUT),
++ MXC_DEFINE_PIN(B, 31, AF, UART4_RXD, GPIO_IN),
++
++ MXC_DEFINE_PIN(C, 14, PF, TOUT, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 15, PF, TIN, GPIO_IN),
++
++ MXC_DEFINE_PIN(C, 5, PF, I2C2_SDA, GPIO_IN),
++ MXC_DEFINE_PIN(C, 6, PF, I2C2_SCL, GPIO_IN),
++
++ MXC_DEFINE_PIN(C, 7, PF, USBOTG_DATA5, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 8, PF, USBOTG_DATA6, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 9, PF, USBOTG_DATA0, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 10, PF, USBOTG_DATA2, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 11, PF, USBOTG_DATA1, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 12, PF, USBOTG_DATA4, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 13, PF, USBOTG_DATA3, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 0, PF, USBOTG_NXT, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 1, PF, USBOTG_STP, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 2, PF, USBOTG_DIR, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 24, PF, USBOTG_CLK, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 25, PF, USBOTG_DATA7, GPIO_OUT),
++
++ MXC_DEFINE_PIN(C, 20, PF, SSI1_FS, GPIO_IN),
++ MXC_DEFINE_PIN(C, 21, PF, SSI1_RXD, GPIO_IN),
++ MXC_DEFINE_PIN(C, 22, PF, SSI1_TXD, GPIO_IN),
++ MXC_DEFINE_PIN(C, 23, PF, SSI1_CLK, GPIO_IN),
++
++ MXC_DEFINE_PIN(C, 24, PF, SSI2_FS, GPIO_IN),
++ MXC_DEFINE_PIN(C, 25, PF, SSI2_RXD, GPIO_IN),
++ MXC_DEFINE_PIN(C, 26, PF, SSI2_TXD, GPIO_IN),
++ MXC_DEFINE_PIN(C, 27, PF, SSI2_CLK, GPIO_IN),
++
++ MXC_DEFINE_PIN(C, 28, PF, SSI3_FS, GPIO_IN),
++ MXC_DEFINE_PIN(C, 29, PF, SSI3_RXD, GPIO_IN),
++ MXC_DEFINE_PIN(C, 30, PF, SSI3_TXD, GPIO_IN),
++ MXC_DEFINE_PIN(C, 31, PF, SSI3_CLK, GPIO_IN),
++
++ MXC_DEFINE_PIN(C, 16, PF, SSI4_FS, GPIO_IN),
++ MXC_DEFINE_PIN(C, 17, PF, SSI4_RXD, GPIO_IN),
++ MXC_DEFINE_PIN(C, 18, PF, SSI4_TXD, GPIO_IN),
++ MXC_DEFINE_PIN(C, 19, PF, SSI4_CLK, GPIO_IN),
++
++ MXC_DEFINE_PIN(B, 5, AIN, SLCDC1_CLK, 0),
++ MXC_DEFINE_PIN(B, 6, AIN, SLCDC1_D0, 0),
++ MXC_DEFINE_PIN(B, 7, AIN, SLCDC1_RS, 0),
++ MXC_DEFINE_PIN(B, 8, AIN, SLCDC1_CS, 0),
++
++ MXC_DEFINE_PIN(C, 28, AIN, SLCDC2_D0, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 29, AIN, SLCDC2_RS, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 30, AIN, SLCDC2_CS, GPIO_OUT),
++ MXC_DEFINE_PIN(C, 31, AIN, SLCDC2_CLK, GPIO_OUT),
++
++ MXC_DEFINE_PIN(D, 2, PF, ATA_DATA0, 0),
++ MXC_DEFINE_PIN(D, 3, PF, ATA_DATA1, 0),
++ MXC_DEFINE_PIN(D, 4, PF, ATA_DATA2, 0),
++ MXC_DEFINE_PIN(D, 5, PF, ATA_DATA3, 0),
++ MXC_DEFINE_PIN(D, 6, PF, ATA_DATA4, 0),
++ MXC_DEFINE_PIN(D, 7, PF, ATA_DATA5, 0),
++ MXC_DEFINE_PIN(D, 8, PF, ATA_DATA6, 0),
++ MXC_DEFINE_PIN(D, 9, PF, ATA_DATA7, 0),
++ MXC_DEFINE_PIN(D, 10, PF, ATA_DATA8, 0),
++ MXC_DEFINE_PIN(D, 11, PF, ATA_DATA9, 0),
++ MXC_DEFINE_PIN(D, 12, PF, ATA_DATA10, 0),
++ MXC_DEFINE_PIN(D, 13, PF, ATA_DATA11, 0),
++ MXC_DEFINE_PIN(D, 14, PF, ATA_DATA12, 0),
++ MXC_DEFINE_PIN(D, 15, PF, ATA_DATA13, 0),
++ MXC_DEFINE_PIN(D, 16, PF, ATA_DATA14, 0),
++ MXC_DEFINE_PIN(F, 23, PF, ATA_DATA15, 0),
++
++ MXC_DEFINE_PIN(D, 0, AIN, FEC_TXD0, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 1, AIN, FEC_TXD1, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 2, AIN, FEC_TXD2, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 3, AIN, FEC_TXD3, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 4, AOUT, FEC_RX_ER, GPIO_IN),
++ MXC_DEFINE_PIN(D, 5, AOUT, FEC_RXD1, GPIO_IN),
++ MXC_DEFINE_PIN(D, 6, AOUT, FEC_RXD2, GPIO_IN),
++ MXC_DEFINE_PIN(D, 7, AOUT, FEC_RXD3, GPIO_IN),
++ MXC_DEFINE_PIN(D, 8, AF, FEC_MDIO, GPIO_IN),
++ MXC_DEFINE_PIN(D, 9, AIN, FEC_MDC, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 10, AOUT, FEC_CRS, GPIO_IN),
++ MXC_DEFINE_PIN(D, 11, AOUT, FEC_TX_CLK, GPIO_IN),
++ MXC_DEFINE_PIN(D, 12, AOUT, FEC_RXD0, GPIO_IN),
++ MXC_DEFINE_PIN(D, 13, AOUT, FEC_RX_DV, GPIO_IN),
++ MXC_DEFINE_PIN(D, 14, AOUT, FEC_RX_CLK, GPIO_IN),
++ MXC_DEFINE_PIN(D, 15, AOUT, FEC_COL, GPIO_IN),
++ MXC_DEFINE_PIN(D, 16, AIN, FEC_TX_ER, GPIO_OUT),
++
++ MXC_DEFINE_PIN(D, 17, PF, I2C_DATA, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 18, PF, I2C_CLK, GPIO_OUT),
++
++ MXC_DEFINE_PIN(D, 19, PF, CSPI2_SS2, 0),
++ MXC_DEFINE_PIN(D, 20, PF, CSPI2_SS1, 0),
++ MXC_DEFINE_PIN(D, 21, PF, CSPI2_SS0, 0),
++ MXC_DEFINE_PIN(D, 22, PF, CSPI2_SCLK, 0),
++ MXC_DEFINE_PIN(D, 23, PF, CSPI2_MISO, 0),
++ MXC_DEFINE_PIN(D, 24, PF, CSPI2_MOSI, 0),
++
++ MXC_DEFINE_PIN(D, 19, AF, USBH2_DATA4, 0),
++ MXC_DEFINE_PIN(D, 20, AF, USBH2_DATA3, 0),
++ MXC_DEFINE_PIN(D, 21, AF, USBH2_DATA6, 0),
++ MXC_DEFINE_PIN(D, 22, AF, USBH2_DATA0, 0),
++ MXC_DEFINE_PIN(D, 23, AF, USBH2_DATA2, 0),
++ MXC_DEFINE_PIN(D, 24, AF, USBH2_DATA1, 0),
++ MXC_DEFINE_PIN(D, 26, AF, USBH2_DATA5, 0),
++
++ MXC_DEFINE_PIN(D, 25, PF, CSPI1_RDY, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 26, PF, CSPI1_SS2, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 27, PF, CSPI1_SS1, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 28, PF, CSPI1_SS0, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 29, PF, CSPI1_SCLK, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 30, PF, CSPI1_MISO, GPIO_IN),
++ MXC_DEFINE_PIN(D, 31, PF, CSPI1_MOSI, GPIO_OUT),
++
++ MXC_DEFINE_PIN(E, 3, PF, UART2_CTS, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 4, PF, UART2_RTS, GPIO_IN),
++ MXC_DEFINE_PIN(E, 6, PF, UART2_TXD, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 7, PF, UART2_RXD, GPIO_IN),
++
++ MXC_DEFINE_PIN(E, 8, PF, UART3_TXD, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 9, PF, UART3_RXD, GPIO_IN),
++ MXC_DEFINE_PIN(E, 10, PF, UART3_CTS, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 11, PF, UART3_RTS, GPIO_IN),
++
++ MXC_DEFINE_PIN(E, 12, PF, UART1_TXD, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 13, PF, UART1_RXD, GPIO_IN),
++ MXC_DEFINE_PIN(E, 14, PF, UART1_CTS, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 15, PF, UART1_RTS, GPIO_IN),
++
++ MXC_DEFINE_PIN(E, 16, AF, OWIRE, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 16, PF, RTCK, GPIO_OUT),
++
++ MXC_DEFINE_PIN(E, 18, PF, SD1_D0, 0),
++ MXC_DEFINE_PIN(E, 19, PF, SD1_D1, 0),
++ MXC_DEFINE_PIN(E, 20, PF, SD1_D2, 0),
++ MXC_DEFINE_PIN(E, 21, PF, SD1_D3, 0),
++ MXC_DEFINE_PIN(E, 22, PF, SD1_CMD, 0),
++ MXC_DEFINE_PIN(E, 23, PF, SD1_CLK, 0),
++
++ MXC_DEFINE_PIN(B, 4, PF, SD2_D0, 0),
++ MXC_DEFINE_PIN(B, 5, PF, SD2_D1, 0),
++ MXC_DEFINE_PIN(B, 6, PF, SD2_D2, 0),
++ MXC_DEFINE_PIN(B, 7, PF, SD2_D3, 0),
++ MXC_DEFINE_PIN(B, 8, PF, SD2_CMD, 0),
++ MXC_DEFINE_PIN(B, 9, PF, SD2_CLK, 0),
++
++ MXC_DEFINE_PIN(D, 0, PF, SD3_CMD, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 1, PF, SD3_CLK, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 2, AF, SD3_D0, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 3, AF, SD3_D1, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 4, AF, SD3_D2, GPIO_OUT),
++ MXC_DEFINE_PIN(D, 5, AF, SD3_D3, GPIO_OUT),
++
++ MXC_DEFINE_PIN(E, 18, AF, CSPI3_MISO, GPIO_IN),
++ MXC_DEFINE_PIN(E, 21, AF, CSPI3_SS, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 22, AF, CSPI3_MOSI, GPIO_OUT),
++ MXC_DEFINE_PIN(E, 23, AF, CSPI3_SCLK, GPIO_OUT),
++
++ MXC_DEFINE_PIN(F, 0, PF, NFRB, GPIO_IN),
++ MXC_DEFINE_PIN(F, 1, PF, NFCLE, GPIO_OUT),
++ MXC_DEFINE_PIN(F, 2, PF, NFWP_B, GPIO_OUT),
++ MXC_DEFINE_PIN(F, 3, PF, NFCE_B, GPIO_OUT),
++ MXC_DEFINE_PIN(F, 4, PF, NFALE, GPIO_OUT),
++ MXC_DEFINE_PIN(F, 5, PF, NFRE_B, GPIO_OUT),
++ MXC_DEFINE_PIN(F, 6, PF, NFWE_B, GPIO_OUT),
++
++ MXC_DEFINE_PIN(F, 7, AF, PC_POE, GPIO_OUT),
++ MXC_DEFINE_PIN(F, 8, AF, PC_RW_B, GPIO_OUT),
++ MXC_DEFINE_PIN(F, 9, AF, IOIS16, GPIO_IN),
++ MXC_DEFINE_PIN(F, 10, AF, PC_RST, GPIO_OUT),
++ MXC_DEFINE_PIN(F, 11, AF, PC_BVD2, GPIO_IN),
++ MXC_DEFINE_PIN(F, 12, AF, PC_BVD1, GPIO_IN),
++ MXC_DEFINE_PIN(F, 13, AF, PC_VS2, GPIO_IN),
++ MXC_DEFINE_PIN(F, 14, AF, PC_VS1, GPIO_IN),
++ MXC_DEFINE_PIN(F, 15, PF, CLKO, GPIO_OUT),
++ MXC_DEFINE_PIN(F, 16, AF, PC_PWRON, GPIO_IN),
++ MXC_DEFINE_PIN(F, 17, AF, PC_READY, GPIO_IN),
++ MXC_DEFINE_PIN(F, 18, AF, PC_WAIT_B, GPIO_IN),
++ MXC_DEFINE_PIN(F, 19, AF, PC_CD2_B, GPIO_IN),
++ MXC_DEFINE_PIN(F, 20, AF, PC_CD1_B, GPIO_IN),
++
++ MXC_DEFINE_PIN(F, 23, AIN, FEC_TX_EN, GPIO_OUT),
++};
++
++#define _PIN_NAME(v) \
++ case v: \
++ name = #v; \
++ break
++
++static inline const char *MX27_PIN_NAME(int iomux)
++{
++ const char *name = "<noname>";
++ switch (iomux) {
++ _PIN_NAME(PA0_PF_USBH2_CLK);
++ _PIN_NAME(PA1_PF_USBH2_DIR);
++ _PIN_NAME(PA2_PF_USBH2_DATA7);
++ _PIN_NAME(PA3_PF_USBH2_NXT);
++ _PIN_NAME(PA4_PF_USBH2_STP);
++ _PIN_NAME(PA5_PF_LSCLK);
++ _PIN_NAME(PA6_PF_LD0);
++ _PIN_NAME(PA7_PF_LD1);
++ _PIN_NAME(PA8_PF_LD2);
++ _PIN_NAME(PA9_PF_LD3);
++ _PIN_NAME(PA10_PF_LD4);
++ _PIN_NAME(PA11_PF_LD5);
++ _PIN_NAME(PA12_PF_LD6);
++ _PIN_NAME(PA13_PF_LD7);
++ _PIN_NAME(PA14_PF_LD8);
++ _PIN_NAME(PA15_PF_LD9);
++ _PIN_NAME(PA16_PF_LD10);
++ _PIN_NAME(PA17_PF_LD11);
++ _PIN_NAME(PA18_PF_LD12);
++ _PIN_NAME(PA19_PF_LD13);
++ _PIN_NAME(PA20_PF_LD14);
++ _PIN_NAME(PA21_PF_LD15);
++ _PIN_NAME(PA22_PF_LD16);
++ _PIN_NAME(PA23_PF_LD17);
++ _PIN_NAME(PA24_PF_REV);
++ _PIN_NAME(PA25_PF_CLS);
++ _PIN_NAME(PA26_PF_PS);
++ _PIN_NAME(PA27_PF_SPL_SPR);
++ _PIN_NAME(PA28_PF_HSYNC);
++ _PIN_NAME(PA29_PF_VSYNC);
++ _PIN_NAME(PA30_PF_CONTRAST);
++ _PIN_NAME(PA31_PF_OE_ACD);
++ _PIN_NAME(PB4_PF_SD2_D0);
++ _PIN_NAME(PB5_PF_SD2_D1);
++ _PIN_NAME(PB6_PF_SD2_D2);
++ _PIN_NAME(PB7_PF_SD2_D3);
++ _PIN_NAME(PB8_PF_SD2_CMD);
++ _PIN_NAME(PB9_PF_SD2_CLK);
++ _PIN_NAME(PB10_PF_CSI_D0);
++ _PIN_NAME(PB10_AF_UART6_TXD);
++ _PIN_NAME(PB11_PF_CSI_D1);
++ _PIN_NAME(PB11_AF_UART6_RXD);
++ _PIN_NAME(PB12_PF_CSI_D2);
++ _PIN_NAME(PB12_AF_UART6_CTS);
++ _PIN_NAME(PB13_PF_CSI_D3);
++ _PIN_NAME(PB13_AF_UART6_RTS);
++ _PIN_NAME(PB14_PF_CSI_D4);
++ _PIN_NAME(PB15_PF_CSI_MCLK);
++ _PIN_NAME(PB16_PF_CSI_PIXCLK);
++ _PIN_NAME(PB17_PF_CSI_D5);
++ _PIN_NAME(PB18_PF_CSI_D6);
++ _PIN_NAME(PB18_AF_UART5_TXD);
++ _PIN_NAME(PB19_PF_CSI_D7);
++ _PIN_NAME(PB19_AF_UART5_RXD);
++ _PIN_NAME(PB20_PF_CSI_VSYNC);
++ _PIN_NAME(PB20_AF_UART5_CTS);
++ _PIN_NAME(PB21_PF_CSI_HSYNC);
++ _PIN_NAME(PB21_AF_UART5_RTS);
++ _PIN_NAME(PB22_PF_USBH1_SUSP);
++ _PIN_NAME(PB23_PF_USB_PWR);
++ _PIN_NAME(PB24_PF_USB_OC_B);
++ _PIN_NAME(PB25_PF_USBH1_RCV);
++ _PIN_NAME(PB26_PF_USBH1_FS);
++ _PIN_NAME(PB27_PF_USBH1_OE_B);
++ _PIN_NAME(PB28_PF_USBH1_TXDM);
++ _PIN_NAME(PB29_PF_USBH1_TXDP);
++ _PIN_NAME(PB30_PF_USBH1_RXDM);
++ _PIN_NAME(PB31_PF_USBH1_RXDP);
++ _PIN_NAME(PB26_AF_UART4_RTS);
++ _PIN_NAME(PB28_AF_UART4_TXD);
++ _PIN_NAME(PB29_AF_UART4_CTS);
++ _PIN_NAME(PB31_AF_UART4_RXD);
++ _PIN_NAME(PC5_PF_I2C2_SDA);
++ _PIN_NAME(PC6_PF_I2C2_SCL);
++ _PIN_NAME(PC7_PF_USBOTG_DATA5);
++ _PIN_NAME(PC8_PF_USBOTG_DATA6);
++ _PIN_NAME(PC9_PF_USBOTG_DATA0);
++ _PIN_NAME(PC10_PF_USBOTG_DATA2);
++ _PIN_NAME(PC11_PF_USBOTG_DATA1);
++ _PIN_NAME(PC12_PF_USBOTG_DATA4);
++ _PIN_NAME(PC13_PF_USBOTG_DATA3);
++ _PIN_NAME(PC16_PF_SSI4_FS);
++ _PIN_NAME(PC17_PF_SSI4_RXD);
++ _PIN_NAME(PC18_PF_SSI4_TXD);
++ _PIN_NAME(PC19_PF_SSI4_CLK);
++ _PIN_NAME(PC20_PF_SSI1_FS);
++ _PIN_NAME(PC21_PF_SSI1_RXD);
++ _PIN_NAME(PC22_PF_SSI1_TXD);
++ _PIN_NAME(PC23_PF_SSI1_CLK);
++ _PIN_NAME(PC24_PF_SSI2_FS);
++ _PIN_NAME(PC25_PF_SSI2_RXD);
++ _PIN_NAME(PC26_PF_SSI2_TXD);
++ _PIN_NAME(PC27_PF_SSI2_CLK);
++ _PIN_NAME(PC28_PF_SSI3_FS);
++ _PIN_NAME(PC29_PF_SSI3_RXD);
++ _PIN_NAME(PC30_PF_SSI3_TXD);
++ _PIN_NAME(PC31_PF_SSI3_CLK);
++ _PIN_NAME(PD0_AIN_FEC_TXD0);
++ _PIN_NAME(PD1_AIN_FEC_TXD1);
++ _PIN_NAME(PD2_AIN_FEC_TXD2);
++ _PIN_NAME(PD3_AIN_FEC_TXD3);
++ _PIN_NAME(PD4_AOUT_FEC_RX_ER);
++ _PIN_NAME(PD5_AOUT_FEC_RXD1);
++ _PIN_NAME(PD6_AOUT_FEC_RXD2);
++ _PIN_NAME(PD7_AOUT_FEC_RXD3);
++ _PIN_NAME(PD8_AF_FEC_MDIO);
++ _PIN_NAME(PD9_AIN_FEC_MDC);
++ _PIN_NAME(PD10_AOUT_FEC_CRS);
++ _PIN_NAME(PD11_AOUT_FEC_TX_CLK);
++ _PIN_NAME(PD12_AOUT_FEC_RXD0);
++ _PIN_NAME(PD13_AOUT_FEC_RX_DV);
++ _PIN_NAME(PD14_AOUT_FEC_RX_CLK);
++ _PIN_NAME(PD15_AOUT_FEC_COL);
++ _PIN_NAME(PD16_AIN_FEC_TX_ER);
++ _PIN_NAME(PD17_PF_I2C_DATA);
++ _PIN_NAME(PD18_PF_I2C_CLK);
++ _PIN_NAME(PD19_AF_USBH2_DATA4);
++ _PIN_NAME(PD20_AF_USBH2_DATA3);
++ _PIN_NAME(PD21_AF_USBH2_DATA6);
++ _PIN_NAME(PD22_AF_USBH2_DATA0);
++ _PIN_NAME(PD23_AF_USBH2_DATA2);
++ _PIN_NAME(PD24_AF_USBH2_DATA1);
++ _PIN_NAME(PD25_PF_CSPI1_RDY);
++ _PIN_NAME(PD26_PF_CSPI1_SS2);
++ _PIN_NAME(PD26_AF_USBH2_DATA5);
++ _PIN_NAME(PD27_PF_CSPI1_SS1);
++ _PIN_NAME(PD28_PF_CSPI1_SS0);
++ _PIN_NAME(PD29_PF_CSPI1_SCLK);
++ _PIN_NAME(PD30_PF_CSPI1_MISO);
++ _PIN_NAME(PD31_PF_CSPI1_MOSI);
++ _PIN_NAME(PF23_AIN_FEC_TX_EN);
++ _PIN_NAME(PE0_PF_USBOTG_NXT);
++ _PIN_NAME(PE1_PF_USBOTG_STP);
++ _PIN_NAME(PE2_PF_USBOTG_DIR);
++ _PIN_NAME(PE3_PF_UART2_CTS);
++ _PIN_NAME(PE4_PF_UART2_RTS);
++ _PIN_NAME(PE6_PF_UART2_TXD);
++ _PIN_NAME(PE7_PF_UART2_RXD);
++ _PIN_NAME(PE8_PF_UART3_TXD);
++ _PIN_NAME(PE9_PF_UART3_RXD);
++ _PIN_NAME(PE10_PF_UART3_CTS);
++ _PIN_NAME(PE11_PF_UART3_RTS);
++ _PIN_NAME(PE12_PF_UART1_TXD);
++ _PIN_NAME(PE13_PF_UART1_RXD);
++ _PIN_NAME(PE14_PF_UART1_CTS);
++ _PIN_NAME(PE15_PF_UART1_RTS);
++ _PIN_NAME(PE16_AF_OWIRE);
++ _PIN_NAME(PE16_PF_RTCK);
++ _PIN_NAME(PE18_PF_SD1_D0);
++ _PIN_NAME(PE18_AF_CSPI3_MISO);
++ _PIN_NAME(PE19_PF_SD1_D1);
++ _PIN_NAME(PE20_PF_SD1_D2);
++ _PIN_NAME(PE21_PF_SD1_D3);
++ _PIN_NAME(PE21_AF_CSPI3_SS);
++ _PIN_NAME(PE22_PF_SD1_CMD);
++ _PIN_NAME(PE22_AF_CSPI3_MOSI);
++ _PIN_NAME(PE23_PF_SD1_CLK);
++ _PIN_NAME(PE23_AF_CSPI3_SCLK);
++ _PIN_NAME(PE24_PF_USBOTG_CLK);
++ _PIN_NAME(PE25_PF_USBOTG_DATA7);
++ }
++ return name;
++}
++
++#endif /* _MXC_GPIO_MX2_H */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/include/mach/mxc_pm.h linux-2.6.28-karo/arch/arm/mach-mx2/include/mach/mxc_pm.h
+--- linux-2.6.28/arch/arm/mach-mx2/include/mach/mxc_pm.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/include/mach/mxc_pm.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,229 @@
++
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @defgroup LPMD Low-Level Power Management Driver
++ */
++
++/*!
++ * @file arch-mxc/mxc_pm.h
++ *
++ * @brief This file contains the chip level configuration details and
++ * public API declarations for CRM_AP module
++ *
++ * @ingroup LPMD
++ */
++
++#ifndef __ASM_ARCH_MXC_PM_H__
++#define __ASM_ARCH_MXC_PM_H__
++
++#define WAIT_MODE 111
++#define DOZE_MODE 112
++#define STOP_MODE 113
++#define DSM_MODE 114
++
++#define GATE_STOP_WAIT 9
++#define GATE_STOP 10
++
++/*
++ * Used for MHz conversion
++ */
++#define MEGA_HERTZ 1000000
++
++/*
++ * If invalid frequency value other than the following
++ * CORE_133 - ARM desired to run @133MHz, LoV (1.2V)
++ * CORE_266 - ARM desired to run @266MHz, LoV (1.2V)
++ * CORE_399 - ARM desired to run @399MHz, LoV (1.2V)
++ * CORE_532 - ARM desired to run @133MHz, HiV (1.6V)
++ * are passed then this error is returned,
++ */
++#define ERR_FREQ_INVALID 1
++
++/*
++ * If PLL freq is less than desired ARM frequency during Integer
++ * DVFS, then return this error
++ */
++#define PLL_LESS_ARM_ERR 2
++
++/*
++ * Frequency change within the same-lo voltage is not approved.
++ * Inorder to do Integer DFS, move to the high voltage range and
++ * then set LFDF and move to the low voltage range
++ */
++#define INT_DFS_LOW_NOT_ALLOW 3
++
++/*
++ * If the desired AHB or IPG exceeds 133MHz or 66.5MHz respectively,
++ * then return this error
++ */
++#define AHB_IPG_EXCEED_LIMIT 4
++
++/*
++ * If the desired ARM frequency is too low to get by PLL scaling
++ * and the mxc_pm_pllscale API is called, return this error:
++ */
++#define PLL_DVFS_FREQ_TOO_LOW 5
++
++/*
++ * Invalid frequencies requested
++ */
++#define MXC_PM_INVALID_PARAM 6
++
++/*
++ * If AHB and/or IPG frequencies are greater than maximum allowed
++ */
++#define FREQ_OUT_OF_RANGE 2
++
++/*
++ * If AHB and/or IPG frequencies are other than 100 or 50Mhz
++ */
++#define BUS_FREQ_INVALID 2
++
++/*
++ * If MAX_PDF is greater than max value (8) then return this error
++ */
++#define AHB_MAX_DIV_ERR 3
++
++/*
++ * If IPG_PDF is greater than max value (2) then return this error
++ */
++#define IPG_MAX_DIV_ERR 4
++
++/*
++ * If ARM freq is out of range i.e., less than 133 or greater than
++ * 399 then return this error
++ */
++#define INVALID_ARM_FREQ 5
++
++/*
++ * This file includes all platform APIs. Some of the APIs are not
++ * appicable to some platforms. So, this error is used to indicate
++ * that a particular API is not available
++ */
++#define MXC_PM_API_NOT_SUPPORTED 6
++
++/*!
++ * Additional define for stop mode
++ */
++#define PM_SUSPEND_STOP ((__force suspend_state_t) 2)
++
++/*!
++ * CKOH pins configuration
++ */
++#define CKOH_AP_SEL 1
++#define CKOH_AHB_SEL 2
++#define CKOH_IP_SEL 3
++
++/*!
++ * Defines for Stop and DSM mode acknowledgements
++ */
++#define MXC_PM_LOWPWR_ACK_SDMA 0x01
++#define MXC_PM_LOWPWR_ACK_IPU 0x02
++#define MXC_PM_LOWPWR_ACK_MAX 0x04
++#define MXC_PM_LOWPWR_ACK_MQSPI 0x08
++#define MXC_PM_LOWPWR_ACK_USB 0x10
++#define MXC_PM_LOWPWR_ACK_RTIC 0x20
++
++/*
++ * PMIC configuration
++ */
++#define MXC_PMIC_1_2_VOLT 0xC
++#define MXC_PMIC_1_6_VOLT 0x1C
++#define MXC_PMIC_1_0_VOLT 0x4
++#define MXC_PMIC_DVS_SPEED 0x3
++
++/*!
++ * Implementing Level 1 CRM Gate Control. Level 2 gate control
++ * is provided at module level using LPMD registers
++ *
++ * @param group The desired clock gate control register bits.
++ * Possible values are 0 through 6
++ * @param opt The desired option requesting clock to run during stop
++ * and wait modes or just during the stop mode. Possible
++ * values are GATE_STOP_WAIT and GATE_STOP.
++ *
++ */
++void mxc_pm_clockgate(int group, int opt);
++
++/*!
++ * Implementing steps required to transition to low-power modes
++ *
++ * @param mode The desired low-power mode. Possible values are,
++ * WAIT_MODE, STOP_MODE or DSM_MODE
++ *
++ */
++void mxc_pm_lowpower(int mode);
++
++/*!
++ * Enables acknowledgement from module when entering stop or DSM mode.
++ *
++ * @param ack The desired module acknowledgement to enable.
++ *
++ */
++void mxc_pm_lp_ack_enable(int ack);
++
++/*!
++ * Disables acknowledgement from module when entering stop or DSM mode.
++ *
++ * @param ack The desired module acknowledgement to disable.
++ *
++ */
++void mxc_pm_lp_ack_disable(int ack);
++
++/*!
++ * Implementing steps required to set Integer Scaling
++ *
++ * @param armfreq The desired ARM frequency. AHB and IP
++ * frequency are changed depending on ARM
++ * frequency and the divider values.
++ * @param ahbfreq The desired AHB frequency
++ * @param ipfreq The desired IP frequency
++ *
++ * @return Returns 0 on success or
++ * Returns -PLL_LESS_ARM_ERR if pllfreq is less than
++ * desired core freq
++ */
++int mxc_pm_intscale(long armfreq, long ahbfreq, long ipfreq);
++
++/*!
++ * To calculate MFI, MFN, MFD values. Using this the output frequency
++ * whose value is calculated using,
++ * 2 * REF_FREQ * (MF / PDF), where
++ * REF_FREQ is 26 Mhz
++ * MF = MFI + (MFN + MFD)
++ * PDF is assumed to be 1
++ *
++ * @param armfreq The desired ARM frequency
++ * @param ahbfreq The desired AHB frequency
++ * @param ipfreq The desired IP frequency
++ *
++ * @return Returns 0 on success or
++ * Returns -1 on error
++ */
++int mxc_pm_pllscale(long armfreq, long ahbfreq, long ipfreq);
++
++/*!
++ * To change AP core frequency and/or voltage suitably
++ *
++ * @param armfreq The desired ARM frequency
++ * @param ahbfreq The desired AHB frequency
++ * @param ipfreq The desired IP frequency
++ *
++ * @return Returns -ERR_FREQ_INVALID on failure
++ * Returns 0 on success
++ */
++int mxc_pm_dvfs(unsigned long armfreq, long ahbfreq, long ipfreq);
++
++#endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/include/mach/mxc_v4l2.h linux-2.6.28-karo/arch/arm/mach-mx2/include/mach/mxc_v4l2.h
+--- linux-2.6.28/arch/arm/mach-mx2/include/mach/mxc_v4l2.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/include/mach/mxc_v4l2.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,56 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU Lesser General
++ * Public License. You may obtain a copy of the GNU Lesser General
++ * Public License Version 2.1 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/lgpl-license.html
++ * http://www.gnu.org/copyleft/lgpl.html
++ */
++
++/*!
++ * @file arch-mxc/mxc_v4l2.h
++ *
++ * @brief mxc V4L2 private structures
++ *
++ * @ingroup MXC_V4L2_CAPTURE
++ */
++
++#ifndef __ASM_ARCH_MXC_V4L2_H__
++#define __ASM_ARCH_MXC_V4L2_H__
++
++#define V4L2_CID_MXC_ROT (V4L2_CID_PRIVATE_BASE + 0)
++#define V4L2_CID_MXC_FLASH (V4L2_CID_PRIVATE_BASE + 1)
++#define V4L2_CID_MXC_FLICKER (V4L2_CID_PRIVATE_BASE + 2)
++#define V4L2_CID_MXC_TEAR_PROTECT (V4L2_CID_PRIVATE_BASE + 3)
++#define V4L2_CID_MXC_GAIN_LIMIT (V4L2_CID_PRIVATE_BASE + 4)
++
++/* V4L2_CID_MXC_ROT values */
++
++#define V4L2_MXC_ROTATE_NONE 0
++#define V4L2_MXC_ROTATE_VERT_FLIP 1
++#define V4L2_MXC_ROTATE_HORIZ_FLIP 2
++#define V4L2_MXC_ROTATE_180 3
++#define V4L2_MXC_ROTATE_90_RIGHT 4
++#define V4L2_MXC_ROTATE_90_RIGHT_VFLIP 5
++#define V4L2_MXC_ROTATE_90_RIGHT_HFLIP 6
++#define V4L2_MXC_ROTATE_90_LEFT 7
++
++/* V4L2_CID_MXC_FLICKER values */
++
++#define V4L2_MXC_FLICKER_DISABLE 0
++#define V4L2_MXC_FLICKER_60HZ 1
++#define V4L2_MXC_FLICKER_50HZ 2
++#define V4L2_MXC_FLICKER_AUTO 3
++
++struct v4l2_mxc_offset {
++ unsigned int y_offset;
++ unsigned int u_offset;
++ unsigned int v_offset;
++ unsigned int qp_offset;
++};
++
++#endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/karo-tx27.c linux-2.6.28-karo/arch/arm/mach-mx2/karo-tx27.c
+--- linux-2.6.28/arch/arm/mach-mx2/karo-tx27.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/karo-tx27.c 2009-03-11 13:31:40.000000000 +0100
+@@ -0,0 +1,1556 @@
++/*
++ * arch/arm/mach-mx27/karo-tx27.c
++ *
++ * Copyright (C) 2008 Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ * based on: arch/arm/mach-mx27ads.c (C) Freescale Semiconductor, 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
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the:
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
++ *
++ */
++
++#include <linux/types.h>
++#include <linux/sched.h>
++#include <linux/interrupt.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/platform_device.h>
++#include <linux/input.h>
++#include <linux/clk.h>
++#include <linux/delay.h>
++#include <linux/fb.h>
++#include <linux/i2c.h>
++#include <linux/i2c/at24.h>
++#include <linux/spi/spi.h>
++#include <linux/serial_8250.h>
++#include <linux/fec_enet.h>
++#include <mtd/mtd-abi.h>
++#include <linux/mtd/map.h>
++#include <linux/mtd/partitions.h>
++#include <asm/mach/flash.h>
++
++#include <linux/serial.h>
++#include <linux/fsl_devices.h>
++#include <linux/rtc/ds13xx.h>
++#include <linux/irq.h>
++#include <linux/mmc/host.h>
++#include <linux/gpio_keys.h>
++#include <linux/leds.h>
++
++#include <asm/setup.h>
++#include <asm/irq.h>
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/time.h>
++#include <mach/common.h>
++#include <mach/hardware.h>
++#include <mach/gpio.h>
++#include <mach/iomux.h>
++#include <mach/irqs.h>
++#include <mach/clock.h>
++#include <mach/imxfb.h>
++#include <mach/imx_spi.h>
++#include <mach/imx_i2c.h>
++#include <mach/mmc.h>
++#include <mach/imx-uart.h>
++#include <mach/mxc_nand.h>
++#include <mach/ulpi.h>
++#include <mach/mxc_ehci.h>
++#include <mach/board-tx27.h>
++
++#include "crm_regs.h"
++#include "devices.h"
++
++#ifdef DEBUG
++int tx27_debug = 1;
++#define dbg_lvl(n) ((n) < tx27_debug)
++module_param(tx27_debug, int, S_IRUGO | S_IWUSR);
++
++#define DBG(lvl, fmt...) do { if (dbg_lvl(lvl)) printk(KERN_DEBUG fmt); } while (0)
++#else
++int tx27_debug;
++#define dbg_lvl(n) 0
++#define DBG(lvl, fmt...) do { } while (0)
++#endif
++
++#include "karo.h"
++
++#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
++static int tx27_uart_pins[][4] = {
++ {
++ PE12_PF_UART1_TXD,
++ PE13_PF_UART1_RXD,
++ PE14_PF_UART1_CTS,
++ PE15_PF_UART1_RTS,
++ },{
++ PE6_PF_UART2_TXD,
++ PE7_PF_UART2_RXD,
++ PE3_PF_UART2_CTS,
++ PE4_PF_UART2_RTS,
++ },{
++ PE8_PF_UART3_TXD,
++ PE9_PF_UART3_RXD,
++ PE10_PF_UART3_CTS,
++ PE11_PF_UART3_RTS,
++ },{
++ PB28_AF_UART4_TXD,
++ PB31_AF_UART4_RXD,
++ PB29_AF_UART4_CTS,
++ PB26_AF_UART4_RTS,
++ },{
++ PB18_AF_UART5_TXD,
++ PB19_AF_UART5_RXD,
++ PB20_AF_UART5_CTS,
++ PB21_AF_UART5_RTS,
++ },{
++ PB10_AF_UART6_TXD,
++ PB11_AF_UART6_RXD,
++ PB12_AF_UART6_CTS,
++ PB13_AF_UART6_RTS,
++ },
++};
++
++static int tx27_uart_init(struct platform_device *pdev)
++{
++ DBG(0, "%s: \n", __FUNCTION__);
++ return mxc_gpio_setup_multiple_pins(tx27_uart_pins[pdev->id],
++ ARRAY_SIZE(tx27_uart_pins[pdev->id]), "UART");
++}
++
++static int tx27_uart_exit(struct platform_device *pdev)
++{
++ DBG(0, "%s: \n", __FUNCTION__);
++ mxc_gpio_release_multiple_pins(tx27_uart_pins[pdev->id],
++ ARRAY_SIZE(tx27_uart_pins[pdev->id]));
++ return 0;
++}
++
++static struct imxuart_platform_data tx27_uart_ports[] = {
++ {
++ .init = tx27_uart_init,
++ .exit = tx27_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ },{
++ .init = tx27_uart_init,
++ .exit = tx27_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ },{
++ .init = tx27_uart_init,
++ .exit = tx27_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ },{
++ .init = tx27_uart_init,
++ .exit = tx27_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ },{
++ .init = tx27_uart_init,
++ .exit = tx27_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ },{
++ .init = tx27_uart_init,
++ .exit = tx27_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ },
++};
++
++static struct platform_device *tx27_uart_devices[] = {
++#if UART1_ENABLED
++ &mxc_uart_device0,
++#endif
++#if UART2_ENABLED
++ &mxc_uart_device1,
++#endif
++#if UART3_ENABLED
++ &mxc_uart_device2,
++#endif
++#if UART4_ENABLED
++ &mxc_uart_device3,
++#endif
++#if UART5_ENABLED
++ &mxc_uart_device4,
++#endif
++#if UART6_ENABLED
++ &mxc_uart_device5,
++#endif
++};
++#endif
++
++#ifdef CONFIG_USB_EHCI_MXC
++
++#define SMSC_VENDOR_ID 0x0424
++#define USB3317_PROD_ID 0x0006
++
++static int usb3317_set_vbus_power(void __iomem *view, int on)
++{
++ int vid, pid, ret = 0;
++
++ ret = ulpi_read(ISP1504_VID_HIGH, view);
++ if (ret < 0) {
++ goto err;
++ }
++ vid = ret << 8;
++
++ ret = ulpi_read(ISP1504_VID_LOW, view);
++ if (ret < 0) {
++ goto err;
++ }
++ vid |= ret;
++
++ ret = ulpi_read(ISP1504_PID_HIGH, view);
++ if (ret < 0) {
++ goto err;
++ }
++ pid = ret << 8;
++
++ ret = ulpi_read(ISP1504_PID_LOW, view);
++ if (ret < 0) {
++ goto err;
++ }
++ pid |= ret;
++
++ pr_info("ULPI Vendor ID 0x%x Product ID 0x%x\n", vid, pid);
++ if (vid != SMSC_VENDOR_ID || pid != USB3317_PROD_ID) {
++ pr_err("No USB3317 found\n");
++ return -1;
++ }
++
++ if (on) {
++ ret = ulpi_set(DRV_VBUS_EXT | /* enable external Vbus */
++ DRV_VBUS | /* enable internal Vbus */
++ USE_EXT_VBUS_IND | /* use external indicator */
++ CHRG_VBUS, /* charge Vbus */
++ ISP1504_OTGCTL, view);
++ } else {
++ ret = ulpi_clear(DRV_VBUS_EXT | /* disable external Vbus */
++ DRV_VBUS, /* disable internal Vbus */
++ ISP1504_OTGCTL, view);
++
++ ret |= ulpi_set(USE_EXT_VBUS_IND | /* use external indicator */
++ DISCHRG_VBUS, /* discharge Vbus */
++ ISP1504_OTGCTL, view);
++ }
++ return 0;
++
++ err:
++ printk(KERN_ERR "ULPI read failed with error %d\n", ret);
++ return ret;
++}
++
++static int tx27_usb_host_init(struct platform_device *pdev)
++{
++ int ret;
++ u32 temp;
++ unsigned long freq;
++ unsigned long flags;
++ struct clk *usb_clk = clk_get(NULL, "usb_clk");
++
++ if (IS_ERR(usb_clk)) {
++ ret = PTR_ERR(usb_clk);
++ printk(KERN_ERR "Failed to get usb_clk: %d\n", ret);
++ goto err;
++ }
++
++ ret = gpio_usbh2_active();
++ if (ret != 0) {
++ return ret;
++ }
++
++ freq = clk_get_rate(usb_clk);
++ if ((freq < 59999000) || (freq > 60001000)) {
++ printk(KERN_ERR "USB_CLK=%lu.%03luMHz, should be 60MHz\n",
++ freq / 1000000, freq / 1000 % 1000);
++ ret = clk_set_rate(usb_clk, 60000000);
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to set usb_clk rate: %d\n", ret);
++ }
++ }
++ clk_put(usb_clk);
++ if (ret != 0) {
++ goto err;
++ }
++
++ local_irq_save(flags);
++ temp = readl(IO_ADDRESS(OTG_BASE_ADDR) + 0x600);
++ temp &= ~(3 << 21);
++ temp |= (1 << 5) | (1 << 16) | (1 << 19) | (1 << 20);
++ writel(temp, IO_ADDRESS(OTG_BASE_ADDR) + 0x600);
++ local_irq_restore(flags);
++
++ temp = readl(IO_ADDRESS(OTG_BASE_ADDR) + 0x584);
++ temp &= ~(3 << 30);
++ temp |= 2 << 30;
++ temp = 0x88001215;
++ /* select ULPI transceiver */
++ DBG(0, "%s: Changing USBH2_PORTSC1[%08lx] from %08x to %08x\n", __FUNCTION__,
++ OTG_BASE_ADDR + 0x584, readl(IO_ADDRESS(OTG_BASE_ADDR) + 0x584), temp);
++ writel(temp, IO_ADDRESS(OTG_BASE_ADDR) + 0x584);
++
++ mdelay(10);
++
++ ret = usb3317_set_vbus_power(IO_ADDRESS(OTG_BASE_ADDR + 0x570), 1);
++ if (ret != 0) {
++// goto err;
++ }
++ return 0;
++
++ err:
++ gpio_usbh2_inactive();
++ return ret;
++}
++
++static int tx27_usb_host_exit(struct platform_device *pdev)
++{
++ gpio_usbh2_inactive();
++ return 0;
++}
++
++static struct mxc_usbh_platform_data tx27_usbh2_data = {
++ .init = tx27_usb_host_init,
++ .exit = tx27_usb_host_exit,
++};
++
++int tx27_usbh2_init(void)
++{
++ int ret;
++
++ ret = mxc_register_device(&mxc_ehci2, &tx27_usbh2_data);
++ return ret;
++}
++device_initcall(tx27_usbh2_init);
++
++static int tx27_usb_otg_init(struct platform_device *pdev)
++{
++ int ret;
++ u32 temp;
++ unsigned long freq;
++ unsigned long flags;
++ struct clk *usb_clk = clk_get(NULL, "usb_clk");
++
++ if (IS_ERR(usb_clk)) {
++ ret = PTR_ERR(usb_clk);
++ printk(KERN_ERR "Failed to get usb_clk: %d\n", ret);
++ goto err;
++ }
++
++ ret = gpio_usbotg_hs_active();
++ if (ret != 0) {
++ return ret;
++ }
++
++ freq = clk_get_rate(usb_clk);
++ if ((freq < 59999000) || (freq > 60001000)) {
++ printk(KERN_ERR "USB_CLK=%lu.%03luMHz, should be 60MHz\n",
++ freq / 1000000, freq / 1000 % 1000);
++ ret = clk_set_rate(usb_clk, 60000000);
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to set usb_clk rate: %d\n", ret);
++ }
++ }
++ clk_put(usb_clk);
++ if (ret != 0) {
++ goto err;
++ }
++
++ local_irq_save(flags);
++ temp = readl(IO_ADDRESS(OTG_BASE_ADDR) + 0x600);
++ temp &= ~(3 << 21);
++ temp |= (1 << 5) | (1 << 16) | (1 << 19) | (1 << 20);
++ writel(temp, IO_ADDRESS(OTG_BASE_ADDR) + 0x600);
++ local_irq_restore(flags);
++
++ temp = readl(IO_ADDRESS(OTG_BASE_ADDR) + 0x184);
++ temp &= ~(3 << 30);
++ temp |= 2 << 30;
++ temp = 0x88001215;
++ /* select ULPI transceiver */
++ DBG(0, "%s: Changing USBOTG_PORTSC1[%08lx] from %08x to %08x\n", __FUNCTION__,
++ OTG_BASE_ADDR + 0x184, readl(IO_ADDRESS(OTG_BASE_ADDR) + 0x184), temp);
++ writel(temp, IO_ADDRESS(OTG_BASE_ADDR) + 0x184);
++
++ mdelay(10);
++
++ ret = usb3317_set_vbus_power(IO_ADDRESS(OTG_BASE_ADDR + 0x170), 1);
++ if (ret != 0) {
++// goto err;
++ }
++ return 0;
++
++ err:
++ gpio_usbotg_hs_active();
++ return ret;
++}
++
++static int tx27_usb_otg_exit(struct platform_device *pdev)
++{
++ gpio_usbotg_hs_inactive();
++ return 0;
++}
++
++static struct mxc_usbh_platform_data tx27_otg_data = {
++ .init = tx27_usb_otg_init,
++ .exit = tx27_usb_otg_exit,
++};
++
++int tx27_otg_init(void)
++{
++ int ret;
++
++ ret = mxc_register_device(&mxc_otg, &tx27_otg_data);
++ return ret;
++}
++device_initcall(tx27_otg_init);
++#endif // CONFIG_USB_EHCI_MXC
++
++#if defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE)
++static struct resource fec_resources[] = {
++ {
++ .start = FEC_BASE_ADDR,
++ .end = FEC_BASE_ADDR + 0x18f,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = FEC_BASE_ADDR + 0x200,
++ .end = FEC_BASE_ADDR + 0x2e3,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = MXC_INT_FEC,
++ .end = MXC_INT_FEC,
++ .flags = IORESOURCE_IRQ,
++ },
++#ifdef FEC_MII_IRQ
++ {
++ .start = IRQ_GPIOD(16),
++ .end = IRQ_GPIOD(16),
++ .flags = IORESOURCE_IRQ,
++ },
++#endif
++};
++
++static struct clk *fec_clk;
++static int tx27_fec_suspend(struct platform_device *pdev)
++{
++ BUG_ON(fec_clk == NULL);
++ DBG(1, "%s: Switching FEC PHY off\n", __FUNCTION__);
++ gpio_fec_inactive();
++ clk_disable(fec_clk);
++ return 0;
++}
++
++static int tx27_fec_resume(struct platform_device *pdev)
++{
++ BUG_ON(fec_clk == NULL);
++ DBG(1, "%s: Switching FEC PHY on\n", __FUNCTION__);
++ clk_enable(fec_clk);
++ gpio_fec_active();
++ return 0;
++}
++
++static int fec_arch_init(struct platform_device *pdev)
++{
++ int ret;
++
++ DBG(0, "%s: Activating FEC GPIOs\n", __FUNCTION__);
++ dump_regs();
++ ret = gpio_fec_active();
++ if (ret) {
++ printk(KERN_ERR "%s: could not enable FEC gpios: %d\n", __FUNCTION__, ret);
++ return ret;
++ }
++ BUG_ON(fec_clk != NULL);
++ fec_clk = clk_get(&pdev->dev, "fec_clk");
++ if (unlikely(IS_ERR(fec_clk))) {
++ printk(KERN_ERR "Failed to get fec_clk\n");
++ return PTR_ERR(fec_clk);
++ }
++ DBG(0, "%s: Enabling FEC clock\n", __FUNCTION__);
++ clk_enable(fec_clk);
++ dump_regs();
++ return 0;
++}
++
++static void fec_arch_exit(struct platform_device *pdev)
++{
++ BUG_ON(fec_clk == NULL);
++ if (unlikely(IS_ERR(fec_clk))) {
++ printk(KERN_ERR "Failed to get fec_clk\n");
++ return;
++ }
++ DBG(0, "%s: Disabling FEC clock\n", __FUNCTION__);
++ clk_disable(fec_clk);
++ clk_put(fec_clk);
++ fec_clk = NULL;
++ DBG(0, "%s: Deactivating FEC GPIOs\n", __FUNCTION__);
++ gpio_fec_inactive();
++}
++
++static struct fec_enet_platform_data fec_data = {
++ .arch_init = fec_arch_init,
++ .arch_exit = fec_arch_exit,
++ .suspend = tx27_fec_suspend,
++ .resume = tx27_fec_resume,
++};
++
++static struct platform_device fec_device = {
++ .name = "fec_enet",
++ .id = -1,
++ .num_resources = ARRAY_SIZE(fec_resources),
++ .resource = fec_resources,
++ .dev = {
++ .platform_data = &fec_data,
++ .coherent_dma_mask = 0xFFFFFFFF,
++ },
++};
++#endif
++
++#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
++/* tx27 gpio keys driver */
++struct gpio_keys_button tx27_gpio_keys[] = {
++ {
++ .code = KEY_POWER,
++ .gpio = GPIO_PORTB + 24,
++ .active_low = 0,
++ .desc = "Power Button",
++ .type = EV_KEY, /* input event type (EV_KEY, EV_SW) */
++ .wakeup = 1, /* configure the button as a wake-up source */
++ .debounce_interval = 1, /* debounce ticks interval in msecs */
++ },
++};
++
++struct gpio_keys_platform_data tx27_gpio_keys_pdata = {
++ .buttons = tx27_gpio_keys,
++ .nbuttons = ARRAY_SIZE(tx27_gpio_keys),
++};
++
++static struct platform_device tx27_gpio_keys_device = {
++ .name = "gpio-keys",
++ .id = -1,
++ .dev = {
++ .platform_data = &tx27_gpio_keys_pdata,
++ },
++};
++#endif
++
++#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
++static struct gpio_led tx27_leds[] = {
++ {
++ .name = "Power-LED",
++ .default_trigger = "heartbeat",
++ .gpio = GPIO_PORTF + 13,
++ },
++};
++
++static struct gpio_led_platform_data tx27_led_data = {
++ .leds = tx27_leds,
++ .num_leds = ARRAY_SIZE(tx27_leds),
++};
++
++static struct platform_device tx27_led_device = {
++ .name = "leds-gpio",
++ .id = -1,
++ .dev = {
++ .platform_data = &tx27_led_data,
++ },
++};
++#endif
++
++#if defined(CONFIG_KEYBOARD_MXC) || defined(CONFIG_KEYBOARD_MXC_MODULE)
++/*!
++ * This array is used for mapping mx27 ADS keypad scancodes to input keyboard
++ * keycodes.
++ */
++static u16 tx27_kpd_keycodes[] = {
++ KEY_POWER,
++};
++
++static struct keypad_data tx27_keypad = {
++ .rowmax = 1,
++ .colmax = 1,
++ .irq = MXC_INT_KPP,
++ .learning = 0,
++ //.delay = 2, /* unused in the driver! */
++ .matrix = tx27_kpd_keycodes,
++};
++
++static struct resource tx27_kpp_resources[] = {
++ {
++ .start = MXC_INT_KPP,
++ .end = MXC_INT_KPP,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/* tx27 keypad driver */
++static struct platform_device tx27_keypad_device = {
++ .name = "mxc_keypad",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(tx27_kpp_resources),
++ .resource = tx27_kpp_resources,
++ .dev = {
++ .platform_data = &tx27_keypad,
++ },
++};
++#endif
++
++/* MTD NAND flash */
++#if defined(CONFIG_MTD_NAND_MXC) || defined(CONFIG_MTD_NAND_MXC_MODULE)
++#if 0
++static struct mtd_partition tx27_nand_partitions[] = {
++ {
++ .name = "RedBoot",
++ .offset = 0,
++ .size = 0x00040000,
++ },
++ {
++ .name = "kernel",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 0x001A0000,
++ },
++ {
++ .name = "rootfs",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 0x07E000000,
++ },
++ {
++ .name = "FIS directory",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 0x00003000,
++ .mask_flags = MTD_WRITEABLE,
++ },
++ {
++ .name = "RedBoot config",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 0x00001000,
++ .mask_flags = MTD_WRITEABLE,
++ },
++};
++
++static struct flash_platform_data tx27_nand_data = {
++ .map_name = "nand_probe",
++ .name = "tx27-nand",
++ .parts = tx27_nand_partitions,
++ .nr_parts = ARRAY_SIZE(tx27_nand_partitions),
++ .width = 1,
++};
++#else
++static struct mxc_nand_platform_data tx27_nand_data = {
++ .hw_ecc = 1,
++ .width = 1,
++};
++#endif
++
++static struct resource tx27_nand_resources[] = {
++ {
++ .start = NFC_BASE_ADDR,
++ .end = NFC_BASE_ADDR + 0xfff,
++ .flags = IORESOURCE_MEM
++ }, {
++ .start = MXC_INT_NANDFC,
++ .end = MXC_INT_NANDFC,
++ .flags = IORESOURCE_IRQ
++ },
++};
++
++static struct platform_device tx27_nand_mtd_device = {
++ .name = "mxc_nand",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(tx27_nand_resources),
++ .resource = tx27_nand_resources,
++ .dev = {
++ .platform_data = &tx27_nand_data,
++ },
++};
++#endif
++
++#if defined(CONFIG_FB_IMX) || defined(CONFIG_FB_IMX_MODULE)
++/*
++ * Setup GPIO for LCDC device to be active
++ *
++ */
++static unsigned int mx27_lcdc_gpios[] = {
++ MXC_PIN(A, 30, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA30 */
++ MXC_PIN(A, 25, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA25 */
++ MXC_PIN(A, 26, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA26 */
++ MXC_PIN(A, 24, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA24 */
++ MXC_PIN(A, 27, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA27 */
++ PA5_PF_LSCLK,
++ PA6_PF_LD0,
++ PA7_PF_LD1,
++ PA8_PF_LD2,
++ PA9_PF_LD3,
++ PA10_PF_LD4,
++ PA11_PF_LD5,
++ PA12_PF_LD6,
++ PA13_PF_LD7,
++ PA14_PF_LD8,
++ PA15_PF_LD9,
++ PA16_PF_LD10,
++ PA17_PF_LD11,
++ PA18_PF_LD12,
++ PA19_PF_LD13,
++ PA20_PF_LD14,
++ PA21_PF_LD15,
++ PA22_PF_LD16,
++ PA23_PF_LD17,
++ PA28_PF_HSYNC,
++ PA29_PF_VSYNC,
++ PA31_PF_OE_ACD,
++};
++
++static int tx27_gpio_lcdc_active(struct platform_device *dev)
++{
++ int ret;
++
++ DBG(0, "%s: Setting up GPIO pins for LCD\n", __FUNCTION__);
++ ret = mxc_gpio_setup_multiple_pins(mx27_lcdc_gpios,
++ ARRAY_SIZE(mx27_lcdc_gpios), "LCD");
++ if (ret) {
++ DBG(0, "%s: Failed to setup GPIO pins for LCD: %d\n",
++ __FUNCTION__, ret);
++ return ret;
++ }
++ return 0;
++}
++
++/*
++ * Setup GPIO for LCDC device to be inactive
++ *
++ */
++static int tx27_gpio_lcdc_inactive(struct platform_device *dev)
++{
++ mxc_gpio_release_multiple_pins(mx27_lcdc_gpios,
++ ARRAY_SIZE(mx27_lcdc_gpios));
++ return 0;
++}
++
++static struct imx_fb_platform_data tx27_fb_data[] __initdata = {
++ [0] = {
++ //.fb_mode = "Xenarc_700_Y-16",
++ .init = tx27_gpio_lcdc_active,
++ .exit = tx27_gpio_lcdc_inactive,
++ .lcd_power = NULL,
++ .backlight_power = NULL,
++
++ .pixclock = 34576,
++ .xres = 640,
++ .yres = 480,
++
++ .bpp = 16,
++
++ .hsync_len = 64,
++ .right_margin = 138 + 1,
++ .left_margin = 118 + 3,
++
++ .vsync_len = 7,
++ .upper_margin = 44,
++ .lower_margin = 44,
++#if 0
++ /* currently not used by driver! */
++ .sync = ((0*FB_SYNC_HOR_HIGH_ACT) |
++ (0*FB_SYNC_VERT_HIGH_ACT) |
++ (1*FB_SYNC_OE_ACT_HIGH)),
++#else
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 |
++ PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL | PCR_SCLK_SEL,
++ .dmacr = 0x80040060,
++#endif
++ .cmap_greyscale = 0,
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++
++ .fixed_screen_cpu = NULL,
++ },
++ [1] = {
++ //.fb_mode = "SHARP LQ10D42-16",
++ .init = tx27_gpio_lcdc_active,
++ .exit = tx27_gpio_lcdc_inactive,
++ .lcd_power = NULL,
++ .backlight_power = NULL,
++
++ .pixclock = 34576,
++ .xres = 640,
++ .yres = 480,
++
++#ifdef USE_18BPP
++ .bpp = 32,
++#else
++ .bpp = 16,
++#endif
++ .hsync_len = 64,
++ .right_margin = 138 + 1,
++ .left_margin = 118 + 3,
++
++ .vsync_len = 7,
++ .upper_margin = 28,
++ .lower_margin = 60,
++#if 0
++ /* currently not used by driver! */
++ .sync = ((0*FB_SYNC_HOR_HIGH_ACT) |
++ (0*FB_SYNC_VERT_HIGH_ACT) |
++ (1*FB_SYNC_OE_ACT_HIGH)),
++#else
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 |
++#ifdef USE_18BPP
++ PCR_BPIX_18 | PCR_END_SEL | PCR_FLMPOL | PCR_LPPOL | PCR_SCLK_SEL,
++#else
++ PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL | PCR_SCLK_SEL,
++#endif
++ .dmacr = 0x80040060,
++#endif
++ .cmap_greyscale = 0,
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++
++ .fixed_screen_cpu = NULL,
++ },
++ [2] = {
++ //.fb_mode = "SHARP LQ104V1DG61-16",
++ .init = tx27_gpio_lcdc_active,
++ .exit = tx27_gpio_lcdc_inactive,
++ .lcd_power = NULL,
++ .backlight_power = NULL,
++
++ .pixclock = 40000,
++ .xres = 640,
++ .yres = 480,
++
++#ifdef USE_18BPP
++ .bpp = 32,
++#else
++ .bpp = 16,
++#endif
++ .hsync_len = 32,
++ .right_margin = 32 + 1,
++ .left_margin = 0 + 3,
++
++ .vsync_len = 35,
++ .upper_margin = 0,
++ .lower_margin = 0,
++#if 0
++ /* currently not used by driver! */
++ .sync = ((0*FB_SYNC_HOR_HIGH_ACT) |
++ (0*FB_SYNC_VERT_HIGH_ACT) |
++ (1*FB_SYNC_OE_ACT_HIGH)),
++#else
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 |
++#ifdef USE_18BPP
++ PCR_BPIX_18 | PCR_END_SEL | PCR_FLMPOL | PCR_LPPOL | PCR_SCLK_SEL,
++#else
++ PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL | PCR_CLKPOL | PCR_SCLK_SEL,
++#endif
++ .dmacr = 0x80040060,
++#endif
++ .cmap_greyscale = 0,
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++
++ .fixed_screen_cpu = NULL,
++ },
++};
++
++int __init karo_tx27_fb_init(void)
++{
++ int ret;
++
++ ret = mxc_register_device(&mxc_fb_device, &tx27_fb_data[0]);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to register FB device: %d\n", __FUNCTION__, ret);
++ }
++ return ret;
++}
++device_initcall(karo_tx27_fb_init);
++#endif
++
++#if defined(CONFIG_MMC_MXC) || defined(CONFIG_MMC_MXC_MODULE)
++/*!
++ * Resource definition for the SDHC1
++ */
++static struct resource tx27_sdhc1_resources[] = {
++ {
++ .start = SDHC1_BASE_ADDR,
++ .end = SDHC1_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = MXC_INT_SDHC1,
++ .end = MXC_INT_SDHC1,
++ .flags = IORESOURCE_IRQ,
++ },
++ {
++ .start = IRQ_GPIOC(21),
++ .end = IRQ_GPIOC(21),
++ .flags = IORESOURCE_IRQ,
++ },
++ {
++ .name = "sdhc1",
++ .start = DMA_REQ_SDHC1,
++ .end = DMA_REQ_SDHC1,
++ .flags = IORESOURCE_DMA
++ },
++};
++
++/*!
++ * Resource definition for the SDHC2
++ */
++static struct resource tx27_sdhc2_resources[] = {
++ {
++ .start = SDHC2_BASE_ADDR,
++ .end = SDHC2_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = MXC_INT_SDHC2,
++ .end = MXC_INT_SDHC2,
++ .flags = IORESOURCE_IRQ,
++ },
++ {
++ .start = IRQ_GPIOC(22),
++ .end = IRQ_GPIOC(22),
++ .flags = IORESOURCE_IRQ,
++ },
++ {
++ .name = "sdhc2",
++ .start = DMA_REQ_SDHC2,
++ .end = DMA_REQ_SDHC2,
++ .flags = IORESOURCE_DMA
++ },
++};
++static inline int tx27_mmc_get_irq(int id)
++{
++ int irq;
++
++ switch (id) {
++ case 0:
++ irq = tx27_sdhc1_resources[2].start;
++ break;
++ case 1:
++ irq = tx27_sdhc2_resources[2].start;
++ break;
++ default:
++ BUG();
++ }
++ return irq;
++}
++
++static const char *tx27_mmc_irqdesc[] = {
++ "MMC card 0 detect",
++ "MMC card 1 detect",
++};
++
++static int tx27_mmc_init(struct device *dev, irqreturn_t (*mmc_detect_irq)(int, void *),
++ void *data)
++{
++ int err;
++ int id = to_platform_device(dev)->id;
++ struct mmc_host *host = data;
++ int irq = tx27_mmc_get_irq(id);
++
++ err = gpio_sdhc_active(id);
++ if (err) {
++ return err;
++ }
++
++ host->caps |= MMC_CAP_4_BIT_DATA;
++
++ err = request_irq(irq, mmc_detect_irq,
++ IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
++ tx27_mmc_irqdesc[id], data);
++ if (err) {
++ printk(KERN_ERR "%s: MMC/SD: can't request MMC card detect IRQ %d\n",
++ __FUNCTION__, irq);
++ return err;
++ }
++ device_set_wakeup_capable(dev, 1);
++
++ return 0;
++}
++
++static void tx27_mmc_exit(struct device *dev, void *data)
++{
++ int id = to_platform_device(dev)->id;
++ int irq = tx27_mmc_get_irq(id);
++
++ free_irq(irq, data);
++ gpio_sdhc_inactive(id);
++}
++
++static int tx27_mmc_suspend(struct device *dev, pm_message_t state)
++{
++ int id = to_platform_device(dev)->id;
++ int irq = tx27_mmc_get_irq(id);
++
++ if (device_may_wakeup(dev)) {
++ DBG(0, "%s: Enabling IRQ %d wakeup\n", __FUNCTION__, irq);
++ return enable_irq_wake(irq);
++ }
++ return 0;
++}
++
++static int tx27_mmc_resume(struct device *dev)
++{
++ int id = to_platform_device(dev)->id;
++ int irq = tx27_mmc_get_irq(id);
++
++ if (device_may_wakeup(dev)) {
++ DBG(0, "%s: Disabling IRQ %d wakeup\n", __FUNCTION__, irq);
++ return disable_irq_wake(irq);
++ }
++ return 0;
++}
++
++static struct imxmmc_platform_data tx27_sdhc1_data = {
++ //.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
++ //.min_clk = 150000,
++ //.max_clk = 25000000,
++ //.detect_delay = 20,
++ .init = tx27_mmc_init,
++ .exit = tx27_mmc_exit,
++ .suspend = tx27_mmc_suspend,
++ .resume = tx27_mmc_resume,
++};
++
++static struct imxmmc_platform_data tx27_sdhc2_data = {
++ //.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
++ //.min_clk = 150000,
++ //.max_clk = 25000000,
++ //.detect_delay = 20,
++ .init = tx27_mmc_init,
++ .exit = tx27_mmc_exit,
++};
++
++static struct platform_device tx27_sdhc1_device = {
++ .name = "imx-mmc",
++ .id = 0,
++ .dev = {
++ .platform_data = &tx27_sdhc1_data,
++ },
++ .num_resources = ARRAY_SIZE(tx27_sdhc1_resources),
++ .resource = tx27_sdhc1_resources,
++};
++
++/*! Device Definition for MXC SDHC2 */
++static struct platform_device tx27_sdhc2_device = {
++ .name = "imx-mmc",
++ .id = 1,
++ .dev = {
++ .platform_data = &tx27_sdhc2_data,
++ },
++ .num_resources = ARRAY_SIZE(tx27_sdhc2_resources),
++ .resource = tx27_sdhc2_resources,
++};
++#endif
++
++#if defined(CONFIG_SPI_MXC) || defined(CONFIG_SPI_MXC_MODULE)
++static struct resource mxcspi1_resources[] = {
++ [0] = {
++ .start = CSPI1_BASE_ADDR,
++ .end = CSPI1_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_CSPI1,
++ .end = MXC_INT_CSPI1,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct mxc_spi_master mxcspi1_data = {
++ .maxchipselect = 2,
++ .spi_version = 0,
++};
++
++static struct platform_device mxcspi1_device = {
++ .name = "mxc_spi",
++ .id = 0,
++ .dev = {
++ .platform_data = &mxcspi1_data,
++ },
++ .num_resources = ARRAY_SIZE(mxcspi1_resources),
++ .resource = mxcspi1_resources,
++};
++#endif // defined(CONFIG_SPI_MXC) || defined(CONFIG_SPI_MXC_MODULE)
++
++#if defined(CONFIG_AC97_BUS) || defined(CONFIG_AC97_BUS_MODULE)
++static u64 tx27_dma_mask = ~0UL;
++
++static void tx27_ac97_gpio_release(void)
++{
++ gpio_ac97_inactive();
++}
++
++static int tx27_ac97_init(struct platform_device *dev)
++{
++ int ret;
++
++ DBG(0, "%s: \n", __FUNCTION__);
++ ret = gpio_ac97_active();
++ if (ret) {
++
++ return ret;
++ }
++ return 0;
++}
++
++static void tx27_ac97_exit(struct platform_device *dev)
++{
++ DBG(0, "%s: Releasing AC97 GPIO pins\n", __FUNCTION__);
++ tx27_ac97_gpio_release();
++}
++
++static struct mxc_ac97_audio_ops tx27_ac97_ops = {
++ .init = tx27_ac97_init,
++ .exit = tx27_ac97_exit,
++ .startup = NULL,
++ .shutdown = NULL,
++ .suspend = NULL,
++ .resume = NULL,
++ .priv = NULL,
++};
++
++static struct platform_device ac97_device = {
++ .name = "mx27-ac97",
++ .id = -1,
++ .dev = {
++ .dma_mask = &tx27_dma_mask,
++ .coherent_dma_mask = ~0UL,
++ .platform_data = &tx27_ac97_ops,
++ },
++};
++#endif
++
++#if defined(CONFIG_RTC_DRV_DS13XX) || defined(CONFIG_RTC_DRV_DS13XX_MODULE)
++static struct ds13xx_platform_data tx27_ds1339_data = {
++ .type = ds_1339,
++ .ctrl = 1 << 2, /* set INTCN to disable SQW output */
++ .trc = DS1339_TRC_ENABLE | DS1339_DIODE_ENABLE | DS1339_TRC_250R,
++};
++
++static struct platform_device tx27_ds1339_device = {
++ .name = "rtc-ds13xx",
++ .dev = {
++ .platform_data = &tx27_ds1339_data,
++ },
++};
++#endif
++
++#if defined(CONFIG_VIDEO_MXC_EMMA_OUTPUT) || defined(CONFIG_VIDEO_MXC_EMMA_OUTPUT_MODULE)
++static u64 mxc_emma_dmamask = 0xffffffffUL;
++
++static struct platform_device tx27_v4l2out_device = {
++ .name = "MXC Video Output",
++ .id = 0,
++ .dev = {
++ .dma_mask = &mxc_emma_dmamask,
++ .coherent_dma_mask = ~0UL,
++ },
++};
++#endif
++
++#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
++static int mxc_i2c0_pins[] = {
++ /*
++ * it seems the data line misses a pullup, so we must enable
++ * the internal pullup as a local workaround
++ */
++ PD17_PF_I2C_DATA,
++ PD18_PF_I2C_CLK,
++};
++
++static int karo_tx27_i2c_0_init(struct platform_device *pdev)
++{
++ return mxc_gpio_setup_multiple_pins(mxc_i2c0_pins,
++ ARRAY_SIZE(mxc_i2c0_pins), "I2C0");
++}
++
++static int karo_tx27_i2c_0_exit(struct platform_device *pdev)
++{
++ mxc_gpio_release_multiple_pins(mxc_i2c0_pins,
++ ARRAY_SIZE(mxc_i2c0_pins));
++
++ return 0;
++}
++
++static struct imx_i2c_platform_data karo_tx27_i2c_0_data = {
++ .max_clk = 100000,
++ .init = karo_tx27_i2c_0_init,
++ .exit = karo_tx27_i2c_0_exit,
++};
++
++#if defined(CONFIG_RTC_DRV_DS13XX) || defined(CONFIG_RTC_DRV_DS13XX_MODULE)
++static struct ds13xx_platform_data karo_ds1339_data = {
++ .type = ds_1339,
++ .ctrl = 0,
++ .trc = DS1339_TRC_ENABLE | DS1339_DIODE_ENABLE | DS1339_TRC_250R,
++};
++#endif
++
++static struct at24_platform_data karo_tx27_eeprom = {
++ .byte_len = 2048,
++ .page_size = 32,
++ .flags = AT24_FLAG_ADDR16 | AT24_FLAG_TAKE8ADDR,
++};
++
++static struct i2c_board_info karo_i2c_0_boardinfo[] __initdata = {
++ {
++ I2C_BOARD_INFO("24c16", 0x50),
++ .platform_data = &karo_tx27_eeprom,
++ .type = "24c16",
++ },
++#if defined(CONFIG_RTC_DRV_DS13XX) || defined(CONFIG_RTC_DRV_DS13XX_MODULE)
++ {
++ I2C_BOARD_INFO("ds1339", 0x68/*DS1339_CHIP_ID*/),
++ .type = "ds1339",
++ .platform_data = &karo_ds1339_data,
++ },
++#endif
++#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
++ {
++ I2C_BOARD_INFO("ds1339", 0x68/*DS1339_CHIP_ID*/),
++ .type = "ds1339",
++ //.platform_data = &karo_ds1339_data,
++ },
++#endif
++};
++
++static int mxc_i2c_1_pins[] = {
++ /*
++ * it seems the data line misses a pullup, so we must enable
++ * the internal pullup as a local workaround
++ */
++ PC5_PF_I2C2_SDA,
++ PC6_PF_I2C2_SCL,
++};
++
++static int karo_tx27_i2c_1_init(struct platform_device *pdev)
++{
++ return mxc_gpio_setup_multiple_pins(mxc_i2c_1_pins,
++ ARRAY_SIZE(mxc_i2c_1_pins), "I2C_1");
++}
++
++static int karo_tx27_i2c_1_exit(struct platform_device *pdev)
++{
++ mxc_gpio_release_multiple_pins(mxc_i2c_1_pins,
++ ARRAY_SIZE(mxc_i2c_1_pins));
++
++ return 0;
++}
++
++static struct imx_i2c_platform_data karo_tx27_i2c_1_data = {
++ .max_clk = 100000,
++ .init = karo_tx27_i2c_1_init,
++ .exit = karo_tx27_i2c_1_exit,
++};
++
++static struct i2c_board_info karo_i2c_1_boardinfo[] __initdata = {
++ {
++ I2C_BOARD_INFO("lp3972", 0x34),
++ .type = "lp3972",
++ },
++};
++
++int __init karo_i2c_init(void)
++{
++ int ret;
++
++ DBG(0, "%s: Registering I2C bus 0\n", __FUNCTION__);
++ ret = mxc_register_device(&imx_i2c_device0, &karo_tx27_i2c_0_data);
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to register I2C device: %d\n", ret);
++ return ret;
++ }
++ ret = i2c_register_board_info(0, karo_i2c_0_boardinfo,
++ ARRAY_SIZE(karo_i2c_0_boardinfo));
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to register I2C board info: %d\n", ret);
++ platform_device_unregister(&imx_i2c_device0);
++ }
++
++ DBG(0, "%s: Registering I2C bus 1\n", __FUNCTION__);
++ ret = mxc_register_device(&imx_i2c_device1, &karo_tx27_i2c_1_data);
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to register I2C device: %d\n", ret);
++ return ret;
++ }
++ ret = i2c_register_board_info(1, karo_i2c_1_boardinfo,
++ ARRAY_SIZE(karo_i2c_1_boardinfo));
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to register I2C board info: %d\n", ret);
++ platform_device_unregister(&imx_i2c_device1);
++ }
++ return ret;
++}
++device_initcall(karo_i2c_init);
++#endif
++
++struct platform_dev_list {
++ struct platform_device *pdev;
++ int flag;
++} tx27_devices[] __initdata = {
++#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
++ { .pdev = &tx27_gpio_keys_device, .flag = -1, },
++#endif
++#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
++ { .pdev = &tx27_led_device, .flag = -1, },
++#endif
++#if defined(CONFIG_RTC_MXC) || defined(CONFIG_RTC_MXC_MODULE)
++ { .pdev = &mxc_rtc_device, .flag = -1, },
++#endif
++#if defined(CONFIG_MTD_NAND_MXC) || defined(CONFIG_MTD_NAND_MXC_MODULE)
++ { .pdev = &tx27_nand_mtd_device, .flag = 1, },
++#endif
++#if defined(CONFIG_KEYBOARD_MXC) || defined(CONFIG_KEYBOARD_MXC_MODULE)
++ { .pdev = &tx27_keypad_device, .flag = 1, },
++#endif
++#if defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE)
++ { .pdev = &fec_device, .flag = 1, },
++#endif
++#if defined(CONFIG_SPI_MXC) || defined(CONFIG_SPI_MXC_MODULE)
++ { .pdev = &mxcspi1_device, .flag = 1, },
++#endif
++#if defined(CONFIG_AC97_BUS) || defined(CONFIG_AC97_BUS_MODULE)
++ { .pdev = &ac97_device, .flag = 1, },
++#endif
++#if defined(CONFIG_MMC_MXC) || defined(CONFIG_MMC_MXC_MODULE)
++ { .pdev = &tx27_sdhc1_device, .flag = 1, },
++ { .pdev = &tx27_sdhc2_device, .flag = 1, },
++#endif
++#if defined(CONFIG_RTC_DRV_DS13XX) || defined(CONFIG_RTC_DRV_DS13XX_MODULE)
++ { .pdev = &tx27_ds1339_device, .flag = 1, },
++#endif
++#if defined(CONFIG_VIDEO_MXC_EMMA_OUTPUT) || defined(CONFIG_VIDEO_MXC_EMMA_OUTPUT_MODULE)
++ { .pdev = &tx27_v4l2out_device, .flag = 1, },
++#endif
++#if defined(CONFIG_MXC_VPU) || defined(CONFIG_MXC_VPU_MODULE)
++ { .pdev = &mxc_vpu_device, .flag = 1, },
++#endif
++};
++#define TX27_NUM_DEVICES ARRAY_SIZE(tx27_devices)
++
++#define OSC26M_ENABLE_PIN (GPIO_PORTB | 22)
++
++static int _clk_26m_enable(struct clk *clk)
++{
++ int ret;
++
++ DBG(0, "%s: Switching 26MHz oscillator on\n", __FUNCTION__);
++ ret = gpio_request(OSC26M_ENABLE_PIN, "OSC26m");
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to request 26MHz oscillator enable GPIO: %d\n", ret);
++ return ret;
++ }
++ gpio_set_value(OSC26M_ENABLE_PIN, 1);
++ mxc_gpio_mode(OSC26M_ENABLE_PIN | GPIO_GPIO | GPIO_OUT);
++ return 0;
++}
++
++static void _clk_26m_disable(struct clk *clk)
++{
++ DBG(0, "%s: Switching 26MHz oscillator off\n", __FUNCTION__);
++ gpio_set_value(OSC26M_ENABLE_PIN, 0);
++ gpio_free(OSC26M_ENABLE_PIN);
++}
++
++static struct clk clk_26m = {
++ .name = "clk_26m",
++ .enable = _clk_26m_enable,
++ .disable = _clk_26m_disable,
++};
++
++#ifdef CONFIG_BASE_CLK_26MHz
++static __init void karo_tx27_clock_switch(struct clk *_26m_clk)
++{
++ int loops = 0;
++ u32 cscr = __raw_readl(CCM_CSCR);
++ u32 ccsr;
++
++ if (_26m_clk != NULL) {
++ DBG(0, "%s: Enabling 26MHz clock\n", __FUNCTION__);
++ clk_enable(_26m_clk);
++
++ __raw_writel(CCM_MPCTL0_PD_VAL(0) |
++ CCM_MPCTL0_MFD_VAL(51) |
++ CCM_MPCTL0_MFI_VAL(7) |
++ CCM_MPCTL0_MFN_VAL(35), CCM_MPCTL0);
++
++ __raw_writel(CCM_SPCTL0_PD_VAL(1) |
++ CCM_SPCTL0_MFD_VAL(12) |
++ CCM_SPCTL0_MFI_VAL(9) |
++ CCM_SPCTL0_MFN_VAL(3), CCM_SPCTL0);
++
++ cscr |= CCM_CSCR_MCU | CCM_CSCR_SP;
++ __raw_writel(cscr, CCM_CSCR);
++
++ cscr |= CCM_CSCR_MPLLRES | CCM_CSCR_SPLLRES;
++ __raw_writel(cscr, CCM_CSCR);
++ while (__raw_readl(CCM_CSCR) & (CCM_CSCR_MPLLRES | CCM_CSCR_SPLLRES)) {
++ udelay(1);
++ loops++;
++ }
++ printk("PLLs locked after %d loops: CSCR=%08x(%08x)\n", loops,
++ __raw_readl(CCM_CSCR), cscr);
++
++ cscr &= ~CCM_CSCR_FPM;
++ __raw_writel(cscr, CCM_CSCR);
++ DBG(9, "%s: Disabling FPM, DPLL and OSC26M\n", __FUNCTION__);
++ ccsr = __raw_readl(CCM_CCSR);
++ __raw_writel(ccsr & ~0x300, CCM_CCSR);
++ DBG(9, "changing CCSR from %08x to %08x(%08x)\n",
++ ccsr, ccsr & ~0x300, __raw_readl(CCM_CCSR));
++ } else {
++ printk(KERN_INFO "Changing SPCTL0 from %08x to %08x\n",
++ __raw_readl(CCM_SPCTL0), CCM_SPCTL0_PD_VAL(2) |
++ CCM_SPCTL0_MFD_VAL(755) |
++ CCM_SPCTL0_MFI_VAL(11) |
++ CCM_SPCTL0_MFN_VAL(-205));
++
++ __raw_writel(CCM_SPCTL0_PD_VAL(2) |
++ CCM_SPCTL0_MFD_VAL(755) |
++ CCM_SPCTL0_MFI_VAL(11) |
++ CCM_SPCTL0_MFN_VAL(-205), CCM_SPCTL0);
++ }
++}
++#else
++static inline void karo_tx27_clock_switch(struct clk *_26m_clk)
++{
++ printk(KERN_INFO "Changing SPCTL0 from %08x to %08x\n",
++ __raw_readl(CCM_SPCTL0), CCM_SPCTL0_PD_VAL(2) |
++ CCM_SPCTL0_MFD_VAL(755) |
++ CCM_SPCTL0_MFI_VAL(11) |
++ CCM_SPCTL0_MFN_VAL(-205));
++
++ __raw_writel(CCM_SPCTL0_PD_VAL(2) |
++ CCM_SPCTL0_MFD_VAL(755) |
++ CCM_SPCTL0_MFI_VAL(11) |
++ CCM_SPCTL0_MFN_VAL(-205), CCM_SPCTL0);
++}
++#endif
++
++static __init void karo_tx27_clock_init(void)
++{
++ struct clk *cpu_clk;
++ struct clk *_26m_clk = NULL;
++ int ret;
++
++ ret = clk_register(&clk_26m);
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to register 26MHz clock: %d\n", ret);
++ goto no_26m;
++ }
++ _26m_clk = clk_get(NULL, "clk_26m");
++ if (IS_ERR(_26m_clk)) {
++ printk(KERN_ERR "Cannot request 26MHz clock: %ld\n", PTR_ERR(_26m_clk));
++ _26m_clk = NULL;
++ }
++ no_26m:
++ karo_tx27_clock_switch(_26m_clk);
++ mxc_clocks_init(26000000);
++ cpu_clk = clk_get(NULL, "cpu_clk");
++ if (!IS_ERR(cpu_clk)) {
++ printk(KERN_DEBUG "%s: Setting CPU clock to 400MHz\n", __FUNCTION__);
++ if (clk_set_rate(cpu_clk, 399000000) != 0) {
++ printk(KERN_ERR "Failed to set CPU clock rate\n");
++ }
++ } else {
++ printk(KERN_ERR "Failed to get CPU clock: %ld\n",
++ PTR_ERR(cpu_clk));
++ }
++ SHOW_REG(CCM_CSCR);
++}
++
++static __init void karo_tx27_board_init(void)
++{
++ int i;
++
++ DBG(0, "%s: \n", __FUNCTION__);
++ SHOW_REG(CCM_CSCR);
++
++ for (i = 0; i < ARRAY_SIZE(tx27_uart_devices); i++) {
++ int ret;
++ int port = tx27_uart_devices[i]->id;
++
++ DBG(0, "%s: Registering platform device[%d] @ %p dev %p: %s\n",
++ __FUNCTION__, i, tx27_uart_devices[i],
++ &tx27_uart_devices[i]->dev, tx27_uart_devices[i]->name);
++ ret = mxc_register_device(tx27_uart_devices[i],
++ &tx27_uart_ports[port]);
++ if (ret != 0) {
++ printk(KERN_WARNING "%s: Failed to register platform_device[%d]: %s: %d\n",
++ __FUNCTION__, i, tx27_uart_devices[i]->name, ret);
++ }
++ }
++ //mxc_cpu_common_init();
++ //karo_tx27_clock_init();
++ //early_console_setup(saved_command_line);
++
++ /* configure PF13 as output for Starterkit-5 LED */
++ //mxc_gpio_mode(MXC_PIN(F, 13, GPIO, GPIO_OUT | GPIO_DFLT_LOW));
++ dump_regs();
++
++ /* enable SSI3_INT (PC23) for IRQ probing */
++ set_irq_flags(gpio_to_irq(GPIO_PORTC | 23), IRQF_VALID | IRQF_PROBE);
++
++ for (i = 0; i < TX27_NUM_DEVICES; i++) {
++ int ret;
++
++ if (tx27_devices[i].pdev == NULL) continue;
++ if (!tx27_devices[i].flag) {
++ DBG(0, "%s: Skipping platform device[%d] @ %p dev %p: %s\n",
++ __FUNCTION__, i, tx27_devices[i].pdev, &tx27_devices[i].pdev->dev,
++ tx27_devices[i].pdev->name);
++ continue;
++ }
++ DBG(0, "%s: Registering platform device[%d] @ %p dev %p: %s\n",
++ __FUNCTION__, i, tx27_devices[i].pdev, &tx27_devices[i].pdev->dev,
++ tx27_devices[i].pdev->name);
++ ret = platform_device_register(tx27_devices[i].pdev);
++ if (ret) {
++ printk(KERN_WARNING "%s: Failed to register platform_device[%d]: %s: %d\n",
++ __FUNCTION__, i, tx27_devices[i].pdev->name, ret);
++ }
++ }
++ DBG(0, "%s: Done\n", __FUNCTION__);
++}
++
++static void __init karo_tx27_map_io(void)
++{
++ mxc_map_io();
++}
++
++static void __init karo_tx27_fixup(struct machine_desc *desc, struct tag *tags,
++ char **cmdline, struct meminfo *mi)
++{
++}
++
++static void __init karo_tx27_timer_init(void)
++{
++ DBG(0, "%s: \n", __FUNCTION__);
++ karo_tx27_clock_init();
++ mxc_timer_init("gpt_clk.0");
++ DBG(0, "%s: Done\n", __FUNCTION__);
++}
++
++struct sys_timer karo_tx27_timer = {
++ .init = karo_tx27_timer_init,
++};
++
++MACHINE_START(TX27, "Ka-Ro electronics TX27 module (Freescale i.MX27)")
++ /* Maintainer: <LW@KARO-electronics.de> */
++ .phys_io = AIPI_BASE_ADDR,
++ .io_pg_offst = ((unsigned long)AIPI_BASE_ADDR_VIRT >> 18) & 0xfffc,
++ .fixup = karo_tx27_fixup,
++ .map_io = karo_tx27_map_io,
++ .init_irq = mxc_init_irq,
++ .init_machine = karo_tx27_board_init,
++ .timer = &karo_tx27_timer,
++MACHINE_END
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/karo.h linux-2.6.28-karo/arch/arm/mach-mx2/karo.h
+--- linux-2.6.28/arch/arm/mach-mx2/karo.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/karo.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,45 @@
++#ifdef DEBUG
++#include <mach/iomux.h>
++
++#define SHOW_REG(reg) DBG(0, "%s[%08lx]=%08x\n", #reg, MXC_PHYS_ADDRESS(reg), __raw_readl(reg))
++#define SHOW_GPIO_REG(reg, port) \
++ DBG(0, "PT%c_%s[%08lx]=%08x\n", 'A' + port, #reg, \
++ GPIO_BASE_ADDR + MXC_##reg(port), __raw_readl(VA_GPIO_BASE + MXC_##reg(port)))
++
++static void dump_regs(void)
++{
++ int i;
++
++ SHOW_REG(CCM_CSCR);
++ SHOW_REG(CCM_MPCTL0);
++ SHOW_REG(CCM_MPCTL1);
++ SHOW_REG(CCM_SPCTL0);
++ SHOW_REG(CCM_SPCTL1);
++ SHOW_REG(CCM_OSC26MCTL);
++ SHOW_REG(CCM_PCDR0);
++ SHOW_REG(CCM_PCDR1);
++ SHOW_REG(CCM_PCCR0);
++ SHOW_REG(CCM_PCCR1);
++ SHOW_REG(CCM_CCSR);
++ SHOW_REG(CCM_PMCTL);
++ SHOW_REG(CCM_PMCOUNT);
++ SHOW_REG(CCM_WKGDCTL);
++ for (i = 0; i < 6; i++) {
++ SHOW_GPIO_REG(GIUS, i);
++ SHOW_GPIO_REG(DDIR, i);
++ SHOW_GPIO_REG(SSR, i);
++ SHOW_GPIO_REG(GPR, i);
++ SHOW_GPIO_REG(OCR1, i);
++ SHOW_GPIO_REG(OCR2, i);
++ SHOW_GPIO_REG(ICONFA1, i);
++ SHOW_GPIO_REG(ICONFA2, i);
++ SHOW_GPIO_REG(ICONFB1, i);
++ SHOW_GPIO_REG(ICONFB2, i);
++ }
++}
++#else
++static inline void dump_regs(void)
++{
++}
++#define SHOW_REG(reg) do {} while (0)
++#endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/mxc_pm.c linux-2.6.28-karo/arch/arm/mach-mx2/mxc_pm.c
+--- linux-2.6.28/arch/arm/mach-mx2/mxc_pm.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/mxc_pm.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,460 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @defgroup DPM_MX27 Power Management
++ * @ingroup MSL_MX27
++ */
++/*!
++ * @file mach-mx27/mxc_pm.c
++ *
++ * @brief This file contains the implementation of the Low-level power
++ * management driver. It modifies the registers of the PLL and clock module
++ * of the i.MX27.
++ *
++ * @ingroup DPM_MX27
++ */
++
++/*
++ * Include Files
++ */
++#include <linux/module.h>
++#include <linux/interrupt.h>
++#include <linux/delay.h>
++#include <asm/irq.h>
++#include <mach/mxc_pm.h>
++#include <mach/mxc.h>
++#include <mach/system.h>
++#include <asm/io.h>
++
++#include "crm_regs.h"
++
++/* Local defines */
++#define MAX_ARM_FREQ 400000000
++#define MAX_AHB_FREQ 133000000
++#define MAX_IPG_FREQ 66500000
++#define FREQ_COMP_TOLERANCE 100 /* tolerance percentage times 100 */
++#define MX27_LLPM_DEBUG 0
++
++/*
++ * Global variables
++ */
++#if 0
++/*!
++ * These variables hold the various clock values when the module is loaded.
++ * This is needed because these clocks are derived from MPLL and when MPLL
++ * output changes, these clocks need to be adjusted.
++ */
++static u32 perclk1, perclk2, perclk3, perclk4, nfcclk, cpuclk;
++
++/*!
++ * Compare two frequences using allowable tolerance
++ *
++ * The MX27 PLL can generate many frequencies. This function
++ * compares the generated frequency to the requested frequency
++ * and determines it they are within and acceptable tolerance.
++ *
++ * @param freq1 desired frequency
++ * @param freq2 generated frequency
++ *
++ * @return Returns 0 is frequencies are within talerance
++ * and non-zero is they are not.
++ */
++static s32 freq_equal(u32 freq1, u32 freq2)
++{
++ if (freq1 > freq2) {
++ return (freq1 - freq2) <= (freq1 / FREQ_COMP_TOLERANCE);
++ }
++ return (freq2 - freq1) <= (freq1 / FREQ_COMP_TOLERANCE);
++}
++
++/*!
++ * Select the PLL frequency based on the desired ARM frequency.
++ *
++ * The MPLL will be configured to output three frequencies, 400/333/266 MHz.
++ *
++ * @param armfreq Desired ARM frequency
++ *
++ * @return Returns one of the selected PLL frequency (400/333/266 MHz).
++ * Returns -1 on error.
++ *
++ */
++static s32 select_freq_pll(u32 armfreq)
++{
++ u32 div;
++
++ div = 266000000 / armfreq;
++ if ((div == 0) || (!freq_equal(armfreq, 266000000 / div))) {
++ div = 400000000 / armfreq;
++ if ((div == 0) || (!freq_equal(armfreq, 400000000 / div))) {
++ return -1;
++ }
++
++ return 400000000;
++ }
++
++ return 266000000;
++}
++
++/*!
++ * Check whether the desired ARM and AHB frequencies are valid.
++ *
++ * @param armfreq Desired ARM frequency
++ * @param ahbfreq Desired AHB frequency
++ *
++ * @return Returns 0 on success
++ * Return -1 on error
++ */
++static s32 mx27_pm_check_parameters(u32 armfreq, u32 ahbfreq)
++{
++ u32 ahbdiv;
++
++ /* No idea about minimum frequencies.. just a guess! */
++ if ((armfreq < 1000000) || (ahbfreq < 1000000)) {
++ printk("arm or ahb freq. too low\n");
++ return -1;
++ }
++
++ if ((armfreq > MAX_ARM_FREQ) || (ahbfreq > MAX_AHB_FREQ)) {
++ printk("arm or ahb freq. too high\n");
++ return -1;
++ }
++
++ /* AHB divider value is restricted to less than 8 */
++ ahbdiv = armfreq / ahbfreq;
++ if ((ahbdiv == 0) || (ahbdiv > 8)) {
++ printk("Invalid ahb frequency\n");
++ return -1;
++ }
++
++ return 0;
++}
++
++/*!
++ * Integer clock scaling
++ *
++ * Change the main ARM clock frequencies without changing the MPLL.
++ * The integer dividers (PRESC and BCLKDIV) are changed to obtain the
++ * desired frequency. Since NFC clock is derived from ARM frequency,
++ * NFCDIV is also adjusted.
++ *
++ * @param arm_freq Desired ARM frequency
++ * @param ahb_freq Desired AHB frequency
++ * @param pll_freq Current PLL frequency
++ *
++ * @return Returns 0
++ */
++static s32 mx27_pm_intscale(u32 arm_freq, u32 ahb_freq, s32 pll_freq)
++{
++ u32 pre_div, bclk_div, nfc_div;
++
++ /* Calculate ARM divider */
++ pre_div = pll_freq / arm_freq;
++ if (pre_div == 0)
++ pre_div = 1;
++
++ /* Calculate AHB divider */
++ bclk_div = arm_freq / ahb_freq;
++ if (bclk_div == 0)
++ bclk_div = 1;
++
++ if ((arm_freq / bclk_div) > ahb_freq)
++ bclk_div++;
++
++ /* NFC clock is dependent on ARM clock */
++ nfc_div = arm_freq / nfcclk;
++ if ((arm_freq / nfc_div) > nfcclk)
++ nfc_div++;
++
++ /* Adjust NFC divider */
++ mxc_set_clocks_div(NFC_CLK, nfc_div);
++
++#if MX27_LLPM_DEBUG
++ printk("DIVIDERS: PreDiv = %d BCLKDIV = %d \n", pre_div, bclk_div);
++ printk("Integer scaling\n");
++ printk("PLL = %d : ARM = %d: AHB = %d\n", pll_freq, arm_freq, ahb_freq);
++#endif
++
++ /*
++ * This part is tricky. What to adjust first (PRESC or BCLKDIV)?
++ * After trial and error, if current ARM frequency is greater than
++ * desired ARM frequency, then adjust PRESC first, else if current
++ * ARM frequency is less than desired ARM frequency, then adjust
++ * BCLKDIV first.
++ */
++ if (cpuclk > arm_freq) {
++ mxc_set_clocks_div(CPU_CLK, pre_div);
++ mxc_set_clocks_div(AHB_CLK, bclk_div);
++ } else {
++ mxc_set_clocks_div(AHB_CLK, bclk_div);
++ mxc_set_clocks_div(CPU_CLK, pre_div);
++ }
++
++ cpuclk = arm_freq;
++ mdelay(50);
++ return 0;
++}
++
++/*!
++ * Set dividers for various peripheral clocks.
++ *
++ * PERCLK1, PERCLK2, PERCLK3 and PERCLK4 are adjusted based on the MPLL
++ * output frequency.
++ *
++ * @param pll_freq Desired MPLL output frequency
++ */
++static void mx27_set_dividers(u32 pll_freq)
++{
++ s32 perdiv1, perdiv2, perdiv3, perdiv4;
++
++ perdiv1 = pll_freq / perclk1;
++ if ((pll_freq / perdiv1) > perclk1)
++ perdiv1++;
++
++ perdiv2 = pll_freq / perclk2;
++ if ((pll_freq / perdiv2) > perclk2)
++ perdiv2++;
++
++ perdiv3 = pll_freq / perclk3;
++ if ((pll_freq / perdiv3) > perclk3)
++ perdiv3++;
++
++ perdiv4 = pll_freq / perclk4;
++ if ((pll_freq / perdiv4) > perclk4)
++ perdiv4++;
++
++ mxc_set_clocks_div(PERCLK1, perdiv1);
++ mxc_set_clocks_div(PERCLK2, perdiv2);
++ mxc_set_clocks_div(PERCLK3, perdiv3);
++ mxc_set_clocks_div(PERCLK4, perdiv4);
++}
++
++/*!
++ * Change MPLL output frequency and adjust derived clocks to produce the
++ * desired frequencies.
++ *
++ * @param arm_freq Desired ARM frequency
++ * @param ahb_freq Desired AHB frequency
++ * @param org_pll Current PLL frequency
++ *
++ * @return Returns 0 on success
++ * Returns -1 on error
++ */
++static s32 mx27_pm_pllscale(u32 arm_freq, u32 ahb_freq, s32 org_pll)
++{
++ u32 mfi, mfn, mfd, pd = 1, cscr;
++ s32 pll_freq;
++
++ /* Obtain the PLL frequency for the desired ARM frequency */
++ pll_freq = select_freq_pll(arm_freq);
++ if (pll_freq == -1) {
++ return -1;
++ }
++
++ /* The MPCTL0 register values are programmed based on the oscillator */
++ cscr = __raw_readl(CCM_CSCR);
++ if ((cscr & CCM_CSCR_OSC26M) == 0) {
++ /* MPCTL0 register values are programmed for 400/266 MHz */
++ switch (pll_freq) {
++ case 400000000:
++ mfi = 7;
++ mfn = 9;
++ mfd = 12;
++ pd = 0;
++ break;
++
++ case 266000000:
++ mfi = 10;
++ mfn = 6;
++ mfd = 25;
++ break;
++
++ default:
++ return -1;
++ }
++ } else {
++ /* MPCTL0 register values are programmed for 400/266 MHz */
++ switch (pll_freq) {
++ case 400000000:
++ mfi = 12;
++ mfn = 2;
++ mfd = 3;
++ break;
++
++ case 266000000:
++ mfi = 8;
++ mfn = 10;
++ mfd = 31;
++ break;
++
++ default:
++ return -1;
++ }
++ }
++
++#if MX27_LLPM_DEBUG
++ printk("PLL scaling\n");
++ printk("PLL = %d : ARM = %d: AHB = %d\n", pll_freq, arm_freq, ahb_freq);
++#endif
++
++ /* Adjust the peripheral clock dividers for new PLL frequency */
++ mx27_set_dividers(pll_freq);
++
++ if (pll_freq > org_pll) {
++ /* Set the dividers first */
++ mx27_pm_intscale(arm_freq, ahb_freq, pll_freq);
++
++ /* Set the PLL */
++ mxc_pll_set(MCUPLL, mfi, pd, mfd, mfn);
++ mdelay(50);
++ } else {
++ /* Set the PLL first */
++ mxc_pll_set(MCUPLL, mfi, pd, mfd, mfn);
++ mdelay(50);
++
++ /* Set the dividers later */
++ mx27_pm_intscale(arm_freq, ahb_freq, pll_freq);
++ }
++
++ return 0;
++}
++#endif
++/*!
++ * Implement steps required to transition to low-power modes.
++ *
++ * @param mode The desired low-power mode. Possible values are,
++ * DOZE_MODE
++ * WAIT_MODE
++ * STOP_MODE
++ * DSM_MODE
++ */
++void mxc_pm_lowpower(s32 mode)
++{
++ u32 cscr;
++
++ local_irq_disable();
++
++ /* WAIT and DOZE execute WFI only */
++ switch (mode) {
++ case STOP_MODE:
++ case DSM_MODE:
++ /* Clear MPEN and SPEN to disable MPLL/SPLL */
++ cscr = __raw_readl(CCM_CSCR);
++ cscr &= 0xFFFFFFFC;
++ __raw_writel(cscr, CCM_CSCR);
++ break;
++ }
++
++ /* Executes WFI */
++ arch_idle();
++
++ local_irq_enable();
++}
++
++#if 0
++/*!
++ * Called to change the core frequency. This function internally decides
++ * whether to do integer scaling or pll scaling.
++ *
++ * @param arm_freq Desired ARM frequency
++ * @param ahb_freq Desired AHB frequency
++ * @param ipg_freq Desired IP frequency, constant AHB / 2 always.
++ *
++ * @return Returns 0 on success
++ * Returns -1 on error
++ */
++int mxc_pm_dvfs(unsigned long arm_freq, long ahb_freq, long ipg_freq)
++{
++ u32 divider;
++ s32 pll_freq, ret;
++ unsigned long flags;
++
++ if (mx27_pm_check_parameters(arm_freq, ahb_freq) != 0) {
++ return -1;
++ }
++
++ local_irq_save(flags);
++
++ /* Get the current PLL frequency */
++ pll_freq = mxc_pll_clock(MCUPLL);
++
++#if MX27_LLPM_DEBUG
++ printk("MCU PLL frequency is %d\n", pll_freq);
++#endif
++
++ /* Decide whether to do integer scaling or pll scaling */
++ if (arm_freq > pll_freq) {
++ /* Do PLL scaling */
++ ret = mx27_pm_pllscale(arm_freq, ahb_freq, pll_freq);
++ } else {
++ /* We need integer divider values */
++ divider = pll_freq / arm_freq;
++ if (!freq_equal(arm_freq, pll_freq / divider)) {
++ /* Do PLL scaling */
++ ret = mx27_pm_pllscale(arm_freq, ahb_freq, pll_freq);
++ } else {
++ /* Do integer scaling */
++ ret = mx27_pm_intscale(arm_freq, ahb_freq, pll_freq);
++ }
++ }
++
++ local_irq_restore(flags);
++ return ret;
++}
++#endif
++/*
++ * This API is not supported on i.MX27
++ */
++int mxc_pm_intscale(long armfreq, long ahbfreq, long ipfreq)
++{
++ return -MXC_PM_API_NOT_SUPPORTED;
++}
++
++/*
++ * This API is not supported on i.MX27
++ */
++int mxc_pm_pllscale(long armfreq, long ahbfreq, long ipfreq)
++{
++ return -MXC_PM_API_NOT_SUPPORTED;
++}
++
++/*!
++ * This function is used to load the module.
++ *
++ * @return Returns an Integer on success
++ */
++static int __init mxc_pm_init_module(void)
++{
++ printk(KERN_INFO "MX27: Power management module initialized\n");
++ return 0;
++}
++
++/*!
++ * This function is used to unload the module
++ */
++static void __exit mxc_pm_cleanup_module(void)
++{
++ printk(KERN_INFO "MX27: Power management module exit\n");
++}
++
++module_init(mxc_pm_init_module);
++module_exit(mxc_pm_cleanup_module);
++
++EXPORT_SYMBOL(mxc_pm_lowpower);
++//EXPORT_SYMBOL(mxc_pm_dvfs);
++EXPORT_SYMBOL(mxc_pm_pllscale);
++EXPORT_SYMBOL(mxc_pm_intscale);
++
++MODULE_AUTHOR("Freescale Semiconductor");
++MODULE_DESCRIPTION("i.MX27 low level PM driver");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/pm.c linux-2.6.28-karo/arch/arm/mach-mx2/pm.c
+--- linux-2.6.28/arch/arm/mach-mx2/pm.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/pm.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,88 @@
++/*
++ * linux/arch/arm/mach-mx27/pm.c
++ *
++ * MX27 Power Management Routines
++ *
++ * Original code for the SA11x0:
++ * Copyright (c) 2001 Cliff Brake <cbrake@accelent.com>
++ *
++ * Modified for the PXA250 by Nicolas Pitre:
++ * Copyright (c) 2002 Monta Vista Software, Inc.
++ *
++ * Modified for the OMAP1510 by David Singleton:
++ * Copyright (c) 2002 Monta Vista Software, Inc.
++ *
++ * Cleanup 2004 for OMAP1510/1610 by Dirk Behme <dirk.behme@de.bosch.com>
++ *
++ * Modified for the MX27
++ * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * THIS SOFTWARE IS PROVIDED ``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.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++#include <linux/pm.h>
++#include <linux/sched.h>
++#include <linux/proc_fs.h>
++#include <linux/suspend.h>
++
++#include <asm/io.h>
++#include <mach/mxc_pm.h>
++
++/*
++ * TODO: whatta save?
++ */
++
++static int mx27_pm_enter(suspend_state_t state)
++{
++ pr_debug("%s: Entering state %d\n", __FUNCTION__, state);
++ switch (state) {
++ case PM_SUSPEND_MEM:
++ mxc_pm_lowpower(STOP_MODE);
++ break;
++
++ case PM_SUSPEND_STANDBY:
++ mxc_pm_lowpower(WAIT_MODE);
++ break;
++
++ case PM_SUSPEND_STOP:
++ mxc_pm_lowpower(DSM_MODE);
++ break;
++
++ default:
++ return -1;
++ }
++ return 0;
++}
++
++struct platform_suspend_ops mx27_pm_ops = {
++ .enter = mx27_pm_enter,
++ .valid = suspend_valid_only_mem,
++};
++
++static int __init mx27_pm_init(void)
++{
++ pr_debug("Power Management for Freescale MX27\n");
++ suspend_set_ops(&mx27_pm_ops);
++
++ return 0;
++}
++
++late_initcall(mx27_pm_init);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/system.c linux-2.6.28-karo/arch/arm/mach-mx2/system.c
+--- linux-2.6.28/arch/arm/mach-mx2/system.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/system.c 2009-03-11 13:31:09.000000000 +0100
+@@ -21,7 +21,9 @@
+
+ #include <linux/kernel.h>
+ #include <linux/clk.h>
++#include <linux/err.h>
+ #include <linux/io.h>
++#include <linux/init.h>
+
+ #include <mach/hardware.h>
+ #include <asm/proc-fns.h>
+@@ -43,21 +45,33 @@ void arch_idle(void)
+ #define WDOG_WCR_REG IO_ADDRESS(WDOG_BASE_ADDR)
+ #define WDOG_WCR_SRS (1 << 4)
+
++static struct clk *wdog_clk;
++
+ /*
+ * Reset the system. It is called by machine_restart().
+ */
+ void arch_reset(char mode)
+ {
+- struct clk *clk;
+-
+- clk = clk_get(NULL, "wdog_clk");
+- if (!clk) {
+- printk(KERN_ERR"Cannot activate the watchdog. Giving up\n");
+- return;
++ if (mode == 's') {
++ cpu_reset(0);
++ }
++ if (likely(wdog_clk != NULL)) {
++ clk_enable(wdog_clk);
+ }
+-
+- clk_enable(clk);
+
+ /* Assert SRS signal */
+ __raw_writew(__raw_readw(WDOG_WCR_REG) & ~WDOG_WCR_SRS, WDOG_WCR_REG);
+ }
++
++int __init mxc_wdog_init(void)
++{
++ wdog_clk = clk_get(NULL, "wdog_clk");
++ if (IS_ERR(wdog_clk)) {
++ int ret = PTR_ERR(wdog_clk);
++ printk(KERN_CRIT "Cannot get wdog clock; watchdog reset may not work\n");
++ wdog_clk = NULL;
++ return ret;
++ }
++ return 0;
++}
++postcore_initcall(mxc_wdog_init);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/mach-mx2/tx27_gpio.c linux-2.6.28-karo/arch/arm/mach-mx2/tx27_gpio.c
+--- linux-2.6.28/arch/arm/mach-mx2/tx27_gpio.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/mach-mx2/tx27_gpio.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,1019 @@
++/*
++ * arch/arm/mach-mx27/tx27_gpio.c
++ *
++ * Copyright (C) 2008 Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the:
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
++ */
++
++#include <linux/module.h>
++#include <linux/device.h>
++#include <linux/delay.h>
++#include <linux/err.h>
++#include <linux/clk.h>
++#include <mach/hardware.h>
++#include <mach/gpio.h>
++#include <mach/iomux.h>
++#include <mach/board-tx27.h>
++
++#include "crm_regs.h"
++
++#ifdef DEBUG
++extern int tx27_debug;
++#define dbg_lvl(n) ((n) < tx27_debug)
++#define DBG(lvl, fmt...) do { if (dbg_lvl(lvl)) printk(KERN_DEBUG fmt); } while (0)
++#else
++#define dbg_lvl(n) 0
++
++#define DBG(lvl, fmt...) do { } while (0)
++#endif
++
++#ifdef DEBUG
++#define try_request_mux(gmd) _try_request_mux(gmd, ARRAY_SIZE((gmd)), __FUNCTION__)
++static int _try_request_mux(const unsigned int *gmd, int num_gpios, const char *func)
++#else
++#define try_request_mux(gmd) _try_request_mux(gmd, ARRAY_SIZE((gmd)))
++static int _try_request_mux(const unsigned int *gmd, int num_gpios)
++#endif
++{
++ int i;
++ for (i = 0; i < num_gpios; i++) {
++ unsigned gpio = gmd[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK);
++ int ret;
++
++ DBG(0, "Requesting GPIO: P%c%d (%s) for %s\n",
++ GPIO_PORT(gmd[i]) + 'A', GPIO_INDEX(gmd[i]),
++ MX27_PIN_NAME(gmd[i]), func);
++ ret = gpio_request(gpio, "");
++ if (ret != 0) {
++ while (--i >= 0) {
++ gpio_free(gmd[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK));
++ }
++ return ret;
++ }
++ DBG(0, "%s: Configuring %s: %08x\n", __FUNCTION__,
++ MX27_PIN_NAME(gmd[i]), gmd[i]);
++ mxc_gpio_mode(gmd[i]);
++ }
++ return 0;
++}
++
++#ifdef DEBUG
++#define release_mux(gmd) _release_mux(gmd, ARRAY_SIZE((gmd)), __FUNCTION__)
++static void _release_mux(const unsigned int *gmd, int num_gpios,
++ const char *func)
++#else
++#define release_mux(gmd) _release_mux(gmd, ARRAY_SIZE((gmd)))
++static void _release_mux(const unsigned int *gmd, int num_gpios)
++#endif
++{
++ int i;
++
++ for (i = 0; i < num_gpios; i++) {
++ unsigned gpio = gmd[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK);
++#ifdef DEBUG
++ DBG(0, "%s: Releasing GPIO port P%c%d (%s)\n", func,
++ GPIO_PORT(gpio) + 'A', GPIO_INDEX(gpio),
++ MX27_PIN_NAME(gmd[i]));
++#endif
++ gpio_free(gpio);
++ }
++}
++
++#define tx27_config_mux(__gmd, __puen) _tx27_config_mux(__gmd, ARRAY_SIZE((__gmd)), __puen)
++static void _tx27_config_mux(const unsigned int *gmd, int num_gpios, int puen)
++{
++ int i;
++
++ for (i = 0; i < num_gpios; i++) {
++ switch (puen) {
++ case 1:
++ DBG(0, "Enabling Pullup on %s\n",
++ MX27_PIN_NAME(gmd[i]));
++ mxc_gpio_mode(gmd[i] | GPIO_PUEN);
++ break;
++ case -1:
++ case 0:
++ DBG(0, "Disabling Pullup on %s\n",
++ MX27_PIN_NAME(gmd[i]));
++ mxc_gpio_mode(gmd[i] & ~GPIO_PUEN);
++ break;
++ }
++ }
++}
++
++#ifdef DEBUG
++#define dump_pins(__gmd) _dump_pins(__gmd, ARRAY_SIZE((__gmd)), __FUNCTION__)
++static void _dump_pins(const unsigned int *gmd, int num_gpios, const char *func)
++{
++ int i;
++
++ for (i = 0; i < num_gpios; i++) {
++ int gpio = IOMUX_TO_GPIO(gmd[i]);
++
++ DBG(0, "%s: %s (P%c%d) is: %d\n", func,
++ MX27_PIN_NAME(gmd[i]),
++ GPIO_PORT(gpio) + 'A', GPIO_INDEX(gpio),
++ gpio_get_value(gpio));
++ }
++}
++#else
++#define dump_pins(arg) do { } while (0)
++#endif
++
++/*
++ Setup GPIO for USB
++
++ PB22: 26MHz oscillator enable
++
++ PIN Configuration for USBOTG: High/Full speed OTG
++ PE2,PE1,PE0,PE24,PE25 -- PRIMARY
++ PC7 - PC13 -- PRIMARY
++ PB23,PB24 -- PRIMARY
++
++ PIN Configuration for USBH2: : High/Full/Low speed host
++ PA0 - PA4 -- PRIMARY
++ PD19, PD20,PD21,PD22,PD23,PD24,PD26 --Alternate (SECONDARY)
++
++ USBH1: Full/low speed host
++ not supported on TX27
++ */
++
++static unsigned int mx27_usbh2_gpios_active[] = {
++ PD19_AF_USBH2_DATA4,
++ PD20_AF_USBH2_DATA3,
++ PD21_AF_USBH2_DATA6,
++ PD22_AF_USBH2_DATA0,
++ PD23_AF_USBH2_DATA2,
++ PD24_AF_USBH2_DATA1,
++ PD26_AF_USBH2_DATA5,
++
++ PA0_PF_USBH2_CLK,
++ PA1_PF_USBH2_DIR,
++ PA2_PF_USBH2_DATA7,
++ PA3_PF_USBH2_NXT,
++ PA4_PF_USBH2_STP,
++
++ MXC_PIN(B, 31, AOUT, GPIO_IN), /* OC detect */
++};
++
++static unsigned int mx27_usbh2_gpios_inactive[] = {
++ MXC_PIN(D, 19, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(D, 20, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(D, 21, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(D, 22, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(D, 23, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(D, 24, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(D, 26, AOUT, GPIO_IN | GPIO_PUEN),
++
++ MXC_PIN(A, 0, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(A, 1, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(A, 2, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(A, 3, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(A, 4, AOUT, GPIO_IN | GPIO_PUEN),
++
++ MXC_PIN(B, 31, AOUT, GPIO_IN), /* OC detect */
++};
++
++/*
++ * conflicts with CSPI1 and CSPI2
++ */
++static struct clk *usbh2_clk;
++
++int gpio_usbh2_active(void)
++{
++ int ret;
++
++ DBG(0, "%s: \n", __FUNCTION__);
++ usbh2_clk = clk_get(NULL, "clk_26m");
++ if (IS_ERR(usbh2_clk)) {
++ ret = PTR_ERR(usbh2_clk);
++ printk(KERN_ERR "Cannot request 26MHz clock: %d\n", ret);
++ clk_put(usbh2_clk);
++ usbh2_clk = NULL;
++ return ret;
++ } else {
++ clk_enable(usbh2_clk);
++ }
++
++ ret = try_request_mux(mx27_usbh2_gpios_active);
++ return ret;
++}
++
++void gpio_usbh2_inactive(void)
++{
++ int i;
++
++ DBG(0, "%s: \n", __FUNCTION__);
++ if (usbh2_clk != NULL) {
++ clk_disable(usbh2_clk);
++ clk_put(usbh2_clk);
++ usbh2_clk = NULL;
++ }
++
++ for (i = ARRAY_SIZE(mx27_usbh2_gpios_inactive) - 1; i >= 0; i--) {
++ DBG(0, "Enabling Pullup on %s\n",
++ MX27_PIN_NAME(mx27_usbh2_gpios_inactive[i]));
++ mxc_gpio_mode(mx27_usbh2_gpios_inactive[i]);
++ }
++ release_mux(mx27_usbh2_gpios_active);
++}
++
++static unsigned int mx27_usbotg_hs_gpios_active[] = {
++ PC7_PF_USBOTG_DATA5,
++ PC8_PF_USBOTG_DATA6,
++ PC9_PF_USBOTG_DATA0,
++ PC10_PF_USBOTG_DATA2,
++ PC11_PF_USBOTG_DATA1,
++ PC13_PF_USBOTG_DATA3,
++ PC12_PF_USBOTG_DATA4,
++
++ PE24_PF_USBOTG_CLK,
++ PE2_PF_USBOTG_DIR,
++ PE25_PF_USBOTG_DATA7,
++ PE0_PF_USBOTG_NXT,
++ PE1_PF_USBOTG_STP,
++
++ MXC_PIN(B, 29, AOUT, GPIO_IN), /* OC detect */
++};
++
++static unsigned int mx27_usbotg_hs_gpios_inactive[] = {
++ MXC_PIN(C, 7, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(C, 8, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(C, 9, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(C, 10, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(C, 11, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(C, 13, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(C, 12, AOUT, GPIO_IN | GPIO_PUEN),
++
++ MXC_PIN(E, 24, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(E, 2, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(E, 25, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(E, 0, AOUT, GPIO_IN | GPIO_PUEN),
++ MXC_PIN(E, 1, AOUT, GPIO_IN | GPIO_PUEN),
++
++ MXC_PIN(B, 29, AOUT, GPIO_IN), /* OC detect */
++};
++
++static struct clk *usbotg_clk;
++
++int gpio_usbotg_hs_active(void)
++{
++ int ret;
++
++ usbotg_clk = clk_get(NULL, "clk_26m");
++ if (IS_ERR(usbotg_clk)) {
++ ret = PTR_ERR(usbotg_clk);
++ printk(KERN_ERR "Cannot request 26MHz clock: %d\n", ret);
++ clk_put(usbotg_clk);
++ usbotg_clk = NULL;
++ return ret;
++ } else {
++ clk_enable(usbotg_clk);
++ }
++
++ ret = try_request_mux(mx27_usbotg_hs_gpios_active);
++ return ret;
++}
++
++void gpio_usbotg_hs_inactive(void)
++{
++ int i;
++
++ if (usbotg_clk != NULL) {
++ clk_disable(usbotg_clk);
++ clk_put(usbotg_clk);
++ usbotg_clk = NULL;
++ }
++
++ for (i = 0; i < ARRAY_SIZE(mx27_usbotg_hs_gpios_inactive); i++) {
++ DBG(0, "Enabling Pullup on %s\n",
++ MX27_PIN_NAME(mx27_usbotg_hs_gpios_inactive[i]));
++ mxc_gpio_mode(mx27_usbotg_hs_gpios_inactive[i]);
++ }
++ release_mux(mx27_usbotg_hs_gpios_active);
++}
++
++int gpio_usbotg_fs_active(void)
++{
++ return gpio_usbotg_hs_active();
++}
++
++void gpio_usbotg_fs_inactive(void)
++{
++ gpio_usbotg_hs_inactive();
++}
++
++/************************************************************************/
++/* for i2c gpio */
++/* I2C1: PD17,PD18 -- Primary */
++/* I2C2: PC5,PC6 -- Primary */
++/************************************************************************/
++/*
++ * Setup GPIO for an I2C device to be active
++ */
++static unsigned int mx27_i2c_gpios[][2] = {
++ {
++ PD18_PF_I2C_CLK,
++ PD17_PF_I2C_DATA,
++ },{
++ PC6_PF_I2C2_SCL,
++ PC5_PF_I2C2_SDA,
++ }
++};
++
++int gpio_i2c_active(int i2c_num)
++{
++ if (i2c_num < 0 || i2c_num >= ARRAY_SIZE(mx27_i2c_gpios)) {
++ printk(KERN_ERR "%s: no compatible I2C adapter\n", __FUNCTION__);
++ return -EINVAL;
++ }
++ return try_request_mux(mx27_i2c_gpios[i2c_num]);
++}
++
++/*
++ * Setup GPIO for an I2C device to be inactive
++ */
++int gpio_i2c_inactive(int i2c_num)
++{
++ if (i2c_num < 0 || i2c_num >= ARRAY_SIZE(mx27_i2c_gpios)) {
++ return -EINVAL;
++ }
++ release_mux(mx27_i2c_gpios[i2c_num]);
++ return 0;
++}
++
++/*
++ * Setup GPIO for a CSPI device to be active
++ */
++static unsigned int mx27_cspi1_gpios[] = {
++ PD31_PF_CSPI1_MOSI,
++ PD30_PF_CSPI1_MISO,
++ PD29_PF_CSPI1_SCLK,
++ PD25_PF_CSPI1_RDY,
++ PD28_PF_CSPI1_SS0,
++ PD27_PF_CSPI1_SS1,
++ //PD26_PF_CSPI1_SS2, /* already in use by the USB controller */
++};
++
++static unsigned int mx27_cspi2_gpios[] = {
++ PD24_PF_CSPI2_MOSI,
++ PD23_PF_CSPI2_MISO,
++ PD22_PF_CSPI2_SCLK,
++ PD21_PF_CSPI2_SS0,
++ PD20_PF_CSPI2_SS1,
++ PD19_PF_CSPI2_SS2,
++};
++
++static unsigned int mx27_cspi3_gpios[] = {
++ PE18_AF_CSPI3_MISO,
++ PE22_AF_CSPI3_MOSI,
++ PE23_AF_CSPI3_SCLK,
++ PE21_AF_CSPI3_SS,
++};
++
++int gpio_spi_active(int cspi_mod)
++{
++
++ switch (cspi_mod) {
++ case 0:
++ /* SPI1 */
++ return try_request_mux(mx27_cspi1_gpios);
++ case 1:
++ /*SPI2 */
++ return try_request_mux(mx27_cspi2_gpios);
++ case 2:
++ /*SPI3 */
++ return try_request_mux(mx27_cspi3_gpios);
++ default:
++ return -EINVAL;
++ }
++}
++
++/*
++ * Setup GPIO for a CSPI device to be inactive
++ */
++int gpio_spi_inactive(int cspi_mod)
++{
++ switch (cspi_mod) {
++ case 0:
++ /* SPI1 */
++ release_mux(mx27_cspi1_gpios);
++ break;
++ case 1:
++ /*SPI2 */
++ release_mux(mx27_cspi2_gpios);
++ break;
++ case 2:
++ /*SPI3 */
++ release_mux(mx27_cspi3_gpios);
++ break;
++
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++/*
++ * Setup GPIO for a nand flash device to be active
++ *
++ */
++static unsigned int mx27_nand_gpios[] = {
++ PF0_PF_NFRB,
++ PF3_PF_NFCE_B,
++ PF2_PF_NFWP_B,
++ PF1_PF_NFCLE,
++ PF4_PF_NFALE,
++ PF5_PF_NFRE_B,
++ PF6_PF_NFWE_B,
++};
++
++int gpio_nand_active(void)
++{
++ return try_request_mux(mx27_nand_gpios);
++}
++
++/*
++ * Setup GPIO for a nand flash device to be inactive
++ *
++ */
++void gpio_nand_inactive(void)
++{
++ release_mux(mx27_nand_gpios);
++}
++
++/*
++ * Setup GPIO for CSI device to be active
++ *
++ */
++static unsigned int mx27_csi_gpios[] = {
++ PB10_PF_CSI_D0,
++ PB11_PF_CSI_D1,
++ PB12_PF_CSI_D2,
++ PB13_PF_CSI_D3,
++ PB14_PF_CSI_D4,
++ PB15_PF_CSI_MCLK,
++ PB16_PF_CSI_PIXCLK,
++ PB17_PF_CSI_D5,
++ PB18_PF_CSI_D6,
++ PB19_PF_CSI_D7,
++ PB20_PF_CSI_VSYNC,
++ PB21_PF_CSI_HSYNC,
++};
++
++int gpio_sensor_active(void)
++{
++ return try_request_mux(mx27_csi_gpios);
++}
++
++void gpio_sensor_inactive(void)
++{
++ release_mux(mx27_csi_gpios);
++}
++
++#if 0
++/*
++ * Setup GPIO for LCDC device to be active
++ *
++ */
++static unsigned int mx27_lcdc_gpios[] = {
++ MXC_PIN(A, 30, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA30 */
++ MXC_PIN(A, 25, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA25 */
++ MXC_PIN(A, 26, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA26 */
++ MXC_PIN(A, 24, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA24 */
++ MXC_PIN(A, 27, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA27 */
++ PA5_PF_LSCLK,
++ PA6_PF_LD0,
++ PA7_PF_LD1,
++ PA8_PF_LD2,
++ PA9_PF_LD3,
++ PA10_PF_LD4,
++ PA11_PF_LD5,
++ PA12_PF_LD6,
++ PA13_PF_LD7,
++ PA14_PF_LD8,
++ PA15_PF_LD9,
++ PA16_PF_LD10,
++ PA17_PF_LD11,
++ PA18_PF_LD12,
++ PA19_PF_LD13,
++ PA20_PF_LD14,
++ PA21_PF_LD15,
++ PA22_PF_LD16,
++ PA23_PF_LD17,
++ PA28_PF_HSYNC,
++ PA29_PF_VSYNC,
++ PA31_PF_OE_ACD,
++};
++
++int tx27_gpio_lcdc_active(void)
++{
++ int ret;
++ ret = try_request_mux(mx27_lcdc_gpios);
++ if (ret) {
++ return ret;
++ }
++ return 0;
++}
++
++/*
++ * Setup GPIO for LCDC device to be inactive
++ *
++ */
++int tx27_gpio_lcdc_inactive(void)
++{
++ release_mux(mx27_lcdc_gpios);
++ return 0;
++}
++#endif
++
++/*
++ * GPIO settings not required for keypad
++ *
++ */
++int gpio_keypad_active(void)
++{
++ return 0;
++}
++
++/*
++ * GPIO settings not required for keypad
++ *
++ */
++void gpio_keypad_inactive(void)
++{
++}
++
++/*
++ * Setup GPIO for ATA device to be active
++ *
++ */
++static unsigned int mx27_ata_gpios[] = {
++ PD2_PF_ATA_DATA0,
++ PD3_PF_ATA_DATA1,
++ PD4_PF_ATA_DATA2,
++ PD5_PF_ATA_DATA3,
++ PD6_PF_ATA_DATA4,
++ PD7_PF_ATA_DATA5,
++ PD8_PF_ATA_DATA6,
++ PD9_PF_ATA_DATA7,
++ PD10_PF_ATA_DATA8,
++ PD11_PF_ATA_DATA9,
++ PD12_PF_ATA_DATA10,
++ PD13_PF_ATA_DATA11,
++ PD14_PF_ATA_DATA12,
++ PD15_PF_ATA_DATA13,
++ PD16_PF_ATA_DATA14,
++ PF23_PF_ATA_DATA15,
++
++ PF20_AF_PC_CD1_B,
++ PF19_AF_PC_CD2_B,
++ PF18_AF_PC_WAIT_B,
++ PF17_AF_PC_READY,
++ PF16_AF_PC_PWRON,
++ PF14_AF_PC_VS1,
++ PF13_AF_PC_VS2,
++ PF12_AF_PC_BVD1,
++ PF11_AF_PC_BVD2,
++ PF10_AF_PC_RST,
++ PF9_AF_IOIS16,
++ PF8_AF_PC_RW_B,
++ PF7_AF_PC_POE,
++};
++
++int gpio_ata_active(void)
++{
++ return try_request_mux(mx27_ata_gpios);
++}
++
++/*
++ * Setup GPIO for ATA device to be inactive
++ *
++ */
++void gpio_ata_inactive(void)
++{
++ release_mux(mx27_ata_gpios);
++}
++
++/*
++ * Setup GPIO for FEC device to be active
++ *
++ */
++static unsigned int mx27_fec_gpios_off[] = {
++ /* configure the PHY strap pins to the correct values */
++ MXC_PIN(D, 0, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 1, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 2, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 3, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 4, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 5, GPIO, GPIO_OUT | GPIO_DFLT_HIGH),
++ MXC_PIN(D, 6, GPIO, GPIO_OUT | GPIO_DFLT_HIGH),
++ MXC_PIN(D, 7, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 8, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 9, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 10, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 11, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 12, GPIO, GPIO_OUT | GPIO_DFLT_HIGH),
++ MXC_PIN(D, 13, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 14, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++ MXC_PIN(D, 15, GPIO, GPIO_OUT | GPIO_DFLT_LOW),
++};
++
++static unsigned int mx27_fec_pwr_gpios[] = {
++ MXC_PIN(B, 27, GPIO, GPIO_OUT), /* FEC PHY power on pin */
++ MXC_PIN(B, 30, GPIO, GPIO_OUT), /* keep FEC reset in original state */
++};
++
++static unsigned int mx27_fec_gpios_on[] = {
++ PD0_AIN_FEC_TXD0,
++ PD1_AIN_FEC_TXD1,
++ PD2_AIN_FEC_TXD2,
++ PD3_AIN_FEC_TXD3,
++ PD4_AOUT_FEC_RX_ER,
++ PD5_AOUT_FEC_RXD1,
++ PD6_AOUT_FEC_RXD2,
++ PD7_AOUT_FEC_RXD3,
++ PD8_AF_FEC_MDIO,
++ PD9_AIN_FEC_MDC,
++ PD10_AOUT_FEC_CRS,
++ PD11_AOUT_FEC_TX_CLK,
++ PD12_AOUT_FEC_RXD0,
++ PD13_AOUT_FEC_RX_DV,
++ PD14_AOUT_FEC_RX_CLK,
++ PD15_AOUT_FEC_COL,
++#ifndef FEC_MII_IRQ
++ PD16_AIN_FEC_TX_ER, /* TX_ER */
++#else
++ MXC_PIN(D, 16, AOUT, GPIO_IN), /* #INT */
++#endif
++ PF23_AIN_FEC_TX_EN,
++};
++
++#define TX27_FEC_PWR_GPIO (GPIO_PORTB | 27)
++#define TX27_FEC_RST_GPIO (GPIO_PORTB | 30)
++
++int gpio_fec_active(void)
++{
++ int ret;
++
++ ret = try_request_mux(mx27_fec_pwr_gpios);
++ if (ret) {
++ return ret;
++ }
++ /*
++ * If the PHY is already powered on, assume it has been
++ * correctly configured (by the boot loader)
++ */
++ if (0 && gpio_get_value(TX27_FEC_PWR_GPIO) &&
++ gpio_get_value(TX27_FEC_RST_GPIO)) {
++ ret = try_request_mux(mx27_fec_gpios_on);
++ if (ret) {
++ release_mux(mx27_fec_pwr_gpios);
++ return ret;
++ }
++ } else {
++ DBG(0, "%s: Switching FEC PHY power on\n", __FUNCTION__);
++ gpio_set_value(TX27_FEC_PWR_GPIO, 1);
++ DBG(0, "%s: Asserting FEC PHY reset\n", __FUNCTION__);
++ gpio_set_value(TX27_FEC_RST_GPIO, 0);
++ dump_pins(mx27_fec_pwr_gpios);
++ dump_pins(mx27_fec_gpios_on);
++ /* switch PHY strap pins into required state */
++ ret = try_request_mux(mx27_fec_gpios_off);
++ if (ret) {
++ release_mux(mx27_fec_pwr_gpios);
++ return ret;
++ }
++ DBG(0, "%s: Delaying for 22ms\n", __FUNCTION__);
++ mdelay(22);
++ dump_pins(mx27_fec_pwr_gpios);
++ dump_pins(mx27_fec_gpios_on);
++ DBG(0, "%s: Deasserting FEC PHY reset\n", __FUNCTION__);
++ gpio_set_value(TX27_FEC_RST_GPIO, 1);
++ tx27_config_mux(mx27_fec_gpios_on, -1);
++ }
++ return 0;
++}
++
++/*
++ * Setup GPIO for FEC device to be inactive
++ *
++ */
++void gpio_fec_inactive(void)
++{
++ tx27_config_mux(mx27_fec_gpios_off, -1);
++ DBG(0, "%s: Asserting FEC PHY reset\n", __FUNCTION__);
++ gpio_set_value(TX27_FEC_RST_GPIO, 0);
++ DBG(0, "%s: Switching FEC PHY power off\n", __FUNCTION__);
++ gpio_set_value(TX27_FEC_PWR_GPIO, 0);
++ release_mux(mx27_fec_gpios_off);
++ release_mux(mx27_fec_pwr_gpios);
++}
++
++/*
++ * Setup GPIO for SLCDC device to be active
++ *
++ */
++static unsigned int mx27_slcdc0_gpios[] = {
++ PC31_AIN_SLCDC2_CLK, /* CLK */
++ PC30_AIN_SLCDC2_CS, /* CS */
++ PC29_AIN_SLCDC2_RS, /* RS */
++ PC28_AIN_SLCDC2_D0, /* D0 */
++};
++
++static unsigned int mx27_slcdc1_gpios[] = {
++ PB5_AIN_SLCDC1_CLK, /* CLK */
++ PB6_AIN_SLCDC1_D0, /* D0 */
++ PB7_AIN_SLCDC1_RS, /* RS */
++ PB8_AIN_SLCDC1_CS, /* CS */
++};
++
++static unsigned int mx27_slcdc2_gpios[] = {
++ MXC_PIN(A, 6, GPIO, GPIO_OUT),
++ MXC_PIN(A, 7, GPIO, GPIO_OUT),
++ MXC_PIN(A, 8, GPIO, GPIO_OUT),
++ MXC_PIN(A, 9, GPIO, GPIO_OUT),
++ MXC_PIN(A, 10, GPIO, GPIO_OUT),
++ MXC_PIN(A, 11, GPIO, GPIO_OUT),
++ MXC_PIN(A, 12, GPIO, GPIO_OUT),
++ MXC_PIN(A, 13, GPIO, GPIO_OUT),
++ MXC_PIN(A, 14, GPIO, GPIO_OUT),
++ MXC_PIN(A, 15, GPIO, GPIO_OUT),
++ MXC_PIN(A, 16, GPIO, GPIO_OUT),
++ MXC_PIN(A, 17, GPIO, GPIO_OUT),
++ MXC_PIN(A, 18, GPIO, GPIO_OUT),
++ MXC_PIN(A, 19, GPIO, GPIO_OUT),
++ MXC_PIN(A, 20, GPIO, GPIO_OUT),
++ MXC_PIN(A, 21, GPIO, GPIO_OUT),
++};
++
++int gpio_slcdc_active(int type)
++{
++ switch (type) {
++ case 0:
++ return try_request_mux(mx27_slcdc0_gpios);
++ case 1:
++ return try_request_mux(mx27_slcdc1_gpios);
++ case 2:
++ return try_request_mux(mx27_slcdc2_gpios);
++ }
++ return -EINVAL;
++}
++
++/*
++ * Setup GPIO for SLCDC device to be inactive
++ *
++ */
++int gpio_slcdc_inactive(int type)
++{
++ switch (type) {
++ case 0:
++ release_mux(mx27_slcdc0_gpios);
++ break;
++ case 1:
++ release_mux(mx27_slcdc1_gpios);
++ break;
++ case 2:
++ release_mux(mx27_slcdc2_gpios);
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++static unsigned int mx27_ssi_gpios[][4] = {
++ {
++ PC28_PF_SSI3_FS,
++ PC29_PF_SSI3_RXD,
++ PC30_PF_SSI3_TXD,
++ PC31_PF_SSI3_CLK,
++ },
++ {
++ PC16_PF_SSI4_FS,
++ PC17_PF_SSI4_RXD,
++ PC18_PF_SSI4_TXD,
++ PC19_PF_SSI4_CLK,
++ },
++};
++
++int gpio_ssi_active(int ssi_num)
++{
++ int ret;
++ switch (ssi_num) {
++ case 0:
++ case 1:
++ ret = try_request_mux(mx27_ssi_gpios[ssi_num]);
++ break;
++ default:
++ return -EINVAL;
++ }
++ return ret;
++}
++
++/*
++ * Setup GPIO for a SSI port to be inactive
++ */
++int gpio_ssi_inactive(int ssi_num)
++{
++ if (ssi_num < 0 || ssi_num >= ARRAY_SIZE(mx27_ssi_gpios)) {
++ return -EINVAL;
++ }
++ release_mux(mx27_ssi_gpios[ssi_num]);
++ return 0;
++}
++
++static unsigned int mx27_ac97_gpios_off[] = {
++ MXC_PIN(E, 17, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* RESET_OUT_B */
++ PC31_PF_SSI3_CLK, /* AC97_BITCLK */
++ PC29_PF_SSI3_RXD, /* AC97_SDATAIN */
++ MXC_PIN(C, 23, AOUT, GPIO_IN), /* UCB1400 interrupt */
++ /* keep SDATA_OUT and SYNC deasserted to prevent UCB1400 from entering test mode */
++ MXC_PIN(C, 30, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* AC97_SDATAOUT */
++ MXC_PIN(C, 28, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* AC97_SYNC */
++};
++
++static unsigned int mx27_ac97_gpios_on[] = {
++ MXC_PIN(E, 17, GPIO, GPIO_OUT | GPIO_DFLT_HIGH), /* RESET_OUT_B */
++ PC30_PF_SSI3_TXD, /* AC97_SDATAOUT */
++ PC28_PF_SSI3_FS, /* AC97_SYNC */
++};
++
++int gpio_ac97_active(void)
++{
++ int ret;
++
++ ret = try_request_mux(mx27_ac97_gpios_off);
++ if (ret == 0) {
++ udelay(1);
++ dump_pins(mx27_ac97_gpios_off);
++ /* deassert UCB1400 reset and reconfigure SDATA_OUT and SYNC */
++ tx27_config_mux(mx27_ac97_gpios_on, -1);
++ }
++ return ret;
++}
++
++void gpio_ac97_inactive(void)
++{
++ DBG(0, "%s: Releasing AC97 GPIOS\n", __FUNCTION__);
++ release_mux(mx27_ac97_gpios_off);
++ DBG(0, "%s: Done\n", __FUNCTION__);
++}
++
++/*
++ * Setup GPIO for SDHC to be active
++ */
++static unsigned int mx27_sdhc_gpios[][6] = {
++ {
++ PE23_PF_SD1_CLK,
++ PE22_PF_SD1_CMD,
++ PE18_PF_SD1_D0,
++ PE19_PF_SD1_D1,
++ PE20_PF_SD1_D2,
++ PE21_PF_SD1_D3,
++ },
++ {
++ PB9_PF_SD2_CLK,
++ PB8_PF_SD2_CMD,
++ PB4_PF_SD2_D0,
++ PB5_PF_SD2_D1,
++ PB6_PF_SD2_D2,
++ PB7_PF_SD2_D3,
++ },
++ {
++ PD1_PF_SD3_CLK,
++ PD0_PF_SD3_CMD,
++ PD2_AF_SD3_D0,
++ PD3_AF_SD3_D1,
++ PD4_AF_SD3_D2,
++ PD5_AF_SD3_D3,
++ },
++};
++
++int gpio_sdhc_active(int module)
++{
++ int ret;
++ u16 data;
++ switch (module) {
++ case 0:
++ ret = try_request_mux(mx27_sdhc_gpios[module]);
++ if (ret == 0) {
++ /* 22k pull up for sd1 dat3 pins */
++ data = __raw_readw(IO_ADDRESS(SYSCTRL_BASE_ADDR + 0x54));
++ data |= 0x0c;
++ __raw_writew(data, IO_ADDRESS(SYSCTRL_BASE_ADDR + 0x54));
++ }
++ break;
++ case 1:
++ ret = try_request_mux(mx27_sdhc_gpios[module]);
++ if (ret == 0) {
++ /* 22k pull up for sd2 pins */
++ data = __raw_readw(IO_ADDRESS(SYSCTRL_BASE_ADDR + 0x54));
++ data |= 0xfff0;
++ __raw_writew(data, IO_ADDRESS(SYSCTRL_BASE_ADDR + 0x54));
++ }
++ break;
++ case 2:
++ ret = try_request_mux(mx27_sdhc_gpios[module]);
++ break;
++ default:
++ return -EINVAL;
++ }
++ return ret;
++}
++
++/*
++ * Setup GPIO for SDHC to be inactive
++ */
++int gpio_sdhc_inactive(int module)
++{
++ switch (module) {
++ case 0:
++ case 1:
++ case 2:
++ release_mux(mx27_sdhc_gpios[module]);
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++int gpio_owire_active(void)
++{
++ int ret;
++
++ ret = gpio_request(IOMUX_TO_GPIO(PE16_AF_OWIRE), "1Wire");
++ if (ret == 0) {
++ mxc_gpio_mode(PE16_AF_OWIRE);
++ }
++ return ret;
++}
++
++void gpio_owire_inactive(void)
++{
++ gpio_free(IOMUX_TO_GPIO(PE16_AF_OWIRE));
++}
++
++#define TX27_EXT_WAKEUP_GPIO (GPIO_PORTB | 24)
++
++#if 0
++static int tx27_gpio_init(void)
++{
++ int ret;
++
++ DBG(0, "%s: \n", __FUNCTION__);
++
++ /* USB_OC_B => EXT_WAKEUP */
++ ret = gpio_request(TX27_EXT_WAKEUP_GPIO, "EXT Wakeup");
++ if (ret) {
++ printk(KERN_WARNING "%s: Failed to request %s\n", __FUNCTION__,
++ MX27_PIN_NAME(TX27_EXT_WAKEUP_GPIO));
++ return ret;
++ }
++ mxc_gpio_mode(MXC_PIN(B, 24, AOUT, GPIO_IN));
++ return ret;
++}
++arch_initcall(tx27_gpio_init);
++#endif
++
++EXPORT_SYMBOL(gpio_usbh2_active);
++EXPORT_SYMBOL(gpio_usbh2_inactive);
++EXPORT_SYMBOL(gpio_usbotg_hs_active);
++EXPORT_SYMBOL(gpio_usbotg_hs_inactive);
++EXPORT_SYMBOL(gpio_usbotg_fs_active);
++EXPORT_SYMBOL(gpio_usbotg_fs_inactive);
++EXPORT_SYMBOL(gpio_i2c_active);
++EXPORT_SYMBOL(gpio_i2c_inactive);
++EXPORT_SYMBOL(gpio_spi_active);
++EXPORT_SYMBOL(gpio_spi_inactive);
++EXPORT_SYMBOL(gpio_nand_active);
++EXPORT_SYMBOL(gpio_nand_inactive);
++EXPORT_SYMBOL(gpio_sensor_active);
++EXPORT_SYMBOL(gpio_sensor_inactive);
++EXPORT_SYMBOL(gpio_keypad_active);
++EXPORT_SYMBOL(gpio_keypad_inactive);
++EXPORT_SYMBOL(gpio_ata_active);
++EXPORT_SYMBOL(gpio_ata_inactive);
++EXPORT_SYMBOL(gpio_fec_active);
++EXPORT_SYMBOL(gpio_fec_inactive);
++EXPORT_SYMBOL(gpio_slcdc_active);
++EXPORT_SYMBOL(gpio_slcdc_inactive);
++EXPORT_SYMBOL(gpio_ssi_active);
++EXPORT_SYMBOL(gpio_ssi_inactive);
++EXPORT_SYMBOL(gpio_sdhc_active);
++EXPORT_SYMBOL(gpio_sdhc_inactive);
++EXPORT_SYMBOL(gpio_owire_active);
++EXPORT_SYMBOL(gpio_owire_inactive);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/Kconfig linux-2.6.28-karo/arch/arm/plat-mxc/Kconfig
+--- linux-2.6.28/arch/arm/plat-mxc/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -8,6 +8,7 @@ choice
+
+ config ARCH_MX2
+ bool "MX2-based"
++ select MXC_EMMA
+ help
+ This enables support for systems based on the Freescale i.MX2 family
+
+@@ -23,6 +24,14 @@ source "arch/arm/mach-mx3/Kconfig"
+
+ endmenu
+
++config MXC_EMMA
++ bool
++ depends on ARCH_MXC
++
++config MXC_FB_IRAM
++ bool
++ depends on ARCH_MXC
++
+ config MXC_IRQ_PRIOR
+ bool "Use IRQ priority"
+ depends on ARCH_MXC
+@@ -34,4 +43,6 @@ config MXC_IRQ_PRIOR
+ requirements for timing.
+ Say N here, unless you have a specialized requirement.
+
++config MXC_ULPI
++ bool
+ endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/Makefile linux-2.6.28-karo/arch/arm/plat-mxc/Makefile
+--- linux-2.6.28/arch/arm/plat-mxc/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -5,4 +5,6 @@
+ # Common support
+ obj-y := irq.o clock.o gpio.o time.o devices.o
+
++obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o
+ obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o
++obj-$(CONFIG_MXC_ULPI) += ulpi.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/dma-mx1-mx2.c linux-2.6.28-karo/arch/arm/plat-mxc/dma-mx1-mx2.c
+--- linux-2.6.28/arch/arm/plat-mxc/dma-mx1-mx2.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/dma-mx1-mx2.c 2009-03-11 13:16:24.000000000 +0100
+@@ -151,7 +151,7 @@ static inline int imx_dma_sg_next(int ch
+ unsigned long now;
+
+ if (!imxdma->name) {
+- printk(KERN_CRIT "%s: called for not allocated channel %d\n",
++ printk(KERN_CRIT "%s: called for unallocated channel %d\n",
+ __func__, channel);
+ return 0;
+ }
+@@ -390,20 +390,21 @@ imx_dma_setup_handlers(int channel,
+ {
+ struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+ unsigned long flags;
++ int ret = 0;
+
+- if (!imxdma->name) {
+- printk(KERN_CRIT "%s: called for not allocated channel %d\n",
++ local_irq_save(flags);
++ if (imxdma->name) {
++ __raw_writel(1 << channel, DMA_BASE + DMA_DISR);
++ imxdma->irq_handler = irq_handler;
++ imxdma->err_handler = err_handler;
++ imxdma->data = data;
++ } else {
++ ret = -ENODEV;
++ printk(KERN_CRIT "%s: called for unallocated channel %d\n",
+ __func__, channel);
+- return -ENODEV;
+ }
+-
+- local_irq_save(flags);
+- __raw_writel(1 << channel, DMA_BASE + DMA_DISR);
+- imxdma->irq_handler = irq_handler;
+- imxdma->err_handler = err_handler;
+- imxdma->data = data;
+ local_irq_restore(flags);
+- return 0;
++ return ret;
+ }
+ EXPORT_SYMBOL(imx_dma_setup_handlers);
+
+@@ -419,17 +420,18 @@ imx_dma_setup_progression_handler(int ch
+ {
+ struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+ unsigned long flags;
++ int ret = 0;
+
+- if (!imxdma->name) {
+- printk(KERN_CRIT "%s: called for not allocated channel %d\n",
++ local_irq_save(flags);
++ if (imxdma->name) {
++ imxdma->prog_handler = prog_handler;
++ } else {
++ printk(KERN_CRIT "%s: called for unallocated channel %d\n",
+ __func__, channel);
+- return -ENODEV;
++ ret = -ENODEV;
+ }
+-
+- local_irq_save(flags);
+- imxdma->prog_handler = prog_handler;
+ local_irq_restore(flags);
+- return 0;
++ return ret;
+ }
+ EXPORT_SYMBOL(imx_dma_setup_progression_handler);
+
+@@ -451,16 +453,16 @@ void imx_dma_enable(int channel)
+
+ pr_debug("imxdma%d: imx_dma_enable\n", channel);
+
++ local_irq_save(flags);
+ if (!imxdma->name) {
+- printk(KERN_CRIT "%s: called for not allocated channel %d\n",
++ printk(KERN_CRIT "%s: called for unallocated channel %d\n",
+ __func__, channel);
+- return;
++ goto out;
+ }
+
+- if (imxdma->in_use)
+- return;
+-
+- local_irq_save(flags);
++ if (imxdma->in_use) {
++ goto out;
++ }
+
+ __raw_writel(1 << channel, DMA_BASE + DMA_DISR);
+ __raw_writel(__raw_readl(DMA_BASE + DMA_DIMR) & ~(1 << channel),
+@@ -482,7 +484,7 @@ void imx_dma_enable(int channel)
+ }
+ #endif
+ imxdma->in_use = 1;
+-
++ out:
+ local_irq_restore(flags);
+ }
+ EXPORT_SYMBOL(imx_dma_enable);
+@@ -512,6 +514,7 @@ void imx_dma_disable(int channel)
+ }
+ EXPORT_SYMBOL(imx_dma_disable);
+
++#ifdef CONFIG_ARCH_MX2
+ static void imx_dma_watchdog(unsigned long chno)
+ {
+ struct imx_dma_channel *imxdma = &imx_dma_channels[chno];
+@@ -523,6 +526,7 @@ static void imx_dma_watchdog(unsigned lo
+ if (imxdma->err_handler)
+ imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT);
+ }
++#endif
+
+ static irqreturn_t dma_err_handler(int irq, void *dev_id)
+ {
+@@ -675,16 +679,16 @@ int imx_dma_request(int channel, const c
+ {
+ struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+ unsigned long flags;
+- int ret;
++ int ret = -EINVAL;
+
+ /* basic sanity checks */
+ if (!name)
+- return -EINVAL;
++ return ret;
+
+ if (channel >= IMX_DMA_CHANNELS) {
+ printk(KERN_CRIT "%s: called for non-existed channel %d\n",
+ __func__, channel);
+- return -EINVAL;
++ return ret;
+ }
+
+ local_irq_save(flags);
+@@ -692,6 +696,8 @@ int imx_dma_request(int channel, const c
+ local_irq_restore(flags);
+ return -EBUSY;
+ }
++ imxdma->name = name;
++ local_irq_restore(flags);
+
+ #ifdef CONFIG_ARCH_MX2
+ ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA",
+@@ -706,13 +712,11 @@ int imx_dma_request(int channel, const c
+ imxdma->watchdog.data = channel;
+ #endif
+
+- imxdma->name = name;
+ imxdma->irq_handler = NULL;
+ imxdma->err_handler = NULL;
+ imxdma->data = NULL;
+ imxdma->sg = NULL;
+
+- local_irq_restore(flags);
+ return 0;
+ }
+ EXPORT_SYMBOL(imx_dma_request);
+@@ -726,14 +730,14 @@ void imx_dma_free(int channel)
+ unsigned long flags;
+ struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+
++ local_irq_save(flags);
+ if (!imxdma->name) {
+ printk(KERN_CRIT
+ "%s: trying to free free channel %d\n",
+ __func__, channel);
+- return;
++ goto out;
+ }
+
+- local_irq_save(flags);
+ /* Disable interrupts */
+ __raw_writel(__raw_readl(DMA_BASE + DMA_DIMR) | (1 << channel),
+ DMA_BASE + DMA_DIMR);
+@@ -744,7 +748,7 @@ void imx_dma_free(int channel)
+ #ifdef CONFIG_ARCH_MX2
+ free_irq(MXC_INT_DMACH0 + channel, NULL);
+ #endif
+-
++ out:
+ local_irq_restore(flags);
+ }
+ EXPORT_SYMBOL(imx_dma_free);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/gpio.c linux-2.6.28-karo/arch/arm/plat-mxc/gpio.c
+--- linux-2.6.28/arch/arm/plat-mxc/gpio.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/gpio.c 2009-03-11 18:50:00.000000000 +0100
+@@ -22,18 +22,42 @@
+ #include <linux/init.h>
+ #include <linux/io.h>
+ #include <linux/irq.h>
++#include <linux/interrupt.h>
+ #include <linux/gpio.h>
++#include <linux/sysdev.h>
++#include <linux/pm.h>
+ #include <mach/hardware.h>
+ #include <asm-generic/bug.h>
+
+ static struct mxc_gpio_port *mxc_gpio_ports;
+ static int gpio_table_size;
+
++#ifdef DEBUG
++static inline void __mxc_gpio_writel(unsigned int val,
++ volatile unsigned int __force *addr,
++ const char *fn)
++{
++ printk(KERN_DEBUG "%s: Writing %08x to %p\n", fn, val, addr);
++ __raw_writel(val addr);
++}
++
++static inline unsigned int __mxc_gpio_readl(volatile unsigned int __force *addr)
++{
++ printk(KERN_DEBUG "Writing %08x to %p\n", val, addr);
++ __raw_readl(val addr);
++}
++#define mxc_gpio_writel(v,a) __mxc_gpio_writel(v, a, __func__)
++#define mxc_gpio_readl(a) __mxc_gpio_readl(a, __func__)
++#else
++#define mxc_gpio_writel __raw_writel
++#define mxc_gpio_readl __raw_readl
++#endif
++
+ /* Note: This driver assumes 32 GPIOs are handled in one register */
+
+ static void _clear_gpio_irqstatus(struct mxc_gpio_port *port, u32 index)
+ {
+- __raw_writel(1 << index, port->base + GPIO_ISR);
++ mxc_gpio_writel(1 << index, port->base + GPIO_ISR);
+ }
+
+ static void _set_gpio_irqenable(struct mxc_gpio_port *port, u32 index,
+@@ -41,15 +65,21 @@ static void _set_gpio_irqenable(struct m
+ {
+ u32 l;
+
+- l = __raw_readl(port->base + GPIO_IMR);
++ l = mxc_gpio_readl(port->base + GPIO_IMR);
+ l = (l & (~(1 << index))) | (!!enable << index);
+- __raw_writel(l, port->base + GPIO_IMR);
++ mxc_gpio_writel(l, port->base + GPIO_IMR);
+ }
+
+-static void gpio_ack_irq(u32 irq)
++static void _set_gpio_edge_ctrl(struct mxc_gpio_port *port, u32 index,
++ int edge)
+ {
+- u32 gpio = irq_to_gpio(irq);
+- _clear_gpio_irqstatus(&mxc_gpio_ports[gpio / 32], gpio & 0x1f);
++ void __iomem *reg = port->base;
++ u32 bit, val;
++
++ reg += (index >> 4) ? GPIO_ICR2 : GPIO_ICR1;
++ bit = (index & 0xf) << 1;
++ val = mxc_gpio_readl(reg) & ~(0x3 << bit);
++ mxc_gpio_writel(val | (edge << bit), reg);
+ }
+
+ static void gpio_mask_irq(u32 irq)
+@@ -64,35 +94,73 @@ static void gpio_unmask_irq(u32 irq)
+ _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 1);
+ }
+
++static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset);
++
++static void gpio_ack_irq(u32 irq)
++{
++ u32 gpio = irq_to_gpio(irq);
++ struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32];
++ int bit = 1 << (gpio & 0x1f);
++
++ if (port->level_irq & bit) {
++ gpio_mask_irq(irq);
++ } else if (port->both_edge_irq & bit) {
++ if (mxc_gpio_get(&port->chip, gpio & 0x1f)) {
++ _set_gpio_edge_ctrl(port, gpio, GPIO_INT_FALL_EDGE);
++ } else {
++ _set_gpio_edge_ctrl(port, gpio, GPIO_INT_RISE_EDGE);
++ }
++ }
++ _clear_gpio_irqstatus(port, gpio & 0x1f);
++}
++
+ static int gpio_set_irq_type(u32 irq, u32 type)
+ {
+ u32 gpio = irq_to_gpio(irq);
+ struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32];
+- u32 bit, val;
++ u32 bitmask = 1 << (gpio & 0x1f);
+ int edge;
+- void __iomem *reg = port->base;
+
+ switch (type) {
+ case IRQ_TYPE_EDGE_RISING:
+ edge = GPIO_INT_RISE_EDGE;
++ port->level_irq &= ~bitmask;
++ port->both_edge_irq &= ~bitmask;
++ __set_irq_handler_unlocked(irq, handle_edge_irq);
+ break;
+ case IRQ_TYPE_EDGE_FALLING:
+ edge = GPIO_INT_FALL_EDGE;
++ port->level_irq &= ~bitmask;
++ port->both_edge_irq &= ~bitmask;
++ __set_irq_handler_unlocked(irq, handle_edge_irq);
+ break;
+ case IRQ_TYPE_LEVEL_LOW:
++ port->level_irq |= bitmask;
++ port->both_edge_irq &= ~bitmask;
+ edge = GPIO_INT_LOW_LEV;
++ __set_irq_handler_unlocked(irq, handle_level_irq);
+ break;
+ case IRQ_TYPE_LEVEL_HIGH:
++ port->level_irq |= bitmask;
++ port->both_edge_irq &= ~bitmask;
+ edge = GPIO_INT_HIGH_LEV;
++ __set_irq_handler_unlocked(irq, handle_level_irq);
++ break;
++ case IRQ_TYPE_EDGE_BOTH:
++ port->level_irq &= ~bitmask;
++ port->both_edge_irq |= bitmask;
++ if (mxc_gpio_get(&port->chip, gpio & 0x1f)) {
++ edge = GPIO_INT_FALL_EDGE;
++ } else {
++ edge = GPIO_INT_RISE_EDGE;
++ }
++ __set_irq_handler_unlocked(irq, handle_edge_irq);
+ break;
+- default: /* this includes IRQ_TYPE_EDGE_BOTH */
++ default:
+ return -EINVAL;
+ }
+
+- reg += GPIO_ICR1 + ((gpio & 0x10) >> 2); /* lower or upper register */
+- bit = gpio & 0xf;
+- val = __raw_readl(reg) & ~(0x3 << (bit << 1));
+- __raw_writel(val | (edge << (bit << 1)), reg);
++ _set_gpio_edge_ctrl(port, gpio, edge);
+ _clear_gpio_irqstatus(port, gpio & 0x1f);
+
+ return 0;
+@@ -115,15 +183,15 @@ static void mxc_gpio_irq_handler(struct
+ }
+ }
+
+-#ifdef CONFIG_ARCH_MX3
+-/* MX3 has one interrupt *per* gpio port */
++#if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1)
++/* MX1 and MX3 has one interrupt *per* gpio port */
+ static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc)
+ {
+ u32 irq_stat;
+- struct mxc_gpio_port *port = (struct mxc_gpio_port *)get_irq_data(irq);
++ struct mxc_gpio_port *port = get_irq_data(irq);
+
+- irq_stat = __raw_readl(port->base + GPIO_ISR) &
+- __raw_readl(port->base + GPIO_IMR);
++ irq_stat = mxc_gpio_readl(port->base + GPIO_ISR) &
++ mxc_gpio_readl(port->base + GPIO_IMR);
+ BUG_ON(!irq_stat);
+ mxc_gpio_irq_handler(port, irq_stat);
+ }
+@@ -135,26 +203,52 @@ static void mx2_gpio_irq_handler(u32 irq
+ {
+ int i;
+ u32 irq_msk, irq_stat;
+- struct mxc_gpio_port *port = (struct mxc_gpio_port *)get_irq_data(irq);
++ struct mxc_gpio_port *port = get_irq_data(irq);
+
+ /* walk through all interrupt status registers */
+ for (i = 0; i < gpio_table_size; i++) {
+- irq_msk = __raw_readl(port[i].base + GPIO_IMR);
++ irq_msk = mxc_gpio_readl(port[i].base + GPIO_IMR);
+ if (!irq_msk)
+ continue;
+
+- irq_stat = __raw_readl(port[i].base + GPIO_ISR) & irq_msk;
++ irq_stat = mxc_gpio_readl(port[i].base + GPIO_ISR) & irq_msk;
+ if (irq_stat)
+ mxc_gpio_irq_handler(&port[i], irq_stat);
+ }
+ }
+ #endif
+
++/*
++ * Set interrupt number "irq" in the GPIO as a wakeup source.
++ * While system is running all registered GPIO interrupts need to have
++ * wakeup enabled. When system is suspended, only selected GPIO interrupts
++ * need to have wakeup enabled.
++ * @param irq interrupt source number
++ * @param enable enable as wakeup if equal to non-zero
++ * @return This function returns 0 on success.
++ */
++static int gpio_set_wake_irq(u32 irq, u32 enable)
++{
++ u32 gpio = irq_to_gpio(irq);
++ u32 gpio_idx = gpio & 0x1f;
++ struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32];
++
++ if ((gpio / 32) >= gpio_table_size)
++ return -EINVAL;
++
++ if (enable)
++ port->suspend_wakeup |= (1 << gpio_idx);
++ else
++ port->suspend_wakeup &= ~(1 << gpio_idx);
++ return 0;
++}
++
+ static struct irq_chip gpio_irq_chip = {
+ .ack = gpio_ack_irq,
+ .mask = gpio_mask_irq,
+ .unmask = gpio_unmask_irq,
+ .set_type = gpio_set_irq_type,
++ .set_wake = gpio_set_wake_irq,
+ };
+
+ static void _set_gpio_direction(struct gpio_chip *chip, unsigned offset,
+@@ -164,12 +258,12 @@ static void _set_gpio_direction(struct g
+ container_of(chip, struct mxc_gpio_port, chip);
+ u32 l;
+
+- l = __raw_readl(port->base + GPIO_GDIR);
++ l = mxc_gpio_readl(port->base + GPIO_GDIR);
+ if (dir)
+ l |= 1 << offset;
+ else
+ l &= ~(1 << offset);
+- __raw_writel(l, port->base + GPIO_GDIR);
++ mxc_gpio_writel(l, port->base + GPIO_GDIR);
+ }
+
+ static void mxc_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+@@ -178,9 +272,12 @@ static void mxc_gpio_set(struct gpio_chi
+ container_of(chip, struct mxc_gpio_port, chip);
+ void __iomem *reg = port->base + GPIO_DR;
+ u32 l;
++ unsigned long flags;
+
+- l = (__raw_readl(reg) & (~(1 << offset))) | (value << offset);
+- __raw_writel(l, reg);
++ local_irq_save(flags);
++ l = (mxc_gpio_readl(reg) & (~(1 << offset))) | (value << offset);
++ mxc_gpio_writel(l, reg);
++ local_irq_restore(flags);
+ }
+
+ static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset)
+@@ -188,20 +285,32 @@ static int mxc_gpio_get(struct gpio_chip
+ struct mxc_gpio_port *port =
+ container_of(chip, struct mxc_gpio_port, chip);
+
+- return (__raw_readl(port->base + GPIO_PSR) >> offset) & 1;
++ return (mxc_gpio_readl(port->base + GPIO_PSR) >> offset) & 1;
+ }
+
+ static int mxc_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
+ {
++ unsigned long flags;
++
++ local_irq_save(flags);
+ _set_gpio_direction(chip, offset, 0);
++ local_irq_restore(flags);
+ return 0;
+ }
+
+ static int mxc_gpio_direction_output(struct gpio_chip *chip,
+ unsigned offset, int value)
+ {
+- _set_gpio_direction(chip, offset, 1);
++ unsigned long flags;
++
++ local_irq_save(flags);
++ /*
++ * set the output data register _before_ potentially changing
++ * the pin direction to prevent glitches on the output
++ */
+ mxc_gpio_set(chip, offset, value);
++ _set_gpio_direction(chip, offset, 1);
++ local_irq_restore(flags);
+ return 0;
+ }
+
+@@ -217,10 +326,10 @@ int __init mxc_gpio_init(struct mxc_gpio
+
+ for (i = 0; i < cnt; i++) {
+ /* disable the interrupt and clear the status */
+- __raw_writel(0, port[i].base + GPIO_IMR);
+- __raw_writel(~0, port[i].base + GPIO_ISR);
++ mxc_gpio_writel(0, port[i].base + GPIO_IMR);
++ mxc_gpio_writel(~0, port[i].base + GPIO_ISR);
+ for (j = port[i].virtual_irq_start;
+- j < port[i].virtual_irq_start + 32; j++) {
++ j < port[i].virtual_irq_start + 32; j++) {
+ set_irq_chip(j, &gpio_irq_chip);
+ set_irq_handler(j, handle_edge_irq);
+ set_irq_flags(j, IRQF_VALID);
+@@ -235,9 +344,9 @@ int __init mxc_gpio_init(struct mxc_gpio
+ port[i].chip.ngpio = 32;
+
+ /* its a serious configuration bug when it fails */
+- BUG_ON( gpiochip_add(&port[i].chip) < 0 );
++ BUG_ON(gpiochip_add(&port[i].chip) < 0);
+
+-#ifdef CONFIG_ARCH_MX3
++#if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1)
+ /* setup one handler for each entry */
+ set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler);
+ set_irq_data(port[i].irq, &port[i]);
+@@ -251,3 +360,126 @@ int __init mxc_gpio_init(struct mxc_gpio
+ #endif
+ return 0;
+ }
++
++#ifdef CONFIG_PM
++/*
++ * This function puts the GPIO in low-power mode/state.
++ * All the interrupts that are enabled are first saved.
++ * Only those interrupts which registers as a wake source by calling
++ * enable_irq_wake are enabled. All other interrupts are disabled.
++ *
++ * @param dev the system device structure used to give information
++ * on GPIO to suspend
++ * @param mesg the power state the device is entering
++ *
++ * @return The function always returns 0.
++ */
++static int mxc_gpio_suspend(struct sys_device *dev, pm_message_t mesg)
++{
++ int ret = 0;
++ int i;
++ int wakeup = 0;
++
++ for (i = 0; i < gpio_table_size; i++) {
++ struct mxc_gpio_port *port = &mxc_gpio_ports[i];
++
++ if (__raw_readl(port->base + GPIO_ISR) & port->suspend_wakeup)
++ return -EBUSY;
++
++ port->saved_wakeup = __raw_readl(port->base + GPIO_IMR);
++ __raw_writel(port->suspend_wakeup, port->base + GPIO_IMR);
++
++ if (port->suspend_wakeup) {
++ wakeup = 1;
++ }
++ if (ret != 0) {
++ while (--i >= 0) {
++ port = &mxc_gpio_ports[i];
++ __raw_writel(port->saved_wakeup,
++ port->base + GPIO_IMR);
++ }
++ return ret;
++ }
++ }
++ if (wakeup)
++ ret = enable_irq_wake(MXC_INT_GPIO);
++
++ return ret;
++}
++
++/*
++ * This function brings the GPIO back from low-power state.
++ * All the interrupts enabled before suspension are re-enabled from
++ * the saved information.
++ *
++ * @param dev the system device structure used to give information
++ * on GPIO to resume
++ *
++ * @return The function always returns 0.
++ */
++static int mxc_gpio_resume(struct sys_device *dev)
++{
++ int i;
++ int wakeup = 0;
++
++ for (i = 0; i < gpio_table_size; i++) {
++ struct mxc_gpio_port *port = &mxc_gpio_ports[i];
++
++ __raw_writel(port->saved_wakeup, port->base + GPIO_IMR);
++ if (port->suspend_wakeup) {
++ wakeup = 1;
++ }
++ }
++ if (wakeup)
++ disable_irq_wake(MXC_INT_GPIO);
++
++ return 0;
++}
++#else
++#define mxc_gpio_suspend NULL
++#define mxc_gpio_resume NULL
++#endif /* CONFIG_PM */
++
++/*
++ * This structure contains pointers to the power management callback functions.
++ */
++static struct sysdev_class mxc_gpio_sysclass = {
++ .name = "mxc_gpio",
++ .suspend = mxc_gpio_suspend,
++ .resume = mxc_gpio_resume,
++};
++
++/*
++ * This structure represents GPIO as a system device.
++ * System devices follow a slightly different driver model.
++ * They don't need to do dynammic driver binding, can't be probed,
++ * and don't reside on any type of peripheral bus.
++ * So, it is represented and treated a little differently.
++ */
++static struct sys_device mxc_gpio_device = {
++ .cls = &mxc_gpio_sysclass,
++};
++
++/*
++ * This function registers GPIO hardware as a system device and
++ * intializes all the GPIO ports if not already done.
++ * System devices will only be suspended with interrupts disabled, and
++ * after all other devices have been suspended. On resume, they will be
++ * resumed before any other devices, and also with interrupts disabled.
++ * This may get called early from board specific init
++ *
++ * @return This function returns 0 on success.
++ */
++int __init mxc_gpio_sys_init(void)
++{
++ int ret = 0;
++
++ ret = sysdev_class_register(&mxc_gpio_sysclass);
++ if (ret)
++ return ret;
++ ret = sysdev_register(&mxc_gpio_device);
++ if (ret != 0)
++ sysdev_class_unregister(&mxc_gpio_sysclass);
++
++ return ret;
++}
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/debug-macro.S linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/debug-macro.S
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/debug-macro.S 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/debug-macro.S 2009-03-11 13:16:24.000000000 +0100
+@@ -28,6 +28,9 @@
+ #ifdef CONFIG_MACH_PCM038
+ #include <mach/board-pcm038.h>
+ #endif
++#ifdef CONFIG_MACH_TX27
++#include <mach/board-tx27.h>
++#endif
+ .macro addruart,rx
+ mrc p15, 0, \rx, c1, c0
+ tst \rx, #1 @ MMU enabled?
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/gpio.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/gpio.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/gpio.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/gpio.h 2009-03-11 13:16:24.000000000 +0100
+@@ -35,6 +35,12 @@ struct mxc_gpio_port {
+ int irq;
+ int virtual_irq_start;
+ struct gpio_chip chip;
++ u32 level_irq;
++ u32 both_edge_irq;
++#ifdef CONFIG_PM
++ u32 suspend_wakeup;
++ u32 saved_wakeup;
++#endif
+ };
+
+ int mxc_gpio_init(struct mxc_gpio_port*, int);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/imx_cam.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imx_cam.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/imx_cam.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imx_cam.h 2009-01-05 17:47:15.000000000 +0100
+@@ -0,0 +1,47 @@
++/*
++ imx-cam.h - i.MX27 camera driver header file
++
++ Copyright (C) 2003, Intel Corporation
++ Copyright (C) 2008, Sascha Hauer <s.hauer@pengutronix.de>
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#ifndef __ASM_ARCH_CAMERA_H_
++#define __ASM_ARCH_CAMERA_H_
++
++#define MX27_CAMERA_SWAP16 (1 << 0)
++#define MX27_CAMERA_EXT_VSYNC (1 << 1)
++#define MX27_CAMERA_CCIR (1 << 2)
++#define MX27_CAMERA_CCIR_INTERLACE (1 << 3)
++#define MX27_CAMERA_HSYNC_HIGH (1 << 4)
++#define MX27_CAMERA_GATED_CLOCK (1 << 5)
++#define MX27_CAMERA_INV_DATA (1 << 6)
++#define MX27_CAMERA_PCLK_SAMPLE_RISING (1 << 7)
++#define MX27_CAMERA_PACK_DIR_MSB (1 << 8)
++
++struct mx27_camera_platform_data {
++ int (*init)(struct platform_device *);
++ int (*exit)(struct platform_device *);
++
++ unsigned long flags;
++
++ unsigned long clk;
++};
++
++extern int mx27_init_camera(struct mx27_camera_platform_data *);
++
++#endif /* __ASM_ARCH_CAMERA_H_ */
++
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/imx_i2c.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imx_i2c.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/imx_i2c.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imx_i2c.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,81 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef __ASM_ARCH_MXC_I2C_H__
++#define __ASM_ARCH_MXC_I2C_H__
++
++struct imx_i2c_platform_data {
++ u32 max_clk;
++ int (*init)(struct platform_device *pdev);
++ int (*exit)(struct platform_device *pdev);
++};
++
++/*
++ * This file contains the I2C chip level configuration details.
++ *
++ * It also contains the API function that other drivers can use to read/write
++ * to the I2C device registers.
++ */
++
++/*
++ * This defines the string used to identify MXC I2C Bus drivers
++ */
++#define MXC_ADAPTER_NAME "MXC I2C Adapter"
++
++#define MXC_I2C_FLAG_READ 0x01 /* if set, is read; else is write */
++#define MXC_I2C_FLAG_POLLING 0x02 /* if set, is polling mode; else is interrupt mode */
++
++int mxc_i2c_read(int bus_id, unsigned int addr, char *reg, int reg_len,
++ char *buf, int num);
++
++int mxc_i2c_write(int bus_id, unsigned int addr, char *reg, int reg_len,
++ char *buf, int num);
++
++int mxc_i2c_polling_read(int bus_id, unsigned int addr, char *reg, int reg_len,
++ char *buf, int num);
++
++int mxc_i2c_polling_write(int bus_id, unsigned int addr, char *reg, int reg_len,
++ char *buf, int num);
++
++/* FIXME: This should be in a generic register file */
++
++/* Address offsets of the I2C registers */
++#define MXC_IADR 0x00 /* Address Register */
++#define MXC_IFDR 0x04 /* Freq div register */
++#define MXC_I2CR 0x08 /* Control regsiter */
++#define MXC_I2SR 0x0C /* Status register */
++#define MXC_I2DR 0x10 /* Data I/O register */
++
++/* Bit definitions of I2CR */
++#define MXC_I2CR_IEN 0x0080
++#define MXC_I2CR_IIEN 0x0040
++#define MXC_I2CR_MSTA 0x0020
++#define MXC_I2CR_MTX 0x0010
++#define MXC_I2CR_TXAK 0x0008
++#define MXC_I2CR_RSTA 0x0004
++
++/* Bit definitions of I2SR */
++#define MXC_I2SR_ICF 0x0080
++#define MXC_I2SR_IAAS 0x0040
++#define MXC_I2SR_IBB 0x0020
++#define MXC_I2SR_IAL 0x0010
++#define MXC_I2SR_SRW 0x0004
++#define MXC_I2SR_IIF 0x0002
++#define MXC_I2SR_RXAK 0x0001
++
++#endif /* __ASM_ARCH_MXC_I2C_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/imx_spi.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imx_spi.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/imx_spi.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imx_spi.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,220 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
++ * Copyright 2008 Luotao Fu, kernel@pengutronix.de
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef __MXC_SPI_MX27_H__
++#define __MXC_SPI_MX27_H__
++
++#include <mach/hardware.h>
++#include <asm/mach-types.h>
++
++/*
++ * This structure is used to define the SPI master controller's platform
++ * data. It includes the SPI bus number and the maximum number of
++ * slaves/chips it supports.
++ */
++struct mxc_spi_master {
++ unsigned int bus_num; /* bus number. */
++ unsigned int maxchipselect; /* number of chip selects. */
++ unsigned int spi_version; /* CSPI Hardware Version. */
++
++ int (*init)(struct platform_device *pdev);
++ int (*exit)(struct platform_device *pdev);
++};
++
++/* Register definitions.
++ * XXX: The ifdef CONFIG_ARCH_MX2 segments are merged from the
++ * freescale mxc_spi_mx27.h. This is actually highly strange, since according
++ * to the processor reference manuals the spi controllers on mx27 and mx31 are
++ * identical. We might want to clearify this after chatting with freescale on
++ * this issue */
++
++#define MXC_CSPIRXDATA 0x00
++#define MXC_CSPITXDATA 0x04
++#define MXC_CSPICTRL 0x08
++#define MXC_CSPIINT 0x0C
++
++#ifdef CONFIG_ARCH_MX2
++#define MXC_CSPIDMA 0x18
++#define MXC_CSPISTAT 0x0C
++#define MXC_CSPIPERIOD 0x14
++#define MXC_CSPITEST 0x10
++#define MXC_CSPIRESET 0x1C
++#define MXC_CSPICTRL_ENABLE (1 << 10)
++#else
++#define MXC_CSPIDMA 0x10
++#define MXC_CSPISTAT 0x14
++#define MXC_CSPIPERIOD 0x18
++#define MXC_CSPITEST 0x1C
++#define MXC_CSPIRESET 0x00
++#define MXC_CSPICTRL_ENABLE 0x1
++#endif
++
++#define MXC_CSPICTRL_DISABLE 0x0
++
++#ifdef CONFIG_ARCH_MX2
++#define MXC_CSPICTRL_MASTER (1 << 11)
++#else
++#define MXC_CSPICTRL_MASTER (1 << 1)
++#endif
++
++#define MXC_CSPICTRL_SLAVE 0x0
++
++#ifdef CONFIG_ARCH_MX2
++#define MXC_CSPICTRL_XCH (1 << 9)
++#define MXC_CSPICTRL_LOWPOL (1 << 5)
++#else
++#define MXC_CSPICTRL_XCH (1 << 2)
++#define MXC_CSPICTRL_SMC (1 << 3)
++#define MXC_CSPICTRL_LOWPOL (1 << 4)
++#endif
++
++#define MXC_CSPICTRL_HIGHPOL 0x0
++
++#ifdef CONFIG_ARCH_MX2
++#define MXC_CSPICTRL_PHA (1 << 6)
++#else
++#define MXC_CSPICTRL_PHA (1 << 5)
++#endif
++
++#define MXC_CSPICTRL_NOPHA 0x0
++
++#ifdef CONFIG_ARCH_MX2
++#define MXC_CSPICTRL_SSCTL (1 << 7)
++#define MXC_CSPICTRL_HIGHSSPOL (1 << 8)
++#else
++#define MXC_CSPICTRL_SSCTL (1 << 6)
++#define MXC_CSPICTRL_HIGHSSPOL (1 << 7)
++#endif
++
++#define MXC_CSPICTRL_LOWSSPOL 0x0
++#define MXC_CSPICTRL_CSMASK 0x3
++
++#ifdef CONFIG_ARCH_MX2
++#define MXC_CSPICTRL_MAXDATRATE 0x10
++#define MXC_CSPICTRL_DATAMASK 0x1F
++#define MXC_CSPICTRL_DATASHIFT 14
++/* This adjustment in the shift is valid only for even states only(i.e. divide
++ ratio of 2). SDHC_SPIEN is not set by default. If SDHC_SPIEN bit is set in
++ MXC_CSPICTRL, then divide ratio is 3, this shift adjustment is invalid. */
++#define MXC_CSPICTRL_ADJUST_SHIFT(x) ((x) = ((x) - 1) * 2)
++#else
++#define MXC_CSPICTRL_MAXDATRATE 0x7
++#define MXC_CSPICTRL_DATAMASK 0x7
++#define MXC_CSPICTRL_DATASHIFT 16
++#define MXC_CSPICTRL_ADJUST_SHIFT(x) ((x) -= 2)
++#endif
++
++#define MXC_CSPICTRL_CSSHIFT_0_7 12
++#define MXC_CSPICTRL_BCSHIFT_0_7 20
++#define MXC_CSPICTRL_BCMASK_0_7 0xFFF
++#define MXC_CSPICTRL_DRCTRLSHIFT_0_7 8
++
++#define MXC_CSPICTRL_CSSHIFT_0_5 12
++#define MXC_CSPICTRL_BCSHIFT_0_5 20
++#define MXC_CSPICTRL_BCMASK_0_5 0xFFF
++#define MXC_CSPICTRL_DRCTRLSHIFT_0_5 8
++
++#define MXC_CSPICTRL_CSSHIFT_0_4 24
++#define MXC_CSPICTRL_BCSHIFT_0_4 8
++#define MXC_CSPICTRL_BCMASK_0_4 0x1F
++#define MXC_CSPICTRL_DRCTRLSHIFT_0_4 20
++
++#define MXC_CSPICTRL_CSSHIFT_0_0 19
++#define MXC_CSPICTRL_BCSHIFT_0_0 0
++#define MXC_CSPICTRL_BCMASK_0_0 0x1F
++#define MXC_CSPICTRL_DRCTRLSHIFT_0_0 12
++
++#define MXC_CSPIINT_IRQSHIFT_0_7 8
++#define MXC_CSPIINT_IRQSHIFT_0_5 9
++#define MXC_CSPIINT_IRQSHIFT_0_4 9
++#define MXC_CSPIINT_IRQSHIFT_0_0 18
++
++#ifdef CONFIG_ARCH_MX2
++#define MXC_CSPIINT_TEEN (1 << 9)
++#define MXC_CSPIINT_THEN (1 << 10)
++#define MXC_CSPIINT_TFEN (1 << 11)
++#define MXC_CSPIINT_RREN (1 << 13)
++#define MXC_CSPIINT_RHEN (1 << 14)
++#define MXC_CSPIINT_RFEN (1 << 15)
++#define MXC_CSPIINT_ROEN (1 << 16)
++#else
++#define MXC_CSPIINT_TEEN (1 << 0)
++#define MXC_CSPIINT_THEN (1 << 1)
++#define MXC_CSPIINT_TFEN (1 << 2)
++#define MXC_CSPIINT_RREN (1 << 3)
++#define MXC_CSPIINT_RHEN (1 << 4)
++#define MXC_CSPIINT_RFEN (1 << 5)
++#define MXC_CSPIINT_ROEN (1 << 6)
++#endif
++
++#define MXC_CSPIINT_TCEN_0_7 (1 << 7)
++#define MXC_CSPIINT_TCEN_0_5 (1 << 8)
++#define MXC_CSPIINT_TCEN_0_4 (1 << 8)
++
++#ifdef CONFIG_ARCH_MX2
++#define MXC_CSPIINT_TCEN_0_0 (1 << 12)
++#else
++#define MXC_CSPIINT_TCEN_0_0 (1 << 3)
++#endif
++
++#define MXC_CSPIINT_BOEN_0_7 0
++#define MXC_CSPIINT_BOEN_0_5 (1 << 7)
++#define MXC_CSPIINT_BOEN_0_4 (1 << 7)
++
++#ifdef CONFIG_ARCH_MX2
++#define MXC_CSPIINT_BOEN_0_0 (1 << 17)
++#else
++#define MXC_CSPIINT_BOEN_0_0 (1 << 8)
++#endif
++
++#define MXC_CSPISTAT_TE (1 << 0)
++#define MXC_CSPISTAT_TH (1 << 1)
++#define MXC_CSPISTAT_TF (1 << 2)
++#define MXC_CSPISTAT_RR (1 << 3)
++#define MXC_CSPISTAT_RH (1 << 4)
++#define MXC_CSPISTAT_RF (1 << 5)
++#define MXC_CSPISTAT_RO (1 << 6)
++#define MXC_CSPISTAT_TC_0_7 (1 << 7)
++#define MXC_CSPISTAT_TC_0_5 (1 << 8)
++#define MXC_CSPISTAT_TC_0_4 (1 << 8)
++#define MXC_CSPISTAT_TC_0_0 (1 << 3)
++#define MXC_CSPISTAT_BO_0_7 0
++#define MXC_CSPISTAT_BO_0_5 (1 << 7)
++#define MXC_CSPISTAT_BO_0_4 (1 << 7)
++#define MXC_CSPISTAT_BO_0_0 (1 << 8)
++
++#define MXC_CSPIPERIOD_32KHZ (1 << 15)
++
++#define MXC_CSPITEST_LBC (1 << 14)
++
++/*
++ * This structure contains information that differs with
++ * SPI master controller hardware version
++ */
++struct mxc_spi_unique_def {
++ unsigned int intr_bit_shift; /* Width of valid bits in MXC_CSPIINT. */
++ unsigned int cs_shift; /* Chip Select shift. */
++ unsigned int bc_shift; /* Bit count shift. */
++ unsigned int bc_mask; /* Bit count mask. */
++ unsigned int drctrl_shift; /* Data Control shift. */
++ unsigned int xfer_complete; /* Transfer Complete shift. */
++ unsigned int bc_overflow; /* Bit counnter overflow shift. */
++};
++
++#endif /*__MXC_SPI_MX27_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/imx_ssi.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imx_ssi.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/imx_ssi.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imx_ssi.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,191 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef __ASM_ARCH_MXC_SSI_H
++#define __ASM_ARCH_MXC_SSI_H
++
++#include <linux/platform_device.h>
++
++struct imx_ssi_platform_data {
++ int (*init)(struct platform_device *pdev);
++ int (*exit)(struct platform_device *pdev);
++};
++
++#define SSI_STX0 0x00
++#define SSI_STX1 0x04
++#define SSI_SRX0 0x08
++#define SSI_SRX1 0x0c
++
++#define SSI_SCR 0x10
++# define SSI_SCR_CLK_IST (1 << 9)
++# define SSI_SCR_CLK_IST_SHIFT 9
++# define SSI_SCR_TCH_EN (1 << 8)
++# define SSI_SCR_SYS_CLK_EN (1 << 7)
++# define SSI_SCR_I2S_MODE_NORM (0 << 5)
++# define SSI_SCR_I2S_MODE_MSTR (1 << 5)
++# define SSI_SCR_I2S_MODE_SLAVE (2 << 5)
++# define SSI_SCR_SYN (1 << 4)
++# define SSI_SCR_NET (1 << 3)
++# define SSI_SCR_RE (1 << 2)
++# define SSI_SCR_TE (1 << 1)
++# define SSI_SCR_SSIEN (1 << 0)
++# define SSI_I2S_MODE_SHIFT 5
++
++#define SSI_SISR 0x14
++# define SSI_SISR_MASK ((1 << 19) - 1)
++# define SSI_SISR_CMDAU (1 << 18)
++# define SSI_SISR_CMDDU (1 << 17)
++# define SSI_SISR_RXT (1 << 16)
++# define SSI_SISR_RDR1 (1 << 15)
++# define SSI_SISR_RDR0 (1 << 14)
++# define SSI_SISR_TDE1 (1 << 13)
++# define SSI_SISR_TDE0 (1 << 12)
++# define SSI_SISR_ROE1 (1 << 11)
++# define SSI_SISR_ROE0 (1 << 10)
++# define SSI_SISR_TUE1 (1 << 9)
++# define SSI_SISR_TUE0 (1 << 8)
++# define SSI_SISR_TFS (1 << 7)
++# define SSI_SISR_RFS (1 << 6)
++# define SSI_SISR_TLS (1 << 5)
++# define SSI_SISR_RLS (1 << 4)
++# define SSI_SISR_RFF1 (1 << 3)
++# define SSI_SISR_RFF0 (1 << 2)
++# define SSI_SISR_TFE1 (1 << 1)
++# define SSI_SISR_TFE0 (1 << 0)
++
++#define SSI_SIER 0x18
++# define SSI_SIER_RDMAE (1 << 22)
++# define SSI_SIER_RIE (1 << 21)
++# define SSI_SIER_TDMAE (1 << 20)
++# define SSI_SIER_TIE (1 << 19)
++# define SSI_SIER_CMDAU_EN (1 << 18)
++# define SSI_SIER_CMDDU_EN (1 << 17)
++# define SSI_SIER_RXT_EN (1 << 16)
++# define SSI_SIER_RDR1_EN (1 << 15)
++# define SSI_SIER_RDR0_EN (1 << 14)
++# define SSI_SIER_TDE1_EN (1 << 13)
++# define SSI_SIER_TDE0_EN (1 << 12)
++# define SSI_SIER_ROE1_EN (1 << 11)
++# define SSI_SIER_ROE0_EN (1 << 10)
++# define SSI_SIER_TUE1_EN (1 << 9)
++# define SSI_SIER_TUE0_EN (1 << 8)
++# define SSI_SIER_TFS_EN (1 << 7)
++# define SSI_SIER_RFS_EN (1 << 6)
++# define SSI_SIER_TLS_EN (1 << 5)
++# define SSI_SIER_RLS_EN (1 << 4)
++# define SSI_SIER_RFF1_EN (1 << 3)
++# define SSI_SIER_RFF0_EN (1 << 2)
++# define SSI_SIER_TFE1_EN (1 << 1)
++# define SSI_SIER_TFE0_EN (1 << 0)
++
++#define SSI_STCR 0x1c
++# define SSI_STCR_TXBIT0 (1 << 9)
++# define SSI_STCR_TFEN1 (1 << 8)
++# define SSI_STCR_TFEN0 (1 << 7)
++# define SSI_FIFO_ENABLE_0_SHIFT 7
++# define SSI_STCR_TFDIR (1 << 6)
++# define SSI_STCR_TXDIR (1 << 5)
++# define SSI_STCR_TSHFD (1 << 4)
++# define SSI_STCR_TSCKP (1 << 3)
++# define SSI_STCR_TFSI (1 << 2)
++# define SSI_STCR_TFSL (1 << 1)
++# define SSI_STCR_TEFS (1 << 0)
++
++#define SSI_SRCR 0x20
++# define SSI_SRCR_RXBIT0 (1 << 9)
++# define SSI_SRCR_RFEN1 (1 << 8)
++# define SSI_SRCR_RFEN0 (1 << 7)
++# define SSI_FIFO_ENABLE_0_SHIFT 7
++# define SSI_SRCR_RFDIR (1 << 6)
++# define SSI_SRCR_RXDIR (1 << 5)
++# define SSI_SRCR_RSHFD (1 << 4)
++# define SSI_SRCR_RSCKP (1 << 3)
++# define SSI_SRCR_RFSI (1 << 2)
++# define SSI_SRCR_RFSL (1 << 1)
++# define SSI_SRCR_REFS (1 << 0)
++
++#define SSI_SRCCR 0x28
++# define SSI_SRCCR_DIV2 (1 << 18)
++# define SSI_SRCCR_PSR (1 << 17)
++# define SSI_SRCCR_WL(x) ((((x) - 2) >> 1) << 13)
++# define SSI_SRCCR_DC(x) (((x) & 0x1f) << 8)
++# define SSI_SRCCR_PM(x) (((x) & 0xff) << 0)
++# define SSI_SRCCR_WL_MASK (0xf << 13)
++# define SSI_SRCCR_DC_MASK (0x1f << 8)
++# define SSI_SRCCR_PM_MASK (0xff << 0)
++
++#define SSI_STCCR 0x24
++# define SSI_STCCR_DIV2 (1 << 18)
++# define SSI_STCCR_PSR (1 << 17)
++# define SSI_STCCR_WL(x) ((((x) - 2) >> 1) << 13)
++# define SSI_STCCR_DC(x) (((x) & 0x1f) << 8)
++# define SSI_STCCR_PM(x) (((x) & 0xff) << 0)
++# define SSI_STCCR_WL_MASK (0xf << 13)
++# define SSI_STCCR_DC_MASK (0x1f << 8)
++# define SSI_STCCR_PM_MASK (0xff << 0)
++
++#define SSI_SFCSR 0x2c
++# define SSI_SFCSR_RFCNT1(x) (((x) & 0xf) << 28)
++# define SSI_RX_FIFO_1_COUNT_SHIFT 28
++# define SSI_SFCSR_TFCNT1(x) (((x) & 0xf) << 24)
++# define SSI_TX_FIFO_1_COUNT_SHIFT 24
++# define SSI_SFCSR_RFWM1(x) (((x) & 0xf) << 20)
++# define SSI_SFCSR_TFWM1(x) (((x) & 0xf) << 16)
++# define SSI_SFCSR_RFCNT0(x) (((x) & 0xf) << 12)
++# define SSI_RX_FIFO_0_COUNT_SHIFT 12
++# define SSI_SFCSR_TFCNT0(x) (((x) & 0xf) << 8)
++# define SSI_TX_FIFO_0_COUNT_SHIFT 8
++# define SSI_SFCSR_RFWM0(x) (((x) & 0xf) << 4)
++# define SSI_SFCSR_TFWM0(x) (((x) & 0xf) << 0)
++# define SSI_SFCSR_RFWM0_MASK (0xf << 4)
++# define SSI_SFCSR_TFWM0_MASK (0xf << 0)
++
++#define SSI_STR 0x30
++# define SSI_STR_TEST (1 << 15)
++# define SSI_STR_RCK2TCK (1 << 14)
++# define SSI_STR_RFS2TFS (1 << 13)
++# define SSI_STR_RXSTATE(x) (((x) & 0xf) << 8)
++# define SSI_STR_TXD2RXD (1 << 7)
++# define SSI_STR_TCK2RCK (1 << 6)
++# define SSI_STR_TFS2RFS (1 << 5)
++# define SSI_STR_TXSTATE(x) (((x) & 0xf) << 0)
++
++#define SSI_SOR 0x34
++# define SSI_SOR_CLKOFF (1 << 6)
++# define SSI_SOR_RX_CLR (1 << 5)
++# define SSI_SOR_TX_CLR (1 << 4)
++# define SSI_SOR_INIT (1 << 3)
++# define SSI_SOR_WAIT(x) (((x) & 0x3) << 1)
++# define SSI_SOR_WAIT_MASK (0x3 << 1)
++# define SSI_SOR_SYNRST (1 << 0)
++
++#define SSI_SACNT 0x38
++# define SSI_SACNT_FRDIV(x) (((x) & 0x3f) << 5)
++# define SSI_SACNT_WR (x << 4)
++# define SSI_SACNT_RD (x << 3)
++# define SSI_SACNT_TIF (x << 2)
++# define SSI_SACNT_FV (x << 1)
++# define SSI_SACNT_AC97EN (x << 0)
++
++#define SSI_SACADD 0x3c
++#define SSI_SRMSK 0x4c
++#define SSI_SACDAT 0x40
++#define SSI_SATAG 0x44
++#define SSI_STMSK 0x48
++
++#endif /* __ASM_ARCH_MXC_SSI_H */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/imxfb.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imxfb.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/imxfb.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/imxfb.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,88 @@
++/*
++ * This structure describes the machine which we are running on.
++ */
++
++#define PCR_TFT (1 << 31)
++#define PCR_COLOR (1 << 30)
++#define PCR_PBSIZ_1 (0 << 28)
++#define PCR_PBSIZ_2 (1 << 28)
++#define PCR_PBSIZ_4 (2 << 28)
++#define PCR_PBSIZ_8 (3 << 28)
++#define PCR_BPIX_1 (0 << 25)
++#define PCR_BPIX_2 (1 << 25)
++#define PCR_BPIX_4 (2 << 25)
++#define PCR_BPIX_8 (3 << 25)
++#define PCR_BPIX_12 (4 << 25)
++#define PCR_BPIX_16 (5 << 25)
++#define PCR_BPIX_18 (6 << 25)
++#define PCR_PIXPOL (1 << 24)
++#define PCR_FLMPOL (1 << 23)
++#define PCR_LPPOL (1 << 22)
++#define PCR_CLKPOL (1 << 21)
++#define PCR_OEPOL (1 << 20)
++#define PCR_SCLKIDLE (1 << 19)
++#define PCR_END_SEL (1 << 18)
++#define PCR_END_BYTE_SWAP (1 << 17)
++#define PCR_REV_VS (1 << 16)
++#define PCR_ACD_SEL (1 << 15)
++#define PCR_ACD(x) (((x) & 0x7f) << 8)
++#define PCR_SCLK_SEL (1 << 7)
++#define PCR_SHARP (1 << 6)
++#define PCR_PCD(x) ((x) & 0x3f)
++
++#define PWMR_CLS(x) (((x) & 0x1ff) << 16)
++#define PWMR_LDMSK (1 << 15)
++#define PWMR_SCR1 (1 << 10)
++#define PWMR_SCR0 (1 << 9)
++#define PWMR_CC_EN (1 << 8)
++#define PWMR_PW(x) ((x) & 0xff)
++
++#define LSCR1_PS_RISE_DELAY(x) (((x) & 0x7f) << 26)
++#define LSCR1_CLS_RISE_DELAY(x) (((x) & 0x3f) << 16)
++#define LSCR1_REV_TOGGLE_DELAY(x) (((x) & 0xf) << 8)
++#define LSCR1_GRAY2(x) (((x) & 0xf) << 4)
++#define LSCR1_GRAY1(x) (((x) & 0xf))
++
++#define DMACR_BURST (1 << 31)
++#define DMACR_HM(x) (((x) & 0xf) << 16)
++#define DMACR_TM(x) ((x) & 0xf)
++
++struct imx_fb_platform_data {
++ u_long pixclock;
++
++ u_short xres;
++ u_short yres;
++
++ u_int nonstd;
++ u_char bpp;
++ u_char hsync_len;
++ u_char left_margin;
++ u_char right_margin;
++
++ u_char vsync_len;
++ u_char upper_margin;
++ u_char lower_margin;
++ u_char sync;
++
++ u_int cmap_greyscale:1,
++ cmap_inverse:1,
++ cmap_static:1,
++ unused:29;
++
++ u_int pcr;
++ u_int pwmr;
++ u_int lscr1;
++ u_int dmacr;
++
++ u_char * fixed_screen_cpu;
++ dma_addr_t fixed_screen_dma;
++
++ int (*init)(struct platform_device*);
++ int (*exit)(struct platform_device*);
++ void (*lcd_power)(int);
++ void (*backlight_power)(int);
++};
++
++#ifdef ARCH_IMX
++void set_imx_fb_info(struct imx_fb_platform_data *);
++#endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h 2009-03-11 13:16:24.000000000 +0100
+@@ -19,14 +19,12 @@
+ #ifndef _MXC_GPIO_MX1_MX2_H
+ #define _MXC_GPIO_MX1_MX2_H
+
++#if !defined(_MXC_GPIO_MX1_H) && !defined(_MXC_GPIO_MX2_H)
++#error "Please don't include mach/iomux-mx1-mx2.h directly, include <mach/iomux.h> instead"
++#endif
++
+ #include <linux/io.h>
+
+-#define MXC_GPIO_ALLOC_MODE_NORMAL 0
+-#define MXC_GPIO_ALLOC_MODE_NO_ALLOC 1
+-#define MXC_GPIO_ALLOC_MODE_TRY_ALLOC 2
+-#define MXC_GPIO_ALLOC_MODE_ALLOC_ONLY 4
+-#define MXC_GPIO_ALLOC_MODE_RELEASE 8
+-
+ /*
+ * GPIO Module and I/O Multiplexer
+ * x = 0..3 for reg_A, reg_B, reg_C, reg_D
+@@ -50,13 +48,6 @@
+ #define MXC_SWR(x) (0x3c + ((x) << 8))
+ #define MXC_PUEN(x) (0x40 + ((x) << 8))
+
+-#ifdef CONFIG_ARCH_MX1
+-# define GPIO_PORT_MAX 3
+-#endif
+-#ifdef CONFIG_ARCH_MX2
+-# define GPIO_PORT_MAX 5
+-#endif
+-
+ #ifndef GPIO_PORT_MAX
+ # error "GPIO config port count unknown!"
+ #endif
+@@ -66,331 +57,67 @@
+ #define GPIO_PORT_SHIFT 5
+ #define GPIO_PORT_MASK (0x7 << GPIO_PORT_SHIFT)
+
+-#define GPIO_PORTA (0 << GPIO_PORT_SHIFT)
+-#define GPIO_PORTB (1 << GPIO_PORT_SHIFT)
+-#define GPIO_PORTC (2 << GPIO_PORT_SHIFT)
+-#define GPIO_PORTD (3 << GPIO_PORT_SHIFT)
+-#define GPIO_PORTE (4 << GPIO_PORT_SHIFT)
+-#define GPIO_PORTF (5 << GPIO_PORT_SHIFT)
+-
+-#define GPIO_OUT (1 << 8)
+-#define GPIO_IN (0 << 8)
+-#define GPIO_PUEN (1 << 9)
+-
+-#define GPIO_PF (1 << 10)
+-#define GPIO_AF (1 << 11)
+-
+-#define GPIO_OCR_SHIFT 12
+-#define GPIO_OCR_MASK (3 << GPIO_OCR_SHIFT)
+-#define GPIO_AIN (0 << GPIO_OCR_SHIFT)
+-#define GPIO_BIN (1 << GPIO_OCR_SHIFT)
+-#define GPIO_CIN (2 << GPIO_OCR_SHIFT)
+-#define GPIO_GPIO (3 << GPIO_OCR_SHIFT)
+-
+-#define GPIO_AOUT_SHIFT 14
+-#define GPIO_AOUT_MASK (3 << GPIO_AOUT_SHIFT)
+-#define GPIO_AOUT (0 << GPIO_AOUT_SHIFT)
+-#define GPIO_AOUT_ISR (1 << GPIO_AOUT_SHIFT)
+-#define GPIO_AOUT_0 (2 << GPIO_AOUT_SHIFT)
+-#define GPIO_AOUT_1 (3 << GPIO_AOUT_SHIFT)
+-
+-#define GPIO_BOUT_SHIFT 16
+-#define GPIO_BOUT_MASK (3 << GPIO_BOUT_SHIFT)
+-#define GPIO_BOUT (0 << GPIO_BOUT_SHIFT)
+-#define GPIO_BOUT_ISR (1 << GPIO_BOUT_SHIFT)
+-#define GPIO_BOUT_0 (2 << GPIO_BOUT_SHIFT)
+-#define GPIO_BOUT_1 (3 << GPIO_BOUT_SHIFT)
++#define GPIO_INDEX(gpio_cookie) ((gpio_cookie) & GPIO_PIN_MASK)
++#define GPIO_PORT(gpio_cookie) (((gpio_cookie) & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT)
++#define IOMUX_TO_GPIO(gpio_cookie) ((gpio_cookie) & (GPIO_PORT_MASK | GPIO_PIN_MASK))
++
++#define GPIO_PORTA (0 << GPIO_PORT_SHIFT)
++#define GPIO_PORTB (1 << GPIO_PORT_SHIFT)
++#define GPIO_PORTC (2 << GPIO_PORT_SHIFT)
++#define GPIO_PORTD (3 << GPIO_PORT_SHIFT)
++#define GPIO_PORTE (4 << GPIO_PORT_SHIFT)
++#define GPIO_PORTF (5 << GPIO_PORT_SHIFT)
++
++#define GPIO_OUT (1 << 8)
++#define GPIO_IN (0 << 8)
++#define GPIO_PUEN (1 << 9)
++
++#define GPIO_PF (1 << 10)
++#define GPIO_AF (1 << 11)
++
++#define GPIO_OCR_SHIFT 12
++#define GPIO_OCR_MASK (3 << GPIO_OCR_SHIFT)
++#define GPIO_AIN (0 << GPIO_OCR_SHIFT)
++#define GPIO_BIN (1 << GPIO_OCR_SHIFT)
++#define GPIO_CIN (2 << GPIO_OCR_SHIFT)
++#define GPIO_GPIO (3 << GPIO_OCR_SHIFT)
++
++#define GPIO_AOUT_SHIFT 14
++#define GPIO_AOUT_MASK (3 << GPIO_AOUT_SHIFT)
++#define GPIO_AOUT (0 << GPIO_AOUT_SHIFT)
++#define GPIO_AOUT_ISR (1 << GPIO_AOUT_SHIFT)
++#define GPIO_AOUT_0 (2 << GPIO_AOUT_SHIFT)
++#define GPIO_AOUT_1 (3 << GPIO_AOUT_SHIFT)
++
++#define GPIO_BOUT_SHIFT 16
++#define GPIO_BOUT_MASK (3 << GPIO_BOUT_SHIFT)
++#define GPIO_BOUT (0 << GPIO_BOUT_SHIFT)
++#define GPIO_BOUT_ISR (1 << GPIO_BOUT_SHIFT)
++#define GPIO_BOUT_0 (2 << GPIO_BOUT_SHIFT)
++#define GPIO_BOUT_1 (3 << GPIO_BOUT_SHIFT)
++
++#define GPIO_DFLT_LOW (1 << 18)
++#define GPIO_DFLT_HIGH (1 << 19)
+
+ extern void mxc_gpio_mode(int gpio_mode);
+ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
+- int alloc_mode, const char *label);
++ const char *label);
++extern void mxc_gpio_release_multiple_pins(const int *pin_list, int count);
+
+ /*-------------------------------------------------------------------------*/
+
+-/* assignements for GPIO alternate/primary functions */
+-
+-/* FIXME: This list is not completed. The correct directions are
+- * missing on some (many) pins
+- */
+-#ifdef CONFIG_ARCH_MX1
+-#define PA0_AIN_SPI2_CLK (GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 0)
+-#define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0)
+-#define PA1_AOUT_SPI2_RXD (GPIO_GIUS | GPIO_PORTA | GPIO_IN | 1)
+-#define PA1_PF_TIN (GPIO_PORTA | GPIO_PF | 1)
+-#define PA2_PF_PWM0 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 2)
+-#define PA3_PF_CSI_MCLK (GPIO_PORTA | GPIO_PF | 3)
+-#define PA4_PF_CSI_D0 (GPIO_PORTA | GPIO_PF | 4)
+-#define PA5_PF_CSI_D1 (GPIO_PORTA | GPIO_PF | 5)
+-#define PA6_PF_CSI_D2 (GPIO_PORTA | GPIO_PF | 6)
+-#define PA7_PF_CSI_D3 (GPIO_PORTA | GPIO_PF | 7)
+-#define PA8_PF_CSI_D4 (GPIO_PORTA | GPIO_PF | 8)
+-#define PA9_PF_CSI_D5 (GPIO_PORTA | GPIO_PF | 9)
+-#define PA10_PF_CSI_D6 (GPIO_PORTA | GPIO_PF | 10)
+-#define PA11_PF_CSI_D7 (GPIO_PORTA | GPIO_PF | 11)
+-#define PA12_PF_CSI_VSYNC (GPIO_PORTA | GPIO_PF | 12)
+-#define PA13_PF_CSI_HSYNC (GPIO_PORTA | GPIO_PF | 13)
+-#define PA14_PF_CSI_PIXCLK (GPIO_PORTA | GPIO_PF | 14)
+-#define PA15_PF_I2C_SDA (GPIO_PORTA | GPIO_OUT | GPIO_PF | 15)
+-#define PA16_PF_I2C_SCL (GPIO_PORTA | GPIO_OUT | GPIO_PF | 16)
+-#define PA17_AF_ETMTRACEPKT4 (GPIO_PORTA | GPIO_AF | 17)
+-#define PA17_AIN_SPI2_SS (GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 17)
+-#define PA18_AF_ETMTRACEPKT5 (GPIO_PORTA | GPIO_AF | 18)
+-#define PA19_AF_ETMTRACEPKT6 (GPIO_PORTA | GPIO_AF | 19)
+-#define PA20_AF_ETMTRACEPKT7 (GPIO_PORTA | GPIO_AF | 20)
+-#define PA21_PF_A0 (GPIO_PORTA | GPIO_PF | 21)
+-#define PA22_PF_CS4 (GPIO_PORTA | GPIO_PF | 22)
+-#define PA23_PF_CS5 (GPIO_PORTA | GPIO_PF | 23)
+-#define PA24_PF_A16 (GPIO_PORTA | GPIO_PF | 24)
+-#define PA24_AF_ETMTRACEPKT0 (GPIO_PORTA | GPIO_AF | 24)
+-#define PA25_PF_A17 (GPIO_PORTA | GPIO_PF | 25)
+-#define PA25_AF_ETMTRACEPKT1 (GPIO_PORTA | GPIO_AF | 25)
+-#define PA26_PF_A18 (GPIO_PORTA | GPIO_PF | 26)
+-#define PA26_AF_ETMTRACEPKT2 (GPIO_PORTA | GPIO_AF | 26)
+-#define PA27_PF_A19 (GPIO_PORTA | GPIO_PF | 27)
+-#define PA27_AF_ETMTRACEPKT3 (GPIO_PORTA | GPIO_AF | 27)
+-#define PA28_PF_A20 (GPIO_PORTA | GPIO_PF | 28)
+-#define PA28_AF_ETMPIPESTAT0 (GPIO_PORTA | GPIO_AF | 28)
+-#define PA29_PF_A21 (GPIO_PORTA | GPIO_PF | 29)
+-#define PA29_AF_ETMPIPESTAT1 (GPIO_PORTA | GPIO_AF | 29)
+-#define PA30_PF_A22 (GPIO_PORTA | GPIO_PF | 30)
+-#define PA30_AF_ETMPIPESTAT2 (GPIO_PORTA | GPIO_AF | 30)
+-#define PA31_PF_A23 (GPIO_PORTA | GPIO_PF | 31)
+-#define PA31_AF_ETMTRACECLK (GPIO_PORTA | GPIO_AF | 31)
+-#define PB8_PF_SD_DAT0 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 8)
+-#define PB8_AF_MS_PIO (GPIO_PORTB | GPIO_AF | 8)
+-#define PB9_PF_SD_DAT1 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 9)
+-#define PB9_AF_MS_PI1 (GPIO_PORTB | GPIO_AF | 9)
+-#define PB10_PF_SD_DAT2 (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 10)
+-#define PB10_AF_MS_SCLKI (GPIO_PORTB | GPIO_AF | 10)
+-#define PB11_PF_SD_DAT3 (GPIO_PORTB | GPIO_PF | 11)
+-#define PB11_AF_MS_SDIO (GPIO_PORTB | GPIO_AF | 11)
+-#define PB12_PF_SD_CLK (GPIO_PORTB | GPIO_PF | 12)
+-#define PB12_AF_MS_SCLK0 (GPIO_PORTB | GPIO_AF | 12)
+-#define PB13_PF_SD_CMD (GPIO_PORTB | GPIO_PF | GPIO_PUEN | 13)
+-#define PB13_AF_MS_BS (GPIO_PORTB | GPIO_AF | 13)
+-#define PB14_AF_SSI_RXFS (GPIO_PORTB | GPIO_AF | 14)
+-#define PB15_AF_SSI_RXCLK (GPIO_PORTB | GPIO_AF | 15)
+-#define PB16_AF_SSI_RXDAT (GPIO_PORTB | GPIO_IN | GPIO_AF | 16)
+-#define PB17_AF_SSI_TXDAT (GPIO_PORTB | GPIO_OUT | GPIO_AF | 17)
+-#define PB18_AF_SSI_TXFS (GPIO_PORTB | GPIO_AF | 18)
+-#define PB19_AF_SSI_TXCLK (GPIO_PORTB | GPIO_AF | 19)
+-#define PB20_PF_USBD_AFE (GPIO_PORTB | GPIO_PF | 20)
+-#define PB21_PF_USBD_OE (GPIO_PORTB | GPIO_PF | 21)
+-#define PB22_PFUSBD_RCV (GPIO_PORTB | GPIO_PF | 22)
+-#define PB23_PF_USBD_SUSPND (GPIO_PORTB | GPIO_PF | 23)
+-#define PB24_PF_USBD_VP (GPIO_PORTB | GPIO_PF | 24)
+-#define PB25_PF_USBD_VM (GPIO_PORTB | GPIO_PF | 25)
+-#define PB26_PF_USBD_VPO (GPIO_PORTB | GPIO_PF | 26)
+-#define PB27_PF_USBD_VMO (GPIO_PORTB | GPIO_PF | 27)
+-#define PB28_PF_UART2_CTS (GPIO_PORTB | GPIO_OUT | GPIO_PF | 28)
+-#define PB29_PF_UART2_RTS (GPIO_PORTB | GPIO_IN | GPIO_PF | 29)
+-#define PB30_PF_UART2_TXD (GPIO_PORTB | GPIO_OUT | GPIO_PF | 30)
+-#define PB31_PF_UART2_RXD (GPIO_PORTB | GPIO_IN | GPIO_PF | 31)
+-#define PC3_PF_SSI_RXFS (GPIO_PORTC | GPIO_PF | 3)
+-#define PC4_PF_SSI_RXCLK (GPIO_PORTC | GPIO_PF | 4)
+-#define PC5_PF_SSI_RXDAT (GPIO_PORTC | GPIO_IN | GPIO_PF | 5)
+-#define PC6_PF_SSI_TXDAT (GPIO_PORTC | GPIO_OUT | GPIO_PF | 6)
+-#define PC7_PF_SSI_TXFS (GPIO_PORTC | GPIO_PF | 7)
+-#define PC8_PF_SSI_TXCLK (GPIO_PORTC | GPIO_PF | 8)
+-#define PC9_PF_UART1_CTS (GPIO_PORTC | GPIO_OUT | GPIO_PF | 9)
+-#define PC10_PF_UART1_RTS (GPIO_PORTC | GPIO_IN | GPIO_PF | 10)
+-#define PC11_PF_UART1_TXD (GPIO_PORTC | GPIO_OUT | GPIO_PF | 11)
+-#define PC12_PF_UART1_RXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 12)
+-#define PC13_PF_SPI1_SPI_RDY (GPIO_PORTC | GPIO_PF | 13)
+-#define PC14_PF_SPI1_SCLK (GPIO_PORTC | GPIO_PF | 14)
+-#define PC15_PF_SPI1_SS (GPIO_PORTC | GPIO_PF | 15)
+-#define PC16_PF_SPI1_MISO (GPIO_PORTC | GPIO_PF | 16)
+-#define PC17_PF_SPI1_MOSI (GPIO_PORTC | GPIO_PF | 17)
+-#define PC24_BIN_UART3_RI (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24)
+-#define PC25_BIN_UART3_DSR (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25)
+-#define PC26_AOUT_UART3_DTR (GPIO_GIUS | GPIO_PORTC | GPIO_IN | 26)
+-#define PC27_BIN_UART3_DCD (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27)
+-#define PC28_BIN_UART3_CTS (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28)
+-#define PC29_AOUT_UART3_RTS (GPIO_GIUS | GPIO_PORTC | GPIO_IN | 29)
+-#define PC30_BIN_UART3_TX (GPIO_GIUS | GPIO_PORTC | GPIO_BIN | 30)
+-#define PC31_AOUT_UART3_RX (GPIO_GIUS | GPIO_PORTC | GPIO_IN | 31)
+-#define PD6_PF_LSCLK (GPIO_PORTD | GPIO_OUT | GPIO_PF | 6)
+-#define PD7_PF_REV (GPIO_PORTD | GPIO_PF | 7)
+-#define PD7_AF_UART2_DTR (GPIO_GIUS | GPIO_PORTD | GPIO_IN | GPIO_AF | 7)
+-#define PD7_AIN_SPI2_SCLK (GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 7)
+-#define PD8_PF_CLS (GPIO_PORTD | GPIO_PF | 8)
+-#define PD8_AF_UART2_DCD (GPIO_PORTD | GPIO_OUT | GPIO_AF | 8)
+-#define PD8_AIN_SPI2_SS (GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 8)
+-#define PD9_PF_PS (GPIO_PORTD | GPIO_PF | 9)
+-#define PD9_AF_UART2_RI (GPIO_PORTD | GPIO_OUT | GPIO_AF | 9)
+-#define PD9_AOUT_SPI2_RXD (GPIO_GIUS | GPIO_PORTD | GPIO_IN | 9)
+-#define PD10_PF_SPL_SPR (GPIO_PORTD | GPIO_OUT | GPIO_PF | 10)
+-#define PD10_AF_UART2_DSR (GPIO_PORTD | GPIO_OUT | GPIO_AF | 10)
+-#define PD10_AIN_SPI2_TXD (GPIO_GIUS | GPIO_PORTD | GPIO_OUT | 10)
+-#define PD11_PF_CONTRAST (GPIO_PORTD | GPIO_OUT | GPIO_PF | 11)
+-#define PD12_PF_ACD_OE (GPIO_PORTD | GPIO_OUT | GPIO_PF | 12)
+-#define PD13_PF_LP_HSYNC (GPIO_PORTD | GPIO_OUT | GPIO_PF | 13)
+-#define PD14_PF_FLM_VSYNC (GPIO_PORTD | GPIO_OUT | GPIO_PF | 14)
+-#define PD15_PF_LD0 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 15)
+-#define PD16_PF_LD1 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 16)
+-#define PD17_PF_LD2 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 17)
+-#define PD18_PF_LD3 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 18)
+-#define PD19_PF_LD4 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 19)
+-#define PD20_PF_LD5 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 20)
+-#define PD21_PF_LD6 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 21)
+-#define PD22_PF_LD7 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 22)
+-#define PD23_PF_LD8 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 23)
+-#define PD24_PF_LD9 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 24)
+-#define PD25_PF_LD10 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 25)
+-#define PD26_PF_LD11 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 26)
+-#define PD27_PF_LD12 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 27)
+-#define PD28_PF_LD13 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 28)
+-#define PD29_PF_LD14 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 29)
+-#define PD30_PF_LD15 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 30)
+-#define PD31_PF_TMR2OUT (GPIO_PORTD | GPIO_PF | 31)
+-#define PD31_BIN_SPI2_TXD (GPIO_GIUS | GPIO_PORTD | GPIO_BIN | 31)
+-#endif
+-
+-#ifdef CONFIG_ARCH_MX2
+-#define PA0_PF_USBH2_CLK (GPIO_PORTA | GPIO_PF | 0)
+-#define PA1_PF_USBH2_DIR (GPIO_PORTA | GPIO_PF | 1)
+-#define PA2_PF_USBH2_DATA7 (GPIO_PORTA | GPIO_PF | 2)
+-#define PA3_PF_USBH2_NXT (GPIO_PORTA | GPIO_PF | 3)
+-#define PA4_PF_USBH2_STP (GPIO_PORTA | GPIO_PF | 4)
+-#define PA5_PF_LSCLK (GPIO_PORTA | GPIO_OUT | GPIO_PF | 5)
+-#define PA6_PF_LD0 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 6)
+-#define PA7_PF_LD1 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 7)
+-#define PA8_PF_LD2 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 8)
+-#define PA9_PF_LD3 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 9)
+-#define PA10_PF_LD4 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 10)
+-#define PA11_PF_LD5 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 11)
+-#define PA12_PF_LD6 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 12)
+-#define PA13_PF_LD7 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 13)
+-#define PA14_PF_LD8 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 14)
+-#define PA15_PF_LD9 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 15)
+-#define PA16_PF_LD10 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 16)
+-#define PA17_PF_LD11 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 17)
+-#define PA18_PF_LD12 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 18)
+-#define PA19_PF_LD13 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 19)
+-#define PA20_PF_LD14 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 20)
+-#define PA21_PF_LD15 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 21)
+-#define PA22_PF_LD16 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 22)
+-#define PA23_PF_LD17 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 23)
+-#define PA24_PF_REV (GPIO_PORTA | GPIO_OUT | GPIO_PF | 24)
+-#define PA25_PF_CLS (GPIO_PORTA | GPIO_OUT | GPIO_PF | 25)
+-#define PA26_PF_PS (GPIO_PORTA | GPIO_OUT | GPIO_PF | 26)
+-#define PA27_PF_SPL_SPR (GPIO_PORTA | GPIO_OUT | GPIO_PF | 27)
+-#define PA28_PF_HSYNC (GPIO_PORTA | GPIO_OUT | GPIO_PF | 28)
+-#define PA29_PF_VSYNC (GPIO_PORTA | GPIO_OUT | GPIO_PF | 29)
+-#define PA30_PF_CONTRAST (GPIO_PORTA | GPIO_OUT | GPIO_PF | 30)
+-#define PA31_PF_OE_ACD (GPIO_PORTA | GPIO_OUT | GPIO_PF | 31)
+-#define PB10_PF_CSI_D0 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 10)
+-#define PB10_AF_UART6_TXD (GPIO_PORTB | GPIO_OUT | GPIO_AF | 10)
+-#define PB11_PF_CSI_D1 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 11)
+-#define PB11_AF_UART6_RXD (GPIO_PORTB | GPIO_IN | GPIO_AF | 11)
+-#define PB12_PF_CSI_D2 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 12)
+-#define PB12_AF_UART6_CTS (GPIO_PORTB | GPIO_OUT | GPIO_AF | 12)
+-#define PB13_PF_CSI_D3 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 13)
+-#define PB13_AF_UART6_RTS (GPIO_PORTB | GPIO_IN | GPIO_AF | 13)
+-#define PB14_PF_CSI_D4 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 14)
+-#define PB15_PF_CSI_MCLK (GPIO_PORTB | GPIO_OUT | GPIO_PF | 15)
+-#define PB16_PF_CSI_PIXCLK (GPIO_PORTB | GPIO_OUT | GPIO_PF | 16)
+-#define PB17_PF_CSI_D5 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 17)
+-#define PB18_PF_CSI_D6 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 18)
+-#define PB18_AF_UART5_TXD (GPIO_PORTB | GPIO_OUT | GPIO_AF | 18)
+-#define PB19_PF_CSI_D7 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 19)
+-#define PB19_AF_UART5_RXD (GPIO_PORTB | GPIO_IN | GPIO_AF | 19)
+-#define PB20_PF_CSI_VSYNC (GPIO_PORTB | GPIO_OUT | GPIO_PF | 20)
+-#define PB20_AF_UART5_CTS (GPIO_PORTB | GPIO_OUT | GPIO_AF | 20)
+-#define PB21_PF_CSI_HSYNC (GPIO_PORTB | GPIO_OUT | GPIO_PF | 21)
+-#define PB21_AF_UART5_RTS (GPIO_PORTB | GPIO_IN | GPIO_AF | 21)
+-#define PB22_PF_USBH1_SUSP (GPIO_PORTB | GPIO_PF | 22)
+-#define PB23_PF_USB_PWR (GPIO_PORTB | GPIO_PF | 23)
+-#define PB24_PF_USB_OC_B (GPIO_PORTB | GPIO_PF | 24)
+-#define PB25_PF_USBH1_RCV (GPIO_PORTB | GPIO_PF | 25)
+-#define PB26_PF_USBH1_FS (GPIO_PORTB | GPIO_PF | 26)
+-#define PB27_PF_USBH1_OE_B (GPIO_PORTB | GPIO_PF | 27)
+-#define PB28_PF_USBH1_TXDM (GPIO_PORTB | GPIO_PF | 28)
+-#define PB29_PF_USBH1_TXDP (GPIO_PORTB | GPIO_PF | 29)
+-#define PB30_PF_USBH1_RXDM (GPIO_PORTB | GPIO_PF | 30)
+-#define PB31_PF_USBH1_RXDP (GPIO_PORTB | GPIO_PF | 31)
+-#define PB26_AF_UART4_RTS (GPIO_PORTB | GPIO_IN | GPIO_PF | 26)
+-#define PB28_AF_UART4_TXD (GPIO_PORTB | GPIO_OUT | GPIO_AF | 28)
+-#define PB29_AF_UART4_CTS (GPIO_PORTB | GPIO_OUT | GPIO_AF | 29)
+-#define PB31_AF_UART4_RXD (GPIO_PORTB | GPIO_IN | GPIO_AF | 31)
+-#define PC5_PF_I2C2_SDA (GPIO_PORTC | GPIO_IN | GPIO_PF | 5)
+-#define PC6_PF_I2C2_SCL (GPIO_PORTC | GPIO_IN | GPIO_PF | 6)
+-#define PC16_PF_SSI4_FS (GPIO_PORTC | GPIO_IN | GPIO_PF | 16)
+-#define PC17_PF_SSI4_RXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 17)
+-#define PC18_PF_SSI4_TXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 18)
+-#define PC19_PF_SSI4_CLK (GPIO_PORTC | GPIO_IN | GPIO_PF | 19)
+-#define PC20_PF_SSI1_FS (GPIO_PORTC | GPIO_IN | GPIO_PF | 20)
+-#define PC21_PF_SSI1_RXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 21)
+-#define PC22_PF_SSI1_TXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 22)
+-#define PC23_PF_SSI1_CLK (GPIO_PORTC | GPIO_IN | GPIO_PF | 23)
+-#define PC24_PF_SSI2_FS (GPIO_PORTC | GPIO_IN | GPIO_PF | 24)
+-#define PC25_PF_SSI2_RXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 25)
+-#define PC26_PF_SSI2_TXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 26)
+-#define PC27_PF_SSI2_CLK (GPIO_PORTC | GPIO_IN | GPIO_PF | 27)
+-#define PC28_PF_SSI3_FS (GPIO_PORTC | GPIO_IN | GPIO_PF | 28)
+-#define PC29_PF_SSI3_RXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 29)
+-#define PC30_PF_SSI3_TXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 30)
+-#define PC31_PF_SSI3_CLK (GPIO_PORTC | GPIO_IN | GPIO_PF | 31)
+-#define PD0_AIN_FEC_TXD0 (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 0)
+-#define PD1_AIN_FEC_TXD1 (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 1)
+-#define PD2_AIN_FEC_TXD2 (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 2)
+-#define PD3_AIN_FEC_TXD3 (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 3)
+-#define PD4_AOUT_FEC_RX_ER (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 4)
+-#define PD5_AOUT_FEC_RXD1 (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 5)
+-#define PD6_AOUT_FEC_RXD2 (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 6)
+-#define PD7_AOUT_FEC_RXD3 (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 7)
+-#define PD8_AF_FEC_MDIO (GPIO_PORTD | GPIO_IN | GPIO_AF | 8)
+-#define PD9_AIN_FEC_MDC (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 9)
+-#define PD10_AOUT_FEC_CRS (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 10)
+-#define PD11_AOUT_FEC_TX_CLK (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 11)
+-#define PD12_AOUT_FEC_RXD0 (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 12)
+-#define PD13_AOUT_FEC_RX_DV (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 13)
+-#define PD14_AOUT_FEC_CLR (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 14)
+-#define PD15_AOUT_FEC_COL (GPIO_PORTD | GPIO_IN | GPIO_AOUT | 15)
+-#define PD16_AIN_FEC_TX_ER (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 16)
+-#define PD17_PF_I2C_DATA (GPIO_PORTD | GPIO_OUT | GPIO_PF | 17)
+-#define PD18_PF_I2C_CLK (GPIO_PORTD | GPIO_OUT | GPIO_PF | 18)
+-#define PD19_AF_USBH2_DATA4 (GPIO_PORTD | GPIO_AF | 19)
+-#define PD20_AF_USBH2_DATA3 (GPIO_PORTD | GPIO_AF | 20)
+-#define PD21_AF_USBH2_DATA6 (GPIO_PORTD | GPIO_AF | 21)
+-#define PD22_AF_USBH2_DATA0 (GPIO_PORTD | GPIO_AF | 22)
+-#define PD23_AF_USBH2_DATA2 (GPIO_PORTD | GPIO_AF | 23)
+-#define PD24_AF_USBH2_DATA1 (GPIO_PORTD | GPIO_AF | 24)
+-#define PD25_PF_CSPI1_RDY (GPIO_PORTD | GPIO_OUT | GPIO_PF | 25)
+-#define PD26_PF_CSPI1_SS2 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 26)
+-#define PD26_AF_USBH2_DATA5 (GPIO_PORTD | GPIO_AF | 26)
+-#define PD27_PF_CSPI1_SS1 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 27)
+-#define PD28_PF_CSPI1_SS0 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 28)
+-#define PD29_PF_CSPI1_SCLK (GPIO_PORTD | GPIO_OUT | GPIO_PF | 29)
+-#define PD30_PF_CSPI1_MISO (GPIO_PORTD | GPIO_IN | GPIO_PF | 30)
+-#define PD31_PF_CSPI1_MOSI (GPIO_PORTD | GPIO_OUT | GPIO_PF | 31)
+-#define PF23_AIN_FEC_TX_EN (GPIO_PORTF | GPIO_OUT | GPIO_AIN | 23)
+-#define PE3_PF_UART2_CTS (GPIO_PORTE | GPIO_OUT | GPIO_PF | 3)
+-#define PE4_PF_UART2_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 4)
+-#define PE6_PF_UART2_TXD (GPIO_PORTE | GPIO_OUT | GPIO_PF | 6)
+-#define PE7_PF_UART2_RXD (GPIO_PORTE | GPIO_IN | GPIO_PF | 7)
+-#define PE8_PF_UART3_TXD (GPIO_PORTE | GPIO_OUT | GPIO_PF | 8)
+-#define PE9_PF_UART3_RXD (GPIO_PORTE | GPIO_IN | GPIO_PF | 9)
+-#define PE10_PF_UART3_CTS (GPIO_PORTE | GPIO_OUT | GPIO_PF | 10)
+-#define PE11_PF_UART3_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 11)
+-#define PE12_PF_UART1_TXD (GPIO_PORTE | GPIO_OUT | GPIO_PF | 12)
+-#define PE13_PF_UART1_RXD (GPIO_PORTE | GPIO_IN | GPIO_PF | 13)
+-#define PE14_PF_UART1_CTS (GPIO_PORTE | GPIO_OUT | GPIO_PF | 14)
+-#define PE15_PF_UART1_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 15)
+-#define PE16_AF_RTCK (GPIO_PORTE | GPIO_OUT | GPIO_AF | 16)
+-#define PE16_PF_RTCK (GPIO_PORTE | GPIO_OUT | GPIO_PF | 16)
+-#define PE18_AF_CSPI3_MISO (GPIO_PORTE | GPIO_IN | GPIO_AF | 18)
+-#define PE21_AF_CSPI3_SS (GPIO_PORTE | GPIO_OUT | GPIO_AF | 21)
+-#define PE22_AF_CSPI3_MOSI (GPIO_PORTE | GPIO_OUT | GPIO_AF | 22)
+-#define PE23_AF_CSPI3_SCLK (GPIO_PORTE | GPIO_OUT | GPIO_AF | 23)
+-#endif
++#define MXC_PIN(port,gpio,fn,flags) \
++ (GPIO_PORT##port | GPIO_##fn | (flags) | (gpio))
++#define MXC_DEFINE_PIN(port,gpio,fn,name,flags) \
++ P##port##gpio##_##fn##_##name = MXC_PIN(port,gpio,fn,flags)
+
+ /* decode irq number to use with IMR(x), ISR(x) and friends */
+-#define IRQ_TO_REG(irq) ((irq - MXC_MAX_INT_LINES) >> 5)
++#define IRQ_TO_REG(irq) ((irq - MXC_MAX_INT_LINES) >> 5)
+
+-#define IRQ_GPIOA(x) (MXC_MAX_INT_LINES + x)
+-#define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x)
+-#define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x)
+-#define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x)
++#define IRQ_GPIOA(x) (MXC_MAX_INT_LINES + x)
++#define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x)
++#define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x)
++#define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x)
++#define IRQ_GPIOE(x) (IRQ_GPIOD(32) + x)
+
+ #endif /* _MXC_GPIO_MX1_MX2_H */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/ipu.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/ipu.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/ipu.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/ipu.h 2009-01-05 17:47:15.000000000 +0100
+@@ -0,0 +1,193 @@
++/*
++ * Copyright (C) 2008
++ * Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de>
++ *
++ * 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 _IPU_H_
++#define _IPU_H_
++
++#include <linux/types.h>
++#include <linux/dmaengine.h>
++
++/* IPU DMA Controller channel definitions. */
++enum ipu_channel {
++ IDMAC_IC_0 = 0, /* IC (encoding task) to memory */
++ IDMAC_IC_1 = 1, /* IC (viewfinder task) to memory */
++ IDMAC_ADC_0 = 1,
++ IDMAC_IC_2 = 2,
++ IDMAC_ADC_1 = 2,
++ IDMAC_IC_3 = 3,
++ IDMAC_IC_4 = 4,
++ IDMAC_IC_5 = 5,
++ IDMAC_IC_6 = 6,
++ IDMAC_IC_7 = 7, /* IC (sensor data) to memory */
++ IDMAC_IC_8 = 8,
++ IDMAC_IC_9 = 9,
++ IDMAC_IC_10 = 10,
++ IDMAC_IC_11 = 11,
++ IDMAC_IC_12 = 12,
++ IDMAC_IC_13 = 13,
++ IDMAC_SDC_0 = 14, /* Background synchronous display data */
++ IDMAC_SDC_1 = 15, /* Foreground data (overlay) */
++ IDMAC_SDC_2 = 16,
++ IDMAC_SDC_3 = 17,
++ IDMAC_ADC_2 = 18,
++ IDMAC_ADC_3 = 19,
++ IDMAC_ADC_4 = 20,
++ IDMAC_ADC_5 = 21,
++ IDMAC_ADC_6 = 22,
++ IDMAC_ADC_7 = 23,
++ IDMAC_PF_0 = 24,
++ IDMAC_PF_1 = 25,
++ IDMAC_PF_2 = 26,
++ IDMAC_PF_3 = 27,
++ IDMAC_PF_4 = 28,
++ IDMAC_PF_5 = 29,
++ IDMAC_PF_6 = 30,
++ IDMAC_PF_7 = 31,
++};
++
++/* Order significant! */
++enum ipu_channel_status {
++ IPU_CHANNEL_FREE,
++ IPU_CHANNEL_GRANTED,
++ IPU_CHANNEL_INITIALIZED,
++ IPU_CHANNEL_READY,
++ IPU_CHANNEL_ENABLED,
++};
++
++#define IPU_CHANNELS_NUM 32
++
++enum pixel_fmt {
++ /* 1 byte */
++ IPU_PIX_FMT_GENERIC,
++ IPU_PIX_FMT_RGB332,
++ IPU_PIX_FMT_YUV420P,
++ IPU_PIX_FMT_YUV422P,
++ IPU_PIX_FMT_YUV420P2,
++ IPU_PIX_FMT_YVU422P,
++ /* 2 bytes */
++ IPU_PIX_FMT_RGB565,
++ IPU_PIX_FMT_RGB666,
++ IPU_PIX_FMT_BGR666,
++ IPU_PIX_FMT_YUYV,
++ IPU_PIX_FMT_UYVY,
++ /* 3 bytes */
++ IPU_PIX_FMT_RGB24,
++ IPU_PIX_FMT_BGR24,
++ /* 4 bytes */
++ IPU_PIX_FMT_GENERIC_32,
++ IPU_PIX_FMT_RGB32,
++ IPU_PIX_FMT_BGR32,
++ IPU_PIX_FMT_ABGR32,
++ IPU_PIX_FMT_BGRA32,
++ IPU_PIX_FMT_RGBA32,
++};
++
++enum ipu_color_space {
++ IPU_COLORSPACE_RGB,
++ IPU_COLORSPACE_YCBCR,
++ IPU_COLORSPACE_YUV
++};
++
++/**
++ * Enumeration of IPU rotation modes
++ */
++enum ipu_rotate_mode {
++ /* Note the enum values correspond to BAM value */
++ IPU_ROTATE_NONE = 0,
++ IPU_ROTATE_VERT_FLIP = 1,
++ IPU_ROTATE_HORIZ_FLIP = 2,
++ IPU_ROTATE_180 = 3,
++ IPU_ROTATE_90_RIGHT = 4,
++ IPU_ROTATE_90_RIGHT_VFLIP = 5,
++ IPU_ROTATE_90_RIGHT_HFLIP = 6,
++ IPU_ROTATE_90_LEFT = 7,
++};
++
++struct ipu_platform_data {
++ unsigned int irq_base;
++};
++
++/**
++ * Enumeration of DI ports for ADC.
++ */
++typedef enum {
++ DISP0,
++ DISP1,
++ DISP2,
++ DISP3
++} display_port_t;
++
++struct idmac_video_param {
++ unsigned short in_width;
++ unsigned short in_height;
++ uint32_t in_pixel_fmt;
++ unsigned short out_width;
++ unsigned short out_height;
++ uint32_t out_pixel_fmt;
++ unsigned short out_stride;
++ bool graphics_combine_en;
++ bool global_alpha_en;
++ bool key_color_en;
++ display_port_t disp;
++ unsigned short out_left;
++ unsigned short out_top;
++};
++
++/*
++ * Union of initialization parameters for a logical channel. So far only video
++ * parameters are used.
++ */
++union ipu_channel_param {
++ struct idmac_video_param video;
++};
++
++struct idmac_tx_desc {
++ struct dma_async_tx_descriptor txd;
++ struct scatterlist *sg; /* scatterlist for this */
++ unsigned int sg_len; /* tx-descriptor. */
++ struct list_head list;
++};
++
++struct idmac_channel {
++ struct dma_chan dma_chan;
++ dma_cookie_t completed; /* last completed cookie */
++ union ipu_channel_param params;
++ enum ipu_channel link; /* input channel, linked to the output */
++ enum ipu_channel_status status;
++ struct idmac_client *iclient; /* Only one client per channel */
++ unsigned int n_tx_desc;
++ struct idmac_tx_desc *desc; /* allocated tx-descriptors */
++ struct scatterlist *sg[2]; /* scatterlist elements in buffer-0 and -1 */
++ struct list_head free_list; /* free tx-descriptors */
++ struct list_head queue; /* queued tx-descriptors */
++ spinlock_t lock; /* protects sg[0,1], queue */
++ struct mutex chan_mutex; /* protects status, cookie, free_list */
++ unsigned int eof_irq;
++ bool sec_chan_en;
++ int active_buffer;
++};
++
++struct idmac_channel_rq {
++ enum ipu_channel channel;
++ struct idmac_channel *ichannel;
++};
++
++struct idmac_client {
++ int n_channels;
++ struct idmac_channel_rq *channels;
++ struct dma_client dma_client;
++};
++
++extern unsigned long ipu_clk_get_rate(void);
++
++#define to_tx_desc(tx) container_of(tx, struct idmac_tx_desc, txd)
++#define to_idmac_chan(c) container_of(c, struct idmac_channel, dma_chan)
++#define to_idmac_client(i) container_of(i, struct idmac_client, dma_client)
++
++#endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/irqs.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/irqs.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/irqs.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/irqs.h 2009-03-11 13:16:24.000000000 +0100
+@@ -14,4 +14,9 @@
+ #include <mach/hardware.h>
+ extern void imx_irq_set_priority(unsigned char irq, unsigned char prio);
+
++/* all normal IRQs can be FIQs */
++#define FIQ_START 0
++/* switch between IRQ and FIQ */
++extern int mxc_set_irq_fiq(unsigned int irq, unsigned int type);
++
+ #endif /* __ASM_ARCH_MXC_IRQS_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/memory.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/memory.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/memory.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/memory.h 2009-03-11 13:16:24.000000000 +0100
+@@ -26,4 +26,5 @@
+ */
+ #define __bus_to_virt(a) __phys_to_virt(a)
+
++#define CONSISTENT_DMA_SIZE (14 * SZ_1M)
+ #endif /* __ASM_ARCH_MXC_MEMORY_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/mmc.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/mmc.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/mmc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/mmc.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,19 @@
++#ifndef ASMARM_ARCH_MMC_H
++#define ASMARM_ARCH_MMC_H
++
++#include <linux/mmc/host.h>
++
++struct device;
++
++struct imxmmc_platform_data {
++ int (*get_ro)(struct device *);
++ int (*init)(struct device *, irq_handler_t, void *);
++ void (*exit)(struct device *, void *);
++ void (*setpower)(struct device *, unsigned int vdd);
++ int (*suspend)(struct device *, pm_message_t state);
++ int (*resume)(struct device *);
++};
++
++extern void imx_set_mmc_info(struct imxmmc_platform_data *info);
++
++#endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/mx27.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/mx27.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/mx27.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/mx27.h 2009-03-11 13:16:24.000000000 +0100
+@@ -24,12 +24,20 @@
+ #error "Do not include directly."
+ #endif
+
++/* the DMA code supports SG list chaining */
++#define ARCH_HAS_SG_CHAIN
++
+ /* IRAM */
+ #define IRAM_BASE_ADDR 0xFFFF4C00 /* internal ram */
+
+ /* Register offests */
++#ifndef __ASSEMBLY__
++#define AIPI_BASE_ADDR 0x10000000UL
++#define AIPI_BASE_ADDR_VIRT ((void __iomem *)0xF4000000)
++#else
+ #define AIPI_BASE_ADDR 0x10000000
+ #define AIPI_BASE_ADDR_VIRT 0xF4000000
++#endif
+ #define AIPI_SIZE SZ_1M
+
+ #define DMA_BASE_ADDR (AIPI_BASE_ADDR + 0x01000)
+@@ -72,7 +80,8 @@
+ /* for mx27*/
+ #define OTG_BASE_ADDR USBOTG_BASE_ADDR
+ #define SAHARA_BASE_ADDR (AIPI_BASE_ADDR + 0x25000)
+-#define EMMA_BASE_ADDR (AIPI_BASE_ADDR + 0x26400)
++#define EMMA_PP_BASE_ADDR (AIPI_BASE_ADDR + 0x26000)
++#define EMMA_PRP_BASE_ADDR (AIPI_BASE_ADDR + 0x26400)
+ #define CCM_BASE_ADDR (AIPI_BASE_ADDR + 0x27000)
+ #define SYSCTRL_BASE_ADDR (AIPI_BASE_ADDR + 0x27800)
+ #define IIM_BASE_ADDR (AIPI_BASE_ADDR + 0x28000)
+@@ -91,16 +100,26 @@
+
+ #define AVIC_BASE_ADDR 0x10040000
+
++#ifndef __ASSEMBLY__
++#define SAHB1_BASE_ADDR 0x80000000UL
++#define SAHB1_BASE_ADDR_VIRT ((void __iomem *)0xF4100000UL)
++#else
+ #define SAHB1_BASE_ADDR 0x80000000
+ #define SAHB1_BASE_ADDR_VIRT 0xF4100000
++#endif
+ #define SAHB1_SIZE SZ_1M
+
+ #define CSI_BASE_ADDR (SAHB1_BASE_ADDR + 0x0000)
+ #define ATA_BASE_ADDR (SAHB1_BASE_ADDR + 0x1000)
+
+ /* NAND, SDRAM, WEIM, M3IF, EMI controllers */
++#ifndef __ASSEMBLY__
++#define X_MEMC_BASE_ADDR 0xD8000000UL
++#define X_MEMC_BASE_ADDR_VIRT ((void __iomem *)0xF4200000UL)
++#else
+ #define X_MEMC_BASE_ADDR 0xD8000000
+ #define X_MEMC_BASE_ADDR_VIRT 0xF4200000
++#endif
+ #define X_MEMC_SIZE SZ_1M
+
+ #define NFC_BASE_ADDR (X_MEMC_BASE_ADDR)
+@@ -127,14 +146,24 @@
+ * and returning the virtual address. If the physical address is not mapped,
+ * it returns 0xDEADBEEF
+ */
+-#define IO_ADDRESS(x) \
+- (void __iomem *) \
+- (((x >= AIPI_BASE_ADDR) && (x < (AIPI_BASE_ADDR + AIPI_SIZE))) ? \
+- AIPI_IO_ADDRESS(x) : \
+- ((x >= SAHB1_BASE_ADDR) && (x < (SAHB1_BASE_ADDR + SAHB1_SIZE))) ? \
+- SAHB1_IO_ADDRESS(x) : \
+- ((x >= X_MEMC_BASE_ADDR) && (x < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? \
+- X_MEMC_IO_ADDRESS(x) : 0xDEADBEEF)
++#define IO_ADDRESS(x) \
++ ((((x) >= AIPI_BASE_ADDR) && ((x) < (AIPI_BASE_ADDR + AIPI_SIZE))) ? \
++ AIPI_IO_ADDRESS(x) : \
++ (((x) >= SAHB1_BASE_ADDR) && ((x) < (SAHB1_BASE_ADDR + SAHB1_SIZE))) ? \
++ SAHB1_IO_ADDRESS(x) : \
++ (((x) >= X_MEMC_BASE_ADDR) && ((x) < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? \
++ X_MEMC_IO_ADDRESS(x) : NULL)
++
++#define MXC_VADDR_RANGE(v,n) \
++ (((v)) >= n##_BASE_ADDR_VIRT) && \
++ (((v)) < n##_BASE_ADDR_VIRT + n##_SIZE) ? \
++ ((v)-n##_BASE_ADDR_VIRT + n##_BASE_ADDR) :
++
++#define MXC_PHYS_ADDRESS(v) \
++ (unsigned long)(MXC_VADDR_RANGE(v,AIPI) \
++ MXC_VADDR_RANGE(v,SAHB1) \
++ MXC_VADDR_RANGE(v,X_MEMC) \
++ 0UL)
+
+ /* define the address mapping macros: in physical address order */
+ #define AIPI_IO_ADDRESS(x) \
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/mxc_ehci.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/mxc_ehci.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/mxc_ehci.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/mxc_ehci.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,9 @@
++#ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H
++#define __INCLUDE_ASM_ARCH_MXC_EHCI_H
++
++struct mxc_usbh_platform_data {
++ int (*init)(struct platform_device *pdev);
++ int (*exit)(struct platform_device *pdev);
++};
++#endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */
++
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/mxc_timer.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/mxc_timer.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/mxc_timer.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/mxc_timer.h 2009-03-11 13:16:24.000000000 +0100
+@@ -26,7 +26,7 @@
+ #include <linux/clk.h>
+ #include <mach/hardware.h>
+
+-#ifdef CONFIG_ARCH_IMX
++#ifdef CONFIG_ARCH_MX1
+ #define TIMER_BASE IO_ADDRESS(TIM1_BASE_ADDR)
+ #define TIMER_INTERRUPT TIM1_INT
+
+@@ -65,7 +65,7 @@ static void gpt_irq_acknowledge(void)
+ {
+ __raw_writel(0, TIMER_BASE + MXC_TSTAT);
+ }
+-#endif /* CONFIG_ARCH_IMX */
++#endif /* CONFIG_ARCH_MX1 */
+
+ #ifdef CONFIG_ARCH_MX2
+ #define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR)
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/system.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/system.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/system.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/system.h 2009-03-11 13:16:24.000000000 +0100
+@@ -21,14 +21,7 @@
+ #ifndef __ASM_ARCH_MXC_SYSTEM_H__
+ #define __ASM_ARCH_MXC_SYSTEM_H__
+
+-static inline void arch_idle(void)
+-{
+- cpu_do_idle();
+-}
+-
+-static inline void arch_reset(char mode)
+-{
+- cpu_reset(0);
+-}
++extern void arch_idle(void);
++extern void arch_reset(char mode);
+
+ #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/include/mach/ulpi.h linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/ulpi.h
+--- linux-2.6.28/arch/arm/plat-mxc/include/mach/ulpi.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/include/mach/ulpi.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,31 @@
++#ifndef __MACH_ULPI_H
++#define __MACH_ULPI_H
++
++int ulpi_set(u8 bits, int reg, void __iomem *view);
++int ulpi_clear(u8 bits, int reg, void __iomem *view);
++int ulpi_read(int reg, void __iomem *view);
++
++/* ISP 1504 register addresses */
++#define ISP1504_VID_LOW 0x00 /* Vendor ID low */
++#define ISP1504_VID_HIGH 0x01 /* Vendor ID high */
++#define ISP1504_PID_LOW 0x02 /* Product ID low */
++#define ISP1504_PID_HIGH 0x03 /* Product ID high */
++#define ISP1504_ITFCTL 0x07 /* Interface Control */
++#define ISP1504_OTGCTL 0x0A /* OTG Control */
++
++/* add to above register address to access Set/Clear functions */
++#define ISP1504_REG_SET 0x01
++#define ISP1504_REG_CLEAR 0x02
++
++/* 1504 OTG Control Register bits */
++#define USE_EXT_VBUS_IND (1 << 7) /* Use ext. Vbus indicator */
++#define DRV_VBUS_EXT (1 << 6) /* Drive Vbus external */
++#define DRV_VBUS (1 << 5) /* Drive Vbus */
++#define CHRG_VBUS (1 << 4) /* Charge Vbus */
++#define DISCHRG_VBUS (1 << 3) /* Discharge Vbus */
++#define DM_PULL_DOWN (1 << 2) /* enable DM Pull Down */
++#define DP_PULL_DOWN (1 << 1) /* enable DP Pull Down */
++#define ID_PULL_UP (1 << 0) /* enable ID Pull Up */
++
++#endif /* __MACH_ULPI_H */
++
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/iomux-mx1-mx2.c linux-2.6.28-karo/arch/arm/plat-mxc/iomux-mx1-mx2.c
+--- linux-2.6.28/arch/arm/plat-mxc/iomux-mx1-mx2.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/iomux-mx1-mx2.c 2009-03-11 13:16:24.000000000 +0100
+@@ -1,9 +1,10 @@
+ /*
+- * arch/arm/mach-mxc/generic.c
++ * arch/arm/plat-mxc/iomux-mx1-mx2.c
+ *
+- * author: Sascha Hauer
+- * Created: april 20th, 2004
++ * Author: Sascha Hauer
++ * Created: April 20th, 2004
+ * Copyright: Synertronixx GmbH
++// FIXME: This is most likely as incorrect as the filename comment above
+ *
+ * Common code for i.MX machines
+ *
+@@ -32,7 +33,7 @@
+
+ #include <mach/hardware.h>
+ #include <asm/mach/map.h>
+-#include <mach/iomux-mx1-mx2.h>
++#include <mach/iomux.h>
+
+ void mxc_gpio_mode(int gpio_mode)
+ {
+@@ -40,6 +41,31 @@ void mxc_gpio_mode(int gpio_mode)
+ unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT;
+ unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT;
+ unsigned int tmp;
++ unsigned long flags;
++ char buf[64];
++
++ local_irq_save(flags);
++
++ if (gpio_mode & GPIO_OUT) {
++ switch (gpio_mode & (GPIO_DFLT_LOW | GPIO_DFLT_HIGH)) {
++ case 0:
++ break;
++ case GPIO_DFLT_LOW:
++ tmp = __raw_readl(VA_GPIO_BASE + MXC_DR(port));
++ tmp &= ~(1 << pin);
++ __raw_writel(tmp, VA_GPIO_BASE + MXC_DR(port));
++ break;
++ case GPIO_DFLT_HIGH:
++ tmp = __raw_readl(VA_GPIO_BASE + MXC_DR(port));
++ tmp |= (1 << pin);
++ __raw_writel(tmp, VA_GPIO_BASE + MXC_DR(port));
++ break;
++ default:
++ printk(KERN_ERR
++ "GPIO_DFLT_LOW and GPIO_DFLT_HIGH both set for P%c%d\n",
++ port + 'A', pin);
++ }
++ }
+
+ /* Pullup enable */
+ tmp = __raw_readl(VA_GPIO_BASE + MXC_PUEN(port));
+@@ -106,51 +132,50 @@ void mxc_gpio_mode(int gpio_mode)
+ tmp |= ((gpio_mode >> GPIO_BOUT_SHIFT) & 3) << (pin * 2);
+ __raw_writel(tmp, VA_GPIO_BASE + MXC_ICONFB2(port));
+ }
++ local_irq_restore(flags);
+ }
+ EXPORT_SYMBOL(mxc_gpio_mode);
+
+ int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
+- int alloc_mode, const char *label)
++ const char *label)
+ {
+- const int *p = pin_list;
++ const int *p;
+ int i;
+- unsigned gpio;
+- unsigned mode;
++ int ret = -EINVAL;
+
+- for (i = 0; i < count; i++) {
+- gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK);
+- mode = *p & ~(GPIO_PIN_MASK | GPIO_PORT_MASK);
++ /* Try to obtain all requested GPIOs */
++ for (i = 0, p = pin_list; i < count; i++, p++) {
++ unsigned gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK);
+
+ if (gpio >= (GPIO_PORT_MAX + 1) * 32)
+ goto setup_error;
+
+- if (alloc_mode & MXC_GPIO_ALLOC_MODE_RELEASE)
+- gpio_free(gpio);
+- else if (!(alloc_mode & MXC_GPIO_ALLOC_MODE_NO_ALLOC))
+- if (gpio_request(gpio, label)
+- && !(alloc_mode & MXC_GPIO_ALLOC_MODE_TRY_ALLOC))
+- goto setup_error;
+-
+- if (!(alloc_mode & (MXC_GPIO_ALLOC_MODE_ALLOC_ONLY |
+- MXC_GPIO_ALLOC_MODE_RELEASE)))
+- mxc_gpio_mode(gpio | mode);
+-
+- p++;
++ ret = gpio_request(gpio, label);
++ if (ret)
++ goto setup_error;
++ }
++ /* Reconfigure all requested pins */
++ for (i = 0, p = pin_list; i < count; i++, p++) {
++ mxc_gpio_mode(*p);
+ }
+ return 0;
+
+ setup_error:
+- if (alloc_mode & (MXC_GPIO_ALLOC_MODE_NO_ALLOC |
+- MXC_GPIO_ALLOC_MODE_TRY_ALLOC))
+- return -EINVAL;
+-
+- while (p != pin_list) {
+- p--;
+- gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK);
++ mxc_gpio_release_multiple_pins(pin_list, i);
++ return ret;
++}
++EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins);
++
++void mxc_gpio_release_multiple_pins(const int *pin_list, int count)
++{
++ const int *p;
++ int i;
++
++ for (i = 0, p = pin_list; i < count; i++, p++) {
++ unsigned gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK);
+ gpio_free(gpio);
+ }
+
+- return -EINVAL;
+ }
+-EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins);
++EXPORT_SYMBOL(mxc_gpio_release_multiple_pins);
+
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/irq.c linux-2.6.28-karo/arch/arm/plat-mxc/irq.c
+--- linux-2.6.28/arch/arm/plat-mxc/irq.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/irq.c 2009-03-11 18:48:21.000000000 +0100
+@@ -17,9 +17,13 @@
+ * MA 02110-1301, USA.
+ */
+
++#include <linux/module.h>
++#include <linux/sysdev.h>
+ #include <linux/irq.h>
+ #include <linux/io.h>
++#include <linux/pm.h>
+ #include <mach/common.h>
++#include <asm/mach/irq.h>
+
+ #define AVIC_BASE IO_ADDRESS(AVIC_BASE_ADDR)
+ #define AVIC_INTCNTL (AVIC_BASE + 0x00) /* int control reg */
+@@ -65,6 +69,28 @@ void imx_irq_set_priority(unsigned char
+ EXPORT_SYMBOL(imx_irq_set_priority);
+ #endif
+
++#ifdef CONFIG_FIQ
++int mxc_set_irq_fiq(unsigned int irq, unsigned int type)
++{
++ unsigned int irqt;
++
++ if (irq >= MXC_MAX_INT_LINES)
++ return -EINVAL;
++
++ if (irq < MXC_MAX_INT_LINES / 2) {
++ irqt = __raw_readl(AVIC_INTTYPEL) & ~(1 << irq);
++ __raw_writel(irqt | (!!type << irq), AVIC_INTTYPEL);
++ } else {
++ irq -= MXC_MAX_INT_LINES / 2;
++ irqt = __raw_readl(AVIC_INTTYPEH) & ~(1 << irq);
++ __raw_writel(irqt | (!!type << irq), AVIC_INTTYPEH);
++ }
++
++ return 0;
++}
++EXPORT_SYMBOL(mxc_set_irq_fiq);
++#endif /* CONFIG_FIQ */
++
+ /* Disable interrupt number "irq" in the AVIC */
+ static void mxc_mask_irq(unsigned int irq)
+ {
+@@ -77,12 +103,94 @@ static void mxc_unmask_irq(unsigned int
+ __raw_writel(irq, AVIC_INTENNUM);
+ }
+
++static u32 saved_wakeup_low, saved_wakeup_high;
++static u32 suspend_wakeup_low, suspend_wakeup_high;
++
++/* Set interrupt number "irq" in the AVIC as a wake-up source */
++static int mxc_set_wake_irq(unsigned int irq, unsigned int enable)
++{
++ uint32_t *wakeup_intr;
++ uint32_t irq_bit;
++
++ if (irq < 32) {
++ wakeup_intr = &suspend_wakeup_low;
++ irq_bit = 1 << irq;
++ } else {
++ wakeup_intr = &suspend_wakeup_high;
++ irq_bit = 1 << (irq - 32);
++ }
++
++ if (enable) {
++ *wakeup_intr |= irq_bit;
++ } else {
++ *wakeup_intr &= ~irq_bit;
++ }
++
++ return 0;
++}
++
+ static struct irq_chip mxc_avic_chip = {
+ .ack = mxc_mask_irq,
+ .mask = mxc_mask_irq,
+ .unmask = mxc_unmask_irq,
++ .set_wake = mxc_set_wake_irq,
++};
++
++#ifdef CONFIG_PM
++/* This function puts the AVIC in low-power mode/state.
++ * All interrupts that are enabled are first saved.
++ * Only those interrupts which are registered as a wake source by calling
++ * enable_irq_wake are enabled. All other interrupts are disabled.
++ */
++static int mxc_avic_suspend(struct sys_device *dev, pm_message_t mesg)
++{
++ saved_wakeup_high = __raw_readl(AVIC_INTENABLEH);
++ saved_wakeup_low = __raw_readl(AVIC_INTENABLEL);
++
++ __raw_writel(suspend_wakeup_high, AVIC_INTENABLEH);
++ __raw_writel(suspend_wakeup_low, AVIC_INTENABLEL);
++
++ return 0;
++}
++
++/* This function brings the AVIC back from low-power state.
++ * All interrupts that were enabled prior to suspend are re-enabled.
++ */
++static int mxc_avic_resume(struct sys_device *dev)
++{
++ __raw_writel(saved_wakeup_high, AVIC_INTENABLEH);
++ __raw_writel(saved_wakeup_low, AVIC_INTENABLEL);
++
++ return 0;
++}
++
++#else
++#define mxc_avic_suspend NULL
++#define mxc_avic_resume NULL
++#endif /* CONFIG_PM */
++
++/*!
++ * This structure contains pointers to the power management callback functions.
++ */
++static struct sysdev_class mxc_avic_sysclass = {
++ .name = "mxc_irq",
++ .suspend = mxc_avic_suspend,
++ .resume = mxc_avic_resume,
++};
++
++/*!
++ * This structure represents AVIC as a system device.
++ * System devices follow a slightly different driver model.
++ * They don't need to do dynammic driver binding, can't be probed,
++ * and don't reside on any type of peripheral bus.
++ * So, it is represented and treated a little differently.
++ */
++struct sys_device mxc_avic_device = {
++ .cls = &mxc_avic_sysclass,
+ };
+
++static int __init mxc_avic_sysinit(void);
++
+ /*
+ * This function initializes the AVIC hardware and disables all the
+ * interrupts. It registers the interrupt enable and disable functions
+@@ -91,7 +199,6 @@ static struct irq_chip mxc_avic_chip = {
+ void __init mxc_init_irq(void)
+ {
+ int i;
+- u32 reg;
+
+ /* put the AVIC into the reset value with
+ * all interrupts disabled
+@@ -119,5 +226,30 @@ void __init mxc_init_irq(void)
+ /* init architectures chained interrupt handler */
+ mxc_register_gpios();
+
++#ifdef CONFIG_FIQ
++ /* Initialize FIQ */
++ init_FIQ();
++#endif
++
+ printk(KERN_INFO "MXC IRQ initialized\n");
+ }
++
++extern int __init mxc_gpio_sys_init(void);
++
++/* This function registers AVIC hardware as a system device */
++static int __init mxc_avic_sysinit(void)
++{
++ int ret;
++
++ ret = sysdev_class_register(&mxc_avic_sysclass);
++ if (ret)
++ return ret;
++ ret = sysdev_register(&mxc_avic_device);
++ if (ret)
++ return ret;
++
++ ret = mxc_gpio_sys_init();
++
++ return ret;
++}
++arch_initcall(mxc_avic_sysinit);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/arch/arm/plat-mxc/ulpi.c linux-2.6.28-karo/arch/arm/plat-mxc/ulpi.c
+--- linux-2.6.28/arch/arm/plat-mxc/ulpi.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/arch/arm/plat-mxc/ulpi.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,120 @@
++/*
++ * Copyright 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ * MA 02110-1301, USA.
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/io.h>
++#include <linux/delay.h>
++
++#include <mach/ulpi.h>
++
++/* ULPIVIEW register bits */
++#define ULPIVW_WU (1 << 31) /* Wakeup */
++#define ULPIVW_RUN (1 << 30) /* read/write run */
++#define ULPIVW_WRITE (1 << 29) /* 0 = read 1 = write */
++#define ULPIVW_SS (1 << 27) /* SyncState */
++#define ULPIVW_PORT_MASK 0x07 /* Port field */
++#define ULPIVW_PORT_SHIFT 24
++#define ULPIVW_ADDR_MASK 0xFF /* data address field */
++#define ULPIVW_ADDR_SHIFT 16
++#define ULPIVW_RDATA_MASK 0xFF /* read data field */
++#define ULPIVW_RDATA_SHIFT 8
++#define ULPIVW_WDATA_MASK 0xFF /* write data field */
++#define ULPIVW_WDATA_SHIFT 0
++
++static int ulpi_poll(void __iomem *view, uint32_t bit)
++{
++ uint32_t data;
++ int timeout = 10000;
++
++ data = __raw_readl(view);
++ while (data & bit) {
++ if (!timeout--)
++ return -ETIMEDOUT;
++
++ udelay(1);
++ data = __raw_readl(view);
++ }
++ return (data >> ULPIVW_RDATA_SHIFT) & ULPIVW_RDATA_MASK;
++}
++
++int ulpi_read(int reg, void __iomem *view)
++{
++ int ret;
++
++ /* make sure interface is running */
++ if (!(__raw_readl(view) && ULPIVW_SS)) {
++ __raw_writel(ULPIVW_WU, view);
++
++ /* wait for wakeup */
++ ret = ulpi_poll(view, ULPIVW_WU);
++ if (ret < 0)
++ return ret;
++ }
++
++ /* read the register */
++ __raw_writel((ULPIVW_RUN | (reg << ULPIVW_ADDR_SHIFT)), view);
++
++ /* wait for completion */
++ return ulpi_poll(view, ULPIVW_RUN);
++}
++EXPORT_SYMBOL(ulpi_read);
++
++int ulpi_set(u8 bits, int reg, void __iomem *view)
++{
++ int ret;
++
++ /* make sure the interface is running */
++ if (!(__raw_readl(view) && ULPIVW_SS)) {
++ __raw_writel(ULPIVW_WU, view);
++ /* wait for wakeup */
++ ret = ulpi_poll(view, ULPIVW_WU);
++ if (ret < 0)
++ return ret;
++ }
++
++ __raw_writel((ULPIVW_RUN | ULPIVW_WRITE |
++ ((reg + ISP1504_REG_SET) << ULPIVW_ADDR_SHIFT) |
++ ((bits & ULPIVW_WDATA_MASK) << ULPIVW_WDATA_SHIFT)),
++ view);
++
++ /* wait for completion */
++ ret = ulpi_poll(view, ULPIVW_RUN);
++ if (ret < 0)
++ return ret;
++ return 0;
++}
++EXPORT_SYMBOL(ulpi_set);
++
++int ulpi_clear(u8 bits, int reg, void __iomem *view)
++{
++ int ret;
++
++ __raw_writel((ULPIVW_RUN | ULPIVW_WRITE |
++ ((reg + ISP1504_REG_CLEAR) << ULPIVW_ADDR_SHIFT) |
++ ((bits & ULPIVW_WDATA_MASK) << ULPIVW_WDATA_SHIFT)),
++ view);
++
++ /* wait for completion */
++ ret = ulpi_poll(view, ULPIVW_RUN);
++ if (ret < 0)
++ return ret;
++ return 0;
++}
++EXPORT_SYMBOL(ulpi_clear);
++
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/Makefile linux-2.6.28-karo/drivers/Makefile
+--- linux-2.6.28/drivers/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -102,3 +102,4 @@ obj-$(CONFIG_SSB) += ssb/
+ obj-$(CONFIG_VIRTIO) += virtio/
+ obj-$(CONFIG_REGULATOR) += regulator/
+ obj-$(CONFIG_STAGING) += staging/
++obj-$(CONFIG_DRIVERS_MXC) += mxc/
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/dma/dmaengine.c linux-2.6.28-karo/drivers/dma/dmaengine.c
+--- linux-2.6.28/drivers/dma/dmaengine.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/dma/dmaengine.c 2009-03-11 13:16:24.000000000 +0100
+@@ -322,7 +322,12 @@ void dma_async_client_unregister(struct
+
+ mutex_lock(&dma_list_mutex);
+ /* free all channels the client is holding */
+- list_for_each_entry(device, &dma_device_list, global_node)
++ list_for_each_entry(device, &dma_device_list, global_node) {
++ /* Client only can have channels from one DMA controller */
++ if (client->slave && client->slave->dma_dev &&
++ client->slave->dma_dev != device->dev)
++ continue;
++
+ list_for_each_entry(chan, &device->channels, device_node) {
+ ack = client->event_callback(client, chan,
+ DMA_RESOURCE_REMOVED);
+@@ -332,6 +337,7 @@ void dma_async_client_unregister(struct
+ chan->client_count--;
+ }
+ }
++ }
+
+ list_del(&client->global_node);
+ mutex_unlock(&dma_list_mutex);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/gpio/gpiolib.c linux-2.6.28-karo/drivers/gpio/gpiolib.c
+--- linux-2.6.28/drivers/gpio/gpiolib.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/gpio/gpiolib.c 2009-03-11 13:16:24.000000000 +0100
+@@ -789,6 +789,7 @@ int gpio_request(unsigned gpio, const ch
+ } else {
+ status = -EBUSY;
+ module_put(chip->owner);
++ goto done;
+ }
+
+ if (chip->request) {
+@@ -842,9 +843,14 @@ void gpio_free(unsigned gpio)
+ desc_set_label(desc, NULL);
+ module_put(desc->chip->owner);
+ clear_bit(FLAG_REQUESTED, &desc->flags);
+- } else
++ } else {
++ if (!chip) {
++ printk(KERN_ERR "%s: No chip for GPIO%d\n", __FUNCTION__, gpio);
++ } else {
++ printk(KERN_ERR "%s: GPIO%d not requested\n", __FUNCTION__, gpio);
++ }
+ WARN_ON(extra_checks);
+-
++ }
+ spin_unlock_irqrestore(&gpio_lock, flags);
+ }
+ EXPORT_SYMBOL_GPL(gpio_free);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/i2c/busses/Kconfig linux-2.6.28-karo/drivers/i2c/busses/Kconfig
+--- linux-2.6.28/drivers/i2c/busses/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/i2c/busses/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -355,6 +355,16 @@ config I2C_IBM_IIC
+ This driver can also be built as a module. If so, the module
+ will be called i2c-ibm_iic.
+
++config I2C_MXC
++ tristate "MXC I2C support"
++ depends on I2C && ARCH_MXC
++ help
++ Say Y here if you want to use the IIC bus controller on Freescale
++ i.MX2 family of processors (like i.MX21 and i.MX27).
++
++ This driver can also be built as a module. If so, the module
++ will be called i2c-mxc.
++
+ config I2C_IOP3XX
+ tristate "Intel IOPx3xx and IXP4xx on-chip I2C interface"
+ depends on ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX || ARCH_IOP13XX
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/i2c/busses/Makefile linux-2.6.28-karo/drivers/i2c/busses/Makefile
+--- linux-2.6.28/drivers/i2c/busses/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/i2c/busses/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -11,6 +11,7 @@ obj-$(CONFIG_I2C_AMD756_S4882) += i2c-am
+ obj-$(CONFIG_I2C_AMD8111) += i2c-amd8111.o
+ obj-$(CONFIG_I2C_I801) += i2c-i801.o
+ obj-$(CONFIG_I2C_ISCH) += i2c-isch.o
++obj-$(CONFIG_I2C_MXC) += i2c-mxc.o
+ obj-$(CONFIG_I2C_NFORCE2) += i2c-nforce2.o
+ obj-$(CONFIG_I2C_NFORCE2_S4985) += i2c-nforce2-s4985.o
+ obj-$(CONFIG_I2C_PIIX4) += i2c-piix4.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/i2c/busses/i2c-mxc.c linux-2.6.28-karo/drivers/i2c/busses/i2c-mxc.c
+--- linux-2.6.28/drivers/i2c/busses/i2c-mxc.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/i2c/busses/i2c-mxc.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,667 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++/*
++ * Driver for the Freescale Semiconductor MXC I2C buses.
++ * Based on i2c driver algorithm for PCF8584 adapters
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/err.h>
++#include <linux/i2c.h>
++#include <linux/clk.h>
++#include <asm/irq.h>
++#include <asm/io.h>
++#include <mach/clock.h>
++#include <mach/imx_i2c.h>
++
++#define DRV_NAME "imx_i2c"
++
++typedef struct {
++ struct i2c_adapter adap;
++ wait_queue_head_t wq;
++ void __iomem *membase; /* FIXME iomem? */
++ int irq;
++ unsigned int clkdiv;
++ struct clk *clk;
++ bool low_power;
++ struct imx_i2c_platform_data *pdata;
++ bool transfer_done;
++ bool tx_success;
++} imx_i2c_device;
++
++struct clk_div_table {
++ int reg_value;
++ int div;
++};
++
++static const struct clk_div_table i2c_clk_table[] = {
++ {0x20, 22}, {0x21, 24}, {0x22, 26}, {0x23, 28},
++ {0, 30}, {1, 32}, {0x24, 32}, {2, 36},
++ {0x25, 36}, {0x26, 40}, {3, 42}, {0x27, 44},
++ {4, 48}, {0x28, 48}, {5, 52}, {0x29, 56},
++ {6, 60}, {0x2A, 64}, {7, 72}, {0x2B, 72},
++ {8, 80}, {0x2C, 80}, {9, 88}, {0x2D, 96},
++ {0xA, 104}, {0x2E, 112}, {0xB, 128}, {0x2F, 128},
++ {0xC, 144}, {0xD, 160}, {0x30, 160}, {0xE, 192},
++ {0x31, 192}, {0x32, 224}, {0xF, 240}, {0x33, 256},
++ {0x10, 288}, {0x11, 320}, {0x34, 320}, {0x12, 384},
++ {0x35, 384}, {0x36, 448}, {0x13, 480}, {0x37, 512},
++ {0x14, 576}, {0x15, 640}, {0x38, 640}, {0x16, 768},
++ {0x39, 768}, {0x3A, 896}, {0x17, 960}, {0x3B, 1024},
++ {0x18, 1152}, {0x19, 1280}, {0x3C, 1280}, {0x1A, 1536},
++ {0x3D, 1536}, {0x3E, 1792}, {0x1B, 1920}, {0x3F, 2048},
++ {0x1C, 2304}, {0x1D, 2560}, {0x1E, 3072}, {0x1F, 3840},
++ {0, 0}
++};
++
++/* Transmit a STOP signal to the slave device */
++static void imx_i2c_stop(imx_i2c_device * dev)
++{
++ unsigned int cr;
++ int retry = 16;
++
++ cr = __raw_readw(dev->membase + MXC_I2CR);
++ cr &= ~(MXC_I2CR_MSTA | MXC_I2CR_MTX);
++ __raw_writew(cr, dev->membase + MXC_I2CR);
++
++ /*
++ * Make sure STOP meets setup requirement.
++ */
++ for (;;) {
++ unsigned int sr = __raw_readw(dev->membase + MXC_I2SR);
++ if ((sr & MXC_I2SR_IBB) == 0) break;
++ if (retry-- <= 0) {
++ printk(KERN_DEBUG "Bus busy\n");
++ break;
++ }
++ udelay(3);
++ }
++}
++
++/*
++ * Wait for the transmission of the data byte to complete. This function waits
++ * till we get a signal from the interrupt service routine indicating completion
++ * of the address cycle or we time out.
++ * The function returns 0 on success or -1 if an ack was not received
++ */
++static int imx_i2c_wait_for_tc(imx_i2c_device * dev, int trans_flag)
++{
++ int retry = 16;
++
++ while (retry-- && !dev->transfer_done) {
++ wait_event_interruptible_timeout(dev->wq,
++ dev->transfer_done,
++ dev->adap.timeout);
++ }
++ dev->transfer_done = false;
++
++ if (retry <= 0) {
++ /* Unable to send data */
++ printk(KERN_DEBUG "Data not transmitted\n");
++ return -1;
++ } else if (!(trans_flag & I2C_M_RD)) {
++ if (!dev->tx_success) {
++ /*
++ * An ACK was not received for a transmitted byte. Don't
++ * print a message here as slow devices might cause this
++ * condition quite often. This is not an error as
++ * routines may try to look if a device is ready.
++ */
++ return -1;
++ }
++ }
++
++ return 0;
++}
++
++/* Transmit a START signal to the slave device */
++static void imx_i2c_start(imx_i2c_device * dev, struct i2c_msg *msg)
++{
++ unsigned int cr, sr;
++ unsigned int addr_trans;
++ int retry = 16;
++
++ /*
++ * Set the slave address and the requested transfer mode
++ * in the data register
++ */
++ addr_trans = msg->addr << 1;
++ if (msg->flags & I2C_M_RD) {
++ addr_trans |= 0x01;
++ }
++
++ /* Set the Master bit */
++ cr = __raw_readw(dev->membase + MXC_I2CR);
++ cr |= MXC_I2CR_MSTA;
++ __raw_writew(cr, dev->membase + MXC_I2CR);
++
++ /* Wait till the Bus Busy bit is set */
++ sr = __raw_readw(dev->membase + MXC_I2SR);
++ while (retry-- && (!(sr & MXC_I2SR_IBB))) {
++ udelay(3);
++ sr = __raw_readw(dev->membase + MXC_I2SR);
++ }
++ if (retry <= 0) {
++ printk(KERN_DEBUG "Could not grab Bus ownership\n");
++ }
++
++ /* Set the Transmit bit */
++ cr = __raw_readw(dev->membase + MXC_I2CR);
++ cr |= MXC_I2CR_MTX;
++ __raw_writew(cr, dev->membase + MXC_I2CR);
++
++ __raw_writew(addr_trans, dev->membase + MXC_I2DR);
++}
++
++/* Transmit a REPEAT START to the slave device */
++static void imx_i2c_repstart(imx_i2c_device * dev, struct i2c_msg *msg)
++{
++ unsigned int cr;
++ unsigned int addr_trans;
++
++ /*
++ * Set the slave address and the requested transfer mode
++ * in the data register
++ */
++ addr_trans = msg->addr << 1;
++ if (msg->flags & I2C_M_RD) {
++ addr_trans |= 0x01;
++ }
++ cr = __raw_readw(dev->membase + MXC_I2CR);
++ cr |= MXC_I2CR_RSTA;
++ __raw_writew(cr, dev->membase + MXC_I2CR);
++ udelay(3);
++ __raw_writew(addr_trans, dev->membase + MXC_I2DR);
++}
++
++/*
++ * Read the received data. The function waits till data is available or times
++ * out. Generates a stop signal if this is the last message to be received.
++ * Sends an ack for all the bytes received except the last byte.
++ * The function returns the number of bytes read or -1 on time out.
++ */
++static int imx_i2c_readbytes(imx_i2c_device * dev, struct i2c_msg *msg,
++ int last, int addr_comp)
++{
++ int i;
++ char *buf = msg->buf;
++ int len = msg->len;
++ unsigned int cr;
++
++ cr = __raw_readw(dev->membase + MXC_I2CR);
++
++ /* switch to receive mode */
++ cr &= ~MXC_I2CR_MTX;
++ /*
++ * Clear the TXAK bit to gen an ack when receiving only one byte.
++ */
++ if (len == 1)
++ cr |= MXC_I2CR_TXAK;
++ else
++ cr &= ~MXC_I2CR_TXAK;
++
++ __raw_writew(cr, dev->membase + MXC_I2CR);
++ /*
++ * Dummy read only at the end of an address cycle
++ */
++ if (addr_comp > 0)
++ __raw_readw(dev->membase + MXC_I2DR);
++
++ for (i = 0; i < len; i++) {
++ /* Wait for data transmission to complete */
++ if (imx_i2c_wait_for_tc(dev, msg->flags)) {
++ imx_i2c_stop(dev);
++ return -1;
++ }
++ /* Do not generate an ACK for the last byte */
++ if (i == (len - 2)) {
++ cr = __raw_readw(dev->membase + MXC_I2CR);
++ cr |= MXC_I2CR_TXAK;
++ __raw_writew(cr, dev->membase + MXC_I2CR);
++ } else if (i == (len - 1)) {
++ if (last)
++ imx_i2c_stop(dev);
++ }
++ /* Read the data */
++ *buf++ = __raw_readw(dev->membase + MXC_I2DR);
++ }
++
++ return i;
++}
++
++/*
++ * Write the data to the data register. Generates a stop signal if this is
++ * the last message to be sent or if no ack was received for the data sent.
++ * The function returns the number of bytes written or -1 on time out
++ * or if no ack was received for the data that was sent.
++ */
++static int imx_i2c_writebytes(imx_i2c_device * dev, struct i2c_msg *msg,
++ int last)
++{
++ int i;
++ char *buf = msg->buf;
++ int len = msg->len;
++ unsigned int cr;
++
++ cr = __raw_readw(dev->membase + MXC_I2CR);
++ /* switch to transmit mode */
++ cr |= MXC_I2CR_MTX;
++ __raw_writew(cr, dev->membase + MXC_I2CR);
++
++ for (i = 0; i < len; i++) {
++ /* Write the data */
++ __raw_writew(*buf++, dev->membase + MXC_I2DR);
++ if (imx_i2c_wait_for_tc(dev, msg->flags)) {
++ imx_i2c_stop(dev);
++ return -1;
++ }
++ }
++ if (last > 0) {
++ imx_i2c_stop(dev);
++ }
++
++ return i;
++}
++
++/* Function enables the I2C module and initializes the registers */
++static void imx_i2c_module_en(imx_i2c_device * dev, int trans_flag)
++{
++ clk_enable(dev->clk);
++ /* Set the frequency divider */
++ __raw_writew(dev->clkdiv, dev->membase + MXC_IFDR);
++ /* Clear the status register */
++ __raw_writew(0x0, dev->membase + MXC_I2SR);
++ /* Enable I2C and its interrupts */
++ __raw_writew(MXC_I2CR_IEN, dev->membase + MXC_I2CR);
++ __raw_writew(MXC_I2CR_IEN | MXC_I2CR_IIEN, dev->membase + MXC_I2CR);
++}
++
++/* Disables the I2C module */
++static void imx_i2c_module_dis(imx_i2c_device * dev)
++{
++ __raw_writew(0x0, dev->membase + MXC_I2CR);
++ clk_disable(dev->clk);
++}
++
++/*
++ * The function is registered in the adapter structure. It is called when an MXC
++ * driver wishes to transfer data to a device connected to the I2C device.
++ * The function returns the number of messages transferred, -EREMOTEIO on I2C
++ * failure and a 0 if the num argument is less than 0.
++ */
++static int imx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],
++ int num)
++{
++ imx_i2c_device *dev = (imx_i2c_device *) (i2c_get_adapdata(adap));
++ int i, ret = 0, addr_comp = 0;
++ unsigned int sr;
++
++ if (dev->low_power) {
++ printk(KERN_ERR "I2C Device in low power mode\n");
++ return -EREMOTEIO;
++ }
++
++ if (num < 1)
++ return 0;
++
++ imx_i2c_module_en(dev, msgs[0].flags);
++ sr = __raw_readw(dev->membase + MXC_I2SR);
++
++ /* Check bus state */
++ if (sr & MXC_I2SR_IBB) {
++ imx_i2c_module_dis(dev);
++ printk(KERN_DEBUG "Bus busy\n");
++ return -EREMOTEIO;
++ }
++
++ dev->transfer_done = false;
++ dev->tx_success = false;
++ for (i = 0; i < num && ret >= 0; i++) {
++ addr_comp = 0;
++ /*
++ * Send the slave address and transfer direction in the
++ * address cycle
++ */
++ if (i == 0) {
++ /* Send a start or repeat start signal */
++ imx_i2c_start(dev, &msgs[0]);
++ /* Wait for the address cycle to complete */
++ if (imx_i2c_wait_for_tc(dev, msgs[0].flags)) {
++ imx_i2c_stop(dev);
++ imx_i2c_module_dis(dev);
++ return -EREMOTEIO;
++ }
++ addr_comp = 1;
++ } else {
++ /*
++ * Generate repeat start only if required i.e the address
++ * changed or the transfer direction changed
++ */
++ if ((msgs[i].addr != msgs[i - 1].addr) ||
++ ((msgs[i].flags & I2C_M_RD) !=
++ (msgs[i - 1].flags & I2C_M_RD))) {
++ imx_i2c_repstart(dev, &msgs[i]);
++ /* Wait for the address cycle to complete */
++ if (imx_i2c_wait_for_tc(dev, msgs[i].flags)) {
++ imx_i2c_stop(dev);
++ imx_i2c_module_dis(dev);
++ return -EREMOTEIO;
++ }
++ addr_comp = 1;
++ }
++ }
++
++ /* Transfer the data */
++ if (msgs[i].flags & I2C_M_RD) {
++ /* Read the data */
++ ret = imx_i2c_readbytes(dev, &msgs[i], (i + 1 == num),
++ addr_comp);
++ if (ret < 0) {
++ printk(KERN_ERR "imx_i2c_readbytes: fail.\n");
++ break;
++ }
++ } else {
++ /* Write the data */
++ ret = imx_i2c_writebytes(dev, &msgs[i], (i + 1 == num));
++ if (ret < 0) {
++ printk(KERN_ERR "imx_i2c_writebytes: fail.\n");
++ break;
++ }
++ }
++ }
++
++ imx_i2c_module_dis(dev);
++ return i;
++}
++
++/*
++ * Returns the i2c functionality supported by this driver.
++ * Returns the functionality that is supported.
++ */
++static u32 imx_i2c_func(struct i2c_adapter *adap)
++{
++ return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
++}
++
++/*
++ * Stores the pointers for the i2c algorithm functions. The algorithm functions
++ * is used by the i2c bus driver to talk to the i2c bus
++ */
++static struct i2c_algorithm imx_i2c_algorithm = {
++ .master_xfer = imx_i2c_xfer,
++ .functionality = imx_i2c_func
++};
++
++/*
++ * Interrupt Service Routine. It signals to the process about the data transfer
++ * completion. Also sets a flag if bus arbitration is lost.
++ * The function returns IRQ_HANDLED.
++ */
++static irqreturn_t imx_i2c_handler(int irq, void *dev_id)
++{
++ imx_i2c_device *dev = dev_id;
++ unsigned int sr, cr;
++
++ sr = __raw_readw(dev->membase + MXC_I2SR);
++ cr = __raw_readw(dev->membase + MXC_I2CR);
++
++ /*
++ * Clear the interrupt bit
++ */
++ __raw_writew(0x0, dev->membase + MXC_I2SR);
++
++ if (sr & MXC_I2SR_IAL) {
++ printk(KERN_DEBUG "Bus Arbitration lost\n");
++ } else {
++ /* Interrupt due byte transfer completion */
++ dev->tx_success = false;
++ /* Check if RXAK is received in Transmit mode */
++ if ((cr & MXC_I2CR_MTX) && (!(sr & MXC_I2SR_RXAK))) {
++ dev->tx_success = true;
++ }
++ dev->transfer_done = true;
++ wake_up_interruptible(&dev->wq);
++ }
++
++ return IRQ_HANDLED;
++}
++
++/*
++ * This function is called to put the I2C adapter in a low power state. Refer to the
++ * document driver-model/driver.txt in the kernel source tree for more
++ * information.
++ * The function returns 0 on success and -1 on failure.
++ */
++static int mxci2c_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ imx_i2c_device *mxcdev = platform_get_drvdata(pdev);
++ unsigned int sr;
++
++ if (mxcdev == NULL)
++ return -1;
++
++ /* Prevent further calls to be processed */
++ mxcdev->low_power = true;
++ /* Wait till we finish the current transfer */
++ sr = __raw_readw(mxcdev->membase + MXC_I2SR);
++ while (sr & MXC_I2SR_IBB) {
++ msleep(10);
++ sr = __raw_readw(mxcdev->membase + MXC_I2SR);
++ }
++
++ mxcdev->pdata->exit(pdev);
++
++ return 0;
++}
++
++/*
++ * This function is called to bring the I2C adapter back from a low power state. Refer
++ * to the document driver-model/driver.txt in the kernel source tree for more
++ * information.
++ * The function returns 0 on success and -1 on failure
++ */
++static int mxci2c_resume(struct platform_device *pdev)
++{
++ imx_i2c_device *mxcdev = platform_get_drvdata(pdev);
++
++ if (mxcdev == NULL)
++ return -1;
++
++ mxcdev->low_power = false;
++ mxcdev->pdata->init(pdev);
++
++ return 0;
++}
++
++/*
++ * This function is called during the driver binding process.
++ * The function always returns 0.
++ */
++static int mxci2c_probe(struct platform_device *pdev)
++{
++ imx_i2c_device *imx_i2c;
++ struct imx_i2c_platform_data *i2c_plat_data = pdev->dev.platform_data;
++ struct resource *res;
++ int id = pdev->id;
++ u32 clk_freq;
++ int ret;
++ int i;
++
++ imx_i2c = kzalloc(sizeof(imx_i2c_device), GFP_KERNEL);
++ if (!imx_i2c) {
++ return -ENOMEM;
++ }
++
++ if (i2c_plat_data == NULL) {
++ dev_err(&pdev->dev, "No platform data for device!\n");
++ return -ENODEV;
++ }
++ imx_i2c->pdata = i2c_plat_data;
++ /* claim the region we will work on */
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (res == NULL) {
++ ret = -ENODEV;
++ goto err1;
++ }
++ if (!request_mem_region(res->start, resource_size(res), DRV_NAME)) {
++ dev_err(&pdev->dev, "request_mem_region failed for IMX I2C %d\n", id);
++ ret = -EBUSY;
++ goto err1;
++ }
++
++ imx_i2c->membase = ioremap(res->start, resource_size(res));
++ if (imx_i2c->membase == NULL) {
++ ret = -ENOMEM;
++ goto err2;
++ }
++ /* Claim the I2C irq line */
++ imx_i2c->irq = platform_get_irq(pdev, 0);
++ if (imx_i2c->irq < 0) {
++ dev_err(&pdev->dev, "No interrupt defined for IMX I2C %d\n", id);
++ ret = imx_i2c->irq;
++ goto err3;
++ }
++ ret = request_irq(imx_i2c->irq, imx_i2c_handler,
++ 0, DRV_NAME, imx_i2c);
++ if (ret < 0) {
++ dev_err(&pdev->dev, "Cannot claim interrupt %d for IMX I2C %d\n",
++ imx_i2c->irq, id);
++ goto err3;
++ }
++
++ init_waitqueue_head(&imx_i2c->wq);
++
++ imx_i2c->low_power = false;
++ imx_i2c->tx_success = false;
++ imx_i2c->transfer_done = false;
++
++ imx_i2c->pdata->init(pdev);
++
++ imx_i2c->clk = clk_get(&pdev->dev, "i2c_clk");
++ if (IS_ERR(imx_i2c->clk)) {
++ ret = PTR_ERR(imx_i2c->clk);
++ dev_err(&pdev->dev, "Cannot get clock for for IMX I2C %d: %d\n", id, ret);
++ goto err4;
++ }
++
++ clk_freq = clk_get_rate(imx_i2c->clk);
++ imx_i2c->clkdiv = -1;
++ if (i2c_plat_data->max_clk) {
++ /* Calculate divider and round up any fractional part */
++ int div = (clk_freq + i2c_plat_data->max_clk - 1) /
++ i2c_plat_data->max_clk;
++ for (i = 0; i2c_clk_table[i].div != 0; i++) {
++ if (i2c_clk_table[i].div >= div) {
++ imx_i2c->clkdiv = i2c_clk_table[i].reg_value;
++ break;
++ }
++ }
++ }
++ if (imx_i2c->clkdiv == -1) {
++ i = ARRAY_SIZE(i2c_clk_table) - 2;
++ imx_i2c->clkdiv = i2c_clk_table[i].reg_value;
++ }
++ dev_dbg(&pdev->dev, "i2c speed is %d/%d = %d bps, reg val = 0x%02X\n",
++ clk_freq, i2c_clk_table[i].div,
++ clk_freq / i2c_clk_table[i].div, imx_i2c->clkdiv);
++
++ /*
++ * Set the adapter information
++ */
++ strcpy(imx_i2c->adap.name, MXC_ADAPTER_NAME);
++ imx_i2c->adap.id = id;
++ imx_i2c->adap.nr = id;
++ imx_i2c->adap.algo = &imx_i2c_algorithm;
++ imx_i2c->adap.timeout = 1;
++ platform_set_drvdata(pdev, imx_i2c);
++ i2c_set_adapdata(&imx_i2c->adap, imx_i2c);
++ if ((ret = i2c_add_numbered_adapter(&imx_i2c->adap)) < 0) {
++ dev_err(&pdev->dev, "Cannot register the IMX I2C %d master\n", id);
++ goto err5;
++ }
++
++ return 0;
++err5:
++ clk_put(imx_i2c->clk);
++err4:
++ imx_i2c->pdata->exit(pdev);
++ free_irq(imx_i2c->irq, imx_i2c);
++err3:
++ iounmap(imx_i2c->membase);
++err2:
++ release_mem_region(res->start, resource_size(res));
++err1:
++ dev_err(&pdev->dev, "failed to probe i2c adapter\n");
++ kfree(imx_i2c);
++ return ret;
++}
++
++/*
++ * Dissociates the driver from the I2C device.
++ */
++static int mxci2c_remove(struct platform_device *pdev)
++{
++ imx_i2c_device *imx_i2c = platform_get_drvdata(pdev);
++ struct resource *res;
++
++ free_irq(imx_i2c->irq, imx_i2c);
++ i2c_del_adapter(&imx_i2c->adap);
++ imx_i2c->pdata->exit(pdev);
++ clk_put(imx_i2c->clk);
++ iounmap(imx_i2c->membase);
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ release_mem_region(res->start, resource_size(res));
++ platform_set_drvdata(pdev, NULL);
++ return 0;
++}
++
++/*
++ * This structure contains pointers to the power management callback functions.
++ */
++static struct platform_driver mxci2c_driver = {
++ .driver = {
++ .name = DRV_NAME,
++ .owner = THIS_MODULE,
++ },
++ .probe = mxci2c_probe,
++ .remove = mxci2c_remove,
++ .suspend = mxci2c_suspend,
++ .resume = mxci2c_resume,
++};
++
++static int __init imx_i2c_init(void)
++{
++ return platform_driver_register(&mxci2c_driver);
++}
++
++static void __exit imx_i2c_exit(void)
++{
++ platform_driver_unregister(&mxci2c_driver);
++}
++
++subsys_initcall(imx_i2c_init);
++module_exit(imx_i2c_exit);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("MXC I2C driver");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/Kconfig linux-2.6.28-karo/drivers/media/video/Kconfig
+--- linux-2.6.28/drivers/media/video/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -531,6 +531,33 @@ config VIDEO_W9966
+ Check out <file:Documentation/video4linux/w9966.txt> for more
+ information.
+
++config VIDEO_MXC_CAMERA
++ tristate "MXC Video For Linux Camera"
++ depends on VIDEO_DEV && ARCH_MXC
++ default y
++ ---help---
++ This is the video4linux2 capture driver based on MXC IPU/eMMA module.
++
++source "drivers/media/video/mxc/capture/Kconfig"
++
++config VIDEO_MXC_OUTPUT
++ tristate "MXC Video For Linux Video Output"
++ depends on VIDEO_DEV && ARCH_MXC
++ default y
++ ---help---
++ This is the video4linux2 output driver based on MXC IPU/eMMA module.
++
++source "drivers/media/video/mxc/output/Kconfig"
++
++config VIDEO_MXC_OPL
++ tristate
++ depends on VIDEO_DEV && ARCH_MXC
++ default n
++ ---help---
++ This is the ARM9-optimized OPL (Open Primitives Library) software
++ rotation/mirroring implementation. It may be used by eMMA video
++ capture or output device.
++
+ config VIDEO_CPIA
+ tristate "CPiA Video For Linux"
+ depends on VIDEO_V4L1
+@@ -893,4 +920,12 @@ config USB_S2255
+
+ endif # V4L_USB_DRIVERS
+
++config VIDEO_MX27
++ tristate "i.MX27 Quick Capture Interface driver"
++ depends on VIDEO_DEV && MACH_MX27
++ select SOC_CAMERA
++ select VIDEOBUF_DMA_CONTIG
++ ---help---
++ This is a v4l2 driver for the i.MX27 Capture Interface
++
+ endif # VIDEO_CAPTURE_DRIVERS
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/Makefile linux-2.6.28-karo/drivers/media/video/Makefile
+--- linux-2.6.28/drivers/media/video/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -57,6 +57,11 @@ obj-$(CONFIG_VIDEO_ZORAN) += zoran/
+ obj-$(CONFIG_VIDEO_PMS) += pms.o
+ obj-$(CONFIG_VIDEO_VINO) += vino.o indycam.o
+ obj-$(CONFIG_VIDEO_STRADIS) += stradis.o
++obj-$(CONFIG_VIDEO_MXC_IPU_CAMERA) += mxc/capture/
++obj-$(CONFIG_VIDEO_MXC_EMMA_CAMERA) += mxc/capture/
++obj-$(CONFIG_VIDEO_MXC_IPU_OUTPUT) += mxc/output/
++obj-$(CONFIG_VIDEO_MXC_EMMA_OUTPUT) += mxc/output/
++obj-$(CONFIG_VIDEO_MXC_OPL) += mxc/opl/
+ obj-$(CONFIG_VIDEO_CPIA) += cpia.o
+ obj-$(CONFIG_VIDEO_CPIA_PP) += cpia_pp.o
+ obj-$(CONFIG_VIDEO_CPIA_USB) += cpia_usb.o
+@@ -128,6 +133,7 @@ obj-$(CONFIG_VIDEO_VIVI) += vivi.o
+ obj-$(CONFIG_VIDEO_CX23885) += cx23885/
+
+ obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o
++obj-$(CONFIG_VIDEO_MX27) += mx27_camera.o
+ obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o
+ obj-$(CONFIG_SOC_CAMERA) += soc_camera.o
+ obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mx27_camera.c linux-2.6.28-karo/drivers/media/video/mx27_camera.c
+--- linux-2.6.28/drivers/media/video/mx27_camera.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mx27_camera.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,1185 @@
++/*
++ * V4L2 Driver for MX27 camera host
++ *
++ * Copyright (C) 2008, Sascha Hauer, Pengutronix
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ */
++
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/io.h>
++#include <linux/delay.h>
++#include <linux/dma-mapping.h>
++#include <linux/errno.h>
++#include <linux/fs.h>
++#include <linux/interrupt.h>
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/moduleparam.h>
++#include <linux/time.h>
++#include <linux/version.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/mutex.h>
++#include <linux/clk.h>
++
++#include <media/v4l2-common.h>
++#include <media/v4l2-dev.h>
++#include <media/videobuf-dma-contig.h>
++#include <media/soc_camera.h>
++
++#include <linux/videodev2.h>
++
++#include <mach/imx_cam.h>
++#include <asm/dma.h>
++#include <mach/dma-mx1-mx2.h>
++
++#include <asm/dma.h>
++
++#define MX27_CAM_DRV_NAME "mx27-camera"
++#define MX27_CAM_VERSION_CODE KERNEL_VERSION(0, 0, 5) /* FIXME: Whats this? */
++
++static const char *mx27_cam_driver_description = "i.MX27_Camera";
++
++/* reset values */
++#define CSICR1_RESET_VAL 0x40000800
++#define CSICR2_RESET_VAL 0x0
++#define CSICR3_RESET_VAL 0x0
++
++/* csi control reg 1 */
++#define CSICR1_SWAP16_EN (1 << 31)
++#define CSICR1_EXT_VSYNC (1 << 30)
++#define CSICR1_EOF_INTEN (1 << 29)
++#define CSICR1_PRP_IF_EN (1 << 28)
++#define CSICR1_CCIR_MODE (1 << 27)
++#define CSICR1_COF_INTEN (1 << 26)
++#define CSICR1_SF_OR_INTEN (1 << 25)
++#define CSICR1_RF_OR_INTEN (1 << 24)
++#define CSICR1_STATFF_LEVEL (3 << 22)
++#define CSICR1_STATFF_INTEN (1 << 21)
++#define CSICR1_RXFF_LEVEL(l) (((l) & 3) << 19)
++#define CSICR1_RXFF_INTEN (1 << 18)
++#define CSICR1_SOF_POL (1 << 17)
++#define CSICR1_SOF_INTEN (1 << 16)
++#define CSICR1_MCLKDIV(d) (((d) & 0xF) << 12)
++#define CSICR1_HSYNC_POL (1 << 11)
++#define CSICR1_CCIR_EN (1 << 10)
++#define CSICR1_MCLKEN (1 << 9)
++#define CSICR1_FCC (1 << 8)
++#define CSICR1_PACK_DIR (1 << 7)
++#define CSICR1_CLR_STATFIFO (1 << 6)
++#define CSICR1_CLR_RXFIFO (1 << 5)
++#define CSICR1_GCLK_MODE (1 << 4)
++#define CSICR1_INV_DATA (1 << 3)
++#define CSICR1_INV_PCLK (1 << 2)
++#define CSICR1_REDGE (1 << 1)
++
++#define SHIFT_STATFF_LEVEL 22
++#define SHIFT_RXFF_LEVEL 19
++#define SHIFT_MCLKDIV 12
++
++/* control reg 3 */
++#define CSICR3_FRMCNT (0xFFFF << 16)
++#define CSICR3_FRMCNT_RST (1 << 15)
++#define CSICR3_CSI_SUP (1 << 3)
++#define CSICR3_ZERO_PACK_EN (1 << 2)
++#define CSICR3_ECC_INT_EN (1 << 1)
++#define CSICR3_ECC_AUTO_EN (1 << 0)
++
++#define SHIFT_FRMCNT 16
++
++/* csi status reg */
++#define CSISR_SFF_OR_INT (1 << 25)
++#define CSISR_RFF_OR_INT (1 << 24)
++#define CSISR_STATFF_INT (1 << 21)
++#define CSISR_RXFF_INT (1 << 18)
++#define CSISR_EOF_INT (1 << 17)
++#define CSISR_SOF_INT (1 << 16)
++#define CSISR_F2_INT (1 << 15)
++#define CSISR_F1_INT (1 << 14)
++#define CSISR_COF_INT (1 << 13)
++#define CSISR_ECC_INT (1 << 1)
++#define CSISR_DRDY (1 << 0)
++
++#define CSICR1 0x00
++#define CSICR2 0x04
++#define CSISR 0x08
++#define CSISTATFIFO 0x0c
++#define CSIRFIFO 0x10
++#define CSIRXCNT 0x14
++#define CSICR3 0x1C
++
++/* EMMA PrP */
++#define PRP_CNTL 0x00
++#define PRP_INTR_CNTL 0x04
++#define PRP_INTRSTATUS 0x08
++#define PRP_SOURCE_Y_PTR 0x0c
++#define PRP_SOURCE_CB_PTR 0x10
++#define PRP_SOURCE_CR_PTR 0x14
++#define PRP_DEST_RGB1_PTR 0x18
++#define PRP_DEST_RGB2_PTR 0x1c
++#define PRP_DEST_Y_PTR 0x20
++#define PRP_DEST_CB_PTR 0x24
++#define PRP_DEST_CR_PTR 0x28
++#define PRP_SRC_FRAME_SIZE 0x2c
++#define PRP_DEST_CH1_LINE_STRIDE 0x30
++#define PRP_SRC_PIXEL_FORMAT_CNTL 0x34
++#define PRP_CH1_PIXEL_FORMAT_CNTL 0x38
++#define PRP_CH1_OUT_IMAGE_SIZE 0x3c
++#define PRP_CH2_OUT_IMAGE_SIZE 0x40
++#define PRP_SRC_LINE_STRIDE 0x44
++#define PRP_CSC_COEF_012 0x48
++#define PRP_CSC_COEF_345 0x4c
++#define PRP_CSC_COEF_678 0x50
++#define PRP_CH1_RZ_HORI_COEF1 0x54
++#define PRP_CH1_RZ_HORI_COEF2 0x58
++#define PRP_CH1_RZ_HORI_VALID 0x5c
++#define PRP_CH1_RZ_VERT_COEF1 0x60
++#define PRP_CH1_RZ_VERT_COEF2 0x64
++#define PRP_CH1_RZ_VERT_VALID 0x68
++#define PRP_CH2_RZ_HORI_COEF1 0x6c
++#define PRP_CH2_RZ_HORI_COEF2 0x70
++#define PRP_CH2_RZ_HORI_VALID 0x74
++#define PRP_CH2_RZ_VERT_COEF1 0x78
++#define PRP_CH2_RZ_VERT_COEF2 0x7c
++#define PRP_CH2_RZ_VERT_VALID 0x80
++
++#define PRP_CNTL_CH1EN (1 << 0)
++#define PRP_CNTL_CH2EN (1 << 1)
++#define PRP_CNTL_CSIEN (1 << 2)
++#define PRP_CNTL_DATA_IN_YUV420 (0 << 3)
++#define PRP_CNTL_DATA_IN_YUV422 (1 << 3)
++#define PRP_CNTL_DATA_IN_RGB16 (2 << 3)
++#define PRP_CNTL_DATA_IN_RGB32 (3 << 3)
++#define PRP_CNTL_CH1_OUT_RGB8 (0 << 5)
++#define PRP_CNTL_CH1_OUT_RGB16 (1 << 5)
++#define PRP_CNTL_CH1_OUT_RGB32 (2 << 5)
++#define PRP_CNTL_CH1_OUT_YUV422 (3 << 5)
++#define PRP_CNTL_CH2_OUT_YUV420 (0 << 7)
++#define PRP_CNTL_CH2_OUT_YUV422 (1 << 7)
++#define PRP_CNTL_CH2_OUT_YUV444 (2 << 7)
++#define PRP_CNTL_CH1_LEN (1 << 9)
++#define PRP_CNTL_CH2_LEN (1 << 10)
++#define PRP_CNTL_SKIP_FRAME (1 << 11)
++#define PRP_CNTL_SWRST (1 << 12)
++#define PRP_CNTL_CLKEN (1 << 13)
++#define PRP_CNTL_WEN (1 << 14)
++#define PRP_CNTL_CH1BYP (1 << 15)
++#define PRP_CNTL_IN_TSKIP(x) ((x) << 16)
++#define PRP_CNTL_CH1_TSKIP(x) ((x) << 19)
++#define PRP_CNTL_CH2_TSKIP(x) ((x) << 22)
++#define PRP_CNTL_INPUT_FIFO_LEVEL(x) ((x) << 25)
++#define PRP_CNTL_RZ_FIFO_LEVEL(x) ((x) << 27)
++#define PRP_CNTL_CH2B1EN (1 << 29)
++#define PRP_CNTL_CH2B2EN (1 << 30)
++#define PRP_CNTL_CH2FEN (1 << 31)
++
++/* IRQ Enable and status register */
++#define PRP_INTR_RDERR (1 << 0)
++#define PRP_INTR_CH1WERR (1 << 1)
++#define PRP_INTR_CH2WERR (1 << 2)
++#define PRP_INTR_CH1FC (1 << 3)
++#define PRP_INTR_CH2FC (1 << 5)
++#define PRP_INTR_LBOVF (1 << 7)
++#define PRP_INTR_CH2OVF (1 << 8)
++
++#define mx27_camera_emma(pcdev) (pcdev->use_emma)
++
++/* Currently we do not need irqs. All we need is DMA callback
++ * Leave it here for reference for some time.
++ */
++#undef MX27_CAMERA_USE_IRQ
++
++struct mx27_camera_dev {
++ struct device *dev;
++ struct soc_camera_device *icd;
++ struct clk *clk_csi, *clk_emma;
++
++ unsigned int irq_csi, irq_emma;
++ void __iomem *base_csi, *base_emma;
++
++ struct mx27_camera_platform_data *pdata;
++ struct resource *res_csi, *res_emma;
++ unsigned long platform_flags;
++
++ struct list_head capture;
++ struct list_head active_bufs;
++
++ spinlock_t lock;
++
++ int dma;
++ struct mx27_buffer *active;
++
++ int use_emma;
++
++ unsigned int csicr1;
++
++ void __iomem *discard_buffer;
++ dma_addr_t discard_buffer_dma;
++ size_t discard_size;
++};
++
++/* buffer for one video frame */
++struct mx27_buffer {
++ /* common v4l buffer stuff -- must be first */
++ struct videobuf_buffer vb;
++
++ const struct soc_camera_data_format *fmt;
++
++ int bufnum;
++};
++
++static DEFINE_MUTEX(camera_lock);
++
++static int mclk_get_divisor(struct mx27_camera_dev *pcdev)
++{
++ dev_info(pcdev->dev, "%s not implemented. Running at max speed\n",
++ __func__);
++
++#if 0
++ unsigned int mclk = pcdev->pdata->clk_csi;
++ unsigned int pclk = clk_get_rate(pcdev->clk_csi);
++ int i;
++
++ dev_dbg(pcdev->dev, "%s: %ld %ld\n", __func__, mclk, pclk);
++
++ for (i = 0; i < 0xf; i++)
++ if ((i + 1) * 2 * mclk <= pclk)
++ break;
++ return i;
++#endif
++ return 0;
++}
++
++static void mx27_camera_deactivate(struct mx27_camera_dev *pcdev)
++{
++ clk_disable(pcdev->clk_csi);
++ writel(0, pcdev->base_csi + CSICR1);
++ if (mx27_camera_emma(pcdev))
++ writel(0, pcdev->base_emma + PRP_CNTL);
++}
++
++/* The following two functions absolutely depend on the fact, that
++ * there can be only one camera on mx27 quick capture interface */
++static int mx27_camera_add_device(struct soc_camera_device *icd)
++{
++ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
++ struct mx27_camera_dev *pcdev = ici->priv;
++ int ret;
++ u32 csicr1;
++
++ mutex_lock(&camera_lock);
++
++ if (pcdev->icd) {
++ ret = -EBUSY;
++ goto ebusy;
++ }
++
++ dev_info(&icd->dev, "Camera driver attached to camera %d\n",
++ icd->devnum);
++
++ clk_enable(pcdev->clk_csi);
++
++ csicr1 = CSICR1_MCLKDIV(mclk_get_divisor(pcdev)) |
++ CSICR1_MCLKEN;
++ if (mx27_camera_emma(pcdev)) {
++ csicr1 |= CSICR1_PRP_IF_EN | CSICR1_FCC |
++ CSICR1_RXFF_LEVEL(0);
++ } else
++ csicr1 |= CSICR1_SOF_INTEN | CSICR1_RXFF_LEVEL(2);
++
++ pcdev->csicr1 = csicr1;
++ writel(pcdev->csicr1, pcdev->base_csi + CSICR1);
++
++ ret = icd->ops->init(icd);
++
++ if (!ret)
++ pcdev->icd = icd;
++
++ebusy:
++ mutex_unlock(&camera_lock);
++
++ return ret;
++}
++
++static void mx27_camera_remove_device(struct soc_camera_device *icd)
++{
++ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
++ struct mx27_camera_dev *pcdev = ici->priv;
++
++ BUG_ON(icd != pcdev->icd);
++
++ dev_info(&icd->dev, "Camera driver detached from camera %d\n",
++ icd->devnum);
++
++ icd->ops->release(icd);
++
++ mx27_camera_deactivate(pcdev);
++
++ if (pcdev->discard_buffer) {
++ dma_free_coherent(NULL, pcdev->discard_size,
++ pcdev->discard_buffer,
++ pcdev->discard_buffer_dma);
++ }
++ pcdev->discard_buffer = 0;
++
++ pcdev->icd = NULL;
++}
++
++static void mx27_camera_dma_enable(struct mx27_camera_dev *pcdev)
++{
++ u32 tmp;
++
++ imx_dma_enable(pcdev->dma);
++
++ tmp = readl(pcdev->base_csi + CSICR1);
++ tmp |= CSICR1_RF_OR_INTEN;
++ writel(tmp, pcdev->base_csi + CSICR1);
++}
++
++static irqreturn_t mx27_camera_irq(int irq_csi, void *data)
++{
++ struct mx27_camera_dev *pcdev = data;
++ u32 status = readl(pcdev->base_csi + CSISR);
++
++ if (status & CSISR_SOF_INT && pcdev->active) {
++ u32 tmp;
++
++ tmp = readl(pcdev->base_csi + CSICR1);
++ tmp |= CSICR1_CLR_RXFIFO;
++ writel(tmp, pcdev->base_csi + CSICR1);
++ mx27_camera_dma_enable(pcdev);
++ writel(CSISR_SOF_INT | CSISR_RFF_OR_INT,
++ pcdev->base_csi + CSISR);
++ status &= ~CSISR_RFF_OR_INT;
++ }
++
++ writel(CSISR_SOF_INT | CSISR_RFF_OR_INT, pcdev->base_csi + CSISR);
++
++ return IRQ_HANDLED;
++}
++
++static unsigned int vid_limit = 16; /* Video memory limit, in Mb */
++
++/*
++ * Videobuf operations
++ */
++static int mx27_videobuf_setup(struct videobuf_queue *vq, unsigned int *count,
++ unsigned int *size)
++{
++ struct soc_camera_device *icd = vq->priv_data;
++
++ dev_dbg(&icd->dev, "count=%d, size=%d\n", *count, *size);
++
++ *size = icd->width * icd->height *
++ ((icd->current_fmt->depth + 7) >> 3);
++
++ if (0 == *count)
++ *count = 32;
++ while (*size * *count > vid_limit * 1024 * 1024)
++ (*count)--;
++
++ return 0;
++}
++
++static void free_buffer(struct videobuf_queue *vq, struct mx27_buffer *buf)
++{
++ struct soc_camera_device *icd = vq->priv_data;
++
++ BUG_ON(in_interrupt());
++
++ dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
++ &buf->vb, buf->vb.baddr, buf->vb.bsize);
++
++ /* This waits until this buffer is out of danger, i.e., until it is no
++ * longer in STATE_QUEUED or STATE_ACTIVE */
++ videobuf_waiton(&buf->vb, 0, 0);
++
++ videobuf_dma_contig_free(vq, &buf->vb);
++ dev_dbg(&icd->dev, "%s freed\n", __func__);
++
++ buf->vb.state = VIDEOBUF_NEEDS_INIT;
++}
++
++static int mx27_videobuf_prepare(struct videobuf_queue *vq,
++ struct videobuf_buffer *vb, enum v4l2_field field)
++{
++ struct soc_camera_device *icd = vq->priv_data;
++ struct mx27_buffer *buf = container_of(vb, struct mx27_buffer, vb);
++ int ret = 0;
++
++#ifdef DEBUG
++ /* This can be useful if you want to see if we actually fill
++ * the buffer with something */
++ memset((void *)vb->baddr, 0xaa, vb->bsize);
++#endif
++
++ dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
++ vb, vb->baddr, vb->bsize);
++
++ if (buf->fmt != icd->current_fmt ||
++ vb->width != icd->width ||
++ vb->height != icd->height ||
++ vb->field != field) {
++ buf->fmt = icd->current_fmt;
++ vb->width = icd->width;
++ vb->height = icd->height;
++ vb->field = field;
++ vb->state = VIDEOBUF_NEEDS_INIT;
++ }
++
++ vb->size = vb->width * vb->height * ((buf->fmt->depth + 7) >> 3);
++ if (vb->baddr && vb->bsize < vb->size) {
++ ret = -EINVAL;
++ goto out;
++ }
++
++ if (vb->state == VIDEOBUF_NEEDS_INIT) {
++ ret = videobuf_iolock(vq, vb, NULL);
++ if (ret)
++ goto fail;
++
++ vb->state = VIDEOBUF_PREPARED;
++ }
++
++ return 0;
++
++fail:
++ free_buffer(vq, buf);
++out:
++ return ret;
++}
++
++static void mx27_videobuf_queue(struct videobuf_queue *vq,
++ struct videobuf_buffer *vb)
++{
++ struct soc_camera_device *icd = vq->priv_data;
++ struct soc_camera_host *ici =
++ to_soc_camera_host(icd->dev.parent);
++ struct mx27_camera_dev *pcdev = ici->priv;
++ struct mx27_buffer *buf = container_of(vb, struct mx27_buffer, vb);
++ unsigned long flags;
++ int ret;
++
++ dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
++ vb, vb->baddr, vb->bsize);
++
++ spin_lock_irqsave(&pcdev->lock, flags);
++
++ if (mx27_camera_emma(pcdev)) {
++ list_add_tail(&vb->queue, &pcdev->capture);
++ vb->state = VIDEOBUF_QUEUED;
++ } else {
++ list_add_tail(&vb->queue, &pcdev->capture);
++ vb->state = VIDEOBUF_ACTIVE;
++
++ if (!pcdev->active) {
++ ret = imx_dma_setup_single(pcdev->dma,
++ videobuf_to_dma_contig(vb), vb->size,
++ CSI_BASE_ADDR + 0x10, DMA_MODE_READ);
++ if (ret) {
++ vb->state = VIDEOBUF_ERROR;
++ wake_up(&vb->done);
++ goto out;
++ }
++
++ pcdev->active = buf;
++ }
++ }
++
++out:
++ spin_unlock_irqrestore(&pcdev->lock, flags);
++}
++
++static void mx27_videobuf_release(struct videobuf_queue *vq,
++ struct videobuf_buffer *vb)
++{
++ struct mx27_buffer *buf = container_of(vb, struct mx27_buffer, vb);
++
++#ifdef DEBUG
++ struct soc_camera_device *icd = vq->priv_data;
++
++ dev_dbg(&icd->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
++ vb, vb->baddr, vb->bsize);
++
++ switch (vb->state) {
++ case VIDEOBUF_ACTIVE:
++ dev_info(&icd->dev, "%s (active)\n", __func__);
++ break;
++ case VIDEOBUF_QUEUED:
++ dev_info(&icd->dev, "%s (queued)\n", __func__);
++ break;
++ case VIDEOBUF_PREPARED:
++ dev_info(&icd->dev, "%s (prepared)\n", __func__);
++ break;
++ default:
++ dev_info(&icd->dev, "%s (unknown) %d\n", __func__,
++ vb->state);
++ break;
++ }
++#endif
++
++ free_buffer(vq, buf);
++}
++
++static struct videobuf_queue_ops mx27_videobuf_ops = {
++ .buf_setup = mx27_videobuf_setup,
++ .buf_prepare = mx27_videobuf_prepare,
++ .buf_queue = mx27_videobuf_queue,
++ .buf_release = mx27_videobuf_release,
++};
++
++static void mx27_camera_init_videobuf(struct videobuf_queue *q,
++ struct soc_camera_device *icd)
++{
++ struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
++ struct mx27_camera_dev *pcdev = ici->priv;
++
++ /* We must pass NULL as dev pointer, then all pci_* dma operations
++ * transform to normal dma_* ones. */
++ videobuf_queue_dma_contig_init(q, &mx27_videobuf_ops, NULL,
++ &pcdev->lock, V4L2_BUF_TYPE_VIDEO_CAPTURE,
++ V4L2_FIELD_NONE, sizeof(struct mx27_buffer), icd);
++}
++
++#define MX27_BUS_FLAGS (SOCAM_DATAWIDTH_8 | \
++ SOCAM_MASTER | \
++ SOCAM_VSYNC_ACTIVE_HIGH | \
++ SOCAM_HSYNC_ACTIVE_HIGH | \
++ SOCAM_HSYNC_ACTIVE_LOW | \
++ SOCAM_PCLK_SAMPLE_RISING | \
++ SOCAM_PCLK_SAMPLE_FALLING)
++
++static int mx27_camera_emma_prp_reset(struct mx27_camera_dev *pcdev)
++{
++ unsigned int cntl;
++
++ cntl = readl(pcdev->base_emma + PRP_CNTL);
++ writel(PRP_CNTL_SWRST, pcdev->base_emma + PRP_CNTL);
++ while (readl(pcdev->base_emma + PRP_CNTL) & PRP_CNTL_SWRST)
++ barrier();
++
++ return 0;
++}
++
++static int mx27_camera_set_bus_param(struct soc_camera_device *icd,
++ __u32 pixfmt)
++{
++ struct soc_camera_host *ici =
++ to_soc_camera_host(icd->dev.parent);
++ struct mx27_camera_dev *pcdev = ici->priv;
++ unsigned long camera_flags, common_flags;
++ int ret = 0;
++ u32 csicr1 = pcdev->csicr1;
++
++ camera_flags = icd->ops->query_bus_param(icd);
++
++ common_flags = soc_camera_bus_param_compatible(camera_flags,
++ MX27_BUS_FLAGS);
++ if (!common_flags)
++ return -EINVAL;
++
++ if ((common_flags & SOCAM_HSYNC_ACTIVE_HIGH) &&
++ (common_flags & SOCAM_HSYNC_ACTIVE_LOW)) {
++ if (pcdev->platform_flags & MX27_CAMERA_HSYNC_HIGH)
++ common_flags &= ~SOCAM_HSYNC_ACTIVE_LOW;
++ else
++ common_flags &= ~SOCAM_HSYNC_ACTIVE_HIGH;
++ }
++
++ if ((common_flags & SOCAM_PCLK_SAMPLE_RISING) &&
++ (common_flags & SOCAM_PCLK_SAMPLE_FALLING)) {
++ if (pcdev->platform_flags & MX27_CAMERA_PCLK_SAMPLE_RISING)
++ common_flags &= ~SOCAM_PCLK_SAMPLE_FALLING;
++ else
++ common_flags &= ~SOCAM_PCLK_SAMPLE_RISING;
++ }
++
++ ret = icd->ops->set_bus_param(icd, common_flags);
++ if (ret < 0)
++ return ret;
++
++ if (common_flags & SOCAM_PCLK_SAMPLE_FALLING)
++ csicr1 |= CSICR1_INV_PCLK;
++ if (common_flags & SOCAM_HSYNC_ACTIVE_HIGH)
++ csicr1 |= CSICR1_HSYNC_POL;
++ if (pcdev->platform_flags & MX27_CAMERA_SWAP16)
++ csicr1 |= CSICR1_SWAP16_EN;
++ if (pcdev->platform_flags & MX27_CAMERA_EXT_VSYNC)
++ csicr1 |= CSICR1_EXT_VSYNC;
++ if (pcdev->platform_flags & MX27_CAMERA_CCIR)
++ csicr1 |= CSICR1_CCIR_EN;
++ if (pcdev->platform_flags & MX27_CAMERA_CCIR_INTERLACE)
++ csicr1 |= CSICR1_CCIR_MODE;
++ if (pcdev->platform_flags & MX27_CAMERA_GATED_CLOCK)
++ csicr1 |= CSICR1_GCLK_MODE;
++ if (pcdev->platform_flags & MX27_CAMERA_INV_DATA)
++ csicr1 |= CSICR1_INV_DATA;
++ if (pcdev->platform_flags & MX27_CAMERA_PACK_DIR_MSB)
++ csicr1 |= CSICR1_PACK_DIR;
++
++ if (mx27_camera_emma(pcdev)) {
++ int bytesperline = (icd->width * icd->current_fmt->depth) >> 3;
++
++ if (mx27_camera_emma_prp_reset(pcdev))
++ return -ENODEV;
++
++ if (pcdev->discard_buffer)
++ dma_free_coherent(NULL, pcdev->discard_size,
++ pcdev->discard_buffer,
++ pcdev->discard_buffer_dma);
++
++ /* I didn't manage to properly enable/disable the prp
++ * on a per frame basis during running transfers,
++ * thus we allocate a buffer here and use it to
++ * discard frames when no buffer is available.
++ * Feel free to work on this ;)
++ */
++ pcdev->discard_size = icd->height * bytesperline;
++ pcdev->discard_buffer = dma_alloc_coherent(NULL,
++ pcdev->discard_size, &pcdev->discard_buffer_dma,
++ GFP_KERNEL);
++ if (!pcdev->discard_buffer)
++ return -ENOMEM;
++
++ writel(pcdev->discard_buffer_dma,
++ pcdev->base_emma + PRP_DEST_RGB1_PTR);
++ writel(pcdev->discard_buffer_dma,
++ pcdev->base_emma + PRP_DEST_RGB2_PTR);
++
++ /* We only use the EMMA engine to get rid of the f**king
++ * DMA Engine. No color space consversion at the moment.
++ * We adjust incoming and outgoing pixelformat to rgb16
++ * and adjust the bytesperline accordingly.
++ */
++ writel(PRP_CNTL_CH1EN |
++ PRP_CNTL_CSIEN |
++ PRP_CNTL_DATA_IN_RGB16 |
++ PRP_CNTL_CH1_OUT_RGB16 |
++ PRP_CNTL_CH1_LEN |
++ PRP_CNTL_CH1BYP |
++ PRP_CNTL_CH1_TSKIP(0) |
++ PRP_CNTL_IN_TSKIP(0),
++ pcdev->base_emma + PRP_CNTL);
++
++ writel(((bytesperline >> 1) << 16) | icd->height,
++ pcdev->base_emma + PRP_SRC_FRAME_SIZE);
++ writel(((bytesperline >> 1) << 16) | icd->height,
++ pcdev->base_emma + PRP_CH1_OUT_IMAGE_SIZE);
++ writel(bytesperline,
++ pcdev->base_emma + PRP_DEST_CH1_LINE_STRIDE);
++ writel(0x2ca00565,
++ pcdev->base_emma + PRP_SRC_PIXEL_FORMAT_CNTL);
++ writel(0x2ca00565,
++ pcdev->base_emma + PRP_CH1_PIXEL_FORMAT_CNTL);
++
++ /* Enable interrupts */
++ writel(PRP_INTR_RDERR |
++ PRP_INTR_CH1WERR |
++ PRP_INTR_CH2WERR |
++ PRP_INTR_CH1FC |
++ PRP_INTR_CH2FC |
++ PRP_INTR_LBOVF |
++ PRP_INTR_CH2OVF
++ , pcdev->base_emma + PRP_INTR_CNTL);
++ }
++
++ pcdev->csicr1 = csicr1;
++
++ writel(csicr1, pcdev->base_csi + CSICR1);
++
++ return 0;
++}
++
++static int mx27_camera_try_bus_param(struct soc_camera_device *icd,
++ __u32 pixfmt)
++{
++ unsigned long bus_flags, camera_flags;
++
++ bus_flags = MX27_BUS_FLAGS;
++
++ camera_flags = icd->ops->query_bus_param(icd);
++
++ return soc_camera_bus_param_compatible(camera_flags, bus_flags) ?
++ 0 : -EINVAL;
++}
++
++static int mx27_camera_set_fmt_cap(struct soc_camera_device *icd,
++ __u32 pixfmt, struct v4l2_rect *rect)
++{
++ return icd->ops->set_fmt_cap(icd, pixfmt, rect);
++}
++
++static int mx27_camera_try_fmt_cap(struct soc_camera_device *icd,
++ struct v4l2_format *f)
++{
++ return 0;
++}
++
++static int mx27_camera_querycap(struct soc_camera_host *ici,
++ struct v4l2_capability *cap)
++{
++ /* cap->name is set by the friendly caller:-> */
++ strlcpy(cap->card, mx27_cam_driver_description, sizeof(cap->card));
++ cap->version = MX27_CAM_VERSION_CODE;
++ cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
++
++ return 0;
++}
++
++static int mx27_camera_reqbufs(struct soc_camera_file *icf,
++ struct v4l2_requestbuffers *p)
++{
++ int i;
++
++ for (i = 0; i < p->count; i++) {
++ struct mx27_buffer *buf = container_of(icf->vb_vidq.bufs[i],
++ struct mx27_buffer, vb);
++ INIT_LIST_HEAD(&buf->vb.queue);
++ }
++
++ return 0;
++}
++
++static void mx27_camera_frame_done(struct mx27_camera_dev *pcdev, int state)
++{
++ struct videobuf_buffer *vb;
++ struct mx27_buffer *buf;
++ int ret;
++
++ if (!pcdev->active) {
++ dev_err(pcdev->dev, "%s called with no active buffer!\n",
++ __func__);
++ return;
++ }
++
++ vb = &pcdev->active->vb;
++ buf = container_of(vb, struct mx27_buffer, vb);
++ WARN_ON(list_empty(&vb->queue));
++ dev_dbg(pcdev->dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
++ vb, vb->baddr, vb->bsize);
++
++ /* _init is used to debug races, see comment in pxa_camera_reqbufs() */
++ list_del_init(&vb->queue);
++ vb->state = state;
++ do_gettimeofday(&vb->ts);
++ vb->field_count++;
++
++ wake_up(&vb->done);
++
++ if (list_empty(&pcdev->capture)) {
++ pcdev->active = NULL;
++ return;
++ }
++
++ pcdev->active = list_entry(pcdev->capture.next,
++ struct mx27_buffer, vb.queue);
++
++ vb = &pcdev->active->vb;
++ vb->state = VIDEOBUF_ACTIVE;
++
++ ret = imx_dma_setup_single(pcdev->dma, videobuf_to_dma_contig(vb),
++ vb->size, CSI_BASE_ADDR + 0x10, DMA_MODE_READ);
++ if (ret) {
++ vb->state = VIDEOBUF_ERROR;
++ wake_up(&vb->done);
++ return;
++ }
++}
++
++static void mx27_camera_dma_err_callback(int channel, void *data, int err)
++{
++ struct mx27_camera_dev *pcdev = data;
++ unsigned long flags;
++
++ spin_lock_irqsave(&pcdev->lock, flags);
++
++ mx27_camera_frame_done(pcdev, VIDEOBUF_ERROR);
++
++ spin_unlock_irqrestore(&pcdev->lock, flags);
++}
++
++static void mx27_camera_dma_callback(int channel, void *data)
++{
++ struct mx27_camera_dev *pcdev = data;
++ unsigned long flags;
++
++ spin_lock_irqsave(&pcdev->lock, flags);
++
++ mx27_camera_frame_done(pcdev, VIDEOBUF_DONE);
++
++ spin_unlock_irqrestore(&pcdev->lock, flags);
++}
++
++static unsigned int mx27_camera_poll(struct file *file, poll_table *pt)
++{
++ struct soc_camera_file *icf = file->private_data;
++ struct mx27_buffer *buf;
++
++ buf = list_entry(icf->vb_vidq.stream.next, struct mx27_buffer,
++ vb.stream);
++
++ poll_wait(file, &buf->vb.done, pt);
++
++ if (buf->vb.state == VIDEOBUF_DONE ||
++ buf->vb.state == VIDEOBUF_ERROR)
++ return POLLIN | POLLRDNORM;
++
++ return 0;
++}
++
++/* Should beallocated dynamically too, but we have only one. */
++static struct soc_camera_host_ops mx27_soc_camera_host_ops = {
++ .owner = THIS_MODULE,
++ .add = mx27_camera_add_device,
++ .remove = mx27_camera_remove_device,
++ .set_fmt_cap = mx27_camera_set_fmt_cap,
++ .try_fmt_cap = mx27_camera_try_fmt_cap,
++ .init_videobuf = mx27_camera_init_videobuf,
++ .reqbufs = mx27_camera_reqbufs,
++ .poll = mx27_camera_poll,
++ .querycap = mx27_camera_querycap,
++ .try_bus_param = mx27_camera_try_bus_param,
++ .set_bus_param = mx27_camera_set_bus_param,
++};
++
++static void mx27_camera_frame_done_emma(struct mx27_camera_dev *pcdev,
++ int bufnum, int state)
++{
++ struct mx27_buffer *buf;
++ struct videobuf_buffer *vb;
++ unsigned long phys;
++
++ if (!list_empty(&pcdev->active_bufs)) {
++ buf = list_entry(pcdev->active_bufs.next,
++ struct mx27_buffer, vb.queue);
++
++ if (buf->bufnum == bufnum) {
++ vb = &buf->vb;
++#ifdef DEBUG
++ phys = videobuf_to_dma_contig(vb);
++ if (readl(pcdev->base_emma + PRP_DEST_RGB1_PTR +
++ 4 * bufnum) != phys) {
++ dev_err(pcdev->dev, "%p != %p\n", phys,
++ readl(pcdev->base_emma +
++ PRP_DEST_RGB1_PTR +
++ 4 * bufnum));
++ }
++#endif
++ dev_dbg(pcdev->dev, "%s (vb=0x%p) 0x%08lx %d\n",
++ __func__, vb, vb->baddr, vb->bsize);
++
++ list_del(&vb->queue);
++ vb->state = state;
++ do_gettimeofday(&vb->ts);
++ vb->field_count++;
++
++ wake_up(&vb->done);
++ }
++ }
++
++ if (list_empty(&pcdev->capture)) {
++ writel(pcdev->discard_buffer_dma, pcdev->base_emma +
++ PRP_DEST_RGB1_PTR + 4 * bufnum);
++ return;
++ }
++
++ buf = list_entry(pcdev->capture.next,
++ struct mx27_buffer, vb.queue);
++
++ buf->bufnum = bufnum;
++
++ list_move_tail(pcdev->capture.next, &pcdev->active_bufs);
++
++ vb = &buf->vb;
++ vb->state = VIDEOBUF_ACTIVE;
++
++ phys = videobuf_to_dma_contig(vb);
++ writel(phys, pcdev->base_emma + PRP_DEST_RGB1_PTR + 4 * bufnum);
++}
++
++static irqreturn_t mx27_camera_emma_irq(int irq_emma, void *data)
++{
++ struct mx27_camera_dev *pcdev = data;
++ unsigned int status = readl(pcdev->base_emma + PRP_INTRSTATUS);
++
++ if (status & (1 << 6))
++ mx27_camera_frame_done_emma(pcdev, 0, VIDEOBUF_DONE);
++ if (status & (1 << 5))
++ mx27_camera_frame_done_emma(pcdev, 1, VIDEOBUF_DONE);
++ if (status & (1 << 7)) {
++ uint32_t cntl;
++ cntl = readl(pcdev->base_emma + PRP_CNTL);
++ writel(cntl & ~PRP_CNTL_CH1EN, pcdev->base_emma + PRP_CNTL);
++ writel(cntl, pcdev->base_emma + PRP_CNTL);
++ }
++
++ writel(status, pcdev->base_emma + PRP_INTRSTATUS);
++
++ return IRQ_HANDLED;
++}
++
++/* Should be allocated dynamically too, but we have only one. */
++static struct soc_camera_host mx27_soc_camera_host = {
++ .drv_name = MX27_CAM_DRV_NAME,
++ .ops = &mx27_soc_camera_host_ops,
++};
++
++int mx27_camera_emma_init(struct mx27_camera_dev *pcdev)
++{
++ struct resource *res_emma = pcdev->res_emma;
++ int err = 0;
++
++ if (!request_mem_region(res_emma->start, resource_size(res_emma),
++ MX27_CAM_DRV_NAME)) {
++ err = -EBUSY;
++ goto out;
++ }
++
++ pcdev->base_emma = ioremap(res_emma->start, resource_size(res_emma));
++ if (!pcdev->base_emma) {
++ err = -ENOMEM;
++ goto exit_release;
++ }
++
++ err = request_irq(pcdev->irq_emma, mx27_camera_emma_irq, 0,
++ MX27_CAM_DRV_NAME, pcdev);
++ if (err) {
++ dev_err(pcdev->dev, "Camera EMMA interrupt register failed \n");
++ goto exit_iounmap;
++ }
++
++ pcdev->clk_emma = clk_get(pcdev->dev, "emma_clk");
++ if (IS_ERR(pcdev->clk_emma)) {
++ err = PTR_ERR(pcdev->clk_emma);
++ goto exit_free_irq;
++ }
++
++ clk_enable(pcdev->clk_emma);
++
++ err = mx27_camera_emma_prp_reset(pcdev);
++ if (err)
++ goto exit_clk_emma_put;
++
++ return err;
++
++exit_clk_emma_put:
++ clk_disable(pcdev->clk_emma);
++ clk_put(pcdev->clk_emma);
++exit_free_irq:
++ free_irq(pcdev->irq_emma, pcdev);
++exit_iounmap:
++ iounmap(pcdev->base_emma);
++exit_release:
++ release_mem_region(res_emma->start, resource_size(res_emma));
++out:
++ return err;
++}
++
++static int mx27_camera_probe(struct platform_device *pdev)
++{
++ struct mx27_camera_dev *pcdev;
++ struct resource *res_csi, *res_emma;
++ void __iomem *base_csi;
++ unsigned int irq_csi, irq_emma;
++ int err = 0;
++
++ dev_info(&pdev->dev, "initialising\n");
++
++ res_csi = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ irq_csi = platform_get_irq(pdev, 0);
++ if (!res_csi || !irq_csi) {
++ dev_err(&pdev->dev, "No platform irq\n");
++ err = -ENODEV;
++ goto exit;
++ }
++
++ pcdev = kzalloc(sizeof(*pcdev), GFP_KERNEL);
++ if (!pcdev) {
++ dev_err(&pdev->dev, "Could not allocate pcdev\n");
++ err = -ENOMEM;
++ goto exit;
++ }
++
++ pcdev->clk_csi = clk_get(&pdev->dev, "csi_perclk");
++ if (IS_ERR(pcdev->clk_csi)) {
++ err = PTR_ERR(pcdev->clk_csi);
++ goto exit_kfree;
++ }
++
++ dev_info(&pdev->dev, "Camera clock frequency: %ld\n",
++ clk_get_rate(pcdev->clk_csi));
++
++ /* Initialize DMA */
++ pcdev->dma = imx_dma_request_by_prio("CSI RX DMA", DMA_PRIO_HIGH);
++ if (pcdev->dma < 0) {
++ dev_err(&pdev->dev,
++ "mxc_v4l_read failed to request DMA channel\n");
++ err = -EIO;
++ goto exit_clk_put;
++ }
++
++ err = imx_dma_setup_handlers(pcdev->dma, mx27_camera_dma_callback,
++ mx27_camera_dma_err_callback, pcdev);
++ if (err != 0) {
++ dev_err(&pdev->dev,
++ "mxc_v4l_read failed to set DMA callback\n");
++ err = -EIO;
++ goto exit_dma_free;
++ }
++
++ imx_dma_config_channel(pcdev->dma,
++ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_FIFO,
++ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR,
++ DMA_REQ_CSI_RX, 1);
++
++ imx_dma_config_burstlen(pcdev->dma, 64);
++
++ dev_set_drvdata(&pdev->dev, pcdev);
++ pcdev->res_csi = res_csi;
++
++ pcdev->pdata = pdev->dev.platform_data;
++ pcdev->platform_flags = pcdev->pdata->flags;
++
++ clk_set_rate(pcdev->clk_csi, pcdev->pdata->clk * 2);
++
++ INIT_LIST_HEAD(&pcdev->capture);
++ INIT_LIST_HEAD(&pcdev->active_bufs);
++ spin_lock_init(&pcdev->lock);
++
++ /*
++ * Request the regions.
++ */
++ if (!request_mem_region(res_csi->start, resource_size(res_csi),
++ MX27_CAM_DRV_NAME)) {
++ err = -EBUSY;
++ goto exit_dma_free;
++ }
++
++ base_csi = ioremap(res_csi->start, resource_size(res_csi));
++ if (!base_csi) {
++ err = -ENOMEM;
++ goto exit_release;
++ }
++ pcdev->irq_csi = irq_csi;
++ pcdev->base_csi = base_csi;
++ pcdev->dev = &pdev->dev;
++
++ pcdev->pdata->init(pdev);
++
++ err = request_irq(pcdev->irq_csi, mx27_camera_irq, 0, MX27_CAM_DRV_NAME,
++ pcdev);
++ if (err) {
++ dev_err(pcdev->dev, "Camera interrupt register failed \n");
++ goto exit_iounmap;
++ }
++
++ mx27_soc_camera_host.priv = pcdev;
++ mx27_soc_camera_host.dev.parent = &pdev->dev;
++ mx27_soc_camera_host.nr = pdev->id;
++
++ /* EMMA support */
++ res_emma = platform_get_resource(pdev, IORESOURCE_MEM, 1);
++ irq_emma = platform_get_irq(pdev, 1);
++
++ if (res_emma && irq_emma) {
++ dev_info(&pdev->dev, "Using EMMA\n");
++ pcdev->use_emma = 1;
++ pcdev->res_emma = res_emma;
++ pcdev->irq_emma = irq_emma;
++ if (mx27_camera_emma_init(pcdev))
++ goto exit_free_irq;
++ }
++
++ err = soc_camera_host_register(&mx27_soc_camera_host);
++ if (err)
++ goto exit_free_emma;
++
++ return 0;
++
++exit_free_emma:
++ free_irq(pcdev->irq_emma, pcdev);
++ clk_disable(pcdev->clk_emma);
++ clk_put(pcdev->clk_emma);
++ iounmap(pcdev->base_emma);
++ release_mem_region(res_emma->start, resource_size(res_emma));
++exit_free_irq:
++ free_irq(pcdev->irq_csi, pcdev);
++exit_iounmap:
++ iounmap(base_csi);
++exit_release:
++ release_mem_region(res_csi->start, resource_size(res_csi));
++exit_dma_free:
++ imx_dma_free(pcdev->dma);
++exit_clk_put:
++ clk_put(pcdev->clk_csi);
++exit_kfree:
++ kfree(pcdev);
++exit:
++ return err;
++}
++
++static int __devexit mx27_camera_remove(struct platform_device *pdev)
++{
++ struct mx27_camera_dev *pcdev = platform_get_drvdata(pdev);
++ struct resource *res;
++
++ clk_put(pcdev->clk_csi);
++ imx_dma_free(pcdev->dma);
++ free_irq(pcdev->irq_csi, pcdev);
++ if (mx27_camera_emma(pcdev))
++ free_irq(pcdev->irq_emma, pcdev);
++
++ soc_camera_host_unregister(&mx27_soc_camera_host);
++
++ iounmap(pcdev->base_csi);
++
++ if (mx27_camera_emma(pcdev)) {
++ clk_disable(pcdev->clk_emma);
++ clk_put(pcdev->clk_emma);
++ iounmap(pcdev->base_emma);
++ res = pcdev->res_emma;
++ release_mem_region(res->start, resource_size(res));
++ }
++
++ pcdev->pdata->exit(pdev);
++
++ res = pcdev->res_csi;
++ release_mem_region(res->start, resource_size(res));
++
++ kfree(pcdev);
++
++ dev_info(&pdev->dev, "MX27 Camera driver unloaded\n");
++
++ return 0;
++}
++
++static struct platform_driver mx27_camera_driver = {
++ .driver = {
++ .name = MX27_CAM_DRV_NAME,
++ },
++ .probe = mx27_camera_probe,
++ .remove = __exit_p(mx27_camera_remove),
++};
++
++
++static int __devinit mx27_camera_init(void)
++{
++ return platform_driver_register(&mx27_camera_driver);
++}
++
++static void __exit mx27_camera_exit(void)
++{
++ return platform_driver_unregister(&mx27_camera_driver);
++}
++
++module_init(mx27_camera_init);
++module_exit(mx27_camera_exit);
++
++MODULE_DESCRIPTION("i.MX27 SoC Camera Host driver");
++MODULE_AUTHOR("Sascha Hauer <sha@pengutronix.de>");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/Kconfig linux-2.6.28-karo/drivers/media/video/mxc/capture/Kconfig
+--- linux-2.6.28/drivers/media/video/mxc/capture/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,80 @@
++if VIDEO_MXC_CAMERA
++
++menu "MXC Camera/V4L2 PRP Features support"
++config VIDEO_MXC_IPU_CAMERA
++ bool
++ depends on VIDEO_MXC_CAMERA && MXC_IPU
++ default y
++
++config VIDEO_MXC_EMMA_CAMERA
++ bool "MX27 eMMA support"
++ depends on VIDEO_MXC_CAMERA && MXC_EMMA && FB_MXC_SYNC_PANEL && (MXC_CAMERA_MICRON111 || MXC_CAMERA_MC521DA || MXC_CAMERA_OV2640)
++ select VIDEO_MXC_OPL
++ default y
++
++config VIDEO_MXC_CSI_DMA
++ bool "CSI-DMA Still Image Capture support"
++ depends on VIDEO_MXC_EMMA_CAMERA
++ default n
++ ---help---
++ Use CSI-DMA method instead of CSI-PrP link to capture still image. This allows
++ to use less physical contiguous memory to capture big resolution still image. But
++ with this method the CSC (Color Space Conversion) and resize are not supported.
++ If unsure, say N.
++
++choice
++ prompt "Select Camera"
++ default MXC_CAMERA_MICRON111
++ depends on (VIDEO_MXC_CAMERA && I2C_MXC)
++
++config MXC_CAMERA_MICRON111
++ tristate "Micron mt9v111 camera support"
++ ---help---
++ If you plan to use the mt9v111 Camera with your MXC system, say Y here.
++
++config MXC_CAMERA_MC521DA
++ tristate "Magnachip mc521da camera support"
++ ---help---
++ If you plan to use the mc521da Camera with your MXC system, say Y here.
++
++config MXC_CAMERA_OV2640
++ tristate "OmniVision ov2640 camera support"
++ ---help---
++ If you plan to use the ov2640 Camera with your MXC system, say Y here.
++endchoice
++
++config MXC_IPU_PRP_VF_SDC
++ tristate "Pre-Processor VF SDC library"
++ depends on (VIDEO_MXC_IPU_CAMERA && FB_MXC_SYNC_PANEL && (MXC_CAMERA_MICRON111 || MXC_CAMERA_MC521DA || MXC_CAMERA_OV2640))
++ default y
++ ---help---
++ Use case PRP_VF_SDC:
++ Preprocessing image from smart sensor for viewfinder and
++ displaying it on synchronous display with SDC use case.
++ If SDC BG is selected, Rotation will not be supported.
++ CSI -> IC (PRP VF) -> MEM
++ MEM -> IC (ROT) -> MEM
++ MEM -> SDC (FG/BG)
++
++config MXC_IPU_PRP_VF_ADC
++ tristate "Pre-Processor VF ADC library"
++ depends on (VIDEO_MXC_IPU_CAMERA && FB_MXC_ASYNC_PANEL && (MXC_CAMERA_MICRON111 || MXC_CAMERA_MC521DA || MXC_CAMERA_OV2640))
++ default y
++ ---help---
++ Use case PRP_VF_ADC:
++ Preprocessing image from smart sensor for viewfinder and
++ displaying it on asynchronous display.
++ CSI -> IC (PRP VF) -> ADC2
++
++config MXC_IPU_PRP_ENC
++ tristate "Pre-processor Encoder library"
++ depends on (VIDEO_MXC_IPU_CAMERA && (MXC_CAMERA_MICRON111 || MXC_CAMERA_MC521DA || MXC_CAMERA_OV2640))
++ default y
++ ---help---
++ Use case PRP_ENC:
++ Preprocessing image from smart sensor for encoder.
++ CSI -> IC (PRP ENC) -> MEM
++
++endmenu
++
++endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/Makefile linux-2.6.28-karo/drivers/media/video/mxc/capture/Makefile
+--- linux-2.6.28/drivers/media/video/mxc/capture/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,18 @@
++ifeq ($(CONFIG_VIDEO_MXC_IPU_CAMERA),y)
++ obj-$(CONFIG_VIDEO_MXC_CAMERA) += mxc_v4l2_capture.o
++ obj-$(CONFIG_MXC_IPU_PRP_VF_ADC) += ipu_prp_vf_adc.o
++ obj-$(CONFIG_MXC_IPU_PRP_VF_SDC) += ipu_prp_vf_sdc.o ipu_prp_vf_sdc_bg.o
++ obj-$(CONFIG_MXC_IPU_PRP_ENC) += ipu_prp_enc.o ipu_still.o
++endif
++
++mx27_capture-objs := mx27_prphw.o mx27_prpsw.o mx27_v4l2_capture.o
++obj-$(CONFIG_VIDEO_MXC_EMMA_CAMERA) += mx27_csi.o mx27_capture.o
++
++mc521da_camera-objs := mc521da.o sensor_clock.o
++obj-$(CONFIG_MXC_CAMERA_MC521DA) += mc521da_camera.o
++
++mt9v111_camera-objs := mt9v111.o sensor_clock.o
++obj-$(CONFIG_MXC_CAMERA_MICRON111) += mt9v111_camera.o
++
++ov2640_camera-objs := ov2640.o sensor_clock.o
++obj-$(CONFIG_MXC_CAMERA_OV2640) += ov2640_camera.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mc521da.c linux-2.6.28-karo/drivers/media/video/mxc/capture/mc521da.c
+--- linux-2.6.28/drivers/media/video/mxc/capture/mc521da.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mc521da.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,702 @@
++/*
++ * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mc521da.c
++ *
++ * @brief MC521DA camera driver functions
++ *
++ * @ingroup Camera
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/slab.h>
++#include <linux/ctype.h>
++#include <linux/types.h>
++#include <linux/delay.h>
++#include <linux/device.h>
++#include <linux/i2c.h>
++#include <linux/clk.h>
++#include <asm/arch/mxc_i2c.h>
++#include "mxc_v4l2_capture.h"
++
++#define MC521DA_I2C_ADDRESS 0x22
++#define MC521DA_TERM 0xFF
++
++typedef struct {
++ u16 width;
++ u16 height;
++} mc521da_image_format;
++
++struct mc521da_reg {
++ u8 reg;
++ u8 val;
++};
++
++static sensor_interface *interface_param = NULL;
++
++static mc521da_image_format format[2] = {
++ {
++ .width = 1600,
++ .height = 1200,
++ },
++ {
++ .width = 640,
++ .height = 480,
++ },
++};
++
++const static struct mc521da_reg mc521da_initial[] = {
++ /*----------------------------------------------------------
++ * Sensor Setting Start
++ *----------------------------------------------------------
++ */
++ {0xff, 0x01}, /* Sensor setting start */
++ {0x01, 0x10}, /* Wavetable script, generated by waveman */
++ {0x10, 0x64},
++ {0x03, 0x00}, {0x04, 0x06}, {0x05, 0x30}, {0x06, 0x02}, {0x08, 0x00},
++ {0x03, 0x01}, {0x04, 0x41}, {0x05, 0x70}, {0x06, 0x03}, {0x08, 0x00},
++ {0x03, 0x02}, {0x04, 0x55}, {0x05, 0x30}, {0x06, 0x03}, {0x08, 0x00},
++ {0x03, 0x03}, {0x04, 0x5A}, {0x05, 0x30}, {0x06, 0x02}, {0x08, 0x00},
++ {0x03, 0x04}, {0x04, 0x7A}, {0x05, 0x30}, {0x06, 0x06}, {0x08, 0x00},
++ {0x03, 0x05}, {0x04, 0x9C}, {0x05, 0x30}, {0x06, 0x0F}, {0x08, 0x00},
++ {0x03, 0x06}, {0x04, 0x73}, {0x05, 0x31}, {0x06, 0x06}, {0x08, 0x00},
++ {0x03, 0x07}, {0x04, 0x2D}, {0x05, 0x3B}, {0x06, 0x06}, {0x08, 0x00},
++ {0x03, 0x08}, {0x04, 0x32}, {0x05, 0x33}, {0x06, 0x06}, {0x08, 0x00},
++ {0x03, 0x09}, {0x04, 0x67}, {0x05, 0x63}, {0x06, 0x06}, {0x08, 0x00},
++ {0x03, 0x0a}, {0x04, 0x6C}, {0x05, 0x23}, {0x06, 0x0E}, {0x08, 0x00},
++ {0x03, 0x0b}, {0x04, 0x71}, {0x05, 0x23}, {0x06, 0x06}, {0x08, 0x00},
++ {0x03, 0x0c}, {0x04, 0x30}, {0x05, 0x2F}, {0x06, 0x06}, {0x08, 0x00},
++ {0x03, 0x0d}, {0x04, 0x00}, {0x05, 0x00}, {0x06, 0x06}, {0x08, 0x00},
++ {0x07, 0x0e},
++
++ /* Start Address */
++ {0x10, 0x64}, {0x14, 0x10}, {0x15, 0x00},
++
++ /* SYNC */
++ {0x18, 0x40}, {0x19, 0x00}, {0x1A, 0x03}, {0x1B, 0x00},
++
++ /* X-Y Mirror */
++ {0x11, 0x00}, {0xda, 0x00}, /* X mirror OFF, Y Mirror OFF */
++
++ /* Frame height */
++ {0x1c, 0x13}, {0x1d, 0x04}, {0x0e, 0x4b}, {0x0f, 0x05},
++ {0x9e, 0x04}, {0x9d, 0xc6}, {0xcc, 0x14}, {0xcd, 0x05},
++
++ /* Frame width */
++ {0x0c, 0x35}, {0x0d, 0x07}, {0x9b, 0x10}, {0x9c, 0x07},
++ {0x93, 0x21},
++
++ {0x01, 0x01}, {0x40, 0x00}, {0x41, 0x00}, {0x42, 0xf0},
++ {0x43, 0x03}, {0x44, 0x0a}, {0x45, 0x00}, {0x3b, 0x40},
++ {0x38, 0x18}, {0x3c, 0x00}, {0x20, 0x00}, {0x21, 0x01},
++ {0x22, 0x00}, {0x23, 0x01}, {0x24, 0x00}, {0x25, 0x01},
++ {0x26, 0x00}, {0x27, 0x01}, {0xb9, 0x04}, {0xb8, 0xc3},
++ {0xbb, 0x04}, {0xba, 0xc3}, {0xbf, 0x04}, {0xbe, 0xc3},
++
++ /* Ramp */
++ {0x57, 0x07}, {0x56, 0xd6}, {0x55, 0x03}, {0x54, 0x74},
++ {0x9f, 0x99}, {0x94, 0x80}, {0x91, 0x78}, {0x92, 0x8b},
++
++ /* Output Mode */
++ {0x52, 0x10}, {0x51, 0x00},
++
++ /* Analog Gain and Output driver */
++ {0x28, 0x00}, {0xdd, 0x82}, {0xdb, 0x00}, {0xdc, 0x00},
++
++ /* Update */
++ {0x00, 0x84},
++
++ /* PLL ADC clock = 75 MHz */
++ {0xb5, 0x60}, {0xb4, 0x02}, {0xb5, 0x20},
++
++ /*----------------------------------------------*/
++ /* ISP Setting Start */
++ /*----------------------------------------------*/
++ {0xff, 0x02},
++ {0x01, 0xbd}, {0x02, 0xf8}, {0x03, 0x3a}, {0x04, 0x00}, {0x0e, 0x00},
++
++ /* Output mode */
++ {0x88, 0x00}, {0x87, 0x11},
++
++ /* Threshold */
++ {0xb6, 0x1b}, {0x0d, 0xc0}, {0x24, 0x00}, {0x25, 0x00}, {0x26, 0x00},
++
++ /* Image Effect */
++ {0x3f, 0x80}, {0x40, 0x00}, {0x41, 0x00}, {0x42, 0x80}, {0x43, 0x00},
++ {0x44, 0x00}, {0x45, 0x00}, {0x46, 0x00}, {0x56, 0x80}, {0x57, 0x20},
++ {0x58, 0x20}, {0x59, 0x02}, {0x5a, 0x00}, {0x5b, 0x78}, {0x5c, 0x7c},
++ {0x5d, 0x84}, {0x5e, 0x85}, {0x5f, 0x78}, {0x60, 0x7e}, {0x61, 0x82},
++ {0x62, 0x85}, {0x63, 0x00}, {0x64, 0x80}, {0x65, 0x00}, {0x66, 0x80},
++ {0x67, 0x80}, {0x68, 0x80},
++
++ /* Auto Focus */
++ {0x6e, 0x02}, {0x6f, 0xe5}, {0x70, 0x08}, {0x71, 0x01}, {0x72, 0x00},
++
++ /* Decimator */
++ {0x78, 0xff}, {0x79, 0xff}, {0x7a, 0x70}, {0x7b, 0x00}, {0x7c, 0x00},
++ {0x7d, 0x00}, {0x7e, 0xc8}, {0x7f, 0xc8}, {0x80, 0x96}, {0x81, 0x96},
++ {0x82, 0x00}, {0x83, 0x00}, {0x84, 0x00}, {0x85, 0x00}, {0x86, 0x00},
++
++ /* Luminance Info */
++ {0xf9, 0x20}, {0xb7, 0x7f}, {0xb8, 0x28}, {0xb9, 0x08},
++ {0xf9, 0xa0}, {0xb7, 0x10}, {0xb9, 0x00},
++ {0xf9, 0x40}, {0xb7, 0x7f}, {0xb8, 0x28}, {0xb9, 0x08},
++ {0xf9, 0xc0}, {0xb7, 0x08}, {0xb9, 0x00},
++ {0xf9, 0x60}, {0xb7, 0x7f}, {0xb8, 0x28}, {0xb9, 0x08},
++ {0xf9, 0xe0}, {0xb7, 0x05}, {0xb9, 0x00},
++ {0xf9, 0x00}, {0xb7, 0x03}, {0xb8, 0x2d}, {0xb9, 0xcd},
++ {0xf9, 0x80}, {0xb7, 0x02}, {0xb9, 0x00},
++
++ /* AE */
++ {0x8a, 0x00}, {0x89, 0xc0}, {0x8c, 0x32}, {0x8d, 0x96}, {0x8e, 0x25},
++ {0x8f, 0x70}, {0x90, 0x12}, {0x91, 0x41}, {0x9e, 0x2e}, {0x9f, 0x2e},
++ {0xa0, 0x0b}, {0xa1, 0x71}, {0xa2, 0xb0}, {0xa3, 0x09}, {0xa4, 0x89},
++ {0xa5, 0x68}, {0xa6, 0x1a}, {0xa7, 0xb3}, {0xa8, 0xf0}, {0xa9, 0x19},
++ {0xaa, 0x6a}, {0xab, 0x6b}, {0xac, 0x01}, {0xad, 0xe8}, {0xae, 0x48},
++ {0xaf, 0x01}, {0xb0, 0x96}, {0xb1, 0xe6}, {0xb2, 0x03}, {0xb3, 0x00},
++ {0xb4, 0x10}, {0xb5, 0x00}, {0xb6, 0x04}, {0xba, 0x44}, {0xbb, 0x3a},
++ {0xbc, 0x01}, {0xbd, 0x08}, {0xbe, 0xa0}, {0xbf, 0x01}, {0xc0, 0x82},
++ {0x8a, 0xe1}, {0x8b, 0x8c},
++
++ /* AWB */
++ {0xc8, 0x00}, {0xc9, 0x00}, {0xca, 0x40}, {0xcb, 0xB0}, {0xcc, 0x40},
++ {0xcd, 0xff}, {0xce, 0x19}, {0xcf, 0x40}, {0xd0, 0x01}, {0xd1, 0x43},
++ {0xd2, 0x80}, {0xd3, 0x80}, {0xd4, 0xf1}, {0xdf, 0x00}, {0xe0, 0x8f},
++ {0xe1, 0x8f}, {0xe2, 0x53}, {0xe3, 0x97}, {0xe4, 0x1f}, {0xe5, 0x3b},
++ {0xe6, 0x9c}, {0xe7, 0x2e}, {0xe8, 0x03}, {0xe9, 0x02},
++
++ /* Neutral CCM */
++ {0xfa, 0x00}, {0xd5, 0x3f}, {0xd6, 0x8c}, {0xd7, 0x43}, {0xd8, 0x08},
++ {0xd9, 0x27}, {0xda, 0x7e}, {0xdb, 0x17}, {0xdc, 0x1a}, {0xdd, 0x47},
++ {0xde, 0xa1},
++
++ /* Blue CCM */
++ {0xfa, 0x01}, {0xd5, 0x3f}, {0xd6, 0x77}, {0xd7, 0x34}, {0xd8, 0x03},
++ {0xd9, 0x18}, {0xda, 0x6e}, {0xdb, 0x16}, {0xdc, 0x0f}, {0xdd, 0x29},
++ {0xde, 0x77},
++
++ /* Red CCM */
++ {0xfa, 0x02}, {0xd5, 0x3f}, {0xd6, 0x7d}, {0xd7, 0x2f}, {0xd8, 0x0e},
++ {0xd9, 0x1e}, {0xda, 0x76}, {0xdb, 0x18}, {0xdc, 0x29}, {0xdd, 0x51},
++ {0xde, 0xba},
++
++ /* AWB */
++ {0xea, 0x00}, {0xeb, 0x1a}, {0xc8, 0x33}, {0xc9, 0xc2},
++
++ {0xed, 0x02}, {0xee, 0x02},
++
++ /* AFD */
++ {0xf0, 0x11}, {0xf1, 0x03}, {0xf2, 0x05}, {0xf5, 0x05}, {0xf6, 0x32},
++ {0xf7, 0x32},
++
++ /* Lens Shading */
++ {0xf9, 0x00}, {0x05, 0x04}, {0x06, 0xff}, {0x07, 0xf2}, {0x08, 0x00},
++ {0x09, 0x00}, {0x0a, 0xf2}, {0x0b, 0xff}, {0x0c, 0xff},
++ {0xf9, 0x01}, {0x05, 0x04}, {0x06, 0xff}, {0x07, 0x8b}, {0x08, 0x16},
++ {0x09, 0x16}, {0x0a, 0x8b}, {0x0b, 0xff}, {0x0c, 0xe0},
++ {0xf9, 0x02}, {0x05, 0x04}, {0x06, 0xff}, {0x07, 0x8b}, {0x08, 0x16},
++ {0x09, 0x16}, {0x0a, 0x8b}, {0x0b, 0xff}, {0x0c, 0xe0},
++ {0xf9, 0x03}, {0x05, 0x04}, {0x06, 0xff}, {0x07, 0x7c}, {0x08, 0x26},
++ {0x09, 0x26}, {0x0a, 0x7c}, {0x0b, 0xd0}, {0x0c, 0xe0},
++ {0xf9, 0x04}, {0x05, 0x0d}, {0x06, 0x40}, {0x07, 0xa0}, {0x08, 0x00},
++ {0x09, 0x00}, {0x0a, 0xa0}, {0x0b, 0x40}, {0x0c, 0xe0},
++ {0xf9, 0x05}, {0x05, 0x0d}, {0x06, 0x40}, {0x07, 0xa0}, {0x08, 0x00},
++ {0x09, 0x00}, {0x0a, 0xa0}, {0x0b, 0x40}, {0x0c, 0xa0},
++ {0xf9, 0x06}, {0x05, 0x0d}, {0x06, 0x40}, {0x07, 0xa0}, {0x08, 0x00},
++ {0x09, 0x00}, {0x0a, 0xa0}, {0x0b, 0x40}, {0x0c, 0xa0},
++ {0xf9, 0x07}, {0x05, 0x0d}, {0x06, 0x40}, {0x07, 0xa0}, {0x08, 0x00},
++ {0x09, 0x00}, {0x0a, 0xa0}, {0x0b, 0x40}, {0x0c, 0xa0},
++
++ /* Edge setting */
++ {0x73, 0x68}, {0x74, 0x40}, {0x75, 0x00}, {0x76, 0xff}, {0x77, 0x80},
++ {0x4f, 0x80}, {0x50, 0x82}, {0x51, 0x82}, {0x52, 0x08},
++
++ /* Interpolation Setting */
++ {0x23, 0x7f}, {0x22, 0x08}, {0x18, 0xff}, {0x19, 0x00},
++ {0x40, 0x00}, {0x53, 0xff}, {0x54, 0x0a}, {0x55, 0xc2},
++ {0x1b, 0x18},
++
++ {0xfa, 0x00}, {0x15, 0x0c}, {0x22, 0x00}, {0x0e, 0xef}, {0x1f, 0x1d},
++ {0x20, 0x2d}, {0x1c, 0x01}, {0x1d, 0x02}, {0x1e, 0x03}, {0x0e, 0xee},
++ {0x12, 0x10}, {0x16, 0x10}, {0x17, 0x02}, {0x1a, 0x01},
++ {0xfa, 0x04}, {0x0e, 0xef}, {0x1c, 0x01}, {0x1d, 0x02}, {0x1e, 0x03},
++ {0x1f, 0x11}, {0x20, 0x11}, {0x0e, 0xee}, {0x12, 0x03}, {0x16, 0x10},
++ {0x17, 0x02}, {0x1a, 0xee},
++ {0xfa, 0x08}, {0x0e, 0xef}, {0x1c, 0x01}, {0x1d, 0x02}, {0x1e, 0x03},
++ {0x1f, 0x00}, {0x20, 0x00}, {0x0e, 0xee}, {0x12, 0x03}, {0x16, 0x10},
++ {0x17, 0x02}, {0x1a, 0x22},
++
++ /* Gamma Correction */
++ {0x27, 0x62}, {0x28, 0x00}, {0x27, 0x62}, {0x28, 0x00}, {0x29, 0x00},
++ {0x2a, 0x00}, {0x2f, 0x03}, {0x30, 0x10}, {0x31, 0x2b}, {0x32, 0x50},
++ {0x33, 0x70}, {0x34, 0x90}, {0x35, 0xB0}, {0x36, 0xD0}, {0x37, 0x00},
++ {0x38, 0x18}, {0x39, 0x57}, {0x3a, 0x89}, {0x3b, 0xac}, {0x3c, 0xc9},
++ {0x3d, 0xde}, {0x3e, 0xef}, {0x2b, 0x00}, {0x2c, 0x00}, {0x2d, 0x40},
++ {0x2e, 0xab},
++
++ /* Contrast */
++ {0x47, 0x10}, {0x48, 0x1f}, {0x49, 0xe3}, {0x4a, 0xf0}, {0x4b, 0x08},
++ {0x4c, 0x14}, {0x4d, 0xe9}, {0x4e, 0xf5}, {0x98, 0x8a},
++
++ {0xfa, 0x00},
++ {MC521DA_TERM, MC521DA_TERM}
++};
++
++static int mc521da_attach(struct i2c_adapter *adapter);
++static int mc521da_detach(struct i2c_client *client);
++
++static struct i2c_driver mc521da_i2c_driver = {
++ .driver = {
++ .owner = THIS_MODULE,
++ .name = "MC521DA Client",
++ },
++ .attach_adapter = mc521da_attach,
++ .detach_client = mc521da_detach,
++};
++
++static struct i2c_client mc521da_i2c_client = {
++ .name = "MC521DA I2C dev",
++ .addr = MC521DA_I2C_ADDRESS,
++ .driver = &mc521da_i2c_driver,
++};
++
++/*
++ * Function definitions
++ */
++static int mc521da_i2c_client_xfer(unsigned int addr, char *reg,
++ int reg_len, char *buf, int num,
++ int tran_flag)
++{
++ struct i2c_msg msg[2];
++ int ret;
++
++ msg[0].addr = addr;
++ msg[0].len = reg_len;
++ msg[0].buf = reg;
++ msg[0].flags = tran_flag;
++ msg[0].flags &= ~I2C_M_RD;
++
++ msg[1].addr = addr;
++ msg[1].len = num;
++ msg[1].buf = buf;
++ msg[1].flags = tran_flag;
++
++ if (tran_flag & MXC_I2C_FLAG_READ) {
++ msg[1].flags |= I2C_M_RD;
++ } else {
++ msg[1].flags &= ~I2C_M_RD;
++ }
++
++ ret = i2c_transfer(mc521da_i2c_client.adapter, msg, 2);
++ if (ret >= 0)
++ return 0;
++
++ return ret;
++}
++
++static int mc521da_read_reg(u8 * reg, u8 * val)
++{
++ return mc521da_i2c_client_xfer(MC521DA_I2C_ADDRESS, reg, 1, val, 1,
++ MXC_I2C_FLAG_READ);
++}
++
++static int mc521da_write_reg(u8 reg, u8 val)
++{
++ u8 temp1, temp2;
++ temp1 = reg;
++ temp2 = val;
++ return mc521da_i2c_client_xfer(MC521DA_I2C_ADDRESS, &temp1, 1, &temp2,
++ 1, 0);
++}
++
++static int mc521da_write_regs(const struct mc521da_reg reglist[])
++{
++ int err;
++ const struct mc521da_reg *next = reglist;
++
++ while (!((next->reg == MC521DA_TERM) && (next->val == MC521DA_TERM))) {
++ err = mc521da_write_reg(next->reg, next->val);
++ if (err) {
++ return err;
++ }
++ next++;
++ }
++ return 0;
++}
++
++/*!
++ * mc521da sensor downscale function
++ * @param downscale bool
++ * @return Error code indicating success or failure
++ */
++static u8 mc521da_sensor_downscale(bool downscale)
++{
++ u8 reg[1], data;
++ u32 i = 0;
++
++ if (downscale == true) {
++ // VGA
++ mc521da_write_reg(0xff, 0x01);
++
++ mc521da_write_reg(0x52, 0x30);
++ mc521da_write_reg(0x51, 0x00);
++
++ mc521da_write_reg(0xda, 0x01);
++ mc521da_write_reg(0x00, 0x8C);
++
++ /* Wait for changes to take effect */
++ reg[0] = 0x00;
++ while (i < 256) {
++ i++;
++ mc521da_read_reg(reg, &data);
++ if ((data & 0x80) == 0)
++ break;
++ msleep(5);
++ }
++
++ /* ISP */
++ mc521da_write_reg(0xff, 0x02);
++
++ mc521da_write_reg(0x03, 0x3b); /* Enable Decimator */
++
++ mc521da_write_reg(0x7a, 0x74);
++ mc521da_write_reg(0x7b, 0x01);
++ mc521da_write_reg(0x7e, 0x50);
++ mc521da_write_reg(0x7f, 0x50);
++ mc521da_write_reg(0x80, 0x3c);
++ mc521da_write_reg(0x81, 0x3c);
++ } else {
++ //UXGA
++ mc521da_write_reg(0xff, 0x01);
++ mc521da_write_reg(0x52, 0x10);
++ mc521da_write_reg(0x51, 0x00);
++ mc521da_write_reg(0xda, 0x00);
++
++ /* update */
++ mc521da_write_reg(0x00, 0x84);
++
++ /* Wait for changes to take effect */
++ reg[0] = 0x00;
++ while (i < 256) {
++ i++;
++ mc521da_read_reg(reg, &data);
++ if ((data & 0x80) == 0)
++ break;
++ msleep(5);
++ }
++
++ /* ISP */
++ mc521da_write_reg(0xff, 0x02);
++
++ mc521da_write_reg(0x03, 0x3a);
++
++ mc521da_write_reg(0x7a, 0x70);
++ mc521da_write_reg(0x7b, 0x00);
++ mc521da_write_reg(0x7e, 0xc8);
++ mc521da_write_reg(0x7f, 0xc8);
++ mc521da_write_reg(0x80, 0x96);
++ mc521da_write_reg(0x81, 0x96);
++ }
++
++ return 0;
++}
++
++/*!
++ * mc521da sensor interface Initialization
++ * @param param sensor_interface *
++ * @param width u32
++ * @param height u32
++ * @return None
++ */
++static void mc521da_interface(sensor_interface * param, u32 width, u32 height)
++{
++ param->clk_mode = 0x0; //gated
++ param->pixclk_pol = 0x0;
++ param->data_width = 0x1;
++ param->data_pol = 0x0;
++ param->ext_vsync = 0x0;
++ param->Vsync_pol = 0x0;
++ param->Hsync_pol = 0x0;
++ param->width = width - 1;
++ param->height = height - 1;
++ param->pixel_fmt = IPU_PIX_FMT_UYVY;
++}
++
++extern void gpio_sensor_reset(bool flag);
++
++/*!
++ * mc521da Reset function
++ *
++ * @return None
++ */
++static sensor_interface *mc521da_reset(void)
++{
++ if (interface_param == NULL)
++ return NULL;
++
++ mc521da_interface(interface_param, format[1].width, format[1].height);
++ set_mclk_rate(&interface_param->mclk);
++
++ gpio_sensor_reset(true);
++ msleep(10);
++ gpio_sensor_reset(false);
++ msleep(50);
++
++ return interface_param;
++}
++
++/*!
++ * mc521da sensor configuration
++ *
++ * @param frame_rate int *
++ * @param high_quality int
++ * @return sensor_interface *
++ */
++static sensor_interface *mc521da_config(int *frame_rate, int high_quality)
++{
++ int num_clock_per_row, err;
++ int max_rate = 0;
++ int index = 1;
++ u16 frame_height;
++
++ if (high_quality == 1)
++ index = 0;
++
++ err = mc521da_write_regs(mc521da_initial);
++ if (err) {
++ /* Reduce the MCLK */
++ interface_param->mclk = 20000000;
++ mc521da_reset();
++
++ printk(KERN_INFO "mc521da: mclk reduced\n");
++ mc521da_write_regs(mc521da_initial);
++ }
++
++ mc521da_interface(interface_param, format[index].width,
++ format[index].height);
++
++ if (index == 0) {
++ mc521da_sensor_downscale(false);
++ } else {
++ mc521da_sensor_downscale(true);
++ }
++
++ num_clock_per_row = 1845;
++ max_rate = interface_param->mclk * 3 * (index + 1)
++ / (2 * num_clock_per_row * 1300);
++
++ if ((*frame_rate > max_rate) || (*frame_rate == 0)) {
++ *frame_rate = max_rate;
++ }
++
++ frame_height = 1300 * max_rate / (*frame_rate);
++
++ *frame_rate = interface_param->mclk * 3 * (index + 1)
++ / (2 * num_clock_per_row * frame_height);
++
++ mc521da_write_reg(0xff, 0x01);
++ mc521da_write_reg(0xE, frame_height & 0xFF);
++ mc521da_write_reg(0xF, (frame_height & 0xFF00) >> 8);
++ mc521da_write_reg(0xCC, frame_height & 0xFF);
++ mc521da_write_reg(0xCD, (frame_height & 0xFF00) >> 8);
++
++ return interface_param;
++}
++
++/*!
++ * mc521da sensor set color configuration
++ *
++ * @param bright int
++ * @param saturation int
++ * @param red int
++ * @param green int
++ * @param blue int
++ * @return None
++ */
++static void
++mc521da_set_color(int bright, int saturation, int red, int green, int blue)
++{
++ /* Select ISP */
++ mc521da_write_reg(0xff, 0x02);
++
++ mc521da_write_reg(0x41, bright);
++ mc521da_write_reg(0xca, red);
++ mc521da_write_reg(0xcb, green);
++ mc521da_write_reg(0xcc, blue);
++}
++
++/*!
++ * mc521da sensor get color configuration
++ *
++ * @param bright int *
++ * @param saturation int *
++ * @param red int *
++ * @param green int *
++ * @param blue int *
++ * @return None
++ */
++static void
++mc521da_get_color(int *bright, int *saturation, int *red, int *green, int *blue)
++{
++ u8 reg[1];
++ u8 *pdata;
++
++ *saturation = 0;
++
++ /* Select ISP */
++ mc521da_write_reg(0xff, 0x02);
++
++ reg[0] = 0x41;
++ pdata = (u8 *) bright;
++ mc521da_read_reg(reg, pdata);
++
++ reg[0] = 0xCA;
++ pdata = (u8 *) red;
++ mc521da_read_reg(reg, pdata);
++
++ reg[0] = 0xCB;
++ pdata = (u8 *) green;
++ mc521da_read_reg(reg, pdata);
++
++ reg[0] = 0xCC;
++ pdata = (u8 *) blue;
++ mc521da_read_reg(reg, pdata);
++}
++
++struct camera_sensor camera_sensor_if = {
++ set_color:mc521da_set_color,
++ get_color:mc521da_get_color,
++ config:mc521da_config,
++ reset:mc521da_reset,
++};
++
++/*!
++ * mc521da I2C detect_client function
++ *
++ * @param adapter struct i2c_adapter *
++ * @param address int
++ * @param kind int
++ *
++ * @return Error code indicating success or failure
++ */
++static int mc521da_detect_client(struct i2c_adapter *adapter, int address,
++ int kind)
++{
++ mc521da_i2c_client.adapter = adapter;
++ if (i2c_attach_client(&mc521da_i2c_client)) {
++ mc521da_i2c_client.adapter = NULL;
++ printk(KERN_ERR "mc521da_attach: i2c_attach_client failed\n");
++ return -1;
++ }
++
++ interface_param = (sensor_interface *)
++ kmalloc(sizeof(sensor_interface), GFP_KERNEL);
++ if (!interface_param) {
++ printk(KERN_ERR "mc521da_attach: kmalloc failed \n");
++ return -1;
++ }
++
++ interface_param->mclk = 25000000;
++
++ printk(KERN_INFO "mc521da Detected\n");
++
++ return 0;
++}
++
++static unsigned short normal_i2c[] = { MC521DA_I2C_ADDRESS, I2C_CLIENT_END };
++
++/* Magic definition of all other variables and things */
++I2C_CLIENT_INSMOD;
++
++static int mc521da_attach(struct i2c_adapter *adap)
++{
++ uint32_t mclk = 25000000;
++ struct clk *clk;
++ int err;
++
++ clk = clk_get(NULL, "csi_clk");
++ clk_enable(clk);
++ set_mclk_rate(&mclk);
++
++ gpio_sensor_reset(true);
++ msleep(10);
++ gpio_sensor_reset(false);
++ msleep(100);
++
++ err = i2c_probe(adap, &addr_data, &mc521da_detect_client);
++
++ clk_disable(clk);
++ clk_put(clk);
++
++ return err;
++}
++
++/*!
++ * mc521da I2C detach function
++ *
++ * @param client struct i2c_client *
++ * @return Error code indicating success or failure
++ */
++static int mc521da_detach(struct i2c_client *client)
++{
++ int err;
++
++ if (!mc521da_i2c_client.adapter)
++ return -1;
++
++ err = i2c_detach_client(&mc521da_i2c_client);
++ mc521da_i2c_client.adapter = NULL;
++
++ if (interface_param)
++ kfree(interface_param);
++ interface_param = NULL;
++
++ return err;
++}
++
++extern void gpio_sensor_active(void);
++extern void gpio_sensor_inactive(void);
++
++/*!
++ * mc521da init function
++ *
++ * @return Error code indicating success or failure
++ */
++static __init int mc521da_init(void)
++{
++ gpio_sensor_active();
++ return i2c_add_driver(&mc521da_i2c_driver);
++}
++
++/*!
++ * mc521da cleanup function
++ *
++ * @return Error code indicating success or failure
++ */
++static void __exit mc521da_clean(void)
++{
++ i2c_del_driver(&mc521da_i2c_driver);
++ gpio_sensor_inactive();
++}
++
++module_init(mc521da_init);
++module_exit(mc521da_clean);
++
++/* Exported symbols for modules. */
++EXPORT_SYMBOL(camera_sensor_if);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("MC521DA Camera Driver");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mt9v111.c linux-2.6.28-karo/drivers/media/video/mxc/capture/mt9v111.c
+--- linux-2.6.28/drivers/media/video/mxc/capture/mt9v111.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mt9v111.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,932 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mt9v111.c
++ *
++ * @brief mt9v111 camera driver functions
++ *
++ * @ingroup Camera
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/slab.h>
++#include <linux/ctype.h>
++#include <linux/types.h>
++#include <linux/delay.h>
++#include <linux/device.h>
++#include <linux/i2c.h>
++#include <linux/clk.h>
++#include <asm/arch/mxc_i2c.h>
++#include "mxc_v4l2_capture.h"
++#include "mt9v111.h"
++
++#ifdef MT9V111_DEBUG
++static u16 testpattern = 0;
++#endif
++
++static sensor_interface *interface_param = NULL;
++static mt9v111_conf mt9v111_device;
++static int reset_frame_rate = 30;
++
++#define MT9V111_FRAME_RATE_NUM 20
++
++static mt9v111_image_format format[2] = {
++ {
++ .index = 0,
++ .width = 640,
++ .height = 480,
++ },
++ {
++ .index = 1,
++ .width = 352,
++ .height = 288,
++ },
++};
++
++static int mt9v111_attach(struct i2c_adapter *adapter);
++static int mt9v111_detach(struct i2c_client *client);
++
++static struct i2c_driver mt9v111_i2c_driver = {
++ .driver = {
++ .owner = THIS_MODULE,
++ .name = "MT9V111 Client",
++ },
++ .attach_adapter = mt9v111_attach,
++ .detach_client = mt9v111_detach,
++};
++
++static struct i2c_client mt9v111_i2c_client = {
++ .name = "mt9v111 I2C dev",
++ .addr = MT9V111_I2C_ADDRESS,
++ .driver = &mt9v111_i2c_driver,
++};
++
++/*
++ * Function definitions
++ */
++
++static u16 mt9v111_endian_swap16(u16 data)
++{
++ u16 temp;
++
++ temp = data;
++ temp = ((data >> 8) & 0xff) | ((data << 8) & 0xff00);
++
++ return temp;
++}
++
++static int mt9v111_i2c_client_xfer(unsigned int addr, char *reg, int reg_len,
++ char *buf, int num, int tran_flag)
++{
++ struct i2c_msg msg[2];
++ int ret;
++
++ msg[0].addr = addr;
++ msg[0].len = reg_len;
++ msg[0].buf = reg;
++ msg[0].flags = tran_flag;
++ msg[0].flags &= ~I2C_M_RD;
++
++ msg[1].addr = addr;
++ msg[1].len = num;
++ msg[1].buf = buf;
++ msg[1].flags = tran_flag;
++
++ if (tran_flag & MXC_I2C_FLAG_READ) {
++ msg[1].flags |= I2C_M_RD;
++ } else {
++ msg[1].flags &= ~I2C_M_RD;
++ }
++
++ ret = i2c_transfer(mt9v111_i2c_client.adapter, msg, 2);
++ if (ret >= 0)
++ return 0;
++
++ return ret;
++}
++
++static int mt9v111_read_reg(u8 * reg, u16 * val)
++{
++ return mt9v111_i2c_client_xfer(MT9V111_I2C_ADDRESS, reg, 1,
++ (u8 *) val, 2, MXC_I2C_FLAG_READ);
++}
++
++static int mt9v111_write_reg(u8 reg, u16 val)
++{
++ u8 temp1;
++ u16 temp2;
++ temp1 = reg;
++ temp2 = mt9v111_endian_swap16(val);
++ pr_debug("write reg %x val %x.\n", reg, val);
++ return mt9v111_i2c_client_xfer(MT9V111_I2C_ADDRESS, &temp1, 1,
++ (u8 *) & temp2, 2, 0);
++}
++
++/*!
++ * Initialize mt9v111_sensor_lib
++ * Libarary for Sensor configuration through I2C
++ *
++ * @param coreReg Core Registers
++ * @param ifpReg IFP Register
++ *
++ * @return status
++ */
++static u8 mt9v111_sensor_lib(mt9v111_coreReg * coreReg, mt9v111_IFPReg * ifpReg)
++{
++ u8 reg;
++ u16 data;
++ u8 error = 0;
++
++ /*
++ * setup to IFP registers
++ */
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = ifpReg->addrSpaceSel;
++ mt9v111_write_reg(reg, data);
++
++ // Operation Mode Control
++ reg = MT9V111I_MODE_CONTROL;
++ data = ifpReg->modeControl;
++ mt9v111_write_reg(reg, data);
++
++ // Output format
++ reg = MT9V111I_FORMAT_CONTROL;
++ data = ifpReg->formatControl; // Set bit 12
++ mt9v111_write_reg(reg, data);
++
++ // Flicker Control
++ reg = MT9V111I_FLICKER_CONTROL;
++ data = ifpReg->flickerCtrl;
++ mt9v111_write_reg(reg, data);
++
++ // AE limit 4
++ reg = MT9V111I_SHUTTER_WIDTH_LIMIT_AE;
++ data = ifpReg->gainLimitAE;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111I_OUTPUT_FORMAT_CTRL2;
++ data = ifpReg->outputFormatCtrl2;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111I_AE_SPEED;
++ data = ifpReg->AESpeed;
++ mt9v111_write_reg(reg, data);
++
++ /* output image size */
++ reg = MT9V111i_H_PAN;
++ data = 0x8000 | ifpReg->HPan;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111i_H_ZOOM;
++ data = 0x8000 | ifpReg->HZoom;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111i_H_SIZE;
++ data = 0x8000 | ifpReg->HSize;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111i_V_PAN;
++ data = 0x8000 | ifpReg->VPan;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111i_V_ZOOM;
++ data = 0x8000 | ifpReg->VZoom;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111i_V_SIZE;
++ data = 0x8000 | ifpReg->VSize;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111i_H_PAN;
++ data = ~0x8000 & ifpReg->HPan;
++ mt9v111_write_reg(reg, data);
++#if 0
++ reg = MT9V111I_UPPER_SHUTTER_DELAY_LIM;
++ data = ifpReg->upperShutterDelayLi;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111I_SHUTTER_60;
++ data = ifpReg->shutter_width_60;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111I_SEARCH_FLICK_60;
++ data = ifpReg->search_flicker_60;
++ mt9v111_write_reg(reg, data);
++#endif
++
++ /*
++ * setup to sensor core registers
++ */
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = coreReg->addressSelect;
++ mt9v111_write_reg(reg, data);
++
++ // enable changes and put the Sync bit on
++ reg = MT9V111S_OUTPUT_CTRL;
++ data = MT9V111S_OUTCTRL_SYNC | MT9V111S_OUTCTRL_CHIP_ENABLE | 0x3000;
++ mt9v111_write_reg(reg, data);
++
++ // min PIXCLK - Default
++ reg = MT9V111S_PIXEL_CLOCK_SPEED;
++ data = coreReg->pixelClockSpeed;
++ mt9v111_write_reg(reg, data);
++
++ //Setup image flipping / Dark rows / row/column skip
++ reg = MT9V111S_READ_MODE;
++ data = coreReg->readMode;
++ mt9v111_write_reg(reg, data);
++
++ //zoom 0
++ reg = MT9V111S_DIGITAL_ZOOM;
++ data = coreReg->digitalZoom;
++ mt9v111_write_reg(reg, data);
++
++ // min H-blank
++ reg = MT9V111S_HOR_BLANKING;
++ data = coreReg->horizontalBlanking;
++ mt9v111_write_reg(reg, data);
++
++ // min V-blank
++ reg = MT9V111S_VER_BLANKING;
++ data = coreReg->verticalBlanking;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111S_SHUTTER_WIDTH;
++ data = coreReg->shutterWidth;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111S_SHUTTER_DELAY;
++ data = ifpReg->upperShutterDelayLi;
++ mt9v111_write_reg(reg, data);
++
++ // changes become effective
++ reg = MT9V111S_OUTPUT_CTRL;
++ data = MT9V111S_OUTCTRL_CHIP_ENABLE | 0x3000;
++ mt9v111_write_reg(reg, data);
++
++ return error;
++}
++
++/*!
++ * mt9v111 sensor interface Initialization
++ * @param param sensor_interface *
++ * @param width u32
++ * @param height u32
++ * @return None
++ */
++static void mt9v111_interface(sensor_interface * param, u32 width, u32 height)
++{
++ param->Vsync_pol = 0x0;
++ param->clk_mode = 0x0; //gated
++ param->pixclk_pol = 0x0;
++ param->data_width = 0x1;
++ param->data_pol = 0x0;
++ param->ext_vsync = 0x0;
++ param->Vsync_pol = 0x0;
++ param->Hsync_pol = 0x0;
++ param->width = width - 1;
++ param->height = height - 1;
++ param->pixel_fmt = IPU_PIX_FMT_UYVY;
++ param->mclk = 27000000;
++}
++
++/*!
++ * MT9V111 frame rate calculate
++ *
++ * @param frame_rate int *
++ * @param mclk int
++ * @return None
++ */
++static void mt9v111_rate_cal(int *frame_rate, int mclk)
++{
++ int num_clock_per_row;
++ int max_rate = 0;
++
++ mt9v111_device.coreReg->horizontalBlanking = MT9V111_HORZBLANK_MIN;
++
++ num_clock_per_row = (format[0].width + 114 + MT9V111_HORZBLANK_MIN) * 2;
++ max_rate = mclk / (num_clock_per_row *
++ (format[0].height + MT9V111_VERTBLANK_DEFAULT));
++
++ if ((*frame_rate > max_rate) || (*frame_rate == 0)) {
++ *frame_rate = max_rate;
++ }
++
++ mt9v111_device.coreReg->verticalBlanking
++ = mclk / (*frame_rate * num_clock_per_row) - format[0].height;
++
++ reset_frame_rate = *frame_rate;
++}
++
++/*!
++ * MT9V111 sensor configuration
++ *
++ * @param frame_rate int *
++ * @param high_quality int
++ * @return sensor_interface *
++ */
++sensor_interface *mt9v111_config(int *frame_rate, int high_quality)
++{
++ u32 out_width, out_height;
++
++ if (interface_param == NULL)
++ return NULL;
++
++ mt9v111_device.coreReg->addressSelect = MT9V111I_SEL_SCA;
++ mt9v111_device.ifpReg->addrSpaceSel = MT9V111I_SEL_IFP;
++
++ mt9v111_device.coreReg->windowHeight = MT9V111_WINHEIGHT;
++ mt9v111_device.coreReg->windowWidth = MT9V111_WINWIDTH;
++ mt9v111_device.coreReg->zoomColStart = 0;
++ mt9v111_device.coreReg->zomRowStart = 0;
++ mt9v111_device.coreReg->digitalZoom = 0x0;
++
++ mt9v111_device.coreReg->verticalBlanking = MT9V111_VERTBLANK_DEFAULT;
++ mt9v111_device.coreReg->horizontalBlanking = MT9V111_HORZBLANK_MIN;
++ mt9v111_device.coreReg->pixelClockSpeed = 0;
++ mt9v111_device.coreReg->readMode = 0xd0a1;
++
++ mt9v111_device.ifpReg->outputFormatCtrl2 = 0;
++ mt9v111_device.ifpReg->gainLimitAE = 0x300;
++ mt9v111_device.ifpReg->AESpeed = 0x80;
++
++ // here is the default value
++ mt9v111_device.ifpReg->formatControl = 0xc800;
++ mt9v111_device.ifpReg->modeControl = 0x708e;
++ mt9v111_device.ifpReg->awbSpeed = 0x4514;
++ mt9v111_device.ifpReg->flickerCtrl = 0x02;
++ mt9v111_device.coreReg->shutterWidth = 0xf8;
++
++ out_width = 640;
++ out_height = 480;
++
++ /*output size */
++ mt9v111_device.ifpReg->HPan = 0;
++ mt9v111_device.ifpReg->HZoom = 640;
++ mt9v111_device.ifpReg->HSize = out_width;
++ mt9v111_device.ifpReg->VPan = 0;
++ mt9v111_device.ifpReg->VZoom = 480;
++ mt9v111_device.ifpReg->VSize = out_height;
++
++ mt9v111_interface(interface_param, out_width, out_height);
++ set_mclk_rate(&interface_param->mclk);
++ mt9v111_rate_cal(frame_rate, interface_param->mclk);
++ mt9v111_sensor_lib(mt9v111_device.coreReg, mt9v111_device.ifpReg);
++
++ return interface_param;
++}
++
++/*!
++ * mt9v111 sensor set color configuration
++ *
++ * @param bright int
++ * @param saturation int
++ * @param red int
++ * @param green int
++ * @param blue int
++ * @return None
++ */
++static void
++mt9v111_set_color(int bright, int saturation, int red, int green, int blue)
++{
++ u8 reg;
++ u16 data;
++
++ switch (saturation) {
++ case 100:
++ mt9v111_device.ifpReg->awbSpeed = 0x4514;
++ break;
++ case 150:
++ mt9v111_device.ifpReg->awbSpeed = 0x6D14;
++ break;
++ case 75:
++ mt9v111_device.ifpReg->awbSpeed = 0x4D14;
++ break;
++ case 50:
++ mt9v111_device.ifpReg->awbSpeed = 0x5514;
++ break;
++ case 37:
++ mt9v111_device.ifpReg->awbSpeed = 0x5D14;
++ break;
++ case 25:
++ mt9v111_device.ifpReg->awbSpeed = 0x6514;
++ break;
++ default:
++ mt9v111_device.ifpReg->awbSpeed = 0x4514;
++ break;
++ }
++
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = mt9v111_device.ifpReg->addrSpaceSel;
++ mt9v111_write_reg(reg, data);
++
++ // Operation Mode Control
++ reg = MT9V111I_AWB_SPEED;
++ data = mt9v111_device.ifpReg->awbSpeed;
++ mt9v111_write_reg(reg, data);
++}
++
++/*!
++ * mt9v111 sensor get color configuration
++ *
++ * @param bright int *
++ * @param saturation int *
++ * @param red int *
++ * @param green int *
++ * @param blue int *
++ * @return None
++ */
++static void
++mt9v111_get_color(int *bright, int *saturation, int *red, int *green, int *blue)
++{
++ *saturation = (mt9v111_device.ifpReg->awbSpeed & 0x3800) >> 11;
++ switch (*saturation) {
++ case 0:
++ *saturation = 100;
++ break;
++ case 1:
++ *saturation = 75;
++ break;
++ case 2:
++ *saturation = 50;
++ break;
++ case 3:
++ *saturation = 37;
++ break;
++ case 4:
++ *saturation = 25;
++ break;
++ case 5:
++ *saturation = 150;
++ break;
++ case 6:
++ *saturation = 0;
++ break;
++ default:
++ *saturation = 0;
++ break;
++ }
++}
++
++/*!
++ * mt9v111 sensor set AE measurement window mode configuration
++ *
++ * @param ae_mode int
++ * @return None
++ */
++static void mt9v111_set_ae_mode(int ae_mode)
++{
++ u8 reg;
++ u16 data;
++
++ mt9v111_device.ifpReg->modeControl &= 0xfff3;
++ mt9v111_device.ifpReg->modeControl |= (ae_mode & 0x03) << 2;
++
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = mt9v111_device.ifpReg->addrSpaceSel;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111I_MODE_CONTROL;
++ data = mt9v111_device.ifpReg->modeControl;
++ mt9v111_write_reg(reg, data);
++}
++
++/*!
++ * mt9v111 sensor get AE measurement window mode configuration
++ *
++ * @param ae_mode int *
++ * @return None
++ */
++static void mt9v111_get_ae_mode(int *ae_mode)
++{
++ if (ae_mode != NULL) {
++ *ae_mode = (mt9v111_device.ifpReg->modeControl & 0xc) >> 2;
++ }
++}
++
++/*!
++ * mt9v111 sensor enable/disable AE
++ *
++ * @param active int
++ * @return None
++ */
++static void mt9v111_set_ae(int active)
++{
++ u8 reg;
++ u16 data;
++
++ mt9v111_device.ifpReg->modeControl &= 0xBFFF;
++ mt9v111_device.ifpReg->modeControl |= (active & 0x01) << 14;
++
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = mt9v111_device.ifpReg->addrSpaceSel;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111I_MODE_CONTROL;
++ data = mt9v111_device.ifpReg->modeControl;
++ mt9v111_write_reg(reg, data);
++}
++
++ /*!
++ * mt9v111 sensor set AE gain
++ *
++ * @param active int
++ * @return None
++ */
++static void mt9v111_set_ae_limit(int limit)
++{
++ u8 reg;
++ u16 data;
++
++ mt9v111_device.ifpReg->gainLimitAE = (limit & 0x1F) << 5;
++
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = mt9v111_device.ifpReg->addrSpaceSel;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111I_SHUTTER_WIDTH_LIMIT_AE;
++ data = mt9v111_device.ifpReg->gainLimitAE;
++ mt9v111_write_reg(reg, data);
++}
++
++
++/*!
++ * mt9v111 sensor enable/disable auto white balance
++ *
++ * @param active int
++ * @return None
++ */
++static void mt9v111_set_awb(int active)
++{
++ u8 reg;
++ u16 data;
++
++ mt9v111_device.ifpReg->modeControl &= 0xFFFD;
++ mt9v111_device.ifpReg->modeControl |= (active & 0x01) << 1;
++
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = mt9v111_device.ifpReg->addrSpaceSel;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111I_MODE_CONTROL;
++ data = mt9v111_device.ifpReg->modeControl;
++ mt9v111_write_reg(reg, data);
++}
++
++/*!
++ * mt9v111 sensor set the flicker control
++ *
++ * @param control int
++ * @return None
++ */
++static void mt9v111_flicker_control(int control)
++{
++ u8 reg;
++ u16 data;
++
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = mt9v111_device.ifpReg->addrSpaceSel;
++ mt9v111_write_reg(reg, data);
++
++ switch (control) {
++ case V4L2_MXC_FLICKER_DISABLE:
++ mt9v111_device.ifpReg->formatControl &= ~(0x01 << 11);
++
++ reg = MT9V111I_FORMAT_CONTROL;
++ data = mt9v111_device.ifpReg->formatControl;
++ mt9v111_write_reg(reg, data);
++ break;
++
++ case V4L2_MXC_FLICKER_50HZ:
++ if (!(mt9v111_device.ifpReg->formatControl & (0x01 << 11))) {
++ mt9v111_device.ifpReg->formatControl |= (0x01 << 11);
++ reg = MT9V111I_FORMAT_CONTROL;
++ data = mt9v111_device.ifpReg->formatControl;
++ mt9v111_write_reg(reg, data);
++ }
++ mt9v111_device.ifpReg->flickerCtrl = 0x01;
++ reg = MT9V111I_FLICKER_CONTROL;
++ data = mt9v111_device.ifpReg->flickerCtrl;
++ mt9v111_write_reg(reg, data);
++ break;
++
++ case V4L2_MXC_FLICKER_60HZ:
++ if (!(mt9v111_device.ifpReg->formatControl & (0x01 << 11))) {
++ mt9v111_device.ifpReg->formatControl |= (0x01 << 11);
++ reg = MT9V111I_FORMAT_CONTROL;
++ data = mt9v111_device.ifpReg->formatControl;
++ mt9v111_write_reg(reg, data);
++ }
++ mt9v111_device.ifpReg->flickerCtrl = 0x03;
++ reg = MT9V111I_FLICKER_CONTROL;
++ data = mt9v111_device.ifpReg->flickerCtrl;
++ mt9v111_write_reg(reg, data);
++ break;
++
++ case V4L2_MXC_FLICKER_AUTO:
++ if (!(mt9v111_device.ifpReg->formatControl & (0x01 << 11))) {
++ mt9v111_device.ifpReg->formatControl |= (0x01 << 11);
++ reg = MT9V111I_FORMAT_CONTROL;
++ data = mt9v111_device.ifpReg->formatControl;
++ mt9v111_write_reg(reg, data);
++ }
++ mt9v111_device.ifpReg->flickerCtrl = 0x10;
++ reg = MT9V111I_FLICKER_CONTROL;
++ data = mt9v111_device.ifpReg->flickerCtrl;
++ mt9v111_write_reg(reg, data);
++ break;
++ }
++ return;
++
++}
++
++/*!
++ * mt9v111 Get mode&flicker control parameters
++ *
++ * @return None
++ */
++static void mt9v111_get_control_params(int *ae, int *awb, int *flicker)
++{
++ if ((ae != NULL) && (awb != NULL) && (flicker != NULL)) {
++ *ae = (mt9v111_device.ifpReg->modeControl & 0x4000) >> 14;
++ *awb = (mt9v111_device.ifpReg->modeControl & 0x02) >> 1;
++ *flicker = (mt9v111_device.ifpReg->formatControl & 0x800) >> 9;
++ if (*flicker) {
++ *flicker = (mt9v111_device.ifpReg->flickerCtrl & 0x03);
++ switch (*flicker) {
++ case 1:
++ *flicker = V4L2_MXC_FLICKER_50HZ;
++ break;
++ case 3:
++ *flicker = V4L2_MXC_FLICKER_60HZ;
++ break;
++ default:
++ *flicker = V4L2_MXC_FLICKER_AUTO;
++ break;
++ }
++ } else
++ *flicker = V4L2_MXC_FLICKER_DISABLE;
++ }
++ return;
++}
++
++/*!
++ * mt9v111 Reset function
++ *
++ * @return None
++ */
++static sensor_interface *mt9v111_reset(void)
++{
++ return mt9v111_config(&reset_frame_rate, 0);
++}
++
++/*!
++ * mt9v111 get_status function
++ *
++ * @return int
++ */
++static int mt9v111_get_status(void)
++{
++ int retval = 0;
++ u8 reg;
++ u16 data = 0;
++
++ if (!interface_param)
++ return -ENODEV;
++
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = MT9V111I_SEL_SCA;
++ retval = mt9v111_write_reg(reg, data);
++
++ reg = MT9V111S_SENSOR_CORE_VERSION;
++ retval = mt9v111_read_reg(&reg, &data);
++ data = mt9v111_endian_swap16(data);
++ if (MT9V111_CHIP_VERSION != data)
++ retval = -ENODEV;
++
++ return retval;
++}
++
++struct camera_sensor camera_sensor_if = {
++ .set_color = mt9v111_set_color,
++ .get_color = mt9v111_get_color,
++ .set_ae_mode = mt9v111_set_ae_mode,
++ .get_ae_mode = mt9v111_get_ae_mode,
++ .set_ae = mt9v111_set_ae,
++ .set_ae_limit = mt9v111_set_ae_limit,
++ .set_awb = mt9v111_set_awb,
++ .flicker_control = mt9v111_flicker_control,
++ .get_control_params = mt9v111_get_control_params,
++ .config = mt9v111_config,
++ .reset = mt9v111_reset,
++ .get_status = mt9v111_get_status,
++};
++
++#ifdef MT9V111_DEBUG
++/*!
++ * Set sensor to test mode, which will generate test pattern.
++ *
++ * @return none
++ */
++static void mt9v111_test_pattern(bool flag)
++{
++ u8 reg;
++ u16 data;
++
++ // switch to sensor registers
++ reg = MT9V111I_ADDR_SPACE_SEL;
++ data = MT9V111I_SEL_SCA;
++ mt9v111_write_reg(reg, data);
++
++ if (flag == true) {
++ testpattern = MT9V111S_OUTCTRL_TEST_MODE;
++
++ reg = MT9V111S_ROW_NOISE_CTRL;
++ data = mt9v111_read_reg(&reg, &data) & 0xBF;
++ data = mt9v111_endian_swap16(data);
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111S_TEST_DATA;
++ data = 0;
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111S_OUTPUT_CTRL;
++ // changes take effect
++ data = MT9V111S_OUTCTRL_CHIP_ENABLE | testpattern | 0x3000;
++ mt9v111_write_reg(reg, data);
++ } else {
++ testpattern = 0;
++
++ reg = MT9V111S_ROW_NOISE_CTRL;
++ data = mt9v111_read_reg(&reg, &data) | 0x40;
++ data = mt9v111_endian_swap16(data);
++ mt9v111_write_reg(reg, data);
++
++ reg = MT9V111S_OUTPUT_CTRL;
++ // changes take effect
++ data = MT9V111S_OUTCTRL_CHIP_ENABLE | testpattern | 0x3000;
++ mt9v111_write_reg(reg, data);
++ }
++}
++#endif
++
++/*!
++ * mt9v111 I2C detect_client function
++ *
++ * @param adapter struct i2c_adapter *
++ * @param address int
++ * @param kind int
++ *
++ * @return Error code indicating success or failure
++ */
++static int mt9v111_detect_client(struct i2c_adapter *adapter, int address,
++ int kind)
++{
++ mt9v111_i2c_client.adapter = adapter;
++ if (i2c_attach_client(&mt9v111_i2c_client)) {
++ mt9v111_i2c_client.adapter = NULL;
++ printk(KERN_ERR "mt9v111_attach: i2c_attach_client failed\n");
++ return -1;
++ }
++
++ interface_param = (sensor_interface *)
++ kmalloc(sizeof(sensor_interface), GFP_KERNEL);
++ if (!interface_param) {
++ printk(KERN_ERR "mt9v111_attach: kmalloc failed \n");
++ return -1;
++ }
++
++ printk(KERN_INFO "MT9V111 Detected\n");
++
++ return 0;
++}
++
++static unsigned short normal_i2c[] = { MT9V111_I2C_ADDRESS, I2C_CLIENT_END };
++
++/* Magic definition of all other variables and things */
++I2C_CLIENT_INSMOD;
++
++/*!
++ * mt9v111 I2C attach function
++ *
++ * @param adapter struct i2c_adapter *
++ * @return Error code indicating success or failure
++ */
++static int mt9v111_attach(struct i2c_adapter *adap)
++{
++ uint32_t mclk = 27000000;
++ struct clk *clk;
++ int err;
++
++ clk = clk_get(NULL, "csi_clk");
++ clk_enable(clk);
++ set_mclk_rate(&mclk);
++
++ err = i2c_probe(adap, &addr_data, &mt9v111_detect_client);
++ clk_disable(clk);
++ clk_put(clk);
++
++ return err;
++}
++
++/*!
++ * mt9v111 I2C detach function
++ *
++ * @param client struct i2c_client *
++ * @return Error code indicating success or failure
++ */
++static int mt9v111_detach(struct i2c_client *client)
++{
++ int err;
++
++ if (!mt9v111_i2c_client.adapter)
++ return -1;
++
++ err = i2c_detach_client(&mt9v111_i2c_client);
++ mt9v111_i2c_client.adapter = NULL;
++
++ if (interface_param)
++ kfree(interface_param);
++ interface_param = NULL;
++
++ return err;
++}
++
++extern void gpio_sensor_active(void);
++
++/*!
++ * MT9V111 init function
++ *
++ * @return Error code indicating success or failure
++ */
++static __init int mt9v111_init(void)
++{
++ u8 err;
++
++ gpio_sensor_active();
++
++ mt9v111_device.coreReg = (mt9v111_coreReg *)
++ kmalloc(sizeof(mt9v111_coreReg), GFP_KERNEL);
++ if (!mt9v111_device.coreReg)
++ return -1;
++
++ memset(mt9v111_device.coreReg, 0, sizeof(mt9v111_coreReg));
++
++ mt9v111_device.ifpReg = (mt9v111_IFPReg *)
++ kmalloc(sizeof(mt9v111_IFPReg), GFP_KERNEL);
++ if (!mt9v111_device.ifpReg) {
++ kfree(mt9v111_device.coreReg);
++ mt9v111_device.coreReg = NULL;
++ return -1;
++ }
++
++ memset(mt9v111_device.ifpReg, 0, sizeof(mt9v111_IFPReg));
++
++ err = i2c_add_driver(&mt9v111_i2c_driver);
++ return err;
++}
++
++extern void gpio_sensor_inactive(void);
++/*!
++ * MT9V111 cleanup function
++ *
++ * @return Error code indicating success or failure
++ */
++static void __exit mt9v111_clean(void)
++{
++ if (mt9v111_device.coreReg) {
++ kfree(mt9v111_device.coreReg);
++ mt9v111_device.coreReg = NULL;
++ }
++
++ if (mt9v111_device.ifpReg) {
++ kfree(mt9v111_device.ifpReg);
++ mt9v111_device.ifpReg = NULL;
++ }
++
++ i2c_del_driver(&mt9v111_i2c_driver);
++
++ gpio_sensor_inactive();
++}
++
++module_init(mt9v111_init);
++module_exit(mt9v111_clean);
++
++/* Exported symbols for modules. */
++EXPORT_SYMBOL(camera_sensor_if);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("Mt9v111 Camera Driver");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mt9v111.h linux-2.6.28-karo/drivers/media/video/mxc/capture/mt9v111.h
+--- linux-2.6.28/drivers/media/video/mxc/capture/mt9v111.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mt9v111.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,435 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @defgroup Camera Sensor Drivers
++ */
++
++/*!
++ * @file mt9v111.h
++ *
++ * @brief MT9V111 Camera Header file
++ *
++ * It include all the defines for bitmaps operations, also two main structure
++ * one for IFP interface structure, other for sensor core registers.
++ *
++ * @ingroup Camera
++ */
++
++#ifndef MT9V111_H_
++#define MT9V111_H_
++
++/*!
++ * mt9v111 CHIP VERSION
++ */
++#define MT9V111_CHIP_VERSION 0x823A
++
++/*!
++ * mt9v111 IFP REGISTER BANK MAP
++ */
++#define MT9V111I_ADDR_SPACE_SEL 0x1
++#define MT9V111I_BASE_MAXTRIX_SIGN 0x2
++#define MT9V111I_BASE_MAXTRIX_SCALE15 0x3
++#define MT9V111I_BASE_MAXTRIX_SCALE69 0x4
++#define MT9V111I_APERTURE_GAIN 0x5
++#define MT9V111I_MODE_CONTROL 0x6
++#define MT9V111I_SOFT_RESET 0x7
++#define MT9V111I_FORMAT_CONTROL 0x8
++#define MT9V111I_BASE_MATRIX_CFK1 0x9
++#define MT9V111I_BASE_MATRIX_CFK2 0xa
++#define MT9V111I_BASE_MATRIX_CFK3 0xb
++#define MT9V111I_BASE_MATRIX_CFK4 0xc
++#define MT9V111I_BASE_MATRIX_CFK5 0xd
++#define MT9V111I_BASE_MATRIX_CFK6 0xe
++#define MT9V111I_BASE_MATRIX_CFK7 0xf
++#define MT9V111I_BASE_MATRIX_CFK8 0x10
++#define MT9V111I_BASE_MATRIX_CFK9 0x11
++#define MT9V111I_AWB_POSITION 0x12
++#define MT9V111I_AWB_RED_GAIN 0x13
++#define MT9V111I_AWB_BLUE_GAIN 0x14
++#define MT9V111I_DELTA_MATRIX_CF_SIGN 0x15
++#define MT9V111I_DELTA_MATRIX_CF_D1 0x16
++#define MT9V111I_DELTA_MATRIX_CF_D2 0x17
++#define MT9V111I_DELTA_MATRIX_CF_D3 0x18
++#define MT9V111I_DELTA_MATRIX_CF_D4 0x19
++#define MT9V111I_DELTA_MATRIX_CF_D5 0x1a
++#define MT9V111I_DELTA_MATRIX_CF_D6 0x1b
++#define MT9V111I_DELTA_MATRIX_CF_D7 0x1c
++#define MT9V111I_DELTA_MATRIX_CF_D8 0x1d
++#define MT9V111I_DELTA_MATRIX_CF_D9 0x1e
++#define MT9V111I_LUMINANCE_LIMIT_WB 0x20
++#define MT9V111I_RBG_MANUUAL_WB 0x21
++#define MT9V111I_AWB_RED_LIMIT 0x22
++#define MT9V111I_AWB_BLUE_LIMIT 0x23
++#define MT9V111I_MATRIX_ADJUST_LIMIT 0x24
++#define MT9V111I_AWB_SPEED 0x25
++#define MT9V111I_H_BOUND_AE 0x26
++#define MT9V111I_V_BOUND_AE 0x27
++#define MT9V111I_H_BOUND_AE_CEN_WIN 0x2b
++#define MT9V111I_V_BOUND_AE_CEN_WIN 0x2c
++#define MT9V111I_BOUND_AWB_WIN 0x2d
++#define MT9V111I_AE_PRECISION_TARGET 0x2e
++#define MT9V111I_AE_SPEED 0x2f
++#define MT9V111I_RED_AWB_MEASURE 0x30
++#define MT9V111I_LUMA_AWB_MEASURE 0x31
++#define MT9V111I_BLUE_AWB_MEASURE 0x32
++#define MT9V111I_LIMIT_SHARP_SATU_CTRL 0x33
++#define MT9V111I_LUMA_OFFSET 0x34
++#define MT9V111I_CLIP_LIMIT_OUTPUT_LUMI 0x35
++#define MT9V111I_GAIN_LIMIT_AE 0x36
++#define MT9V111I_SHUTTER_WIDTH_LIMIT_AE 0x37
++#define MT9V111I_UPPER_SHUTTER_DELAY_LIM 0x39
++#define MT9V111I_OUTPUT_FORMAT_CTRL2 0x3a
++#define MT9V111I_IPF_BLACK_LEVEL_SUB 0x3b
++#define MT9V111I_IPF_BLACK_LEVEL_ADD 0x3c
++#define MT9V111I_ADC_LIMIT_AE_ADJ 0x3d
++#define MT9V111I_GAIN_THRE_CCAM_ADJ 0x3e
++#define MT9V111I_LINEAR_AE 0x3f
++#define MT9V111I_THRESHOLD_EDGE_DEFECT 0x47
++#define MT9V111I_LUMA_SUM_MEASURE 0x4c
++#define MT9V111I_TIME_ADV_SUM_LUMA 0x4d
++#define MT9V111I_MOTION 0x52
++#define MT9V111I_GAMMA_KNEE_Y12 0x53
++#define MT9V111I_GAMMA_KNEE_Y34 0x54
++#define MT9V111I_GAMMA_KNEE_Y56 0x55
++#define MT9V111I_GAMMA_KNEE_Y78 0x56
++#define MT9V111I_GAMMA_KNEE_Y90 0x57
++#define MT9V111I_GAMMA_VALUE_Y0 0x58
++#define MT9V111I_SHUTTER_60 0x59
++#define MT9V111I_FLICKER_CONTROL 0x5B
++#define MT9V111I_SEARCH_FLICK_60 0x5c
++#define MT9V111I_RATIO_IMAGE_GAIN_BASE 0x5e
++#define MT9V111I_RATIO_IMAGE_GAIN_DELTA 0x5f
++#define MT9V111I_SIGN_VALUE_REG5F 0x60
++#define MT9V111I_AE_GAIN 0x62
++#define MT9V111I_MAX_GAIN_AE 0x67
++#define MT9V111I_LENS_CORRECT_CTRL 0x80
++#define MT9V111I_SHADING_PARAMETER1 0x81
++#define MT9V111I_SHADING_PARAMETER2 0x82
++#define MT9V111I_SHADING_PARAMETER3 0x83
++#define MT9V111I_SHADING_PARAMETER4 0x84
++#define MT9V111I_SHADING_PARAMETER5 0x85
++#define MT9V111I_SHADING_PARAMETER6 0x86
++#define MT9V111I_SHADING_PARAMETER7 0x87
++#define MT9V111I_SHADING_PARAMETER8 0x88
++#define MT9V111I_SHADING_PARAMETER9 0x89
++#define MT9V111I_SHADING_PARAMETER10 0x8A
++#define MT9V111I_SHADING_PARAMETER11 0x8B
++#define MT9V111I_SHADING_PARAMETER12 0x8C
++#define MT9V111I_SHADING_PARAMETER13 0x8D
++#define MT9V111I_SHADING_PARAMETER14 0x8E
++#define MT9V111I_SHADING_PARAMETER15 0x8F
++#define MT9V111I_SHADING_PARAMETER16 0x90
++#define MT9V111I_SHADING_PARAMETER17 0x91
++#define MT9V111I_SHADING_PARAMETER18 0x92
++#define MT9V111I_SHADING_PARAMETER19 0x93
++#define MT9V111I_SHADING_PARAMETER20 0x94
++#define MT9V111I_SHADING_PARAMETER21 0x95
++#define MT9V111i_FLASH_CTRL 0x98
++#define MT9V111i_LINE_COUNTER 0x99
++#define MT9V111i_FRAME_COUNTER 0x9A
++#define MT9V111i_H_PAN 0xA5
++#define MT9V111i_H_ZOOM 0xA6
++#define MT9V111i_H_SIZE 0xA7
++#define MT9V111i_V_PAN 0xA8
++#define MT9V111i_V_ZOOM 0xA9
++#define MT9V111i_V_SIZE 0xAA
++
++#define MT9V111I_SEL_IFP 0x1
++#define MT9V111I_SEL_SCA 0x4
++#define MT9V111I_FC_RGB_OR_YUV 0x1000
++
++/*!
++ * Mt9v111 SENSOR CORE REGISTER BANK MAP
++ */
++#define MT9V111S_ADDR_SPACE_SEL 0x1
++#define MT9V111S_COLUMN_START 0x2
++#define MT9V111S_WIN_HEIGHT 0x3
++#define MT9V111S_WIN_WIDTH 0x4
++#define MT9V111S_HOR_BLANKING 0x5
++#define MT9V111S_VER_BLANKING 0x6
++#define MT9V111S_OUTPUT_CTRL 0x7
++#define MT9V111S_ROW_START 0x8
++#define MT9V111S_SHUTTER_WIDTH 0x9
++#define MT9V111S_PIXEL_CLOCK_SPEED 0xa
++#define MT9V111S_RESTART 0xb
++#define MT9V111S_SHUTTER_DELAY 0xc
++#define MT9V111S_RESET 0xd
++#define MT9V111S_COLUMN_START_IN_ZOOM 0x12
++#define MT9V111S_ROW_START_IN_ZOOM 0x13
++#define MT9V111S_DIGITAL_ZOOM 0x1e
++#define MT9V111S_READ_MODE 0x20
++#define MT9V111S_DAC_CTRL 0x27
++#define MT9V111S_GREEN1_GAIN 0x2b
++#define MT9V111S_BLUE_GAIN 0x2c
++#define MT9V111S_READ_GAIN 0x2d
++#define MT9V111S_GREEN2_GAIN 0x2e
++#define MT9V111S_ROW_NOISE_CTRL 0x30
++#define MT9V111S_DARK_TARGET_W 0x31
++#define MT9V111S_TEST_DATA 0x32
++#define MT9V111S_GLOBAL_GAIN 0x35
++#define MT9V111S_SENSOR_CORE_VERSION 0x36
++#define MT9V111S_DARK_TARGET_WO 0x37
++#define MT9V111S_VERF_DAC 0x41
++#define MT9V111S_VCM_VCL 0x42
++#define MT9V111S_DISABLE_BYPASS 0x58
++#define MT9V111S_CALIB_MEAN_TEST 0x59
++#define MT9V111S_DARK_G1_AVE 0x5B
++#define MT9V111S_DARK_G2_AVE 0x5C
++#define MT9V111S_DARK_R_AVE 0x5D
++#define MT9V111S_DARK_B_AVE 0x5E
++#define MT9V111S_CAL_THRESHOLD 0x5f
++#define MT9V111S_CAL_G1 0x60
++#define MT9V111S_CAL_G2 0x61
++#define MT9V111S_CAL_CTRL 0x62
++#define MT9V111S_CAL_R 0x63
++#define MT9V111S_CAL_B 0x64
++#define MT9V111S_CHIP_ENABLE 0xF1
++#define MT9V111S_CHIP_VERSION 0xFF
++
++// OUTPUT_CTRL
++#define MT9V111S_OUTCTRL_SYNC 0x1
++#define MT9V111S_OUTCTRL_CHIP_ENABLE 0x2
++#define MT9V111S_OUTCTRL_TEST_MODE 0x40
++
++// READ_MODE
++#define MT9V111S_RM_NOBADFRAME 0x1
++#define MT9V111S_RM_NODESTRUCT 0x2
++#define MT9V111S_RM_COLUMNSKIP 0x4
++#define MT9V111S_RM_ROWSKIP 0x8
++#define MT9V111S_RM_BOOSTEDRESET 0x1000
++#define MT9V111S_RM_COLUMN_LATE 0x10
++#define MT9V111S_RM_ROW_LATE 0x80
++#define MT9V111S_RM_RIGTH_TO_LEFT 0x4000
++#define MT9V111S_RM_BOTTOM_TO_TOP 0x8000
++
++/*! I2C Slave Address */
++#define MT9V111_I2C_ADDRESS 0x48
++
++/*!
++ * The image resolution enum for the mt9v111 sensor
++ */
++typedef enum {
++ MT9V111_OutputResolution_VGA = 0, /*!< VGA size */
++ MT9V111_OutputResolution_QVGA, /*!< QVGA size */
++ MT9V111_OutputResolution_CIF, /*!< CIF size */
++ MT9V111_OutputResolution_QCIF, /*!< QCIF size */
++ MT9V111_OutputResolution_QQVGA, /*!< QQVGA size */
++ MT9V111_OutputResolution_SXGA /*!< SXGA size */
++} MT9V111_OutputResolution;
++
++enum {
++ MT9V111_WINWIDTH = 0x287,
++ MT9V111_WINWIDTH_DEFAULT = 0x287,
++ MT9V111_WINWIDTH_MIN = 0x9,
++
++ MT9V111_WINHEIGHT = 0x1E7,
++ MT9V111_WINHEIGHT_DEFAULT = 0x1E7,
++
++ MT9V111_HORZBLANK_DEFAULT = 0x26,
++ MT9V111_HORZBLANK_MIN = 0x9,
++ MT9V111_HORZBLANK_MAX = 0x3FF,
++
++ MT9V111_VERTBLANK_DEFAULT = 0x4,
++ MT9V111_VERTBLANK_MIN = 0x3,
++ MT9V111_VERTBLANK_MAX = 0xFFF,
++};
++
++/*!
++ * Mt9v111 Core Register structure.
++ */
++typedef struct {
++ u32 addressSelect; /*!< select address bank for Core Register 0x4 */
++ u32 columnStart; /*!< Starting Column */
++ u32 windowHeight; /*!< Window Height */
++ u32 windowWidth; /*!< Window Width */
++ u32 horizontalBlanking; /*!< Horizontal Blank time, in pixels */
++ u32 verticalBlanking; /*!< Vertical Blank time, in pixels */
++ u32 outputControl; /*!< Register to control sensor output */
++ u32 rowStart; /*!< Starting Row */
++ u32 shutterWidth;
++ u32 pixelClockSpeed; /*!< pixel date rate */
++ u32 restart; /*!< Abandon the readout of current frame */
++ u32 shutterDelay;
++ u32 reset; /*!< reset the sensor to the default mode */
++ u32 zoomColStart; /*!< Column start in the Zoom mode */
++ u32 zomRowStart; /*!< Row start in the Zoom mode */
++ u32 digitalZoom; /*!< 1 means zoom by 2 */
++ u32 readMode; /*!< Readmode: aspects of the readout of the sensor */
++ u32 dACStandbyControl;
++ u32 green1Gain; /*!< Gain Settings */
++ u32 blueGain;
++ u32 redGain;
++ u32 green2Gain;
++ u32 rowNoiseControl;
++ u32 darkTargetwNC;
++ u32 testData; /*!< test mode */
++ u32 globalGain;
++ u32 chipVersion;
++ u32 darkTargetwoNC;
++ u32 vREFDACs;
++ u32 vCMandVCL;
++ u32 disableBypass;
++ u32 calibMeanTest;
++ u32 darkG1average;
++ u32 darkG2average;
++ u32 darkRaverage;
++ u32 darkBaverage;
++ u32 calibThreshold;
++ u32 calibGreen1;
++ u32 calibGreen2;
++ u32 calibControl;
++ u32 calibRed;
++ u32 calibBlue;
++ u32 chipEnable; /*!< Image core Registers written by image flow processor */
++} mt9v111_coreReg;
++
++/*!
++ * Mt9v111 IFP Register structure.
++ */
++typedef struct {
++ u32 addrSpaceSel; /*!< select address bank for Core Register 0x1 */
++ u32 baseMaxtrixSign; /*!< sign of coefficient for base color correction matrix */
++ u32 baseMaxtrixScale15; /*!< scaling of color correction coefficient K1-5 */
++ u32 baseMaxtrixScale69; /*!< scaling of color correction coefficient K6-9 */
++ u32 apertureGain; /*!< sharpening */
++ u32 modeControl; /*!< bit 7 CCIR656 sync codes are embedded in the image */
++ u32 softReset; /*!< Image processing mode: 1 reset mode, 0 operational mode */
++ u32 formatControl; /*!< bit12 1 for RGB565, 0 for YcrCb */
++ u32 baseMatrixCfk1; /*!< K1 Color correction coefficient */
++ u32 baseMatrixCfk2; /*!< K2 Color correction coefficient */
++ u32 baseMatrixCfk3; /*!< K3 Color correction coefficient */
++ u32 baseMatrixCfk4; /*!< K4 Color correction coefficient */
++ u32 baseMatrixCfk5; /*!< K5 Color correction coefficient */
++ u32 baseMatrixCfk6; /*!< K6 Color correction coefficient */
++ u32 baseMatrixCfk7; /*!< K7 Color correction coefficient */
++ u32 baseMatrixCfk8; /*!< K8 Color correction coefficient */
++ u32 baseMatrixCfk9; /*!< K9 Color correction coefficient */
++ u32 awbPosition; /*!< Current position of AWB color correction matrix */
++ u32 awbRedGain; /*!< Current value of AWB red channel gain */
++ u32 awbBlueGain; /*!< Current value of AWB blue channel gain */
++ u32 deltaMatrixCFSign; /*!< Sign of coefficients of delta color correction matrix register */
++ u32 deltaMatrixCFD1; /*!< D1 Delta coefficient */
++ u32 deltaMatrixCFD2; /*!< D2 Delta coefficient */
++ u32 deltaMatrixCFD3; /*!< D3 Delta coefficient */
++ u32 deltaMatrixCFD4; /*!< D4 Delta coefficient */
++ u32 deltaMatrixCFD5; /*!< D5 Delta coefficient */
++ u32 deltaMatrixCFD6; /*!< D6 Delta coefficient */
++ u32 deltaMatrixCFD7; /*!< D7 Delta coefficient */
++ u32 deltaMatrixCFD8; /*!< D8 Delta coefficient */
++ u32 deltaMatrixCFD9; /*!< D9 Delta coefficient */
++ u32 lumLimitWB; /*!< Luminance range of pixels considered in WB statistics */
++ u32 RBGManualWB; /*!< Red and Blue color channel gains for manual white balance */
++ u32 awbRedLimit; /*!< Limits on Red channel gain adjustment through AWB */
++ u32 awbBlueLimit; /*!< Limits on Blue channel gain adjustment through AWB */
++ u32 matrixAdjLimit; /*!< Limits on color correction matrix adjustment through AWB */
++ u32 awbSpeed; /*!< AWB speed and color saturation control */
++ u32 HBoundAE; /*!< Horizontal boundaries of AWB measurement window */
++ u32 VBoundAE; /*!< Vertical boundaries of AWB measurement window */
++ u32 HBoundAECenWin; /*!< Horizontal boundaries of AE measurement window for backlight compensation */
++ u32 VBoundAECenWin; /*!< Vertical boundaries of AE measurement window for backlight compensation */
++ u32 boundAwbWin; /*!< Boundaries of AWB measurement window */
++ u32 AEPrecisionTarget; /*!< Auto exposure target and precision control */
++ u32 AESpeed; /*!< AE speed and sensitivity control register */
++ u32 redAWBMeasure; /*!< Measure of the red channel value used by AWB */
++ u32 lumaAWBMeasure; /*!< Measure of the luminance channel value used by AWB */
++ u32 blueAWBMeasure; /*!< Measure of the blue channel value used by AWB */
++ u32 limitSharpSatuCtrl; /*!< Automatic control of sharpness and color saturation */
++ u32 lumaOffset; /*!< Luminance offset control (brightness control) */
++ u32 clipLimitOutputLumi; /*!< Clipping limits for output luminance */
++ u32 gainLimitAE; /*!< Imager gain limits for AE adjustment */
++ u32 shutterWidthLimitAE; /*!< Shutter width (exposure time) limits for AE adjustment */
++ u32 upperShutterDelayLi; /*!< Upper Shutter Delay Limit */
++ u32 outputFormatCtrl2; /*!< Output Format Control 2
++ 00 = 16-bit RGB565.
++ 01 = 15-bit RGB555.
++ 10 = 12-bit RGB444x.
++ 11 = 12-bit RGBx444. */
++ u32 ipfBlackLevelSub; /*!< IFP black level subtraction */
++ u32 ipfBlackLevelAdd; /*!< IFP black level addition */
++ u32 adcLimitAEAdj; /*!< ADC limits for AE adjustment */
++ u32 agimnThreCamAdj; /*!< Gain threshold for CCM adjustment */
++ u32 linearAE;
++ u32 thresholdEdgeDefect; /*!< Edge threshold for interpolation and defect correction */
++ u32 lumaSumMeasure; /*!< Luma measured by AE engine */
++ u32 timeAdvSumLuma; /*!< Time-averaged luminance value tracked by auto exposure */
++ u32 motion; /*!< 1 when motion is detected */
++ u32 gammaKneeY12; /*!< Gamma knee points Y1 and Y2 */
++ u32 gammaKneeY34; /*!< Gamma knee points Y3 and Y4 */
++ u32 gammaKneeY56; /*!< Gamma knee points Y5 and Y6 */
++ u32 gammaKneeY78; /*!< Gamma knee points Y7 and Y8 */
++ u32 gammaKneeY90; /*!< Gamma knee points Y9 and Y10 */
++ u32 gammaKneeY0; /*!< Gamma knee point Y0 */
++ u32 shutter_width_60;
++ u32 flickerCtrl;
++ u32 search_flicker_60;
++ u32 ratioImageGainBase;
++ u32 ratioImageGainDelta;
++ u32 signValueReg5F;
++ u32 aeGain;
++ u32 maxGainAE;
++ u32 lensCorrectCtrl;
++ u32 shadingParameter1; /*!< Shade Parameters */
++ u32 shadingParameter2;
++ u32 shadingParameter3;
++ u32 shadingParameter4;
++ u32 shadingParameter5;
++ u32 shadingParameter6;
++ u32 shadingParameter7;
++ u32 shadingParameter8;
++ u32 shadingParameter9;
++ u32 shadingParameter10;
++ u32 shadingParameter11;
++ u32 shadingParameter12;
++ u32 shadingParameter13;
++ u32 shadingParameter14;
++ u32 shadingParameter15;
++ u32 shadingParameter16;
++ u32 shadingParameter17;
++ u32 shadingParameter18;
++ u32 shadingParameter19;
++ u32 shadingParameter20;
++ u32 shadingParameter21;
++ u32 flashCtrl; /*!< Flash control */
++ u32 lineCounter; /*!< Line counter */
++ u32 frameCounter; /*!< Frame counter */
++ u32 HPan; /*!< Horizontal pan in decimation */
++ u32 HZoom; /*!< Horizontal zoom in decimation */
++ u32 HSize; /*!< Horizontal output size iIn decimation */
++ u32 VPan; /*!< Vertical pan in decimation */
++ u32 VZoom; /*!< Vertical zoom in decimation */
++ u32 VSize; /*!< Vertical output size in decimation */
++} mt9v111_IFPReg;
++
++/*!
++ * mt9v111 Config structure
++ */
++typedef struct {
++ mt9v111_coreReg *coreReg; /*!< Sensor Core Register Bank */
++ mt9v111_IFPReg *ifpReg; /*!< IFP Register Bank */
++} mt9v111_conf;
++
++typedef struct {
++ u8 index;
++ u16 width;
++ u16 height;
++} mt9v111_image_format;
++
++typedef struct {
++ u16 ae;
++ u16 awb;
++ u16 flicker;
++ u16 reserved;
++} mt9v111_ctrl_params;
++
++#endif // MT9V111_H_
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mx27_csi.c linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_csi.c
+--- linux-2.6.28/drivers/media/video/mxc/capture/mx27_csi.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_csi.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,332 @@
++/*
++ * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mx27_csi.c
++ *
++ * @brief CMOS Sensor interface functions
++ *
++ * @ingroup CSI
++ */
++#include <linux/types.h>
++#include <linux/init.h>
++#include <linux/device.h>
++#include <linux/err.h>
++#include <linux/interrupt.h>
++#include <linux/spinlock.h>
++#include <linux/delay.h>
++#include <linux/module.h>
++#include <linux/clk.h>
++#include <asm/arch/clock.h>
++#include <asm/arch/hardware.h>
++
++#include "mx27_csi.h"
++
++static csi_config_t g_csi_cfg; /* csi hardware configuration */
++static bool gcsi_mclk_on = false;
++static csi_irq_callback_t g_callback = 0;
++static void *g_callback_data = 0;
++static struct clk csi_mclk;
++
++static irqreturn_t csi_irq_handler(int irq, void *data)
++{
++ unsigned long status = __raw_readl(CSI_CSISR);
++
++ __raw_writel(status, CSI_CSISR);
++ if (g_callback)
++ g_callback(g_callback_data, status);
++
++ pr_debug("CSI status = 0x%08lX\n", status);
++
++ return IRQ_HANDLED;
++}
++
++static void csihw_set_config(csi_config_t * cfg)
++{
++ unsigned val = 0;
++
++ /* control reg 1 */
++ val |= cfg->swap16_en ? BIT_SWAP16_EN : 0;
++ val |= cfg->ext_vsync ? BIT_EXT_VSYNC : 0;
++ val |= cfg->eof_int_en ? BIT_EOF_INT_EN : 0;
++ val |= cfg->prp_if_en ? BIT_PRP_IF_EN : 0;
++ val |= cfg->ccir_mode ? BIT_CCIR_MODE : 0;
++ val |= cfg->cof_int_en ? BIT_COF_INT_EN : 0;
++ val |= cfg->sf_or_inten ? BIT_SF_OR_INTEN : 0;
++ val |= cfg->rf_or_inten ? BIT_RF_OR_INTEN : 0;
++ val |= cfg->statff_level << SHIFT_STATFF_LEVEL;
++ val |= cfg->staff_inten ? BIT_STATFF_INTEN : 0;
++ val |= cfg->rxff_level << SHIFT_RXFF_LEVEL;
++ val |= cfg->rxff_inten ? BIT_RXFF_INTEN : 0;
++ val |= cfg->sof_pol ? BIT_SOF_POL : 0;
++ val |= cfg->sof_inten ? BIT_SOF_INTEN : 0;
++ val |= cfg->mclkdiv << SHIFT_MCLKDIV;
++ val |= cfg->hsync_pol ? BIT_HSYNC_POL : 0;
++ val |= cfg->ccir_en ? BIT_CCIR_EN : 0;
++ val |= cfg->mclken ? BIT_MCLKEN : 0;
++ val |= cfg->fcc ? BIT_FCC : 0;
++ val |= cfg->pack_dir ? BIT_PACK_DIR : 0;
++ val |= cfg->gclk_mode ? BIT_GCLK_MODE : 0;
++ val |= cfg->inv_data ? BIT_INV_DATA : 0;
++ val |= cfg->inv_pclk ? BIT_INV_PCLK : 0;
++ val |= cfg->redge ? BIT_REDGE : 0;
++
++ __raw_writel(val, CSI_CSICR1);
++
++ /* control reg 3 */
++ val = 0x0;
++ val |= cfg->csi_sup ? BIT_CSI_SUP : 0;
++ val |= cfg->zero_pack_en ? BIT_ZERO_PACK_EN : 0;
++ val |= cfg->ecc_int_en ? BIT_ECC_INT_EN : 0;
++ val |= cfg->ecc_auto_en ? BIT_ECC_AUTO_EN : 0;
++
++ __raw_writel(val, CSI_CSICR3);
++
++ /* rxfifo counter */
++ __raw_writel(cfg->rxcnt, CSI_CSIRXCNT);
++
++ /* update global config */
++ memcpy(&g_csi_cfg, cfg, sizeof(csi_config_t));
++}
++
++static void csihw_reset_frame_count(void)
++{
++ __raw_writel(__raw_readl(CSI_CSICR3) | BIT_FRMCNT_RST, CSI_CSICR3);
++}
++
++static void csihw_reset(void)
++{
++ csihw_reset_frame_count();
++ __raw_writel(CSICR1_RESET_VAL, CSI_CSICR1);
++ __raw_writel(CSICR2_RESET_VAL, CSI_CSICR2);
++ __raw_writel(CSICR3_RESET_VAL, CSI_CSICR3);
++}
++
++/*!
++ * csi_init_interface
++ * Sets initial values for the CSI registers.
++ * The width and height of the sensor and the actual frame size will be
++ * set to the same values.
++ * @param width Sensor width
++ * @param height Sensor height
++ * @param pixel_fmt pixel format
++ * @param sig csi_signal_cfg_t
++ *
++ * @return 0 for success, -EINVAL for error
++ */
++int32_t csi_init_interface(uint16_t width, uint16_t height,
++ uint32_t pixel_fmt, csi_signal_cfg_t sig)
++{
++ csi_config_t cfg;
++
++ /* Set the CSI_SENS_CONF register remaining fields */
++ cfg.swap16_en = 1;
++ cfg.ext_vsync = sig.ext_vsync;
++ cfg.eof_int_en = 0;
++ cfg.prp_if_en = 1;
++ cfg.ccir_mode = 0;
++ cfg.cof_int_en = 0;
++ cfg.sf_or_inten = 0;
++ cfg.rf_or_inten = 0;
++ cfg.statff_level = 0;
++ cfg.staff_inten = 0;
++ cfg.rxff_level = 2;
++ cfg.rxff_inten = 0;
++ cfg.sof_pol = 1;
++ cfg.sof_inten = 0;
++ cfg.mclkdiv = 0;
++ cfg.hsync_pol = 1;
++ cfg.ccir_en = 0;
++ cfg.mclken = gcsi_mclk_on ? 1 : 0;
++ cfg.fcc = 1;
++ cfg.pack_dir = 0;
++ cfg.gclk_mode = 1;
++ cfg.inv_data = sig.data_pol;
++ cfg.inv_pclk = sig.pixclk_pol;
++ cfg.redge = 1;
++ cfg.csicnt1_rsv = 0;
++
++ /* control reg 3 */
++ cfg.frmcnt = 0;
++ cfg.frame_reset = 0;
++ cfg.csi_sup = 0;
++ cfg.zero_pack_en = 0;
++ cfg.ecc_int_en = 0;
++ cfg.ecc_auto_en = 0;
++
++ csihw_set_config(&cfg);
++
++ return 0;
++}
++
++/*!
++ * csi_enable_prpif
++ * Enable or disable CSI-PrP interface
++ * @param enable Non-zero to enable, zero to disable
++ */
++void csi_enable_prpif(uint32_t enable)
++{
++ if (enable) {
++ g_csi_cfg.prp_if_en = 1;
++ g_csi_cfg.sof_inten = 0;
++ g_csi_cfg.pack_dir = 0;
++ } else {
++ g_csi_cfg.prp_if_en = 0;
++ g_csi_cfg.sof_inten = 1;
++ g_csi_cfg.pack_dir = 1;
++ }
++
++ csihw_set_config(&g_csi_cfg);
++}
++
++/*!
++ * csi_enable_mclk
++ *
++ * @param src enum define which source to control the clk
++ * CSI_MCLK_VF CSI_MCLK_ENC CSI_MCLK_RAW CSI_MCLK_I2C
++ * @param flag true to enable mclk, false to disable mclk
++ * @param wait true to wait 100ms make clock stable, false not wait
++ *
++ * @return 0 for success
++ */
++int32_t csi_enable_mclk(int src, bool flag, bool wait)
++{
++ if (flag == true) {
++ clk_enable(&csi_mclk);
++ if (wait == true)
++ msleep(10);
++ pr_debug("Enable csi clock from source %d\n", src);
++ gcsi_mclk_on = true;
++ } else {
++ clk_disable(&csi_mclk);
++ pr_debug("Disable csi clock from source %d\n", src);
++ gcsi_mclk_on = false;
++ }
++
++ return 0;
++}
++
++/*!
++ * csi_read_mclk_flag
++ *
++ * @return gcsi_mclk_source
++ */
++int csi_read_mclk_flag(void)
++{
++ return 0;
++}
++
++void csi_set_callback(csi_irq_callback_t callback, void *data)
++{
++ g_callback = callback;
++ g_callback_data = data;
++}
++
++static void _mclk_recalc(struct clk *clk)
++{
++ u32 div;
++
++ div = (__raw_readl(CSI_CSICR1) & BIT_MCLKDIV) >> SHIFT_MCLKDIV;
++ div = (div + 1) * 2;
++
++ clk->rate = clk->parent->rate / div;
++}
++
++static unsigned long _mclk_round_rate(struct clk *clk, unsigned long rate)
++{
++ /* Keep CSI divider and change parent clock */
++ if (clk->parent->round_rate) {
++ return clk->parent->round_rate(clk->parent, rate * 2);
++ }
++ return 0;
++}
++
++static int _mclk_set_rate(struct clk *clk, unsigned long rate)
++{
++ int ret = -EINVAL;
++
++ /* Keep CSI divider and change parent clock */
++ if (clk->parent->set_rate) {
++ ret = clk->parent->set_rate(clk->parent, rate * 2);
++ if (ret == 0) {
++ clk->rate = clk->parent->rate / 2;
++ }
++ }
++
++ return ret;
++}
++
++static int _mclk_enable(struct clk *clk)
++{
++ __raw_writel(__raw_readl(CSI_CSICR1) | BIT_MCLKEN, CSI_CSICR1);
++ return 0;
++}
++
++static void _mclk_disable(struct clk *clk)
++{
++ __raw_writel(__raw_readl(CSI_CSICR1) & ~BIT_MCLKEN, CSI_CSICR1);
++}
++
++static struct clk csi_mclk = {
++ .name = "csi_clk",
++ .recalc = _mclk_recalc,
++ .round_rate = _mclk_round_rate,
++ .set_rate = _mclk_set_rate,
++ .enable = _mclk_enable,
++ .disable = _mclk_disable,
++};
++
++int32_t __init csi_init_module(void)
++{
++ int ret = 0;
++ struct clk *per_clk;
++
++ per_clk = clk_get(NULL, "csi_perclk");
++ if (IS_ERR(per_clk))
++ return PTR_ERR(per_clk);
++ clk_put(per_clk);
++ csi_mclk.parent = per_clk;
++ clk_register(&csi_mclk);
++ clk_enable(per_clk);
++ csi_mclk.recalc(&csi_mclk);
++
++ csihw_reset();
++
++ /* interrupt enable */
++ ret = request_irq(INT_CSI, csi_irq_handler, 0, "csi", 0);
++ if (ret)
++ pr_debug("CSI error: irq request fail\n");
++
++ return ret;
++}
++
++void __exit csi_cleanup_module(void)
++{
++ /* free irq */
++ free_irq(INT_CSI, 0);
++
++ clk_disable(&csi_mclk);
++}
++
++module_init(csi_init_module);
++module_exit(csi_cleanup_module);
++
++EXPORT_SYMBOL(csi_init_interface);
++EXPORT_SYMBOL(csi_enable_mclk);
++EXPORT_SYMBOL(csi_read_mclk_flag);
++EXPORT_SYMBOL(csi_set_callback);
++EXPORT_SYMBOL(csi_enable_prpif);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("MX27 CSI driver");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mx27_csi.h linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_csi.h
+--- linux-2.6.28/drivers/media/video/mxc/capture/mx27_csi.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_csi.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,165 @@
++/*
++ * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mx27_csi.h
++ *
++ * @brief CMOS Sensor interface functions
++ *
++ * @ingroup CSI
++ */
++
++#ifndef MX27_CSI_H
++#define MX27_CSI_H
++
++/* reset values */
++#define CSICR1_RESET_VAL 0x40000800
++#define CSICR2_RESET_VAL 0x0
++#define CSICR3_RESET_VAL 0x0
++
++/* csi control reg 1 */
++#define BIT_SWAP16_EN (0x1 << 31)
++#define BIT_EXT_VSYNC (0x1 << 30)
++#define BIT_EOF_INT_EN (0x1 << 29)
++#define BIT_PRP_IF_EN (0x1 << 28)
++#define BIT_CCIR_MODE (0x1 << 27)
++#define BIT_COF_INT_EN (0x1 << 26)
++#define BIT_SF_OR_INTEN (0x1 << 25)
++#define BIT_RF_OR_INTEN (0x1 << 24)
++#define BIT_STATFF_LEVEL (0x3 << 22)
++#define BIT_STATFF_INTEN (0x1 << 21)
++#define BIT_RXFF_LEVEL (0x3 << 19)
++#define BIT_RXFF_INTEN (0x1 << 18)
++#define BIT_SOF_POL (0x1 << 17)
++#define BIT_SOF_INTEN (0x1 << 16)
++#define BIT_MCLKDIV (0xF << 12)
++#define BIT_HSYNC_POL (0x1 << 11)
++#define BIT_CCIR_EN (0x1 << 10)
++#define BIT_MCLKEN (0x1 << 9)
++#define BIT_FCC (0x1 << 8)
++#define BIT_PACK_DIR (0x1 << 7)
++#define BIT_CLR_STATFIFO (0x1 << 6)
++#define BIT_CLR_RXFIFO (0x1 << 5)
++#define BIT_GCLK_MODE (0x1 << 4)
++#define BIT_INV_DATA (0x1 << 3)
++#define BIT_INV_PCLK (0x1 << 2)
++#define BIT_REDGE (0x1 << 1)
++
++#define SHIFT_STATFF_LEVEL 22
++#define SHIFT_RXFF_LEVEL 19
++#define SHIFT_MCLKDIV 12
++
++/* control reg 3 */
++#define BIT_FRMCNT (0xFFFF << 16)
++#define BIT_FRMCNT_RST (0x1 << 15)
++#define BIT_CSI_SUP (0x1 << 3)
++#define BIT_ZERO_PACK_EN (0x1 << 2)
++#define BIT_ECC_INT_EN (0x1 << 1)
++#define BIT_ECC_AUTO_EN (0x1)
++
++#define SHIFT_FRMCNT 16
++
++/* csi status reg */
++#define BIT_SFF_OR_INT (0x1 << 25)
++#define BIT_RFF_OR_INT (0x1 << 24)
++#define BIT_STATFF_INT (0x1 << 21)
++#define BIT_RXFF_INT (0x1 << 18)
++#define BIT_EOF_INT (0x1 << 17)
++#define BIT_SOF_INT (0x1 << 16)
++#define BIT_F2_INT (0x1 << 15)
++#define BIT_F1_INT (0x1 << 14)
++#define BIT_COF_INT (0x1 << 13)
++#define BIT_ECC_INT (0x1 << 1)
++#define BIT_DRDY (0x1 << 0)
++
++#define CSI_MCLK_VF 1
++#define CSI_MCLK_ENC 2
++#define CSI_MCLK_RAW 4
++#define CSI_MCLK_I2C 8
++
++#define CSI_CSICR1 (IO_ADDRESS(CSI_BASE_ADDR))
++#define CSI_CSICR2 (IO_ADDRESS(CSI_BASE_ADDR + 0x4))
++#define CSI_CSISR (IO_ADDRESS(CSI_BASE_ADDR + 0x8))
++#define CSI_STATFIFO (IO_ADDRESS(CSI_BASE_ADDR + 0xC))
++#define CSI_CSIRXFIFO (IO_ADDRESS(CSI_BASE_ADDR + 0x10))
++#define CSI_CSIRXCNT (IO_ADDRESS(CSI_BASE_ADDR + 0x14))
++#define CSI_CSICR3 (IO_ADDRESS(CSI_BASE_ADDR + 0x1C))
++
++#define CSI_CSIRXFIFO_PHYADDR (CSI_BASE_ADDR + 0x10)
++
++static __inline void csi_clear_status(unsigned long status)
++{
++ __raw_writel(status, CSI_CSISR);
++}
++
++typedef struct {
++ unsigned data_width:3;
++ unsigned clk_mode:2;
++ unsigned ext_vsync:1;
++ unsigned Vsync_pol:1;
++ unsigned Hsync_pol:1;
++ unsigned pixclk_pol:1;
++ unsigned data_pol:1;
++ unsigned sens_clksrc:1;
++} csi_signal_cfg_t;
++
++typedef struct {
++ /* control reg 1 */
++ unsigned int swap16_en:1;
++ unsigned int ext_vsync:1;
++ unsigned int eof_int_en:1;
++ unsigned int prp_if_en:1;
++ unsigned int ccir_mode:1;
++ unsigned int cof_int_en:1;
++ unsigned int sf_or_inten:1;
++ unsigned int rf_or_inten:1;
++ unsigned int statff_level:2;
++ unsigned int staff_inten:1;
++ unsigned int rxff_level:2;
++ unsigned int rxff_inten:1;
++ unsigned int sof_pol:1;
++ unsigned int sof_inten:1;
++ unsigned int mclkdiv:4;
++ unsigned int hsync_pol:1;
++ unsigned int ccir_en:1;
++ unsigned int mclken:1;
++ unsigned int fcc:1;
++ unsigned int pack_dir:1;
++ unsigned int gclk_mode:1;
++ unsigned int inv_data:1;
++ unsigned int inv_pclk:1;
++ unsigned int redge:1;
++ unsigned int csicnt1_rsv:1;
++
++ /* control reg 3 */
++ unsigned int frmcnt:16;
++ unsigned int frame_reset:1;
++ unsigned int csi_sup:1;
++ unsigned int zero_pack_en:1;
++ unsigned int ecc_int_en:1;
++ unsigned int ecc_auto_en:1;
++
++ /* fifo counter */
++ unsigned int rxcnt;
++} csi_config_t;
++
++typedef void (*csi_irq_callback_t) (void *data, unsigned long status);
++
++int32_t csi_enable_mclk(int src, bool flag, bool wait);
++int32_t csi_init_interface(uint16_t width, uint16_t height,
++ uint32_t pixel_fmt, csi_signal_cfg_t sig);
++int csi_read_mclk_flag(void);
++void csi_set_callback(csi_irq_callback_t callback, void *data);
++void csi_enable_prpif(uint32_t enable);
++
++#endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mx27_prp.h linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_prp.h
+--- linux-2.6.28/drivers/media/video/mxc/capture/mx27_prp.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_prp.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,308 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mx27_prp.h
++ *
++ * @brief Header file for MX27 V4L2 capture driver
++ *
++ * @ingroup MXC_V4L2_CAPTURE
++ */
++#ifndef __MX27_PRP_H__
++#define __MX27_PRP_H__
++
++#define PRP_REG(ofs) (IO_ADDRESS(EMMA_BASE_ADDR) + ofs)
++
++/* Register definitions of PrP */
++#define PRP_CNTL PRP_REG(0x00)
++#define PRP_INTRCNTL PRP_REG(0x04)
++#define PRP_INTRSTATUS PRP_REG(0x08)
++#define PRP_SOURCE_Y_PTR PRP_REG(0x0C)
++#define PRP_SOURCE_CB_PTR PRP_REG(0x10)
++#define PRP_SOURCE_CR_PTR PRP_REG(0x14)
++#define PRP_DEST_RGB1_PTR PRP_REG(0x18)
++#define PRP_DEST_RGB2_PTR PRP_REG(0x1C)
++#define PRP_DEST_Y_PTR PRP_REG(0x20)
++#define PRP_DEST_CB_PTR PRP_REG(0x24)
++#define PRP_DEST_CR_PTR PRP_REG(0x28)
++#define PRP_SOURCE_FRAME_SIZE PRP_REG(0x2C)
++#define PRP_CH1_LINE_STRIDE PRP_REG(0x30)
++#define PRP_SRC_PIXEL_FORMAT_CNTL PRP_REG(0x34)
++#define PRP_CH1_PIXEL_FORMAT_CNTL PRP_REG(0x38)
++#define PRP_CH1_OUT_IMAGE_SIZE PRP_REG(0x3C)
++#define PRP_CH2_OUT_IMAGE_SIZE PRP_REG(0x40)
++#define PRP_SOURCE_LINE_STRIDE PRP_REG(0x44)
++#define PRP_CSC_COEF_012 PRP_REG(0x48)
++#define PRP_CSC_COEF_345 PRP_REG(0x4C)
++#define PRP_CSC_COEF_678 PRP_REG(0x50)
++#define PRP_CH1_RZ_HORI_COEF1 PRP_REG(0x54)
++#define PRP_CH1_RZ_HORI_COEF2 PRP_REG(0x58)
++#define PRP_CH1_RZ_HORI_VALID PRP_REG(0x5C)
++#define PRP_CH1_RZ_VERT_COEF1 PRP_REG(0x60)
++#define PRP_CH1_RZ_VERT_COEF2 PRP_REG(0x64)
++#define PRP_CH1_RZ_VERT_VALID PRP_REG(0x68)
++#define PRP_CH2_RZ_HORI_COEF1 PRP_REG(0x6C)
++#define PRP_CH2_RZ_HORI_COEF2 PRP_REG(0x70)
++#define PRP_CH2_RZ_HORI_VALID PRP_REG(0x74)
++#define PRP_CH2_RZ_VERT_COEF1 PRP_REG(0x78)
++#define PRP_CH2_RZ_VERT_COEF2 PRP_REG(0x7C)
++#define PRP_CH2_RZ_VERT_VALID PRP_REG(0x80)
++
++#define B_SET(b) (1 << (b))
++
++/* Bit definitions for PrP control register */
++#define PRP_CNTL_RSTVAL 0x28
++#define PRP_CNTL_CH1EN B_SET(0)
++#define PRP_CNTL_CH2EN B_SET(1)
++#define PRP_CNTL_CSI B_SET(2)
++#define PRP_CNTL_IN_32 B_SET(3)
++#define PRP_CNTL_IN_RGB B_SET(4)
++#define PRP_CNTL_IN_YUV420 0
++#define PRP_CNTL_IN_YUV422 PRP_CNTL_IN_32
++#define PRP_CNTL_IN_RGB16 PRP_CNTL_IN_RGB
++#define PRP_CNTL_IN_RGB32 (PRP_CNTL_IN_RGB | PRP_CNTL_IN_32)
++#define PRP_CNTL_CH1_RGB8 0
++#define PRP_CNTL_CH1_RGB16 B_SET(5)
++#define PRP_CNTL_CH1_RGB32 B_SET(6)
++#define PRP_CNTL_CH1_YUV422 (B_SET(5) | B_SET(6))
++#define PRP_CNTL_CH2_YUV420 0
++#define PRP_CNTL_CH2_YUV422 B_SET(7)
++#define PRP_CNTL_CH2_YUV444 B_SET(8)
++#define PRP_CNTL_CH1_LOOP B_SET(9)
++#define PRP_CNTL_CH2_LOOP B_SET(10)
++#define PRP_CNTL_AUTODROP B_SET(11)
++#define PRP_CNTL_RST B_SET(12)
++#define PRP_CNTL_CNTREN B_SET(13)
++#define PRP_CNTL_WINEN B_SET(14)
++#define PRP_CNTL_UNCHAIN B_SET(15)
++#define PRP_CNTL_IN_SKIP_NONE 0
++#define PRP_CNTL_IN_SKIP_1_2 B_SET(16)
++#define PRP_CNTL_IN_SKIP_1_3 B_SET(17)
++#define PRP_CNTL_IN_SKIP_2_3 (B_SET(16) | B_SET(17))
++#define PRP_CNTL_IN_SKIP_1_4 B_SET(18)
++#define PRP_CNTL_IN_SKIP_3_4 (B_SET(16) | B_SET(18))
++#define PRP_CNTL_IN_SKIP_2_5 (B_SET(17) | B_SET(18))
++#define PRP_CNTL_IN_SKIP_3_5 (B_SET(16) | B_SET(17) | B_SET(18))
++#define PRP_CNTL_CH1_SKIP_NONE 0
++#define PRP_CNTL_CH1_SKIP_1_2 B_SET(19)
++#define PRP_CNTL_CH1_SKIP_1_3 B_SET(20)
++#define PRP_CNTL_CH1_SKIP_2_3 (B_SET(19) | B_SET(20))
++#define PRP_CNTL_CH1_SKIP_1_4 B_SET(21)
++#define PRP_CNTL_CH1_SKIP_3_4 (B_SET(19) | B_SET(21))
++#define PRP_CNTL_CH1_SKIP_2_5 (B_SET(20) | B_SET(21))
++#define PRP_CNTL_CH1_SKIP_3_5 (B_SET(19) | B_SET(20) | B_SET(21))
++#define PRP_CNTL_CH2_SKIP_NONE 0
++#define PRP_CNTL_CH2_SKIP_1_2 B_SET(22)
++#define PRP_CNTL_CH2_SKIP_1_3 B_SET(23)
++#define PRP_CNTL_CH2_SKIP_2_3 (B_SET(22) | B_SET(23))
++#define PRP_CNTL_CH2_SKIP_1_4 B_SET(24)
++#define PRP_CNTL_CH2_SKIP_3_4 (B_SET(22) | B_SET(24))
++#define PRP_CNTL_CH2_SKIP_2_5 (B_SET(23) | B_SET(24))
++#define PRP_CNTL_CH2_SKIP_3_5 (B_SET(22) | B_SET(23) | B_SET(24))
++#define PRP_CNTL_FIFO_I128 0
++#define PRP_CNTL_FIFO_I96 B_SET(25)
++#define PRP_CNTL_FIFO_I64 B_SET(26)
++#define PRP_CNTL_FIFO_I32 (B_SET(25) | B_SET(26))
++#define PRP_CNTL_FIFO_O64 0
++#define PRP_CNTL_FIFO_O48 B_SET(27)
++#define PRP_CNTL_FIFO_O32 B_SET(28)
++#define PRP_CNTL_FIFO_O16 (B_SET(27) | B_SET(28))
++#define PRP_CNTL_CH2B1 B_SET(29)
++#define PRP_CNTL_CH2B2 B_SET(30)
++#define PRP_CNTL_CH2_FLOWEN B_SET(31)
++
++/* Bit definitions for PrP interrupt control register */
++#define PRP_INTRCNTL_RDERR B_SET(0)
++#define PRP_INTRCNTL_CH1WERR B_SET(1)
++#define PRP_INTRCNTL_CH2WERR B_SET(2)
++#define PRP_INTRCNTL_CH1FC B_SET(3)
++#define PRP_INTRCNTL_CH2FC B_SET(5)
++#define PRP_INTRCNTL_LBOVF B_SET(7)
++#define PRP_INTRCNTL_CH2OVF B_SET(8)
++
++/* Bit definitions for PrP interrupt status register */
++#define PRP_INTRSTAT_RDERR B_SET(0)
++#define PRP_INTRSTAT_CH1WERR B_SET(1)
++#define PRP_INTRSTAT_CH2WERR B_SET(2)
++#define PRP_INTRSTAT_CH2BUF2 B_SET(3)
++#define PRP_INTRSTAT_CH2BUF1 B_SET(4)
++#define PRP_INTRSTAT_CH1BUF2 B_SET(5)
++#define PRP_INTRSTAT_CH1BUF1 B_SET(6)
++#define PRP_INTRSTAT_LBOVF B_SET(7)
++#define PRP_INTRSTAT_CH2OVF B_SET(8)
++
++#define PRP_CHANNEL_1 0x1
++#define PRP_CHANNEL_2 0x2
++
++/* PRP-CSI config */
++#define PRP_CSI_EN 0x80
++#define PRP_CSI_LOOP (0x40 | PRP_CSI_EN)
++#define PRP_CSI_IRQ_FRM (0x08 | PRP_CSI_LOOP)
++#define PRP_CSI_IRQ_CH1ERR (0x10 | PRP_CSI_LOOP)
++#define PRP_CSI_IRQ_CH2ERR (0x20 | PRP_CSI_LOOP)
++#define PRP_CSI_IRQ_ALL (0x38 | PRP_CSI_LOOP)
++#define PRP_CSI_SKIP_NONE 0
++#define PRP_CSI_SKIP_1OF2 1
++#define PRP_CSI_SKIP_1OF3 2
++#define PRP_CSI_SKIP_2OF3 3
++#define PRP_CSI_SKIP_1OF4 4
++#define PRP_CSI_SKIP_3OF4 5
++#define PRP_CSI_SKIP_2OF5 6
++#define PRP_CSI_SKIP_4OF5 7
++
++#define PRP_PIXIN_RGB565 0x2CA00565
++#define PRP_PIXIN_RGB888 0x41000888
++#define PRP_PIXIN_YUV420 0
++#define PRP_PIXIN_YUYV 0x22000888
++#define PRP_PIXIN_YVYU 0x20100888
++#define PRP_PIXIN_UYVY 0x03080888
++#define PRP_PIXIN_VYUY 0x01180888
++#define PRP_PIXIN_YUV422 0x62080888
++
++#define PRP_PIX1_RGB332 0x14400322
++#define PRP_PIX1_RGB565 0x2CA00565
++#define PRP_PIX1_RGB888 0x41000888
++#define PRP_PIX1_YUYV 0x62000888
++#define PRP_PIX1_YVYU 0x60100888
++#define PRP_PIX1_UYVY 0x43080888
++#define PRP_PIX1_VYUY 0x41180888
++#define PRP_PIX1_UNUSED 0
++
++#define PRP_PIX2_YUV420 0
++#define PRP_PIX2_YUV422 1
++#define PRP_PIX2_YUV444 4
++#define PRP_PIX2_UNUSED 8
++
++#define PRP_ALGO_WIDTH_ANY 0
++#define PRP_ALGO_HEIGHT_ANY 0
++#define PRP_ALGO_WIDTH_BIL 1
++#define PRP_ALGO_WIDTH_AVG 2
++#define PRP_ALGO_HEIGHT_BIL 4
++#define PRP_ALGO_HEIGHT_AVG 8
++#define PRP_ALGO_BYPASS 0x10
++
++typedef struct _emma_prp_ratio {
++ unsigned short num;
++ unsigned short den;
++} emma_prp_ratio;
++
++/*
++ * The following definitions are for resizing. Definition values must not
++ * be changed otherwise decision logic will be wrong.
++ */
++#define BC_COEF 3
++#define MAX_TBL 20
++#define SZ_COEF (1 << BC_COEF)
++
++#define ALGO_AUTO 0
++#define ALGO_BIL 1
++#define ALGO_AVG 2
++
++typedef struct {
++ char tbl[20]; /* table entries */
++ char len; /* table length used */
++ char algo; /* ALGO_xxx */
++ char ratio[20]; /* ratios used */
++} scale_t;
++
++/*
++ * structure for prp scaling.
++ * algorithm - bilinear or averaging for each axis
++ * PRP_ALGO_WIDTH_x | PRP_ALGO_HEIGHT_x | PRP_ALGO_BYPASS
++ * PRP_ALGO_BYPASS - Ch1 will not use Ch2 scaling with this flag
++ */
++typedef struct _emma_prp_scale {
++ unsigned char algo;
++ emma_prp_ratio width;
++ emma_prp_ratio height;
++} emma_prp_scale;
++
++typedef struct emma_prp_cfg {
++ unsigned int in_pix; /* PRP_PIXIN_xxx */
++ unsigned short in_width; /* image width, 32 - 2044 */
++ unsigned short in_height; /* image height, 32 - 2044 */
++ unsigned char in_csi; /* PRP_CSI_SKIP_x | PRP_CSI_LOOP */
++ unsigned short in_line_stride; /* in_line_stride and in_line_skip */
++ unsigned short in_line_skip; /* allow cropping from CSI */
++ unsigned int in_ptr; /* bus address */
++ /*
++ * in_csc[9] = 1 -> Y-16
++ * if in_csc[1..9] == 0
++ * in_csc[0] represents YUV range 0-3 = A0,A1,B0,B1;
++ * else
++ * in_csc[0..9] represents either format
++ */
++ unsigned short in_csc[10];
++
++ unsigned char ch2_pix; /* PRP_PIX2_xxx */
++ emma_prp_scale ch2_scale; /* resizing paramters */
++ unsigned short ch2_width; /* 4-2044, 0 = scaled */
++ unsigned short ch2_height; /* 4-2044, 0 = scaled */
++ unsigned int ch2_ptr; /* bus addr */
++ unsigned int ch2_ptr2; /* bus addr for 2nd buf (loop mode) */
++ unsigned char ch2_csi; /* PRP_CSI_SKIP_x | PRP_CSI_LOOP */
++
++ unsigned int ch1_pix; /* PRP_PIX1_xxx */
++ emma_prp_scale ch1_scale; /* resizing parameters */
++ unsigned short ch1_width; /* 4-2044, 0 = scaled */
++ unsigned short ch1_height; /* 4-2044, 0 = scaled */
++ unsigned short ch1_stride; /* 4-4088, 0 = ch1_width */
++ unsigned int ch1_ptr; /* bus addr */
++ unsigned int ch1_ptr2; /* bus addr for 2nd buf (loop mode) */
++ unsigned char ch1_csi; /* PRP_CSI_SKIP_x | PRP_CSI_LOOP */
++
++ /*
++ * channel resizing coefficients
++ * scale[0] for channel 1 width
++ * scale[1] for channel 1 height
++ * scale[2] for channel 2 width
++ * scale[3] for channel 2 height
++ */
++ scale_t scale[4];
++} emma_prp_cfg;
++
++int prphw_reset(void);
++int prphw_enable(int channel);
++int prphw_disable(int channel);
++int prphw_inptr(emma_prp_cfg *);
++int prphw_ch1ptr(emma_prp_cfg *);
++int prphw_ch1ptr2(emma_prp_cfg *);
++int prphw_ch2ptr(emma_prp_cfg *);
++int prphw_ch2ptr2(emma_prp_cfg *);
++int prphw_cfg(emma_prp_cfg *);
++int prphw_isr(void);
++void prphw_init(void);
++void prphw_exit(void);
++
++/*
++ * scale out coefficient table
++ * din in scale numerator
++ * dout in scale denominator
++ * inv in pre-scale dimension
++ * vout in/out post-scale output dimension
++ * pout out post-scale internal dimension [opt]
++ * retry in retry times (round the output length) when need
++ */
++int prp_scale(scale_t * pscale, int din, int dout, int inv,
++ unsigned short *vout, unsigned short *pout, int ch);
++
++int prp_init(void *dev_id);
++void prp_exit(void *dev_id);
++int prp_enc_select(void *data);
++int prp_enc_deselect(void *data);
++int prp_vf_select(void *data);
++int prp_vf_deselect(void *data);
++int prp_still_select(void *data);
++int prp_still_deselect(void *data);
++
++#endif /* __MX27_PRP_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mx27_prphw.c linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_prphw.c
+--- linux-2.6.28/drivers/media/video/mxc/capture/mx27_prphw.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_prphw.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,1230 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mx27_prphw.c
++ *
++ * @brief MX27 Video For Linux 2 capture driver
++ *
++ * @ingroup MXC_V4L2_CAPTURE
++ */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/string.h>
++#include <linux/clk.h>
++#include <asm/io.h>
++#include <linux/delay.h>
++
++#include "mx27_prp.h"
++
++#define PRP_MIN_IN_WIDTH 32
++#define PRP_MAX_IN_WIDTH 2044
++#define PRP_MIN_IN_HEIGHT 32
++#define PRP_MAX_IN_HEIGHT 2044
++
++typedef struct _coeff_t {
++ unsigned long coeff[2];
++ unsigned long cntl;
++} coeff_t[2][2];
++
++static coeff_t *PRP_RSZ_COEFF = (coeff_t *) PRP_CH1_RZ_HORI_COEF1;
++
++static unsigned char scale_get(scale_t * t,
++ unsigned char *i, unsigned char *out);
++static int gcd(int x, int y);
++static int ratio(int x, int y, int *den);
++static int prp_scale_bilinear(scale_t * t, int coeff, int base, int nxt);
++static int prp_scale_ave(scale_t * t, unsigned char base);
++static int ave_scale(scale_t * t, int inv, int outv);
++static int scale(scale_t * t, int inv, int outv);
++
++/*!
++ * @param t table
++ * @param i table index
++ * @param out bilinear # input pixels to advance
++ * average whether result is ready for output
++ * @return coefficient
++*/
++static unsigned char scale_get(scale_t * t, unsigned char *i,
++ unsigned char *out)
++{
++ unsigned char c;
++
++ c = t->tbl[*i];
++ (*i)++;
++ *i %= t->len;
++
++ if (out) {
++ if (t->algo == ALGO_BIL) {
++ for ((*out) = 1;
++ (*i) && ((*i) < t->len) && !t->tbl[(*i)]; (*i)++) {
++ (*out)++;
++ }
++ if ((*i) == t->len)
++ (*i) = 0;
++ } else
++ *out = c >> BC_COEF;
++ }
++
++ c &= SZ_COEF - 1;
++
++ if (c == SZ_COEF - 1)
++ c = SZ_COEF;
++
++ return c;
++}
++
++/*!
++ * @brief Get maximum common divisor.
++ * @param x First input value
++ * @param y Second input value
++ * @return Maximum common divisor of x and y
++ */
++static int gcd(int x, int y)
++{
++ int k;
++
++ if (x < y) {
++ k = x;
++ x = y;
++ y = k;
++ }
++
++ while ((k = x % y)) {
++ x = y;
++ y = k;
++ }
++
++ return y;
++}
++
++/*!
++ * @brief Get ratio.
++ * @param x First input value
++ * @param y Second input value
++ * @param den Denominator of the ratio (corresponding to y)
++ * @return Numerator of the ratio (corresponding to x)
++ */
++static int ratio(int x, int y, int *den)
++{
++ int g;
++
++ if (!x || !y)
++ return 0;
++
++ g = gcd(x, y);
++ *den = y / g;
++
++ return x / g;
++}
++
++/*!
++ * @brief Build PrP coefficient entry based on bilinear algorithm
++ *
++ * @param t The pointer to scale_t structure
++ * @param coeff The weighting coefficient
++ * @param base The base of the coefficient
++ * @param nxt Number of pixels to be read
++ *
++ * @return The length of current coefficient table on success
++ * -1 on failure
++ */
++static int prp_scale_bilinear(scale_t * t, int coeff, int base, int nxt)
++{
++ int i;
++
++ if (t->len >= sizeof(t->tbl))
++ return -1;
++
++ coeff = ((coeff << BC_COEF) + (base >> 1)) / base;
++ if (coeff >= SZ_COEF - 1)
++ coeff--;
++
++ coeff |= SZ_COEF;
++ t->tbl[(int)t->len++] = (unsigned char)coeff;
++
++ for (i = 1; i < nxt; i++) {
++ if (t->len >= MAX_TBL)
++ return -1;
++
++ t->tbl[(int)t->len++] = 0;
++ }
++
++ return t->len;
++}
++
++#define _bary(name) static const unsigned char name[]
++
++_bary(c1) = {
++7};
++
++_bary(c2) = {
++4, 4};
++
++_bary(c3) = {
++2, 4, 2};
++
++_bary(c4) = {
++2, 2, 2, 2};
++
++_bary(c5) = {
++1, 2, 2, 2, 1};
++
++_bary(c6) = {
++1, 1, 2, 2, 1, 1};
++
++_bary(c7) = {
++1, 1, 1, 2, 1, 1, 1};
++
++_bary(c8) = {
++1, 1, 1, 1, 1, 1, 1, 1};
++
++_bary(c9) = {
++1, 1, 1, 1, 1, 1, 1, 1, 0};
++
++_bary(c10) = {
++0, 1, 1, 1, 1, 1, 1, 1, 1, 0};
++
++_bary(c11) = {
++0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0};
++
++_bary(c12) = {
++0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0};
++
++_bary(c13) = {
++0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0};
++
++_bary(c14) = {
++0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0};
++
++_bary(c15) = {
++0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0};
++
++_bary(c16) = {
++1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0};
++
++_bary(c17) = {
++0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0};
++
++_bary(c18) = {
++0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0};
++
++_bary(c19) = {
++0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0};
++
++_bary(c20) = {
++0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0};
++
++static const unsigned char *ave_coeff[] = {
++ c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
++ c11, c12, c13, c14, c15, c16, c17, c18, c19, c20
++};
++
++static const unsigned char coeftab[] = {
++ 1, 1,
++ 19, 20,
++ 18, 19,
++ 17, 18,
++ 16, 17,
++ 15, 16,
++ 14, 15,
++ 13, 14,
++ 12, 13,
++ 11, 12,
++ 10, 11,
++ 9, 10,
++ 17, 19,
++ 8, 9,
++ 15, 17,
++ 7, 8,
++ 13, 15,
++ 6, 7,
++ 17, 20,
++ 11, 13,
++ 16, 19,
++ 5, 6,
++ 14, 17,
++ 9, 11,
++ 13, 16,
++ 4, 5,
++ 15, 19,
++ 11, 14,
++ 7, 9,
++ 10, 13,
++ 13, 17,
++ 3, 4,
++ 14, 19,
++ 11, 15,
++ 8, 11,
++ 13, 18,
++ 5, 7,
++ 12, 17,
++ 7, 10,
++ 9, 13,
++ 11, 16,
++ 13, 19,
++ 2, 3,
++ 13, 20,
++ 11, 17,
++ 9, 14,
++ 7, 11,
++ 12, 19,
++ 5, 8,
++ 8, 13,
++ 11, 18,
++ 3, 5,
++ 10, 17,
++ 7, 12,
++ 11, 19,
++ 4, 7,
++ 9, 16,
++ 5, 9,
++ 11, 20,
++ 6, 11,
++ 7, 13,
++ 8, 15,
++ 9, 17,
++ 10, 19,
++ 1, 2,
++ 9, 19,
++ 8, 17,
++ 7, 15,
++ 6, 13,
++ 5, 11,
++ 9, 20,
++ 4, 9,
++ 7, 16,
++ 3, 7,
++ 8, 19,
++ 5, 12,
++ 7, 17,
++ 2, 5,
++ 7, 18,
++ 5, 13,
++ 3, 8,
++ 7, 19,
++ 4, 11,
++ 5, 14,
++ 6, 17,
++ 7, 20,
++ 1, 3,
++ 6, 19,
++ 5, 16,
++ 4, 13,
++ 3, 10,
++ 5, 17,
++ 2, 7,
++ 5, 18,
++ 3, 11,
++ 4, 15,
++ 5, 19,
++ 1, 4,
++ 4, 17,
++ 3, 13,
++ 2, 9,
++ 3, 14,
++ 4, 19,
++ 1, 5,
++ 3, 16,
++ 2, 11,
++ 3, 17,
++ 1, 6,
++ 3, 19,
++ 2, 13,
++ 3, 20,
++ 1, 7,
++ 2, 15,
++ 1, 8,
++ 2, 17,
++ 1, 9,
++ 2, 19,
++ 1, 10,
++ 1, 11,
++ 1, 12,
++ 1, 13,
++ 1, 14,
++ 1, 15,
++ 1, 16,
++ 1, 17,
++ 1, 18,
++ 1, 19,
++ 1, 20
++};
++
++/*!
++ * @brief Build PrP coefficient table based on average algorithm
++ *
++ * @param t The pointer to scale_t structure
++ * @param base The base of the coefficient
++ *
++ * @return The length of current coefficient table on success
++ * -1 on failure
++ */
++static int prp_scale_ave(scale_t * t, unsigned char base)
++{
++ if (t->len + base > sizeof(t->tbl))
++ return -1;
++
++ memcpy(&t->tbl[(int)t->len], ave_coeff[(int)base - 1], base);
++ t->len = (unsigned char)(t->len + base);
++ t->tbl[t->len - 1] |= SZ_COEF;
++
++ return t->len;
++}
++
++/*!
++ * @brief Build PrP coefficient table based on average algorithm
++ *
++ * @param t The pointer to scale_t structure
++ * @param inv Input resolution
++ * @param outv Output resolution
++ *
++ * @return The length of current coefficient table on success
++ * -1 on failure
++ */
++static int ave_scale(scale_t * t, int inv, int outv)
++{
++ int ratio_count;
++
++ ratio_count = 0;
++ if (outv != 1) {
++ unsigned char a[20];
++ int v;
++
++ /* split n:m into multiple n[i]:1 */
++ for (v = 0; v < outv; v++)
++ a[v] = (unsigned char)(inv / outv);
++
++ inv %= outv;
++ if (inv) {
++ /* find start of next layer */
++ v = (outv - inv) >> 1;
++ inv += v;
++ for (; v < inv; v++)
++ a[v]++;
++ }
++
++ for (v = 0; v < outv; v++) {
++ if (prp_scale_ave(t, a[v]) < 0)
++ return -1;
++
++ t->ratio[ratio_count] = a[v];
++ ratio_count++;
++ }
++ } else if (prp_scale_ave(t, inv) < 0) {
++ return -1;
++ } else {
++ t->ratio[ratio_count++] = (char)inv;
++ ratio_count++;
++ }
++
++ return t->len;
++}
++
++/*!
++ * @brief Build PrP coefficient table
++ *
++ * @param t The pointer to scale_t structure
++ * @param inv input resolution reduced ratio
++ * @param outv output resolution reduced ratio
++ *
++ * @return The length of current coefficient table on success
++ * -1 on failure
++ */
++static int scale(scale_t * t, int inv, int outv)
++{
++ int v; /* overflow counter */
++ int coeff, nxt; /* table output */
++
++ t->len = 0;
++ if (t->algo == ALGO_AUTO) {
++ /* automatic choice - bilinear for shrinking less than 2:1 */
++ t->algo = ((outv != inv) && ((2 * outv) > inv)) ?
++ ALGO_BIL : ALGO_AVG;
++ }
++
++ /* 1:1 resize must use averaging, bilinear will hang */
++ if ((inv == outv) && (t->algo == ALGO_BIL)) {
++ pr_debug("Warning: 1:1 resize must use averaging algo\n");
++ t->algo = ALGO_AVG;
++ }
++
++ memset(t->tbl, 0, sizeof(t->tbl));
++ if (t->algo == ALGO_BIL) {
++ t->ratio[0] = (char)inv;
++ t->ratio[1] = (char)outv;
++ } else
++ memset(t->ratio, 0, sizeof(t->ratio));
++
++ if (inv == outv) {
++ /* force scaling */
++ t->ratio[0] = 1;
++ if (t->algo == ALGO_BIL)
++ t->ratio[1] = 1;
++
++ return prp_scale_ave(t, 1);
++ }
++
++ if (inv < outv) {
++ pr_debug("Upscaling not supported %d:%d\n", inv, outv);
++ return -1;
++ }
++
++ if (t->algo != ALGO_BIL)
++ return ave_scale(t, inv, outv);
++
++ v = 0;
++ if (inv >= 2 * outv) {
++ /* downscale: >=2:1 bilinear approximation */
++ coeff = inv - 2 * outv;
++ v = 0;
++ nxt = 0;
++ do {
++ v += coeff;
++ nxt = 2;
++ while (v >= outv) {
++ v -= outv;
++ nxt++;
++ }
++
++ if (prp_scale_bilinear(t, 1, 2, nxt) < 0)
++ return -1;
++ } while (v);
++ } else {
++ /* downscale: bilinear */
++ int in_pos_inc = 2 * outv;
++ int out_pos = inv;
++ int out_pos_inc = 2 * inv;
++ int init_carry = inv - outv;
++ int carry = init_carry;
++
++ v = outv + in_pos_inc;
++ do {
++ coeff = v - out_pos;
++ out_pos += out_pos_inc;
++ carry += out_pos_inc;
++ for (nxt = 0; v < out_pos; nxt++) {
++ v += in_pos_inc;
++ carry -= in_pos_inc;
++ }
++ if (prp_scale_bilinear(t, coeff, in_pos_inc, nxt) < 0)
++ return -1;
++ } while (carry != init_carry);
++ }
++ return t->len;
++}
++
++/*!
++ * @brief Get approximate ratio
++ *
++ * @param pscale The pointer to scale_t structure which holdes
++ * coefficient tables
++ * @param mt Scale ratio numerator
++ * @param nt Scale ratio denominator
++ * @param *n denominator of approximate ratio
++ * @return numerator of approximate ratio
++ */
++
++static int approx_ratio(int mt, int nt, int *n)
++{
++ int index = sizeof(coeftab) / sizeof(coeftab[0]) / 2;
++ int left = 0;
++ int right = index - 1;
++ int nom, den;
++ while (index > 0) {
++ nom = coeftab[(((right + left) >> 1) << 1) + 1];
++ den = coeftab[(((right + left) >> 1) << 1)];
++ if ((nom * nt - mt * den) < 0) {
++ left = (right + left) >> 1;
++ } else {
++ right = (right + left) >> 1;
++ }
++ index = index >> 1;
++ }
++ *n = coeftab[left * 2];
++ nom = coeftab[left * 2 + 1];
++ return nom;
++}
++
++/*!
++ * @brief Build PrP coefficient table
++ *
++ * @param pscale The pointer to scale_t structure which holdes
++ * coefficient tables
++ * @param din Scale ratio numerator
++ * @param dout Scale ratio denominator
++ * @param inv Input resolution
++ * @param vout Output resolution
++ * @param pout Internal output resolution
++ * @param retry Retry times (round the output length) when need
++ *
++ * @return Zero on success, others on failure
++ */
++int prp_scale(scale_t * pscale, int din, int dout, int inv,
++ unsigned short *vout, unsigned short *pout, int ch)
++{
++ int num, new_num;
++ int den, new_den;
++ unsigned short outv;
++
++ /* auto-generation of values */
++ if (!(dout && din)) {
++ if (!*vout)
++ dout = din = 1;
++ else {
++ din = inv;
++ dout = *vout;
++ }
++ }
++
++ if (din < dout) {
++ pr_debug("Scale err, unsupported ratio %d : %d\n", din, dout);
++ return -1;
++ }
++
++ num = ratio(din, dout, &den);
++ if (!num) {
++ pr_debug("Scale err, unsupported ratio %d : %d\n", din, dout);
++ return -1;
++ }
++
++ if (num > MAX_TBL) {
++ if (num / den <= MAX_TBL) {
++ new_num = approx_ratio(num, den, &new_den);
++ num = new_num;
++ den = new_den;
++ } else if (ch == PRP_CHANNEL_2) {
++ pr_debug("Unsupported ch_2 resize ratio %d : %d\n", num,
++ den);
++ return -1;
++ } else if (num / den > MAX_TBL * MAX_TBL) {
++ pr_debug("Unsupported ch_1 resize ratio %d : %d\n", num,
++ den);
++ return -1;
++ }
++ }
++
++ if ((num > MAX_TBL * MAX_TBL) || scale(pscale, num, den) < 0) {
++ pr_debug("Scale err, unsupported ratio %d : %d\n", num, den);
++ return -1;
++ }
++
++ if (pscale->algo == ALGO_BIL) {
++ unsigned char i, j, k;
++
++ outv =
++ (unsigned short)(inv / pscale->ratio[0] * pscale->ratio[1]);
++ inv %= pscale->ratio[0];
++ for (i = j = 0; inv > 0; j++) {
++ unsigned char nxt;
++
++ k = scale_get(pscale, &i, &nxt);
++ if (inv == 1 && k < SZ_COEF) {
++ /* needs 2 pixels for this output */
++ break;
++ }
++ inv -= nxt;
++ }
++ outv = outv + j;
++ } else {
++ unsigned char i, tot;
++
++ for (tot = i = 0; pscale->ratio[i]; i++)
++ tot = tot + pscale->ratio[i];
++
++ outv = (unsigned short)(inv / tot) * i;
++ inv %= tot;
++ for (i = 0; inv > 0; i++, outv++)
++ inv -= pscale->ratio[i];
++ }
++
++ if (!(*vout) || ((*vout) > outv))
++ *vout = outv;
++
++ if (pout)
++ *pout = outv;
++
++ return 0;
++}
++
++/*!
++ * @brief Reset PrP block
++ */
++int prphw_reset(void)
++{
++ unsigned long val;
++ unsigned long flag;
++ int i;
++
++ flag = PRP_CNTL_RST;
++ val = PRP_CNTL_RSTVAL;
++
++ __raw_writel(flag, PRP_CNTL);
++
++ /* timeout */
++ for (i = 0; i < 1000; i++) {
++ if (!(__raw_readl(PRP_CNTL) & flag)) {
++ pr_debug("PrP reset over\n");
++ break;
++ }
++ msleep(1);
++ }
++
++ /* verify reset value */
++ if (__raw_readl(PRP_CNTL) != val) {
++ pr_info("PrP reset err, val = 0x%08X\n", __raw_readl(PRP_CNTL));
++ return -1;
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Enable PrP channel.
++ * @param channel Channel number to be enabled
++ * @return Zero on success, others on failure
++ */
++int prphw_enable(int channel)
++{
++ unsigned long val;
++
++ val = __raw_readl(PRP_CNTL);
++ if (channel & PRP_CHANNEL_1)
++ val |= PRP_CNTL_CH1EN;
++ if (channel & PRP_CHANNEL_2)
++ val |=
++ (PRP_CNTL_CH2EN | PRP_CNTL_CH2_FLOWEN | PRP_CNTL_AUTODROP);
++
++ __raw_writel(val, PRP_CNTL);
++
++ return 0;
++}
++
++/*!
++ * @brief Disable PrP channel.
++ * @param channel Channel number to be disable
++ * @return Zero on success, others on failure
++ */
++int prphw_disable(int channel)
++{
++ unsigned long val;
++
++ val = __raw_readl(PRP_CNTL);
++ if (channel & PRP_CHANNEL_1)
++ val &= ~PRP_CNTL_CH1EN;
++ if (channel & PRP_CHANNEL_2)
++ val &= ~(PRP_CNTL_CH2EN | PRP_CNTL_CH2_FLOWEN);
++
++ __raw_writel(val, PRP_CNTL);
++
++ return 0;
++}
++
++/*!
++ * @brief Set PrP input buffer address.
++ * @param cfg Pointer to PrP configuration parameter
++ * @return Zero on success, others on failure
++ */
++int prphw_inptr(emma_prp_cfg * cfg)
++{
++ if (cfg->in_csi & PRP_CSI_EN)
++ return -1;
++
++ __raw_writel(cfg->in_ptr, PRP_SOURCE_Y_PTR);
++ if (cfg->in_pix == PRP_PIXIN_YUV420) {
++ u32 size;
++
++ size = cfg->in_line_stride * cfg->in_height;
++ __raw_writel(cfg->in_ptr + size, PRP_SOURCE_CB_PTR);
++ __raw_writel(cfg->in_ptr + size + (size >> 2),
++ PRP_SOURCE_CR_PTR);
++ }
++ return 0;
++}
++
++/*!
++ * @brief Set PrP channel 1 output buffer 1 address.
++ * @param cfg Pointer to PrP configuration parameter
++ * @return Zero on success, others on failure
++ */
++int prphw_ch1ptr(emma_prp_cfg * cfg)
++{
++ if (cfg->ch1_pix == PRP_PIX1_UNUSED)
++ return -1;
++
++ __raw_writel(cfg->ch1_ptr, PRP_DEST_RGB1_PTR);
++
++ /* support double buffer in loop mode only */
++ if ((cfg->in_csi & PRP_CSI_LOOP) == PRP_CSI_LOOP) {
++ if (cfg->ch1_ptr2)
++ __raw_writel(cfg->ch1_ptr2, PRP_DEST_RGB2_PTR);
++ else
++ __raw_writel(cfg->ch1_ptr, PRP_DEST_RGB2_PTR);
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Set PrP channel 1 output buffer 2 address.
++ * @param cfg Pointer to PrP configuration parameter
++ * @return Zero on success, others on failure
++ */
++int prphw_ch1ptr2(emma_prp_cfg * cfg)
++{
++ if (cfg->ch1_pix == PRP_PIX1_UNUSED ||
++ (cfg->in_csi & PRP_CSI_LOOP) != PRP_CSI_LOOP)
++ return -1;
++
++ if (cfg->ch1_ptr2)
++ __raw_writel(cfg->ch1_ptr2, PRP_DEST_RGB2_PTR);
++ else
++ return -1;
++
++ return 0;
++}
++
++/*!
++ * @brief Set PrP channel 2 output buffer 1 address.
++ * @param cfg Pointer to PrP configuration parameter
++ * @return Zero on success, others on failure
++ */
++int prphw_ch2ptr(emma_prp_cfg * cfg)
++{
++ u32 size;
++
++ if (cfg->ch2_pix == PRP_PIX2_UNUSED)
++ return -1;
++
++ __raw_writel(cfg->ch2_ptr, PRP_DEST_Y_PTR);
++
++ if (cfg->ch2_pix == PRP_PIX2_YUV420) {
++ size = cfg->ch2_width * cfg->ch2_height;
++ __raw_writel(cfg->ch2_ptr + size, PRP_DEST_CB_PTR);
++ __raw_writel(cfg->ch2_ptr + size + (size >> 2),
++ PRP_DEST_CR_PTR);
++ }
++
++ __raw_writel(__raw_readl(PRP_CNTL) | PRP_CNTL_CH2B1, PRP_CNTL);
++ return 0;
++}
++
++/*!
++ * @brief Set PrP channel 2 output buffer 2 address.
++ * @param cfg Pointer to PrP configuration parameter
++ * @return Zero on success, others on failure
++ */
++int prphw_ch2ptr2(emma_prp_cfg * cfg)
++{
++ u32 size;
++
++ if (cfg->ch2_pix == PRP_PIX2_UNUSED ||
++ (cfg->in_csi & PRP_CSI_LOOP) != PRP_CSI_LOOP)
++ return -1;
++
++ __raw_writel(cfg->ch2_ptr2, PRP_SOURCE_Y_PTR);
++ if (cfg->ch2_pix == PRP_PIX2_YUV420) {
++ size = cfg->ch2_width * cfg->ch2_height;
++ __raw_writel(cfg->ch2_ptr2 + size, PRP_SOURCE_CB_PTR);
++ __raw_writel(cfg->ch2_ptr2 + size + (size >> 2),
++ PRP_SOURCE_CR_PTR);
++ }
++
++ __raw_writel(__raw_readl(PRP_CNTL) | PRP_CNTL_CH2B2, PRP_CNTL);
++ return 0;
++}
++
++/*!
++ * @brief Build CSC table
++ * @param csc CSC table
++ * in csc[0]=index 0..3 : A.1 A.0 B.1 B.0
++ * csc[1]=direction 0 : YUV2RGB 1 : RGB2YUV
++ * out csc[0..4] are coefficients c[9] is offset
++ * csc[0..8] are coefficients c[9] is offset
++ */
++void csc_tbl(short csc[10])
++{
++ static const unsigned short _r2y[][9] = {
++ {0x4D, 0x4B, 0x3A, 0x57, 0x55, 0x40, 0x40, 0x6B, 0x29},
++ {0x42, 0x41, 0x32, 0x4C, 0x4A, 0x38, 0x38, 0x5E, 0x24},
++ {0x36, 0x5C, 0x25, 0x3B, 0x63, 0x40, 0x40, 0x74, 0x18},
++ {0x2F, 0x4F, 0x20, 0x34, 0x57, 0x38, 0x38, 0x66, 0x15},
++ };
++ static const unsigned short _y2r[][5] = {
++ {0x80, 0xb4, 0x2c, 0x5b, 0x0e4},
++ {0x95, 0xcc, 0x32, 0x68, 0x104},
++ {0x80, 0xca, 0x18, 0x3c, 0x0ec},
++ {0x95, 0xe5, 0x1b, 0x44, 0x1e0},
++ };
++ unsigned short *_csc;
++ int _csclen;
++
++ csc[9] = csc[0] & 1;
++ _csclen = csc[0] & 3;
++
++ if (csc[1]) {
++ _csc = (unsigned short *)_r2y[_csclen];
++ _csclen = sizeof(_r2y[0]);
++ } else {
++ _csc = (unsigned short *)_y2r[_csclen];
++ _csclen = sizeof(_y2r[0]);
++ memset(csc + 5, 0, sizeof(short) * 4);
++ }
++ memcpy(csc, _csc, _csclen);
++}
++
++/*!
++ * @brief Setup PrP resize coefficient registers
++ *
++ * @param ch PrP channel number
++ * @param dir Direction, 0 - horizontal, 1 - vertical
++ * @param scale The pointer to scale_t structure
++ */
++static void prp_set_scaler(int ch, int dir, scale_t * scale)
++{
++ int i;
++ unsigned int coeff[2];
++ unsigned int valid;
++
++ for (coeff[0] = coeff[1] = valid = 0, i = 19; i >= 0; i--) {
++ int j;
++
++ j = i > 9 ? 1 : 0;
++ coeff[j] = (coeff[j] << BC_COEF) |
++ (scale->tbl[i] & (SZ_COEF - 1));
++
++ if (i == 5 || i == 15)
++ coeff[j] <<= 1;
++
++ valid = (valid << 1) | (scale->tbl[i] >> BC_COEF);
++ }
++
++ valid |= (scale->len << 24) | ((2 - scale->algo) << 31);
++
++ for (i = 0; i < 2; i++)
++ (*PRP_RSZ_COEFF)[1 - ch][dir].coeff[i] = coeff[i];
++
++ (*PRP_RSZ_COEFF)[1 - ch][dir].cntl = valid;
++}
++
++/*!
++ * @brief Setup PrP registers relevant to input.
++ * @param cfg Pointer to PrP configuration parameter
++ * @param prp_cntl Holds the value for PrP control register
++ * @return Zero on success, others on failure
++ */
++static int prphw_input_cfg(emma_prp_cfg * cfg, unsigned long *prp_cntl)
++{
++ unsigned long mask;
++
++ switch (cfg->in_pix) {
++ case PRP_PIXIN_YUV420:
++ *prp_cntl |= PRP_CNTL_IN_YUV420;
++ mask = 0x7;
++ break;
++ case PRP_PIXIN_YUYV:
++ case PRP_PIXIN_YVYU:
++ case PRP_PIXIN_UYVY:
++ case PRP_PIXIN_VYUY:
++ *prp_cntl |= PRP_CNTL_IN_YUV422;
++ mask = 0x1;
++ break;
++ case PRP_PIXIN_RGB565:
++ *prp_cntl |= PRP_CNTL_IN_RGB16;
++ mask = 0x1;
++ break;
++ case PRP_PIXIN_RGB888:
++ *prp_cntl |= PRP_CNTL_IN_RGB32;
++ mask = 0;
++ break;
++ default:
++ pr_debug("Unsupported input pix format 0x%08X\n", cfg->in_pix);
++ return -1;
++ }
++
++ /* align the input image width */
++ if (cfg->in_width & mask) {
++ pr_debug("in_width misaligned. in_width=%d\n", cfg->in_width);
++ return -1;
++ }
++
++ if ((cfg->in_width < PRP_MIN_IN_WIDTH)
++ || (cfg->in_width > PRP_MAX_IN_WIDTH)) {
++ pr_debug("Unsupported input width %d\n", cfg->in_width);
++ return -1;
++ }
++
++ cfg->in_height &= ~1; /* truncate to make even */
++
++ if ((cfg->in_height < PRP_MIN_IN_HEIGHT)
++ || (cfg->in_height > PRP_MAX_IN_HEIGHT)) {
++ pr_debug("Unsupported input height %d\n", cfg->in_height);
++ return -1;
++ }
++
++ if (!(cfg->in_csi & PRP_CSI_EN))
++ if (!cfg->in_line_stride)
++ cfg->in_line_stride = cfg->in_width;
++
++ __raw_writel(cfg->in_pix, PRP_SRC_PIXEL_FORMAT_CNTL);
++ __raw_writel((cfg->in_width << 16) | cfg->in_height,
++ PRP_SOURCE_FRAME_SIZE);
++ __raw_writel((cfg->in_line_skip << 16) | cfg->in_line_stride,
++ PRP_SOURCE_LINE_STRIDE);
++
++ if (!(cfg->in_csi & PRP_CSI_EN)) {
++ __raw_writel(cfg->in_ptr, PRP_SOURCE_Y_PTR);
++ if (cfg->in_pix == PRP_PIXIN_YUV420) {
++ unsigned int size;
++
++ size = cfg->in_line_stride * cfg->in_height;
++ __raw_writel(cfg->in_ptr + size, PRP_SOURCE_CB_PTR);
++ __raw_writel(cfg->in_ptr + size + (size >> 2),
++ PRP_SOURCE_CR_PTR);
++ }
++ }
++
++ /* always cropping */
++ *prp_cntl |= PRP_CNTL_WINEN;
++
++ /* color space conversion */
++ if (!cfg->in_csc[1]) {
++ if (cfg->in_csc[0] > 3) {
++ pr_debug("in_csc invalid 0x%X\n", cfg->in_csc[0]);
++ return -1;
++ }
++ if ((cfg->in_pix == PRP_PIXIN_RGB565)
++ || (cfg->in_pix == PRP_PIXIN_RGB888))
++ cfg->in_csc[1] = 1;
++ else
++ cfg->in_csc[0] = 0;
++ csc_tbl(cfg->in_csc);
++ }
++
++ __raw_writel((cfg->in_csc[0] << 21) | (cfg->in_csc[1] << 11)
++ | cfg->in_csc[2], PRP_CSC_COEF_012);
++ __raw_writel((cfg->in_csc[3] << 21) | (cfg->in_csc[4] << 11)
++ | cfg->in_csc[5], PRP_CSC_COEF_345);
++ __raw_writel((cfg->in_csc[6] << 21) | (cfg->in_csc[7] << 11)
++ | cfg->in_csc[8] | (cfg->in_csc[9] << 31),
++ PRP_CSC_COEF_678);
++
++ if (cfg->in_csi & PRP_CSI_EN) {
++ *prp_cntl |= PRP_CNTL_CSI;
++
++ /* loop mode enable, ch1 ch2 together */
++ if ((cfg->in_csi & PRP_CSI_LOOP) == PRP_CSI_LOOP)
++ *prp_cntl |= (PRP_CNTL_CH1_LOOP | PRP_CNTL_CH2_LOOP);
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Setup PrP registers relevant to channel 2.
++ * @param cfg Pointer to PrP configuration parameter
++ * @param prp_cntl Holds the value for PrP control register
++ * @return Zero on success, others on failure
++ */
++static int prphw_ch2_cfg(emma_prp_cfg * cfg, unsigned long *prp_cntl)
++{
++ switch (cfg->ch2_pix) {
++ case PRP_PIX2_YUV420:
++ *prp_cntl |= PRP_CNTL_CH2_YUV420;
++ break;
++ case PRP_PIX2_YUV422:
++ *prp_cntl |= PRP_CNTL_CH2_YUV422;
++ break;
++ case PRP_PIX2_YUV444:
++ *prp_cntl |= PRP_CNTL_CH2_YUV444;
++ break;
++ case PRP_PIX2_UNUSED:
++ return 0;
++ default:
++ pr_debug("Unsupported channel 2 pix format 0x%08X\n",
++ cfg->ch2_pix);
++ return -1;
++ }
++
++ if (cfg->ch2_pix == PRP_PIX2_YUV420) {
++ cfg->ch2_height &= ~1; /* ensure U/V presence */
++ cfg->ch2_width &= ~7; /* ensure U/V word aligned */
++ } else if (cfg->ch2_pix == PRP_PIX2_YUV422) {
++ cfg->ch2_width &= ~1; /* word aligned */
++ }
++
++ __raw_writel((cfg->ch2_width << 16) | cfg->ch2_height,
++ PRP_CH2_OUT_IMAGE_SIZE);
++
++ return 0;
++}
++
++/*!
++ * @brief Setup PrP registers relevant to channel 1.
++ * @param cfg Pointer to PrP configuration parameter
++ * @param prp_cntl Holds the value for PrP control register
++ * @return Zero on success, others on failure
++ */
++static int prphw_ch1_cfg(emma_prp_cfg * cfg, unsigned long *prp_cntl)
++{
++ int ch1_bpp = 0;
++
++ switch (cfg->ch1_pix) {
++ case PRP_PIX1_RGB332:
++ *prp_cntl |= PRP_CNTL_CH1_RGB8;
++ ch1_bpp = 1;
++ break;
++ case PRP_PIX1_RGB565:
++ *prp_cntl |= PRP_CNTL_CH1_RGB16;
++ ch1_bpp = 2;
++ break;
++ case PRP_PIX1_RGB888:
++ *prp_cntl |= PRP_CNTL_CH1_RGB32;
++ ch1_bpp = 4;
++ break;
++ case PRP_PIX1_YUYV:
++ case PRP_PIX1_YVYU:
++ case PRP_PIX1_UYVY:
++ case PRP_PIX1_VYUY:
++ *prp_cntl |= PRP_CNTL_CH1_YUV422;
++ ch1_bpp = 2;
++ break;
++ case PRP_PIX1_UNUSED:
++ return 0;
++ default:
++ pr_debug("Unsupported channel 1 pix format 0x%08X\n",
++ cfg->ch1_pix);
++ return -1;
++ }
++
++ /* parallel or cascade resize */
++ if (cfg->ch1_scale.algo & PRP_ALGO_BYPASS)
++ *prp_cntl |= PRP_CNTL_UNCHAIN;
++
++ /* word align */
++ if (ch1_bpp == 2)
++ cfg->ch1_width &= ~1;
++ else if (ch1_bpp == 1)
++ cfg->ch1_width &= ~3;
++
++ if (!cfg->ch1_stride)
++ cfg->ch1_stride = cfg->ch1_width;
++
++ __raw_writel(cfg->ch1_pix, PRP_CH1_PIXEL_FORMAT_CNTL);
++ __raw_writel((cfg->ch1_width << 16) | cfg->ch1_height,
++ PRP_CH1_OUT_IMAGE_SIZE);
++ __raw_writel(cfg->ch1_stride * ch1_bpp, PRP_CH1_LINE_STRIDE);
++ __raw_writel(cfg->ch1_ptr, PRP_DEST_RGB1_PTR);
++
++ /* double buffer for loop mode */
++ if ((cfg->in_csi & PRP_CSI_LOOP) == PRP_CSI_LOOP) {
++ if (cfg->ch1_ptr2)
++ __raw_writel(cfg->ch1_ptr2, PRP_DEST_RGB2_PTR);
++ else
++ __raw_writel(cfg->ch1_ptr, PRP_DEST_RGB2_PTR);
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Setup PrP registers.
++ * @param cfg Pointer to PrP configuration parameter
++ * @return Zero on success, others on failure
++ */
++int prphw_cfg(emma_prp_cfg * cfg)
++{
++ unsigned long prp_cntl = 0;
++ unsigned long val;
++
++ /* input pixel format checking */
++ if (prphw_input_cfg(cfg, &prp_cntl))
++ return -1;
++
++ if (prphw_ch2_cfg(cfg, &prp_cntl))
++ return -1;
++
++ if (prphw_ch1_cfg(cfg, &prp_cntl))
++ return -1;
++
++ /* register setting */
++ __raw_writel(prp_cntl, PRP_CNTL);
++
++ /* interrupt configuration */
++ val = PRP_INTRCNTL_RDERR | PRP_INTRCNTL_LBOVF;
++ if (cfg->ch1_pix != PRP_PIX1_UNUSED)
++ val |= PRP_INTRCNTL_CH1FC | PRP_INTRCNTL_CH1WERR;
++ if (cfg->ch2_pix != PRP_PIX2_UNUSED)
++ val |=
++ PRP_INTRCNTL_CH2FC | PRP_INTRCNTL_CH2WERR |
++ PRP_INTRCNTL_CH2OVF;
++ __raw_writel(val, PRP_INTRCNTL);
++
++ prp_set_scaler(1, 0, &cfg->scale[0]); /* Channel 1 width */
++ prp_set_scaler(1, 1, &cfg->scale[1]); /* Channel 1 height */
++ prp_set_scaler(0, 0, &cfg->scale[2]); /* Channel 2 width */
++ prp_set_scaler(0, 1, &cfg->scale[3]); /* Channel 2 height */
++
++ return 0;
++}
++
++/*!
++ * @brief Check PrP interrupt status.
++ * @return PrP interrupt status
++ */
++int prphw_isr(void)
++{
++ int status;
++
++ status = __raw_readl(PRP_INTRSTATUS) & 0x1FF;
++
++ if (status & (PRP_INTRSTAT_RDERR | PRP_INTRSTAT_CH1WERR |
++ PRP_INTRSTAT_CH2WERR))
++ pr_debug("isr bus error. status= 0x%08X\n", status);
++ else if (status & PRP_INTRSTAT_CH2OVF)
++ pr_debug("isr ch 2 buffer overflow. status= 0x%08X\n", status);
++ else if (status & PRP_INTRSTAT_LBOVF)
++ pr_debug("isr line buffer overflow. status= 0x%08X\n", status);
++
++ /* silicon bug?? enable bit does not self clear? */
++ if (!(__raw_readl(PRP_CNTL) & PRP_CNTL_CH1_LOOP))
++ __raw_writel(__raw_readl(PRP_CNTL) & (~PRP_CNTL_CH1EN),
++ PRP_CNTL);
++ if (!(__raw_readl(PRP_CNTL) & PRP_CNTL_CH2_LOOP))
++ __raw_writel(__raw_readl(PRP_CNTL) & (~PRP_CNTL_CH2EN),
++ PRP_CNTL);
++
++ __raw_writel(status, PRP_INTRSTATUS); /* clr irq */
++
++ return status;
++}
++
++static struct clk *emma_clk;
++
++/*!
++ * @brief PrP module clock enable
++ */
++void prphw_init(void)
++{
++ emma_clk = clk_get(NULL, "emma_clk");
++ clk_enable(emma_clk);
++}
++
++/*!
++ * @brief PrP module clock disable
++ */
++void prphw_exit(void)
++{
++ clk_disable(emma_clk);
++ clk_put(emma_clk);
++}
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mx27_prpsw.c linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_prpsw.c
+--- linux-2.6.28/drivers/media/video/mxc/capture/mx27_prpsw.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_prpsw.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,1050 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mx27_prpsw.c
++ *
++ * @brief MX27 Video For Linux 2 capture driver
++ *
++ * @ingroup MXC_V4L2_CAPTURE
++ */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/string.h>
++#include <linux/fb.h>
++#include <linux/pci.h>
++#include <asm/cacheflush.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++
++#include "mxc_v4l2_capture.h"
++#include "mx27_prp.h"
++#include "mx27_csi.h"
++#include "../drivers/video/mxc/mx2fb.h"
++#include "../opl/opl.h"
++
++#define MEAN_COEF (SZ_COEF >> 1)
++
++static char prp_dev[] = "emma_prp";
++static int g_still_on = 0;
++static emma_prp_cfg g_prp_cfg;
++static int g_vfbuf, g_rotbuf;
++static struct tasklet_struct prp_vf_tasklet;
++
++/*
++ * The following variables represents the virtual address for the cacheable
++ * buffers accessed by SW rotation/mirroring. The rotation/mirroring in
++ * cacheable buffers has significant performance improvement than it in
++ * non-cacheable buffers.
++ */
++static char *g_vaddr_vfbuf[2] = { 0, 0 };
++static char *g_vaddr_rotbuf[2] = { 0, 0 };
++static char *g_vaddr_fb = 0;
++
++static int set_ch1_addr(emma_prp_cfg * cfg, cam_data * cam);
++static int prp_v4l2_cfg(emma_prp_cfg * cfg, cam_data * cam);
++static int prp_vf_mem_alloc(cam_data * cam);
++static void prp_vf_mem_free(cam_data * cam);
++static int prp_rot_mem_alloc(cam_data * cam);
++static void prp_rot_mem_free(cam_data * cam);
++static int prp_enc_update_eba(u32 eba, int *buffer_num);
++static int prp_enc_enable(void *private);
++static int prp_enc_disable(void *private);
++static int prp_vf_start(void *private);
++static int prp_vf_stop(void *private);
++static int prp_still_start(void *private);
++static int prp_still_stop(void *private);
++static irqreturn_t prp_isr(int irq, void *dev_id);
++static void rotation(unsigned long private);
++static int prp_resize_check_ch1(emma_prp_cfg * cfg);
++static int prp_resize_check_ch2(emma_prp_cfg * cfg);
++
++#define PRP_DUMP(val) pr_debug("%s\t = 0x%08X\t%d\n", #val, val, val)
++
++/*!
++ * @brief Dump PrP configuration parameters.
++ * @param cfg The pointer to PrP configuration parameter
++ */
++static void prp_cfg_dump(emma_prp_cfg * cfg)
++{
++ PRP_DUMP(cfg->in_pix);
++ PRP_DUMP(cfg->in_width);
++ PRP_DUMP(cfg->in_height);
++ PRP_DUMP(cfg->in_csi);
++ PRP_DUMP(cfg->in_line_stride);
++ PRP_DUMP(cfg->in_line_skip);
++ PRP_DUMP(cfg->in_ptr);
++
++ PRP_DUMP(cfg->ch1_pix);
++ PRP_DUMP(cfg->ch1_width);
++ PRP_DUMP(cfg->ch1_height);
++ PRP_DUMP(cfg->ch1_scale.algo);
++ PRP_DUMP(cfg->ch1_scale.width.num);
++ PRP_DUMP(cfg->ch1_scale.width.den);
++ PRP_DUMP(cfg->ch1_scale.height.num);
++ PRP_DUMP(cfg->ch1_scale.height.den);
++ PRP_DUMP(cfg->ch1_stride);
++ PRP_DUMP(cfg->ch1_ptr);
++ PRP_DUMP(cfg->ch1_ptr2);
++ PRP_DUMP(cfg->ch1_csi);
++
++ PRP_DUMP(cfg->ch2_pix);
++ PRP_DUMP(cfg->ch2_width);
++ PRP_DUMP(cfg->ch2_height);
++ PRP_DUMP(cfg->ch2_scale.algo);
++ PRP_DUMP(cfg->ch2_scale.width.num);
++ PRP_DUMP(cfg->ch2_scale.width.den);
++ PRP_DUMP(cfg->ch2_scale.height.num);
++ PRP_DUMP(cfg->ch2_scale.height.den);
++ PRP_DUMP(cfg->ch2_ptr);
++ PRP_DUMP(cfg->ch2_ptr2);
++ PRP_DUMP(cfg->ch2_csi);
++}
++
++/*!
++ * @brief Set PrP channel 1 output address.
++ * @param cfg Pointer to emma_prp_cfg structure
++ * @param cam Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int set_ch1_addr(emma_prp_cfg * cfg, cam_data * cam)
++{
++ if (cam->rotation != V4L2_MXC_ROTATE_NONE) {
++ cfg->ch1_ptr = (unsigned int)cam->rot_vf_bufs[0];
++ cfg->ch1_ptr2 = (unsigned int)cam->rot_vf_bufs[1];
++ if ((cam->rotation == V4L2_MXC_ROTATE_90_RIGHT)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_RIGHT_VFLIP)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_RIGHT_HFLIP)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_LEFT))
++ cfg->ch1_stride = cam->win.w.height;
++ else
++ cfg->ch1_stride = cam->win.w.width;
++
++ if (cam->v4l2_fb.flags != V4L2_FBUF_FLAG_OVERLAY) {
++ struct fb_info *fb = cam->overlay_fb;
++ if (!fb)
++ return -1;
++ if (g_vaddr_fb)
++ iounmap(g_vaddr_fb);
++ g_vaddr_fb = ioremap_cached(fb->fix.smem_start,
++ fb->fix.smem_len);
++ if (!g_vaddr_fb)
++ return -1;
++ }
++ } else if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ cfg->ch1_ptr = (unsigned int)cam->vf_bufs[0];
++ cfg->ch1_ptr2 = (unsigned int)cam->vf_bufs[1];
++ cfg->ch1_stride = cam->win.w.width;
++ } else {
++ struct fb_info *fb = cam->overlay_fb;
++
++ if (!fb)
++ return -1;
++
++ cfg->ch1_ptr = fb->fix.smem_start;
++ cfg->ch1_ptr += cam->win.w.top * fb->var.xres_virtual
++ * (fb->var.bits_per_pixel >> 3)
++ + cam->win.w.left * (fb->var.bits_per_pixel >> 3);
++ cfg->ch1_ptr2 = cfg->ch1_ptr;
++ cfg->ch1_stride = fb->var.xres_virtual;
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Setup PrP configuration parameters.
++ * @param cfg Pointer to emma_prp_cfg structure
++ * @param cam Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int prp_v4l2_cfg(emma_prp_cfg * cfg, cam_data * cam)
++{
++ cfg->in_pix = PRP_PIXIN_YUYV;
++ cfg->in_width = cam->crop_current.width;
++ cfg->in_height = cam->crop_current.height;
++ cfg->in_line_stride = cam->crop_current.left;
++ cfg->in_line_skip = cam->crop_current.top;
++ cfg->in_ptr = 0;
++ cfg->in_csi = PRP_CSI_LOOP;
++ memset(cfg->in_csc, 0, sizeof(cfg->in_csc));
++
++ if (cam->overlay_on) {
++ /* Convert V4L2 pixel format to PrP pixel format */
++ switch (cam->v4l2_fb.fmt.pixelformat) {
++ case V4L2_PIX_FMT_RGB332:
++ cfg->ch1_pix = PRP_PIX1_RGB332;
++ break;
++ case V4L2_PIX_FMT_RGB32:
++ case V4L2_PIX_FMT_BGR32:
++ cfg->ch1_pix = PRP_PIX1_RGB888;
++ break;
++ case V4L2_PIX_FMT_YUYV:
++ cfg->ch1_pix = PRP_PIX1_YUYV;
++ break;
++ case V4L2_PIX_FMT_UYVY:
++ cfg->ch1_pix = PRP_PIX1_UYVY;
++ break;
++ case V4L2_PIX_FMT_RGB565:
++ default:
++ cfg->ch1_pix = PRP_PIX1_RGB565;
++ break;
++ }
++ if ((cam->rotation == V4L2_MXC_ROTATE_90_RIGHT)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_RIGHT_VFLIP)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_RIGHT_HFLIP)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_LEFT)) {
++ cfg->ch1_width = cam->win.w.height;
++ cfg->ch1_height = cam->win.w.width;
++ } else {
++ cfg->ch1_width = cam->win.w.width;
++ cfg->ch1_height = cam->win.w.height;
++ }
++
++ if (set_ch1_addr(cfg, cam))
++ return -1;
++ } else {
++ cfg->ch1_pix = PRP_PIX1_UNUSED;
++ cfg->ch1_width = cfg->in_width;
++ cfg->ch1_height = cfg->in_height;
++ }
++ cfg->ch1_scale.algo = 0;
++ cfg->ch1_scale.width.num = cfg->in_width;
++ cfg->ch1_scale.width.den = cfg->ch1_width;
++ cfg->ch1_scale.height.num = cfg->in_height;
++ cfg->ch1_scale.height.den = cfg->ch1_height;
++ cfg->ch1_csi = PRP_CSI_EN;
++
++ if (cam->capture_on || g_still_on) {
++ switch (cam->v2f.fmt.pix.pixelformat) {
++ case V4L2_PIX_FMT_YUYV:
++ cfg->ch2_pix = PRP_PIX2_YUV422;
++ break;
++ case V4L2_PIX_FMT_YUV420:
++ cfg->ch2_pix = PRP_PIX2_YUV420;
++ break;
++ /*
++ * YUV444 is not defined by V4L2.
++ * We support it in default case.
++ */
++ default:
++ cfg->ch2_pix = PRP_PIX2_YUV444;
++ break;
++ }
++ cfg->ch2_width = cam->v2f.fmt.pix.width;
++ cfg->ch2_height = cam->v2f.fmt.pix.height;
++ } else {
++ cfg->ch2_pix = PRP_PIX2_UNUSED;
++ cfg->ch2_width = cfg->in_width;
++ cfg->ch2_height = cfg->in_height;
++ }
++ cfg->ch2_scale.algo = 0;
++ cfg->ch2_scale.width.num = cfg->in_width;
++ cfg->ch2_scale.width.den = cfg->ch2_width;
++ cfg->ch2_scale.height.num = cfg->in_height;
++ cfg->ch2_scale.height.den = cfg->ch2_height;
++ cfg->ch2_csi = PRP_CSI_EN;
++
++ memset(cfg->scale, 0, sizeof(cfg->scale));
++ cfg->scale[0].algo = cfg->ch1_scale.algo & 3;
++ cfg->scale[1].algo = (cfg->ch1_scale.algo >> 2) & 3;
++ cfg->scale[2].algo = cfg->ch2_scale.algo & 3;
++ cfg->scale[3].algo = (cfg->ch2_scale.algo >> 2) & 3;
++
++ prp_cfg_dump(cfg);
++
++ if (prp_resize_check_ch2(cfg))
++ return -1;
++
++ if (prp_resize_check_ch1(cfg))
++ return -1;
++
++ return 0;
++}
++
++/*!
++ * @brief PrP interrupt handler
++ */
++static irqreturn_t prp_isr(int irq, void *dev_id)
++{
++ int status;
++ cam_data *cam = (cam_data *) dev_id;
++
++ status = prphw_isr();
++
++ if (g_still_on && (status & PRP_INTRSTAT_CH2BUF1)) {
++ prp_still_stop(cam);
++ cam->still_counter++;
++ wake_up_interruptible(&cam->still_queue);
++ /*
++ * Still & video capture use the same PrP channel 2.
++ * They are execlusive.
++ */
++ } else if (cam->capture_on) {
++ if (status & PRP_INTRSTAT_CH2OVF) {
++ prphw_disable(PRP_CHANNEL_2);
++ cam->enc_callback(1, cam);
++ } else if (status &
++ (PRP_INTRSTAT_CH2BUF1 | PRP_INTRSTAT_CH2BUF2)) {
++ if (cam->overflow != 1)
++ cam->enc_callback(0, cam);
++ }
++ }
++ if (cam->overlay_on
++ && (status & (PRP_INTRSTAT_CH1BUF1 | PRP_INTRSTAT_CH1BUF2))) {
++ if (cam->rotation != V4L2_MXC_ROTATE_NONE) {
++ g_rotbuf = (status & PRP_INTRSTAT_CH1BUF1) ? 0 : 1;
++ tasklet_schedule(&prp_vf_tasklet);
++ } else if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ struct fb_gwinfo gwinfo;
++
++ gwinfo.enabled = 1;
++ gwinfo.alpha_value = 255;
++ gwinfo.ck_enabled = 0;
++ gwinfo.xpos = cam->win.w.left;
++ gwinfo.ypos = cam->win.w.top;
++ gwinfo.xres = cam->win.w.width;
++ gwinfo.yres = cam->win.w.height;
++ gwinfo.xres_virtual = cam->win.w.width;
++ gwinfo.vs_reversed = 0;
++ if (status & PRP_INTRSTAT_CH1BUF1)
++ gwinfo.base = (unsigned long)cam->vf_bufs[0];
++ else
++ gwinfo.base = (unsigned long)cam->vf_bufs[1];
++
++ mx2_gw_set(&gwinfo);
++ }
++ }
++
++ return IRQ_HANDLED;
++}
++
++/*!
++ * @brief PrP initialization.
++ * @param dev_id Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++int prp_init(void *dev_id)
++{
++ enable_irq(INT_EMMAPRP);
++ if (request_irq(INT_EMMAPRP, prp_isr, 0, prp_dev, dev_id))
++ return -1;
++ prphw_init();
++
++ return 0;
++}
++
++/*!
++ * @brief PrP initialization.
++ * @param dev_id Pointer to cam_data structure
++ */
++void prp_exit(void *dev_id)
++{
++ prphw_exit();
++ disable_irq(INT_EMMAPRP);
++ free_irq(INT_EMMAPRP, dev_id);
++}
++
++/*!
++ * @brief Update PrP channel 2 output buffer address.
++ * @param eba Physical address for PrP output buffer
++ * @param buffer_num The PrP channel 2 buffer number to be updated
++ * @return Zero on success, others on failure
++ */
++static int prp_enc_update_eba(u32 eba, int *buffer_num)
++{
++ if (*buffer_num) {
++ g_prp_cfg.ch2_ptr2 = eba;
++ prphw_ch2ptr2(&g_prp_cfg);
++ *buffer_num = 0;
++ } else {
++ g_prp_cfg.ch2_ptr = eba;
++ prphw_ch2ptr(&g_prp_cfg);
++ *buffer_num = 1;
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Enable PrP for encoding.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int prp_enc_enable(void *private)
++{
++ cam_data *cam = (cam_data *) private;
++
++ if (prp_v4l2_cfg(&g_prp_cfg, cam))
++ return -1;
++
++ csi_enable_mclk(CSI_MCLK_ENC, true, true);
++ prphw_reset();
++
++ if (prphw_cfg(&g_prp_cfg))
++ return -1;
++
++ prphw_enable(cam->overlay_on ? (PRP_CHANNEL_1 | PRP_CHANNEL_2)
++ : PRP_CHANNEL_2);
++
++ return 0;
++}
++
++/*!
++ * @brief Disable PrP for encoding.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int prp_enc_disable(void *private)
++{
++ prphw_disable(PRP_CHANNEL_2);
++ csi_enable_mclk(CSI_MCLK_ENC, false, false);
++
++ return 0;
++}
++
++/*!
++ * @brief Setup encoding functions.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++int prp_enc_select(void *private)
++{
++ int ret = 0;
++ cam_data *cam = (cam_data *) private;
++
++ if (cam) {
++ cam->enc_update_eba = prp_enc_update_eba;
++ cam->enc_enable = prp_enc_enable;
++ cam->enc_disable = prp_enc_disable;
++ } else
++ ret = -EIO;
++
++ return ret;
++}
++
++/*!
++ * @brief Uninstall encoding functions.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++int prp_enc_deselect(void *private)
++{
++ int ret = 0;
++ cam_data *cam = (cam_data *) private;
++
++ ret = prp_enc_disable(private);
++
++ if (cam) {
++ cam->enc_update_eba = NULL;
++ cam->enc_enable = NULL;
++ cam->enc_disable = NULL;
++ }
++
++ return ret;
++}
++
++/*!
++ * @brief Allocate memory for overlay.
++ * @param cam Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int prp_vf_mem_alloc(cam_data * cam)
++{
++ int i;
++
++ for (i = 0; i < 2; i++) {
++ cam->vf_bufs_size[i] = cam->win.w.width * cam->win.w.height * 2;
++ cam->vf_bufs_vaddr[i] = dma_alloc_coherent(0,
++ cam->vf_bufs_size[i],
++ &cam->vf_bufs[i],
++ GFP_DMA |
++ GFP_KERNEL);
++ if (!cam->vf_bufs_vaddr[i]) {
++ pr_debug("Failed to alloc memory for vf.\n");
++ prp_vf_mem_free(cam);
++ return -1;
++ }
++
++ g_vaddr_vfbuf[i] =
++ ioremap_cached(cam->vf_bufs[i], cam->vf_bufs_size[i]);
++ if (!g_vaddr_vfbuf[i]) {
++ pr_debug("Failed to ioremap_cached() for vf.\n");
++ prp_vf_mem_free(cam);
++ return -1;
++ }
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Free memory for overlay.
++ * @param cam Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static void prp_vf_mem_free(cam_data * cam)
++{
++ int i;
++
++ for (i = 0; i < 2; i++) {
++ if (cam->vf_bufs_vaddr[i]) {
++ dma_free_coherent(0,
++ cam->vf_bufs_size[i],
++ cam->vf_bufs_vaddr[i],
++ cam->vf_bufs[i]);
++ }
++ cam->vf_bufs[i] = 0;
++ cam->vf_bufs_vaddr[i] = 0;
++ cam->vf_bufs_size[i] = 0;
++ if (g_vaddr_vfbuf[i]) {
++ iounmap(g_vaddr_vfbuf[i]);
++ g_vaddr_vfbuf[i] = 0;
++ }
++ }
++}
++
++/*!
++ * @brief Allocate intermediate memory for overlay rotation/mirroring.
++ * @param cam Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int prp_rot_mem_alloc(cam_data * cam)
++{
++ int i;
++
++ for (i = 0; i < 2; i++) {
++ cam->rot_vf_buf_size[i] =
++ cam->win.w.width * cam->win.w.height * 2;
++ cam->rot_vf_bufs_vaddr[i] =
++ dma_alloc_coherent(0, cam->rot_vf_buf_size[i],
++ &cam->rot_vf_bufs[i],
++ GFP_DMA | GFP_KERNEL);
++ if (!cam->rot_vf_bufs_vaddr[i]) {
++ pr_debug("Failed to alloc memory for vf rotation.\n");
++ prp_rot_mem_free(cam);
++ return -1;
++ }
++
++ g_vaddr_rotbuf[i] =
++ ioremap_cached(cam->rot_vf_bufs[i],
++ cam->rot_vf_buf_size[i]);
++ if (!g_vaddr_rotbuf[i]) {
++ pr_debug
++ ("Failed to ioremap_cached() for rotation buffer.\n");
++ prp_rot_mem_free(cam);
++ return -1;
++ }
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Free intermedaite memory for overlay rotation/mirroring.
++ * @param cam Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static void prp_rot_mem_free(cam_data * cam)
++{
++ int i;
++
++ for (i = 0; i < 2; i++) {
++ if (cam->rot_vf_bufs_vaddr[i]) {
++ dma_free_coherent(0,
++ cam->rot_vf_buf_size[i],
++ cam->rot_vf_bufs_vaddr[i],
++ cam->rot_vf_bufs[i]);
++ }
++ cam->rot_vf_bufs[i] = 0;
++ cam->rot_vf_bufs_vaddr[i] = 0;
++ cam->rot_vf_buf_size[i] = 0;
++ if (g_vaddr_rotbuf[i]) {
++ iounmap(g_vaddr_rotbuf[i]);
++ g_vaddr_rotbuf[i] = 0;
++ }
++ }
++}
++
++/*!
++ * @brief Start overlay (view finder).
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int prp_vf_start(void *private)
++{
++ cam_data *cam = (cam_data *) private;
++
++ if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ prp_vf_mem_free(cam);
++ if (prp_vf_mem_alloc(cam)) {
++ pr_info("Error to allocate vf buffer\n");
++ return -ENOMEM;
++ }
++ }
++
++ if (cam->rotation != V4L2_MXC_ROTATE_NONE) {
++ prp_rot_mem_free(cam);
++ if (prp_rot_mem_alloc(cam)) {
++ pr_info("Error to allocate rotation buffer\n");
++ prp_vf_mem_free(cam);
++ return -ENOMEM;
++ }
++ }
++
++ if (prp_v4l2_cfg(&g_prp_cfg, cam)) {
++ prp_vf_mem_free(cam);
++ prp_rot_mem_free(cam);
++ return -1;
++ }
++
++ csi_enable_mclk(CSI_MCLK_VF, true, true);
++ prphw_reset();
++
++ if (prphw_cfg(&g_prp_cfg)) {
++ prp_vf_mem_free(cam);
++ prp_rot_mem_free(cam);
++ return -1;
++ }
++ g_vfbuf = g_rotbuf = 0;
++ tasklet_init(&prp_vf_tasklet, rotation, (unsigned long)private);
++
++ prphw_enable(cam->capture_on ? (PRP_CHANNEL_1 | PRP_CHANNEL_2)
++ : PRP_CHANNEL_1);
++
++ return 0;
++}
++
++/*!
++ * @brief Stop overlay (view finder).
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int prp_vf_stop(void *private)
++{
++ cam_data *cam = (cam_data *) private;
++
++ prphw_disable(PRP_CHANNEL_1);
++
++ csi_enable_mclk(CSI_MCLK_VF, false, false);
++ tasklet_kill(&prp_vf_tasklet);
++
++ if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ struct fb_gwinfo gwinfo;
++
++ /* Disable graphic window */
++ gwinfo.enabled = 0;
++ mx2_gw_set(&gwinfo);
++
++ prp_vf_mem_free(cam);
++ }
++ prp_rot_mem_free(cam);
++ if (g_vaddr_fb) {
++ iounmap(g_vaddr_fb);
++ g_vaddr_fb = 0;
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Setup overlay functions.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++int prp_vf_select(void *private)
++{
++ int ret = 0;
++ cam_data *cam = (cam_data *) private;
++
++ if (cam) {
++ cam->vf_start_sdc = prp_vf_start;
++ cam->vf_stop_sdc = prp_vf_stop;
++ cam->overlay_active = false;
++ } else
++ ret = -EIO;
++
++ return ret;
++}
++
++/*!
++ * @brief Uninstall overlay functions.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++int prp_vf_deselect(void *private)
++{
++ int ret = 0;
++ cam_data *cam = (cam_data *) private;
++
++ ret = prp_vf_stop(private);
++
++ if (cam) {
++ cam->vf_start_sdc = NULL;
++ cam->vf_stop_sdc = NULL;
++ }
++
++ return ret;
++}
++
++/*!
++ * @brief Start still picture capture.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int prp_still_start(void *private)
++{
++ cam_data *cam = (cam_data *) private;
++
++ g_still_on = 1;
++ g_prp_cfg.ch2_ptr = (unsigned int)cam->still_buf;
++ g_prp_cfg.ch2_ptr2 = 0;
++
++ if (prp_v4l2_cfg(&g_prp_cfg, cam))
++ return -1;
++
++ csi_enable_mclk(CSI_MCLK_RAW, true, true);
++ prphw_reset();
++
++ if (prphw_cfg(&g_prp_cfg)) {
++ g_still_on = 0;
++ return -1;
++ }
++
++ prphw_enable(cam->overlay_on ? (PRP_CHANNEL_1 | PRP_CHANNEL_2)
++ : PRP_CHANNEL_2);
++
++ return 0;
++}
++
++/*!
++ * @brief Stop still picture capture.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++static int prp_still_stop(void *private)
++{
++ prphw_disable(PRP_CHANNEL_2);
++
++ csi_enable_mclk(CSI_MCLK_RAW, false, false);
++
++ g_still_on = 0;
++
++ return 0;
++}
++
++/*!
++ * @brief Setup functions for still picture capture.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++int prp_still_select(void *private)
++{
++ cam_data *cam = (cam_data *) private;
++
++ if (cam) {
++ cam->csi_start = prp_still_start;
++ cam->csi_stop = prp_still_stop;
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Uninstall functions for still picture capture.
++ * @param private Pointer to cam_data structure
++ * @return Zero on success, others on failure
++ */
++int prp_still_deselect(void *private)
++{
++ cam_data *cam = (cam_data *) private;
++ int err = 0;
++
++ err = prp_still_stop(cam);
++
++ if (cam) {
++ cam->csi_start = NULL;
++ cam->csi_stop = NULL;
++ }
++
++ return err;
++}
++
++/*!
++ * @brief Perform software rotation or mirroring
++ * @param private Argument passed to the tasklet
++ */
++static void rotation(unsigned long private)
++{
++ char *src, *dst;
++ int width, height, s_stride, d_stride;
++ int size;
++ cam_data *cam = (cam_data *) private;
++
++ src = g_vaddr_rotbuf[g_rotbuf];
++ size = cam->rot_vf_buf_size[g_rotbuf];
++
++ if ((cam->rotation == V4L2_MXC_ROTATE_90_RIGHT)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_RIGHT_VFLIP)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_RIGHT_HFLIP)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_LEFT)) {
++ width = cam->win.w.height;
++ height = cam->win.w.width;
++ s_stride = cam->win.w.height << 1;
++ } else {
++ width = cam->win.w.width;
++ height = cam->win.w.height;
++ s_stride = cam->win.w.width << 1;
++ }
++
++ if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ dst = g_vaddr_vfbuf[g_vfbuf];
++ d_stride = cam->win.w.width << 1;
++ } else { /* The destination is the framebuffer */
++ struct fb_info *fb = cam->overlay_fb;
++ if (!fb)
++ return;
++ dst = g_vaddr_fb;
++ dst += cam->win.w.top * fb->var.xres_virtual
++ * (fb->var.bits_per_pixel >> 3)
++ + cam->win.w.left * (fb->var.bits_per_pixel >> 3);
++ d_stride = fb->var.xres_virtual << 1;
++ }
++
++ /*
++ * Invalidate the data in cache before performing the SW rotaion
++ * or mirroring in case the image size is less than QVGA. For image
++ * larger than QVGA it is not invalidated becase the invalidation
++ * will consume much time while we don't see any artifacts on the
++ * output if we don't perform invalidation for them.
++ * Similarly we don't flush the data after SW rotation/mirroring.
++ */
++ if (size < 320 * 240 * 2)
++ dmac_inv_range(src, src + size);
++ switch (cam->rotation) {
++ case V4L2_MXC_ROTATE_VERT_FLIP:
++ opl_vmirror_u16(src, s_stride, width, height, dst, d_stride);
++ break;
++ case V4L2_MXC_ROTATE_HORIZ_FLIP:
++ opl_hmirror_u16(src, s_stride, width, height, dst, d_stride);
++ break;
++ case V4L2_MXC_ROTATE_180:
++ opl_rotate180_u16(src, s_stride, width, height, dst, d_stride);
++ break;
++ case V4L2_MXC_ROTATE_90_RIGHT:
++ opl_rotate90_u16(src, s_stride, width, height, dst, d_stride);
++ break;
++ case V4L2_MXC_ROTATE_90_RIGHT_VFLIP:
++ opl_rotate90_vmirror_u16(src, s_stride, width, height, dst,
++ d_stride);
++ break;
++ case V4L2_MXC_ROTATE_90_RIGHT_HFLIP:
++ /* ROTATE_90_RIGHT_HFLIP = ROTATE_270_RIGHT_VFLIP */
++ opl_rotate270_vmirror_u16(src, s_stride, width, height, dst,
++ d_stride);
++ break;
++ case V4L2_MXC_ROTATE_90_LEFT:
++ opl_rotate270_u16(src, s_stride, width, height, dst, d_stride);
++ break;
++ default:
++ return;
++ }
++
++ /* Config and display the graphic window */
++ if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ struct fb_gwinfo gwinfo;
++
++ gwinfo.enabled = 1;
++ gwinfo.alpha_value = 255;
++ gwinfo.ck_enabled = 0;
++ gwinfo.xpos = cam->win.w.left;
++ gwinfo.ypos = cam->win.w.top;
++ gwinfo.xres = cam->win.w.width;
++ gwinfo.yres = cam->win.w.height;
++ gwinfo.xres_virtual = cam->win.w.width;
++ gwinfo.vs_reversed = 0;
++ gwinfo.base = (unsigned long)cam->vf_bufs[g_vfbuf];
++ mx2_gw_set(&gwinfo);
++
++ g_vfbuf = g_vfbuf ? 0 : 1;
++ }
++}
++
++/*
++ * @brief Check if the resize ratio is supported based on the input and output
++ * dimension
++ * @param input input dimension
++ * @param output output dimension
++ * @return output dimension (should equal the parameter *output*)
++ * -1 on failure
++ */
++static int check_simple(scale_t * scale, int input, int output, int ch)
++{
++ unsigned short int_out; /* PrP internel width or height */
++ unsigned short orig_out = output;
++
++ if (prp_scale(scale, input, output, input, &orig_out, &int_out, ch))
++ return -1; /* resize failed */
++ else
++ return int_out;
++}
++
++/*!
++ * @brief Check if the resize ratio is supported by PrP channel 1
++ * @param cfg Pointer to emma_prp_cfg structure
++ * @return Zero on success, others on failure
++ */
++static int prp_resize_check_ch1(emma_prp_cfg * cfg)
++{
++ int in_w, in_h, ch1_w, ch1_h, ch2_w, ch2_h, w, h;
++ scale_t *pscale = &cfg->scale[0]; /* Ch1 width resize coeff */
++
++ if (cfg->ch1_pix == PRP_PIX1_UNUSED)
++ return 0;
++
++ in_w = cfg->in_width;
++ in_h = cfg->in_height;
++ ch1_w = cfg->ch1_width;
++ ch1_h = cfg->ch1_height;
++ ch2_w = cfg->ch2_width;
++ ch2_h = cfg->ch2_height;
++
++ /*
++ * For channel 1, try parallel resize first. If the resize
++ * ratio is not exactly supported, try cascade resize. If it
++ * still fails, use parallel resize but with rounded value.
++ */
++ w = check_simple(pscale, in_w, ch1_w, PRP_CHANNEL_1);
++ h = check_simple(pscale + 1, in_h, ch1_h, PRP_CHANNEL_1);
++
++ if ((in_w <= ch1_w * MAX_TBL) && (in_h <= MAX_TBL * ch1_h))
++ goto exit_parallel;
++
++ if (cfg->ch2_pix != PRP_PIX2_UNUSED) {
++ /*
++ * Channel 2 is already used. The pscale is still pointing
++ * to ch1 resize coeff for temporary use.
++ */
++ if ((ch2_w * MAX_TBL <= ch1_w) && (ch2_h * MAX_TBL <= ch1_h)) {
++ w = check_simple(pscale, ch2_w, ch1_w, PRP_CHANNEL_1);
++ h = check_simple(pscale + 1, ch2_h, ch1_h,
++ PRP_CHANNEL_1);
++ goto exit_cascade;
++ }
++ } else {
++ /*
++ * Try cascade resize for width, width is multiple of 2.
++ * Channel 2 is not used. So we have more values to pick
++ * for channel 2 resize.
++ */
++ if (in_w * MAX_TBL > ch1_w) {
++ for (w = in_w / 2; w > ch1_w; w /= 2) {
++ /* Ch1 width resize */
++ if (check_simple
++ (pscale, w, ch1_w, PRP_CHANNEL_1) < 0)
++ continue;
++ /* Ch2 width resize */
++ ch2_w =
++ check_simple(pscale + 2, in_w, w,
++ PRP_CHANNEL_1);
++ if (ch2_w < 0) {
++ w = in_w / MAX_TBL;
++ continue;
++ }
++ check_simple(pscale, ch2_w, ch1_w,
++ PRP_CHANNEL_1);
++ break;
++ }
++ } else {
++ w = check_simple(pscale, in_w, ch1_w, PRP_CHANNEL_1);
++ ch2_w = check_simple(pscale + 2, w, w, PRP_CHANNEL_1);
++ }
++ if (ch2_w >= ch1_w) {
++ if (in_h * MAX_TBL > ch1_h) {
++ /* try cascade resize for height */
++ for (h = in_h / 2; h > ch1_h; h /= 2) {
++ /* Ch2 height resize */
++ if (check_simple
++ (pscale + 1, h, ch1_h,
++ PRP_CHANNEL_1) < 0)
++ continue;
++ /* Ch1 height resize */
++ ch2_h =
++ check_simple(pscale + 3, in_h, h,
++ PRP_CHANNEL_1);
++ if (ch2_w < 0) {
++ h = in_h / MAX_TBL;
++ continue;
++ }
++ check_simple(pscale + 1, ch2_h, ch1_h,
++ PRP_CHANNEL_1);
++ break;
++ }
++ } else {
++ h = check_simple(pscale + 1, in_h, ch1_h,
++ PRP_CHANNEL_1);
++ ch2_h =
++ check_simple(pscale + 3, h, h,
++ PRP_CHANNEL_1);
++ }
++
++ goto exit_cascade;
++ }
++ }
++
++ pr_debug("Ch1 resize error.\n");
++ return -1;
++
++ exit_parallel:
++ cfg->ch1_scale.algo |= PRP_ALGO_BYPASS;
++ pr_debug("ch1 parallel resize.\n");
++ pr_debug("original width = %d internel width = %d\n", ch1_w, w);
++ pr_debug("original height = %d internel height = %d\n", ch1_h, h);
++ return 0;
++
++ exit_cascade:
++ cfg->ch1_scale.algo &= ~PRP_ALGO_BYPASS;
++ pr_debug("ch1 cascade resize.\n");
++ pr_debug("[width] in : ch2 : ch1=%d : %d : %d\n", in_w, ch2_w, ch1_w);
++ pr_debug("[height] in : ch2 : ch1=%d : %d : %d\n", in_h, ch2_h, ch1_h);
++ return 0;
++}
++
++/*!
++ * @brief Check if the resize ratio is supported by PrP channel 2
++ * @param cfg Pointer to emma_prp_cfg structure
++ * @return Zero on success, others on failure
++ */
++static int prp_resize_check_ch2(emma_prp_cfg * cfg)
++{
++ int w, h;
++ scale_t *pscale = &cfg->scale[2]; /* Ch2 width resize coeff */
++
++ if (cfg->ch2_pix == PRP_PIX2_UNUSED)
++ return 0;
++
++ w = check_simple(pscale, cfg->in_width, cfg->ch2_width, PRP_CHANNEL_2);
++ h = check_simple(pscale + 1, cfg->in_height, cfg->ch2_height,
++ PRP_CHANNEL_2);
++ if ((w != -1) && (h != -1)) {
++ pr_debug("Ch2 resize.\n");
++ pr_debug("Original width = %d internel width = %d\n",
++ cfg->ch2_width, w);
++ pr_debug("Original height = %d internel height = %d\n",
++ cfg->ch2_height, h);
++ return 0;
++ } else {
++ pr_debug("Ch2 resize error.\n");
++ return -1;
++ }
++}
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mx27_v4l2_capture.c linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_v4l2_capture.c
+--- linux-2.6.28/drivers/media/video/mxc/capture/mx27_v4l2_capture.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mx27_v4l2_capture.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,2288 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mx27_v4l2_capture.c
++ *
++ * @brief MX27 Video For Linux 2 driver
++ *
++ * @ingroup MXC_V4L2_CAPTURE
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/fs.h>
++#include <linux/slab.h>
++#include <linux/ctype.h>
++#include <linux/pagemap.h>
++#include <linux/vmalloc.h>
++#include <linux/types.h>
++#include <linux/fb.h>
++#include <linux/pci.h>
++#include <linux/platform_device.h>
++#include <linux/version.h>
++#include <media/v4l2-dev.h>
++#include <asm/io.h>
++#include <asm/semaphore.h>
++
++#include "mxc_v4l2_capture.h"
++#include "mx27_prp.h"
++#include "mx27_csi.h"
++
++static int csi_mclk_flag_backup;
++static int video_nr = -1;
++cam_data *g_cam;
++EXPORT_SYMBOL(g_cam);
++
++static int dq_intr_cnt = 0;
++static int dq_timeout_cnt = 0;
++static int empty_wq_cnt = 0;
++struct workqueue_struct *v4l2_work;
++
++static void prp_reset(struct work_struct *unused)
++{
++ struct mxc_v4l_frame *done_frame, *ready_frame, *temp_frame;
++
++ g_cam->ping_pong_csi = 0;
++ g_cam->enc_enable(g_cam);
++ if (!list_empty(&g_cam->working_q)) {
++ done_frame =
++ list_entry(g_cam->working_q.next, struct mxc_v4l_frame,
++ queue);
++ list_del(g_cam->working_q.next);
++ if (!list_empty(&g_cam->working_q)) {
++ temp_frame =
++ list_entry(g_cam->working_q.next,
++ struct mxc_v4l_frame, queue);
++ list_del(g_cam->working_q.next);
++ list_add_tail(&temp_frame->queue, &g_cam->working_q);
++ g_cam->enc_update_eba(temp_frame->paddress,
++ &g_cam->ping_pong_csi);
++ }
++ list_add_tail(&done_frame->queue, &g_cam->working_q);
++ g_cam->enc_update_eba(done_frame->paddress,
++ &g_cam->ping_pong_csi);
++ pr_debug("prp_reset - working_q\n");
++ } else if (list_empty(&g_cam->ready_q)) {
++ prphw_disable(PRP_CHANNEL_2);
++ g_cam->skip_frame++;
++ } else {
++ ready_frame =
++ list_entry(g_cam->ready_q.next, struct mxc_v4l_frame,
++ queue);
++ list_del(g_cam->ready_q.next);
++ list_add_tail(&ready_frame->queue, &g_cam->working_q);
++ g_cam->enc_update_eba(ready_frame->paddress,
++ &g_cam->ping_pong_csi);
++ }
++ g_cam->overflow = 0;
++ wake_up_interruptible(&g_cam->overflow_queue);
++}
++
++DECLARE_WORK(prp_reset_work, prp_reset);
++/*!
++ * Free frame buffers
++ *
++ * @param cam Structure cam_data *
++ *
++ * @return status 0 success.
++ */
++static int mxc_free_frame_buf(cam_data * cam)
++{
++ int i;
++
++ for (i = 0; i < FRAME_NUM; i++) {
++ if (cam->frame[i].vaddress != 0) {
++ dma_free_coherent(0,
++ cam->frame[i].buffer.length,
++ cam->frame[i].vaddress,
++ cam->frame[i].paddress);
++ cam->frame[i].vaddress = 0;
++ }
++ }
++
++ return 0;
++}
++
++/*!
++ * Allocate frame buffers
++ *
++ * @param cam Structure cam_data *
++ *
++ * @param count int number of buffer need to allocated
++ *
++ * @return status -0 Successfully allocated a buffer, -ENOBUFS failed.
++ */
++static int mxc_allocate_frame_buf(cam_data * cam, int count)
++{
++ int i;
++
++ for (i = 0; i < count; i++) {
++ cam->frame[i].vaddress = dma_alloc_coherent(0,
++ PAGE_ALIGN(cam->v2f.
++ fmt.pix.
++ sizeimage),
++ &cam->frame[i].
++ paddress,
++ GFP_DMA |
++ GFP_KERNEL);
++ if (cam->frame[i].vaddress == 0) {
++ pr_debug("mxc_allocate_frame_buf failed.\n");
++ mxc_free_frame_buf(cam);
++ return -ENOBUFS;
++ }
++ cam->frame[i].buffer.index = i;
++ cam->frame[i].buffer.flags = V4L2_BUF_FLAG_MAPPED;
++ cam->frame[i].buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ cam->frame[i].buffer.length =
++ PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage);
++ cam->frame[i].buffer.memory = V4L2_MEMORY_MMAP;
++ cam->frame[i].buffer.m.offset = cam->frame[i].paddress;
++ cam->frame[i].index = i;
++ }
++
++ return 0;
++}
++
++/*!
++ * Free frame buffers status
++ *
++ * @param cam Structure cam_data *
++ *
++ * @return none
++ */
++static void mxc_free_frames(cam_data * cam)
++{
++ int i;
++
++ for (i = 0; i < FRAME_NUM; i++) {
++ cam->frame[i].buffer.flags = V4L2_BUF_FLAG_MAPPED;
++ }
++
++ cam->enc_counter = 0;
++ cam->skip_frame = 0;
++ INIT_LIST_HEAD(&cam->ready_q);
++ INIT_LIST_HEAD(&cam->working_q);
++ INIT_LIST_HEAD(&cam->done_q);
++}
++
++/*!
++ * Return the buffer status
++ *
++ * @param cam Structure cam_data *
++ * @param buf Structure v4l2_buffer *
++ *
++ * @return status 0 success, EINVAL failed.
++ */
++static int mxc_v4l2_buffer_status(cam_data * cam, struct v4l2_buffer *buf)
++{
++ /* check range */
++ if (buf->index < 0 || buf->index >= FRAME_NUM) {
++ pr_debug("mxc_v4l2_buffer_status buffers not allocated\n");
++ return -EINVAL;
++ }
++
++ memcpy(buf, &(cam->frame[buf->index].buffer), sizeof(*buf));
++ return 0;
++}
++
++/*!
++ * start the encoder job
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static int mxc_streamon(cam_data * cam)
++{
++ struct mxc_v4l_frame *frame;
++ int err = 0;
++
++ if (!cam)
++ return -EIO;
++
++ if (list_empty(&cam->ready_q)) {
++ printk(KERN_ERR "mxc_streamon buffer not been queued yet\n");
++ return -EINVAL;
++ }
++
++ cam->capture_pid = current->pid;
++
++ if (cam->enc_enable) {
++ err = cam->enc_enable(cam);
++ if (err != 0) {
++ return err;
++ }
++ }
++
++ cam->ping_pong_csi = 0;
++ cam->overflow = 0;
++ if (cam->enc_update_eba) {
++ frame =
++ list_entry(cam->ready_q.next, struct mxc_v4l_frame, queue);
++ list_del(cam->ready_q.next);
++ list_add_tail(&frame->queue, &cam->working_q);
++ err = cam->enc_update_eba(frame->paddress, &cam->ping_pong_csi);
++
++ frame =
++ list_entry(cam->ready_q.next, struct mxc_v4l_frame, queue);
++ list_del(cam->ready_q.next);
++ list_add_tail(&frame->queue, &cam->working_q);
++ err |=
++ cam->enc_update_eba(frame->paddress, &cam->ping_pong_csi);
++ } else {
++ return -EINVAL;
++ }
++
++ return err;
++}
++
++/*!
++ * Shut down the encoder job
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static int mxc_streamoff(cam_data * cam)
++{
++ int err = 0;
++
++ if (!cam)
++ return -EIO;
++
++ if (cam->enc_disable) {
++ err = cam->enc_disable(cam);
++ }
++ mxc_free_frames(cam);
++ return err;
++}
++
++/*!
++ * Valid whether the palette is supported
++ *
++ * @param palette pixel format
++ *
++ * @return 0 if failed
++ */
++static inline int valid_mode(u32 palette)
++{
++ /*
++ * MX27 PrP channel 2 supports YUV444, but YUV444 is not
++ * defined by V4L2 :(
++ */
++ return ((palette == V4L2_PIX_FMT_YUYV) ||
++ (palette == V4L2_PIX_FMT_YUV420));
++}
++
++/*!
++ * Valid and adjust the overlay window size, position
++ *
++ * @param cam structure cam_data *
++ * @param win struct v4l2_window *
++ *
++ * @return 0
++ */
++static int verify_preview(cam_data * cam, struct v4l2_window *win)
++{
++ if (cam->output >= num_registered_fb) {
++ pr_debug("verify_preview No matched.\n");
++ return -EINVAL;
++ }
++ cam->overlay_fb = (struct fb_info *)registered_fb[cam->output];
++
++ /* TODO: suppose 16bpp, 4 bytes alignment */
++ win->w.left &= ~0x1;
++
++ if (win->w.width + win->w.left > cam->overlay_fb->var.xres)
++ win->w.width = cam->overlay_fb->var.xres - win->w.left;
++ if (win->w.height + win->w.top > cam->overlay_fb->var.yres)
++ win->w.height = cam->overlay_fb->var.yres - win->w.top;
++
++ /*
++ * TODO: suppose 16bpp. Rounded down to a multiple of 2 pixels for
++ * width according to PrP limitations.
++ */
++ if ((cam->rotation == V4L2_MXC_ROTATE_90_RIGHT)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_RIGHT_VFLIP)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_RIGHT_HFLIP)
++ || (cam->rotation == V4L2_MXC_ROTATE_90_LEFT))
++ win->w.height &= ~0x1;
++ else
++ win->w.width &= ~0x1;
++
++ return 0;
++}
++
++/*!
++ * start the viewfinder job
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static int start_preview(cam_data * cam)
++{
++ int err = 0;
++
++ err = prp_vf_select(cam);
++ if (err != 0)
++ return err;
++
++ cam->overlay_pid = current->pid;
++ err = cam->vf_start_sdc(cam);
++
++ return err;
++}
++
++/*!
++ * shut down the viewfinder job
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static int stop_preview(cam_data * cam)
++{
++ int err = 0;
++
++ err = prp_vf_deselect(cam);
++ return err;
++}
++
++/*!
++ * V4L2 - mxc_v4l2_g_fmt function
++ *
++ * @param cam structure cam_data *
++ *
++ * @param f structure v4l2_format *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2_g_fmt(cam_data * cam, struct v4l2_format *f)
++{
++ int retval = 0;
++
++ switch (f->type) {
++ case V4L2_BUF_TYPE_VIDEO_CAPTURE:
++ f->fmt.pix.width = cam->v2f.fmt.pix.width;
++ f->fmt.pix.height = cam->v2f.fmt.pix.height;
++ f->fmt.pix.sizeimage = cam->v2f.fmt.pix.sizeimage;
++ f->fmt.pix.pixelformat = cam->v2f.fmt.pix.pixelformat;
++ f->fmt.pix.bytesperline = cam->v2f.fmt.pix.bytesperline;
++ f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
++ retval = 0;
++ break;
++ case V4L2_BUF_TYPE_VIDEO_OVERLAY:
++ f->fmt.win = cam->win;
++ break;
++ default:
++ retval = -EINVAL;
++ }
++ return retval;
++}
++
++/*!
++ * V4L2 - mxc_v4l2_s_fmt function
++ *
++ * @param cam structure cam_data *
++ *
++ * @param f structure v4l2_format *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2_s_fmt(cam_data * cam, struct v4l2_format *f)
++{
++ int retval = 0;
++ int size = 0;
++ int bytesperline = 0;
++
++ switch (f->type) {
++ case V4L2_BUF_TYPE_VIDEO_CAPTURE:
++ if (!valid_mode(f->fmt.pix.pixelformat)) {
++ pr_debug("mxc_v4l2_s_fmt: format not supported\n");
++ retval = -EINVAL;
++ }
++
++ if (cam->rotation != V4L2_MXC_ROTATE_NONE)
++ pr_debug("mxc_v4l2_s_fmt: capture rotation ignored\n");
++
++ switch (f->fmt.pix.pixelformat) {
++ case V4L2_PIX_FMT_YUYV:
++ f->fmt.pix.width &= ~0x1; /* Multiple of 2 */
++ size = f->fmt.pix.width * f->fmt.pix.height * 2;
++ bytesperline = f->fmt.pix.width * 2;
++ break;
++ case V4L2_PIX_FMT_YUV420:
++ f->fmt.pix.width &= ~0x7; /* Multiple of 8 */
++ f->fmt.pix.height &= ~0x1; /* Multiple of 2 */
++ size = f->fmt.pix.width * f->fmt.pix.height * 3 / 2;
++ bytesperline = f->fmt.pix.width * 3 / 2;
++ break;
++ default:
++ /* Suppose it's YUV444 or 32bpp */
++ size = f->fmt.pix.width * f->fmt.pix.height * 4;
++ bytesperline = f->fmt.pix.width * 4;
++ pr_info("mxc_v4l2_s_fmt: default assume"
++ " to be YUV444 interleaved.\n");
++ break;
++ }
++
++ if (f->fmt.pix.bytesperline < bytesperline) {
++ f->fmt.pix.bytesperline = bytesperline;
++ } else {
++ bytesperline = f->fmt.pix.bytesperline;
++ }
++
++ if (f->fmt.pix.sizeimage > size) {
++ pr_debug("mxc_v4l2_s_fmt: sizeimage bigger than"
++ " needed.\n");
++ size = f->fmt.pix.sizeimage;
++ }
++ f->fmt.pix.sizeimage = size;
++
++ cam->v2f.fmt.pix.sizeimage = size;
++ cam->v2f.fmt.pix.bytesperline = bytesperline;
++ cam->v2f.fmt.pix.width = f->fmt.pix.width;
++ cam->v2f.fmt.pix.height = f->fmt.pix.height;
++ cam->v2f.fmt.pix.pixelformat = f->fmt.pix.pixelformat;
++ retval = 0;
++ break;
++ case V4L2_BUF_TYPE_VIDEO_OVERLAY:
++ retval = verify_preview(cam, &f->fmt.win);
++ cam->win = f->fmt.win;
++ break;
++ default:
++ retval = -EINVAL;
++ }
++ return retval;
++}
++
++/*!
++ * get control param
++ *
++ * @param cam structure cam_data *
++ *
++ * @param c structure v4l2_control *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_get_v42l_control(cam_data * cam, struct v4l2_control *c)
++{
++ int status = 0;
++
++ switch (c->id) {
++ case V4L2_CID_HFLIP:
++ c->value = cam->rotation;
++ break;
++ case V4L2_CID_VFLIP:
++ c->value = cam->rotation;
++ break;
++ case V4L2_CID_MXC_ROT:
++ c->value = cam->rotation;
++ break;
++ case V4L2_CID_BRIGHTNESS:
++ c->value = cam->bright;
++ break;
++ case V4L2_CID_HUE:
++ c->value = cam->hue;
++ break;
++ case V4L2_CID_CONTRAST:
++ c->value = cam->contrast;
++ break;
++ case V4L2_CID_SATURATION:
++ c->value = cam->saturation;
++ break;
++ case V4L2_CID_RED_BALANCE:
++ c->value = cam->red;
++ break;
++ case V4L2_CID_BLUE_BALANCE:
++ c->value = cam->blue;
++ break;
++ case V4L2_CID_BLACK_LEVEL:
++ c->value = cam->ae_mode;
++ break;
++ case V4L2_CID_AUTO_WHITE_BALANCE:
++ c->value = cam->awb_enable;
++ break;
++ case V4L2_CID_AUTOGAIN:
++ c->value = cam->ae_enable;
++ break;
++ case V4L2_CID_MXC_FLICKER:
++ c->value = cam->flicker_ctrl;
++ break;
++ default:
++ status = -EINVAL;
++ }
++ return status;
++}
++
++/*!
++ * V4L2 - set_control function
++ * V4L2_CID_MXC_ROT is the extention for rotation/mirroring.
++ *
++ * @param cam structure cam_data *
++ *
++ * @param c structure v4l2_control *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_set_v42l_control(cam_data * cam, struct v4l2_control *c)
++{
++ switch (c->id) {
++ case V4L2_CID_HFLIP:
++ if (c->value == 1) {
++ if ((cam->rotation != V4L2_MXC_ROTATE_VERT_FLIP) &&
++ (cam->rotation != V4L2_MXC_ROTATE_180))
++ cam->rotation = V4L2_MXC_ROTATE_HORIZ_FLIP;
++ else
++ cam->rotation = V4L2_MXC_ROTATE_180;
++ } else {
++ if (cam->rotation == V4L2_MXC_ROTATE_HORIZ_FLIP)
++ cam->rotation = V4L2_MXC_ROTATE_NONE;
++ else if (cam->rotation == V4L2_MXC_ROTATE_180)
++ cam->rotation = V4L2_MXC_ROTATE_VERT_FLIP;
++ }
++ break;
++ case V4L2_CID_VFLIP:
++ if (c->value == 1) {
++ if ((cam->rotation != V4L2_MXC_ROTATE_HORIZ_FLIP) &&
++ (cam->rotation != V4L2_MXC_ROTATE_180))
++ cam->rotation = V4L2_MXC_ROTATE_VERT_FLIP;
++ else
++ cam->rotation = V4L2_MXC_ROTATE_180;
++ } else {
++ if (cam->rotation == V4L2_MXC_ROTATE_VERT_FLIP)
++ cam->rotation = V4L2_MXC_ROTATE_NONE;
++ if (cam->rotation == V4L2_MXC_ROTATE_180)
++ cam->rotation = V4L2_MXC_ROTATE_HORIZ_FLIP;
++ }
++ break;
++ case V4L2_CID_MXC_ROT:
++ switch (c->value) {
++ case V4L2_MXC_ROTATE_NONE:
++ case V4L2_MXC_ROTATE_VERT_FLIP:
++ case V4L2_MXC_ROTATE_HORIZ_FLIP:
++ case V4L2_MXC_ROTATE_180:
++ case V4L2_MXC_ROTATE_90_RIGHT:
++ case V4L2_MXC_ROTATE_90_RIGHT_VFLIP:
++ case V4L2_MXC_ROTATE_90_RIGHT_HFLIP:
++ case V4L2_MXC_ROTATE_90_LEFT:
++ cam->rotation = c->value;
++ break;
++ default:
++ return -EINVAL;
++ }
++ break;
++ case V4L2_CID_HUE:
++ cam->hue = c->value;
++ break;
++ case V4L2_CID_CONTRAST:
++ cam->contrast = c->value;
++ break;
++ case V4L2_CID_BRIGHTNESS:
++ cam->bright = c->value;
++ case V4L2_CID_SATURATION:
++ cam->saturation = c->value;
++ case V4L2_CID_RED_BALANCE:
++ cam->red = c->value;
++ case V4L2_CID_BLUE_BALANCE:
++ cam->blue = c->value;
++ csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ cam->cam_sensor->set_color(cam->bright, cam->saturation,
++ cam->red, cam->green, cam->blue);
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ break;
++ case V4L2_CID_BLACK_LEVEL:
++ cam->ae_mode = c->value & 0x03;
++ csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ if (cam->cam_sensor->set_ae_mode)
++ cam->cam_sensor->set_ae_mode(cam->ae_mode);
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ break;
++ case V4L2_CID_MXC_FLASH:
++ break;
++ case V4L2_CID_AUTOGAIN:
++ cam->ae_enable = c->value;
++ csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ if (cam->cam_sensor->set_ae)
++ cam->cam_sensor->set_ae(cam->ae_enable);
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ break;
++ case V4L2_CID_MXC_GAIN_LIMIT:
++ cam->ae_limit = c->value;
++ csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ if (cam->cam_sensor->set_ae_limit)
++ cam->cam_sensor->set_ae_limit(cam->ae_limit);
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ break;
++ case V4L2_CID_AUTO_WHITE_BALANCE:
++ cam->awb_enable = c->value;
++ csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ if (cam->cam_sensor->set_awb)
++ cam->cam_sensor->set_awb(cam->awb_enable);
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ break;
++ case V4L2_CID_MXC_FLICKER:
++ cam->flicker_ctrl = c->value;
++ csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ if (cam->cam_sensor->flicker_control)
++ cam->cam_sensor->flicker_control(cam->flicker_ctrl);
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++/*!
++ * V4L2 - mxc_v4l2_s_param function
++ *
++ * @param cam structure cam_data *
++ *
++ * @param parm structure v4l2_streamparm *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2_s_param(cam_data * cam, struct v4l2_streamparm *parm)
++{
++ sensor_interface *param;
++ csi_signal_cfg_t csi_param;
++
++ if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
++ pr_debug("mxc_v4l2_s_param invalid type\n");
++ return -EINVAL;
++ }
++
++ if (parm->parm.capture.timeperframe.denominator >
++ cam->standard.frameperiod.denominator) {
++ pr_debug("mxc_v4l2_s_param frame rate %d larger "
++ "than standard supported %d\n",
++ parm->parm.capture.timeperframe.denominator,
++ cam->standard.frameperiod.denominator);
++ return -EINVAL;
++ }
++
++ cam->streamparm.parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
++
++ csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ param = cam->cam_sensor->config
++ (&parm->parm.capture.timeperframe.denominator,
++ parm->parm.capture.capturemode);
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++
++ cam->streamparm.parm.capture.timeperframe =
++ parm->parm.capture.timeperframe;
++
++ if ((parm->parm.capture.capturemode != 0) &&
++ (parm->parm.capture.capturemode != V4L2_MODE_HIGHQUALITY)) {
++ pr_debug("mxc_v4l2_s_param frame un-supported capture mode\n");
++ return -EINVAL;
++ }
++
++ if (parm->parm.capture.capturemode ==
++ cam->streamparm.parm.capture.capturemode) {
++ return 0;
++ }
++
++ /* resolution changed, so need to re-program the CSI */
++ csi_param.sens_clksrc = 0;
++ csi_param.clk_mode = param->clk_mode;
++ csi_param.pixclk_pol = param->pixclk_pol;
++ csi_param.data_width = param->data_width;
++ csi_param.data_pol = param->data_pol;
++ csi_param.ext_vsync = param->ext_vsync;
++ csi_param.Vsync_pol = param->Vsync_pol;
++ csi_param.Hsync_pol = param->Hsync_pol;
++ csi_init_interface(param->width, param->height, param->pixel_fmt,
++ csi_param);
++
++ if (parm->parm.capture.capturemode != V4L2_MODE_HIGHQUALITY) {
++ cam->streamparm.parm.capture.capturemode = 0;
++ } else {
++ cam->streamparm.parm.capture.capturemode =
++ V4L2_MODE_HIGHQUALITY;
++ cam->streamparm.parm.capture.extendedmode =
++ parm->parm.capture.extendedmode;
++ cam->streamparm.parm.capture.readbuffers = 1;
++ }
++ return 0;
++}
++
++/*!
++ * Dequeue one V4L capture buffer
++ *
++ * @param cam structure cam_data *
++ * @param buf structure v4l2_buffer *
++ *
++ * @return status 0 success, EINVAL invalid frame number,
++ * ETIME timeout, ERESTARTSYS interrupted by user
++ */
++static int mxc_v4l_dqueue(cam_data * cam, struct v4l2_buffer *buf)
++{
++ int retval = 0;
++ struct mxc_v4l_frame *frame;
++
++ if (!wait_event_interruptible_timeout(cam->enc_queue,
++ cam->enc_counter != 0, 10 * HZ)) {
++ if ((dq_timeout_cnt & 0x1f) == 0)
++ printk(KERN_ERR
++ "mxc_v4l_dqueue timeout enc_counter %x\n",
++ cam->enc_counter);
++ dq_timeout_cnt++;
++ return -ETIME;
++ } else if (signal_pending(current)) {
++ if (dq_intr_cnt == 0)
++ printk(KERN_ERR
++ "mxc_v4l_dqueue() interrupt received %d\n",
++ dq_intr_cnt);
++ dq_intr_cnt++;
++ return -ERESTARTSYS;
++ }
++
++ cam->enc_counter--;
++
++ frame = list_entry(cam->done_q.next, struct mxc_v4l_frame, queue);
++ list_del(cam->done_q.next);
++ if (frame->buffer.flags & V4L2_BUF_FLAG_DONE) {
++ frame->buffer.flags &= ~V4L2_BUF_FLAG_DONE;
++ } else if (frame->buffer.flags & V4L2_BUF_FLAG_QUEUED) {
++ printk(KERN_ERR "VIDIOC_DQBUF: Buffer not filled.\n");
++ frame->buffer.flags &= ~V4L2_BUF_FLAG_QUEUED;
++ retval = -EINVAL;
++ } else if ((frame->buffer.flags & 0x7) == V4L2_BUF_FLAG_MAPPED) {
++ printk(KERN_ERR "VIDIOC_DQBUF: Buffer not queued.\n");
++ retval = -EINVAL;
++ }
++
++ buf->bytesused = cam->v2f.fmt.pix.sizeimage;
++ buf->index = frame->index;
++ buf->flags = frame->buffer.flags;
++ buf->m = cam->frame[frame->index].buffer.m;
++ return retval;
++}
++
++/*!
++ * Get the current attached camera device
++ *
++ * @param inode struct i2c_client *
++ *
++ * @param int int * p_input_index
++ *
++ * @return 0 success, ENODEV for invalid device instance,
++ * -1 for other errors.
++ */
++static int mxc_get_video_input(cam_data * cam)
++{
++ int retval = 0;
++ csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ retval = cam->cam_sensor->get_status();
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ return retval;
++}
++
++/*!
++ * V4L interface - open function
++ *
++ * @param inode structure inode *
++ * @param file structure file *
++ *
++ * @return status 0 success, ENODEV invalid device instance,
++ * ENODEV timeout, ERESTARTSYS interrupted by user
++ */
++static int mxc_v4l_open(struct inode *inode, struct file *file)
++{
++ sensor_interface *param;
++ csi_signal_cfg_t csi_param;
++ struct video_device *dev = video_devdata(file);
++ cam_data *cam = dev->priv;
++ int err = 0;
++
++ dq_intr_cnt = 0;
++ dq_timeout_cnt = 0;
++ empty_wq_cnt = 0;
++ if (!cam) {
++ pr_info("Internal error, cam_data not found!\n");
++ return -ENODEV;
++ }
++
++ err = mxc_get_video_input(cam);
++ if (0 != err)
++ return -ENODEV;
++
++ if (down_interruptible(&cam->busy_lock))
++ return -EINTR;
++
++ if (signal_pending(current))
++ goto oops;
++
++ if (cam->open_count++ == 0) {
++ wait_event_interruptible(cam->power_queue,
++ cam->low_power == false);
++
++ err = prp_enc_select(cam);
++
++ cam->enc_counter = 0;
++ cam->skip_frame = 0;
++ INIT_LIST_HEAD(&cam->ready_q);
++ INIT_LIST_HEAD(&cam->working_q);
++ INIT_LIST_HEAD(&cam->done_q);
++
++ csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ param = cam->cam_sensor->reset();
++ if (param == NULL) {
++ cam->open_count--;
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ err = -ENODEV;
++ goto oops;
++ }
++ csi_param.sens_clksrc = 0;
++ csi_param.clk_mode = param->clk_mode;
++ csi_param.pixclk_pol = param->pixclk_pol;
++ csi_param.data_width = param->data_width;
++ csi_param.data_pol = param->data_pol;
++ csi_param.ext_vsync = param->ext_vsync;
++ csi_param.Vsync_pol = param->Vsync_pol;
++ csi_param.Hsync_pol = param->Hsync_pol;
++ csi_init_interface(param->width, param->height,
++ param->pixel_fmt, csi_param);
++ cam->cam_sensor->get_color(&cam->bright, &cam->saturation,
++ &cam->red, &cam->green, &cam->blue);
++ if (cam->cam_sensor->get_ae_mode)
++ cam->cam_sensor->get_ae_mode(&cam->ae_mode);
++ cam->cam_sensor->get_control_params(&cam->ae_enable,
++ &cam->awb_enable,
++ &cam->flicker_ctrl);
++ csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ prp_init(cam);
++
++ }
++
++ file->private_data = dev;
++ oops:
++ up(&cam->busy_lock);
++ return err;
++}
++
++/*!
++ * V4L interface - close function
++ *
++ * @param inode struct inode *
++ * @param file struct file *
++ *
++ * @return 0 success
++ */
++static int mxc_v4l_close(struct inode *inode, struct file *file)
++{
++ struct video_device *dev = video_devdata(file);
++ int err = 0;
++ cam_data *cam = dev->priv;
++
++ /* for the case somebody hit the ctrl C */
++ if (cam->overlay_pid == current->pid) {
++ err = stop_preview(cam);
++ cam->overlay_on = false;
++ }
++ if (cam->capture_pid == current->pid) {
++ err |= mxc_streamoff(cam);
++ cam->capture_on = false;
++ wake_up_interruptible(&cam->enc_queue);
++ wake_up_interruptible(&cam->overflow_queue);
++ }
++
++ if (--cam->open_count == 0) {
++ wait_event_interruptible(cam->power_queue,
++ cam->low_power == false);
++ pr_debug("mxc_v4l_close: release resource\n");
++
++ err |= prp_enc_deselect(cam);
++
++ mxc_free_frame_buf(cam);
++ file->private_data = NULL;
++
++ /* capture off */
++ wake_up_interruptible(&cam->enc_queue);
++ wake_up_interruptible(&cam->overflow_queue);
++ mxc_free_frames(cam);
++ cam->enc_counter++;
++ prp_exit(cam);
++ }
++
++ return err;
++}
++
++#ifdef CONFIG_VIDEO_MXC_CSI_DMA
++#include <asm/arch/dma.h>
++
++#define CSI_DMA_STATUS_IDLE 0 /* DMA is not started */
++#define CSI_DMA_STATUS_WORKING 1 /* DMA is transfering the data */
++#define CSI_DMA_STATUS_DONE 2 /* One frame completes successfully */
++#define CSI_DMA_STATUS_ERROR 3 /* Error occurs during the DMA */
++
++/*
++ * Sometimes the start of the DMA is not synchronized with the CSI
++ * SOF (Start of Frame) interrupt which will lead to incorrect
++ * captured image. In this case the driver will re-try capturing
++ * another frame. The following macro defines the maximum re-try
++ * times.
++ */
++#define CSI_DMA_RETRY 8
++
++/*
++ * Size of the physical contiguous memory area used to hold image data
++ * transfered by DMA. It can be less than the size of the image data.
++ */
++#define CSI_MEM_SIZE (1024 * 600)
++
++/* Number of bytes for one DMA transfer */
++#define CSI_DMA_LENGTH (1024 * 200)
++
++static int g_dma_channel = 0;
++static int g_dma_status = CSI_DMA_STATUS_DONE;
++static volatile int g_dma_completed; /* number of completed DMA transfers */
++static volatile int g_dma_copied; /* number of copied DMA transfers */
++static struct tasklet_struct g_dma_tasklet;
++static char *g_user_buf; /* represents the buf passed by read() */
++static int g_user_count; /* represents the count passed by read() */
++
++/*!
++ * @brief setup the DMA to transfer data
++ * There may be more than one DMA to transfer the whole image. Those
++ * DMAs work like chain. This function is used to setup the DMA in
++ * case there is enough space to hold the data.
++ * @param data pointer to the cam structure
++ */
++static void mxc_csi_dma_chaining(void *data)
++{
++ cam_data *cam = (cam_data *) data;
++ int count, chained = 0;
++ int max_dma = CSI_MEM_SIZE / CSI_DMA_LENGTH;
++ mxc_dma_requestbuf_t dma_request;
++
++ while (chained * CSI_DMA_LENGTH < g_user_count) {
++ /*
++ * Calculate how many bytes the DMA should transfer. It may
++ * be less than CSI_DMA_LENGTH if the DMA is the last one.
++ */
++ if ((chained + 1) * CSI_DMA_LENGTH > g_user_count)
++ count = g_user_count - chained * CSI_DMA_LENGTH;
++ else
++ count = CSI_DMA_LENGTH;
++ pr_debug("%s() DMA chained count = %d\n", __FUNCTION__, count);
++
++ /* Config DMA */
++ memset(&dma_request, 0, sizeof(mxc_dma_requestbuf_t));
++ dma_request.dst_addr = cam->still_buf
++ + (chained % max_dma) * CSI_DMA_LENGTH;
++ dma_request.src_addr = (dma_addr_t) CSI_CSIRXFIFO_PHYADDR;
++ dma_request.num_of_bytes = count;
++ mxc_dma_config(g_dma_channel, &dma_request, 1,
++ MXC_DMA_MODE_READ);
++
++ chained++;
++ }
++}
++
++/*!
++ * @brief Copy image data from physical contiguous memory to user space buffer
++ * Once the data are copied, there will be more spare space in the
++ * physical contiguous memory to receive data from DMA.
++ * @param data pointer to the cam structure
++ */
++static void mxc_csi_dma_task(unsigned long data)
++{
++ cam_data *cam = (cam_data *) data;
++ int count;
++ int max_dma = CSI_MEM_SIZE / CSI_DMA_LENGTH;
++
++ while (g_dma_copied < g_dma_completed) {
++ /*
++ * Calculate how many bytes the DMA has transfered. It may
++ * be less than CSI_DMA_LENGTH if the DMA is the last one.
++ */
++ if ((g_dma_copied + 1) * CSI_DMA_LENGTH > g_user_count)
++ count = g_user_count - g_dma_copied * CSI_DMA_LENGTH;
++ else
++ count = CSI_DMA_LENGTH;
++ if (copy_to_user(g_user_buf + g_dma_copied * CSI_DMA_LENGTH,
++ cam->still_buf_vaddr + (g_dma_copied % max_dma)
++ * CSI_DMA_LENGTH, count))
++ pr_debug("Warning: some bytes not copied\n");
++
++ g_dma_copied++;
++ }
++
++ /* If the whole image has been captured */
++ if (g_dma_copied * CSI_DMA_LENGTH >= g_user_count) {
++ cam->still_counter++;
++ wake_up_interruptible(&cam->still_queue);
++ }
++
++ pr_debug("%s() DMA completed = %d copied = %d\n",
++ __FUNCTION__, g_dma_completed, g_dma_copied);
++}
++
++/*!
++ * @brief DMA interrupt callback function
++ * @param data pointer to the cam structure
++ * @param error DMA error flag
++ * @param count number of bytes transfered by the DMA
++ */
++static void mxc_csi_dma_callback(void *data, int error, unsigned int count)
++{
++ cam_data *cam = (cam_data *) data;
++ int max_dma = CSI_MEM_SIZE / CSI_DMA_LENGTH;
++ unsigned long lock_flags;
++
++ spin_lock_irqsave(&cam->int_lock, lock_flags);
++
++ g_dma_completed++;
++
++ if (error != MXC_DMA_DONE) {
++ g_dma_status = CSI_DMA_STATUS_ERROR;
++ pr_debug("%s() DMA error\n", __FUNCTION__);
++ }
++
++ /* If the whole image has been captured */
++ if ((g_dma_status != CSI_DMA_STATUS_ERROR)
++ && (g_dma_completed * CSI_DMA_LENGTH >= g_user_count))
++ g_dma_status = CSI_DMA_STATUS_DONE;
++
++ if ((g_dma_status == CSI_DMA_STATUS_WORKING) &&
++ (g_dma_completed >= g_dma_copied + max_dma)) {
++ g_dma_status = CSI_DMA_STATUS_ERROR;
++ pr_debug("%s() Previous buffer over written\n", __FUNCTION__);
++ }
++
++ /* Schedule the tasklet */
++ tasklet_schedule(&g_dma_tasklet);
++
++ spin_unlock_irqrestore(&cam->int_lock, lock_flags);
++
++ pr_debug("%s() count = %d bytes\n", __FUNCTION__, count);
++}
++
++/*!
++ * @brief CSI interrupt callback function
++ * @param data pointer to the cam structure
++ * @param status CSI interrupt status
++ */
++static void mxc_csi_irq_callback(void *data, unsigned long status)
++{
++ cam_data *cam = (cam_data *) data;
++ unsigned long lock_flags;
++
++ spin_lock_irqsave(&cam->int_lock, lock_flags);
++
++ /* Wait for SOF (Start of Frame) interrupt to sync the image */
++ if (status & BIT_SOF_INT) {
++ if (g_dma_status == CSI_DMA_STATUS_IDLE) {
++ /* Start DMA transfer to capture image */
++ mxc_dma_enable(g_dma_channel);
++ g_dma_status = CSI_DMA_STATUS_WORKING;
++ pr_debug("%s() DMA started.\n", __FUNCTION__);
++ } else if (g_dma_status == CSI_DMA_STATUS_WORKING) {
++ /*
++ * Another SOF occurs during DMA transfer. In this
++ * case the image is not synchronized so need to
++ * report error and probably try again.
++ */
++ g_dma_status = CSI_DMA_STATUS_ERROR;
++ pr_debug("%s() Image is not synchronized with DMA - "
++ "SOF before DMA completes\n", __FUNCTION__);
++ }
++ }
++
++ spin_unlock_irqrestore(&cam->int_lock, lock_flags);
++
++ pr_debug("%s() g_dma_status = %d\n", __FUNCTION__, g_dma_status);
++}
++
++/*!
++ * V4L interface - read function
++ *
++ * @param file struct file *
++ * @param read buf char *
++ * @param count size_t
++ * @param ppos structure loff_t *
++ *
++ * @return bytes read
++ */
++static ssize_t
++mxc_v4l_read(struct file *file, char *buf, size_t count, loff_t * ppos)
++{
++ int err = 0;
++ struct video_device *dev = video_devdata(file);
++ cam_data *cam = dev->priv;
++ int retry = CSI_DMA_RETRY;
++
++ g_user_buf = buf;
++
++ if (down_interruptible(&cam->busy_lock))
++ return -EINTR;
++
++ /* Video capture and still image capture are exclusive */
++ if (cam->capture_on == true) {
++ err = -EBUSY;
++ goto exit0;
++ }
++
++ /* The CSI-DMA can not do CSC */
++ if (cam->v2f.fmt.pix.pixelformat != V4L2_PIX_FMT_YUYV) {
++ pr_info("mxc_v4l_read support YUYV pixel format only\n");
++ err = -EINVAL;
++ goto exit0;
++ }
++
++ /* The CSI-DMA can not do resize or crop */
++ if ((cam->v2f.fmt.pix.width != cam->crop_bounds.width)
++ || (cam->v2f.fmt.pix.height != cam->crop_bounds.height)) {
++ pr_info("mxc_v4l_read resize is not supported\n");
++ pr_info("supported image size width = %d height = %d\n",
++ cam->crop_bounds.width, cam->crop_bounds.height);
++ err = -EINVAL;
++ goto exit0;
++ }
++ if ((cam->crop_current.left != cam->crop_bounds.left)
++ || (cam->crop_current.width != cam->crop_bounds.width)
++ || (cam->crop_current.top != cam->crop_bounds.top)
++ || (cam->crop_current.height != cam->crop_bounds.height)) {
++ pr_info("mxc_v4l_read cropping is not supported\n");
++ err = -EINVAL;
++ goto exit0;
++ }
++
++ cam->still_buf_vaddr = dma_alloc_coherent(0,
++ PAGE_ALIGN(CSI_MEM_SIZE),
++ &cam->still_buf,
++ GFP_DMA | GFP_KERNEL);
++
++ if (!cam->still_buf_vaddr) {
++ pr_info("mxc_v4l_read failed at allocate still_buf\n");
++ err = -ENOBUFS;
++ goto exit0;
++ }
++
++ /* Initialize DMA */
++ g_dma_channel = mxc_dma_request(MXC_DMA_CSI_RX, "CSI RX DMA");
++ if (g_dma_channel < 0) {
++ pr_debug("mxc_v4l_read failed to request DMA channel\n");
++ err = -EIO;
++ goto exit1;
++ }
++
++ err = mxc_dma_callback_set(g_dma_channel,
++ mxc_csi_dma_callback,
++ cam);
++ if (err != 0) {
++ pr_debug("mxc_v4l_read failed to set DMA callback\n");
++ err = -EIO;
++ goto exit2;
++ }
++
++ g_user_buf = buf;
++ if (cam->v2f.fmt.pix.sizeimage < count)
++ g_user_count = cam->v2f.fmt.pix.sizeimage;
++ else
++ g_user_count = count & ~0x3;
++
++ tasklet_init(&g_dma_tasklet, mxc_csi_dma_task, (unsigned long)cam);
++ g_dma_status = CSI_DMA_STATUS_DONE;
++ csi_set_callback(mxc_csi_irq_callback, cam);
++ csi_enable_prpif(0);
++
++ /* clear current SOF first */
++ csi_clear_status(BIT_SOF_INT);
++ csi_enable_mclk(CSI_MCLK_RAW, true, true);
++
++ do {
++ g_dma_completed = g_dma_copied = 0;
++ mxc_csi_dma_chaining(cam);
++ cam->still_counter = 0;
++ g_dma_status = CSI_DMA_STATUS_IDLE;
++
++ if (!wait_event_interruptible_timeout(cam->still_queue,
++ cam->still_counter != 0,
++ 10 * HZ)) {
++ pr_info("mxc_v4l_read timeout counter %x\n",
++ cam->still_counter);
++ err = -ETIME;
++ goto exit3;
++ }
++
++ if (g_dma_status == CSI_DMA_STATUS_DONE)
++ break;
++
++ if (retry-- == 0)
++ break;
++
++ pr_debug("Now retry image capture\n");
++ } while (1);
++
++ if (g_dma_status != CSI_DMA_STATUS_DONE)
++ err = -EIO;
++
++ exit3:
++ csi_enable_prpif(1);
++ g_dma_status = CSI_DMA_STATUS_DONE;
++ csi_set_callback(0, 0);
++ csi_enable_mclk(CSI_MCLK_RAW, false, false);
++ tasklet_kill(&g_dma_tasklet);
++
++ exit2:
++ mxc_dma_free(g_dma_channel);
++
++ exit1:
++ dma_free_coherent(0, PAGE_ALIGN(CSI_MEM_SIZE),
++ cam->still_buf_vaddr, cam->still_buf);
++ cam->still_buf = 0;
++
++ exit0:
++ up(&cam->busy_lock);
++ if (err < 0)
++ return err;
++ else
++ return g_user_count;
++}
++#else
++/*!
++ * V4L interface - read function
++ *
++ * @param file struct file *
++ * @param read buf char *
++ * @param count size_t
++ * @param ppos structure loff_t *
++ *
++ * @return bytes read
++ */
++static ssize_t
++mxc_v4l_read(struct file *file, char *buf, size_t count, loff_t * ppos)
++{
++ int err = 0;
++ u8 *v_address;
++ struct video_device *dev = video_devdata(file);
++ cam_data *cam = dev->priv;
++
++ if (down_interruptible(&cam->busy_lock))
++ return -EINTR;
++
++ /* Video capture and still image capture are exclusive */
++ if (cam->capture_on == true) {
++ err = -EBUSY;
++ goto exit0;
++ }
++
++ v_address = dma_alloc_coherent(0,
++ PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage),
++ &cam->still_buf, GFP_DMA | GFP_KERNEL);
++
++ if (!v_address) {
++ pr_info("mxc_v4l_read failed at allocate still_buf\n");
++ err = -ENOBUFS;
++ goto exit0;
++ }
++
++ if (prp_still_select(cam)) {
++ err = -EIO;
++ goto exit1;
++ }
++
++ cam->still_counter = 0;
++ if (cam->csi_start(cam)) {
++ err = -EIO;
++ goto exit2;
++ }
++
++ if (!wait_event_interruptible_timeout(cam->still_queue,
++ cam->still_counter != 0,
++ 10 * HZ)) {
++ pr_info("mxc_v4l_read timeout counter %x\n",
++ cam->still_counter);
++ err = -ETIME;
++ goto exit2;
++ }
++ err = copy_to_user(buf, v_address, cam->v2f.fmt.pix.sizeimage);
++
++ exit2:
++ prp_still_deselect(cam);
++
++ exit1:
++ dma_free_coherent(0, cam->v2f.fmt.pix.sizeimage, v_address,
++ cam->still_buf);
++ cam->still_buf = 0;
++
++ exit0:
++ up(&cam->busy_lock);
++ if (err < 0)
++ return err;
++ else
++ return (cam->v2f.fmt.pix.sizeimage - err);
++}
++#endif /* CONFIG_VIDEO_MXC_CSI_DMA */
++
++/*!
++ * V4L interface - ioctl function
++ *
++ * @param inode struct inode *
++ *
++ * @param file struct file *
++ *
++ * @param ioctlnr unsigned int
++ *
++ * @param arg void *
++ *
++ * @return 0 success, ENODEV for invalid device instance,
++ * -1 for other errors.
++ */
++static int
++mxc_v4l_do_ioctl(struct inode *inode, struct file *file,
++ unsigned int ioctlnr, void *arg)
++{
++ struct video_device *dev = video_devdata(file);
++ cam_data *cam = dev->priv;
++ int retval = 0;
++ unsigned long lock_flags;
++
++ if (!cam)
++ return -EBADF;
++
++ wait_event_interruptible(cam->power_queue, cam->low_power == false);
++ /* make this _really_ smp-safe */
++ if (down_interruptible(&cam->busy_lock))
++ return -EBUSY;
++
++ switch (ioctlnr) {
++ /*!
++ * V4l2 VIDIOC_QUERYCAP ioctl
++ */
++ case VIDIOC_QUERYCAP:{
++ struct v4l2_capability *cap = arg;
++ strcpy(cap->driver, "mxc_v4l2");
++ cap->version = KERNEL_VERSION(0, 1, 11);
++ cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
++ V4L2_CAP_VIDEO_OVERLAY | V4L2_CAP_STREAMING
++ | V4L2_CAP_READWRITE;
++ cap->card[0] = '\0';
++ cap->bus_info[0] = '\0';
++ retval = 0;
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_G_FMT ioctl
++ */
++ case VIDIOC_G_FMT:{
++ struct v4l2_format *gf = arg;
++ retval = mxc_v4l2_g_fmt(cam, gf);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_S_FMT ioctl
++ */
++ case VIDIOC_S_FMT:{
++ struct v4l2_format *sf = arg;
++ retval = mxc_v4l2_s_fmt(cam, sf);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_REQBUFS ioctl
++ */
++ case VIDIOC_REQBUFS:{
++ struct v4l2_requestbuffers *req = arg;
++ int i;
++ if (req->count > FRAME_NUM) {
++ pr_info("VIDIOC_REQBUFS: not enough buffer\n");
++ req->count = FRAME_NUM;
++ }
++
++ if ((req->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ||
++ ((req->memory != V4L2_MEMORY_MMAP)
++ && (req->memory != V4L2_MEMORY_USERPTR))) {
++ pr_debug("VIDIOC_REQBUFS: wrong buffer type\n");
++ retval = -EINVAL;
++ break;
++ }
++
++ mxc_streamoff(cam);
++ mxc_free_frame_buf(cam);
++
++ if (req->memory == V4L2_MEMORY_MMAP)
++ retval =
++ mxc_allocate_frame_buf(cam, req->count);
++ else if (req->memory == V4L2_MEMORY_USERPTR) {
++ for (i = 0; i < req->count; i++) {
++ cam->frame[i].vaddress = 0;
++ cam->frame[i].buffer.index = i;
++ cam->frame[i].buffer.type =
++ V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ cam->frame[i].buffer.flags = 0;
++ cam->frame[i].buffer.length = 0;
++ cam->frame[i].buffer.memory =
++ V4L2_MEMORY_USERPTR;
++ cam->frame[i].buffer.m.offset = 0;
++ cam->frame[i].index = i;
++ }
++ }
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_QUERYBUF ioctl
++ */
++ case VIDIOC_QUERYBUF:{
++ struct v4l2_buffer *buf = arg;
++ int index = buf->index;
++
++ if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
++ pr_debug
++ ("VIDIOC_QUERYBUFS: wrong buffer type\n");
++ retval = -EINVAL;
++ break;
++ }
++
++ memset(buf, 0, sizeof(buf));
++ buf->index = index;
++
++ down(&cam->param_lock);
++ retval = mxc_v4l2_buffer_status(cam, buf);
++ up(&cam->param_lock);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_QBUF ioctl
++ */
++ case VIDIOC_QBUF:{
++ struct v4l2_buffer *buf = arg;
++ int index = buf->index;
++
++ pr_debug("VIDIOC_QBUF: %d\n", buf->index);
++ wait_event_interruptible(cam->overflow_queue,
++ cam->overflow == 0);
++ spin_lock_irqsave(&cam->int_lock, lock_flags);
++ if (cam->frame[index].buffer.memory == V4L2_MEMORY_MMAP) {
++ if ((cam->frame[index].buffer.flags & 0x7) ==
++ V4L2_BUF_FLAG_MAPPED) {
++ cam->frame[index].buffer.flags |=
++ V4L2_BUF_FLAG_QUEUED;
++ if (cam->skip_frame > 0) {
++ prphw_enable(PRP_CHANNEL_2);
++ list_add_tail(&cam->
++ frame[index].
++ queue,
++ &cam->working_q);
++ retval =
++ cam->enc_update_eba(cam->
++ frame
++ [index].
++ paddress,
++ &cam->
++ ping_pong_csi);
++ cam->skip_frame = 0;
++ } else {
++ list_add_tail(&cam->
++ frame[index].
++ queue,
++ &cam->ready_q);
++ }
++ } else if (cam->frame[index].buffer.flags &
++ V4L2_BUF_FLAG_QUEUED) {
++ pr_debug
++ ("VIDIOC_QBUF: buffer already queued\n");
++ } else if (cam->frame[index].buffer.
++ flags & V4L2_BUF_FLAG_DONE) {
++ pr_debug
++ ("VIDIOC_QBUF: overwrite done buffer.\n");
++ cam->frame[index].buffer.flags &=
++ ~V4L2_BUF_FLAG_DONE;
++ cam->frame[index].buffer.flags |=
++ V4L2_BUF_FLAG_QUEUED;
++ }
++ } else {
++ cam->frame[index].buffer.flags =
++ (V4L2_BUF_FLAG_MAPPED |
++ V4L2_BUF_FLAG_QUEUED);
++ cam->frame[index].buffer.m.offset =
++ buf->m.offset;
++ cam->frame[index].paddress = buf->m.offset;
++ cam->frame[index].buffer.length = buf->length;
++ if (cam->skip_frame > 0) {
++ prphw_enable(PRP_CHANNEL_2);
++ list_add_tail(&cam->frame[index].queue,
++ &cam->working_q);
++ retval =
++ cam->enc_update_eba(cam->
++ frame[index].
++ paddress,
++ &cam->
++ ping_pong_csi);
++ cam->skip_frame = 0;
++ } else {
++ list_add_tail(&cam->frame[index].queue,
++ &cam->ready_q);
++ }
++ }
++ buf->flags = cam->frame[index].buffer.flags;
++ spin_unlock_irqrestore(&cam->int_lock, lock_flags);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_DQBUF ioctl
++ */
++ case VIDIOC_DQBUF:{
++ struct v4l2_buffer *buf = arg;
++
++ retval = mxc_v4l_dqueue(cam, buf);
++
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_STREAMON ioctl
++ */
++ case VIDIOC_STREAMON:{
++ cam->capture_on = true;
++ retval = mxc_streamon(cam);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_STREAMOFF ioctl
++ */
++ case VIDIOC_STREAMOFF:{
++ retval = mxc_streamoff(cam);
++ cam->capture_on = false;
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_G_CTRL ioctl
++ */
++ case VIDIOC_G_CTRL:{
++ retval = mxc_get_v42l_control(cam, arg);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_S_CTRL ioctl
++ */
++ case VIDIOC_S_CTRL:{
++ retval = mxc_set_v42l_control(cam, arg);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_CROPCAP ioctl
++ */
++ case VIDIOC_CROPCAP:{
++ struct v4l2_cropcap *cap = arg;
++
++ if (cap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
++ cap->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) {
++ retval = -EINVAL;
++ break;
++ }
++ cap->bounds = cam->crop_bounds;
++ cap->defrect = cam->crop_defrect;
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_G_CROP ioctl
++ */
++ case VIDIOC_G_CROP:{
++ struct v4l2_crop *crop = arg;
++
++ if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
++ crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) {
++ retval = -EINVAL;
++ break;
++ }
++ crop->c = cam->crop_current;
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_S_CROP ioctl
++ */
++ case VIDIOC_S_CROP:{
++ struct v4l2_crop *crop = arg;
++ struct v4l2_rect *b = &cam->crop_bounds;
++ int i;
++
++ if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
++ crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) {
++ retval = -EINVAL;
++ break;
++ }
++
++ crop->c.top = (crop->c.top < b->top) ? b->top
++ : crop->c.top;
++ if (crop->c.top > b->top + b->height)
++ crop->c.top = b->top + b->height - 1;
++ if (crop->c.height > b->top + b->height - crop->c.top)
++ crop->c.height =
++ b->top + b->height - crop->c.top;
++
++ crop->c.left = (crop->c.left < b->left) ? b->left
++ : crop->c.left;
++ if (crop->c.left > b->left + b->width)
++ crop->c.left = b->left + b->width - 1;
++ if (crop->c.width > b->left - crop->c.left + b->width)
++ crop->c.width =
++ b->left - crop->c.left + b->width;
++
++ crop->c.width &= ~0x1;
++
++ /*
++ * MX27 PrP limitation:
++ * The right spare space (CSI_FRAME_X_SIZE
++ * - SOURCE_LINE_STRIDE - PICTURE_X_SIZE)) must be
++ * multiple of 32.
++ * So we tune the crop->c.left value to the closest
++ * desired cropping value and meet the PrP requirement.
++ */
++ i = ((b->left + b->width)
++ - (crop->c.left + crop->c.width)) % 32;
++ if (i <= 16) {
++ if (crop->c.left + crop->c.width + i
++ <= b->left + b->width)
++ crop->c.left += i;
++ else if (crop->c.left - (32 - i) >= b->left)
++ crop->c.left -= 32 - i;
++ else {
++ retval = -EINVAL;
++ break;
++ }
++ } else {
++ if (crop->c.left - (32 - i) >= b->left)
++ crop->c.left -= 32 - i;
++ else if (crop->c.left + crop->c.width + i
++ <= b->left + b->width)
++ crop->c.left += i;
++ else {
++ retval = -EINVAL;
++ break;
++ }
++ }
++
++ cam->crop_current = crop->c;
++
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_OVERLAY ioctl
++ */
++ case VIDIOC_OVERLAY:{
++ int *on = arg;
++ if (*on) {
++ cam->overlay_on = true;
++ retval = start_preview(cam);
++ }
++ if (!*on) {
++ retval = stop_preview(cam);
++ cam->overlay_on = false;
++ }
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_G_FBUF ioctl
++ */
++ case VIDIOC_G_FBUF:{
++ struct v4l2_framebuffer *fb = arg;
++ struct fb_var_screeninfo *var;
++
++ if (cam->output >= num_registered_fb) {
++ retval = -EINVAL;
++ break;
++ }
++
++ var = &registered_fb[cam->output]->var;
++ cam->v4l2_fb.fmt.width = var->xres;
++ cam->v4l2_fb.fmt.height = var->yres;
++ cam->v4l2_fb.fmt.bytesperline =
++ var->xres_virtual * var->bits_per_pixel;
++ cam->v4l2_fb.fmt.colorspace = V4L2_COLORSPACE_SRGB;
++ *fb = cam->v4l2_fb;
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_S_FBUF ioctl
++ */
++ case VIDIOC_S_FBUF:{
++ struct v4l2_framebuffer *fb = arg;
++ cam->v4l2_fb.flags = fb->flags;
++ cam->v4l2_fb.fmt.pixelformat = fb->fmt.pixelformat;
++ break;
++ }
++
++ case VIDIOC_G_PARM:{
++ struct v4l2_streamparm *parm = arg;
++ if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
++ pr_debug("VIDIOC_G_PARM invalid type\n");
++ retval = -EINVAL;
++ break;
++ }
++ parm->parm.capture = cam->streamparm.parm.capture;
++ break;
++ }
++ case VIDIOC_S_PARM:{
++ struct v4l2_streamparm *parm = arg;
++ retval = mxc_v4l2_s_param(cam, parm);
++ break;
++ }
++
++ /* linux v4l2 bug, kernel c0485619 user c0405619 */
++ case VIDIOC_ENUMSTD:{
++ struct v4l2_standard *e = arg;
++ *e = cam->standard;
++ pr_debug("VIDIOC_ENUMSTD call\n");
++ retval = 0;
++ break;
++ }
++
++ case VIDIOC_G_STD:{
++ v4l2_std_id *e = arg;
++ *e = cam->standard.id;
++ break;
++ }
++
++ case VIDIOC_S_STD:{
++ break;
++ }
++
++ case VIDIOC_ENUMOUTPUT:
++ {
++ struct v4l2_output *output = arg;
++
++ if (output->index >= num_registered_fb) {
++ retval = -EINVAL;
++ break;
++ }
++
++ strncpy(output->name,
++ registered_fb[output->index]->fix.id, 31);
++ output->type = V4L2_OUTPUT_TYPE_ANALOG;
++ output->audioset = 0;
++ output->modulator = 0;
++ output->std = V4L2_STD_UNKNOWN;
++
++ break;
++ }
++ case VIDIOC_G_OUTPUT:
++ {
++ int *p_output_num = arg;
++
++ *p_output_num = cam->output;
++ break;
++ }
++ case VIDIOC_S_OUTPUT:
++ {
++ int *p_output_num = arg;
++
++ if (*p_output_num >= num_registered_fb) {
++ retval = -EINVAL;
++ break;
++ }
++
++ cam->output = *p_output_num;
++ break;
++ }
++
++ case VIDIOC_G_INPUT:
++ {
++ int *p_input_index = arg;
++
++ retval = mxc_get_video_input(cam);
++ if (0 == retval)
++ *p_input_index = 1;
++ else
++ *p_input_index = -ENODEV;
++
++ break;
++ }
++
++ case VIDIOC_ENUM_FMT:
++ case VIDIOC_TRY_FMT:
++ case VIDIOC_QUERYCTRL:
++ case VIDIOC_ENUMINPUT:
++ case VIDIOC_S_INPUT:
++ case VIDIOC_G_TUNER:
++ case VIDIOC_S_TUNER:
++ case VIDIOC_G_FREQUENCY:
++ case VIDIOC_S_FREQUENCY:
++ default:
++ retval = -EINVAL;
++ break;
++ }
++
++ up(&cam->busy_lock);
++ return retval;
++}
++
++/*
++ * V4L interface - ioctl function
++ *
++ * @return None
++ */
++static int
++mxc_v4l_ioctl(struct inode *inode, struct file *file,
++ unsigned int cmd, unsigned long arg)
++{
++ return video_usercopy(inode, file, cmd, arg, mxc_v4l_do_ioctl);
++}
++
++/*!
++ * V4L interface - mmap function
++ *
++ * @param file structure file *
++ *
++ * @param vma structure vm_area_struct *
++ *
++ * @return status 0 Success, EINTR busy lock error, ENOBUFS remap_page error
++ */
++static int mxc_mmap(struct file *file, struct vm_area_struct *vma)
++{
++ struct video_device *dev = video_devdata(file);
++ unsigned long size;
++ int res = 0;
++ cam_data *cam = dev->priv;
++
++ pr_debug("pgoff=0x%lx, start=0x%lx, end=0x%lx\n",
++ vma->vm_pgoff, vma->vm_start, vma->vm_end);
++
++ /* make this _really_ smp-safe */
++ if (down_interruptible(&cam->busy_lock))
++ return -EINTR;
++
++ size = vma->vm_end - vma->vm_start;
++ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
++
++ if (remap_pfn_range(vma, vma->vm_start,
++ vma->vm_pgoff, size, vma->vm_page_prot)) {
++ pr_debug("mxc_mmap: remap_pfn_range failed\n");
++ res = -ENOBUFS;
++ goto mxc_mmap_exit;
++ }
++
++ vma->vm_flags &= ~VM_IO; /* using shared anonymous pages */
++
++ mxc_mmap_exit:
++ up(&cam->busy_lock);
++ return res;
++}
++
++/*!
++ * V4L interface - poll function
++ *
++ * @param file structure file *
++ *
++ * @param wait structure poll_table *
++ *
++ * @return status POLLIN | POLLRDNORM
++ */
++static unsigned int mxc_poll(struct file *file, poll_table * wait)
++{
++ struct video_device *dev = video_devdata(file);
++ cam_data *cam = dev->priv;
++ wait_queue_head_t *queue = NULL;
++ int res = POLLIN | POLLRDNORM;
++
++ if (down_interruptible(&cam->busy_lock))
++ return -EINTR;
++
++ queue = &cam->enc_queue;
++ poll_wait(file, queue, wait);
++
++ up(&cam->busy_lock);
++ return res;
++}
++
++static struct
++file_operations mxc_v4l_fops = {
++ .owner = THIS_MODULE,
++ .open = mxc_v4l_open,
++ .release = mxc_v4l_close,
++ .read = mxc_v4l_read,
++ .ioctl = mxc_v4l_ioctl,
++ .mmap = mxc_mmap,
++ .poll = mxc_poll,
++};
++
++static struct video_device mxc_v4l_template = {
++ .owner = THIS_MODULE,
++ .name = "Mxc Camera",
++ .type = 0,
++ .type2 = VID_TYPE_CAPTURE,
++ .hardware = 0,
++ .fops = &mxc_v4l_fops,
++ .release = video_device_release,
++};
++
++static void camera_platform_release(struct device *device)
++{
++}
++
++/*! Device Definition for Mt9v111 devices */
++static struct platform_device mxc_v4l2_devices = {
++ .name = "mxc_v4l2",
++ .dev = {
++ .release = camera_platform_release,
++ },
++ .id = 0,
++};
++
++extern struct camera_sensor camera_sensor_if;
++
++/*!
++* Camera V4l2 callback function.
++*
++* @return status
++*/
++static void camera_callback(u32 mask, void *dev)
++{
++ struct mxc_v4l_frame *done_frame;
++ struct mxc_v4l_frame *ready_frame;
++
++ cam_data *cam = (cam_data *) dev;
++ if (cam == NULL)
++ return;
++
++ if (mask == 1) {
++ if (cam->overflow == 0) {
++ cam->overflow = 1;
++ queue_work(v4l2_work, &prp_reset_work);
++ }
++ return;
++ }
++
++ if (list_empty(&cam->working_q)) {
++ if (empty_wq_cnt == 0) {
++ printk(KERN_ERR
++ "camera_callback: working queue empty %d\n",
++ empty_wq_cnt);
++ }
++ empty_wq_cnt++;
++ if (list_empty(&cam->ready_q)) {
++ prphw_disable(PRP_CHANNEL_2);
++ cam->skip_frame++;
++ } else {
++ ready_frame =
++ list_entry(cam->ready_q.next, struct mxc_v4l_frame,
++ queue);
++ list_del(cam->ready_q.next);
++ list_add_tail(&ready_frame->queue, &cam->working_q);
++ cam->enc_update_eba(ready_frame->paddress,
++ &cam->ping_pong_csi);
++ }
++ return;
++ }
++
++ done_frame =
++ list_entry(cam->working_q.next, struct mxc_v4l_frame, queue);
++ if (done_frame->buffer.flags & V4L2_BUF_FLAG_QUEUED) {
++ done_frame->buffer.flags |= V4L2_BUF_FLAG_DONE;
++ done_frame->buffer.flags &= ~V4L2_BUF_FLAG_QUEUED;
++
++ list_del(cam->working_q.next);
++ if (list_empty(&cam->ready_q)) {
++ if (list_empty(&cam->working_q))
++ prphw_disable(PRP_CHANNEL_2);
++ cam->skip_frame++;
++ } else {
++ ready_frame =
++ list_entry(cam->ready_q.next, struct mxc_v4l_frame,
++ queue);
++ list_del(cam->ready_q.next);
++ list_add_tail(&ready_frame->queue, &cam->working_q);
++ cam->enc_update_eba(ready_frame->paddress,
++ &cam->ping_pong_csi);
++ }
++
++ /* Added to the done queue */
++ list_add_tail(&done_frame->queue, &cam->done_q);
++
++ /* Wake up the queue */
++ cam->enc_counter++;
++ wake_up_interruptible(&cam->enc_queue);
++ } else {
++ printk(KERN_ERR "camera_callback :buffer not queued\n");
++ }
++}
++
++/*!
++ * initialize cam_data structure
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static void init_camera_struct(cam_data * cam)
++{
++ int i;
++
++ /* Default everything to 0 */
++ memset(cam, 0, sizeof(cam_data));
++
++ init_MUTEX(&cam->param_lock);
++ init_MUTEX(&cam->busy_lock);
++
++ cam->video_dev = video_device_alloc();
++ if (cam->video_dev == NULL)
++ return;
++
++ *(cam->video_dev) = mxc_v4l_template;
++
++ video_set_drvdata(cam->video_dev, cam);
++ dev_set_drvdata(&mxc_v4l2_devices.dev, cam);
++ cam->video_dev->minor = -1;
++
++ for (i = 0; i < FRAME_NUM; i++) {
++ cam->frame[i].width = 0;
++ cam->frame[i].height = 0;
++ cam->frame[i].paddress = 0;
++ }
++
++ init_waitqueue_head(&cam->enc_queue);
++ init_waitqueue_head(&cam->still_queue);
++ init_waitqueue_head(&cam->overflow_queue);
++ cam->overflow = 0;
++
++ /* setup cropping */
++ cam->crop_bounds.left = 0;
++ cam->crop_bounds.width = 640;
++ cam->crop_bounds.top = 0;
++ cam->crop_bounds.height = 480;
++ cam->crop_current = cam->crop_defrect = cam->crop_bounds;
++ cam->streamparm.parm.capture.capturemode = 0;
++
++ cam->standard.index = 0;
++ cam->standard.id = V4L2_STD_UNKNOWN;
++ cam->standard.frameperiod.denominator = 30;
++ cam->standard.frameperiod.numerator = 1;
++ cam->standard.framelines = 480;
++ cam->streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ cam->streamparm.parm.capture.timeperframe = cam->standard.frameperiod;
++ cam->streamparm.parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
++ cam->overlay_on = false;
++ cam->capture_on = false;
++ cam->skip_frame = 0;
++ cam->v4l2_fb.capability = V4L2_FBUF_CAP_EXTERNOVERLAY;
++ cam->v4l2_fb.flags = V4L2_FBUF_FLAG_PRIMARY;
++
++ cam->v2f.fmt.pix.sizeimage = 352 * 288 * 3 / 2;
++ cam->v2f.fmt.pix.bytesperline = 288 * 3 / 2;
++ cam->v2f.fmt.pix.width = 288;
++ cam->v2f.fmt.pix.height = 352;
++ cam->v2f.fmt.pix.pixelformat = V4L2_PIX_FMT_YUV420;
++ cam->win.w.width = 160;
++ cam->win.w.height = 160;
++ cam->win.w.left = 0;
++ cam->win.w.top = 0;
++
++ cam->cam_sensor = &camera_sensor_if;
++ cam->enc_callback = camera_callback;
++
++ init_waitqueue_head(&cam->power_queue);
++ cam->int_lock = SPIN_LOCK_UNLOCKED;
++ spin_lock_init(&cam->int_lock);
++}
++
++extern void gpio_sensor_active(void);
++extern void gpio_sensor_inactive(void);
++
++/*!
++ * camera_power function
++ * Turn Sensor power On/Off
++ *
++ * @param cameraOn true to turn camera on, otherwise shut down
++ *
++ * @return status
++ */
++static u8 camera_power(bool cameraOn)
++{
++ if (cameraOn == true) {
++ gpio_sensor_active();
++ csi_enable_mclk(csi_mclk_flag_backup, true, true);
++ } else {
++ csi_mclk_flag_backup = csi_read_mclk_flag();
++ csi_enable_mclk(csi_mclk_flag_backup, false, false);
++ gpio_sensor_inactive();
++ }
++ return 0;
++}
++
++/*!
++ * This function is called to put the sensor in a low power state. Refer to the
++ * document driver-model/driver.txt in the kernel source tree for more
++ * information.
++ *
++ * @param pdev the device structure used to give information on which I2C
++ * to suspend
++ * @param state the power state the device is entering
++ *
++ * @return The function returns 0 on success and -1 on failure.
++ */
++static int mxc_v4l2_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ cam_data *cam = platform_get_drvdata(pdev);
++
++ cam->low_power = true;
++
++ if (cam->overlay_on == true)
++ stop_preview(cam);
++ if ((cam->capture_on == true) && cam->enc_disable) {
++ cam->enc_disable(cam);
++ }
++ camera_power(false);
++
++ return 0;
++}
++
++/*!
++ * This function is called to bring the sensor back from a low power state.Refer
++ * to the document driver-model/driver.txt in the kernel source tree for more
++ * information.
++ *
++ * @param pdev the device structure
++ *
++ * @return The function returns 0 on success and -1 on failure
++ */
++static int mxc_v4l2_resume(struct platform_device *pdev)
++{
++ cam_data *cam = platform_get_drvdata(pdev);
++
++ cam->low_power = false;
++ wake_up_interruptible(&cam->power_queue);
++
++ if (cam->overlay_on == true)
++ start_preview(cam);
++ if (cam->capture_on == true)
++ mxc_streamon(cam);
++ camera_power(true);
++
++ return 0;
++}
++
++/*!
++ * This structure contains pointers to the power management callback functions.
++ */
++static struct platform_driver mxc_v4l2_driver = {
++ .driver = {
++ .name = "mxc_v4l2",
++ .owner = THIS_MODULE,
++ .bus = &platform_bus_type,
++ },
++ .probe = NULL,
++ .remove = NULL,
++ .suspend = mxc_v4l2_suspend,
++ .resume = mxc_v4l2_resume,
++ .shutdown = NULL,
++};
++
++/*!
++ * Entry point for the V4L2
++ *
++ * @return Error code indicating success or failure
++ */
++static __init int camera_init(void)
++{
++ u8 err = 0;
++ cam_data *cam;
++
++ if ((g_cam = cam = kzalloc(sizeof(cam_data), GFP_KERNEL)) == NULL) {
++ pr_debug("failed to mxc_v4l_register_camera\n");
++ return -ENOMEM;
++ }
++
++ init_camera_struct(cam);
++
++ v4l2_work = create_singlethread_workqueue("v4l2_emma");
++
++ /* Register the I2C device */
++ err = platform_device_register(&mxc_v4l2_devices);
++ if (err != 0) {
++ pr_debug("camera_init: platform_device_register failed.\n");
++ video_device_release(cam->video_dev);
++ kfree(cam);
++ g_cam = NULL;
++ }
++
++ /* Register the device driver structure. */
++ err = platform_driver_register(&mxc_v4l2_driver);
++ if (err != 0) {
++ platform_device_unregister(&mxc_v4l2_devices);
++ pr_debug("camera_init: driver_register failed.\n");
++ video_device_release(cam->video_dev);
++ kfree(cam);
++ g_cam = NULL;
++ return err;
++ }
++
++ /* register v4l device */
++ err = video_register_device(cam->video_dev, VFL_TYPE_GRABBER, video_nr);
++ if (err != 0) {
++ platform_driver_unregister(&mxc_v4l2_driver);
++ platform_device_unregister(&mxc_v4l2_devices);
++ video_device_release(cam->video_dev);
++ kfree(cam);
++ g_cam = NULL;
++ pr_debug("video_register_device failed\n");
++ return err;
++ }
++
++ return err;
++}
++
++/*!
++ * Exit and cleanup for the V4L2
++ *
++ */
++static void __exit camera_exit(void)
++{
++ pr_debug("unregistering video\n");
++
++ flush_workqueue(v4l2_work);
++ destroy_workqueue(v4l2_work);
++
++ video_unregister_device(g_cam->video_dev);
++
++ platform_driver_unregister(&mxc_v4l2_driver);
++ platform_device_unregister(&mxc_v4l2_devices);
++
++ if (g_cam->open_count) {
++ pr_debug("camera open -- setting ops to NULL\n");
++ } else {
++ pr_debug("freeing camera\n");
++ mxc_free_frame_buf(g_cam);
++ kfree(g_cam);
++ g_cam = NULL;
++ }
++}
++
++module_init(camera_init);
++module_exit(camera_exit);
++
++module_param(video_nr, int, 0444);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("V4L2 capture driver for Mxc based cameras");
++MODULE_LICENSE("GPL");
++MODULE_SUPPORTED_DEVICE("video");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mxc_v4l2_capture.c linux-2.6.28-karo/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
+--- linux-2.6.28/drivers/media/video/mxc/capture/mxc_v4l2_capture.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mxc_v4l2_capture.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,1867 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file drivers/media/video/mxc/capture/mxc_v4l2_capture.c
++ *
++ * @brief Mxc Video For Linux 2 driver
++ *
++ * @ingroup MXC_V4L2_CAPTURE
++ */
++
++#include <linux/version.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/fs.h>
++#include <linux/slab.h>
++#include <linux/ctype.h>
++#include <asm/io.h>
++#include <asm/semaphore.h>
++#include <linux/pagemap.h>
++#include <linux/vmalloc.h>
++#include <linux/types.h>
++#include <linux/fb.h>
++#include <linux/dma-mapping.h>
++
++#include <asm/arch/mxcfb.h>
++#include "mxc_v4l2_capture.h"
++#include "ipu_prp_sw.h"
++
++static int csi_mclk_flag_backup;
++static int video_nr = -1;
++cam_data *g_cam;
++EXPORT_SYMBOL(g_cam);
++
++#define MXC_V4L2_CAPTURE_NUM_OUTPUTS 2
++static struct v4l2_output mxc_capture_outputs[MXC_V4L2_CAPTURE_NUM_OUTPUTS] = {
++ {
++ .index = 0,
++ .name = "DISP3",
++ .type = V4L2_OUTPUT_TYPE_ANALOG,
++ .audioset = 0,
++ .modulator = 0,
++ .std = V4L2_STD_UNKNOWN,
++ },
++ {
++ .index = 1,
++ .name = "DISP0",
++ .type = V4L2_OUTPUT_TYPE_ANALOG,
++ .audioset = 0,
++ .modulator = 0,
++ .std = V4L2_STD_UNKNOWN,
++ }
++};
++
++/*!
++ * Free frame buffers
++ *
++ * @param cam Structure cam_data *
++ *
++ * @return status 0 success.
++ */
++static int mxc_free_frame_buf(cam_data * cam)
++{
++ int i;
++
++ for (i = 0; i < FRAME_NUM; i++) {
++ if (cam->frame[i].vaddress != 0) {
++ dma_free_coherent(0, cam->frame[i].buffer.length,
++ cam->frame[i].vaddress,
++ cam->frame[i].paddress);
++ cam->frame[i].vaddress = 0;
++ }
++ }
++
++ return 0;
++}
++
++/*!
++ * Allocate frame buffers
++ *
++ * @param cam Structure cam_data *
++ *
++ * @param count int number of buffer need to allocated
++ *
++ * @return status -0 Successfully allocated a buffer, -ENOBUFS failed.
++ */
++static int mxc_allocate_frame_buf(cam_data * cam, int count)
++{
++ int i;
++
++ for (i = 0; i < count; i++) {
++ cam->frame[i].vaddress =
++ dma_alloc_coherent(0,
++ PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage),
++ &cam->frame[i].paddress,
++ GFP_DMA | GFP_KERNEL);
++ if (cam->frame[i].vaddress == 0) {
++ printk(KERN_ERR "mxc_allocate_frame_buf failed.\n");
++ mxc_free_frame_buf(cam);
++ return -ENOBUFS;
++ }
++ cam->frame[i].buffer.index = i;
++ cam->frame[i].buffer.flags = V4L2_BUF_FLAG_MAPPED;
++ cam->frame[i].buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ cam->frame[i].buffer.length =
++ PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage);
++ cam->frame[i].buffer.memory = V4L2_MEMORY_MMAP;
++ cam->frame[i].buffer.m.offset = cam->frame[i].paddress;
++ cam->frame[i].index = i;
++ }
++
++ return 0;
++}
++
++/*!
++ * Free frame buffers status
++ *
++ * @param cam Structure cam_data *
++ *
++ * @return none
++ */
++static void mxc_free_frames(cam_data * cam)
++{
++ int i;
++
++ for (i = 0; i < FRAME_NUM; i++) {
++ cam->frame[i].buffer.flags = V4L2_BUF_FLAG_MAPPED;
++ }
++
++ cam->enc_counter = 0;
++ cam->skip_frame = 0;
++ INIT_LIST_HEAD(&cam->ready_q);
++ INIT_LIST_HEAD(&cam->working_q);
++ INIT_LIST_HEAD(&cam->done_q);
++}
++
++/*!
++ * Return the buffer status
++ *
++ * @param cam Structure cam_data *
++ * @param buf Structure v4l2_buffer *
++ *
++ * @return status 0 success, EINVAL failed.
++ */
++static int mxc_v4l2_buffer_status(cam_data * cam, struct v4l2_buffer *buf)
++{
++ if (buf->index < 0 || buf->index >= FRAME_NUM) {
++ printk(KERN_ERR
++ "mxc_v4l2_buffer_status buffers not allocated\n");
++ return -EINVAL;
++ }
++
++ memcpy(buf, &(cam->frame[buf->index].buffer), sizeof(*buf));
++ return 0;
++}
++
++/*!
++ * start the encoder job
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static int mxc_streamon(cam_data * cam)
++{
++ struct mxc_v4l_frame *frame;
++ int err = 0;
++
++ if (list_empty(&cam->ready_q)) {
++ printk(KERN_ERR "mxc_streamon buffer not been queued yet\n");
++ return -EINVAL;
++ }
++
++ cam->capture_pid = current->pid;
++
++ if (cam->enc_enable) {
++ err = cam->enc_enable(cam);
++ if (err != 0) {
++ return err;
++ }
++ }
++
++ cam->ping_pong_csi = 0;
++ if (cam->enc_update_eba) {
++ frame =
++ list_entry(cam->ready_q.next, struct mxc_v4l_frame, queue);
++ list_del(cam->ready_q.next);
++ list_add_tail(&frame->queue, &cam->working_q);
++ err =
++ cam->enc_update_eba(frame->buffer.m.offset,
++ &cam->ping_pong_csi);
++
++ frame =
++ list_entry(cam->ready_q.next, struct mxc_v4l_frame, queue);
++ list_del(cam->ready_q.next);
++ list_add_tail(&frame->queue, &cam->working_q);
++ err |=
++ cam->enc_update_eba(frame->buffer.m.offset,
++ &cam->ping_pong_csi);
++ } else {
++ return -EINVAL;
++ }
++
++ cam->capture_on = true;
++ return err;
++}
++
++/*!
++ * Shut down the encoder job
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static int mxc_streamoff(cam_data * cam)
++{
++ int err = 0;
++
++ if (cam->capture_on == false)
++ return 0;
++
++ if (cam->enc_disable) {
++ err = cam->enc_disable(cam);
++ }
++ mxc_free_frames(cam);
++ cam->capture_on = false;
++ return err;
++}
++
++/*!
++ * Valid whether the palette is supported
++ *
++ * @param palette V4L2_PIX_FMT_RGB565, V4L2_PIX_FMT_BGR24 or V4L2_PIX_FMT_BGR32
++ *
++ * @return 0 if failed
++ */
++static inline int valid_mode(u32 palette)
++{
++ return ((palette == V4L2_PIX_FMT_RGB565) ||
++ (palette == V4L2_PIX_FMT_BGR24) ||
++ (palette == V4L2_PIX_FMT_RGB24) ||
++ (palette == V4L2_PIX_FMT_BGR32) ||
++ (palette == V4L2_PIX_FMT_RGB32) ||
++ (palette == V4L2_PIX_FMT_YUV422P) ||
++ (palette == V4L2_PIX_FMT_UYVY) ||
++ (palette == V4L2_PIX_FMT_YUV420));
++}
++
++/*!
++ * Valid and adjust the overlay window size, position
++ *
++ * @param cam structure cam_data *
++ * @param win struct v4l2_window *
++ *
++ * @return 0
++ */
++static int verify_preview(cam_data * cam, struct v4l2_window *win)
++{
++ int i = 0;
++ int *width, *height;
++
++ do {
++ cam->overlay_fb = (struct fb_info *)registered_fb[i];
++ if (cam->overlay_fb == NULL) {
++ printk(KERN_ERR "verify_preview No matched.\n");
++ return -1;
++ }
++ if (strncmp(cam->overlay_fb->fix.id,
++ mxc_capture_outputs[cam->output].name, 5) == 0) {
++ break;
++ }
++ } while (++i < FB_MAX);
++
++ /* 4 bytes alignment for both FG and BG */
++ if (cam->overlay_fb->var.bits_per_pixel == 24) {
++ win->w.left -= win->w.left % 4;
++ } else if (cam->overlay_fb->var.bits_per_pixel == 16) {
++ win->w.left -= win->w.left % 2;
++ }
++
++ if (win->w.width + win->w.left > cam->overlay_fb->var.xres)
++ win->w.width = cam->overlay_fb->var.xres - win->w.left;
++ if (win->w.height + win->w.top > cam->overlay_fb->var.yres)
++ win->w.height = cam->overlay_fb->var.yres - win->w.top;
++
++ /* stride line limitation */
++ win->w.height -= win->w.height % 8;
++ win->w.width -= win->w.width % 8;
++
++ if (cam->rotation >= IPU_ROTATE_90_RIGHT) {
++ height = &win->w.width;
++ width = &win->w.height;
++ } else {
++ width = &win->w.width;
++ height = &win->w.height;
++ }
++
++ if ((cam->crop_bounds.width / *width > 8) ||
++ ((cam->crop_bounds.width / *width == 8) &&
++ (cam->crop_bounds.width % *width))) {
++ *width = cam->crop_bounds.width / 8;
++ if (*width % 8)
++ *width += 8 - *width % 8;
++ if (*width + win->w.left > cam->overlay_fb->var.xres) {
++ printk(KERN_ERR "width exceed resize limit.\n");
++ return -1;
++ }
++ printk(KERN_ERR "width exceed limit resize to %d.\n", *width);
++ }
++
++ if ((cam->crop_bounds.height / *height > 8) ||
++ ((cam->crop_bounds.height / *height == 8) &&
++ (cam->crop_bounds.height % *height))) {
++ *height = cam->crop_bounds.height / 8;
++ if (*height % 8)
++ *height += 8 - *height % 8;
++ if (*height + win->w.top > cam->overlay_fb->var.yres) {
++ printk(KERN_ERR "height exceed resize limit.\n");
++ return -1;
++ }
++ printk(KERN_ERR "height exceed limit resize to %d.\n", *height);
++ }
++
++ return 0;
++}
++
++/*!
++ * start the viewfinder job
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static int start_preview(cam_data * cam)
++{
++ int err = 0;
++#if defined(CONFIG_MXC_IPU_PRP_VF_SDC) || defined(CONFIG_MXC_IPU_PRP_VF_SDC_MODULE)
++ if (cam->output == 0) {
++ if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY)
++ err = prp_vf_sdc_select(cam);
++ else if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_PRIMARY)
++ err = prp_vf_sdc_select_bg(cam);
++ if (err != 0)
++ return err;
++
++ err = cam->vf_start_sdc(cam);
++ }
++#endif
++
++#if defined(CONFIG_MXC_IPU_PRP_VF_ADC) || defined(CONFIG_MXC_IPU_PRP_VF_ADC_MODULE)
++ if (cam->output == 1) {
++ err = prp_vf_adc_select(cam);
++ if (err != 0)
++ return err;
++
++ err = cam->vf_start_adc(cam);
++ }
++#endif
++
++ return err;
++}
++
++/*!
++ * shut down the viewfinder job
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static int stop_preview(cam_data * cam)
++{
++ int err = 0;
++
++#if defined(CONFIG_MXC_IPU_PRP_VF_ADC) || defined(CONFIG_MXC_IPU_PRP_VF_ADC_MODULE)
++ if (cam->output == 1) {
++ err = prp_vf_adc_deselect(cam);
++ }
++#endif
++
++#if defined(CONFIG_MXC_IPU_PRP_VF_SDC) || defined(CONFIG_MXC_IPU_PRP_VF_SDC_MODULE)
++ if (cam->output == 0) {
++ if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY)
++ err = prp_vf_sdc_deselect(cam);
++ else if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_PRIMARY)
++ err = prp_vf_sdc_deselect_bg(cam);
++ }
++#endif
++
++ return err;
++}
++
++/*!
++ * V4L2 - mxc_v4l2_g_fmt function
++ *
++ * @param cam structure cam_data *
++ *
++ * @param f structure v4l2_format *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2_g_fmt(cam_data * cam, struct v4l2_format *f)
++{
++ int retval = 0;
++
++ switch (f->type) {
++ case V4L2_BUF_TYPE_VIDEO_CAPTURE:
++ f->fmt.pix = cam->v2f.fmt.pix;
++ retval = 0;
++ break;
++ case V4L2_BUF_TYPE_VIDEO_OVERLAY:
++ f->fmt.win = cam->win;
++ break;
++ default:
++ retval = -EINVAL;
++ }
++ return retval;
++}
++
++/*!
++ * V4L2 - mxc_v4l2_s_fmt function
++ *
++ * @param cam structure cam_data *
++ *
++ * @param f structure v4l2_format *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2_s_fmt(cam_data * cam, struct v4l2_format *f)
++{
++ int retval = 0;
++ int size = 0;
++ int bytesperline = 0;
++ int *width, *height;
++
++ switch (f->type) {
++ case V4L2_BUF_TYPE_VIDEO_CAPTURE:
++ if (!valid_mode(f->fmt.pix.pixelformat)) {
++ printk(KERN_ERR
++ "mxc_v4l2_s_fmt: format not supported\n");
++ return -EINVAL;
++ }
++
++ if (cam->rotation >= IPU_ROTATE_90_RIGHT) {
++ height = &f->fmt.pix.width;
++ width = &f->fmt.pix.height;
++ } else {
++ width = &f->fmt.pix.width;
++ height = &f->fmt.pix.height;
++ }
++
++ /* stride line limitation */
++ *width -= *width % 8;
++ *height -= *height % 8;
++
++ if ((cam->crop_bounds.width / *width > 8) ||
++ ((cam->crop_bounds.width / *width == 8) &&
++ (cam->crop_bounds.width % *width))) {
++ *width = cam->crop_bounds.width / 8;
++ if (*width % 8)
++ *width += 8 - *width % 8;
++ printk(KERN_ERR "width exceed limit resize to %d.\n",
++ *width);
++ }
++
++ if ((cam->crop_bounds.height / *height > 8) ||
++ ((cam->crop_bounds.height / *height == 8) &&
++ (cam->crop_bounds.height % *height))) {
++ *height = cam->crop_bounds.height / 8;
++ if (*height % 8)
++ *height += 8 - *height % 8;
++ printk(KERN_ERR "height exceed limit resize to %d.\n",
++ *height);
++ }
++
++ switch (f->fmt.pix.pixelformat) {
++ case V4L2_PIX_FMT_RGB565:
++ size = f->fmt.pix.width * f->fmt.pix.height * 2;
++ bytesperline = f->fmt.pix.width * 2;
++ break;
++ case V4L2_PIX_FMT_BGR24:
++ size = f->fmt.pix.width * f->fmt.pix.height * 3;
++ bytesperline = f->fmt.pix.width * 3;
++ break;
++ case V4L2_PIX_FMT_RGB24:
++ size = f->fmt.pix.width * f->fmt.pix.height * 3;
++ bytesperline = f->fmt.pix.width * 3;
++ break;
++ case V4L2_PIX_FMT_BGR32:
++ size = f->fmt.pix.width * f->fmt.pix.height * 4;
++ bytesperline = f->fmt.pix.width * 4;
++ break;
++ case V4L2_PIX_FMT_RGB32:
++ size = f->fmt.pix.width * f->fmt.pix.height * 4;
++ bytesperline = f->fmt.pix.width * 4;
++ break;
++ case V4L2_PIX_FMT_YUV422P:
++ size = f->fmt.pix.width * f->fmt.pix.height * 2;
++ bytesperline = f->fmt.pix.width;
++ break;
++ case V4L2_PIX_FMT_UYVY:
++ size = f->fmt.pix.width * f->fmt.pix.height * 2;
++ bytesperline = f->fmt.pix.width * 2;
++ break;
++ case V4L2_PIX_FMT_YUV420:
++ size = f->fmt.pix.width * f->fmt.pix.height * 3 / 2;
++ bytesperline = f->fmt.pix.width;
++ break;
++ default:
++ break;
++ }
++
++ if (f->fmt.pix.bytesperline < bytesperline) {
++ f->fmt.pix.bytesperline = bytesperline;
++ } else {
++ bytesperline = f->fmt.pix.bytesperline;
++ }
++
++ if (f->fmt.pix.sizeimage < size) {
++ f->fmt.pix.sizeimage = size;
++ } else {
++ size = f->fmt.pix.sizeimage;
++ }
++
++ cam->v2f.fmt.pix = f->fmt.pix;
++
++ if (cam->v2f.fmt.pix.priv != 0) {
++ if (copy_from_user(&cam->offset,
++ (void *)cam->v2f.fmt.pix.priv,
++ sizeof(cam->offset))) {
++ retval = -EFAULT;
++ break;
++ }
++ }
++ retval = 0;
++ break;
++ case V4L2_BUF_TYPE_VIDEO_OVERLAY:
++ retval = verify_preview(cam, &f->fmt.win);
++ cam->win = f->fmt.win;
++ break;
++ default:
++ retval = -EINVAL;
++ }
++ return retval;
++}
++
++/*!
++ * get control param
++ *
++ * @param cam structure cam_data *
++ *
++ * @param c structure v4l2_control *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_get_v42l_control(cam_data * cam, struct v4l2_control *c)
++{
++ int status = 0;
++
++ switch (c->id) {
++ case V4L2_CID_HFLIP:
++ if (cam->rotation == IPU_ROTATE_HORIZ_FLIP)
++ c->value = 1;
++ break;
++ case V4L2_CID_VFLIP:
++ if (cam->rotation == IPU_ROTATE_VERT_FLIP)
++ c->value = 1;
++ break;
++ case V4L2_CID_MXC_ROT:
++ c->value = cam->rotation;
++ break;
++ case V4L2_CID_BRIGHTNESS:
++ c->value = cam->bright;
++ break;
++ case V4L2_CID_HUE:
++ c->value = cam->hue;
++ break;
++ case V4L2_CID_CONTRAST:
++ c->value = cam->contrast;
++ break;
++ case V4L2_CID_SATURATION:
++ c->value = cam->saturation;
++ break;
++ case V4L2_CID_RED_BALANCE:
++ c->value = cam->red;
++ break;
++ case V4L2_CID_BLUE_BALANCE:
++ c->value = cam->blue;
++ break;
++ case V4L2_CID_BLACK_LEVEL:
++ c->value = cam->ae_mode;
++ break;
++ default:
++ status = -EINVAL;
++ }
++ return status;
++}
++
++/*!
++ * V4L2 - set_control function
++ * V4L2_CID_PRIVATE_BASE is the extention for IPU preprocessing.
++ * 0 for normal operation
++ * 1 for vertical flip
++ * 2 for horizontal flip
++ * 3 for horizontal and vertical flip
++ * 4 for 90 degree rotation
++ * @param cam structure cam_data *
++ *
++ * @param c structure v4l2_control *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_set_v42l_control(cam_data * cam, struct v4l2_control *c)
++{
++ switch (c->id) {
++ case V4L2_CID_HFLIP:
++ if (c->value == 1) {
++ if ((cam->rotation != IPU_ROTATE_VERT_FLIP) &&
++ (cam->rotation != IPU_ROTATE_180))
++ cam->rotation = IPU_ROTATE_HORIZ_FLIP;
++ else
++ cam->rotation = IPU_ROTATE_180;
++ } else {
++ if (cam->rotation == IPU_ROTATE_HORIZ_FLIP)
++ cam->rotation = IPU_ROTATE_NONE;
++ if (cam->rotation == IPU_ROTATE_180)
++ cam->rotation = IPU_ROTATE_VERT_FLIP;
++ }
++ break;
++ case V4L2_CID_VFLIP:
++ if (c->value == 1) {
++ if ((cam->rotation != IPU_ROTATE_HORIZ_FLIP) &&
++ (cam->rotation != IPU_ROTATE_180))
++ cam->rotation = IPU_ROTATE_VERT_FLIP;
++ else
++ cam->rotation = IPU_ROTATE_180;
++ } else {
++ if (cam->rotation == IPU_ROTATE_VERT_FLIP)
++ cam->rotation = IPU_ROTATE_NONE;
++ if (cam->rotation == IPU_ROTATE_180)
++ cam->rotation = IPU_ROTATE_HORIZ_FLIP;
++ }
++ break;
++ case V4L2_CID_MXC_ROT:
++ switch (c->value) {
++ case V4L2_MXC_ROTATE_NONE:
++ cam->rotation = IPU_ROTATE_NONE;
++ break;
++ case V4L2_MXC_ROTATE_VERT_FLIP:
++ cam->rotation = IPU_ROTATE_VERT_FLIP;
++ break;
++ case V4L2_MXC_ROTATE_HORIZ_FLIP:
++ cam->rotation = IPU_ROTATE_HORIZ_FLIP;
++ break;
++ case V4L2_MXC_ROTATE_180:
++ cam->rotation = IPU_ROTATE_180;
++ break;
++ case V4L2_MXC_ROTATE_90_RIGHT:
++ cam->rotation = IPU_ROTATE_90_RIGHT;
++ break;
++ case V4L2_MXC_ROTATE_90_RIGHT_VFLIP:
++ cam->rotation = IPU_ROTATE_90_RIGHT_VFLIP;
++ break;
++ case V4L2_MXC_ROTATE_90_RIGHT_HFLIP:
++ cam->rotation = IPU_ROTATE_90_RIGHT_HFLIP;
++ break;
++ case V4L2_MXC_ROTATE_90_LEFT:
++ cam->rotation = IPU_ROTATE_90_LEFT;
++ break;
++ default:
++ return -EINVAL;
++ }
++ break;
++ case V4L2_CID_HUE:
++ cam->hue = c->value;
++ break;
++ case V4L2_CID_CONTRAST:
++ cam->contrast = c->value;
++ break;
++ case V4L2_CID_BRIGHTNESS:
++ cam->bright = c->value;
++ case V4L2_CID_SATURATION:
++ cam->saturation = c->value;
++ case V4L2_CID_RED_BALANCE:
++ cam->red = c->value;
++ case V4L2_CID_BLUE_BALANCE:
++ cam->blue = c->value;
++ ipu_csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ cam->cam_sensor->set_color(cam->bright, cam->saturation,
++ cam->red, cam->green, cam->blue);
++ ipu_csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ break;
++ case V4L2_CID_BLACK_LEVEL:
++ cam->ae_mode = c->value & 0x03;
++ ipu_csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ if (cam->cam_sensor->set_ae_mode)
++ cam->cam_sensor->set_ae_mode(cam->ae_mode);
++ ipu_csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ break;
++ case V4L2_CID_MXC_FLASH:
++ ipu_csi_flash_strobe(true);
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++/*!
++ * V4L2 - mxc_v4l2_s_param function
++ *
++ * @param cam structure cam_data *
++ *
++ * @param parm structure v4l2_streamparm *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2_s_param(cam_data * cam, struct v4l2_streamparm *parm)
++{
++ sensor_interface *param;
++ ipu_csi_signal_cfg_t csi_param;
++ int err = 0;
++
++ if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
++ printk(KERN_ERR "mxc_v4l2_s_param invalid type\n");
++ return -EINVAL;
++ }
++
++ if (parm->parm.capture.timeperframe.denominator >
++ cam->standard.frameperiod.denominator) {
++ printk(KERN_ERR "mxc_v4l2_s_param frame rate %d larger "
++ "than standard supported %d\n",
++ parm->parm.capture.timeperframe.denominator,
++ cam->standard.frameperiod.denominator);
++ return -EINVAL;
++ }
++
++ /* Stop the viewfinder */
++ if (cam->overlay_on == true) {
++ stop_preview(cam);
++ }
++
++ cam->streamparm.parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
++
++ ipu_csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ param = cam->cam_sensor->config
++ (&parm->parm.capture.timeperframe.denominator,
++ parm->parm.capture.capturemode);
++ ipu_csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ cam->streamparm.parm.capture.timeperframe =
++ parm->parm.capture.timeperframe;
++
++ if ((parm->parm.capture.capturemode != 0) &&
++ (parm->parm.capture.capturemode != V4L2_MODE_HIGHQUALITY)) {
++ printk(KERN_ERR
++ "mxc_v4l2_s_param frame un-supported capture mode\n");
++ err = -EINVAL;
++ goto exit;
++ }
++
++ if (parm->parm.capture.capturemode ==
++ cam->streamparm.parm.capture.capturemode) {
++ goto exit;
++ }
++
++ /* resolution changed, so need to re-program the CSI */
++ csi_param.sens_clksrc = 0;
++ csi_param.clk_mode = param->clk_mode;
++ csi_param.pixclk_pol = param->pixclk_pol;
++ csi_param.data_width = param->data_width;
++ csi_param.data_pol = param->data_pol;
++ csi_param.ext_vsync = param->ext_vsync;
++ csi_param.Vsync_pol = param->Vsync_pol;
++ csi_param.Hsync_pol = param->Hsync_pol;
++ ipu_csi_init_interface(param->width, param->height,
++ param->pixel_fmt, csi_param);
++ ipu_csi_set_window_size(param->width + 1, param->height + 1);
++
++ if (parm->parm.capture.capturemode != V4L2_MODE_HIGHQUALITY) {
++ cam->streamparm.parm.capture.capturemode = 0;
++ } else {
++ cam->streamparm.parm.capture.capturemode =
++ V4L2_MODE_HIGHQUALITY;
++ cam->streamparm.parm.capture.extendedmode =
++ parm->parm.capture.extendedmode;
++ cam->streamparm.parm.capture.readbuffers = 1;
++ }
++
++ exit:
++ if (cam->overlay_on == true) {
++ start_preview(cam);
++ }
++
++ return err;
++}
++
++/*!
++ * Dequeue one V4L capture buffer
++ *
++ * @param cam structure cam_data *
++ * @param buf structure v4l2_buffer *
++ *
++ * @return status 0 success, EINVAL invalid frame number,
++ * ETIME timeout, ERESTARTSYS interrupted by user
++ */
++static int mxc_v4l_dqueue(cam_data * cam, struct v4l2_buffer *buf)
++{
++ int retval = 0;
++ struct mxc_v4l_frame *frame;
++
++ if (!wait_event_interruptible_timeout(cam->enc_queue,
++ cam->enc_counter != 0, 10 * HZ)) {
++ printk(KERN_ERR "mxc_v4l_dqueue timeout enc_counter %x\n",
++ cam->enc_counter);
++ return -ETIME;
++ } else if (signal_pending(current)) {
++ printk(KERN_ERR "mxc_v4l_dqueue() interrupt received\n");
++ mxc_free_frames(cam);
++ return -ERESTARTSYS;
++ }
++
++ cam->enc_counter--;
++
++ frame = list_entry(cam->done_q.next, struct mxc_v4l_frame, queue);
++ list_del(cam->done_q.next);
++ if (frame->buffer.flags & V4L2_BUF_FLAG_DONE) {
++ frame->buffer.flags &= ~V4L2_BUF_FLAG_DONE;
++ } else if (frame->buffer.flags & V4L2_BUF_FLAG_QUEUED) {
++ printk(KERN_ERR "VIDIOC_DQBUF: Buffer not filled.\n");
++ frame->buffer.flags &= ~V4L2_BUF_FLAG_QUEUED;
++ retval = -EINVAL;
++ } else if ((frame->buffer.flags & 0x7) == V4L2_BUF_FLAG_MAPPED) {
++ printk(KERN_ERR "VIDIOC_DQBUF: Buffer not queued.\n");
++ retval = -EINVAL;
++ }
++
++ buf->bytesused = cam->v2f.fmt.pix.sizeimage;
++ buf->index = frame->index;
++ buf->flags = frame->buffer.flags;
++ buf->m = cam->frame[frame->index].buffer.m;
++
++ return retval;
++}
++
++/*!
++ * V4L interface - open function
++ *
++ * @param inode structure inode *
++ * @param file structure file *
++ *
++ * @return status 0 success, ENODEV invalid device instance,
++ * ENODEV timeout, ERESTARTSYS interrupted by user
++ */
++static int mxc_v4l_open(struct inode *inode, struct file *file)
++{
++ sensor_interface *param;
++ ipu_csi_signal_cfg_t csi_param;
++ struct video_device *dev = video_devdata(file);
++ cam_data *cam = dev->priv;
++ int err = 0;
++
++ if (!cam) {
++ printk(KERN_ERR "Internal error, cam_data not found!\n");
++ return -EBADF;
++ }
++
++ down(&cam->busy_lock);
++
++ err = 0;
++ if (signal_pending(current))
++ goto oops;
++
++ if (cam->open_count++ == 0) {
++ wait_event_interruptible(cam->power_queue,
++ cam->low_power == false);
++
++#if defined(CONFIG_MXC_IPU_PRP_ENC) || defined(CONFIG_MXC_IPU_PRP_ENC_MODULE)
++ err = prp_enc_select(cam);
++#endif
++
++ cam->enc_counter = 0;
++ cam->skip_frame = 0;
++ INIT_LIST_HEAD(&cam->ready_q);
++ INIT_LIST_HEAD(&cam->working_q);
++ INIT_LIST_HEAD(&cam->done_q);
++
++ ipu_csi_enable_mclk(CSI_MCLK_I2C, true, true);
++ param = cam->cam_sensor->reset();
++ if (param == NULL) {
++ cam->open_count--;
++ ipu_csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ err = -ENODEV;
++ goto oops;
++ }
++
++ csi_param.sens_clksrc = 0;
++ csi_param.clk_mode = param->clk_mode;
++ csi_param.pixclk_pol = param->pixclk_pol;
++ csi_param.data_width = param->data_width;
++ csi_param.data_pol = param->data_pol;
++ csi_param.ext_vsync = param->ext_vsync;
++ csi_param.Vsync_pol = param->Vsync_pol;
++ csi_param.Hsync_pol = param->Hsync_pol;
++ ipu_csi_init_interface(param->width, param->height,
++ param->pixel_fmt, csi_param);
++
++ cam->cam_sensor->get_color(&cam->bright, &cam->saturation,
++ &cam->red, &cam->green, &cam->blue);
++ if (cam->cam_sensor->get_ae_mode)
++ cam->cam_sensor->get_ae_mode(&cam->ae_mode);
++
++ /* pr_info("mxc_v4l_open saturation %x ae_mode %x\n",
++ cam->saturation, cam->ae_mode); */
++
++ ipu_csi_enable_mclk(CSI_MCLK_I2C, false, false);
++ }
++
++ file->private_data = dev;
++ oops:
++ up(&cam->busy_lock);
++ return err;
++}
++
++/*!
++ * V4L interface - close function
++ *
++ * @param inode struct inode *
++ * @param file struct file *
++ *
++ * @return 0 success
++ */
++static int mxc_v4l_close(struct inode *inode, struct file *file)
++{
++ struct video_device *dev = video_devdata(file);
++ int err = 0;
++ cam_data *cam = dev->priv;
++
++ if (!cam) {
++ printk(KERN_ERR "Internal error, cam_data not found!\n");
++ return -EBADF;
++ }
++
++ /* for the case somebody hit the ctrl C */
++ if (cam->overlay_pid == current->pid) {
++ err = stop_preview(cam);
++ cam->overlay_on = false;
++ }
++ if (cam->capture_pid == current->pid) {
++ err |= mxc_streamoff(cam);
++ wake_up_interruptible(&cam->enc_queue);
++ }
++
++ if (--cam->open_count == 0) {
++ wait_event_interruptible(cam->power_queue,
++ cam->low_power == false);
++ pr_info("mxc_v4l_close: release resource\n");
++
++#if defined(CONFIG_MXC_IPU_PRP_ENC) || defined(CONFIG_MXC_IPU_PRP_ENC_MODULE)
++ err |= prp_enc_deselect(cam);
++#endif
++ mxc_free_frame_buf(cam);
++ file->private_data = NULL;
++
++ /* capture off */
++ wake_up_interruptible(&cam->enc_queue);
++ mxc_free_frames(cam);
++ cam->enc_counter++;
++ }
++ return err;
++}
++
++#if defined(CONFIG_MXC_IPU_PRP_ENC) || defined(CONFIG_MXC_IPU_PRP_ENC_MODULE)
++/*
++ * V4L interface - read function
++ *
++ * @param file struct file *
++ * @param read buf char *
++ * @param count size_t
++ * @param ppos structure loff_t *
++ *
++ * @return bytes read
++ */
++static ssize_t
++mxc_v4l_read(struct file *file, char *buf, size_t count, loff_t * ppos)
++{
++ int err = 0;
++ u8 *v_address;
++ struct video_device *dev = video_devdata(file);
++ cam_data *cam = dev->priv;
++
++ if (down_interruptible(&cam->busy_lock))
++ return -EINTR;
++
++ /* Stop the viewfinder */
++ if (cam->overlay_on == true)
++ stop_preview(cam);
++
++ v_address = dma_alloc_coherent(0,
++ PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage),
++ &cam->still_buf, GFP_DMA | GFP_KERNEL);
++
++ if (!v_address) {
++ err = -ENOBUFS;
++ goto exit0;
++ }
++
++ err = prp_still_select(cam);
++ if (err != 0) {
++ err = -EIO;
++ goto exit1;
++ }
++
++ cam->still_counter = 0;
++ err = cam->csi_start(cam);
++ if (err != 0) {
++ err = -EIO;
++ goto exit2;
++ }
++
++ if (!wait_event_interruptible_timeout(cam->still_queue,
++ cam->still_counter != 0,
++ 10 * HZ)) {
++ printk(KERN_ERR "mxc_v4l_read timeout counter %x\n",
++ cam->still_counter);
++ err = -ETIME;
++ goto exit2;
++ }
++ err = copy_to_user(buf, v_address, cam->v2f.fmt.pix.sizeimage);
++
++ exit2:
++ prp_still_deselect(cam);
++
++ exit1:
++ dma_free_coherent(0, cam->v2f.fmt.pix.sizeimage, v_address,
++ cam->still_buf);
++ cam->still_buf = 0;
++
++ exit0:
++ if (cam->overlay_on == true) {
++ start_preview(cam);
++ }
++
++ up(&cam->busy_lock);
++ if (err < 0)
++ return err;
++
++ return (cam->v2f.fmt.pix.sizeimage - err);
++}
++#endif
++
++/*!
++ * V4L interface - ioctl function
++ *
++ * @param inode struct inode *
++ *
++ * @param file struct file *
++ *
++ * @param ioctlnr unsigned int
++ *
++ * @param arg void *
++ *
++ * @return 0 success, ENODEV for invalid device instance,
++ * -1 for other errors.
++ */
++static int
++mxc_v4l_do_ioctl(struct inode *inode, struct file *file,
++ unsigned int ioctlnr, void *arg)
++{
++ struct video_device *dev = video_devdata(file);
++ cam_data *cam = dev->priv;
++ int retval = 0;
++ unsigned long lock_flags;
++
++ wait_event_interruptible(cam->power_queue, cam->low_power == false);
++ /* make this _really_ smp-safe */
++ if (down_interruptible(&cam->busy_lock))
++ return -EBUSY;
++
++ switch (ioctlnr) {
++ /*!
++ * V4l2 VIDIOC_QUERYCAP ioctl
++ */
++ case VIDIOC_QUERYCAP:{
++ struct v4l2_capability *cap = arg;
++ strcpy(cap->driver, "mxc_v4l2");
++ cap->version = KERNEL_VERSION(0, 1, 11);
++ cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
++ V4L2_CAP_VIDEO_OVERLAY | V4L2_CAP_STREAMING
++ | V4L2_CAP_READWRITE;
++ cap->card[0] = '\0';
++ cap->bus_info[0] = '\0';
++ retval = 0;
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_G_FMT ioctl
++ */
++ case VIDIOC_G_FMT:{
++ struct v4l2_format *gf = arg;
++ retval = mxc_v4l2_g_fmt(cam, gf);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_S_FMT ioctl
++ */
++ case VIDIOC_S_FMT:{
++ struct v4l2_format *sf = arg;
++ retval = mxc_v4l2_s_fmt(cam, sf);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_REQBUFS ioctl
++ */
++ case VIDIOC_REQBUFS:{
++ struct v4l2_requestbuffers *req = arg;
++ if (req->count > FRAME_NUM) {
++ printk(KERN_ERR
++ "VIDIOC_REQBUFS: not enough buffer\n");
++ req->count = FRAME_NUM;
++ }
++
++ if ((req->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ||
++ (req->memory != V4L2_MEMORY_MMAP)) {
++ printk(KERN_ERR
++ "VIDIOC_REQBUFS: wrong buffer type\n");
++ retval = -EINVAL;
++ break;
++ }
++
++ mxc_streamoff(cam);
++ mxc_free_frame_buf(cam);
++
++ retval = mxc_allocate_frame_buf(cam, req->count);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_QUERYBUF ioctl
++ */
++ case VIDIOC_QUERYBUF:{
++ struct v4l2_buffer *buf = arg;
++ int index = buf->index;
++
++ if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
++ printk(KERN_ERR
++ "VIDIOC_QUERYBUFS: wrong buffer type\n");
++ retval = -EINVAL;
++ break;
++ }
++
++ memset(buf, 0, sizeof(buf));
++ buf->index = index;
++
++ down(&cam->param_lock);
++ retval = mxc_v4l2_buffer_status(cam, buf);
++ up(&cam->param_lock);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_QBUF ioctl
++ */
++ case VIDIOC_QBUF:{
++ struct v4l2_buffer *buf = arg;
++ int index = buf->index;
++
++ spin_lock_irqsave(&cam->int_lock, lock_flags);
++ cam->frame[index].buffer.m.offset = buf->m.offset;
++ if ((cam->frame[index].buffer.flags & 0x7) ==
++ V4L2_BUF_FLAG_MAPPED) {
++ cam->frame[index].buffer.flags |=
++ V4L2_BUF_FLAG_QUEUED;
++ if (cam->skip_frame > 0) {
++ list_add_tail(&cam->frame[index].queue,
++ &cam->working_q);
++ retval =
++ cam->enc_update_eba(cam->
++ frame[index].
++ buffer.m.offset,
++ &cam->
++ ping_pong_csi);
++ cam->skip_frame = 0;
++ } else {
++ list_add_tail(&cam->frame[index].queue,
++ &cam->ready_q);
++ }
++ } else if (cam->frame[index].buffer.
++ flags & V4L2_BUF_FLAG_QUEUED) {
++ printk(KERN_ERR
++ "VIDIOC_QBUF: buffer already queued\n");
++ } else if (cam->frame[index].buffer.
++ flags & V4L2_BUF_FLAG_DONE) {
++ printk(KERN_ERR
++ "VIDIOC_QBUF: overwrite done buffer.\n");
++ cam->frame[index].buffer.flags &=
++ ~V4L2_BUF_FLAG_DONE;
++ cam->frame[index].buffer.flags |=
++ V4L2_BUF_FLAG_QUEUED;
++ }
++
++ buf->flags = cam->frame[index].buffer.flags;
++ spin_unlock_irqrestore(&cam->int_lock, lock_flags);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_DQBUF ioctl
++ */
++ case VIDIOC_DQBUF:{
++ struct v4l2_buffer *buf = arg;
++
++ retval = mxc_v4l_dqueue(cam, buf);
++
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_STREAMON ioctl
++ */
++ case VIDIOC_STREAMON:{
++ retval = mxc_streamon(cam);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_STREAMOFF ioctl
++ */
++ case VIDIOC_STREAMOFF:{
++ retval = mxc_streamoff(cam);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_G_CTRL ioctl
++ */
++ case VIDIOC_G_CTRL:{
++ retval = mxc_get_v42l_control(cam, arg);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_S_CTRL ioctl
++ */
++ case VIDIOC_S_CTRL:{
++ retval = mxc_set_v42l_control(cam, arg);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_CROPCAP ioctl
++ */
++ case VIDIOC_CROPCAP:{
++ struct v4l2_cropcap *cap = arg;
++
++ if (cap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
++ cap->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) {
++ retval = -EINVAL;
++ break;
++ }
++ cap->bounds = cam->crop_bounds;
++ cap->defrect = cam->crop_defrect;
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_G_CROP ioctl
++ */
++ case VIDIOC_G_CROP:{
++ struct v4l2_crop *crop = arg;
++
++ if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
++ crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) {
++ retval = -EINVAL;
++ break;
++ }
++ crop->c = cam->crop_current;
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_S_CROP ioctl
++ */
++ case VIDIOC_S_CROP:{
++ struct v4l2_crop *crop = arg;
++ struct v4l2_rect *b = &cam->crop_bounds;
++
++ if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
++ crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) {
++ retval = -EINVAL;
++ break;
++ }
++
++ crop->c.top = (crop->c.top < b->top) ? b->top
++ : crop->c.top;
++ if (crop->c.top > b->top + b->height)
++ crop->c.top = b->top + b->height - 1;
++ if (crop->c.height > b->top + b->height - crop->c.top)
++ crop->c.height =
++ b->top + b->height - crop->c.top;
++
++ crop->c.left = (crop->c.left < b->left) ? b->left
++ : crop->c.left;
++ if (crop->c.left > b->left + b->width)
++ crop->c.left = b->left + b->width - 1;
++ if (crop->c.width > b->left - crop->c.left + b->width)
++ crop->c.width =
++ b->left - crop->c.left + b->width;
++
++ crop->c.width -= crop->c.width % 8;
++ crop->c.left -= crop->c.left % 4;
++ cam->crop_current = crop->c;
++
++ ipu_csi_set_window_size(cam->crop_current.width,
++ cam->crop_current.height);
++ ipu_csi_set_window_pos(cam->crop_current.left,
++ cam->crop_current.top);
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_OVERLAY ioctl
++ */
++ case VIDIOC_OVERLAY:{
++ int *on = arg;
++ if (*on) {
++ cam->overlay_on = true;
++ cam->overlay_pid = current->pid;
++ retval = start_preview(cam);
++ }
++ if (!*on) {
++ retval = stop_preview(cam);
++ cam->overlay_on = false;
++ }
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_G_FBUF ioctl
++ */
++ case VIDIOC_G_FBUF:{
++ struct v4l2_framebuffer *fb = arg;
++ *fb = cam->v4l2_fb;
++ fb->capability = V4L2_FBUF_CAP_EXTERNOVERLAY;
++ break;
++ }
++
++ /*!
++ * V4l2 VIDIOC_S_FBUF ioctl
++ */
++ case VIDIOC_S_FBUF:{
++ struct v4l2_framebuffer *fb = arg;
++ cam->v4l2_fb = *fb;
++ break;
++ }
++
++ case VIDIOC_G_PARM:{
++ struct v4l2_streamparm *parm = arg;
++ if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) {
++ printk(KERN_ERR "VIDIOC_G_PARM invalid type\n");
++ retval = -EINVAL;
++ break;
++ }
++ parm->parm.capture = cam->streamparm.parm.capture;
++ break;
++ }
++ case VIDIOC_S_PARM:{
++ struct v4l2_streamparm *parm = arg;
++ retval = mxc_v4l2_s_param(cam, parm);
++ break;
++ }
++
++ /* linux v4l2 bug, kernel c0485619 user c0405619 */
++ case VIDIOC_ENUMSTD:{
++ struct v4l2_standard *e = arg;
++ *e = cam->standard;
++ printk(KERN_ERR "VIDIOC_ENUMSTD call\n");
++ retval = 0;
++ break;
++ }
++
++ case VIDIOC_G_STD:{
++ v4l2_std_id *e = arg;
++ *e = cam->standard.id;
++ break;
++ }
++
++ case VIDIOC_S_STD:{
++ break;
++ }
++
++ case VIDIOC_ENUMOUTPUT:
++ {
++ struct v4l2_output *output = arg;
++
++ if (output->index >= MXC_V4L2_CAPTURE_NUM_OUTPUTS) {
++ retval = -EINVAL;
++ break;
++ }
++
++ *output = mxc_capture_outputs[output->index];
++
++ break;
++ }
++ case VIDIOC_G_OUTPUT:
++ {
++ int *p_output_num = arg;
++
++ *p_output_num = cam->output;
++ break;
++ }
++ case VIDIOC_S_OUTPUT:
++ {
++ int *p_output_num = arg;
++
++ if (*p_output_num >= MXC_V4L2_CAPTURE_NUM_OUTPUTS) {
++ retval = -EINVAL;
++ break;
++ }
++
++ cam->output = *p_output_num;
++ break;
++ }
++
++ case VIDIOC_ENUM_FMT:
++ case VIDIOC_TRY_FMT:
++ case VIDIOC_QUERYCTRL:
++ case VIDIOC_ENUMINPUT:
++ case VIDIOC_G_INPUT:
++ case VIDIOC_S_INPUT:
++ case VIDIOC_G_TUNER:
++ case VIDIOC_S_TUNER:
++ case VIDIOC_G_FREQUENCY:
++ case VIDIOC_S_FREQUENCY:
++ default:
++ retval = -EINVAL;
++ break;
++ }
++
++ up(&cam->busy_lock);
++ return retval;
++}
++
++/*
++ * V4L interface - ioctl function
++ *
++ * @return None
++ */
++static int
++mxc_v4l_ioctl(struct inode *inode, struct file *file,
++ unsigned int cmd, unsigned long arg)
++{
++ return video_usercopy(inode, file, cmd, arg, mxc_v4l_do_ioctl);
++}
++
++/*!
++ * V4L interface - mmap function
++ *
++ * @param file structure file *
++ *
++ * @param vma structure vm_area_struct *
++ *
++ * @return status 0 Success, EINTR busy lock error, ENOBUFS remap_page error
++ */
++static int mxc_mmap(struct file *file, struct vm_area_struct *vma)
++{
++ struct video_device *dev = video_devdata(file);
++ unsigned long size;
++ int res = 0;
++ cam_data *cam = dev->priv;
++
++ pr_debug("pgoff=0x%lx, start=0x%lx, end=0x%lx\n",
++ vma->vm_pgoff, vma->vm_start, vma->vm_end);
++
++ /* make this _really_ smp-safe */
++ if (down_interruptible(&cam->busy_lock))
++ return -EINTR;
++
++ size = vma->vm_end - vma->vm_start;
++ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
++
++ if (remap_pfn_range(vma, vma->vm_start,
++ vma->vm_pgoff, size, vma->vm_page_prot)) {
++ printk(KERN_ERR "mxc_mmap: remap_pfn_range failed\n");
++ res = -ENOBUFS;
++ goto mxc_mmap_exit;
++ }
++
++ vma->vm_flags &= ~VM_IO; /* using shared anonymous pages */
++
++ mxc_mmap_exit:
++ up(&cam->busy_lock);
++ return res;
++}
++
++/*!
++ * V4L interface - poll function
++ *
++ * @param file structure file *
++ *
++ * @param wait structure poll_table *
++ *
++ * @return status POLLIN | POLLRDNORM
++ */
++static unsigned int mxc_poll(struct file *file, poll_table * wait)
++{
++ struct video_device *dev = video_devdata(file);
++ cam_data *cam = dev->priv;
++ wait_queue_head_t *queue = NULL;
++ int res = POLLIN | POLLRDNORM;
++
++ if (down_interruptible(&cam->busy_lock))
++ return -EINTR;
++
++ queue = &cam->enc_queue;
++ poll_wait(file, queue, wait);
++
++ up(&cam->busy_lock);
++ return res;
++}
++
++static struct
++file_operations mxc_v4l_fops = {
++ .owner = THIS_MODULE,
++ .open = mxc_v4l_open,
++ .release = mxc_v4l_close,
++ .read = mxc_v4l_read,
++ .ioctl = mxc_v4l_ioctl,
++ .mmap = mxc_mmap,
++ .poll = mxc_poll,
++};
++
++static struct video_device mxc_v4l_template = {
++ .owner = THIS_MODULE,
++ .name = "Mxc Camera",
++ .type = 0,
++ .type2 = VID_TYPE_CAPTURE,
++ .hardware = 0,
++ .fops = &mxc_v4l_fops,
++ .release = video_device_release,
++};
++
++static void camera_platform_release(struct device *device)
++{
++}
++
++/*! Device Definition for Mt9v111 devices */
++static struct platform_device mxc_v4l2_devices = {
++ .name = "mxc_v4l2",
++ .dev = {
++ .release = camera_platform_release,
++ },
++ .id = 0,
++};
++
++extern struct camera_sensor camera_sensor_if;
++
++/*!
++* Camera V4l2 callback function.
++*
++* @param mask u32
++*
++* @param dev void device structure
++*
++* @return status
++*/
++static void camera_callback(u32 mask, void *dev)
++{
++ struct mxc_v4l_frame *done_frame;
++ struct mxc_v4l_frame *ready_frame;
++
++ cam_data *cam = (cam_data *) dev;
++ if (cam == NULL)
++ return;
++
++ if (list_empty(&cam->working_q)) {
++ printk(KERN_ERR "camera_callback: working queue empty\n");
++ return;
++ }
++
++ done_frame =
++ list_entry(cam->working_q.next, struct mxc_v4l_frame, queue);
++ if (done_frame->buffer.flags & V4L2_BUF_FLAG_QUEUED) {
++ done_frame->buffer.flags |= V4L2_BUF_FLAG_DONE;
++ done_frame->buffer.flags &= ~V4L2_BUF_FLAG_QUEUED;
++
++ if (list_empty(&cam->ready_q)) {
++ cam->skip_frame++;
++ } else {
++ ready_frame =
++ list_entry(cam->ready_q.next, struct mxc_v4l_frame,
++ queue);
++ list_del(cam->ready_q.next);
++ list_add_tail(&ready_frame->queue, &cam->working_q);
++ cam->enc_update_eba(ready_frame->buffer.m.offset,
++ &cam->ping_pong_csi);
++ }
++
++ /* Added to the done queue */
++ list_del(cam->working_q.next);
++ list_add_tail(&done_frame->queue, &cam->done_q);
++
++ /* Wake up the queue */
++ cam->enc_counter++;
++ wake_up_interruptible(&cam->enc_queue);
++ } else {
++ printk(KERN_ERR "camera_callback :buffer not queued\n");
++ }
++}
++
++/*!
++ * initialize cam_data structure
++ *
++ * @param cam structure cam_data *
++ *
++ * @return status 0 Success
++ */
++static void init_camera_struct(cam_data * cam)
++{
++ /* Default everything to 0 */
++ memset(cam, 0, sizeof(cam_data));
++
++ init_MUTEX(&cam->param_lock);
++ init_MUTEX(&cam->busy_lock);
++
++ cam->video_dev = video_device_alloc();
++ if (cam->video_dev == NULL)
++ return;
++
++ *(cam->video_dev) = mxc_v4l_template;
++
++ video_set_drvdata(cam->video_dev, cam);
++ dev_set_drvdata(&mxc_v4l2_devices.dev, (void *)cam);
++ cam->video_dev->minor = -1;
++
++ init_waitqueue_head(&cam->enc_queue);
++ init_waitqueue_head(&cam->still_queue);
++
++ /* setup cropping */
++ cam->crop_bounds.left = 0;
++ cam->crop_bounds.width = 640;
++ cam->crop_bounds.top = 0;
++ cam->crop_bounds.height = 480;
++ cam->crop_current = cam->crop_defrect = cam->crop_bounds;
++ ipu_csi_set_window_size(cam->crop_current.width,
++ cam->crop_current.height);
++ ipu_csi_set_window_pos(cam->crop_current.left, cam->crop_current.top);
++ cam->streamparm.parm.capture.capturemode = 0;
++
++ cam->standard.index = 0;
++ cam->standard.id = V4L2_STD_UNKNOWN;
++ cam->standard.frameperiod.denominator = 30;
++ cam->standard.frameperiod.numerator = 1;
++ cam->standard.framelines = 480;
++ cam->streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ cam->streamparm.parm.capture.timeperframe = cam->standard.frameperiod;
++ cam->streamparm.parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
++ cam->overlay_on = false;
++ cam->capture_on = false;
++ cam->skip_frame = 0;
++ cam->v4l2_fb.flags = V4L2_FBUF_FLAG_OVERLAY;
++
++ cam->v2f.fmt.pix.sizeimage = 352 * 288 * 3 / 2;
++ cam->v2f.fmt.pix.bytesperline = 288 * 3 / 2;
++ cam->v2f.fmt.pix.width = 288;
++ cam->v2f.fmt.pix.height = 352;
++ cam->v2f.fmt.pix.pixelformat = V4L2_PIX_FMT_YUV420;
++ cam->win.w.width = 160;
++ cam->win.w.height = 160;
++ cam->win.w.left = 0;
++ cam->win.w.top = 0;
++
++ cam->cam_sensor = &camera_sensor_if;
++ cam->enc_callback = camera_callback;
++ init_waitqueue_head(&cam->power_queue);
++ cam->int_lock = SPIN_LOCK_UNLOCKED;
++ spin_lock_init(&cam->int_lock);
++}
++
++extern void gpio_sensor_active(void);
++extern void gpio_sensor_inactive(void);
++
++/*!
++ * camera_power function
++ * Turn Sensor power On/Off
++ *
++ * @param cameraOn true to turn camera on, otherwise shut down
++ *
++ * @return status
++ */
++static u8 camera_power(bool cameraOn)
++{
++ if (cameraOn == true) {
++ gpio_sensor_active();
++ ipu_csi_enable_mclk(csi_mclk_flag_backup, true, true);
++ } else {
++ csi_mclk_flag_backup = ipu_csi_read_mclk_flag();
++ ipu_csi_enable_mclk(csi_mclk_flag_backup, false, false);
++ gpio_sensor_inactive();
++ }
++ return 0;
++}
++
++/*!
++ * This function is called to put the sensor in a low power state. Refer to the
++ * document driver-model/driver.txt in the kernel source tree for more
++ * information.
++ *
++ * @param pdev the device structure used to give information on which I2C
++ * to suspend
++ * @param state the power state the device is entering
++ *
++ * @return The function returns 0 on success and -1 on failure.
++ */
++static int mxc_v4l2_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ cam_data *cam = platform_get_drvdata(pdev);
++
++ if (cam == NULL) {
++ return -1;
++ }
++
++ cam->low_power = true;
++
++ if (cam->overlay_on == true)
++ stop_preview(cam);
++ if ((cam->capture_on == true) && cam->enc_disable) {
++ cam->enc_disable(cam);
++ }
++ camera_power(false);
++
++ return 0;
++}
++
++/*!
++ * This function is called to bring the sensor back from a low power state.Refer
++ * to the document driver-model/driver.txt in the kernel source tree for more
++ * information.
++ *
++ * @param pdev the device structure
++ *
++ * @return The function returns 0 on success and -1 on failure
++ */
++static int mxc_v4l2_resume(struct platform_device *pdev)
++{
++ cam_data *cam = platform_get_drvdata(pdev);
++
++ if (cam == NULL) {
++ return -1;
++ }
++
++ cam->low_power = false;
++ wake_up_interruptible(&cam->power_queue);
++
++ if (cam->overlay_on == true)
++ start_preview(cam);
++ if (cam->capture_on == true)
++ mxc_streamon(cam);
++ camera_power(true);
++
++ return 0;
++}
++
++/*!
++ * This structure contains pointers to the power management callback functions.
++ */
++static struct platform_driver mxc_v4l2_driver = {
++ .driver = {
++ .name = "mxc_v4l2",
++ },
++ .probe = NULL,
++ .remove = NULL,
++ .suspend = mxc_v4l2_suspend,
++ .resume = mxc_v4l2_resume,
++ .shutdown = NULL,
++};
++
++/*!
++ * Entry point for the V4L2
++ *
++ * @return Error code indicating success or failure
++ */
++static __init int camera_init(void)
++{
++ u8 err = 0;
++
++ /* Register the device driver structure. */
++ err = platform_driver_register(&mxc_v4l2_driver);
++ if (err != 0) {
++ printk("camera_init: platform_driver_register failed.\n");
++ return err;
++ }
++
++ if ((g_cam = kmalloc(sizeof(cam_data), GFP_KERNEL)) == NULL) {
++ printk(KERN_ERR "failed to mxc_v4l_register_camera\n");
++ return -1;
++ }
++
++ init_camera_struct(g_cam);
++
++ /* Register the I2C device */
++ err = platform_device_register(&mxc_v4l2_devices);
++ if (err != 0) {
++ printk(KERN_ERR
++ "camera_init: platform_device_register failed.\n");
++ video_device_release(g_cam->video_dev);
++ kfree(g_cam);
++ g_cam = NULL;
++ }
++
++ /* register v4l device */
++ if (video_register_device(g_cam->video_dev, VFL_TYPE_GRABBER, video_nr)
++ == -1) {
++ platform_device_unregister(&mxc_v4l2_devices);
++ platform_driver_unregister(&mxc_v4l2_driver);
++ video_device_release(g_cam->video_dev);
++ kfree(g_cam);
++ g_cam = NULL;
++ printk(KERN_ERR "video_register_device failed\n");
++ return -1;
++ }
++
++ return err;
++}
++
++/*!
++ * Exit and cleanup for the V4L2
++ *
++ */
++static void __exit camera_exit(void)
++{
++ pr_info("unregistering video\n");
++ video_unregister_device(g_cam->video_dev);
++
++ platform_driver_unregister(&mxc_v4l2_driver);
++ platform_device_unregister(&mxc_v4l2_devices);
++
++ if (g_cam->open_count) {
++ printk(KERN_ERR "camera open -- setting ops to NULL\n");
++ } else {
++ pr_info("freeing camera\n");
++ mxc_free_frame_buf(g_cam);
++ kfree(g_cam);
++ g_cam = NULL;
++ }
++}
++
++module_init(camera_init);
++module_exit(camera_exit);
++
++module_param(video_nr, int, 0444);
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("V4L2 capture driver for Mxc based cameras");
++MODULE_LICENSE("GPL");
++MODULE_SUPPORTED_DEVICE("video");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/mxc_v4l2_capture.h linux-2.6.28-karo/drivers/media/video/mxc/capture/mxc_v4l2_capture.h
+--- linux-2.6.28/drivers/media/video/mxc/capture/mxc_v4l2_capture.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/mxc_v4l2_capture.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,190 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @defgroup MXC_V4L2_CAPTURE MXC V4L2 Video Capture Driver
++ */
++/*!
++ * @file mxc_v4l2_capture.h
++ *
++ * @brief mxc V4L2 capture device API Header file
++ *
++ * It include all the defines for frame operations, also three structure defines
++ * use case ops structure, common v4l2 driver structure and frame structure.
++ *
++ * @ingroup MXC_V4L2_CAPTURE
++ */
++#ifndef __MXC_V4L2_CAPTURE_H__
++#define __MXC_V4L2_CAPTURE_H__
++
++#include <asm/uaccess.h>
++#include <linux/list.h>
++#include <linux/smp_lock.h>
++
++#include <media/v4l2-dev.h>
++#include <asm/arch/ipu.h>
++#include <asm/arch/mxc_v4l2.h>
++
++#define FRAME_NUM 3
++
++/*!
++ * v4l2 frame structure.
++ */
++struct mxc_v4l_frame {
++ u32 paddress;
++ void *vaddress;
++ int count;
++ int width;
++ int height;
++
++ struct v4l2_buffer buffer;
++ struct list_head queue;
++ int index;
++};
++
++typedef struct {
++ u8 clk_mode;
++ u8 ext_vsync;
++ u8 Vsync_pol;
++ u8 Hsync_pol;
++ u8 pixclk_pol;
++ u8 data_pol;
++ u8 data_width;
++ u16 width;
++ u16 height;
++ u32 pixel_fmt;
++ u32 mclk;
++} sensor_interface;
++
++/* Sensor control function */
++struct camera_sensor {
++ struct module *owner;
++ void (*set_color) (int bright, int saturation, int red, int green,
++ int blue);
++ void (*get_color) (int *bright, int *saturation, int *red, int *green,
++ int *blue);
++ void (*set_ae_mode) (int ae_mode);
++ void (*get_ae_mode) (int *ae_mode);
++ void (*set_ae) (int active);
++ void (*set_ae_limit) (int limit);
++ void (*set_awb) (int active);
++ void (*flicker_control) (int control);
++ void (*get_control_params) (int *ae, int *awb, int *flicker);
++ sensor_interface *(*config) (int *frame_rate, int high_quality);
++ sensor_interface *(*reset) (void);
++ int (*get_status) (void);
++};
++
++/*!
++ * common v4l2 driver structure.
++ */
++typedef struct _cam_data {
++ struct video_device *video_dev;
++
++ /* semaphore guard against SMP multithreading */
++ struct semaphore busy_lock;
++
++ int open_count;
++
++ /* params lock for this camera */
++ struct semaphore param_lock;
++
++ /* Encorder */
++ struct list_head ready_q;
++ struct list_head done_q;
++ struct list_head working_q;
++ int ping_pong_csi;
++ spinlock_t int_lock;
++ struct mxc_v4l_frame frame[FRAME_NUM];
++ int skip_frame;
++ wait_queue_head_t overflow_queue;
++ int overflow;
++ wait_queue_head_t enc_queue;
++ int enc_counter;
++ dma_addr_t rot_enc_bufs[2];
++ void *rot_enc_bufs_vaddr[2];
++ int rot_enc_buf_size[2];
++ enum v4l2_buf_type type;
++
++ /* still image capture */
++ wait_queue_head_t still_queue;
++ int still_counter;
++ dma_addr_t still_buf;
++ void *still_buf_vaddr;
++
++ /* overlay */
++ struct v4l2_window win;
++ struct v4l2_framebuffer v4l2_fb;
++ dma_addr_t vf_bufs[2];
++ void *vf_bufs_vaddr[2];
++ int vf_bufs_size[2];
++ dma_addr_t rot_vf_bufs[2];
++ void *rot_vf_bufs_vaddr[2];
++ int rot_vf_buf_size[2];
++ bool overlay_active;
++ int output;
++ struct fb_info *overlay_fb;
++
++ /* v4l2 format */
++ struct v4l2_format v2f;
++ int rotation;
++ struct v4l2_mxc_offset offset;
++
++ /* V4l2 control bit */
++ int bright;
++ int hue;
++ int contrast;
++ int saturation;
++ int red;
++ int green;
++ int blue;
++ int ae_mode;
++ int ae_enable;
++ int ae_limit;
++ int awb_enable;
++ int flicker_ctrl;
++
++ /* standart */
++ struct v4l2_streamparm streamparm;
++ struct v4l2_standard standard;
++
++ /* crop */
++ struct v4l2_rect crop_bounds;
++ struct v4l2_rect crop_defrect;
++ struct v4l2_rect crop_current;
++
++ int (*enc_update_eba) (dma_addr_t eba, int *bufferNum);
++ int (*enc_enable) (void *private);
++ int (*enc_disable) (void *private);
++ void (*enc_callback) (u32 mask, void *dev);
++ int (*vf_start_adc) (void *private);
++ int (*vf_stop_adc) (void *private);
++ int (*vf_start_sdc) (void *private);
++ int (*vf_stop_sdc) (void *private);
++ int (*csi_start) (void *private);
++ int (*csi_stop) (void *private);
++
++ /* misc status flag */
++ bool overlay_on;
++ bool capture_on;
++ int overlay_pid;
++ int capture_pid;
++ bool low_power;
++ wait_queue_head_t power_queue;
++
++ /* camera sensor interface */
++ struct camera_sensor *cam_sensor;
++} cam_data;
++
++void set_mclk_rate(uint32_t * p_mclk_freq);
++#endif /* __MXC_V4L2_CAPTURE_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/ov2640.c linux-2.6.28-karo/drivers/media/video/mxc/capture/ov2640.c
+--- linux-2.6.28/drivers/media/video/mxc/capture/ov2640.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/ov2640.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,817 @@
++/*
++ * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/slab.h>
++#include <linux/ctype.h>
++#include <linux/types.h>
++#include <linux/delay.h>
++#include <linux/device.h>
++#include <linux/i2c.h>
++#include <asm/arch/mxc_i2c.h>
++
++#ifdef NONSENSE
++#include <asm/arch/pmic_power.h>
++#endif
++
++#include "mxc_v4l2_capture.h"
++
++#define OV2640_DEBUG
++#ifdef OV2640_DEBUG
++#define PRINTK(fmt...) printk(KERN_DEBUG fmt)
++#else
++#define PRINTK(fmt...)
++#endif
++
++#define OV2640_I2C_ADDRESS 0x30
++
++static sensor_interface *interface_param = NULL;
++static int reset_frame_rate = 30;
++static int ov2640_attach(struct i2c_adapter *adapter);
++static int ov2640_detach(struct i2c_client *client);
++
++static struct i2c_driver ov2640_i2c_driver = {
++ .driver = {
++ .owner = THIS_MODULE,
++ .name = "OV2640 Client",
++ },
++ .attach_adapter = ov2640_attach,
++ .detach_client = ov2640_detach,
++};
++
++static struct i2c_client ov2640_i2c_client = {
++ .name = "ov2640 I2C dev",
++ .addr = OV2640_I2C_ADDRESS,
++ .driver = &ov2640_i2c_driver,
++};
++
++/*!
++ * ov2640 I2C attach function
++ *
++ * @param adapter struct i2c_adapter *
++ * @return Error code indicating success or failure
++ */
++static int ov2640_attach(struct i2c_adapter *adapter)
++{
++ int ret;
++
++ if (strcmp(adapter->name, MXC_ADAPTER_NAME) != 0) {
++ PRINTK("%s: %s\n", __func__, adapter->name);
++ return -ENODEV;
++ }
++ ov2640_i2c_client.adapter = adapter;
++
++ ret = i2c_attach_client(&ov2640_i2c_client);
++ if (ret != 0) {
++ ov2640_i2c_client.adapter = NULL;
++ PRINTK("%s: i2c_attach_client failed\n", __func__);
++ return ret;
++ }
++
++ interface_param = kzalloc(sizeof(sensor_interface), GFP_KERNEL);
++ if (!interface_param) {
++ PRINTK("%s: kmalloc failed\n", __func__);
++ return -ENOMEM;
++ }
++ return 0;
++}
++
++/*!
++ * ov2640 I2C detach function
++ *
++ * @param client struct i2c_client *
++ * @return Error code indicating success or failure
++ */
++static int ov2640_detach(struct i2c_client *client)
++{
++ int err;
++#ifdef NONSENSE
++ PMIC_STATUS ret;
++#endif
++ err = i2c_detach_client(&ov2640_i2c_client);
++ ov2640_i2c_client.adapter = NULL;
++
++ kfree(interface_param);
++ interface_param = NULL;
++
++#ifdef NONSENSE
++ /* DOVDD */
++ if ((ret = pmic_power_regulator_off(REGU_GPO3)) < 0) {
++ PRINTK("%s:REGU_GPO3 power off error:%d\n", __func__, ret);
++ return 0;
++ } else {
++ PRINTK("%s:REGU_GPO3 power off ok\n", __func__);
++ }
++ PRINTK("%s:OV2640 power off ok\n", __func__);
++#endif
++ return err;
++}
++
++static int
++ov2640_i2c_client_xfer(int addr, u8 reg, char *buf, int num, int tran_flag)
++{
++ struct i2c_msg msg[2];
++ int ret;
++
++ msg[0].addr = addr;
++ msg[0].len = 1;
++ msg[0].buf = &reg;
++ msg[0].flags = tran_flag;
++ msg[0].flags &= ~I2C_M_RD;
++
++ msg[1].addr = addr;
++ msg[1].len = num;
++ msg[1].buf = buf;
++ msg[1].flags = tran_flag;
++
++ if (tran_flag & MXC_I2C_FLAG_READ) {
++ msg[1].flags |= I2C_M_RD;
++ } else {
++ msg[1].flags &= ~I2C_M_RD;
++ }
++
++#if 1
++ BUG_ON(ov2640_i2c_client.adapter == NULL);
++#else
++ if (ov2640_i2c_client.adapter == NULL) {
++ PRINTK("%s: adapter error\n", __func__);
++ return -ENODEV;
++ }
++#endif
++ ret = i2c_transfer(ov2640_i2c_client.adapter, msg, 2);
++ if (ret >= 0) {
++ /* PRINTK("%s:i2c transfer num:%d\n", __func__, ret); */
++ return 0;
++ }
++ PRINTK("%s: i2c transfer error: %d\n", __func__, ret);
++ return ret;
++}
++
++static int ov2640_write_reg(u8 reg, u8 val)
++{
++ int ret;
++
++ ret = ov2640_i2c_client_xfer(OV2640_I2C_ADDRESS, reg, &val, 1, 0);
++ if (ret < 0) {
++ PRINTK("%s: write reg error: reg=%02x, val=%02x ret=%d\n",
++ __func__, reg, val, ret);
++ return ret;
++ } else if (ret != 1) {
++ PRINTK("%s: write reg error: reg=%02x, val=%02x ret=%d\n",
++ __func__, reg, val, ret);
++ return -EIO;
++ }
++ return 0;
++}
++
++/* should be replaced by width and height version. */
++static int ov2640_init_1600_1120(void)
++{
++ int ret;
++
++ ret = ov2640_write_reg(0xff, 1);
++ if (ret != 0) {
++ return ret;
++ }
++ ov2640_write_reg(0x12, 0x80);
++ udelay(1000);
++ ov2640_write_reg(0xff, 0x00);
++ ov2640_write_reg(0x2c, 0xff);
++ ov2640_write_reg(0x2e, 0xdf);
++ ov2640_write_reg(0xff, 0x01);
++ ov2640_write_reg(0x3c, 0x32);
++ ov2640_write_reg(0x11, 0x01);
++ ov2640_write_reg(0x09, 0x00);
++ ov2640_write_reg(0x04, 0x28);
++ ov2640_write_reg(0x13, 0xe5);
++ ov2640_write_reg(0x14, 0x48);
++ ov2640_write_reg(0x2c, 0x0c);
++ ov2640_write_reg(0x33, 0x78);
++ ov2640_write_reg(0x3a, 0x33);
++ ov2640_write_reg(0x3b, 0xfb);
++ ov2640_write_reg(0x3e, 0x00);
++ ov2640_write_reg(0x43, 0x11);
++ ov2640_write_reg(0x16, 0x10);
++ ov2640_write_reg(0x39, 0x82);
++ ov2640_write_reg(0x35, 0x88);
++ ov2640_write_reg(0x22, 0x0a);
++ ov2640_write_reg(0x37, 0x40);
++ ov2640_write_reg(0x23, 0x00);
++ ov2640_write_reg(0x34, 0xa0);
++ ov2640_write_reg(0x36, 0x1a);
++ ov2640_write_reg(0x06, 0x02);
++ ov2640_write_reg(0x07, 0xc0);
++ ov2640_write_reg(0x0d, 0xb7);
++ ov2640_write_reg(0x0e, 0x01);
++ ov2640_write_reg(0x4c, 0x00);
++ ov2640_write_reg(0x4a, 0x81);
++ ov2640_write_reg(0x21, 0x99);
++ ov2640_write_reg(0x24, 0x40);
++ ov2640_write_reg(0x25, 0x38);
++ ov2640_write_reg(0x26, 0x82);
++ ov2640_write_reg(0x5c, 0x00);
++ ov2640_write_reg(0x63, 0x00);
++ ov2640_write_reg(0x46, 0x3f);
++ ov2640_write_reg(0x0c, 0x3c);
++ ov2640_write_reg(0x5d, 0x55);
++ ov2640_write_reg(0x5e, 0x7d);
++ ov2640_write_reg(0x5f, 0x7d);
++ ov2640_write_reg(0x60, 0x55);
++ ov2640_write_reg(0x61, 0x70);
++ ov2640_write_reg(0x62, 0x80);
++ ov2640_write_reg(0x7c, 0x05);
++ ov2640_write_reg(0x20, 0x80);
++ ov2640_write_reg(0x28, 0x30);
++ ov2640_write_reg(0x6c, 0x00);
++ ov2640_write_reg(0x6d, 0x80);
++ ov2640_write_reg(0x6e, 0x00);
++ ov2640_write_reg(0x70, 0x02);
++ ov2640_write_reg(0x71, 0x94);
++ ov2640_write_reg(0x73, 0xc1);
++ ov2640_write_reg(0x3d, 0x34);
++ ov2640_write_reg(0x5a, 0x57);
++ ov2640_write_reg(0x4f, 0xbb);
++ ov2640_write_reg(0x50, 0x9c);
++ ov2640_write_reg(0xff, 0x00);
++ ov2640_write_reg(0xe5, 0x7f);
++ ov2640_write_reg(0xf9, 0xc0);
++ ov2640_write_reg(0x41, 0x24);
++ ov2640_write_reg(0x44, 0x06);
++ ov2640_write_reg(0xe0, 0x14);
++ ov2640_write_reg(0x76, 0xff);
++ ov2640_write_reg(0x33, 0xa0);
++ ov2640_write_reg(0x42, 0x20);
++ ov2640_write_reg(0x43, 0x18);
++ ov2640_write_reg(0x4c, 0x00);
++ ov2640_write_reg(0x87, 0xd0);
++ ov2640_write_reg(0xd7, 0x03);
++ ov2640_write_reg(0xd9, 0x10);
++ ov2640_write_reg(0xd3, 0x82);
++ ov2640_write_reg(0xc8, 0x08);
++ ov2640_write_reg(0xc9, 0x80);
++ ov2640_write_reg(0x7c, 0x00);
++ ov2640_write_reg(0x7d, 0x00);
++ ov2640_write_reg(0x7c, 0x03);
++ ov2640_write_reg(0x7d, 0x48);
++ ov2640_write_reg(0x7d, 0x48);
++ ov2640_write_reg(0x7c, 0x08);
++ ov2640_write_reg(0x7d, 0x20);
++ ov2640_write_reg(0x7d, 0x10);
++ ov2640_write_reg(0x7d, 0x0e);
++ ov2640_write_reg(0x90, 0x00);
++ ov2640_write_reg(0x91, 0x0e);
++ ov2640_write_reg(0x91, 0x1a);
++ ov2640_write_reg(0x91, 0x31);
++ ov2640_write_reg(0x91, 0x5a);
++ ov2640_write_reg(0x91, 0x69);
++ ov2640_write_reg(0x91, 0x75);
++ ov2640_write_reg(0x91, 0x7e);
++ ov2640_write_reg(0x91, 0x88);
++ ov2640_write_reg(0x91, 0x8f);
++ ov2640_write_reg(0x91, 0x96);
++ ov2640_write_reg(0x91, 0xa3);
++ ov2640_write_reg(0x91, 0xaf);
++ ov2640_write_reg(0x91, 0xc4);
++ ov2640_write_reg(0x91, 0xd7);
++ ov2640_write_reg(0x91, 0xe8);
++ ov2640_write_reg(0x91, 0x20);
++
++ ov2640_write_reg(0x92, 0x00);
++ ov2640_write_reg(0x93, 0x06);
++ ov2640_write_reg(0x93, 0xe3);
++ ov2640_write_reg(0x93, 0x03);
++ ov2640_write_reg(0x93, 0x03);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x02);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++
++ ov2640_write_reg(0x96, 0x00);
++ ov2640_write_reg(0x97, 0x08);
++ ov2640_write_reg(0x97, 0x19);
++ ov2640_write_reg(0x97, 0x02);
++ ov2640_write_reg(0x97, 0x0c);
++ ov2640_write_reg(0x97, 0x24);
++ ov2640_write_reg(0x97, 0x30);
++ ov2640_write_reg(0x97, 0x28);
++ ov2640_write_reg(0x97, 0x26);
++ ov2640_write_reg(0x97, 0x02);
++ ov2640_write_reg(0x97, 0x98);
++ ov2640_write_reg(0x97, 0x80);
++ ov2640_write_reg(0x97, 0x00);
++ ov2640_write_reg(0x97, 0x00);
++
++ ov2640_write_reg(0xa4, 0x00);
++ ov2640_write_reg(0xa8, 0x00);
++ ov2640_write_reg(0xc5, 0x11);
++ ov2640_write_reg(0xc6, 0x51);
++ ov2640_write_reg(0xbf, 0x80);
++ ov2640_write_reg(0xc7, 0x10);
++ ov2640_write_reg(0xb6, 0x66);
++ ov2640_write_reg(0xb8, 0xa5);
++ ov2640_write_reg(0xb7, 0x64);
++ ov2640_write_reg(0xb9, 0x7c);
++ ov2640_write_reg(0xb3, 0xaf);
++ ov2640_write_reg(0xb4, 0x97);
++ ov2640_write_reg(0xb5, 0xff);
++ ov2640_write_reg(0xb0, 0xc5);
++ ov2640_write_reg(0xb1, 0x94);
++ ov2640_write_reg(0xb2, 0x0f);
++ ov2640_write_reg(0xc4, 0x5c);
++
++ ov2640_write_reg(0xa6, 0x00);
++ ov2640_write_reg(0xa7, 0x20);
++ ov2640_write_reg(0xa7, 0xd8);
++ ov2640_write_reg(0xa7, 0x1b);
++ ov2640_write_reg(0xa7, 0x31);
++ ov2640_write_reg(0xa7, 0x00);
++ ov2640_write_reg(0xa7, 0x18);
++ ov2640_write_reg(0xa7, 0x20);
++ ov2640_write_reg(0xa7, 0xd8);
++ ov2640_write_reg(0xa7, 0x19);
++ ov2640_write_reg(0xa7, 0x31);
++ ov2640_write_reg(0xa7, 0x00);
++ ov2640_write_reg(0xa7, 0x18);
++ ov2640_write_reg(0xa7, 0x20);
++ ov2640_write_reg(0xa7, 0xd8);
++ ov2640_write_reg(0xa7, 0x19);
++ ov2640_write_reg(0xa7, 0x31);
++ ov2640_write_reg(0xa7, 0x00);
++ ov2640_write_reg(0xa7, 0x18);
++
++ ov2640_write_reg(0xc0, 0xc8);
++ ov2640_write_reg(0xc1, 0x96);
++ ov2640_write_reg(0x86, 0x3d);
++ ov2640_write_reg(0x50, 0x00);
++ ov2640_write_reg(0x51, 0x90);
++ ov2640_write_reg(0x52, 0x18);
++ ov2640_write_reg(0x53, 0x00);
++ ov2640_write_reg(0x54, 0x00);
++ ov2640_write_reg(0x55, 0x88);
++ ov2640_write_reg(0x57, 0x00);
++ ov2640_write_reg(0x5a, 0x90);
++ ov2640_write_reg(0x5b, 0x18);
++ ov2640_write_reg(0x5c, 0x05);
++ ov2640_write_reg(0xc3, 0xef);
++ ov2640_write_reg(0x7f, 0x00);
++ ov2640_write_reg(0xda, 0x01);
++ ov2640_write_reg(0xe5, 0x1f);
++ ov2640_write_reg(0xe1, 0x67);
++ ov2640_write_reg(0xe0, 0x00);
++ ov2640_write_reg(0xdd, 0x7f);
++ ov2640_write_reg(0x05, 0x00);
++
++ return 0;
++}
++
++static int ov2640_init_800_600(void)
++{
++ int ret;
++ ret = ov2640_write_reg(0xff, 0x00);
++ if (ret != 0) {
++ return ret;
++ }
++ ov2640_write_reg(0xff, 0x01);
++ ov2640_write_reg(0x12, 0x80);
++ udelay(1000);
++ ov2640_write_reg(0xff, 0x00);
++ ov2640_write_reg(0x2c, 0xff);
++ ov2640_write_reg(0x2e, 0xdf);
++ ov2640_write_reg(0xff, 0x01);
++ ov2640_write_reg(0x3c, 0x32);
++ ov2640_write_reg(0x11, 0x01);
++ ov2640_write_reg(0x09, 0x00);
++ ov2640_write_reg(0x04, 0x28);
++ ov2640_write_reg(0x13, 0xe5);
++ ov2640_write_reg(0x14, 0x48);
++ ov2640_write_reg(0x2c, 0x0c);
++ ov2640_write_reg(0x33, 0x78);
++ ov2640_write_reg(0x3a, 0x33);
++ ov2640_write_reg(0x3b, 0xfb);
++ ov2640_write_reg(0x3e, 0x00);
++ ov2640_write_reg(0x43, 0x11);
++ ov2640_write_reg(0x16, 0x10);
++ ov2640_write_reg(0x39, 0x92);
++ ov2640_write_reg(0x35, 0xda);
++ ov2640_write_reg(0x22, 0x1a);
++ ov2640_write_reg(0x37, 0xc3);
++ ov2640_write_reg(0x23, 0x00);
++ ov2640_write_reg(0x34, 0xc0);
++ ov2640_write_reg(0x36, 0x1a);
++ ov2640_write_reg(0x06, 0x88);
++ ov2640_write_reg(0x07, 0xc0);
++ ov2640_write_reg(0x0d, 0x87);
++ ov2640_write_reg(0x0e, 0x41);
++ ov2640_write_reg(0x4c, 0x00);
++ ov2640_write_reg(0x4a, 0x81);
++ ov2640_write_reg(0x21, 0x99);
++ ov2640_write_reg(0x24, 0x40);
++ ov2640_write_reg(0x25, 0x38);
++ ov2640_write_reg(0x26, 0x82);
++ ov2640_write_reg(0x5c, 0x00);
++ ov2640_write_reg(0x63, 0x00);
++ ov2640_write_reg(0x46, 0x22);
++ ov2640_write_reg(0x0c, 0x3c);
++ ov2640_write_reg(0x5d, 0x55);
++ ov2640_write_reg(0x5e, 0x7d);
++ ov2640_write_reg(0x5f, 0x7d);
++ ov2640_write_reg(0x60, 0x55);
++ ov2640_write_reg(0x61, 0x70);
++ ov2640_write_reg(0x62, 0x80);
++ ov2640_write_reg(0x7c, 0x05);
++ ov2640_write_reg(0x20, 0x80);
++ ov2640_write_reg(0x28, 0x30);
++ ov2640_write_reg(0x6c, 0x00);
++ ov2640_write_reg(0x6d, 0x80);
++ ov2640_write_reg(0x6e, 0x00);
++ ov2640_write_reg(0x70, 0x02);
++ ov2640_write_reg(0x71, 0x94);
++ ov2640_write_reg(0x73, 0xc1);
++ ov2640_write_reg(0x12, 0x40);
++ ov2640_write_reg(0x17, 0x11);
++ ov2640_write_reg(0x18, 0x43);
++ ov2640_write_reg(0x19, 0x00);
++ ov2640_write_reg(0x1a, 0x4b);
++ ov2640_write_reg(0x32, 0x09);
++ ov2640_write_reg(0x37, 0xc0);
++ ov2640_write_reg(0x4f, 0xca);
++ ov2640_write_reg(0x50, 0xa8);
++ ov2640_write_reg(0x6d, 0x00);
++ ov2640_write_reg(0x3d, 0x38);
++ ov2640_write_reg(0xff, 0x00);
++ ov2640_write_reg(0xe5, 0x7f);
++ ov2640_write_reg(0xf9, 0xc0);
++ ov2640_write_reg(0x41, 0x24);
++ ov2640_write_reg(0x44, 0x06);
++ ov2640_write_reg(0xe0, 0x14);
++ ov2640_write_reg(0x76, 0xff);
++ ov2640_write_reg(0x33, 0xa0);
++ ov2640_write_reg(0x42, 0x20);
++ ov2640_write_reg(0x43, 0x18);
++ ov2640_write_reg(0x4c, 0x00);
++ ov2640_write_reg(0x87, 0xd0);
++ ov2640_write_reg(0x88, 0x3f);
++ ov2640_write_reg(0xd7, 0x03);
++ ov2640_write_reg(0xd9, 0x10);
++ ov2640_write_reg(0xd3, 0x82);
++ ov2640_write_reg(0xc8, 0x08);
++ ov2640_write_reg(0xc9, 0x80);
++ ov2640_write_reg(0x7c, 0x00);
++ ov2640_write_reg(0x7d, 0x00);
++ ov2640_write_reg(0x7c, 0x03);
++ ov2640_write_reg(0x7d, 0x48);
++ ov2640_write_reg(0x7d, 0x48);
++ ov2640_write_reg(0x7c, 0x08);
++ ov2640_write_reg(0x7d, 0x20);
++ ov2640_write_reg(0x7d, 0x10);
++ ov2640_write_reg(0x7d, 0x0e);
++ ov2640_write_reg(0x90, 0x00);
++ ov2640_write_reg(0x91, 0x0e);
++ ov2640_write_reg(0x91, 0x1a);
++ ov2640_write_reg(0x91, 0x31);
++ ov2640_write_reg(0x91, 0x5a);
++ ov2640_write_reg(0x91, 0x69);
++ ov2640_write_reg(0x91, 0x75);
++ ov2640_write_reg(0x91, 0x7e);
++ ov2640_write_reg(0x91, 0x88);
++ ov2640_write_reg(0x91, 0x8f);
++ ov2640_write_reg(0x91, 0x96);
++ ov2640_write_reg(0x91, 0xa3);
++ ov2640_write_reg(0x91, 0xaf);
++ ov2640_write_reg(0x91, 0xc4);
++ ov2640_write_reg(0x91, 0xd7);
++ ov2640_write_reg(0x91, 0xe8);
++ ov2640_write_reg(0x91, 0x20);
++
++ ov2640_write_reg(0x92, 0x00);
++ ov2640_write_reg(0x93, 0x06);
++ ov2640_write_reg(0x93, 0xe3);
++ ov2640_write_reg(0x93, 0x03);
++ ov2640_write_reg(0x93, 0x03);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x02);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++ ov2640_write_reg(0x93, 0x00);
++
++ ov2640_write_reg(0x96, 0x00);
++ ov2640_write_reg(0x97, 0x08);
++ ov2640_write_reg(0x97, 0x19);
++ ov2640_write_reg(0x97, 0x02);
++ ov2640_write_reg(0x97, 0x0c);
++ ov2640_write_reg(0x97, 0x24);
++ ov2640_write_reg(0x97, 0x30);
++ ov2640_write_reg(0x97, 0x28);
++ ov2640_write_reg(0x97, 0x26);
++ ov2640_write_reg(0x97, 0x02);
++ ov2640_write_reg(0x97, 0x98);
++ ov2640_write_reg(0x97, 0x80);
++ ov2640_write_reg(0x97, 0x00);
++ ov2640_write_reg(0x97, 0x00);
++
++ ov2640_write_reg(0xa4, 0x00);
++ ov2640_write_reg(0xa8, 0x00);
++ ov2640_write_reg(0xc5, 0x11);
++ ov2640_write_reg(0xc6, 0x51);
++ ov2640_write_reg(0xbf, 0x80);
++ ov2640_write_reg(0xc7, 0x10);
++ ov2640_write_reg(0xb6, 0x66);
++ ov2640_write_reg(0xb8, 0xa5);
++ ov2640_write_reg(0xb7, 0x64);
++ ov2640_write_reg(0xb9, 0x7c);
++ ov2640_write_reg(0xb3, 0xaf);
++ ov2640_write_reg(0xb4, 0x97);
++ ov2640_write_reg(0xb5, 0xff);
++ ov2640_write_reg(0xb0, 0xc5);
++ ov2640_write_reg(0xb1, 0x94);
++ ov2640_write_reg(0xb2, 0x0f);
++ ov2640_write_reg(0xc4, 0x5c);
++
++ ov2640_write_reg(0xa6, 0x00);
++ ov2640_write_reg(0xa7, 0x20);
++ ov2640_write_reg(0xa7, 0xd8);
++ ov2640_write_reg(0xa7, 0x1b);
++ ov2640_write_reg(0xa7, 0x31);
++ ov2640_write_reg(0xa7, 0x00);
++ ov2640_write_reg(0xa7, 0x18);
++ ov2640_write_reg(0xa7, 0x20);
++ ov2640_write_reg(0xa7, 0xd8);
++ ov2640_write_reg(0xa7, 0x19);
++ ov2640_write_reg(0xa7, 0x31);
++ ov2640_write_reg(0xa7, 0x00);
++ ov2640_write_reg(0xa7, 0x18);
++ ov2640_write_reg(0xa7, 0x20);
++ ov2640_write_reg(0xa7, 0xd8);
++ ov2640_write_reg(0xa7, 0x19);
++ ov2640_write_reg(0xa7, 0x31);
++ ov2640_write_reg(0xa7, 0x00);
++ ov2640_write_reg(0xa7, 0x18);
++
++ ov2640_write_reg(0xc0, 0x64);
++ ov2640_write_reg(0xc1, 0x4b);
++ ov2640_write_reg(0x86, 0x1d);
++ ov2640_write_reg(0x50, 0x00);
++ ov2640_write_reg(0x51, 0xc8);
++ ov2640_write_reg(0x52, 0x96);
++ ov2640_write_reg(0x53, 0x00);
++ ov2640_write_reg(0x54, 0x00);
++ ov2640_write_reg(0x55, 0x00);
++ ov2640_write_reg(0x57, 0x00);
++ ov2640_write_reg(0x5a, 0xc8);
++ ov2640_write_reg(0x5b, 0x96);
++ ov2640_write_reg(0x5c, 0x00);
++ ov2640_write_reg(0xc3, 0xef);
++ ov2640_write_reg(0x7f, 0x00);
++ ov2640_write_reg(0xda, 0x01);
++ ov2640_write_reg(0xe5, 0x1f);
++ ov2640_write_reg(0xe1, 0x67);
++ ov2640_write_reg(0xe0, 0x00);
++ ov2640_write_reg(0xdd, 0x7f);
++ ov2640_write_reg(0x05, 0x00);
++
++ return 0;
++}
++
++/*!
++ * ov2640 sensor interface Initialization
++ * @param param sensor_interface *
++ * @param width u32
++ * @param height u32
++ * @return None
++ */
++static void ov2640_interface(sensor_interface * param, u32 width, u32 height)
++{
++ param->Vsync_pol = 0x0;
++ param->clk_mode = 0x0; /* gated */
++ param->pixclk_pol = 0x0;
++ param->data_width = 0x1;
++ param->data_pol = 0x0;
++ param->ext_vsync = 0x0;
++ param->Vsync_pol = 0x0;
++ param->Hsync_pol = 0x0;
++ param->width = width - 1;
++ param->height = height - 1;
++ param->pixel_fmt = IPU_PIX_FMT_UYVY;
++ param->mclk = 27000000;
++}
++
++static void
++ov2640_set_color(int bright, int saturation, int red, int green, int blue)
++{
++ return;
++}
++
++static void
++ov2640_get_color(int *bright, int *saturation, int *red, int *green, int *blue)
++{
++ return;
++}
++
++static void ov2640_set_ae_mode(int ae_mode)
++{
++ return;
++}
++
++static void ov2640_get_ae_mode(int *ae_mode)
++{
++ return;
++}
++
++extern void gpio_sensor_active(void);
++extern cam_data *g_cam;
++
++static sensor_interface *ov2640_config(int *frame_rate, int high_quality)
++{
++ u32 out_width, out_height;
++
++ if (interface_param == NULL) {
++ return NULL;
++ }
++#ifdef NONSENSE
++ PMIC_STATUS ret;
++ t_regulator_voltage voltage;
++
++ /* AVDD--2.8v */
++ voltage.vmmc1 = VMMC1_2_8V;
++ if ((ret = pmic_power_regulator_set_voltage(REGU_VMMC1, voltage)) < 0) {
++ PRINTK("%s:vmmc1 set voltage error:%d\n", __func__, ret);
++ return NULL;
++ } else {
++ PRINTK("%s:vmmc1 set voltage ok\n", __func__);
++ }
++
++ if ((ret = pmic_power_regulator_on(REGU_VMMC1)) < 0) {
++ PRINTK("%s:vmmc1 power on error:%d\n", __func__, ret);
++ return NULL;
++ } else {
++ PRINTK("%s:vmmc1 power on ok\n", __func__);
++ }
++
++ /* DVDD--1.3v */
++ voltage.vvib = VVIB_1_3V;
++ if ((ret = pmic_power_regulator_set_voltage(REGU_VVIB, voltage)) < 0) {
++ PRINTK("%s:VVIB set voltage error:%d\n", __func__, ret);
++ return NULL;
++ } else {
++ PRINTK("%s:VVIB set voltage ok\n", __func__);
++ }
++ if ((ret = pmic_power_regulator_on(REGU_VVIB)) < 0) {
++ PRINTK("%s:VVIB power regulator on error:%d\n", __func__, ret);
++ return NULL;
++ } else {
++ PRINTK("%s:VVIB power on ok\n", __func__);
++ }
++
++ /* DOVDD--2v(1.8-3.0) */
++ voltage.sw2b = SW2B_2V;
++ if ((ret = pmic_power_regulator_set_voltage(SW_SW2B, voltage)) < 0) {
++ PRINTK("%s:SW2B set voltage error:%d\n", __func__, ret);
++ return NULL;
++ } else {
++ PRINTK("%s:SW2B set voltage ok\n", __func__);
++ }
++ if (pmic_power_set_regen_assig(REGU_GPO3, 1) < 0) {
++ PRINTK("%s:set_regen_assig error\n", __func__);
++ return NULL;
++ } else {
++ PRINTK("%s:set_regen_assig ok\n", __func__);
++ }
++ if ((ret = pmic_power_regulator_on(REGU_GPO3)) < 0) {
++ PRINTK("%s:REGU_GPO3 power on error:%d\n", __func__, ret);
++ return NULL;
++ } else {
++ PRINTK("%s:REGU_GPO3 power on ok\n", __func__);
++ }
++ PRINTK("%s:OV2640 power on ok\n", __func__);
++#endif
++ if (high_quality) {
++ out_width = 1600;
++ out_height = 1120;
++ g_cam->crop_bounds.left = 0;
++ g_cam->crop_bounds.width = 1600;
++ g_cam->crop_bounds.top = 0;
++ g_cam->crop_bounds.height = 1120;
++ g_cam->crop_current = g_cam->crop_defrect = g_cam->crop_bounds;
++#ifdef CONFIG_ARCH_MX3
++ ipu_csi_set_window_size(g_cam->crop_current.width,
++ g_cam->crop_current.height);
++ ipu_csi_set_window_pos(g_cam->crop_current.left,
++ g_cam->crop_current.top);
++#endif
++ g_cam->streamparm.parm.capture.capturemode = 1;
++ } else {
++ out_width = 640;
++ out_height = 480;
++ g_cam->crop_bounds.left = 0;
++ g_cam->crop_bounds.width = 640;
++ g_cam->crop_bounds.top = 0;
++ g_cam->crop_bounds.height = 480;
++ g_cam->crop_current = g_cam->crop_defrect = g_cam->crop_bounds;
++#ifdef CONFIG_ARCH_MX3
++ ipu_csi_set_window_size(g_cam->crop_current.width,
++ g_cam->crop_current.height);
++ ipu_csi_set_window_pos(g_cam->crop_current.left,
++ g_cam->crop_current.top);
++#endif
++ g_cam->streamparm.parm.capture.capturemode = 0;
++ }
++ ov2640_interface(interface_param, out_width, out_height);
++ set_mclk_rate(&interface_param->mclk);
++
++ if (high_quality) {
++ if (ov2640_init_1600_1120() != 0) {
++ return NULL;
++ }
++ } else {
++ if (ov2640_init_800_600() != 0) {
++ return NULL;
++ }
++ }
++ return interface_param;
++}
++
++static void ov2640_get_control_params(int *ae, int *awb, int *flicker)
++{
++ *ae = 0;
++ *awb = 0;
++ *flicker = 0;
++}
++
++static sensor_interface *ov2640_reset(void)
++{
++ return ov2640_config(&reset_frame_rate, 0);
++}
++
++static int ov2640_get_status(void)
++{
++ return 0;
++}
++
++struct camera_sensor camera_sensor_if = {
++ .set_color = ov2640_set_color,
++ .get_color = ov2640_get_color,
++ .set_ae_mode = ov2640_set_ae_mode,
++ .get_ae_mode = ov2640_get_ae_mode,
++ .get_control_params = ov2640_get_control_params,
++ .config = ov2640_config,
++ .reset = ov2640_reset,
++ .get_status = ov2640_get_status,
++};
++
++EXPORT_SYMBOL(camera_sensor_if);
++
++/*!
++ * ov2640 init function
++ *
++ * @return Error code indicating success or failure
++ */
++static __init int ov2640_init(void)
++{
++ u8 err;
++
++ gpio_sensor_active();
++
++ err = i2c_add_driver(&ov2640_i2c_driver);
++
++ return err;
++}
++
++extern void gpio_sensor_inactive(void);
++/*!
++ * OV2640 cleanup function
++ *
++ * @return Error code indicating success or failure
++ */
++static void __exit ov2640_clean(void)
++{
++ i2c_del_driver(&ov2640_i2c_driver);
++
++ gpio_sensor_inactive();
++}
++
++module_init(ov2640_init);
++module_exit(ov2640_clean);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("OV2640 Camera Driver");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/capture/sensor_clock.c linux-2.6.28-karo/drivers/media/video/mxc/capture/sensor_clock.c
+--- linux-2.6.28/drivers/media/video/mxc/capture/sensor_clock.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/capture/sensor_clock.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,56 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file sensor_clock.c
++ *
++ * @brief camera clock function
++ *
++ * @ingroup Camera
++ */
++#include <linux/init.h>
++#include <linux/ctype.h>
++#include <linux/types.h>
++#include <linux/device.h>
++#include <linux/clk.h>
++
++/*
++ * set_mclk_rate
++ *
++ * @param p_mclk_freq mclk frequence
++ *
++ */
++void set_mclk_rate(uint32_t * p_mclk_freq)
++{
++ struct clk *clk;
++ int i;
++ uint32_t freq = 0;
++ uint32_t step = *p_mclk_freq / 8;
++
++ clk = clk_get(NULL, "csi_clk");
++
++ for (i = 0; i <= 8; i++) {
++ freq = clk_round_rate(clk, *p_mclk_freq - (i * step));
++ if (freq <= *p_mclk_freq)
++ break;
++ }
++ clk_set_rate(clk, freq);
++
++ *p_mclk_freq = freq;
++
++ clk_put(clk);
++ pr_debug("mclk frequency = %d\n", *p_mclk_freq);
++}
++
++/* Exported symbols for modules. */
++EXPORT_SYMBOL(set_mclk_rate);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/opl/Makefile linux-2.6.28-karo/drivers/media/video/mxc/opl/Makefile
+--- linux-2.6.28/drivers/media/video/mxc/opl/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/opl/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,5 @@
++opl-objs := opl_mod.o rotate90_u16.o rotate270_u16.o \
++ rotate90_u16_qcif.o rotate270_u16_qcif.o \
++ vmirror_u16.o hmirror_rotate180_u16.o
++
++obj-$(CONFIG_VIDEO_MXC_OPL) += opl.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/opl/hmirror_rotate180_u16.c linux-2.6.28-karo/drivers/media/video/mxc/opl/hmirror_rotate180_u16.c
+--- linux-2.6.28/drivers/media/video/mxc/opl/hmirror_rotate180_u16.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/opl/hmirror_rotate180_u16.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,259 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/module.h>
++#include "opl.h"
++
++static inline u32 rot_left_u16(u16 x, unsigned int n)
++{
++ return (x << n) | (x >> (16 - n));
++}
++
++static inline u32 rot_left_u32(u32 x, unsigned int n)
++{
++ return (x << n) | (x >> (32 - n));
++}
++
++static inline u32 byte_swap_u32(u32 x)
++{
++ u32 t1, t2, t3;
++
++ t1 = x ^ ((x << 16) | x >> 16);
++ t2 = t1 & 0xff00ffff;
++ t3 = (x >> 8) | (x << 24);
++ return t3 ^ (t2 >> 8);
++}
++
++static int opl_hmirror_u16_by1(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror);
++static int opl_hmirror_u16_by2(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror);
++static int opl_hmirror_u16_by4(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror);
++static int opl_hmirror_u16_by8(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror);
++
++int opl_hmirror_u16(const u8 * src, int src_line_stride, int width, int height,
++ u8 * dst, int dst_line_stride)
++{
++ if (!src || !dst)
++ return OPLERR_NULL_PTR;
++
++ if (width == 0 || height == 0 || src_line_stride == 0
++ || dst_line_stride == 0)
++ return OPLERR_BAD_ARG;
++
++ if (width % 8 == 0)
++ return opl_hmirror_u16_by8(src, src_line_stride, width, height,
++ dst, dst_line_stride, 0);
++ else if (width % 4 == 0)
++ return opl_hmirror_u16_by4(src, src_line_stride, width, height,
++ dst, dst_line_stride, 0);
++ else if (width % 2 == 0)
++ return opl_hmirror_u16_by2(src, src_line_stride, width, height,
++ dst, dst_line_stride, 0);
++ else /* (width % 1) */
++ return opl_hmirror_u16_by1(src, src_line_stride, width, height,
++ dst, dst_line_stride, 0);
++}
++
++int opl_rotate180_u16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride)
++{
++ if (!src || !dst)
++ return OPLERR_NULL_PTR;
++
++ if (width == 0 || height == 0 || src_line_stride == 0
++ || dst_line_stride == 0)
++ return OPLERR_BAD_ARG;
++
++ if (width % 8 == 0)
++ return opl_hmirror_u16_by8(src, src_line_stride, width, height,
++ dst, dst_line_stride, 1);
++ else if (width % 4 == 0)
++ return opl_hmirror_u16_by4(src, src_line_stride, width, height,
++ dst, dst_line_stride, 1);
++ else if (width % 2 == 0)
++ return opl_hmirror_u16_by2(src, src_line_stride, width, height,
++ dst, dst_line_stride, 1);
++ else /* (width % 1) */
++ return opl_hmirror_u16_by1(src, src_line_stride, width, height,
++ dst, dst_line_stride, 1);
++}
++
++static int opl_hmirror_u16_by1(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror)
++{
++ const u8 *src_row_addr;
++ const u8 *psrc;
++ u8 *dst_row_addr, *pdst;
++ int i, j;
++ u16 pixel;
++
++ src_row_addr = src;
++ if (vmirror) {
++ dst_row_addr = dst + dst_line_stride * (height - 1);
++ dst_line_stride = -dst_line_stride;
++ } else
++ dst_row_addr = dst;
++
++ /* Loop over all rows */
++ for (i = 0; i < height; i++) {
++ /* Loop over each pixel */
++ psrc = src_row_addr;
++ pdst = dst_row_addr + (width - 1) * BYTES_PER_PIXEL
++ - (BYTES_PER_PIXEL - BYTES_PER_PIXEL);
++ for (j = 0; j < width; j++) {
++ pixel = *(u16 *) psrc;
++ *(u16 *) pdst = pixel;
++ psrc += BYTES_PER_PIXEL;
++ pdst -= BYTES_PER_PIXEL;
++ }
++ src_row_addr += src_line_stride;
++ dst_row_addr += dst_line_stride;
++ }
++
++ return OPLERR_SUCCESS;
++}
++
++static int opl_hmirror_u16_by2(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror)
++{
++ const u8 *src_row_addr;
++ const u8 *psrc;
++ u8 *dst_row_addr, *pdst;
++ int i, j;
++ u32 pixelsin, pixelsout;
++
++ src_row_addr = src;
++ if (vmirror) {
++ dst_row_addr = dst + dst_line_stride * (height - 1);
++ dst_line_stride = -dst_line_stride;
++ } else
++ dst_row_addr = dst;
++
++ /* Loop over all rows */
++ for (i = 0; i < height; i++) {
++ /* Loop over each pixel */
++ psrc = src_row_addr;
++ pdst = dst_row_addr + (width - 2) * BYTES_PER_PIXEL;
++ for (j = 0; j < (width >> 1); j++) {
++ pixelsin = *(u32 *) psrc;
++ pixelsout = rot_left_u32(pixelsin, 16);
++ *(u32 *) pdst = pixelsout;
++ psrc += BYTES_PER_2PIXEL;
++ pdst -= BYTES_PER_2PIXEL;
++ }
++ src_row_addr += src_line_stride;
++ dst_row_addr += dst_line_stride;
++ }
++
++ return OPLERR_SUCCESS;
++}
++
++static int opl_hmirror_u16_by4(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror)
++{
++ const u8 *src_row_addr;
++ const u8 *psrc;
++ u8 *dst_row_addr, *pdst;
++ int i, j;
++
++ union doubleword {
++ u64 dw;
++ u32 w[2];
++ };
++
++ union doubleword inbuf;
++ union doubleword outbuf;
++
++ src_row_addr = src;
++ if (vmirror) {
++ dst_row_addr = dst + dst_line_stride * (height - 1);
++ dst_line_stride = -dst_line_stride;
++ } else
++ dst_row_addr = dst;
++
++ /* Loop over all rows */
++ for (i = 0; i < height; i++) {
++ /* Loop over each pixel */
++ psrc = src_row_addr;
++ pdst = dst_row_addr + (width - 4) * BYTES_PER_PIXEL;
++ for (j = 0; j < (width >> 2); j++) {
++ inbuf.dw = *(u64 *) psrc;
++ outbuf.w[0] = rot_left_u32(inbuf.w[1], 16);
++ outbuf.w[1] = rot_left_u32(inbuf.w[0], 16);
++ *(u64 *) pdst = outbuf.dw;
++ psrc += BYTES_PER_4PIXEL;
++ pdst -= BYTES_PER_4PIXEL;
++ }
++ src_row_addr += src_line_stride;
++ dst_row_addr += dst_line_stride;
++ }
++ return OPLERR_SUCCESS;
++}
++
++static int opl_hmirror_u16_by8(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror)
++{
++ const u8 *src_row_addr;
++ const u8 *psrc;
++ u8 *dst_row_addr, *pdst;
++ int i, j;
++
++ src_row_addr = src;
++ if (vmirror) {
++ dst_row_addr = dst + dst_line_stride * (height - 1);
++ dst_line_stride = -dst_line_stride;
++ } else
++ dst_row_addr = dst;
++
++ /* Loop over all rows */
++ for (i = 0; i < height; i++) {
++ /* Loop over each pixel */
++ psrc = src_row_addr;
++ pdst = dst_row_addr + (width - 1) * BYTES_PER_PIXEL - 2;
++ for (j = (width >> 3); j > 0; j--) {
++ __asm__ volatile (
++ "ldmia %0!,{r2-r5}\n\t"
++ "mov r6, r2\n\t"
++ "mov r7, r3\n\t"
++ "mov r2, r5, ROR #16\n\t"
++ "mov r3, r4, ROR #16\n\t"
++ "mov r4, r7, ROR #16\n\t"
++ "mov r5, r6, ROR #16\n\t"
++ "stmda %1!,{r2-r5}\n\t"
++
++ :"+r"(psrc), "+r"(pdst)
++ :"0"(psrc), "1"(pdst)
++ :"r2", "r3", "r4", "r5", "r6", "r7",
++ "memory"
++ );
++ }
++ src_row_addr += src_line_stride;
++ dst_row_addr += dst_line_stride;
++ }
++
++ return OPLERR_SUCCESS;
++}
++
++EXPORT_SYMBOL(opl_hmirror_u16);
++EXPORT_SYMBOL(opl_rotate180_u16);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/opl/opl.h linux-2.6.28-karo/drivers/media/video/mxc/opl/opl.h
+--- linux-2.6.28/drivers/media/video/mxc/opl/opl.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/opl/opl.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,162 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @defgroup OPLIP OPL Image Processing
++ */
++/*!
++ * @file opl.h
++ *
++ * @brief The OPL (Open Primitives Library) Image Processing library defines
++ * efficient functions for rotation and mirroring.
++ *
++ * It includes ARM9-optimized rotation and mirroring functions. It is derived
++ * from the original OPL project which is found at sourceforge.freescale.net.
++ *
++ * @ingroup OPLIP
++ */
++#ifndef __OPL_H__
++#define __OPL_H__
++
++#include <linux/types.h>
++
++#define BYTES_PER_PIXEL 2
++#define CACHE_LINE_WORDS 8
++#define BYTES_PER_WORD 4
++
++#define BYTES_PER_2PIXEL (BYTES_PER_PIXEL * 2)
++#define BYTES_PER_4PIXEL (BYTES_PER_PIXEL * 4)
++#define BYTES_PER_8PIXEL (BYTES_PER_PIXEL * 8)
++
++#define QCIF_Y_WIDTH 176
++#define QCIF_Y_HEIGHT 144
++
++/*! Enumerations of opl error code */
++enum opl_error {
++ OPLERR_SUCCESS = 0,
++ OPLERR_NULL_PTR,
++ OPLERR_BAD_ARG,
++ OPLERR_DIV_BY_ZERO,
++ OPLERR_OVER_FLOW,
++ OPLERR_UNDER_FLOW,
++ OPLERR_MISALIGNED,
++};
++
++/*!
++ * @brief Rotate a 16bbp buffer 90 degrees clockwise.
++ *
++ * @param src Pointer to the input buffer
++ * @param src_line_stride Length in bytes of a raster line of the input buffer
++ * @param width Width in pixels of the region in the input buffer
++ * @param height Height in pixels of the region in the input buffer
++ * @param dst Pointer to the output buffer
++ * @param dst_line_stride Length in bytes of a raster line of the output buffer
++ *
++ * @return Standard OPL error code. See enumeration for possible result codes.
++ */
++int opl_rotate90_u16(const u8 * src, int src_line_stride, int width, int height,
++ u8 * dst, int dst_line_stride);
++
++/*!
++ * @brief Rotate a 16bbp buffer 180 degrees clockwise.
++ *
++ * @param src Pointer to the input buffer
++ * @param src_line_stride Length in bytes of a raster line of the input buffer
++ * @param width Width in pixels of the region in the input buffer
++ * @param height Height in pixels of the region in the input buffer
++ * @param dst Pointer to the output buffer
++ * @param dst_line_stride Length in bytes of a raster line of the output buffer
++ *
++ * @return Standard OPL error code. See enumeration for possible result codes.
++ */
++int opl_rotate180_u16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride);
++
++/*!
++ * @brief Rotate a 16bbp buffer 270 degrees clockwise
++ *
++ * @param src Pointer to the input buffer
++ * @param src_line_stride Length in bytes of a raster line of the input buffer
++ * @param width Width in pixels of the region in the input buffer
++ * @param height Height in pixels of the region in the input buffer
++ * @param dst Pointer to the output buffer
++ * @param dst_line_stride Length in bytes of a raster line of the output buffer
++ *
++ * @return Standard OPL error code. See enumeration for possible result codes.
++ */
++int opl_rotate270_u16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride);
++
++/*!
++ * @brief Mirror a 16bpp buffer horizontally
++ *
++ * @param src Pointer to the input buffer
++ * @param src_line_stride Length in bytes of a raster line of the input buffer
++ * @param width Width in pixels of the region in the input buffer
++ * @param height Height in pixels of the region in the input buffer
++ * @param dst Pointer to the output buffer
++ * @param dst_line_stride Length in bytes of a raster line of the output buffer
++ *
++ * @return Standard OPL error code. See enumeration for possible result codes.
++ */
++int opl_hmirror_u16(const u8 * src, int src_line_stride, int width, int height,
++ u8 * dst, int dst_line_stride);
++
++/*!
++ * @brief Mirror a 16bpp buffer vertically
++ *
++ * @param src Pointer to the input buffer
++ * @param src_line_stride Length in bytes of a raster line of the input buffer
++ * @param width Width in pixels of the region in the input buffer
++ * @param height Height in pixels of the region in the input buffer
++ * @param dst Pointer to the output buffer
++ * @param dst_line_stride Length in bytes of a raster line of the output buffer
++ *
++ * @return Standard OPL error code. See enumeration for possible result codes.
++ */
++int opl_vmirror_u16(const u8 * src, int src_line_stride, int width, int height,
++ u8 * dst, int dst_line_stride);
++
++/*!
++ * @brief Rotate a 16bbp buffer 90 degrees clockwise and mirror vertically
++ * It is equivalent to rotate 270 degree and mirror horizontally
++ *
++ * @param src Pointer to the input buffer
++ * @param src_line_stride Length in bytes of a raster line of the input buffer
++ * @param width Width in pixels of the region in the input buffer
++ * @param height Height in pixels of the region in the input buffer
++ * @param dst Pointer to the output buffer
++ * @param dst_line_stride Length in bytes of a raster line of the output buffer
++ *
++ * @return Standard OPL error code. See enumeration for possible result codes.
++ */
++int opl_rotate90_vmirror_u16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride);
++
++/*!
++ * @brief Rotate a 16bbp buffer 270 degrees clockwise and mirror vertically
++ * It is equivalent to rotate 90 degree and mirror horizontally
++ *
++ * @param src Pointer to the input buffer
++ * @param src_line_stride Length in bytes of a raster line of the input buffer
++ * @param width Width in pixels of the region in the input buffer
++ * @param height Height in pixels of the region in the input buffer
++ * @param dst Pointer to the output buffer
++ * @param dst_line_stride Length in bytes of a raster line of the output buffer
++ *
++ * @return Standard OPL error code. See enumeration for possible result codes.
++ */
++int opl_rotate270_vmirror_u16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride);
++
++#endif /* __OPL_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/opl/opl_mod.c linux-2.6.28-karo/drivers/media/video/mxc/opl/opl_mod.c
+--- linux-2.6.28/drivers/media/video/mxc/opl/opl_mod.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/opl/opl_mod.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,30 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/module.h>
++
++static __init int opl_init(void)
++{
++ return 0;
++}
++
++static void __exit opl_exit(void)
++{
++}
++
++module_init(opl_init);
++module_exit(opl_exit);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("OPL Software Rotation/Mirroring");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/opl/rotate270_u16.c linux-2.6.28-karo/drivers/media/video/mxc/opl/rotate270_u16.c
+--- linux-2.6.28/drivers/media/video/mxc/opl/rotate270_u16.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/opl/rotate270_u16.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,285 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/module.h>
++#include "opl.h"
++
++static int opl_rotate270_u16_by16(const u8 * src, int src_line_stride,
++ int width, int height, u8 * dst,
++ int dst_line_stride, int vmirror);
++static int opl_rotate270_u16_by4(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror);
++static int opl_rotate270_vmirror_u16_both(const u8 * src, int src_line_stride,
++ int width, int height, u8 * dst,
++ int dst_line_stride, int vmirror);
++int opl_rotate270_u16_qcif(const u8 * src, u8 * dst);
++
++int opl_rotate270_u16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride)
++{
++ return opl_rotate270_vmirror_u16_both(src, src_line_stride, width,
++ height, dst, dst_line_stride, 0);
++}
++
++int opl_rotate270_vmirror_u16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride)
++{
++ return opl_rotate270_vmirror_u16_both(src, src_line_stride, width,
++ height, dst, dst_line_stride, 1);
++}
++
++static int opl_rotate270_vmirror_u16_both(const u8 * src, int src_line_stride,
++ int width, int height, u8 * dst,
++ int dst_line_stride, int vmirror)
++{
++ const int BLOCK_SIZE_PIXELS = CACHE_LINE_WORDS * BYTES_PER_WORD
++ / BYTES_PER_PIXEL;
++ const int BLOCK_SIZE_PIXELS_BY4 = CACHE_LINE_WORDS * BYTES_PER_WORD
++ / BYTES_PER_PIXEL / 4;
++
++ if (!src || !dst)
++ return OPLERR_NULL_PTR;
++
++ if (width == 0 || height == 0 || src_line_stride == 0
++ || dst_line_stride == 0)
++ return OPLERR_BAD_ARG;
++
++ /* The QCIF algorithm doesn't support vertical mirroring */
++ if (vmirror == 0 && width == QCIF_Y_WIDTH && height == QCIF_Y_HEIGHT
++ && src_line_stride == QCIF_Y_WIDTH * 2
++ && src_line_stride == QCIF_Y_HEIGHT * 2)
++ return opl_rotate270_u16_qcif(src, dst);
++ else if (width % BLOCK_SIZE_PIXELS == 0
++ && height % BLOCK_SIZE_PIXELS == 0)
++ return opl_rotate270_u16_by16(src, src_line_stride, width,
++ height, dst, dst_line_stride,
++ vmirror);
++ else if (width % BLOCK_SIZE_PIXELS_BY4 == 0
++ && height % BLOCK_SIZE_PIXELS_BY4 == 0)
++ return opl_rotate270_u16_by4(src, src_line_stride, width,
++ height, dst, dst_line_stride,
++ vmirror);
++ else
++ return OPLERR_BAD_ARG;
++}
++
++/*
++ * Rotate Counter Clockwise, divide RGB component into 16 row strips, read
++ * non sequentially and write sequentially. This is done in 16 line strips
++ * so that the cache is used better. Cachelines are 8 words = 32 bytes. Pixels
++ * are 2 bytes. The 16 reads will be cache misses, but the next 240 should
++ * be from cache. The writes to the output buffer will be sequential for 16
++ * writes.
++ *
++ * Example:
++ * Input data matrix: output matrix
++ *
++ * 0 | 1 | 2 | 3 | 4 | 4 | 0 | 0 | 3 |
++ * 4 | 3 | 2 | 1 | 0 | 3 | 1 | 9 | 6 |
++ * 6 | 7 | 8 | 9 | 0 | 2 | 2 | 8 | 2 |
++ * 5 | 3 | 2 | 6 | 3 | 1 | 3 | 7 | 3 |
++ * ^ 0 | 4 | 6 | 5 | < Write the input data sequentially
++ * Read first column
++ * Start at the bottom
++ * Move to next column and repeat
++ *
++ * Loop over k decreasing (blocks)
++ * in_block_ptr = src + (((RGB_HEIGHT_PIXELS / BLOCK_SIZE_PIXELS) - k)
++ * * BLOCK_SIZE_PIXELS) * (RGB_WIDTH_BYTES)
++ * out_block_ptr = dst + (((RGB_HEIGHT_PIXELS / BLOCK_SIZE_PIXELS) - k)
++ * * BLOCK_SIZE_BYTES) + (RGB_WIDTH_PIXELS - 1)
++ * * RGB_HEIGHT_PIXELS * BYTES_PER_PIXEL
++ *
++ * Loop over i decreasing (width)
++ * Each pix:
++ * in_block_ptr += RGB_WIDTH_BYTES
++ * out_block_ptr += 4
++ *
++ * Each row of block:
++ * in_block_ptr -= RGB_WIDTH_BYTES * BLOCK_SIZE_PIXELS - 2
++ * out_block_ptr -= RGB_HEIGHT_PIXELS * BYTES_PER_PIXEL + 2 * BLOCK_SIZE_PIXELS;
++ *
++ * It may perform vertical mirroring too depending on the vmirror flag.
++ */
++static int opl_rotate270_u16_by16(const u8 * src, int src_line_stride,
++ int width, int height, u8 * dst,
++ int dst_line_stride, int vmirror)
++{
++ const int BLOCK_SIZE_PIXELS = CACHE_LINE_WORDS * BYTES_PER_WORD
++ / BYTES_PER_PIXEL;
++ const int IN_INDEX = src_line_stride * BLOCK_SIZE_PIXELS
++ - BYTES_PER_PIXEL;
++ const int OUT_INDEX = vmirror ?
++ -dst_line_stride + BYTES_PER_PIXEL * BLOCK_SIZE_PIXELS
++ : dst_line_stride + BYTES_PER_PIXEL * BLOCK_SIZE_PIXELS;
++ const u8 *in_block_ptr;
++ u8 *out_block_ptr;
++ int i, k;
++
++ for (k = height / BLOCK_SIZE_PIXELS; k > 0; k--) {
++ in_block_ptr = src + (((height / BLOCK_SIZE_PIXELS) - k)
++ * BLOCK_SIZE_PIXELS) * src_line_stride;
++ out_block_ptr = dst + (((height / BLOCK_SIZE_PIXELS) - k)
++ * BLOCK_SIZE_PIXELS * BYTES_PER_PIXEL) +
++ (width - 1) * dst_line_stride;
++
++ /*
++ * For vertical mirroring the writing starts from the
++ * first line
++ */
++ if (vmirror)
++ out_block_ptr -= dst_line_stride * (width - 1);
++
++ for (i = width; i > 0; i--) {
++ __asm__ volatile (
++ "ldrh r2, [%0], %4\n\t"
++ "ldrh r3, [%0], %4\n\t"
++ "ldrh r4, [%0], %4\n\t"
++ "ldrh r5, [%0], %4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ "ldrh r2, [%0], %4\n\t"
++ "ldrh r3, [%0], %4\n\t"
++ "ldrh r4, [%0], %4\n\t"
++ "ldrh r5, [%0], %4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ "ldrh r2, [%0], %4\n\t"
++ "ldrh r3, [%0], %4\n\t"
++ "ldrh r4, [%0], %4\n\t"
++ "ldrh r5, [%0], %4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ "ldrh r2, [%0], %4\n\t"
++ "ldrh r3, [%0], %4\n\t"
++ "ldrh r4, [%0], %4\n\t"
++ "ldrh r5, [%0], %4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ :"+r" (in_block_ptr), "+r"(out_block_ptr) /* output */
++ :"0"(in_block_ptr), "1"(out_block_ptr), "r"(src_line_stride) /* input */
++ :"r2", "r3", "r4", "r5", "memory" /* modify */
++ );
++ in_block_ptr -= IN_INDEX;
++ out_block_ptr -= OUT_INDEX;
++ }
++ }
++
++ return OPLERR_SUCCESS;
++}
++
++/*
++ * Rotate Counter Clockwise, divide RGB component into 4 row strips, read
++ * non sequentially and write sequentially. This is done in 4 line strips
++ * so that the cache is used better. Cachelines are 8 words = 32 bytes. Pixels
++ * are 2 bytes. The 4 reads will be cache misses, but the next 60 should
++ * be from cache. The writes to the output buffer will be sequential for 4
++ * writes.
++ *
++ * Example:
++ * Input data matrix: output matrix
++ *
++ * 0 | 1 | 2 | 3 | 4 | 4 | 0 | 0 | 3 |
++ * 4 | 3 | 2 | 1 | 0 | 3 | 1 | 9 | 6 |
++ * 6 | 7 | 8 | 9 | 0 | 2 | 2 | 8 | 2 |
++ * 5 | 3 | 2 | 6 | 3 | 1 | 3 | 7 | 3 |
++ * ^ 0 | 4 | 6 | 5 | < Write the input data sequentially
++ * Read first column
++ * Start at the bottom
++ * Move to next column and repeat
++ *
++ * Loop over k decreasing (blocks)
++ * in_block_ptr = src + (((RGB_HEIGHT_PIXELS / BLOCK_SIZE_PIXELS) - k)
++ * * BLOCK_SIZE_PIXELS) * (RGB_WIDTH_BYTES)
++ * out_block_ptr = dst + (((RGB_HEIGHT_PIXELS / BLOCK_SIZE_PIXELS) - k)
++ * * BLOCK_SIZE_BYTES) + (RGB_WIDTH_PIXELS - 1)
++ * * RGB_HEIGHT_PIXELS * BYTES_PER_PIXEL
++ *
++ * Loop over i decreasing (width)
++ * Each pix:
++ * in_block_ptr += RGB_WIDTH_BYTES
++ * out_block_ptr += 4
++ *
++ * Each row of block:
++ * in_block_ptr -= RGB_WIDTH_BYTES * BLOCK_SIZE_PIXELS - 2
++ * out_block_ptr -= RGB_HEIGHT_PIXELS * BYTES_PER_PIXEL + 2 * BLOCK_SIZE_PIXELS;
++ *
++ * It may perform vertical mirroring too depending on the vmirror flag.
++ */
++static int opl_rotate270_u16_by4(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror)
++{
++ const int BLOCK_SIZE_PIXELS = CACHE_LINE_WORDS * BYTES_PER_WORD
++ / BYTES_PER_PIXEL / 4;
++ const int IN_INDEX = src_line_stride * BLOCK_SIZE_PIXELS
++ - BYTES_PER_PIXEL;
++ const int OUT_INDEX = vmirror ?
++ -dst_line_stride + BYTES_PER_PIXEL * BLOCK_SIZE_PIXELS
++ : dst_line_stride + BYTES_PER_PIXEL * BLOCK_SIZE_PIXELS;
++ const u8 *in_block_ptr;
++ u8 *out_block_ptr;
++ int i, k;
++
++ for (k = height / BLOCK_SIZE_PIXELS; k > 0; k--) {
++ in_block_ptr = src + (((height / BLOCK_SIZE_PIXELS) - k)
++ * BLOCK_SIZE_PIXELS) * src_line_stride;
++ out_block_ptr = dst + (((height / BLOCK_SIZE_PIXELS) - k)
++ * BLOCK_SIZE_PIXELS * BYTES_PER_PIXEL)
++ + (width - 1) * dst_line_stride;
++
++ /*
++ * For vertical mirroring the writing starts from the
++ * first line
++ */
++ if (vmirror)
++ out_block_ptr -= dst_line_stride * (width - 1);
++
++ for (i = width; i > 0; i--) {
++ __asm__ volatile (
++ "ldrh r2, [%0], %4\n\t"
++ "ldrh r3, [%0], %4\n\t"
++ "ldrh r4, [%0], %4\n\t"
++ "ldrh r5, [%0], %4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ :"+r" (in_block_ptr), "+r"(out_block_ptr) /* output */
++ :"0"(in_block_ptr), "1"(out_block_ptr), "r"(src_line_stride) /* input */
++ :"r2", "r3", "r4", "r5", "memory" /* modify */
++ );
++ in_block_ptr -= IN_INDEX;
++ out_block_ptr -= OUT_INDEX;
++ }
++ }
++
++ return OPLERR_SUCCESS;
++}
++
++EXPORT_SYMBOL(opl_rotate270_u16);
++EXPORT_SYMBOL(opl_rotate270_vmirror_u16);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/opl/rotate270_u16_qcif.S linux-2.6.28-karo/drivers/media/video/mxc/opl/rotate270_u16_qcif.S
+--- linux-2.6.28/drivers/media/video/mxc/opl/rotate270_u16_qcif.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/opl/rotate270_u16_qcif.S 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,70 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++#include <linux/linkage.h>
++
++ .text
++ .align 2
++ENTRY(opl_rotate270_u16_qcif)
++ STMFD sp!,{r4-r10}
++ MOV r12,#0x160
++ MOV r10,#0x90
++ MOV r3,r10,LSR #4
++.L1.16:
++ RSB r2,r3,r10,LSR #4
++ MOV r5,r2,LSL #5
++ MOV r4,r12,LSR #1
++ SMULBB r4,r5,r4
++ ADD r2,r1,r2,LSL #5
++ ADD r5,r2,#0xc000
++ ADD r5,r5,#0x4e0
++ MOV r2,r12,LSR #1
++ ADD r4,r0,r4
++.L1.52:
++ LDRH r6,[r4],r12
++ LDRH r7,[r4],r12
++ LDRH r8,[r4],r12
++ LDRH r9,[r4],r12
++ ORR r6,r6,r7,LSL #16
++ ORR r7,r8,r9,LSL #16
++ STMIA r5!,{r6,r7}
++ SUBS r2,r2,#1
++ LDRH r6,[r4],r12
++ LDRH r7,[r4],r12
++ LDRH r8,[r4],r12
++ LDRH r9,[r4],r12
++ ORR r6,r6,r7,LSL #16
++ ORR r7,r8,r9,LSL #16
++ STMIA r5!,{r6,r7}
++ LDRH r6,[r4],r12
++ LDRH r7,[r4],r12
++ LDRH r8,[r4],r12
++ LDRH r9,[r4],r12
++ ORR r6,r6,r7,LSL #16
++ ORR r7,r8,r9,LSL #16
++ STMIA r5!,{r6,r7}
++ LDRH r6,[r4],r12
++ LDRH r7,[r4],r12
++ LDRH r8,[r4],r12
++ LDRH r9,[r4],r12
++ ORR r6,r6,r7,LSL #16
++ ORR r7,r8,r9,LSL #16
++ SUB r4,r4,#0x1500
++ STMIA r5,{r6,r7}
++ SUB r5,r5,#0x138
++ SUB r4,r4,#0xfe
++ BGT .L1.52
++ SUBS r3,r3,#1
++ BGT .L1.16
++ LDMFD sp!,{r4-r10}
++ BX lr
++ .size opl_rotate270_u16_qcif, . - opl_rotate270_u16_qcif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/opl/rotate90_u16.c linux-2.6.28-karo/drivers/media/video/mxc/opl/rotate90_u16.c
+--- linux-2.6.28/drivers/media/video/mxc/opl/rotate90_u16.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/opl/rotate90_u16.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,220 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/module.h>
++#include "opl.h"
++
++static int opl_rotate90_u16_by16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror);
++static int opl_rotate90_u16_by4(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror);
++static int opl_rotate90_vmirror_u16_both(const u8 * src, int src_line_stride,
++ int width, int height, u8 * dst,
++ int dst_line_stride, int vmirror);
++int opl_rotate90_u16_qcif(const u8 * src, u8 * dst);
++
++int opl_rotate90_u16(const u8 * src, int src_line_stride, int width, int height,
++ u8 * dst, int dst_line_stride)
++{
++ return opl_rotate90_vmirror_u16_both(src, src_line_stride, width,
++ height, dst, dst_line_stride, 0);
++}
++
++int opl_rotate90_vmirror_u16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride)
++{
++ return opl_rotate90_vmirror_u16_both(src, src_line_stride, width,
++ height, dst, dst_line_stride, 1);
++}
++
++static int opl_rotate90_vmirror_u16_both(const u8 * src, int src_line_stride,
++ int width, int height, u8 * dst,
++ int dst_line_stride, int vmirror)
++{
++ const int BLOCK_SIZE_PIXELS = CACHE_LINE_WORDS * BYTES_PER_WORD
++ / BYTES_PER_PIXEL;
++ const int BLOCK_SIZE_PIXELS_BY4 = CACHE_LINE_WORDS * BYTES_PER_WORD
++ / BYTES_PER_PIXEL / 4;
++
++ if (!src || !dst)
++ return OPLERR_NULL_PTR;
++
++ if (width == 0 || height == 0 || src_line_stride == 0
++ || dst_line_stride == 0)
++ return OPLERR_BAD_ARG;
++
++ /* The QCIF algorithm doesn't support vertical mirroring */
++ if (vmirror == 0 && width == QCIF_Y_WIDTH && height == QCIF_Y_HEIGHT
++ && src_line_stride == QCIF_Y_WIDTH * 2
++ && src_line_stride == QCIF_Y_HEIGHT * 2)
++ return opl_rotate90_u16_qcif(src, dst);
++ else if (width % BLOCK_SIZE_PIXELS == 0
++ && height % BLOCK_SIZE_PIXELS == 0)
++ return opl_rotate90_u16_by16(src, src_line_stride, width,
++ height, dst, dst_line_stride,
++ vmirror);
++ else if (width % BLOCK_SIZE_PIXELS_BY4 == 0
++ && height % BLOCK_SIZE_PIXELS_BY4 == 0)
++ return opl_rotate90_u16_by4(src, src_line_stride, width, height,
++ dst, dst_line_stride, vmirror);
++ else
++ return OPLERR_BAD_ARG;
++}
++
++/*
++ * Performs clockwise rotation (and possibly vertical mirroring depending
++ * on the vmirror flag) using block sizes of 16x16
++ * The algorithm is similar to 270 degree clockwise rotation algorithm
++ */
++static int opl_rotate90_u16_by16(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror)
++{
++ const int BLOCK_SIZE_PIXELS = CACHE_LINE_WORDS * BYTES_PER_WORD
++ / BYTES_PER_PIXEL;
++ const int BLOCK_SIZE_BYTES = BYTES_PER_PIXEL * BLOCK_SIZE_PIXELS;
++ const int IN_INDEX = src_line_stride * BLOCK_SIZE_PIXELS
++ + BYTES_PER_PIXEL;
++ const int OUT_INDEX = vmirror ?
++ -dst_line_stride - BLOCK_SIZE_BYTES
++ : dst_line_stride - BLOCK_SIZE_BYTES;
++ const u8 *in_block_ptr;
++ u8 *out_block_ptr;
++ int i, k;
++
++ for (k = height / BLOCK_SIZE_PIXELS; k > 0; k--) {
++ in_block_ptr = src + src_line_stride * (height - 1)
++ - (src_line_stride * BLOCK_SIZE_PIXELS *
++ (height / BLOCK_SIZE_PIXELS - k));
++ out_block_ptr = dst + BYTES_PER_PIXEL * BLOCK_SIZE_PIXELS *
++ ((height / BLOCK_SIZE_PIXELS) - k);
++
++ /*
++ * For vertical mirroring the writing starts from the
++ * bottom line
++ */
++ if (vmirror)
++ out_block_ptr += dst_line_stride * (width - 1);
++
++ for (i = width; i > 0; i--) {
++ __asm__ volatile (
++ "ldrh r2, [%0], -%4\n\t"
++ "ldrh r3, [%0], -%4\n\t"
++ "ldrh r4, [%0], -%4\n\t"
++ "ldrh r5, [%0], -%4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ "ldrh r2, [%0], -%4\n\t"
++ "ldrh r3, [%0], -%4\n\t"
++ "ldrh r4, [%0], -%4\n\t"
++ "ldrh r5, [%0], -%4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ "ldrh r2, [%0], -%4\n\t"
++ "ldrh r3, [%0], -%4\n\t"
++ "ldrh r4, [%0], -%4\n\t"
++ "ldrh r5, [%0], -%4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ "ldrh r2, [%0], -%4\n\t"
++ "ldrh r3, [%0], -%4\n\t"
++ "ldrh r4, [%0], -%4\n\t"
++ "ldrh r5, [%0], -%4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ :"+r" (in_block_ptr), "+r"(out_block_ptr) /* output */
++ :"0"(in_block_ptr), "1"(out_block_ptr), "r"(src_line_stride) /* input */
++ :"r2", "r3", "r4", "r5", "memory" /* modify */
++ );
++ in_block_ptr += IN_INDEX;
++ out_block_ptr += OUT_INDEX;
++ }
++ }
++
++ return OPLERR_SUCCESS;
++}
++
++/*
++ * Performs clockwise rotation (and possibly vertical mirroring depending
++ * on the vmirror flag) using block sizes of 4x4
++ * The algorithm is similar to 270 degree clockwise rotation algorithm
++ */
++static int opl_rotate90_u16_by4(const u8 * src, int src_line_stride, int width,
++ int height, u8 * dst, int dst_line_stride,
++ int vmirror)
++{
++ const int BLOCK_SIZE_PIXELS = CACHE_LINE_WORDS * BYTES_PER_WORD
++ / BYTES_PER_PIXEL / 4;
++ const int BLOCK_SIZE_BYTES = BYTES_PER_PIXEL * BLOCK_SIZE_PIXELS;
++ const int IN_INDEX = src_line_stride * BLOCK_SIZE_PIXELS
++ + BYTES_PER_PIXEL;
++ const int OUT_INDEX = vmirror ?
++ -dst_line_stride - BLOCK_SIZE_BYTES
++ : dst_line_stride - BLOCK_SIZE_BYTES;
++ const u8 *in_block_ptr;
++ u8 *out_block_ptr;
++ int i, k;
++
++ for (k = height / BLOCK_SIZE_PIXELS; k > 0; k--) {
++ in_block_ptr = src + src_line_stride * (height - 1)
++ - (src_line_stride * BLOCK_SIZE_PIXELS *
++ (height / BLOCK_SIZE_PIXELS - k));
++ out_block_ptr = dst + BYTES_PER_PIXEL * BLOCK_SIZE_PIXELS
++ * ((height / BLOCK_SIZE_PIXELS) - k);
++
++ /*
++ * For horizontal mirroring the writing starts from the
++ * bottom line
++ */
++ if (vmirror)
++ out_block_ptr += dst_line_stride * (width - 1);
++
++ for (i = width; i > 0; i--) {
++ __asm__ volatile (
++ "ldrh r2, [%0], -%4\n\t"
++ "ldrh r3, [%0], -%4\n\t"
++ "ldrh r4, [%0], -%4\n\t"
++ "ldrh r5, [%0], -%4\n\t"
++ "orr r2, r2, r3, lsl #16\n\t"
++ "orr r4, r4, r5, lsl #16\n\t"
++ "str r2, [%1], #4\n\t"
++ "str r4, [%1], #4\n\t"
++
++ :"+r" (in_block_ptr), "+r"(out_block_ptr) /* output */
++ :"0"(in_block_ptr), "1"(out_block_ptr), "r"(src_line_stride) /* input */
++ :"r2", "r3", "r4", "r5", "memory" /* modify */
++ );
++ in_block_ptr += IN_INDEX;
++ out_block_ptr += OUT_INDEX;
++ }
++ }
++
++ return OPLERR_SUCCESS;
++}
++
++EXPORT_SYMBOL(opl_rotate90_u16);
++EXPORT_SYMBOL(opl_rotate90_vmirror_u16);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/opl/rotate90_u16_qcif.S linux-2.6.28-karo/drivers/media/video/mxc/opl/rotate90_u16_qcif.S
+--- linux-2.6.28/drivers/media/video/mxc/opl/rotate90_u16_qcif.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/opl/rotate90_u16_qcif.S 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,71 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++#include <linux/linkage.h>
++
++ .text
++ .align 2
++ENTRY(opl_rotate90_u16_qcif)
++ STMFD sp!,{r4-r10}
++ MOV r12,#0x160
++ MOV r10,#0x90
++ MOV r3,r10,LSR #4
++.L1.216:
++ RSB r2,r3,r10,LSR #4
++ MOV r4,#0x20
++ SMULBB r5,r4,r2
++ MOV r4,#0x1600
++ SMULBB r2,r4,r2
++ ADD r4,r0,#0xc000
++ ADD r4,r4,#0x4a0
++ SUB r4,r4,r2
++ MOV r2,r12,LSR #1
++ ADD r5,r1,r5
++.L1.256:
++ LDRH r6,[r4],-r12
++ LDRH r7,[r4],-r12
++ LDRH r8,[r4],-r12
++ LDRH r9,[r4],-r12
++ ORR r6,r6,r7,LSL #16
++ ORR r7,r8,r9,LSL #16
++ STMIA r5!,{r6,r7}
++ SUBS r2,r2,#1
++ LDRH r6,[r4],-r12
++ LDRH r7,[r4],-r12
++ LDRH r8,[r4],-r12
++ LDRH r9,[r4],-r12
++ ORR r6,r6,r7,LSL #16
++ ORR r7,r8,r9,LSL #16
++ STMIA r5!,{r6,r7}
++ LDRH r6,[r4],-r12
++ LDRH r7,[r4],-r12
++ LDRH r8,[r4],-r12
++ LDRH r9,[r4],-r12
++ ORR r6,r6,r7,LSL #16
++ ORR r7,r8,r9,LSL #16
++ STMIA r5!,{r6,r7}
++ LDRH r6,[r4],-r12
++ LDRH r7,[r4],-r12
++ LDRH r8,[r4],-r12
++ LDRH r9,[r4],-r12
++ ORR r6,r6,r7,LSL #16
++ ORR r7,r8,r9,LSL #16
++ ADD r4,r4,#0x1600
++ STMIA r5!,{r6,r7}
++ ADD r5,r5,#0x100
++ ADD r4,r4,#2
++ BGT .L1.256
++ SUBS r3,r3,#1
++ BGT .L1.216
++ LDMFD sp!,{r4-r10}
++ BX lr
++ .size opl_rotate90_u16_qcif, . - opl_rotate90_u16_qcif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/opl/vmirror_u16.c linux-2.6.28-karo/drivers/media/video/mxc/opl/vmirror_u16.c
+--- linux-2.6.28/drivers/media/video/mxc/opl/vmirror_u16.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/opl/vmirror_u16.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,46 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/module.h>
++#include <linux/string.h>
++#include "opl.h"
++
++int opl_vmirror_u16(const u8 * src, int src_line_stride, int width, int height,
++ u8 * dst, int dst_line_stride)
++{
++ const u8 *src_row_addr;
++ u8 *dst_row_addr;
++ int i;
++
++ if (!src || !dst)
++ return OPLERR_NULL_PTR;
++
++ if (width == 0 || height == 0 || src_line_stride == 0
++ || dst_line_stride == 0)
++ return OPLERR_BAD_ARG;
++
++ src_row_addr = src;
++ dst_row_addr = dst + (height - 1) * dst_line_stride;
++
++ /* Loop over all rows */
++ for (i = 0; i < height; i++) {
++ /* memcpy each row */
++ memcpy(dst_row_addr, src_row_addr, BYTES_PER_PIXEL * width);
++ src_row_addr += src_line_stride;
++ dst_row_addr -= dst_line_stride;
++ }
++
++ return OPLERR_SUCCESS;
++}
++
++EXPORT_SYMBOL(opl_vmirror_u16);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/output/Kconfig linux-2.6.28-karo/drivers/media/video/mxc/output/Kconfig
+--- linux-2.6.28/drivers/media/video/mxc/output/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/output/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,19 @@
++config VIDEO_MXC_OUTPUT_DEBUG
++ bool "Verbose MXC video output debugging"
++ depends on VIDEO_MXC_OUTPUT
++ default n
++
++config VIDEO_MXC_IPU_OUTPUT
++ bool
++ depends on VIDEO_MXC_OUTPUT && MXC_IPU
++ default y
++ ---help---
++ This is the video4linux2 driver for IPU post processing video output.
++
++config VIDEO_MXC_EMMA_OUTPUT
++ tristate "EMMA video output postprocessor"
++ depends on VIDEO_MXC_OUTPUT && MXC_EMMA && FB_IMX
++ default y
++ ---help---
++ This is the video4linux2 driver for EMMA post processing video output.
++
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/output/Makefile linux-2.6.28-karo/drivers/media/video/mxc/output/Makefile
+--- linux-2.6.28/drivers/media/video/mxc/output/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/output/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,8 @@
++ifneq ($(CONFIG_VIDEO_MXC_OUTPUT_DEBUG),)
++ EXTRA_CFLAGS += -DDEBUG
++endif
++
++mx27_output-objs := mx27_v4l2_output.o mx27_pp.o
++obj-$(CONFIG_VIDEO_MXC_EMMA_OUTPUT) += mx27_output.o
++
++obj-$(CONFIG_VIDEO_MXC_IPU_OUTPUT) += mxc_v4l2_output.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/output/mx27_pp.c linux-2.6.28-karo/drivers/media/video/mxc/output/mx27_pp.c
+--- linux-2.6.28/drivers/media/video/mxc/output/mx27_pp.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/output/mx27_pp.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,1114 @@
++/*
++ * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mx27_pp.c
++ *
++ * @brief MX27 V4L2 Video Output Driver
++ *
++ * Video4Linux2 Output Device using MX27 eMMA Post-processing functionality.
++ *
++ * @ingroup MXC_V4L2_OUTPUT
++ */
++#include <linux/kernel.h>
++#include <linux/string.h>
++#include <linux/module.h>
++#include <linux/fb.h>
++#include <linux/clk.h>
++#include <linux/interrupt.h>
++#include <asm/io.h>
++#include <mach/mx27.h>
++
++#include "mx27_pp.h"
++#include "mxc_v4l2_output.h"
++
++#define SCALE_RETRY 32 /* to be more relax, less precise */
++#define PP_SKIP 1
++#define PP_TBL_MAX 40
++
++static unsigned short scale_tbl[PP_TBL_MAX];
++static int g_hlen, g_vlen;
++
++static emma_pp_cfg g_pp_cfg;
++static int g_disp_num = 0;
++static char pp_dev[] = "emma_pp";
++
++/*!
++ * @brief PP resizing routines
++ */
++static int scale_2d(emma_pp_scale *sz);
++
++static irqreturn_t pp_isr(int irq, void *dev_id);
++static int set_output_addr(emma_pp_cfg *cfg, vout_data *vout);
++static int pphw_reset(void);
++static int pphw_enable(int flag);
++static int pphw_ptr(emma_pp_cfg *cfg);
++static int pphw_outptr(emma_pp_cfg *cfg);
++static int pphw_cfg(emma_pp_cfg *cfg);
++static int pphw_isr(void);
++static int pphw_init(void);
++static void pphw_exit(void);
++
++#define PP_DUMP(reg) pr_debug("%s[%08lx]\t = 0x%08x\n", #reg, \
++ reg - IO_ADDRESS(EMMA_PP_BASE_ADDR) + EMMA_PP_BASE_ADDR, __raw_readl(reg))
++void pp_dump(void)
++{
++ PP_DUMP(PP_CNTL);
++ PP_DUMP(PP_INTRCNTL);
++ PP_DUMP(PP_INTRSTATUS);
++ PP_DUMP(PP_SOURCE_Y_PTR);
++ PP_DUMP(PP_SOURCE_CB_PTR);
++ PP_DUMP(PP_SOURCE_CR_PTR);
++ PP_DUMP(PP_DEST_RGB_PTR);
++ PP_DUMP(PP_QUANTIZER_PTR);
++ PP_DUMP(PP_PROCESS_FRAME_PARA);
++ PP_DUMP(PP_SOURCE_FRAME_WIDTH);
++ PP_DUMP(PP_DEST_DISPLAY_WIDTH);
++ PP_DUMP(PP_DEST_IMAGE_SIZE);
++ PP_DUMP(PP_DEST_FRAME_FMT_CNTL);
++ PP_DUMP(PP_RESIZE_INDEX);
++ PP_DUMP(PP_CSC_COEF_0123);
++ PP_DUMP(PP_CSC_COEF_4);
++}
++
++static const unsigned char pp_coeftab[] = {
++ 2, 1,
++ 19, 10,
++ 17, 9,
++ 15, 8,
++ 13, 7,
++ 11, 6,
++ 20, 11,
++ 9, 5,
++ 16, 9,
++ 7, 4,
++ 19, 11,
++ 12, 7,
++ 17, 10,
++ 5, 3,
++ 18, 11,
++ 13, 8,
++ 8, 5,
++ 19, 12,
++ 11, 7,
++ 14, 9,
++ 17, 11,
++ 20, 13,
++ 3, 2,
++ 19, 13,
++ 16, 11,
++ 13, 9,
++ 10, 7,
++ 17, 12,
++ 7, 5,
++ 18, 13,
++ 11, 8,
++ 15, 11,
++ 19, 14,
++ 4, 3,
++ 17, 13,
++ 13, 10,
++ 9, 7,
++ 14, 11,
++ 19, 15,
++ 5, 4,
++ 16, 13,
++ 11, 9,
++ 17, 14,
++ 6, 5,
++ 19, 16,
++ 13, 11,
++ 20, 17,
++ 7, 6,
++ 15, 13,
++ 8, 7,
++ 17, 15,
++ 9, 8,
++ 19, 17,
++ 10, 9,
++ 11, 10,
++ 12, 11,
++ 13, 12,
++ 14, 13,
++ 15, 14,
++ 16, 15,
++ 17, 16,
++ 18, 17,
++ 19, 18,
++ 20, 19,
++ 1, 1,
++ 19, 20,
++ 18, 19,
++ 17, 18,
++ 16, 17,
++ 15, 16,
++ 14, 15,
++ 13, 14,
++ 12, 13,
++ 11, 12,
++ 10, 11,
++ 9, 10,
++ 17, 19,
++ 8, 9,
++ 15, 17,
++ 7, 8,
++ 13, 15,
++ 6, 7,
++ 17, 20,
++ 11, 13,
++ 16, 19,
++ 5, 6,
++ 14, 17,
++ 9, 11,
++ 13, 16,
++ 4, 5,
++ 15, 19,
++ 11, 14,
++ 7, 9,
++ 10, 13,
++ 13, 17,
++ 3, 4,
++ 14, 19,
++ 11, 15,
++ 8, 11,
++ 13, 18,
++ 5, 7,
++ 12, 17,
++ 7, 10,
++ 9, 13,
++ 11, 16,
++ 13, 19,
++ 2, 3,
++ 13, 20,
++ 11, 17,
++ 9, 14,
++ 7, 11,
++ 12, 19,
++ 5, 8,
++ 8, 13,
++ 11, 18,
++ 3, 5,
++ 10, 17,
++ 7, 12,
++ 11, 19,
++ 4, 7,
++ 9, 16,
++ 5, 9,
++ 11, 20,
++ 6, 11,
++ 7, 13,
++ 8, 15,
++ 9, 17,
++ 10, 19,
++ 1, 2,
++ 9, 19,
++ 8, 17,
++ 7, 15,
++ 6, 13,
++ 5, 11,
++ 9, 20,
++ 4, 9,
++ 7, 16,
++ 3, 7,
++ 8, 19,
++ 5, 12,
++ 7, 17,
++ 2, 5,
++ 7, 18,
++ 5, 13,
++ 3, 8,
++ 7, 19,
++ 4, 11,
++ 5, 14,
++ 6, 17,
++ 7, 20,
++ 1, 3,
++ 6, 19,
++ 5, 16,
++ 4, 13,
++ 3, 10,
++ 5, 17,
++ 2, 7,
++ 5, 18,
++ 3, 11,
++ 4, 15,
++ 5, 19,
++ 1, 4
++};
++
++/*!
++ * @brief Set PP input address.
++ * @param ptr The pointer to the Y value of input
++ * @return Zero on success, others on failure
++ */
++int pp_ptr(unsigned long ptr, struct v4l2_mxc_offset offset)
++{
++ g_pp_cfg.ptr.y = ptr + offset.y_offset;
++ g_pp_cfg.ptr.u = ptr + offset.u_offset;
++ g_pp_cfg.ptr.v = ptr + offset.v_offset;
++ g_pp_cfg.ptr.qp = ptr + offset.qp_offset;
++
++ return pphw_ptr(&g_pp_cfg);
++}
++
++/*!
++ * @brief Enable or disable PP.
++ * @param flag Zero to disable PP, others to enable PP
++ * @return Zero on success, others on failure
++ */
++int pp_enable(int flag)
++{
++ return pphw_enable(flag);
++}
++
++/*!
++ * @brief Get the display No. of last completed PP frame.
++ * @return The display No. of last completed PP frame.
++ */
++int pp_num_last(void)
++{
++ return g_disp_num ? 0 : 1;
++}
++
++/*!
++ * @brief Initialize PP.
++ * @param vout Pointer to _vout_data structure
++ * @return Zero on success, others on failure
++ */
++static int interrupts;
++
++int pp_init(vout_data *vout)
++{
++ int ret = pphw_init();
++ if (ret) {
++ return ret;
++ }
++ ret = pphw_enable(0);
++ if (ret) {
++ pphw_exit();
++ return ret;
++ }
++ interrupts = 0;
++ ret = request_irq(MXC_INT_EMMAPP, pp_isr, 0, pp_dev, vout);
++ if (ret) {
++ pphw_exit();
++ return ret;
++ }
++ return 0;
++}
++
++/*!
++ * @brief Deinitialize PP.
++ * @param vout Pointer to _vout_data structure
++ */
++void pp_exit(vout_data *vout)
++{
++ free_irq(MXC_INT_EMMAPP, vout);
++ pr_debug("%s: Interrupts: %d\n", __FUNCTION__, interrupts);
++ pphw_enable(0);
++ pphw_exit();
++}
++
++/*!
++ * @brief Configure PP.
++ * @param vout Pointer to _vout_data structure
++ * @return Zero on success, others on failure
++ */
++int pp_cfg(vout_data *vout)
++{
++ unsigned long flags;
++
++ /* PP accepts YUV420 input only */
++ if ((vout->v2f.fmt.pix.pixelformat != V4L2_PIX_FMT_YUV420) &&
++ (vout->v2f.fmt.pix.pixelformat != V4L2_PIX_FMT_YUV422P)) {
++// if (vout->v2f.fmt.pix.pixelformat != V4L2_PIX_FMT_YUV420) {
++ pr_debug("unsupported pixel format: %08x\n", vout->v2f.fmt.pix.pixelformat);
++ return -EINVAL;
++ }
++
++ g_pp_cfg.operation = 0;
++
++ memset(g_pp_cfg.csc_table, 0, sizeof(g_pp_cfg.csc_table));
++
++ /* Convert output pixel format to PP required format */
++ switch (vout->v4l2_fb.fmt.pixelformat) {
++ case V4L2_PIX_FMT_BGR32:
++ g_pp_cfg.red_width = 8;
++ g_pp_cfg.green_width = 8;
++ g_pp_cfg.blue_width = 8;
++ g_pp_cfg.red_offset = 8;
++ g_pp_cfg.green_offset = 16;
++ g_pp_cfg.blue_offset = 24;
++ g_pp_cfg.rgb_resolution = 32;
++ break;
++ case V4L2_PIX_FMT_RGB32:
++ g_pp_cfg.red_width = 8;
++ g_pp_cfg.green_width = 8;
++ g_pp_cfg.blue_width = 8;
++ g_pp_cfg.red_offset = 24;
++ g_pp_cfg.green_offset = 16;
++ g_pp_cfg.blue_offset = 8;
++ g_pp_cfg.rgb_resolution = 32;
++ break;
++ case V4L2_PIX_FMT_YUYV:
++ g_pp_cfg.red_width = 0;
++ g_pp_cfg.green_width = 0;
++ g_pp_cfg.blue_width = 0;
++ g_pp_cfg.red_offset = 0;
++ g_pp_cfg.green_offset = 0;
++ g_pp_cfg.blue_offset = PP_PIX_YUYV;
++ g_pp_cfg.rgb_resolution = 16;
++ break;
++ case V4L2_PIX_FMT_UYVY:
++ g_pp_cfg.red_width = 0;
++ g_pp_cfg.green_width = 0;
++ g_pp_cfg.blue_width = 0;
++ g_pp_cfg.red_offset = 0;
++ g_pp_cfg.green_offset = 0;
++ g_pp_cfg.blue_offset = PP_PIX_UYVY;
++ g_pp_cfg.rgb_resolution = 16;
++ break;
++ case V4L2_PIX_FMT_RGB565:
++ default:
++ g_pp_cfg.red_width = 5;
++ g_pp_cfg.green_width = 6;
++ g_pp_cfg.blue_width = 5;
++ g_pp_cfg.red_offset = 11;
++ g_pp_cfg.green_offset = 5;
++ g_pp_cfg.blue_offset = 0;
++ g_pp_cfg.rgb_resolution = 16;
++ break;
++ }
++ spin_lock_irqsave(&vout->irq_lock, flags);
++ if (vout->active != NULL) {
++ g_pp_cfg.ptr.y = vout->active->dma_desc.dma_addr;
++ } else {
++ g_pp_cfg.ptr.y = 0;
++ }
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ g_pp_cfg.ptr.u = g_pp_cfg.ptr.v = g_pp_cfg.ptr.qp = 0;
++ if ((vout->crop_rect.width != 0) && (vout->crop_rect.height != 0)) {
++ g_pp_cfg.dim.in.width = vout->crop_rect.width;
++ g_pp_cfg.dim.in.height = vout->crop_rect.height;
++ } else {
++ g_pp_cfg.dim.in.width = vout->v2f.fmt.pix.width;
++ g_pp_cfg.dim.in.height = vout->v2f.fmt.pix.height;
++ }
++
++ g_pp_cfg.dim.out.width = vout->crop_current.width;
++ g_pp_cfg.dim.out.height = vout->crop_current.height;
++ g_pp_cfg.dim.num.width = 0;
++ g_pp_cfg.dim.num.height = 0;
++ g_pp_cfg.dim.den.width = 0;
++ g_pp_cfg.dim.den.height = 0;
++
++ pr_debug("input dimensions: %dx%d output dimensions: %dx%d\n",
++ g_pp_cfg.dim.in.width, g_pp_cfg.dim.in.height,
++ g_pp_cfg.dim.out.width, g_pp_cfg.dim.out.height);
++
++ if (scale_2d(&g_pp_cfg.dim)) {
++ printk(KERN_ERR "unsupported resize ratio\n");
++ return -EINVAL;
++ }
++
++ g_pp_cfg.dim.out.width = vout->crop_current.width;
++ g_pp_cfg.dim.out.height = vout->crop_current.height;
++
++ g_pp_cfg.in_y_stride = vout->v2f.fmt.pix.width;
++ g_pp_cfg.in_height = vout->v2f.fmt.pix.height;
++ if (set_output_addr(&g_pp_cfg, vout)) {
++ printk(KERN_ERR "failed to set pp output address\n");
++ return -EINVAL;
++ }
++
++ return pphw_cfg(&g_pp_cfg);
++}
++
++irqreturn_t mxc_v4l2out_pp_in_irq_handler(int irq, void *dev_id);
++
++/*!
++ * @brief PP IRQ handler.
++ */
++static irqreturn_t pp_isr(int irq, void *dev_id)
++{
++ int status;
++ vout_data *vout = dev_id;
++
++interrupts++;
++ status = pphw_isr();
++ if ((status & 0x1) == 0) { /* Not frame complete interrupt */
++ pr_debug("not pp frame complete interrupt\n");
++ return IRQ_HANDLED;
++ }
++
++ if (vout->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ g_disp_num = g_disp_num ? 0 : 1;
++ g_pp_cfg.outptr = (unsigned int)vout->display_bufs[g_disp_num];
++ pphw_outptr(&g_pp_cfg);
++ }
++
++ return mxc_v4l2out_pp_in_irq_handler(irq, dev_id);
++}
++
++/*!
++ * @brief Set PP output address.
++ * @param cfg Pointer to emma_pp_cfg structure
++ * @param vout Pointer to _vout_data structure
++ * @return Zero on success, others on failure
++ */
++static int set_output_addr(emma_pp_cfg *cfg, vout_data *vout)
++{
++ if (vout->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ g_disp_num = 0;
++ cfg->outptr = (unsigned int)vout->display_bufs[g_disp_num];
++ cfg->out_stride = vout->crop_current.width;
++ return 0;
++ } else {
++ struct fb_info *fb;
++
++ fb = registered_fb[vout->output_fb_num[vout->cur_disp_output]];
++ if (!fb)
++ return -ENODEV;
++
++ cfg->outptr = fb->fix.smem_start;
++ cfg->outptr += vout->crop_current.top * fb->var.xres_virtual *
++ (fb->var.bits_per_pixel >> 3) +
++ vout->crop_current.left * (fb->var.bits_per_pixel >> 3);
++ cfg->out_stride = fb->var.xres_virtual;
++
++ return 0;
++ }
++}
++
++/*!
++ * @brief Get maximum common divisor.
++ * @param x First input value
++ * @param y Second input value
++ * @return Maximum common divisor of x and y
++ */
++static int gcd(int x, int y)
++{
++ int k;
++
++ if (x < y) {
++ k = x;
++ x = y;
++ y = k;
++ }
++
++ while ((k = x % y)) {
++ x = y;
++ y = k;
++ }
++
++ return y;
++}
++
++/*!
++ * @brief Get ratio.
++ * @param x First input value
++ * @param y Second input value
++ * @param den Denominator of the ratio (corresponding to y)
++ * @return Numerator of the ratio (corresponding to x)
++ */
++static int ratio(int x, int y, int *den)
++{
++ int g;
++
++ if (!x || !y)
++ return 0;
++
++ g = gcd(x, y);
++ *den = y / g;
++
++ return x / g;
++}
++
++/*!
++ * @brief Build PP coefficient entry
++ * Build one or more coefficient entries for PP coefficient table based
++ * on given coefficient.
++ *
++ * @param k The index of the coefficient in coefficient table
++ * @param coeff The weighting coefficient
++ * @param base The base of the coefficient
++ * @param nxt Number of pixels to be read
++ *
++ * @return The index of the next coefficient entry on success
++ * -1 on failure
++ */
++static int scale_0d(int k, int coeff, int base, int nxt)
++{
++ if (k >= PP_TBL_MAX) {
++ /* no more space in table */
++ pr_debug("no space in scale table, k = %d\n", k);
++ return -ENOSPC;
++ }
++
++ coeff = ((coeff << BC_COEF) + (base >> 1)) / base;
++
++ /*
++ * Valid values for weighting coefficient are 0, 2 to 30, and 31.
++ * A value of 31 is treated as 32 and therefore 31 is an
++ * invalid co-efficient.
++ */
++ if (coeff >= SZ_COEF - 1)
++ coeff--;
++ else if (coeff == 1)
++ coeff++;
++ coeff = coeff << BC_NXT;
++
++ if (nxt < SZ_NXT) {
++ coeff |= nxt;
++ coeff <<= 1;
++ coeff |= 1;
++ } else {
++ /*
++ * src inc field is 2 bit wide, for 4+, use special
++ * code 0:0:1 to prevent dest inc
++ */
++ coeff |= PP_SKIP;
++ coeff <<= 1;
++ coeff |= 1;
++ nxt -= PP_SKIP;
++ do {
++ pr_debug("tbl = %03X\n", coeff);
++ scale_tbl[k++] = coeff;
++ coeff = (nxt > PP_SKIP) ? PP_SKIP : nxt;
++ coeff <<= 1;
++ } while ((nxt -= PP_SKIP) > 0);
++ }
++ pr_debug("tbl = %03X\n", coeff);
++ scale_tbl[k++] = coeff;
++
++ return k;
++}
++
++/*!
++ * @brief Get approximate ratio
++ *
++ * @param pscale The pointer to scale_t structure which holdes
++ * coefficient tables
++ * @param mt Scale ratio numerator
++ * @param nt Scale ratio denominator
++ * @param *n denominator of approximate ratio
++ * @return numerator of approximate ratio
++ */
++static int approx_ratio(int mt, int nt, int *n)
++{
++ int index = sizeof(pp_coeftab) / sizeof(pp_coeftab[0]) / 2;
++ int left = 0;
++ int right = index - 1;
++ int nom = 0, den = 0;
++ while (index > 0) {
++ nom = pp_coeftab[(((right + left) >> 1) << 1)];
++ den = pp_coeftab[(((right + left) >> 1) << 1) + 1];
++ if ((nom * nt - mt * den) > 0) {
++ left = (right + left) >> 1;
++ } else {
++ right = (right + left) >> 1;
++ }
++ index = index >> 1;
++ }
++ *n = pp_coeftab[right * 2 + 1];
++ nom = pp_coeftab[right * 2];
++ return nom;
++}
++
++/*
++ * @brief Build PP coefficient table
++ * Build PP coefficient table for one dimension (width or height)
++ * based on given input and output resolution
++ *
++ * @param inv input resolution
++ * @param outv output resolution
++ * @param k index of free table entry
++ *
++ * @return The index of the next free coefficient entry on success
++ * -1 on failure
++ */
++static int scale_1d(int inv, int outv, int k)
++{
++ int v; /* overflow counter */
++ int coeff, nxt; /* table output */
++
++ if (inv == outv)
++ return scale_0d(k, 1, 1, 1); /* force scaling */
++
++ v = 0;
++ if (inv < outv) {
++ /* upscale: mix <= 2 input pixels per output pixel */
++ do {
++ coeff = outv - v;
++ v += inv;
++ if (v >= outv) {
++ v -= outv;
++ nxt = 1;
++ } else
++ nxt = 0;
++ pr_debug("upscale: coeff = %d/%d nxt = %d\n", coeff,
++ outv, nxt);
++ k = scale_0d(k, coeff, outv, nxt);
++ if (k < 0)
++ return -1;
++ } while (v);
++ } else if (inv >= 2 * outv) {
++ /* PP doesn't support resize ratio > 2:1 except 4:1. */
++ if ((inv != 2 * outv) && (inv != 4 * outv))
++ return -1;
++ /* downscale: >=2:1 bilinear approximation */
++ coeff = inv - 2 * outv;
++ v = 0;
++ nxt = 0;
++ do {
++ v += coeff;
++ nxt = 2;
++ while (v >= outv) {
++ v -= outv;
++ nxt++;
++ }
++ pr_debug("downscale: coeff = 1/2 nxt = %d\n", nxt);
++ k = scale_0d(k, 1, 2, nxt);
++ if (k < 0)
++ return -1;
++ } while (v);
++ } else {
++ /* downscale: bilinear */
++ int in_pos_inc = 2 * outv;
++ int out_pos = inv;
++ int out_pos_inc = 2 * inv;
++ int init_carry = inv - outv;
++ int carry = init_carry;
++
++ v = outv + in_pos_inc;
++ do {
++ coeff = v - out_pos;
++ out_pos += out_pos_inc;
++ carry += out_pos_inc;
++ for (nxt = 0; v < out_pos; nxt++) {
++ v += in_pos_inc;
++ carry -= in_pos_inc;
++ }
++ pr_debug("downscale: coeff = %d/%d nxt = %d\n", coeff,
++ in_pos_inc, nxt);
++ k = scale_0d(k, coeff, in_pos_inc, nxt);
++ if (k < 0)
++ return -1;
++ } while (carry != init_carry);
++ }
++ return k;
++}
++
++/*
++ * @brief Build PP coefficient table
++ * Build PP coefficient table for one dimension (width or height)
++ * based on given input and output resolution. The given input
++ * and output resolution might be not supported due to hardware
++ * limits. In this case this functin rounds the input and output
++ * to closest possible values and return them to caller.
++ *
++ * @param inv input resolution, might be modified after the call
++ * @param outv output resolution, might be modified after the call
++ * @param k index of free table entry
++ *
++ * @return The index of the next free coefficient entry on success
++ * -1 on failure
++ */
++static int scale_1d_smart(int *inv, int *outv, int index)
++{
++ int len, num, den, approx_num, approx_den;
++ static int num1, den1;
++
++ if (!inv || !outv)
++ return -1;
++
++ /* Both should be non-zero */
++ if (!(*inv) || !(*outv))
++ return -1;
++
++ if ((*outv > 4 * (*inv)) ||
++ ((*inv > 2 * (*outv)) && (*inv != 4 * (*outv)))) {
++ pr_debug("unsupported pp resize ration: inv/outv = %d/%d\n",
++ *inv, *outv);
++ return -1;
++ }
++
++ num = ratio(*inv, *outv, &den);
++ pr_debug("%s: num=%d den=%d\n", __FUNCTION__, num, den);
++
++ if (index == 0) {
++ if ((num > 20) || (den > 20)) {
++ approx_num = approx_ratio(num, den, &approx_den);
++ num = approx_num;
++ den = approx_den;
++ }
++ } else {
++ if ((num > (40 - index)) || (den > (40 - index))) {
++ approx_num = approx_ratio(num, den, &approx_den);
++ num = approx_num;
++ den = approx_den;
++ }
++ if ((num == num1) && (den == den1)) {
++ return index;
++ }
++ }
++
++ if ((len = scale_1d(num, den, index)) < 0) {
++ return -1;
++ } else {
++ if (index == 0) {
++ num1 = num;
++ den1 = den;
++ }
++ return len;
++ }
++
++}
++
++/*
++ * @brief Build PP coefficient table for both width and height
++ * Build PP coefficient table for both width and height based on
++ * given resizing ratios.
++ *
++ * @param sz Structure contains resizing ratio informations
++ *
++ * @return 0 on success, others on failure
++ */
++static int scale_2d(emma_pp_scale *sz)
++{
++ int inv, outv;
++
++ /* horizontal resizing. parameter check - must provide in size */
++ if (!sz->in.width)
++ return -1;
++
++ /* Resizing based on num:den */
++ inv = sz->num.width;
++ outv = sz->den.width;
++
++ if ((g_hlen = scale_1d_smart(&inv, &outv, 0)) > 0) {
++ /* Resizing succeeded */
++ sz->den.width = outv;
++ sz->out.width = (sz->in.width * outv) / inv;
++ } else {
++ /* Resizing based on in:out */
++ inv = sz->in.width;
++ outv = sz->out.width;
++
++ if ((g_hlen = scale_1d_smart(&inv, &outv, 0)) > 0) {
++ /* Resizing succeeded */
++ sz->out.width = outv;
++ sz->num.width = ratio(sz->in.width, sz->out.width,
++ &sz->den.width);
++ } else
++ return -1;
++ }
++
++ sz->out.width &= ~1;
++
++ /* vertical resizing. parameter check - must provide in size */
++ if (!sz->in.height)
++ return -1;
++
++ /* Resizing based on num:den */
++ inv = sz->num.height;
++ outv = sz->den.height;
++
++ if ((g_vlen = scale_1d_smart(&inv, &outv, g_hlen)) > 0) {
++ /* Resizing succeeded */
++ sz->den.height = outv;
++ sz->out.height = (sz->in.height * outv) / inv;
++ } else {
++ /* Resizing based on in:out */
++ inv = sz->in.height;
++ outv = sz->out.height;
++
++ if ((g_vlen = scale_1d_smart(&inv, &outv, g_hlen)) > 0) {
++ /* Resizing succeeded */
++ sz->out.height = outv;
++ sz->num.height = ratio(sz->in.height, sz->out.height,
++ &sz->den.height);
++ } else
++ return -1;
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Set PP resizing registers.
++ * @param sz Pointer to pp scaling structure
++ * @return Zero on success, others on failure
++ */
++static int pphw_scale(emma_pp_scale * sz)
++{
++ __raw_writel((sz->out.width << 16) | sz->out.height,
++ PP_DEST_IMAGE_SIZE);
++ __raw_writel(((g_hlen - 1) << 16) | (g_vlen ==
++ g_hlen ? 0 : (g_hlen << 8)) |
++ (g_vlen - 1), PP_RESIZE_INDEX);
++ for (g_hlen = 0; g_hlen < g_vlen; g_hlen++)
++ __raw_writel(scale_tbl[g_hlen],
++ PP_RESIZE_COEF_TBL + g_hlen * 4);
++
++ return 0;
++}
++
++/*!
++ * @brief Reset PP.
++ * @return Zero on success, others on failure
++ */
++static int pphw_reset(void)
++{
++ int i;
++ u32 pp_cntl;
++
++ __raw_writel(0x100, PP_CNTL);
++
++ /* timeout */
++ for (i = 0; i < 1000; i++) {
++ if (!((pp_cntl = __raw_readl(PP_CNTL)) & 0x100)) {
++ pr_debug("pp reset over\n");
++ break;
++ }
++ }
++
++ /* check reset value */
++ if (pp_cntl != 0x876) {
++ pr_debug("pp reset value err = 0x%08X\n", pp_cntl);
++ return -EIO;
++ }
++
++ return 0;
++}
++
++/*!
++ * @brief Enable or disable PP.
++ * @param flag Zero to disable PP, others to enable PP
++ * @return Zero on success, others on failure
++ */
++static int pphw_enable(int flag)
++{
++ int ret = 0;
++
++ if (flag)
++ __raw_writel(__raw_readl(PP_CNTL) | 1, PP_CNTL);
++ else
++ ret = pphw_reset();
++
++ return ret;
++}
++
++/*!
++ * @brief Set PP input address.
++ * @param cfg The pointer to PP configuration parameter
++ * @return Zero on success, others on failure
++ */
++static int pphw_ptr(emma_pp_cfg *cfg)
++{
++ __raw_writel(cfg->ptr.y, PP_SOURCE_Y_PTR);
++ __raw_writel(cfg->ptr.u, PP_SOURCE_CB_PTR);
++ __raw_writel(cfg->ptr.v, PP_SOURCE_CR_PTR);
++ __raw_writel(cfg->ptr.qp, PP_QUANTIZER_PTR);
++
++ return 0;
++}
++
++/*!
++ * @brief Set PP output address.
++ * @param cfg The pointer to PP configuration parameter
++ * @return Zero on success, others on failure
++ */
++static int pphw_outptr(emma_pp_cfg *cfg)
++{
++ __raw_writel(cfg->outptr, PP_DEST_RGB_PTR);
++ return 0;
++}
++
++/*!
++ * @brief Configuration PP.
++ * @param cfg The pointer to PP configuration parameter
++ * @return Zero on success, others on failure
++ */
++static int pphw_cfg(emma_pp_cfg *cfg)
++{
++ int rt;
++ register int r;
++
++ pphw_scale(&cfg->dim);
++
++ if (!cfg->in_y_stride)
++ cfg->in_y_stride = cfg->dim.in.width;
++
++ if (!cfg->out_stride)
++ cfg->out_stride = cfg->dim.out.width;
++
++ r = __raw_readl(PP_CNTL) & ~EN_MASK;
++
++ /* config parms */
++ r |= cfg->operation & EN_MASK;
++ if (cfg->operation & EN_MACROBLOCK) {
++ /* Macroblock Mode */
++ r |= 0x0200;
++ __raw_writel(0x06, PP_INTRCNTL);
++ } else {
++ /* Frame mode */
++ __raw_writel(0x05, PP_INTRCNTL);
++ }
++
++ if (cfg->red_width | cfg->green_width | cfg->blue_width) {
++ /* color conversion to be performed */
++ r |= EN_CSC;
++ if (!(cfg->red_offset | cfg->green_offset)) {
++ /* auto offset B:G:R LSb to Msb */
++ cfg->green_offset = cfg->blue_offset + cfg->blue_width;
++ cfg->red_offset = cfg->green_offset + cfg->green_width;
++ }
++ if (!cfg->rgb_resolution) {
++ /* derive minimum resolution required */
++ int w, w2;
++
++ w = cfg->red_offset + cfg->red_width;
++ w2 = cfg->blue_offset + cfg->blue_width;
++ if (w < w2)
++ w = w2;
++ w2 = cfg->green_offset + cfg->green_width;
++ if (w < w2)
++ w = w2;
++ if (w > 16)
++ w = 24;
++ else if (w > 8)
++ w = 16;
++ else
++ w = 8;
++ cfg->rgb_resolution = w;
++ }
++ /* 00,11 - 32 bpp, 10 - 16 bpp, 01 - 8 bpp */
++ r &= ~0xC00;
++ if (cfg->rgb_resolution < 32)
++ r |= (cfg->rgb_resolution << 7);
++ __raw_writel((cfg->red_offset << 26) |
++ (cfg->green_offset << 21) |
++ (cfg->blue_offset << 16) |
++ (cfg->red_width << 8) |
++ (cfg->green_width << 4) |
++ cfg->blue_width, PP_DEST_FRAME_FMT_CNTL);
++ } else {
++ /* add YUV422 formatting */
++ static const unsigned int _422[] = {
++ 0x62000888,
++ 0x60100888,
++ 0x43080888,
++ 0x41180888
++ };
++
++ __raw_writel(_422[(cfg->blue_offset >> 3) & 3],
++ PP_DEST_FRAME_FMT_CNTL);
++ cfg->rgb_resolution = 16;
++ r &= ~0xC00;
++ r |= (cfg->rgb_resolution << 7);
++ }
++
++ /* add csc formatting */
++ if (!cfg->csc_table[1]) {
++ static const unsigned short _csc[][6] = {
++ {0x80, 0xb4, 0x2c, 0x5b, 0x0e4, 0},
++ {0x95, 0xcc, 0x32, 0x68, 0x104, 1},
++ {0x80, 0xca, 0x18, 0x3c, 0x0ec, 0},
++ {0x95, 0xe5, 0x1b, 0x44, 0x10e, 1},
++ };
++ memcpy(cfg->csc_table, _csc[cfg->csc_table[0]],
++ sizeof(_csc[0]));
++ }
++ __raw_writel((cfg->csc_table[0] << 24) |
++ (cfg->csc_table[1] << 16) |
++ (cfg->csc_table[2] << 8) |
++ cfg->csc_table[3], PP_CSC_COEF_0123);
++ __raw_writel((cfg->csc_table[5] ? (1 << 9) : 0) | cfg->csc_table[4],
++ PP_CSC_COEF_4);
++
++ __raw_writel(r, PP_CNTL);
++
++ pphw_ptr(cfg);
++ pphw_outptr(cfg);
++
++ /*
++ * #MB in a row = input_width / 16pix
++ * 1 byte per QP per MB
++ * QP must be formatted to be 4-byte aligned
++ * YUV lines are to be 4-byte aligned as well
++ * So Y is 8 byte aligned, as U = V = Y/2 for 420
++ * MPEG MBs are 16x16 anyway
++ */
++ __raw_writel((cfg->dim.in.width << 16) | cfg->dim.in.height,
++ PP_PROCESS_FRAME_PARA);
++ __raw_writel(cfg->in_y_stride | (PP_CALC_QP_WIDTH(cfg) << 16),
++ PP_SOURCE_FRAME_WIDTH);
++
++ /* in bytes */
++ rt = cfg->rgb_resolution >> 3;
++ if (rt == 3)
++ rt = 4;
++ __raw_writel(cfg->out_stride * rt, PP_DEST_DISPLAY_WIDTH);
++
++ pp_dump();
++ return 0;
++}
++
++/*!
++ * @brief Check PP interrupt status.
++ * @return PP interrupt status
++ */
++static int pphw_isr(void)
++{
++ unsigned long status;
++
++ status = __raw_readl(PP_INTRSTATUS) & 7;
++ if (!status) {
++ pr_debug("pp: not my isr err\n");
++ return status;
++ }
++
++ if (status & 4)
++ pr_debug("pp: isr state error\n");
++
++ /* clear interrupt status */
++ __raw_writel(status, PP_INTRSTATUS);
++
++ return status;
++}
++
++static struct clk *emma_clk;
++
++/*!
++ * @brief PP module clock enable
++ */
++static int pphw_init(void)
++{
++ emma_clk = clk_get(NULL, "emma_clk");
++ if (IS_ERR(emma_clk)) {
++ printk(KERN_ERR "Could not get emma_clk: %ld\n", PTR_ERR(emma_clk));
++ return PTR_ERR(emma_clk);
++ }
++ clk_enable(emma_clk);
++ return 0;
++}
++
++/*!
++ * @brief PP module clock disable
++ */
++static void pphw_exit(void)
++{
++ clk_disable(emma_clk);
++ clk_put(emma_clk);
++}
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/output/mx27_pp.h linux-2.6.28-karo/drivers/media/video/mxc/output/mx27_pp.h
+--- linux-2.6.28/drivers/media/video/mxc/output/mx27_pp.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/output/mx27_pp.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,181 @@
++/*
++ * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mx27_pp.h
++ *
++ * @brief Header file for MX27 V4L2 Video Output Driver
++ *
++ * @ingroup MXC_V4L2_OUTPUT
++ */
++#ifndef __MX27_PP_H__
++#define __MX27_PP_H__
++
++#include "mxc_v4l2_output.h"
++
++/* PP register definitions */
++#define PP_REG(ofs) (IO_ADDRESS(EMMA_PP_BASE_ADDR) + ofs)
++
++/* Register offsets */
++#define PP_CNTL PP_REG(0x00)
++#define PP_INTRCNTL PP_REG(0x04)
++#define PP_INTRSTATUS PP_REG(0x08)
++#define PP_SOURCE_Y_PTR PP_REG(0x0C)
++#define PP_SOURCE_CB_PTR PP_REG(0x10)
++#define PP_SOURCE_CR_PTR PP_REG(0x14)
++#define PP_DEST_RGB_PTR PP_REG(0x18)
++#define PP_QUANTIZER_PTR PP_REG(0x1C)
++#define PP_PROCESS_FRAME_PARA PP_REG(0x20)
++#define PP_SOURCE_FRAME_WIDTH PP_REG(0x24)
++#define PP_DEST_DISPLAY_WIDTH PP_REG(0x28)
++#define PP_DEST_IMAGE_SIZE PP_REG(0x2C)
++#define PP_DEST_FRAME_FMT_CNTL PP_REG(0x30)
++#define PP_RESIZE_INDEX PP_REG(0x34)
++#define PP_CSC_COEF_0123 PP_REG(0x38)
++#define PP_CSC_COEF_4 PP_REG(0x3C)
++#define PP_RESIZE_COEF_TBL PP_REG(0x100)
++
++/* resize table dimensions
++ dest pixel index left/32 right/32 #src pixels to read
++ 0 [BC_COEF] [BC_COEF] [BC_NXT]
++ :
++ pp_tbl_max-1
++*/
++#define BC_NXT 2
++#define BC_COEF 5
++#define SZ_COEF (1 << BC_COEF)
++#define SZ_NXT (1 << BC_NXT)
++
++/* PP operations */
++#define EN_DEBLOCK 0x02
++#define EN_DERING 0x04
++#define EN_CSC 0x10
++#define EN_MACROBLOCK 0x20
++#define EN_DEF 0x16
++#define EN_MASK 0x36
++#define EN_BIGDATA 0x1000
++#define EN_BIGQP 0x2000
++
++/* PP CSC tables */
++#define CSC_TBL_NONE 0x80
++#define CSC_TBL_REUSE 0x81
++#define CSC_TBL_A1 0x00
++#define CSC_TBL_A0 0x20
++#define CSC_TBL_B1 0x40
++#define CSC_TBL_B0 0x60
++/* converts from 4 decimal fixed point to hw setting & vice versa */
++#define PP_CSC_FP4_2_HW(coeff) ((((coeff) << 7) + 5000) / 10000)
++#define PP_CSC_HW_2_FP4(coeff) ((((coeff) * 10000) + 64) >> 7)
++
++#define PP_PIX_YUYV 0
++#define PP_PIX_YVYU 8
++#define PP_PIX_UYVY 16
++#define PP_PIX_VYUY 24
++
++/* PP size & width calculation macros */
++#define PP_CALC_QP_WIDTH(cfg) \
++ (!((cfg)->operation & (EN_DEBLOCK | EN_DERING)) ? 0 : \
++ (((((cfg)->in_y_stride + 15) >> 4) + 3) & ~3))
++#define PP_CALC_Y_SIZE(cfg) \
++ ((cfg)->in_y_stride * (cfg)->in_height)
++#define PP_CALC_CH_SIZE(cfg) (PP_CALC_Y_SIZE(cfg) >> 2)
++#define PP_CALC_BPP(cfg) \
++ ((cfg)->rgb_resolution > 16 ? 4 : ((cfg)->rgb_resolution >> 3))
++#define PP_CALC_YUV_SIZE(cfg) \
++ ((PP_CALC_Y_SIZE(cfg) * 3) >> 1)
++#define PP_CALC_QP_SIZE(cfg) \
++ (PP_CALC_QP_WIDTH(cfg) * (((cfg)->in_height + 15) >> 4))
++#define PP_CALC_DEST_WIDTH(cfg) \
++ (((cfg)->out_stride & ~1) * PP_CALC_BPP(cfg))
++#define PP_CALC_DEST_SIZE(cfg) \
++ ((cfg)->dim.out.height * PP_CALC_DEST_WIDTH(cfg))
++
++/*
++ * physical addresses for bus mastering
++ * v=0 -> yuv packed
++ * v=0 & qp=0 -> yuv packed with qp appended
++ */
++typedef struct _emma_pp_ptr {
++ unsigned int y; /* Y data (line align8) */
++ unsigned int u; /* U data (line align4) */
++ unsigned int v; /* V data (line align4) */
++ unsigned int qp; /* Quantization (line align4) */
++} emma_pp_ptr;
++
++typedef struct _emma_pp_size {
++ int width;
++ int height;
++} emma_pp_size;
++
++/*
++ * if num.width != 0
++ * resize ratio = num.width : den.width
++ * else
++ * resize ratio = in.width : out.width
++ * same for height
++ */
++typedef struct _emma_pp_scale {
++ emma_pp_size num;
++ emma_pp_size den;
++ emma_pp_size in; /* clip */
++ emma_pp_size out; /* 0 -> same as in */
++} emma_pp_scale;
++
++typedef struct _emma_pp_cfg {
++ unsigned char operation; /* OR of EN_xx defines */
++
++ /*
++ * input color coeff
++ * fixed pt 8 bits, steps of 1/128
++ * csc[5] is 1 or 0 to indicate Y + 16
++ * csc[0] is matrix id 0-3 while csc[1-5]=0
++ */
++ unsigned short csc_table[6];
++
++ /*
++ * Output color (shade width, shade offset, pixel resolution)
++ * Eg. 16bpp RGB565 resolution, the values could be:
++ * red_width = 5, green_width = 6, blue_width = 6
++ * red_offset = 11, green_offset = 5, blue_offset = 0 (defaults)
++ * rgb_resolution = 16 (default)
++ * For YUV422: xxx_width=0, blue_offset=PP_PIX_xxx
++ */
++ unsigned short red_width;
++ unsigned short green_width;
++ unsigned short blue_width;
++ /* if offsets are 0, the offsets are by width LSb to MSb B:G:R */
++ unsigned short red_offset;
++ unsigned short blue_offset;
++ unsigned short green_offset;
++ /* if resolution is 0, the minimum for the sum of widths is chosen */
++ short rgb_resolution; /* 8,16,24 bpp only */
++
++ emma_pp_ptr ptr; /* dma buffer pointers */
++ unsigned int outptr; /* RGB/YUV output */
++ emma_pp_scale dim; /* in/out dimensions */
++
++ /* pixels between two adjacent input Y rows */
++ unsigned short in_y_stride; /* 0 = in_width */
++ unsigned short in_height; /* Input image height */
++ /* PIXELS between two adjacent output rows */
++ unsigned short out_stride; /* 0 = out_width */
++} emma_pp_cfg;
++
++int pp_ptr(unsigned long ptr, struct v4l2_mxc_offset offset);
++int pp_enable(int flag);
++int pp_cfg(vout_data * vout);
++int pp_init(vout_data * vout);
++int pp_num_last(void);
++void pp_exit(vout_data * vout);
++
++#endif /* __MX27_PP_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/output/mx27_v4l2_output.c linux-2.6.28-karo/drivers/media/video/mxc/output/mx27_v4l2_output.c
+--- linux-2.6.28/drivers/media/video/mxc/output/mx27_v4l2_output.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/output/mx27_v4l2_output.c 2009-03-11 13:48:58.000000000 +0100
+@@ -0,0 +1,1897 @@
++/*
++ * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mx27_v4l2_output.c
++ *
++ * @brief MX27 V4L2 Video Output Driver
++ *
++ * Video4Linux2 Output Device using MX27 eMMA Post-processing functionality.
++ *
++ * @ingroup MXC_V4L2_OUTPUT
++ */
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/fs.h>
++#include <linux/irq.h>
++#include <linux/delay.h>
++#include <linux/fb.h>
++#include <linux/pci.h>
++#include <linux/platform_device.h>
++#include <media/v4l2-dev.h>
++#include <media/v4l2-common.h>
++#include <media/v4l2-ioctl.h>
++#include <asm/poll.h>
++#include <asm/io.h>
++//#include <asm/semaphore.h>
++#include <mach/imxfb.h>
++
++#include "mxc_v4l2_output.h"
++#include "mx27_pp.h"
++
++//#define SDC_FG_FB_FORMAT V4L2_PIX_FMT_RGB565
++#define SDC_FG_FB_FORMAT V4L2_PIX_FMT_RGB32
++
++struct v4l2_output mxc_outputs[1] = {
++ {
++ .index = 0,
++ .name = "DISP%d Video Out",
++ .type = V4L2_OUTPUT_TYPE_ANALOG, /* not really correct,
++ but no other choice */
++ .audioset = 0,
++ .modulator = 0,
++ .std = V4L2_STD_UNKNOWN,
++ },
++};
++
++#ifdef DEBUG
++int debug = 1;
++#define dbg_lvl(n) ((n) < debug)
++module_param(debug, int, S_IRUGO | S_IWUSR);
++
++#define DBG(lvl, fmt...) do { if (dbg_lvl(lvl)) printk(KERN_DEBUG fmt); } while (0)
++#else
++int debug;
++#define dbg_lvl(n) 0
++#define DBG(lvl, fmt...) do { } while (0)
++module_param(debug, int, 0);
++#endif
++#define pr_warn(fmt,arg...) printk(KERN_WARNING fmt,##arg)
++
++
++static int video_nr = 16;
++
++/* debug counters */
++static uint32_t g_irq_cnt;
++static uint32_t g_buf_output_cnt;
++static uint32_t g_buf_q_cnt;
++static uint32_t g_buf_dq_cnt;
++static uint32_t g_paused_cnt;
++static uint32_t g_busy_cnt;
++static uint32_t g_late_cnt;
++
++static int dq_intr_cnt;
++
++static int using_default_fps = -1;
++
++static inline unsigned long diff_usec(struct timeval *t1, struct timeval *t0)
++{
++ unsigned long diff = (t1->tv_sec - t0->tv_sec) * 1000000;
++
++ if (t1->tv_usec >= t0->tv_usec) {
++ diff += t1->tv_usec - t0->tv_usec;
++ } else {
++ diff += 1000000 - (t0->tv_usec - t1->tv_usec);
++ }
++ return diff;
++}
++
++#ifdef CONFIG_VIDEO_MXC_OUTPUT_FBSYNC
++
++static int fb_event_notify(struct notifier_block *self,
++ unsigned long action, void *data)
++{
++ vout_data *vout = container_of(self, vout_data, fb_event_notifier);
++ struct fb_event *event = data;
++ struct fb_info *info = event->info;
++ unsigned long flags;
++ int blank, i;
++
++ for (i = 0; i < num_registered_fb; i++)
++ if (registered_fb[i] == info)
++ break;
++
++ /*
++ * Check if the event is sent by the framebuffer in which
++ * the video is displayed.
++ */
++ if (i != vout->output_fb)
++ return 0;
++
++ switch (action) {
++ case FB_EVENT_BLANK:
++ DBG(0, "%s: BLANK\n", __FUNCTION__);
++ blank = *(int *)event->data;
++ down(&vout->user_lock);
++ vout->fb_enabled = !blank;
++ if (blank && vout->pp_ready) {
++ if (pp_enable(1))
++ pr_warn("unable to enable PP\n");
++ vout->pp_ready = 0;
++ }
++ up(&vout->user_lock);
++ break;
++ case FB_EVENT_MXC_EOF:
++ down(&vout->user_lock);
++ vout->fb_enabled = 1;
++ if (vout->pp_ready) {
++ DBG(2, "%s: enable PP\n", __FUNCTION__);
++ if (pp_enable(1))
++ pr_warn("unable to enable PP\n");
++ vout->pp_ready = 0;
++ }
++ up(&vout->user_lock);
++ break;
++ }
++
++ return 0;
++}
++#endif
++
++static inline struct v4l_queue *find_buffer(struct list_head *list, int index)
++{
++ struct v4l_queue *q;
++
++ list_for_each_entry(q, list, head) {
++ if (q->buf.index == index) {
++ return q;
++ }
++ }
++ return NULL;
++}
++
++static __inline unsigned long get_jiffies(struct timeval *t)
++{
++ struct timeval cur;
++
++ if (WARN_ON(t->tv_usec >= 1000000)) {
++ t->tv_sec += t->tv_usec / 1000000;
++ t->tv_usec = t->tv_usec % 1000000;
++ }
++
++ do_gettimeofday(&cur);
++ if ((t->tv_sec < cur.tv_sec) ||
++ ((t->tv_sec == cur.tv_sec) && (t->tv_usec < cur.tv_usec))) {
++ DBG(0, "%s: timestamp is %luµs in the past\n", __FUNCTION__,
++ (cur.tv_sec - t->tv_sec) * 1000000 + cur.tv_usec - t->tv_usec);
++ g_late_cnt++;
++ return jiffies;
++ }
++
++ if (t->tv_usec < cur.tv_usec) {
++ cur.tv_sec = t->tv_sec - cur.tv_sec - 1;
++ cur.tv_usec = t->tv_usec + 1000000 - cur.tv_usec;
++ } else {
++ cur.tv_sec = t->tv_sec - cur.tv_sec;
++ cur.tv_usec = t->tv_usec - cur.tv_usec;
++ }
++
++ return jiffies + timeval_to_jiffies(&cur);
++}
++
++/* must be called with irq_lock held */
++static void mxc_v4l2out_start_pp(vout_data *vout)
++{
++ BUG_ON(vout->active == NULL);
++ DBG(0, "%s: Updating HW PTR to %08x\n", __FUNCTION__,
++ vout->active->dma_desc.dma_addr);
++ do_gettimeofday(&vout->frame_start);
++ if (pp_ptr(vout->active->dma_desc.dma_addr, vout->offset)) {
++ pr_warn("%s: unable to update buffer\n", __FUNCTION__);
++ return;
++ }
++#ifdef CONFIG_VIDEO_MXC_OUTPUT_FBSYNC
++ if (vout->tear_protection == TEARING_PROTECTION_ACTIVE) {
++ if (vout->fb_enabled && (vout->v4l2_fb.flags != V4L2_FBUF_FLAG_OVERLAY)) {
++ vout->pp_ready = 1;
++ } else {
++ pp_enable(1);
++ }
++ } else {
++ pp_enable(1);
++ }
++#else
++ pp_enable(1);
++#endif
++ vout->busy = 1;
++}
++
++static __inline void mxc_v4l2out_schedule_frame(vout_data *vout, struct timeval *tv, int init)
++{
++ unsigned long timeout;
++
++ DBG(1, "%s: ts %6lu.%06lu\n", __FUNCTION__, tv->tv_sec, tv->tv_usec);
++ if (0 || ((tv->tv_sec == 0) && (tv->tv_usec == 0))) {
++ if (using_default_fps != 1) {
++ DBG(-1, "%s: using default fps\n", __FUNCTION__);
++ using_default_fps = 1;
++ }
++ mxc_v4l2out_start_pp(vout);
++ return;
++ } else {
++ timeout = get_jiffies(tv);
++ if (using_default_fps != 0) {
++ struct timeval now;
++ do_gettimeofday(&now);
++
++ DBG(-1, "%s: using timestamp %lu.%06lu (now: %lu.%06lu)\n", __FUNCTION__,
++ tv->tv_sec, tv->tv_usec, now.tv_sec, now.tv_usec);
++ using_default_fps = 0;
++ }
++ }
++#ifdef DEBUG
++ {
++ unsigned long cur = jiffies;
++ static unsigned long last_tv;
++ static unsigned int last_fps;
++ static unsigned int last_avg;
++ static unsigned int fps_avg;
++ static unsigned int avg_count;
++
++ if (vout->frame_count == 0) {
++ avg_count = 0;
++ }
++ if (avg_count++ == 0) {
++ last_tv = timeout;
++ fps_avg = 0;
++ last_fps = 0;
++ } else {
++ unsigned long t = timeout;
++ unsigned int fps;
++
++ DBG(3, "%s: t=%lu last=%lu diff=%ld\n", __FUNCTION__,
++ t, last_tv, t - last_tv);
++ if (t - last_tv) {
++ fps = HZ / (t - last_tv);
++ fps_avg = ((fps_avg * (avg_count - 1)) + fps) / avg_count;
++ last_tv = t;
++ if (last_fps != fps || last_avg != fps_avg) {
++ DBG(1, "%s: FPS: %u AVG %u\n", __FUNCTION__, fps, fps_avg);
++ last_fps = fps;
++ last_avg = fps_avg;
++ }
++ } else {
++ avg_count--;
++ }
++ }
++
++ DBG(1, "%s: frame %u start %lu cur %lu timeout %lu\n", __FUNCTION__,
++ vout->frame_count, vout->start_jiffies, cur, timeout);
++ }
++#endif
++ if (!time_before(jiffies, timeout)) {
++ DBG(0, "%s: timeout already expired: %lu >= %lu\n", __FUNCTION__,
++ jiffies, timeout);
++ mxc_v4l2out_start_pp(vout);
++ return;
++ }
++ if (init) {
++ vout->output_timer.expires = timeout;
++ add_timer(&vout->output_timer);
++ } else {
++ WARN_ON(mod_timer(&vout->output_timer, timeout));
++ }
++}
++
++/*!
++ * Private function to free buffers
++ *
++ * @param bufs_paddr Array of physical address of buffers to be freed
++ *
++ * @param bufs_vaddr Array of virtual address of buffers to be freed
++ *
++ * @param num_buf Number of buffers to be freed
++ *
++ * @param size Size for each buffer to be free
++ *
++ * @return status 0 success.
++ */
++static void mxc_free_buffers(vout_data *vout, struct list_head *list)
++{
++ struct v4l_queue *q;
++ struct v4l_queue *tmp;
++ struct device *dev = vout->video_dev->parent;
++ unsigned long flags;
++
++ list_for_each_entry(q, list, head) {
++ DBG(-1, "%s: dma_addr: %08x cpu_addr: %p size %08x\n", __FUNCTION__,
++ q->dma_desc.dma_addr, q->dma_desc.cpu_addr, q->dma_desc.size);
++ }
++ list_for_each_entry_safe(q, tmp, list, head) {
++ struct dma_buf_desc *dma = &q->dma_desc;
++ DBG(-1, "%s: dma_addr: %08x cpu_addr: %p size %08x\n", __FUNCTION__,
++ dma->dma_addr, dma->cpu_addr, dma->size);
++ if (dma->cpu_addr != NULL) {
++ dma_free_coherent(dev,
++ dma->size, dma->cpu_addr,
++ dma->dma_addr);
++ DBG(2, "freed @ paddr=0x%08x\n", dma->dma_addr);
++ }
++ spin_lock_irqsave(&vout->irq_lock, flags);
++ list_del(&q->head);
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ kfree(q);
++ }
++}
++
++/*!
++ * Private function to allocate buffers
++ *
++ * @param bufs_paddr Output array of physical address of buffers allocated
++ *
++ * @param bufs_vaddr Output array of virtual address of buffers allocated
++ *
++ * @param num_buf Input number of buffers to allocate
++ *
++ * @param size Input size for each buffer to allocate
++ *
++ * @return status -0 Successfully allocated a buffer, -ENOBUFS failed.
++ */
++static int mxc_allocate_buffers(vout_data *vout, struct list_head *list, int num_buf, int size)
++{
++ int i;
++ unsigned long flags;
++ struct device *dev = vout->video_dev->parent;
++
++ DBG(2, "Trying to allocate %u buffers of %08x byte each\n",
++ num_buf, size);
++
++ for (i = 0; i < num_buf; i++) {
++ struct v4l_queue *q = kzalloc(sizeof(*q), GFP_KERNEL);
++ struct dma_buf_desc *dma;
++
++ if (q == NULL) {
++ pr_err("failed to allocate memory for queue descriptor\n");
++ return i;
++ }
++ DBG(2, "%s: queue header allocated %p\n", __FUNCTION__, q);
++ q->buf.index = i;
++ dma = &q->dma_desc;
++ if (size != 0) {
++ DBG(2, "Trying to allocate %08x byte DMA memory for queue %p\n",
++ size, list);
++ dma->size = size;
++ dma->cpu_addr = dma_alloc_coherent(dev,
++ size,
++ &dma->dma_addr,
++ GFP_KERNEL);
++ if (dma->cpu_addr == NULL) {
++ pr_err("dma_alloc_coherent failed for buffer %u out of %u\n",
++ i, num_buf);
++ kfree(q);
++ return i;
++ }
++ DBG(2, "allocated @ paddr=0x%08x, size=%d\n",
++ dma->dma_addr, size);
++ }
++ spin_lock_irqsave(&vout->irq_lock, flags);
++ list_add_tail(&q->head, list);
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ }
++ return i;
++}
++
++static void mxc_v4l2out_timer_handler(unsigned long arg)
++{
++ unsigned long flags;
++ vout_data *vout = (vout_data *)arg;
++ struct timeval now;
++
++ do_gettimeofday(&now);
++
++ DBG(1, "timer handler: %lu\n", jiffies);
++
++ spin_lock_irqsave(&vout->irq_lock, flags);
++
++ if (vout->state == STATE_STREAM_OFF && vout->active == NULL) {
++ pr_warn("stream has stopped\n");
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ return;
++ }
++
++ BUG_ON(vout->active == NULL);
++
++ if (vout->busy) {
++ pr_warn("Buffer %d is still busy in frame %u\n",
++ vout->active->buf.index, vout->frame_count);
++ g_busy_cnt++;
++ }
++ vout->frame_count++;
++ mxc_v4l2out_start_pp(vout);
++
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++}
++
++irqreturn_t mxc_v4l2out_pp_in_irq_handler(int irq, void *dev_id)
++{
++ unsigned long flags;
++ vout_data *vout = dev_id;
++ struct timeval now;
++
++ spin_lock_irqsave(&vout->irq_lock, flags);
++
++ do_gettimeofday(&now);
++ DBG(2, "%s: PP IRQ%d #%d\n", __FUNCTION__, irq, g_irq_cnt);
++
++ g_irq_cnt++;
++
++ if (WARN_ON(vout->state == STATE_STREAM_OFF && vout->active == NULL)) {
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ return IRQ_HANDLED;
++ }
++#if 0
++ if (vout->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ struct fb_gwinfo gwinfo;
++
++ gwinfo.enabled = 1;
++ gwinfo.alpha_value = 255;
++ gwinfo.ck_enabled = 0;
++ gwinfo.xpos = vout->crop_current.left;
++ gwinfo.ypos = vout->crop_current.top;
++ gwinfo.base = vout->display_bufs[pp_num_last()];
++ gwinfo.xres = vout->crop_current.width;
++ gwinfo.yres = vout->crop_current.height;
++ gwinfo.xres_virtual = vout->crop_current.width;
++ gwinfo.vs_reversed = 0;
++
++ mx2_gw_set(&gwinfo);
++ }
++#endif
++ /* Process previous buffer */
++ BUG_ON(vout->active == NULL);
++ BUG_ON(vout->active->buf.index >= vout->buffer_cnt);
++ DBG(3, "%s: queue entry %p g_irq_cnt %d\n", __FUNCTION__,
++ vout->active, g_irq_cnt);
++ DBG(0, "%s: frame %u finished after %lums\n", __FUNCTION__,
++ g_buf_output_cnt, diff_usec(&now, &vout->frame_start) / 1000);
++ g_buf_output_cnt++;
++ vout->active->buf.flags |= V4L2_BUF_FLAG_DONE;
++ list_add_tail(&vout->active->head, &vout->done_q);
++ DBG(2, "%s: buffer[%d] %p moved to done queue %p\n", __FUNCTION__,
++ vout->active->buf.index, vout->active, &vout->done_q);
++ vout->active = NULL;
++ vout->busy = 0;
++ wake_up_interruptible(&vout->v4l_bufq);
++
++ BUG_ON(vout->active != NULL);
++
++ if ((vout->state == STATE_STREAM_ON ||
++ vout->state == STATE_STREAM_STOPPING ||
++ vout->state == STATE_STREAM_PAUSED) &&
++ !list_empty(&vout->ready_q)) {
++ vout->active = list_first_entry(&vout->ready_q, struct v4l_queue, head);
++ list_del_init(&vout->active->head);
++ vout->queued--;
++ g_buf_dq_cnt++;
++ DBG(3, "next buffer[%d] %p\n", vout->active->buf.index, vout->active);
++ if (vout->state == STATE_STREAM_PAUSED) {
++ vout->state = STATE_STREAM_ON;
++ }
++ mxc_v4l2out_schedule_frame(vout, &vout->active->buf.timestamp, 0);
++ }
++ if (list_empty(&vout->ready_q)) {
++ if (vout->state == STATE_STREAM_STOPPING) {
++ DBG(-1, "Stream idle\n");
++ //vout->state = STATE_STREAM_OFF;
++ } else if (vout->state == STATE_STREAM_ON) {
++ DBG(0, "No more buffers ready; pausing stream; queued: %d\n", vout->queued);
++ g_paused_cnt++;
++ vout->state = STATE_STREAM_PAUSED;
++ }
++ }
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++
++ return IRQ_HANDLED;
++}
++
++/*!
++ * Start the output stream
++ *
++ * @param vout structure vout_data *
++ *
++ * @return status 0 Success
++ *
++ * called with vout->user_lock held
++ */
++static int mxc_v4l2out_streamon(vout_data *vout)
++{
++ unsigned long flags;
++ int ret;
++
++ if (vout->state != STATE_STREAM_OFF) {
++ return -EBUSY;
++ }
++ if (vout->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ int index = 0;
++ struct v4l_queue *q;
++
++ /* Free previously allocated buffer */
++ mxc_free_buffers(vout, &vout->display_q);
++ /* Allocate buffers for foreground */
++ ret = mxc_allocate_buffers(vout, &vout->display_q,
++ 2, vout->display_buf_size);
++ if (ret != 2) {
++ pr_err("unable to allocate SDC FG buffers\n");
++ return ret;
++ }
++ list_for_each_entry(q, &vout->display_q, head) {
++ DBG(2, "%s: Display buffer %d @ %08x\n", __FUNCTION__,
++ index, q->dma_desc.dma_addr);
++ vout->display_bufs[index++] = q->dma_desc.dma_addr;
++ }
++ }
++
++ /* Configure PP */
++ ret = pp_cfg(vout);
++ if (ret != 0) {
++ /* Free previously allocated buffer */
++ mxc_free_buffers(vout, &vout->display_q);
++ pr_err("failed to config PP: %d\n", ret);
++ return ret;
++ }
++
++#ifdef CONFIG_VIDEO_MXC_OUTPUT_FBSYNC
++ if (vout->tear_protection == TEARING_PROTECTION_ACTIVE) {
++ vout->output_fb = vout->output_fb_num[vout->cur_disp_output];
++ vout->fb_enabled = 0;
++ vout->pp_ready = 0;
++ vout->fb_event_notifier.notifier_call = fb_event_notify;
++ fb_register_client(&vout->fb_event_notifier);
++ mx2fb_register_client(&vout->fb_event_notifier);
++ }
++#endif
++ spin_lock_irqsave(&vout->irq_lock, flags);
++ if (list_empty(&vout->ready_q)) {
++ pr_warn("no buffers queued yet!\n");
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ return EINVAL;
++ }
++ BUG_ON(vout->active);
++ vout->active = list_first_entry(&vout->ready_q, struct v4l_queue, head);
++ list_del_init(&vout->active->head);
++ vout->queued--;
++ g_buf_dq_cnt++;
++ DBG(2, "%s: processing buffer[%d] %p from ready queue %p\n", __FUNCTION__,
++ vout->active->buf.index, vout->active, &vout->ready_q);
++
++ vout->frame_count = 0;
++ vout->state = STATE_STREAM_ON;
++ vout->start_jiffies = jiffies;
++ mxc_v4l2out_schedule_frame(vout, &vout->active->buf.timestamp, 1);
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++
++ return 0;
++}
++
++/*!
++ * Shut down the voutera
++ *
++ * @param vout structure vout_data *
++ *
++ * @return status 0 Success
++ *
++ * called with vout->user_lock held
++ */
++static int mxc_v4l2out_streamoff(vout_data *vout)
++{
++ struct v4l_queue *q;
++ struct v4l_queue *tmp;
++ unsigned long flags;
++
++ if (vout->state == STATE_STREAM_OFF) {
++ return -EINVAL;
++ }
++
++ del_timer_sync(&vout->output_timer);
++
++ pp_enable(0); /* Disable PP */
++
++ spin_lock_irqsave(&vout->irq_lock, flags);
++
++ if (vout->active != NULL) {
++#ifdef DEBUG
++ list_for_each_entry(q, &vout->free_q, head) {
++ DBG(-1, "%s: dma_addr: %08x cpu_addr: %p size %08x\n", __FUNCTION__,
++ q->dma_desc.dma_addr, q->dma_desc.cpu_addr, q->dma_desc.size);
++ }
++#endif
++ DBG(-1, "%s: Moving active buffer %p (%08x:%p) to free list\n", __FUNCTION__,
++ vout->active, vout->active->dma_desc.dma_addr,
++ vout->active->dma_desc.cpu_addr);
++ list_add_tail(&vout->active->head, &vout->free_q);
++#ifdef DEBUG
++ list_for_each_entry(q, &vout->free_q, head) {
++ DBG(-1, "%s: dma_addr: %08x cpu_addr: %p size %08x\n", __FUNCTION__,
++ q->dma_desc.dma_addr, q->dma_desc.cpu_addr, q->dma_desc.size);
++ }
++#endif
++ vout->active = NULL;
++ }
++ list_for_each_entry_safe(q, tmp, &vout->ready_q, head) {
++ DBG(-1, "%s: Moving buffer %p (%08x:%p) from ready to free list\n", __FUNCTION__,
++ q, q->dma_desc.dma_addr, q->dma_desc.cpu_addr);
++ list_move_tail(&q->head, &vout->free_q);
++ vout->queued--;
++ }
++ list_for_each_entry_safe(q, tmp, &vout->done_q, head) {
++ DBG(-1, "%s: Moving buffer %p (%08x:%p) from done to free list\n", __FUNCTION__,
++ q, q->dma_desc.dma_addr, q->dma_desc.cpu_addr);
++ list_move_tail(&q->head, &vout->free_q);
++ }
++
++ BUG_ON(vout->queued < 0);
++ if (WARN_ON(vout->queued)) {
++ DBG(-1, "queued=%d\n", vout->queued);
++ }
++ list_for_each_entry(q, &vout->free_q, head) {
++ DBG(-1, "%s: Reinitializing buffer %p (%08x:%p)\n", __FUNCTION__,
++ q, q->dma_desc.dma_addr, q->dma_desc.cpu_addr);
++ q->buf.flags = 0;
++ q->buf.timestamp.tv_sec = 0;
++ q->buf.timestamp.tv_usec = 0;
++ }
++
++ vout->state = STATE_STREAM_OFF;
++#if 0
++ if (vout->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY) {
++ struct fb_gwinfo gwinfo;
++
++ /* Disable graphic window */
++ gwinfo.enabled = 0;
++ mx2_gw_set(&gwinfo);
++ }
++#endif
++#ifdef CONFIG_VIDEO_MXC_OUTPUT_FBSYNC
++ if (vout->tear_protection == TEARING_PROTECTION_ACTIVE) {
++ vout->output_fb = -1;
++ vout->fb_enabled = 0;
++ vout->pp_ready = 0;
++ fb_unregister_client(&vout->fb_event_notifier);
++ mx2fb_unregister_client(&vout->fb_event_notifier);
++ }
++#endif
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ mxc_free_buffers(vout, &vout->display_q);
++ up(&vout->user_lock);
++
++ return 0;
++}
++
++/*
++ * Valid whether the palette is supported
++ *
++ * @param palette V4L2_PIX_FMT_RGB565, V4L2_PIX_FMT_BGR24 or V4L2_PIX_FMT_BGR32
++ *
++ * @return 1 if supported, 0 if failed
++ */
++static inline int valid_mode(u32 palette)
++{
++ return palette == V4L2_PIX_FMT_YUV420 ||
++ palette == V4L2_PIX_FMT_YUV422P;
++}
++
++/*
++ * Returns bits per pixel for given pixel format
++ *
++ * @param pixelformat V4L2_PIX_FMT_RGB565, V4L2_PIX_FMT_BGR24 or V4L2_PIX_FMT_BGR32
++ *
++ * @return bits per pixel of pixelformat
++ */
++static u32 fmt_to_bpp(u32 pixelformat)
++{
++ u32 bpp;
++
++ switch (pixelformat) {
++ case V4L2_PIX_FMT_RGB565:
++ bpp = 16;
++ break;
++ case V4L2_PIX_FMT_BGR24:
++ case V4L2_PIX_FMT_RGB24:
++ bpp = 24;
++ break;
++ case V4L2_PIX_FMT_BGR32:
++ case V4L2_PIX_FMT_RGB32:
++ bpp = 32;
++ break;
++ default:
++ bpp = 8;
++ break;
++ }
++ return bpp;
++}
++
++/*
++ * V4L2 - Handles VIDIOC_G_FMT Ioctl
++ *
++ * @param vout structure vout_data *
++ *
++ * @param v4l2_format structure v4l2_format *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2out_g_fmt(vout_data *vout, struct v4l2_format *f)
++{
++ if (f->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ return -EINVAL;
++ }
++ *f = vout->v2f;
++ DBG(0, "%s: fmt=%dx%d %08x bpl=%d size=%d colorspace=%d\n", __FUNCTION__,
++ f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.pixelformat,
++ f->fmt.pix.bytesperline, f->fmt.pix.sizeimage, f->fmt.pix.colorspace);
++ return 0;
++}
++
++/*
++ * V4L2 - Handles VIDIOC_S_FMT Ioctl
++ *
++ * @param vout structure vout_data *
++ *
++ * @param v4l2_format structure v4l2_format *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2out_s_fmt(vout_data *vout, struct v4l2_format *f)
++{
++ int retval = 0;
++ u32 size = 0;
++ u32 bytesperline;
++
++ DBG(0, "%s: fmt=%dx%d %08x bpl=%d size=%d colorspace=%d\n", __FUNCTION__,
++ f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.pixelformat,
++ f->fmt.pix.bytesperline, f->fmt.pix.sizeimage, f->fmt.pix.colorspace);
++
++ if (f->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ pr_err("buffer type %d not supported\n", f->type);
++ retval = -EINVAL;
++ goto err0;
++ }
++ if (!valid_mode(f->fmt.pix.pixelformat)) {
++ pr_err("pixel format %08x not supported\n", f->fmt.pix.pixelformat);
++ retval = -EINVAL;
++ goto err0;
++ }
++
++ bytesperline = (f->fmt.pix.width * fmt_to_bpp(f->fmt.pix.pixelformat)) / 8;
++ if (f->fmt.pix.bytesperline < bytesperline) {
++ f->fmt.pix.bytesperline = bytesperline;
++ } else {
++ bytesperline = f->fmt.pix.bytesperline;
++ }
++ if (bytesperline == 0) {
++ return -EINVAL;
++ }
++
++ vout->v2f.fmt.pix.width = f->fmt.pix.width;
++ vout->v2f.fmt.pix.height = f->fmt.pix.height;
++ vout->v2f.fmt.pix.priv = f->fmt.pix.priv;
++ if (vout->v2f.fmt.pix.priv) {
++ if (copy_from_user(&vout->crop_rect,
++ (void __user *)vout->v2f.fmt.pix.priv,
++ sizeof(struct v4l2_rect))) {
++ retval = -EFAULT;
++ goto err0;
++ }
++ }
++ DBG(0, "%s: format: %dx%d-%dbpp %u bytes per line\n", __FUNCTION__,
++ f->fmt.pix.width, f->fmt.pix.height, fmt_to_bpp(f->fmt.pix.pixelformat),
++ bytesperline);
++
++ if ((vout->crop_rect.top > f->fmt.pix.height) ||
++ (vout->crop_rect.left > f->fmt.pix.width)) {
++ retval = -EINVAL;
++ goto err0;
++ }
++
++ if ((vout->crop_rect.top + vout->crop_rect.height) > f->fmt.pix.height)
++ vout->crop_rect.height =
++ f->fmt.pix.height - vout->crop_rect.top;
++ if ((vout->crop_rect.left + vout->crop_rect.width) > f->fmt.pix.width)
++ vout->crop_rect.width = f->fmt.pix.width - vout->crop_rect.left;
++
++ vout->crop_rect.width -= vout->crop_rect.width % 8;
++ vout->crop_rect.height -= vout->crop_rect.height % 8;
++ vout->crop_rect.top -= vout->crop_rect.top % 2;
++ vout->crop_rect.left += vout->crop_rect.left % 2;
++
++ switch (f->fmt.pix.pixelformat) {
++ case V4L2_PIX_FMT_YUV422P:
++ /* bytesperline for YUV planar formats is for
++ Y plane only */
++ size = bytesperline * f->fmt.pix.height * 2;
++ if ((vout->crop_rect.width != 0)
++ && (vout->crop_rect.height != 0)) {
++ vout->offset.y_offset =
++ (vout->v2f.fmt.pix.width * vout->crop_rect.top) +
++ (vout->crop_rect.left);
++ vout->offset.u_offset =
++ (vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) +
++ ((vout->v2f.fmt.pix.width *
++ vout->crop_rect.top) >> 1) +
++ (vout->crop_rect.left >> 1);
++ vout->offset.v_offset =
++ (vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) +
++ ((vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) >> 1) +
++ ((vout->v2f.fmt.pix.width *
++ vout->crop_rect.top) >> 1) +
++ (vout->crop_rect.left >> 1);
++ vout->offset.qp_offset =
++ ((vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) << 1) +
++ (((vout->v2f.fmt.pix.width * vout->crop_rect.top) +
++ vout->crop_rect.left) >> 10);
++ } else {
++ vout->offset.y_offset = 0;
++ vout->offset.u_offset =
++ (vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height);
++ vout->offset.v_offset =
++ vout->offset.u_offset +
++ ((vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) >> 1);
++ vout->offset.qp_offset =
++ vout->offset.v_offset +
++ ((vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) >> 1);
++ }
++ break;
++ case V4L2_PIX_FMT_YUV420:
++ size = (bytesperline * f->fmt.pix.height * 3) / 2;
++ if ((vout->crop_rect.width != 0)
++ && (vout->crop_rect.height != 0)) {
++ vout->offset.y_offset =
++ (vout->v2f.fmt.pix.width * vout->crop_rect.top) +
++ (vout->crop_rect.left);
++ vout->offset.u_offset =
++ (vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) +
++ ((vout->v2f.fmt.pix.width *
++ vout->crop_rect.top) >> 2) +
++ (vout->crop_rect.left >> 1);
++ vout->offset.v_offset =
++ (vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) +
++ ((vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) >> 2) +
++ ((vout->v2f.fmt.pix.width *
++ vout->crop_rect.top) >> 2) +
++ (vout->crop_rect.left >> 1);
++ vout->offset.qp_offset =
++ (vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) +
++ ((vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) >> 1) +
++ (((vout->v2f.fmt.pix.width * vout->crop_rect.top) +
++ vout->crop_rect.left) >> 10);
++ } else {
++ vout->offset.y_offset = 0;
++ vout->offset.u_offset =
++ (vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height);
++ vout->offset.v_offset =
++ vout->offset.u_offset +
++ ((vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) >> 2);
++ vout->offset.qp_offset =
++ vout->offset.v_offset +
++ ((vout->v2f.fmt.pix.width *
++ vout->v2f.fmt.pix.height) >> 2);
++ }
++ break;
++ default:
++ size = bytesperline * f->fmt.pix.height;
++ vout->offset.y_offset = 0;
++ vout->offset.u_offset =
++ (vout->v2f.fmt.pix.width * vout->v2f.fmt.pix.height);
++ vout->offset.v_offset =
++ vout->offset.u_offset +
++ ((vout->v2f.fmt.pix.width * vout->v2f.fmt.pix.height) >> 2);
++ vout->offset.qp_offset =
++ vout->offset.v_offset +
++ ((vout->v2f.fmt.pix.width * vout->v2f.fmt.pix.height) >> 2);
++ break;
++ }
++
++ /* Return the actual size of the image to the app */
++ f->fmt.pix.sizeimage = size;
++ vout->v2f.fmt.pix.sizeimage = size;
++ vout->v2f.fmt.pix.pixelformat = f->fmt.pix.pixelformat;
++ vout->v2f.fmt.pix.bytesperline = f->fmt.pix.bytesperline;
++
++ DBG(0, "%s: Y: %08x..%08x\n", __FUNCTION__,
++ vout->offset.y_offset, vout->offset.y_offset + f->fmt.pix.height * bytesperline);
++ DBG(0, "%s: U: %08x..%08x\n", __FUNCTION__,
++ vout->offset.u_offset, vout->offset.u_offset + f->fmt.pix.height * bytesperline / 2);
++ DBG(0, "%s: V: %08x..%08x\n", __FUNCTION__,
++ vout->offset.v_offset, vout->offset.v_offset + f->fmt.pix.height * bytesperline / 2);
++
++ retval = 0;
++ err0:
++ return retval;
++}
++
++/*
++ * V4L2 - Handles VIDIOC_G_CTRL Ioctl
++ *
++ * @param vout structure vout_data *
++ *
++ * @param c structure v4l2_control *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_get_v4l2out_control(vout_data *vout, struct v4l2_control *c)
++{
++ switch (c->id) {
++ case V4L2_CID_HFLIP:
++ c->value = (vout->rotate & IPU_ROTATE_HORIZ_FLIP) ? 1 : 0;
++ break;
++ case V4L2_CID_VFLIP:
++ c->value = (vout->rotate & IPU_ROTATE_VERT_FLIP) ? 1 : 0;
++ break;
++ case (V4L2_CID_PRIVATE_BASE + 1):
++ c->value = vout->rotate;
++ break;
++ case V4L2_CID_MXC_TEAR_PROTECT:
++ c->value = vout->tear_protection;
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++/*
++ * V4L2 - Handles VIDIOC_S_CTRL Ioctl
++ *
++ * @param vout structure vout_data *
++ *
++ * @param c structure v4l2_control *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_set_v4l2out_control(vout_data *vout, struct v4l2_control *c)
++{
++ switch (c->id) {
++ case V4L2_CID_HFLIP:
++ case V4L2_CID_VFLIP:
++ case V4L2_CID_MXC_ROT:
++ if (c->value < 0 || c->value > 7) {
++ return -EINVAL;
++ }
++ vout->rotate = c->value;
++ break;
++ case V4L2_CID_MXC_TEAR_PROTECT:
++#ifdef CONFIG_VIDEO_MXC_OUTPUT_FBSYNC
++ if (c->value == TEARING_PROTECTION_ACTIVE)
++ vout->tear_protection = TEARING_PROTECTION_ACTIVE;
++ else
++ vout->tear_protection = TEARING_PROTECTION_INACTIVE;;
++#else
++ vout->tear_protection = TEARING_PROTECTION_UNSUPPORTED;
++#endif
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++/*!
++ * V4L2 interface - open function
++ *
++ * @param inode structure inode *
++ *
++ * @param file structure file *
++ *
++ * @return status 0 success, ENODEV invalid device instance,
++ * ENODEV timeout, ERESTARTSYS interrupted by user
++ */
++static int mxc_v4l2out_open(struct inode *inode, struct file *file)
++{
++ struct video_device *dev = video_devdata(file);
++ vout_data *vout = video_get_drvdata(dev);
++ int err;
++
++ dq_intr_cnt = 0;
++ if (!vout) {
++ pr_info("Internal error, vout_data not found!\n");
++ return -ENODEV;
++ }
++
++ down(&vout->user_lock);
++ if (vout->open_count == 0) {
++ err = pp_init(vout);
++ if (err) {
++ goto out;
++ }
++ init_timer(&vout->output_timer);
++ vout->output_timer.function = mxc_v4l2out_timer_handler;
++ vout->output_timer.data = (unsigned long)vout;
++
++ vout->state = STATE_STREAM_OFF;
++ vout->queued = 0;
++ g_irq_cnt = g_buf_output_cnt = g_buf_q_cnt = g_buf_dq_cnt = 0;
++ g_busy_cnt = 0;
++ g_paused_cnt = 0;
++ g_late_cnt = 0;
++ using_default_fps = -1;
++ vout->open_count++;
++ }
++#ifdef CONFIG_VIDEO_MXC_OUTPUT_FBSYNC
++ vout->tear_protection = TEARING_PROTECTION_ACTIVE;
++#else
++ vout->tear_protection = TEARING_PROTECTION_UNSUPPORTED;
++#endif
++
++ file->private_data = dev;
++ out:
++ up(&vout->user_lock);
++ return err;
++}
++
++/*!
++ * V4L2 interface - close function
++ *
++ * @param inode struct inode *
++ *
++ * @param file struct file *
++ *
++ * @return 0 success
++ */
++static int mxc_v4l2out_close(struct inode *inode, struct file *file)
++{
++ struct video_device *dev = file->private_data;
++ vout_data *vout = video_get_drvdata(dev);
++
++ down(&vout->user_lock);
++ if (vout->open_count) {
++ DBG(-1, "%s: %u interrupts handled frames output: %u queued: %u dequeued: %u paused: %u busy: %u late: %u\n",
++ __FUNCTION__, g_irq_cnt, g_buf_output_cnt, g_buf_q_cnt, g_buf_dq_cnt,
++ g_paused_cnt, g_busy_cnt, g_late_cnt);
++
++ pp_exit(vout);
++ mxc_v4l2out_streamoff(vout);
++ file->private_data = NULL;
++ WARN_ON(!list_empty(&vout->done_q));
++ if (WARN_ON(vout->active)) {
++ DBG(-1, "%s: Moving active buffer %p (%08x:%p) to done list\n",
++ __FUNCTION__, vout->active, vout->active->dma_desc.dma_addr,
++ vout->active->dma_desc.cpu_addr);
++ list_add_tail(&vout->active->head, &vout->done_q);
++ vout->active = NULL;
++ }
++ WARN_ON(!list_empty(&vout->ready_q));
++ DBG(-1, "%s: Releasing buffers from ready queue\n", __FUNCTION__);
++ mxc_free_buffers(vout, &vout->ready_q);
++ DBG(-1, "%s: Releasing buffers from done queue\n", __FUNCTION__);
++ mxc_free_buffers(vout, &vout->done_q);
++ DBG(-1, "%s: Releasing buffers from free queue\n", __FUNCTION__);
++ mxc_free_buffers(vout, &vout->free_q);
++ vout->buffer_cnt = 0;
++ DBG(-1, "%s: Releasing display buffers\n", __FUNCTION__);
++ mxc_free_buffers(vout, &vout->display_q);
++
++ /* capture off */
++ wake_up_interruptible(&vout->v4l_bufq);
++ WARN_ON(--vout->open_count);
++ }
++ up(&vout->user_lock);
++
++ return 0;
++}
++
++static int do_dequeue(vout_data *vout, struct v4l2_buffer *user_buf)
++{
++ int retval;
++ unsigned long flags;
++
++ if (vout->active == NULL &&
++ list_empty(&vout->done_q) &&
++ list_empty(&vout->ready_q)) {
++ return -EINVAL;
++ }
++ up(&vout->user_lock);
++ retval = wait_event_interruptible_timeout(vout->v4l_bufq,
++ !list_empty(&vout->done_q),
++ 10 * HZ);
++ down(&vout->user_lock);
++ spin_lock_irqsave(&vout->irq_lock, flags);
++ if (retval >= 0 && !list_empty(&vout->done_q)) {
++ struct v4l_queue *q;
++ struct v4l2_buffer *buf;
++
++ q = list_first_entry(&vout->done_q, struct v4l_queue, head);
++ DBG(2, "%s: processing buffer[%d] %p from done queue %p\n",
++ __FUNCTION__, q->buf.index, q, &vout->done_q);
++ WARN_ON(!(q->buf.flags & V4L2_BUF_FLAG_DONE));
++ q->buf.flags &= ~(V4L2_BUF_FLAG_DONE | V4L2_BUF_FLAG_QUEUED);
++ list_move_tail(&q->head, &vout->free_q);
++ buf = &q->buf;
++ DBG(2, "%s: buffer[%d] %p moved to free queue %p\n", __FUNCTION__,
++ buf->index, q, &vout->free_q);
++ BUG_ON(buf->index >= vout->buffer_cnt);
++ if (user_buf != NULL) {
++ memcpy(user_buf, buf, sizeof(*user_buf));
++ }
++ DBG(1, "VIDIOC_DQBUF: buffer %d: %d\n", buf->index, retval);
++ retval = 0;
++ } else if (retval == 0) {
++ pr_warn("VIDIOC_DQBUF: timeout\n");
++ retval = -ETIME;
++ DBG(3, "VIDIOC_DQBUF: ret: %d\n", retval);
++ }
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ return retval;
++}
++/*!
++ * V4L2 interface - ioctl function
++ *
++ * @param inode struct inode *
++ *
++ * @param file struct file *
++ *
++ * @param ioctlnr unsigned int
++ *
++ * @param arg void *
++ *
++ * @return 0 success, ENODEV for invalid device instance,
++ * -1 for other errors.
++ */
++static int
++mxc_v4l2out_do_ioctl(struct inode *inode, struct file *file,
++ unsigned int ioctlnr, void *arg)
++{
++ struct video_device *vdev = file->private_data;
++ vout_data *vout = video_get_drvdata(vdev);
++ int retval = 0;
++ int i = 0;
++
++ if (dbg_lvl(3)) {
++ v4l_printk_ioctl(ioctlnr);
++ printk(" arg=%p\n", arg);
++ }
++
++ if (!vout)
++ return -EBADF;
++
++ down(&vout->user_lock);
++ switch (ioctlnr) {
++ case VIDIOC_QUERYCAP:
++ {
++ struct v4l2_capability *cap = arg;
++ strcpy(cap->driver, "mxc_v4l2_output");
++ cap->version = 0;
++ cap->capabilities = V4L2_CAP_VIDEO_OUTPUT |
++ V4L2_CAP_STREAMING;
++ strlcpy(cap->card, "MX27 eMMA", sizeof(cap->card));
++ cap->bus_info[0] = '\0';
++ retval = 0;
++ }
++ break;
++ case VIDIOC_G_FMT:
++ {
++ struct v4l2_format *gf = arg;
++ retval = mxc_v4l2out_g_fmt(vout, gf);
++ }
++ break;
++ case VIDIOC_S_FMT:
++ {
++ struct v4l2_format *sf = arg;
++ if (vout->state != STATE_STREAM_OFF) {
++ retval = -EBUSY;
++ break;
++ }
++ retval = mxc_v4l2out_s_fmt(vout, sf);
++ }
++ break;
++ case VIDIOC_REQBUFS:
++ {
++ struct v4l2_requestbuffers *req = arg;
++ struct v4l_queue *q;
++ size_t bufsize = PAGE_ALIGN(vout->v2f.fmt.pix.sizeimage);
++ unsigned long flags;
++
++ if ((req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) ||
++ (req->memory != V4L2_MEMORY_MMAP)) {
++ pr_warn("VIDIOC_REQBUFS: incorrect buffer type: %d\n", req->type);
++ retval = -EINVAL;
++ break;
++ }
++
++ DBG(0, "%s: VIDIOC_REQBUFS: %d buffers of %u byte requested\n",
++ __FUNCTION__, req->count, bufsize);
++
++ if (req->count == 0) {
++ spin_lock_irqsave(&vout->irq_lock, flags);
++ if (vout->state == STATE_STREAM_ON) {
++ vout->state = STATE_STREAM_STOPPING;
++ }
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ while (vout->active || !list_empty(&vout->ready_q)) {
++ DBG(-1, "%s: Waiting for stream to drain queued: %d\n",
++ __FUNCTION__, vout->queued);
++ retval = do_dequeue(vout, NULL);
++ if (retval != 0) {
++ DBG(-1, "do_dequeue() returned %d\n", retval);
++ }
++ if (retval == -ERESTARTSYS) {
++ break;
++ }
++ }
++#if 1
++ retval = mxc_v4l2out_streamoff(vout);
++#else
++ pp_enable(0); /* Disable PP */
++ WARN_ON(!list_empty(&vout->ready_q));
++ WARN_ON(vout->active);
++ mxc_free_buffers(vout, &vout->done_q);
++ mxc_free_buffers(vout, &vout->free_q);
++#endif
++ break;
++ }
++ if (vout->state != STATE_STREAM_OFF) {
++ pr_warn("VIDIOC_REQBUFS: streaming active\n");
++ retval = -EBUSY;
++ break;
++ }
++#if 0
++ if (!list_empty(&vout->done_q) || !list_empty(&vout->ready_q)) {
++ pr_warn("VIDIOC_REQBUFS: busy buffers exist\n");
++ retval = -EBUSY;
++ break;
++ }
++#endif
++ /* This needs no interrupt locking, since we have the busy_lock
++ * and are in STATE_STREAM_OFF where there cannot be any interrupts
++ */
++ if (!list_empty(&vout->free_q)) {
++ q = list_first_entry(&vout->free_q, struct v4l_queue, head);
++ if (q->buf.length != bufsize ||
++ q->buf.type != req->type ||
++ q->buf.memory != req->memory) {
++ pr_err("VIDIOC_REQBUFS: Mismatch between old and new buffer parameters\n");
++ retval = -EINVAL;
++ break;
++ }
++ }
++
++ if (req->count > MAX_FRAME_NUM) {
++ req->count = MAX_FRAME_NUM;
++ }
++ if (req->count == vout->buffer_cnt) {
++ break;
++ } else if (req->count < vout->buffer_cnt) {
++ struct list_head release_q;
++ struct list_head *tmp;
++ struct list_head *x;
++
++ list_for_each_prev_safe(x, tmp, &vout->free_q) {
++ if (vout->buffer_cnt-- > req->count) {
++ q = container_of(x, struct v4l_queue, head);
++ DBG(-1, "%s: Moving buffer[%d:%d] %p (%08x:%p) from free to release list\n",
++ __FUNCTION__, vout->buffer_cnt,
++ q->buf.index, q, q->dma_desc.dma_addr,
++ q->dma_desc.cpu_addr);
++ list_move(x, &release_q);
++ }
++ }
++ BUG_ON(vout->buffer_cnt != req->count);
++ mxc_free_buffers(vout, &release_q);
++ break;
++ }
++ retval = mxc_allocate_buffers(vout, &vout->free_q,
++ req->count - vout->buffer_cnt,
++ bufsize);
++ if (retval + vout->buffer_cnt < req->count) {
++ pr_warn("Could only allocate %u of %u buffers\n",
++ retval + vout->buffer_cnt, req->count);
++ req->count = retval + vout->buffer_cnt;
++ }
++ vout->buffer_cnt = req->count;
++ i = 0;
++ list_for_each_entry(q, &vout->free_q, head) {
++ q->buf.memory = V4L2_MEMORY_MMAP;
++ q->buf.index = i;
++ q->buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
++ q->buf.length = bufsize;
++ q->buf.m.offset = q->dma_desc.dma_addr;
++ i++;
++ }
++ BUG_ON(i != vout->buffer_cnt);
++ }
++ break;
++ case VIDIOC_QUERYBUF:
++ {
++ struct v4l2_buffer *buf = arg;
++ struct v4l_queue *q;
++ unsigned long flags;
++
++ if (buf->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ pr_warn("VIDIOC_QUERYBUF: incorrect buffer type: %d expected %d\n",
++ buf->type, V4L2_BUF_TYPE_VIDEO_OUTPUT);
++ retval = -EINVAL;
++ break;
++ }
++ if (buf->index >= vout->buffer_cnt) {
++ pr_warn("VIDIOC_QUERYBUF: buffer index out of range: %d [0..%d]\n",
++ buf->index, vout->buffer_cnt);
++ retval = -EINVAL;
++ break;
++ }
++ spin_lock_irqsave(&vout->irq_lock, flags);
++ q = find_buffer(&vout->free_q, buf->index);
++ if (q == NULL) {
++ q = find_buffer(&vout->ready_q, buf->index);
++ if (q == NULL) {
++ q = find_buffer(&vout->done_q, buf->index);
++ if (q != NULL) {
++ DBG(2, "VIDIOC_QUERYBUF: buffer[%d] %p found in done list\n",
++ q->buf.index, q);
++ }
++ } else {
++ DBG(2, "VIDIOC_QUERYBUF: buffer[%d] %p found in ready list\n",
++ q->buf.index, q);
++ }
++ } else {
++ DBG(2, "VIDIOC_QUERYBUF: buffer[%d] %p found in free list\n",
++ q->buf.index, q);
++ }
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ if (q == NULL) {
++ pr_warn("VIDIOC_QUERYBUF: buffer %d not found in any list\n",
++ buf->index);
++ retval = -ENOENT;
++ break;
++ }
++ memcpy(buf, &q->buf, sizeof(q->buf));
++ }
++ break;
++ case VIDIOC_QBUF:
++ {
++ struct v4l2_buffer *buf = arg;
++ struct v4l_queue *q;
++ unsigned long flags;
++
++ if (buf->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ pr_err("VIDIOC_QBUF: invalid buffer type: %u\n",
++ buf->type);
++ retval = -EINVAL;
++ break;
++ }
++
++ if (buf->index >= vout->buffer_cnt) {
++ pr_err("VIDIOC_QBUF: invalid buffer index: %u/%u\n",
++ buf->index, vout->buffer_cnt);
++ retval = -EINVAL;
++ break;
++ }
++
++ if (vout->state == STATE_STREAM_STOPPING) {
++ pr_err("VIDIOC_QBUF: stream is draining\n");
++ retval = -EINVAL;
++ break;
++ }
++ DBG(1, "VIDIOC_QBUF: %d/%d ts %6lu.%06lu\n", buf->index,
++ vout->queued, buf->timestamp.tv_sec, buf->timestamp.tv_usec);
++
++ spin_lock_irqsave(&vout->irq_lock, flags);
++ q = find_buffer(&vout->free_q, buf->index);
++ if (q == NULL || (q->buf.flags & V4L2_BUF_FLAG_QUEUED)) {
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ if (q == NULL) {
++ printk(KERN_ERR "buffer %d not on free queue %p\n",
++ buf->index, &vout->free_q);
++ retval = -ENOENT;
++ } else {
++ retval = -EBUSY;
++ }
++ break;
++ }
++ q->buf.timestamp = buf->timestamp;
++ buf = &q->buf;
++ WARN_ON(buf->flags & V4L2_BUF_FLAG_DONE);
++ buf->flags |= V4L2_BUF_FLAG_QUEUED;
++
++ BUG_ON(buf->index >= vout->buffer_cnt);
++
++ if (vout->state == STATE_STREAM_PAUSED &&
++ vout->active == NULL) {
++ DBG(0, "%s: Restarting stream\n", __FUNCTION__);
++ vout->active = q;
++ list_del_init(&vout->active->head);
++ vout->state = STATE_STREAM_ON;
++
++ mxc_v4l2out_schedule_frame(vout, &buf->timestamp, 0);
++ } else {
++ list_move_tail(&q->head, &vout->ready_q);
++ vout->queued++;
++ g_buf_q_cnt++;
++ DBG(2, "%s: buffer[%d] %p moved to ready queue %p\n", __FUNCTION__,
++ buf->index, q, &vout->ready_q);
++ }
++ if (vout->state == STATE_STREAM_PAUSED) {
++ vout->state = STATE_STREAM_ON;
++ }
++ spin_unlock_irqrestore(&vout->irq_lock, flags);
++ }
++ break;
++ case VIDIOC_DQBUF:
++ {
++ struct v4l2_buffer *buf = arg;
++
++ DBG(1, "VIDIOC_DQBUF: queued: %d\n", vout->queued);
++
++ if (list_empty(&vout->done_q) &&
++ (file->f_flags & O_NONBLOCK)) {
++ retval = -EAGAIN;
++ DBG(3, "VIDIOC_DQBUF: ret: %d\n", retval);
++ break;
++ }
++
++ retval = do_dequeue(vout, buf);
++ if (retval == -ETIME) {
++ pr_warn("VIDIOC_DQBUF: timeout\n");
++ DBG(3, "VIDIOC_DQBUF: ret: %d\n", retval);
++ } else if (retval == -ERESTARTSYS) {
++ if (dq_intr_cnt == 0)
++ DBG(0, "VIDIOC_DQBUF: interrupt received\n");
++ dq_intr_cnt++;
++ DBG(0, "VIDIOC_DQBUF: ret: %d\n", retval);
++ } else {
++ DBG(0, "VIDIOC_DQBUF: ret: %d\n", retval);
++ }
++ }
++ break;
++ case VIDIOC_STREAMON:
++ retval = mxc_v4l2out_streamon(vout);
++ break;
++ case VIDIOC_STREAMOFF:
++ retval = mxc_v4l2out_streamoff(vout);
++ break;
++ case VIDIOC_G_CTRL:
++ retval = mxc_get_v4l2out_control(vout, arg);
++ break;
++ case VIDIOC_S_CTRL:
++ retval = mxc_set_v4l2out_control(vout, arg);
++ break;
++ case VIDIOC_CROPCAP:
++ {
++ struct v4l2_cropcap *cap = arg;
++
++ if (cap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ retval = -EINVAL;
++ break;
++ }
++ cap->bounds = vout->crop_bounds[vout->cur_disp_output];
++ cap->defrect = vout->crop_bounds[vout->cur_disp_output];
++ retval = 0;
++ }
++ break;
++ case VIDIOC_G_CROP:
++ {
++ struct v4l2_crop *crop = arg;
++
++ if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ retval = -EINVAL;
++ break;
++ }
++ crop->c = vout->crop_current;
++ }
++ break;
++ case VIDIOC_S_CROP:
++ {
++ struct v4l2_crop *crop = arg;
++ struct v4l2_rect *b = &vout->crop_bounds[vout->cur_disp_output];
++
++ if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ retval = -EINVAL;
++ break;
++ }
++ if (crop->c.height < 0) {
++ retval = -EINVAL;
++ break;
++ }
++ if (crop->c.width < 0) {
++ retval = -EINVAL;
++ break;
++ }
++
++ if (crop->c.top < b->top)
++ crop->c.top = b->top;
++ if (crop->c.top > b->top + b->height)
++ crop->c.top = b->top + b->height;
++ if (crop->c.height > b->top - crop->c.top + b->height)
++ crop->c.height =
++ b->top - crop->c.top + b->height;
++
++ if (crop->c.left < b->left)
++ crop->c.top = b->left;
++ if (crop->c.left > b->left + b->width)
++ crop->c.top = b->left + b->width;
++ if (crop->c.width > b->left - crop->c.left + b->width)
++ crop->c.width =
++ b->left - crop->c.left + b->width;
++
++ /* stride line limitation */
++ crop->c.height -= crop->c.height % 8;
++ crop->c.width -= crop->c.width % 8;
++
++ vout->crop_current = crop->c;
++ DBG(0, "%s: crop rect: %dx%d%+d%+d\n", __FUNCTION__,
++ crop->c.width, crop->c.height,
++ crop->c.left, crop->c.top);
++
++ vout->display_buf_size = vout->crop_current.width *
++ vout->crop_current.height;
++ vout->display_buf_size *=
++ fmt_to_bpp(SDC_FG_FB_FORMAT) / 8;
++ }
++ break;
++ case VIDIOC_ENUMOUTPUT:
++ {
++ struct v4l2_output *output = arg;
++
++ if ((output->index >= 2) || !vout->output_enabled[output->index]) {
++ retval = -EINVAL;
++ break;
++ }
++ memcpy(output, &mxc_outputs[0], sizeof(*output));
++ snprintf(output->name, sizeof(output->name), mxc_outputs[0].name,
++ output->index);
++ }
++ break;
++ case VIDIOC_G_OUTPUT:
++ {
++ u32 *index = arg;
++
++ *index = vout->cur_disp_output;
++ }
++ break;
++ case VIDIOC_S_OUTPUT:
++ {
++ u32 *index = arg;
++
++ if ((*index >= 2) || !vout->output_enabled[*index]) {
++ retval = -EINVAL;
++ break;
++ }
++
++ if (vout->state != STATE_STREAM_OFF) {
++ retval = -EBUSY;
++ break;
++ }
++
++ vout->cur_disp_output = *index;
++ }
++ break;
++ case VIDIOC_G_FBUF:
++ {
++ struct v4l2_framebuffer *fb = arg;
++
++ memcpy(fb, &vout->v4l2_fb, sizeof(*fb));
++ }
++ break;
++ case VIDIOC_S_FBUF:
++ {
++ struct v4l2_framebuffer *fb = arg;
++
++ memcpy(&vout->v4l2_fb, fb, sizeof(vout->v4l2_fb));
++ vout->v4l2_fb.capability = V4L2_FBUF_CAP_EXTERNOVERLAY;
++ }
++ break;
++ case VIDIOC_ENUM_FMT:
++ case VIDIOC_TRY_FMT:
++ case VIDIOC_QUERYCTRL:
++ case VIDIOC_G_PARM:
++ case VIDIOC_ENUMSTD:
++ case VIDIOC_G_STD:
++ case VIDIOC_S_STD:
++ case VIDIOC_G_TUNER:
++ case VIDIOC_S_TUNER:
++ case VIDIOC_G_FREQUENCY:
++ case VIDIOC_S_FREQUENCY:
++ default:
++ retval = -EINVAL;
++ }
++
++ up(&vout->user_lock);
++ return retval;
++}
++
++/*
++ * V4L2 interface - ioctl function
++ *
++ * @return None
++ */
++static int
++mxc_v4l2out_ioctl(struct inode *inode, struct file *file,
++ unsigned int cmd, unsigned long arg)
++{
++ return video_usercopy(inode, file, cmd, arg, mxc_v4l2out_do_ioctl);
++}
++
++/*!
++ * V4L2 interface - mmap function
++ *
++ * @param file structure file *
++ *
++ * @param vma structure vm_area_struct *
++ *
++ * @return status 0 Success, EINTR busy lock error,
++ * ENOBUFS remap_page error
++ */
++static int mxc_v4l2out_mmap(struct file *file, struct vm_area_struct *vma)
++{
++ struct video_device *vdev = file->private_data;
++ unsigned long start = vma->vm_start;
++ unsigned long size = vma->vm_end - vma->vm_start;
++ int res = 0;
++ vout_data *vout = video_get_drvdata(vdev);
++
++ down(&vout->user_lock);
++
++ /* make buffers write-thru cacheable */
++ vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) &
++ ~L_PTE_BUFFERABLE);
++
++ if (remap_pfn_range(vma, start, vma->vm_pgoff, size, vma->vm_page_prot)) {
++ pr_err("%s: - remap_pfn_range failed\n", __FUNCTION__);
++ res = -ENOBUFS;
++ }
++
++ up(&vout->user_lock);
++ return res;
++}
++
++/*!
++ * V4L2 interface - poll function
++ *
++ * @param file structure file *
++ *
++ * @param wait structure poll_table *
++ *
++ * @return status POLLIN | POLLRDNORM
++ */
++static unsigned int mxc_v4l2out_poll(struct file *file, poll_table *wait)
++{
++ struct video_device *vdev = file->private_data;
++ vout_data *vout = video_get_drvdata(vdev);
++
++ wait_queue_head_t *queue = NULL;
++ int res = POLLIN | POLLRDNORM;
++
++ down(&vout->user_lock);
++
++ queue = &vout->v4l_bufq;
++ poll_wait(file, queue, wait);
++
++ up(&vout->user_lock);
++ return res;
++}
++
++static struct file_operations mxc_v4l2out_fops = {
++ .owner = THIS_MODULE,
++ .open = mxc_v4l2out_open,
++ .release = mxc_v4l2out_close,
++ .ioctl = mxc_v4l2out_ioctl,
++ .mmap = mxc_v4l2out_mmap,
++ .poll = mxc_v4l2out_poll,
++};
++
++static struct video_device mxc_v4l2out_template = {
++ //.owner = THIS_MODULE,
++ .name = "MXC Video Output",
++ //.type = 0,
++ //.type2 = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING,
++ //.hardware = 39,
++ .fops = &mxc_v4l2out_fops,
++ .release = video_device_release,
++};
++
++/*!
++ * Probe routine for the framebuffer driver. It is called during the
++ * driver binding process. The following functions are performed in
++ * this routine: Framebuffer initialization, Memory allocation and
++ * mapping, Framebuffer registration, IPU initialization.
++ *
++ * @return Appropriate error code to the kernel common code
++ */
++static int mxc_v4l2out_probe(struct platform_device *pdev)
++{
++ int ret;
++ int i;
++ vout_data *vout;
++
++ /*
++ * Allocate sufficient memory for the fb structure
++ */
++ vout = kzalloc(sizeof(vout_data), GFP_KERNEL);
++ if (!vout)
++ return -ENOMEM;
++
++ vout->video_dev = video_device_alloc();
++ if (vout->video_dev == NULL) {
++ kfree(vout);
++ return -ENOMEM;
++ }
++ *vout->video_dev = mxc_v4l2out_template;
++
++ vout->video_dev->parent = &pdev->dev;
++ vout->video_dev->minor = -1;
++
++ init_waitqueue_head(&vout->v4l_bufq);
++
++ INIT_LIST_HEAD(&vout->free_q);
++ INIT_LIST_HEAD(&vout->ready_q);
++ INIT_LIST_HEAD(&vout->done_q);
++
++ INIT_LIST_HEAD(&vout->display_q);
++
++ spin_lock_init(&vout->irq_lock);
++
++ init_MUTEX(&vout->user_lock);
++ //mutex_init(&vout->user_lock);
++
++ /* register v4l device */
++ ret = video_register_device(vout->video_dev,
++ VFL_TYPE_GRABBER, video_nr);
++ if (ret != 0) {
++ pr_err("video_register_device failed: %d\n", ret);
++ kfree(vout->video_dev);
++ kfree(vout);
++ return ret;
++ }
++ DBG(0, "mxc_v4l2out: registered device video%d\n",
++ vout->video_dev->minor & 0x1f);
++
++ video_set_drvdata(vout->video_dev, vout);
++ platform_set_drvdata(pdev, vout);
++
++ /* setup outputs and cropping */
++ vout->cur_disp_output = -1;
++#ifdef CONFIG_VIDEO_MXC_OUTPUT_FBSYNC
++ vout->output_fb = -1;
++#endif
++ for (i = 0; i < num_registered_fb && i < MXC_V4L2_OUT_NUM_OUTPUTS; i++) {
++ char *idstr = registered_fb[i]->fix.id;
++ DBG(0, "Checking FB '%s'\n", idstr);
++ if (strncmp(idstr, "IMX", 3) == 0) {
++ int disp_num = i;
++ vout->crop_bounds[disp_num].left = 0;
++ vout->crop_bounds[disp_num].top = 0;
++ vout->crop_bounds[disp_num].width =
++ registered_fb[i]->var.xres;
++ vout->crop_bounds[disp_num].height =
++ registered_fb[i]->var.yres;
++ vout->output_enabled[disp_num] = true;
++ vout->output_fb_num[disp_num] = i;
++ DBG(0, "crop bounds: %dx%d%+d%+d\n",
++ vout->crop_bounds[disp_num].left,
++ vout->crop_bounds[disp_num].top,
++ vout->crop_bounds[disp_num].width,
++ vout->crop_bounds[disp_num].height);
++ if (vout->cur_disp_output == -1)
++ vout->cur_disp_output = disp_num;
++ }
++
++ }
++ if (vout->cur_disp_output >= 0) {
++ vout->crop_current = vout->crop_bounds[vout->cur_disp_output];
++ }
++
++ /* Setup framebuffer parameters */
++ vout->v4l2_fb.capability = V4L2_FBUF_CAP_EXTERNOVERLAY;
++ vout->v4l2_fb.flags = V4L2_FBUF_FLAG_PRIMARY;
++ // FIXME: Use the pixelformat of the FB driver!
++ vout->v4l2_fb.fmt.pixelformat = V4L2_PIX_FMT_RGB565;
++
++ return 0;
++}
++
++static int mxc_v4l2out_remove(struct platform_device *pdev)
++{
++ vout_data *vout = platform_get_drvdata(pdev);
++
++ video_unregister_device(vout->video_dev);
++ kfree(vout);
++ return 0;
++}
++
++#define DRV_NAME "MXC Video Output"
++/*!
++ * This structure contains pointers to the power management callback functions.
++ */
++static struct platform_driver mxc_v4l2out_driver = {
++ .driver = {
++ .name = DRV_NAME,
++ .owner = THIS_MODULE,
++ },
++ .probe = mxc_v4l2out_probe,
++ .remove = mxc_v4l2out_remove,
++};
++
++#ifdef REGISTER_PDEV
++#if 1
++static struct platform_device *mxc_v4l2out_device;
++#else
++static struct platform_device mxc_v4l2out_device = {
++ .name = "MXC Video Output",
++ .id = 0,
++};
++#endif
++#endif
++
++/*!
++ * mxc v4l2 init function
++ *
++ */
++static int mxc_v4l2out_init(void)
++{
++ int err;
++
++ err = platform_driver_register(&mxc_v4l2out_driver);
++#ifdef REGISTER_PDEV
++ if (err == 0) {
++#if 1
++ mxc_v4l2out_device = platform_device_register_simple(DRV_NAME, 0, NULL, 0);
++ if (IS_ERR(mxc_v4l2out_device)) {
++ platform_driver_unregister(&mxc_v4l2out_driver);
++ return PTR_ERR(mxc_v4l2out_device);
++ }
++#else
++ platform_device_register(&mxc_v4l2out_device);
++#endif
++ }
++#endif
++ return err;
++}
++
++/*!
++ * mxc v4l2 cleanup function
++ *
++ */
++static void mxc_v4l2out_clean(void)
++{
++ DBG(0, "unregistering video\n");
++
++ platform_driver_unregister(&mxc_v4l2out_driver);
++#ifdef REGISTER_PDEV
++#if 1
++ platform_device_unregister(mxc_v4l2out_device);
++#else
++ platform_device_unregister(&mxc_v4l2out_device);
++#endif
++#endif
++}
++
++module_init(mxc_v4l2out_init);
++module_exit(mxc_v4l2out_clean);
++
++module_param(video_nr, int, S_IRUGO);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("V4L2-driver for MXC video output");
++MODULE_LICENSE("GPL");
++MODULE_SUPPORTED_DEVICE("video");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/output/mxc_v4l2_output.c linux-2.6.28-karo/drivers/media/video/mxc/output/mxc_v4l2_output.c
+--- linux-2.6.28/drivers/media/video/mxc/output/mxc_v4l2_output.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/output/mxc_v4l2_output.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,1720 @@
++/*
++ * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file drivers/media/video/mxc/output/mxc_v4l2_output.c
++ *
++ * @brief MXC V4L2 Video Output Driver
++ *
++ * Video4Linux2 Output Device using MXC IPU Post-processing functionality.
++ *
++ * @ingroup MXC_V4L2_OUTPUT
++ */
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/console.h>
++#include <linux/fs.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <asm/cacheflush.h>
++#include <asm/io.h>
++#include <asm/semaphore.h>
++#include <linux/dma-mapping.h>
++
++#include <asm/arch/mxcfb.h>
++#include <mach/ipu.h>
++
++#include "mxc_v4l2_output.h"
++
++vout_data *g_vout;
++#define SDC_FG_FB_FORMAT IPU_PIX_FMT_RGB565
++
++struct v4l2_output mxc_outputs[2] = {
++ {
++ .index = MXC_V4L2_OUT_2_SDC,
++ .name = "DISP3 Video Out",
++ .type = V4L2_OUTPUT_TYPE_ANALOG, /* not really correct,
++ but no other choice */
++ .audioset = 0,
++ .modulator = 0,
++ .std = V4L2_STD_UNKNOWN},
++ {
++ .index = MXC_V4L2_OUT_2_ADC,
++ .name = "DISPx Video Out",
++ .type = V4L2_OUTPUT_TYPE_ANALOG, /* not really correct,
++ but no other choice */
++ .audioset = 0,
++ .modulator = 0,
++ .std = V4L2_STD_UNKNOWN}
++};
++
++static int video_nr = 16;
++static spinlock_t g_lock = SPIN_LOCK_UNLOCKED;
++
++/* debug counters */
++uint32_t g_irq_cnt;
++uint32_t g_buf_output_cnt;
++uint32_t g_buf_q_cnt;
++uint32_t g_buf_dq_cnt;
++
++static int dq_intr_cnt=0;
++static int dq_timeout_cnt=0;
++
++#define QUEUE_SIZE (MAX_FRAME_NUM + 1)
++static __inline int queue_size(v4l_queue * q)
++{
++ if (q->tail >= q->head)
++ return (q->tail - q->head);
++ else
++ return ((q->tail + QUEUE_SIZE) - q->head);
++}
++
++static __inline int queue_buf(v4l_queue * q, int idx)
++{
++ if (((q->tail + 1) % QUEUE_SIZE) == q->head)
++ return -1; /* queue full */
++ q->list[q->tail] = idx;
++ q->tail = (q->tail + 1) % QUEUE_SIZE;
++ return 0;
++}
++
++static __inline int dequeue_buf(v4l_queue * q)
++{
++ int ret;
++ if (q->tail == q->head)
++ return -1; /* queue empty */
++ ret = q->list[q->head];
++ q->head = (q->head + 1) % QUEUE_SIZE;
++ return ret;
++}
++
++static __inline int peek_next_buf(v4l_queue * q)
++{
++ if (q->tail == q->head)
++ return -1; /* queue empty */
++ return q->list[q->head];
++}
++
++static __inline unsigned long get_jiffies(struct timeval *t)
++{
++ struct timeval cur;
++
++ if (t->tv_usec >= 1000000) {
++ t->tv_sec += t->tv_usec / 1000000;
++ t->tv_usec = t->tv_usec % 1000000;
++ }
++
++ do_gettimeofday(&cur);
++ if ((t->tv_sec < cur.tv_sec)
++ || ((t->tv_sec == cur.tv_sec) && (t->tv_usec < cur.tv_usec)))
++ return jiffies;
++
++ if (t->tv_usec < cur.tv_usec) {
++ cur.tv_sec = t->tv_sec - cur.tv_sec - 1;
++ cur.tv_usec = t->tv_usec + 1000000 - cur.tv_usec;
++ } else {
++ cur.tv_sec = t->tv_sec - cur.tv_sec;
++ cur.tv_usec = t->tv_usec - cur.tv_usec;
++ }
++
++ return jiffies + timeval_to_jiffies(&cur);
++}
++
++/*!
++ * Private function to free buffers
++ *
++ * @param bufs_paddr Array of physical address of buffers to be freed
++ *
++ * @param bufs_vaddr Array of virtual address of buffers to be freed
++ *
++ * @param num_buf Number of buffers to be freed
++ *
++ * @param size Size for each buffer to be free
++ *
++ * @return status 0 success.
++ */
++static int mxc_free_buffers(dma_addr_t bufs_paddr[], void *bufs_vaddr[],
++ int num_buf, int size)
++{
++ int i;
++
++ for (i = 0; i < num_buf; i++) {
++ if (bufs_vaddr[i] != 0) {
++ dma_free_coherent(0, size, bufs_vaddr[i],
++ bufs_paddr[i]);
++ pr_debug("freed @ paddr=0x%08X\n", (u32) bufs_paddr[i]);
++ bufs_paddr[i] = 0;
++ bufs_vaddr[i] = NULL;
++ }
++ }
++ return 0;
++}
++
++/*!
++ * Private function to allocate buffers
++ *
++ * @param bufs_paddr Output array of physical address of buffers allocated
++ *
++ * @param bufs_vaddr Output array of virtual address of buffers allocated
++ *
++ * @param num_buf Input number of buffers to allocate
++ *
++ * @param size Input size for each buffer to allocate
++ *
++ * @return status -0 Successfully allocated a buffer, -ENOBUFS failed.
++ */
++static int mxc_allocate_buffers(dma_addr_t bufs_paddr[], void *bufs_vaddr[],
++ int num_buf, int size)
++{
++ int i;
++
++ for (i = 0; i < num_buf; i++) {
++ bufs_vaddr[i] = dma_alloc_coherent(0, size,
++ &bufs_paddr[i],
++ GFP_DMA | GFP_KERNEL);
++
++ if (bufs_vaddr[i] == 0) {
++ mxc_free_buffers(bufs_paddr, bufs_vaddr, i, size);
++ printk(KERN_ERR "dma_alloc_coherent failed.\n");
++ return -ENOBUFS;
++ }
++ pr_debug("allocated @ paddr=0x%08X, size=%d.\n",
++ (u32) bufs_paddr[i], size);
++ }
++
++ return 0;
++}
++
++/*
++ * Returns bits per pixel for given pixel format
++ *
++ * @param pixelformat V4L2_PIX_FMT_RGB565, V4L2_PIX_FMT_BGR24 or V4L2_PIX_FMT_BGR32
++ *
++ * @return bits per pixel of pixelformat
++ */
++static u32 fmt_to_bpp(u32 pixelformat)
++{
++ u32 bpp;
++
++ switch (pixelformat) {
++ case V4L2_PIX_FMT_RGB565:
++ bpp = 16;
++ break;
++ case V4L2_PIX_FMT_BGR24:
++ case V4L2_PIX_FMT_RGB24:
++ bpp = 24;
++ break;
++ case V4L2_PIX_FMT_BGR32:
++ case V4L2_PIX_FMT_RGB32:
++ bpp = 32;
++ break;
++ default:
++ bpp = 8;
++ break;
++ }
++ return bpp;
++}
++
++static void mxc_v4l2out_timer_handler(unsigned long arg)
++{
++ int index;
++ unsigned long timeout;
++ unsigned long lock_flags = 0;
++ vout_data *vout = (vout_data *) arg;
++
++ dev_dbg(vout->video_dev->dev, "timer handler: %lu\n", jiffies);
++
++ spin_lock_irqsave(&g_lock, lock_flags);
++
++ /*
++ * If timer occurs before IPU h/w is ready, then set the state to
++ * paused and the timer will be set again when next buffer is queued
++ * or PP comletes
++ */
++ if (vout->ipu_buf[vout->next_rdy_ipu_buf] != -1) {
++ dev_dbg(vout->video_dev->dev, "IPU buffer busy\n");
++ vout->state = STATE_STREAM_PAUSED;
++ goto exit0;
++ }
++
++ /* Dequeue buffer and pass to IPU */
++ index = dequeue_buf(&vout->ready_q);
++ if (index == -1) { /* no buffers ready, should never occur */
++ dev_err(vout->video_dev->dev,
++ "mxc_v4l2out: timer - no queued buffers ready\n");
++ goto exit0;
++ }
++
++ g_buf_dq_cnt++;
++ vout->frame_count++;
++ vout->ipu_buf[vout->next_rdy_ipu_buf] = index;
++ if (ipu_update_channel_buffer(vout->post_proc_ch, IPU_INPUT_BUFFER,
++ vout->next_rdy_ipu_buf,
++ vout->v4l2_bufs[index].m.offset) < 0) {
++ dev_err(vout->video_dev->dev,
++ "unable to update buffer %d address\n",
++ vout->next_rdy_ipu_buf);
++ goto exit0;
++ }
++ if (ipu_select_buffer(vout->post_proc_ch, IPU_INPUT_BUFFER,
++ vout->next_rdy_ipu_buf) < 0) {
++ dev_err(vout->video_dev->dev,
++ "unable to set IPU buffer ready\n");
++ }
++ vout->next_rdy_ipu_buf = !vout->next_rdy_ipu_buf;
++
++ /* Setup timer for next buffer */
++ index = peek_next_buf(&vout->ready_q);
++ if (index != -1) {
++ /* if timestamp is 0, then default to 30fps */
++ if ((vout->v4l2_bufs[index].timestamp.tv_sec == 0)
++ && (vout->v4l2_bufs[index].timestamp.tv_usec == 0))
++ timeout =
++ vout->start_jiffies + vout->frame_count * HZ / 30;
++ else
++ timeout =
++ get_jiffies(&vout->v4l2_bufs[index].timestamp);
++
++ if (jiffies >= timeout) {
++ dev_dbg(vout->video_dev->dev,
++ "warning: timer timeout already expired.\n");
++ }
++ if (mod_timer(&vout->output_timer, timeout))
++ dev_dbg(vout->video_dev->dev,
++ "warning: timer was already set\n");
++
++ dev_dbg(vout->video_dev->dev,
++ "timer handler next schedule: %lu\n", timeout);
++ } else {
++ vout->state = STATE_STREAM_PAUSED;
++ }
++
++ exit0:
++ spin_unlock_irqrestore(&g_lock, lock_flags);
++}
++
++static irqreturn_t mxc_v4l2out_pp_in_irq_handler(int irq, void *dev_id)
++{
++ int last_buf;
++ int index;
++ unsigned long timeout;
++ unsigned long lock_flags = 0;
++ vout_data *vout = dev_id;
++
++ spin_lock_irqsave(&g_lock, lock_flags);
++
++ g_irq_cnt++;
++
++ /* Process previous buffer */
++ last_buf = vout->ipu_buf[vout->next_done_ipu_buf];
++ if (last_buf != -1) {
++ g_buf_output_cnt++;
++ vout->v4l2_bufs[last_buf].flags = V4L2_BUF_FLAG_DONE;
++ queue_buf(&vout->done_q, last_buf);
++ vout->ipu_buf[vout->next_done_ipu_buf] = -1;
++ wake_up_interruptible(&vout->v4l_bufq);
++ /* printk("pp_irq: buf %d done\n", vout->next_done_ipu_buf); */
++ vout->next_done_ipu_buf = !vout->next_done_ipu_buf;
++ }
++
++ if (vout->state == STATE_STREAM_STOPPING) {
++ if ((vout->ipu_buf[0] == -1) && (vout->ipu_buf[1] == -1)) {
++ vout->state = STATE_STREAM_OFF;
++ }
++ } else if ((vout->state == STATE_STREAM_PAUSED)
++ && ((index = peek_next_buf(&vout->ready_q)) != -1)) {
++ /* Setup timer for next buffer, when stream has been paused */
++ pr_debug("next index %d\n", index);
++
++ /* if timestamp is 0, then default to 30fps */
++ if ((vout->v4l2_bufs[index].timestamp.tv_sec == 0)
++ && (vout->v4l2_bufs[index].timestamp.tv_usec == 0))
++ timeout =
++ vout->start_jiffies + vout->frame_count * HZ / 30;
++ else
++ timeout =
++ get_jiffies(&vout->v4l2_bufs[index].timestamp);
++
++ if (jiffies >= timeout) {
++ pr_debug("warning: timer timeout already expired.\n");
++ }
++
++ vout->state = STATE_STREAM_ON;
++
++ if (mod_timer(&vout->output_timer, timeout))
++ pr_debug("warning: timer was already set\n");
++
++ pr_debug("timer handler next schedule: %lu\n", timeout);
++ }
++
++ spin_unlock_irqrestore(&g_lock, lock_flags);
++
++ return IRQ_HANDLED;
++}
++
++/*!
++ * Start the output stream
++ *
++ * @param vout structure vout_data *
++ *
++ * @return status 0 Success
++ */
++static int mxc_v4l2out_streamon(vout_data * vout)
++{
++ struct device *dev = vout->video_dev->dev;
++ ipu_channel_params_t params;
++ struct mxcfb_pos fb_pos;
++ struct fb_var_screeninfo fbvar;
++ struct fb_info *fbi =
++ registered_fb[vout->output_fb_num[vout->cur_disp_output]];
++ int pp_in_buf[2];
++ u16 out_width;
++ u16 out_height;
++ ipu_channel_t display_input_ch = MEM_PP_MEM;
++ bool use_direct_adc = false;
++
++ if (!vout)
++ return -EINVAL;
++
++ if (vout->state != STATE_STREAM_OFF)
++ return -EBUSY;
++
++ if (queue_size(&vout->ready_q) < 2) {
++ dev_err(dev, "2 buffers not been queued yet!\n");
++ return -EINVAL;
++ }
++
++ out_width = vout->crop_current.width;
++ out_height = vout->crop_current.height;
++
++ vout->next_done_ipu_buf = vout->next_rdy_ipu_buf = 0;
++ vout->ipu_buf[0] = pp_in_buf[0] = dequeue_buf(&vout->ready_q);
++ vout->ipu_buf[1] = pp_in_buf[1] = dequeue_buf(&vout->ready_q);
++ vout->frame_count = 2;
++
++ ipu_enable_irq(IPU_IRQ_PP_IN_EOF);
++
++ /* Init Display Channel */
++#ifdef CONFIG_FB_MXC_ASYNC_PANEL
++ if (vout->cur_disp_output < DISP3) {
++ mxcfb_set_refresh_mode(fbi, MXCFB_REFRESH_OFF, 0);
++ if (vout->rotate < IPU_ROTATE_90_RIGHT) {
++ dev_dbg(dev, "Using PP direct to ADC channel\n");
++ use_direct_adc = true;
++ vout->display_ch = MEM_PP_ADC;
++ vout->post_proc_ch = MEM_PP_ADC;
++
++ memset(&params, 0, sizeof(params));
++ params.mem_pp_adc.in_width = vout->v2f.fmt.pix.width;
++ params.mem_pp_adc.in_height = vout->v2f.fmt.pix.height;
++ params.mem_pp_adc.in_pixel_fmt =
++ vout->v2f.fmt.pix.pixelformat;
++ params.mem_pp_adc.out_width = out_width;
++ params.mem_pp_adc.out_height = out_height;
++ params.mem_pp_adc.out_pixel_fmt = SDC_FG_FB_FORMAT;
++#ifdef CONFIG_FB_MXC_EPSON_PANEL
++ params.mem_pp_adc.out_left =
++ 2 + vout->crop_current.left;
++#else
++ params.mem_pp_adc.out_left =
++ 12 + vout->crop_current.left;
++#endif
++ params.mem_pp_adc.out_top = vout->crop_current.top;
++ if (ipu_init_channel(vout->post_proc_ch, &params) != 0) {
++ dev_err(dev, "Error initializing PP chan\n");
++ return -EINVAL;
++ }
++
++ if (ipu_init_channel_buffer(vout->post_proc_ch,
++ IPU_INPUT_BUFFER,
++ params.mem_pp_adc.
++ in_pixel_fmt,
++ params.mem_pp_adc.in_width,
++ params.mem_pp_adc.in_height,
++ vout->v2f.fmt.pix.
++ bytesperline /
++ bytes_per_pixel(params.
++ mem_pp_adc.
++ in_pixel_fmt),
++ vout->rotate,
++ vout->
++ v4l2_bufs[pp_in_buf[0]].m.
++ offset,
++ vout->
++ v4l2_bufs[pp_in_buf[1]].m.
++ offset,
++ vout->offset.u_offset,
++ vout->offset.v_offset) !=
++ 0) {
++ dev_err(dev, "Error initializing PP in buf\n");
++ return -EINVAL;
++ }
++
++ if (ipu_init_channel_buffer(vout->post_proc_ch,
++ IPU_OUTPUT_BUFFER,
++ params.mem_pp_adc.
++ out_pixel_fmt, out_width,
++ out_height, out_width,
++ vout->rotate, 0, 0, 0,
++ 0) != 0) {
++ dev_err(dev,
++ "Error initializing PP output buffer\n");
++ return -EINVAL;
++ }
++
++ } else {
++ dev_dbg(dev, "Using ADC SYS2 channel\n");
++ vout->display_ch = ADC_SYS2;
++ vout->post_proc_ch = MEM_PP_MEM;
++
++ if (vout->display_bufs[0]) {
++ mxc_free_buffers(vout->display_bufs,
++ vout->display_bufs_vaddr,
++ 2, vout->display_buf_size);
++ }
++
++ vout->display_buf_size = vout->crop_current.width *
++ vout->crop_current.height *
++ fmt_to_bpp(SDC_FG_FB_FORMAT) / 8;
++ mxc_allocate_buffers(vout->display_bufs,
++ vout->display_bufs_vaddr,
++ 2, vout->display_buf_size);
++
++ memset(&params, 0, sizeof(params));
++ params.adc_sys2.disp = vout->cur_disp_output;
++ params.adc_sys2.ch_mode = WriteTemplateNonSeq;
++#ifdef CONFIG_FB_MXC_EPSON_PANEL
++ params.adc_sys2.out_left = 2 + vout->crop_current.left;
++#else
++ params.adc_sys2.out_left = 12 + vout->crop_current.left;
++#endif
++ params.adc_sys2.out_top = vout->crop_current.top;
++ if (ipu_init_channel(ADC_SYS2, &params) < 0)
++ return -EINVAL;
++
++ if (ipu_init_channel_buffer(vout->display_ch,
++ IPU_INPUT_BUFFER,
++ SDC_FG_FB_FORMAT,
++ out_width, out_height,
++ out_width, IPU_ROTATE_NONE,
++ vout->display_bufs[0],
++ vout->display_bufs[1], 0,
++ 0) != 0) {
++ dev_err(dev,
++ "Error initializing SDC FG buffer\n");
++ return -EINVAL;
++ }
++ }
++ } else
++#endif
++ { /* Use SDC */
++ dev_dbg(dev, "Using SDC channel\n");
++
++ fbvar = fbi->var;
++ fbvar.xres = fbvar.xres_virtual = out_width;
++ fbvar.yres = out_height;
++ fbvar.yres_virtual = out_height * 2;
++ fbvar.bits_per_pixel = 16;
++ fb_set_var(fbi, &fbvar);
++
++ fb_pos.x = vout->crop_current.left;
++ fb_pos.y = vout->crop_current.top;
++ if (fbi->fbops->fb_ioctl)
++ fbi->fbops->fb_ioctl(fbi, MXCFB_SET_OVERLAY_POS,
++ (unsigned long)&fb_pos);
++
++ vout->display_bufs[0] = fbi->fix.smem_start;
++ vout->display_bufs[1] = fbi->fix.smem_start +
++ (fbi->fix.line_length * fbi->var.yres);
++ vout->display_buf_size = vout->crop_current.width *
++ vout->crop_current.height *
++ fmt_to_bpp(SDC_FG_FB_FORMAT) / 8;
++
++ if (vout->cur_disp_output == 3)
++ vout->display_ch = MEM_SDC_FG;
++ else
++ vout->display_ch = MEM_SDC_BG;
++
++ vout->post_proc_ch = MEM_PP_MEM;
++ }
++
++ /* Init PP */
++ if (use_direct_adc == false) {
++ if (vout->rotate >= IPU_ROTATE_90_RIGHT) {
++ out_width = vout->crop_current.height;
++ out_height = vout->crop_current.width;
++ }
++ memset(&params, 0, sizeof(params));
++ params.mem_pp_mem.in_width = vout->v2f.fmt.pix.width;
++ params.mem_pp_mem.in_height = vout->v2f.fmt.pix.height;
++ params.mem_pp_mem.in_pixel_fmt = vout->v2f.fmt.pix.pixelformat;
++ params.mem_pp_mem.out_width = out_width;
++ params.mem_pp_mem.out_height = out_height;
++ params.mem_pp_mem.out_pixel_fmt = SDC_FG_FB_FORMAT;
++ if (ipu_init_channel(vout->post_proc_ch, &params) != 0) {
++ dev_err(dev, "Error initializing PP channel\n");
++ return -EINVAL;
++ }
++
++ if (ipu_init_channel_buffer(vout->post_proc_ch,
++ IPU_INPUT_BUFFER,
++ params.mem_pp_mem.in_pixel_fmt,
++ params.mem_pp_mem.in_width,
++ params.mem_pp_mem.in_height,
++ vout->v2f.fmt.pix.bytesperline /
++ bytes_per_pixel(params.mem_pp_mem.
++ in_pixel_fmt),
++ IPU_ROTATE_NONE,
++ vout->v4l2_bufs[pp_in_buf[0]].m.
++ offset,
++ vout->v4l2_bufs[pp_in_buf[1]].m.
++ offset, vout->offset.u_offset,
++ vout->offset.v_offset) != 0) {
++ dev_err(dev, "Error initializing PP input buffer\n");
++ return -EINVAL;
++ }
++
++ if (vout->rotate >= IPU_ROTATE_90_RIGHT) {
++ if (vout->rot_pp_bufs[0]) {
++ mxc_free_buffers(vout->rot_pp_bufs,
++ vout->rot_pp_bufs_vaddr, 2,
++ vout->display_buf_size);
++ }
++ if (mxc_allocate_buffers
++ (vout->rot_pp_bufs, vout->rot_pp_bufs_vaddr, 2,
++ vout->display_buf_size) < 0) {
++ return -ENOBUFS;
++ }
++
++ if (ipu_init_channel_buffer(vout->post_proc_ch,
++ IPU_OUTPUT_BUFFER,
++ params.mem_pp_mem.
++ out_pixel_fmt, out_width,
++ out_height, out_width,
++ IPU_ROTATE_NONE,
++ vout->rot_pp_bufs[0],
++ vout->rot_pp_bufs[1], 0,
++ 0) != 0) {
++ dev_err(dev,
++ "Error initializing PP output buffer\n");
++ return -EINVAL;
++ }
++
++ if (ipu_init_channel(MEM_ROT_PP_MEM, NULL) != 0) {
++ dev_err(dev,
++ "Error initializing PP ROT channel\n");
++ return -EINVAL;
++ }
++
++ if (ipu_init_channel_buffer(MEM_ROT_PP_MEM,
++ IPU_INPUT_BUFFER,
++ params.mem_pp_mem.
++ out_pixel_fmt, out_width,
++ out_height, out_width,
++ vout->rotate,
++ vout->rot_pp_bufs[0],
++ vout->rot_pp_bufs[1], 0,
++ 0) != 0) {
++ dev_err(dev,
++ "Error initializing PP ROT input buffer\n");
++ return -EINVAL;
++ }
++
++ /* swap width and height */
++ out_width = vout->crop_current.width;
++ out_height = vout->crop_current.height;
++
++ if (ipu_init_channel_buffer(MEM_ROT_PP_MEM,
++ IPU_OUTPUT_BUFFER,
++ params.mem_pp_mem.
++ out_pixel_fmt, out_width,
++ out_height, out_width,
++ IPU_ROTATE_NONE,
++ vout->display_bufs[0],
++ vout->display_bufs[1], 0,
++ 0) != 0) {
++ dev_err(dev,
++ "Error initializing PP output buffer\n");
++ return -EINVAL;
++ }
++
++ if (ipu_link_channels(vout->post_proc_ch,
++ MEM_ROT_PP_MEM) < 0) {
++ return -EINVAL;
++ }
++ ipu_select_buffer(MEM_ROT_PP_MEM, IPU_OUTPUT_BUFFER, 0);
++ ipu_select_buffer(MEM_ROT_PP_MEM, IPU_OUTPUT_BUFFER, 1);
++
++ ipu_enable_channel(MEM_ROT_PP_MEM);
++
++ display_input_ch = MEM_ROT_PP_MEM;
++ } else {
++ if (ipu_init_channel_buffer(vout->post_proc_ch,
++ IPU_OUTPUT_BUFFER,
++ params.mem_pp_mem.
++ out_pixel_fmt, out_width,
++ out_height, out_width,
++ vout->rotate,
++ vout->display_bufs[0],
++ vout->display_bufs[1], 0,
++ 0) != 0) {
++ dev_err(dev,
++ "Error initializing PP output buffer\n");
++ return -EINVAL;
++ }
++ }
++ if (ipu_link_channels(display_input_ch, vout->display_ch) < 0) {
++ dev_err(dev, "Error linking ipu channels\n");
++ return -EINVAL;
++ }
++ }
++
++ vout->state = STATE_STREAM_PAUSED;
++
++ ipu_select_buffer(vout->post_proc_ch, IPU_INPUT_BUFFER, 0);
++ ipu_select_buffer(vout->post_proc_ch, IPU_INPUT_BUFFER, 1);
++
++ if (use_direct_adc == false) {
++ ipu_select_buffer(vout->post_proc_ch, IPU_OUTPUT_BUFFER, 0);
++ ipu_select_buffer(vout->post_proc_ch, IPU_OUTPUT_BUFFER, 1);
++
++ ipu_enable_channel(vout->post_proc_ch);
++ if ((vout->display_ch == MEM_SDC_FG) ||
++ (vout->display_ch == MEM_SDC_BG)) {
++ acquire_console_sem();
++ fb_blank(fbi, FB_BLANK_UNBLANK);
++ release_console_sem();
++ } else {
++ ipu_enable_channel(vout->display_ch);
++ }
++ } else {
++ ipu_enable_channel(vout->post_proc_ch);
++ }
++
++ vout->start_jiffies = jiffies;
++ dev_dbg(dev,
++ "streamon: start time = %lu jiffies\n", vout->start_jiffies);
++
++ return 0;
++}
++
++/*!
++ * Shut down the voutera
++ *
++ * @param vout structure vout_data *
++ *
++ * @return status 0 Success
++ */
++static int mxc_v4l2out_streamoff(vout_data * vout)
++{
++ struct fb_info *fbi =
++ registered_fb[vout->output_fb_num[vout->cur_disp_output]];
++ int i, retval = 0;
++ unsigned long lockflag = 0;
++
++ if (!vout)
++ return -EINVAL;
++
++ if (vout->state == STATE_STREAM_OFF) {
++ return 0;
++ }
++
++ spin_lock_irqsave(&g_lock, lockflag);
++
++ del_timer(&vout->output_timer);
++
++ if (vout->state == STATE_STREAM_ON) {
++ vout->state = STATE_STREAM_STOPPING;
++ }
++
++ ipu_disable_irq(IPU_IRQ_PP_IN_EOF);
++
++ spin_unlock_irqrestore(&g_lock, lockflag);
++
++ if (vout->post_proc_ch == MEM_PP_MEM) { /* SDC or ADC with Rotation */
++ if (vout->rotate >= IPU_ROTATE_90_RIGHT) {
++ ipu_unlink_channels(MEM_PP_MEM, MEM_ROT_PP_MEM);
++ ipu_unlink_channels(MEM_ROT_PP_MEM, vout->display_ch);
++ ipu_disable_channel(MEM_ROT_PP_MEM, true);
++ } else {
++ ipu_unlink_channels(MEM_PP_MEM, vout->display_ch);
++ }
++ ipu_disable_channel(MEM_PP_MEM, true);
++ if ((vout->display_ch != MEM_SDC_FG) &&
++ (vout->display_ch != MEM_SDC_BG)) {
++ ipu_disable_channel(vout->display_ch, true);
++ ipu_uninit_channel(vout->display_ch);
++ } else {
++ fbi->var.activate |= FB_ACTIVATE_FORCE;
++ fb_set_var(fbi, &fbi->var);
++ }
++
++ ipu_uninit_channel(MEM_PP_MEM);
++ if (vout->rotate >= IPU_ROTATE_90_RIGHT)
++ ipu_uninit_channel(MEM_ROT_PP_MEM);
++ } else { /* ADC Direct */
++ ipu_disable_channel(MEM_PP_ADC, true);
++ ipu_uninit_channel(MEM_PP_ADC);
++ }
++ vout->ready_q.head = vout->ready_q.tail = 0;
++ vout->done_q.head = vout->done_q.tail = 0;
++ for (i = 0; i < vout->buffer_cnt; i++) {
++ vout->v4l2_bufs[i].flags = 0;
++ vout->v4l2_bufs[i].timestamp.tv_sec = 0;
++ vout->v4l2_bufs[i].timestamp.tv_usec = 0;
++ }
++
++ vout->state = STATE_STREAM_OFF;
++
++ if (vout->display_bufs[0] != 0) {
++ mxc_free_buffers(vout->display_bufs,
++ vout->display_bufs_vaddr, 2,
++ vout->display_buf_size);
++ }
++#ifdef CONFIG_FB_MXC_ASYNC_PANEL
++ if (vout->cur_disp_output < DISP3) {
++ mxcfb_set_refresh_mode(registered_fb
++ [vout->
++ output_fb_num[vout->cur_disp_output]],
++ MXCFB_REFRESH_PARTIAL, 0);
++ }
++#endif
++
++ return retval;
++}
++
++/*
++ * Valid whether the palette is supported
++ *
++ * @param palette V4L2_PIX_FMT_RGB565, V4L2_PIX_FMT_BGR24 or V4L2_PIX_FMT_BGR32
++ *
++ * @return 1 if supported, 0 if failed
++ */
++static inline int valid_mode(u32 palette)
++{
++ return ((palette == V4L2_PIX_FMT_RGB565) ||
++ (palette == V4L2_PIX_FMT_BGR24) ||
++ (palette == V4L2_PIX_FMT_RGB24) ||
++ (palette == V4L2_PIX_FMT_BGR32) ||
++ (palette == V4L2_PIX_FMT_RGB32) ||
++ (palette == V4L2_PIX_FMT_YUV422P) ||
++ (palette == V4L2_PIX_FMT_YUV420));
++}
++
++/*
++ * V4L2 - Handles VIDIOC_G_FMT Ioctl
++ *
++ * @param vout structure vout_data *
++ *
++ * @param v4l2_format structure v4l2_format *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2out_g_fmt(vout_data * vout, struct v4l2_format *f)
++{
++ if (f->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ return -EINVAL;
++ }
++ *f = vout->v2f;
++ return 0;
++}
++
++/*
++ * V4L2 - Handles VIDIOC_S_FMT Ioctl
++ *
++ * @param vout structure vout_data *
++ *
++ * @param v4l2_format structure v4l2_format *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_v4l2out_s_fmt(vout_data * vout, struct v4l2_format *f)
++{
++ int retval = 0;
++ u32 size = 0;
++ u32 bytesperline;
++
++ if (f->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ retval = -EINVAL;
++ goto err0;
++ }
++ if (!valid_mode(f->fmt.pix.pixelformat)) {
++ dev_err(vout->video_dev->dev, "pixel format not supported\n");
++ retval = -EINVAL;
++ goto err0;
++ }
++
++ bytesperline = (f->fmt.pix.width * fmt_to_bpp(f->fmt.pix.pixelformat)) /
++ 8;
++ if (f->fmt.pix.bytesperline < bytesperline) {
++ f->fmt.pix.bytesperline = bytesperline;
++ } else {
++ bytesperline = f->fmt.pix.bytesperline;
++ }
++
++ switch (f->fmt.pix.pixelformat) {
++ case V4L2_PIX_FMT_YUV422P:
++ /* byteperline for YUV planar formats is for
++ Y plane only */
++ size = bytesperline * f->fmt.pix.height * 2;
++ break;
++ case V4L2_PIX_FMT_YUV420:
++ size = (bytesperline * f->fmt.pix.height * 3) / 2;
++ break;
++ default:
++ size = bytesperline * f->fmt.pix.height;
++ break;
++ }
++
++ /* Return the actual size of the image to the app */
++ if (f->fmt.pix.sizeimage < size) {
++ f->fmt.pix.sizeimage = size;
++ } else {
++ size = f->fmt.pix.sizeimage;
++ }
++
++ vout->v2f.fmt.pix = f->fmt.pix;
++ if (vout->v2f.fmt.pix.priv != 0) {
++ if (copy_from_user(&vout->offset,
++ (void *)vout->v2f.fmt.pix.priv,
++ sizeof(vout->offset))) {
++ retval = -EFAULT;
++ goto err0;
++ }
++ }
++
++ retval = 0;
++ err0:
++ return retval;
++}
++
++/*
++ * V4L2 - Handles VIDIOC_G_CTRL Ioctl
++ *
++ * @param vout structure vout_data *
++ *
++ * @param c structure v4l2_control *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_get_v42lout_control(vout_data * vout, struct v4l2_control *c)
++{
++ switch (c->id) {
++ case V4L2_CID_HFLIP:
++ return (vout->rotate & IPU_ROTATE_HORIZ_FLIP) ? 1 : 0;
++ case V4L2_CID_VFLIP:
++ return (vout->rotate & IPU_ROTATE_VERT_FLIP) ? 1 : 0;
++ case (V4L2_CID_PRIVATE_BASE + 1):
++ return vout->rotate;
++ default:
++ return -EINVAL;
++ }
++}
++
++/*
++ * V4L2 - Handles VIDIOC_S_CTRL Ioctl
++ *
++ * @param vout structure vout_data *
++ *
++ * @param c structure v4l2_control *
++ *
++ * @return status 0 success, EINVAL failed
++ */
++static int mxc_set_v42lout_control(vout_data * vout, struct v4l2_control *c)
++{
++ switch (c->id) {
++ case V4L2_CID_HFLIP:
++ vout->rotate |= c->value ? IPU_ROTATE_HORIZ_FLIP :
++ IPU_ROTATE_NONE;
++ break;
++ case V4L2_CID_VFLIP:
++ vout->rotate |= c->value ? IPU_ROTATE_VERT_FLIP :
++ IPU_ROTATE_NONE;
++ break;
++ case V4L2_CID_MXC_ROT:
++ vout->rotate = c->value;
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++/*!
++ * V4L2 interface - open function
++ *
++ * @param inode structure inode *
++ *
++ * @param file structure file *
++ *
++ * @return status 0 success, ENODEV invalid device instance,
++ * ENODEV timeout, ERESTARTSYS interrupted by user
++ */
++static int mxc_v4l2out_open(struct inode *inode, struct file *file)
++{
++ struct video_device *dev = video_devdata(file);
++ vout_data *vout = video_get_drvdata(dev);
++ int err;
++
++ dq_intr_cnt = 0;
++ dq_timeout_cnt = 0;
++ if (!vout) {
++ return -ENODEV;
++ }
++
++ down(&vout->busy_lock);
++
++ err = -EINTR;
++ if (signal_pending(current))
++ goto oops;
++
++ if (vout->open_count++ == 0) {
++ ipu_request_irq(IPU_IRQ_PP_IN_EOF,
++ mxc_v4l2out_pp_in_irq_handler,
++ 0, dev->name, vout);
++
++ init_waitqueue_head(&vout->v4l_bufq);
++
++ init_timer(&vout->output_timer);
++ vout->output_timer.function = mxc_v4l2out_timer_handler;
++ vout->output_timer.data = (unsigned long)vout;
++
++ vout->state = STATE_STREAM_OFF;
++ g_irq_cnt = g_buf_output_cnt = g_buf_q_cnt = g_buf_dq_cnt = 0;
++
++ }
++
++ file->private_data = dev;
++
++ up(&vout->busy_lock);
++
++ return 0;
++
++ oops:
++ up(&vout->busy_lock);
++ return err;
++}
++
++/*!
++ * V4L2 interface - close function
++ *
++ * @param inode struct inode *
++ *
++ * @param file struct file *
++ *
++ * @return 0 success
++ */
++static int mxc_v4l2out_close(struct inode *inode, struct file *file)
++{
++ struct video_device *dev = video_devdata(file);
++ vout_data *vout = video_get_drvdata(dev);
++
++ if (--vout->open_count == 0) {
++ if (vout->state != STATE_STREAM_OFF)
++ mxc_v4l2out_streamoff(vout);
++
++ ipu_free_irq(IPU_IRQ_PP_IN_EOF, vout);
++
++ file->private_data = NULL;
++
++ mxc_free_buffers(vout->queue_buf_paddr, vout->queue_buf_vaddr,
++ vout->buffer_cnt, vout->queue_buf_size);
++ vout->buffer_cnt = 0;
++ mxc_free_buffers(vout->rot_pp_bufs, vout->rot_pp_bufs_vaddr, 2,
++ vout->display_buf_size);
++
++ /* capture off */
++ wake_up_interruptible(&vout->v4l_bufq);
++ }
++
++ return 0;
++}
++
++/*!
++ * V4L2 interface - ioctl function
++ *
++ * @param inode struct inode *
++ *
++ * @param file struct file *
++ *
++ * @param ioctlnr unsigned int
++ *
++ * @param arg void *
++ *
++ * @return 0 success, ENODEV for invalid device instance,
++ * -1 for other errors.
++ */
++static int
++mxc_v4l2out_do_ioctl(struct inode *inode, struct file *file,
++ unsigned int ioctlnr, void *arg)
++{
++ struct video_device *vdev = file->private_data;
++ vout_data *vout = video_get_drvdata(vdev);
++ int retval = 0;
++ int i = 0;
++
++ if (!vout)
++ return -EBADF;
++
++ /* make this _really_ smp-safe */
++ if (down_interruptible(&vout->busy_lock))
++ return -EBUSY;
++
++ switch (ioctlnr) {
++ case VIDIOC_QUERYCAP:
++ {
++ struct v4l2_capability *cap = arg;
++ strcpy(cap->driver, "mxc_v4l2_output");
++ cap->version = 0;
++ cap->capabilities =
++ V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
++ cap->card[0] = '\0';
++ cap->bus_info[0] = '\0';
++ retval = 0;
++ break;
++ }
++ case VIDIOC_G_FMT:
++ {
++ struct v4l2_format *gf = arg;
++ retval = mxc_v4l2out_g_fmt(vout, gf);
++ break;
++ }
++ case VIDIOC_S_FMT:
++ {
++ struct v4l2_format *sf = arg;
++ if (vout->state != STATE_STREAM_OFF) {
++ retval = -EBUSY;
++ break;
++ }
++ retval = mxc_v4l2out_s_fmt(vout, sf);
++ break;
++ }
++ case VIDIOC_REQBUFS:
++ {
++ struct v4l2_requestbuffers *req = arg;
++ if ((req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) ||
++ (req->memory != V4L2_MEMORY_MMAP)) {
++ dev_dbg(vdev->dev,
++ "VIDIOC_REQBUFS: incorrect buffer type\n");
++ retval = -EINVAL;
++ break;
++ }
++
++ if (req->count == 0)
++ mxc_v4l2out_streamoff(vout);
++
++ if (vout->state == STATE_STREAM_OFF) {
++ if (vout->queue_buf_paddr[0] != 0) {
++ mxc_free_buffers(vout->queue_buf_paddr,
++ vout->queue_buf_vaddr,
++ vout->buffer_cnt,
++ vout->queue_buf_size);
++ dev_dbg(vdev->dev,
++ "VIDIOC_REQBUFS: freed buffers\n");
++ }
++ vout->buffer_cnt = 0;
++ } else {
++ dev_dbg(vdev->dev,
++ "VIDIOC_REQBUFS: Buffer is in use\n");
++ retval = -EBUSY;
++ break;
++ }
++
++ if (req->count == 0)
++ break;
++
++ if (req->count < MIN_FRAME_NUM) {
++ req->count = MIN_FRAME_NUM;
++ } else if (req->count > MAX_FRAME_NUM) {
++ req->count = MAX_FRAME_NUM;
++ }
++ vout->buffer_cnt = req->count;
++ vout->queue_buf_size =
++ PAGE_ALIGN(vout->v2f.fmt.pix.sizeimage);
++
++ retval = mxc_allocate_buffers(vout->queue_buf_paddr,
++ vout->queue_buf_vaddr,
++ vout->buffer_cnt,
++ vout->queue_buf_size);
++ if (retval < 0)
++ break;
++
++ /* Init buffer queues */
++ vout->done_q.head = 0;
++ vout->done_q.tail = 0;
++ vout->ready_q.head = 0;
++ vout->ready_q.tail = 0;
++
++ for (i = 0; i < vout->buffer_cnt; i++) {
++ memset(&(vout->v4l2_bufs[i]), 0,
++ sizeof(vout->v4l2_bufs[i]));
++ vout->v4l2_bufs[i].flags = 0;
++ vout->v4l2_bufs[i].memory = V4L2_MEMORY_MMAP;
++ vout->v4l2_bufs[i].index = i;
++ vout->v4l2_bufs[i].type =
++ V4L2_BUF_TYPE_VIDEO_OUTPUT;
++ vout->v4l2_bufs[i].length =
++ PAGE_ALIGN(vout->v2f.fmt.pix.sizeimage);
++ vout->v4l2_bufs[i].m.offset =
++ (unsigned long)vout->queue_buf_paddr[i];
++ vout->v4l2_bufs[i].timestamp.tv_sec = 0;
++ vout->v4l2_bufs[i].timestamp.tv_usec = 0;
++ }
++ break;
++ }
++ case VIDIOC_QUERYBUF:
++ {
++ struct v4l2_buffer *buf = arg;
++ u32 type = buf->type;
++ int index = buf->index;
++
++ if ((type != V4L2_BUF_TYPE_VIDEO_OUTPUT) ||
++ (index >= vout->buffer_cnt)) {
++ dev_dbg(vdev->dev,
++ "VIDIOC_QUERYBUFS: incorrect buffer type\n");
++ retval = -EINVAL;
++ break;
++ }
++ down(&vout->param_lock);
++ memcpy(buf, &(vout->v4l2_bufs[index]), sizeof(*buf));
++ up(&vout->param_lock);
++ break;
++ }
++ case VIDIOC_QBUF:
++ {
++ struct v4l2_buffer *buf = arg;
++ int index = buf->index;
++ unsigned long lock_flags;
++
++ if ((buf->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) ||
++ (index >= vout->buffer_cnt)) {
++ retval = -EINVAL;
++ break;
++ }
++
++ dev_dbg(vdev->dev, "VIDIOC_QBUF: %d\n", buf->index);
++
++ /* mmapped buffers are L1 WB cached,
++ * so we need to clean them */
++ if (buf->flags & V4L2_BUF_FLAG_MAPPED) {
++ flush_cache_all();
++ }
++
++ spin_lock_irqsave(&g_lock, lock_flags);
++
++ memcpy(&(vout->v4l2_bufs[index]), buf, sizeof(*buf));
++ vout->v4l2_bufs[index].flags |= V4L2_BUF_FLAG_QUEUED;
++
++ g_buf_q_cnt++;
++ queue_buf(&vout->ready_q, index);
++ if (vout->state == STATE_STREAM_PAUSED) {
++ unsigned long timeout;
++
++ index = peek_next_buf(&vout->ready_q);
++
++ /* if timestamp is 0, then default to 30fps */
++ if ((vout->v4l2_bufs[index].timestamp.tv_sec ==
++ 0)
++ && (vout->v4l2_bufs[index].timestamp.
++ tv_usec == 0))
++ timeout =
++ vout->start_jiffies +
++ vout->frame_count * HZ / 30;
++ else
++ timeout =
++ get_jiffies(&vout->v4l2_bufs[index].
++ timestamp);
++
++ if (jiffies >= timeout) {
++ dev_dbg(vout->video_dev->dev,
++ "warning: timer timeout already expired.\n");
++ }
++ vout->output_timer.expires = timeout;
++ dev_dbg(vdev->dev,
++ "QBUF: frame #%u timeout @ %lu jiffies, current = %lu\n",
++ vout->frame_count, timeout, jiffies);
++ add_timer(&vout->output_timer);
++ vout->state = STATE_STREAM_ON;
++ }
++
++ spin_unlock_irqrestore(&g_lock, lock_flags);
++ break;
++ }
++ case VIDIOC_DQBUF:
++ {
++ struct v4l2_buffer *buf = arg;
++ int idx;
++
++ if ((queue_size(&vout->done_q) == 0) &&
++ (file->f_flags & O_NONBLOCK)) {
++ retval = -EAGAIN;
++ break;
++ }
++
++ if (!wait_event_interruptible_timeout(vout->v4l_bufq,
++ queue_size(&vout->
++ done_q)
++ != 0, 10 * HZ)) {
++ if(dq_timeout_cnt == 0){
++ dev_dbg(vdev->dev, "VIDIOC_DQBUF: timeout\n");
++ }
++ dq_timeout_cnt++;
++ retval = -ETIME;
++ break;
++ } else if (signal_pending(current)) {
++ if (dq_intr_cnt == 0) {
++ dev_dbg(vdev->dev,
++ "VIDIOC_DQBUF: interrupt received\n");
++ }
++ dq_intr_cnt++;
++ retval = -ERESTARTSYS;
++ break;
++ }
++ idx = dequeue_buf(&vout->done_q);
++ if (idx == -1) { /* No frame free */
++ dev_dbg(vdev->dev,
++ "VIDIOC_DQBUF: no free buffers, returning\n");
++ retval = -EAGAIN;
++ break;
++ }
++ if ((vout->v4l2_bufs[idx].flags & V4L2_BUF_FLAG_DONE) ==
++ 0)
++ dev_dbg(vdev->dev,
++ "VIDIOC_DQBUF: buffer in done q, but not "
++ "flagged as done\n");
++
++ vout->v4l2_bufs[idx].flags = 0;
++ memcpy(buf, &(vout->v4l2_bufs[idx]), sizeof(*buf));
++ dev_dbg(vdev->dev, "VIDIOC_DQBUF: %d\n", buf->index);
++ break;
++ }
++ case VIDIOC_STREAMON:
++ {
++ retval = mxc_v4l2out_streamon(vout);
++ break;
++ }
++ case VIDIOC_STREAMOFF:
++ {
++ retval = mxc_v4l2out_streamoff(vout);
++ break;
++ }
++ case VIDIOC_G_CTRL:
++ {
++ retval = mxc_get_v42lout_control(vout, arg);
++ break;
++ }
++ case VIDIOC_S_CTRL:
++ {
++ retval = mxc_set_v42lout_control(vout, arg);
++ break;
++ }
++ case VIDIOC_CROPCAP:
++ {
++ struct v4l2_cropcap *cap = arg;
++
++ if (cap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ retval = -EINVAL;
++ break;
++ }
++ cap->bounds = vout->crop_bounds[vout->cur_disp_output];
++ cap->defrect = vout->crop_bounds[vout->cur_disp_output];
++ retval = 0;
++ break;
++ }
++ case VIDIOC_G_CROP:
++ {
++ struct v4l2_crop *crop = arg;
++
++ if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ retval = -EINVAL;
++ break;
++ }
++ crop->c = vout->crop_current;
++ break;
++ }
++ case VIDIOC_S_CROP:
++ {
++ struct v4l2_crop *crop = arg;
++ struct v4l2_rect *b =
++ &(vout->crop_bounds[vout->cur_disp_output]);
++
++ if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
++ retval = -EINVAL;
++ break;
++ }
++ if (crop->c.height < 0) {
++ retval = -EINVAL;
++ break;
++ }
++ if (crop->c.width < 0) {
++ retval = -EINVAL;
++ break;
++ }
++
++ /* only full screen supported for SDC BG */
++ if (vout->cur_disp_output == 4) {
++ crop->c = vout->crop_current;
++ break;
++ }
++
++ if (crop->c.top < b->top)
++ crop->c.top = b->top;
++ if (crop->c.top >= b->top + b->height)
++ crop->c.top = b->top + b->height - 1;
++ if (crop->c.height > b->top - crop->c.top + b->height)
++ crop->c.height =
++ b->top - crop->c.top + b->height;
++
++ if (crop->c.left < b->left)
++ crop->c.left = b->left;
++ if (crop->c.left >= b->left + b->width)
++ crop->c.left = b->left + b->width - 1;
++ if (crop->c.width > b->left - crop->c.left + b->width)
++ crop->c.width =
++ b->left - crop->c.left + b->width;
++
++ /* stride line limitation */
++ crop->c.height -= crop->c.height % 8;
++ crop->c.width -= crop->c.width % 8;
++
++ vout->crop_current = crop->c;
++ break;
++ }
++ case VIDIOC_ENUMOUTPUT:
++ {
++ struct v4l2_output *output = arg;
++
++ if ((output->index >= 5) ||
++ (vout->output_enabled[output->index] == false)) {
++ retval = -EINVAL;
++ break;
++ }
++
++ if (output->index < 3) {
++ *output = mxc_outputs[MXC_V4L2_OUT_2_ADC];
++ output->name[4] = '0' + output->index;
++ } else {
++ *output = mxc_outputs[MXC_V4L2_OUT_2_SDC];
++ }
++ break;
++ }
++ case VIDIOC_G_OUTPUT:
++ {
++ int *p_output_num = arg;
++
++ *p_output_num = vout->cur_disp_output;
++ break;
++ }
++ case VIDIOC_S_OUTPUT:
++ {
++ int *p_output_num = arg;
++
++ if ((*p_output_num >= 5) ||
++ (vout->output_enabled[*p_output_num] == false)) {
++ retval = -EINVAL;
++ break;
++ }
++
++ if (vout->state != STATE_STREAM_OFF) {
++ retval = -EBUSY;
++ break;
++ }
++
++ vout->cur_disp_output = *p_output_num;
++ vout->crop_current =
++ vout->crop_bounds[vout->cur_disp_output];
++ break;
++ }
++ case VIDIOC_ENUM_FMT:
++ case VIDIOC_TRY_FMT:
++ case VIDIOC_QUERYCTRL:
++ case VIDIOC_G_PARM:
++ case VIDIOC_ENUMSTD:
++ case VIDIOC_G_STD:
++ case VIDIOC_S_STD:
++ case VIDIOC_G_TUNER:
++ case VIDIOC_S_TUNER:
++ case VIDIOC_G_FREQUENCY:
++ case VIDIOC_S_FREQUENCY:
++ default:
++ retval = -EINVAL;
++ break;
++ }
++
++ up(&vout->busy_lock);
++ return retval;
++}
++
++/*
++ * V4L2 interface - ioctl function
++ *
++ * @return None
++ */
++static int
++mxc_v4l2out_ioctl(struct inode *inode, struct file *file,
++ unsigned int cmd, unsigned long arg)
++{
++ return video_usercopy(inode, file, cmd, arg, mxc_v4l2out_do_ioctl);
++}
++
++/*!
++ * V4L2 interface - mmap function
++ *
++ * @param file structure file *
++ *
++ * @param vma structure vm_area_struct *
++ *
++ * @return status 0 Success, EINTR busy lock error,
++ * ENOBUFS remap_page error
++ */
++static int mxc_v4l2out_mmap(struct file *file, struct vm_area_struct *vma)
++{
++ struct video_device *vdev = video_devdata(file);
++ unsigned long size = vma->vm_end - vma->vm_start;
++ int res = 0;
++ int i;
++ vout_data *vout = video_get_drvdata(vdev);
++
++ dev_dbg(vdev->dev, "pgoff=0x%lx, start=0x%lx, end=0x%lx\n",
++ vma->vm_pgoff, vma->vm_start, vma->vm_end);
++
++ /* make this _really_ smp-safe */
++ if (down_interruptible(&vout->busy_lock))
++ return -EINTR;
++
++ for (i = 0; i < vout->buffer_cnt; i++) {
++ if ((vout->v4l2_bufs[i].m.offset ==
++ (vma->vm_pgoff << PAGE_SHIFT)) &&
++ (vout->v4l2_bufs[i].length >= size)) {
++ vout->v4l2_bufs[i].flags |= V4L2_BUF_FLAG_MAPPED;
++ break;
++ }
++ }
++ if (i == vout->buffer_cnt) {
++ res = -ENOBUFS;
++ goto mxc_mmap_exit;
++ }
++
++ /* make buffers inner write-back, outer write-thru cacheable */
++ vma->vm_page_prot = pgprot_outer_wrthru(vma->vm_page_prot);
++
++ if (remap_pfn_range(vma, vma->vm_start,
++ vma->vm_pgoff, size, vma->vm_page_prot)) {
++ dev_dbg(vdev->dev, "mmap remap_pfn_range failed\n");
++ res = -ENOBUFS;
++ goto mxc_mmap_exit;
++ }
++
++ vma->vm_flags &= ~VM_IO; /* using shared anonymous pages */
++
++ mxc_mmap_exit:
++ up(&vout->busy_lock);
++ return res;
++}
++
++/*!
++ * V4L2 interface - poll function
++ *
++ * @param file structure file *
++ *
++ * @param wait structure poll_table *
++ *
++ * @return status POLLIN | POLLRDNORM
++ */
++static unsigned int mxc_v4l2out_poll(struct file *file, poll_table * wait)
++{
++ struct video_device *dev = video_devdata(file);
++ vout_data *vout = video_get_drvdata(dev);
++
++ wait_queue_head_t *queue = NULL;
++ int res = POLLIN | POLLRDNORM;
++
++ if (down_interruptible(&vout->busy_lock))
++ return -EINTR;
++
++ queue = &vout->v4l_bufq;
++ poll_wait(file, queue, wait);
++
++ up(&vout->busy_lock);
++ return res;
++}
++
++static struct
++file_operations mxc_v4l2out_fops = {
++ .owner = THIS_MODULE,
++ .open = mxc_v4l2out_open,
++ .release = mxc_v4l2out_close,
++ .ioctl = mxc_v4l2out_ioctl,
++ .mmap = mxc_v4l2out_mmap,
++ .poll = mxc_v4l2out_poll,
++};
++
++static struct video_device mxc_v4l2out_template = {
++ .owner = THIS_MODULE,
++ .name = "MXC Video Output",
++ .type = 0,
++ .type2 = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING,
++ .hardware = 0,
++ .fops = &mxc_v4l2out_fops,
++ .release = video_device_release,
++};
++
++/*!
++ * Probe routine for the framebuffer driver. It is called during the
++ * driver binding process. The following functions are performed in
++ * this routine: Framebuffer initialization, Memory allocation and
++ * mapping, Framebuffer registration, IPU initialization.
++ *
++ * @return Appropriate error code to the kernel common code
++ */
++static int mxc_v4l2out_probe(struct platform_device *pdev)
++{
++ int i;
++ vout_data *vout;
++
++ /*
++ * Allocate sufficient memory for the fb structure
++ */
++ g_vout = vout = kmalloc(sizeof(vout_data), GFP_KERNEL);
++
++ if (!vout)
++ return 0;
++
++ memset(vout, 0, sizeof(vout_data));
++
++ vout->video_dev = video_device_alloc();
++ if (vout->video_dev == NULL)
++ return -1;
++ vout->video_dev->dev = &pdev->dev;
++ vout->video_dev->minor = -1;
++
++ *(vout->video_dev) = mxc_v4l2out_template;
++
++ /* register v4l device */
++ if (video_register_device(vout->video_dev,
++ VFL_TYPE_GRABBER, video_nr) == -1) {
++ dev_dbg(&pdev->dev, "video_register_device failed\n");
++ return 0;
++ }
++ dev_info(&pdev->dev, "Registered device video%d\n",
++ vout->video_dev->minor & 0x1f);
++ vout->video_dev->dev = &pdev->dev;
++
++ video_set_drvdata(vout->video_dev, vout);
++
++ init_MUTEX(&vout->param_lock);
++ init_MUTEX(&vout->busy_lock);
++
++ /* setup outputs and cropping */
++ vout->cur_disp_output = -1;
++ for (i = 0; i < num_registered_fb; i++) {
++ char *idstr = registered_fb[i]->fix.id;
++ if (strncmp(idstr, "DISP", 4) == 0) {
++ int disp_num = idstr[4] - '0';
++ if ((disp_num == 3) &&
++ (strncmp(idstr, "DISP3 BG", 8) == 0)) {
++ disp_num = 4;
++ }
++ vout->crop_bounds[disp_num].left = 0;
++ vout->crop_bounds[disp_num].top = 0;
++ vout->crop_bounds[disp_num].width =
++ registered_fb[i]->var.xres;
++ vout->crop_bounds[disp_num].height =
++ registered_fb[i]->var.yres;
++ vout->output_enabled[disp_num] = true;
++ vout->output_fb_num[disp_num] = i;
++ if (vout->cur_disp_output == -1) {
++ vout->cur_disp_output = disp_num;
++ }
++ }
++
++ }
++ vout->crop_current = vout->crop_bounds[vout->cur_disp_output];
++
++ platform_set_drvdata(pdev, vout);
++
++ return 0;
++}
++
++static int mxc_v4l2out_remove(struct platform_device *pdev)
++{
++ vout_data *vout = platform_get_drvdata(pdev);
++
++ if (vout->video_dev) {
++ if (-1 != vout->video_dev->minor)
++ video_unregister_device(vout->video_dev);
++ else
++ video_device_release(vout->video_dev);
++ vout->video_dev = NULL;
++ }
++
++ platform_set_drvdata(pdev, NULL);
++
++ kfree(vout);
++
++ return 0;
++}
++
++/*!
++ * This structure contains pointers to the power management callback functions.
++ */
++static struct platform_driver mxc_v4l2out_driver = {
++ .driver = {
++ .name = "MXC Video Output",
++ },
++ .probe = mxc_v4l2out_probe,
++ .remove = mxc_v4l2out_remove,
++};
++
++static struct platform_device mxc_v4l2out_device = {
++ .name = "MXC Video Output",
++ .id = 0,
++};
++
++/*!
++ * mxc v4l2 init function
++ *
++ */
++static int mxc_v4l2out_init(void)
++{
++ u8 err = 0;
++
++ err = platform_driver_register(&mxc_v4l2out_driver);
++ if (err == 0) {
++ platform_device_register(&mxc_v4l2out_device);
++ }
++ return err;
++}
++
++/*!
++ * mxc v4l2 cleanup function
++ *
++ */
++static void mxc_v4l2out_clean(void)
++{
++ video_unregister_device(g_vout->video_dev);
++
++ platform_driver_unregister(&mxc_v4l2out_driver);
++ platform_device_unregister(&mxc_v4l2out_device);
++ kfree(g_vout);
++ g_vout = NULL;
++}
++
++module_init(mxc_v4l2out_init);
++module_exit(mxc_v4l2out_clean);
++
++module_param(video_nr, int, 0444);
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("V4L2-driver for MXC video output");
++MODULE_LICENSE("GPL");
++MODULE_SUPPORTED_DEVICE("video");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/media/video/mxc/output/mxc_v4l2_output.h linux-2.6.28-karo/drivers/media/video/mxc/output/mxc_v4l2_output.h
+--- linux-2.6.28/drivers/media/video/mxc/output/mxc_v4l2_output.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/media/video/mxc/output/mxc_v4l2_output.h 2009-03-11 13:47:25.000000000 +0100
+@@ -0,0 +1,169 @@
++/*
++ * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @defgroup MXC_V4L2_OUTPUT MXC V4L2 Video Output Driver
++ */
++/*!
++ * @file mxc_v4l2_output.h
++ *
++ * @brief MXC V4L2 Video Output Driver Header file
++ *
++ * Video4Linux2 Output Device using MXC IPU Post-processing functionality.
++ *
++ * @ingroup MXC_V4L2_OUTPUT
++ */
++#ifndef __MXC_V4L2_OUTPUT_H__
++#define __MXC_V4L2_OUTPUT_H__
++
++#include <linux/list.h>
++#include <linux/spinlock.h>
++#include <media/v4l2-dev.h>
++
++#ifdef __KERNEL__
++
++#include <mach/ipu.h>
++#include <mach/mxc_v4l2.h>
++
++#define MIN_FRAME_NUM 2
++#define MAX_FRAME_NUM 30
++
++#define MXC_V4L2_OUT_NUM_OUTPUTS 5
++#define MXC_V4L2_OUT_2_SDC 0
++#define MXC_V4L2_OUT_2_ADC 1
++
++struct dma_buf_desc {
++ dma_addr_t dma_addr;
++ void *cpu_addr;
++ size_t size;
++};
++
++typedef enum {
++ BUF_IDLE,
++ BUF_DONE,
++ BUF_CANCELED,
++ BUF_ERROR,
++ BUF_BUSY,
++} v4l_buf_state_t;
++
++typedef struct v4l_queue {
++ struct v4l2_buffer buf;
++ struct list_head head;
++ v4l_buf_state_t state;
++ struct dma_buf_desc dma_desc;
++} v4l_queue_t;
++
++/*!
++ * States for the video stream
++ */
++typedef enum {
++ STATE_STREAM_OFF,
++ STATE_STREAM_ON,
++ STATE_STREAM_PAUSED,
++ STATE_STREAM_STOPPING,
++} v4lout_state;
++
++/*!
++ * States for tearing protection
++ */
++typedef enum {
++ TEARING_PROTECTION_INACTIVE,
++ TEARING_PROTECTION_ACTIVE,
++ TEARING_PROTECTION_UNSUPPORTED
++} v4l_tear_protect;
++
++/*!
++ * common v4l2 driver structure.
++ */
++typedef struct _vout_data {
++ struct video_device *video_dev;
++ /*!
++ * semaphore guard against SMP multithreading
++ */
++#if 1
++ struct semaphore user_lock;
++#else
++ struct mutex user_lock;
++#endif
++ spinlock_t irq_lock;
++
++ struct notifier_block fb_event_notifier;
++
++ /*!
++ * number of process that have device open
++ */
++ int open_count;
++
++ v4l_tear_protect tear_protection;
++
++ /*!
++ * params lock for this camera
++ */
++ struct semaphore param_lock;
++
++ struct timer_list output_timer;
++ unsigned long start_jiffies;
++ u32 frame_count;
++ struct list_head ready_q;
++ struct list_head done_q;
++ struct list_head free_q;
++ struct v4l_queue *active;
++
++ s8 next_rdy_ipu_buf;
++ s8 next_done_ipu_buf;
++ s8 ipu_buf[2];
++ v4lout_state state;
++ int busy;
++
++ int cur_disp_output;
++ int output_fb_num[MXC_V4L2_OUT_NUM_OUTPUTS];
++ int output_enabled[MXC_V4L2_OUT_NUM_OUTPUTS];
++ struct v4l2_framebuffer v4l2_fb;
++#ifdef CONFIG_VIDEO_MXC_IPU_OUTPUT
++ ipu_channel_t display_ch;
++ ipu_channel_t post_proc_ch;
++#endif
++ int buffer_cnt;
++ struct list_head display_q;
++ u32 display_buf_size;
++ dma_addr_t display_bufs[2];
++
++ /*!
++ * Poll wait queue
++ */
++ wait_queue_head_t v4l_bufq;
++
++ /*!
++ * v4l2 format
++ */
++ struct v4l2_format v2f;
++ struct v4l2_mxc_offset offset;
++ struct v4l2_rect crop_rect;
++ enum ipu_rotate_mode rotate;
++
++ /* crop */
++ struct v4l2_rect crop_bounds[MXC_V4L2_OUT_NUM_OUTPUTS];
++ struct v4l2_rect crop_current;
++#ifdef CONFIG_VIDEO_MXC_OUTPUT_FBSYNC
++ int output_fb;
++ int fb_enabled;
++ int pp_ready;
++#endif
++#if 1
++ int queued;
++ struct timeval frame_start;
++#endif
++} vout_data;
++
++#endif
++#endif /* __MXC_V4L2_OUTPUT_H__ */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mmc/host/Kconfig linux-2.6.28-karo/drivers/mmc/host/Kconfig
+--- linux-2.6.28/drivers/mmc/host/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mmc/host/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -135,6 +135,16 @@ config MMC_IMX
+
+ If unsure, say N.
+
++config MMC_MXC
++ tristate "Freescale i.MX2/3 Multimedia Card Interface support"
++ depends on ARCH_MXC
++ help
++ This selects the Freescale i.MX2/3 Multimedia card Interface.
++ If you have a i.MX platform with a Multimedia Card slot,
++ say Y or M here.
++
++ If unsure, say N.
++
+ config MMC_TIFM_SD
+ tristate "TI Flash Media MMC/SD Interface support (EXPERIMENTAL)"
+ depends on EXPERIMENTAL && PCI
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mmc/host/Makefile linux-2.6.28-karo/drivers/mmc/host/Makefile
+--- linux-2.6.28/drivers/mmc/host/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mmc/host/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -9,6 +9,7 @@ endif
+ obj-$(CONFIG_MMC_ARMMMCI) += mmci.o
+ obj-$(CONFIG_MMC_PXA) += pxamci.o
+ obj-$(CONFIG_MMC_IMX) += imxmmc.o
++obj-$(CONFIG_MMC_MXC) += mxcmmc.o
+ obj-$(CONFIG_MMC_SDHCI) += sdhci.o
+ obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o
+ obj-$(CONFIG_MMC_RICOH_MMC) += ricoh_mmc.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mmc/host/mxcmmc.c linux-2.6.28-karo/drivers/mmc/host/mxcmmc.c
+--- linux-2.6.28/drivers/mmc/host/mxcmmc.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/mmc/host/mxcmmc.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,893 @@
++/*
++ * linux/drivers/mmc/host/mxcmmc.c - Freescale i.MX MMCI driver
++ *
++ * This is a driver for the SDHC controller found in Freescale MX2/MX3
++ * SoCs. It is basically the same hardware as found on MX1 (imxmmc.c).
++ * Unlike the hardware found on MX1, this hardware just works and does
++ * not need all the quirks found in imxmmc.c, hence the seperate driver.
++ *
++ * Copyright (C) 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>
++ * Copyright (C) 2006 Pavel Pisa, PiKRON <ppisa@pikron.com>
++ *
++ * derived from pxamci.c by Russell King
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/platform_device.h>
++#include <linux/interrupt.h>
++#include <linux/irq.h>
++#include <linux/blkdev.h>
++#include <linux/dma-mapping.h>
++#include <linux/mmc/host.h>
++#include <linux/mmc/card.h>
++#include <linux/delay.h>
++#include <linux/clk.h>
++#include <linux/io.h>
++#include <linux/gpio.h>
++
++#include <asm/dma.h>
++#include <asm/irq.h>
++#include <asm/sizes.h>
++#include <mach/mmc.h>
++
++#ifdef CONFIG_ARCH_MX2
++#include <mach/dma-mx1-mx2.h>
++#define HAS_DMA
++#endif
++
++#define DRIVER_NAME "imx-mmc"
++
++#define MMC_REG_STR_STP_CLK 0x00
++#define MMC_REG_STATUS 0x04
++#define MMC_REG_CLK_RATE 0x08
++#define MMC_REG_CMD_DAT_CONT 0x0C
++#define MMC_REG_RES_TO 0x10
++#define MMC_REG_READ_TO 0x14
++#define MMC_REG_BLK_LEN 0x18
++#define MMC_REG_NOB 0x1C
++#define MMC_REG_REV_NO 0x20
++#define MMC_REG_INT_CNTR 0x24
++#define MMC_REG_CMD 0x28
++#define MMC_REG_ARG 0x2C
++#define MMC_REG_RES_FIFO 0x34
++#define MMC_REG_BUFFER_ACCESS 0x38
++
++#define STR_STP_CLK_RESET (1 << 3)
++#define STR_STP_CLK_START_CLK (1 << 1)
++#define STR_STP_CLK_STOP_CLK (1 << 0)
++
++#define STATUS_CARD_INSERTION (1 << 31)
++#define STATUS_CARD_REMOVAL (1 << 30)
++#define STATUS_YBUF_EMPTY (1 << 29)
++#define STATUS_XBUF_EMPTY (1 << 28)
++#define STATUS_YBUF_FULL (1 << 27)
++#define STATUS_XBUF_FULL (1 << 26)
++#define STATUS_BUF_UND_RUN (1 << 25)
++#define STATUS_BUF_OVFL (1 << 24)
++#define STATUS_SDIO_INT_ACTIVE (1 << 14)
++#define STATUS_END_CMD_RESP (1 << 13)
++#define STATUS_WRITE_OP_DONE (1 << 12)
++#define STATUS_DATA_TRANS_DONE (1 << 11)
++#define STATUS_READ_OP_DONE (1 << 11)
++#define STATUS_WR_CRC_ERROR_CODE_MASK (3 << 10)
++#define STATUS_CARD_BUS_CLK_RUN (1 << 8)
++#define STATUS_BUF_READ_RDY (1 << 7)
++#define STATUS_BUF_WRITE_RDY (1 << 6)
++#define STATUS_RESP_CRC_ERR (1 << 5)
++#define STATUS_CRC_READ_ERR (1 << 3)
++#define STATUS_CRC_WRITE_ERR (1 << 2)
++#define STATUS_TIME_OUT_RESP (1 << 1)
++#define STATUS_TIME_OUT_READ (1 << 0)
++#define STATUS_ERR_MASK 0x2f
++
++#define CMD_DAT_CONT_CMD_RESP_LONG_OFF (1 << 12)
++#define CMD_DAT_CONT_STOP_READWAIT (1 << 11)
++#define CMD_DAT_CONT_START_READWAIT (1 << 10)
++#define CMD_DAT_CONT_BUS_WIDTH_4 (2 << 8)
++#define CMD_DAT_CONT_INIT (1 << 7)
++#define CMD_DAT_CONT_WRITE (1 << 4)
++#define CMD_DAT_CONT_DATA_ENABLE (1 << 3)
++#define CMD_DAT_CONT_RESPONSE_48BIT_CRC (1 << 0)
++#define CMD_DAT_CONT_RESPONSE_136BIT (2 << 0)
++#define CMD_DAT_CONT_RESPONSE_48BIT (3 << 0)
++
++#define INT_SDIO_INT_WKP_EN (1 << 18)
++#define INT_CARD_INSERTION_WKP_EN (1 << 17)
++#define INT_CARD_REMOVAL_WKP_EN (1 << 16)
++#define INT_CARD_INSERTION_EN (1 << 15)
++#define INT_CARD_REMOVAL_EN (1 << 14)
++#define INT_SDIO_IRQ_EN (1 << 13)
++#define INT_DAT0_EN (1 << 12)
++#define INT_BUF_READ_EN (1 << 4)
++#define INT_BUF_WRITE_EN (1 << 3)
++#define INT_END_CMD_RES_EN (1 << 2)
++#define INT_WRITE_OP_DONE_EN (1 << 1)
++#define INT_READ_OP_EN (1 << 0)
++
++struct mxcmci_host {
++ struct mmc_host *mmc;
++ struct resource *res;
++ void __iomem *base;
++ int irq;
++ int detect_irq;
++ int dma;
++ int do_dma;
++ unsigned int power_mode;
++ struct imxmmc_platform_data *pdata;
++
++ struct mmc_request *req;
++ struct mmc_command *cmd;
++ struct mmc_data *data;
++
++ unsigned int dma_nents;
++ unsigned int datasize;
++ unsigned int dma_dir;
++
++ u16 rev_no;
++ unsigned int cmdat;
++
++ struct clk *clk;
++
++ int clock;
++
++ struct work_struct datawork;
++};
++
++#ifdef HAS_DMA
++static inline int mxcmci_use_dma(struct mxcmci_host *host)
++{
++ return host->do_dma;
++}
++#else
++static inline int mxcmci_use_dma(struct mxcmci_host *host)
++{
++ return 0;
++}
++#endif
++
++static void mxcmci_softreset(struct mxcmci_host *host)
++{
++ int i;
++
++ /* reset sequence */
++ writew(STR_STP_CLK_RESET, host->base + MMC_REG_STR_STP_CLK);
++ writew(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK,
++ host->base + MMC_REG_STR_STP_CLK);
++
++ for (i = 0; i < 8; i++)
++ writew(STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK);
++
++ writew(0xff, host->base + MMC_REG_RES_TO);
++}
++
++static void mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data)
++{
++ unsigned int nob = data->blocks;
++ unsigned int blksz = data->blksz;
++ unsigned int datasize = nob * blksz;
++ struct scatterlist *sg;
++ int i;
++
++ if (data->flags & MMC_DATA_STREAM)
++ nob = 0xffff;
++
++ host->data = data;
++ data->bytes_xfered = 0;
++
++ writew(nob, host->base + MMC_REG_NOB);
++ writew(blksz, host->base + MMC_REG_BLK_LEN);
++ host->datasize = datasize;
++
++#ifdef HAS_DMA
++ for_each_sg(data->sg, sg, data->sg_len, i) {
++ if (sg->offset & 3 || sg->length & 3) {
++ host->do_dma = 0;
++ return;
++ }
++ }
++
++ if (data->flags & MMC_DATA_READ) {
++ host->dma_dir = DMA_FROM_DEVICE;
++ host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg,
++ data->sg_len, host->dma_dir);
++
++ imx_dma_setup_sg(host->dma, data->sg, host->dma_nents, datasize,
++ host->res->start + MMC_REG_BUFFER_ACCESS,
++ DMA_MODE_READ);
++ } else {
++ host->dma_dir = DMA_TO_DEVICE;
++ host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg,
++ data->sg_len, host->dma_dir);
++
++ imx_dma_setup_sg(host->dma, data->sg, host->dma_nents, datasize,
++ host->res->start + MMC_REG_BUFFER_ACCESS,
++ DMA_MODE_WRITE);
++ }
++
++ wmb();
++
++ imx_dma_enable(host->dma);
++#endif /* HAS_DMA */
++}
++
++static int mxcmci_start_cmd(struct mxcmci_host *host, struct mmc_command *cmd,
++ unsigned int cmdat)
++{
++ WARN_ON(host->cmd != NULL);
++ host->cmd = cmd;
++
++ switch (mmc_resp_type(cmd)) {
++ case MMC_RSP_R1: /* short CRC, OPCODE */
++ case MMC_RSP_R1B:/* short CRC, OPCODE, BUSY */
++ cmdat |= CMD_DAT_CONT_RESPONSE_48BIT_CRC;
++ break;
++ case MMC_RSP_R2: /* long 136 bit + CRC */
++ cmdat |= CMD_DAT_CONT_RESPONSE_136BIT;
++ break;
++ case MMC_RSP_R3: /* short */
++ cmdat |= CMD_DAT_CONT_RESPONSE_48BIT;
++ break;
++ case MMC_RSP_NONE:
++ break;
++ default:
++ dev_err(mmc_dev(host->mmc), "unhandled response type 0x%x\n",
++ mmc_resp_type(cmd));
++ cmd->error = -EINVAL;
++ return -EINVAL;
++ }
++
++ if (mxcmci_use_dma(host))
++ writel(INT_READ_OP_EN | INT_WRITE_OP_DONE_EN |
++ INT_END_CMD_RES_EN,
++ host->base + MMC_REG_INT_CNTR);
++ else
++ writel(INT_END_CMD_RES_EN, host->base + MMC_REG_INT_CNTR);
++
++ writew(cmd->opcode, host->base + MMC_REG_CMD);
++ writel(cmd->arg, host->base + MMC_REG_ARG);
++ writew(cmdat, host->base + MMC_REG_CMD_DAT_CONT);
++
++ return 0;
++}
++
++static void mxcmci_finish_request(struct mxcmci_host *host,
++ struct mmc_request *req)
++{
++ writel(0, host->base + MMC_REG_INT_CNTR);
++
++ host->req = NULL;
++ host->cmd = NULL;
++ host->data = NULL;
++
++ mmc_request_done(host->mmc, req);
++}
++
++static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat)
++{
++ struct mmc_data *data = host->data;
++ int data_error;
++
++#ifdef HAS_DMA
++ if (mxcmci_use_dma(host)) {
++ imx_dma_disable(host->dma);
++ dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_nents,
++ host->dma_dir);
++ }
++#endif
++
++ if (stat & STATUS_ERR_MASK) {
++ dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n",
++ stat);
++ if (stat & STATUS_CRC_READ_ERR) {
++ data->error = -EILSEQ;
++ } else if (stat & STATUS_CRC_WRITE_ERR) {
++ u32 err_code = (stat >> 9) & 0x3;
++ if (err_code == 2) /* No CRC response */
++ data->error = -ETIMEDOUT;
++ else
++ data->error = -EILSEQ;
++ } else if (stat & STATUS_TIME_OUT_READ) {
++ data->error = -ETIMEDOUT;
++ } else {
++ data->error = -EIO;
++ }
++ } else {
++ data->bytes_xfered = host->datasize;
++ }
++
++ data_error = data->error;
++
++ host->data = NULL;
++
++ return data_error;
++}
++
++static void imxmmc_read_response(struct mxcmci_host *host, unsigned int stat)
++{
++ struct mmc_command *cmd = host->cmd;
++ int i;
++ u32 a, b, c;
++
++ if (!cmd)
++ return;
++
++ if (stat & STATUS_TIME_OUT_RESP) {
++ dev_dbg(mmc_dev(host->mmc), "CMD TIMEOUT\n");
++ cmd->error = -ETIMEDOUT;
++ } else if (stat & STATUS_RESP_CRC_ERR && cmd->flags & MMC_RSP_CRC) {
++ dev_dbg(mmc_dev(host->mmc), "cmd crc error\n");
++ cmd->error = -EILSEQ;
++ }
++
++ if (cmd->flags & MMC_RSP_PRESENT) {
++ if (cmd->flags & MMC_RSP_136) {
++ for (i = 0; i < 4; i++) {
++ a = readw(host->base + MMC_REG_RES_FIFO);
++ b = readw(host->base + MMC_REG_RES_FIFO);
++ cmd->resp[i] = a << 16 | b;
++ }
++ } else {
++ a = readw(host->base + MMC_REG_RES_FIFO);
++ b = readw(host->base + MMC_REG_RES_FIFO);
++ c = readw(host->base + MMC_REG_RES_FIFO);
++ cmd->resp[0] = a << 24 | b << 8 | c >> 8;
++ }
++ }
++}
++
++static int mxcmci_poll_status(struct mxcmci_host *host, u32 mask)
++{
++ u32 stat;
++
++ do {
++ stat = readl(host->base + MMC_REG_STATUS);
++ if (stat & STATUS_ERR_MASK)
++ return stat;
++ } while (!(stat & mask));
++
++ return 0;
++}
++
++static int mxcmci_pull(struct mxcmci_host *host, void *_buf, int bytes)
++{
++ unsigned int stat;
++ u32 *buf = _buf;
++
++ while (bytes > 3) {
++ stat = mxcmci_poll_status(host, STATUS_BUF_READ_RDY | STATUS_READ_OP_DONE);
++ if (stat)
++ return stat;
++ *buf++ = readl(host->base + MMC_REG_BUFFER_ACCESS);
++ bytes -= 4;
++ }
++
++ if (bytes) {
++ u8 *b = (u8 *)buf;
++ u32 tmp;
++
++ stat = mxcmci_poll_status(host, STATUS_BUF_READ_RDY | STATUS_READ_OP_DONE);
++ if (stat)
++ return stat;
++ tmp = readl(host->base + MMC_REG_BUFFER_ACCESS);
++ memcpy(b, &tmp, bytes);
++ }
++
++ return 0;
++}
++
++static int mxcmci_push(struct mxcmci_host *host, void *_buf, int bytes)
++{
++ unsigned int stat;
++ u32 *buf = _buf;
++
++ while (bytes > 3) {
++ stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY);
++ if (stat)
++ return stat;
++ writel(*buf++, host->base + MMC_REG_BUFFER_ACCESS);
++ bytes -= 4;
++ }
++
++ if (bytes) {
++ u8 *b = (u8 *)buf;
++ u32 tmp;
++
++ stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY);
++ if (stat)
++ return stat;
++
++ memcpy(&tmp, b, bytes);
++ writel(tmp, host->base + MMC_REG_BUFFER_ACCESS);
++ }
++
++ stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY);
++ if (stat)
++ return stat;
++
++ return 0;
++}
++
++static int mxcmci_transfer_data(struct mxcmci_host *host)
++{
++ struct mmc_data *data = host->req->data;
++ struct scatterlist *sg;
++ unsigned int nob = data->blocks;
++ int stat, i;
++
++ host->datasize = 0;
++
++ if (data->flags & MMC_DATA_STREAM)
++ nob = 0xffff;
++
++ host->data = data;
++ host->datasize = 0;
++
++ if (data->flags & MMC_DATA_READ) {
++ for_each_sg(data->sg, sg, data->sg_len, i) {
++ stat = mxcmci_pull(host, sg_virt(sg), sg->length);
++ if (stat)
++ return stat;
++ host->datasize += sg->length;
++ }
++ } else {
++ for_each_sg(data->sg, sg, data->sg_len, i) {
++ stat = mxcmci_push(host, sg_virt(sg), sg->length);
++ if (stat)
++ return stat;
++ host->datasize += sg->length;
++ }
++ stat = mxcmci_poll_status(host, STATUS_WRITE_OP_DONE);
++ if (stat)
++ return stat;
++ }
++ return 0;
++}
++
++static void mxcmci_datawork(struct work_struct *work)
++{
++ struct mxcmci_host *host = container_of(work, struct mxcmci_host,
++ datawork);
++ int datastat = mxcmci_transfer_data(host);
++ mxcmci_finish_data(host, datastat);
++
++ if (host->req->stop) {
++ if (mxcmci_start_cmd(host, host->req->stop, 0)) {
++ mxcmci_finish_request(host, host->req);
++ return;
++ }
++ } else {
++ mxcmci_finish_request(host, host->req);
++ }
++}
++
++#ifdef HAS_DMA
++static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat)
++{
++ struct mmc_data *data = host->data;
++ int data_error;
++
++ if (!data)
++ return;
++
++ data_error = mxcmci_finish_data(host, stat);
++
++ imxmmc_read_response(host, stat);
++ host->cmd = NULL;
++
++ if (host->req->stop) {
++ if (mxcmci_start_cmd(host, host->req->stop, 0)) {
++ mxcmci_finish_request(host, host->req);
++ return;
++ }
++ } else {
++ mxcmci_finish_request(host, host->req);
++ }
++}
++#endif /* HAS_DMA */
++
++static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat)
++{
++ imxmmc_read_response(host, stat);
++ host->cmd = NULL;
++
++ if (!host->data && host->req) {
++ mxcmci_finish_request(host, host->req);
++ return;
++ }
++
++ /* For the DMA case the DMA engine handles the data transfer
++ * automatically. For non DMA we have to to it ourselves.
++ * Don't do it in interrupt context though.
++ */
++ if (!mxcmci_use_dma(host) && host->data)
++ schedule_work(&host->datawork);
++
++}
++
++static irqreturn_t mxcmci_irq(int irq, void *devid)
++{
++ struct mxcmci_host *host = devid;
++ u32 stat;
++
++ stat = readl(host->base + MMC_REG_STATUS);
++ writel(stat, host->base + MMC_REG_STATUS);
++
++ dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat);
++
++ if (stat & STATUS_END_CMD_RESP)
++ mxcmci_cmd_done(host, stat);
++#ifdef HAS_DMA
++ if (mxcmci_use_dma(host) &&
++ (stat & (STATUS_DATA_TRANS_DONE | STATUS_WRITE_OP_DONE)))
++ mxcmci_data_done(host, stat);
++#endif
++ return IRQ_HANDLED;
++}
++
++static void mxcmci_request(struct mmc_host *mmc, struct mmc_request *req)
++{
++ struct mxcmci_host *host = mmc_priv(mmc);
++ unsigned int cmdat = host->cmdat;
++
++ WARN_ON(host->req != NULL);
++
++ host->req = req;
++ host->cmdat &= ~CMD_DAT_CONT_INIT;
++#ifdef HAS_DMA
++ host->do_dma = 1;
++#endif
++ if (req->data) {
++ mxcmci_setup_data(host, req->data);
++
++ cmdat |= CMD_DAT_CONT_DATA_ENABLE;
++
++ if (req->data->flags & MMC_DATA_WRITE)
++ cmdat |= CMD_DAT_CONT_WRITE;
++ }
++
++ if (mxcmci_start_cmd(host, req->cmd, cmdat))
++ mxcmci_finish_request(host, req);
++}
++
++static void mxcmci_set_clk_rate(struct mxcmci_host *host, unsigned int clk_ios)
++{
++ unsigned int divider;
++ int prescaler = 0;
++ unsigned int clk_in = clk_get_rate(host->clk);
++
++ while (prescaler <= 0x800) {
++ for (divider = 1; divider <= 0xF; divider++) {
++ int x;
++
++ x = (clk_in / (divider + 1));
++
++ if (prescaler)
++ x /= (prescaler * 2);
++
++ if (x <= clk_ios)
++ break;
++ }
++ if (divider < 0x10)
++ break;
++
++ if (prescaler == 0)
++ prescaler = 1;
++ else
++ prescaler <<= 1;
++ }
++
++ writew((prescaler << 4) | divider, host->base + MMC_REG_CLK_RATE);
++
++ dev_dbg(mmc_dev(host->mmc), "scaler: %d divider: %d in: %d out: %d\n",
++ prescaler, divider, clk_in, clk_ios);
++}
++
++static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
++{
++ struct mxcmci_host *host = mmc_priv(mmc);
++#ifdef HAS_DMA
++ unsigned int blen;
++ /*
++ * use burstlen of 64 in 4 bit mode (--> reg value 0)
++ * use burstlen of 16 in 1 bit mode (--> reg value 16)
++ */
++ if (ios->bus_width == MMC_BUS_WIDTH_4)
++ blen = 0;
++ else
++ blen = 16;
++
++ imx_dma_config_burstlen(host->dma, blen);
++#endif
++ if (ios->bus_width == MMC_BUS_WIDTH_4)
++ host->cmdat |= CMD_DAT_CONT_BUS_WIDTH_4;
++ else
++ host->cmdat &= ~CMD_DAT_CONT_BUS_WIDTH_4;
++
++ if (host->power_mode != ios->power_mode) {
++ if (host->pdata->setpower)
++ host->pdata->setpower(mmc_dev(mmc), ios->vdd);
++ host->power_mode = ios->power_mode;
++ if (ios->power_mode == MMC_POWER_ON)
++ host->cmdat |= CMD_DAT_CONT_INIT;
++ }
++
++ if (ios->clock) {
++ mxcmci_set_clk_rate(host, ios->clock);
++ writew(STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK);
++ } else {
++ writew(STR_STP_CLK_STOP_CLK, host->base + MMC_REG_STR_STP_CLK);
++ }
++
++ host->clock = ios->clock;
++}
++
++static irqreturn_t mxcmci_detect_irq(int irq, void *data)
++{
++ struct mmc_host *mmc = data;
++
++ dev_dbg(mmc_dev(mmc), "%s\n", __func__);
++
++ mmc_detect_change(mmc, msecs_to_jiffies(250));
++ return IRQ_HANDLED;
++}
++
++static int mxcmci_get_ro(struct mmc_host *mmc)
++{
++ struct mxcmci_host *host = mmc_priv(mmc);
++
++ if (host->pdata->get_ro)
++ return !!host->pdata->get_ro(mmc_dev(mmc));
++ /*
++ * Board doesn't support read only detection; let the mmc core
++ * decide what to do.
++ */
++ return -ENOSYS;
++}
++
++
++static const struct mmc_host_ops mxcmci_ops = {
++ .request = mxcmci_request,
++ .set_ios = mxcmci_set_ios,
++ .get_ro = mxcmci_get_ro,
++};
++
++static int mxcmci_probe(struct platform_device *pdev)
++{
++ struct mmc_host *mmc;
++ struct mxcmci_host *host = NULL;
++ struct resource *r;
++ int ret = 0, irq;
++
++ printk(KERN_INFO "i.MX SDHC driver\n");
++
++ r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ irq = platform_get_irq(pdev, 0);
++ if (!r || irq < 0)
++ return -ENODEV;
++
++ mmc = mmc_alloc_host(sizeof(struct mxcmci_host), &pdev->dev);
++ if (!mmc) {
++ return -ENOMEM;
++ }
++
++ r = request_mem_region(r->start, resource_size(r), pdev->name);
++ if (!r) {
++ ret = -EBUSY;
++ goto out_free;
++ }
++
++ mmc->ops = &mxcmci_ops;
++ mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
++ mmc->caps = MMC_CAP_4_BIT_DATA;
++
++ /* MMC core transfer sizes tunable parameters */
++ mmc->max_hw_segs = 64;
++ mmc->max_phys_segs = 64;
++ mmc->max_seg_size = 64 * 512; /* default PAGE_CACHE_SIZE */
++ mmc->max_req_size = 64 * 512; /* default PAGE_CACHE_SIZE */
++ mmc->max_blk_size = 2048;
++ mmc->max_blk_count = 65535;
++
++ host = mmc_priv(mmc);
++ host->base = ioremap(r->start, resource_size(r));
++ if (!host->base) {
++ ret = -ENOMEM;
++ goto out_release_mem;
++ }
++
++ host->mmc = mmc;
++ host->pdata = pdev->dev.platform_data;
++ if (!host->pdata) {
++ ret = -ENODEV;
++ dev_err(&pdev->dev, "No platform data provided!\n");
++ goto out_iounmap;
++ }
++
++ host->res = r;
++ host->irq = irq;
++
++ host->clk = clk_get(&pdev->dev, "sdhc_clk");
++ if (IS_ERR(host->clk)) {
++ ret = PTR_ERR(host->clk);
++ goto out_iounmap;
++ }
++ clk_enable(host->clk);
++
++ mxcmci_softreset(host);
++
++ host->rev_no = readw(host->base + MMC_REG_REV_NO);
++ if (host->rev_no != 0x400) {
++ ret = -ENODEV;
++ dev_err(mmc_dev(host->mmc), "wrong rev.no. 0x%08x. aborting.\n",
++ host->rev_no);
++ goto out_clk_put;
++ }
++
++ mmc->f_min = clk_get_rate(host->clk) >> 7;
++ mmc->f_max = clk_get_rate(host->clk) >> 1;
++
++ /* recommended in data sheet */
++ writew(0x2db4, host->base + MMC_REG_READ_TO);
++
++ writel(0, host->base + MMC_REG_INT_CNTR);
++
++#ifdef HAS_DMA
++ host->dma = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_LOW);
++ if (host->dma < 0) {
++ dev_err(mmc_dev(host->mmc), "imx_dma_request_by_prio failed\n");
++ ret = -EBUSY;
++ goto out_clk_put;
++ }
++
++ r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
++ if (!r) {
++ ret = -ENODEV;
++ goto out_free_dma;
++ }
++
++ ret = imx_dma_config_channel(host->dma,
++ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_FIFO,
++ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR,
++ r->start, 0);
++ if (ret) {
++ dev_err(mmc_dev(host->mmc), "failed to configure DMA channel\n");
++ goto out_free_dma;
++ }
++#endif
++ INIT_WORK(&host->datawork, mxcmci_datawork);
++
++ ret = request_irq(host->irq, mxcmci_irq, 0, DRIVER_NAME, host);
++ if (ret)
++ goto out_free_dma;
++
++ platform_set_drvdata(pdev, mmc);
++ device_set_wakeup_enable(&pdev->dev, 1);
++
++ if (host->pdata->init) {
++ ret = host->pdata->init(&pdev->dev, mxcmci_detect_irq,
++ host->mmc);
++ if (ret)
++ goto out_free_irq;
++ }
++
++ mmc_add_host(mmc);
++
++ return 0;
++
++out_free_irq:
++ free_irq(host->irq, host);
++out_free_dma:
++#ifdef HAS_DMA
++ imx_dma_free(host->dma);
++#endif
++out_clk_put:
++ clk_disable(host->clk);
++ clk_put(host->clk);
++out_iounmap:
++ iounmap(host->base);
++out_release_mem:
++ release_mem_region(host->res->start, resource_size(host->res));
++out_free:
++ mmc_free_host(mmc);
++ return ret;
++}
++
++static int mxcmci_remove(struct platform_device *pdev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++ struct mxcmci_host *host = mmc_priv(mmc);
++
++ platform_set_drvdata(pdev, NULL);
++
++ mmc_remove_host(mmc);
++
++ if (host->pdata->exit)
++ host->pdata->exit(&pdev->dev, mmc);
++
++ free_irq(host->irq, host);
++ iounmap(host->base);
++#ifdef HAS_DMA
++ imx_dma_free(host->dma);
++#endif
++ clk_disable(host->clk);
++ clk_put(host->clk);
++
++ release_resource(host->res);
++
++ mmc_free_host(mmc);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int mxcmci_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++ struct mxcmci_host *host = mmc_priv(mmc);
++ int ret = 0;
++
++ if (host->pdata->suspend)
++ ret = host->pdata->suspend(&pdev->dev, state);
++ if (ret == 0) {
++ ret = mmc_suspend_host(mmc, state);
++ if (ret)
++ if (host->pdata->resume)
++ host->pdata->resume(&pdev->dev);
++ }
++
++ return ret;
++}
++
++static int mxcmci_resume(struct platform_device *pdev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(pdev);
++ struct mxcmci_host *host = mmc_priv(mmc);
++ int ret;
++
++ ret = mmc_resume_host(mmc);
++ if (ret == 0)
++ if (host->pdata->resume)
++ ret = host->pdata->resume(&pdev->dev);
++
++ return ret;
++}
++#else
++#define mxcmci_suspend NULL
++#define mxcmci_resume NULL
++#endif /* CONFIG_PM */
++
++static struct platform_driver mxcmci_driver = {
++ .probe = mxcmci_probe,
++ .remove = mxcmci_remove,
++ .suspend = mxcmci_suspend,
++ .resume = mxcmci_resume,
++ .driver = {
++ .name = DRIVER_NAME,
++ .owner = THIS_MODULE,
++ }
++};
++
++static int __init mxcmci_init(void)
++{
++ return platform_driver_register(&mxcmci_driver);
++}
++
++static void __exit mxcmci_exit(void)
++{
++ platform_driver_unregister(&mxcmci_driver);
++}
++
++module_init(mxcmci_init);
++module_exit(mxcmci_exit);
++
++MODULE_DESCRIPTION("i.MX Multimedia Card Interface Driver");
++MODULE_AUTHOR("Sascha Hauer, Pengutronix");
++MODULE_LICENSE("GPL");
++MODULE_ALIAS("platform:imx-mmc");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mtd/mtdblock.c linux-2.6.28-karo/drivers/mtd/mtdblock.c
+--- linux-2.6.28/drivers/mtd/mtdblock.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mtd/mtdblock.c 2009-03-11 13:16:24.000000000 +0100
+@@ -102,9 +102,9 @@ static int write_cached_data (struct mtd
+ if (mtdblk->cache_state != STATE_DIRTY)
+ return 0;
+
+- DEBUG(MTD_DEBUG_LEVEL2, "mtdblock: writing cached data for \"%s\" "
+- "at 0x%lx, size 0x%x\n", mtd->name,
+- mtdblk->cache_offset, mtdblk->cache_size);
++ MTD_DEBUG(MTD_DEBUG_LEVEL2, "mtdblock: writing cached data for \"%s\" "
++ "at 0x%lx, size 0x%x\n", mtd->name,
++ mtdblk->cache_offset, mtdblk->cache_size);
+
+ ret = erase_write (mtd, mtdblk->cache_offset,
+ mtdblk->cache_size, mtdblk->cache_data);
+@@ -131,8 +131,8 @@ static int do_cached_write (struct mtdbl
+ size_t retlen;
+ int ret;
+
+- DEBUG(MTD_DEBUG_LEVEL2, "mtdblock: write on \"%s\" at 0x%lx, size 0x%x\n",
+- mtd->name, pos, len);
++ MTD_DEBUG(MTD_DEBUG_LEVEL2, "mtdblock: write on \"%s\" at 0x%lx, size 0x%x\n",
++ mtd->name, pos, len);
+
+ if (!sect_size)
+ return mtd->write(mtd, pos, len, &retlen, buf);
+@@ -201,8 +201,8 @@ static int do_cached_read (struct mtdblk
+ size_t retlen;
+ int ret;
+
+- DEBUG(MTD_DEBUG_LEVEL2, "mtdblock: read on \"%s\" at 0x%lx, size 0x%x\n",
+- mtd->name, pos, len);
++ MTD_DEBUG(MTD_DEBUG_LEVEL2, "mtdblock: read on \"%s\" at 0x%lx, size 0x%x\n",
++ mtd->name, pos, len);
+
+ if (!sect_size)
+ return mtd->read(mtd, pos, len, &retlen, buf);
+@@ -268,7 +268,7 @@ static int mtdblock_open(struct mtd_blkt
+ struct mtd_info *mtd = mbd->mtd;
+ int dev = mbd->devnum;
+
+- DEBUG(MTD_DEBUG_LEVEL1,"mtdblock_open\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL1,"mtdblock_open\n");
+
+ if (mtdblks[dev]) {
+ mtdblks[dev]->count++;
+@@ -292,7 +292,7 @@ static int mtdblock_open(struct mtd_blkt
+
+ mtdblks[dev] = mtdblk;
+
+- DEBUG(MTD_DEBUG_LEVEL1, "ok\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL1, "ok\n");
+
+ return 0;
+ }
+@@ -302,7 +302,7 @@ static int mtdblock_release(struct mtd_b
+ int dev = mbd->devnum;
+ struct mtdblk_dev *mtdblk = mtdblks[dev];
+
+- DEBUG(MTD_DEBUG_LEVEL1, "mtdblock_release\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL1, "mtdblock_release\n");
+
+ mutex_lock(&mtdblk->cache_mutex);
+ write_cached_data(mtdblk);
+@@ -316,7 +316,7 @@ static int mtdblock_release(struct mtd_b
+ vfree(mtdblk->cache_data);
+ kfree(mtdblk);
+ }
+- DEBUG(MTD_DEBUG_LEVEL1, "ok\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL1, "ok\n");
+
+ return 0;
+ }
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mtd/mtdchar.c linux-2.6.28-karo/drivers/mtd/mtdchar.c
+--- linux-2.6.28/drivers/mtd/mtdchar.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mtd/mtdchar.c 2009-03-11 13:16:24.000000000 +0100
+@@ -90,7 +90,7 @@ static int mtd_open(struct inode *inode,
+ struct mtd_info *mtd;
+ struct mtd_file_info *mfi;
+
+- DEBUG(MTD_DEBUG_LEVEL0, "MTD_open\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "MTD_open\n");
+
+ if (devnum >= MAX_MTD_DEVICES)
+ return -ENODEV;
+@@ -141,7 +141,7 @@ static int mtd_close(struct inode *inode
+ struct mtd_file_info *mfi = file->private_data;
+ struct mtd_info *mtd = mfi->mtd;
+
+- DEBUG(MTD_DEBUG_LEVEL0, "MTD_close\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "MTD_close\n");
+
+ /* Only sync if opened RW */
+ if ((file->f_mode & FMODE_WRITE) && mtd->sync)
+@@ -169,7 +169,7 @@ static ssize_t mtd_read(struct file *fil
+ int len;
+ char *kbuf;
+
+- DEBUG(MTD_DEBUG_LEVEL0,"MTD_read\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,"MTD_read\n");
+
+ if (*ppos + count > mtd->size)
+ count = mtd->size - *ppos;
+@@ -262,7 +262,7 @@ static ssize_t mtd_write(struct file *fi
+ int ret=0;
+ int len;
+
+- DEBUG(MTD_DEBUG_LEVEL0,"MTD_write\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,"MTD_write\n");
+
+ if (*ppos == mtd->size)
+ return -ENOSPC;
+@@ -388,7 +388,7 @@ static int mtd_ioctl(struct inode *inode
+ u_long size;
+ struct mtd_info_user info;
+
+- DEBUG(MTD_DEBUG_LEVEL0, "MTD_ioctl\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "MTD_ioctl\n");
+
+ size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT;
+ if (cmd & IOC_IN) {
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mtd/mtdcore.c linux-2.6.28-karo/drivers/mtd/mtdcore.c
+--- linux-2.6.28/drivers/mtd/mtdcore.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mtd/mtdcore.c 2009-03-11 13:16:24.000000000 +0100
+@@ -67,7 +67,7 @@ int add_mtd_device(struct mtd_info *mtd)
+ mtd->name);
+ }
+
+- DEBUG(0, "mtd: Giving out device %d to %s\n",i, mtd->name);
++ MTD_DEBUG(0, "mtd: Giving out device %d to %s\n",i, mtd->name);
+ /* No need to get a refcount on the module containing
+ the notifier, since we hold the mtd_table_mutex */
+ list_for_each_entry(not, &mtd_notifiers, list)
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mtd/mtdsuper.c linux-2.6.28-karo/drivers/mtd/mtdsuper.c
+--- linux-2.6.28/drivers/mtd/mtdsuper.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mtd/mtdsuper.c 2009-03-11 13:16:24.000000000 +0100
+@@ -23,13 +23,13 @@ static int get_sb_mtd_compare(struct sup
+ struct mtd_info *mtd = _mtd;
+
+ if (sb->s_mtd == mtd) {
+- DEBUG(2, "MTDSB: Match on device %d (\"%s\")\n",
+- mtd->index, mtd->name);
++ MTD_DEBUG(2, "MTDSB: Match on device %d (\"%s\")\n",
++ mtd->index, mtd->name);
+ return 1;
+ }
+
+- DEBUG(2, "MTDSB: No match, device %d (\"%s\"), device %d (\"%s\")\n",
+- sb->s_mtd->index, sb->s_mtd->name, mtd->index, mtd->name);
++ MTD_DEBUG(2, "MTDSB: No match, device %d (\"%s\"), device %d (\"%s\")\n",
++ sb->s_mtd->index, sb->s_mtd->name, mtd->index, mtd->name);
+ return 0;
+ }
+
+@@ -67,8 +67,8 @@ static int get_sb_mtd_aux(struct file_sy
+ goto already_mounted;
+
+ /* fresh new superblock */
+- DEBUG(1, "MTDSB: New superblock for device %d (\"%s\")\n",
+- mtd->index, mtd->name);
++ MTD_DEBUG(1, "MTDSB: New superblock for device %d (\"%s\")\n",
++ mtd->index, mtd->name);
+
+ sb->s_flags = flags;
+
+@@ -85,8 +85,8 @@ static int get_sb_mtd_aux(struct file_sy
+
+ /* new mountpoint for an already mounted superblock */
+ already_mounted:
+- DEBUG(1, "MTDSB: Device %d (\"%s\") is already mounted\n",
+- mtd->index, mtd->name);
++ MTD_DEBUG(1, "MTDSB: Device %d (\"%s\") is already mounted\n",
++ mtd->index, mtd->name);
+ ret = simple_set_mnt(mnt, sb);
+ goto out_put;
+
+@@ -109,7 +109,7 @@ static int get_sb_mtd_nr(struct file_sys
+
+ mtd = get_mtd_device(NULL, mtdnr);
+ if (IS_ERR(mtd)) {
+- DEBUG(0, "MTDSB: Device #%u doesn't appear to exist\n", mtdnr);
++ MTD_DEBUG(0, "MTDSB: Device #%u doesn't appear to exist\n", mtdnr);
+ return PTR_ERR(mtd);
+ }
+
+@@ -134,7 +134,7 @@ int get_sb_mtd(struct file_system_type *
+ if (!dev_name)
+ return -EINVAL;
+
+- DEBUG(2, "MTDSB: dev_name \"%s\"\n", dev_name);
++ MTD_DEBUG(2, "MTDSB: dev_name \"%s\"\n", dev_name);
+
+ /* the preferred way of mounting in future; especially when
+ * CONFIG_BLOCK=n - we specify the underlying MTD device by number or
+@@ -145,8 +145,8 @@ int get_sb_mtd(struct file_system_type *
+ struct mtd_info *mtd;
+
+ /* mount by MTD device name */
+- DEBUG(1, "MTDSB: mtd:%%s, name \"%s\"\n",
+- dev_name + 4);
++ MTD_DEBUG(1, "MTDSB: mtd:%%s, name \"%s\"\n",
++ dev_name + 4);
+
+ for (mtdnr = 0; mtdnr < MAX_MTD_DEVICES; mtdnr++) {
+ mtd = get_mtd_device(NULL, mtdnr);
+@@ -172,8 +172,8 @@ int get_sb_mtd(struct file_system_type *
+ mtdnr = simple_strtoul(dev_name + 3, &endptr, 0);
+ if (!*endptr) {
+ /* It was a valid number */
+- DEBUG(1, "MTDSB: mtd%%d, mtdnr %d\n",
+- mtdnr);
++ MTD_DEBUG(1, "MTDSB: mtd%%d, mtdnr %d\n",
++ mtdnr);
+ return get_sb_mtd_nr(fs_type, flags,
+ dev_name, data,
+ mtdnr, fill_super, mnt);
+@@ -188,10 +188,10 @@ int get_sb_mtd(struct file_system_type *
+ bdev = lookup_bdev(dev_name);
+ if (IS_ERR(bdev)) {
+ ret = PTR_ERR(bdev);
+- DEBUG(1, "MTDSB: lookup_bdev() returned %d\n", ret);
++ MTD_DEBUG(1, "MTDSB: lookup_bdev() returned %d\n", ret);
+ return ret;
+ }
+- DEBUG(1, "MTDSB: lookup_bdev() returned 0\n");
++ MTD_DEBUG(1, "MTDSB: lookup_bdev() returned 0\n");
+
+ ret = -EINVAL;
+
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mtd/nand/Kconfig linux-2.6.28-karo/drivers/mtd/nand/Kconfig
+--- linux-2.6.28/drivers/mtd/nand/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mtd/nand/Kconfig 2009-03-12 15:04:48.000000000 +0100
+@@ -358,6 +358,10 @@ config MTD_NAND_TMIO
+ Support for NAND flash connected to a Toshiba Mobile IO
+ Controller in some PDAs, including the Sharp SL6000x.
+
++config MTD_NAND_MXC_FLASH_BBT
++ bool "Support a flash based bad block table"
++ depends on MTD_NAND_MXC
++
+ config MTD_NAND_NANDSIM
+ tristate "Support for NAND Flash Simulator"
+ depends on MTD_PARTITIONS
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mtd/nand/mxc_nand.c linux-2.6.28-karo/drivers/mtd/nand/mxc_nand.c
+--- linux-2.6.28/drivers/mtd/nand/mxc_nand.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mtd/nand/mxc_nand.c 2009-03-16 11:04:21.000000000 +0100
+@@ -141,6 +141,31 @@ static struct nand_ecclayout nand_hw_ecc
+ .oobfree = {{0, 6}, {12, 4}, }
+ };
+
++#ifdef CONFIG_MTD_NAND_MXC_FLASH_BBT
++static u8 bbt_pattern[] = {'B', 'b', 't', '0' };
++static u8 mirror_pattern[] = {'1', 't', 'b', 'B' };
++
++static struct nand_bbt_descr bbt_main_descr = {
++ .options = (NAND_BBT_LASTBLOCK | NAND_BBT_WRITE |
++ NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP),
++ .offs = 12,
++ .len = 4,
++ .veroffs = 11,
++ .maxblocks = 4,
++ .pattern = bbt_pattern,
++};
++
++static struct nand_bbt_descr bbt_mirror_descr = {
++ .options = (NAND_BBT_LASTBLOCK | NAND_BBT_WRITE |
++ NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP),
++ .offs = 12,
++ .len = 4,
++ .veroffs = 11,
++ .maxblocks = 4,
++ .pattern = mirror_pattern,
++};
++#endif
++
+ #ifdef CONFIG_MTD_PARTITIONS
+ static const char *part_probes[] = { "RedBoot", "cmdlinepart", NULL };
+ #endif
+@@ -193,8 +218,8 @@ static void wait_op_done(struct mxc_nand
+ udelay(1);
+ }
+ if (max_retries <= 0)
+- DEBUG(MTD_DEBUG_LEVEL0, "%s(%d): INT not set\n",
+- __func__, param);
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "%s(%d): INT not set\n",
++ __func__, param);
+ }
+ }
+
+@@ -202,7 +227,7 @@ static void wait_op_done(struct mxc_nand
+ * waits for completion. */
+ static void send_cmd(struct mxc_nand_host *host, uint16_t cmd, int useirq)
+ {
+- DEBUG(MTD_DEBUG_LEVEL3, "send_cmd(host, 0x%x, %d)\n", cmd, useirq);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3, "send_cmd(host, 0x%x, %d)\n", cmd, useirq);
+
+ writew(cmd, host->regs + NFC_FLASH_CMD);
+ writew(NFC_CMD, host->regs + NFC_CONFIG2);
+@@ -216,7 +241,7 @@ static void send_cmd(struct mxc_nand_hos
+ * a NAND command. */
+ static void send_addr(struct mxc_nand_host *host, uint16_t addr, int islast)
+ {
+- DEBUG(MTD_DEBUG_LEVEL3, "send_addr(host, 0x%x %d)\n", addr, islast);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3, "send_addr(host, 0x%x %d)\n", addr, islast);
+
+ writew(addr, host->regs + NFC_FLASH_ADDR);
+ writew(NFC_ADDR, host->regs + NFC_CONFIG2);
+@@ -230,7 +255,7 @@ static void send_addr(struct mxc_nand_ho
+ static void send_prog_page(struct mxc_nand_host *host, uint8_t buf_id,
+ int spare_only)
+ {
+- DEBUG(MTD_DEBUG_LEVEL3, "send_prog_page (%d)\n", spare_only);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3, "send_prog_page (%d)\n", spare_only);
+
+ /* NANDFC buffer 0 is used for page read/write */
+ writew(buf_id, host->regs + NFC_BUF_ADDR);
+@@ -256,7 +281,7 @@ static void send_prog_page(struct mxc_na
+ static void send_read_page(struct mxc_nand_host *host, uint8_t buf_id,
+ int spare_only)
+ {
+- DEBUG(MTD_DEBUG_LEVEL3, "send_read_page (%d)\n", spare_only);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3, "send_read_page (%d)\n", spare_only);
+
+ /* NANDFC buffer 0 is used for page read/write */
+ writew(buf_id, host->regs + NFC_BUF_ADDR);
+@@ -372,8 +397,8 @@ static int mxc_nand_correct_data(struct
+ uint16_t ecc_status = readw(host->regs + NFC_ECC_STATUS_RESULT);
+
+ if (((ecc_status & 0x3) == 2) || ((ecc_status >> 2) == 2)) {
+- DEBUG(MTD_DEBUG_LEVEL0,
+- "MXC_NAND: HWECC uncorrectable 2-bit ECC error\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "MXC_NAND: HWECC uncorrectable 2-bit ECC error\n");
+ return -1;
+ }
+
+@@ -427,8 +452,8 @@ static uint16_t mxc_nand_read_word(struc
+ uint16_t col, rd_word, ret;
+ uint16_t __iomem *p;
+
+- DEBUG(MTD_DEBUG_LEVEL3,
+- "mxc_nand_read_word(col = %d)\n", host->col_addr);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3,
++ "mxc_nand_read_word(col = %d)\n", host->col_addr);
+
+ col = host->col_addr;
+ /* Adjust saved column address */
+@@ -465,9 +490,9 @@ static void mxc_nand_write_buf(struct mt
+ struct mxc_nand_host *host = nand_chip->priv;
+ int n, col, i = 0;
+
+- DEBUG(MTD_DEBUG_LEVEL3,
+- "mxc_nand_write_buf(col = %d, len = %d)\n", host->col_addr,
+- len);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3,
++ "mxc_nand_write_buf(col = %d, len = %d)\n",
++ host->col_addr, len);
+
+ col = host->col_addr;
+
+@@ -478,8 +503,8 @@ static void mxc_nand_write_buf(struct mt
+ n = mtd->writesize + mtd->oobsize - col;
+ n = min(len, n);
+
+- DEBUG(MTD_DEBUG_LEVEL3,
+- "%s:%d: col = %d, n = %d\n", __func__, __LINE__, col, n);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3,
++ "%s:%d: col = %d, n = %d\n", __func__, __LINE__, col, n);
+
+ while (n) {
+ void __iomem *p;
+@@ -490,8 +515,8 @@ static void mxc_nand_write_buf(struct mt
+ p = host->regs + SPARE_AREA0 -
+ mtd->writesize + (col & ~3);
+
+- DEBUG(MTD_DEBUG_LEVEL3, "%s:%d: p = %p\n", __func__,
+- __LINE__, p);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3, "%s:%d: p = %p\n", __func__,
++ __LINE__, p);
+
+ if (((col | (int)&buf[i]) & 3) || n < 16) {
+ uint32_t data = 0;
+@@ -539,9 +564,9 @@ static void mxc_nand_write_buf(struct mt
+
+ m = min(n, m) & ~3;
+
+- DEBUG(MTD_DEBUG_LEVEL3,
+- "%s:%d: n = %d, m = %d, i = %d, col = %d\n",
+- __func__, __LINE__, n, m, i, col);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3,
++ "%s:%d: n = %d, m = %d, i = %d, col = %d\n",
++ __func__, __LINE__, n, m, i, col);
+
+ memcpy(p, &buf[i], m);
+ col += m;
+@@ -563,8 +588,9 @@ static void mxc_nand_read_buf(struct mtd
+ struct mxc_nand_host *host = nand_chip->priv;
+ int n, col, i = 0;
+
+- DEBUG(MTD_DEBUG_LEVEL3,
+- "mxc_nand_read_buf(col = %d, len = %d)\n", host->col_addr, len);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3,
++ "mxc_nand_read_buf(col = %d, len = %d)\n",
++ host->col_addr, len);
+
+ col = host->col_addr;
+
+@@ -649,8 +675,9 @@ static void mxc_nand_select_chip(struct
+
+ #ifdef CONFIG_MTD_NAND_MXC_FORCE_CE
+ if (chip > 0) {
+- DEBUG(MTD_DEBUG_LEVEL0,
+- "ERROR: Illegal chip select (chip = %d)\n", chip);
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "ERROR: Illegal chip select (chip = %d)\n",
++ chip);
+ return;
+ }
+
+@@ -694,9 +721,9 @@ static void mxc_nand_command(struct mtd_
+ struct mxc_nand_host *host = nand_chip->priv;
+ int useirq = true;
+
+- DEBUG(MTD_DEBUG_LEVEL3,
+- "mxc_nand_command (cmd = 0x%x, col = 0x%x, page = 0x%x)\n",
+- command, column, page_addr);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3,
++ "mxc_nand_command (cmd = 0x%x, col = 0x%x, page = 0x%x)\n",
++ command, column, page_addr);
+
+ /* Reset command state information */
+ host->status_request = false;
+@@ -831,6 +858,7 @@ static void mxc_nand_command(struct mtd_
+ break;
+
+ case NAND_CMD_READID:
++ host->col_addr = 0;
+ send_read_id(host);
+ break;
+
+@@ -879,10 +907,17 @@ static int __init mxcnd_probe(struct pla
+ this->write_buf = mxc_nand_write_buf;
+ this->read_buf = mxc_nand_read_buf;
+ this->verify_buf = mxc_nand_verify_buf;
++#ifdef CONFIG_MTD_NAND_MXC_FLASH_BBT
++ this->bbt_td = &bbt_main_descr;
++ this->bbt_md = &bbt_mirror_descr;
++ this->options |= NAND_USE_FLASH_BBT;
++#endif
+
+ host->clk = clk_get(&pdev->dev, "nfc_clk");
+- if (IS_ERR(host->clk))
++ if (IS_ERR(host->clk)) {
++ err = PTR_ERR(host->clk);
+ goto eclk;
++ }
+
+ clk_enable(host->clk);
+ host->clk_act = 1;
+@@ -895,7 +930,7 @@ static int __init mxcnd_probe(struct pla
+
+ host->regs = ioremap(res->start, res->end - res->start + 1);
+ if (!host->regs) {
+- err = -EIO;
++ err = -ENOMEM;
+ goto eres;
+ }
+
+@@ -952,13 +987,17 @@ static int __init mxcnd_probe(struct pla
+ this->ecc.layout = &nand_hw_eccoob_16;
+ }
+
+- host->pagesize_2k = 0;
+-
+ /* Scan to find existence of the device */
+- if (nand_scan(mtd, 1)) {
+- DEBUG(MTD_DEBUG_LEVEL0,
+- "MXC_ND: Unable to find any NAND device.\n");
+- err = -ENXIO;
++ err = nand_scan_ident(mtd, 1);
++ if (err) {
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "MXC_ND: Unable to find any NAND device.\n");
++ goto escan;
++ }
++ /* this is required before completing the scan */
++ host->pagesize_2k = mtd->writesize == 2048;
++ err = nand_scan_tail(mtd);
++ if (err) {
+ goto escan;
+ }
+
+@@ -1010,43 +1049,51 @@ static int __devexit mxcnd_remove(struct
+ #ifdef CONFIG_PM
+ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
+ {
+- struct mtd_info *info = platform_get_drvdata(pdev);
++ struct mtd_info *mtd = platform_get_drvdata(pdev);
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_nand_host *host = nand_chip->priv;
+ int ret = 0;
+
+- DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
+- if (info)
+- ret = info->suspend(info);
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
++ if (mtd)
++ ret = mtd->suspend(mtd);
+
++ if (host->clk_act) {
+ /* Disable the NFC clock */
+- clk_disable(nfc_clk); /* FIXME */
++ clk_disable(host->clk);
++ }
+
+ return ret;
+ }
+
+ static int mxcnd_resume(struct platform_device *pdev)
+ {
+- struct mtd_info *info = platform_get_drvdata(pdev);
++ struct mtd_info *mtd = platform_get_drvdata(pdev);
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_nand_host *host = nand_chip->priv;
+ int ret = 0;
+
+- DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
+- /* Enable the NFC clock */
+- clk_enable(nfc_clk); /* FIXME */
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
+
+- if (info)
+- info->resume(info);
++ if (host->clk_act) {
++ /* Enable the NFC clock */
++ clk_enable(host->clk);
++ }
++ if (mtd)
++ mtd->resume(mtd);
+
+ return ret;
+ }
+
+ #else
+-# define mxcnd_suspend NULL
+-# define mxcnd_resume NULL
++#define mxcnd_suspend NULL
++#define mxcnd_resume NULL
+ #endif /* CONFIG_PM */
+
+ static struct platform_driver mxcnd_driver = {
+ .driver = {
+ .name = DRIVER_NAME,
+- },
++ },
+ .remove = __exit_p(mxcnd_remove),
+ .suspend = mxcnd_suspend,
+ .resume = mxcnd_resume,
+@@ -1054,13 +1101,15 @@ static struct platform_driver mxcnd_driv
+
+ static int __init mxc_nd_init(void)
+ {
++ int ret;
++
+ /* Register the device driver structure. */
+ pr_info("MXC MTD nand Driver\n");
+- if (platform_driver_probe(&mxcnd_driver, mxcnd_probe) != 0) {
++ ret = platform_driver_probe(&mxcnd_driver, mxcnd_probe);
++ if (ret != 0) {
+ printk(KERN_ERR "Driver register failed for mxcnd_driver\n");
+- return -ENODEV;
+ }
+- return 0;
++ return ret;
+ }
+
+ static void __exit mxc_nd_cleanup(void)
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mtd/nand/nand_base.c linux-2.6.28-karo/drivers/mtd/nand/nand_base.c
+--- linux-2.6.28/drivers/mtd/nand/nand_base.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mtd/nand/nand_base.c 2009-03-11 13:16:24.000000000 +0100
+@@ -1356,8 +1356,8 @@ static int nand_do_read_oob(struct mtd_i
+ int len;
+ uint8_t *buf = ops->oobbuf;
+
+- DEBUG(MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08Lx, len = %i\n",
+- (unsigned long long)from, readlen);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08Lx, len = %i\n",
++ (unsigned long long)from, readlen);
+
+ if (ops->mode == MTD_OOB_AUTO)
+ len = chip->ecc.layout->oobavail;
+@@ -1365,8 +1365,8 @@ static int nand_do_read_oob(struct mtd_i
+ len = mtd->oobsize;
+
+ if (unlikely(ops->ooboffs >= len)) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+- "Attempt to start read outside oob\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "nand_read_oob: Attempt to start read outside oob\n");
+ return -EINVAL;
+ }
+
+@@ -1374,8 +1374,8 @@ static int nand_do_read_oob(struct mtd_i
+ if (unlikely(from >= mtd->size ||
+ ops->ooboffs + readlen > ((mtd->size >> chip->page_shift) -
+ (from >> chip->page_shift)) * len)) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+- "Attempt read beyond end of device\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "nand_read_oob: Attempt read beyond end of device\n");
+ return -EINVAL;
+ }
+
+@@ -1449,8 +1449,8 @@ static int nand_read_oob(struct mtd_info
+
+ /* Do not allow reads past end of device */
+ if (ops->datbuf && (from + ops->len) > mtd->size) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+- "Attempt read beyond end of device\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "nand_read_oob: Attempt read beyond end of device\n");
+ return -EINVAL;
+ }
+
+@@ -1847,8 +1847,8 @@ static int nand_do_write_oob(struct mtd_
+ int chipnr, page, status, len;
+ struct nand_chip *chip = mtd->priv;
+
+- DEBUG(MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n",
+- (unsigned int)to, (int)ops->ooblen);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n",
++ (unsigned int)to, (int)ops->ooblen);
+
+ if (ops->mode == MTD_OOB_AUTO)
+ len = chip->ecc.layout->oobavail;
+@@ -1857,14 +1857,14 @@ static int nand_do_write_oob(struct mtd_
+
+ /* Do not allow write past end of page */
+ if ((ops->ooboffs + ops->ooblen) > len) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: "
+- "Attempt to write past end of page\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "nand_write_oob: Attempt to write past end of page\n");
+ return -EINVAL;
+ }
+
+ if (unlikely(ops->ooboffs >= len)) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+- "Attempt to start write outside oob\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "nand_read_oob: Attempt to start write outside oob\n");
+ return -EINVAL;
+ }
+
+@@ -1873,8 +1873,8 @@ static int nand_do_write_oob(struct mtd_
+ ops->ooboffs + ops->ooblen >
+ ((mtd->size >> chip->page_shift) -
+ (to >> chip->page_shift)) * len)) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+- "Attempt write beyond end of device\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "nand_read_oob: Attempt write beyond end of device\n");
+ return -EINVAL;
+ }
+
+@@ -1929,8 +1929,8 @@ static int nand_write_oob(struct mtd_inf
+
+ /* Do not allow writes past end of device */
+ if (ops->datbuf && (to + ops->len) > mtd->size) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+- "Attempt read beyond end of device\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "nand_read_oob: Attempt read beyond end of device\n");
+ return -EINVAL;
+ }
+
+@@ -2019,26 +2019,24 @@ int nand_erase_nand(struct mtd_info *mtd
+ int rewrite_bbt[NAND_MAX_CHIPS]={0};
+ unsigned int bbt_masked_page = 0xffffffff;
+
+- DEBUG(MTD_DEBUG_LEVEL3, "nand_erase: start = 0x%08x, len = %i\n",
+- (unsigned int)instr->addr, (unsigned int)instr->len);
++ MTD_DEBUG(MTD_DEBUG_LEVEL3, "nand_erase: start = 0x%08x, len = %i\n",
++ (unsigned int)instr->addr, (unsigned int)instr->len);
+
+ /* Start address must align on block boundary */
+ if (instr->addr & ((1 << chip->phys_erase_shift) - 1)) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n");
+ return -EINVAL;
+ }
+
+ /* Length must align on block boundary */
+ if (instr->len & ((1 << chip->phys_erase_shift) - 1)) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: "
+- "Length not block aligned\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: Length not block aligned\n");
+ return -EINVAL;
+ }
+
+ /* Do not allow erase past end of device */
+ if ((instr->len + instr->addr) > mtd->size) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: "
+- "Erase past end of device\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: Erase past end of device\n");
+ return -EINVAL;
+ }
+
+@@ -2059,8 +2057,7 @@ int nand_erase_nand(struct mtd_info *mtd
+
+ /* Check, if it is write protected */
+ if (nand_check_wp(mtd)) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: "
+- "Device is write protected!!!\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: Device is write protected!!!\n");
+ instr->state = MTD_ERASE_FAILED;
+ goto erase_exit;
+ }
+@@ -2113,8 +2110,9 @@ int nand_erase_nand(struct mtd_info *mtd
+
+ /* See if block erase succeeded */
+ if (status & NAND_STATUS_FAIL) {
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: "
+- "Failed erase, page 0x%08x\n", page);
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "nand_erase: Failed erase, page 0x%08x\n",
++ page);
+ instr->state = MTD_ERASE_FAILED;
+ instr->fail_addr = (page << chip->page_shift);
+ goto erase_exit;
+@@ -2172,9 +2170,10 @@ int nand_erase_nand(struct mtd_info *mtd
+ if (!rewrite_bbt[chipnr])
+ continue;
+ /* update the BBT for chip */
+- DEBUG(MTD_DEBUG_LEVEL0, "nand_erase_nand: nand_update_bbt "
+- "(%d:0x%0x 0x%0x)\n", chipnr, rewrite_bbt[chipnr],
+- chip->bbt_td->pages[chipnr]);
++ MTD_DEBUG(MTD_DEBUG_LEVEL0,
++ "nand_erase_nand: nand_update_bbt (%d:0x%0x 0x%0x)\n",
++ chipnr, rewrite_bbt[chipnr],
++ chip->bbt_td->pages[chipnr]);
+ nand_update_bbt(mtd, rewrite_bbt[chipnr]);
+ }
+
+@@ -2192,7 +2191,7 @@ static void nand_sync(struct mtd_info *m
+ {
+ struct nand_chip *chip = mtd->priv;
+
+- DEBUG(MTD_DEBUG_LEVEL3, "nand_sync: called\n");
++ MTD_DEBUG(MTD_DEBUG_LEVEL3, "nand_sync: called\n");
+
+ /* Grab the lock and see if the device is available */
+ nand_get_device(chip, mtd, FL_SYNCING);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mtd/nand/nand_bbt.c linux-2.6.28-karo/drivers/mtd/nand/nand_bbt.c
+--- linux-2.6.28/drivers/mtd/nand/nand_bbt.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mtd/nand/nand_bbt.c 2009-03-11 13:16:24.000000000 +0100
+@@ -1201,8 +1201,9 @@ int nand_isbad_bbt(struct mtd_info *mtd,
+ block = (int)(offs >> (this->bbt_erase_shift - 1));
+ res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03;
+
+- DEBUG(MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n",
+- (unsigned int)offs, block >> 1, res);
++ MTD_DEBUG(MTD_DEBUG_LEVEL2,
++ "nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n",
++ (unsigned int)offs, block >> 1, res);
+
+ switch ((int)res) {
+ case 0x00:
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mtd/nand/nand_ecc.c linux-2.6.28-karo/drivers/mtd/nand/nand_ecc.c
+--- linux-2.6.28/drivers/mtd/nand/nand_ecc.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/mtd/nand/nand_ecc.c 2009-03-11 13:16:24.000000000 +0100
+@@ -492,7 +492,6 @@ int nand_correct_data(struct mtd_info *m
+ if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1)
+ return 1; /* error in ecc data; no action needed */
+
+- printk(KERN_ERR "uncorrectable error : ");
+ return -1;
+ }
+ EXPORT_SYMBOL(nand_correct_data);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mxc/Kconfig linux-2.6.28-karo/drivers/mxc/Kconfig
+--- linux-2.6.28/drivers/mxc/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/mxc/Kconfig 2009-03-11 13:39:19.000000000 +0100
+@@ -0,0 +1,27 @@
++# drivers/video/mxc/Kconfig
++
++#if ARCH_MXC
++
++menuconfig DRIVERS_MXC
++ bool "MXC support drivers"
++ depends on ARCH_MXC
++
++menu "MXC VPU(Video Processing Unit) support"
++
++config MXC_VPU
++ tristate "Support for MXC VPU(Video Processing Unit)"
++ depends on DRIVERS_MXC
++ depends on MACH_MX27
++ help
++ The VPU codec device provides codec function for H.264/MPEG4/H.263
++
++config MXC_VPU_DEBUG
++ bool "MXC VPU debugging"
++ depends on MXC_VPU
++ help
++ This is an option for the developers; most people should
++ say N here. This enables MXC VPU driver debugging.
++
++endmenu
++
++#endif
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mxc/Makefile linux-2.6.28-karo/drivers/mxc/Makefile
+--- linux-2.6.28/drivers/mxc/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/mxc/Makefile 2009-03-11 13:40:14.000000000 +0100
+@@ -0,0 +1,11 @@
++#
++# Makefile for the VPU drivers.
++#
++
++ifeq ($(CONFIG_MXC_VPU_DEBUG),y)
++ EXTRA_CFLAGS += -DDEBUG
++endif
++
++vpu-objs := mxc_vpu.o
++obj-$(CONFIG_MXC_VPU) += vpu.o
++
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mxc/mxc_vpu.c linux-2.6.28-karo/drivers/mxc/mxc_vpu.c
+--- linux-2.6.28/drivers/mxc/mxc_vpu.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/mxc/mxc_vpu.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,540 @@
++/*
++ * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mxc_vpu.c
++ *
++ * @brief VPU system initialization and file operation implementation
++ *
++ * @ingroup VPU
++ */
++
++#include <linux/kernel.h>
++#include <linux/fs.h>
++#include <linux/mm.h>
++#include <linux/interrupt.h>
++#include <linux/autoconf.h>
++#include <linux/ioport.h>
++#include <linux/stat.h>
++#include <linux/platform_device.h>
++#include <linux/kdev_t.h>
++#include <linux/dma-mapping.h>
++#include <linux/wait.h>
++#include <linux/list.h>
++#include <linux/clk.h>
++#include <linux/io.h>
++
++#include <asm/uaccess.h>
++#include <asm/sizes.h>
++#include <asm/dma-mapping.h>
++#include <asm/atomic.h>
++
++#include <mach/hardware.h>
++
++#include "mxc_vpu.h"
++
++
++#define BIT_INT_CLEAR 0x00C
++#define BIT_INT_STATUS 0x010
++#define BIT_INT_ENABLE 0x170
++
++typedef struct vpu_t {
++ struct fasync_struct *async_queue;
++ struct device *dev;
++} vpu_t;
++
++/* To track the allocated memory buffer */
++typedef struct memalloc_record {
++ struct list_head list;
++ vpu_mem_desc mem;
++} memalloc_record;
++
++static DEFINE_MUTEX(vpu_list_lock);
++static DEFINE_MUTEX(vpu_mutex);
++static LIST_HEAD(head);
++
++static int vpu_major = 0;
++static struct class *vpu_class;
++static struct vpu_t vpu_data;
++static int open_count = 0;
++static struct clk *vpu_clk;
++
++/* implement the blocking ioctl */
++static int codec_done = 0;
++static wait_queue_head_t vpu_queue;
++static int wait_intr_cnt = 0;
++
++/*!
++ * Private function to free buffers
++ * @return status 0 success.
++ */
++static int vpu_free_buffers(vpu_t *vpu_data)
++{
++ struct memalloc_record *rec, *n;
++ vpu_mem_desc mem;
++
++ mutex_lock(&vpu_list_lock);
++ list_for_each_entry_safe(rec, n, &head, list) {
++ mem = rec->mem;
++ if (mem.cpu_addr != 0) {
++ dma_free_coherent(vpu_data->dev, PAGE_ALIGN(mem.size),
++ mem.cpu_addr, mem.phy_addr);
++ pr_debug("[FREE] freed paddr=0x%08X\n", mem.phy_addr);
++
++ /* delete from list */
++ list_del(&rec->list);
++ kfree(rec);
++ }
++ }
++ mutex_unlock(&vpu_list_lock);
++
++ return 0;
++}
++
++/*!
++ * @brief vpu interrupt handler
++ */
++static irqreturn_t vpu_irq_handler(int irq, void *dev_id)
++{
++ struct vpu_t *dev = dev_id;
++
++ //(void)__raw_readl(IO_ADDRESS(VPU_BASE_ADDR + BIT_INT_STATUS));
++ __raw_writel(0x1, IO_ADDRESS(VPU_BASE_ADDR + BIT_INT_CLEAR));
++ if (dev->async_queue)
++ kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
++
++ BUG_ON(codec_done < 0);
++ codec_done++;
++ WARN_ON(codec_done > 1);
++ wake_up_interruptible(&vpu_queue);
++
++ return IRQ_HANDLED;
++}
++
++/*!
++ * @brief vpu hardware enable function
++ *
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_hardware_enable(void)
++{
++ u32 tmp;
++
++ clk_enable(vpu_clk);
++
++ /* Let userspace access the codec engine through the
++ * peripheral access register.
++ */
++#if 0
++ tmp = __raw_readl(IO_ADDRESS(AIPI_BASE_ADDR + 0x00020008));
++ __raw_writel(tmp & ~(1 << 3), IO_ADDRESS(AIPI_BASE_ADDR + 0x00020008));
++#endif
++ codec_done = 0;
++
++ return 0;
++}
++
++/*!
++ * @brief vpu hardware disable function
++ *
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_hardware_disable(void)
++{
++ clk_disable(vpu_clk);
++ return 0;
++
++}
++
++/*!
++ * @brief open function for vpu file operation
++ *
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_open(struct inode *inode, struct file *filp)
++{
++ int ret = 0;
++
++ mutex_lock(&vpu_mutex);
++ if (open_count == 0) {
++ open_count++;
++ filp->private_data = &vpu_data;
++ vpu_hardware_enable();
++ } else {
++ printk(KERN_ERR "VPU has already been opened.\n");
++ ret = -EBUSY;
++ }
++ mutex_unlock(&vpu_mutex);
++
++ return ret;
++}
++
++/*!
++ * @brief IO ctrl function for vpu file operation
++ * @param cmd IO ctrl command
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_ioctl(struct inode *inode, struct file *filp, u_int cmd,
++ u_long arg)
++{
++ int ret = 0;
++ vpu_t *vpu_data = filp->private_data;
++
++ switch (cmd) {
++ case VPU_IOC_PHYMEM_ALLOC:
++ {
++ struct memalloc_record *rec;
++
++ rec = kzalloc(sizeof(*rec), GFP_KERNEL);
++ if (!rec)
++ return -ENOMEM;
++
++ ret = copy_from_user(&rec->mem, (const void __user *)arg,
++ sizeof(vpu_mem_desc));
++ if (ret) {
++ kfree(rec);
++ return -EFAULT;
++ }
++
++ pr_debug("[ALLOC] mem alloc size = 0x%x\n",
++ rec->mem.size);
++ rec->mem.cpu_addr = dma_alloc_coherent(vpu_data->dev,
++ PAGE_ALIGN(rec->mem.size),
++ &rec->mem.phy_addr,
++ GFP_DMA | GFP_KERNEL);
++ pr_debug("[ALLOC] mem alloc cpu_addr = 0x%p\n",
++ rec->mem.cpu_addr);
++ if (rec->mem.cpu_addr == NULL) {
++ kfree(rec);
++ printk(KERN_ERR
++ "Physical memory allocation error!\n");
++ ret = -ENOMEM;
++ break;
++ }
++ ret = copy_to_user((void __user *)arg, &rec->mem,
++ sizeof(vpu_mem_desc));
++ if (ret) {
++ kfree(rec);
++ ret = -EFAULT;
++ break;
++ }
++
++ mutex_lock(&vpu_list_lock);
++ list_add(&rec->list, &head);
++ mutex_unlock(&vpu_list_lock);
++
++ break;
++ }
++ case VPU_IOC_PHYMEM_FREE:
++ {
++ struct memalloc_record *rec, *n;
++ vpu_mem_desc vpu_mem;
++ int found = 0;
++
++ ret = copy_from_user(&vpu_mem, (const void __user *)arg,
++ sizeof(vpu_mem_desc));
++ if (ret)
++ return -EFAULT;
++
++ pr_debug("[FREE] mem freed cpu_addr = 0x%p\n",
++ vpu_mem.cpu_addr);
++ mutex_lock(&vpu_list_lock);
++ list_for_each_entry_safe(rec, n, &head, list) {
++ if (rec->mem.cpu_addr == vpu_mem.cpu_addr) {
++ /* delete from list */
++ list_del(&rec->list);
++ kfree(rec);
++ found = 1;
++ break;
++ }
++ }
++
++ if (vpu_mem.cpu_addr != NULL) {
++ dma_free_coherent(vpu_data->dev,
++ PAGE_ALIGN(vpu_mem.size),
++ vpu_mem.cpu_addr,
++ vpu_mem.phy_addr);
++ }
++ BUG_ON(!found);
++ mutex_unlock(&vpu_list_lock);
++
++ break;
++ }
++ case VPU_IOC_WAIT4INT:
++ {
++ unsigned long flags;
++ u_long timeout = arg;
++
++ ret = wait_event_interruptible_timeout(vpu_queue,
++ codec_done,
++ msecs_to_jiffies(timeout));
++ local_irq_save(flags);
++ if (codec_done) {
++ codec_done--;
++ BUG_ON(codec_done < 0);
++ if (codec_done > 0) {
++ printk(KERN_DEBUG "%s: WAIT4INT: codec_done=%d\n",
++ __FUNCTION__, codec_done);
++ }
++ ret = 0;
++ } else if (signal_pending(current)) {
++ if (wait_intr_cnt == 0) {
++ printk(KERN_WARNING "wait for VPU interrupt canceled\n");
++ }
++ wait_intr_cnt++;
++ } else if (ret == 0) {
++ if (timeout != 0) {
++ printk(KERN_WARNING "VPU blocking: timeout.\n");
++ }
++ ret = (filp->f_flags & O_NONBLOCK) ? -EAGAIN : -ETIME;
++ }
++ local_irq_restore(flags);
++ break;
++ }
++/* RMW: this is not portable across platforms */
++#ifdef CONFIG_MACH_MX27
++ /* set/clear LHD (Latency Hiding Disable) bit in ESDCFG0 reg.
++ Tends to fix MPEG4 issue on MX27 TO2 */
++ case VPU_IOC_LHD:
++ {
++ u_int disable = (u_int)arg;
++ u_int reg;
++ void __iomem *reg_addr;
++
++ reg_addr = IO_ADDRESS(SDRAMC_BASE_ADDR + 0x10);
++ reg = __raw_readl(reg_addr);
++ pr_debug("ESDCFG0: [ 0x%08x ]\n", reg);
++
++ if (disable == 0) {
++ __raw_writel(reg & ~0x00000020, reg_addr);
++ pr_debug("Latency Hiding Disable\n");
++ } else {
++ __raw_writel(reg | 0x00000020, reg_addr);
++ pr_debug("Latency Hiding Enable\n");
++ }
++
++ pr_debug("ESDCFG0: [ 0x%08x ]\n",
++ __raw_readl(reg_addr));
++
++ break;
++ }
++#endif
++ case VPU_IOC_VL2CC_FLUSH:
++ break;
++ case VPU_IOC_REG_DUMP:
++ break;
++ case VPU_IOC_PHYMEM_DUMP:
++ break;
++ default:
++ printk(KERN_ERR "No such IOCTL, cmd is %d\n", cmd);
++ ret = -EINVAL;
++ }
++ return ret;
++}
++
++/*!
++ * @brief Release function for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_release(struct inode *inode, struct file *filp)
++{
++ int ret = 0;
++ struct vpu_t *vpu_data = filp->private_data;
++
++ mutex_lock(&vpu_mutex);
++ if (open_count == 1) {
++ open_count--;
++ vpu_free_buffers(vpu_data);
++ vpu_hardware_disable();
++ } else {
++ ret = -EINVAL;
++ }
++ mutex_unlock(&vpu_mutex);
++ return ret;
++}
++
++/*!
++ * @brief fasync function for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_fasync(int fd, struct file *filp, int mode)
++{
++ struct vpu_t *vpu_data = filp->private_data;
++ return fasync_helper(fd, filp, mode, &vpu_data->async_queue);
++}
++
++/*!
++ * @brief memory map function of harware registers for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_map_hwregs(struct file *fp, struct vm_area_struct *vm)
++{
++ unsigned long pfn;
++
++ vm->vm_flags |= VM_IO | VM_RESERVED;
++ vm->vm_page_prot = pgprot_noncached(vm->vm_page_prot);
++ pfn = VPU_BASE_ADDR >> PAGE_SHIFT;
++ pr_debug("size=0x%08lx, page no.=0x%08lx\n",
++ vm->vm_end - vm->vm_start, pfn);
++ return remap_pfn_range(vm, vm->vm_start, pfn, vm->vm_end - vm->vm_start,
++ vm->vm_page_prot) ? -EAGAIN : 0;
++}
++
++/*!
++ * @brief memory map function of memory for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_map_mem(struct file *fp, struct vm_area_struct *vm)
++{
++ int request_size = vm->vm_end - vm->vm_start;
++
++ pr_debug(" start=0x%08lx, pgoff=0x%08lx, size=0x%08x\n",
++ vm->vm_start, vm->vm_pgoff,
++ request_size);
++
++ vm->vm_flags |= VM_IO | VM_RESERVED;
++ vm->vm_page_prot = pgprot_noncached(vm->vm_page_prot);
++
++ return remap_pfn_range(vm, vm->vm_start, vm->vm_pgoff,
++ request_size, vm->vm_page_prot) ? -EAGAIN : 0;
++
++}
++
++/*!
++ * @brief memory map interface for vpu file operation
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_mmap(struct file *fp, struct vm_area_struct *vm)
++{
++ if (vm->vm_pgoff)
++ return vpu_map_mem(fp, vm);
++ else
++ return vpu_map_hwregs(fp, vm);
++}
++
++struct file_operations vpu_fops = {
++ .owner = THIS_MODULE,
++ .open = vpu_open,
++ .ioctl = vpu_ioctl,
++ .release = vpu_release,
++ .fasync = vpu_fasync,
++ .mmap = vpu_mmap,
++};
++
++/*!
++ * This function is called by the driver framework to initialize the vpu device.
++ * @param dev The device structure for the vpu passed in by the framework.
++ * @return 0 on success or negative error code on error
++ */
++static int vpu_dev_probe(struct platform_device *pdev)
++{
++ int err = 0;
++ struct device *temp_device;
++
++ init_waitqueue_head(&vpu_queue);
++
++ vpu_major = register_chrdev(vpu_major, "mxc_vpu", &vpu_fops);
++ if (vpu_major < 0) {
++ printk(KERN_ERR "vpu: unable to get a major for VPU\n");
++ err = vpu_major;
++ goto error;
++ }
++
++ vpu_class = class_create(THIS_MODULE, "mxc_vpu");
++ if (IS_ERR(vpu_class)) {
++ err = PTR_ERR(vpu_class);
++ goto err_out_chrdev;
++ }
++
++ temp_device = device_create(vpu_class, NULL,
++ MKDEV(vpu_major, 0), NULL, "mxc_vpu");
++ if (IS_ERR(temp_device)) {
++ err = PTR_ERR(temp_device);
++ goto err_out_class;
++ }
++
++ vpu_data.dev = &pdev->dev;
++ platform_set_drvdata(pdev, &vpu_data);
++
++ vpu_clk = clk_get(&pdev->dev, "vpu_clk");
++ if (IS_ERR(vpu_clk)) {
++ err = PTR_ERR(vpu_clk);
++ goto err_out_class;
++ }
++
++ err = request_irq(MXC_INT_VPU, vpu_irq_handler, 0, "VPU_CODEC_IRQ",
++ &vpu_data);
++ if (err)
++ goto err_out_class;
++
++ printk(KERN_INFO "VPU initialized\n");
++ goto out;
++
++err_out_class:
++ device_destroy(vpu_class, MKDEV(vpu_major, 0));
++ class_destroy(vpu_class);
++err_out_chrdev:
++ unregister_chrdev(vpu_major, "mxc_vpu");
++error:
++out:
++ return err;
++}
++
++static int __devexit vpu_dev_remove(struct platform_device *pdev)
++{
++ vpu_t *vpu_data = platform_get_drvdata(pdev);
++
++ free_irq(MXC_INT_VPU, vpu_data);
++ if (vpu_major > 0) {
++ device_destroy(vpu_class, MKDEV(vpu_major, 0));
++ class_destroy(vpu_class);
++ unregister_chrdev(vpu_major, "mxc_vpu");
++ vpu_major = 0;
++ }
++
++ clk_put(vpu_clk);
++ return 0;
++}
++
++/*! Driver definition
++ *
++ */
++static struct platform_driver mxcvpu_driver = {
++ .driver = {
++ .name = "mxc_vpu",
++ },
++ .probe = vpu_dev_probe,
++ .remove = __devexit_p(vpu_dev_remove),
++};
++
++static int __init vpu_init(void)
++{
++ int ret = platform_driver_register(&mxcvpu_driver);
++
++ printk(KERN_DEBUG "%s: platform_driver_register returned %d\n", __FUNCTION__, ret);
++
++ return ret;
++}
++
++static void __exit vpu_exit(void)
++{
++ platform_driver_unregister(&mxcvpu_driver);
++ return;
++}
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("Linux VPU driver for Freescale i.MX27");
++MODULE_LICENSE("GPL");
++
++module_init(vpu_init);
++module_exit(vpu_exit);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/mxc/mxc_vpu.h linux-2.6.28-karo/drivers/mxc/mxc_vpu.h
+--- linux-2.6.28/drivers/mxc/mxc_vpu.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/mxc/mxc_vpu.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,22 @@
++typedef struct vpu_mem_desc {
++ size_t size;
++ dma_addr_t phy_addr;
++ void *cpu_addr; /* cpu address to free the dma mem */
++ void *virt_uaddr; /* virtual user space address */
++} vpu_mem_desc;
++
++#define VPU_IOC_MAGIC 'V'
++
++#define VPU_IOC_PHYMEM_ALLOC _IO(VPU_IOC_MAGIC, 0)
++#define VPU_IOC_PHYMEM_FREE _IO(VPU_IOC_MAGIC, 1)
++#define VPU_IOC_WAIT4INT _IO(VPU_IOC_MAGIC, 2)
++#define VPU_IOC_PHYMEM_DUMP _IO(VPU_IOC_MAGIC, 3)
++#define VPU_IOC_REG_DUMP _IO(VPU_IOC_MAGIC, 4)
++#define VPU_IOC_LHD _IO(VPU_IOC_MAGIC, 5)
++#define VPU_IOC_VL2CC_FLUSH _IO(VPU_IOC_MAGIC, 6)
++
++int vl2cc_init(u32 vl2cc_hw_base);
++void vl2cc_enable(void);
++void vl2cc_flush(void);
++void vl2cc_disable(void);
++void vl2cc_cleanup(void);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/net/Kconfig linux-2.6.28-karo/drivers/net/Kconfig
+--- linux-2.6.28/drivers/net/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/net/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -1810,11 +1810,11 @@ config 68360_ENET
+ the Motorola 68360 processor.
+
+ config FEC
+- bool "FEC ethernet controller (of ColdFire CPUs)"
+- depends on M523x || M527x || M5272 || M528x || M520x
++ tristate "FEC ethernet controller"
++ depends on M523x || M527x || M5272 || M528x || M520x || MACH_MX27
+ help
+ Say Y here if you want to use the built-in 10/100 Fast ethernet
+- controller on some Motorola ColdFire processors.
++ controller on some Motorola/Freescale processors.
+
+ config FEC2
+ bool "Second FEC ethernet controller (on some ColdFire CPUs)"
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/net/fec.c linux-2.6.28-karo/drivers/net/fec.c
+--- linux-2.6.28/drivers/net/fec.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/net/fec.c 2009-03-11 13:16:24.000000000 +0100
+@@ -2,6 +2,12 @@
+ * Fast Ethernet Controller (FEC) driver for Motorola MPC8xx.
+ * Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
+ *
++ * This version of the driver is specific to the FADS implementation,
++ * since the board contains control registers external to the processor
++ * for the control of the LevelOne LXT970 transceiver. The MPC860T manual
++ * describes connections using the internal parallel port I/O, which
++ * is basically all of Port D.
++ *
+ * Right now, I am very wasteful with the buffers. I allocate memory
+ * pages and then divide them into 2K frame buffers. This way I know I
+ * have buffers large enough to hold one frame within one buffer descriptor.
+@@ -18,48 +24,74 @@
+ * Bug fixes and cleanup by Philippe De Muyter (phdm@macqel.be)
+ * Copyright (c) 2004-2006 Macq Electronique SA.
+ */
++/*
++ * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
+
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+-#include <linux/string.h>
+-#include <linux/ptrace.h>
++#include <linux/resource.h>
+ #include <linux/errno.h>
+ #include <linux/ioport.h>
+ #include <linux/slab.h>
+ #include <linux/interrupt.h>
+-#include <linux/pci.h>
+-#include <linux/init.h>
++#include <linux/wait.h>
+ #include <linux/delay.h>
++#include <linux/platform_device.h>
+ #include <linux/netdevice.h>
+ #include <linux/etherdevice.h>
+ #include <linux/skbuff.h>
+ #include <linux/spinlock.h>
+-#include <linux/workqueue.h>
+-#include <linux/bitops.h>
++#include <linux/dma-mapping.h>
++#include <linux/clk.h>
++#include <linux/fec_enet.h>
++#include <linux/phy.h>
+
+ #include <asm/irq.h>
+-#include <asm/uaccess.h>
+ #include <asm/io.h>
+-#include <asm/pgtable.h>
+-#include <asm/cacheflush.h>
+
++#define DRV_NAME "fec_enet"
++
++#ifdef DEBUG
++static int debug = 1;
++#define dbg_lvl(n) ((n) < debug)
++module_param(debug, int, S_IRUGO | S_IWUSR);
++
++#define DBG(lvl, fmt...) do { if (dbg_lvl(lvl)) printk(KERN_DEBUG fmt); } while (0)
++#else
++static int debug;
++#define dbg_lvl(n) 0
++module_param(debug, int, 0);
++
++#define DBG(lvl, fmt...) do { } while (0)
++#endif
++
++#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || \
++ defined(CONFIG_M5272) || defined(CONFIG_M528x) || \
++ defined(CONFIG_M520x) || defined(CONFIG_M532x)
+ #include <asm/coldfire.h>
+ #include <asm/mcfsim.h>
+ #include "fec.h"
+-
+-#if defined(CONFIG_FEC2)
+-#define FEC_MAX_PORTS 2
++#define FEC_ALIGNMENT (0x03) /*FEC needs 4bytes alignment*/
++#elif defined(CONFIG_ARCH_MXC)
++#include <mach/hardware.h>
++#include <mach/iim.h>
++#include "fec.h"
++#define FEC_ALIGNMENT (0x0F) /*FEC needs 128bits(32bytes) alignment*/
+ #else
+-#define FEC_MAX_PORTS 1
++#include <asm/8xx_immap.h>
++#include <asm/mpc8xx.h>
++#include "commproc.h"
++#define FEC_ALIGNMENT (0x03) /*FEC needs 4bytes alignment */
+ #endif
+
+-#if defined(CONFIG_M5272)
+-#define HAVE_mii_link_interrupt
+-#endif
++#define FEC_ADDR_ALIGNMENT(x) ((unsigned char *)(((unsigned long)(x) + (FEC_ALIGNMENT)) & (~FEC_ALIGNMENT)))
+
++#if 0
+ /*
+ * Define the fixed address of the FEC hardware.
+ */
++/* USE resources provided by platform_device! */
+ static unsigned int fec_hw[] = {
+ #if defined(CONFIG_M5272)
+ (MCF_MBAR + 0x840),
+@@ -72,23 +104,26 @@ static unsigned int fec_hw[] = {
+ (MCF_MBAR+0x30000),
+ #elif defined(CONFIG_M532x)
+ (MCF_MBAR+0xfc030000),
++#elif defined(CONFIG_ARCH_MXC)
++ (IO_ADDRESS(FEC_BASE_ADDR)),
+ #else
+ &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec),
+ #endif
+ };
++#endif
+
+-static unsigned char fec_mac_default[] = {
+- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+-};
+-
++#if 0
+ /*
+ * Some hardware gets it MAC address out of local flash memory.
+ * if this is non-zero then assume it is the address to get MAC from.
+ */
++/* implemented using platform_data! */
+ #if defined(CONFIG_NETtel)
+ #define FEC_FLASHMAC 0xf0006006
+ #elif defined(CONFIG_GILBARCONAP) || defined(CONFIG_SCALES)
+ #define FEC_FLASHMAC 0xf0006000
++#elif defined (CONFIG_MTD_KeyTechnology)
++#define FEC_FLASHMAC 0xffe04000
+ #elif defined(CONFIG_CANCam)
+ #define FEC_FLASHMAC 0xf0020000
+ #elif defined (CONFIG_M5272C3)
+@@ -98,10 +133,13 @@ static unsigned char fec_mac_default[] =
+ #else
+ #define FEC_FLASHMAC 0
+ #endif
++#endif
++
++#define platform_func(p, args...) ((p) ? (p)(args) : 0)
+
+ /* Forward declarations of some structures to support different PHYs
+ */
+-
++#ifndef CONFIG_PHYLIB
+ typedef struct {
+ uint mii_data;
+ void (*funct)(uint mii_reg, struct net_device *dev);
+@@ -116,6 +154,7 @@ typedef struct {
+ const phy_cmd_t *ack_int;
+ const phy_cmd_t *shutdown;
+ } phy_info_t;
++#endif
+
+ /* The number of Tx and Rx buffers. These are allocated from the page
+ * pool. The code may assume these are power of two, so it it best
+@@ -129,12 +168,13 @@ typedef struct {
+ #define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES)
+ #define FEC_ENET_TX_FRSIZE 2048
+ #define FEC_ENET_TX_FRPPG (PAGE_SIZE / FEC_ENET_TX_FRSIZE)
+-#define TX_RING_SIZE 16 /* Must be power of two */
+-#define TX_RING_MOD_MASK 15 /* for this to work */
++#define TX_RING_SIZE 16 /* Must be power of two */
++#define TX_RING_MOD_MASK (TX_RING_SIZE - 1) /* for this to work */
+
+ #if (((RX_RING_SIZE + TX_RING_SIZE) * 8) > PAGE_SIZE)
+ #error "FEC: descriptor ring size constants too large"
+ #endif
++#define CBD_BUF_SIZE ((RX_RING_SIZE + TX_RING_SIZE) * sizeof(cbd_t))
+
+ /* Interrupt events/masks.
+ */
+@@ -149,6 +189,12 @@ typedef struct {
+ #define FEC_ENET_MII ((uint)0x00800000) /* MII interrupt */
+ #define FEC_ENET_EBERR ((uint)0x00400000) /* SDMA bus error */
+
++#ifndef CONFIG_ARCH_MXC
++#define FEC_ENET_MASK ((uint)0xffc00000)
++#else
++#define FEC_ENET_MASK ((uint)0xfff80000)
++#endif
++
+ /* The FEC stores dest/src/type, data, and checksum for receive packets.
+ */
+ #define PKT_MAXBUF_SIZE 1518
+@@ -162,8 +208,8 @@ typedef struct {
+ * account when setting it.
+ */
+ #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
+- defined(CONFIG_M520x) || defined(CONFIG_M532x)
+-#define OPT_FRAME_SIZE (PKT_MAXBUF_SIZE << 16)
++ defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARCH_MXC)
++#define OPT_FRAME_SIZE (RCR_MAX_FL_set(PKT_MAXBUF_SIZE))
+ #else
+ #define OPT_FRAME_SIZE 0
+ #endif
+@@ -178,28 +224,44 @@ typedef struct {
+ */
+ struct fec_enet_private {
+ /* Hardware registers of the FEC device */
+- volatile fec_t *hwp;
+-
+- struct net_device *netdev;
++ volatile void __iomem *reg_base;
++ struct resource *res_mem1;
++ struct resource *res_mem2;
++ int etn_irq;
++ int mii_irq;
++#ifndef CONFIG_PHYLIB
++ struct timer_list *phy_timer;
++#else
++ struct mii_bus *mii;
++ int mii_complete;
++#endif
++ u32 msg_enable;
+
+ /* The saved address of a sent-in-place packet/buffer, for skfree(). */
+- unsigned char *tx_bounce[TX_RING_SIZE];
++ void *tx_bounce[TX_RING_SIZE];
+ struct sk_buff* tx_skbuff[TX_RING_SIZE];
++ struct sk_buff* rx_skbuff[RX_RING_SIZE];
+ ushort skb_cur;
+ ushort skb_dirty;
+
+ /* CPM dual port RAM relative addresses.
+ */
++ struct device *dma_dev; /* pointer to (platform_)device for dma_sync*() functions */
++ void *cbd_mem_base; /* save the virtual base address of rx&tx buffer descriptor */
++ dma_addr_t cbd_phys_base; /* physical address of buffer descriptor memory for access by FEC HW */
++
+ cbd_t *rx_bd_base; /* Address of Rx and Tx buffers. */
+ cbd_t *tx_bd_base;
+- cbd_t *cur_rx, *cur_tx; /* The next free ring entry */
+- cbd_t *dirty_tx; /* The ring entries to be free()ed. */
++ cbd_t *cur_rx, *cur_tx; /* The next free ring entry */
++ cbd_t *dirty_tx; /* The ring entries to be free()ed. */
++ struct net_device_stats stats;
+ uint tx_full;
+- /* hold while accessing the HW like ringbuffer for tx/rx but not MAC */
+- spinlock_t hw_lock;
+- /* hold while accessing the mii_list_t() elements */
+- spinlock_t mii_lock;
++ spinlock_t lock;
+
++#ifdef CONFIG_PHYLIB
++ struct phy_device *phy;
++ uint phy_speed;
++#else
+ uint phy_id;
+ uint phy_id_done;
+ uint phy_status;
+@@ -209,28 +271,41 @@ struct fec_enet_private {
+
+ uint sequence_done;
+ uint mii_phy_task_queued;
+-
++#endif
+ uint phy_addr;
+
+- int index;
+- int opened;
+- int link;
+- int old_link;
+- int full_duplex;
++ unsigned int opened:1;
++ unsigned int phy_int_enabled:1;
++ unsigned int linkstatus:1;
++#ifndef CONFIG_PHYLIB
++ unsigned int old_linkstatus:1;
++#endif
++ unsigned int full_duplex:1;
++
++ struct clk *clk;
+ };
+
+-static int fec_enet_open(struct net_device *dev);
+-static int fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
+-static void fec_enet_mii(struct net_device *dev);
+-static irqreturn_t fec_enet_interrupt(int irq, void * dev_id);
++#ifdef CONFIG_PHYLIB
++static int fec_connect_phy(struct net_device *dev, struct fec_enet_private *fep);
++#else
++static irqreturn_t mii_link_interrupt(int irq, void *dev_id);
++#endif
++static void fec_restart(struct net_device *dev, int duplex);
+ static void fec_enet_tx(struct net_device *dev);
+ static void fec_enet_rx(struct net_device *dev);
+-static int fec_enet_close(struct net_device *dev);
+-static void set_multicast_list(struct net_device *dev);
+-static void fec_restart(struct net_device *dev, int duplex);
++static void fec_enet_mii(struct net_device *dev);
+ static void fec_stop(struct net_device *dev);
+-static void fec_set_mac_address(struct net_device *dev);
++static void _fec_set_mac_address(struct net_device *dev);
+
++/*
++ * fec_copy_threshold controls the copy when receiving ethernet frame.
++ * If ethernet header is aligned on a 4byte boundary, the ip header and
++ * higher level header will not be aligned.
++ * The reason is, that an ethernet header is 14bytes long.
++ * And the max size of tcp & ip header is 128bytes. Normally it is 40bytes.
++ * So I set the default value between 128 to 256.
++ */
++static int fec_copy_threshold = 192;
+
+ /* MII processing. We keep this as simple as possible. Requests are
+ * placed on the list (if there is room). When the request is finished
+@@ -242,14 +317,16 @@ typedef struct mii_list {
+ struct mii_list *mii_next;
+ } mii_list_t;
+
++#ifndef CONFIG_PHYLIB
+ #define NMII 20
+ static mii_list_t mii_cmds[NMII];
+ static mii_list_t *mii_free;
+ static mii_list_t *mii_head;
+ static mii_list_t *mii_tail;
+
+-static int mii_queue(struct net_device *dev, int request,
+- void (*func)(uint, struct net_device *));
++static int mii_queue(struct net_device *dev, int request,
++ void (*func)(uint, struct net_device *));
++#endif
+
+ /* Make MII read/write commands for the FEC.
+ */
+@@ -294,47 +371,147 @@ static int mii_queue(struct net_device *
+ #define PHY_STAT_100HDX 0x4000 /* 100 Mbit half duplex selected */
+ #define PHY_STAT_100FDX 0x8000 /* 100 Mbit full duplex selected */
+
++#ifndef DEBUG
++static inline unsigned long fec_reg_read(struct fec_enet_private *fep, unsigned int reg)
++{
++ return readl(fep->reg_base + reg);
++}
++
++static inline void fec_reg_write(struct fec_enet_private *fep, unsigned int reg, unsigned long val)
++{
++ writel(val, fep->reg_base + reg);
++}
++#else
++#define fec_reg_read(fep, reg) __fec_reg_read(fep, reg, __FUNCTION__, #reg)
++#define fec_reg_write(fep, reg, val) __fec_reg_write(fep, reg, val, __FUNCTION__, #reg)
++
++static inline unsigned long __fec_reg_read(struct fec_enet_private *fep, unsigned int reg,
++ const char *func, const char *reg_name)
++{
++ unsigned long val = readl(fep->reg_base + reg);
++ DBG(3, "%s: Read %08lx from %s(%03x)\n", func, val, reg_name, reg);
++ return val;
++}
++
++static inline void __fec_reg_write(struct fec_enet_private *fep, unsigned int reg,
++ unsigned long val, const char *func, const char *reg_name)
++{
++ DBG(3, "%s: Writing %08lx to %s(%03x)\n", func, val, reg_name, reg);
++ writel(val, fep->reg_base + reg);
++}
++#endif
++
++static inline void fec_enet_cbd_get(struct fec_enet_private *fep)
++{
++ DBG(2, "%s: Requesting cbd area: %08lx\n", __FUNCTION__, (ulong)fep->cbd_phys_base);
++ dma_sync_single_for_cpu(fep->dma_dev, fep->cbd_phys_base, CBD_BUF_SIZE, DMA_BIDIRECTIONAL);
++}
++
++static inline void fec_enet_cbd_put(struct fec_enet_private *fep)
++{
++ DBG(2, "%s: Flushing changes to cbd area\n", __FUNCTION__);
++ dma_sync_single_for_device(fep->dma_dev, fep->cbd_phys_base,
++ CBD_BUF_SIZE, DMA_BIDIRECTIONAL);
++}
++
++static inline void fec_enet_rxbuf_get(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Requesting RX buffer %08lx(%u)\n", __FUNCTION__, (ulong)bdp->cbd_bufaddr, len);
++ dma_sync_single_for_cpu(fep->dma_dev, bdp->cbd_bufaddr, len, DMA_FROM_DEVICE);
++}
++
++static inline void fec_enet_rxbuf_put(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Releasing RX buffer %08lx(%u)\n", __FUNCTION__, (ulong)bdp->cbd_bufaddr, len);
++ dma_sync_single_for_device(fep->dma_dev, bdp->cbd_bufaddr, len, DMA_FROM_DEVICE);
++}
++
++static inline void fec_enet_rxbuf_map(struct fec_enet_private *fep, cbd_t *bdp,
++ void *buf, ushort len)
++{
++ BUG_ON(!dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr));
++ bdp->cbd_bufaddr = dma_map_single(fep->dma_dev, buf, len, DMA_FROM_DEVICE);
++ DBG(2, "%s: RX buffer %p(%u) mapped to %08lx\n", __FUNCTION__, buf, len,
++ (ulong)bdp->cbd_bufaddr);
++}
++
++static inline void fec_enet_rxbuf_unmap(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Unmapping RX buffer %08lx(%u)\n", __FUNCTION__, (ulong)bdp->cbd_bufaddr, len);
++ BUG_ON(dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr));
++ dma_unmap_single(fep->dma_dev, bdp->cbd_bufaddr, len, DMA_FROM_DEVICE);
++ bdp->cbd_bufaddr = ~0;
++}
++
++static inline void fec_enet_txbuf_map(struct fec_enet_private *fep, cbd_t *bdp,
++ void *buf, ushort len)
++{
++ BUG_ON(!dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr));
++ bdp->cbd_bufaddr = dma_map_single(fep->dma_dev, buf, len, DMA_TO_DEVICE);
++ DBG(2, "%s: TX buffer %p(%u) mapped to %08lx\n", __FUNCTION__, buf, len,
++ (ulong)bdp->cbd_bufaddr);
++}
++
++static inline void fec_enet_txbuf_unmap(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Unmapping TX buffer %08lx(%u)\n", __FUNCTION__, (ulong)bdp->cbd_bufaddr, len);
++ BUG_ON(dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr));
++ dma_unmap_single(fep->dma_dev, bdp->cbd_bufaddr, len, DMA_TO_DEVICE);
++ bdp->cbd_bufaddr = ~0;
++}
++
++static inline void fec_enet_txbuf_get(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Requesting TX buffer %08lx(%u)\n", __FUNCTION__, (ulong)bdp->cbd_bufaddr, len);
++ dma_sync_single_for_cpu(fep->dma_dev, bdp->cbd_bufaddr, len, DMA_TO_DEVICE);
++}
++
++static inline void fec_enet_txbuf_put(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Releasing TX buffer %08lx(%u)\n", __FUNCTION__, (ulong)bdp->cbd_bufaddr, len);
++ dma_sync_single_for_device(fep->dma_dev, bdp->cbd_bufaddr, len, DMA_TO_DEVICE);
++}
+
+ static int
+ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *fecp;
+- volatile cbd_t *bdp;
+- unsigned short status;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
++ unsigned short status;
+ unsigned long flags;
+
+- fep = netdev_priv(dev);
+- fecp = (volatile fec_t*)dev->base_addr;
+-
+- if (!fep->link) {
++ if (!fep->linkstatus) {
++ DBG(0, "%s: Cannot send packet; link is down\n", __FUNCTION__);
+ /* Link is down or autonegotiation is in progress. */
+ return 1;
+ }
+
+- spin_lock_irqsave(&fep->hw_lock, flags);
++ spin_lock_irqsave(&fep->lock, flags);
++
++ //WARN_ON(fec_reg_read(fep, FEC_TDAR) & TDAR_BUSY);
++ fec_enet_cbd_get(fep);
++
+ /* Fill in a Tx ring entry */
+ bdp = fep->cur_tx;
+
+ status = bdp->cbd_sc;
+-#ifndef final_version
++#ifdef DEBUG
+ if (status & BD_ENET_TX_READY) {
+ /* Ooops. All transmit buffers are full. Bail out.
+ * This should not happen, since dev->tbusy should be set.
+ */
+ printk("%s: tx queue full!.\n", dev->name);
+- spin_unlock_irqrestore(&fep->hw_lock, flags);
++ fec_enet_cbd_put(fep);
++ spin_unlock_irqrestore(&fep->lock, flags);
+ return 1;
+ }
+ #endif
+-
+ /* Clear all of the status flags.
+ */
+ status &= ~BD_ENET_TX_STATS;
+
+ /* Set buffer length and buffer pointer.
+ */
+- bdp->cbd_bufaddr = __pa(skb->data);
+ bdp->cbd_datlen = skb->len;
+
+ /*
+@@ -342,30 +519,25 @@ fec_enet_start_xmit(struct sk_buff *skb,
+ * 4-byte boundaries. Use bounce buffers to copy data
+ * and get it aligned. Ugh.
+ */
+- if (bdp->cbd_bufaddr & 0x3) {
++ if (unlikely((bdp->cbd_bufaddr) & FEC_ALIGNMENT)) {
+ unsigned int index;
+ index = bdp - fep->tx_bd_base;
+- memcpy(fep->tx_bounce[index], (void *) bdp->cbd_bufaddr, bdp->cbd_datlen);
+- bdp->cbd_bufaddr = __pa(fep->tx_bounce[index]);
++ memcpy(fep->tx_bounce[index], skb->data, skb->len);
++ fec_enet_txbuf_map(fep, bdp, fep->tx_bounce[index], skb->len);
++ } else {
++ fec_enet_txbuf_map(fep, bdp, skb->data, skb->len);
+ }
+
+ /* Save skb pointer.
+ */
+ fep->tx_skbuff[fep->skb_cur] = skb;
+
+- dev->stats.tx_bytes += skb->len;
+- fep->skb_cur = (fep->skb_cur+1) & TX_RING_MOD_MASK;
+-
+- /* Push the data cache so the CPM does not get stale memory
+- * data.
+- */
+- flush_dcache_range((unsigned long)skb->data,
+- (unsigned long)skb->data + skb->len);
++ fep->stats.tx_bytes += skb->len;
++ fep->skb_cur = (fep->skb_cur + 1) & TX_RING_MOD_MASK;
+
+ /* Send it on its way. Tell FEC it's ready, interrupt when done,
+ * it's the last BD of the frame, and to put the CRC on the end.
+ */
+-
+ status |= (BD_ENET_TX_READY | BD_ENET_TX_INTR
+ | BD_ENET_TX_LAST | BD_ENET_TX_TC);
+ bdp->cbd_sc = status;
+@@ -373,7 +545,7 @@ fec_enet_start_xmit(struct sk_buff *skb,
+ dev->trans_start = jiffies;
+
+ /* Trigger transmission start */
+- fecp->fec_x_des_active = 0;
++ fec_reg_write(fep, FEC_TDAR, DONT_CARE);
+
+ /* If this was the last BD in the ring, start at the beginning again.
+ */
+@@ -385,12 +557,14 @@ fec_enet_start_xmit(struct sk_buff *skb,
+
+ if (bdp == fep->dirty_tx) {
+ fep->tx_full = 1;
++ DBG(0, "TX ring full, stopping netif queue\n");
+ netif_stop_queue(dev);
+ }
+
+- fep->cur_tx = (cbd_t *)bdp;
++ fep->cur_tx = bdp;
++ fec_enet_cbd_put(fep);
+
+- spin_unlock_irqrestore(&fep->hw_lock, flags);
++ spin_unlock_irqrestore(&fep->lock, flags);
+
+ return 0;
+ }
+@@ -400,68 +574,73 @@ fec_timeout(struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+- printk("%s: transmit timed out.\n", dev->name);
+- dev->stats.tx_errors++;
+-#ifndef final_version
++ printk(KERN_WARNING "%s: transmit timed out.\n", dev->name);
++ fep->stats.tx_errors++;
++#ifdef DEBUG
+ {
+- int i;
+- cbd_t *bdp;
++ int i;
++ cbd_t *bdp;
+
+- printk("Ring data dump: cur_tx %lx%s, dirty_tx %lx cur_rx: %lx\n",
+- (unsigned long)fep->cur_tx, fep->tx_full ? " (full)" : "",
+- (unsigned long)fep->dirty_tx,
+- (unsigned long)fep->cur_rx);
++ fec_enet_cbd_get(fep);
+
+- bdp = fep->tx_bd_base;
+- printk(" tx: %u buffers\n", TX_RING_SIZE);
+- for (i = 0 ; i < TX_RING_SIZE; i++) {
+- printk(" %08x: %04x %04x %08x\n",
+- (uint) bdp,
+- bdp->cbd_sc,
+- bdp->cbd_datlen,
+- (int) bdp->cbd_bufaddr);
+- bdp++;
+- }
++ printk(KERN_DEBUG "%s: Ring data dump: cur_tx %p%s, dirty_tx %p cur_rx: %p\n",
++ __FUNCTION__,
++ fep->cur_tx, fep->tx_full ? " (full)" : "",
++ fep->dirty_tx,
++ fep->cur_rx);
+
+- bdp = fep->rx_bd_base;
+- printk(" rx: %lu buffers\n", (unsigned long) RX_RING_SIZE);
+- for (i = 0 ; i < RX_RING_SIZE; i++) {
+- printk(" %08x: %04x %04x %08x\n",
+- (uint) bdp,
+- bdp->cbd_sc,
+- bdp->cbd_datlen,
+- (int) bdp->cbd_bufaddr);
+- bdp++;
+- }
++ bdp = fep->tx_bd_base;
++ printk(" tx: %u buffers\n", TX_RING_SIZE);
++ for (i = 0 ; i < TX_RING_SIZE; i++) {
++ printk(" %p: %04x %04x %08x\n",
++ bdp,
++ bdp->cbd_sc,
++ bdp->cbd_datlen,
++ bdp->cbd_bufaddr);
++ bdp++;
++ }
++
++ bdp = fep->rx_bd_base;
++ printk(" rx: %lu buffers\n", RX_RING_SIZE);
++ for (i = 0 ; i < RX_RING_SIZE; i++) {
++ printk(" %p: %04x %04x %08x\n",
++ bdp,
++ bdp->cbd_sc,
++ bdp->cbd_datlen,
++ bdp->cbd_bufaddr);
++ bdp++;
++ }
++ fec_enet_cbd_put(fep);
+ }
+ #endif
+ fec_restart(dev, fep->full_duplex);
+- netif_wake_queue(dev);
++ DBG(0, "%s: Scheduling netif queue\n", __FUNCTION__);
++ //netif_schedule(dev);
+ }
+
+ /* The interrupt handler.
+ * This is called from the MPC core interrupt.
+ */
+ static irqreturn_t
+-fec_enet_interrupt(int irq, void * dev_id)
++fec_enet_interrupt(int irq, void *dev_id)
+ {
+- struct net_device *dev = dev_id;
+- volatile fec_t *fecp;
+- uint int_events;
+- irqreturn_t ret = IRQ_NONE;
+-
+- fecp = (volatile fec_t*)dev->base_addr;
++ struct net_device *dev = dev_id;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ uint int_events;
++ int handled = 0;
+
++ DBG(2, "%s: %08lx:%08lx\n", __FUNCTION__,
++ fec_reg_read(fep, FEC_EIR), fec_reg_read(fep, FEC_EIMR));
+ /* Get the interrupt events that caused us to be here.
+ */
+- do {
+- int_events = fecp->fec_ievent;
+- fecp->fec_ievent = int_events;
++ while ((int_events = fec_reg_read(fep, FEC_EIR)) != 0) {
++ fec_reg_write(fep, FEC_EIR, int_events);
+
+ /* Handle receive event in its own function.
+ */
+- if (int_events & FEC_ENET_RXF) {
+- ret = IRQ_HANDLED;
++ if (int_events & (FEC_ENET_RXF | FEC_ENET_RXB)) {
++ DBG(2, "%s: Handling RX Interrupt\n", __FUNCTION__);
++ handled = 1;
+ fec_enet_rx(dev);
+ }
+
+@@ -469,32 +648,43 @@ fec_enet_interrupt(int irq, void * dev_i
+ descriptors. FEC handles all errors, we just discover
+ them as part of the transmit process.
+ */
+- if (int_events & FEC_ENET_TXF) {
+- ret = IRQ_HANDLED;
++ if (int_events & (FEC_ENET_TXF | FEC_ENET_TXB)) {
++ DBG(2, "%s: Handling TX Interrupt\n", __FUNCTION__);
++ handled = 1;
+ fec_enet_tx(dev);
+ }
+
+- if (int_events & FEC_ENET_MII) {
+- ret = IRQ_HANDLED;
++ if (int_events & (FEC_ENET_MII | FEC_ENET_HBERR)) {
++ DBG(2, "%s: Handling MII Interrupt\n", __FUNCTION__);
++ handled = 1;
+ fec_enet_mii(dev);
+ }
+-
+- } while (int_events);
+-
+- return ret;
++ }
++ return IRQ_RETVAL(handled);
+ }
+
++static void fec_free_skb(struct fec_enet_private *fep, cbd_t *bdp, struct sk_buff **pskb)
++{
++ struct sk_buff *skb = *pskb;
++ if (!dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr)) {
++ fec_enet_txbuf_unmap(fep, bdp, skb->len);
++ }
++ dev_kfree_skb_any(skb);
++ *pskb = NULL;
++}
+
+ static void
+ fec_enet_tx(struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile cbd_t *bdp;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
+ unsigned short status;
+- struct sk_buff *skb;
++ struct sk_buff *skb;
+
+- fep = netdev_priv(dev);
+- spin_lock_irq(&fep->hw_lock);
++ spin_lock(&fep->lock);
++
++ //WARN_ON(fec_reg_read(fep, FEC_TDAR) & TDAR_BUSY);
++ fec_enet_cbd_get(fep);
+ bdp = fep->dirty_tx;
+
+ while (((status = bdp->cbd_sc) & BD_ENET_TX_READY) == 0) {
+@@ -505,22 +695,22 @@ fec_enet_tx(struct net_device *dev)
+ if (status & (BD_ENET_TX_HB | BD_ENET_TX_LC |
+ BD_ENET_TX_RL | BD_ENET_TX_UN |
+ BD_ENET_TX_CSL)) {
+- dev->stats.tx_errors++;
++ fep->stats.tx_errors++;
+ if (status & BD_ENET_TX_HB) /* No heartbeat */
+- dev->stats.tx_heartbeat_errors++;
++ fep->stats.tx_heartbeat_errors++;
+ if (status & BD_ENET_TX_LC) /* Late collision */
+- dev->stats.tx_window_errors++;
++ fep->stats.tx_window_errors++;
+ if (status & BD_ENET_TX_RL) /* Retrans limit */
+- dev->stats.tx_aborted_errors++;
++ fep->stats.tx_aborted_errors++;
+ if (status & BD_ENET_TX_UN) /* Underrun */
+- dev->stats.tx_fifo_errors++;
++ fep->stats.tx_fifo_errors++;
+ if (status & BD_ENET_TX_CSL) /* Carrier lost */
+- dev->stats.tx_carrier_errors++;
++ fep->stats.tx_carrier_errors++;
+ } else {
+- dev->stats.tx_packets++;
++ fep->stats.tx_packets++;
+ }
+
+-#ifndef final_version
++#ifdef DEBUG
+ if (status & BD_ENET_TX_READY)
+ printk("HEY! Enet xmit interrupt and TX_READY.\n");
+ #endif
+@@ -528,12 +718,11 @@ fec_enet_tx(struct net_device *dev)
+ * but we eventually sent the packet OK.
+ */
+ if (status & BD_ENET_TX_DEF)
+- dev->stats.collisions++;
++ fep->stats.collisions++;
+
+ /* Free the sk buffer associated with this last transmit.
+ */
+- dev_kfree_skb_any(skb);
+- fep->tx_skbuff[fep->skb_dirty] = NULL;
++ fec_free_skb(fep, bdp, &fep->tx_skbuff[fep->skb_dirty]);
+ fep->skb_dirty = (fep->skb_dirty + 1) & TX_RING_MOD_MASK;
+
+ /* Update pointer to next buffer descriptor to be transmitted.
+@@ -548,12 +737,15 @@ fec_enet_tx(struct net_device *dev)
+ */
+ if (fep->tx_full) {
+ fep->tx_full = 0;
+- if (netif_queue_stopped(dev))
++ if (netif_queue_stopped(dev)) {
++ DBG(0, "%s: Waking up netif queue\n", __FUNCTION__);
+ netif_wake_queue(dev);
++ }
+ }
+ }
+- fep->dirty_tx = (cbd_t *)bdp;
+- spin_unlock_irq(&fep->hw_lock);
++ fec_enet_cbd_put(fep);
++ fep->dirty_tx = bdp;
++ spin_unlock(&fep->lock);
+ }
+
+
+@@ -565,22 +757,22 @@ fec_enet_tx(struct net_device *dev)
+ static void
+ fec_enet_rx(struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *fecp;
+- volatile cbd_t *bdp;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
+ unsigned short status;
+- struct sk_buff *skb;
+- ushort pkt_len;
+- __u8 *data;
++ struct sk_buff *skb;
++ ushort pkt_len;
++ int rx_index;
+
+ #ifdef CONFIG_M532x
++ /* This is probably nonsense
++ Proper use of dma-mapping functions should make this obsolete
++ */
+ flush_cache_all();
+ #endif
+-
+- fep = netdev_priv(dev);
+- fecp = (volatile fec_t*)dev->base_addr;
+-
+- spin_lock_irq(&fep->hw_lock);
++ /* reserve the dual port memory area for our use */
++ //WARN_ON(fec_reg_read(fep, FEC_RDAR) & RDAR_BUSY);
++ fec_enet_cbd_get(fep);
+
+ /* First, grab all of the stats for the incoming packet.
+ * These get messed up if we get called due to a busy condition.
+@@ -588,8 +780,8 @@ fec_enet_rx(struct net_device *dev)
+ bdp = fep->cur_rx;
+
+ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) {
+-
+-#ifndef final_version
++ rx_index = bdp - fep->rx_bd_base;
++#ifdef DEBUG
+ /* Since we have allocated space to hold a complete frame,
+ * the last indicator should be set.
+ */
+@@ -597,23 +789,24 @@ while (!((status = bdp->cbd_sc) & BD_ENE
+ printk("FEC ENET: rcv is not +last\n");
+ #endif
+
+- if (!fep->opened)
++ if (!fep->opened) {
++ DBG(0, "%s: Driver not opened; ignoring packet\n", __FUNCTION__);
+ goto rx_processing_done;
+-
++ }
+ /* Check for errors. */
+ if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
+ BD_ENET_RX_CR | BD_ENET_RX_OV)) {
+- dev->stats.rx_errors++;
++ fep->stats.rx_errors++;
+ if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH)) {
+ /* Frame too long or too short. */
+- dev->stats.rx_length_errors++;
++ fep->stats.rx_length_errors++;
+ }
+ if (status & BD_ENET_RX_NO) /* Frame alignment */
+- dev->stats.rx_frame_errors++;
++ fep->stats.rx_frame_errors++;
+ if (status & BD_ENET_RX_CR) /* CRC Error */
+- dev->stats.rx_crc_errors++;
++ fep->stats.rx_crc_errors++;
+ if (status & BD_ENET_RX_OV) /* FIFO overrun */
+- dev->stats.rx_fifo_errors++;
++ fep->stats.rx_fifo_errors++;
+ }
+
+ /* Report late collisions as a frame error.
+@@ -621,36 +814,63 @@ while (!((status = bdp->cbd_sc) & BD_ENE
+ * have in the buffer. So, just drop this frame on the floor.
+ */
+ if (status & BD_ENET_RX_CL) {
+- dev->stats.rx_errors++;
+- dev->stats.rx_frame_errors++;
++ fep->stats.rx_errors++;
++ fep->stats.rx_frame_errors++;
++ DBG(0, "%s: Collision detected; dropping packet\n", __FUNCTION__);
+ goto rx_processing_done;
+ }
+
+ /* Process the incoming frame.
+ */
+- dev->stats.rx_packets++;
++ fep->stats.rx_packets++;
+ pkt_len = bdp->cbd_datlen;
+- dev->stats.rx_bytes += pkt_len;
+- data = (__u8*)__va(bdp->cbd_bufaddr);
++ fep->stats.rx_bytes += pkt_len;
+
+ /* This does 16 byte alignment, exactly what we need.
+ * The packet length includes FCS, but we don't want to
+ * include that when passing upstream as it messes up
+ * bridging applications.
+ */
+- skb = dev_alloc_skb(pkt_len-4);
++ if ((pkt_len - 4) < fec_copy_threshold) {
++ skb = dev_alloc_skb(pkt_len);
++ } else {
++ skb = dev_alloc_skb(FEC_ENET_RX_FRSIZE);
++ }
+
+ if (skb == NULL) {
+ printk("%s: Memory squeeze, dropping packet.\n", dev->name);
+- dev->stats.rx_dropped++;
++ fep->stats.rx_dropped++;
+ } else {
+- skb_put(skb,pkt_len-4); /* Make room */
+- skb_copy_to_linear_data(skb, data, pkt_len-4);
+- skb->protocol=eth_type_trans(skb,dev);
++ if ((pkt_len - 4) < fec_copy_threshold) {
++ /* skip 2 bytes, so IP header is on a 4 bytes boundary */
++ skb_reserve(skb, 2);
++ skb_put(skb, pkt_len - 4); /* Make room */
++ fec_enet_rxbuf_get(fep, bdp, pkt_len - 4);
++ skb_copy_to_linear_data(skb,
++ fep->rx_skbuff[rx_index]->data,
++ pkt_len - 4);
++ fec_enet_rxbuf_put(fep, bdp, pkt_len - 4);
++ } else {
++ struct sk_buff *pskb = fep->rx_skbuff[rx_index];
++
++ /* unmap the skb we are going to hand down to the network layer */
++ fec_enet_rxbuf_unmap(fep, bdp, FEC_ENET_RX_FRSIZE);
++
++ /* init the newly allocated skb */
++ fep->rx_skbuff[rx_index] = skb;
++ skb->data = FEC_ADDR_ALIGNMENT(skb->data);
++ /* map the newly allocated skb's data buffer for DMA */
++ fec_enet_rxbuf_map(fep, bdp, skb->data, FEC_ENET_RX_FRSIZE);
++
++ skb_put(pskb, pkt_len - 4); /* Make room */
++ skb = pskb;
++
++ }
++ skb->dev = dev;
++ skb->protocol = eth_type_trans(skb, dev);
+ netif_rx(skb);
+ }
+ rx_processing_done:
+-
+ /* Clear the status flags for this buffer.
+ */
+ status &= ~BD_ENET_RX_STATS;
+@@ -660,6 +880,9 @@ while (!((status = bdp->cbd_sc) & BD_ENE
+ status |= BD_ENET_RX_EMPTY;
+ bdp->cbd_sc = status;
+
++ /* release the dual port memory area for use by the FEC hardware */
++ fec_enet_cbd_put(fep);
++
+ /* Update BD pointer to next entry.
+ */
+ if (status & BD_ENET_RX_WRAP)
+@@ -672,10 +895,10 @@ while (!((status = bdp->cbd_sc) & BD_ENE
+ * incoming frames. On a heavily loaded network, we should be
+ * able to keep up at the expense of system resources.
+ */
+- fecp->fec_r_des_active = 0;
++ fec_reg_write(fep, FEC_RDAR, DONT_CARE);
+ #endif
+ } /* while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) */
+- fep->cur_rx = (cbd_t *)bdp;
++ fep->cur_rx = bdp;
+
+ #if 0
+ /* Doing this here will allow us to process all frames in the
+@@ -685,27 +908,28 @@ while (!((status = bdp->cbd_sc) & BD_ENE
+ * our way back to the interrupt return only to come right back
+ * here.
+ */
+- fecp->fec_r_des_active = 0;
++ fec_reg_write(fep, FEC_RDAR, DONT_CARE);
+ #endif
+-
+- spin_unlock_irq(&fep->hw_lock);
+ }
+
+-
++#ifdef CONFIG_PHYLIB
+ /* called from interrupt context */
++static void fec_enet_mii(struct net_device *dev)
++{
++ struct fec_enet_private *fep = netdev_priv(dev);
++ fep->mii_complete = 1;
++}
++#else
+ static void
+ fec_enet_mii(struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *ep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ mii_list_t *mip;
+ uint mii_reg;
+
+- fep = netdev_priv(dev);
+- spin_lock_irq(&fep->mii_lock);
++ mii_reg = fec_reg_read(fep, FEC_MMFR);
+
+- ep = fep->hwp;
+- mii_reg = ep->fec_mii_data;
++ spin_lock(&fep->lock);
+
+ if ((mip = mii_head) == NULL) {
+ printk("MII and no head!\n");
+@@ -720,27 +944,27 @@ fec_enet_mii(struct net_device *dev)
+ mii_free = mip;
+
+ if ((mip = mii_head) != NULL)
+- ep->fec_mii_data = mip->mii_regval;
++ fec_reg_write(fep, FEC_MMFR, mip->mii_regval);
+
+ unlock:
+- spin_unlock_irq(&fep->mii_lock);
++ spin_unlock(&fep->lock);
+ }
+
+ static int
+ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_device *))
+ {
+- struct fec_enet_private *fep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ unsigned long flags;
+ mii_list_t *mip;
+ int retval;
+
++ retval = 0;
++
++ spin_lock_irqsave(&fep->lock,flags);
++
+ /* Add PHY address to register command.
+ */
+- fep = netdev_priv(dev);
+- spin_lock_irqsave(&fep->mii_lock, flags);
+-
+ regval |= fep->phy_addr << 23;
+- retval = 0;
+
+ if ((mip = mii_free) != NULL) {
+ mii_free = mip->mii_next;
+@@ -752,32 +976,32 @@ mii_queue(struct net_device *dev, int re
+ mii_tail = mip;
+ } else {
+ mii_head = mii_tail = mip;
+- fep->hwp->fec_mii_data = regval;
++ fec_reg_write(fep, FEC_MMFR, regval);
+ }
+ } else {
+ retval = 1;
+ }
+
+- spin_unlock_irqrestore(&fep->mii_lock, flags);
+- return retval;
++ spin_unlock_irqrestore(&fep->lock,flags);
++
++ return(retval);
+ }
+
+ static void mii_do_cmd(struct net_device *dev, const phy_cmd_t *c)
+ {
+- if(!c)
+- return;
++ int k;
+
+- for (; c->mii_data != mk_mii_end; c++)
+- mii_queue(dev, c->mii_data, c->funct);
++ for (k = 0; c != NULL && c[k].mii_data != mk_mii_end; k++) {
++ mii_queue(dev, c[k].mii_data, c[k].funct);
++ }
+ }
+
+ static void mii_parse_sr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_LINK | PHY_STAT_FAULT | PHY_STAT_ANC);
++ status = fep->phy_status & ~(PHY_STAT_LINK | PHY_STAT_FAULT | PHY_STAT_ANC);
+
+ if (mii_reg & 0x0004)
+ status |= PHY_STAT_LINK;
+@@ -785,31 +1009,30 @@ static void mii_parse_sr(uint mii_reg, s
+ status |= PHY_STAT_FAULT;
+ if (mii_reg & 0x0020)
+ status |= PHY_STAT_ANC;
+- *s = status;
++
++ fep->phy_status = status;
+ }
+
+ static void mii_parse_cr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_CONF_ANE | PHY_CONF_LOOP);
++ status = fep->phy_status & ~(PHY_CONF_ANE | PHY_CONF_LOOP);
+
+ if (mii_reg & 0x1000)
+ status |= PHY_CONF_ANE;
+ if (mii_reg & 0x4000)
+ status |= PHY_CONF_LOOP;
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static void mii_parse_anar(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_CONF_SPMASK);
++ status = fep->phy_status & ~(PHY_CONF_SPMASK);
+
+ if (mii_reg & 0x0020)
+ status |= PHY_CONF_10HDX;
+@@ -819,7 +1042,7 @@ static void mii_parse_anar(uint mii_reg,
+ status |= PHY_CONF_100HDX;
+ if (mii_reg & 0x00100)
+ status |= PHY_CONF_100FDX;
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ /* ------------------------------------------------------------------------- */
+@@ -834,10 +1057,9 @@ static void mii_parse_anar(uint mii_reg,
+ static void mii_parse_lxt970_csr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_SPMASK);
++ status = fep->phy_status & ~(PHY_STAT_SPMASK);
+ if (mii_reg & 0x0800) {
+ if (mii_reg & 0x1000)
+ status |= PHY_STAT_100FDX;
+@@ -849,7 +1071,7 @@ static void mii_parse_lxt970_csr(uint mi
+ else
+ status |= PHY_STAT_10HDX;
+ }
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static phy_cmd_t const phy_cmd_lxt970_config[] = {
+@@ -905,16 +1127,15 @@ static phy_info_t const phy_info_lxt970
+ static void mii_parse_lxt971_sr2(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_SPMASK | PHY_STAT_LINK | PHY_STAT_ANC);
++ status = fep->phy_status & ~(PHY_STAT_SPMASK | PHY_STAT_LINK | PHY_STAT_ANC);
+
+ if (mii_reg & 0x0400) {
+- fep->link = 1;
++ fep->linkstatus = 1;
+ status |= PHY_STAT_LINK;
+ } else {
+- fep->link = 0;
++ fep->linkstatus = 0;
+ }
+ if (mii_reg & 0x0080)
+ status |= PHY_STAT_ANC;
+@@ -932,7 +1153,7 @@ static void mii_parse_lxt971_sr2(uint mi
+ if (mii_reg & 0x0008)
+ status |= PHY_STAT_FAULT;
+
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static phy_cmd_t const phy_cmd_lxt971_config[] = {
+@@ -989,10 +1210,9 @@ static phy_info_t const phy_info_lxt971
+ static void mii_parse_qs6612_pcr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_SPMASK);
++ status = fep->phy_status & ~(PHY_STAT_SPMASK);
+
+ switch((mii_reg >> 2) & 7) {
+ case 1: status |= PHY_STAT_10HDX; break;
+@@ -1001,7 +1221,7 @@ static void mii_parse_qs6612_pcr(uint mi
+ case 6: status |= PHY_STAT_100FDX; break;
+ }
+
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static phy_cmd_t const phy_cmd_qs6612_config[] = {
+@@ -1059,10 +1279,9 @@ static phy_info_t const phy_info_qs6612
+ static void mii_parse_am79c874_dr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_SPMASK | PHY_STAT_ANC);
++ status = fep->phy_status & ~(PHY_STAT_SPMASK | PHY_STAT_ANC);
+
+ if (mii_reg & 0x0080)
+ status |= PHY_STAT_ANC;
+@@ -1071,7 +1290,7 @@ static void mii_parse_am79c874_dr(uint m
+ else
+ status |= ((mii_reg & 0x0800) ? PHY_STAT_10FDX : PHY_STAT_10HDX);
+
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static phy_cmd_t const phy_cmd_am79c874_config[] = {
+@@ -1155,33 +1374,32 @@ static phy_info_t const phy_info_ks8721b
+
+ static void mii_parse_dp8384x_sr2(uint mii_reg, struct net_device *dev)
+ {
+- struct fec_enet_private *fep = dev->priv;
+- volatile uint *s = &(fep->phy_status);
++ struct fec_enet_private *fep = netdev_priv(dev);
+
+- *s &= ~(PHY_STAT_SPMASK | PHY_STAT_LINK | PHY_STAT_ANC);
++ fep->phy_status &= ~(PHY_STAT_SPMASK | PHY_STAT_LINK | PHY_STAT_ANC);
+
+ /* Link up */
+ if (mii_reg & 0x0001) {
+- fep->link = 1;
+- *s |= PHY_STAT_LINK;
++ fep->linkstatus = 1;
++ fep->phy_status |= PHY_STAT_LINK;
+ } else
+- fep->link = 0;
++ fep->linkstatus = 0;
+ /* Status of link */
+ if (mii_reg & 0x0010) /* Autonegotioation complete */
+- *s |= PHY_STAT_ANC;
++ fep->phy_status |= PHY_STAT_ANC;
+ if (mii_reg & 0x0002) { /* 10MBps? */
+ if (mii_reg & 0x0004) /* Full Duplex? */
+- *s |= PHY_STAT_10FDX;
++ fep->phy_status |= PHY_STAT_10FDX;
+ else
+- *s |= PHY_STAT_10HDX;
++ fep->phy_status |= PHY_STAT_10HDX;
+ } else { /* 100 Mbps? */
+ if (mii_reg & 0x0004) /* Full Duplex? */
+- *s |= PHY_STAT_100FDX;
++ fep->phy_status |= PHY_STAT_100FDX;
+ else
+- *s |= PHY_STAT_100HDX;
++ fep->phy_status |= PHY_STAT_100HDX;
+ }
+ if (mii_reg & 0x0008)
+- *s |= PHY_STAT_FAULT;
++ fep->phy_status |= PHY_STAT_FAULT;
+ }
+
+ static phy_info_t phy_info_dp83848= {
+@@ -1218,660 +1436,249 @@ static phy_info_t const * const phy_info
+ &phy_info_dp83848,
+ NULL
+ };
+-
+-/* ------------------------------------------------------------------------- */
+-#ifdef HAVE_mii_link_interrupt
+-static irqreturn_t
+-mii_link_interrupt(int irq, void * dev_id);
+ #endif
+
+-#if defined(CONFIG_M5272)
+ /*
+- * Code specific to Coldfire 5272 setup.
++ * do some initializtion based architecture of this chip
++MOVED to platform_data hooks!
+ */
+-static void __inline__ fec_request_intrs(struct net_device *dev)
+-{
+- volatile unsigned long *icrp;
+- static const struct idesc {
+- char *name;
+- unsigned short irq;
+- irq_handler_t handler;
+- } *idp, id[] = {
+- { "fec(RX)", 86, fec_enet_interrupt },
+- { "fec(TX)", 87, fec_enet_interrupt },
+- { "fec(OTHER)", 88, fec_enet_interrupt },
+- { "fec(MII)", 66, mii_link_interrupt },
+- { NULL },
+- };
+-
+- /* Setup interrupt handlers. */
+- for (idp = id; idp->name; idp++) {
+- if (request_irq(idp->irq, idp->handler, IRQF_DISABLED, idp->name, dev) != 0)
+- printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, idp->irq);
+- }
+
+- /* Unmask interrupt at ColdFire 5272 SIM */
+- icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR3);
+- *icrp = 0x00000ddd;
+- icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
+- *icrp = 0x0d000000;
+-}
++#define PHY_POLL_LINK_ON (1 * HZ)
++#define PHY_POLL_LINK_OFF (HZ / 5)
+
+-static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)
++#ifdef CONFIG_PHYLIB
++static void fec_link_change(struct net_device *dev)
+ {
+- volatile fec_t *fecp;
+-
+- fecp = fep->hwp;
+- fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;
+- fecp->fec_x_cntrl = 0x00;
+-
+- /*
+- * Set MII speed to 2.5 MHz
+- * See 5272 manual section 11.5.8: MSCR
+- */
+- fep->phy_speed = ((((MCF_CLK / 4) / (2500000 / 10)) + 5) / 10) * 2;
+- fecp->fec_mii_speed = fep->phy_speed;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ struct phy_device *phydev = fep->phy;
+
+- fec_restart(dev, 0);
++ if (phydev->link != fep->linkstatus ||
++ phydev->duplex != fep->full_duplex) {
++ DBG(0, "%s: link status changed from %d to %d %s -> %s duplex\n", __FUNCTION__,
++ fep->linkstatus, phydev->link, fep->full_duplex ? "full" : "half",
++ phydev->duplex ? "full" : "half");
++ if (phydev->link) {
++ fec_restart(dev, phydev->duplex);
++ } else {
++ fec_stop(dev);
++ }
++ if (fep->linkstatus != phydev->link && netif_msg_link(fep)) {
++ phy_print_status(phydev);
++ }
++ fep->linkstatus = phydev->link;
++ }
+ }
+-
+-static void __inline__ fec_get_mac(struct net_device *dev)
++#else
++static void fec_link_change(struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile fec_t *fecp;
+- unsigned char *iap, tmpaddr[ETH_ALEN];
+
+- fecp = fep->hwp;
++ DBG(0, "%s: link status changed from %d to %d\n", __FUNCTION__,
++ fep->old_linkstatus, fep->linkstatus);
++ if (fep->linkstatus) {
++ int duplex;
+
+- if (FEC_FLASHMAC) {
+- /*
+- * Get MAC address from FLASH.
+- * If it is all 1's or 0's, use the default.
+- */
+- iap = (unsigned char *)FEC_FLASHMAC;
+- if ((iap[0] == 0) && (iap[1] == 0) && (iap[2] == 0) &&
+- (iap[3] == 0) && (iap[4] == 0) && (iap[5] == 0))
+- iap = fec_mac_default;
+- if ((iap[0] == 0xff) && (iap[1] == 0xff) && (iap[2] == 0xff) &&
+- (iap[3] == 0xff) && (iap[4] == 0xff) && (iap[5] == 0xff))
+- iap = fec_mac_default;
++ duplex = 0;
++ if (fep->phy_status & (PHY_STAT_100FDX | PHY_STAT_10FDX)) {
++ duplex = 1;
++ }
++ fec_restart(dev, duplex);
++ if (fep->phy_timer) {
++ mod_timer(fep->phy_timer, jiffies + PHY_POLL_LINK_ON);
++ }
+ } else {
+- *((unsigned long *) &tmpaddr[0]) = fecp->fec_addr_low;
+- *((unsigned short *) &tmpaddr[4]) = (fecp->fec_addr_high >> 16);
+- iap = &tmpaddr[0];
++ fec_stop(dev);
++ if (fep->phy_timer) {
++ mod_timer(fep->phy_timer, jiffies + PHY_POLL_LINK_OFF);
++ }
+ }
+
+- memcpy(dev->dev_addr, iap, ETH_ALEN);
+-
+- /* Adjust MAC if using default MAC address */
+- if (iap == fec_mac_default)
+- dev->dev_addr[ETH_ALEN-1] = fec_mac_default[ETH_ALEN-1] + fep->index;
+-}
+-
+-static void __inline__ fec_enable_phy_intr(void)
+-{
+-}
+-
+-static void __inline__ fec_disable_phy_intr(void)
+-{
+- volatile unsigned long *icrp;
+- icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
+- *icrp = 0x08000000;
+-}
+-
+-static void __inline__ fec_phy_ack_intr(void)
+-{
+- volatile unsigned long *icrp;
+- /* Acknowledge the interrupt */
+- icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
+- *icrp = 0x0d000000;
++ fep->old_linkstatus = fep->linkstatus;
+ }
+
+-static void __inline__ fec_localhw_setup(void)
++static void fec_phy_timer(unsigned long data)
+ {
+-}
++ struct net_device *dev = (struct net_device *)data;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ int link_poll_interval = fep->linkstatus ? PHY_POLL_LINK_ON : PHY_POLL_LINK_OFF;
+
+-/*
+- * Do not need to make region uncached on 5272.
+- */
+-static void __inline__ fec_uncache(unsigned long addr)
+-{
++ if (fep->old_linkstatus != fep->linkstatus) {
++ fec_link_change(dev);
++ }
++ mod_timer(fep->phy_timer, link_poll_interval);
+ }
+-
+-/* ------------------------------------------------------------------------- */
+-
+-#elif defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x)
++#endif
+
+ /*
+- * Code specific to Coldfire 5230/5231/5232/5234/5235,
+- * the 5270/5271/5274/5275 and 5280/5282 setups.
++ * Code specific to Freescale i.MXC
+ */
+-static void __inline__ fec_request_intrs(struct net_device *dev)
++static int fec_request_intrs(struct platform_device *pdev, struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- int b;
+- static const struct idesc {
+- char *name;
+- unsigned short irq;
+- } *idp, id[] = {
+- { "fec(TXF)", 23 },
+- { "fec(RXF)", 27 },
+- { "fec(MII)", 29 },
+- { NULL },
+- };
++ int ret;
++ struct fec_enet_private *fep = netdev_priv(dev);
+
+- fep = netdev_priv(dev);
+- b = (fep->index) ? 128 : 64;
++ fep->etn_irq = platform_get_irq(pdev, 0);
++ fep->mii_irq = platform_get_irq(pdev, 1);
+
+ /* Setup interrupt handlers. */
+- for (idp = id; idp->name; idp++) {
+- if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name, dev) != 0)
+- printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq);
+- }
+-
+- /* Unmask interrupts at ColdFire 5280/5282 interrupt controller */
+- {
+- volatile unsigned char *icrp;
+- volatile unsigned long *imrp;
+- int i, ilip;
+-
+- b = (fep->index) ? MCFICM_INTC1 : MCFICM_INTC0;
+- icrp = (volatile unsigned char *) (MCF_IPSBAR + b +
+- MCFINTC_ICR0);
+- for (i = 23, ilip = 0x28; (i < 36); i++)
+- icrp[i] = ilip--;
+-
+- imrp = (volatile unsigned long *) (MCF_IPSBAR + b +
+- MCFINTC_IMRH);
+- *imrp &= ~0x0000000f;
+- imrp = (volatile unsigned long *) (MCF_IPSBAR + b +
+- MCFINTC_IMRL);
+- *imrp &= ~0xff800001;
+- }
+-
+-#if defined(CONFIG_M528x)
+- /* Set up gpio outputs for MII lines */
+- {
+- volatile u16 *gpio_paspar;
+- volatile u8 *gpio_pehlpar;
+-
+- gpio_paspar = (volatile u16 *) (MCF_IPSBAR + 0x100056);
+- gpio_pehlpar = (volatile u16 *) (MCF_IPSBAR + 0x100058);
+- *gpio_paspar |= 0x0f00;
+- *gpio_pehlpar = 0xc0;
++ ret = request_irq(fep->etn_irq, fec_enet_interrupt, 0, "fec", dev);
++ if (ret != 0) {
++ printk(KERN_ERR "FEC: Could not allocate FEC IRQ(%d)!\n", fep->etn_irq);
++ return ret;
++ }
++#ifndef CONFIG_PHYLIB
++ if (fep->mii_irq >= 0) {
++ /* TODO: disable now due to CPLD issue */
++ ret = request_irq(fep->mii_irq, mii_link_interrupt, 0, "fec(MII)", dev);
++ if (ret != 0) {
++ printk(KERN_ERR "FEC: Could not allocate FEC(MII) IRQ(%d)!\n",
++ fep->mii_irq);
++ free_irq(fep->etn_irq, dev);
++ return ret;
++ }
++ /*
++ * board specific workaround should be done in board specific code
++ * This is unsafe anyway. An interrupt might have been asserted
++ * already. Use IRQ_NOAUTOEN with request_irq() to have irq initially disabled.
++ */
++ fep->phy_int_enabled = 1;
++ } else {
++ fep->phy_timer = kzalloc(sizeof(struct timer_list), GFP_KERNEL);
++ if (fep->phy_timer == NULL) {
++ free_irq(fep->etn_irq, dev);
++ return -ENOMEM;
++ }
++ init_timer(fep->phy_timer);
++ fep->phy_timer->function = fec_phy_timer;
++ fep->phy_timer->data = (unsigned long)dev;
++ fec_link_change(dev);
+ }
+ #endif
+
+-#if defined(CONFIG_M527x)
+- /* Set up gpio outputs for MII lines */
+- {
+- volatile u8 *gpio_par_fec;
+- volatile u16 *gpio_par_feci2c;
+-
+- gpio_par_feci2c = (volatile u16 *)(MCF_IPSBAR + 0x100082);
+- /* Set up gpio outputs for FEC0 MII lines */
+- gpio_par_fec = (volatile u8 *)(MCF_IPSBAR + 0x100078);
+-
+- *gpio_par_feci2c |= 0x0f00;
+- *gpio_par_fec |= 0xc0;
++ return 0;
++}
+
+-#if defined(CONFIG_FEC2)
+- /* Set up gpio outputs for FEC1 MII lines */
+- gpio_par_fec = (volatile u8 *)(MCF_IPSBAR + 0x100079);
++static void __inline__ fec_release_intrs(struct net_device *dev)
++{
++ struct fec_enet_private *fep = netdev_priv(dev);
+
+- *gpio_par_feci2c |= 0x00a0;
+- *gpio_par_fec |= 0xc0;
+-#endif /* CONFIG_FEC2 */
++ free_irq(fep->etn_irq, dev);
++#ifndef CONFIG_PHYLIB
++ if (fep->mii_irq >= 0) {
++ free_irq(fep->mii_irq, dev);
+ }
+-#endif /* CONFIG_M527x */
++#endif
+ }
+
+ static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)
+ {
+- volatile fec_t *fecp;
++ u32 rate;
++ struct clk *clk;
+
+- fecp = fep->hwp;
+- fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;
+- fecp->fec_x_cntrl = 0x00;
++ fec_reg_write(fep, FEC_RCR, OPT_FRAME_SIZE | 0x04);
++ fec_reg_write(fep, FEC_TCR, 0x00);
+
+- /*
++ /*
+ * Set MII speed to 2.5 MHz
+- * See 5282 manual section 17.5.4.7: MSCR
+ */
+- fep->phy_speed = ((((MCF_CLK / 2) / (2500000 / 10)) + 5) / 10) * 2;
+- fecp->fec_mii_speed = fep->phy_speed;
++ clk = clk_get(fep->dma_dev, "fec_clk");
++ rate = clk_get_rate(clk);
++ clk_put(clk);
+
+- fec_restart(dev, 0);
++ fep->phy_speed = ((((rate / 2 + 4999999) / 2500000) / 2) & 0x3F) << 1;
++ fec_reg_write(fep, FEC_MSCR, fep->phy_speed);
+ }
+
+-static void __inline__ fec_get_mac(struct net_device *dev)
++static const unsigned char default_mac[ETH_ALEN] = {
++ 0x00, 0x04, 0x9f, 0x00, 0x74, 0x4a,
++};
++
++#define FEC_IIM_BASE IO_ADDRESS(IIM_BASE_ADDR)
++static void fec_get_mac(struct net_device *dev)
+ {
++#if 1
++ // keep bootloader assigned MAC address
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile fec_t *fecp;
+- unsigned char *iap, tmpaddr[ETH_ALEN];
+-
+- fecp = fep->hwp;
++ unsigned long eth_addr = fec_reg_read(fep, FEC_PALR);
++ dev->dev_addr[0] = eth_addr >> 24;
++ dev->dev_addr[1] = eth_addr >> 16;
++ dev->dev_addr[2] = eth_addr >> 8;
++ dev->dev_addr[3] = eth_addr >> 0;
++ eth_addr = fec_reg_read(fep, FEC_PAUR);
++ dev->dev_addr[5] = eth_addr >> 16;
++ dev->dev_addr[4] = eth_addr >> 24;
++#else
++ int i;
++ unsigned long fec_mac_base = FEC_IIM_BASE + MXC_IIMKEY0;
+
+- if (FEC_FLASHMAC) {
+- /*
+- * Get MAC address from FLASH.
+- * If it is all 1's or 0's, use the default.
+- */
+- iap = FEC_FLASHMAC;
+- if ((iap[0] == 0) && (iap[1] == 0) && (iap[2] == 0) &&
+- (iap[3] == 0) && (iap[4] == 0) && (iap[5] == 0))
+- iap = fec_mac_default;
+- if ((iap[0] == 0xff) && (iap[1] == 0xff) && (iap[2] == 0xff) &&
+- (iap[3] == 0xff) && (iap[4] == 0xff) && (iap[5] == 0xff))
+- iap = fec_mac_default;
+- } else {
+- *((unsigned long *) &tmpaddr[0]) = fecp->fec_addr_low;
+- *((unsigned short *) &tmpaddr[4]) = (fecp->fec_addr_high >> 16);
+- iap = &tmpaddr[0];
++ if (cpu_is_mx27_rev(CHIP_REV_2_0) > 0) {
++ fec_mac_base = FEC_IIM_BASE + MXC_IIMMAC;
+ }
+
+- memcpy(dev->dev_addr, iap, ETH_ALEN);
+-
+- /* Adjust MAC if using default MAC address */
+- if (iap == fec_mac_default)
+- dev->dev_addr[ETH_ALEN-1] = fec_mac_default[ETH_ALEN-1] + fep->index;
++ DBG(0, "%s: Reading MAC address from %08lx\n", __FUNCTION__, fec_mac_base);
++ for (i = 0; i < ETH_ALEN; i++) {
++ dev->dev_addr[ETH_ALEN - 1 - i] = __raw_readb(fec_mac_base + i * 4);
++ }
++ //memcpy(dev->dev_addr, default_mac, ETH_ALEN);
++#endif
+ }
+
+-static void __inline__ fec_enable_phy_intr(void)
++#ifdef CONFIG_PHYLIB
++static void __inline__ fec_enable_phy_intr(struct fec_enet_private *fep)
+ {
+ }
+-
+-static void __inline__ fec_disable_phy_intr(void)
++static void __inline__ fec_disable_phy_intr(struct fec_enet_private *fep)
+ {
+ }
+-
+-static void __inline__ fec_phy_ack_intr(void)
++static void __inline__ fec_phy_ack_intr(struct fec_enet_private *fep)
+ {
+ }
+-
+-static void __inline__ fec_localhw_setup(void)
++#else
++static void __inline__ fec_enable_phy_intr(struct fec_enet_private *fep)
+ {
+-}
+-
+-/*
+- * Do not need to make region uncached on 5272.
+- */
+-static void __inline__ fec_uncache(unsigned long addr)
+-{
+-}
+-
+-/* ------------------------------------------------------------------------- */
+-
+-#elif defined(CONFIG_M520x)
+-
+-/*
+- * Code specific to Coldfire 520x
+- */
+-static void __inline__ fec_request_intrs(struct net_device *dev)
+-{
+- struct fec_enet_private *fep;
+- int b;
+- static const struct idesc {
+- char *name;
+- unsigned short irq;
+- } *idp, id[] = {
+- { "fec(TXF)", 23 },
+- { "fec(RXF)", 27 },
+- { "fec(MII)", 29 },
+- { NULL },
+- };
+-
+- fep = netdev_priv(dev);
+- b = 64 + 13;
+-
+- /* Setup interrupt handlers. */
+- for (idp = id; idp->name; idp++) {
+- if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name,dev) != 0)
+- printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq);
+- }
+-
+- /* Unmask interrupts at ColdFire interrupt controller */
+- {
+- volatile unsigned char *icrp;
+- volatile unsigned long *imrp;
+-
+- icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
+- MCFINTC_ICR0);
+- for (b = 36; (b < 49); b++)
+- icrp[b] = 0x04;
+- imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 +
+- MCFINTC_IMRH);
+- *imrp &= ~0x0001FFF0;
++ if (!fep->phy_int_enabled) {
++ fep->phy_int_enabled = 1;
++ enable_irq(fep->mii_irq);
+ }
+- *(volatile unsigned char *)(MCF_IPSBAR + MCF_GPIO_PAR_FEC) |= 0xf0;
+- *(volatile unsigned char *)(MCF_IPSBAR + MCF_GPIO_PAR_FECI2C) |= 0x0f;
+ }
+
+-static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)
++static void __inline__ fec_disable_phy_intr(struct fec_enet_private *fep)
+ {
+- volatile fec_t *fecp;
+-
+- fecp = fep->hwp;
+- fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;
+- fecp->fec_x_cntrl = 0x00;
+-
+- /*
+- * Set MII speed to 2.5 MHz
+- * See 5282 manual section 17.5.4.7: MSCR
+- */
+- fep->phy_speed = ((((MCF_CLK / 2) / (2500000 / 10)) + 5) / 10) * 2;
+- fecp->fec_mii_speed = fep->phy_speed;
+-
+- fec_restart(dev, 0);
+-}
+-
+-static void __inline__ fec_get_mac(struct net_device *dev)
+-{
+- struct fec_enet_private *fep = netdev_priv(dev);
+- volatile fec_t *fecp;
+- unsigned char *iap, tmpaddr[ETH_ALEN];
+-
+- fecp = fep->hwp;
+-
+- if (FEC_FLASHMAC) {
+- /*
+- * Get MAC address from FLASH.
+- * If it is all 1's or 0's, use the default.
+- */
+- iap = FEC_FLASHMAC;
+- if ((iap[0] == 0) && (iap[1] == 0) && (iap[2] == 0) &&
+- (iap[3] == 0) && (iap[4] == 0) && (iap[5] == 0))
+- iap = fec_mac_default;
+- if ((iap[0] == 0xff) && (iap[1] == 0xff) && (iap[2] == 0xff) &&
+- (iap[3] == 0xff) && (iap[4] == 0xff) && (iap[5] == 0xff))
+- iap = fec_mac_default;
+- } else {
+- *((unsigned long *) &tmpaddr[0]) = fecp->fec_addr_low;
+- *((unsigned short *) &tmpaddr[4]) = (fecp->fec_addr_high >> 16);
+- iap = &tmpaddr[0];
++ if (fep->phy_int_enabled) {
++ disable_irq(fep->mii_irq);
++ fep->phy_int_enabled = 0;
+ }
+-
+- memcpy(dev->dev_addr, iap, ETH_ALEN);
+-
+- /* Adjust MAC if using default MAC address */
+- if (iap == fec_mac_default)
+- dev->dev_addr[ETH_ALEN-1] = fec_mac_default[ETH_ALEN-1] + fep->index;
+-}
+-
+-static void __inline__ fec_enable_phy_intr(void)
+-{
+-}
+-
+-static void __inline__ fec_disable_phy_intr(void)
+-{
+-}
+-
+-static void __inline__ fec_phy_ack_intr(void)
+-{
+-}
+-
+-static void __inline__ fec_localhw_setup(void)
+-{
+ }
+
+-static void __inline__ fec_uncache(unsigned long addr)
++static void __inline__ fec_phy_ack_intr(struct fec_enet_private *fep)
+ {
+-}
+-
+-/* ------------------------------------------------------------------------- */
+-
+-#elif defined(CONFIG_M532x)
+-/*
+- * Code specific for M532x
+- */
+-static void __inline__ fec_request_intrs(struct net_device *dev)
+-{
+- struct fec_enet_private *fep;
+- int b;
+- static const struct idesc {
+- char *name;
+- unsigned short irq;
+- } *idp, id[] = {
+- { "fec(TXF)", 36 },
+- { "fec(RXF)", 40 },
+- { "fec(MII)", 42 },
+- { NULL },
+- };
+-
+- fep = netdev_priv(dev);
+- b = (fep->index) ? 128 : 64;
+-
+- /* Setup interrupt handlers. */
+- for (idp = id; idp->name; idp++) {
+- if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name,dev) != 0)
+- printk("FEC: Could not allocate %s IRQ(%d)!\n",
+- idp->name, b+idp->irq);
+- }
+-
+- /* Unmask interrupts */
+- MCF_INTC0_ICR36 = 0x2;
+- MCF_INTC0_ICR37 = 0x2;
+- MCF_INTC0_ICR38 = 0x2;
+- MCF_INTC0_ICR39 = 0x2;
+- MCF_INTC0_ICR40 = 0x2;
+- MCF_INTC0_ICR41 = 0x2;
+- MCF_INTC0_ICR42 = 0x2;
+- MCF_INTC0_ICR43 = 0x2;
+- MCF_INTC0_ICR44 = 0x2;
+- MCF_INTC0_ICR45 = 0x2;
+- MCF_INTC0_ICR46 = 0x2;
+- MCF_INTC0_ICR47 = 0x2;
+- MCF_INTC0_ICR48 = 0x2;
+-
+- MCF_INTC0_IMRH &= ~(
+- MCF_INTC_IMRH_INT_MASK36 |
+- MCF_INTC_IMRH_INT_MASK37 |
+- MCF_INTC_IMRH_INT_MASK38 |
+- MCF_INTC_IMRH_INT_MASK39 |
+- MCF_INTC_IMRH_INT_MASK40 |
+- MCF_INTC_IMRH_INT_MASK41 |
+- MCF_INTC_IMRH_INT_MASK42 |
+- MCF_INTC_IMRH_INT_MASK43 |
+- MCF_INTC_IMRH_INT_MASK44 |
+- MCF_INTC_IMRH_INT_MASK45 |
+- MCF_INTC_IMRH_INT_MASK46 |
+- MCF_INTC_IMRH_INT_MASK47 |
+- MCF_INTC_IMRH_INT_MASK48 );
+-
+- /* Set up gpio outputs for MII lines */
+- MCF_GPIO_PAR_FECI2C |= (0 |
+- MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC |
+- MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO);
+- MCF_GPIO_PAR_FEC = (0 |
+- MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC |
+- MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC);
+-}
+-
+-static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)
+-{
+- volatile fec_t *fecp;
+-
+- fecp = fep->hwp;
+- fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;
+- fecp->fec_x_cntrl = 0x00;
+-
+- /*
+- * Set MII speed to 2.5 MHz
+- */
+- fep->phy_speed = ((((MCF_CLK / 2) / (2500000 / 10)) + 5) / 10) * 2;
+- fecp->fec_mii_speed = fep->phy_speed;
+-
+- fec_restart(dev, 0);
+-}
+-
+-static void __inline__ fec_get_mac(struct net_device *dev)
+-{
+- struct fec_enet_private *fep = netdev_priv(dev);
+- volatile fec_t *fecp;
+- unsigned char *iap, tmpaddr[ETH_ALEN];
+-
+- fecp = fep->hwp;
+-
+- if (FEC_FLASHMAC) {
+- /*
+- * Get MAC address from FLASH.
+- * If it is all 1's or 0's, use the default.
+- */
+- iap = FEC_FLASHMAC;
+- if ((iap[0] == 0) && (iap[1] == 0) && (iap[2] == 0) &&
+- (iap[3] == 0) && (iap[4] == 0) && (iap[5] == 0))
+- iap = fec_mac_default;
+- if ((iap[0] == 0xff) && (iap[1] == 0xff) && (iap[2] == 0xff) &&
+- (iap[3] == 0xff) && (iap[4] == 0xff) && (iap[5] == 0xff))
+- iap = fec_mac_default;
+- } else {
+- *((unsigned long *) &tmpaddr[0]) = fecp->fec_addr_low;
+- *((unsigned short *) &tmpaddr[4]) = (fecp->fec_addr_high >> 16);
+- iap = &tmpaddr[0];
++ if (fep->phy_int_enabled) {
++ disable_irq(fep->mii_irq);
++ fep->phy_int_enabled = 0;
+ }
+-
+- memcpy(dev->dev_addr, iap, ETH_ALEN);
+-
+- /* Adjust MAC if using default MAC address */
+- if (iap == fec_mac_default)
+- dev->dev_addr[ETH_ALEN-1] = fec_mac_default[ETH_ALEN-1] + fep->index;
+ }
+-
+-static void __inline__ fec_enable_phy_intr(void)
+-{
+-}
+-
+-static void __inline__ fec_disable_phy_intr(void)
+-{
+-}
+-
+-static void __inline__ fec_phy_ack_intr(void)
+-{
+-}
+-
+-static void __inline__ fec_localhw_setup(void)
+-{
+-}
+-
+-/*
+- * Do not need to make region uncached on 532x.
+- */
+-static void __inline__ fec_uncache(unsigned long addr)
+-{
+-}
+-
+-/* ------------------------------------------------------------------------- */
+-
+-
+-#else
+-
+-/*
+- * Code specific to the MPC860T setup.
+- */
+-static void __inline__ fec_request_intrs(struct net_device *dev)
+-{
+- volatile immap_t *immap;
+-
+- immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */
+-
+- if (request_8xxirq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0)
+- panic("Could not allocate FEC IRQ!");
+-}
+-
+-static void __inline__ fec_get_mac(struct net_device *dev)
+-{
+- bd_t *bd;
+-
+- bd = (bd_t *)__res;
+- memcpy(dev->dev_addr, bd->bi_enetaddr, ETH_ALEN);
+-}
+-
+-static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)
+-{
+- extern uint _get_IMMR(void);
+- volatile immap_t *immap;
+- volatile fec_t *fecp;
+-
+- fecp = fep->hwp;
+- immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */
+-
+- /* Configure all of port D for MII.
+- */
+- immap->im_ioport.iop_pdpar = 0x1fff;
+-
+- /* Bits moved from Rev. D onward.
+- */
+- if ((_get_IMMR() & 0xffff) < 0x0501)
+- immap->im_ioport.iop_pddir = 0x1c58; /* Pre rev. D */
+- else
+- immap->im_ioport.iop_pddir = 0x1fff; /* Rev. D and later */
+-
+- /* Set MII speed to 2.5 MHz
+- */
+- fecp->fec_mii_speed = fep->phy_speed =
+- ((bd->bi_busfreq * 1000000) / 2500000) & 0x7e;
+-}
+-
+-static void __inline__ fec_enable_phy_intr(void)
+-{
+- volatile fec_t *fecp;
+-
+- fecp = fep->hwp;
+-
+- /* Enable MII command finished interrupt
+- */
+- fecp->fec_ivec = (FEC_INTERRUPT/2) << 29;
+-}
+-
+-static void __inline__ fec_disable_phy_intr(void)
+-{
+-}
+-
+-static void __inline__ fec_phy_ack_intr(void)
+-{
+-}
+-
+-static void __inline__ fec_localhw_setup(void)
+-{
+- volatile fec_t *fecp;
+-
+- fecp = fep->hwp;
+- fecp->fec_r_hash = PKT_MAXBUF_SIZE;
+- /* Enable big endian and don't care about SDMA FC.
+- */
+- fecp->fec_fun_code = 0x78000000;
+-}
+-
+-static void __inline__ fec_uncache(unsigned long addr)
+-{
+- pte_t *pte;
+- pte = va_to_pte(mem_addr);
+- pte_val(*pte) |= _PAGE_NO_CACHE;
+- flush_tlb_page(init_mm.mmap, mem_addr);
+-}
+-
+ #endif
+
+ /* ------------------------------------------------------------------------- */
+
++#ifndef CONFIG_PHYLIB
+ static void mii_display_status(struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+
+- if (!fep->link && !fep->old_link) {
++ if (!fep->linkstatus && !fep->old_linkstatus) {
+ /* Link is still down - don't print anything */
+ return;
+ }
+
+ printk("%s: status: ", dev->name);
+
+- if (!fep->link) {
++ if (!fep->linkstatus) {
+ printk("link down");
+ } else {
+ printk("link up");
+
+- switch(*s & PHY_STAT_SPMASK) {
++ switch(fep->phy_status & PHY_STAT_SPMASK) {
+ case PHY_STAT_100FDX: printk(", 100MBit Full Duplex"); break;
+ case PHY_STAT_100HDX: printk(", 100MBit Half Duplex"); break;
+ case PHY_STAT_10FDX: printk(", 10MBit Full Duplex"); break;
+@@ -1880,20 +1687,19 @@ static void mii_display_status(struct ne
+ printk(", Unknown speed/duplex");
+ }
+
+- if (*s & PHY_STAT_ANC)
++ if (fep->phy_status & PHY_STAT_ANC)
+ printk(", auto-negotiation complete");
+ }
+
+- if (*s & PHY_STAT_FAULT)
++ if (fep->phy_status & PHY_STAT_FAULT)
+ printk(", remote fault");
+
+ printk(".\n");
+ }
+
+-static void mii_display_config(struct work_struct *work)
++static void mii_display_config(struct work_struct *w)
+ {
+- struct fec_enet_private *fep = container_of(work, struct fec_enet_private, phy_task);
+- struct net_device *dev = fep->netdev;
++ struct fec_enet_private *fep = container_of(w, struct fec_enet_private, phy_task);
+ uint status = fep->phy_status;
+
+ /*
+@@ -1901,7 +1707,7 @@ static void mii_display_config(struct wo
+ ** the workqueue. It is thus safe to allow to reuse it.
+ */
+ fep->mii_phy_task_queued = 0;
+- printk("%s: config: auto-negotiation ", dev->name);
++ //printk("%s: config: auto-negotiation ", dev->name);
+
+ if (status & PHY_CONF_ANE)
+ printk("on");
+@@ -1926,11 +1732,21 @@ static void mii_display_config(struct wo
+
+ fep->sequence_done = 1;
+ }
++#endif
++
++#ifndef CONFIG_PHYLIB
++static inline void *priv_netdev(struct fec_enet_private *fep)
++{
++ /* ugly hack, stolen from include linux/netdevice.h */
++ return (char *)fep - ((sizeof(struct net_device)
++ + NETDEV_ALIGN_CONST)
++ & ~NETDEV_ALIGN_CONST);
++}
+
+-static void mii_relink(struct work_struct *work)
++static void mii_relink(struct work_struct *w)
+ {
+- struct fec_enet_private *fep = container_of(work, struct fec_enet_private, phy_task);
+- struct net_device *dev = fep->netdev;
++ struct fec_enet_private *fep = container_of(w, struct fec_enet_private, phy_task);
++ struct net_device *dev = priv_netdev(fep);
+ int duplex;
+
+ /*
+@@ -1938,23 +1754,19 @@ static void mii_relink(struct work_struc
+ ** the workqueue. It is thus safe to allow to reuse it.
+ */
+ fep->mii_phy_task_queued = 0;
+- fep->link = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0;
++ fep->linkstatus = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0;
+ mii_display_status(dev);
+- fep->old_link = fep->link;
++ fep->old_linkstatus = fep->linkstatus;
+
+- if (fep->link) {
++ if (fep->linkstatus) {
+ duplex = 0;
+- if (fep->phy_status
+- & (PHY_STAT_100FDX | PHY_STAT_10FDX))
++ if (fep->phy_status & (PHY_STAT_100FDX | PHY_STAT_10FDX)) {
+ duplex = 1;
++ }
+ fec_restart(dev, duplex);
+- } else
++ } else {
+ fec_stop(dev);
+-
+-#if 0
+- enable_irq(fep->mii_irq);
+-#endif
+-
++ }
+ }
+
+ /* mii_queue_relink is called in interrupt context from mii_link_interrupt */
+@@ -2004,15 +1816,14 @@ phy_cmd_t const phy_cmd_config[] = {
+ static void
+ mii_discover_phy3(uint mii_reg, struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ int i;
+
+- fep = netdev_priv(dev);
+ fep->phy_id |= (mii_reg & 0xffff);
+ printk("fec: PHY @ 0x%x, ID 0x%08x", fep->phy_addr, fep->phy_id);
+
+- for(i = 0; phy_info[i]; i++) {
+- if(phy_info[i]->id == (fep->phy_id >> 4))
++ for (i = 0; phy_info[i]; i++) {
++ if (phy_info[i]->id == (fep->phy_id >> 4))
+ break;
+ }
+
+@@ -2031,13 +1842,9 @@ mii_discover_phy3(uint mii_reg, struct n
+ static void
+ mii_discover_phy(uint mii_reg, struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *fecp;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ uint phytype;
+
+- fep = netdev_priv(dev);
+- fecp = fep->hwp;
+-
+ if (fep->phy_addr < 32) {
+ if ((phytype = (mii_reg & 0xffff)) != 0xffff && phytype != 0) {
+
+@@ -2045,37 +1852,41 @@ mii_discover_phy(uint mii_reg, struct ne
+ */
+ fep->phy_id = phytype << 16;
+ mii_queue(dev, mk_mii_read(MII_REG_PHYIR2),
+- mii_discover_phy3);
++ mii_discover_phy3);
+ } else {
+ fep->phy_addr++;
+ mii_queue(dev, mk_mii_read(MII_REG_PHYIR1),
+- mii_discover_phy);
++ mii_discover_phy);
+ }
+ } else {
+ printk("FEC: No PHY device found.\n");
+ /* Disable external MII interface */
+- fecp->fec_mii_speed = fep->phy_speed = 0;
+- fec_disable_phy_intr();
++ fep->phy_speed = 0;
++ fec_reg_write(fep, FEC_MSCR, fep->phy_speed);
++ fec_disable_phy_intr(fep);
+ }
+ }
++#endif
+
+-/* This interrupt occurs when the PHY detects a link change.
+-*/
+-#ifdef HAVE_mii_link_interrupt
++#ifndef CONFIG_PHYLIB
+ static irqreturn_t
+-mii_link_interrupt(int irq, void * dev_id)
++mii_link_interrupt(int irq, void *dev_id)
+ {
+- struct net_device *dev = dev_id;
++ struct net_device *dev = dev_id;
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+- fec_phy_ack_intr();
++ DBG(0, "%s: \n", __FUNCTION__);
+
+-#if 0
+- disable_irq(fep->mii_irq); /* disable now, enable later */
+-#endif
++ fec_phy_ack_intr(fep);
+
+- mii_do_cmd(dev, fep->phy->ack_int);
+- mii_do_cmd(dev, phy_cmd_relink); /* restart and display status */
++ /*
++ * Some board will trigger phy interrupt before phy enable.
++ * And at that moment , fep->phy is not initialized.
++ */
++ if (fep->phy) {
++ mii_do_cmd(dev, fep->phy->ack_int);
++ mii_do_cmd(dev, phy_cmd_relink); /* restart and display status */
++ }
+
+ return IRQ_HANDLED;
+ }
+@@ -2084,16 +1895,29 @@ mii_link_interrupt(int irq, void * dev_i
+ static int
+ fec_enet_open(struct net_device *dev)
+ {
++ int ret = 0;
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+ /* I should reset the ring buffers here, but I don't yet know
+ * a simple way to do that.
+ */
+- fec_set_mac_address(dev);
++ DBG(0, "%s: \n", __FUNCTION__);
++ _fec_set_mac_address(dev);
+
+- fep->sequence_done = 0;
+- fep->link = 0;
++#ifdef CONFIG_PHYLIB
++ ret = fec_connect_phy(dev, fep);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to connect to PHY: %d\n", __FUNCTION__, ret);
++ return ret;
++ }
++ phy_start(fep->phy);
+
++ fep->linkstatus = fep->phy->link;
++ fec_restart(dev, 0);
++ DBG(0, "%s: Link status is: %d\n", __FUNCTION__, fep->linkstatus);
++#else
++ fep->linkstatus = 0;
++ fep->sequence_done = 0;
+ if (fep->phy) {
+ mii_do_cmd(dev, fep->phy->ack_int);
+ mii_do_cmd(dev, fep->phy->config);
+@@ -2115,16 +1939,16 @@ fec_enet_open(struct net_device *dev)
+ * based on this device does not implement a PHY interrupt,
+ * so we are never notified of link change.
+ */
+- fep->link = 1;
++ fep->linkstatus = 1;
+ } else {
+- fep->link = 1; /* lets just try it and see */
++ fep->linkstatus = 1; /* lets just try it and see */
+ /* no phy, go full duplex, it's most likely a hub chip */
+ fec_restart(dev, 1);
+ }
+-
+- netif_start_queue(dev);
++ fep->old_linkstatus = fep->linkstatus;
++#endif
+ fep->opened = 1;
+- return 0; /* Success */
++ return ret;
+ }
+
+ static int
+@@ -2132,15 +1956,30 @@ fec_enet_close(struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+- /* Don't know what to do yet.
+- */
+- fep->opened = 0;
+- netif_stop_queue(dev);
+- fec_stop(dev);
++#ifdef CONFIG_PHYLIB
++ if (fep->phy) {
++ DBG(0, "%s: Stopping PHY %p\n", __FUNCTION__, fep->phy);
++ phy_stop(fep->phy);
+
++ DBG(0, "%s: Disconnecting PHY %p\n", __FUNCTION__, fep->phy);
++ phy_disconnect(fep->phy);
++ fep->phy = NULL;
++ }
++#endif
++ fep->opened = 0;
++ if (fep->linkstatus) {
++ fec_stop(dev);
++ }
+ return 0;
+ }
+
++static struct net_device_stats *fec_enet_get_stats(struct net_device *dev)
++{
++ struct fec_enet_private *fep = netdev_priv(dev);
++
++ return &fep->stats;
++}
++
+ /* Set or clear the multicast filter for this adaptor.
+ * Skeleton taken from sunlance driver.
+ * The CPM Ethernet implementation allows Multicast as well as individual
+@@ -2156,37 +1995,32 @@ fec_enet_close(struct net_device *dev)
+
+ static void set_multicast_list(struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *ep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ struct dev_mc_list *dmi;
+ unsigned int i, j, bit, data, crc;
+ unsigned char hash;
+
+- fep = netdev_priv(dev);
+- ep = fep->hwp;
+-
+- if (dev->flags&IFF_PROMISC) {
+- ep->fec_r_cntrl |= 0x0008;
++ if (dev->flags & IFF_PROMISC) {
++ fec_reg_write(fep, FEC_RCR, fec_reg_read(fep, FEC_RCR) | 0x0008);
+ } else {
+
+- ep->fec_r_cntrl &= ~0x0008;
++ fec_reg_write(fep, FEC_RCR, fec_reg_read(fep, FEC_RCR) & ~0x0008);
+
+ if (dev->flags & IFF_ALLMULTI) {
+ /* Catch all multicast addresses, so set the
+ * filter to all 1's.
+ */
+- ep->fec_grp_hash_table_high = 0xffffffff;
+- ep->fec_grp_hash_table_low = 0xffffffff;
++ fec_reg_write(fep, FEC_IAUR, 0xffffffff);
++ fec_reg_write(fep, FEC_IALR, 0xffffffff);
+ } else {
+ /* Clear filter and add the addresses in hash register.
+ */
+- ep->fec_grp_hash_table_high = 0;
+- ep->fec_grp_hash_table_low = 0;
++ fec_reg_write(fep, FEC_IAUR, 0);
++ fec_reg_write(fep, FEC_IALR, 0);
+
+ dmi = dev->mc_list;
+
+- for (j = 0; j < dev->mc_count; j++, dmi = dmi->next)
+- {
++ for (j = 0; j < dev->mc_count; j++, dmi = dmi->next) {
+ /* Only support group multicast for now.
+ */
+ if (!(dmi->dmi_addr[0] & 1))
+@@ -2196,11 +2030,9 @@ static void set_multicast_list(struct ne
+ */
+ crc = 0xffffffff;
+
+- for (i = 0; i < dmi->dmi_addrlen; i++)
+- {
++ for (i = 0; i < dmi->dmi_addrlen; i++) {
+ data = dmi->dmi_addr[i];
+- for (bit = 0; bit < 8; bit++, data >>= 1)
+- {
++ for (bit = 0; bit < 8; bit++, data >>= 1) {
+ crc = (crc >> 1) ^
+ (((crc ^ data) & 1) ? CRC32_POLY : 0);
+ }
+@@ -2212,9 +2044,13 @@ static void set_multicast_list(struct ne
+ hash = (crc >> (32 - HASH_BITS)) & 0x3f;
+
+ if (hash > 31)
+- ep->fec_grp_hash_table_high |= 1 << (hash - 32);
++ fec_reg_write(fep, FEC_IAUR,
++ fec_reg_read(fep, FEC_IAUR) |
++ (1 << (hash - 32)));
+ else
+- ep->fec_grp_hash_table_low |= 1 << hash;
++ fec_reg_write(fep, FEC_IALR,
++ fec_reg_read(fep, FEC_IALR) |
++ (1 << hash));
+ }
+ }
+ }
+@@ -2223,61 +2059,211 @@ static void set_multicast_list(struct ne
+ /* Set a MAC change in hardware.
+ */
+ static void
+-fec_set_mac_address(struct net_device *dev)
++_fec_set_mac_address(struct net_device *dev)
+ {
+- volatile fec_t *fecp;
+-
+- fecp = ((struct fec_enet_private *)netdev_priv(dev))->hwp;
++ struct fec_enet_private *fep = netdev_priv(dev);
+
+ /* Set station address. */
+- fecp->fec_addr_low = dev->dev_addr[3] | (dev->dev_addr[2] << 8) |
+- (dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24);
+- fecp->fec_addr_high = (dev->dev_addr[5] << 16) |
+- (dev->dev_addr[4] << 24);
++ fec_reg_write(fep, FEC_PALR, dev->dev_addr[3] | (dev->dev_addr[2] << 8) |
++ (dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24));
++ fec_reg_write(fep, FEC_PAUR, (dev->dev_addr[5] << 16) |
++ (dev->dev_addr[4] << 24));
++}
++
++static int
++fec_set_mac_address(struct net_device *dev, void *_addr)
++{
++ struct sockaddr *addr = _addr;
+
++ if (!is_valid_ether_addr((const char *)&addr->sa_data)) {
++ printk(KERN_WARNING "Bad ethernet address: %02x:%02x:%02x:%02x:%02x:%02x\n",
++ addr->sa_data[0], addr->sa_data[1], addr->sa_data[2], addr->sa_data[3],
++ addr->sa_data[4], addr->sa_data[5]);
++ return -EINVAL;
++ }
++ printk(KERN_DEBUG "Setting MAC address to %02x:%02x:%02x:%02x:%02x:%02x\n",
++ addr->sa_data[0], addr->sa_data[1], addr->sa_data[2], addr->sa_data[3],
++ addr->sa_data[4], addr->sa_data[5]);
++
++ memcpy(&dev->dev_addr, &addr->sa_data, ETH_ALEN);
++
++ _fec_set_mac_address(dev);
++
++ return 0;
+ }
+
+-/* Initialize the FEC Ethernet on 860T (or ColdFire 5272).
+- */
+- /*
+- * XXX: We need to clean up on failure exits here.
+- */
+-int __init fec_enet_init(struct net_device *dev)
++static void fec_enet_free_buffers(struct fec_enet_private *fep)
+ {
++ cbd_t *bdp = fep->rx_bd_base;
++ int i;
++
++ DBG(0, "%s: Freeing TX bounce buffers %p\n", __FUNCTION__, fep->tx_bounce[0]);
++ kfree(fep->tx_bounce[0]);
++ memset(fep->tx_bounce, 0, TX_RING_SIZE * sizeof(void*));
++ for (i = 0; i < RX_RING_SIZE; i++, bdp++) {
++ if (fep->rx_skbuff[i] != NULL) {
++ DBG(0, "%s: Freeing RX skb %p\n", __FUNCTION__, fep->rx_skbuff[i]);
++ fec_enet_rxbuf_unmap(fep, bdp, FEC_ENET_RX_FRSIZE);
++ kfree_skb(fep->rx_skbuff[i]);
++ fep->rx_skbuff[i] = NULL;
++ }
++ }
++}
++
++#ifdef CONFIG_PHYLIB
++/* called by the generic PHY layer in interrupt context */
++static int fec_mii_read(struct mii_bus *bus, int phy_id, int regnum)
++{
++ int ret;
++ struct net_device *dev = bus->priv;
+ struct fec_enet_private *fep = netdev_priv(dev);
+- unsigned long mem_addr;
+- volatile cbd_t *bdp;
+- cbd_t *cbd_base;
+- volatile fec_t *fecp;
+- int i, j;
+- static int index = 0;
++ unsigned long regval = mk_mii_read(regnum) | phy_id << 23;
++ unsigned long flags;
++ static int regs[32] = { [0 ... ARRAY_SIZE(regs) - 1] = -1};
+
+- /* Only allow us to be probed once. */
+- if (index >= FEC_MAX_PORTS)
+- return -ENXIO;
++ spin_lock_irqsave(&fep->lock, flags);
++ fep->mii_complete = 0;
++ fec_reg_write(fep, FEC_MMFR, regval);
++ spin_unlock_irqrestore(&fep->lock, flags);
++
++ while (!fep->mii_complete) {
++ cpu_relax();
++ }
++
++ ret = fec_reg_read(fep, FEC_MMFR) & 0xffff;
++ if (ret < 0) {
++ DBG(0, "%s: Failed to read PHY[%02x] reg %02x: %d\n", __FUNCTION__,
++ phy_id, regnum, ret);
++ } else if (regs[regnum] != ret) {
++ DBG(1, "%s: Read %04x from PHY[%02x] reg %02x\n", __FUNCTION__,
++ ret, phy_id, regnum);
++ regs[regnum] = ret;
++ }
++ return ret;
++}
+
+- /* Allocate memory for buffer descriptors.
+- */
+- mem_addr = __get_free_page(GFP_KERNEL);
+- if (mem_addr == 0) {
+- printk("FEC: allocate descriptor memory failed?\n");
++static int fec_mii_write(struct mii_bus *bus, int phy_id, int regnum, u16 val)
++{
++ struct net_device *dev = bus->priv;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ unsigned long regval = mk_mii_write(regnum, val) | phy_id << 23;
++ unsigned long flags;
++
++ spin_lock_irqsave(&fep->lock, flags);
++ fep->mii_complete = 0;
++ fec_reg_write(fep, FEC_MMFR, regval);
++ spin_unlock_irqrestore(&fep->lock, flags);
++
++ while (!fep->mii_complete) {
++ cpu_relax();
++ }
++ DBG(1, "%s: Wrote %04x to PHY[%02x] reg %02x\n", __FUNCTION__, val, phy_id, regnum);
++ return 0;
++}
++
++static int fec_mii_reset(struct mii_bus *bus)
++{
++ return 0;
++}
++
++static int fec_init_phy(struct net_device *dev, struct fec_enet_private *fep)
++{
++ int ret;
++ int i;
++ struct mii_bus *mii;
++
++ mii = mdiobus_alloc();
++ if (mii == NULL) {
+ return -ENOMEM;
+ }
++ mii->name = "fec mii";
++ mii->read = fec_mii_read;
++ mii->write = fec_mii_write;
++ mii->reset = fec_mii_reset;
++ mii->priv = dev;
++ snprintf(mii->id, MII_BUS_ID_SIZE, "%x", 0);
++ mii->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
++ for (i = 0; i < PHY_MAX_ADDR; i++) {
++ mii->irq[i] = fep->mii_irq >= 0 ? fep->mii_irq : PHY_POLL;
++ }
++
++ ret = mdiobus_register(mii);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to register MII bus: %d\n", __FUNCTION__, ret);
++ kfree(mii->irq);
++ mdiobus_free(mii);
++ return ret;
++ }
++ fep->phy_addr = -1;
++ DBG(0, "%s: MII bus registered\n", __FUNCTION__);
++ for (i = 0; i < PHY_MAX_ADDR; i++) {
++ if (mii->phy_map[i] != NULL) {
++ fep->phy_addr = i;
++ break;
++ }
++ }
++ if (fep->phy_addr == -1) {
++ DBG(0, "%s: No PHY found\n", __FUNCTION__);
++ return -ENODEV;
++ }
++ DBG(0, "%s: Using PHY at addr %02x\n", __FUNCTION__, fep->phy_addr);
++ fep->mii = mii;
+
+- spin_lock_init(&fep->hw_lock);
+- spin_lock_init(&fep->mii_lock);
++ return 0;
++}
+
+- /* Create an Ethernet device instance.
+- */
+- fecp = (volatile fec_t *) fec_hw[index];
++static int fec_connect_phy(struct net_device *dev, struct fec_enet_private *fep)
++{
++ struct mii_bus *mii = fep->mii;
++
++ fep->phy = phy_connect(dev, mii->phy_map[fep->phy_addr]->dev.bus_id,
++ fec_link_change, 0, mii->phy_map[fep->phy_addr]->interface);
++ if (IS_ERR(fep->phy)) {
++ int ret = PTR_ERR(fep->phy);
++ printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
++ fep->phy = NULL;
++ return ret;
++ }
++ DBG(0, "%s: Registered PHY %s[%02x] IRQ %d with %s\n", __FUNCTION__,
++ fep->phy->dev.bus_id, fep->phy_addr, fep->phy->irq, dev->name);
++
++ return 0;
++}
++#else
++static int fec_init_phy(struct net_device *dev, struct fec_enet_private *fep)
++{
++ /* Queue up command to detect the PHY and initialize the
++ * remainder of the interface.
++ */
++ fep->phy_id_done = 0;
++ fep->phy_addr = 0;
++ mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy);
++
++ return 0;
++}
++#endif
+
+- fep->index = index;
+- fep->hwp = fecp;
+- fep->netdev = dev;
++/* Initialize the FEC Ethernet on 860T (or ColdFire 5272).
++ */
++ /*
++ * XXX: We need to clean up on failure exits here.
++ */
++#define res_len(r) ((r)->end - (r)->start + 1)
++
++int __devinit fec_enet_init(struct platform_device *pdev, struct net_device *dev)
++{
++ int ret;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
++ struct sk_buff *pskb;
++ int i;
++ void *mem;
++
++ spin_lock_init(&fep->lock);
+
+ /* Whack a reset. We should wait for this.
+ */
+- fecp->fec_ecntrl = 1;
++ fec_reg_write(fep, FEC_ECR, 1);
+ udelay(10);
+
+ /* Set the Ethernet address. If using multiple Enets on the 8xx,
+@@ -2288,41 +2274,36 @@ int __init fec_enet_init(struct net_devi
+ */
+ fec_get_mac(dev);
+
+- cbd_base = (cbd_t *)mem_addr;
+- /* XXX: missing check for allocation failure */
+-
+- fec_uncache(mem_addr);
+-
+- /* Set receive and transmit descriptor base.
+- */
+- fep->rx_bd_base = cbd_base;
+- fep->tx_bd_base = cbd_base + RX_RING_SIZE;
+-
+ fep->dirty_tx = fep->cur_tx = fep->tx_bd_base;
+ fep->cur_rx = fep->rx_bd_base;
+
+ fep->skb_cur = fep->skb_dirty = 0;
+
+- /* Initialize the receive buffer descriptors.
+- */
+- bdp = fep->rx_bd_base;
+- for (i=0; i<FEC_ENET_RX_PAGES; i++) {
++ /* allocate memory for TX bounce buffers */
++ mem = kzalloc(TX_RING_SIZE * FEC_ENET_TX_FRSIZE, GFP_KERNEL);
++ if (mem == NULL) {
++ return -ENOMEM;
++ }
+
+- /* Allocate a page.
+- */
+- mem_addr = __get_free_page(GFP_KERNEL);
+- /* XXX: missing check for allocation failure */
++ fec_enet_cbd_get(fep);
+
+- fec_uncache(mem_addr);
++ /* Initialize the transmit buffer descriptors.
++ */
++ bdp = fep->tx_bd_base;
++
++ DBG(0, "%s: Allocated %d byte of TX buffer memory @ %p\n", __FUNCTION__,
++ TX_RING_SIZE * FEC_ENET_TX_FRSIZE, mem);
++ for (i = 0; i < TX_RING_SIZE; i++) {
++ fep->tx_bounce[i] = mem;
++ DBG(0, "%s: TX bounce buffer[%d]=%p\n", __FUNCTION__, i, fep->tx_bounce[i]);
++ mem = (void *)((unsigned long)(mem + FEC_ENET_TX_FRSIZE));
+
+ /* Initialize the BD for every fragment in the page.
+ */
+- for (j=0; j<FEC_ENET_RX_FRPPG; j++) {
+- bdp->cbd_sc = BD_ENET_RX_EMPTY;
+- bdp->cbd_bufaddr = __pa(mem_addr);
+- mem_addr += FEC_ENET_RX_FRSIZE;
+- bdp++;
+- }
++ /* already zeroed by kzalloc */
++ //bdp->cbd_sc = 0;
++ bdp->cbd_bufaddr = ~0;
++ bdp++;
+ }
+
+ /* Set the last buffer to wrap.
+@@ -2330,80 +2311,77 @@ int __init fec_enet_init(struct net_devi
+ bdp--;
+ bdp->cbd_sc |= BD_SC_WRAP;
+
+- /* ...and the same for transmmit.
++ /* ...and the same for receive.
+ */
+- bdp = fep->tx_bd_base;
+- for (i=0, j=FEC_ENET_TX_FRPPG; i<TX_RING_SIZE; i++) {
+- if (j >= FEC_ENET_TX_FRPPG) {
+- mem_addr = __get_free_page(GFP_KERNEL);
+- j = 1;
+- } else {
+- mem_addr += FEC_ENET_TX_FRSIZE;
+- j++;
++ bdp = fep->rx_bd_base;
++ for (i = 0; i < RX_RING_SIZE; i++, bdp++) {
++ pskb = __dev_alloc_skb(FEC_ENET_RX_FRSIZE, GFP_KERNEL);
++ if (pskb == NULL) {
++ DBG(0, "%s: Failed to allocate RX skb; cleaning up\n", __FUNCTION__);
++ fec_enet_free_buffers(fep);
++ fec_enet_cbd_put(fep);
++ return -ENOMEM;
+ }
+- fep->tx_bounce[i] = (unsigned char *) mem_addr;
+-
+- /* Initialize the BD for every fragment in the page.
+- */
+- bdp->cbd_sc = 0;
+- bdp->cbd_bufaddr = 0;
+- bdp++;
++ DBG(0, "%s: RX skb allocated @ %p\n", __FUNCTION__, pskb);
++ fep->rx_skbuff[i] = pskb;
++ pskb->data = FEC_ADDR_ALIGNMENT(pskb->data);
++ bdp->cbd_sc = BD_ENET_RX_EMPTY;
++ bdp->cbd_bufaddr = ~0;
++ fec_enet_rxbuf_map(fep, bdp, pskb->data, FEC_ENET_RX_FRSIZE);
+ }
+-
+ /* Set the last buffer to wrap.
+ */
+ bdp--;
+ bdp->cbd_sc |= BD_SC_WRAP;
++ fec_enet_cbd_put(fep);
+
+ /* Set receive and transmit descriptor base.
+ */
+- fecp->fec_r_des_start = __pa((uint)(fep->rx_bd_base));
+- fecp->fec_x_des_start = __pa((uint)(fep->tx_bd_base));
+-
++ fec_reg_write(fep, FEC_ERDSR, fep->cbd_phys_base);
++ fec_reg_write(fep, FEC_ETDSR, fep->cbd_phys_base + RX_RING_SIZE * sizeof(cbd_t));
++
+ /* Install our interrupt handlers. This varies depending on
+ * the architecture.
+ */
+- fec_request_intrs(dev);
+-
+- fecp->fec_grp_hash_table_high = 0;
+- fecp->fec_grp_hash_table_low = 0;
+- fecp->fec_r_buff_size = PKT_MAXBLR_SIZE;
+- fecp->fec_ecntrl = 2;
+- fecp->fec_r_des_active = 0;
+-#ifndef CONFIG_M5272
+- fecp->fec_hash_table_high = 0;
+- fecp->fec_hash_table_low = 0;
+-#endif
+-
+- dev->base_addr = (unsigned long)fecp;
+-
++ ret = fec_request_intrs(pdev, dev);
++ if (ret != 0) {
++ return ret;
++ }
++ /* Clear and enable interrupts */
++ fec_reg_write(fep, FEC_EIR, fec_reg_read(fep, FEC_EIR));
++ fec_reg_write(fep, FEC_EIMR, FEC_ENET_TXF | FEC_ENET_TXB |
++ FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII);
++
++ fec_reg_write(fep, FEC_IAUR, 0);
++ fec_reg_write(fep, FEC_IALR, 0);
++ fec_reg_write(fep, FEC_EMRBR, PKT_MAXBLR_SIZE);
++ fec_reg_write(fep, FEC_ECR, 2);
++ fec_reg_write(fep, FEC_RDAR, DONT_CARE);
++
+ /* The FEC Ethernet specific entries in the device structure. */
+ dev->open = fec_enet_open;
+ dev->hard_start_xmit = fec_enet_start_xmit;
+ dev->tx_timeout = fec_timeout;
+ dev->watchdog_timeo = TX_TIMEOUT;
+ dev->stop = fec_enet_close;
++ dev->get_stats = fec_enet_get_stats;
+ dev->set_multicast_list = set_multicast_list;
++ dev->set_mac_address = fec_set_mac_address;
+
+- for (i=0; i<NMII-1; i++)
+- mii_cmds[i].mii_next = &mii_cmds[i+1];
++#ifndef CONFIG_PHYLIB
++ for (i = 1; i < NMII; i++) {
++ mii_cmds[i - 1].mii_next = &mii_cmds[i];
++ }
+ mii_free = mii_cmds;
+-
++#endif
+ /* setup MII interface */
+ fec_set_mii(dev, fep);
+
+- /* Clear and enable interrupts */
+- fecp->fec_ievent = 0xffc00000;
+- fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII);
+-
+- /* Queue up command to detect the PHY and initialize the
+- * remainder of the interface.
+- */
+- fep->phy_id_done = 0;
+- fep->phy_addr = 0;
+- mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy);
+-
+- index++;
++ ret = fec_init_phy(dev, fep);
++ if (ret) {
++ DBG(0, "%s: Failed to initialize PHY: %d\n", __FUNCTION__, ret);
++ return ret;
++ }
+ return 0;
+ }
+
+@@ -2414,62 +2392,67 @@ int __init fec_enet_init(struct net_devi
+ static void
+ fec_restart(struct net_device *dev, int duplex)
+ {
+- struct fec_enet_private *fep;
+- volatile cbd_t *bdp;
+- volatile fec_t *fecp;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
+ int i;
++ u32 rcr = OPT_FRAME_SIZE | RCR_MII_MODE; /* MII enable */
++ u32 tcr = TCR_HBC;
+
+- fep = netdev_priv(dev);
+- fecp = fep->hwp;
+-
++ DBG(0, "%s: Restarting FEC in %s-duplex mode\n", __FUNCTION__,
++ duplex ? "full" : "half");
+ /* Whack a reset. We should wait for this.
+ */
+- fecp->fec_ecntrl = 1;
++ fec_reg_write(fep, FEC_ECR, 1);
+ udelay(10);
+
++ /* Enable interrupts we wish to service.
++ */
++ fec_reg_write(fep, FEC_EIMR, FEC_ENET_TXF | FEC_ENET_TXB |
++ FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII);
++
+ /* Clear any outstanding interrupt.
+- */
+- fecp->fec_ievent = 0xffc00000;
+- fec_enable_phy_intr();
++ *
++ */
++ fec_reg_write(fep, FEC_EIR, FEC_ENET_MASK);
++
++ fec_enable_phy_intr(fep);
+
+ /* Set station address.
+ */
+- fec_set_mac_address(dev);
++ _fec_set_mac_address(dev);
+
+ /* Reset all multicast.
+ */
+- fecp->fec_grp_hash_table_high = 0;
+- fecp->fec_grp_hash_table_low = 0;
++ fec_reg_write(fep, FEC_IAUR, 0);
++ fec_reg_write(fep, FEC_IALR, 0);
+
+ /* Set maximum receive buffer size.
+ */
+- fecp->fec_r_buff_size = PKT_MAXBLR_SIZE;
+-
+- fec_localhw_setup();
++ fec_reg_write(fep, FEC_EMRBR, PKT_MAXBLR_SIZE);
+
+ /* Set receive and transmit descriptor base.
+ */
+- fecp->fec_r_des_start = __pa((uint)(fep->rx_bd_base));
+- fecp->fec_x_des_start = __pa((uint)(fep->tx_bd_base));
+-
++ fec_reg_write(fep, FEC_ERDSR, fep->cbd_phys_base);
++ fec_reg_write(fep, FEC_ETDSR, fep->cbd_phys_base + RX_RING_SIZE * sizeof(cbd_t));
++
+ fep->dirty_tx = fep->cur_tx = fep->tx_bd_base;
+ fep->cur_rx = fep->rx_bd_base;
+
+ /* Reset SKB transmit buffers.
+ */
+ fep->skb_cur = fep->skb_dirty = 0;
+- for (i=0; i<=TX_RING_MOD_MASK; i++) {
++ bdp = fep->tx_bd_base;
++ for (i = 0; i <= TX_RING_MOD_MASK; i++) {
+ if (fep->tx_skbuff[i] != NULL) {
+- dev_kfree_skb_any(fep->tx_skbuff[i]);
+- fep->tx_skbuff[i] = NULL;
++ fec_free_skb(fep, bdp, &fep->tx_skbuff[i]);
++ bdp++;
+ }
+ }
+
+ /* Initialize the receive buffer descriptors.
+ */
+ bdp = fep->rx_bd_base;
+- for (i=0; i<RX_RING_SIZE; i++) {
+-
++ for (i = 0; i < RX_RING_SIZE; i++) {
+ /* Initialize the BD for every fragment in the page.
+ */
+ bdp->cbd_sc = BD_ENET_RX_EMPTY;
+@@ -2484,12 +2467,11 @@ fec_restart(struct net_device *dev, int
+ /* ...and the same for transmmit.
+ */
+ bdp = fep->tx_bd_base;
+- for (i=0; i<TX_RING_SIZE; i++) {
+-
++ for (i = 0; i < TX_RING_SIZE; i++) {
+ /* Initialize the BD for every fragment in the page.
+ */
+ bdp->cbd_sc = 0;
+- bdp->cbd_bufaddr = 0;
++ bdp->cbd_bufaddr = ~0;
+ bdp++;
+ }
+
+@@ -2501,92 +2483,321 @@ fec_restart(struct net_device *dev, int
+ /* Enable MII mode.
+ */
+ if (duplex) {
+- fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;/* MII enable */
+- fecp->fec_x_cntrl = 0x04; /* FD enable */
++ tcr |= TCR_FDEN; /* FD enable */
+ } else {
+- /* MII enable|No Rcv on Xmit */
+- fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x06;
+- fecp->fec_x_cntrl = 0x00;
++ rcr |= RCR_DRT; /* No Rcv on Xmit */
+ }
++ fec_reg_write(fep, FEC_RCR, rcr);
++ fec_reg_write(fep, FEC_TCR, tcr);
+ fep->full_duplex = duplex;
+
+ /* Set MII speed.
+ */
+- fecp->fec_mii_speed = fep->phy_speed;
++ fec_reg_write(fep, FEC_MSCR, fep->phy_speed);
+
+ /* And last, enable the transmit and receive processing.
+ */
+- fecp->fec_ecntrl = 2;
+- fecp->fec_r_des_active = 0;
+-
+- /* Enable interrupts we wish to service.
+- */
+- fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII);
++ fec_reg_write(fep, FEC_ECR, 2);
++ fec_reg_write(fep, FEC_RDAR, DONT_CARE);
++
++ DBG(0, "%s: Starting netif queue\n", __FUNCTION__);
++ netif_start_queue(dev);
+ }
+
+ static void
+ fec_stop(struct net_device *dev)
+ {
+- volatile fec_t *fecp;
+- struct fec_enet_private *fep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+
+- fep = netdev_priv(dev);
+- fecp = fep->hwp;
++ DBG(0, "%s: Stopping netif queue\n", __FUNCTION__);
++ netif_stop_queue(dev);
+
+ /*
+ ** We cannot expect a graceful transmit stop without link !!!
+ */
+- if (fep->link)
+- {
+- fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */
++ if (fep->linkstatus) {
++ fec_reg_write(fep, FEC_TCR, 0x01); /* Graceful transmit stop */
+ udelay(10);
+- if (!(fecp->fec_ievent & FEC_ENET_GRA))
++ if (!(fec_reg_read(fep, FEC_EIR) & FEC_ENET_GRA))
+ printk("fec_stop : Graceful transmit stop did not complete !\n");
+- }
++ }
+
+ /* Whack a reset. We should wait for this.
+ */
+- fecp->fec_ecntrl = 1;
++ fec_reg_write(fep, FEC_ECR, 1);
+ udelay(10);
+
+- /* Clear outstanding MII command interrupts.
++ /* Mask and clear outstanding MII command interrupts.
+ */
+- fecp->fec_ievent = FEC_ENET_MII;
+- fec_enable_phy_intr();
++ fec_reg_write(fep, FEC_EIMR, FEC_ENET_MII);
++ fec_reg_write(fep, FEC_EIR, FEC_ENET_MII);
++ fec_enable_phy_intr(fep);
+
+- fecp->fec_imask = FEC_ENET_MII;
+- fecp->fec_mii_speed = fep->phy_speed;
++ fec_reg_write(fep, FEC_MSCR, fep->phy_speed);
+ }
+
+-static int __init fec_enet_module_init(void)
++static int __devinit fec_enet_probe(struct platform_device *pdev)
+ {
++ int ret;
++ struct fec_enet_private *fep;
+ struct net_device *dev;
+- int i, err;
+- DECLARE_MAC_BUF(mac);
++ struct fec_enet_platform_data *pdata = pdev->dev.platform_data;
++ struct resource *res_mem1;
++ struct resource *res_mem2;
++
++ res_mem1 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (res_mem1 == NULL) {
++ return -ENODEV;
++ }
++
++ res_mem1 = request_mem_region(res_mem1->start, res_len(res_mem1), DRV_NAME);
++ if (res_mem1 == NULL) {
++ return -EBUSY;
++ }
++ res_mem2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
++ if (res_mem2 != NULL) {
++ res_mem2 = request_mem_region(res_mem2->start, res_len(res_mem2), DRV_NAME);
++ if (res_mem2 == NULL) {
++ ret = -EBUSY;
++ goto release1;
++ }
++ }
++
++ dev = alloc_etherdev(sizeof(struct fec_enet_private));
++ if (dev == NULL) {
++ ret = -ENOMEM;
++ goto release2;
++ }
++ platform_set_drvdata(pdev, dev);
++ fep = netdev_priv(dev);
++ fep->res_mem1 = res_mem1;
++ fep->res_mem2 = res_mem2;
++
++ fep->reg_base = ioremap(res_mem1->start, res_len(res_mem1));
++ if (fep->reg_base == NULL) {
++ printk("FEC: Mapping FEC registers failed\n");
++ ret = -ENOMEM;
++ goto free_netdev;
++ }
++ DBG(0, "%s: FEC registers @ %08lx mapped to %p\n", __FUNCTION__,
++ (unsigned long)res_mem1->start, fep->reg_base);
++
++ /* Allocate memory for buffer descriptors. */
++ fep->cbd_mem_base = dma_alloc_coherent(&pdev->dev, CBD_BUF_SIZE, &fep->cbd_phys_base,
++ GFP_KERNEL);
++ if (fep->cbd_mem_base == NULL) {
++ printk("FEC: allocate descriptor memory failed\n");
++ ret = -ENOMEM;
++ goto unmap;
++ }
++ DBG(0, "%s: Allocated %lu [(%u + %lu) * %d] byte for CBD buffer @ %p[%08lx]\n",
++ __FUNCTION__, CBD_BUF_SIZE, TX_RING_SIZE, RX_RING_SIZE, sizeof(cbd_t),
++ fep->cbd_mem_base, (unsigned long)fep->cbd_phys_base);
++
++ /* Set receive and transmit descriptor base.
++ */
++ fep->rx_bd_base = fep->cbd_mem_base;
++ fep->tx_bd_base = fep->rx_bd_base + RX_RING_SIZE;
+
+ printk("FEC ENET Version 0.2\n");
++ ret = platform_func(pdata->arch_init, pdev);
++ if (ret != 0) {
++ printk(KERN_ERR "%s: platform init failed: %d\n", __FUNCTION__, ret);
++ goto free_dma;
++ }
++
++ ret = fec_enet_init(pdev, dev);
++ if (ret != 0) {
++ goto fec_disable;
++ }
++
++ /* Enable most messages by default */
++ fep->msg_enable = (NETIF_MSG_IFUP << 1) - 1;
++ ret = register_netdev(dev);
++ if (ret != 0) {
++ /* XXX: missing cleanup here */
++ goto free_buffers;
++ }
++
++ printk(KERN_INFO "%s: ethernet %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name,
++ dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
++ dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
+
+- for (i = 0; (i < FEC_MAX_PORTS); i++) {
+- dev = alloc_etherdev(sizeof(struct fec_enet_private));
+- if (!dev)
+- return -ENOMEM;
+- err = fec_enet_init(dev);
+- if (err) {
+- free_netdev(dev);
+- continue;
+- }
+- if (register_netdev(dev) != 0) {
+- /* XXX: missing cleanup here */
+- free_netdev(dev);
+- return -EIO;
++ return 0;
++
++ free_buffers:
++ fec_enet_free_buffers(fep);
++
++ fec_disable:
++ platform_func(pdata->arch_exit, pdev);
++
++ free_dma:
++ dma_free_coherent(&pdev->dev, CBD_BUF_SIZE, fep->cbd_mem_base, fep->cbd_phys_base);
++
++ unmap:
++ iounmap(fep->reg_base);
++
++ free_netdev:
++ free_netdev(dev);
++
++ release2:
++ if (res_mem2 != NULL) {
++ release_resource(res_mem2);
++ }
++
++ release1:
++ release_resource(res_mem1);
++
++ return ret;
++}
++
++static int __devexit fec_enet_remove(struct platform_device *pdev)
++{
++ struct net_device *dev = platform_get_drvdata(pdev);
++ struct fec_enet_private *fep = netdev_priv(dev);
++
++ unregister_netdev(dev);
++ free_netdev(dev);
++
++#ifdef CONFIG_PHYLIB
++ if (fep->mii != NULL) {
++ kfree(fep->mii->irq);
++ mdiobus_unregister(fep->mii);
++ }
++ mdiobus_free(fep->mii);
++#endif
++ fec_release_intrs(dev);
++
++ DBG(0, "%s: Unmapping FEC registers %p\n", __FUNCTION__, fep->reg_base);
++ iounmap(fep->reg_base);
++
++ fec_enet_free_buffers(fep);
++
++ DBG(0, "%s: Freeing CBD buffer area %p[%08lx]\n", __FUNCTION__,
++ fep->cbd_mem_base, (unsigned long)fep->cbd_phys_base);
++ dma_free_coherent(&pdev->dev, CBD_BUF_SIZE, fep->cbd_mem_base, fep->cbd_phys_base);
++
++ release_resource(fep->res_mem1);
++ if (fep->res_mem2 != NULL) {
++ release_resource(fep->res_mem2);
++ }
++ return 0;
++}
++
++static void fec_enet_shutdown(struct platform_device *pdev)
++{
++ struct fec_enet_platform_data *pdata = pdev->dev.platform_data;
++
++ DBG(0, "%s: Shutting down FEC Hardware\n", __FUNCTION__);
++ platform_func(pdata->arch_exit, pdev);
++}
++
++#ifdef CONFIG_PM
++static int fec_enet_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ int ret;
++ struct fec_enet_platform_data *pdata = pdev->dev.platform_data;
++ struct net_device *ndev = platform_get_drvdata(pdev);
++ struct fec_enet_private *fep = netdev_priv(ndev);
++
++ if (netif_running(ndev)) {
++ DBG(0, "%s: Detaching netif\n", __FUNCTION__);
++ netif_device_detach(ndev);
++#ifdef CONFIG_PHYLIB
++ DBG(0, "%s: Disconnecting PHY %p\n", __FUNCTION__, fep->phy);
++ phy_disconnect(fep->phy);
++ fep->phy = NULL;
++#endif
++ }
++#ifndef CONFIG_PHYLIB
++ if (fep->phy_timer) {
++ ret = del_timer_sync(fep->phy_timer);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to delete PHY timer: %d\n", __FUNCTION__, ret);
++ return ret;
+ }
++ }
++#endif
++ DBG(0, "%s: Shutting down FEC Hardware %d\n", __FUNCTION__,
++ netif_running(ndev));
++ ret = platform_func(pdata->suspend, pdev);
++ if (ret != 0 && netif_running(ndev)) {
++ DBG(0, "%s: Failed to suspend: %d\n", __FUNCTION__, ret);
++ /* Undo suspend */
++#ifdef CONFIG_PHYLIB
++ DBG(0, "%s: Reconnecting PHY\n", __FUNCTION__);
++ if (fec_connect_phy(ndev, fep) != 0) {
++ DBG(0, "%s: Failed to connect to PHY\n", __FUNCTION__);
++ return ret;
++ }
++ phy_start(fep->phy);
++#endif
++ fec_link_change(ndev);
++ netif_device_attach(ndev);
++ }
++ return ret;
++}
+
+- printk("%s: ethernet %s\n",
+- dev->name, print_mac(mac, dev->dev_addr));
++static int fec_enet_resume(struct platform_device *pdev)
++{
++ int ret;
++ struct fec_enet_platform_data *pdata = pdev->dev.platform_data;
++ struct net_device *ndev = platform_get_drvdata(pdev);
++
++ DBG(0, "%s: Powering up FEC Hardware %d\n", __FUNCTION__,
++ netif_running(ndev));
++ ret = platform_func(pdata->resume, pdev);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to resume: %d\n", __FUNCTION__, ret);
++ return ret;
++ }
++ if (netif_running(ndev)) {
++#ifdef CONFIG_PHYLIB
++ struct fec_enet_private *fep = netdev_priv(ndev);
++
++ DBG(0, "%s: Reconnecting PHY\n", __FUNCTION__);
++ ret = fec_connect_phy(ndev, fep);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to connect to PHY: %d\n", __FUNCTION__, ret);
++ return ret;
++ }
++ phy_start(fep->phy);
++#endif
++ fec_link_change(ndev);
++ netif_device_attach(ndev);
+ }
+ return 0;
+ }
++#else
++#define fec_enet_suspend NULL
++#define fec_enet_resume NULL
++#endif
++
++static struct platform_driver fec_enet_driver = {
++ .driver = {
++ .name = DRV_NAME,
++ },
++ .probe = fec_enet_probe,
++ .remove = __devexit_p(fec_enet_remove),
++ .shutdown = fec_enet_shutdown,
++ .suspend = fec_enet_suspend,
++ .resume = fec_enet_resume,
++};
++
++static int __init fec_enet_module_init(void)
++{
++ int ret;
+
++ ret = platform_driver_register(&fec_enet_driver);
++
++ return ret;
++}
+ module_init(fec_enet_module_init);
+
++static void __exit fec_enet_module_cleanup(void)
++{
++ platform_driver_unregister(&fec_enet_driver);
++}
++module_exit(fec_enet_module_cleanup);
++
+ MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/net/fec.h linux-2.6.28-karo/drivers/net/fec.h
+--- linux-2.6.28/drivers/net/fec.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/net/fec.h 2009-03-11 13:16:24.000000000 +0100
+@@ -13,13 +13,50 @@
+ #define FEC_H
+ /****************************************************************************/
+
++/*
++ * dummy value to write into RDAR,TDAR. FEC hardware will scan the TX/RX
++ * descriptors in memory upon any write access to those registers.
++ * The actual value written to those registers does not matter.
++*/
++#define DONT_CARE 0
++#define RDAR_BUSY (1 << 24)
++#define TDAR_BUSY (1 << 24)
++
+ #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
+- defined(CONFIG_M520x) || defined(CONFIG_M532x)
++ defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARCH_MXC)
+ /*
+ * Just figures, Motorola would have to change the offsets for
+ * registers in the same peripheral device on different models
+ * of the ColdFire!
+ */
++// relying on structure alignment for hardware register is just evil
++#ifndef GARBAGE
++#define FEC_EIR 0x004
++#define FEC_EIMR 0x008
++#define FEC_RDAR 0x010
++#define FEC_TDAR 0x014
++#define FEC_ECR 0x024
++#define FEC_MMFR 0x040
++#define FEC_MSCR 0x044
++#define FEC_MIBC 0x064
++#define FEC_RCR 0x084
++#define FEC_TCR 0x0c4
++#define FEC_PALR 0x0e4
++#define FEC_PAUR 0x0e8
++#define FEC_OPD 0x0ec
++#define FEC_IAUR 0x118
++#define FEC_IALR 0x11c
++#define FEC_GAUR 0x120
++#define FEC_GALR 0x124
++#define FEC_TFWR 0x144
++#define FEC_FRBR 0x14c
++#define FEC_FRSR 0x150
++#define FEC_ERDSR 0x180
++#define FEC_ETDSR 0x184
++#define FEC_EMRBR 0x188
++
++#else
++
+ typedef struct fec {
+ unsigned long fec_reserved0;
+ unsigned long fec_ievent; /* Interrupt event reg */
+@@ -57,6 +94,7 @@ typedef struct fec {
+ unsigned long fec_x_des_start; /* Transmit descriptor ring */
+ unsigned long fec_r_buff_size; /* Maximum receive buff size */
+ } fec_t;
++#endif
+
+ #else
+
+@@ -88,8 +126,8 @@ typedef struct fec {
+ unsigned long fec_reserved7[158];
+ unsigned long fec_addr_low; /* Low 32bits MAC address */
+ unsigned long fec_addr_high; /* High 16bits MAC address */
+- unsigned long fec_grp_hash_table_high;/* High 32bits hash table */
+- unsigned long fec_grp_hash_table_low; /* Low 32bits hash table */
++ unsigned long fec_hash_table_high; /* High 32bits hash table */
++ unsigned long fec_hash_table_low; /* Low 32bits hash table */
+ unsigned long fec_r_des_start; /* Receive descriptor ring */
+ unsigned long fec_x_des_start; /* Transmit descriptor ring */
+ unsigned long fec_r_buff_size; /* Maximum receive buff size */
+@@ -103,18 +141,28 @@ typedef struct fec {
+ /*
+ * Define the buffer descriptor structure.
+ */
++/* Please see "Receive Buffer Descriptor Field Definitions" in Specification.
++ * It's LE.
++ */
++#ifdef CONFIG_ARCH_MXC
++typedef struct bufdesc {
++ unsigned short cbd_datlen; /* Data length */
++ unsigned short cbd_sc; /* Control and status info */
++ dma_addr_t cbd_bufaddr; /* Buffer address as seen by FEC Hardware */
++} cbd_t;
++#else
+ typedef struct bufdesc {
+ unsigned short cbd_sc; /* Control and status info */
+ unsigned short cbd_datlen; /* Data length */
+- unsigned long cbd_bufaddr; /* Buffer address */
++ dma_addr_t cbd_bufaddr; /* Buffer address */
+ } cbd_t;
+-
++#endif
+
+ /*
+ * The following definitions courtesy of commproc.h, which where
+ * Copyright (c) 1997 Dan Malek (dmalek@jlc.net).
+ */
+-#define BD_SC_EMPTY ((ushort)0x8000) /* Recieve is empty */
++#define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */
+ #define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */
+ #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */
+ #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */
+@@ -161,5 +209,22 @@ typedef struct bufdesc {
+ #define BD_ENET_TX_STATS ((ushort)0x03ff) /* All status bits */
+
+
++#define RCR_LOOP (1 << 0)
++#define RCR_DRT (1 << 1)
++#define RCR_MII_MODE (1 << 2)
++#define RCR_PROM (1 << 3)
++#define RCR_BC_REJ (1 << 4)
++#define RCR_FCE (1 << 5)
++#define RCR_MAX_FL_SHIFT 16
++#define RCR_MAX_FL_MASK (0x7ff << (RCR_MAX_FL_SHIFT))
++#define RCR_MAX_FL_set(n) (((n) << (RCR_MAX_FL_SHIFT)) & (RCR_MAX_FL_MASK))
++#define RCR_MAX_FL_get(n) (((n) & (RCR_MAX_FL_MASK)) >> (RCR_MAX_FL_SHIFT))
++
++#define TCR_GTS (1 << 0)
++#define TCR_HBC (1 << 1)
++#define TCR_FDEN (1 << 2)
++#define TCR_TFCPAUSE (1 << 3)
++#define TCR_RFCPAUSE (1 << 4)
++
+ /****************************************************************************/
+ #endif /* FEC_H */
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/power/Kconfig linux-2.6.28-karo/drivers/power/Kconfig
+--- linux-2.6.28/drivers/power/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/power/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -68,4 +68,16 @@ config BATTERY_BQ27x00
+ help
+ Say Y here to enable support for batteries with BQ27200(I2C) chip.
+
++config LP3972
++ tristate "National Semiconductor LP3972 Power Management Unit"
++ depends on EXPERIMENTAL
++ depends on I2C
++ default n
++ help
++ If you say yes here you get support for the National Semiconductor
++ Power Management Chip.
++
++ This driver can also be built as a module. If so, the module
++ will be called lp3972.
++
+ endif # POWER_SUPPLY
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/power/Makefile linux-2.6.28-karo/drivers/power/Makefile
+--- linux-2.6.28/drivers/power/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/power/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -23,3 +23,5 @@ obj-$(CONFIG_BATTERY_OLPC) += olpc_batte
+ obj-$(CONFIG_BATTERY_TOSA) += tosa_battery.o
+ obj-$(CONFIG_BATTERY_WM97XX) += wm97xx_battery.o
+ obj-$(CONFIG_BATTERY_BQ27x00) += bq27x00_battery.o
++
++obj-$(CONFIG_LP3972) += lp3972.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/power/lp3972.c linux-2.6.28-karo/drivers/power/lp3972.c
+--- linux-2.6.28/drivers/power/lp3972.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/power/lp3972.c 2009-03-11 13:52:22.000000000 +0100
+@@ -0,0 +1,267 @@
++/*
++ * Copyright (C) 2008 Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the:
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/slab.h>
++#include <linux/i2c.h>
++
++/* Addresses to scan */
++static unsigned short normal_i2c[] = { 0x34,
++ I2C_CLIENT_END };
++
++I2C_CLIENT_INSMOD_1(lp3972);
++
++struct lp3972_data {
++ struct i2c_client client;
++};
++
++static int lp3972_attach_adapter(struct i2c_adapter *adapter);
++static int lp3972_detect(struct i2c_adapter *adapter, int address, int kind);
++static int lp3972_detach_client(struct i2c_client *client);
++static void lp3972_init_client(struct i2c_client *client);
++
++static struct i2c_driver lp3972_driver = {
++ .driver = {
++ .name = "lp3972",
++ },
++ //.id = I2C_DRIVERID_LP3972,
++ .attach_adapter = lp3972_attach_adapter,
++ .detach_client = lp3972_detach_client,
++};
++
++struct lp3972_dev_attr {
++ struct device_attribute dev_attr;
++ u8 reg;
++ u8 val;
++};
++
++#define to_lp3972_attr(d) container_of(d, struct lp3972_dev_attr, dev_attr)
++
++static ssize_t lp3972_get_val(struct device *dev, struct device_attribute *attr, char *buf)
++{
++ int ret;
++ struct i2c_client *client = to_i2c_client(dev);
++ struct lp3972_dev_attr *lp3972_attr = to_lp3972_attr(attr);
++
++ ret = i2c_smbus_read_byte_data(client, lp3972_attr->reg);
++ if (ret < 0) {
++ return ret;
++ }
++ lp3972_attr->val = ret;
++ return sprintf(buf, "0x%02x\n", ret);
++}
++
++static ssize_t lp3972_set_val(struct device *dev, struct device_attribute *attr, const char *buf,
++ size_t count)
++{
++ int ret;
++ struct i2c_client *client = to_i2c_client(dev);
++ struct lp3972_dev_attr *lp3972_attr = to_lp3972_attr(attr);
++ unsigned long val = simple_strtoul(buf, NULL, 0);
++
++ if (val > 0xff) {
++ printk(KERN_WARNING "value %ld is out of range\n", val);
++ return -EINVAL;
++ }
++ if (val != lp3972_attr->val) {
++ lp3972_attr->val = val;
++ ret = i2c_smbus_write_byte_data(client, lp3972_attr->reg, lp3972_attr->val);
++ if (ret < 0) {
++ return ret;
++ }
++ }
++ return count;
++}
++
++#define LP3972_DEV_ATTR(_name, _mode, _reg, _read, _write) \
++ struct lp3972_dev_attr lp3972_dev_attr_##_name = { \
++ .dev_attr = __ATTR(_name,_mode,_read,_write), \
++ .reg = _reg, \
++ }
++
++static LP3972_DEV_ATTR(scr, S_IWUSR | S_IRUGO, 0x07, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(over1, S_IWUSR | S_IRUGO, 0x10, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(ovsr1, S_IRUGO, 0x11, lp3972_get_val, NULL);
++static LP3972_DEV_ATTR(over2, S_IWUSR | S_IRUGO, 0x12, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(ovsr2, S_IRUGO, 0x13, lp3972_get_val, NULL);
++static LP3972_DEV_ATTR(vcc1, S_IWUSR | S_IRUGO, 0x20, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(adtv1, S_IWUSR | S_IRUGO, 0x23, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(adtv2, S_IWUSR | S_IRUGO, 0x24, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(avrc, S_IWUSR | S_IRUGO, 0x25, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(cdtc1, S_IWUSR, 0x26, NULL, lp3972_set_val);
++static LP3972_DEV_ATTR(cdtc2, S_IWUSR, 0x27, NULL, lp3972_set_val);
++static LP3972_DEV_ATTR(sdtv1, S_IWUSR | S_IRUGO, 0x29, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(sdtv2, S_IWUSR | S_IRUGO, 0x2a, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(mdtv1, S_IWUSR | S_IRUGO, 0x32, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(mdtv2, S_IWUSR | S_IRUGO, 0x33, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(l12vcr, S_IWUSR | S_IRUGO, 0x39, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(l34vcr, S_IWUSR | S_IRUGO, 0x3a, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(scr1, S_IWUSR | S_IRUGO, 0x80, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(scr2, S_IWUSR | S_IRUGO, 0x81, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(oen3, S_IWUSR | S_IRUGO, 0x82, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(osr3, S_IWUSR | S_IRUGO, 0x83, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(loer, S_IWUSR | S_IRUGO, 0x84, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(b2tv, S_IWUSR | S_IRUGO, 0x85, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(b3tv, S_IWUSR | S_IRUGO, 0x86, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(c32rc, S_IWUSR | S_IRUGO, 0x87, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(isra, S_IRUGO, 0x88, lp3972_get_val, NULL);
++static LP3972_DEV_ATTR(bccr, S_IWUSR | S_IRUGO, 0x89, lp3972_get_val, lp3972_set_val);
++static LP3972_DEV_ATTR(ii1rr, S_IRUGO, 0x8e, lp3972_get_val, NULL);
++static LP3972_DEV_ATTR(ii2rr, S_IRUGO, 0x8f, lp3972_get_val, NULL);
++
++static struct attribute *lp3972_attributes[] = {
++ &lp3972_dev_attr_scr.dev_attr.attr,
++ &lp3972_dev_attr_over1.dev_attr.attr,
++ &lp3972_dev_attr_ovsr1.dev_attr.attr,
++ &lp3972_dev_attr_over2.dev_attr.attr,
++ &lp3972_dev_attr_ovsr2.dev_attr.attr,
++ &lp3972_dev_attr_vcc1.dev_attr.attr,
++ &lp3972_dev_attr_adtv1.dev_attr.attr,
++ &lp3972_dev_attr_adtv2.dev_attr.attr,
++ &lp3972_dev_attr_avrc.dev_attr.attr,
++ &lp3972_dev_attr_cdtc1.dev_attr.attr,
++ &lp3972_dev_attr_cdtc2.dev_attr.attr,
++ &lp3972_dev_attr_sdtv1.dev_attr.attr,
++ &lp3972_dev_attr_sdtv2.dev_attr.attr,
++ &lp3972_dev_attr_mdtv1.dev_attr.attr,
++ &lp3972_dev_attr_mdtv2.dev_attr.attr,
++ &lp3972_dev_attr_l12vcr.dev_attr.attr,
++ &lp3972_dev_attr_l34vcr.dev_attr.attr,
++ &lp3972_dev_attr_scr1.dev_attr.attr,
++ &lp3972_dev_attr_scr2.dev_attr.attr,
++ &lp3972_dev_attr_oen3.dev_attr.attr,
++ &lp3972_dev_attr_osr3.dev_attr.attr,
++ &lp3972_dev_attr_loer.dev_attr.attr,
++ &lp3972_dev_attr_b2tv.dev_attr.attr,
++ &lp3972_dev_attr_b3tv.dev_attr.attr,
++ &lp3972_dev_attr_c32rc.dev_attr.attr,
++ &lp3972_dev_attr_isra.dev_attr.attr,
++ &lp3972_dev_attr_bccr.dev_attr.attr,
++ &lp3972_dev_attr_ii1rr.dev_attr.attr,
++ &lp3972_dev_attr_ii2rr.dev_attr.attr,
++ NULL
++};
++
++static const struct attribute_group lp3972_attr_group = {
++ .attrs = lp3972_attributes,
++};
++
++/*
++ * Real code
++ */
++
++static int lp3972_attach_adapter(struct i2c_adapter *adapter)
++{
++ return i2c_probe(adapter, &addr_data, lp3972_detect);
++}
++
++/* This function is called by i2c_probe */
++static int lp3972_detect(struct i2c_adapter *adapter, int address, int kind)
++{
++ int ret;
++ struct i2c_client *new_client;
++ struct lp3972_data *data;
++ const char *client_name = "";
++
++ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE)) {
++ return -ENOTSUPP;
++ }
++
++ data = kzalloc(sizeof(struct lp3972_data), GFP_KERNEL);
++ if (data == NULL) {
++ return -ENOMEM;
++ }
++
++ new_client = &data->client;
++ i2c_set_clientdata(new_client, data);
++ new_client->addr = address;
++ new_client->adapter = adapter;
++ new_client->driver = &lp3972_driver;
++ new_client->flags = 0;
++
++ /* Now, we would do the remaining detection. But the LP3972 is plainly
++ impossible to detect! Stupid chip. */
++
++ /* Determine the chip type */
++ if (kind <= 0) {
++ kind = lp3972;
++ }
++
++ client_name = "lp3972";
++
++ /* Fill in the remaining client fields and put it into the global list */
++ strlcpy(new_client->name, client_name, I2C_NAME_SIZE);
++
++ /* Tell the I2C layer a new client has arrived */
++ ret = i2c_attach_client(new_client);
++ if (ret != 0) {
++ goto free;
++ }
++
++ /* Initialize the LP3972 chip */
++ lp3972_init_client(new_client);
++
++ /* Register sysfs hooks */
++ ret = sysfs_create_group(&new_client->dev.kobj, &lp3972_attr_group);
++ if (ret == 0) {
++ return ret;
++ }
++
++ i2c_detach_client(new_client);
++ free:
++ kfree(data);
++ return ret;
++}
++
++static int lp3972_detach_client(struct i2c_client *client)
++{
++ int ret;
++
++ sysfs_remove_group(&client->dev.kobj, &lp3972_attr_group);
++
++ ret = i2c_detach_client(client);
++ if (ret != 0) {
++ return ret;
++ }
++
++ kfree(i2c_get_clientdata(client));
++ return 0;
++}
++
++/* Called when we have found a new LP3972. */
++static void lp3972_init_client(struct i2c_client *client)
++{
++}
++
++static int __init lp3972_init(void)
++{
++ return i2c_add_driver(&lp3972_driver);
++}
++
++static void __exit lp3972_exit(void)
++{
++ i2c_del_driver(&lp3972_driver);
++}
++
++
++MODULE_AUTHOR("Lothar Wassmann <LW@KARO-electronics.de>");
++MODULE_DESCRIPTION("LP3972 I2C PMIC driver");
++MODULE_LICENSE("GPL v2");
++
++module_init(lp3972_init);
++module_exit(lp3972_exit);
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/rtc/Kconfig linux-2.6.28-karo/drivers/rtc/Kconfig
+--- linux-2.6.28/drivers/rtc/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/rtc/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -141,6 +141,24 @@ config RTC_DRV_DS1307
+ This driver can also be built as a module. If so, the module
+ will be called rtc-ds1307.
+
++config RTC_DRV_DS13XX
++ tristate "Dallas/Maxim DS13xx I2C RTC chips"
++ depends on RTC_CLASS && I2C
++ help
++ If you say yes here you get support for various compatible RTC
++ chips (often with battery backup) connected with I2C. This driver
++ should handle DS1307, DS1337, DS1338, DS1339, DS1340, ST M41T00,
++ and probably other chips. Platform specific code may provide a
++ callback function to properly initialize the chip.
++
++ The first seven registers on these chips hold an RTC, and other
++ registers may add features such as NVRAM, a trickle charger for
++ the RTC/NVRAM backup power, and alarms. This driver may not
++ expose all those available chip features.
++
++ This driver can also be built as a module. If so, the module
++ will be called rtc-ds13xx.
++
+ config RTC_DRV_DS1374
+ tristate "Dallas/Maxim DS1374"
+ depends on RTC_CLASS && I2C
+@@ -649,6 +667,13 @@ config RTC_DRV_RS5C313
+ help
+ If you say yes here you get support for the Ricoh RS5C313 RTC chips.
+
++config RTC_MXC
++ tristate "Freescale MXC Real Time Clock"
++ depends on ARCH_MXC
++ depends on RTC_CLASS
++ help
++ If you say yes here you get support for the Freescale i.MX RTC
++
+ config RTC_DRV_PARISC
+ tristate "PA-RISC firmware RTC support"
+ depends on PARISC
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/rtc/Makefile linux-2.6.28-karo/drivers/rtc/Makefile
+--- linux-2.6.28/drivers/rtc/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/rtc/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -28,6 +28,7 @@ obj-$(CONFIG_RTC_DRV_DS1302) += rtc-ds13
+ obj-$(CONFIG_RTC_DRV_DS1305) += rtc-ds1305.o
+ obj-$(CONFIG_RTC_DRV_DS1307) += rtc-ds1307.o
+ obj-$(CONFIG_RTC_DRV_DS1374) += rtc-ds1374.o
++obj-$(CONFIG_RTC_DRV_DS13XX) += rtc-ds13xx.o
+ obj-$(CONFIG_RTC_DRV_DS1390) += rtc-ds1390.o
+ obj-$(CONFIG_RTC_DRV_DS1511) += rtc-ds1511.o
+ obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o
+@@ -62,6 +63,7 @@ obj-$(CONFIG_RTC_DRV_RX8581) += rtc-rx85
+ obj-$(CONFIG_RTC_DRV_S35390A) += rtc-s35390a.o
+ obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o
+ obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o
++obj-$(CONFIG_RTC_MXC) += rtc-mxc.o
+ obj-$(CONFIG_RTC_DRV_SH) += rtc-sh.o
+ obj-$(CONFIG_RTC_DRV_STK17TA8) += rtc-stk17ta8.o
+ obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/rtc/rtc-ds13xx.c linux-2.6.28-karo/drivers/rtc/rtc-ds13xx.c
+--- linux-2.6.28/drivers/rtc/rtc-ds13xx.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/rtc/rtc-ds13xx.c 2009-03-11 18:38:58.000000000 +0100
+@@ -0,0 +1,590 @@
++/*
++ * rtc-ds13xx.c - RTC driver for some mostly-compatible I2C chips.
++ *
++ * Copyright (C) 2005 James Chapman (ds1337 core)
++ * Copyright (C) 2006 David Brownell
++ * Copyright (C) 2007 Lothar Wassmann <LW@karo-electronics.de>
++ * rewritten to support initialization via platform_device
++ *
++ * 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/slab.h>
++#include <linux/platform_device.h>
++#include <linux/i2c.h>
++#include <linux/rtc.h>
++#include <linux/bcd.h>
++#include <linux/rtc/ds13xx.h>
++
++
++/* We can't determine type by probing, but if we expect pre-Linux code
++ * to have set the chip up as a clock (turning on the oscillator and
++ * setting the date and time), Linux can ignore the non-clock features.
++ * That's a natural job for a factory or repair bench.
++ *
++ * If the I2C "force" mechanism is used, we assume the chip is a ds1337.
++ * (Much better would be board-specific tables of I2C devices, along with
++ * the platform_data drivers would use to sort such issues out.)
++ */
++
++static unsigned short normal_i2c[] = { 0x68, I2C_CLIENT_END };
++
++I2C_CLIENT_INSMOD;
++
++// the RTC epoch starts at 2000
++#define CENTURY 2000
++
++/* RTC registers don't differ much, except for the century flag */
++#define DS13XX_REG_SECS 0x00 /* 00-59 */
++# define DS1307_BIT_CH (1 << 7)
++#define DS13XX_REG_MIN 0x01 /* 00-59 */
++#define DS13XX_REG_HOUR 0x02 /* 00-23, or 1-12{am,pm} */
++# define DS1340_BIT_CENTURY_EN (1 << 7) /* in REG_HOUR */
++# define DS1340_BIT_CENTURY (1 << 6) /* in REG_HOUR */
++#define DS13XX_REG_WDAY 0x03 /* 01-07 */
++#define DS13XX_REG_MDAY 0x04 /* 01-31 */
++#define DS13XX_REG_MONTH 0x05 /* 01-12 */
++# define DS133X_BIT_CENTURY (1 << 7) /* in REG_MONTH */
++#define DS13XX_REG_YEAR 0x06 /* 00-99 */
++
++/* Other registers (control, status, alarms, trickle charge, NVRAM, etc)
++ * start at 7, and they differ a lot. Only control and status matter for RTC;
++ * be careful using them.
++ */
++#define DS1307_REG_CONTROL 0x07
++#define DS1339_REG_AL1SEC 0x07
++#define DS1339_REG_AL1MIN 0x08
++#define DS1339_REG_AL1HRS 0x09
++#define DS1339_REG_AL1DAY 0x0a
++#define DS1339_REG_AL2MIN 0x0b
++#define DS1339_REG_AL2HRS 0x0c
++#define DS1339_REG_AL2DAY 0x0d
++# define DS1339_BIT_ALMSK (1 << 7)
++# define DS1339_BIT_DYDT (1 << 6)
++#define DS133X_REG_CONTROL 0x0e
++# define DS1338_BIT_OSF (1 << 5)
++# define DS133X_BIT_nEOSC (1 << 7)
++# define DS133X_BIT_A1IE (1 << 0)
++# define DS133X_BIT_A2IE (1 << 1)
++#define DS133X_REG_STATUS 0x0f
++# define DS133X_BIT_OSF (1 << 7)
++# define DS133X_BIT_A1I (1 << 0)
++# define DS133X_BIT_A2I (1 << 1)
++#define DS1339_REG_TRC 0x10
++# define DS1339_TRC_MAGIC 0xa0
++#define DS1340_REG_STATUS 0x09
++# define DS1340_BIT_OSF (1 << 7)
++
++struct ds13xx {
++ u8 reg_addr;
++ u8 regs[8];
++ enum ds13xx_type type;
++ struct i2c_msg msg[2];
++ struct i2c_client client;
++ struct rtc_device *rtc;
++ int valid_time;
++};
++
++static const struct i2c_device_id ds13xx_id[] = {
++ { "ds1307", ds_1307 },
++ { "ds1337", ds_1337 },
++ { "ds1338", ds_1338 },
++ { "ds1339", ds_1339 },
++ { "ds1340", ds_1340 },
++ { "m41t00", m41t00 },
++ { }
++};
++MODULE_DEVICE_TABLE(i2c, ds13xx_id);
++
++static inline int ds13xx_write_reg(struct i2c_client *client, u8 regno, u8 val)
++{
++ dev_dbg(&client->dev, "Writing %02x to reg %02x\n", val, regno);
++ return i2c_smbus_write_byte_data(client, regno, val);
++}
++
++static inline int ds13xx_read_reg(struct i2c_client *client, u8 regno)
++{
++ int ret;
++
++ ret = i2c_smbus_read_byte_data(client, regno);
++
++ return ret;
++}
++
++static int __devinit ds13xx_i2c_init(struct platform_device *pdev, struct i2c_client *client)
++{
++ int ret = 0;
++ struct ds13xx_platform_data *pdata = pdev->dev.platform_data;
++ struct ds13xx *ds13xx = i2c_get_clientdata(client);
++
++ if (pdata != NULL && pdata->type > 0) {
++ ds13xx->type = pdata->type;
++ switch (ds13xx->type) {
++ case unknown:
++ strlcpy(client->name, "unknown", I2C_NAME_SIZE);
++ break;
++ case ds_1307:
++ strlcpy(client->name, "ds1307", I2C_NAME_SIZE);
++ break;
++ case ds_1337:
++ strlcpy(client->name, "ds1337", I2C_NAME_SIZE);
++ break;
++ case ds_1339:
++ strlcpy(client->name, "ds1339", I2C_NAME_SIZE);
++ break;
++ case ds_1340:
++ strlcpy(client->name, "ds1340", I2C_NAME_SIZE);
++ break;
++ default:
++ return -ENODEV;
++ }
++ } else {
++ dev_dbg(&client->dev, "No platform_data\n");
++ }
++ return ret;
++}
++
++static int __devinit ds13xx_rtc_init(struct ds13xx_platform_data *pdata, struct i2c_client *client)
++{
++ int ret = 0;
++ struct ds13xx *ds13xx = i2c_get_clientdata(client);
++ int oscstart = 0;
++
++ ds13xx->valid_time = 1;
++ dev_dbg(&client->dev, "Inititialzing RTC %s\n", client->name);
++ switch (ds13xx->type) {
++ case ds_1307:
++ case m41t00:
++ if (ds13xx->regs[DS13XX_REG_SECS] & DS1307_BIT_CH) {
++ oscstart = 1;
++ ds13xx_write_reg(client, DS13XX_REG_SECS, 0);
++ }
++ if (pdata && pdata->ctrl >= 0) {
++ ds13xx_write_reg(client, DS1307_REG_CONTROL, pdata->ctrl);
++ }
++ break;
++ case ds_1337:
++ ret = ds13xx_read_reg(client, DS133X_REG_CONTROL);
++ if (ret > 0 && ret & DS133X_BIT_nEOSC) {
++ oscstart = 1;
++ }
++ if (pdata && pdata->ctrl >= 0) {
++ ds13xx_write_reg(client, DS133X_REG_CONTROL, pdata->ctrl);
++ }
++ break;
++ case ds_1338:
++ /* clock halted? turn it on, so clock can tick. */
++ if (ds13xx->regs[DS13XX_REG_SECS] & DS1307_BIT_CH) {
++ ds13xx_write_reg(client, DS13XX_REG_SECS, 0);
++ }
++ /* oscillator fault? clear flag, and warn */
++ if (ds13xx->regs[DS1307_REG_CONTROL] & DS1338_BIT_OSF) {
++ ret = ds13xx_write_reg(client, DS1307_REG_CONTROL,
++ ds13xx->regs[DS1307_REG_CONTROL] &
++ ~DS1338_BIT_OSF);
++ ds13xx->valid_time = 0;
++ }
++ break;
++ case ds_1339:
++ ret = ds13xx_read_reg(client, DS133X_REG_CONTROL);
++ if (ret < 0) {
++ dev_warn(&client->dev, "failed to read DS1339 control register: %d\n",
++ ret);
++ break;
++ } else if (ret & DS133X_BIT_nEOSC) {
++ oscstart = 1;
++ }
++ if (pdata && pdata->ctrl >= 0) {
++ ds13xx_write_reg(client, DS133X_REG_CONTROL, pdata->ctrl);
++ }
++ if (pdata && pdata->trc >= 0) {
++ ds13xx_write_reg(client, DS1339_REG_TRC, pdata->trc);
++ }
++ ret = ds13xx_read_reg(&ds13xx->client, DS133X_REG_STATUS);
++ if (ret < 0) {
++ dev_warn(&client->dev, "failed to read DS1339 status: %d\n",
++ ret);
++ break;
++ } else {
++ dev_dbg(&client->dev, "DS1339 status: %02x\n", ret);
++ }
++ if (ret > 0 && ret & DS133X_BIT_OSF) {
++ ds13xx->valid_time = 0;
++ }
++ break;
++ case ds_1340:
++ if (ds13xx->regs[DS13XX_REG_SECS] & DS133X_BIT_nEOSC) {
++ oscstart = 1;
++ ds13xx_write_reg(client, DS13XX_REG_SECS, 0);
++ }
++ if (pdata && pdata->ctrl >= 0) {
++ ds13xx_write_reg(client, DS133X_REG_CONTROL, pdata->ctrl);
++ }
++ ret = ds13xx_read_reg(&ds13xx->client, DS1340_REG_STATUS);
++ if (ret > 0 && ret & DS1340_BIT_OSF) {
++ ds13xx->valid_time = 0;
++ }
++ break;
++ default:
++ dev_warn(&client->dev, "Unknown DS13xx chip type: %d\n", ds13xx->type);
++ break;
++ }
++ if (!ds13xx->valid_time) {
++ dev_warn(&client->dev, "%s oscillator failure; RTC time must be set!\n",
++ client->name);
++ } else if (oscstart) {
++ ds13xx->valid_time = 0;
++ dev_warn(&client->dev, "%s oscillator has been started; RTC time must be set!\n",
++ client->name);
++ }
++
++ return ret < 0 ? ret : 0;
++}
++
++static int ds13xx_get_time(struct device *dev, struct rtc_time *t)
++{
++ int ret;
++ struct ds13xx *ds13xx = dev_get_drvdata(dev);
++ static int once = 1;
++
++ if (!ds13xx->valid_time) {
++ if (once) {
++ dev_warn(dev, "RTC Oscillator failure; RTC time must be set!\n");
++ once = 0;
++ }
++ }
++
++ /* read the RTC registers all at once */
++ ds13xx->msg[1].flags = I2C_M_RD;
++ ds13xx->msg[1].len = 7;
++
++ ret = i2c_transfer(ds13xx->client.adapter, ds13xx->msg, 2);
++ if (ret != 2) {
++ dev_err(dev, "%s error %d\n", "read", ret);
++ return ret < 0 ? ret : -EIO;
++ }
++
++ dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x\n",
++ "read",
++ ds13xx->regs[0], ds13xx->regs[1],
++ ds13xx->regs[2], ds13xx->regs[3],
++ ds13xx->regs[4], ds13xx->regs[5],
++ ds13xx->regs[6]);
++
++ t->tm_sec = bcd2bin(ds13xx->regs[DS13XX_REG_SECS] & 0x7f);
++ t->tm_min = bcd2bin(ds13xx->regs[DS13XX_REG_MIN] & 0x7f);
++ ret = ds13xx->regs[DS13XX_REG_HOUR] & 0x3f;
++ t->tm_hour = bcd2bin(ret);
++ t->tm_wday = bcd2bin(ds13xx->regs[DS13XX_REG_WDAY] & 0x07) - 1;
++ t->tm_mday = bcd2bin(ds13xx->regs[DS13XX_REG_MDAY] & 0x3f);
++ ret = ds13xx->regs[DS13XX_REG_MONTH] & 0x1f;
++ t->tm_mon = bcd2bin(ret) - 1;
++
++ t->tm_year = bcd2bin(ds13xx->regs[DS13XX_REG_YEAR]) + 100;
++ switch (ds13xx->type) {
++ case ds_1339:
++ if (ds13xx->regs[DS13XX_REG_MONTH] & DS133X_BIT_CENTURY) {
++ t->tm_year += 100;
++ }
++ default:
++ break;
++ }
++ dev_dbg(dev, "%s secs=%d, mins=%d, "
++ "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n",
++ "read", t->tm_sec, t->tm_min,
++ t->tm_hour, t->tm_mday,
++ t->tm_mon, t->tm_year - 100 + CENTURY, t->tm_wday);
++
++ return 0;
++}
++
++static int ds13xx_set_time(struct device *dev, struct rtc_time *t)
++{
++ int ret;
++ struct ds13xx *ds13xx = dev_get_drvdata(dev);
++ u8 *buf = ds13xx->regs;
++
++ dev_dbg(dev, "%s secs=%d, mins=%d, "
++ "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n",
++ "write", t->tm_sec, t->tm_min,
++ t->tm_hour, t->tm_mday,
++ t->tm_mon, t->tm_year - 100 + CENTURY, t->tm_wday);
++
++ *buf++ = 0; /* first register addr */
++ buf[DS13XX_REG_SECS] = bin2bcd(t->tm_sec);
++ buf[DS13XX_REG_MIN] = bin2bcd(t->tm_min);
++ buf[DS13XX_REG_HOUR] = bin2bcd(t->tm_hour);
++ buf[DS13XX_REG_WDAY] = bin2bcd(t->tm_wday + 1);
++ buf[DS13XX_REG_MDAY] = bin2bcd(t->tm_mday);
++ buf[DS13XX_REG_MONTH] = bin2bcd(t->tm_mon + 1);
++
++ ret = t->tm_year - 100;
++ buf[DS13XX_REG_YEAR] = bin2bcd(ret);
++
++ if (!ds13xx->valid_time) {
++ switch (ds13xx->type) {
++ case ds_1307:
++ break;
++ case ds_1337:
++ case ds_1339:
++ dev_dbg(dev, "Clearing OSF\n");
++ // clear oscillator fail flag, in case it was set
++ ret = ds13xx_write_reg(&ds13xx->client, DS133X_REG_STATUS,
++ (u8)~DS133X_BIT_OSF);
++ break;
++ case ds_1340:
++ buf[DS13XX_REG_HOUR] |= DS1340_BIT_CENTURY_EN;
++ // clear oscillator fail flag, in case it was set
++ ret = ds13xx_write_reg(&ds13xx->client, DS1340_REG_STATUS,
++ (u8)~DS1340_BIT_OSF);
++ break;
++ default:
++ BUG();
++ }
++ }
++ ds13xx->msg[1].flags = 0;
++ ds13xx->msg[1].len = sizeof(ds13xx->regs);
++
++ dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x\n",
++ "write", buf[0], buf[1], buf[2], buf[3],
++ buf[4], buf[5], buf[6]);
++
++ ret = i2c_transfer(ds13xx->client.adapter, &ds13xx->msg[1], 1);
++ if (ret != 1) {
++ dev_err(dev, "%s error %d\n", "write", ret);
++ return ret < 0 ? ret : -EIO;
++ }
++ ds13xx->valid_time = 1;
++ return 0;
++}
++
++static const struct rtc_class_ops ds13xx_rtc_ops = {
++ .read_time = ds13xx_get_time,
++ .set_time = ds13xx_set_time,
++};
++
++static struct i2c_driver ds13xx_i2c_driver;
++static struct platform_device *ds13xx_dev;
++
++static int __devinit ds13xx_detect(struct i2c_adapter *adapter, int address, int kind)
++{
++ struct ds13xx *ds13xx;
++ int err = -ENODEV;
++ struct i2c_client *client;
++ int ret;
++
++ if (ds13xx_dev == NULL) {
++ return -ENODEV;
++ }
++
++ ds13xx = kzalloc(sizeof(struct ds13xx), GFP_KERNEL);
++ if (ds13xx == NULL) {
++ err = -ENOMEM;
++ goto exit;
++ }
++
++ client = &ds13xx->client;
++ client->addr = address;
++ client->adapter = adapter;
++ client->driver = &ds13xx_i2c_driver;
++ client->flags = 0;
++
++ i2c_set_clientdata(client, ds13xx);
++
++ ds13xx->msg[0].addr = client->addr;
++ ds13xx->msg[0].flags = 0;
++ ds13xx->msg[0].len = 1;
++ ds13xx->msg[0].buf = &ds13xx->reg_addr;
++
++ ds13xx->msg[1].addr = client->addr;
++ ds13xx->msg[1].flags = I2C_M_RD;
++ ds13xx->msg[1].len = sizeof(ds13xx->regs);
++ ds13xx->msg[1].buf = ds13xx->regs;
++
++ /* HACK: "force" implies "needs ds1337-style-oscillator setup" */
++ if (kind >= 0) {
++ ds13xx->type = ds_1337;
++
++ ds13xx->reg_addr = DS133X_REG_CONTROL;
++ ds13xx->msg[1].len = 2;
++
++ ret = i2c_transfer(client->adapter, ds13xx->msg, 2);
++ if (ret != 2) {
++ pr_debug("read error %d\n", ret);
++ err = ret < 0 ? ret : -EIO;
++ goto exit_free;
++ }
++
++ ds13xx->reg_addr = 0;
++ ds13xx->msg[1].len = sizeof(ds13xx->regs);
++
++ /* oscillator is off; need to turn it on */
++ if ((ds13xx->regs[0] & DS133X_BIT_nEOSC)
++ || (ds13xx->regs[1] & DS133X_BIT_OSF)) {
++ dev_err(&ds13xx_dev->dev, "no ds1337 oscillator code\n");
++ goto exit_free;
++ }
++ } else {
++ ds13xx->type = ds_1307;
++ }
++
++ err = ds13xx_i2c_init(ds13xx_dev, client);
++ if (err) {
++ goto exit_free;
++ }
++
++read_rtc:
++ /* read RTC registers */
++
++ ret = i2c_transfer(client->adapter, ds13xx->msg, 2);
++ if (ret != 2) {
++ dev_dbg(&ds13xx_dev->dev, "read error %d\n", ret);
++ err = ret < 0 ? ret : -EIO;
++ goto exit_free;
++ }
++
++ err = ds13xx_rtc_init(ds13xx_dev->dev.platform_data, client);
++ if (err) {
++ goto exit_free;
++ }
++
++ /* minimal sanity checking; some chips (like DS1340) don't
++ * specify the extra bits as must-be-zero, but there are
++ * still a few values that are clearly out-of-range.
++ */
++ ret = ds13xx->regs[DS13XX_REG_SECS];
++ if (ret & DS1307_BIT_CH) {
++ if (ds13xx->type && ds13xx->type != ds_1307) {
++ pr_debug("not a ds1307?\n");
++ goto exit_free;
++ }
++ ds13xx->type = ds_1307;
++
++ /* this partial initialization should work for ds13xx,
++ * ds1338, ds1340, st m41t00, and more.
++ */
++ dev_warn(&client->dev, "oscillator started; SET TIME!\n");
++ ds13xx_write_reg(client, DS13XX_REG_SECS, 0);
++ goto read_rtc;
++ }
++ ret = bcd2bin(ret & 0x7f);
++ if (ret > 60)
++ goto exit_free;
++ ret = bcd2bin(ds13xx->regs[DS13XX_REG_MIN] & 0x7f);
++ if (ret > 60)
++ goto exit_free;
++
++ ret = bcd2bin(ds13xx->regs[DS13XX_REG_MDAY] & 0x3f);
++ if (ret == 0 || ret > 31)
++ goto exit_free;
++
++ ret = bcd2bin(ds13xx->regs[DS13XX_REG_MONTH] & 0x1f);
++ if (ret == 0 || ret > 12)
++ goto exit_free;
++
++ /* force into in 24 hour mode (most chips) or
++ * disable century bit (ds1340)
++ */
++ ret = ds13xx->regs[DS13XX_REG_HOUR];
++ if (ret & (1 << 6)) {
++ if (ret & (1 << 5))
++ ret = bcd2bin(ret & 0x1f) + 12;
++ else
++ ret = bcd2bin(ret);
++ ds13xx_write_reg(client,
++ DS13XX_REG_HOUR,
++ bin2bcd(ret));
++ }
++
++ /* Tell the I2C layer a new client has arrived */
++ if ((err = i2c_attach_client(client)))
++ goto exit_free;
++
++ dev_dbg(&client->dev, "Registering RTC %s\n", client->name);
++ ds13xx->rtc = rtc_device_register(client->name, &client->dev,
++ &ds13xx_rtc_ops, THIS_MODULE);
++ if (IS_ERR(ds13xx->rtc)) {
++ err = PTR_ERR(ds13xx->rtc);
++ dev_err(&client->dev,
++ "unable to register the class device\n");
++ goto exit_detach;
++ }
++
++ return 0;
++
++exit_detach:
++ i2c_detach_client(client);
++exit_free:
++ kfree(ds13xx);
++exit:
++ return err;
++}
++
++static int __devinit ds13xx_attach_adapter(struct i2c_adapter *adapter)
++{
++ if (!i2c_check_functionality(adapter, I2C_FUNC_I2C))
++ return 0;
++ return i2c_probe(adapter, &addr_data, ds13xx_detect);
++}
++
++static int __devexit ds13xx_detach_client(struct i2c_client *client)
++{
++ int err;
++ struct ds13xx *ds13xx = i2c_get_clientdata(client);
++
++ rtc_device_unregister(ds13xx->rtc);
++ if ((err = i2c_detach_client(client)))
++ return err;
++ kfree(ds13xx);
++ return 0;
++}
++
++static struct i2c_driver ds13xx_i2c_driver = {
++ .driver = {
++ .name = "ds13xx",
++ .owner = THIS_MODULE,
++ },
++ .id_table = ds13xx_id,
++ .attach_adapter = ds13xx_attach_adapter,
++ .detach_client = __devexit_p(ds13xx_detach_client),
++};
++
++static int __devinit ds13xx_probe(struct platform_device *pdev)
++{
++ ds13xx_dev = pdev;
++ return i2c_add_driver(&ds13xx_i2c_driver);
++}
++
++static int __devexit ds13xx_remove(struct platform_device *pdev)
++{
++ i2c_del_driver(&ds13xx_i2c_driver);
++ ds13xx_dev = NULL;
++ return 0;
++}
++
++static struct platform_driver ds13xx_driver = {
++ .probe = ds13xx_probe,
++ .remove = __devexit_p(ds13xx_remove),
++ .driver = {
++ .owner = THIS_MODULE,
++ .name = "rtc-ds13xx",
++ },
++};
++
++static int __init ds13xx_init(void)
++{
++ return platform_driver_register(&ds13xx_driver);
++}
++module_init(ds13xx_init);
++
++static void __exit ds13xx_exit(void)
++{
++ platform_driver_unregister(&ds13xx_driver);
++}
++module_exit(ds13xx_exit);
++
++MODULE_DESCRIPTION("RTC driver for DS1307,1337,1339,1340 and similar chips");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/rtc/rtc-mxc.c linux-2.6.28-karo/drivers/rtc/rtc-mxc.c
+--- linux-2.6.28/drivers/rtc/rtc-mxc.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/rtc/rtc-mxc.c 2009-03-11 18:47:09.000000000 +0100
+@@ -0,0 +1,835 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++/*
++ * Implementation based on rtc-ds1553.c
++ */
++
++/*!
++ * @defgroup RTC Real Time Clock (RTC) Driver
++ */
++/*!
++ * @file rtc-mxc.c
++ * @brief Real Time Clock interface
++ *
++ * This file contains Real Time Clock interface for Linux.
++ *
++ * @ingroup RTC
++ */
++
++#include <linux/rtc.h>
++#include <linux/module.h>
++#include <linux/fs.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/uaccess.h>
++
++#include <mach/hardware.h>
++#include <asm/io.h>
++
++#define RTC_INPUT_CLK_32768HZ (0x00 << 5)
++#define RTC_INPUT_CLK_32000HZ (0x01 << 5)
++#define RTC_INPUT_CLK_38400HZ (0x02 << 5)
++
++#define RTC_SW_BIT (1 << 0)
++#define RTC_ALM_BIT (1 << 2)
++#define RTC_1HZ_BIT (1 << 4)
++#define RTC_2HZ_BIT (1 << 7)
++#define RTC_SAM0_BIT (1 << 8)
++#define RTC_SAM1_BIT (1 << 9)
++#define RTC_SAM2_BIT (1 << 10)
++#define RTC_SAM3_BIT (1 << 11)
++#define RTC_SAM4_BIT (1 << 12)
++#define RTC_SAM5_BIT (1 << 13)
++#define RTC_SAM6_BIT (1 << 14)
++#define RTC_SAM7_BIT (1 << 15)
++#define PIT_ALL_ON (RTC_2HZ_BIT | RTC_SAM0_BIT | RTC_SAM1_BIT | \
++ RTC_SAM2_BIT | RTC_SAM3_BIT | RTC_SAM4_BIT | \
++ RTC_SAM5_BIT | RTC_SAM6_BIT | RTC_SAM7_BIT)
++
++#define RTC_ENABLE_BIT (1 << 7)
++
++#define MAX_PIE_NUM 9
++#define MAX_PIE_FREQ 512
++const u32 PIE_BIT_DEF[MAX_PIE_NUM][2] = {
++ {2, RTC_2HZ_BIT},
++ {4, RTC_SAM0_BIT},
++ {8, RTC_SAM1_BIT},
++ {16, RTC_SAM2_BIT},
++ {32, RTC_SAM3_BIT},
++ {64, RTC_SAM4_BIT},
++ {128, RTC_SAM5_BIT},
++ {256, RTC_SAM6_BIT},
++ {MAX_PIE_FREQ, RTC_SAM7_BIT},
++};
++
++/* Those are the bits from a classic RTC we want to mimic */
++#define RTC_IRQF 0x80 /* any of the following 3 is active */
++#define RTC_PF 0x40 /* Periodic interrupt */
++#define RTC_AF 0x20 /* Alarm interrupt */
++#define RTC_UF 0x10 /* Update interrupt for 1Hz RTC */
++
++#define MXC_RTC_TIME 0
++#define MXC_RTC_ALARM 1
++
++#define RTC_HOURMIN 0x00 /* 32bit rtc hour/min counter reg */
++#define RTC_SECOND 0x04 /* 32bit rtc seconds counter reg */
++#define RTC_ALRM_HM 0x08 /* 32bit rtc alarm hour/min reg */
++#define RTC_ALRM_SEC 0x0C /* 32bit rtc alarm seconds reg */
++#define RTC_RTCCTL 0x10 /* 32bit rtc control reg */
++#define RTC_RTCISR 0x14 /* 32bit rtc interrupt status reg */
++#define RTC_RTCIENR 0x18 /* 32bit rtc interrupt enable reg */
++#define RTC_STPWCH 0x1C /* 32bit rtc stopwatch min reg */
++#define RTC_DAYR 0x20 /* 32bit rtc days counter reg */
++#define RTC_DAYALARM 0x24 /* 32bit rtc day alarm reg */
++#define RTC_TEST1 0x28 /* 32bit rtc test reg 1 */
++#define RTC_TEST2 0x2C /* 32bit rtc test reg 2 */
++#define RTC_TEST3 0x30 /* 32bit rtc test reg 3 */
++
++struct rtc_plat_data {
++ struct rtc_device *rtc;
++ void __iomem *ioaddr;
++ unsigned long baseaddr;
++ int irq;
++ struct clk *clk;
++ unsigned int irqen;
++ int alrm_sec;
++ int alrm_min;
++ int alrm_hour;
++ int alrm_mday;
++};
++
++/*!
++ * @defgroup RTC Real Time Clock (RTC) Driver
++ */
++/*!
++ * @file rtc-mxc.c
++ * @brief Real Time Clock interface
++ *
++ * This file contains Real Time Clock interface for Linux.
++ *
++ * @ingroup RTC
++ */
++
++#if defined(CONFIG_MXC_MC13783_RTC)
++#include <asm/arch/pmic_rtc.h>
++#else
++#define pmic_rtc_get_time(args) MXC_EXTERNAL_RTC_NONE
++#define pmic_rtc_set_time(args) MXC_EXTERNAL_RTC_NONE
++#define pmic_rtc_loaded() 0
++#endif
++
++#define RTC_VERSION "1.0"
++#define MXC_EXTERNAL_RTC_OK 0
++#define MXC_EXTERNAL_RTC_ERR -1
++#define MXC_EXTERNAL_RTC_NONE -2
++
++/*!
++ * This function reads the RTC value from some external source.
++ *
++ * @param second pointer to the returned value in second
++ *
++ * @return 0 if successful; non-zero otherwise
++ */
++int get_ext_rtc_time(u32 * second)
++{
++ int ret = 0;
++ struct timeval tmp;
++ if (!pmic_rtc_loaded()) {
++ return MXC_EXTERNAL_RTC_NONE;
++ }
++
++ ret = pmic_rtc_get_time(&tmp);
++
++ if (0 == ret)
++ *second = tmp.tv_sec;
++ else
++ ret = MXC_EXTERNAL_RTC_ERR;
++
++ return ret;
++}
++
++/*!
++ * This function sets external RTC
++ *
++ * @param second value in second to be set to external RTC
++ *
++ * @return 0 if successful; non-zero otherwise
++ */
++int set_ext_rtc_time(u32 second)
++{
++ int ret = 0;
++ struct timeval tmp;
++
++ if (!pmic_rtc_loaded()) {
++ return MXC_EXTERNAL_RTC_NONE;
++ }
++
++ tmp.tv_sec = second;
++
++ ret = pmic_rtc_set_time(&tmp);
++
++ if (0 != ret)
++ ret = MXC_EXTERNAL_RTC_ERR;
++
++ return ret;
++}
++
++static u32 rtc_freq = 2; /* minimun value for PIE */
++static unsigned long rtc_status;
++
++static struct rtc_time g_rtc_alarm = {
++ .tm_year = 0,
++ .tm_mon = 0,
++ .tm_mday = 0,
++ .tm_hour = 0,
++ .tm_mon = 0,
++ .tm_sec = 0,
++};
++
++static DEFINE_SPINLOCK(rtc_lock);
++
++/*!
++ * This function is used to obtain the RTC time or the alarm value in
++ * second.
++ *
++ * @param time_alarm use MXC_RTC_TIME for RTC time value; MXC_RTC_ALARM for alarm value
++ *
++ * @return The RTC time or alarm time in second.
++ */
++static u32 get_alarm_or_time(struct device *dev, int time_alarm)
++{
++ struct platform_device *pdev = to_platform_device(dev);
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ u32 day, hr, min, sec, hr_min;
++ if (time_alarm == MXC_RTC_TIME) {
++ day = readw(ioaddr + RTC_DAYR);
++ hr_min = readw(ioaddr + RTC_HOURMIN);
++ sec = readw(ioaddr + RTC_SECOND);
++ } else if (time_alarm == MXC_RTC_ALARM) {
++ day = readw(ioaddr + RTC_DAYALARM);
++ hr_min = (0x0000FFFF) & readw(ioaddr + RTC_ALRM_HM);
++ sec = readw(ioaddr + RTC_ALRM_SEC);
++ } else {
++ panic("wrong value for time_alarm=%d\n", time_alarm);
++ }
++
++ hr = hr_min >> 8;
++ min = hr_min & 0x00FF;
++
++ return ((((day * 24 + hr) * 60) + min) * 60 + sec);
++}
++
++/*!
++ * This function sets the RTC alarm value or the time value.
++ *
++ * @param time_alarm the new alarm value to be updated in the RTC
++ * @param time use MXC_RTC_TIME for RTC time value; MXC_RTC_ALARM for alarm value
++ */
++static void set_alarm_or_time(struct device *dev, int time_alarm, u32 time)
++{
++ u32 day, hr, min, sec, temp;
++ struct platform_device *pdev = to_platform_device(dev);
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ day = time / 86400;
++ time -= day * 86400;
++ /* time is within a day now */
++ hr = time / 3600;
++ time -= hr * 3600;
++ /* time is within an hour now */
++ min = time / 60;
++ sec = time - min * 60;
++
++ temp = (hr << 8) + min;
++
++ if (time_alarm == MXC_RTC_TIME) {
++ writew(day, ioaddr + RTC_DAYR);
++ writew(sec, ioaddr + RTC_SECOND);
++ writew(temp, ioaddr + RTC_HOURMIN);
++ } else if (time_alarm == MXC_RTC_ALARM) {
++ writew(day, ioaddr + RTC_DAYALARM);
++ writew(sec, ioaddr + RTC_ALRM_SEC);
++ writew(temp, ioaddr + RTC_ALRM_HM);
++ } else {
++ panic("wrong value for time_alarm=%d\n", time_alarm);
++ }
++}
++
++/*!
++ * This function updates the RTC alarm registers and then clears all the
++ * interrupt status bits.
++ *
++ * @param alrm the new alarm value to be updated in the RTC
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int rtc_update_alarm(struct device *dev, struct rtc_time *alrm)
++{
++ struct rtc_time alarm_tm, now_tm;
++ unsigned long now, time;
++ int ret;
++ struct platform_device *pdev = to_platform_device(dev);
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++
++ now = get_alarm_or_time(dev, MXC_RTC_TIME);
++ rtc_time_to_tm(now, &now_tm);
++ alarm_tm.tm_year = now_tm.tm_year;
++ alarm_tm.tm_mon = now_tm.tm_mon;
++ alarm_tm.tm_mday = now_tm.tm_mday;
++ alarm_tm.tm_hour = alrm->tm_hour;
++ alarm_tm.tm_min = alrm->tm_min;
++ alarm_tm.tm_sec = alrm->tm_sec;
++ rtc_tm_to_time(&now_tm, &now);
++ rtc_tm_to_time(&alarm_tm, &time);
++ if (time < now) {
++ time += 60 * 60 * 24;
++ rtc_time_to_tm(time, &alarm_tm);
++ }
++ ret = rtc_tm_to_time(&alarm_tm, &time);
++
++ /* clear all the interrupt status bits */
++ writew(readw(ioaddr + RTC_RTCISR), ioaddr + RTC_RTCISR);
++
++ set_alarm_or_time(dev, MXC_RTC_ALARM, time);
++
++ return ret;
++}
++
++/*!
++ * This function is the RTC interrupt service routine.
++ *
++ * @param irq RTC IRQ number
++ * @param dev_id device ID which is not used
++ *
++ * @return IRQ_HANDLED as defined in the include/linux/interrupt.h file.
++ */
++static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
++{
++ struct platform_device *pdev = dev_id;
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ u32 status;
++ u32 events = 0;
++ spin_lock(&rtc_lock);
++ status = readw(ioaddr + RTC_RTCISR) & readw(ioaddr + RTC_RTCIENR);
++ /* clear interrupt sources */
++ writew(status, ioaddr + RTC_RTCISR);
++
++ /* clear alarm interrupt if it has occurred */
++ if (status & RTC_ALM_BIT) {
++ status &= ~RTC_ALM_BIT;
++ }
++
++ /* update irq data & counter */
++ if (status & RTC_ALM_BIT) {
++ events |= (RTC_AF | RTC_IRQF);
++ }
++ if (status & RTC_1HZ_BIT) {
++ events |= (RTC_UF | RTC_IRQF);
++ }
++ if (status & PIT_ALL_ON) {
++ events |= (RTC_PF | RTC_IRQF);
++ }
++
++ if ((status & RTC_ALM_BIT) && rtc_valid_tm(&g_rtc_alarm)) {
++ rtc_update_alarm(&pdev->dev, &g_rtc_alarm);
++ }
++
++ spin_unlock(&rtc_lock);
++ rtc_update_irq(pdata->rtc, 1, events);
++ return IRQ_HANDLED;
++}
++
++/*!
++ * This function is used to open the RTC driver by registering the RTC
++ * interrupt service routine.
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_open(struct device *dev)
++{
++ if (test_and_set_bit(1, &rtc_status))
++ return -EBUSY;
++ return 0;
++}
++
++/*!
++ * clear all interrupts and release the IRQ
++ */
++static void mxc_rtc_release(struct device *dev)
++{
++ struct platform_device *pdev = to_platform_device(dev);
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++
++ spin_lock_irq(&rtc_lock);
++ writew(0, ioaddr + RTC_RTCIENR); /* Disable all rtc interrupts */
++ writew(0xFFFFFFFF, ioaddr + RTC_RTCISR); /* Clear all interrupt status */
++ spin_unlock_irq(&rtc_lock);
++ rtc_status = 0;
++}
++
++/*!
++ * This function is used to support some ioctl calls directly.
++ * Other ioctl calls are supported indirectly through the
++ * arm/common/rtctime.c file.
++ *
++ * @param cmd ioctl command as defined in include/linux/rtc.h
++ * @param arg value for the ioctl command
++ *
++ * @return 0 if successful or negative value otherwise.
++ */
++static int mxc_rtc_ioctl(struct device *dev, unsigned int cmd,
++ unsigned long arg)
++{
++ struct platform_device *pdev = to_platform_device(dev);
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ int i;
++ switch (cmd) {
++ case RTC_PIE_OFF:
++ writew((readw(ioaddr + RTC_RTCIENR) & ~PIT_ALL_ON),
++ ioaddr + RTC_RTCIENR);
++ return 0;
++ case RTC_IRQP_SET:
++ if (arg < 2 || arg > MAX_PIE_FREQ || (arg % 2) != 0)
++ return -EINVAL; /* Also make sure a power of 2Hz */
++ if ((arg > 64) && (!capable(CAP_SYS_RESOURCE)))
++ return -EACCES;
++ rtc_freq = arg;
++ return 0;
++ case RTC_IRQP_READ:
++ return put_user(rtc_freq, (u32 *) arg);
++ case RTC_PIE_ON:
++ for (i = 0; i < MAX_PIE_NUM; i++) {
++ if (PIE_BIT_DEF[i][0] == rtc_freq) {
++ break;
++ }
++ }
++ if (i == MAX_PIE_NUM) {
++ return -EACCES;
++ }
++ spin_lock_irq(&rtc_lock);
++ writew((readw(ioaddr + RTC_RTCIENR) | PIE_BIT_DEF[i][1]),
++ ioaddr + RTC_RTCIENR);
++ spin_unlock_irq(&rtc_lock);
++ return 0;
++ case RTC_AIE_OFF:
++ spin_lock_irq(&rtc_lock);
++ writew((readw(ioaddr + RTC_RTCIENR) & ~RTC_ALM_BIT),
++ ioaddr + RTC_RTCIENR);
++ spin_unlock_irq(&rtc_lock);
++ return 0;
++
++ case RTC_AIE_ON:
++ spin_lock_irq(&rtc_lock);
++ writew((readw(ioaddr + RTC_RTCIENR) | RTC_ALM_BIT),
++ ioaddr + RTC_RTCIENR);
++ spin_unlock_irq(&rtc_lock);
++ return 0;
++
++ case RTC_UIE_OFF: /* UIE is for the 1Hz interrupt */
++ spin_lock_irq(&rtc_lock);
++ writew((readw(ioaddr + RTC_RTCIENR) & ~RTC_1HZ_BIT),
++ ioaddr + RTC_RTCIENR);
++ spin_unlock_irq(&rtc_lock);
++ return 0;
++
++ case RTC_UIE_ON:
++ spin_lock_irq(&rtc_lock);
++ writew((readw(ioaddr + RTC_RTCIENR) | RTC_1HZ_BIT),
++ ioaddr + RTC_RTCIENR);
++ spin_unlock_irq(&rtc_lock);
++ return 0;
++ }
++ return -ENOIOCTLCMD;
++}
++
++/*!
++ * This function reads the current RTC time into tm in Gregorian date.
++ *
++ * @param tm contains the RTC time value upon return
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_read_time(struct device *dev, struct rtc_time *tm)
++{
++ u32 val;
++
++ /* Avoid roll-over from reading the different registers */
++ do {
++ val = get_alarm_or_time(dev, MXC_RTC_TIME);
++ } while (val != get_alarm_or_time(dev, MXC_RTC_TIME));
++
++ rtc_time_to_tm(val, tm);
++ return 0;
++}
++
++/*!
++ * This function sets the internal RTC time based on tm in Gregorian date.
++ *
++ * @param tm the time value to be set in the RTC
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_set_time(struct device *dev, struct rtc_time *tm)
++{
++ unsigned long time;
++ int ret;
++ ret = rtc_tm_to_time(tm, &time);
++ if (ret != 0) {
++ return ret;
++ }
++
++ /* Avoid roll-over from reading the different registers */
++ do {
++ set_alarm_or_time(dev, MXC_RTC_TIME, time);
++ } while (time != get_alarm_or_time(dev, MXC_RTC_TIME));
++
++ ret = set_ext_rtc_time(time);
++
++ if (ret != MXC_EXTERNAL_RTC_OK) {
++ if (ret == MXC_EXTERNAL_RTC_NONE) {
++ pr_info("No external RTC\n");
++ ret = 0;
++ } else
++ pr_info("Failed to set external RTC\n");
++ }
++
++ return ret;
++}
++
++/*!
++ * This function reads the current alarm value into the passed in \b alrm
++ * argument. It updates the \b alrm's pending field value based on the whether
++ * an alarm interrupt occurs or not.
++ *
++ * @param alrm contains the RTC alarm value upon return
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
++{
++ struct platform_device *pdev = to_platform_device(dev);
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++
++ rtc_time_to_tm(get_alarm_or_time(dev, MXC_RTC_ALARM), &alrm->time);
++ alrm->enabled = !!(readw(ioaddr + RTC_RTCIENR) & RTC_ALM_BIT);
++ alrm->pending = !!(readw(ioaddr + RTC_RTCISR) & RTC_ALM_BIT);
++ return 0;
++}
++
++/*!
++ * This function sets the RTC alarm based on passed in alrm.
++ *
++ * @param alrm the alarm value to be set in the RTC
++ *
++ * @return 0 if successful; non-zero otherwise.
++ */
++static int mxc_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
++{
++ struct platform_device *pdev = to_platform_device(dev);
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ int ret;
++
++ spin_lock_irq(&rtc_lock);
++ if (rtc_valid_tm(&alrm->time)) {
++ if (alrm->time.tm_sec > 59 ||
++ alrm->time.tm_hour > 23 || alrm->time.tm_min > 59) {
++ ret = -EINVAL;
++ goto out;
++ }
++ ret = rtc_update_alarm(dev, &alrm->time);
++ } else {
++ if ((ret = rtc_valid_tm(&alrm->time)))
++ goto out;
++ ret = rtc_update_alarm(dev, &alrm->time);
++ }
++
++ if (ret == 0) {
++ memcpy(&g_rtc_alarm, &alrm->time, sizeof(struct rtc_time));
++
++ if (alrm->enabled) {
++ writew((readw(ioaddr + RTC_RTCIENR) | RTC_ALM_BIT),
++ ioaddr + RTC_RTCIENR);
++ } else {
++ writew((readw(ioaddr + RTC_RTCIENR) & ~RTC_ALM_BIT),
++ ioaddr + RTC_RTCIENR);
++ }
++ device_set_wakeup_enable(dev, alrm->enabled);
++ }
++ out:
++ spin_unlock_irq(&rtc_lock);
++
++ return ret;
++}
++
++/*!
++ * This function is used to provide the content for the /proc/driver/rtc
++ * file.
++ *
++ * @param buf the buffer to hold the information that the driver wants to write
++ *
++ * @return The number of bytes written into the rtc file.
++ */
++static int mxc_rtc_proc(struct device *dev, struct seq_file *sq)
++{
++ struct platform_device *pdev = to_platform_device(dev);
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ void __iomem *ioaddr = pdata->ioaddr;
++ char *p = sq->buf;
++
++ p += sprintf(p, "alarm_IRQ\t: %s\n",
++ (((readw(ioaddr + RTC_RTCIENR)) & RTC_ALM_BIT) !=
++ 0) ? "yes" : "no");
++ p += sprintf(p, "update_IRQ\t: %s\n",
++ (((readw(ioaddr + RTC_RTCIENR)) & RTC_1HZ_BIT) !=
++ 0) ? "yes" : "no");
++ p += sprintf(p, "periodic_IRQ\t: %s\n",
++ (((readw(ioaddr + RTC_RTCIENR)) & PIT_ALL_ON) !=
++ 0) ? "yes" : "no");
++ p += sprintf(p, "periodic_freq\t: %d\n", rtc_freq);
++
++ return p - (sq->buf);
++}
++
++/*!
++ * The RTC driver structure
++ */
++static struct rtc_class_ops mxc_rtc_ops = {
++ .open = mxc_rtc_open,
++ .release = mxc_rtc_release,
++ .ioctl = mxc_rtc_ioctl,
++ .read_time = mxc_rtc_read_time,
++ .set_time = mxc_rtc_set_time,
++ .read_alarm = mxc_rtc_read_alarm,
++ .set_alarm = mxc_rtc_set_alarm,
++ .proc = mxc_rtc_proc,
++};
++
++/*! MXC RTC Power management control */
++
++static struct timespec mxc_rtc_delta;
++
++static int mxc_rtc_probe(struct platform_device *pdev)
++{
++ struct clk *clk;
++ struct timespec tv;
++ struct resource *res;
++ struct rtc_time temp_time;
++ struct rtc_device *rtc;
++ struct rtc_plat_data *pdata = NULL;
++ u32 sec, reg;
++ int ret;
++ int rtc_input_clk;
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res)
++ return -ENODEV;
++
++ pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
++ if (!pdata)
++ return -ENOMEM;
++
++ pdata->clk = clk_get(&pdev->dev, "rtc_clk");
++ clk_enable(pdata->clk);
++
++ pdata->baseaddr = res->start;
++ pdata->ioaddr = ((void *)(IO_ADDRESS(pdata->baseaddr)));
++ /* Configure and enable the RTC */
++ rtc = rtc_device_register(pdev->name, &pdev->dev, &mxc_rtc_ops,
++ THIS_MODULE);
++ if (IS_ERR(rtc)) {
++ ret = PTR_ERR(rtc);
++ if (pdata->irq >= 0)
++ free_irq(pdata->irq, pdev);
++ kfree(pdata);
++ return ret;
++ }
++ pdata->rtc = rtc;
++ platform_set_drvdata(pdev, pdata);
++
++ pdata->irq = platform_get_irq(pdev, 0);
++ if (pdata->irq >= 0) {
++ if (request_irq(pdata->irq, mxc_rtc_interrupt, IRQF_SHARED,
++ pdev->name, pdev) < 0) {
++ dev_warn(&pdev->dev, "interrupt not available.\n");
++ pdata->irq = -1;
++ }
++ }
++ device_set_wakeup_capable(&pdev->dev, 1);
++
++ ret = get_ext_rtc_time(&sec);
++ if (ret == MXC_EXTERNAL_RTC_OK) {
++ rtc_time_to_tm(sec, &temp_time);
++ mxc_rtc_set_time(&pdev->dev, &temp_time);
++
++ } else if (ret == MXC_EXTERNAL_RTC_NONE) {
++ pr_info("No external RTC device\n");
++ } else {
++ pr_info("Reading external RTC device failed\n");
++ }
++ tv.tv_nsec = 0;
++ tv.tv_sec = get_alarm_or_time(&pdev->dev, MXC_RTC_TIME);
++ clk = clk_get(NULL, "ckil");
++ rtc_input_clk = clk_get_rate(clk);
++ if (rtc_input_clk == 32768)
++ reg = RTC_INPUT_CLK_32768HZ;
++ else if (rtc_input_clk == 32000)
++ reg = RTC_INPUT_CLK_32000HZ;
++ else if (rtc_input_clk == 38400)
++ reg = RTC_INPUT_CLK_38400HZ;
++ else {
++ printk(KERN_ALERT "rtc clock is not valid");
++ return -EINVAL;
++ }
++ clk_put(clk);
++ reg |= RTC_ENABLE_BIT;
++ writew(reg, (pdata->ioaddr + RTC_RTCCTL));
++ if (((readw(pdata->ioaddr + RTC_RTCCTL)) & RTC_ENABLE_BIT) == 0) {
++ printk(KERN_ALERT "rtc : hardware module can't be enabled!\n");
++ return -EPERM;
++ }
++ printk("Real Time clock Driver v%s %ukHz base clock\n", RTC_VERSION,
++ rtc_input_clk);
++ return 0;
++}
++
++static int __exit mxc_rtc_remove(struct platform_device *pdev)
++{
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ rtc_device_unregister(pdata->rtc);
++ if (pdata->irq >= 0) {
++ free_irq(pdata->irq, pdev);
++ }
++ clk_disable(pdata->clk);
++ clk_put(pdata->clk);
++ kfree(pdata);
++ mxc_rtc_release(NULL);
++ return 0;
++}
++
++/*!
++ * This function is called to save the system time delta relative to
++ * the MXC RTC when enterring a low power state. This time delta is
++ * then used on resume to adjust the system time to account for time
++ * loss while suspended.
++ *
++ * @param pdev not used
++ * @param state Power state to enter.
++ *
++ * @return The function always returns 0.
++ */
++static int mxc_rtc_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ struct timespec tv;
++
++ /* calculate time delta for suspend */
++ /* RTC precision is 1 second; adjust delta for avg 1/2 sec err */
++ tv.tv_nsec = NSEC_PER_SEC >> 1;
++ tv.tv_sec = get_alarm_or_time(&pdev->dev, MXC_RTC_TIME);
++ set_normalized_timespec(&mxc_rtc_delta,
++ xtime.tv_sec - tv.tv_sec,
++ xtime.tv_nsec - tv.tv_nsec);
++
++ if (device_may_wakeup(&pdev->dev)) {
++ int ret;
++
++ ret = enable_irq_wake(pdata->irq);
++ if (ret != 0) {
++ dev_warn(&pdev->dev, "Failed to enable IRQ wake for IRQ %d: %d\n",
++ pdata->irq, ret);
++ return ret;
++ }
++ }
++ return 0;
++}
++
++/*!
++ * This function is called to correct the system time based on the
++ * current MXC RTC time relative to the time delta saved during
++ * suspend.
++ *
++ * @param pdev not used
++ *
++ * @return The function always returns 0.
++ */
++static int mxc_rtc_resume(struct platform_device *pdev)
++{
++ struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
++ struct timespec tv;
++ struct timespec ts;
++
++ tv.tv_nsec = 0;
++ tv.tv_sec = get_alarm_or_time(&pdev->dev, MXC_RTC_TIME);
++
++ /* restore wall clock using delta against this RTC;
++ * adjust again for avg 1/2 second RTC sampling error
++ */
++ set_normalized_timespec(&ts,
++ tv.tv_sec + mxc_rtc_delta.tv_sec,
++ (NSEC_PER_SEC >> 1) + mxc_rtc_delta.tv_nsec);
++ do_settimeofday(&ts);
++ if (device_may_wakeup(&pdev->dev))
++ disable_irq_wake(pdata->irq);
++ return 0;
++}
++
++/*!
++ * Contains pointers to the power management callback functions.
++ */
++static struct platform_driver mxc_rtc_driver = {
++ .driver = {
++ .name = "mxc_rtc",
++ },
++ .probe = mxc_rtc_probe,
++ .remove = __exit_p(mxc_rtc_remove),
++ .suspend = mxc_rtc_suspend,
++ .resume = mxc_rtc_resume,
++};
++
++/*!
++ * This function creates the /proc/driver/rtc file and registers the device RTC
++ * in the /dev/misc directory. It also reads the RTC value from external source
++ * and setup the internal RTC properly.
++ *
++ * @return -1 if RTC is failed to initialize; 0 is successful.
++ */
++static int __init mxc_rtc_init(void)
++{
++ return platform_driver_register(&mxc_rtc_driver);
++}
++
++/*!
++ * This function removes the /proc/driver/rtc file and un-registers the
++ * device RTC from the /dev/misc directory.
++ */
++static void __exit mxc_rtc_exit(void)
++{
++ platform_driver_unregister(&mxc_rtc_driver);
++
++}
++
++module_init(mxc_rtc_init);
++module_exit(mxc_rtc_exit);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("Realtime Clock Driver (RTC)");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/serial/imx.c linux-2.6.28-karo/drivers/serial/imx.c
+--- linux-2.6.28/drivers/serial/imx.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/serial/imx.c 2009-03-11 13:16:24.000000000 +0100
+@@ -31,6 +31,7 @@
+ #endif
+
+ #include <linux/module.h>
++#include <linux/io.h>
+ #include <linux/ioport.h>
+ #include <linux/init.h>
+ #include <linux/console.h>
+@@ -42,7 +43,6 @@
+ #include <linux/serial.h>
+ #include <linux/clk.h>
+
+-#include <asm/io.h>
+ #include <asm/irq.h>
+ #include <mach/hardware.h>
+ #include <mach/imx-uart.h>
+@@ -66,7 +66,7 @@
+ #define ONEMS 0xb0 /* One Millisecond register */
+ #define UTS 0xb4 /* UART Test Register */
+ #endif
+-#ifdef CONFIG_ARCH_IMX
++#if defined(CONFIG_ARCH_IMX) || defined(CONFIG_ARCH_MX1)
+ #define BIPR1 0xb0 /* Incremental Preset Register 1 */
+ #define BIPR2 0xb4 /* Incremental Preset Register 2 */
+ #define BIPR3 0xb8 /* Incremental Preset Register 3 */
+@@ -79,105 +79,105 @@
+ #endif
+
+ /* UART Control Register Bit Fields.*/
+-#define URXD_CHARRDY (1<<15)
+-#define URXD_ERR (1<<14)
+-#define URXD_OVRRUN (1<<13)
+-#define URXD_FRMERR (1<<12)
+-#define URXD_BRK (1<<11)
+-#define URXD_PRERR (1<<10)
+-#define UCR1_ADEN (1<<15) /* Auto dectect interrupt */
+-#define UCR1_ADBR (1<<14) /* Auto detect baud rate */
+-#define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */
+-#define UCR1_IDEN (1<<12) /* Idle condition interrupt */
+-#define UCR1_RRDYEN (1<<9) /* Recv ready interrupt enable */
+-#define UCR1_RDMAEN (1<<8) /* Recv ready DMA enable */
+-#define UCR1_IREN (1<<7) /* Infrared interface enable */
+-#define UCR1_TXMPTYEN (1<<6) /* Transimitter empty interrupt enable */
+-#define UCR1_RTSDEN (1<<5) /* RTS delta interrupt enable */
+-#define UCR1_SNDBRK (1<<4) /* Send break */
+-#define UCR1_TDMAEN (1<<3) /* Transmitter ready DMA enable */
+-#ifdef CONFIG_ARCH_IMX
+-#define UCR1_UARTCLKEN (1<<2) /* UART clock enabled */
++#define URXD_CHARRDY (1 << 15)
++#define URXD_ERR (1 << 14)
++#define URXD_OVRRUN (1 << 13)
++#define URXD_FRMERR (1 << 12)
++#define URXD_BRK (1 << 11)
++#define URXD_PRERR (1 << 10)
++#define UCR1_ADEN (1 << 15) /* Auto dectect interrupt */
++#define UCR1_ADBR (1 << 14) /* Auto detect baud rate */
++#define UCR1_TRDYEN (1 << 13) /* Transmitter ready interrupt enable */
++#define UCR1_IDEN (1 << 12) /* Idle condition interrupt */
++#define UCR1_RRDYEN (1 << 9) /* Recv ready interrupt enable */
++#define UCR1_RDMAEN (1 << 8) /* Recv ready DMA enable */
++#define UCR1_IREN (1 << 7) /* Infrared interface enable */
++#define UCR1_TXMPTYEN (1 << 6) /* Transimitter empty interrupt enable */
++#define UCR1_RTSDEN (1 << 5) /* RTS delta interrupt enable */
++#define UCR1_SNDBRK (1 << 4) /* Send break */
++#define UCR1_TDMAEN (1 << 3) /* Transmitter ready DMA enable */
++#if defined(CONFIG_ARCH_IMX) || defined(CONFIG_ARCH_MX1)
++#define UCR1_UARTCLKEN (1 << 2) /* UART clock enabled */
+ #endif
+ #if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX2
+-#define UCR1_UARTCLKEN (0) /* not present on mx2/mx3 */
++#define UCR1_UARTCLKEN 0 /* not present on mx2/mx3 */
+ #endif
+-#define UCR1_DOZE (1<<1) /* Doze */
+-#define UCR1_UARTEN (1<<0) /* UART enabled */
+-#define UCR2_ESCI (1<<15) /* Escape seq interrupt enable */
+-#define UCR2_IRTS (1<<14) /* Ignore RTS pin */
+-#define UCR2_CTSC (1<<13) /* CTS pin control */
+-#define UCR2_CTS (1<<12) /* Clear to send */
+-#define UCR2_ESCEN (1<<11) /* Escape enable */
+-#define UCR2_PREN (1<<8) /* Parity enable */
+-#define UCR2_PROE (1<<7) /* Parity odd/even */
+-#define UCR2_STPB (1<<6) /* Stop */
+-#define UCR2_WS (1<<5) /* Word size */
+-#define UCR2_RTSEN (1<<4) /* Request to send interrupt enable */
+-#define UCR2_TXEN (1<<2) /* Transmitter enabled */
+-#define UCR2_RXEN (1<<1) /* Receiver enabled */
+-#define UCR2_SRST (1<<0) /* SW reset */
+-#define UCR3_DTREN (1<<13) /* DTR interrupt enable */
+-#define UCR3_PARERREN (1<<12) /* Parity enable */
+-#define UCR3_FRAERREN (1<<11) /* Frame error interrupt enable */
+-#define UCR3_DSR (1<<10) /* Data set ready */
+-#define UCR3_DCD (1<<9) /* Data carrier detect */
+-#define UCR3_RI (1<<8) /* Ring indicator */
+-#define UCR3_TIMEOUTEN (1<<7) /* Timeout interrupt enable */
+-#define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */
+-#define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */
+-#define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */
++#define UCR1_DOZE (1 << 1) /* Doze */
++#define UCR1_UARTEN (1 << 0) /* UART enabled */
++#define UCR2_ESCI (1 << 15) /* Escape seq interrupt enable */
++#define UCR2_IRTS (1 << 14) /* Ignore RTS pin */
++#define UCR2_CTSC (1 << 13) /* CTS pin control */
++#define UCR2_CTS (1 << 12) /* Clear to send */
++#define UCR2_ESCEN (1 << 11) /* Escape enable */
++#define UCR2_PREN (1 << 8) /* Parity enable */
++#define UCR2_PROE (1 << 7) /* Parity odd/even */
++#define UCR2_STPB (1 << 6) /* Stop */
++#define UCR2_WS (1 << 5) /* Word size */
++#define UCR2_RTSEN (1 << 4) /* Request to send interrupt enable */
++#define UCR2_TXEN (1 << 2) /* Transmitter enabled */
++#define UCR2_RXEN (1 << 1) /* Receiver enabled */
++#define UCR2_SRST (1 << 0) /* SW reset */
++#define UCR3_DTREN (1 << 13) /* DTR interrupt enable */
++#define UCR3_PARERREN (1 << 12) /* Parity enable */
++#define UCR3_FRAERREN (1 << 11) /* Frame error interrupt enable */
++#define UCR3_DSR (1 << 10) /* Data set ready */
++#define UCR3_DCD (1 << 9) /* Data carrier detect */
++#define UCR3_RI (1 << 8) /* Ring indicator */
++#define UCR3_TIMEOUTEN (1 << 7) /* Timeout interrupt enable */
++#define UCR3_RXDSEN (1 << 6) /* Receive status interrupt enable */
++#define UCR3_AIRINTEN (1 << 5) /* Async IR wake interrupt enable */
++#define UCR3_AWAKEN (1 << 4) /* Async wake interrupt enable */
+ #ifdef CONFIG_ARCH_IMX
+-#define UCR3_REF25 (1<<3) /* Ref freq 25 MHz, only on mx1 */
+-#define UCR3_REF30 (1<<2) /* Ref Freq 30 MHz, only on mx1 */
++#define UCR3_REF25 (1 << 3) /* Ref freq 25 MHz, only on mx1 */
++#define UCR3_REF30 (1 << 2) /* Ref Freq 30 MHz, only on mx1 */
+ #endif
+ #if defined CONFIG_ARCH_MX2 || defined CONFIG_ARCH_MX3
+-#define UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select, on mx2/mx3 */
++#define UCR3_RXDMUXSEL (1 << 2) /* RXD Muxed Input Select, on mx2/mx3 */
+ #endif
+-#define UCR3_INVT (1<<1) /* Inverted Infrared transmission */
+-#define UCR3_BPEN (1<<0) /* Preset registers enable */
+-#define UCR4_CTSTL_32 (32<<10) /* CTS trigger level (32 chars) */
+-#define UCR4_INVR (1<<9) /* Inverted infrared reception */
+-#define UCR4_ENIRI (1<<8) /* Serial infrared interrupt enable */
+-#define UCR4_WKEN (1<<7) /* Wake interrupt enable */
+-#define UCR4_REF16 (1<<6) /* Ref freq 16 MHz */
+-#define UCR4_IRSC (1<<5) /* IR special case */
+-#define UCR4_TCEN (1<<3) /* Transmit complete interrupt enable */
+-#define UCR4_BKEN (1<<2) /* Break condition interrupt enable */
+-#define UCR4_OREN (1<<1) /* Receiver overrun interrupt enable */
+-#define UCR4_DREN (1<<0) /* Recv data ready interrupt enable */
+-#define UFCR_RXTL_SHF 0 /* Receiver trigger level shift */
+-#define UFCR_RFDIV (7<<7) /* Reference freq divider mask */
+-#define UFCR_TXTL_SHF 10 /* Transmitter trigger level shift */
+-#define USR1_PARITYERR (1<<15) /* Parity error interrupt flag */
+-#define USR1_RTSS (1<<14) /* RTS pin status */
+-#define USR1_TRDY (1<<13) /* Transmitter ready interrupt/dma flag */
+-#define USR1_RTSD (1<<12) /* RTS delta */
+-#define USR1_ESCF (1<<11) /* Escape seq interrupt flag */
+-#define USR1_FRAMERR (1<<10) /* Frame error interrupt flag */
+-#define USR1_RRDY (1<<9) /* Receiver ready interrupt/dma flag */
+-#define USR1_TIMEOUT (1<<7) /* Receive timeout interrupt status */
+-#define USR1_RXDS (1<<6) /* Receiver idle interrupt flag */
+-#define USR1_AIRINT (1<<5) /* Async IR wake interrupt flag */
+-#define USR1_AWAKE (1<<4) /* Aysnc wake interrupt flag */
+-#define USR2_ADET (1<<15) /* Auto baud rate detect complete */
+-#define USR2_TXFE (1<<14) /* Transmit buffer FIFO empty */
+-#define USR2_DTRF (1<<13) /* DTR edge interrupt flag */
+-#define USR2_IDLE (1<<12) /* Idle condition */
+-#define USR2_IRINT (1<<8) /* Serial infrared interrupt flag */
+-#define USR2_WAKE (1<<7) /* Wake */
+-#define USR2_RTSF (1<<4) /* RTS edge interrupt flag */
+-#define USR2_TXDC (1<<3) /* Transmitter complete */
+-#define USR2_BRCD (1<<2) /* Break condition */
+-#define USR2_ORE (1<<1) /* Overrun error */
+-#define USR2_RDR (1<<0) /* Recv data ready */
+-#define UTS_FRCPERR (1<<13) /* Force parity error */
+-#define UTS_LOOP (1<<12) /* Loop tx and rx */
+-#define UTS_TXEMPTY (1<<6) /* TxFIFO empty */
+-#define UTS_RXEMPTY (1<<5) /* RxFIFO empty */
+-#define UTS_TXFULL (1<<4) /* TxFIFO full */
+-#define UTS_RXFULL (1<<3) /* RxFIFO full */
+-#define UTS_SOFTRST (1<<0) /* Software reset */
++#define UCR3_INVT (1 << 1) /* Inverted Infrared transmission */
++#define UCR3_BPEN (1 << 0) /* Preset registers enable */
++#define UCR4_CTSTL_32 (32 << 10) /* CTS trigger level (32 chars) */
++#define UCR4_INVR (1 << 9) /* Inverted infrared reception */
++#define UCR4_ENIRI (1 << 8) /* Serial infrared interrupt enable */
++#define UCR4_WKEN (1 << 7) /* Wake interrupt enable */
++#define UCR4_REF16 (1 << 6) /* Ref freq 16 MHz */
++#define UCR4_IRSC (1 << 5) /* IR special case */
++#define UCR4_TCEN (1 << 3) /* Transmit complete interrupt enable */
++#define UCR4_BKEN (1 << 2) /* Break condition interrupt enable */
++#define UCR4_OREN (1 << 1) /* Receiver overrun interrupt enable */
++#define UCR4_DREN (1 << 0) /* Recv data ready interrupt enable */
++#define UFCR_RXTL_SHF 0 /* Receiver trigger level shift */
++#define UFCR_RFDIV (7 << 7) /* Reference freq divider mask */
++#define UFCR_TXTL_SHF 10 /* Transmitter trigger level shift */
++#define USR1_PARITYERR (1 << 15) /* Parity error interrupt flag */
++#define USR1_RTSS (1 << 14) /* RTS pin status */
++#define USR1_TRDY (1 << 13) /* Transmitter ready interrupt/dma flag */
++#define USR1_RTSD (1 << 12) /* RTS delta */
++#define USR1_ESCF (1 << 11) /* Escape seq interrupt flag */
++#define USR1_FRAMERR (1 << 10) /* Frame error interrupt flag */
++#define USR1_RRDY (1 << 9) /* Receiver ready interrupt/dma flag */
++#define USR1_TIMEOUT (1 << 7) /* Receive timeout interrupt status */
++#define USR1_RXDS (1 << 6) /* Receiver idle interrupt flag */
++#define USR1_AIRINT (1 << 5) /* Async IR wake interrupt flag */
++#define USR1_AWAKE (1 << 4) /* Aysnc wake interrupt flag */
++#define USR2_ADET (1 << 15) /* Auto baud rate detect complete */
++#define USR2_TXFE (1 << 14) /* Transmit buffer FIFO empty */
++#define USR2_DTRF (1 << 13) /* DTR edge interrupt flag */
++#define USR2_IDLE (1 << 12) /* Idle condition */
++#define USR2_IRINT (1 << 8) /* Serial infrared interrupt flag */
++#define USR2_WAKE (1 << 7) /* Wake */
++#define USR2_RTSF (1 << 4) /* RTS edge interrupt flag */
++#define USR2_TXDC (1 << 3) /* Transmitter complete */
++#define USR2_BRCD (1 << 2) /* Break condition */
++#define USR2_ORE (1 << 1) /* Overrun error */
++#define USR2_RDR (1 << 0) /* Recv data ready */
++#define UTS_FRCPERR (1 << 13) /* Force parity error */
++#define UTS_LOOP (1 << 12) /* Loop tx and rx */
++#define UTS_TXEMPTY (1 << 6) /* TxFIFO empty */
++#define UTS_RXEMPTY (1 << 5) /* RxFIFO empty */
++#define UTS_TXFULL (1 << 4) /* TxFIFO full */
++#define UTS_RXFULL (1 << 3) /* RxFIFO full */
++#define UTS_SOFTRST (1 << 0) /* Software reset */
+
+ /* We've been assigned a range on the "Low-density serial ports" major */
+ #ifdef CONFIG_ARCH_IMX
+@@ -187,9 +187,9 @@
+ #define MAX_INTERNAL_IRQ IMX_IRQS
+ #endif
+
+-#if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX2
+-#define SERIAL_IMX_MAJOR 207
+-#define MINOR_START 16
++#ifdef CONFIG_ARCH_MXC
++#define SERIAL_IMX_MAJOR 207
++#define MINOR_START 16
+ #define DEV_NAME "ttymxc"
+ #define MAX_INTERNAL_IRQ MXC_MAX_INT_LINES
+ #endif
+@@ -200,7 +200,7 @@
+ * so we have to poll them. We also check immediately before
+ * filling the TX fifo incase CTS has been dropped.
+ */
+-#define MCTRL_TIMEOUT (250*HZ/1000)
++#define MCTRL_TIMEOUT (250 * HZ / 1000)
+
+ #define DRIVER_NAME "IMX-uart"
+
+@@ -210,7 +210,7 @@ struct imx_port {
+ struct uart_port port;
+ struct timer_list timer;
+ unsigned int old_status;
+- int txirq,rxirq,rtsirq;
++ int txirq, rxirq, rtsirq;
+ int have_rtscts:1;
+ struct clk *clk;
+ };
+@@ -268,8 +268,8 @@ static void imx_stop_tx(struct uart_port
+ struct imx_port *sport = (struct imx_port *)port;
+ unsigned long temp;
+
+- temp = readl(sport->port.membase + UCR1);
+- writel(temp & ~UCR1_TXMPTYEN, sport->port.membase + UCR1);
++ temp = __raw_readl(sport->port.membase + UCR1);
++ __raw_writel(temp & ~UCR1_TXMPTYEN, sport->port.membase + UCR1);
+ }
+
+ /*
+@@ -280,8 +280,8 @@ static void imx_stop_rx(struct uart_port
+ struct imx_port *sport = (struct imx_port *)port;
+ unsigned long temp;
+
+- temp = readl(sport->port.membase + UCR2);
+- writel(temp &~ UCR2_RXEN, sport->port.membase + UCR2);
++ temp = __raw_readl(sport->port.membase + UCR2);
++ __raw_writel(temp & ~UCR2_RXEN, sport->port.membase + UCR2);
+ }
+
+ /*
+@@ -298,12 +298,12 @@ static inline void imx_transmit_buffer(s
+ {
+ struct circ_buf *xmit = &sport->port.info->xmit;
+
+- while (!(readl(sport->port.membase + UTS) & UTS_TXFULL)) {
++ while (!(__raw_readl(sport->port.membase + UTS) & UTS_TXFULL)) {
+ /* send xmit->buf[xmit->tail]
+ * out the port here */
+- writel(xmit->buf[xmit->tail], sport->port.membase + URTX0);
+- xmit->tail = (xmit->tail + 1) &
+- (UART_XMIT_SIZE - 1);
++ __raw_writel(xmit->buf[xmit->tail],
++ sport->port.membase + URTX0);
++ xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
+ sport->port.icount.tx++;
+ if (uart_circ_empty(xmit))
+ break;
+@@ -321,22 +321,22 @@ static void imx_start_tx(struct uart_por
+ struct imx_port *sport = (struct imx_port *)port;
+ unsigned long temp;
+
+- temp = readl(sport->port.membase + UCR1);
+- writel(temp | UCR1_TXMPTYEN, sport->port.membase + UCR1);
++ temp = __raw_readl(sport->port.membase + UCR1);
++ __raw_writel(temp | UCR1_TXMPTYEN, sport->port.membase + UCR1);
+
+- if (readl(sport->port.membase + UTS) & UTS_TXEMPTY)
++ if (__raw_readl(sport->port.membase + UTS) & UTS_TXEMPTY)
+ imx_transmit_buffer(sport);
+ }
+
+ static irqreturn_t imx_rtsint(int irq, void *dev_id)
+ {
+ struct imx_port *sport = dev_id;
+- unsigned int val = readl(sport->port.membase + USR1) & USR1_RTSS;
++ unsigned int val = __raw_readl(sport->port.membase + USR1) & USR1_RTSS;
+ unsigned long flags;
+
+ spin_lock_irqsave(&sport->port.lock, flags);
+
+- writel(USR1_RTSD, sport->port.membase + USR1);
++ __raw_writel(USR1_RTSD, sport->port.membase + USR1);
+ uart_handle_cts_change(&sport->port, !!val);
+ wake_up_interruptible(&sport->port.info->delta_msr_wait);
+
+@@ -350,11 +350,10 @@ static irqreturn_t imx_txint(int irq, vo
+ struct circ_buf *xmit = &sport->port.info->xmit;
+ unsigned long flags;
+
+- spin_lock_irqsave(&sport->port.lock,flags);
+- if (sport->port.x_char)
+- {
++ spin_lock_irqsave(&sport->port.lock, flags);
++ if (sport->port.x_char) {
+ /* Send next char */
+- writel(sport->port.x_char, sport->port.membase + URTX0);
++ __raw_writel(sport->port.x_char, sport->port.membase + URTX0);
+ goto out;
+ }
+
+@@ -369,37 +368,37 @@ static irqreturn_t imx_txint(int irq, vo
+ uart_write_wakeup(&sport->port);
+
+ out:
+- spin_unlock_irqrestore(&sport->port.lock,flags);
++ spin_unlock_irqrestore(&sport->port.lock, flags);
+ return IRQ_HANDLED;
+ }
+
+ static irqreturn_t imx_rxint(int irq, void *dev_id)
+ {
+ struct imx_port *sport = dev_id;
+- unsigned int rx,flg,ignored = 0;
++ unsigned int rx, flg, ignored = 0;
+ struct tty_struct *tty = sport->port.info->port.tty;
+ unsigned long flags, temp;
+
+- spin_lock_irqsave(&sport->port.lock,flags);
++ spin_lock_irqsave(&sport->port.lock, flags);
+
+- while (readl(sport->port.membase + USR2) & USR2_RDR) {
++ while (__raw_readl(sport->port.membase + USR2) & USR2_RDR) {
+ flg = TTY_NORMAL;
+ sport->port.icount.rx++;
+
+- rx = readl(sport->port.membase + URXD0);
++ rx = __raw_readl(sport->port.membase + URXD0);
+
+- temp = readl(sport->port.membase + USR2);
++ temp = __raw_readl(sport->port.membase + USR2);
+ if (temp & USR2_BRCD) {
+- writel(temp | USR2_BRCD, sport->port.membase + USR2);
++ __raw_writel(temp | USR2_BRCD,
++ sport->port.membase + USR2);
+ if (uart_handle_break(&sport->port))
+ continue;
+ }
+
+- if (uart_handle_sysrq_char
+- (&sport->port, (unsigned char)rx))
++ if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx))
+ continue;
+
+- if (rx & (URXD_PRERR | URXD_OVRRUN | URXD_FRMERR) ) {
++ if (rx & (URXD_PRERR | URXD_OVRRUN | URXD_FRMERR)) {
+ if (rx & URXD_PRERR)
+ sport->port.icount.parity++;
+ else if (rx & URXD_FRMERR)
+@@ -431,7 +430,7 @@ static irqreturn_t imx_rxint(int irq, vo
+ }
+
+ out:
+- spin_unlock_irqrestore(&sport->port.lock,flags);
++ spin_unlock_irqrestore(&sport->port.lock, flags);
+ tty_flip_buffer_push(tty);
+ return IRQ_HANDLED;
+ }
+@@ -441,13 +440,13 @@ static irqreturn_t imx_int(int irq, void
+ struct imx_port *sport = dev_id;
+ unsigned int sts;
+
+- sts = readl(sport->port.membase + USR1);
++ sts = __raw_readl(sport->port.membase + USR1);
+
+ if (sts & USR1_RRDY)
+ imx_rxint(irq, dev_id);
+
+ if (sts & USR1_TRDY &&
+- readl(sport->port.membase + UCR1) & UCR1_TXMPTYEN)
++ __raw_readl(sport->port.membase + UCR1) & UCR1_TXMPTYEN)
+ imx_txint(irq, dev_id);
+
+ if (sts & USR1_RTSD)
+@@ -463,7 +462,8 @@ static unsigned int imx_tx_empty(struct
+ {
+ struct imx_port *sport = (struct imx_port *)port;
+
+- return (readl(sport->port.membase + USR2) & USR2_TXDC) ? TIOCSER_TEMT : 0;
++ return (__raw_readl(sport->port.membase + USR2) & USR2_TXDC) ?
++ TIOCSER_TEMT : 0;
+ }
+
+ /*
+@@ -471,29 +471,29 @@ static unsigned int imx_tx_empty(struct
+ */
+ static unsigned int imx_get_mctrl(struct uart_port *port)
+ {
+- struct imx_port *sport = (struct imx_port *)port;
+- unsigned int tmp = TIOCM_DSR | TIOCM_CAR;
++ struct imx_port *sport = (struct imx_port *)port;
++ unsigned int tmp = TIOCM_DSR | TIOCM_CAR;
+
+- if (readl(sport->port.membase + USR1) & USR1_RTSS)
+- tmp |= TIOCM_CTS;
++ if (__raw_readl(sport->port.membase + USR1) & USR1_RTSS)
++ tmp |= TIOCM_CTS;
+
+- if (readl(sport->port.membase + UCR2) & UCR2_CTS)
+- tmp |= TIOCM_RTS;
++ if (__raw_readl(sport->port.membase + UCR2) & UCR2_CTS)
++ tmp |= TIOCM_RTS;
+
+- return tmp;
++ return tmp;
+ }
+
+ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
+ {
+- struct imx_port *sport = (struct imx_port *)port;
++ struct imx_port *sport = (struct imx_port *)port;
+ unsigned long temp;
+
+- temp = readl(sport->port.membase + UCR2) & ~UCR2_CTS;
++ temp = __raw_readl(sport->port.membase + UCR2) & ~UCR2_CTS;
+
+- if (mctrl & TIOCM_RTS)
++ if (mctrl & TIOCM_RTS)
+ temp |= UCR2_CTS;
+
+- writel(temp, sport->port.membase + UCR2);
++ __raw_writel(temp, sport->port.membase + UCR2);
+ }
+
+ /*
+@@ -506,12 +506,12 @@ static void imx_break_ctl(struct uart_po
+
+ spin_lock_irqsave(&sport->port.lock, flags);
+
+- temp = readl(sport->port.membase + UCR1) & ~UCR1_SNDBRK;
++ temp = __raw_readl(sport->port.membase + UCR1) & ~UCR1_SNDBRK;
+
+- if ( break_state != 0 )
++ if (break_state != 0)
+ temp |= UCR1_SNDBRK;
+
+- writel(temp, sport->port.membase + UCR1);
++ __raw_writel(temp, sport->port.membase + UCR1);
+
+ spin_unlock_irqrestore(&sport->port.lock, flags);
+ }
+@@ -531,17 +531,17 @@ static int imx_setup_ufcr(struct imx_por
+ ufcr_rfdiv = (clk_get_rate(sport->clk) + sport->port.uartclk / 2)
+ / sport->port.uartclk;
+
+- if(!ufcr_rfdiv)
++ if (!ufcr_rfdiv)
+ ufcr_rfdiv = 1;
+
+- if(ufcr_rfdiv >= 7)
++ if (ufcr_rfdiv >= 7)
+ ufcr_rfdiv = 6;
+ else
+ ufcr_rfdiv = 6 - ufcr_rfdiv;
+
+ val |= UFCR_RFDIV & (ufcr_rfdiv << 7);
+
+- writel(val, sport->port.membase + UFCR);
++ __raw_writel(val, sport->port.membase + UFCR);
+
+ return 0;
+ }
+@@ -557,8 +557,8 @@ static int imx_startup(struct uart_port
+ /* disable the DREN bit (Data Ready interrupt enable) before
+ * requesting IRQs
+ */
+- temp = readl(sport->port.membase + UCR4);
+- writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
++ temp = __raw_readl(sport->port.membase + UCR4);
++ __raw_writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
+
+ /*
+ * Allocate the IRQ(s) i.MX1 has three interrupts whereas later
+@@ -576,8 +576,8 @@ static int imx_startup(struct uart_port
+ goto error_out2;
+
+ retval = request_irq(sport->rtsirq, imx_rtsint,
+- (sport->rtsirq < MAX_INTERNAL_IRQ) ? 0 :
+- IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
++ (sport->rtsirq < MAX_INTERNAL_IRQ) ? 0 :
++ IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+ DRIVER_NAME, sport);
+ if (retval)
+ goto error_out3;
+@@ -593,28 +593,28 @@ static int imx_startup(struct uart_port
+ /*
+ * Finally, clear and enable interrupts
+ */
+- writel(USR1_RTSD, sport->port.membase + USR1);
++ __raw_writel(USR1_RTSD, sport->port.membase + USR1);
+
+- temp = readl(sport->port.membase + UCR1);
++ temp = __raw_readl(sport->port.membase + UCR1);
+ temp |= UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN;
+- writel(temp, sport->port.membase + UCR1);
++ __raw_writel(temp, sport->port.membase + UCR1);
+
+- temp = readl(sport->port.membase + UCR2);
++ temp = __raw_readl(sport->port.membase + UCR2);
+ temp |= (UCR2_RXEN | UCR2_TXEN);
+- writel(temp, sport->port.membase + UCR2);
++ __raw_writel(temp, sport->port.membase + UCR2);
+
+ #if defined CONFIG_ARCH_MX2 || defined CONFIG_ARCH_MX3
+- temp = readl(sport->port.membase + UCR3);
++ temp = __raw_readl(sport->port.membase + UCR3);
+ temp |= UCR3_RXDMUXSEL;
+- writel(temp, sport->port.membase + UCR3);
++ __raw_writel(temp, sport->port.membase + UCR3);
+ #endif
+
+ /*
+ * Enable modem status interrupts
+ */
+- spin_lock_irqsave(&sport->port.lock,flags);
++ spin_lock_irqsave(&sport->port.lock, flags);
+ imx_enable_ms(&sport->port);
+- spin_unlock_irqrestore(&sport->port.lock,flags);
++ spin_unlock_irqrestore(&sport->port.lock, flags);
+
+ return 0;
+
+@@ -652,14 +652,14 @@ static void imx_shutdown(struct uart_por
+ * Disable all interrupts, port and break condition.
+ */
+
+- temp = readl(sport->port.membase + UCR1);
++ temp = __raw_readl(sport->port.membase + UCR1);
+ temp &= ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN);
+- writel(temp, sport->port.membase + UCR1);
++ __raw_writel(temp, sport->port.membase + UCR1);
+ }
+
+ static void
+ imx_set_termios(struct uart_port *port, struct ktermios *termios,
+- struct ktermios *old)
++ struct ktermios *old)
+ {
+ struct imx_port *sport = (struct imx_port *)port;
+ unsigned long flags;
+@@ -680,7 +680,7 @@ imx_set_termios(struct uart_port *port,
+ * We only support CS7 and CS8.
+ */
+ while ((termios->c_cflag & CSIZE) != CS7 &&
+- (termios->c_cflag & CSIZE) != CS8) {
++ (termios->c_cflag & CSIZE) != CS8) {
+ termios->c_cflag &= ~CSIZE;
+ termios->c_cflag |= old_csize;
+ old_csize = CS8;
+@@ -692,7 +692,7 @@ imx_set_termios(struct uart_port *port,
+ ucr2 = UCR2_SRST | UCR2_IRTS;
+
+ if (termios->c_cflag & CRTSCTS) {
+- if( sport->have_rtscts ) {
++ if (sport->have_rtscts) {
+ ucr2 &= ~UCR2_IRTS;
+ ucr2 |= UCR2_CTSC;
+ } else {
+@@ -748,17 +748,17 @@ imx_set_termios(struct uart_port *port,
+ /*
+ * disable interrupts and drain transmitter
+ */
+- old_ucr1 = readl(sport->port.membase + UCR1);
+- writel(old_ucr1 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN),
++ old_ucr1 = __raw_readl(sport->port.membase + UCR1);
++ __raw_writel(old_ucr1 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN),
+ sport->port.membase + UCR1);
+
+- while ( !(readl(sport->port.membase + USR2) & USR2_TXDC))
++ while (!(__raw_readl(sport->port.membase + USR2) & USR2_TXDC))
+ barrier();
+
+ /* then, disable everything */
+- old_txrxen = readl(sport->port.membase + UCR2);
+- writel(old_txrxen & ~( UCR2_TXEN | UCR2_RXEN),
+- sport->port.membase + UCR2);
++ old_txrxen = __raw_readl(sport->port.membase + UCR2);
++ __raw_writel(old_txrxen & ~(UCR2_TXEN | UCR2_RXEN),
++ sport->port.membase + UCR2);
+ old_txrxen &= (UCR2_TXEN | UCR2_RXEN);
+
+ div = sport->port.uartclk / (baud * 16);
+@@ -780,27 +780,27 @@ imx_set_termios(struct uart_port *port,
+ if (denom > 0)
+ denom -= 1;
+
+- writel(num, sport->port.membase + UBIR);
+- writel(denom, sport->port.membase + UBMR);
++ __raw_writel(num, sport->port.membase + UBIR);
++ __raw_writel(denom, sport->port.membase + UBMR);
+
+ if (div == 7)
+ div = 6; /* 6 in RFDIV means divide by 7 */
+ else
+ div = 6 - div;
+
+- ufcr = readl(sport->port.membase + UFCR);
+- ufcr = (ufcr & (~UFCR_RFDIV)) |
+- (div << 7);
+- writel(ufcr, sport->port.membase + UFCR);
++ ufcr = __raw_readl(sport->port.membase + UFCR);
++ ufcr = (ufcr & ~UFCR_RFDIV) | (div << 7);
++ __raw_writel(ufcr, sport->port.membase + UFCR);
+
+ #ifdef ONEMS
+- writel(sport->port.uartclk / div / 1000, sport->port.membase + ONEMS);
++ __raw_writel(sport->port.uartclk / div / 1000,
++ sport->port.membase + ONEMS);
+ #endif
+
+- writel(old_ucr1, sport->port.membase + UCR1);
++ __raw_writel(old_ucr1, sport->port.membase + UCR1);
+
+ /* set the parity, stop bits and data size */
+- writel(ucr2 | old_txrxen, sport->port.membase + UCR2);
++ __raw_writel(ucr2 | old_txrxen, sport->port.membase + UCR2);
+
+ if (UART_ENABLE_MS(&sport->port, termios->c_cflag))
+ imx_enable_ms(&sport->port);
+@@ -854,7 +854,7 @@ static void imx_config_port(struct uart_
+ struct imx_port *sport = (struct imx_port *)port;
+
+ if (flags & UART_CONFIG_TYPE &&
+- imx_request_port(&sport->port) == 0)
++ imx_request_port(&sport->port) == 0)
+ sport->port.type = PORT_IMX;
+ }
+
+@@ -912,10 +912,10 @@ static void imx_console_putchar(struct u
+ {
+ struct imx_port *sport = (struct imx_port *)port;
+
+- while (readl(sport->port.membase + UTS) & UTS_TXFULL)
++ while (__raw_readl(sport->port.membase + UTS) & UTS_TXFULL)
+ barrier();
+
+- writel(ch, sport->port.membase + URTX0);
++ __raw_writel(ch, sport->port.membase + URTX0);
+ }
+
+ /*
+@@ -930,14 +930,14 @@ imx_console_write(struct console *co, co
+ /*
+ * First, save UCR1/2 and then disable interrupts
+ */
+- old_ucr1 = readl(sport->port.membase + UCR1);
+- old_ucr2 = readl(sport->port.membase + UCR2);
++ old_ucr1 = __raw_readl(sport->port.membase + UCR1);
++ old_ucr2 = __raw_readl(sport->port.membase + UCR2);
+
+- writel((old_ucr1 | UCR1_UARTCLKEN | UCR1_UARTEN) &
++ __raw_writel((old_ucr1 | UCR1_UARTCLKEN | UCR1_UARTEN) &
+ ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN),
+ sport->port.membase + UCR1);
+
+- writel(old_ucr2 | UCR2_TXEN, sport->port.membase + UCR2);
++ __raw_writel(old_ucr2 | UCR2_TXEN, sport->port.membase + UCR2);
+
+ uart_console_write(&sport->port, s, count, imx_console_putchar);
+
+@@ -945,10 +945,11 @@ imx_console_write(struct console *co, co
+ * Finally, wait for transmitter to become empty
+ * and restore UCR1/2
+ */
+- while (!(readl(sport->port.membase + USR2) & USR2_TXDC));
++ while (!(__raw_readl(sport->port.membase + USR2) & USR2_TXDC))
++ ;
+
+- writel(old_ucr1, sport->port.membase + UCR1);
+- writel(old_ucr2, sport->port.membase + UCR2);
++ __raw_writel(old_ucr1, sport->port.membase + UCR1);
++ __raw_writel(old_ucr2, sport->port.membase + UCR2);
+ }
+
+ /*
+@@ -957,16 +958,15 @@ imx_console_write(struct console *co, co
+ */
+ static void __init
+ imx_console_get_options(struct imx_port *sport, int *baud,
+- int *parity, int *bits)
++ int *parity, int *bits)
+ {
+-
+- if ( readl(sport->port.membase + UCR1) | UCR1_UARTEN ) {
++ if (__raw_readl(sport->port.membase + UCR1) | UCR1_UARTEN) {
+ /* ok, the port was enabled */
+- unsigned int ucr2, ubir,ubmr, uartclk;
++ unsigned int ucr2, ubir, ubmr, uartclk;
+ unsigned int baud_raw;
+ unsigned int ucfr_rfdiv;
+
+- ucr2 = readl(sport->port.membase + UCR2);
++ ucr2 = __raw_readl(sport->port.membase + UCR2);
+
+ *parity = 'n';
+ if (ucr2 & UCR2_PREN) {
+@@ -981,10 +981,11 @@ imx_console_get_options(struct imx_port
+ else
+ *bits = 7;
+
+- ubir = readl(sport->port.membase + UBIR) & 0xffff;
+- ubmr = readl(sport->port.membase + UBMR) & 0xffff;
++ ubir = __raw_readl(sport->port.membase + UBIR) & 0xffff;
++ ubmr = __raw_readl(sport->port.membase + UBMR) & 0xffff;
+
+- ucfr_rfdiv = (readl(sport->port.membase + UFCR) & UFCR_RFDIV) >> 7;
++ ucfr_rfdiv = (__raw_readl(sport->port.membase + UFCR) &
++ UFCR_RFDIV) >> 7;
+ if (ucfr_rfdiv == 6)
+ ucfr_rfdiv = 7;
+ else
+@@ -993,7 +994,8 @@ imx_console_get_options(struct imx_port
+ uartclk = clk_get_rate(sport->clk);
+ uartclk /= ucfr_rfdiv;
+
+- { /*
++ {
++ /*
+ * The next code provides exact computation of
+ * baud_raw = round(((uartclk/16) * (ubir + 1)) / (ubmr + 1))
+ * without need of float support or long long division,
+@@ -1008,7 +1010,7 @@ imx_console_get_options(struct imx_port
+ *baud = (baud_raw + 50) / 100 * 100;
+ }
+
+- if(*baud != baud_raw)
++ if (*baud != baud_raw)
+ printk(KERN_INFO "Serial: Console IMX rounded baud rate from %d to %d\n",
+ baud_raw, *baud);
+ }
+@@ -1028,9 +1030,13 @@ imx_console_setup(struct console *co, ch
+ * if so, search for the first available port that does have
+ * console support.
+ */
+- if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports))
++ if (co->index < 0 || co->index >= ARRAY_SIZE(imx_ports))
+ co->index = 0;
+- sport = imx_ports[co->index];
++ do {
++ sport = imx_ports[co->index];
++ } while (sport == NULL && ++co->index < ARRAY_SIZE(imx_ports));
++ if (!sport)
++ return -ENODEV;
+
+ if (options)
+ uart_parse_options(options, &baud, &parity, &bits, &flow);
+@@ -1070,22 +1076,22 @@ static struct uart_driver imx_reg = {
+
+ static int serial_imx_suspend(struct platform_device *dev, pm_message_t state)
+ {
+- struct imx_port *sport = platform_get_drvdata(dev);
++ struct imx_port *sport = platform_get_drvdata(dev);
+
+- if (sport)
+- uart_suspend_port(&imx_reg, &sport->port);
++ if (sport)
++ uart_suspend_port(&imx_reg, &sport->port);
+
+- return 0;
++ return 0;
+ }
+
+ static int serial_imx_resume(struct platform_device *dev)
+ {
+- struct imx_port *sport = platform_get_drvdata(dev);
++ struct imx_port *sport = platform_get_drvdata(dev);
+
+- if (sport)
+- uart_resume_port(&imx_reg, &sport->port);
++ if (sport)
++ uart_resume_port(&imx_reg, &sport->port);
+
+- return 0;
++ return 0;
+ }
+
+ static int serial_imx_probe(struct platform_device *pdev)
+@@ -1141,7 +1147,7 @@ static int serial_imx_probe(struct platf
+ imx_ports[pdev->id] = sport;
+
+ pdata = pdev->dev.platform_data;
+- if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS))
++ if (pdata && (pdata->flags & IMXUART_HAVE_RTSCTS))
+ sport->have_rtscts = 1;
+
+ if (pdata->init) {
+@@ -1150,13 +1156,13 @@ static int serial_imx_probe(struct platf
+ goto clkput;
+ }
+
+- uart_add_one_port(&imx_reg, &sport->port);
+ platform_set_drvdata(pdev, &sport->port);
++ uart_add_one_port(&imx_reg, &sport->port);
+
+ return 0;
+ clkput:
+- clk_put(sport->clk);
+ clk_disable(sport->clk);
++ clk_put(sport->clk);
+ unmap:
+ iounmap(sport->port.membase);
+ free:
+@@ -1172,15 +1178,12 @@ static int serial_imx_remove(struct plat
+
+ pdata = pdev->dev.platform_data;
+
+- platform_set_drvdata(pdev, NULL);
+-
+- if (sport) {
+- uart_remove_one_port(&imx_reg, &sport->port);
+- clk_put(sport->clk);
+- }
++ uart_remove_one_port(&imx_reg, &sport->port);
+
+ clk_disable(sport->clk);
++ clk_put(sport->clk);
+
++ platform_set_drvdata(pdev, NULL);
+ if (pdata->exit)
+ pdata->exit(pdev);
+
+@@ -1191,13 +1194,13 @@ static int serial_imx_remove(struct plat
+ }
+
+ static struct platform_driver serial_imx_driver = {
+- .probe = serial_imx_probe,
+- .remove = serial_imx_remove,
++ .probe = serial_imx_probe,
++ .remove = serial_imx_remove,
+
+ .suspend = serial_imx_suspend,
+ .resume = serial_imx_resume,
+ .driver = {
+- .name = "imx-uart",
++ .name = "imx-uart",
+ .owner = THIS_MODULE,
+ },
+ };
+@@ -1209,14 +1212,14 @@ static int __init imx_serial_init(void)
+ printk(KERN_INFO "Serial: IMX driver\n");
+
+ ret = uart_register_driver(&imx_reg);
+- if (ret)
++ if (ret != 0)
+ return ret;
+
+ ret = platform_driver_register(&serial_imx_driver);
+ if (ret != 0)
+ uart_unregister_driver(&imx_reg);
+
+- return 0;
++ return ret;
+ }
+
+ static void __exit imx_serial_exit(void)
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/spi/Kconfig linux-2.6.28-karo/drivers/spi/Kconfig
+--- linux-2.6.28/drivers/spi/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/spi/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -135,6 +135,55 @@ config SPI_MPC83xx
+ technology. This driver uses a simple set of shift registers for data
+ (opposed to the CPM based descriptor model).
+
++config SPI_MXC
++ tristate "MXC CSPI controller as SPI Master"
++ depends on ARCH_MXC && SPI_MASTER
++ select SPI_BITBANG
++ help
++ This implements the SPI master mode using MXC CSPI.
++
++config SPI_MXC_TEST_LOOPBACK
++ bool "LOOPBACK Testing of CSPIs"
++ depends on SPI_MXC
++ default n
++
++config SPI_MXC_SELECT1
++ bool "CSPI1"
++ depends on SPI_MXC
++ default y
++
++config SPI_MXC_SELECT2
++ bool "CSPI2"
++ depends on SPI_MXC
++ default n
++
++config SPI_MXC_SELECT3
++ bool "CSPI3"
++ depends on SPI_MXC && (ARCH_MX3 || ARCH_MX2)
++ default n
++
++choice
++ prompt "SPI controller hardware revision"
++ default SPI_MXC_REV0
++ depends on SPI_MXC
++ config SPI_MXC_REV0
++ bool "Revision 0"
++ help
++ hardware revision 0, mostly on MX27
++ config SPI_MXC_REV4
++ bool "Revision 4"
++ help
++ hardware revision 4, mostly on MX31
++ config SPI_MXC_REV5
++ bool "Revision 5"
++ help
++ hardware revision 5
++ config SPI_MXC_REV7
++ bool "Revision 7"
++ help
++ hardware revision 7
++endchoice
++
+ config SPI_OMAP_UWIRE
+ tristate "OMAP1 MicroWire"
+ depends on ARCH_OMAP1
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/spi/Makefile linux-2.6.28-karo/drivers/spi/Makefile
+--- linux-2.6.28/drivers/spi/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/spi/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -24,6 +24,7 @@ obj-$(CONFIG_SPI_OMAP24XX) += omap2_mcs
+ obj-$(CONFIG_SPI_ORION) += orion_spi.o
+ obj-$(CONFIG_SPI_MPC52xx_PSC) += mpc52xx_psc_spi.o
+ obj-$(CONFIG_SPI_MPC83xx) += spi_mpc83xx.o
++obj-$(CONFIG_SPI_MXC) += mxc_spi.o
+ obj-$(CONFIG_SPI_S3C24XX_GPIO) += spi_s3c24xx_gpio.o
+ obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o
+ obj-$(CONFIG_SPI_TXX9) += spi_txx9.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/spi/mxc_spi.c linux-2.6.28-karo/drivers/spi/mxc_spi.c
+--- linux-2.6.28/drivers/spi/mxc_spi.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/spi/mxc_spi.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,748 @@
++/*
++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ * Copyright (C) 2008 Juergen Beisert
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#include <linux/completion.h>
++#include <linux/platform_device.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/interrupt.h>
++#include <linux/irq.h>
++#include <linux/module.h>
++#include <linux/delay.h>
++#include <linux/types.h>
++#include <linux/clk.h>
++
++#include <linux/spi/spi.h>
++#include <linux/spi/spi_bitbang.h>
++
++#include <asm/irq.h>
++#include <asm/io.h>
++#include <mach/gpio.h>
++#include <mach/imx_spi.h>
++
++#ifdef CONFIG_SPI_MXC_TEST_LOOPBACK
++struct spi_chip_info {
++ int lb_enable;
++};
++
++static struct spi_chip_info lb_chip_info = {
++ .lb_enable = 1,
++};
++
++static struct spi_board_info loopback_info[] = {
++#ifdef CONFIG_SPI_MXC_SELECT1
++ {
++ .modalias = "loopback_spi",
++ .controller_data = &lb_chip_info,
++ .irq = 0,
++ .max_speed_hz = 4000000,
++ .bus_num = 0,
++ .chip_select = 4,
++ },
++#endif
++#ifdef CONFIG_SPI_MXC_SELECT2
++ {
++ .modalias = "loopback_spi",
++ .controller_data = &lb_chip_info,
++ .irq = 0,
++ .max_speed_hz = 4000000,
++ .bus_num = 1,
++ .chip_select = 4,
++ },
++#endif
++#ifdef CONFIG_SPI_MXC_SELECT3
++ {
++ .modalias = "loopback_spi",
++ .controller_data = &lb_chip_info,
++ .irq = 0,
++ .max_speed_hz = 4000000,
++ .bus_num = 2,
++ .chip_select = 4,
++ },
++#endif
++};
++#endif
++
++static struct mxc_spi_unique_def spi_ver_0_7 = {
++ .intr_bit_shift = MXC_CSPIINT_IRQSHIFT_0_7,
++ .cs_shift = MXC_CSPICTRL_CSSHIFT_0_7,
++ .bc_shift = MXC_CSPICTRL_BCSHIFT_0_7,
++ .bc_mask = MXC_CSPICTRL_BCMASK_0_7,
++ .drctrl_shift = MXC_CSPICTRL_DRCTRLSHIFT_0_7,
++ .xfer_complete = MXC_CSPISTAT_TC_0_7,
++ .bc_overflow = MXC_CSPISTAT_BO_0_7,
++};
++
++static struct mxc_spi_unique_def spi_ver_0_5 = {
++ .intr_bit_shift = MXC_CSPIINT_IRQSHIFT_0_5,
++ .cs_shift = MXC_CSPICTRL_CSSHIFT_0_5,
++ .bc_shift = MXC_CSPICTRL_BCSHIFT_0_5,
++ .bc_mask = MXC_CSPICTRL_BCMASK_0_5,
++ .drctrl_shift = MXC_CSPICTRL_DRCTRLSHIFT_0_5,
++ .xfer_complete = MXC_CSPISTAT_TC_0_5,
++ .bc_overflow = MXC_CSPISTAT_BO_0_5,
++};
++
++static struct mxc_spi_unique_def spi_ver_0_4 = {
++ .intr_bit_shift = MXC_CSPIINT_IRQSHIFT_0_4,
++ .cs_shift = MXC_CSPICTRL_CSSHIFT_0_4,
++ .bc_shift = MXC_CSPICTRL_BCSHIFT_0_4,
++ .bc_mask = MXC_CSPICTRL_BCMASK_0_4,
++ .drctrl_shift = MXC_CSPICTRL_DRCTRLSHIFT_0_4,
++ .xfer_complete = MXC_CSPISTAT_TC_0_4,
++ .bc_overflow = MXC_CSPISTAT_BO_0_4,
++};
++
++static struct mxc_spi_unique_def spi_ver_0_0 = {
++ .intr_bit_shift = MXC_CSPIINT_IRQSHIFT_0_0,
++ .cs_shift = MXC_CSPICTRL_CSSHIFT_0_0,
++ .bc_shift = MXC_CSPICTRL_BCSHIFT_0_0,
++ .bc_mask = MXC_CSPICTRL_BCMASK_0_0,
++ .drctrl_shift = MXC_CSPICTRL_DRCTRLSHIFT_0_0,
++ .xfer_complete = MXC_CSPISTAT_TC_0_0,
++ .bc_overflow = MXC_CSPISTAT_BO_0_0,
++};
++
++struct mxc_spi;
++/*
++ * Structure to group together all the data buffers and functions
++ * used in data transfers.
++ */
++struct mxc_spi_xfer {
++ const void *tx_buf; /* Transmit buffer. */
++ void *rx_buf; /* Receive buffer. */
++ unsigned int count; /* Data transfered count. */
++ void (*rx_get) (struct mxc_spi *, u32 val); /* Function to read the FIFO data to rx_buf. */
++ u32(*tx_get) (struct mxc_spi *); /* Function to get the data to be written to FIFO. */
++};
++
++/*
++ * This structure is a way for the low level driver to define their own
++ * spi_master structure. This structure includes the core spi_master
++ * structure that is provided by Linux SPI Framework/driver as an
++ * element and has other elements that are specifically required by this
++ * low-level driver.
++ */
++struct mxc_spi {
++ struct spi_bitbang mxc_bitbang; /* SPI Master and a simple I/O queue runner. */
++ struct completion xfer_done; /* Completion flags used in data transfers. */
++ struct mxc_spi_xfer transfer; /* Data transfer structure. */
++ struct resource *res; /* Resource structure, which will maintain base addresses and IRQs. */
++ void *base; /* Base address of CSPI, used in readl and writel. */
++ int irq; /* CSPI IRQ number. */
++ struct clk *clk; /* CSPI Clock id. */
++ /*!
++ * CSPI input clock SCLK.
++ */
++ unsigned long spi_ipg_clk;
++ /*!
++ * CSPI registers' bit pattern.
++ */
++ struct mxc_spi_unique_def *spi_ver_def;
++};
++
++#define MXC_SPI_BUF_RX(type) \
++void mxc_spi_buf_rx_##type(struct mxc_spi *master_drv_data, u32 val)\
++{\
++ type *rx = master_drv_data->transfer.rx_buf;\
++ *rx++ = (type)val;\
++ master_drv_data->transfer.rx_buf = rx;\
++}
++
++#define MXC_SPI_BUF_TX(type) \
++u32 mxc_spi_buf_tx_##type(struct mxc_spi *master_drv_data)\
++{\
++ u32 val;\
++ const type *tx = master_drv_data->transfer.tx_buf;\
++ val = *tx++;\
++ master_drv_data->transfer.tx_buf = tx;\
++ return val;\
++}
++MXC_SPI_BUF_RX(u8)
++ MXC_SPI_BUF_TX(u8)
++ MXC_SPI_BUF_RX(u16)
++ MXC_SPI_BUF_TX(u16)
++ MXC_SPI_BUF_RX(u32)
++ MXC_SPI_BUF_TX(u32)
++
++static int spi_enable_interrupt(struct mxc_spi *master_data, unsigned int irqs)
++{
++ if (irqs & ~((1 << master_data->spi_ver_def->intr_bit_shift) - 1)) {
++ return -1;
++ }
++
++ writel((irqs | readl(master_data->base + MXC_CSPIINT)),
++ master_data->base + MXC_CSPIINT);
++
++ return 0;
++}
++
++static int spi_disable_interrupt(struct mxc_spi *master_data, unsigned int irqs)
++{
++ if (irqs & ~((1 << master_data->spi_ver_def->intr_bit_shift) - 1)) {
++ return -1;
++ }
++
++ writel((~irqs & readl(master_data->base + MXC_CSPIINT)),
++ master_data->base + MXC_CSPIINT);
++ return 0;
++}
++
++static unsigned int spi_find_baudrate(struct mxc_spi *master_data,
++ unsigned int baud)
++{
++ unsigned int divisor;
++ unsigned int shift = 0;
++
++ /* Calculate required divisor (rounded) */
++ divisor = (master_data->spi_ipg_clk + baud / 2) / baud;
++ while (divisor >>= 1)
++ shift++;
++ MXC_CSPICTRL_ADJUST_SHIFT(shift);
++ if (shift > MXC_CSPICTRL_MAXDATRATE)
++ shift = MXC_CSPICTRL_MAXDATRATE;
++
++ return shift << MXC_CSPICTRL_DATASHIFT;
++}
++
++static unsigned int spi_get_rx_data(void *base)
++{
++ return readl(base + MXC_CSPIRXDATA);
++}
++
++static void spi_put_tx_data(void *base, unsigned int val)
++{
++ unsigned int ctrl_reg;
++
++ writel(val, base + MXC_CSPITXDATA);
++
++ ctrl_reg = readl(base + MXC_CSPICTRL);
++
++ ctrl_reg |= MXC_CSPICTRL_XCH;
++
++ writel(ctrl_reg, base + MXC_CSPICTRL);
++
++ return;
++}
++
++void mxc_spi_chipselect(struct spi_device *spi, int is_active)
++{
++ struct mxc_spi *master_drv_data;
++ struct mxc_spi_xfer *ptransfer;
++ struct mxc_spi_unique_def *spi_ver_def;
++ unsigned int ctrl_reg;
++ unsigned int ctrl_mask;
++ unsigned int xfer_len;
++
++ if (is_active == BITBANG_CS_INACTIVE) {
++ /*Need to deselect the slave */
++ return;
++ }
++
++ /* Get the master controller driver data from spi device's master */
++
++ master_drv_data = spi_master_get_devdata(spi->master);
++ spi_ver_def = master_drv_data->spi_ver_def;
++
++ xfer_len = spi->bits_per_word;
++
++ /* Control Register Settings for transfer to this slave */
++
++ ctrl_reg = readl(master_drv_data->base + MXC_CSPICTRL);
++
++ ctrl_mask =
++ (MXC_CSPICTRL_LOWPOL | MXC_CSPICTRL_PHA | MXC_CSPICTRL_HIGHSSPOL |
++ MXC_CSPICTRL_CSMASK << spi_ver_def->cs_shift |
++ MXC_CSPICTRL_DATAMASK << MXC_CSPICTRL_DATASHIFT |
++ spi_ver_def->bc_mask << spi_ver_def->bc_shift);
++ ctrl_reg &= ~ctrl_mask;
++
++ ctrl_reg |=
++ ((spi->chip_select & MXC_CSPICTRL_CSMASK) << spi_ver_def->cs_shift);
++ ctrl_reg |= spi_find_baudrate(master_drv_data, spi->max_speed_hz);
++ ctrl_reg |=
++ (((xfer_len - 1) & spi_ver_def->bc_mask) << spi_ver_def->bc_shift);
++ if (spi->mode & SPI_CPHA)
++ ctrl_reg |= MXC_CSPICTRL_PHA;
++ if (!(spi->mode & SPI_CPOL))
++ ctrl_reg |= MXC_CSPICTRL_LOWPOL;
++ if (spi->mode & SPI_CS_HIGH)
++ ctrl_reg |= MXC_CSPICTRL_HIGHSSPOL;
++
++ writel(ctrl_reg, master_drv_data->base + MXC_CSPICTRL);
++
++ /* Initialize the functions for transfer */
++ ptransfer = &master_drv_data->transfer;
++ if (xfer_len <= 8) {
++ ptransfer->rx_get = mxc_spi_buf_rx_u8;
++ ptransfer->tx_get = mxc_spi_buf_tx_u8;
++ } else if (xfer_len <= 16) {
++ ptransfer->rx_get = mxc_spi_buf_rx_u16;
++ ptransfer->tx_get = mxc_spi_buf_tx_u16;
++ } else if (xfer_len <= 32) {
++ ptransfer->rx_get = mxc_spi_buf_rx_u32;
++ ptransfer->tx_get = mxc_spi_buf_tx_u32;
++ }
++#ifdef CONFIG_SPI_MXC_TEST_LOOPBACK
++ {
++ struct spi_chip_info *lb_chip =
++ spi->controller_data;
++ if (!lb_chip)
++ writel(0, master_drv_data->base + MXC_CSPITEST);
++ else if (lb_chip->lb_enable)
++ writel(MXC_CSPITEST_LBC,
++ master_drv_data->base + MXC_CSPITEST);
++ }
++#endif
++ return;
++}
++
++static irqreturn_t mxc_spi_isr(int irq, void *dev_id)
++{
++ struct mxc_spi *master_drv_data = dev_id;
++ irqreturn_t ret = IRQ_NONE;
++ unsigned int status;
++
++ /* Read the interrupt status register to determine the source */
++ status = readl(master_drv_data->base + MXC_CSPISTAT);
++
++ /* Rx is given higher priority - Handle it first */
++ if (status & MXC_CSPISTAT_RR) {
++ u32 rx_tmp = spi_get_rx_data(master_drv_data->base);
++
++ if (master_drv_data->transfer.rx_buf)
++ master_drv_data->transfer.rx_get(master_drv_data,
++ rx_tmp);
++
++ ret = IRQ_HANDLED;
++ }
++
++ master_drv_data->transfer.count--;
++ /* Handle the Tx now */
++ if (master_drv_data->transfer.count) {
++ if (master_drv_data->transfer.tx_buf) {
++ u32 tx_tmp =
++ master_drv_data->transfer.tx_get(master_drv_data);
++
++ spi_put_tx_data(master_drv_data->base, tx_tmp);
++ }
++ } else {
++ complete(&master_drv_data->xfer_done);
++ }
++
++ return ret;
++}
++
++int mxc_spi_setup(struct spi_device *spi)
++{
++ struct mxc_spi *master_data = spi_master_get_devdata(spi->master);
++
++ if ((spi->max_speed_hz < 0)
++ || (spi->max_speed_hz > (master_data->spi_ipg_clk / 4))) {
++ dev_err(&spi->dev, "Cannot set required SPI clock speed."
++ " Requested: %uHz, possible: %luHz\n",
++ spi->max_speed_hz, master_data->spi_ipg_clk / 4);
++ return -EINVAL;
++ }
++
++ if (!spi->bits_per_word)
++ spi->bits_per_word = 8;
++
++ pr_debug("%s: mode %d, %u bpw, %d hz\n", __FUNCTION__,
++ spi->mode, spi->bits_per_word, spi->max_speed_hz);
++
++ return 0;
++}
++
++int mxc_spi_transfer(struct spi_device *spi, struct spi_transfer *t)
++{
++ struct mxc_spi *master_drv_data = NULL;
++
++ /* Get the master controller driver data from spi device's master */
++
++ master_drv_data = spi_master_get_devdata(spi->master);
++
++ /* Modify the Tx, Rx, Count */
++
++ master_drv_data->transfer.tx_buf = t->tx_buf;
++ master_drv_data->transfer.rx_buf = t->rx_buf;
++ master_drv_data->transfer.count = t->len;
++ INIT_COMPLETION(master_drv_data->xfer_done);
++
++ /* Enable the Rx Interrupts */
++
++ spi_enable_interrupt(master_drv_data, MXC_CSPIINT_RREN);
++
++ /* Perform single Tx transaction */
++
++ spi_put_tx_data(master_drv_data->base,
++ master_drv_data->transfer.tx_get(master_drv_data));
++
++ /* Wait for transfer completion */
++
++ wait_for_completion(&master_drv_data->xfer_done);
++
++ /* Disable the Rx Interrupts */
++
++ spi_disable_interrupt(master_drv_data, MXC_CSPIINT_RREN);
++
++ return t->len - master_drv_data->transfer.count;
++}
++
++void mxc_spi_cleanup(struct spi_device *spi)
++{
++ return;
++}
++
++static int mxc_spi_probe(struct platform_device *pdev)
++{
++ struct mxc_spi_master *mxc_platform_info;
++ struct spi_master *master;
++ struct mxc_spi *master_drv_data;
++ unsigned int spi_ver;
++ int ret = -ENODEV;
++
++ dev_dbg(&pdev->dev, "Enter: %s\n", __FUNCTION__);
++
++ /* Get the platform specific data for this master device */
++
++ mxc_platform_info = pdev->dev.platform_data;
++ if (!mxc_platform_info) {
++ dev_err(&pdev->dev, "can't get the platform data for CSPI\n");
++ return -ENODEV;
++ }
++
++ /* Allocate SPI master controller */
++
++ master = spi_alloc_master(&pdev->dev, sizeof(struct mxc_spi));
++ if (!master) {
++ dev_err(&pdev->dev, "can't alloc for spi_master\n");
++ return -ENOMEM;
++ }
++
++ /* Set this device's driver data to master */
++
++ platform_set_drvdata(pdev, master);
++
++ /* Set this master's data from platform_info */
++
++ master->bus_num = pdev->id;
++ master->num_chipselect = mxc_platform_info->maxchipselect;
++
++ /* Set the master controller driver data for this master */
++
++ master_drv_data = spi_master_get_devdata(master);
++ if (master_drv_data == NULL)
++ goto err;
++ master_drv_data->mxc_bitbang.master = spi_master_get(master);
++
++ /* Set the master bitbang data */
++
++ master_drv_data->mxc_bitbang.chipselect = mxc_spi_chipselect;
++ master_drv_data->mxc_bitbang.txrx_bufs = mxc_spi_transfer;
++ master_drv_data->mxc_bitbang.master->setup = mxc_spi_setup;
++ master_drv_data->mxc_bitbang.master->cleanup = mxc_spi_cleanup;
++
++ /* Initialize the completion object */
++
++ init_completion(&master_drv_data->xfer_done);
++
++ /* Set the master controller register addresses and irqs */
++
++ master_drv_data->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!master_drv_data->res) {
++ dev_err(&pdev->dev, "can't get platform resource for CSPI%d\n",
++ master->bus_num);
++ ret = -ENOMEM;
++ goto err;
++ }
++
++ if (!request_mem_region(master_drv_data->res->start,
++ master_drv_data->res->end -
++ master_drv_data->res->start + 1, pdev->name)) {
++ dev_err(&pdev->dev, "request_mem_region failed for CSPI%d\n",
++ master->bus_num);
++ ret = -EBUSY;
++ goto err;
++ }
++
++ master_drv_data->base = ioremap(master_drv_data->res->start,
++ master_drv_data->res->end -
++ master_drv_data->res->start + 1);
++
++ if (!master_drv_data->base) {
++ dev_err(&pdev->dev, "Cannot map iomem for CSPI%d\n",
++ master->bus_num);
++ ret = -EINVAL;
++ goto err1;
++ }
++
++ ret = platform_get_irq(pdev, 0);
++ if (ret < 0) {
++ dev_err(&pdev->dev, "can't get IRQ for CSPI%d\n",
++ master->bus_num);
++ goto err2;
++ }
++ master_drv_data->irq = ret;
++
++ /* Register for SPI Interrupt */
++
++ ret = request_irq(master_drv_data->irq, mxc_spi_isr,
++ 0, "CSPI_IRQ", master_drv_data);
++ if (ret != 0) {
++ dev_err(&pdev->dev, "request_irq failed for CSPI%d\n",
++ master->bus_num);
++ goto err2;
++ }
++
++ /* Setup any GPIO active */
++ if (mxc_platform_info->init)
++ mxc_platform_info->init(pdev);
++
++ /* Identify SPI version */
++
++ spi_ver = mxc_platform_info->spi_version;
++ if (spi_ver == 7) {
++ master_drv_data->spi_ver_def = &spi_ver_0_7;
++ } else if (spi_ver == 5) {
++ master_drv_data->spi_ver_def = &spi_ver_0_5;
++ } else if (spi_ver == 4) {
++ master_drv_data->spi_ver_def = &spi_ver_0_4;
++ } else if (spi_ver == 0) {
++ master_drv_data->spi_ver_def = &spi_ver_0_0;
++ }
++
++ /* Enable the CSPI Clock, CSPI Module, set as a master */
++
++ master_drv_data->clk = clk_get(&pdev->dev, "cspi_clk");
++ clk_enable(master_drv_data->clk);
++ master_drv_data->spi_ipg_clk = clk_get_rate(master_drv_data->clk);
++
++ writel(0x00008000, master_drv_data->base + MXC_CSPICTRL); /* reset default */
++ writel(MXC_CSPICTRL_ENABLE | MXC_CSPICTRL_MASTER,
++ master_drv_data->base + MXC_CSPICTRL);
++ writel(MXC_CSPIPERIOD_32KHZ,
++ master_drv_data->base + MXC_CSPIPERIOD);
++ writel(0, master_drv_data->base + MXC_CSPIINT);
++
++ /* Start the SPI Master Controller driver */
++
++ ret = spi_bitbang_start(&master_drv_data->mxc_bitbang);
++ if (ret != 0) {
++ dev_err(&pdev->dev, "Cannot start bitbang driver\n");
++ goto err3;
++ }
++
++ printk(KERN_INFO "CSPI: %s-%d probed\n", pdev->name, pdev->id);
++
++#ifdef CONFIG_SPI_MXC_TEST_LOOPBACK
++ {
++ int i;
++ struct spi_board_info *bi = &loopback_info[0];
++ for (i = 0; i < ARRAY_SIZE(loopback_info); i++, bi++) {
++ if (bi->bus_num != master->bus_num)
++ continue;
++
++ dev_info(&pdev->dev,
++ "registering loopback device '%s'\n",
++ bi->modalias);
++
++ spi_new_device(master, bi);
++ }
++ }
++#endif
++ return ret;
++
++err3:
++ clk_disable(master_drv_data->clk);
++ clk_put(master_drv_data->clk);
++ if (mxc_platform_info->exit)
++ mxc_platform_info->exit(pdev);
++ free_irq(master_drv_data->irq, master_drv_data);
++err2:
++ iounmap(master_drv_data->base);
++err1:
++ release_mem_region(pdev->resource[0].start,
++ pdev->resource[0].end - pdev->resource[0].start + 1);
++err:
++ spi_master_put(master);
++ kfree(master);
++ platform_set_drvdata(pdev, NULL);
++ return ret;
++}
++
++static int mxc_spi_remove(struct platform_device *pdev)
++{
++ struct spi_master *master = platform_get_drvdata(pdev);
++ struct mxc_spi_master *mxc_platform_info =
++ pdev->dev.platform_data;
++
++ if (master) {
++ struct mxc_spi *master_drv_data =
++ spi_master_get_devdata(master);
++
++ if (mxc_platform_info->exit)
++ mxc_platform_info->exit(pdev);
++ clk_disable(master_drv_data->clk);
++ /* clk_put(master_drv_data->clk); */ /* FIXME required? */
++
++ /* Disable the CSPI module */
++
++ writel(MXC_CSPICTRL_DISABLE,
++ master_drv_data->base + MXC_CSPICTRL);
++
++ spi_bitbang_stop(&master_drv_data->mxc_bitbang);
++
++ /* free resources */
++ spi_master_put(master);
++ free_irq(master_drv_data->irq, master_drv_data);
++ iounmap(master_drv_data->base);
++ release_mem_region(master_drv_data->res->start,
++ master_drv_data->res->end -
++ master_drv_data->res->start + 1);
++ }
++
++ printk(KERN_INFO "CSPI: %s-%d removed\n", pdev->name, pdev->id);
++ platform_set_drvdata(pdev, NULL);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int suspend_devices(struct device *dev, void *pm_message)
++{
++ pm_message_t *state = pm_message;
++
++ if (dev->power.power_state.event != state->event) {
++ dev_warn(dev, "mismatch in pm state request\n");
++ return -1;
++ }
++
++ return 0;
++}
++
++static int spi_bitbang_suspend(struct spi_bitbang *bitbang)
++{
++ unsigned long flags;
++ unsigned limit = 500;
++
++ spin_lock_irqsave(&bitbang->lock, flags);
++ //bitbang->shutdown = 0;
++ while (!list_empty(&bitbang->queue) && limit--) {
++ spin_unlock_irqrestore(&bitbang->lock, flags);
++
++ dev_dbg(&bitbang->master->dev, "wait for queue\n");
++ msleep(10);
++
++ spin_lock_irqsave(&bitbang->lock, flags);
++ }
++ if (!list_empty(&bitbang->queue)) {
++ dev_err(&bitbang->master->dev, "queue didn't empty\n");
++ return -EBUSY;
++ }
++ spin_unlock_irqrestore(&bitbang->lock, flags);
++
++ //bitbang->shutdown = 1;
++
++ return 0;
++}
++
++static void spi_bitbang_resume(struct spi_bitbang *bitbang)
++{
++ spin_lock_init(&bitbang->lock);
++ INIT_LIST_HEAD(&bitbang->queue);
++
++ bitbang->busy = 0;
++ //bitbang->shutdown = 0;
++}
++
++static int mxc_spi_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ struct spi_master *master = platform_get_drvdata(pdev);
++ struct mxc_spi *master_drv_data = spi_master_get_devdata(master);
++ struct mxc_spi_master *mxc_platform_info =
++ pdev->dev.platform_data;
++ int ret = 0;
++
++ if (device_for_each_child(&pdev->dev, &state, suspend_devices) != 0) {
++ dev_warn(&pdev->dev, "suspend aborted\n");
++ return -EINVAL;
++ }
++
++ spi_bitbang_suspend(&master_drv_data->mxc_bitbang);
++ writel(MXC_CSPICTRL_DISABLE,
++ master_drv_data->base + MXC_CSPICTRL);
++
++ clk_disable(master_drv_data->clk);
++ if (mxc_platform_info->exit)
++ mxc_platform_info->exit(pdev);
++
++ return ret;
++}
++
++static int mxc_spi_resume(struct platform_device *pdev)
++{
++ struct spi_master *master = platform_get_drvdata(pdev);
++ struct mxc_spi *master_drv_data = spi_master_get_devdata(master);
++ struct mxc_spi_master *mxc_platform_info =
++ pdev->dev.platform_data;
++
++ if (mxc_platform_info->init)
++ mxc_platform_info->init(pdev);
++ clk_enable(master_drv_data->clk);
++
++ spi_bitbang_resume(&master_drv_data->mxc_bitbang);
++ writel(MXC_CSPICTRL_ENABLE | MXC_CSPICTRL_MASTER,
++ master_drv_data->base + MXC_CSPICTRL);
++
++ return 0;
++}
++#else
++# define mxc_spi_suspend NULL
++# define mxc_spi_resume NULL
++#endif /* CONFIG_PM */
++
++static struct platform_driver mxc_spi_driver = {
++ .driver = {
++ .name = "mxc_spi",
++ .owner = THIS_MODULE,
++ },
++ .probe = mxc_spi_probe,
++ .remove = mxc_spi_remove,
++ .suspend = mxc_spi_suspend,
++ .resume = mxc_spi_resume,
++};
++
++static int __init mxc_spi_init(void)
++{
++ pr_debug("Registering the SPI Controller Driver\n");
++ return platform_driver_register(&mxc_spi_driver);
++}
++
++static void __exit mxc_spi_exit(void)
++{
++ pr_debug("Unregistering the SPI Controller Driver\n");
++ platform_driver_unregister(&mxc_spi_driver);
++}
++
++subsys_initcall(mxc_spi_init);
++module_exit(mxc_spi_exit);
++
++MODULE_DESCRIPTION("SPI Master Controller driver");
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_LICENSE("GPL");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/usb/Kconfig linux-2.6.28-karo/drivers/usb/Kconfig
+--- linux-2.6.28/drivers/usb/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/usb/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -56,6 +56,7 @@ config USB_ARCH_HAS_EHCI
+ default y if PPC_83xx
+ default y if SOC_AU1200
+ default y if ARCH_IXP4XX
++ default y if ARCH_MXC
+ default PCI
+
+ # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/usb/host/Kconfig linux-2.6.28-karo/drivers/usb/host/Kconfig
+--- linux-2.6.28/drivers/usb/host/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/usb/host/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -96,6 +96,13 @@ config USB_EHCI_HCD_PPC_OF
+ Enables support for the USB controller present on the PowerPC
+ OpenFirmware platform bus.
+
++config USB_EHCI_MXC
++ bool "Support for Freescale on-chip EHCI USB controller"
++ depends on USB_EHCI_HCD && ARCH_MXC
++ select USB_EHCI_ROOT_HUB_TT
++ ---help---
++ Variation of ARC USB block used in some Freescale chips.
++
+ config USB_ISP116X_HCD
+ tristate "ISP116X HCD support"
+ depends on USB
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/usb/host/ehci-hcd.c linux-2.6.28-karo/drivers/usb/host/ehci-hcd.c
+--- linux-2.6.28/drivers/usb/host/ehci-hcd.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/usb/host/ehci-hcd.c 2009-03-11 13:16:24.000000000 +0100
+@@ -1009,6 +1009,11 @@ MODULE_LICENSE ("GPL");
+ #define PLATFORM_DRIVER ehci_fsl_driver
+ #endif
+
++#ifdef CONFIG_USB_EHCI_MXC
++#include "ehci-mxc.c"
++#define PLATFORM_DRIVER ehci_mxc_driver
++#endif
++
+ #ifdef CONFIG_SOC_AU1200
+ #include "ehci-au1xxx.c"
+ #define PLATFORM_DRIVER ehci_hcd_au1xxx_driver
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/usb/host/ehci-mxc.c linux-2.6.28-karo/drivers/usb/host/ehci-mxc.c
+--- linux-2.6.28/drivers/usb/host/ehci-mxc.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/usb/host/ehci-mxc.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,241 @@
++/*
++ * Copyright (c) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software Foundation,
++ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <mach/mxc_ehci.h>
++
++/* called during probe() after chip reset completes */
++static int ehci_mxc_setup(struct usb_hcd *hcd)
++{
++ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
++ int retval;
++
++ /* EHCI registers start at offset 0x100 */
++ ehci->caps = hcd->regs + 0x100;
++ ehci->regs = hcd->regs + 0x100 +
++ HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
++ dbg_hcs_params(ehci, "reset");
++ dbg_hcc_params(ehci, "reset");
++
++ /* cache this readonly data; minimize chip reads */
++ ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
++
++ retval = ehci_halt(ehci);
++ if (retval)
++ return retval;
++
++ /* data structure init */
++ retval = ehci_init(hcd);
++ if (retval)
++ return retval;
++
++ hcd->has_tt = 1;
++
++ ehci->sbrn = 0x20;
++
++ ehci_reset(ehci);
++
++ ehci_port_power(ehci, 0);
++ return 0;
++}
++
++static const struct hc_driver ehci_mxc_hc_driver = {
++ .description = hcd_name,
++ .product_desc = "Freescale On-Chip EHCI Host Controller",
++ .hcd_priv_size = sizeof(struct ehci_hcd),
++
++ /*
++ * generic hardware linkage
++ */
++ .irq = ehci_irq,
++ .flags = HCD_USB2 | HCD_MEMORY,
++
++ /*
++ * basic lifecycle operations
++ */
++ .reset = ehci_mxc_setup,
++ .start = ehci_run,
++ .stop = ehci_stop,
++ .shutdown = ehci_shutdown,
++
++ /*
++ * managing i/o requests and associated device resources
++ */
++ .urb_enqueue = ehci_urb_enqueue,
++ .urb_dequeue = ehci_urb_dequeue,
++ .endpoint_disable = ehci_endpoint_disable,
++
++ /*
++ * scheduling support
++ */
++ .get_frame_number = ehci_get_frame,
++
++ /*
++ * root hub support
++ */
++ .hub_status_data = ehci_hub_status_data,
++ .hub_control = ehci_hub_control,
++ .bus_suspend = ehci_bus_suspend,
++ .bus_resume = ehci_bus_resume,
++ .relinquish_port = ehci_relinquish_port,
++ .port_handed_over = ehci_port_handed_over,
++};
++
++static int ehci_mxc_drv_probe(struct platform_device *pdev)
++{
++ struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data;
++ struct usb_hcd *hcd;
++ struct resource *res;
++ int irq, ret, temp;
++ struct clk *usbclk, *ahbclk;
++
++ dev_info(&pdev->dev, "initializing i.MX USB Controller\n");
++
++ /* Need platform data for setup */
++ if (!pdata) {
++ dev_err(&pdev->dev,
++ "No platform data for %s.\n", pdev->dev.bus_id);
++ return -ENODEV;
++ }
++
++ irq = platform_get_irq(pdev, 0);
++
++ hcd = usb_create_hcd(&ehci_mxc_hc_driver, &pdev->dev, pdev->dev.bus_id);
++ if (!hcd) {
++ ret = -ENOMEM;
++ goto err1;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res) {
++ dev_err(&pdev->dev,
++ "Found HC with no register addr. Check %s setup!\n",
++ pdev->dev.bus_id);
++ ret = -ENODEV;
++ goto err1;
++ }
++
++ hcd->rsrc_start = res->start;
++ hcd->rsrc_len = resource_size(res);
++
++ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
++ dev_dbg(&pdev->dev, "controller already in use\n");
++ ret = -EBUSY;
++ goto err1;
++ }
++
++ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
++ if (!hcd->regs) {
++ dev_err(&pdev->dev, "error mapping memory\n");
++ ret = -EFAULT;
++ goto err2;
++ }
++
++ ahbclk = clk_get(NULL, "usb_ahb_clk");
++ if (IS_ERR(ahbclk)) {
++ ret = PTR_ERR(ahbclk);
++ printk(KERN_ERR "Failed to get usb_ahb_clk: %d\n", ret);
++ goto err3;
++ }
++ clk_enable(ahbclk);
++
++ usbclk = clk_get(NULL, "usb_clk");
++ if (IS_ERR(usbclk)) {
++ ret = PTR_ERR(usbclk);
++ printk(KERN_ERR "Failed to get usb_clk: %d\n", ret);
++ goto err4;
++ }
++ clk_enable(usbclk);
++
++ if (pdata->init) {
++ ret = pdata->init(pdev);
++ if (ret) {
++ dev_err(&pdev->dev, "platform init failed\n");
++ goto err5;
++ }
++ }
++
++ /* Set to Host mode */
++ temp = readl(hcd->regs + 0x1a8);
++ writel(temp | 0x3, hcd->regs + 0x1a8);
++
++ ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
++ if (ret)
++ goto err6;
++
++ platform_set_drvdata(pdev, hcd);
++
++ return 0;
++err6:
++ if (pdata->exit)
++ pdata->exit(pdev);
++err5:
++ clk_disable(usbclk);
++ clk_put(usbclk);
++err4:
++ clk_disable(ahbclk);
++ clk_put(ahbclk);
++err3:
++ iounmap(hcd->regs);
++err2:
++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
++err1:
++ usb_put_hcd(hcd);
++ return ret;
++}
++
++static int ehci_mxc_drv_remove(struct platform_device *pdev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(pdev);
++ struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data;
++ struct clk *usbclk, *ahbclk;
++
++ usb_remove_hcd(hcd);
++ iounmap(hcd->regs);
++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
++ usb_put_hcd(hcd);
++ platform_set_drvdata(pdev, NULL);
++
++ if (pdata->exit)
++ pdata->exit(pdev);
++
++ usbclk = clk_get(NULL, "usb_clk");
++ if (!IS_ERR(usbclk)) {
++ clk_disable(usbclk);
++ clk_put(usbclk);
++ }
++ ahbclk = clk_get(NULL, "usb_ahb_clk");
++ if (!IS_ERR(ahbclk)) {
++ clk_disable(ahbclk);
++ clk_put(ahbclk);
++ }
++ return 0;
++}
++
++MODULE_ALIAS("platform:mxc-ehci");
++
++static struct platform_driver ehci_mxc_driver = {
++ .probe = ehci_mxc_drv_probe,
++ .remove = ehci_mxc_drv_remove,
++ .shutdown = usb_hcd_platform_shutdown,
++ .driver = {
++ .name = "mxc-ehci",
++ },
++};
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/video/Kconfig linux-2.6.28-karo/drivers/video/Kconfig
+--- linux-2.6.28/drivers/video/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/video/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -397,7 +397,7 @@ config FB_SA1100
+
+ config FB_IMX
+ tristate "Motorola i.MX LCD support"
+- depends on FB && ARM && ARCH_IMX
++ depends on FB && ARM && (ARCH_IMX || ARCH_MX2)
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
+@@ -2115,6 +2115,18 @@ config FB_PRE_INIT_FB
+ Select this option if display contents should be inherited as set by
+ the bootloader.
+
++config FB_MXC
++ tristate "MXC Framebuffer support"
++ depends on FB && MXC_IPU
++ select FB_CFB_FILLRECT
++ select FB_CFB_COPYAREA
++ select FB_CFB_IMAGEBLIT
++ default y
++ help
++ This is a framebuffer device for the i.MX31 LCD Controller. So
++ far only synchronous displays are supported. If you plan to use
++ an LCD display with your i.MX31 system, say Y here.
++
+ source "drivers/video/omap/Kconfig"
+
+ source "drivers/video/backlight/Kconfig"
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/video/Makefile linux-2.6.28-karo/drivers/video/Makefile
+--- linux-2.6.28/drivers/video/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/video/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -132,6 +132,7 @@ obj-$(CONFIG_FB_VGA16) += vga
+ obj-$(CONFIG_FB_OF) += offb.o
+ obj-$(CONFIG_FB_BF54X_LQ043) += bf54x-lq043fb.o
+ obj-$(CONFIG_FB_BFIN_T350MCQB) += bfin-t350mcqb-fb.o
++obj-$(CONFIG_FB_MXC) += mxcfb.o
+
+ # the test framebuffer is last
+ obj-$(CONFIG_FB_VIRTUAL) += vfb.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/video/imxfb.c linux-2.6.28-karo/drivers/video/imxfb.c
+--- linux-2.6.28/drivers/video/imxfb.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/video/imxfb.c 2009-03-11 13:16:24.000000000 +0100
+@@ -1,6 +1,4 @@
+ /*
+- * linux/drivers/video/imxfb.c
+- *
+ * Freescale i.MX Frame Buffer device driver
+ *
+ * Copyright (C) 2004 Sascha Hauer, Pengutronix
+@@ -16,8 +14,6 @@
+ * linux-arm-kernel@lists.arm.linux.org.uk
+ */
+
+-//#define DEBUG 1
+-
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <linux/errno.h>
+@@ -30,11 +26,11 @@
+ #include <linux/init.h>
+ #include <linux/ioport.h>
+ #include <linux/cpufreq.h>
++#include <linux/clk.h>
+ #include <linux/platform_device.h>
+ #include <linux/dma-mapping.h>
++#include <linux/io.h>
+
+-#include <mach/hardware.h>
+-#include <asm/io.h>
+ #include <mach/imxfb.h>
+
+ /*
+@@ -42,23 +38,170 @@
+ */
+ #define DEBUG_VAR 1
+
+-#include "imxfb.h"
++#define DRIVER_NAME "imx-fb"
++
++#define LCDC_SSA 0x00
++
++#define LCDC_SIZE 0x04
++#define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20)
++#ifdef CONFIG_ARCH_IMX
++#define SIZE_YMAX(y) ((y) & 0x1ff)
++#else
++#define SIZE_YMAX(y) ((y) & 0x3ff)
++#endif
++
++#define LCDC_VPW 0x08
++#define VPW_VPW(x) ((x) & 0x3ff)
++
++#define LCDC_CPOS 0x0C
++#define CPOS_CC1 (1<<31)
++#define CPOS_CC0 (1<<30)
++#define CPOS_OP (1<<28)
++#define CPOS_CXP(x) (((x) & 3ff) << 16)
++#ifdef CONFIG_ARCH_IMX
++#define CPOS_CYP(y) ((y) & 0x1ff)
++#else
++#define CPOS_CYP(y) ((y) & 0x3ff)
++#endif
++
++#define LCDC_LCWHB 0x10
++#define LCWHB_BK_EN (1<<31)
++#define LCWHB_CW(w) (((w) & 0x1f) << 24)
++#define LCWHB_CH(h) (((h) & 0x1f) << 16)
++#define LCWHB_BD(x) ((x) & 0xff)
++
++#define LCDC_LCHCC 0x14
++#ifdef CONFIG_ARCH_IMX
++#define LCHCC_CUR_COL_R(r) (((r) & 0x1f) << 11)
++#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 5)
++#define LCHCC_CUR_COL_B(b) ((b) & 0x1f)
++#else
++#define LCHCC_CUR_COL_R(r) (((r) & 0x3f) << 12)
++#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 6)
++#define LCHCC_CUR_COL_B(b) ((b) & 0x3f)
++#endif
++
++#define LCDC_PCR 0x18
++
++#define LCDC_HCR 0x1C
++#define HCR_H_WIDTH(x) (((x) & 0x3f) << 26)
++#define HCR_H_WAIT_1(x) (((x) & 0xff) << 8)
++#define HCR_H_WAIT_2(x) ((x) & 0xff)
++
++#define LCDC_VCR 0x20
++#define VCR_V_WIDTH(x) (((x) & 0x3f) << 26)
++#define VCR_V_WAIT_1(x) (((x) & 0xff) << 8)
++#define VCR_V_WAIT_2(x) ((x) & 0xff)
++
++#define LCDC_POS 0x24
++#define POS_POS(x) ((x) & 1f)
++
++#define LCDC_LSCR1 0x28
++/* bit fields in imxfb.h */
++
++#define LCDC_PWMR 0x2C
++/* bit fields in imxfb.h */
++
++#define LCDC_DMACR 0x30
++/* bit fields in imxfb.h */
++
++#define LCDC_RMCR 0x34
++#define RMCR_LCDC_EN (1<<1)
++#define RMCR_SELF_REF (1<<0)
++
++#define LCDC_LCDICR 0x38
++#define LCDICR_INT_SYN (1<<2)
++#define LCDICR_INT_CON (1)
++
++#define LCDC_LCDISR 0x40
++#define LCDISR_UDR_ERR (1<<3)
++#define LCDISR_ERR_RES (1<<2)
++#define LCDISR_EOF (1<<1)
++#define LCDISR_BOF (1<<0)
+
+-static struct imxfb_rgb def_rgb_16 = {
+- .red = { .offset = 8, .length = 4, },
+- .green = { .offset = 4, .length = 4, },
+- .blue = { .offset = 0, .length = 4, },
+- .transp = { .offset = 0, .length = 0, },
++/*
++ * These are the bitfields for each
++ * display depth that we support.
++ */
++struct imxfb_rgb {
++ struct fb_bitfield red;
++ struct fb_bitfield green;
++ struct fb_bitfield blue;
++ struct fb_bitfield transp;
+ };
+
+-static struct imxfb_rgb def_rgb_8 = {
+- .red = { .offset = 0, .length = 8, },
+- .green = { .offset = 0, .length = 8, },
+- .blue = { .offset = 0, .length = 8, },
+- .transp = { .offset = 0, .length = 0, },
++struct imxfb_info {
++ struct platform_device *pdev;
++ void __iomem *regs;
++ struct clk *clk;
++ char enabled;
++
++ u_int max_bpp;
++ u_int max_xres;
++ u_int max_yres;
++
++ /*
++ * These are the addresses we mapped
++ * the framebuffer memory region to.
++ */
++ dma_addr_t map_dma;
++ u_char *map_cpu;
++ u_int map_size;
++
++ u_char *screen_cpu;
++ dma_addr_t screen_dma;
++ u_int palette_size;
++
++ dma_addr_t dbar1;
++ dma_addr_t dbar2;
++
++ u_int pcr;
++ u_int pwmr;
++ u_int lscr1;
++ u_int dmacr;
++ u_int cmap_inverse:1,
++ cmap_static:1,
++ unused:30;
++
++ void (*lcd_power)(int);
++ void (*backlight_power)(int);
+ };
+
+-static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info);
++#define IMX_NAME "IMX"
++
++/*
++ * Minimum X and Y resolutions
++ */
++#define MIN_XRES 64
++#define MIN_YRES 64
++
++static struct imxfb_rgb def_rgb_18 = {
++ .red = {.offset = 18, .length = 6,},
++ .green = {.offset = 10, .length = 6,},
++ .blue = {.offset = 2, .length = 6,},
++ .transp = {.offset = 0, .length = 0,},
++};
++
++static struct imxfb_rgb def_rgb_16_tft = {
++ .red = {.offset = 11, .length = 5,},
++ .green = {.offset = 5, .length = 6,},
++ .blue = {.offset = 0, .length = 5,},
++ .transp = {.offset = 0, .length = 0,},
++};
++
++static struct imxfb_rgb def_rgb_16_stn = {
++ .red = {.offset = 8, .length = 4,},
++ .green = {.offset = 4, .length = 4,},
++ .blue = {.offset = 0, .length = 4,},
++ .transp = {.offset = 0, .length = 0,},
++};
++
++static struct imxfb_rgb def_rgb_8 = {
++ .red = {.offset = 0, .length = 8,},
++ .green = {.offset = 0, .length = 8,},
++ .blue = {.offset = 0, .length = 8,},
++ .transp = {.offset = 0, .length = 0,},
++};
+
+ static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
+ {
+@@ -67,10 +210,8 @@ static inline u_int chan_to_field(u_int
+ return chan << bf->offset;
+ }
+
+-#define LCDC_PALETTE(x) __REG2(IMX_LCDC_BASE+0x800, (x)<<2)
+-static int
+-imxfb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue,
+- u_int trans, struct fb_info *info)
++static int imxfb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue,
++ u_int trans, struct fb_info *info)
+ {
+ struct imxfb_info *fbi = info->par;
+ u_int val, ret = 1;
+@@ -81,14 +222,13 @@ imxfb_setpalettereg(u_int regno, u_int r
+ (CNVT_TOHW(green,4) << 4) |
+ CNVT_TOHW(blue, 4);
+
+- LCDC_PALETTE(regno) = val;
++ writel(val, fbi->regs + 0x800 + (regno << 2));
+ ret = 0;
+ }
+ return ret;
+ }
+
+-static int
+-imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
++static int imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+ u_int trans, struct fb_info *info)
+ {
+ struct imxfb_info *fbi = info->par;
+@@ -148,11 +288,10 @@ imxfb_setcolreg(u_int regno, u_int red,
+ * yres, xres_virtual, yres_virtual, xoffset, yoffset, grayscale,
+ * bitfields, horizontal timing, vertical timing.
+ */
+-static int
+-imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
++static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+ {
+ struct imxfb_info *fbi = info->par;
+- int rgbidx;
++ struct imxfb_rgb *rgb;
+
+ if (var->xres < MIN_XRES)
+ var->xres = MIN_XRES;
+@@ -167,24 +306,29 @@ imxfb_check_var(struct fb_var_screeninfo
+
+ pr_debug("var->bits_per_pixel=%d\n", var->bits_per_pixel);
+ switch (var->bits_per_pixel) {
++ case 32:
++ rgb = &def_rgb_18;
++ break;
+ case 16:
+- rgbidx = RGB_16;
++ default:
++ if (readl(fbi->regs + LCDC_PCR) & PCR_TFT)
++ rgb = &def_rgb_16_tft;
++ else
++ rgb = &def_rgb_16_stn;
+ break;
+ case 8:
+- rgbidx = RGB_8;
++ rgb = &def_rgb_8;
+ break;
+- default:
+- rgbidx = RGB_16;
+ }
+
+ /*
+ * Copy the RGB parameters for this display
+ * from the machine specific parameters.
+ */
+- var->red = fbi->rgb[rgbidx]->red;
+- var->green = fbi->rgb[rgbidx]->green;
+- var->blue = fbi->rgb[rgbidx]->blue;
+- var->transp = fbi->rgb[rgbidx]->transp;
++ var->red = rgb->red;
++ var->green = rgb->green;
++ var->blue = rgb->blue;
++ var->transp = rgb->transp;
+
+ pr_debug("RGBT length = %d:%d:%d:%d\n",
+ var->red.length, var->green.length, var->blue.length,
+@@ -206,9 +350,7 @@ static int imxfb_set_par(struct fb_info
+ struct imxfb_info *fbi = info->par;
+ struct fb_var_screeninfo *var = &info->var;
+
+- pr_debug("set_par\n");
+-
+- if (var->bits_per_pixel == 16)
++ if (var->bits_per_pixel == 16 || var->bits_per_pixel == 32)
+ info->fix.visual = FB_VISUAL_TRUECOLOR;
+ else if (!fbi->cmap_static)
+ info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+@@ -221,49 +363,72 @@ static int imxfb_set_par(struct fb_info
+ info->fix.visual = FB_VISUAL_STATIC_PSEUDOCOLOR;
+ }
+
+- info->fix.line_length = var->xres_virtual *
+- var->bits_per_pixel / 8;
++ info->fix.line_length = var->xres_virtual * var->bits_per_pixel / 8;
+ fbi->palette_size = var->bits_per_pixel == 8 ? 256 : 16;
+
+- imxfb_activate_var(var, info);
++ if (var->bits_per_pixel == 16)
++ fb_dealloc_cmap(&info->cmap);
++ else
++ fb_alloc_cmap(&info->cmap, 1 << info->var.bits_per_pixel, 0);
+
+ return 0;
+ }
+
+ static void imxfb_enable_controller(struct imxfb_info *fbi)
+ {
+- pr_debug("Enabling LCD controller\n");
+-
+- /* initialize LCDC */
+- LCDC_RMCR &= ~RMCR_LCDC_EN; /* just to be safe... */
+-
+- LCDC_SSA = fbi->screen_dma;
+- /* physical screen start address */
+- LCDC_VPW = VPW_VPW(fbi->max_xres * fbi->max_bpp / 8 / 4);
++ struct imx_fb_platform_data *pdata = fbi->pdev->dev.platform_data;
++ int ret;
+
+- LCDC_POS = 0x00000000; /* panning offset 0 (0 pixel offset) */
++ if (!fbi->enabled) {
++ if (clk_enable(fbi->clk) != 0)
++ printk("Warning: Could not enable clock!");
++ pr_debug("LCD clock enabled\n");
++
++ if (pdata->init) {
++ ret = (pdata->init)(fbi->pdev);
++ pr_debug("GPIOs enabled\n");
++ if (ret != 0)
++ pr_err("Failing to enable LCD pins\n");
++ }
+
+- /* disable hardware cursor */
+- LCDC_CPOS &= ~(CPOS_CC0 | CPOS_CC1);
++ if (pdata->lcd_power) {
++ pdata->lcd_power(1);
++ pr_debug("Display's power enabled\n");
++ }
+
+- LCDC_RMCR = RMCR_LCDC_EN;
++ if (pdata->backlight_power) {
++ pdata->backlight_power(1);
++ pr_debug("Backlight's power enabled\n");
++ }
+
+- if(fbi->backlight_power)
+- fbi->backlight_power(1);
+- if(fbi->lcd_power)
+- fbi->lcd_power(1);
++ fbi->enabled = 1;
++ }
+ }
+
+ static void imxfb_disable_controller(struct imxfb_info *fbi)
+ {
+- pr_debug("Disabling LCD controller\n");
++ struct imx_fb_platform_data *pdata = fbi->pdev->dev.platform_data;
++ int ret;
++
++ if (fbi->enabled) {
++ if (pdata->backlight_power)
++ pdata->backlight_power(0);
++ if (pdata->lcd_power)
++ pdata->lcd_power(0);
+
+- if(fbi->backlight_power)
+- fbi->backlight_power(0);
+- if(fbi->lcd_power)
+- fbi->lcd_power(0);
++#ifdef CONFIG_ARCH_IMX
++ writel(0, fbi->regs + LCDC_RMCR); /* for IMX only */
++#endif
++ clk_disable(fbi->clk);
++
++ if (pdata->exit) {
++ ret = (pdata->exit)(fbi->pdev);
++ if (ret != 0)
++ pr_err("Failed to disable LCD pins\n");
++ }
+
+- LCDC_RMCR = 0;
++ fbi->enabled = 0;
++ }
+ }
+
+ static int imxfb_blank(int blank, struct fb_info *info)
+@@ -298,114 +463,68 @@ static struct fb_ops imxfb_ops = {
+ .fb_blank = imxfb_blank,
+ };
+
+-/*
+- * imxfb_activate_var():
+- * Configures LCD Controller based on entries in var parameter. Settings are
+- * only written to the controller if changes were made.
+- */
+-static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info)
+-{
+- struct imxfb_info *fbi = info->par;
+- pr_debug("var: xres=%d hslen=%d lm=%d rm=%d\n",
+- var->xres, var->hsync_len,
+- var->left_margin, var->right_margin);
+- pr_debug("var: yres=%d vslen=%d um=%d bm=%d\n",
+- var->yres, var->vsync_len,
+- var->upper_margin, var->lower_margin);
+-
+-#if DEBUG_VAR
+- if (var->xres < 16 || var->xres > 1024)
+- printk(KERN_ERR "%s: invalid xres %d\n",
+- info->fix.id, var->xres);
+- if (var->hsync_len < 1 || var->hsync_len > 64)
+- printk(KERN_ERR "%s: invalid hsync_len %d\n",
+- info->fix.id, var->hsync_len);
+- if (var->left_margin > 255)
+- printk(KERN_ERR "%s: invalid left_margin %d\n",
+- info->fix.id, var->left_margin);
+- if (var->right_margin > 255)
+- printk(KERN_ERR "%s: invalid right_margin %d\n",
+- info->fix.id, var->right_margin);
+- if (var->yres < 1 || var->yres > 511)
+- printk(KERN_ERR "%s: invalid yres %d\n",
+- info->fix.id, var->yres);
+- if (var->vsync_len > 100)
+- printk(KERN_ERR "%s: invalid vsync_len %d\n",
+- info->fix.id, var->vsync_len);
+- if (var->upper_margin > 63)
+- printk(KERN_ERR "%s: invalid upper_margin %d\n",
+- info->fix.id, var->upper_margin);
+- if (var->lower_margin > 255)
+- printk(KERN_ERR "%s: invalid lower_margin %d\n",
+- info->fix.id, var->lower_margin);
+-#endif
+-
+- LCDC_HCR = HCR_H_WIDTH(var->hsync_len) |
+- HCR_H_WAIT_1(var->left_margin) |
+- HCR_H_WAIT_2(var->right_margin);
+-
+- LCDC_VCR = VCR_V_WIDTH(var->vsync_len) |
+- VCR_V_WAIT_1(var->upper_margin) |
+- VCR_V_WAIT_2(var->lower_margin);
+-
+- LCDC_SIZE = SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres);
+- LCDC_PCR = fbi->pcr;
+- LCDC_PWMR = fbi->pwmr;
+- LCDC_LSCR1 = fbi->lscr1;
+- LCDC_DMACR = fbi->dmacr;
+-
+- return 0;
+-}
+-
+-static void imxfb_setup_gpio(struct imxfb_info *fbi)
++/* enable the LCD controller with basic setup for the connected display. */
++static void imxfb_setup_display(struct imxfb_info *fbi)
+ {
+- int width;
++ u32 pixel_clk, pcr;
++ struct imx_fb_platform_data *pinfo = fbi->pdev->dev.platform_data;
+
+- LCDC_RMCR &= ~(RMCR_LCDC_EN | RMCR_SELF_REF);
++#ifdef CONFIG_ARCH_IMX
++ writel(readl(fbi->regs + LCDC_RMCR) & ~RMCR_LCDC_EN,
++ fbi->regs + LCDC_RMCR); /* just to be safe... */
++#endif
+
+- if( fbi->pcr & PCR_TFT )
+- width = 16;
+- else
+- width = 1 << ((fbi->pcr >> 28) & 0x3);
++ /* physical screen start address */
++ writel(fbi->screen_dma, fbi->regs + LCDC_SSA);
+
+- switch(width) {
+- case 16:
+- imx_gpio_mode(PD30_PF_LD15);
+- imx_gpio_mode(PD29_PF_LD14);
+- imx_gpio_mode(PD28_PF_LD13);
+- imx_gpio_mode(PD27_PF_LD12);
+- imx_gpio_mode(PD26_PF_LD11);
+- imx_gpio_mode(PD25_PF_LD10);
+- imx_gpio_mode(PD24_PF_LD9);
+- imx_gpio_mode(PD23_PF_LD8);
+- case 8:
+- imx_gpio_mode(PD22_PF_LD7);
+- imx_gpio_mode(PD21_PF_LD6);
+- imx_gpio_mode(PD20_PF_LD5);
+- imx_gpio_mode(PD19_PF_LD4);
+- case 4:
+- imx_gpio_mode(PD18_PF_LD3);
+- imx_gpio_mode(PD17_PF_LD2);
+- case 2:
+- imx_gpio_mode(PD16_PF_LD1);
+- case 1:
+- imx_gpio_mode(PD15_PF_LD0);
+- }
+-
+- /* initialize GPIOs */
+- imx_gpio_mode(PD6_PF_LSCLK);
+- imx_gpio_mode(PD11_PF_CONTRAST);
+- imx_gpio_mode(PD14_PF_FLM_VSYNC);
+- imx_gpio_mode(PD13_PF_LP_HSYNC);
+- imx_gpio_mode(PD12_PF_ACD_OE);
+-
+- /* These are only needed for Sharp HR TFT displays */
+- if (fbi->pcr & PCR_SHARP) {
+- imx_gpio_mode(PD7_PF_REV);
+- imx_gpio_mode(PD8_PF_CLS);
+- imx_gpio_mode(PD9_PF_PS);
+- imx_gpio_mode(PD10_PF_SPL_SPR);
+- }
++ /* dimension of this display */
++ writel(SIZE_XMAX(pinfo->xres) | SIZE_YMAX(pinfo->yres),
++ fbi->regs + LCDC_SIZE);
++
++ /* virtual page width */
++ writel(VPW_VPW(fbi->max_xres * fbi->max_bpp / 8 / 4),
++ fbi->regs + LCDC_VPW);
++
++ /* setup the pixel clock */
++ pixel_clk = clk_get_rate(fbi->clk);
++
++ pcr = (pixel_clk + ((pinfo->pixclock * 1000UL) / 2)) / (pinfo->pixclock * 1000UL);
++ if (--pcr > 0x3F) {
++ pcr = 0x3F;
++ printk("Must limit pixel clock to %luHz\n", clk_get_rate(fbi->clk) / pcr);
++ }
++
++ /* add sync polarities */
++ pcr |= fbi->pcr & ~0x3F;
++ writel(pcr, fbi->regs + LCDC_PCR);
++
++ /* setup sync behaviour */
++ writel(HCR_H_WIDTH(pinfo->hsync_len - 1) |
++ HCR_H_WAIT_1(pinfo->right_margin - 1) |
++ HCR_H_WAIT_2(pinfo->left_margin - 3),
++ fbi->regs + LCDC_HCR);
++
++ writel(VCR_V_WIDTH(pinfo->vsync_len) |
++ VCR_V_WAIT_1(pinfo->lower_margin) |
++ VCR_V_WAIT_2(pinfo->upper_margin),
++ fbi->regs + LCDC_VCR);
++
++ /* PWM contrast control register */
++ writel(fbi->pwmr, fbi->regs + LCDC_PWMR);
++
++ /* special setup for Sharp displays */
++ writel(fbi->lscr1, fbi->regs + LCDC_LSCR1);
++
++ /* dma watermarks for this mode */
++ writel(fbi->dmacr, fbi->regs + LCDC_DMACR);
++
++ /* activate refresh */
++#ifdef CONFIG_ARCH_IMX
++ writel(readl(fbi->regs + LCDC_RMCR) | RMCR_LCDC_EN,
++ fbi->regs + LCDC_RMCR);
++#else
++ writel(0x00000000, fbi->regs + LCDC_RMCR);
++#endif
+ }
+
+ #ifdef CONFIG_PM
+@@ -413,19 +532,23 @@ static void imxfb_setup_gpio(struct imxf
+ * Power management hooks. Note that we won't be called from IRQ context,
+ * unlike the blank functions above, so we may sleep.
+ */
+-static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
++static int imxfb_suspend(struct platform_device *pdev, pm_message_t state)
+ {
+- struct imxfb_info *fbi = platform_get_drvdata(dev);
+- pr_debug("%s\n",__func__);
++ struct fb_info *info = platform_get_drvdata(pdev);
++ struct imxfb_info *fbi = info->par;
++
++ pr_debug("%s\n", __func__);
+
+ imxfb_disable_controller(fbi);
+ return 0;
+ }
+
+-static int imxfb_resume(struct platform_device *dev)
++static int imxfb_resume(struct platform_device *pdev)
+ {
+- struct imxfb_info *fbi = platform_get_drvdata(dev);
+- pr_debug("%s\n",__func__);
++ struct fb_info *info = platform_get_drvdata(pdev);
++ struct imxfb_info *fbi = info->par;
++
++ pr_debug("%s\n", __func__);
+
+ imxfb_enable_controller(fbi);
+ return 0;
+@@ -435,149 +558,148 @@ static int imxfb_resume(struct platform_
+ #define imxfb_resume NULL
+ #endif
+
+-static int __init imxfb_init_fbinfo(struct device *dev)
++static int __init imxfb_init_fbinfo(struct platform_device *pdev)
+ {
+- struct imxfb_mach_info *inf = dev->platform_data;
+- struct fb_info *info = dev_get_drvdata(dev);
++ struct imx_fb_platform_data *pdata = pdev->dev.platform_data;
++ struct fb_info *info = dev_get_drvdata(&pdev->dev);
+ struct imxfb_info *fbi = info->par;
+
+- pr_debug("%s\n",__func__);
++ pr_debug("%s\n", __func__);
+
+- info->pseudo_palette = kmalloc( sizeof(u32) * 16, GFP_KERNEL);
++ info->pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL);
+ if (!info->pseudo_palette)
+ return -ENOMEM;
+
+ memset(fbi, 0, sizeof(struct imxfb_info));
+- fbi->dev = dev;
+
+ strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id));
+
+- info->fix.type = FB_TYPE_PACKED_PIXELS;
++ info->fix.type = FB_TYPE_PACKED_PIXELS;
+ info->fix.type_aux = 0;
+ info->fix.xpanstep = 0;
+ info->fix.ypanstep = 0;
+ info->fix.ywrapstep = 0;
+- info->fix.accel = FB_ACCEL_NONE;
++ info->fix.accel = FB_ACCEL_NONE;
+
+ info->var.nonstd = 0;
+ info->var.activate = FB_ACTIVATE_NOW;
+ info->var.height = -1;
+ info->var.width = -1;
+ info->var.accel_flags = 0;
+- info->var.vmode = FB_VMODE_NONINTERLACED;
++ info->var.vmode = FB_VMODE_NONINTERLACED;
+
+ info->fbops = &imxfb_ops;
+- info->flags = FBINFO_FLAG_DEFAULT | FBINFO_READS_FAST;
+-
+- fbi->rgb[RGB_16] = &def_rgb_16;
+- fbi->rgb[RGB_8] = &def_rgb_8;
++ info->flags = FBINFO_FLAG_DEFAULT |
++ FBINFO_READS_FAST;
+
+- fbi->max_xres = inf->xres;
+- info->var.xres = inf->xres;
+- info->var.xres_virtual = inf->xres;
+- fbi->max_yres = inf->yres;
+- info->var.yres = inf->yres;
+- info->var.yres_virtual = inf->yres;
+- fbi->max_bpp = inf->bpp;
+- info->var.bits_per_pixel = inf->bpp;
+- info->var.nonstd = inf->nonstd;
+- info->var.pixclock = inf->pixclock;
+- info->var.hsync_len = inf->hsync_len;
+- info->var.left_margin = inf->left_margin;
+- info->var.right_margin = inf->right_margin;
+- info->var.vsync_len = inf->vsync_len;
+- info->var.upper_margin = inf->upper_margin;
+- info->var.lower_margin = inf->lower_margin;
+- info->var.sync = inf->sync;
+- info->var.grayscale = inf->cmap_greyscale;
+- fbi->cmap_inverse = inf->cmap_inverse;
+- fbi->cmap_static = inf->cmap_static;
+- fbi->pcr = inf->pcr;
+- fbi->lscr1 = inf->lscr1;
+- fbi->dmacr = inf->dmacr;
+- fbi->pwmr = inf->pwmr;
+- fbi->lcd_power = inf->lcd_power;
+- fbi->backlight_power = inf->backlight_power;
++ fbi->max_xres = pdata->xres;
++ info->var.xres = pdata->xres;
++ info->var.xres_virtual = pdata->xres;
++ fbi->max_yres = pdata->yres;
++ info->var.yres = pdata->yres;
++ info->var.yres_virtual = pdata->yres;
++ fbi->max_bpp = pdata->bpp;
++ info->var.bits_per_pixel = pdata->bpp;
++ info->var.nonstd = pdata->nonstd;
++ info->var.pixclock = pdata->pixclock;
++ info->var.hsync_len = pdata->hsync_len;
++ info->var.left_margin = pdata->left_margin;
++ info->var.right_margin = pdata->right_margin;
++ info->var.vsync_len = pdata->vsync_len;
++ info->var.upper_margin = pdata->upper_margin;
++ info->var.lower_margin = pdata->lower_margin;
++ info->var.sync = pdata->sync;
++ info->var.grayscale = pdata->cmap_greyscale;
++ fbi->cmap_inverse = pdata->cmap_inverse;
++ fbi->cmap_static = pdata->cmap_static;
++ fbi->pcr = pdata->pcr;
++ fbi->lscr1 = pdata->lscr1;
++ fbi->dmacr = pdata->dmacr;
++ fbi->pwmr = pdata->pwmr;
++ fbi->lcd_power = pdata->lcd_power;
++ fbi->backlight_power = pdata->backlight_power;
+ info->fix.smem_len = fbi->max_xres * fbi->max_yres *
+ fbi->max_bpp / 8;
+
+ return 0;
+ }
+
+-/*
+- * Allocates the DRAM memory for the frame buffer. This buffer is
+- * remapped into a non-cached, non-buffered, memory region to
+- * allow pixel writes to occur without flushing the cache.
+- * Once this area is remapped, all virtual memory access to the
+- * video memory should occur at the new region.
+- */
+-static int __init imxfb_map_video_memory(struct fb_info *info)
+-{
+- struct imxfb_info *fbi = info->par;
+-
+- fbi->map_size = PAGE_ALIGN(info->fix.smem_len);
+- fbi->map_cpu = dma_alloc_writecombine(fbi->dev, fbi->map_size,
+- &fbi->map_dma,GFP_KERNEL);
+-
+- if (fbi->map_cpu) {
+- info->screen_base = fbi->map_cpu;
+- fbi->screen_cpu = fbi->map_cpu;
+- fbi->screen_dma = fbi->map_dma;
+- info->fix.smem_start = fbi->screen_dma;
+- }
+-
+- return fbi->map_cpu ? 0 : -ENOMEM;
+-}
+-
+ static int __init imxfb_probe(struct platform_device *pdev)
+ {
+ struct imxfb_info *fbi;
+ struct fb_info *info;
+- struct imxfb_mach_info *inf;
++ struct imx_fb_platform_data *pdata;
+ struct resource *res;
+ int ret;
+
+ printk("i.MX Framebuffer driver\n");
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+- if(!res)
++ if (!res)
+ return -ENODEV;
+
+- inf = pdev->dev.platform_data;
+- if(!inf) {
++ pdata = pdev->dev.platform_data;
++ if (!pdata) {
+ dev_err(&pdev->dev,"No platform_data available\n");
+ return -ENOMEM;
+ }
+
+ info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
+- if(!info)
++ if (!info)
+ return -ENOMEM;
+
+ fbi = info->par;
+
+ platform_set_drvdata(pdev, info);
+
+- ret = imxfb_init_fbinfo(&pdev->dev);
+- if( ret < 0 )
++ ret = imxfb_init_fbinfo(pdev);
++ if (ret < 0)
+ goto failed_init;
+
+- res = request_mem_region(res->start, res->end - res->start + 1, "IMXFB");
++ fbi->pdev = pdev;
++
++ res = request_mem_region(res->start, resource_size(res),
++ DRIVER_NAME);
+ if (!res) {
+ ret = -EBUSY;
+- goto failed_regs;
++ goto failed_req;
++ }
++
++ fbi->regs = ioremap(res->start, resource_size(res));
++ if (fbi->regs == NULL) {
++ printk(KERN_ERR"Cannot map frame buffer registers\n");
++ goto failed_ioremap;
+ }
+
+- if (!inf->fixed_screen_cpu) {
+- ret = imxfb_map_video_memory(info);
+- if (ret) {
+- dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
++ fbi->clk = clk_get(&pdev->dev, "lcdc_clk");
++ if (IS_ERR(fbi->clk)) {
++ ret = PTR_ERR(fbi->clk);
++ dev_err(&pdev->dev,
++ "Cannot get the clock for IMX LCD unit %d: %d\n",
++ pdev->id, ret);
++ goto failed_getclock;
++ }
++
++ if (!pdata->fixed_screen_cpu) {
++ fbi->map_size = PAGE_ALIGN(info->fix.smem_len);
++ fbi->map_cpu = dma_alloc_writecombine(&pdev->dev,
++ fbi->map_size, &fbi->map_dma, GFP_KERNEL);
++
++ if (!fbi->map_cpu) {
++ dev_err(&pdev->dev, "Failed to allocate %u byte for video RAM\n",
++ fbi->map_size);
+ ret = -ENOMEM;
+ goto failed_map;
+ }
++
++ info->screen_base = fbi->map_cpu;
++ fbi->screen_cpu = fbi->map_cpu;
++ fbi->screen_dma = fbi->map_dma;
++ info->fix.smem_start = fbi->screen_dma;
+ } else {
+ /* Fixed framebuffer mapping enables location of the screen in eSRAM */
+- fbi->map_cpu = inf->fixed_screen_cpu;
+- fbi->map_dma = inf->fixed_screen_dma;
++ fbi->map_cpu = pdata->fixed_screen_cpu;
++ fbi->map_dma = pdata->fixed_screen_dma;
+ info->screen_base = fbi->map_cpu;
+ fbi->screen_cpu = fbi->map_cpu;
+ fbi->screen_dma = fbi->map_dma;
+@@ -588,17 +710,26 @@ static int __init imxfb_probe(struct pla
+ * This makes sure that our colour bitfield
+ * descriptors are correctly initialised.
+ */
+- imxfb_check_var(&info->var, info);
++ imxfb_setup_display(fbi);
++ ret = imxfb_check_var(&info->var, info);
++ if (ret) {
++ dev_err(&pdev->dev, "failed to get suitable mode\n");
++ goto failed_cmap;
++ }
+
+- ret = fb_alloc_cmap(&info->cmap, 1<<info->var.bits_per_pixel, 0);
+- if (ret < 0)
++ ret = imxfb_set_par(info);
++ if (ret) {
++ dev_err(&pdev->dev, "Failed to set parameters\n");
+ goto failed_cmap;
++ }
+
+- imxfb_setup_gpio(fbi);
++ ret = fb_alloc_cmap(&info->cmap, 1 << info->var.bits_per_pixel, 0);
++ if (ret < 0)
++ goto failed_cmap;
+
+ imxfb_set_par(info);
+ ret = register_framebuffer(info);
+- if (ret < 0) {
++ if (ret) {
+ dev_err(&pdev->dev, "failed to register framebuffer\n");
+ goto failed_register;
+ }
+@@ -610,20 +741,24 @@ static int __init imxfb_probe(struct pla
+ failed_register:
+ fb_dealloc_cmap(&info->cmap);
+ failed_cmap:
+- if (!inf->fixed_screen_cpu)
++ if (!pdata->fixed_screen_cpu)
+ dma_free_writecombine(&pdev->dev,fbi->map_size,fbi->map_cpu,
+- fbi->map_dma);
++ fbi->map_dma);
+ failed_map:
+- kfree(info->pseudo_palette);
+-failed_regs:
++ clk_put(fbi->clk);
++failed_getclock:
++ iounmap(fbi->regs);
++failed_ioremap:
+ release_mem_region(res->start, res->end - res->start);
++failed_req:
++ kfree(info->pseudo_palette);
+ failed_init:
+ platform_set_drvdata(pdev, NULL);
+ framebuffer_release(info);
+ return ret;
+ }
+
+-static int imxfb_remove(struct platform_device *pdev)
++static int __devexit imxfb_remove(struct platform_device *pdev)
+ {
+ struct fb_info *info = platform_get_drvdata(pdev);
+ struct imxfb_info *fbi = info->par;
+@@ -639,7 +774,12 @@ static int imxfb_remove(struct platform_
+ kfree(info->pseudo_palette);
+ framebuffer_release(info);
+
++ iounmap(fbi->regs);
+ release_mem_region(res->start, res->end - res->start + 1);
++
++ clk_disable(fbi->clk);
++ clk_put(fbi->clk);
++
+ platform_set_drvdata(pdev, NULL);
+
+ return 0;
+@@ -653,19 +793,18 @@ void imxfb_shutdown(struct platform_dev
+ }
+
+ static struct platform_driver imxfb_driver = {
+- .probe = imxfb_probe,
+ .suspend = imxfb_suspend,
+ .resume = imxfb_resume,
+- .remove = imxfb_remove,
++ .remove = __devexit_p(imxfb_remove),
+ .shutdown = imxfb_shutdown,
+ .driver = {
+- .name = "imx-fb",
++ .name = DRIVER_NAME,
+ },
+ };
+
+ int __init imxfb_init(void)
+ {
+- return platform_driver_register(&imxfb_driver);
++ return platform_driver_probe(&imxfb_driver, imxfb_probe);
+ }
+
+ static void __exit imxfb_cleanup(void)
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/video/imxfb.h linux-2.6.28-karo/drivers/video/imxfb.h
+--- linux-2.6.28/drivers/video/imxfb.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/video/imxfb.h 1970-01-01 01:00:00.000000000 +0100
+@@ -1,73 +0,0 @@
+-/*
+- * linux/drivers/video/imxfb.h
+- *
+- * Freescale i.MX Frame Buffer device driver
+- *
+- * Copyright (C) 2004 S.Hauer, Pengutronix
+- *
+- * Copyright (C) 1999 Eric A. Thomas
+- * Based on acornfb.c Copyright (C) Russell King.
+- *
+- * 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.
+- */
+-
+-/*
+- * These are the bitfields for each
+- * display depth that we support.
+- */
+-struct imxfb_rgb {
+- struct fb_bitfield red;
+- struct fb_bitfield green;
+- struct fb_bitfield blue;
+- struct fb_bitfield transp;
+-};
+-
+-#define RGB_16 (0)
+-#define RGB_8 (1)
+-#define NR_RGB 2
+-
+-struct imxfb_info {
+- struct device *dev;
+- struct imxfb_rgb *rgb[NR_RGB];
+-
+- u_int max_bpp;
+- u_int max_xres;
+- u_int max_yres;
+-
+- /*
+- * These are the addresses we mapped
+- * the framebuffer memory region to.
+- */
+- dma_addr_t map_dma;
+- u_char * map_cpu;
+- u_int map_size;
+-
+- u_char * screen_cpu;
+- dma_addr_t screen_dma;
+- u_int palette_size;
+-
+- dma_addr_t dbar1;
+- dma_addr_t dbar2;
+-
+- u_int pcr;
+- u_int pwmr;
+- u_int lscr1;
+- u_int dmacr;
+- u_int cmap_inverse:1,
+- cmap_static:1,
+- unused:30;
+-
+- void (*lcd_power)(int);
+- void (*backlight_power)(int);
+-};
+-
+-#define IMX_NAME "IMX"
+-
+-/*
+- * Minimum X and Y resolutions
+- */
+-#define MIN_XRES 64
+-#define MIN_YRES 64
+-
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/w1/masters/Kconfig linux-2.6.28-karo/drivers/w1/masters/Kconfig
+--- linux-2.6.28/drivers/w1/masters/Kconfig 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/w1/masters/Kconfig 2009-03-11 13:16:24.000000000 +0100
+@@ -34,6 +34,12 @@ config W1_MASTER_DS2482
+ This driver can also be built as a module. If so, the module
+ will be called ds2482.
+
++config W1_MASTER_MXC
++ tristate "Freescale MXC 1-wire busmaster"
++ depends on W1 && ARCH_MXC
++ help
++ Say Y here to enable MXC 1-wire host
++
+ config W1_MASTER_DS1WM
+ tristate "Maxim DS1WM 1-wire busmaster"
+ depends on W1 && ARM && HAVE_CLK
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/w1/masters/Makefile linux-2.6.28-karo/drivers/w1/masters/Makefile
+--- linux-2.6.28/drivers/w1/masters/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/drivers/w1/masters/Makefile 2009-03-11 13:16:24.000000000 +0100
+@@ -5,6 +5,8 @@
+ obj-$(CONFIG_W1_MASTER_MATROX) += matrox_w1.o
+ obj-$(CONFIG_W1_MASTER_DS2490) += ds2490.o
+ obj-$(CONFIG_W1_MASTER_DS2482) += ds2482.o
++obj-$(CONFIG_W1_MASTER_MXC) += mxc_w1.o
++
+ obj-$(CONFIG_W1_MASTER_DS1WM) += ds1wm.o
+ obj-$(CONFIG_W1_MASTER_GPIO) += w1-gpio.o
+ obj-$(CONFIG_HDQ_MASTER_OMAP) += omap_hdq.o
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/drivers/w1/masters/mxc_w1.c linux-2.6.28-karo/drivers/w1/masters/mxc_w1.c
+--- linux-2.6.28/drivers/w1/masters/mxc_w1.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/drivers/w1/masters/mxc_w1.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,211 @@
++/*
++ * Copyright 2005-2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ * Copyright 2008 Luotao Fu, kernel@pengutronix.de
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/interrupt.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/delay.h>
++#include <linux/io.h>
++
++#include "../w1.h"
++#include "../w1_int.h"
++#include "../w1_log.h"
++
++/* According to the mx27 Datasheet the reset procedure should take up to about
++ * 1350us. We set the timeout to 500*100us = 50ms for sure */
++#define MXC_W1_RESET_TIMEOUT 500
++
++/*
++ * MXC W1 Register offsets
++ */
++#define MXC_W1_CONTROL 0x00
++#define MXC_W1_TIME_DIVIDER 0x02
++#define MXC_W1_RESET 0x04
++#define MXC_W1_COMMAND 0x06
++#define MXC_W1_TXRX 0x08
++#define MXC_W1_INTERRUPT 0x0A
++#define MXC_W1_INTERRUPT_EN 0x0C
++
++struct mxc_w1_device {
++ void __iomem *regs;
++ unsigned int clkdiv;
++ struct clk *clk;
++ struct w1_bus_master bus_master;
++};
++
++/*
++ * this is the low level routine to
++ * reset the device on the One Wire interface
++ * on the hardware
++ */
++static u8 mxc_w1_ds2_reset_bus(void *data)
++{
++ u8 reg_val;
++ unsigned int timeout_cnt = 0;
++ struct mxc_w1_device *dev = data;
++
++ __raw_writeb(0x80, (dev->regs + MXC_W1_CONTROL));
++
++ while (1) {
++ reg_val = __raw_readb(dev->regs + MXC_W1_CONTROL);
++
++ if (((reg_val >> 7) & 0x1) == 0 ||
++ timeout_cnt > MXC_W1_RESET_TIMEOUT)
++ break;
++ else
++ timeout_cnt++;
++
++ udelay(100);
++ }
++ return (reg_val >> 7) & 0x1;
++}
++
++/*
++ * this is the low level routine to read/write a bit on the One Wire
++ * interface on the hardware. It does write 0 if parameter bit is set
++ * to 0, otherwise a write 1/read.
++ */
++static u8 mxc_w1_ds2_touch_bit(void *data, u8 bit)
++{
++ struct mxc_w1_device *mdev = data;
++ void __iomem *ctrl_addr = mdev->regs + MXC_W1_CONTROL;
++ unsigned int timeout_cnt = 400; /* Takes max. 120us according to
++ * datasheet.
++ */
++
++ __raw_writeb((1 << (5 - bit)), ctrl_addr);
++
++ while (timeout_cnt--) {
++ if (!((__raw_readb(ctrl_addr) >> (5 - bit)) & 0x1))
++ break;
++
++ udelay(1);
++ }
++
++ return ((__raw_readb(ctrl_addr)) >> 3) & 0x1;
++}
++
++static int __init mxc_w1_probe(struct platform_device *pdev)
++{
++ struct mxc_w1_device *mdev;
++ struct resource *res;
++ int err = 0;
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res)
++ return -ENODEV;
++
++ mdev = kzalloc(sizeof(struct mxc_w1_device), GFP_KERNEL);
++ if (!mdev)
++ return -ENOMEM;
++
++ mdev->clk = clk_get(&pdev->dev, "owire_clk");
++ if (!mdev->clk) {
++ err = -ENODEV;
++ goto failed_clk;
++ }
++
++ mdev->clkdiv = (clk_get_rate(mdev->clk) / 1000000) - 1;
++
++ res = request_mem_region(res->start, resource_size(res),
++ "mxc_w1");
++ if (!res) {
++ err = -EBUSY;
++ goto failed_req;
++ }
++
++ mdev->regs = ioremap(res->start, resource_size(res));
++ if (!mdev->regs) {
++ printk(KERN_ERR "Cannot map frame buffer registers\n");
++ goto failed_ioremap;
++ }
++
++ clk_enable(mdev->clk);
++ __raw_writeb(mdev->clkdiv, mdev->regs + MXC_W1_TIME_DIVIDER);
++
++ mdev->bus_master.data = mdev;
++ mdev->bus_master.reset_bus = mxc_w1_ds2_reset_bus;
++ mdev->bus_master.touch_bit = mxc_w1_ds2_touch_bit;
++
++ err = w1_add_master_device(&mdev->bus_master);
++
++ if (err)
++ goto failed_add;
++
++ platform_set_drvdata(pdev, mdev);
++ return 0;
++
++failed_add:
++ iounmap(mdev->regs);
++failed_ioremap:
++ release_mem_region(res->start, resource_size(res));
++failed_req:
++ clk_put(mdev->clk);
++failed_clk:
++ kfree(mdev);
++ return err;
++}
++
++/*
++ * disassociate the w1 device from the driver
++ */
++static int mxc_w1_remove(struct platform_device *pdev)
++{
++ struct mxc_w1_device *mdev = platform_get_drvdata(pdev);
++ struct resource *res;
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++
++ w1_remove_master_device(&mdev->bus_master);
++
++ iounmap(mdev->regs);
++ release_mem_region(res->start, resource_size(res));
++ clk_disable(mdev->clk);
++ clk_put(mdev->clk);
++
++ platform_set_drvdata(pdev, NULL);
++
++ return 0;
++}
++
++static struct platform_driver mxc_w1_driver = {
++ .driver = {
++ .name = "mxc_w1",
++ },
++ .probe = mxc_w1_probe,
++ .remove = mxc_w1_remove,
++};
++
++static int __init mxc_w1_init(void)
++{
++ return platform_driver_register(&mxc_w1_driver);
++}
++
++static void mxc_w1_exit(void)
++{
++ platform_driver_unregister(&mxc_w1_driver);
++}
++
++module_init(mxc_w1_init);
++module_exit(mxc_w1_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Freescale Semiconductors Inc");
++MODULE_DESCRIPTION("Driver for One-Wire on MXC");
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/include/linux/dmaengine.h linux-2.6.28-karo/include/linux/dmaengine.h
+--- linux-2.6.28/include/linux/dmaengine.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/include/linux/dmaengine.h 2009-03-11 13:16:24.000000000 +0100
+@@ -285,6 +285,7 @@ struct dma_async_tx_descriptor {
+ struct list_head tx_list;
+ struct dma_chan *chan;
+ dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
++ void (*tx_free)(struct dma_async_tx_descriptor *tx);
+ dma_async_tx_callback callback;
+ void *callback_param;
+ struct dma_async_tx_descriptor *next;
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/include/linux/fec_enet.h linux-2.6.28-karo/include/linux/fec_enet.h
+--- linux-2.6.28/include/linux/fec_enet.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/include/linux/fec_enet.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,26 @@
++/*
++ * Copyright (C) 2007 Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ * platform_data definitions for fec_enet device
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the:
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
++ */
++
++struct fec_enet_platform_data {
++ /* callback for platform specific initialization */
++ int (*arch_init)(struct platform_device *dev);
++ void (*arch_exit)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++};
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/include/linux/mtd/mtd.h linux-2.6.28-karo/include/linux/mtd/mtd.h
+--- linux-2.6.28/include/linux/mtd/mtd.h 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/include/linux/mtd/mtd.h 2009-03-11 13:16:24.000000000 +0100
+@@ -268,13 +268,13 @@ static inline void mtd_erase_callback(st
+ #define MTD_DEBUG_LEVEL3 (3) /* Noisy */
+
+ #ifdef CONFIG_MTD_DEBUG
+-#define DEBUG(n, args...) \
++#define MTD_DEBUG(n, args...) \
+ do { \
+ if (n <= CONFIG_MTD_DEBUG_VERBOSE) \
+ printk(KERN_INFO args); \
+ } while(0)
+ #else /* CONFIG_MTD_DEBUG */
+-#define DEBUG(n, args...) \
++#define MTD_DEBUG(n, args...) \
+ do { \
+ if (0) \
+ printk(KERN_INFO args); \
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/include/linux/rtc/ds13xx.h linux-2.6.28-karo/include/linux/rtc/ds13xx.h
+--- linux-2.6.28/include/linux/rtc/ds13xx.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/include/linux/rtc/ds13xx.h 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,73 @@
++/*
++ * include/linux/rtc/rtc-ds1339.h
++ *
++ * platform specific definitions for DS1339 RTC driver
++ *
++ *
++ * Copyright (C) 2007 Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ */
++
++enum ds13xx_type {
++ unknown,
++ ds_1307, /* or ds1338, ... */
++ ds_1337,
++ ds_1338,
++ ds_1339,
++ ds_1340,
++ m41t00,
++ // rs5c372 too? different address...
++};
++
++/* DS1307 control reg (0x07) bit definitions */
++#define DS1307_BIT_OUT 0x80
++#define DS1307_BIT_SQWE 0x10
++#define DS1307_BIT_RS1 0x02
++#define DS1307_BIT_RS0 0x01
++/* DS1337/DS1339 control reg (0x0e) bit definitions */
++#define DS133X_BIT_INTCN 0x04
++#define DS133X_BIT_RS1 0x08
++#define DS133X_BIT_RS2 0x10
++#define DS1339_BIT_BBSQI 0x20
++/* DS1339 trickle charge reg (0x10) bit definitions */
++#define DS1339_TRC_ENABLE 0xa0
++#define DS1339_TRC_250R 0x01
++#define DS1339_TRC_2K 0x02
++#define DS1339_TRC_4K 0x03
++#define DS1339_DIODE_DISABLE 0x04
++#define DS1339_DIODE_ENABLE 0x08
++/* DS1340 trickle charge reg (0x08) bit definitions */
++#define DS1340_TRC_ENABLE 0xa0
++#define DS1340_TRC_250R 0x01
++#define DS1340_TRC_2K 0x02
++#define DS1340_TRC_4K 0x03
++#define DS1340_DIODE_DISABLE 0x04
++#define DS1340_DIODE_ENABLE 0x08
++/* DS1340 control reg (0x09) bit definitions */
++#define DS1340_BIT_OUT 0x80
++#define DS1340_BIT_FT 0x0
++#define DS1340_CAL_SIGN 0x0
++#define DS1340_CAL_MASK 0x1f
++#define DS1340_CAL(v) ((v) & (DS1340_CAL_MASK))
++
++struct ds13xx_platform_data {
++ /* type of DS13XX chip */
++ enum ds13xx_type type;
++ /* value for Control register on DS13xx; < 0 means don't care */
++ short ctrl;
++ /* value for Trickle charge register on DS1339; < 0 means don't care */
++ short trc;
++};
++
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/kernel/printk.c linux-2.6.28-karo/kernel/printk.c
+--- linux-2.6.28/kernel/printk.c 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28-karo/kernel/printk.c 2009-03-11 13:16:24.000000000 +0100
+@@ -622,6 +622,9 @@ static int recursion_bug;
+ static int new_text_line = 1;
+ static char printk_buf[1024];
+
++#ifdef CONFIG_DEBUG_LL
++extern void asmlinkage printascii(const char *);
++#endif
+ asmlinkage int vprintk(const char *fmt, va_list args)
+ {
+ int printed_len = 0;
+@@ -669,6 +672,9 @@ asmlinkage int vprintk(const char *fmt,
+ sizeof(printk_buf) - printed_len, fmt, args);
+
+
++#ifdef CONFIG_DEBUG_LL
++ printascii(printk_buf);
++#endif
+ /*
+ * Copy the output into log_buf. If the caller didn't provide
+ * appropriate log level tags, we insert them here
+diff -purN -X linux-2.6.28/Documentation/dontdiff linux-2.6.28/sound/arm/soc-wrapper.c linux-2.6.28-karo/sound/arm/soc-wrapper.c
+--- linux-2.6.28/sound/arm/soc-wrapper.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.28-karo/sound/arm/soc-wrapper.c 2009-03-11 13:16:24.000000000 +0100
+@@ -0,0 +1,222 @@
++
++#define SOC_SHIFT_LEFT 8
++#define SOC_SHIFT_RIGHT 13
++#define SOC_SHIFT_MAX 18
++#define SOC_SHIFT_INVERT 26
++
++#define SOC_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put) \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
++ .info = snd_soc_info_enum_ext, \
++ .get = xhandler_get, .put = xhandler_put, \
++ .private_value = (unsigned long)&xenum }
++
++#define SOC_ENUM_SINGLE_EXT(xmask, xtexts) \
++{ .mask = xmask, .texts = xtexts }
++
++#define SOC_ENUM(xname, xenum) \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\
++ .info = snd_soc_info_enum_double, \
++ .get = snd_soc_get_enum_double, .put = snd_soc_put_enum_double, \
++ .private_value = (unsigned long)&xenum }
++
++#define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \
++{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
++ .mask = xmask, .texts = xtexts }
++#define SOC_ENUM_SINGLE(xreg, xshift, xmask, xtexts) \
++ SOC_ENUM_DOUBLE(xreg, xshift, xshift, xmask, xtexts)
++
++#define SOC_SINGLE_VALUE(reg, shift, max, invert) ((reg) | ((shift) << SOC_SHIFT_LEFT) |\
++ ((shift) << SOC_SHIFT_RIGHT) | ((max) << SOC_SHIFT_MAX) | ((invert) << SOC_SHIFT_INVERT))
++
++#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
++ .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \
++ .put = snd_soc_put_volsw, \
++ .private_value = (reg) | ((shift_left) << SOC_SHIFT_LEFT) | \
++ ((shift_right) << SOC_SHIFT_RIGHT) | ((max) << SOC_SHIFT_MAX) | ((invert) << SOC_SHIFT_INVERT) }
++
++#define SOC_SINGLE_EXT(xname, xreg, xshift, xmask, xinvert,\
++ xhandler_get, xhandler_put) \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
++ .info = snd_soc_info_volsw, \
++ .get = xhandler_get, .put = xhandler_put, \
++ .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmask, xinvert) }
++
++#define SOC_SINGLE(xname, reg, shift, max, invert) \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
++ .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
++ .put = snd_soc_put_volsw, \
++ .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
++
++struct soc_enum {
++ unsigned short reg;
++ unsigned short reg2;
++ unsigned char shift_l;
++ unsigned char shift_r;
++ unsigned int mask;
++ const char **texts;
++ void *dapm;
++};
++
++static unsigned int snd_soc_read(int reg);
++static void snd_soc_write(int reg, int val);
++
++static int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
++
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
++ uinfo->count = 1;
++ uinfo->value.enumerated.items = e->mask;
++
++ if (uinfo->value.enumerated.item > e->mask - 1)
++ uinfo->value.enumerated.item = e->mask - 1;
++ strcpy(uinfo->value.enumerated.name,
++ e->texts[uinfo->value.enumerated.item]);
++ return 0;
++}
++
++static int snd_soc_info_volsw(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ int max = (kcontrol->private_value >> SOC_SHIFT_MAX) & 0xff;
++ int shift = (kcontrol->private_value >> SOC_SHIFT_LEFT) & 0x1f;
++ int rshift = (kcontrol->private_value >> SOC_SHIFT_RIGHT) & 0x1f;
++
++ if (max == 1)
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
++ else
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
++
++ uinfo->count = shift == rshift ? 1 : 2;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = max;
++ return 0;
++}
++
++static int snd_soc_get_volsw(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ int reg = kcontrol->private_value & 0xff;
++ int shift = (kcontrol->private_value >> SOC_SHIFT_LEFT) & 0x1f;
++ int rshift = (kcontrol->private_value >> SOC_SHIFT_RIGHT) & 0x1f;
++ int max = (kcontrol->private_value >> SOC_SHIFT_MAX) & 0xff;
++ int mask = (1 << fls(max)) - 1;
++ int invert = (kcontrol->private_value >> SOC_SHIFT_INVERT) & 0x01;
++
++ ucontrol->value.integer.value[0] =
++ (snd_soc_read(reg) >> shift) & mask;
++ if (shift != rshift)
++ ucontrol->value.integer.value[1] =
++ (snd_soc_read(reg) >> rshift) & mask;
++ if (invert) {
++ ucontrol->value.integer.value[0] =
++ max - ucontrol->value.integer.value[0];
++ if (shift != rshift)
++ ucontrol->value.integer.value[1] =
++ max - ucontrol->value.integer.value[1];
++ }
++
++ return 0;
++}
++
++static int snd_soc_update_bits(unsigned short reg,
++ unsigned int mask, unsigned int value)
++{
++ int change;
++ unsigned int old, new;
++
++// mutex_lock(&io_mutex);
++ old = snd_soc_read(reg);
++ new = (old & ~mask) | value;
++ change = old != new;
++ if (change)
++ snd_soc_write(reg, new);
++
++// mutex_unlock(&io_mutex);
++ return change;
++}
++
++static int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ int reg = kcontrol->private_value & 0xff;
++ int shift = (kcontrol->private_value >> SOC_SHIFT_LEFT) & 0x1f;
++ int rshift = (kcontrol->private_value >> SOC_SHIFT_RIGHT) & 0x1f;
++ int max = (kcontrol->private_value >> SOC_SHIFT_MAX) & 0xff;
++ int mask = (1 << fls(max)) - 1;
++ int invert = (kcontrol->private_value >> SOC_SHIFT_INVERT) & 0x01;
++ unsigned int val, val2, val_mask;
++
++ val = (ucontrol->value.integer.value[0] & mask);
++ if (invert)
++ val = max - val;
++ val_mask = mask << shift;
++ val = val << shift;
++ if (shift != rshift) {
++ val2 = (ucontrol->value.integer.value[1] & mask);
++ if (invert)
++ val2 = max - val2;
++ val_mask |= mask << rshift;
++ val |= val2 << rshift;
++ }
++ return snd_soc_update_bits(reg, val_mask, val);
++}
++
++static int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
++
++ uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
++ uinfo->count = e->shift_l == e->shift_r ? 1 : 2;
++ uinfo->value.enumerated.items = e->mask;
++
++ if (uinfo->value.enumerated.item > e->mask - 1)
++ uinfo->value.enumerated.item = e->mask - 1;
++ strcpy(uinfo->value.enumerated.name,
++ e->texts[uinfo->value.enumerated.item]);
++ return 0;
++}
++
++static int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
++ unsigned int val, bitmask;
++
++ for (bitmask = 1; bitmask < e->mask; bitmask <<= 1)
++ ;
++ val = snd_soc_read(e->reg);
++ ucontrol->value.enumerated.item[0]
++ = (val >> e->shift_l) & (bitmask - 1);
++ if (e->shift_l != e->shift_r)
++ ucontrol->value.enumerated.item[1] =
++ (val >> e->shift_r) & (bitmask - 1);
++
++ return 0;
++}
++
++static int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
++ unsigned int val;
++ unsigned int mask, bitmask;
++
++ for (bitmask = 1; bitmask < e->mask; bitmask <<= 1)
++ ;
++ if (ucontrol->value.enumerated.item[0] > e->mask - 1)
++ return -EINVAL;
++ val = ucontrol->value.enumerated.item[0] << e->shift_l;
++ mask = (bitmask - 1) << e->shift_l;
++ if (e->shift_l != e->shift_r) {
++ if (ucontrol->value.enumerated.item[1] > e->mask - 1)
++ return -EINVAL;
++ val |= ucontrol->value.enumerated.item[1] << e->shift_r;
++ mask |= (bitmask - 1) << e->shift_r;
++ }
++
++ return snd_soc_update_bits(e->reg, mask, val);
++}
diff --git a/recipes/linux/linux-2.6.29/at2440evb/defconfig b/recipes/linux/linux-2.6.29/at2440evb/defconfig
new file mode 100644
index 0000000000..a94adabd6e
--- /dev/null
+++ b/recipes/linux/linux-2.6.29/at2440evb/defconfig
@@ -0,0 +1,1565 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29
+# Wed Mar 25 17:56:24 2009
+#
+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_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_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
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=m
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=16
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_NET_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_COMPAT_BRK=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+CONFIG_ARCH_S3C2410=y
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+CONFIG_PLAT_S3C24XX=y
+CONFIG_S3C2410_CLOCK=y
+CONFIG_CPU_S3C244X=y
+# CONFIG_S3C24XX_PWM is not set
+CONFIG_S3C24XX_GPIO_EXTRA=0
+CONFIG_S3C2410_DMA=y
+# CONFIG_S3C2410_DMA_DEBUG is not set
+# CONFIG_S3C24XX_ADC is not set
+CONFIG_PLAT_S3C=y
+CONFIG_CPU_LLSERIAL_S3C2440_ONLY=y
+CONFIG_CPU_LLSERIAL_S3C2440=y
+
+#
+# Boot options
+#
+# CONFIG_S3C_BOOT_WATCHDOG is not set
+# CONFIG_S3C_BOOT_ERROR_RESET is not set
+CONFIG_S3C_BOOT_UART_FORCE_FIFO=y
+
+#
+# Power management
+#
+# CONFIG_S3C2410_PM_DEBUG is not set
+# CONFIG_S3C2410_PM_CHECK is not set
+CONFIG_S3C_LOWLEVEL_UART_PORT=0
+CONFIG_S3C_GPIO_SPACE=0
+
+#
+# S3C2400 Machines
+#
+CONFIG_S3C2410_PM=y
+CONFIG_S3C2410_GPIO=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_TCT_HAMMER is not set
+# CONFIG_MACH_VR1000 is not set
+# CONFIG_MACH_QT2410 is not set
+
+#
+# S3C2412 Machines
+#
+# CONFIG_MACH_JIVE is not set
+# 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
+
+#
+# S3C2440 Machines
+#
+# CONFIG_MACH_ANUBIS is not set
+# CONFIG_MACH_OSIRIS is not set
+# CONFIG_MACH_RX3715 is not set
+# CONFIG_ARCH_S3C2440 is not set
+# CONFIG_MACH_NEXCODER_2440 is not set
+CONFIG_MACH_AT2440EVB=y
+
+#
+# S3C2442 Machines
+#
+
+#
+# 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_PABRT_NOIFAR=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 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_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_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=200
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+CONFIG_BINFMT_AOUT=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=m
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+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_XFRM_IPCOMP=m
+# 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=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=y
+CONFIG_IPV6_ROUTER_PREF=y
+# CONFIG_IPV6_ROUTE_INFO 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_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 is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIBTUSB 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=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=m
+# CONFIG_CFG80211_REG_DEBUG is not set
+CONFIG_NL80211=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+# CONFIG_LIB80211 is not set
+CONFIG_MAC80211=m
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_MINSTREL=y
+# CONFIG_MAC80211_RC_DEFAULT_PID is not set
+CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
+CONFIG_MAC80211_RC_DEFAULT="minstrel"
+CONFIG_MAC80211_MESH=y
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUG_MENU is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
+# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
+CONFIG_MTD_CMDLINE_PARTS=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=y
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# 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 is not set
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IMPA7 is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_GPIO 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 is not set
+# 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
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=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_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MISC_DEVICES 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=y
+CONFIG_SCSI_CONSTANTS=y
+# 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_LIBFC is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+CONFIG_DM9000=y
+CONFIG_DM9000_DEBUGLEVEL=4
+# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
+# CONFIG_ENC28J60 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_DNET is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_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
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD 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 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_BCM5974 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_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+CONFIG_SERIAL_NONSTANDARD=y
+# CONFIG_N_HDLC is not set
+# CONFIG_RISCOM8 is not set
+# CONFIG_SPECIALIX is not set
+# CONFIG_RIO is not set
+# CONFIG_STALDRV is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=8
+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 is not set
+# CONFIG_SERIAL_8250_RSA is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_UARTS=3
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
+CONFIG_SERIAL_S3C2440=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_S3C2410=y
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_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
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_S3C24XX=y
+# CONFIG_SPI_S3C24XX_GPIO is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_S3C2410_WATCHDOG=y
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_S3C2410=y
+# CONFIG_FB_S3C2410_DEBUG is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT 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 is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_LOGO is not set
+# 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
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_APPLE=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=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_MON is not set
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more 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_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_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
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+# CONFIG_USB_GADGET is not set
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_USB_GPIO_VBUS is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+CONFIG_MMC_S3C=y
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+CONFIG_LEDS_S3C24XX=m
+# CONFIG_LEDS_PCA9532 is not set
+# CONFIG_LEDS_GPIO is not set
+# CONFIG_LEDS_PCA955X is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+# CONFIG_LEDS_TRIGGER_BACKLIGHT 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
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_S3C=y
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+# CONFIG_DNOTIFY is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+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 is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 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=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 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=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=y
+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=y
+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=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 is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_FRAME_POINTER=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_S3C_UART=0
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_ALGAPI2=m
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER2=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=m
+CONFIG_CRYPTO_RNG2=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER2=m
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_AUTHENC=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=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 is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=m
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+CONFIG_CRYPTO_SHA1=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=m
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+CONFIG_CRC_ITU_T=m
+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_DMA=y
diff --git a/recipes/linux/linux-2.6.29/tqm8540/defconfig b/recipes/linux/linux-2.6.29/tqm8540/defconfig
new file mode 100644
index 0000000000..3021ddcfe0
--- /dev/null
+++ b/recipes/linux/linux-2.6.29/tqm8540/defconfig
@@ -0,0 +1,1258 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-rc2
+# Mon Jan 26 15:36:19 2009
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+# CONFIG_6xx is not set
+CONFIG_PPC_85xx=y
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_E500=y
+# CONFIG_PPC_E500MC is not set
+CONFIG_BOOKE=y
+CONFIG_FSL_BOOKE=y
+CONFIG_FSL_EMB_PERFMON=y
+# CONFIG_PHYS_64BIT is not set
+CONFIG_SPE=y
+CONFIG_PPC_MMU_NOHASH=y
+# CONFIG_PPC_MM_SLICES is not set
+# CONFIG_SMP is not set
+CONFIG_PPC32=y
+CONFIG_WORD_SIZE=32
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
+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_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=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_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_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_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+# CONFIG_KALLSYMS is not set
+# CONFIG_HOTPLUG is not set
+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=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+# CONFIG_FREEZER is not set
+
+#
+# Platform support
+#
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+CONFIG_MPC85xx=y
+# CONFIG_MPC8540_ADS is not set
+# CONFIG_MPC8560_ADS is not set
+# CONFIG_MPC85xx_CDS is not set
+# CONFIG_MPC85xx_MDS is not set
+# CONFIG_MPC8536_DS is not set
+# CONFIG_MPC85xx_DS is not set
+# CONFIG_KSI8560 is not set
+# CONFIG_STX_GP3 is not set
+CONFIG_TQM8540=y
+# CONFIG_TQM8541 is not set
+# CONFIG_TQM8548 is not set
+# CONFIG_TQM8555 is not set
+# CONFIG_TQM8560 is not set
+# CONFIG_SBC8548 is not set
+# CONFIG_SBC8560 is not set
+CONFIG_TQM85xx=y
+# CONFIG_IPIC is not set
+CONFIG_MPIC=y
+# 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_QUICC_ENGINE is not set
+# CONFIG_CPM2 is not set
+# CONFIG_FSL_ULI1575 is not set
+# CONFIG_MPC8xxx_GPIO is not set
+# CONFIG_SIMPLE_GPIO is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+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=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+CONFIG_MATH_EMULATION=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_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_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_PPC_4K_PAGES=y
+# CONFIG_PPC_16K_PAGES is not set
+# CONFIG_PPC_64K_PAGES is not set
+CONFIG_FORCE_MAX_ZONEORDER=11
+# CONFIG_PROC_DEVICETREE is not set
+# CONFIG_CMDLINE_BOOL is not set
+CONFIG_EXTRA_TARGETS=""
+# CONFIG_PM is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_ZONE_DMA=y
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_FSL_SOC=y
+CONFIG_FSL_PCI=y
+CONFIG_PPC_PCI_CHOICE=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 is not set
+# CONFIG_PCI_STUB is not set
+# CONFIG_HAS_RAPIDIO is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_PAGE_OFFSET=0xc0000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_PHYSICAL_START=0x00000000
+CONFIG_PHYSICAL_ALIGN=0x10000000
+CONFIG_TASK_SIZE=0xc0000000
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+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 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=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 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_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+# CONFIG_LIB80211 is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_OF_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 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 is not set
+# 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_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
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+# CONFIG_MTD_QINFO_PROBE is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+CONFIG_OF_DEVICE=y
+CONFIG_OF_I2C=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_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_BLK_DEV_HD 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_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+CONFIG_IDE_TIMINGS=y
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE 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_SFF=y
+
+#
+# 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_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_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 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_IT8172 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=y
+# CONFIG_BLK_DEV_TC86C001 is not set
+CONFIG_BLK_DEV_IDEDMA=y
+
+#
+# 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_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
+# 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_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_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM 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_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+CONFIG_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_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_SMSC9420 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_ATL2 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_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_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+CONFIG_GIANFAR=y
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
+# CONFIG_ATL1E is not set
+# CONFIG_JME is not set
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+CONFIG_CHELSIO_T3_DEPENDS=y
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_ENIC 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_EN is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_BNX2X is not set
+# CONFIG_QLGE is not set
+# CONFIG_SFC is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+# 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_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_DEVKMEM=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=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+
+#
+# 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_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_HVC_UDBG is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+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_DEVPORT=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# PC SMBus host controller drivers
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_ISCH is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
+# CONFIG_I2C_VOODOO3 is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 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
+# CONFIG_SPI is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 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_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 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_LM75=y
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4245 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=y
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_REGULATOR 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
+
+#
+# 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
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+# CONFIG_HID_PID is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+
+#
+# Enable Host or Gadget support to see Inventra options
+#
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_UWB is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_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_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_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=y
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 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=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 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 is not set
+# CONFIG_DLM is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_HAVE_LMB=y
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_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 is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_PRINT_STACK_DEPTH=64
+# CONFIG_IRQSTACKS is not set
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_MANAGER2 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
+# CONFIG_CRYPTO_DEV_TALITOS is not set
+# CONFIG_PPC_CLOCK is not set
+# CONFIG_VIRTUALIZATION is not set
diff --git a/recipes/linux/linux-2.6.30/mpc8315e-rdb/defconfig b/recipes/linux/linux-2.6.30/mpc8315e-rdb/defconfig
new file mode 100644
index 0000000000..84caff7550
--- /dev/null
+++ b/recipes/linux/linux-2.6.30/mpc8315e-rdb/defconfig
@@ -0,0 +1,1766 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.30-rc6
+# Sat Jun 6 23:57:35 2009
+#
+# 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_BOOK3S=y
+CONFIG_PPC_FPU=y
+CONFIG_FSL_EMB_PERFMON=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_ARCH_PHYS_ADDR_T_64BIT is not set
+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_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=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_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_DTC=y
+CONFIG_DEFAULT_UIMAGE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
+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
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=17
+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_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+# CONFIG_STRIP_ASM_SYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+# CONFIG_EPOLL is not set
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+CONFIG_SLUB_DEBUG=y
+CONFIG_COMPAT_BRK=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_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_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+# CONFIG_SLOW_WORK is not set
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# 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"
+# CONFIG_FREEZER is not set
+CONFIG_PPC_MSI_BITMAP=y
+
+#
+# Platform support
+#
+# CONFIG_PPC_CHRP is not set
+# CONFIG_MPC5121_ADS is not set
+# CONFIG_MPC5121_GENERIC is not set
+# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_PMAC is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PPC_82xx is not set
+# CONFIG_PQ2ADS is not set
+CONFIG_PPC_83xx=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_MPC836x_RDK is not set
+# CONFIG_MPC837x_MDS is not set
+# CONFIG_MPC837x_RDB is not set
+# CONFIG_SBC834x is not set
+# CONFIG_ASP834x is not set
+CONFIG_PPC_MPC831x=y
+# CONFIG_PPC_86xx is not set
+# CONFIG_EMBEDDED6xx is not set
+# CONFIG_AMIGAONE is not set
+CONFIG_PPC_OF_BOOT_TRAMPOLINE=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_TAU is not set
+# CONFIG_QUICC_ENGINE is not set
+# CONFIG_FSL_ULI1575 is not set
+# CONFIG_MPC8xxx_GPIO is not set
+# CONFIG_SIMPLE_GPIO is not set
+# CONFIG_MCU_MPC8349EMITX 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=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_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_CRASH_DUMP 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_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+CONFIG_PPC_4K_PAGES=y
+# CONFIG_PPC_16K_PAGES is not set
+# CONFIG_PPC_64K_PAGES is not set
+# CONFIG_PPC_256K_PAGES is not set
+CONFIG_FORCE_MAX_ZONEORDER=11
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+CONFIG_EXTRA_TARGETS=""
+# CONFIG_PM is not set
+CONFIG_SECCOMP=y
+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_FSL_PCI=y
+CONFIG_PPC_PCI_CHOICE=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
+# CONFIG_PCIEASPM is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+CONFIG_PCI_MSI=y
+# CONFIG_PCI_LEGACY is not set
+CONFIG_PCI_DEBUG=y
+# CONFIG_PCI_STUB is not set
+# CONFIG_PCI_IOV is not set
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+# CONFIG_HAS_RAPIDIO is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_PAGE_OFFSET=0xc0000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_PHYSICAL_START=0x00000000
+CONFIG_TASK_SIZE=0xc0000000
+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 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=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 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_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_LIB80211 is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# 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=1
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_OF_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 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 is not set
+CONFIG_MTD_PHYSMAP_OF=y
+# 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=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_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=y
+# CONFIG_MTD_NAND_FSL_UPM is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+CONFIG_MTD_UBI=m
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+# CONFIG_MTD_UBI_GLUEBI is not set
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_DEBUG is not set
+CONFIG_OF_DEVICE=y
+CONFIG_OF_I2C=y
+CONFIG_OF_SPI=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=32768
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_ISL29003 is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=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=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_CXGB3_ISCSI 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_MPT2SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_LIBFC is not set
+# CONFIG_LIBFCOE is not set
+# CONFIG_FCOE 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_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
+CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_SATA_PMP=y
+# CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SIL24 is not set
+CONFIG_SATA_FSL=y
+CONFIG_ATA_SFF=y
+# 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_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_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_PATA_SCH is not set
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_AUTODETECT=y
+CONFIG_MD_LINEAR=y
+CONFIG_MD_RAID0=y
+CONFIG_MD_RAID1=y
+# CONFIG_MD_RAID10 is not set
+# CONFIG_MD_RAID456 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
+# CONFIG_BLK_DEV_DM is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
+# 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_COMPAT_NET_DEV_OPS=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_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_ETHOC is not set
+# CONFIG_DNET 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_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+CONFIG_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_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_SMSC9420 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_ATL2 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_IP1000 is not set
+# CONFIG_IGB is not set
+# CONFIG_IGBVF is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+CONFIG_FSL_PQ_MDIO=y
+CONFIG_GIANFAR=y
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
+# CONFIG_ATL1E is not set
+# CONFIG_ATL1C is not set
+# CONFIG_JME is not set
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+CONFIG_CHELSIO_T3_DEPENDS=y
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_ENIC is not set
+# CONFIG_IXGBE is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+# CONFIG_VXGE is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
+# CONFIG_MLX4_EN is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_BNX2X is not set
+# CONFIG_QLGE is not set
+# CONFIG_SFC is not set
+# CONFIG_BE2NET is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# 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 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_DEVKMEM=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=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+# 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_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_ALTPCIESGDMA=m
+# CONFIG_HVC_UDBG is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
+# 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=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# PC SMBus host controller drivers
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_ISCH is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
+# CONFIG_I2C_VOODOO3 is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_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=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_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 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_G760A is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
+# CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
+# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_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_SENSORS_LIS3_SPI is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_ALIM7101_WDT is not set
+# CONFIG_8xxx_WDT is not set
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_REGULATOR 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_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# 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
+# CONFIG_HID_PID is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+
+#
+# Special HID drivers
+#
+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
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_EHCI_FSL=y
+CONFIG_USB_EHCI_HCD_PPC_OF=y
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_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
+# CONFIG_USB_WHCI_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
+#
+
+#
+# also be needed; see USB_STORAGE Help for more info
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_NET2280=y
+# CONFIG_USB_GADGET_GOKU 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=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_USB_G_PRINTER is not set
+# CONFIG_USB_CDC_COMPOSITE is not set
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_NOP_USB_XCEIV is not set
+# CONFIG_UWB is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_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
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_RTC_DRV_GENERIC is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_XFS_FS=y
+# 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_BTRFS_FS=y
+# CONFIG_BTRFS_FS_POSIX_ACL 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
+
+#
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_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_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_UBIFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_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_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=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 is not set
+# CONFIG_DLM is not set
+# CONFIG_BINARY_PRINTF is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_HAVE_LMB=y
+CONFIG_NLATTR=y
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_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_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_DETECT_HUNG_TASK=y
+# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+# CONFIG_DEBUG_PAGEALLOC is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_TRACING_SUPPORT=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_PRINT_STACK_DEPTH=64
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_CODE_PATCHING_SELFTEST is not set
+# CONFIG_FTR_FIXUP_SELFTEST is not set
+# CONFIG_MSI_BITMAP_SELFTEST is not set
+# CONFIG_XMON is not set
+# CONFIG_IRQSTACKS is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_BOOTX_TEXT is not set
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_PCBC=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=y
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
+# CONFIG_CRYPTO_DEV_TALITOS is not set
+# CONFIG_PPC_CLOCK is not set
+# CONFIG_VIRTUALIZATION is not set
diff --git a/recipes/linux/linux-2.6.30/mpc8315e-rdb/mpc8315erdb-add-msi-to-dts.patch b/recipes/linux/linux-2.6.30/mpc8315e-rdb/mpc8315erdb-add-msi-to-dts.patch
new file mode 100644
index 0000000000..149ad3c1c5
--- /dev/null
+++ b/recipes/linux/linux-2.6.30/mpc8315e-rdb/mpc8315erdb-add-msi-to-dts.patch
@@ -0,0 +1,29 @@
+Signed-off-by: Leon Woestenberg <leon@sidebranch.com>
+Tested-by: Leon Woestenberg <leon@sidebranch.com>
+
+diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts
+index 3f4c5fb..4f04667 100644
+--- a/arch/powerpc/boot/dts/mpc8315erdb.dts
++++ b/arch/powerpc/boot/dts/mpc8315erdb.dts
+@@ -322,6 +322,21 @@
+ reg = <0x700 0x100>;
+ device_type = "ipic";
+ };
++
++ ipic-msi@7c0 {
++ compatible = "fsl,ipic-msi";
++ reg = <0x7c0 0x40>;
++ msi-available-ranges = <0 0x100>;
++ interrupts = < 0x43 0x8
++ 0x4 0x8
++ 0x51 0x8
++ 0x52 0x8
++ 0x56 0x8
++ 0x57 0x8
++ 0x58 0x8
++ 0x59 0x8 >;
++ interrupt-parent = < &ipic >;
++ };
+ };
+
+ pci0: pci@e0008500 {
diff --git a/recipes/linux/linux-2.6.30/mx27ads/defconfig b/recipes/linux/linux-2.6.30/mx27ads/defconfig
new file mode 100644
index 0000000000..600655a683
--- /dev/null
+++ b/recipes/linux/linux-2.6.30/mx27ads/defconfig
@@ -0,0 +1,1105 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.30
+# Tue Jun 16 08:56:53 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=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
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+# CONFIG_STRIP_ASM_SYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_COMPAT_BRK=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=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_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+CONFIG_ARCH_MXC=y
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+
+#
+# Freescale MXC Implementations
+#
+# CONFIG_ARCH_MX1 is not set
+CONFIG_ARCH_MX2=y
+# CONFIG_ARCH_MX3 is not set
+# CONFIG_MACH_MX21 is not set
+CONFIG_MACH_MX27=y
+
+#
+# MX2 platforms:
+#
+CONFIG_MACH_MX27ADS=y
+# CONFIG_MACH_PCM038 is not set
+CONFIG_MXC_IRQ_PRIOR=y
+CONFIG_MXC_PWM=y
+
+#
+# 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
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+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
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_IDLE 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=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_DEBUG=y
+# CONFIG_PM_VERBOSE is not set
+CONFIG_CAN_PM_TRACE=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+# 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=y
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# 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 is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+# CONFIG_BLK_DEV is not set
+# CONFIG_MISC_DEVICES 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_COMPAT_NET_DEV_OPS=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+CONFIG_SMSC_PHY=y
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ETHOC is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_DNET is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+CONFIG_FEC=y
+# CONFIG_FEC2 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+# CONFIG_INPUT 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_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_IMX=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_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_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+CONFIG_W1=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2482 is not set
+CONFIG_W1_MASTER_MXC=y
+# CONFIG_W1_MASTER_DS1WM is not set
+# CONFIG_W1_MASTER_GPIO is not set
+
+#
+# 1-wire Slaves
+#
+CONFIG_W1_SLAVE_THERM=y
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2431 is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+# CONFIG_W1_SLAVE_DS2760 is not set
+# CONFIG_W1_SLAVE_BQ27000 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+CONFIG_MFD_WM8350=y
+CONFIG_MFD_WM8350_I2C=y
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L2_COMMON=y
+# CONFIG_VIDEO_ALLOW_V4L1 is not set
+CONFIG_VIDEO_V4L1_COMPAT=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=y
+
+#
+# Multimedia drivers
+#
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=y
+# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
+CONFIG_MEDIA_TUNER_SIMPLE=y
+CONFIG_MEDIA_TUNER_TDA8290=y
+CONFIG_MEDIA_TUNER_TDA9887=y
+CONFIG_MEDIA_TUNER_TEA5761=y
+CONFIG_MEDIA_TUNER_TEA5767=y
+CONFIG_MEDIA_TUNER_MT20XX=y
+CONFIG_MEDIA_TUNER_XC2028=y
+CONFIG_MEDIA_TUNER_XC5000=y
+CONFIG_MEDIA_TUNER_MC44S803=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEOBUF_GEN=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+CONFIG_SOC_CAMERA=y
+CONFIG_SOC_CAMERA_MT9M001=y
+CONFIG_SOC_CAMERA_MT9M111=y
+CONFIG_SOC_CAMERA_MT9T031=y
+CONFIG_SOC_CAMERA_MT9V022=y
+CONFIG_SOC_CAMERA_TW9910=y
+# CONFIG_SOC_CAMERA_PLATFORM is not set
+# CONFIG_SOC_CAMERA_OV772X is not set
+# CONFIG_VIDEO_SH_MOBILE_CEU is not set
+# CONFIG_RADIO_ADAPTERS is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+# CONFIG_FB_CFB_FILLRECT is not set
+# CONFIG_FB_CFB_COPYAREA is not set
+# CONFIG_FB_CFB_IMAGEBLIT is not set
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT 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_IMX is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_LOGO is not set
+# CONFIG_SOUND is not set
+# CONFIG_USB_SUPPORT is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+CONFIG_MMC_MXC=y
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+CONFIG_DMADEVICES=y
+
+#
+# DMA Devices
+#
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+# CONFIG_DNOTIFY is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_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_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_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_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_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 is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_ARM_UNWIND=y
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_BINARY_PRINTF is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
diff --git a/recipes/linux/linux-2.6.30/tx25/defconfig b/recipes/linux/linux-2.6.30/tx25/defconfig
new file mode 100644
index 0000000000..db27e0251f
--- /dev/null
+++ b/recipes/linux/linux-2.6.30/tx25/defconfig
@@ -0,0 +1,1203 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.30-rc4
+# Tue Jun 2 15:46:43 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=17
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+# CONFIG_STRIP_ASM_SYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+# CONFIG_AIO is not set
+# CONFIG_VM_EVENT_COUNTERS is not set
+# CONFIG_COMPAT_BRK is not set
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+CONFIG_ARCH_MXC=y
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+
+#
+# Freescale MXC Implementations
+#
+# CONFIG_ARCH_MX1 is not set
+CONFIG_ARCH_MX2=y
+# CONFIG_ARCH_MX3 is not set
+# CONFIG_MACH_MX21 is not set
+# CONFIG_MACH_MX27 is not set
+CONFIG_MACH_MX25=y
+
+#
+# MX2 platforms:
+#
+CONFIG_MACH_TX25=y
+# CONFIG_KARO_DEBUG is not set
+CONFIG_MACH_STK5_BASEBOARD=y
+# CONFIG_MXC_IRQ_PRIOR is not set
+# CONFIG_MXC_PWM is not set
+CONFIG_ARCH_MXC_IOMUX_V3=y
+
+#
+# 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
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE="init=/linuxrc root=1f01 rootfstype=jffs2 ro console=ttymxc0,115200 panic=1"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_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_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+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_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+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 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 is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+CONFIG_MTD_DEBUG=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_TESTS=m
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-5
+# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
+CONFIG_MTD_REDBOOT_PARTS_READONLY=y
+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 is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_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_GPIO is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_NAND_MXC is not set
+CONFIG_ARCH_MXC_HAS_NFC_V2=y
+CONFIG_ARCH_MXC_HAS_NFC_V2_1=y
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=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=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_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI 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_COMPAT_NET_DEV_OPS=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+CONFIG_SMSC_PHY=y
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ETHOC is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_DNET is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+CONFIG_FEC=y
+# CONFIG_FEC2 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+CONFIG_NETCONSOLE=y
+CONFIG_NETCONSOLE_DYNAMIC=y
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_TRAP is not set
+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=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=m
+CONFIG_INPUT_EVBUG=m
+# CONFIG_INPUT_APMPOWER 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=m
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL 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 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_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=16
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_GPIO_SYSFS=y
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+
+#
+# Frame buffer hardware drivers
+#
+CONFIG_FB_IMX=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+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=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_GPIO_PLATFORM=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_GPIO is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS 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=y
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_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
+
+#
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+# 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=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=y
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS 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_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_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_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_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 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 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=y
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+CONFIG_NLS_CODEPAGE_1250=m
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=m
+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=y
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=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_BOOTPARAM_SOFTLOCKUP_PANIC=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+CONFIG_DEBUG_SLAB=y
+CONFIG_DEBUG_SLAB_LEAK=y
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+# CONFIG_PAGE_POISONING is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_ARM_UNWIND=y
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_BINARY_PRINTF is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
diff --git a/recipes/linux/linux-2.6.30/tx25/linux-2.6.30-rc4-karo.diff b/recipes/linux/linux-2.6.30/tx25/linux-2.6.30-rc4-karo.diff
new file mode 100644
index 0000000000..6926571c2e
--- /dev/null
+++ b/recipes/linux/linux-2.6.30/tx25/linux-2.6.30-rc4-karo.diff
@@ -0,0 +1,17631 @@
+diff -urNp linux-2.6.30-rc4/.config linux-2.6.30-rc4-karo/.config
+--- linux-2.6.30-rc4/.config 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/.config 2009-06-02 16:17:34.000000000 +0200
+@@ -0,0 +1,1203 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.30-rc4
++# Tue Jun 2 15:46:43 2009
++#
++CONFIG_ARM=y
++CONFIG_SYS_SUPPORTS_APM_EMULATION=y
++CONFIG_GENERIC_GPIO=y
++CONFIG_GENERIC_TIME=y
++CONFIG_GENERIC_CLOCKEVENTS=y
++CONFIG_MMU=y
++# CONFIG_NO_IOPORT is not set
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_HAVE_LATENCYTOP_SUPPORT=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++CONFIG_HARDIRQS_SW_RESEND=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++# CONFIG_ARCH_HAS_ILOG2_U32 is not set
++# CONFIG_ARCH_HAS_ILOG2_U64 is not set
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_ARCH_MTD_XIP=y
++CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
++CONFIG_VECTORS_BASE=0xffff0000
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# General setup
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_BROKEN_ON_SMP=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++CONFIG_LOCALVERSION=""
++CONFIG_LOCALVERSION_AUTO=y
++# CONFIG_SWAP is not set
++CONFIG_SYSVIPC=y
++CONFIG_SYSVIPC_SYSCTL=y
++CONFIG_POSIX_MQUEUE=y
++CONFIG_POSIX_MQUEUE_SYSCTL=y
++# CONFIG_BSD_PROCESS_ACCT is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_AUDIT is not set
++
++#
++# RCU Subsystem
++#
++CONFIG_CLASSIC_RCU=y
++# CONFIG_TREE_RCU is not set
++# CONFIG_PREEMPT_RCU is not set
++# CONFIG_TREE_RCU_TRACE is not set
++# CONFIG_PREEMPT_RCU_TRACE is not set
++# CONFIG_IKCONFIG is not set
++CONFIG_LOG_BUF_SHIFT=17
++# CONFIG_GROUP_SCHED is not set
++# CONFIG_CGROUPS is not set
++# CONFIG_SYSFS_DEPRECATED_V2 is not set
++# CONFIG_RELAY is not set
++# CONFIG_NAMESPACES is not set
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_RD_GZIP=y
++# CONFIG_RD_BZIP2 is not set
++# CONFIG_RD_LZMA is not set
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++CONFIG_SYSCTL=y
++CONFIG_ANON_INODES=y
++CONFIG_EMBEDDED=y
++CONFIG_UID16=y
++CONFIG_SYSCTL_SYSCALL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++# CONFIG_STRIP_ASM_SYMS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++# CONFIG_ELF_CORE is not set
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SIGNALFD=y
++CONFIG_TIMERFD=y
++CONFIG_EVENTFD=y
++CONFIG_SHMEM=y
++# CONFIG_AIO is not set
++# CONFIG_VM_EVENT_COUNTERS is not set
++# CONFIG_COMPAT_BRK is not set
++CONFIG_SLAB=y
++# CONFIG_SLUB is not set
++# CONFIG_SLOB is not set
++# CONFIG_PROFILING is not set
++# CONFIG_MARKERS is not set
++CONFIG_HAVE_OPROFILE=y
++# CONFIG_KPROBES is not set
++CONFIG_HAVE_KPROBES=y
++CONFIG_HAVE_KRETPROBES=y
++CONFIG_HAVE_CLK=y
++# CONFIG_SLOW_WORK is not set
++CONFIG_HAVE_GENERIC_DMA_COHERENT=y
++CONFIG_SLABINFO=y
++CONFIG_RT_MUTEXES=y
++CONFIG_BASE_SMALL=0
++CONFIG_MODULES=y
++# CONFIG_MODULE_FORCE_LOAD is not set
++CONFIG_MODULE_UNLOAD=y
++CONFIG_MODULE_FORCE_UNLOAD=y
++CONFIG_MODVERSIONS=y
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++CONFIG_BLOCK=y
++CONFIG_LBD=y
++# CONFIG_BLK_DEV_BSG is not set
++# CONFIG_BLK_DEV_INTEGRITY is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++CONFIG_FREEZER=y
++
++#
++# System Type
++#
++# CONFIG_ARCH_AAEC2000 is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_REALVIEW is not set
++# CONFIG_ARCH_VERSATILE is not set
++# CONFIG_ARCH_AT91 is not set
++# CONFIG_ARCH_CLPS711X is not set
++# CONFIG_ARCH_EBSA110 is not set
++# CONFIG_ARCH_EP93XX is not set
++# CONFIG_ARCH_GEMINI is not set
++# CONFIG_ARCH_FOOTBRIDGE is not set
++# CONFIG_ARCH_NETX is not set
++# CONFIG_ARCH_H720X is not set
++# CONFIG_ARCH_IOP13XX is not set
++# CONFIG_ARCH_IOP32X is not set
++# CONFIG_ARCH_IOP33X is not set
++# CONFIG_ARCH_IXP23XX is not set
++# CONFIG_ARCH_IXP2000 is not set
++# CONFIG_ARCH_IXP4XX is not set
++# CONFIG_ARCH_L7200 is not set
++# CONFIG_ARCH_KIRKWOOD is not set
++# CONFIG_ARCH_KS8695 is not set
++# CONFIG_ARCH_NS9XXX is not set
++# CONFIG_ARCH_LOKI is not set
++# CONFIG_ARCH_MV78XX0 is not set
++CONFIG_ARCH_MXC=y
++# CONFIG_ARCH_ORION5X is not set
++# CONFIG_ARCH_PNX4008 is not set
++# CONFIG_ARCH_PXA is not set
++# CONFIG_ARCH_MMP is not set
++# CONFIG_ARCH_RPC is not set
++# CONFIG_ARCH_SA1100 is not set
++# CONFIG_ARCH_S3C2410 is not set
++# CONFIG_ARCH_S3C64XX is not set
++# CONFIG_ARCH_SHARK is not set
++# CONFIG_ARCH_LH7A40X is not set
++# CONFIG_ARCH_DAVINCI is not set
++# CONFIG_ARCH_OMAP is not set
++# CONFIG_ARCH_MSM is not set
++# CONFIG_ARCH_W90X900 is not set
++
++#
++# Freescale MXC Implementations
++#
++# CONFIG_ARCH_MX1 is not set
++CONFIG_ARCH_MX2=y
++# CONFIG_ARCH_MX3 is not set
++# CONFIG_MACH_MX21 is not set
++# CONFIG_MACH_MX27 is not set
++CONFIG_MACH_MX25=y
++
++#
++# MX2 platforms:
++#
++CONFIG_MACH_TX25=y
++# CONFIG_KARO_DEBUG is not set
++CONFIG_MACH_STK5_BASEBOARD=y
++# CONFIG_MXC_IRQ_PRIOR is not set
++# CONFIG_MXC_PWM is not set
++CONFIG_ARCH_MXC_IOMUX_V3=y
++
++#
++# 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
++CONFIG_COMMON_CLKDEV=y
++
++#
++# Bus support
++#
++# CONFIG_PCI_SYSCALL is not set
++# CONFIG_ARCH_SUPPORTS_MSI is not set
++# CONFIG_PCCARD is not set
++
++#
++# Kernel Features
++#
++CONFIG_TICK_ONESHOT=y
++CONFIG_NO_HZ=y
++# CONFIG_HIGH_RES_TIMERS is not set
++CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
++CONFIG_VMSPLIT_3G=y
++# CONFIG_VMSPLIT_2G is not set
++# CONFIG_VMSPLIT_1G is not set
++CONFIG_PAGE_OFFSET=0xC0000000
++CONFIG_PREEMPT=y
++CONFIG_HZ=100
++CONFIG_AEABI=y
++CONFIG_OABI_COMPAT=y
++CONFIG_ARCH_FLATMEM_HAS_HOLES=y
++# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
++# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
++# CONFIG_HIGHMEM is not set
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++CONFIG_PAGEFLAGS_EXTENDED=y
++CONFIG_SPLIT_PTLOCK_CPUS=4096
++# CONFIG_PHYS_ADDR_T_64BIT is not set
++CONFIG_ZONE_DMA_FLAG=0
++CONFIG_VIRT_TO_BUS=y
++CONFIG_UNEVICTABLE_LRU=y
++CONFIG_HAVE_MLOCK=y
++CONFIG_HAVE_MLOCKED_PAGE_BIT=y
++CONFIG_ALIGNMENT_TRAP=y
++
++#
++# Boot options
++#
++CONFIG_ZBOOT_ROM_TEXT=0
++CONFIG_ZBOOT_ROM_BSS=0
++CONFIG_CMDLINE="init=/linuxrc root=1f01 rootfstype=jffs2 ro console=ttymxc0,115200 panic=1"
++# CONFIG_XIP_KERNEL is not set
++# CONFIG_KEXEC is not set
++
++#
++# CPU Power Management
++#
++CONFIG_CPU_IDLE=y
++CONFIG_CPU_IDLE_GOV_LADDER=y
++CONFIG_CPU_IDLE_GOV_MENU=y
++
++#
++# Floating point emulation
++#
++
++#
++# At least one emulation must be selected
++#
++CONFIG_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_HAVE_AOUT=y
++# CONFIG_BINFMT_AOUT is not set
++# CONFIG_BINFMT_MISC is not set
++
++#
++# Power management options
++#
++CONFIG_PM=y
++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_APM_EMULATION=y
++CONFIG_ARCH_SUSPEND_POSSIBLE=y
++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 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 is not set
++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
++# CONFIG_INET_XFRM_MODE_TUNNEL is not set
++# CONFIG_INET_XFRM_MODE_BEET is not set
++# CONFIG_INET_LRO is not set
++# CONFIG_INET_DIAG is not set
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_CUBIC=y
++CONFIG_DEFAULT_TCP_CONG="cubic"
++# CONFIG_TCP_MD5SIG is not set
++# CONFIG_IPV6 is not set
++# CONFIG_NETWORK_SECMARK is not set
++# CONFIG_NETFILTER is not set
++# CONFIG_IP_DCCP is not set
++# CONFIG_IP_SCTP is not set
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_NET_DSA is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++# CONFIG_PHONET is not set
++# CONFIG_NET_SCHED is not set
++# CONFIG_DCB is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_CAN is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_AF_RXRPC is not set
++# CONFIG_WIRELESS is not set
++# CONFIG_WIMAX is not set
++# CONFIG_RFKILL is not set
++# CONFIG_NET_9P is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=y
++CONFIG_FIRMWARE_IN_KERNEL=y
++CONFIG_EXTRA_FIRMWARE=""
++# CONFIG_DEBUG_DRIVER is not set
++# CONFIG_DEBUG_DEVRES is not set
++# CONFIG_SYS_HYPERVISOR is not set
++# CONFIG_CONNECTOR is not set
++CONFIG_MTD=y
++CONFIG_MTD_DEBUG=y
++CONFIG_MTD_DEBUG_VERBOSE=0
++CONFIG_MTD_CONCAT=y
++CONFIG_MTD_PARTITIONS=y
++CONFIG_MTD_TESTS=m
++CONFIG_MTD_REDBOOT_PARTS=y
++CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-5
++# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
++CONFIG_MTD_REDBOOT_PARTS_READONLY=y
++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 is not set
++# CONFIG_MTD_JEDECPROBE is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++# CONFIG_MTD_RAM is not set
++# CONFIG_MTD_ROM is not set
++# CONFIG_MTD_ABSENT is not set
++
++#
++# Mapping drivers for chip access
++#
++# CONFIG_MTD_COMPLEX_MAPPINGS is not set
++# CONFIG_MTD_PLATRAM is not set
++
++#
++# Self-contained MTD device drivers
++#
++# CONFIG_MTD_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_GPIO is not set
++CONFIG_MTD_NAND_IDS=y
++# CONFIG_MTD_NAND_DISKONCHIP is not set
++# CONFIG_MTD_NAND_NANDSIM is not set
++# CONFIG_MTD_NAND_PLATFORM is not set
++# CONFIG_MTD_NAND_MXC is not set
++CONFIG_ARCH_MXC_HAS_NFC_V2=y
++CONFIG_ARCH_MXC_HAS_NFC_V2_1=y
++# CONFIG_MTD_ONENAND is not set
++
++#
++# LPDDR flash memory drivers
++#
++# CONFIG_MTD_LPDDR is not set
++
++#
++# UBI - Unsorted block images
++#
++# CONFIG_MTD_UBI is not set
++# CONFIG_PARPORT is not set
++CONFIG_BLK_DEV=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=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_ENCLOSURE_SERVICES is not set
++# CONFIG_C2PORT is not set
++
++#
++# EEPROM support
++#
++# CONFIG_EEPROM_93CX6 is not set
++CONFIG_HAVE_IDE=y
++# CONFIG_IDE is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++# CONFIG_SCSI 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_COMPAT_NET_DEV_OPS=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_MACVLAN is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++# CONFIG_VETH is not set
++CONFIG_PHYLIB=y
++
++#
++# MII PHY device drivers
++#
++# CONFIG_MARVELL_PHY is not set
++# CONFIG_DAVICOM_PHY is not set
++# CONFIG_QSEMI_PHY is not set
++# CONFIG_LXT_PHY is not set
++# CONFIG_CICADA_PHY is not set
++# CONFIG_VITESSE_PHY is not set
++CONFIG_SMSC_PHY=y
++# CONFIG_BROADCOM_PHY is not set
++# CONFIG_ICPLUS_PHY is not set
++# CONFIG_REALTEK_PHY is not set
++# CONFIG_NATIONAL_PHY is not set
++# CONFIG_STE10XP is not set
++# CONFIG_LSI_ET1011C_PHY is not set
++# CONFIG_FIXED_PHY is not set
++# CONFIG_MDIO_BITBANG is not set
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_AX88796 is not set
++# CONFIG_SMC91X is not set
++# CONFIG_DM9000 is not set
++# CONFIG_ETHOC is not set
++# CONFIG_SMC911X is not set
++# CONFIG_SMSC911X is not set
++# CONFIG_DNET is not set
++# CONFIG_IBM_NEW_EMAC_ZMII is not set
++# CONFIG_IBM_NEW_EMAC_RGMII is not set
++# CONFIG_IBM_NEW_EMAC_TAH is not set
++# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
++# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
++# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
++# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
++# CONFIG_B44 is not set
++CONFIG_FEC=y
++# CONFIG_FEC2 is not set
++# CONFIG_NETDEV_1000 is not set
++# CONFIG_NETDEV_10000 is not set
++
++#
++# Wireless LAN
++#
++# CONFIG_WLAN_PRE80211 is not set
++# CONFIG_WLAN_80211 is not set
++
++#
++# Enable WiMAX (Networking options) to see the WiMAX drivers
++#
++# CONFIG_WAN is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++CONFIG_NETCONSOLE=y
++CONFIG_NETCONSOLE_DYNAMIC=y
++CONFIG_NETPOLL=y
++# CONFIG_NETPOLL_TRAP is not set
++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=m
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++# CONFIG_INPUT_JOYDEV is not set
++CONFIG_INPUT_EVDEV=m
++CONFIG_INPUT_EVBUG=m
++# CONFIG_INPUT_APMPOWER 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=m
++CONFIG_INPUT_MOUSE=y
++# CONFIG_MOUSE_PS2 is not set
++# CONFIG_MOUSE_SERIAL 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 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_CONSOLE_TRANSLATIONS=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++CONFIG_VT_HW_CONSOLE_BINDING=y
++CONFIG_DEVKMEM=y
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++# CONFIG_SERIAL_8250 is not set
++
++#
++# Non-8250 serial port support
++#
++CONFIG_SERIAL_IMX=y
++CONFIG_SERIAL_IMX_CONSOLE=y
++CONFIG_SERIAL_CORE=y
++CONFIG_SERIAL_CORE_CONSOLE=y
++CONFIG_UNIX98_PTYS=y
++# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=16
++# CONFIG_IPMI_HANDLER is not set
++# CONFIG_HW_RANDOM is not set
++# CONFIG_R3964 is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_TCG_TPM is not set
++# CONFIG_I2C is not set
++# CONFIG_SPI is not set
++CONFIG_ARCH_REQUIRE_GPIOLIB=y
++CONFIG_GPIOLIB=y
++CONFIG_DEBUG_GPIO=y
++CONFIG_GPIO_SYSFS=y
++
++#
++# Memory mapped GPIO expanders:
++#
++
++#
++# I2C GPIO expanders:
++#
++
++#
++# PCI GPIO expanders:
++#
++
++#
++# SPI GPIO expanders:
++#
++# CONFIG_W1 is not set
++# CONFIG_POWER_SUPPLY is not set
++# CONFIG_HWMON is not set
++# CONFIG_THERMAL is not set
++# CONFIG_THERMAL_HWMON is not set
++# CONFIG_WATCHDOG is not set
++CONFIG_SSB_POSSIBLE=y
++
++#
++# Sonics Silicon Backplane
++#
++# CONFIG_SSB is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_CORE is not set
++# CONFIG_MFD_SM501 is not set
++# CONFIG_MFD_ASIC3 is not set
++# CONFIG_HTC_EGPIO is not set
++# CONFIG_HTC_PASIC3 is not set
++# CONFIG_MFD_TMIO is not set
++# CONFIG_MFD_T7L66XB is not set
++# CONFIG_MFD_TC6387XB is not set
++# CONFIG_MFD_TC6393XB is not set
++
++#
++# Multimedia devices
++#
++
++#
++# Multimedia core support
++#
++# CONFIG_VIDEO_DEV is not set
++# CONFIG_DVB_CORE is not set
++# CONFIG_VIDEO_MEDIA is not set
++
++#
++# Multimedia drivers
++#
++# CONFIG_DAB is not set
++
++#
++# Graphics support
++#
++# CONFIG_VGASTATE is not set
++# CONFIG_VIDEO_OUTPUT_CONTROL is not set
++CONFIG_FB=y
++# CONFIG_FIRMWARE_EDID is not set
++# CONFIG_FB_DDC is not set
++# CONFIG_FB_BOOT_VESA_SUPPORT is not set
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
++# CONFIG_FB_SYS_FILLRECT is not set
++# CONFIG_FB_SYS_COPYAREA is not set
++# CONFIG_FB_SYS_IMAGEBLIT is not set
++# CONFIG_FB_FOREIGN_ENDIAN is not set
++# CONFIG_FB_SYS_FOPS is not set
++# CONFIG_FB_SVGALIB is not set
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++CONFIG_FB_MODE_HELPERS=y
++CONFIG_FB_TILEBLITTING=y
++
++#
++# Frame buffer hardware drivers
++#
++CONFIG_FB_IMX=y
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_VIRTUAL is not set
++# CONFIG_FB_METRONOME is not set
++# CONFIG_FB_MB862XX is not set
++# CONFIG_FB_BROADSHEET is not set
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Display device support
++#
++# CONFIG_DISPLAY_SUPPORT is not set
++
++#
++# Console display driver support
++#
++# CONFIG_VGA_CONSOLE is not set
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
++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=y
++CONFIG_LOGO_LINUX_VGA16=y
++CONFIG_LOGO_LINUX_CLUT224=y
++# CONFIG_SOUND is not set
++# CONFIG_HID_SUPPORT is not set
++# CONFIG_USB_SUPPORT is not set
++# CONFIG_MMC is not set
++# CONFIG_MEMSTICK is not set
++# CONFIG_ACCESSIBILITY is not set
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=y
++
++#
++# LED drivers
++#
++CONFIG_LEDS_GPIO=y
++CONFIG_LEDS_GPIO_PLATFORM=y
++
++#
++# LED Triggers
++#
++CONFIG_LEDS_TRIGGERS=y
++# CONFIG_LEDS_TRIGGER_TIMER is not set
++CONFIG_LEDS_TRIGGER_HEARTBEAT=y
++# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
++# CONFIG_LEDS_TRIGGER_GPIO is not set
++# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
++
++#
++# iptables trigger is under Netfilter config (LED target)
++#
++CONFIG_RTC_LIB=y
++# CONFIG_RTC_CLASS is not set
++# CONFIG_DMADEVICES is not set
++# CONFIG_AUXDISPLAY is not set
++# CONFIG_REGULATOR is not set
++# CONFIG_UIO is not set
++# CONFIG_STAGING is not set
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=m
++# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
++CONFIG_EXT3_FS_XATTR=y
++CONFIG_EXT3_FS_POSIX_ACL=y
++# CONFIG_EXT3_FS_SECURITY is not set
++# CONFIG_EXT4_FS 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=y
++CONFIG_FILE_LOCKING=y
++# CONFIG_XFS_FS is not set
++# CONFIG_GFS2_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_BTRFS_FS is not set
++CONFIG_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
++
++#
++# Caches
++#
++# CONFIG_FSCACHE is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++# 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=m
++# CONFIG_NTFS_DEBUG is not set
++CONFIG_NTFS_RW=y
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_SYSCTL=y
++CONFIG_PROC_PAGE_MONITOR=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_TMPFS_POSIX_ACL is not set
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_CONFIGFS_FS=y
++CONFIG_MISC_FILESYSTEMS=y
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_JFFS2_FS=y
++CONFIG_JFFS2_FS_DEBUG=0
++CONFIG_JFFS2_FS_WRITEBUFFER=y
++# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
++CONFIG_JFFS2_SUMMARY=y
++# CONFIG_JFFS2_FS_XATTR is not set
++# CONFIG_JFFS2_COMPRESSION_OPTIONS 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_SQUASHFS is not set
++# CONFIG_VXFS_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_OMFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_ROMFS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++# CONFIG_NILFS2_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_ROOT_NFS=y
++# CONFIG_NFSD is not set
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_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 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 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++CONFIG_NLS_CODEPAGE_850=y
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++CONFIG_NLS_CODEPAGE_1250=m
++# CONFIG_NLS_CODEPAGE_1251 is not set
++CONFIG_NLS_ASCII=m
++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=y
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++CONFIG_NLS_UTF8=y
++# CONFIG_DLM is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_ENABLE_WARN_DEPRECATED=y
++CONFIG_ENABLE_MUST_CHECK=y
++CONFIG_FRAME_WARN=1024
++CONFIG_MAGIC_SYSRQ=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_BOOTPARAM_SOFTLOCKUP_PANIC=y
++CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
++CONFIG_DETECT_HUNG_TASK=y
++CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
++CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
++# CONFIG_SCHED_DEBUG is not set
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_TIMER_STATS is not set
++# CONFIG_DEBUG_OBJECTS is not set
++CONFIG_DEBUG_SLAB=y
++CONFIG_DEBUG_SLAB_LEAK=y
++# CONFIG_DEBUG_PREEMPT is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_LOCK_STAT is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++CONFIG_DEBUG_BUGVERBOSE=y
++# CONFIG_DEBUG_INFO is not set
++# CONFIG_DEBUG_VM is not set
++# CONFIG_DEBUG_WRITECOUNT is not set
++# CONFIG_DEBUG_MEMORY_INIT is not set
++# CONFIG_DEBUG_LIST is not set
++# CONFIG_DEBUG_SG is not set
++# CONFIG_DEBUG_NOTIFIERS is not set
++# CONFIG_BOOT_PRINTK_DELAY is not set
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_RCU_CPU_STALL_DETECTOR is not set
++# CONFIG_BACKTRACE_SELF_TEST is not set
++# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
++# CONFIG_FAULT_INJECTION is not set
++# CONFIG_LATENCYTOP is not set
++# CONFIG_SYSCTL_SYSCALL_CHECK is not set
++# CONFIG_PAGE_POISONING is not set
++CONFIG_HAVE_FUNCTION_TRACER=y
++CONFIG_TRACING_SUPPORT=y
++
++#
++# Tracers
++#
++# CONFIG_FUNCTION_TRACER is not set
++# CONFIG_IRQSOFF_TRACER is not set
++# CONFIG_PREEMPT_TRACER is not set
++# CONFIG_SCHED_TRACER is not set
++# CONFIG_CONTEXT_SWITCH_TRACER is not set
++# CONFIG_EVENT_TRACER is not set
++# CONFIG_BOOT_TRACER is not set
++# CONFIG_TRACE_BRANCH_PROFILING is not set
++# CONFIG_STACK_TRACER is not set
++# CONFIG_KMEMTRACE is not set
++# CONFIG_WORKQUEUE_TRACER is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++# CONFIG_SAMPLES is not set
++CONFIG_HAVE_ARCH_KGDB=y
++# CONFIG_KGDB is not set
++CONFIG_ARM_UNWIND=y
++CONFIG_DEBUG_USER=y
++CONFIG_DEBUG_ERRORS=y
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_LL is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++# CONFIG_SECURITYFS is not set
++# CONFIG_SECURITY_FILE_CAPABILITIES is not set
++CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
++# CONFIG_CRYPTO_FIPS is not set
++CONFIG_CRYPTO_ALGAPI=y
++CONFIG_CRYPTO_ALGAPI2=y
++CONFIG_CRYPTO_AEAD2=y
++CONFIG_CRYPTO_BLKCIPHER=y
++CONFIG_CRYPTO_BLKCIPHER2=y
++CONFIG_CRYPTO_HASH=y
++CONFIG_CRYPTO_HASH2=y
++CONFIG_CRYPTO_RNG2=y
++CONFIG_CRYPTO_PCOMP=y
++CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_MANAGER2=y
++# CONFIG_CRYPTO_GF128MUL is not set
++# CONFIG_CRYPTO_NULL is not set
++CONFIG_CRYPTO_WORKQUEUE=y
++# CONFIG_CRYPTO_CRYPTD is not set
++# CONFIG_CRYPTO_AUTHENC is not set
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Authenticated Encryption with Associated Data
++#
++# CONFIG_CRYPTO_CCM is not set
++# CONFIG_CRYPTO_GCM is not set
++# CONFIG_CRYPTO_SEQIV is not set
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++# CONFIG_CRYPTO_CTR is not set
++# CONFIG_CRYPTO_CTS is not set
++CONFIG_CRYPTO_ECB=y
++# CONFIG_CRYPTO_LRW is not set
++# CONFIG_CRYPTO_PCBC is not set
++# CONFIG_CRYPTO_XTS is not set
++
++#
++# Hash modes
++#
++CONFIG_CRYPTO_HMAC=y
++# CONFIG_CRYPTO_XCBC is not set
++
++#
++# Digest
++#
++# CONFIG_CRYPTO_CRC32C is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=y
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_RMD128 is not set
++# CONFIG_CRYPTO_RMD160 is not set
++# CONFIG_CRYPTO_RMD256 is not set
++# CONFIG_CRYPTO_RMD320 is not set
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++# CONFIG_CRYPTO_WP512 is not set
++
++#
++# Ciphers
++#
++CONFIG_CRYPTO_AES=y
++# CONFIG_CRYPTO_ANUBIS is not set
++CONFIG_CRYPTO_ARC4=y
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_CAMELLIA is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++CONFIG_CRYPTO_DES=y
++# CONFIG_CRYPTO_FCRYPT is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_SALSA20 is not set
++# CONFIG_CRYPTO_SEED is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++
++#
++# Compression
++#
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_ZLIB is not set
++# CONFIG_CRYPTO_LZO is not set
++
++#
++# Random Number Generation
++#
++# CONFIG_CRYPTO_ANSI_CPRNG is not set
++CONFIG_CRYPTO_HW=y
++# CONFIG_BINARY_PRINTF is not set
++
++#
++# Library routines
++#
++CONFIG_BITREVERSE=y
++CONFIG_GENERIC_FIND_LAST_BIT=y
++# CONFIG_CRC_CCITT is not set
++# CONFIG_CRC16 is not set
++# CONFIG_CRC_T10DIF is not set
++# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC32=y
++# CONFIG_CRC7 is not set
++# CONFIG_LIBCRC32C is not set
++CONFIG_ZLIB_INFLATE=y
++CONFIG_ZLIB_DEFLATE=y
++CONFIG_DECOMPRESS_GZIP=y
++CONFIG_HAS_IOMEM=y
++CONFIG_HAS_IOPORT=y
++CONFIG_HAS_DMA=y
++CONFIG_NLATTR=y
+diff -urNp linux-2.6.30-rc4/arch/arm/configs/karo_tx25_defconfig linux-2.6.30-rc4-karo/arch/arm/configs/karo_tx25_defconfig
+--- linux-2.6.30-rc4/arch/arm/configs/karo_tx25_defconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/configs/karo_tx25_defconfig 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,1203 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.30-rc4
++# Tue Jun 2 15:46:43 2009
++#
++CONFIG_ARM=y
++CONFIG_SYS_SUPPORTS_APM_EMULATION=y
++CONFIG_GENERIC_GPIO=y
++CONFIG_GENERIC_TIME=y
++CONFIG_GENERIC_CLOCKEVENTS=y
++CONFIG_MMU=y
++# CONFIG_NO_IOPORT is not set
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_HAVE_LATENCYTOP_SUPPORT=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++CONFIG_HARDIRQS_SW_RESEND=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++# CONFIG_ARCH_HAS_ILOG2_U32 is not set
++# CONFIG_ARCH_HAS_ILOG2_U64 is not set
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_ARCH_MTD_XIP=y
++CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
++CONFIG_VECTORS_BASE=0xffff0000
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# General setup
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_BROKEN_ON_SMP=y
++CONFIG_LOCK_KERNEL=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++CONFIG_LOCALVERSION=""
++CONFIG_LOCALVERSION_AUTO=y
++# CONFIG_SWAP is not set
++CONFIG_SYSVIPC=y
++CONFIG_SYSVIPC_SYSCTL=y
++CONFIG_POSIX_MQUEUE=y
++CONFIG_POSIX_MQUEUE_SYSCTL=y
++# CONFIG_BSD_PROCESS_ACCT is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_AUDIT is not set
++
++#
++# RCU Subsystem
++#
++CONFIG_CLASSIC_RCU=y
++# CONFIG_TREE_RCU is not set
++# CONFIG_PREEMPT_RCU is not set
++# CONFIG_TREE_RCU_TRACE is not set
++# CONFIG_PREEMPT_RCU_TRACE is not set
++# CONFIG_IKCONFIG is not set
++CONFIG_LOG_BUF_SHIFT=17
++# CONFIG_GROUP_SCHED is not set
++# CONFIG_CGROUPS is not set
++# CONFIG_SYSFS_DEPRECATED_V2 is not set
++# CONFIG_RELAY is not set
++# CONFIG_NAMESPACES is not set
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_RD_GZIP=y
++# CONFIG_RD_BZIP2 is not set
++# CONFIG_RD_LZMA is not set
++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
++CONFIG_SYSCTL=y
++CONFIG_ANON_INODES=y
++CONFIG_EMBEDDED=y
++CONFIG_UID16=y
++CONFIG_SYSCTL_SYSCALL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++# CONFIG_STRIP_ASM_SYMS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++# CONFIG_ELF_CORE is not set
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SIGNALFD=y
++CONFIG_TIMERFD=y
++CONFIG_EVENTFD=y
++CONFIG_SHMEM=y
++# CONFIG_AIO is not set
++# CONFIG_VM_EVENT_COUNTERS is not set
++# CONFIG_COMPAT_BRK is not set
++CONFIG_SLAB=y
++# CONFIG_SLUB is not set
++# CONFIG_SLOB is not set
++# CONFIG_PROFILING is not set
++# CONFIG_MARKERS is not set
++CONFIG_HAVE_OPROFILE=y
++# CONFIG_KPROBES is not set
++CONFIG_HAVE_KPROBES=y
++CONFIG_HAVE_KRETPROBES=y
++CONFIG_HAVE_CLK=y
++# CONFIG_SLOW_WORK is not set
++CONFIG_HAVE_GENERIC_DMA_COHERENT=y
++CONFIG_SLABINFO=y
++CONFIG_RT_MUTEXES=y
++CONFIG_BASE_SMALL=0
++CONFIG_MODULES=y
++# CONFIG_MODULE_FORCE_LOAD is not set
++CONFIG_MODULE_UNLOAD=y
++CONFIG_MODULE_FORCE_UNLOAD=y
++CONFIG_MODVERSIONS=y
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++CONFIG_BLOCK=y
++CONFIG_LBD=y
++# CONFIG_BLK_DEV_BSG is not set
++# CONFIG_BLK_DEV_INTEGRITY is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++CONFIG_FREEZER=y
++
++#
++# System Type
++#
++# CONFIG_ARCH_AAEC2000 is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_REALVIEW is not set
++# CONFIG_ARCH_VERSATILE is not set
++# CONFIG_ARCH_AT91 is not set
++# CONFIG_ARCH_CLPS711X is not set
++# CONFIG_ARCH_EBSA110 is not set
++# CONFIG_ARCH_EP93XX is not set
++# CONFIG_ARCH_GEMINI is not set
++# CONFIG_ARCH_FOOTBRIDGE is not set
++# CONFIG_ARCH_NETX is not set
++# CONFIG_ARCH_H720X is not set
++# CONFIG_ARCH_IOP13XX is not set
++# CONFIG_ARCH_IOP32X is not set
++# CONFIG_ARCH_IOP33X is not set
++# CONFIG_ARCH_IXP23XX is not set
++# CONFIG_ARCH_IXP2000 is not set
++# CONFIG_ARCH_IXP4XX is not set
++# CONFIG_ARCH_L7200 is not set
++# CONFIG_ARCH_KIRKWOOD is not set
++# CONFIG_ARCH_KS8695 is not set
++# CONFIG_ARCH_NS9XXX is not set
++# CONFIG_ARCH_LOKI is not set
++# CONFIG_ARCH_MV78XX0 is not set
++CONFIG_ARCH_MXC=y
++# CONFIG_ARCH_ORION5X is not set
++# CONFIG_ARCH_PNX4008 is not set
++# CONFIG_ARCH_PXA is not set
++# CONFIG_ARCH_MMP is not set
++# CONFIG_ARCH_RPC is not set
++# CONFIG_ARCH_SA1100 is not set
++# CONFIG_ARCH_S3C2410 is not set
++# CONFIG_ARCH_S3C64XX is not set
++# CONFIG_ARCH_SHARK is not set
++# CONFIG_ARCH_LH7A40X is not set
++# CONFIG_ARCH_DAVINCI is not set
++# CONFIG_ARCH_OMAP is not set
++# CONFIG_ARCH_MSM is not set
++# CONFIG_ARCH_W90X900 is not set
++
++#
++# Freescale MXC Implementations
++#
++# CONFIG_ARCH_MX1 is not set
++CONFIG_ARCH_MX2=y
++# CONFIG_ARCH_MX3 is not set
++# CONFIG_MACH_MX21 is not set
++# CONFIG_MACH_MX27 is not set
++CONFIG_MACH_MX25=y
++
++#
++# MX2 platforms:
++#
++CONFIG_MACH_TX25=y
++# CONFIG_KARO_DEBUG is not set
++CONFIG_MACH_STK5_BASEBOARD=y
++# CONFIG_MXC_IRQ_PRIOR is not set
++# CONFIG_MXC_PWM is not set
++CONFIG_ARCH_MXC_IOMUX_V3=y
++
++#
++# 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
++CONFIG_COMMON_CLKDEV=y
++
++#
++# Bus support
++#
++# CONFIG_PCI_SYSCALL is not set
++# CONFIG_ARCH_SUPPORTS_MSI is not set
++# CONFIG_PCCARD is not set
++
++#
++# Kernel Features
++#
++CONFIG_TICK_ONESHOT=y
++CONFIG_NO_HZ=y
++# CONFIG_HIGH_RES_TIMERS is not set
++CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
++CONFIG_VMSPLIT_3G=y
++# CONFIG_VMSPLIT_2G is not set
++# CONFIG_VMSPLIT_1G is not set
++CONFIG_PAGE_OFFSET=0xC0000000
++CONFIG_PREEMPT=y
++CONFIG_HZ=100
++CONFIG_AEABI=y
++CONFIG_OABI_COMPAT=y
++CONFIG_ARCH_FLATMEM_HAS_HOLES=y
++# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
++# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
++# CONFIG_HIGHMEM is not set
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++CONFIG_PAGEFLAGS_EXTENDED=y
++CONFIG_SPLIT_PTLOCK_CPUS=4096
++# CONFIG_PHYS_ADDR_T_64BIT is not set
++CONFIG_ZONE_DMA_FLAG=0
++CONFIG_VIRT_TO_BUS=y
++CONFIG_UNEVICTABLE_LRU=y
++CONFIG_HAVE_MLOCK=y
++CONFIG_HAVE_MLOCKED_PAGE_BIT=y
++CONFIG_ALIGNMENT_TRAP=y
++
++#
++# Boot options
++#
++CONFIG_ZBOOT_ROM_TEXT=0
++CONFIG_ZBOOT_ROM_BSS=0
++CONFIG_CMDLINE="init=/linuxrc root=1f01 rootfstype=jffs2 ro console=ttymxc0,115200 panic=1"
++# CONFIG_XIP_KERNEL is not set
++# CONFIG_KEXEC is not set
++
++#
++# CPU Power Management
++#
++CONFIG_CPU_IDLE=y
++CONFIG_CPU_IDLE_GOV_LADDER=y
++CONFIG_CPU_IDLE_GOV_MENU=y
++
++#
++# Floating point emulation
++#
++
++#
++# At least one emulation must be selected
++#
++CONFIG_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_HAVE_AOUT=y
++# CONFIG_BINFMT_AOUT is not set
++# CONFIG_BINFMT_MISC is not set
++
++#
++# Power management options
++#
++CONFIG_PM=y
++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_APM_EMULATION=y
++CONFIG_ARCH_SUSPEND_POSSIBLE=y
++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 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 is not set
++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
++# CONFIG_INET_XFRM_MODE_TUNNEL is not set
++# CONFIG_INET_XFRM_MODE_BEET is not set
++# CONFIG_INET_LRO is not set
++# CONFIG_INET_DIAG is not set
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_CUBIC=y
++CONFIG_DEFAULT_TCP_CONG="cubic"
++# CONFIG_TCP_MD5SIG is not set
++# CONFIG_IPV6 is not set
++# CONFIG_NETWORK_SECMARK is not set
++# CONFIG_NETFILTER is not set
++# CONFIG_IP_DCCP is not set
++# CONFIG_IP_SCTP is not set
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_NET_DSA is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++# CONFIG_PHONET is not set
++# CONFIG_NET_SCHED is not set
++# CONFIG_DCB is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_CAN is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_AF_RXRPC is not set
++# CONFIG_WIRELESS is not set
++# CONFIG_WIMAX is not set
++# CONFIG_RFKILL is not set
++# CONFIG_NET_9P is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=y
++CONFIG_FIRMWARE_IN_KERNEL=y
++CONFIG_EXTRA_FIRMWARE=""
++# CONFIG_DEBUG_DRIVER is not set
++# CONFIG_DEBUG_DEVRES is not set
++# CONFIG_SYS_HYPERVISOR is not set
++# CONFIG_CONNECTOR is not set
++CONFIG_MTD=y
++CONFIG_MTD_DEBUG=y
++CONFIG_MTD_DEBUG_VERBOSE=0
++CONFIG_MTD_CONCAT=y
++CONFIG_MTD_PARTITIONS=y
++CONFIG_MTD_TESTS=m
++CONFIG_MTD_REDBOOT_PARTS=y
++CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-5
++# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
++CONFIG_MTD_REDBOOT_PARTS_READONLY=y
++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 is not set
++# CONFIG_MTD_JEDECPROBE is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++# CONFIG_MTD_RAM is not set
++# CONFIG_MTD_ROM is not set
++# CONFIG_MTD_ABSENT is not set
++
++#
++# Mapping drivers for chip access
++#
++# CONFIG_MTD_COMPLEX_MAPPINGS is not set
++# CONFIG_MTD_PLATRAM is not set
++
++#
++# Self-contained MTD device drivers
++#
++# CONFIG_MTD_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_GPIO is not set
++CONFIG_MTD_NAND_IDS=y
++# CONFIG_MTD_NAND_DISKONCHIP is not set
++# CONFIG_MTD_NAND_NANDSIM is not set
++# CONFIG_MTD_NAND_PLATFORM is not set
++# CONFIG_MTD_NAND_MXC is not set
++CONFIG_ARCH_MXC_HAS_NFC_V2=y
++CONFIG_ARCH_MXC_HAS_NFC_V2_1=y
++# CONFIG_MTD_ONENAND is not set
++
++#
++# LPDDR flash memory drivers
++#
++# CONFIG_MTD_LPDDR is not set
++
++#
++# UBI - Unsorted block images
++#
++# CONFIG_MTD_UBI is not set
++# CONFIG_PARPORT is not set
++CONFIG_BLK_DEV=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=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_ENCLOSURE_SERVICES is not set
++# CONFIG_C2PORT is not set
++
++#
++# EEPROM support
++#
++# CONFIG_EEPROM_93CX6 is not set
++CONFIG_HAVE_IDE=y
++# CONFIG_IDE is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++# CONFIG_SCSI 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_COMPAT_NET_DEV_OPS=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_MACVLAN is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++# CONFIG_VETH is not set
++CONFIG_PHYLIB=y
++
++#
++# MII PHY device drivers
++#
++# CONFIG_MARVELL_PHY is not set
++# CONFIG_DAVICOM_PHY is not set
++# CONFIG_QSEMI_PHY is not set
++# CONFIG_LXT_PHY is not set
++# CONFIG_CICADA_PHY is not set
++# CONFIG_VITESSE_PHY is not set
++CONFIG_SMSC_PHY=y
++# CONFIG_BROADCOM_PHY is not set
++# CONFIG_ICPLUS_PHY is not set
++# CONFIG_REALTEK_PHY is not set
++# CONFIG_NATIONAL_PHY is not set
++# CONFIG_STE10XP is not set
++# CONFIG_LSI_ET1011C_PHY is not set
++# CONFIG_FIXED_PHY is not set
++# CONFIG_MDIO_BITBANG is not set
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_AX88796 is not set
++# CONFIG_SMC91X is not set
++# CONFIG_DM9000 is not set
++# CONFIG_ETHOC is not set
++# CONFIG_SMC911X is not set
++# CONFIG_SMSC911X is not set
++# CONFIG_DNET is not set
++# CONFIG_IBM_NEW_EMAC_ZMII is not set
++# CONFIG_IBM_NEW_EMAC_RGMII is not set
++# CONFIG_IBM_NEW_EMAC_TAH is not set
++# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
++# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
++# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
++# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
++# CONFIG_B44 is not set
++CONFIG_FEC=y
++# CONFIG_FEC2 is not set
++# CONFIG_NETDEV_1000 is not set
++# CONFIG_NETDEV_10000 is not set
++
++#
++# Wireless LAN
++#
++# CONFIG_WLAN_PRE80211 is not set
++# CONFIG_WLAN_80211 is not set
++
++#
++# Enable WiMAX (Networking options) to see the WiMAX drivers
++#
++# CONFIG_WAN is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++CONFIG_NETCONSOLE=y
++CONFIG_NETCONSOLE_DYNAMIC=y
++CONFIG_NETPOLL=y
++# CONFIG_NETPOLL_TRAP is not set
++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=m
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++# CONFIG_INPUT_JOYDEV is not set
++CONFIG_INPUT_EVDEV=m
++CONFIG_INPUT_EVBUG=m
++# CONFIG_INPUT_APMPOWER 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=m
++CONFIG_INPUT_MOUSE=y
++# CONFIG_MOUSE_PS2 is not set
++# CONFIG_MOUSE_SERIAL 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 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_CONSOLE_TRANSLATIONS=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++CONFIG_VT_HW_CONSOLE_BINDING=y
++CONFIG_DEVKMEM=y
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++# CONFIG_SERIAL_8250 is not set
++
++#
++# Non-8250 serial port support
++#
++CONFIG_SERIAL_IMX=y
++CONFIG_SERIAL_IMX_CONSOLE=y
++CONFIG_SERIAL_CORE=y
++CONFIG_SERIAL_CORE_CONSOLE=y
++CONFIG_UNIX98_PTYS=y
++# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=16
++# CONFIG_IPMI_HANDLER is not set
++# CONFIG_HW_RANDOM is not set
++# CONFIG_R3964 is not set
++# CONFIG_RAW_DRIVER is not set
++# CONFIG_TCG_TPM is not set
++# CONFIG_I2C is not set
++# CONFIG_SPI is not set
++CONFIG_ARCH_REQUIRE_GPIOLIB=y
++CONFIG_GPIOLIB=y
++CONFIG_DEBUG_GPIO=y
++CONFIG_GPIO_SYSFS=y
++
++#
++# Memory mapped GPIO expanders:
++#
++
++#
++# I2C GPIO expanders:
++#
++
++#
++# PCI GPIO expanders:
++#
++
++#
++# SPI GPIO expanders:
++#
++# CONFIG_W1 is not set
++# CONFIG_POWER_SUPPLY is not set
++# CONFIG_HWMON is not set
++# CONFIG_THERMAL is not set
++# CONFIG_THERMAL_HWMON is not set
++# CONFIG_WATCHDOG is not set
++CONFIG_SSB_POSSIBLE=y
++
++#
++# Sonics Silicon Backplane
++#
++# CONFIG_SSB is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_CORE is not set
++# CONFIG_MFD_SM501 is not set
++# CONFIG_MFD_ASIC3 is not set
++# CONFIG_HTC_EGPIO is not set
++# CONFIG_HTC_PASIC3 is not set
++# CONFIG_MFD_TMIO is not set
++# CONFIG_MFD_T7L66XB is not set
++# CONFIG_MFD_TC6387XB is not set
++# CONFIG_MFD_TC6393XB is not set
++
++#
++# Multimedia devices
++#
++
++#
++# Multimedia core support
++#
++# CONFIG_VIDEO_DEV is not set
++# CONFIG_DVB_CORE is not set
++# CONFIG_VIDEO_MEDIA is not set
++
++#
++# Multimedia drivers
++#
++# CONFIG_DAB is not set
++
++#
++# Graphics support
++#
++# CONFIG_VGASTATE is not set
++# CONFIG_VIDEO_OUTPUT_CONTROL is not set
++CONFIG_FB=y
++# CONFIG_FIRMWARE_EDID is not set
++# CONFIG_FB_DDC is not set
++# CONFIG_FB_BOOT_VESA_SUPPORT is not set
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
++# CONFIG_FB_SYS_FILLRECT is not set
++# CONFIG_FB_SYS_COPYAREA is not set
++# CONFIG_FB_SYS_IMAGEBLIT is not set
++# CONFIG_FB_FOREIGN_ENDIAN is not set
++# CONFIG_FB_SYS_FOPS is not set
++# CONFIG_FB_SVGALIB is not set
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++CONFIG_FB_MODE_HELPERS=y
++CONFIG_FB_TILEBLITTING=y
++
++#
++# Frame buffer hardware drivers
++#
++CONFIG_FB_IMX=y
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_VIRTUAL is not set
++# CONFIG_FB_METRONOME is not set
++# CONFIG_FB_MB862XX is not set
++# CONFIG_FB_BROADSHEET is not set
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Display device support
++#
++# CONFIG_DISPLAY_SUPPORT is not set
++
++#
++# Console display driver support
++#
++# CONFIG_VGA_CONSOLE is not set
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
++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=y
++CONFIG_LOGO_LINUX_VGA16=y
++CONFIG_LOGO_LINUX_CLUT224=y
++# CONFIG_SOUND is not set
++# CONFIG_HID_SUPPORT is not set
++# CONFIG_USB_SUPPORT is not set
++# CONFIG_MMC is not set
++# CONFIG_MEMSTICK is not set
++# CONFIG_ACCESSIBILITY is not set
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=y
++
++#
++# LED drivers
++#
++CONFIG_LEDS_GPIO=y
++CONFIG_LEDS_GPIO_PLATFORM=y
++
++#
++# LED Triggers
++#
++CONFIG_LEDS_TRIGGERS=y
++# CONFIG_LEDS_TRIGGER_TIMER is not set
++CONFIG_LEDS_TRIGGER_HEARTBEAT=y
++# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
++# CONFIG_LEDS_TRIGGER_GPIO is not set
++# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
++
++#
++# iptables trigger is under Netfilter config (LED target)
++#
++CONFIG_RTC_LIB=y
++# CONFIG_RTC_CLASS is not set
++# CONFIG_DMADEVICES is not set
++# CONFIG_AUXDISPLAY is not set
++# CONFIG_REGULATOR is not set
++# CONFIG_UIO is not set
++# CONFIG_STAGING is not set
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=m
++# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
++CONFIG_EXT3_FS_XATTR=y
++CONFIG_EXT3_FS_POSIX_ACL=y
++# CONFIG_EXT3_FS_SECURITY is not set
++# CONFIG_EXT4_FS 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=y
++CONFIG_FILE_LOCKING=y
++# CONFIG_XFS_FS is not set
++# CONFIG_GFS2_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_BTRFS_FS is not set
++CONFIG_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
++
++#
++# Caches
++#
++# CONFIG_FSCACHE is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=y
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++# 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=m
++# CONFIG_NTFS_DEBUG is not set
++CONFIG_NTFS_RW=y
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_SYSCTL=y
++CONFIG_PROC_PAGE_MONITOR=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_TMPFS_POSIX_ACL is not set
++# CONFIG_HUGETLB_PAGE is not set
++CONFIG_CONFIGFS_FS=y
++CONFIG_MISC_FILESYSTEMS=y
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_JFFS2_FS=y
++CONFIG_JFFS2_FS_DEBUG=0
++CONFIG_JFFS2_FS_WRITEBUFFER=y
++# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
++CONFIG_JFFS2_SUMMARY=y
++# CONFIG_JFFS2_FS_XATTR is not set
++# CONFIG_JFFS2_COMPRESSION_OPTIONS 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_SQUASHFS is not set
++# CONFIG_VXFS_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_OMFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_ROMFS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++# CONFIG_NILFS2_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_ROOT_NFS=y
++# CONFIG_NFSD is not set
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_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 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 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++CONFIG_NLS_CODEPAGE_850=y
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++CONFIG_NLS_CODEPAGE_1250=m
++# CONFIG_NLS_CODEPAGE_1251 is not set
++CONFIG_NLS_ASCII=m
++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=y
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++CONFIG_NLS_UTF8=y
++# CONFIG_DLM is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_ENABLE_WARN_DEPRECATED=y
++CONFIG_ENABLE_MUST_CHECK=y
++CONFIG_FRAME_WARN=1024
++CONFIG_MAGIC_SYSRQ=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_BOOTPARAM_SOFTLOCKUP_PANIC=y
++CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
++CONFIG_DETECT_HUNG_TASK=y
++CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
++CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
++# CONFIG_SCHED_DEBUG is not set
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_TIMER_STATS is not set
++# CONFIG_DEBUG_OBJECTS is not set
++CONFIG_DEBUG_SLAB=y
++CONFIG_DEBUG_SLAB_LEAK=y
++# CONFIG_DEBUG_PREEMPT is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_LOCK_STAT is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++CONFIG_DEBUG_BUGVERBOSE=y
++# CONFIG_DEBUG_INFO is not set
++# CONFIG_DEBUG_VM is not set
++# CONFIG_DEBUG_WRITECOUNT is not set
++# CONFIG_DEBUG_MEMORY_INIT is not set
++# CONFIG_DEBUG_LIST is not set
++# CONFIG_DEBUG_SG is not set
++# CONFIG_DEBUG_NOTIFIERS is not set
++# CONFIG_BOOT_PRINTK_DELAY is not set
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_RCU_CPU_STALL_DETECTOR is not set
++# CONFIG_BACKTRACE_SELF_TEST is not set
++# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
++# CONFIG_FAULT_INJECTION is not set
++# CONFIG_LATENCYTOP is not set
++# CONFIG_SYSCTL_SYSCALL_CHECK is not set
++# CONFIG_PAGE_POISONING is not set
++CONFIG_HAVE_FUNCTION_TRACER=y
++CONFIG_TRACING_SUPPORT=y
++
++#
++# Tracers
++#
++# CONFIG_FUNCTION_TRACER is not set
++# CONFIG_IRQSOFF_TRACER is not set
++# CONFIG_PREEMPT_TRACER is not set
++# CONFIG_SCHED_TRACER is not set
++# CONFIG_CONTEXT_SWITCH_TRACER is not set
++# CONFIG_EVENT_TRACER is not set
++# CONFIG_BOOT_TRACER is not set
++# CONFIG_TRACE_BRANCH_PROFILING is not set
++# CONFIG_STACK_TRACER is not set
++# CONFIG_KMEMTRACE is not set
++# CONFIG_WORKQUEUE_TRACER is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++# CONFIG_SAMPLES is not set
++CONFIG_HAVE_ARCH_KGDB=y
++# CONFIG_KGDB is not set
++CONFIG_ARM_UNWIND=y
++CONFIG_DEBUG_USER=y
++CONFIG_DEBUG_ERRORS=y
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_LL is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++# CONFIG_SECURITYFS is not set
++# CONFIG_SECURITY_FILE_CAPABILITIES is not set
++CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
++# CONFIG_CRYPTO_FIPS is not set
++CONFIG_CRYPTO_ALGAPI=y
++CONFIG_CRYPTO_ALGAPI2=y
++CONFIG_CRYPTO_AEAD2=y
++CONFIG_CRYPTO_BLKCIPHER=y
++CONFIG_CRYPTO_BLKCIPHER2=y
++CONFIG_CRYPTO_HASH=y
++CONFIG_CRYPTO_HASH2=y
++CONFIG_CRYPTO_RNG2=y
++CONFIG_CRYPTO_PCOMP=y
++CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_MANAGER2=y
++# CONFIG_CRYPTO_GF128MUL is not set
++# CONFIG_CRYPTO_NULL is not set
++CONFIG_CRYPTO_WORKQUEUE=y
++# CONFIG_CRYPTO_CRYPTD is not set
++# CONFIG_CRYPTO_AUTHENC is not set
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Authenticated Encryption with Associated Data
++#
++# CONFIG_CRYPTO_CCM is not set
++# CONFIG_CRYPTO_GCM is not set
++# CONFIG_CRYPTO_SEQIV is not set
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++# CONFIG_CRYPTO_CTR is not set
++# CONFIG_CRYPTO_CTS is not set
++CONFIG_CRYPTO_ECB=y
++# CONFIG_CRYPTO_LRW is not set
++# CONFIG_CRYPTO_PCBC is not set
++# CONFIG_CRYPTO_XTS is not set
++
++#
++# Hash modes
++#
++CONFIG_CRYPTO_HMAC=y
++# CONFIG_CRYPTO_XCBC is not set
++
++#
++# Digest
++#
++# CONFIG_CRYPTO_CRC32C is not set
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=y
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_RMD128 is not set
++# CONFIG_CRYPTO_RMD160 is not set
++# CONFIG_CRYPTO_RMD256 is not set
++# CONFIG_CRYPTO_RMD320 is not set
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++# CONFIG_CRYPTO_WP512 is not set
++
++#
++# Ciphers
++#
++CONFIG_CRYPTO_AES=y
++# CONFIG_CRYPTO_ANUBIS is not set
++CONFIG_CRYPTO_ARC4=y
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_CAMELLIA is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++CONFIG_CRYPTO_DES=y
++# CONFIG_CRYPTO_FCRYPT is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_SALSA20 is not set
++# CONFIG_CRYPTO_SEED is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++
++#
++# Compression
++#
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_ZLIB is not set
++# CONFIG_CRYPTO_LZO is not set
++
++#
++# Random Number Generation
++#
++# CONFIG_CRYPTO_ANSI_CPRNG is not set
++CONFIG_CRYPTO_HW=y
++# CONFIG_BINARY_PRINTF is not set
++
++#
++# Library routines
++#
++CONFIG_BITREVERSE=y
++CONFIG_GENERIC_FIND_LAST_BIT=y
++# CONFIG_CRC_CCITT is not set
++# CONFIG_CRC16 is not set
++# CONFIG_CRC_T10DIF is not set
++# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC32=y
++# CONFIG_CRC7 is not set
++# CONFIG_LIBCRC32C is not set
++CONFIG_ZLIB_INFLATE=y
++CONFIG_ZLIB_DEFLATE=y
++CONFIG_DECOMPRESS_GZIP=y
++CONFIG_HAS_IOMEM=y
++CONFIG_HAS_IOPORT=y
++CONFIG_HAS_DMA=y
++CONFIG_NLATTR=y
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/Kconfig linux-2.6.30-rc4-karo/arch/arm/mach-mx2/Kconfig
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/Kconfig 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/Kconfig 2009-06-02 17:05:27.000000000 +0200
+@@ -6,14 +6,26 @@ choice
+
+ config MACH_MX21
+ bool "i.MX21 support"
++ select ARCH_MXC_IOMUX_V2
++ select ARCH_MXC_HAS_NFC_V1
+ help
+ This enables support for Freescale's MX2 based i.MX21 processor.
+
+ config MACH_MX27
+ bool "i.MX27 support"
++ select ARCH_MXC_IOMUX_V2
++ select ARCH_MXC_HAS_NFC_V1
+ help
+ This enables support for Freescale's MX2 based i.MX27 processor.
+
++config MACH_MX25
++ bool "i.MX25 support"
++ select ARCH_MXC_IOMUX_V3
++ select ARCH_MXC_HAS_NFC_V2_1
++ select PHYLIB if FEC
++ help
++ This enables support for Freescale's MX2 based i.MX25 processor.
++
+ endchoice
+
+ comment "MX2 platforms:"
+@@ -39,6 +51,26 @@ config MACH_PCM038
+ Include support for phyCORE-i.MX27 (aka pcm038) platform. This
+ includes specific configurations for the module and its peripherals.
+
++config MACH_TX25
++ bool "Support Ka-Ro electronics TX25 module"
++ depends on MACH_MX25
++ help
++ Include support for Ka-Ro TX25 processor module
++
++config KARO_DEBUG
++ bool "Enable Ka-Ro specific debug messages"
++ depends on MACH_TX25 || MACH_TX27
++ help
++ Compile the architecture specific files with -DDEBUG to enable
++ additional debug messages
++
++config MACH_STK5_BASEBOARD
++ bool "Ka-Ro Starterkit-5 (STK5) development board"
++ depends on MACH_TX27 || MACH_TX25
++ help
++ This adds board specific devices that can be found on Ka-Ro's
++ STK5 evaluation board.
++
+ choice
+ prompt "Baseboard"
+ depends on MACH_PCM038
+@@ -60,3 +92,4 @@ config MACH_MX27_3DS
+ Include support for MX27PDK platform. This includes specific
+ configurations for the board and its peripherals.
+ endif
++
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/Makefile linux-2.6.30-rc4-karo/arch/arm/mach-mx2/Makefile
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/Makefile 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/Makefile 2009-06-02 17:05:27.000000000 +0200
+@@ -2,17 +2,31 @@
+ # Makefile for the linux kernel.
+ #
+
++ifeq ($(CONFIG_KARO_DEBUG),y)
++ EXTRA_CFLAGS += -DDEBUG
++endif
++
+ # Object file lists.
+
+-obj-y := generic.o devices.o serial.o
++obj-y := generic.o serial.o
++obj-$(CONFIG_MACH_MX25) += devices_mx25.o
++ifeq ($(CONFIG_MACH_MX25),)
++obj-y += devices.o
++endif
++
++obj-$(CONFIG_MACH_MX21) += clock_imx21.o
+
+-obj-$(CONFIG_MACH_MX21) += clock_imx21.o
++obj-$(CONFIG_MACH_MX25) += clock_imx25.o
++obj-$(CONFIG_MACH_MX25) += cpu_imx25.o
+
+-obj-$(CONFIG_MACH_MX27) += cpu_imx27.o
+-obj-$(CONFIG_MACH_MX27) += clock_imx27.o
++obj-$(CONFIG_MACH_MX27) += cpu_imx27.o
++obj-$(CONFIG_MACH_MX27) += clock_imx27.o
+
+-obj-$(CONFIG_MACH_MX21ADS) += mx21ads.o
+-obj-$(CONFIG_MACH_MX27ADS) += mx27ads.o
+-obj-$(CONFIG_MACH_PCM038) += pcm038.o
+-obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
+-obj-$(CONFIG_MACH_MX27_3DS) += mx27pdk.o
++obj-$(CONFIG_MACH_MX21ADS) += mx21ads.o
++obj-$(CONFIG_MACH_MX27ADS) += mx27ads.o
++obj-$(CONFIG_MACH_PCM038) += pcm038.o
++obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
++obj-$(CONFIG_MACH_MX27_3DS) += mx27pdk.o
++obj-$(CONFIG_MACH_TX27) += karo-tx27.o tx27_gpio.o
++obj-$(CONFIG_MACH_TX25) += karo-tx25.o
++obj-$(CONFIG_MACH_STK5_BASEBOARD) += stk5-baseboard.o
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/Makefile.boot linux-2.6.30-rc4-karo/arch/arm/mach-mx2/Makefile.boot
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/Makefile.boot 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/Makefile.boot 2009-06-02 17:05:27.000000000 +0200
+@@ -5,3 +5,7 @@ initrd_phys-$(CONFIG_MACH_MX21) := 0xC08
+ zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000
+ params_phys-$(CONFIG_MACH_MX27) := 0xA0000100
+ initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000
++
++zreladdr-$(CONFIG_MACH_MX25) := 0x80008000
++params_phys-$(CONFIG_MACH_MX25) := 0x80000100
++initrd_phys-$(CONFIG_MACH_MX25) := 0x80800000
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/clock_imx21.c linux-2.6.30-rc4-karo/arch/arm/mach-mx2/clock_imx21.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/clock_imx21.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/clock_imx21.c 2009-06-02 17:05:26.000000000 +0200
+@@ -890,7 +890,7 @@ static struct clk clko_clk = {
+ .con_id = n, \
+ .clk = &c, \
+ },
+-static struct clk_lookup lookups[] __initdata = {
++static struct clk_lookup lookups[] = {
+ /* It's unlikely that any driver wants one of them directly:
+ _REGISTER_CLOCK(NULL, "ckih", ckih_clk)
+ _REGISTER_CLOCK(NULL, "ckil", ckil_clk)
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/clock_imx25.c linux-2.6.30-rc4-karo/arch/arm/mach-mx2/clock_imx25.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/clock_imx25.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/clock_imx25.c 2009-06-02 17:05:26.000000000 +0200
+@@ -0,0 +1,1967 @@
++/*
++ * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/* based on mach-mx27/clock.c */
++
++#include <linux/clk.h>
++#include <linux/io.h>
++#include <linux/module.h>
++//#include <linux/spinlock.h>
++
++#include <asm/clkdev.h>
++//#include <asm/div64.h>
++
++#include <mach/clock.h>
++#include <mach/common.h>
++#include <mach/hardware.h>
++
++/* Register offsets */
++#define MXC_CCM_MPCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x00)
++#define MXC_CCM_UPCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x04)
++#define MXC_CCM_CCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x08)
++#define MXC_CCM_CGCR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x0C)
++#define MXC_CCM_CGCR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x10)
++#define MXC_CCM_CGCR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x14)
++#define MXC_CCM_PCDR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x18)
++#define MXC_CCM_PCDR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x1C)
++#define MXC_CCM_PCDR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x20)
++#define MXC_CCM_PCDR3 (IO_ADDRESS(CCM_BASE_ADDR) + 0x24)
++#define MXC_CCM_RCSR (IO_ADDRESS(CCM_BASE_ADDR) + 0x28)
++#define MXC_CCM_CRDR (IO_ADDRESS(CCM_BASE_ADDR) + 0x2C)
++#define MXC_CCM_DCVR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x30)
++#define MXC_CCM_DCVR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x34)
++#define MXC_CCM_DCVR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x38)
++#define MXC_CCM_DCVR3 (IO_ADDRESS(CCM_BASE_ADDR) + 0x3C)
++#define MXC_CCM_LTR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x40)
++#define MXC_CCM_LTR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x44)
++#define MXC_CCM_LTR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x48)
++#define MXC_CCM_LTR3 (IO_ADDRESS(CCM_BASE_ADDR) + 0x4C)
++#define MXC_CCM_LTBR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x50)
++#define MXC_CCM_LTBR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x54)
++#define MXC_CCM_PMCR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x58)
++#define MXC_CCM_PMCR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x5C)
++#define MXC_CCM_PMCR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x60)
++#define MXC_CCM_MCR (IO_ADDRESS(CCM_BASE_ADDR) + 0x64)
++
++#define MXC_CCM_MPCTL_BRMO (1 << 31)
++#define MXC_CCM_MPCTL_PD_OFFSET 26
++#define MXC_CCM_MPCTL_PD_MASK (0xf << 26)
++#define MXC_CCM_MPCTL_MFD_OFFSET 16
++#define MXC_CCM_MPCTL_MFD_MASK (0x3ff << 16)
++#define MXC_CCM_MPCTL_MFI_OFFSET 10
++#define MXC_CCM_MPCTL_MFI_MASK (0xf << 10)
++#define MXC_CCM_MPCTL_MFN_OFFSET 0
++#define MXC_CCM_MPCTL_MFN_MASK 0x3ff
++#define MXC_CCM_MPCTL_LF (1 << 15)
++
++#define MXC_CCM_UPCTL_BRMO (1 << 31)
++#define MXC_CCM_UPCTL_PD_OFFSET 26
++#define MXC_CCM_UPCTL_PD_MASK (0xf << 26)
++#define MXC_CCM_UPCTL_MFD_OFFSET 16
++#define MXC_CCM_UPCTL_MFD_MASK (0x3ff << 16)
++#define MXC_CCM_UPCTL_MFI_OFFSET 10
++#define MXC_CCM_UPCTL_MFI_MASK (0xf << 10)
++#define MXC_CCM_UPCTL_MFN_OFFSET 0
++#define MXC_CCM_UPCTL_MFN_MASK 0x3ff
++#define MXC_CCM_UPCTL_LF (1 << 15)
++
++#define MXC_CCM_CCTL_ARM_OFFSET 30
++#define MXC_CCM_CCTL_ARM_MASK (0x3 << 30)
++#define MXC_CCM_CCTL_AHB_OFFSET 28
++#define MXC_CCM_CCTL_AHB_MASK (0x3 << 28)
++#define MXC_CCM_CCTL_MPLL_RST (1 << 27)
++#define MXC_CCM_CCTL_UPLL_RST (1 << 26)
++#define MXC_CCM_CCTL_LP_CTL_OFFSET 24
++#define MXC_CCM_CCTL_LP_CTL_MASK (0x3 << 24)
++#define MXC_CCM_CCTL_LP_MODE_RUN (0x0 << 24)
++#define MXC_CCM_CCTL_LP_MODE_WAIT (0x1 << 24)
++#define MXC_CCM_CCTL_LP_MODE_DOZE (0x2 << 24)
++#define MXC_CCM_CCTL_LP_MODE_STOP (0x3 << 24)
++#define MXC_CCM_CCTL_UPLL_DISABLE (1 << 23)
++#define MXC_CCM_CCTL_MPLL_BYPASS (1 << 22)
++#define MXC_CCM_CCTL_USB_DIV_OFFSET 16
++#define MXC_CCM_CCTL_USB_DIV_MASK (0x3 << 16)
++#define MXC_CCM_CCTL_CG_CTRL (1 << 15)
++#define MXC_CCM_CCTL_ARM_SRC (1 << 14)
++
++#define MXC_CCM_CGCR0_HCLK_ATA_OFFSET (16 + 0)
++#define MXC_CCM_CGCR0_HCLK_BROM_OFFSET (16 + 1)
++#define MXC_CCM_CGCR0_HCLK_CSI_OFFSET (16 + 2)
++#define MXC_CCM_CGCR0_HCLK_EMI_OFFSET (16 + 3)
++#define MXC_CCM_CGCR0_HCLK_ESAI_OFFSET (16 + 4)
++#define MXC_CCM_CGCR0_HCLK_ESDHC1_OFFSET (16 + 5)
++#define MXC_CCM_CGCR0_HCLK_ESDHC2_OFFSET (16 + 6)
++#define MXC_CCM_CGCR0_HCLK_FEC_OFFSET (16 + 7)
++#define MXC_CCM_CGCR0_HCLK_LCDC_OFFSET (16 + 8)
++#define MXC_CCM_CGCR0_HCLK_RTIC_OFFSET (16 + 9)
++#define MXC_CCM_CGCR0_HCLK_SDMA_OFFSET (16 + 10)
++#define MXC_CCM_CGCR0_HCLK_SLCDC_OFFSET (16 + 11)
++#define MXC_CCM_CGCR0_HCLK_USBOTG_OFFSET (16 + 12)
++
++#define MXC_CCM_CGCR0_PER_CSI_OFFSET 0
++#define MXC_CCM_CGCR0_PER_EPIT_OFFSET 1
++#define MXC_CCM_CGCR0_PER_ESAI_OFFSET 2
++#define MXC_CCM_CGCR0_PER_ESDHC1_OFFSET 3
++#define MXC_CCM_CGCR0_PER_ESDHC2_OFFSET 4
++#define MXC_CCM_CGCR0_PER_GPT_OFFSET 5
++#define MXC_CCM_CGCR0_PER_I2C_OFFSET 6
++#define MXC_CCM_CGCR0_PER_LCDC_OFFSET 7
++#define MXC_CCM_CGCR0_PER_NFC_OFFSET 8
++#define MXC_CCM_CGCR0_PER_OWIRE_OFFSET 9
++#define MXC_CCM_CGCR0_PER_PWM_OFFSET 10
++#define MXC_CCM_CGCR0_PER_SIM1_OFFSET 11
++#define MXC_CCM_CGCR0_PER_SIM2_OFFSET 12
++#define MXC_CCM_CGCR0_PER_SSI1_OFFSET 13
++#define MXC_CCM_CGCR0_PER_SSI2_OFFSET 14
++#define MXC_CCM_CGCR0_PER_UART_OFFSET 15
++
++#define MXC_CCM_CGCR1_AUDMUX_OFFSET 0
++#define MXC_CCM_CGCR1_ATA_OFFSET 1
++#define MXC_CCM_CGCR1_CAN1_OFFSET 2
++#define MXC_CCM_CGCR1_CAN2_OFFSET 3
++#define MXC_CCM_CGCR1_CSI_OFFSET 4
++#define MXC_CCM_CGCR1_CSPI1_OFFSET 5
++#define MXC_CCM_CGCR1_CSPI2_OFFSET 6
++#define MXC_CCM_CGCR1_CSPI3_OFFSET 7
++#define MXC_CCM_CGCR1_DRYICE_OFFSET 8
++#define MXC_CCM_CGCR1_ECT_OFFSET 9
++#define MXC_CCM_CGCR1_EPIT1_OFFSET 10
++#define MXC_CCM_CGCR1_EPIT2_OFFSET 11
++#define MXC_CCM_CGCR1_ESAI_OFFSET 12
++#define MXC_CCM_CGCR1_ESDHC1_OFFSET 13
++#define MXC_CCM_CGCR1_ESDHC2_OFFSET 14
++#define MXC_CCM_CGCR1_FEC_OFFSET 15
++#define MXC_CCM_CGCR1_GPIO1_OFFSET 16
++#define MXC_CCM_CGCR1_GPIO2_OFFSET 17
++#define MXC_CCM_CGCR1_GPIO3_OFFSET 18
++#define MXC_CCM_CGCR1_GPT1_OFFSET 19
++#define MXC_CCM_CGCR1_GPT2_OFFSET 20
++#define MXC_CCM_CGCR1_GPT3_OFFSET 21
++#define MXC_CCM_CGCR1_GPT4_OFFSET 22
++#define MXC_CCM_CGCR1_I2C1_OFFSET 23
++#define MXC_CCM_CGCR1_I2C2_OFFSET 24
++#define MXC_CCM_CGCR1_I2C3_OFFSET 25
++#define MXC_CCM_CGCR1_IIM_OFFSET 26
++#define MXC_CCM_CGCR1_IOMUXC_OFFSET 27
++#define MXC_CCM_CGCR1_KPP_OFFSET 28
++#define MXC_CCM_CGCR1_LCDC_OFFSET 29
++#define MXC_CCM_CGCR1_OWIRE_OFFSET 30
++#define MXC_CCM_CGCR1_PWM1_OFFSET 31
++
++#define MXC_CCM_CGCR2_PWM2_OFFSET (32 - 32)
++#define MXC_CCM_CGCR2_PWM3_OFFSET (33 - 32)
++#define MXC_CCM_CGCR2_PWM4_OFFSET (34 - 32)
++#define MXC_CCM_CGCR2_RNGB_OFFSET (35 - 32)
++#define MXC_CCM_CGCR2_RTIC_OFFSET (36 - 32)
++#define MXC_CCM_CGCR2_SCC_OFFSET (37 - 32)
++#define MXC_CCM_CGCR2_SDMA_OFFSET (38 - 32)
++#define MXC_CCM_CGCR2_SIM1_OFFSET (39 - 32)
++#define MXC_CCM_CGCR2_SIM2_OFFSET (40 - 32)
++#define MXC_CCM_CGCR2_SLCDC_OFFSET (41 - 32)
++#define MXC_CCM_CGCR2_SPBA_OFFSET (42 - 32)
++#define MXC_CCM_CGCR2_SSI1_OFFSET (43 - 32)
++#define MXC_CCM_CGCR2_SSI2_OFFSET (44 - 32)
++#define MXC_CCM_CGCR2_TCHSCRN_OFFSET (45 - 32)
++#define MXC_CCM_CGCR2_UART1_OFFSET (46 - 32)
++#define MXC_CCM_CGCR2_UART2_OFFSET (47 - 32)
++#define MXC_CCM_CGCR2_UART3_OFFSET (48 - 32)
++#define MXC_CCM_CGCR2_UART4_OFFSET (49 - 32)
++#define MXC_CCM_CGCR2_UART5_OFFSET (50 - 32)
++#define MXC_CCM_CGCR2_WDOG_OFFSET (51 - 32)
++
++#define MXC_CCM_PCDR1_PERDIV1_MASK 0x3f
++
++#define MXC_CCM_MCR_USB_XTAL_MUX_OFFSET 31
++#define MXC_CCM_MCR_CLKO_EN_OFFSET 30
++#define MXC_CCM_MCR_CLKO_DIV_OFFSET 24
++#define MXC_CCM_MCR_CLKO_DIV_MASK (0x3F << 24)
++#define MXC_CCM_MCR_CLKO_SEL_OFFSET 20
++#define MXC_CCM_MCR_CLKO_SEL_MASK (0xF << 20)
++#define MXC_CCM_MCR_ESAI_CLK_MUX_OFFSET 19
++#define MXC_CCM_MCR_SSI2_CLK_MUX_OFFSET 18
++#define MXC_CCM_MCR_SSI1_CLK_MUX_OFFSET 17
++#define MXC_CCM_MCR_USB_CLK_MUX_OFFSET 16
++
++#define MXC_CCM_MCR_PER_CLK_MUX_MASK (0xFFFF << 0)
++
++#define OSC24M_CLK_FREQ 24000000 /* 24MHz reference clk */
++#define OSC32K_CLK_FREQ 32768 /* 32.768kHz oscillator in */
++
++static struct clk mpll_clk;
++static struct clk upll_clk;
++static struct clk ahb_clk;
++static struct clk upll_24610k_clk;
++
++static int _clk_enable(struct clk *clk)
++{
++ unsigned long reg;
++
++ if (!clk->enable_reg)
++ return 0;
++
++ reg = __raw_readl(clk->enable_reg);
++ reg |= 1 << clk->enable_shift;
++ __raw_writel(reg, clk->enable_reg);
++
++ return 0;
++}
++
++static void _clk_disable(struct clk *clk)
++{
++ unsigned long reg;
++
++ if (!clk->enable_reg)
++ return;
++
++ reg = __raw_readl(clk->enable_reg);
++ reg &= ~(1 << clk->enable_shift);
++ __raw_writel(reg, clk->enable_reg);
++}
++
++static int _clk_upll_enable(struct clk *clk)
++{
++ unsigned long reg;
++
++ reg = __raw_readl(MXC_CCM_CCTL);
++ reg &= ~MXC_CCM_CCTL_UPLL_DISABLE;
++ __raw_writel(reg, MXC_CCM_CCTL);
++
++ while (!(__raw_readl(MXC_CCM_UPCTL) & MXC_CCM_UPCTL_LF))
++ cpu_relax();
++
++ return 0;
++}
++
++static void _clk_upll_disable(struct clk *clk)
++{
++ unsigned long reg;
++
++ reg = __raw_readl(MXC_CCM_CCTL);
++ reg |= MXC_CCM_CCTL_UPLL_DISABLE;
++ __raw_writel(reg, MXC_CCM_CCTL);
++}
++
++static int _perclk_enable(struct clk *clk)
++{
++ unsigned long reg;
++
++ reg = __raw_readl(MXC_CCM_CGCR0);
++ reg |= 1 << clk->id;
++ __raw_writel(reg, MXC_CCM_CGCR0);
++
++ return 0;
++}
++
++static void _perclk_disable(struct clk *clk)
++{
++ unsigned long reg;
++
++ reg = __raw_readl(MXC_CCM_CGCR0);
++ reg &= ~(1 << clk->id);
++ __raw_writel(reg, MXC_CCM_CGCR0);
++}
++
++static int _clk_pll_set_rate(struct clk *clk, unsigned long rate)
++{
++ unsigned long reg;
++ signed long pd = 1; /* Pre-divider */
++ signed long mfi; /* Multiplication Factor (Integer part) */
++ signed long mfn; /* Multiplication Factor (Integer part) */
++ signed long mfd; /* Multiplication Factor (Denominator Part) */
++ signed long tmp;
++ unsigned long ref_freq = clk_get_rate(clk->parent);
++
++ while (((ref_freq / pd) * 10) > rate)
++ pd++;
++
++ /* the ref_freq/2 in the following is to round up */
++ mfi = (((rate / 2) * pd) + (ref_freq / 2)) / ref_freq;
++ if (mfi < 5 || mfi > 15)
++ return -EINVAL;
++
++ /* pick a mfd value that will work
++ * then solve for mfn */
++ mfd = ref_freq / 50000;
++
++ /*
++ * pll_freq * pd * mfd
++ * mfn = -------------------- - (mfi * mfd)
++ * 2 * ref_freq
++ */
++ /* the tmp/2 is for rounding */
++ tmp = ref_freq / 10000;
++ mfn = ((((((rate / 2) + (tmp / 2)) / tmp) * pd) * mfd) / 10000) -
++ (mfi * mfd);
++
++ printk(KERN_DEBUG "pll freq: %lu PD=%ld MFI=%ld MFD=%ld MFN=%ld (0x%03lx)\n",
++ rate, pd, mfi, mfd, mfn, (mfn + ((mfn < 0) ? 1024 : 0)) & 0x3ff);
++
++ mfn = (mfn + ((mfn < 0) ? 1024 : 0)) & 0x3ff;
++ pd--;
++ mfd--;
++
++ /* Change the Pll value */
++ reg = (mfi << MXC_CCM_MPCTL_MFI_OFFSET) |
++ (mfn << MXC_CCM_MPCTL_MFN_OFFSET) |
++ (mfd << MXC_CCM_MPCTL_MFD_OFFSET) |
++ (pd << MXC_CCM_MPCTL_PD_OFFSET);
++
++ if (clk == &mpll_clk) {
++ printk(KERN_DEBUG "Changing MPCTL from %08x to %08lx\n",
++ __raw_readl(MXC_CCM_MPCTL), reg);
++ } else if (clk == &upll_clk) {
++ printk(KERN_DEBUG "Changing UPCTL from %08x to %08lx\n",
++ __raw_readl(MXC_CCM_UPCTL), reg);
++ }
++ if (clk == &mpll_clk)
++ __raw_writel(reg, MXC_CCM_MPCTL);
++ else if (clk == &upll_clk)
++ __raw_writel(reg, MXC_CCM_UPCTL);
++ return 0;
++}
++
++static unsigned long _clk_pll_getrate(struct clk *clk)
++{
++ unsigned long rate;
++ signed long mfi, mfn, mfd, pdf;
++ unsigned long ref_clk;
++ unsigned long reg;
++
++ ref_clk = clk_get_rate(clk->parent);
++
++ if (clk == &mpll_clk) {
++ reg = __raw_readl(MXC_CCM_MPCTL);
++ pdf = (reg & MXC_CCM_MPCTL_PD_MASK) >> MXC_CCM_MPCTL_PD_OFFSET;
++ mfd = (reg & MXC_CCM_MPCTL_MFD_MASK) >> MXC_CCM_MPCTL_MFD_OFFSET;
++ mfi = (reg & MXC_CCM_MPCTL_MFI_MASK) >> MXC_CCM_MPCTL_MFI_OFFSET;
++ mfn = (reg & MXC_CCM_MPCTL_MFN_MASK) >> MXC_CCM_MPCTL_MFN_OFFSET;
++ } else if (clk == &upll_clk) {
++ reg = __raw_readl(MXC_CCM_UPCTL);
++ pdf = (reg & MXC_CCM_UPCTL_PD_MASK) >> MXC_CCM_UPCTL_PD_OFFSET;
++ mfd = (reg & MXC_CCM_UPCTL_MFD_MASK) >> MXC_CCM_UPCTL_MFD_OFFSET;
++ mfi = (reg & MXC_CCM_UPCTL_MFI_MASK) >> MXC_CCM_UPCTL_MFI_OFFSET;
++ mfn = (reg & MXC_CCM_UPCTL_MFN_MASK) >> MXC_CCM_UPCTL_MFN_OFFSET;
++ } else {
++ BUG(); /* oops */
++ }
++
++ mfi = (mfi < 5) ? 5 : mfi;
++ rate = 2LL * ref_clk * mfn;
++ do_div(rate, mfd + 1);
++ rate = 2LL * ref_clk * mfi + rate;
++ do_div(rate, pdf + 1);
++
++ return rate;
++}
++
++static unsigned long _clk_cpu_round_rate(struct clk *clk, unsigned long rate)
++{
++ int div = clk_get_rate(clk->parent) / rate;
++
++ if (clk_get_rate(clk->parent) % rate)
++ div++;
++
++ if (div > 4)
++ div = 4;
++
++ return clk_get_rate(clk->parent) / div;
++}
++
++static int _clk_cpu_set_rate(struct clk *clk, unsigned long rate)
++{
++ int div, reg;
++ unsigned long cctl = __raw_readl(MXC_CCM_CCTL);
++
++ div = clk_get_rate(clk->parent) / rate;
++
++ if (div > 4 || div < 1 || ((clk_get_rate(clk->parent) / div) != rate))
++ return -EINVAL;
++ div--;
++
++ reg = (cctl & ~MXC_CCM_CCTL_ARM_MASK) |
++ (div << MXC_CCM_CCTL_ARM_OFFSET);
++ __raw_writel(reg, MXC_CCM_CCTL);
++
++ return 0;
++}
++
++static unsigned long _clk_cpu_getrate(struct clk *clk)
++{
++ unsigned long div;
++ unsigned long cctl = __raw_readl(MXC_CCM_CCTL);
++ unsigned long rate;
++
++ div = (cctl & MXC_CCM_CCTL_ARM_MASK) >> MXC_CCM_CCTL_ARM_OFFSET;
++
++ rate = clk_get_rate(clk->parent) / (div + 1);
++
++ if (cctl & MXC_CCM_CCTL_ARM_SRC) {
++ rate *= 3;
++ rate /= 4;
++ }
++ return rate;
++}
++
++static unsigned long _clk_ahb_getrate(struct clk *clk)
++{
++ unsigned long div;
++ unsigned long cctl = __raw_readl(MXC_CCM_CCTL);
++
++ div = (cctl & MXC_CCM_CCTL_AHB_MASK) >> MXC_CCM_CCTL_AHB_OFFSET;
++
++ return clk_get_rate(clk->parent) / (div + 1);
++}
++
++static void __iomem *pcdr_a[4] = {
++ MXC_CCM_PCDR0, MXC_CCM_PCDR1, MXC_CCM_PCDR2, MXC_CCM_PCDR3
++};
++
++static unsigned long _clk_perclkx_getrate(struct clk *clk)
++{
++ unsigned long perclk_pdf;
++ unsigned long pcdr;
++
++ if (clk->id < 0 || clk->id > 15)
++ return 0;
++
++ pcdr = __raw_readl(pcdr_a[clk->id >> 2]);
++
++ perclk_pdf =
++ (pcdr >> ((clk->id & 3) << 3)) & MXC_CCM_PCDR1_PERDIV1_MASK;
++
++ return clk_get_rate(clk->parent) / (perclk_pdf + 1);
++}
++
++static unsigned long _clk_perclkx_round_rate(struct clk *clk,
++ unsigned long rate)
++{
++ unsigned long div;
++
++ div = clk_get_rate(clk->parent) / rate;
++ if (clk_get_rate(clk->parent) % rate)
++ div++;
++
++ if (div > 64)
++ div = 64;
++
++ return clk_get_rate(clk->parent) / div;
++}
++
++static int _clk_perclkx_set_rate(struct clk *clk, unsigned long rate)
++{
++ unsigned long reg;
++ unsigned long div;
++
++ if (clk->id < 0 || clk->id > 15)
++ return -EINVAL;
++
++ div = clk_get_rate(clk->parent) / rate;
++ printk(KERN_DEBUG "%s: perclk[%d] parent_rate=%lu rate=%lu div=%lu\n",
++ __FUNCTION__, clk->id, clk_get_rate(clk->parent), rate, div);
++ if (div > 64 || div < 1 || ((clk_get_rate(clk->parent) / div) != rate))
++ return -EINVAL;
++ div--;
++
++ reg =
++ __raw_readl(pcdr_a[clk->id >> 2]) & ~(MXC_CCM_PCDR1_PERDIV1_MASK <<
++ ((clk->id & 3) << 3));
++ reg |= div << ((clk->id & 3) << 3);
++ __raw_writel(reg, pcdr_a[clk->id >> 2]);
++
++ return 0;
++}
++
++static int _clk_perclkx_set_parent(struct clk *clk, struct clk *parent)
++{
++ unsigned long mcr;
++
++ if (clk->parent == parent)
++ return 0;
++ if (parent != &upll_clk && parent != &ahb_clk)
++ return -EINVAL;
++
++ clk->parent = parent;
++ mcr = __raw_readl(MXC_CCM_MCR);
++ if (parent == &upll_clk)
++ mcr |= (1 << clk->id);
++ else
++ mcr &= ~(1 << clk->id);
++
++ __raw_writel(mcr, MXC_CCM_MCR);
++
++ return 0;
++}
++
++static int _clk_perclkx_set_parent3(struct clk *clk, struct clk *parent)
++{
++ unsigned long mcr = __raw_readl(MXC_CCM_MCR);
++ int bit;
++
++ if (clk->parent == parent)
++ return 0;
++ if (parent != &upll_clk && parent != &ahb_clk &&
++ parent != &upll_24610k_clk)
++ return -EINVAL;
++
++ switch (clk->id) {
++ case 2:
++ bit = MXC_CCM_MCR_ESAI_CLK_MUX_OFFSET;
++ break;
++ case 13:
++ bit = MXC_CCM_MCR_SSI1_CLK_MUX_OFFSET;
++ break;
++ case 14:
++ bit = MXC_CCM_MCR_SSI2_CLK_MUX_OFFSET;
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ if (parent == &upll_24610k_clk) {
++ mcr |= bit;
++ __raw_writel(mcr, MXC_CCM_MCR);
++ clk->parent = parent;
++ } else {
++ mcr &= ~bit;
++ __raw_writel(mcr, MXC_CCM_MCR);
++ return _clk_perclkx_set_parent(clk, parent);
++ }
++
++ return 0;
++}
++
++static unsigned long _clk_ipg_getrate(struct clk *clk)
++{
++ return clk_get_rate(clk->parent) / 2; /* Always AHB / 2 */
++}
++
++/* Top-level clocks */
++static unsigned long ckih_rate = OSC24M_CLK_FREQ;
++
++static unsigned long clk_ckih_get_rate(struct clk *clk)
++{
++ return ckih_rate;
++}
++
++static unsigned long clk_ckil_get_rate(struct clk *clk)
++{
++ return OSC32K_CLK_FREQ;
++}
++
++static struct clk osc24m_clk = {
++ .get_rate = clk_ckih_get_rate,
++};
++
++static struct clk osc32k_clk = {
++ .get_rate = clk_ckil_get_rate,
++};
++
++static struct clk mpll_clk = {
++ .parent = &osc24m_clk,
++ .get_rate = _clk_pll_getrate,
++ .set_rate = _clk_pll_set_rate,
++};
++
++static struct clk upll_clk = {
++ .parent = &osc24m_clk,
++ .get_rate = _clk_pll_getrate,
++ .set_rate = _clk_pll_set_rate,
++ .enable = _clk_upll_enable,
++ .disable = _clk_upll_disable,
++};
++
++static unsigned long _clk_24610k_getrate(struct clk *clk)
++{
++ long long rate = clk_get_rate(clk->parent) * 2461LL;
++
++ do_div(rate, 24000);
++
++ return rate; /* Always (UPLL * 24.61 / 240) */
++}
++
++static struct clk upll_24610k_clk = {
++ .parent = &upll_clk,
++ .get_rate = _clk_24610k_getrate,
++};
++
++/* Mid-level clocks */
++
++static struct clk cpu_clk = { /* ARM clock */
++ .parent = &mpll_clk,
++ .set_rate = _clk_cpu_set_rate,
++ .get_rate = _clk_cpu_getrate,
++ .round_rate = _clk_cpu_round_rate,
++};
++
++static struct clk ahb_clk = { /* a.k.a. HCLK */
++ .parent = &cpu_clk,
++ .get_rate = _clk_ahb_getrate,
++};
++
++static struct clk ipg_clk = {
++ .parent = &ahb_clk,
++ .get_rate = _clk_ipg_getrate,
++};
++
++/* Bottom-level clocks */
++
++struct clk usbotg_clk = {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_USBOTG_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk rtic_clk = {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_RTIC_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk emi_clk = {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_EMI_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk brom_clk = {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_BROM_OFFSET,
++ .disable = _clk_disable,
++};
++
++static struct clk per_clk[] = {
++ {
++ .id = 0,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 1,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 2,
++ .parent = &ahb_clk, /* can be AHB or UPLL or 24.61MHz */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent3,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 3,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ },
++ {
++ .id = 4,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 5,
++ .parent = &upll_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 6,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 7,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 8,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 9,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 10,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 11,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 12,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 13,
++ .parent = &ahb_clk, /* can be AHB or UPLL or 24.61MHz */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent3,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 14,
++ .parent = &ahb_clk, /* can be AHB or UPLL or 24.61MHz */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent3,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++ {
++ .id = 15,
++ .parent = &ahb_clk, /* can be AHB or UPLL */
++ .round_rate = _clk_perclkx_round_rate,
++ .set_rate = _clk_perclkx_set_rate,
++ .set_parent = _clk_perclkx_set_parent,
++ .get_rate = _clk_perclkx_getrate,
++ .enable = _perclk_enable,
++ .disable = _perclk_disable,
++ },
++};
++
++struct clk nfc_clk = {
++ .id = 0,
++ .parent = &per_clk[8],
++};
++
++struct clk audmux_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_AUDMUX_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk ata_clk[] = {
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_ATA_OFFSET,
++ .disable = _clk_disable,
++ .secondary = &ata_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_ATA_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk can_clk[] = {
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_CAN1_OFFSET,
++ .disable = _clk_disable,
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_CAN2_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk csi_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[0],
++ .secondary = &csi_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_CSI_OFFSET,
++ .disable = _clk_disable,
++ .secondary = &csi_clk[2],
++ },
++ {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_CSI_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk cspi_clk[] = {
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_CSPI1_OFFSET,
++ .disable = _clk_disable,
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_CSPI2_OFFSET,
++ .disable = _clk_disable,
++ },
++ {
++ .id = 2,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_CSPI3_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk dryice_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_DRYICE_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk ect_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_ECT_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk epit1_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[1],
++ .secondary = &epit1_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_EPIT1_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk epit2_clk[] = {
++ {
++ .id = 1,
++ .parent = &per_clk[1],
++ .secondary = &epit2_clk[1],
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_EPIT2_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk esai_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[2],
++ .secondary = &esai_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_ESAI_OFFSET,
++ .disable = _clk_disable,
++ .secondary = &esai_clk[2],
++ },
++ {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_ESAI_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk esdhc1_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[3],
++ .secondary = &esdhc1_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_ESDHC1_OFFSET,
++ .disable = _clk_disable,
++ .secondary = &esdhc1_clk[2],
++ },
++ {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_ESDHC1_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk esdhc2_clk[] = {
++ {
++ .id = 1,
++ .parent = &per_clk[4],
++ .secondary = &esdhc2_clk[1],
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_ESDHC2_OFFSET,
++ .disable = _clk_disable,
++ .secondary = &esdhc2_clk[2],
++ },
++ {
++ .id = 1,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_ESDHC2_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk fec_clk[] = {
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_FEC_OFFSET,
++ .disable = _clk_disable,
++ .secondary = &fec_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_FEC_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk gpio_clk[] = {
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_GPIO1_OFFSET,
++ .disable = _clk_disable,
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_GPIO2_OFFSET,
++ .disable = _clk_disable,
++ },
++ {
++ .id = 2,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_GPIO3_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++static struct clk gpt1_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[5],
++ .secondary = &gpt1_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_GPT1_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++static struct clk gpt2_clk[] = {
++ {
++ .id = 1,
++ .parent = &per_clk[5],
++ .secondary = &gpt1_clk[1],
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_GPT2_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++static struct clk gpt3_clk[] = {
++ {
++ .id = 2,
++ .parent = &per_clk[5],
++ .secondary = &gpt1_clk[1],
++ },
++ {
++ .id = 2,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_GPT3_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++static struct clk gpt4_clk[] = {
++ {
++ .id = 3,
++ .parent = &per_clk[5],
++ .secondary = &gpt1_clk[1],
++ },
++ {
++ .id = 3,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_GPT4_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk i2c_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[6],
++ },
++ {
++ .id = 1,
++ .parent = &per_clk[6],
++ },
++ {
++ .id = 2,
++ .parent = &per_clk[6],
++ },
++};
++
++struct clk iim_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_IIM_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk iomuxc_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_IOMUXC_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk kpp_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_KPP_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk lcdc_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[7],
++ .secondary = &lcdc_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_LCDC_OFFSET,
++ .disable = _clk_disable,
++ .secondary = &lcdc_clk[2],
++ },
++ {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_LCDC_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk owire_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[9],
++ .secondary = &owire_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_OWIRE_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk pwm1_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[10],
++ .secondary = &pwm1_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR1,
++ .enable_shift = MXC_CCM_CGCR1_PWM1_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk pwm2_clk[] = {
++ {
++ .id = 1,
++ .parent = &per_clk[10],
++ .secondary = &pwm2_clk[1],
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_PWM2_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk pwm3_clk[] = {
++ {
++ .id = 2,
++ .parent = &per_clk[10],
++ .secondary = &pwm3_clk[1],
++ },
++ {
++ .id = 2,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_PWM3_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk pwm4_clk[] = {
++ {
++ .id = 3,
++ .parent = &per_clk[10],
++ .secondary = &pwm4_clk[1],
++ },
++ {
++ .id = 3,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_PWM3_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk rngb_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_RNGB_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk scc_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_SCC_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk sdma_clk[] = {
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_SDMA_OFFSET,
++ .disable = _clk_disable,
++ .secondary = &sdma_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_SDMA_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk sim1_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[11],
++ .secondary = &sim1_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_SIM1_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk sim2_clk[] = {
++ {
++ .id = 1,
++ .parent = &per_clk[12],
++ .secondary = &sim2_clk[1],
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_SIM2_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk slcdc_clk[] = {
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_SLCDC_OFFSET,
++ .disable = _clk_disable,
++ .secondary = &slcdc_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ahb_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR0,
++ .enable_shift = MXC_CCM_CGCR0_HCLK_SLCDC_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk spba_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_SPBA_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk ssi1_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[13],
++ .secondary = &ssi1_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_SSI1_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk ssi2_clk[] = {
++ {
++ .id = 1,
++ .parent = &per_clk[14],
++ .secondary = &ssi2_clk[1],
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_SSI2_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk tchscrn_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_TCHSCRN_OFFSET,
++ .disable = _clk_disable,
++};
++
++struct clk uart1_clk[] = {
++ {
++ .id = 0,
++ .parent = &per_clk[15],
++ .secondary = &uart1_clk[1],
++ },
++ {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_UART1_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk uart2_clk[] = {
++ {
++ .id = 1,
++ .parent = &per_clk[15],
++ .secondary = &uart2_clk[1],
++ },
++ {
++ .id = 1,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_UART2_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk uart3_clk[] = {
++ {
++ .id = 2,
++ .parent = &per_clk[15],
++ .secondary = &uart3_clk[1],
++ },
++ {
++ .id = 2,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_UART3_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk uart4_clk[] = {
++ {
++ .id = 3,
++ .parent = &per_clk[15],
++ .secondary = &uart4_clk[1],
++ },
++ {
++ .id = 3,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_UART4_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk uart5_clk[] = {
++ {
++ .id = 4,
++ .parent = &per_clk[15],
++ .secondary = &uart5_clk[1],
++ },
++ {
++ .id = 4,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_UART5_OFFSET,
++ .disable = _clk_disable,
++ },
++};
++
++struct clk wdog_clk = {
++ .id = 0,
++ .parent = &ipg_clk,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_CGCR2,
++ .enable_shift = MXC_CCM_CGCR2_WDOG_OFFSET,
++ .disable = _clk_disable,
++};
++
++static unsigned long _clk_usb_round_rate(struct clk *clk, unsigned long rate)
++{
++ unsigned long div;
++
++ div = clk_get_rate(clk->parent) / rate;
++ if (clk_get_rate(clk->parent) % rate)
++ div++;
++
++ if (div > 64)
++ return -EINVAL;
++
++ return clk_get_rate(clk->parent) / div;
++}
++
++static int _clk_usb_set_rate(struct clk *clk, unsigned long rate)
++{
++ unsigned long reg;
++ unsigned long div;
++
++ div = clk_get_rate(clk->parent) / rate;
++
++ if (clk_get_rate(clk->parent) / div != rate)
++ return -EINVAL;
++ if (div > 64)
++ return -EINVAL;
++
++ reg = __raw_readl(MXC_CCM_CCTL) & ~MXC_CCM_CCTL_USB_DIV_MASK;
++ reg |= (div - 1) << MXC_CCM_CCTL_USB_DIV_OFFSET;
++ __raw_writel(reg, MXC_CCM_MCR);
++
++ return 0;
++}
++
++static unsigned long _clk_usb_getrate(struct clk *clk)
++{
++ unsigned long div =
++ __raw_readl(MXC_CCM_MCR) & MXC_CCM_CCTL_USB_DIV_MASK;
++
++ div >>= MXC_CCM_CCTL_USB_DIV_OFFSET;
++
++ return clk_get_rate(clk->parent) / (div + 1);
++}
++
++static int _clk_usb_set_parent(struct clk *clk, struct clk *parent)
++{
++ unsigned long mcr;
++
++ if (clk->parent == parent)
++ return 0;
++ if (parent != &upll_clk && parent != &ahb_clk)
++ return -EINVAL;
++
++ clk->parent = parent;
++ mcr = __raw_readl(MXC_CCM_MCR);
++ if (parent == &ahb_clk)
++ mcr |= (1 << MXC_CCM_MCR_USB_CLK_MUX_OFFSET);
++ else
++ mcr &= ~(1 << MXC_CCM_MCR_USB_CLK_MUX_OFFSET);
++
++ __raw_writel(mcr, MXC_CCM_MCR);
++
++ return 0;
++}
++
++static struct clk usb_clk = {
++ .parent = &upll_clk,
++ .get_rate = _clk_usb_getrate,
++ .set_rate = _clk_usb_set_rate,
++ .round_rate = _clk_usb_round_rate,
++ .set_parent = _clk_usb_set_parent,
++};
++
++/* CLKO */
++
++static unsigned long _clk_clko_round_rate(struct clk *clk, unsigned long rate)
++{
++ unsigned long div;
++
++ div = clk_get_rate(clk->parent) / rate;
++ if (clk_get_rate(clk->parent) % rate)
++ div++;
++
++ if (div > 64)
++ return -EINVAL;
++
++ return clk_get_rate(clk->parent) / div;
++}
++
++static int _clk_clko_set_rate(struct clk *clk, unsigned long rate)
++{
++ unsigned long reg;
++ unsigned long div;
++
++ div = clk_get_rate(clk->parent) / rate;
++
++ if ((clk_get_rate(clk->parent) / div) != rate)
++ return -EINVAL;
++ if (div > 64)
++ return -EINVAL;
++
++ reg = __raw_readl(MXC_CCM_MCR) & ~MXC_CCM_MCR_CLKO_DIV_MASK;
++ reg |= (div - 1) << MXC_CCM_MCR_CLKO_DIV_OFFSET;
++ __raw_writel(reg, MXC_CCM_MCR);
++
++ return 0;
++}
++
++static unsigned long _clk_clko_getrate(struct clk *clk)
++{
++ unsigned long div = __raw_readl(MXC_CCM_MCR);
++
++ div &= MXC_CCM_MCR_CLKO_DIV_MASK;
++ div >>= MXC_CCM_MCR_CLKO_DIV_OFFSET;
++
++ return clk_get_rate(clk->parent) / (div + 1);
++}
++
++static struct clk *clko_sources[] = {
++ &osc32k_clk, /* 0x0 */
++ &osc24m_clk, /* 0x1 */
++ &cpu_clk, /* 0x2 */
++ &ahb_clk, /* 0x3 */
++ &ipg_clk, /* 0x4 */
++ NULL, /* 0x5 */
++ NULL, /* 0x6 */
++ NULL, /* 0x7 */
++ NULL, /* 0x8 */
++ NULL, /* 0x9 */
++ &per_clk[0], /* 0xA */
++ &per_clk[2], /* 0xB */
++ &per_clk[13], /* 0xC */
++ &per_clk[14], /* 0xD */
++ &usb_clk, /* 0xE */
++ NULL, /* 0xF */
++};
++
++#define NR_CLKO_SOURCES (sizeof(clko_sources) / sizeof(struct clk *))
++
++static int _clk_clko_set_parent(struct clk *clk, struct clk *parent)
++{
++ unsigned long reg;
++ struct clk **src;
++ int i;
++
++ if (clk->parent == parent)
++ return 0;
++ for (i = 0, src = clko_sources; i < NR_CLKO_SOURCES; i++, src++)
++ if (*src == parent)
++ break;
++
++ if (i == NR_CLKO_SOURCES)
++ return -EINVAL;
++
++ clk->parent = parent;
++
++ reg = __raw_readl(MXC_CCM_MCR) & ~MXC_CCM_MCR_CLKO_SEL_MASK;
++ reg |= i << MXC_CCM_MCR_CLKO_SEL_OFFSET;
++ __raw_writel(reg, MXC_CCM_MCR);
++
++ return 0;
++}
++
++static struct clk clko_clk = {
++ .set_rate = _clk_clko_set_rate,
++ .round_rate = _clk_clko_round_rate,
++ .set_parent = _clk_clko_set_parent,
++ .get_rate = _clk_clko_getrate,
++ .enable = _clk_enable,
++ .enable_reg = MXC_CCM_MCR,
++ .enable_shift = MXC_CCM_MCR_CLKO_EN_OFFSET,
++ .disable = _clk_disable,
++};
++
++#ifdef CONFIG_COMMON_CLKDEV
++#define _REGISTER_CLOCK(d, n, c) \
++ { \
++ .dev_id = d, \
++ .con_id = n, \
++ .clk = &c, \
++ },
++
++static struct clk_lookup lookups[] = {
++ _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk)
++ _REGISTER_CLOCK(NULL, "audmux", audmux_clk)
++ _REGISTER_CLOCK(NULL, "ata", ata_clk[0])
++ _REGISTER_CLOCK(NULL, "can", can_clk[0])
++ _REGISTER_CLOCK(NULL, "csi", csi_clk[0])
++ _REGISTER_CLOCK(NULL, "cspi.0", cspi_clk[0])
++ _REGISTER_CLOCK(NULL, "cspi.1", cspi_clk[1])
++ _REGISTER_CLOCK(NULL, "cspi.2", cspi_clk[2])
++ _REGISTER_CLOCK(NULL, "dryice", dryice_clk)
++ _REGISTER_CLOCK(NULL, "ect", ect_clk)
++ _REGISTER_CLOCK(NULL, "epit1", epit1_clk[0])
++ _REGISTER_CLOCK(NULL, "epit2", epit2_clk[0])
++ _REGISTER_CLOCK(NULL, "esai", esai_clk[0])
++ _REGISTER_CLOCK("mxc-mmc.0", NULL, esdhc1_clk[0])
++ _REGISTER_CLOCK("mxc-mmc.1", NULL, esdhc2_clk[0])
++ _REGISTER_CLOCK("fec.0", NULL, fec_clk[0])
++ _REGISTER_CLOCK(NULL, "gpio0", gpio_clk[0])
++ _REGISTER_CLOCK(NULL, "gpio1", gpio_clk[1])
++ _REGISTER_CLOCK(NULL, "gpio2", gpio_clk[2])
++ _REGISTER_CLOCK(NULL, "gpt1", gpt1_clk[0])
++ _REGISTER_CLOCK(NULL, "gpt2", gpt2_clk[0])
++ _REGISTER_CLOCK(NULL, "gpt3", gpt3_clk[0])
++ _REGISTER_CLOCK(NULL, "gpt4", gpt4_clk[0])
++ _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk[0])
++ _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk[1])
++ _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk[2])
++ _REGISTER_CLOCK(NULL, "iim", iim_clk)
++ _REGISTER_CLOCK(NULL, "iomuxc", iomuxc_clk)
++ _REGISTER_CLOCK(NULL, "kpp", kpp_clk)
++ _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk[0])
++ _REGISTER_CLOCK(NULL, "owire", owire_clk[0])
++ _REGISTER_CLOCK("mxc_pwm.0", NULL, pwm1_clk[0])
++ _REGISTER_CLOCK("mxc_pwm.1", NULL, pwm2_clk[0])
++ _REGISTER_CLOCK("mxc_pwm.2", NULL, pwm3_clk[0])
++ _REGISTER_CLOCK("mxc_pwm.3", NULL, pwm4_clk[0])
++ _REGISTER_CLOCK(NULL, "rngb", rngb_clk)
++ _REGISTER_CLOCK(NULL, "scc", scc_clk)
++ _REGISTER_CLOCK(NULL, "sdma", sdma_clk[0])
++ _REGISTER_CLOCK(NULL, "sim1", sim1_clk[0])
++ _REGISTER_CLOCK(NULL, "sim2", sim2_clk[0])
++ _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk[0])
++ _REGISTER_CLOCK(NULL, "spba", spba_clk)
++ _REGISTER_CLOCK(NULL, "ssi1", ssi1_clk[0])
++ _REGISTER_CLOCK(NULL, "ssi2", ssi2_clk[0])
++ _REGISTER_CLOCK(NULL, "tchscrn", tchscrn_clk)
++ _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk[0])
++ _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk[0])
++ _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk[0])
++ _REGISTER_CLOCK("imx-uart.3", NULL, uart4_clk[0])
++ _REGISTER_CLOCK("imx-uart.4", NULL, uart5_clk[0])
++ _REGISTER_CLOCK(NULL, "wdog", wdog_clk)
++ _REGISTER_CLOCK(NULL, "usb", usb_clk)
++ _REGISTER_CLOCK(NULL, "clko", clko_clk)
++ _REGISTER_CLOCK(NULL, "brom", brom_clk)
++};
++#else
++static struct clk *mxc_clks[] = {
++ &osc24m_clk,
++ &osc32k_clk,
++ &mpll_clk,
++ &upll_clk,
++ &cpu_clk,
++ &ahb_clk,
++ &ipg_clk,
++ &per_clk[0],
++ &per_clk[1],
++ &per_clk[2],
++ &per_clk[3],
++ &per_clk[4],
++ &per_clk[5],
++ &per_clk[6],
++ &per_clk[7],
++ &per_clk[8],
++ &per_clk[9],
++ &per_clk[10],
++ &per_clk[11],
++ &per_clk[12],
++ &per_clk[13],
++ &per_clk[14],
++ &per_clk[15],
++ &nfc_clk,
++ &audmux_clk,
++ &ata_clk[0],
++ &ata_clk[1],
++ &can_clk[0],
++ &can_clk[1],
++ &csi_clk[0],
++ &csi_clk[1],
++ &csi_clk[2],
++ &cspi_clk[0],
++ &cspi_clk[1],
++ &cspi_clk[2],
++ &dryice_clk,
++ &ect_clk,
++ &epit1_clk[0],
++ &epit1_clk[1],
++ &epit2_clk[0],
++ &epit2_clk[1],
++ &esai_clk[0],
++ &esai_clk[1],
++ &esai_clk[2],
++ &esdhc1_clk[0],
++ &esdhc1_clk[1],
++ &esdhc1_clk[2],
++ &esdhc2_clk[0],
++ &esdhc2_clk[1],
++ &esdhc2_clk[2],
++ &fec_clk[0],
++ &fec_clk[1],
++ &gpio_clk[0],
++ &gpio_clk[1],
++ &gpio_clk[2],
++ &gpt1_clk[0],
++ &gpt1_clk[1],
++ &gpt2_clk[0],
++ &gpt2_clk[1],
++ &gpt3_clk[0],
++ &gpt3_clk[1],
++ &gpt4_clk[0],
++ &gpt4_clk[1],
++ &i2c_clk[0],
++ &i2c_clk[1],
++ &i2c_clk[2],
++ &iim_clk,
++ &iomuxc_clk,
++ &kpp_clk,
++ &lcdc_clk[0],
++ &lcdc_clk[1],
++ &lcdc_clk[2],
++ &owire_clk[0],
++ &owire_clk[1],
++ &pwm1_clk[0],
++ &pwm1_clk[1],
++ &pwm2_clk[0],
++ &pwm2_clk[1],
++ &pwm3_clk[0],
++ &pwm3_clk[1],
++ &pwm4_clk[0],
++ &pwm4_clk[1],
++ &rngb_clk,
++ &scc_clk,
++ &sdma_clk[0],
++ &sdma_clk[1],
++ &sim1_clk[0],
++ &sim1_clk[1],
++ &sim2_clk[0],
++ &sim2_clk[1],
++ &slcdc_clk[0],
++ &slcdc_clk[1],
++ &spba_clk,
++ &ssi1_clk[0],
++ &ssi1_clk[1],
++ &ssi2_clk[0],
++ &ssi2_clk[1],
++ &tchscrn_clk,
++ &uart1_clk[0],
++ &uart1_clk[1],
++ &uart2_clk[0],
++ &uart2_clk[1],
++ &uart3_clk[0],
++ &uart3_clk[1],
++ &uart4_clk[0],
++ &uart4_clk[1],
++ &uart5_clk[0],
++ &uart5_clk[1],
++ &wdog_clk,
++ &usb_clk,
++ &clko_clk,
++};
++#endif
++
++int __init mx25_clocks_init(unsigned long fref)
++{
++ int i;
++
++#ifdef CONFIG_COMMON_CLKDEV
++ for (i = 0; i < ARRAY_SIZE(lookups); i++) {
++ printk(KERN_DEBUG "Registering clock '%s' '%s'\n",
++ lookups[i].dev_id ? lookups[i].dev_id : "",
++ lookups[i].con_id ? lookups[i].con_id : "");
++ clkdev_add(&lookups[i]);
++ }
++#else
++ struct clk **clkp;
++ for (clkp = mxc_clks; clkp < mxc_clks + ARRAY_SIZE(mxc_clks); clkp++)
++ clk_register(*clkp);
++#endif
++ ckih_rate = fref;
++#ifndef CONFIG_DEBUG_LL
++ /* Turn off all possible clocks */
++ __raw_writel((1 << MXC_CCM_CGCR0_HCLK_EMI_OFFSET), MXC_CCM_CGCR0);
++
++ __raw_writel((1 << MXC_CCM_CGCR1_GPT1_OFFSET) |
++ (1 << MXC_CCM_CGCR1_IIM_OFFSET), MXC_CCM_CGCR1);
++ __raw_writel(1 << MXC_CCM_CGCR2_SCC_OFFSET, MXC_CCM_CGCR2);
++#endif
++#if 1
++ /* Set all perclk sources to upll */
++ for (i = 0; i < ARRAY_SIZE(per_clk); i++) {
++ int ret;
++ unsigned long rate = per_clk[i].get_rate(&per_clk[i]);
++
++#ifdef CONFIG_DEBUG_LL
++ if (i == 15) {
++ printk(KERN_DEBUG "skipping per_clk[%d] rate=%lu\n", i, rate);
++ continue;
++ }
++#endif
++ {
++ unsigned long new_rate;
++
++ per_clk[i].set_parent(&per_clk[i], &upll_clk);
++ new_rate = per_clk[i].round_rate(&per_clk[i], rate);
++ if ((ret = per_clk[i].set_rate(&per_clk[i], new_rate)) < 0) {
++ printk(KERN_ERR "Error %d setting clk[%d] rate to %lu\n",
++ ret, i, new_rate);
++ }
++ }
++ }
++#endif
++ /* the NFC clock must be derived from AHB clock */
++ clk_set_parent(&per_clk[8], &ahb_clk);
++ clk_set_rate(&per_clk[8], clk_get_rate(&ahb_clk) / 6);
++
++ /* This will propagate to all children and init all the clock rates */
++#if 1
++ clk_enable(&uart1_clk[0]);
++#endif
++ clk_enable(&emi_clk);
++ clk_enable(&gpio_clk[0]);
++ clk_enable(&gpio_clk[1]);
++ clk_enable(&gpio_clk[2]);
++ clk_enable(&iim_clk);
++ clk_enable(&gpt1_clk[0]);
++ clk_enable(&iomuxc_clk);
++ clk_enable(&scc_clk);
++
++ pr_info("Clock input source is %ld\n", clk_get_rate(&osc24m_clk));
++
++ pr_info("CPU: %lu.%03luMHz\n",
++ clk_get_rate(&cpu_clk) / 1000000, clk_get_rate(&cpu_clk) / 1000 % 1000);
++ pr_info("AHB: %lu.%03luMHz\n",
++ clk_get_rate(&ahb_clk) / 1000000, clk_get_rate(&ahb_clk) / 1000 % 1000);
++ pr_info("MPLL: %lu.%03luMHz\n",
++ clk_get_rate(&mpll_clk) / 1000000, clk_get_rate(&mpll_clk) / 1000 % 1000);
++ pr_info("UPLL: %lu.%03luMHz\n",
++ clk_get_rate(&upll_clk) / 1000000, clk_get_rate(&upll_clk) / 1000 % 1000);
++ clk_set_rate(&mpll_clk, clk_get_rate(&mpll_clk));
++ clk_set_rate(&upll_clk, clk_get_rate(&upll_clk));
++
++ mxc_timer_init(&gpt1_clk[0]);
++ return 0;
++}
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/clock_imx27.c linux-2.6.30-rc4-karo/arch/arm/mach-mx2/clock_imx27.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/clock_imx27.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/clock_imx27.c 2009-06-02 17:05:26.000000000 +0200
+@@ -621,7 +621,7 @@ DEFINE_CLOCK1(csi_clk, 0, 0, 0,
+ .clk = &c, \
+ },
+
+-static struct clk_lookup lookups[] __initdata = {
++static struct clk_lookup lookups[] = {
+ _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
+ _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
+ _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/cpu_imx25.c linux-2.6.30-rc4-karo/arch/arm/mach-mx2/cpu_imx25.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/cpu_imx25.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/cpu_imx25.c 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,65 @@
++/*
++ * arch/arm/mach-mx2/cpu_mx25.c
++ *
++ * Copyright 2009 Lothar Wassmann <LW@KARO-electronics.de>
++ * derived from: cpu_mx27.c
++ * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2
++ * of the License, or (at your option) any later version.
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * 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.
++ */
++
++/*
++ * i.MX25 specific CPU detection code
++ */
++
++#include <linux/io.h>
++#include <linux/module.h>
++
++#include <mach/hardware.h>
++
++static int cpu_silicon_rev = -1;
++static int cpu_partnumber;
++
++#define IIM_PREV_REG IO_ADDRESS(IIM_BASE_ADDR + 0x20)
++#define IIM_SREV_REG IO_ADDRESS(IIM_BASE_ADDR + 0x24)
++
++static void query_silicon_parameter(void)
++{
++ cpu_partnumber = __raw_readl(IIM_PREV_REG) >> 3;
++ cpu_silicon_rev = __raw_readl(IIM_SREV_REG);
++
++ printk(KERN_DEBUG "CPU rev: 0x%02x chip_rev: 0x%02x\n",
++ cpu_partnumber, cpu_silicon_rev);
++ if (WARN_ON(cpu_partnumber != 0x1f)) {
++ printk(KERN_WARNING "Unsupported CPU rev: 0x%02x\n", cpu_partnumber);
++ }
++}
++
++/*
++ * Returns:
++ * the silicon revision of the cpu
++ * -EINVAL - not a mx25
++ */
++int mx25_revision(void)
++{
++ if (cpu_silicon_rev == -1)
++ query_silicon_parameter();
++
++ if (cpu_partnumber != 0x1f)
++ return -EINVAL;
++
++ return cpu_silicon_rev;
++}
++EXPORT_SYMBOL(mx25_revision);
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/crm_regs_mx25.h linux-2.6.30-rc4-karo/arch/arm/mach-mx2/crm_regs_mx25.h
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/crm_regs_mx25.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/crm_regs_mx25.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,190 @@
++/*
++ * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#ifndef __ARCH_ARM_MACH_MX25_CRM_REGS_H__
++#define __ARCH_ARM_MACH_MX25_CRM_REGS_H__
++
++#include <mach/hardware.h>
++
++/* Register offsets */
++#define MXC_CCM_MPCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x00)
++#define MXC_CCM_UPCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x04)
++#define MXC_CCM_CCTL (IO_ADDRESS(CCM_BASE_ADDR) + 0x08)
++#define MXC_CCM_CGCR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x0C)
++#define MXC_CCM_CGCR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x10)
++#define MXC_CCM_CGCR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x14)
++#define MXC_CCM_PCDR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x18)
++#define MXC_CCM_PCDR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x1C)
++#define MXC_CCM_PCDR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x20)
++#define MXC_CCM_PCDR3 (IO_ADDRESS(CCM_BASE_ADDR) + 0x24)
++#define MXC_CCM_RCSR (IO_ADDRESS(CCM_BASE_ADDR) + 0x28)
++#define MXC_CCM_CRDR (IO_ADDRESS(CCM_BASE_ADDR) + 0x2C)
++#define MXC_CCM_DCVR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x30)
++#define MXC_CCM_DCVR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x34)
++#define MXC_CCM_DCVR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x38)
++#define MXC_CCM_DCVR3 (IO_ADDRESS(CCM_BASE_ADDR) + 0x3C)
++#define MXC_CCM_LTR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x40)
++#define MXC_CCM_LTR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x44)
++#define MXC_CCM_LTR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x48)
++#define MXC_CCM_LTR3 (IO_ADDRESS(CCM_BASE_ADDR) + 0x4C)
++#define MXC_CCM_LTBR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x50)
++#define MXC_CCM_LTBR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x54)
++#define MXC_CCM_PMCR0 (IO_ADDRESS(CCM_BASE_ADDR) + 0x58)
++#define MXC_CCM_PMCR1 (IO_ADDRESS(CCM_BASE_ADDR) + 0x5C)
++#define MXC_CCM_PMCR2 (IO_ADDRESS(CCM_BASE_ADDR) + 0x60)
++#define MXC_CCM_MCR (IO_ADDRESS(CCM_BASE_ADDR) + 0x64)
++
++#define MXC_CCM_MPCTL_BRMO (1 << 31)
++#define MXC_CCM_MPCTL_PD_OFFSET 26
++#define MXC_CCM_MPCTL_PD_MASK (0xf << 26)
++#define MXC_CCM_MPCTL_MFD_OFFSET 16
++#define MXC_CCM_MPCTL_MFD_MASK (0x3ff << 16)
++#define MXC_CCM_MPCTL_MFI_OFFSET 10
++#define MXC_CCM_MPCTL_MFI_MASK (0xf << 10)
++#define MXC_CCM_MPCTL_MFN_OFFSET 0
++#define MXC_CCM_MPCTL_MFN_MASK 0x3ff
++#define MXC_CCM_MPCTL_LF (1 << 15)
++
++#define MXC_CCM_UPCTL_BRMO (1 << 31)
++#define MXC_CCM_UPCTL_PD_OFFSET 26
++#define MXC_CCM_UPCTL_PD_MASK (0xf << 26)
++#define MXC_CCM_UPCTL_MFD_OFFSET 16
++#define MXC_CCM_UPCTL_MFD_MASK (0x3ff << 16)
++#define MXC_CCM_UPCTL_MFI_OFFSET 10
++#define MXC_CCM_UPCTL_MFI_MASK (0xf << 10)
++#define MXC_CCM_UPCTL_MFN_OFFSET 0
++#define MXC_CCM_UPCTL_MFN_MASK 0x3ff
++#define MXC_CCM_UPCTL_LF (1 << 15)
++
++#define MXC_CCM_CCTL_ARM_OFFSET 30
++#define MXC_CCM_CCTL_ARM_MASK (0x3 << 30)
++#define MXC_CCM_CCTL_AHB_OFFSET 28
++#define MXC_CCM_CCTL_AHB_MASK (0x3 << 28)
++#define MXC_CCM_CCTL_MPLL_RST (1 << 27)
++#define MXC_CCM_CCTL_UPLL_RST (1 << 26)
++#define MXC_CCM_CCTL_LP_CTL_OFFSET 24
++#define MXC_CCM_CCTL_LP_CTL_MASK (0x3 << 24)
++#define MXC_CCM_CCTL_LP_MODE_RUN (0x0 << 24)
++#define MXC_CCM_CCTL_LP_MODE_WAIT (0x1 << 24)
++#define MXC_CCM_CCTL_LP_MODE_DOZE (0x2 << 24)
++#define MXC_CCM_CCTL_LP_MODE_STOP (0x3 << 24)
++#define MXC_CCM_CCTL_UPLL_DISABLE (1 << 23)
++#define MXC_CCM_CCTL_MPLL_BYPASS (1 << 22)
++#define MXC_CCM_CCTL_USB_DIV_OFFSET 16
++#define MXC_CCM_CCTL_USB_DIV_MASK (0x3 << 16)
++#define MXC_CCM_CCTL_CG_CTRL (1 << 15)
++#define MXC_CCM_CCTL_ARM_SRC (1 << 14)
++
++#define MXC_CCM_CGCR0_HCLK_ATA_OFFSET 16
++#define MXC_CCM_CGCR0_HCLK_BROM_OFFSET 17
++#define MXC_CCM_CGCR0_HCLK_CSI_OFFSET 18
++#define MXC_CCM_CGCR0_HCLK_EMI_OFFSET 19
++#define MXC_CCM_CGCR0_HCLK_ESAI_OFFSET 20
++#define MXC_CCM_CGCR0_HCLK_ESDHC1_OFFSET 21
++#define MXC_CCM_CGCR0_HCLK_ESDHC2_OFFSET 22
++#define MXC_CCM_CGCR0_HCLK_FEC_OFFSET 23
++#define MXC_CCM_CGCR0_HCLK_LCDC_OFFSET 24
++#define MXC_CCM_CGCR0_HCLK_RTIC_OFFSET 25
++#define MXC_CCM_CGCR0_HCLK_SDMA_OFFSET 26
++#define MXC_CCM_CGCR0_HCLK_SLCDC_OFFSET 27
++#define MXC_CCM_CGCR0_HCLK_USBOTG_OFFSET 28
++
++#define MXC_CCM_CGCR0_PER_CSI_OFFSET 0
++#define MXC_CCM_CGCR0_PER_EPIT_OFFSET 1
++#define MXC_CCM_CGCR0_PER_ESAI_OFFSET 2
++#define MXC_CCM_CGCR0_PER_ESDHC1_OFFSET 3
++#define MXC_CCM_CGCR0_PER_ESDHC2_OFFSET 4
++#define MXC_CCM_CGCR0_PER_GPT_OFFSET 5
++#define MXC_CCM_CGCR0_PER_I2C_OFFSET 6
++#define MXC_CCM_CGCR0_PER_LCDC_OFFSET 7
++#define MXC_CCM_CGCR0_PER_NFC_OFFSET 8
++#define MXC_CCM_CGCR0_PER_OWIRE_OFFSET 9
++#define MXC_CCM_CGCR0_PER_PWM_OFFSET 10
++#define MXC_CCM_CGCR0_PER_SIM1_OFFSET 11
++#define MXC_CCM_CGCR0_PER_SIM2_OFFSET 12
++#define MXC_CCM_CGCR0_PER_SSI1_OFFSET 13
++#define MXC_CCM_CGCR0_PER_SSI2_OFFSET 14
++#define MXC_CCM_CGCR0_PER_UART_OFFSET 15
++
++#define MXC_CCM_CGCR1_AUDMUX_OFFSET 0
++#define MXC_CCM_CGCR1_ATA_OFFSET 1
++#define MXC_CCM_CGCR1_CAN1_OFFSET 2
++#define MXC_CCM_CGCR1_CAN2_OFFSET 3
++#define MXC_CCM_CGCR1_CSI_OFFSET 4
++#define MXC_CCM_CGCR1_CSPI1_OFFSET 5
++#define MXC_CCM_CGCR1_CSPI2_OFFSET 6
++#define MXC_CCM_CGCR1_CSPI3_OFFSET 7
++#define MXC_CCM_CGCR1_DRYICE_OFFSET 8
++#define MXC_CCM_CGCR1_ECT_OFFSET 9
++#define MXC_CCM_CGCR1_EPIT1_OFFSET 10
++#define MXC_CCM_CGCR1_EPIT2_OFFSET 11
++#define MXC_CCM_CGCR1_ESAI_OFFSET 12
++#define MXC_CCM_CGCR1_ESDHC1_OFFSET 13
++#define MXC_CCM_CGCR1_ESDHC2_OFFSET 14
++#define MXC_CCM_CGCR1_FEC_OFFSET 15
++#define MXC_CCM_CGCR1_GPIO1_OFFSET 16
++#define MXC_CCM_CGCR1_GPIO2_OFFSET 17
++#define MXC_CCM_CGCR1_GPIO3_OFFSET 18
++#define MXC_CCM_CGCR1_GPT1_OFFSET 19
++#define MXC_CCM_CGCR1_GPT2_OFFSET 20
++#define MXC_CCM_CGCR1_GPT3_OFFSET 21
++#define MXC_CCM_CGCR1_GPT4_OFFSET 22
++#define MXC_CCM_CGCR1_I2C1_OFFSET 23
++#define MXC_CCM_CGCR1_I2C2_OFFSET 24
++#define MXC_CCM_CGCR1_I2C3_OFFSET 25
++#define MXC_CCM_CGCR1_IIM_OFFSET 26
++#define MXC_CCM_CGCR1_IOMUXC_OFFSET 27
++#define MXC_CCM_CGCR1_KPP_OFFSET 28
++#define MXC_CCM_CGCR1_LCDC_OFFSET 29
++#define MXC_CCM_CGCR1_OWIRE_OFFSET 30
++#define MXC_CCM_CGCR1_PWM1_OFFSET 31
++
++#define MXC_CCM_CGCR2_PWM2_OFFSET (32-32)
++#define MXC_CCM_CGCR2_PWM3_OFFSET (33-32)
++#define MXC_CCM_CGCR2_PWM4_OFFSET (34-32)
++#define MXC_CCM_CGCR2_RNGB_OFFSET (35-32)
++#define MXC_CCM_CGCR2_RTIC_OFFSET (36-32)
++#define MXC_CCM_CGCR2_SCC_OFFSET (37-32)
++#define MXC_CCM_CGCR2_SDMA_OFFSET (38-32)
++#define MXC_CCM_CGCR2_SIM1_OFFSET (39-32)
++#define MXC_CCM_CGCR2_SIM2_OFFSET (40-32)
++#define MXC_CCM_CGCR2_SLCDC_OFFSET (41-32)
++#define MXC_CCM_CGCR2_SPBA_OFFSET (42-32)
++#define MXC_CCM_CGCR2_SSI1_OFFSET (43-32)
++#define MXC_CCM_CGCR2_SSI2_OFFSET (44-32)
++#define MXC_CCM_CGCR2_TCHSCRN_OFFSET (45-32)
++#define MXC_CCM_CGCR2_UART1_OFFSET (46-32)
++#define MXC_CCM_CGCR2_UART2_OFFSET (47-32)
++#define MXC_CCM_CGCR2_UART3_OFFSET (48-32)
++#define MXC_CCM_CGCR2_UART4_OFFSET (49-32)
++#define MXC_CCM_CGCR2_UART5_OFFSET (50-32)
++#define MXC_CCM_CGCR2_WDOG_OFFSET (51-32)
++
++#define MXC_CCM_PCDR1_PERDIV1_MASK 0x3f
++
++#define MXC_CCM_RCSR_NF16B (1 << 14)
++
++#define MXC_CCM_MCR_USB_XTAL_MUX_OFFSET 31
++#define MXC_CCM_MCR_CLKO_EN_OFFSET 30
++#define MXC_CCM_MCR_CLKO_DIV_OFFSET 24
++#define MXC_CCM_MCR_CLKO_DIV_MASK (0x3F << 24)
++#define MXC_CCM_MCR_CLKO_SEL_OFFSET 20
++#define MXC_CCM_MCR_CLKO_SEL_MASK (0xF << 20)
++#define MXC_CCM_MCR_ESAI_CLK_MUX_OFFSET 19
++#define MXC_CCM_MCR_SSI2_CLK_MUX_OFFSET 18
++#define MXC_CCM_MCR_SSI1_CLK_MUX_OFFSET 17
++#define MXC_CCM_MCR_USB_CLK_MUX_OFFSET 16
++
++#define MXC_CCM_MCR_PER_CLK_MUX_MASK (0xFFFF << 0)
++
++#endif /* __ARCH_ARM_MACH_MX25_CRM_REGS_H__ */
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/devices.h linux-2.6.30-rc4-karo/arch/arm/mach-mx2/devices.h
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/devices.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/devices.h 2009-06-02 17:05:27.000000000 +0200
+@@ -20,3 +20,9 @@ extern struct platform_device mxc_i2c_de
+ extern struct platform_device mxc_i2c_device1;
+ extern struct platform_device mxc_sdhc_device0;
+ extern struct platform_device mxc_sdhc_device1;
++#ifdef CONFIG_MACH_MX25
++extern struct platform_device mx25_i2c_device0;
++extern struct platform_device mx25_i2c_device1;
++extern struct platform_device mx25_i2c_device2;
++extern struct platform_device mxc_sdhc_device2;
++#endif
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/devices_mx25.c linux-2.6.30-rc4-karo/arch/arm/mach-mx2/devices_mx25.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/devices_mx25.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/devices_mx25.c 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,402 @@
++/*
++ * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/gpio.h>
++#include <linux/spi/spi.h>
++
++#include <mach/hardware.h>
++#include <mach/mmc.h>
++#include <mach/spba.h>
++#include <mach/sdma.h>
++#include <mach/iomux.h>
++
++#include "sdma_script_code.h"
++
++#include "karo.h"
++
++void mx25_sdma_get_script_info(sdma_script_start_addrs * sdma_script_addr)
++{
++ sdma_script_addr->mxc_sdma_ap_2_ap_addr = ap_2_ap_ADDR;
++ sdma_script_addr->mxc_sdma_ap_2_bp_addr = -1;
++ sdma_script_addr->mxc_sdma_bp_2_ap_addr = -1;
++ sdma_script_addr->mxc_sdma_loopback_on_dsp_side_addr = -1;
++ sdma_script_addr->mxc_sdma_mcu_interrupt_only_addr = -1;
++
++ sdma_script_addr->mxc_sdma_firi_2_per_addr = -1;
++ sdma_script_addr->mxc_sdma_firi_2_mcu_addr = -1;
++ sdma_script_addr->mxc_sdma_per_2_firi_addr = -1;
++ sdma_script_addr->mxc_sdma_mcu_2_firi_addr = -1;
++
++ sdma_script_addr->mxc_sdma_uart_2_per_addr = uart_2_per_ADDR;
++ sdma_script_addr->mxc_sdma_uart_2_mcu_addr = uart_2_mcu_ADDR;
++ sdma_script_addr->mxc_sdma_per_2_app_addr = per_2_app_ADDR;
++ sdma_script_addr->mxc_sdma_mcu_2_app_addr = mcu_2_app_ADDR;
++
++ sdma_script_addr->mxc_sdma_per_2_per_addr = -1;
++
++ sdma_script_addr->mxc_sdma_uartsh_2_per_addr = uartsh_2_per_ADDR;
++ sdma_script_addr->mxc_sdma_uartsh_2_mcu_addr = uartsh_2_mcu_ADDR;
++ sdma_script_addr->mxc_sdma_per_2_shp_addr = per_2_shp_ADDR;
++ sdma_script_addr->mxc_sdma_mcu_2_shp_addr = mcu_2_shp_ADDR;
++
++ sdma_script_addr->mxc_sdma_ata_2_mcu_addr = ata_2_mcu_ADDR;
++ sdma_script_addr->mxc_sdma_mcu_2_ata_addr = mcu_2_ata_ADDR;
++
++ sdma_script_addr->mxc_sdma_app_2_per_addr = app_2_per_ADDR;
++ sdma_script_addr->mxc_sdma_app_2_mcu_addr = app_2_mcu_ADDR;
++ sdma_script_addr->mxc_sdma_shp_2_per_addr = shp_2_per_ADDR;
++ sdma_script_addr->mxc_sdma_shp_2_mcu_addr = shp_2_mcu_ADDR;
++
++ sdma_script_addr->mxc_sdma_mshc_2_mcu_addr = -1;
++ sdma_script_addr->mxc_sdma_mcu_2_mshc_addr = -1;
++
++ sdma_script_addr->mxc_sdma_spdif_2_mcu_addr = -1;
++ sdma_script_addr->mxc_sdma_mcu_2_spdif_addr = -1;
++
++ sdma_script_addr->mxc_sdma_asrc_2_mcu_addr = -1;
++
++ sdma_script_addr->mxc_sdma_dptc_dvfs_addr = -1;
++ sdma_script_addr->mxc_sdma_ext_mem_2_ipu_addr = ext_mem__ipu_ram_ADDR;
++ sdma_script_addr->mxc_sdma_descrambler_addr = -1;
++
++ sdma_script_addr->mxc_sdma_start_addr = (unsigned short *)sdma_code;
++ sdma_script_addr->mxc_sdma_ram_code_size = RAM_CODE_SIZE;
++ sdma_script_addr->mxc_sdma_ram_code_start_addr = RAM_CODE_START_ADDR;
++}
++
++#if defined(CONFIG_MXC_WATCHDOG) || defined(CONFIG_MXC_WATCHDOG_MODULE)
++static struct resource wdt_resources[] = {
++ {
++ .start = WDOG_BASE_ADDR,
++ .end = WDOG_BASE_ADDR + 0x2f,
++ .flags = IORESOURCE_MEM,
++ },
++};
++
++static struct platform_device mx25_wdt_device = {
++ .name = "mxc_wdt",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(wdt_resources),
++ .resource = wdt_resources,
++};
++
++static void mx25_init_wdt(void)
++{
++ (void)platform_device_register(&mx25_wdt_device);
++}
++#else
++static inline void mx25_init_wdt(void)
++{
++}
++#endif
++
++/*
++ * lcdc:
++ * - i.MX1: the basic controller
++ * - i.MX21: to be checked
++ * - i.MX27: like i.MX1, with slightly variations
++ */
++static struct resource mxc_fb[] = {
++ {
++ .start = LCDC_BASE_ADDR,
++ .end = LCDC_BASE_ADDR + 0xFFF,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .start = MXC_INT_LCDC,
++ .end = MXC_INT_LCDC,
++ .flags = IORESOURCE_IRQ,
++ }
++};
++
++/* mxc lcd driver */
++struct platform_device mxc_fb_device = {
++ .name = "imx-fb",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(mxc_fb),
++ .resource = mxc_fb,
++ .dev = {
++ .coherent_dma_mask = 0xFFFFFFFF,
++ },
++};
++
++/* SPI controller and device data */
++#if defined(CONFIG_SPI_MXC) || defined(CONFIG_SPI_MXC_MODULE)
++
++#ifdef CONFIG_SPI_MXC_SELECT1
++/*!
++ * Resource definition for the CSPI1
++ */
++static struct resource mx25_spi1_resources[] = {
++ [0] = {
++ .start = CSPI1_BASE_ADDR,
++ .end = CSPI1_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_CSPI1,
++ .end = MXC_INT_CSPI1,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/*! Platform Data for MXC CSPI1 */
++static struct mxc_spi_master mx25_spi1_data = {
++ .maxchipselect = 4,
++ .spi_version = 7,
++};
++
++/*! Device Definition for MXC CSPI1 */
++static struct platform_device mx25_spi1_device = {
++ .name = "mxc_spi",
++ .id = 0,
++ .dev = {
++ .platform_data = &mx25_spi1_data,
++ },
++ .num_resources = ARRAY_SIZE(mx25_spi1_resources),
++ .resource = mx25_spi1_resources,
++};
++
++#endif /* CONFIG_SPI_MXC_SELECT1 */
++
++#ifdef CONFIG_SPI_MXC_SELECT2
++/*!
++ * Resource definition for the CSPI2
++ */
++static struct resource mx25_spi2_resources[] = {
++ [0] = {
++ .start = CSPI2_BASE_ADDR,
++ .end = CSPI2_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_CSPI2,
++ .end = MXC_INT_CSPI2,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/*! Platform Data for MXC CSPI2 */
++static struct mxc_spi_master mx25_spi2_data = {
++ .maxchipselect = 4,
++ .spi_version = 7,
++};
++
++/*! Device Definition for MXC CSPI2 */
++static struct platform_device mx25_spi2_device = {
++ .name = "mxc_spi",
++ .id = 1,
++ .dev = {
++ .platform_data = &mx25_spi2_data,
++ },
++ .num_resources = ARRAY_SIZE(mx25_spi2_resources),
++ .resource = mx25_spi2_resources,
++};
++#endif /* CONFIG_SPI_MXC_SELECT2 */
++
++#ifdef CONFIG_SPI_MXC_SELECT3
++/*!
++ * Resource definition for the CSPI3
++ */
++static struct resource mx25_spi3_resources[] = {
++ [0] = {
++ .start = CSPI3_BASE_ADDR,
++ .end = CSPI3_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_CSPI3,
++ .end = MXC_INT_CSPI3,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/*! Platform Data for MXC CSPI3 */
++static struct mxc_spi_master mx25_spi3_data = {
++ .maxchipselect = 4,
++ .spi_version = 7,
++};
++
++/*! Device Definition for MXC CSPI3 */
++static struct platform_device mx25_spi3_device = {
++ .name = "mxc_spi",
++ .id = 2,
++ .dev = {
++ .platform_data = &mx25_spi3_data,
++ },
++ .num_resources = ARRAY_SIZE(mx25_spi3_resources),
++ .resource = mx25_spi3_resources,
++};
++#endif /* CONFIG_SPI_MXC_SELECT3 */
++
++static inline void mx25_init_spi(void)
++{
++ spba_take_ownership(SPBA_CSPI2, SPBA_MASTER_A);
++ spba_take_ownership(SPBA_CSPI3, SPBA_MASTER_A);
++
++#ifdef CONFIG_SPI_MXC_SELECT1
++ if (platform_device_register(&mx25_spi1_device) < 0)
++ printk(KERN_ERR "Error: Registering the SPI Controller_1\n");
++#endif /* CONFIG_SPI_MXC_SELECT1 */
++#ifdef CONFIG_SPI_MXC_SELECT2
++ if (platform_device_register(&mx25_spi2_device) < 0)
++ printk(KERN_ERR "Error: Registering the SPI Controller_2\n");
++#endif /* CONFIG_SPI_MXC_SELECT2 */
++#ifdef CONFIG_SPI_MXC_SELECT3
++ if (platform_device_register(&mx25_spi3_device) < 0)
++ printk(KERN_ERR "Error: Registering the SPI Controller_3\n");
++#endif /* CONFIG_SPI_MXC_SELECT3 */
++}
++#else
++static inline void mx25_init_spi(void)
++{
++}
++#endif
++
++/* I2C controller and device data */
++#if defined(CONFIG_I2C_IMX) || defined(CONFIG_I2C_IMX_MODULE)
++
++/*!
++ * Resource definition for the I2C1
++ */
++static struct resource mx25_i2c1_resources[] = {
++ [0] = {
++ .start = I2C_BASE_ADDR,
++ .end = I2C_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_I2C,
++ .end = MXC_INT_I2C,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/*!
++ * Resource definition for the I2C2
++ */
++static struct resource mx25_i2c2_resources[] = {
++ [0] = {
++ .start = I2C2_BASE_ADDR,
++ .end = I2C2_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_I2C2,
++ .end = MXC_INT_I2C2,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/*!
++ * Resource definition for the I2C3
++ */
++static struct resource mx25_i2c3_resources[] = {
++ [0] = {
++ .start = I2C3_BASE_ADDR,
++ .end = I2C3_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = MXC_INT_I2C3,
++ .end = MXC_INT_I2C3,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/*! Device Definition for MXC I2C1 */
++struct platform_device mx25_i2c_device0 = {
++ .name = "imx-i2c",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(mx25_i2c1_resources),
++ .resource = mx25_i2c1_resources,
++};
++
++struct platform_device mx25_i2c_device1 = {
++ .name = "imx-i2c",
++ .id = 1,
++ .num_resources = ARRAY_SIZE(mx25_i2c2_resources),
++ .resource = mx25_i2c2_resources,
++};
++
++struct platform_device mx25_i2c_device2 = {
++ .name = "imx-i2c",
++ .id = 2,
++ .num_resources = ARRAY_SIZE(mx25_i2c3_resources),
++ .resource = mx25_i2c3_resources,
++};
++#endif
++
++static struct mxc_gpio_port mx25_gpio_ports[] = {
++ {
++ .chip.label = "gpio-1",
++ .base = IO_ADDRESS(GPIO1_BASE_ADDR),
++ .irq = MXC_INT_GPIO1,
++ .virtual_irq_start = MXC_GPIO_IRQ_START,
++ },
++ {
++ .chip.label = "gpio-2",
++ .base = IO_ADDRESS(GPIO2_BASE_ADDR),
++ .irq = MXC_INT_GPIO2,
++ .virtual_irq_start = MXC_GPIO_IRQ_START + 1 * 32,
++ },
++ {
++ .chip.label = "gpio-3",
++ .base = IO_ADDRESS(GPIO3_BASE_ADDR),
++ .irq = MXC_INT_GPIO3,
++ .virtual_irq_start = MXC_GPIO_IRQ_START + 2 * 32,
++ },
++ {
++ .chip.label = "gpio-4",
++ .base = IO_ADDRESS(GPIO4_BASE_ADDR),
++ .irq = MXC_INT_GPIO4,
++ .virtual_irq_start = MXC_GPIO_IRQ_START + 3 * 32,
++ },
++};
++
++static inline void mx25_init_ssi(void)
++{
++ /* SPBA configuration for SSI - SDMA and MCU are set */
++ spba_take_ownership(SPBA_SSI1, SPBA_MASTER_A | SPBA_MASTER_C);
++ spba_take_ownership(SPBA_SSI2, SPBA_MASTER_A | SPBA_MASTER_C);
++}
++
++static struct platform_device mx25_dma_device = {
++ .name = "mxc_dma",
++ .id = 0,
++};
++
++static inline void mx25_init_dma(void)
++{
++ (void)platform_device_register(&mx25_dma_device);
++}
++
++static int __init mx25_init_devices(void)
++{
++ mx25_init_wdt();
++ mx25_init_spi();
++ mx25_init_dma();
++ mx25_init_ssi();
++
++ return 0;
++}
++arch_initcall(mx25_init_devices);
++
++int __init mxc_register_gpios(void)
++{
++ return mxc_gpio_init(mx25_gpio_ports, ARRAY_SIZE(mx25_gpio_ports));
++}
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/generic.c linux-2.6.30-rc4-karo/arch/arm/mach-mx2/generic.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/generic.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/generic.c 2009-06-02 17:05:27.000000000 +0200
+@@ -26,6 +26,7 @@
+ #include <asm/mach/map.h>
+
+ /* MX27 memory map definition */
++#if defined(CONFIG_MACH_MX27) || defined(CONFIG_MACH_MX21)
+ static struct map_desc mxc_io_desc[] __initdata = {
+ /*
+ * this fixed mapping covers:
+@@ -61,7 +62,7 @@ static struct map_desc mxc_io_desc[] __i
+ .pfn = __phys_to_pfn(X_MEMC_BASE_ADDR),
+ .length = X_MEMC_SIZE,
+ .type = MT_DEVICE
+- }
++ },
+ };
+
+ /*
+@@ -82,4 +83,46 @@ void __init mx27_map_io(void)
+
+ iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
+ }
++#endif
++
++#ifdef CONFIG_MACH_MX25
++static struct map_desc mx25_io_desc[] __initdata = {
++ {
++ .virtual = (unsigned long)X_MEMC_BASE_ADDR_VIRT,
++ .pfn = __phys_to_pfn(X_MEMC_BASE_ADDR),
++ .length = X_MEMC_SIZE,
++ .type = MT_DEVICE
++ },
++ {
++ .virtual = (unsigned long)ASIC_BASE_ADDR_VIRT,
++ .pfn = __phys_to_pfn(ASIC_BASE_ADDR),
++ .length = ASIC_SIZE,
++ .type = MT_DEVICE_NONSHARED
++ },
++ {
++ .virtual = (unsigned long)AIPS1_BASE_ADDR_VIRT,
++ .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
++ .length = AIPS1_SIZE,
++ .type = MT_DEVICE_NONSHARED
++ },
++ {
++ .virtual = (unsigned long)AIPS2_BASE_ADDR_VIRT,
++ .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
++ .length = AIPS2_SIZE,
++ .type = MT_DEVICE_NONSHARED
++ },
++ {
++ .virtual = (unsigned long)SPBA0_BASE_ADDR_VIRT,
++ .pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
++ .length = SPBA0_SIZE,
++ .type = MT_DEVICE_NONSHARED
++ },
++};
++
++void __init mx25_map_io(void)
++{
++ mxc_set_cpu_type(MXC_CPU_MX25);
+
++ iotable_init(mx25_io_desc, ARRAY_SIZE(mx25_io_desc));
++}
++#endif
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/karo-tx25.c linux-2.6.30-rc4-karo/arch/arm/mach-mx2/karo-tx25.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/karo-tx25.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/karo-tx25.c 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,1115 @@
++/*
++ * arch/arm/mach-mx2/karo-tx25.c
++ *
++ * Copyright (C) 2008 Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ * based on: arch/arm/mach-mx27ads.c (C) Freescale Semiconductor, 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
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the:
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
++ *
++ * This file adds support for the Ka-Ro electronics TX25 processor modules
++ */
++
++#include <linux/types.h>
++#include <linux/sched.h>
++#include <linux/interrupt.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/platform_device.h>
++#include <linux/input.h>
++#include <linux/clk.h>
++#include <linux/delay.h>
++#include <linux/fb.h>
++//#include <linux/i2c.h>
++//#include <linux/i2c/at24.h>
++#include <linux/spi/spi.h>
++#include <linux/serial_8250.h>
++#include <linux/fec_enet.h>
++#if defined(CONFIG_MTD) || defined(CONFIG_MTD_MODULE)
++#include <mtd/mtd-abi.h>
++#include <linux/mtd/map.h>
++#include <linux/mtd/partitions.h>
++#include <asm/mach/flash.h>
++#endif
++
++#include <linux/serial.h>
++#include <linux/fsl_devices.h>
++#include <linux/irq.h>
++#include <linux/mmc/host.h>
++#include <linux/leds.h>
++
++#include <asm/setup.h>
++#include <asm/irq.h>
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/time.h>
++#include <mach/common.h>
++#include <mach/hardware.h>
++#include <mach/gpio.h>
++#include <mach/iomux.h>
++#include <mach/irqs.h>
++#include <mach/clock.h>
++#include <mach/imxfb.h>
++//#include <mach/imx_spi.h>
++//#include <mach/i2c.h>
++#include <mach/mmc.h>
++#include <mach/imx-uart.h>
++#include <mach/mxc_nand.h>
++//#include <mach/ulpi.h>
++//#include <mach/mxc_ehci.h>
++//#include <mach/board-tx25.h>
++
++#include "crm_regs.h"
++#include "devices.h"
++#include "karo.h"
++
++#ifdef DEBUG
++int tx25_debug = 1;
++module_param(tx25_debug, int, S_IRUGO | S_IWUSR);
++#else
++static int tx25_debug;
++module_param(tx25_debug, int, 0);
++#endif
++
++//#include "karo.h"
++
++int karo_board_type = 0;
++int karo_mod_type = -1;
++
++
++#ifdef CONFIG_USB_EHCI_MXC
++
++#define SMSC_VENDOR_ID 0x0424
++#define USB3317_PROD_ID 0x0006
++#define ULPI_FCTL 7
++
++static inline const char *ulpi_name(void __iomem *view)
++{
++ if ((unsigned long)view & 0x400) {
++ return "USBH2";
++ } else {
++ return "USBOTG";
++ }
++}
++
++static int usb3317_init(void __iomem *view)
++{
++ int vid, pid, ret;
++#if 1
++ /* This is a kludge until we know why we sometimes read a wrong
++ * vendor or product ID!
++ */
++ int retries = 3;
++
++ retry:
++#endif
++ ret = ulpi_read(ISP1504_VID_HIGH, view);
++ if (ret < 0) {
++ goto err;
++ }
++ vid = ret << 8;
++
++ ret = ulpi_read(ISP1504_VID_LOW, view);
++ if (ret < 0) {
++ goto err;
++ }
++ vid |= ret;
++
++ ret = ulpi_read(ISP1504_PID_HIGH, view);
++ if (ret < 0) {
++ goto err;
++ }
++ pid = ret << 8;
++
++ ret = ulpi_read(ISP1504_PID_LOW, view);
++ if (ret < 0) {
++ goto err;
++ }
++ pid |= ret;
++
++ pr_info("ULPI on %s port Vendor ID 0x%x Product ID 0x%x\n",
++ ulpi_name(view), vid, pid);
++ if (vid != SMSC_VENDOR_ID || pid != USB3317_PROD_ID) {
++ if (retries-- < 0) {
++ pr_err("No USB3317 found\n");
++ return -ENODEV;
++ }
++ goto retry;
++ }
++ err:
++ if (ret < 0) {
++ printk(KERN_ERR "ULPI read on %s port failed with error %d\n",
++ ulpi_name(view), ret);
++ return ret;
++ }
++ return 0;
++}
++
++static int usb3317_set_vbus_power(void __iomem *view, int on)
++{
++ int ret;
++
++ DBG(0, "%s: Switching %s port VBUS power %s\n", __FUNCTION__,
++ ulpi_name(view), on ? "on" : "off");
++
++ if (on) {
++ ret = ulpi_set(DRV_VBUS_EXT | /* enable external Vbus */
++ DRV_VBUS | /* enable internal Vbus */
++ CHRG_VBUS, /* charge Vbus */
++ ISP1504_OTGCTL, view);
++ } else {
++ ret = ulpi_clear(DRV_VBUS_EXT | /* disable external Vbus */
++ DRV_VBUS, /* disable internal Vbus */
++ ISP1504_OTGCTL, view);
++ if (ret == 0) {
++ ret = ulpi_set(DISCHRG_VBUS, /* discharge Vbus */
++ ISP1504_OTGCTL, view);
++ }
++ }
++ if (ret < 0) {
++ printk(KERN_ERR "ULPI read on %s port failed with error %d\n",
++ ulpi_name(view), ret);
++ return ret;
++ }
++ return 0;
++}
++
++static int tx25_usbh2_init(struct platform_device *pdev)
++{
++ int ret;
++ u32 temp;
++ unsigned long flags;
++ void __iomem *view = IO_ADDRESS(OTG_BASE_ADDR + 0x570);
++
++ local_irq_save(flags);
++ temp = readl(IO_ADDRESS(OTG_BASE_ADDR) + 0x600);
++ temp &= ~((3 << 21) | (1 << 0));
++ temp |= (1 << 5) | (1 << 16) | (1 << 19) | (1 << 20);
++ writel(temp, IO_ADDRESS(OTG_BASE_ADDR) + 0x600);
++ local_irq_restore(flags);
++
++ /* select ULPI transceiver */
++ /* this must be done _before_ setting up the GPIOs! */
++ temp = readl(view + 0x14);
++ DBG(0, "%s: Changing USBH2_PORTSC1 from %08x to %08x\n", __FUNCTION__,
++ temp, (temp & ~(3 << 30)) | (2 << 30));
++ temp &= ~(3 << 30);
++ temp |= 2 << 30;
++ writel(temp, view + 0x14);
++
++ /* Set to Host mode */
++ temp = readl(view + 0x38);
++ DBG(0, "%s: Changing USBH2_USBMODE from %08x to %08x\n", __FUNCTION__,
++ temp, temp | 3);
++ writel(temp | 0x3, view + 0x38);
++
++ ret = gpio_usbh2_active();
++ if (ret != 0) {
++ return ret;
++ }
++
++ ret = usb3317_init(view);
++ if (ret != 0) {
++ goto err;
++ }
++ ret = usb3317_set_vbus_power(view, 1);
++ if (ret != 0) {
++ goto err;
++ }
++ return 0;
++
++ err:
++ gpio_usbh2_inactive();
++ return ret;
++}
++
++static int tx25_usbh2_exit(struct platform_device *pdev)
++{
++ gpio_usbh2_inactive();
++ return 0;
++}
++
++static struct mxc_usbh_platform_data tx25_usbh2_data = {
++ .init = tx25_usbh2_init,
++ .exit = tx25_usbh2_exit,
++};
++
++int tx25_usbh2_register(void)
++{
++ int ret;
++
++ ret = mxc_register_device(&mxc_ehci2, &tx25_usbh2_data);
++ return ret;
++}
++device_initcall(tx25_usbh2_register);
++#endif // CONFIG_USB_EHCI_MXC
++
++//#define FEC_MII_IRQ IRQ_GPIOD(8)
++
++#if defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE)
++static struct resource fec_resources[] = {
++ {
++ .start = FEC_BASE_ADDR,
++ .end = FEC_BASE_ADDR + 0x18f,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = FEC_BASE_ADDR + 0x200,
++ .end = FEC_BASE_ADDR + 0x30b,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = MXC_INT_FEC,
++ .end = MXC_INT_FEC,
++ .flags = IORESOURCE_IRQ,
++#ifdef FEC_MII_IRQ
++ }, {
++ .start = FEC_MII_IRQ,
++ .end = FEC_MII_IRQ,
++ .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++#endif
++ },
++};
++
++/*
++ * Setup GPIO for FEC device to be active
++ *
++ */
++static struct pad_desc karo_tx25_fec_gpios_off[] = {
++ MX25_PAD_FEC_MDC__GPIO_3_5,
++ MX25_PAD_FEC_MDIO__GPIO_3_6,
++ MX25_PAD_FEC_TDATA0__GPIO_3_7,
++ MX25_PAD_FEC_TDATA1__GPIO_3_8,
++ MX25_PAD_FEC_TX_EN__GPIO_3_9,
++ MX25_PAD_FEC_RDATA0__GPIO_3_10,
++ MX25_PAD_FEC_RDATA1__GPIO_3_11,
++ MX25_PAD_FEC_RX_DV__GPIO_3_12,
++ MX25_PAD_FEC_TX_CLK__GPIO_3_13,
++ MX25_PAD_D12__GPIO_4_8,
++ MX25_PAD_D10__GPIO_4_10,
++};
++
++static struct pad_desc karo_tx25_fec_pwr_gpios[] = {
++ MX25_PAD_D11__GPIO_4_9, /* FEC PHY power on pin */
++ MX25_PAD_D13__GPIO_4_7, /* FEC reset */
++};
++
++static struct pad_desc karo_tx25_fec_gpios_on[] = {
++ MX25_PAD_FEC_MDC__FEC_MDC,
++ MX25_PAD_FEC_MDIO__FEC_MDIO,
++ MX25_PAD_FEC_TDATA0__FEC_TDATA0,
++ MX25_PAD_FEC_TDATA1__FEC_TDATA1,
++ MX25_PAD_FEC_TX_EN__FEC_TX_EN,
++ MX25_PAD_FEC_RDATA0__FEC_RDATA0,
++ MX25_PAD_FEC_RDATA1__FEC_RDATA1,
++ MX25_PAD_FEC_RX_DV__FEC_RX_DV,
++ MX25_PAD_FEC_TX_CLK__FEC_TX_CLK,
++ MX25_PAD_D12__GPIO_4_8,
++ MX25_PAD_D10__GPIO_4_10,
++};
++
++static struct gpio_desc {
++ unsigned int gpio:7;
++ unsigned int dir:1;
++ unsigned int level:1;
++} karo_tx25_fec_strap_gpios[] = {
++ /* configure the PHY strap pins to the correct values */
++ { GPIO_PORTC | 5, 1, 0, },
++ { GPIO_PORTC | 6, 1, 0, },
++ { GPIO_PORTC | 7, 1, 0, },
++ { GPIO_PORTC | 8, 1, 0, },
++ { GPIO_PORTC | 9, 1, 0, },
++ { GPIO_PORTC | 10, 1, 1, },
++ { GPIO_PORTC | 11, 1, 1, },
++ { GPIO_PORTC | 12, 0, 1, },
++ { GPIO_PORTC | 13, 1, 0, },
++
++ { GPIO_PORTD | 8, 0, 0, },
++ { GPIO_PORTD | 10, 0, 0, },
++ { GPIO_PORTD | 9, 1, 1, },
++ { GPIO_PORTD | 7, 1, 0, },
++};
++
++#define TX25_FEC_PWR_GPIO (GPIO_PORTD | 9)
++#define TX25_FEC_RST_GPIO (GPIO_PORTD | 7)
++
++static int gpio_fec_active(void)
++{
++ int ret;
++ int i;
++
++#ifdef FEC_MII_IRQ
++ DBG(0, "%s: Using IRQ %d (GPIO %d) for MII\n", __FUNCTION__,
++ FEC_MII_IRQ, irq_to_gpio(FEC_MII_IRQ));
++
++ set_irq_type(FEC_MII_IRQ, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING);
++#endif
++ ret = mxc_iomux_v3_setup_multiple_pads(karo_tx25_fec_pwr_gpios,
++ ARRAY_SIZE(karo_tx25_fec_pwr_gpios));
++ if (ret) {
++ return ret;
++ }
++ /*
++ * If the PHY is already powered on, assume it has been
++ * correctly configured (by the boot loader)
++ */
++ if (0 && gpio_get_value(TX25_FEC_PWR_GPIO) &&
++ gpio_get_value(TX25_FEC_RST_GPIO)) {
++ ret = mxc_iomux_v3_setup_multiple_pads(karo_tx25_fec_gpios_on,
++ ARRAY_SIZE(karo_tx25_fec_gpios_on));
++ if (ret) {
++ mxc_iomux_v3_release_multiple_pads(karo_tx25_fec_pwr_gpios,
++ ARRAY_SIZE(karo_tx25_fec_pwr_gpios));
++ return ret;
++ }
++ } else {
++ /* switch PHY strap pins into required state */
++ ret = mxc_iomux_v3_setup_multiple_pads(karo_tx25_fec_gpios_off,
++ ARRAY_SIZE(karo_tx25_fec_gpios_off));
++ if (ret) {
++ mxc_iomux_v3_release_multiple_pads(karo_tx25_fec_pwr_gpios,
++ ARRAY_SIZE(karo_tx25_fec_pwr_gpios));
++ return ret;
++ }
++ DBG(0, "%s: Switching FEC PHY power on\n", __FUNCTION__);
++ //gpio_set_value(TX25_FEC_PWR_GPIO, 1);
++#if 0
++ while (1) {
++ gpio_set_value(TX25_FEC_PWR_GPIO, 1);
++ mdelay(1000);
++ gpio_set_value(TX25_FEC_PWR_GPIO, 0);
++ mdelay(1000);
++ }
++#endif
++ DBG(0, "%s: Asserting FEC PHY reset\n", __FUNCTION__);
++// gpio_set_value(TX25_FEC_RST_GPIO, 0);
++ for (i = 0; i < ARRAY_SIZE(karo_tx25_fec_strap_gpios); i++) {
++ struct gpio_desc *pd = &karo_tx25_fec_strap_gpios[i];
++
++ ret = gpio_request(pd->gpio, "FEC");
++ if (ret < 0) {
++ DBG(0, "%s: Failed to request GPIO%d_%d: %d\n",
++ __FUNCTION__, pd->gpio / 32 + 1, pd->gpio % 32, ret);
++ goto rel_mux;
++ }
++ if (pd->dir) {
++ gpio_direction_output(pd->gpio,
++ pd->level);
++ } else {
++ gpio_direction_input(pd->gpio);
++ }
++ }
++#ifdef DEBUG
++ for (i = 0; i < ARRAY_SIZE(karo_tx25_fec_strap_gpios); i++) {
++ struct gpio_desc *pd = &karo_tx25_fec_strap_gpios[i];
++ int grp = pd->gpio / 32 + 1;
++ int ofs = pd->gpio % 32;
++
++ if (pd->dir && pd->level != gpio_get_value(pd->gpio)) {
++ DBG(0, "%s: GPIO%d_%d is %d instead of %d\n", __FUNCTION__,
++ grp, ofs, gpio_get_value(pd->gpio),
++ pd->level);
++ }
++ }
++#endif
++ DBG(0, "%s: Delaying for 22ms\n", __FUNCTION__);
++ mdelay(22);
++ DBG(0, "%s: Deasserting FEC PHY reset\n", __FUNCTION__);
++ gpio_set_value(TX25_FEC_RST_GPIO, 1);
++#ifdef DEBUG
++ for (i = 0; i < ARRAY_SIZE(karo_tx25_fec_strap_gpios); i++) {
++ struct gpio_desc *pd = &karo_tx25_fec_strap_gpios[i];
++ int grp = pd->gpio / 32 + 1;
++ int ofs = pd->gpio % 32;
++
++ DBG(0, "%s: GPIO%d_%d is %d\n", __FUNCTION__,
++ grp, ofs, gpio_get_value(pd->gpio));
++ }
++#endif
++ mxc_iomux_v3_release_multiple_pads(karo_tx25_fec_gpios_off,
++ ARRAY_SIZE(karo_tx25_fec_gpios_off));
++ ret = mxc_iomux_v3_setup_multiple_pads(karo_tx25_fec_gpios_on,
++ ARRAY_SIZE(karo_tx25_fec_gpios_on));
++ if (ret) {
++ goto rel_gpio;
++ }
++#ifdef DEBUG
++ for (i = 0; i < ARRAY_SIZE(karo_tx25_fec_strap_gpios); i++) {
++ struct gpio_desc *pd = &karo_tx25_fec_strap_gpios[i];
++ int grp = pd->gpio / 32 + 1;
++ int ofs = pd->gpio % 32;
++
++ DBG(0, "%s: GPIO%d_%d is %d\n", __FUNCTION__,
++ grp, ofs, gpio_get_value(pd->gpio));
++ }
++#endif
++ }
++ return ret;
++
++ rel_mux:
++ mxc_iomux_v3_release_multiple_pads(karo_tx25_fec_gpios_off,
++ ARRAY_SIZE(karo_tx25_fec_gpios_off));
++ rel_gpio:
++ while (--i >= 0) {
++ struct gpio_desc *pd = &karo_tx25_fec_strap_gpios[i];
++#ifdef DEBUG
++ int grp = pd->gpio / 32 + 1;
++ int ofs = pd->gpio % 32;
++
++ DBG(0, "%s: Freeing GPIO%d_%d\n", __FUNCTION__,
++ grp, ofs);
++#endif
++ gpio_free(pd->gpio);
++ }
++ mxc_iomux_v3_release_multiple_pads(karo_tx25_fec_pwr_gpios,
++ ARRAY_SIZE(karo_tx25_fec_pwr_gpios));
++ return ret;
++}
++
++/*
++ * Setup GPIO for FEC device to be inactive
++ *
++ */
++static void gpio_fec_inactive(void)
++{
++ int i;
++
++ mxc_iomux_v3_release_multiple_pads(karo_tx25_fec_gpios_on,
++ ARRAY_SIZE(karo_tx25_fec_gpios_on));
++ mxc_iomux_v3_setup_multiple_pads(karo_tx25_fec_gpios_off,
++ ARRAY_SIZE(karo_tx25_fec_gpios_off));
++ DBG(0, "%s: Asserting FEC PHY reset\n", __FUNCTION__);
++ gpio_set_value(TX25_FEC_RST_GPIO, 0);
++ DBG(0, "%s: Switching FEC PHY power off\n", __FUNCTION__);
++ gpio_set_value(TX25_FEC_PWR_GPIO, 0);
++
++ mxc_iomux_v3_release_multiple_pads(karo_tx25_fec_gpios_off,
++ ARRAY_SIZE(karo_tx25_fec_gpios_off));
++ mxc_iomux_v3_release_multiple_pads(karo_tx25_fec_pwr_gpios,
++ ARRAY_SIZE(karo_tx25_fec_pwr_gpios));
++ for (i = 0; i < ARRAY_SIZE(karo_tx25_fec_strap_gpios); i++) {
++ struct gpio_desc *pd = &karo_tx25_fec_strap_gpios[i];
++#ifdef DEBUG
++ int grp = pd->gpio / 32 + 1;
++ int ofs = pd->gpio % 32;
++
++ DBG(0, "%s: Freeing GPIO%d_%d\n", __FUNCTION__,
++ grp, ofs);
++#endif
++ gpio_free(pd->gpio);
++ }
++}
++
++static struct clk *tx25_fec_clk;
++
++static int tx25_fec_suspend(struct platform_device *pdev)
++{
++ BUG_ON(tx25_fec_clk == NULL);
++ DBG(1, "%s: Switching FEC PHY off\n", __FUNCTION__);
++ gpio_fec_inactive();
++ clk_disable(tx25_fec_clk);
++ return 0;
++}
++
++static int tx25_fec_resume(struct platform_device *pdev)
++{
++ BUG_ON(tx25_fec_clk == NULL);
++ DBG(1, "%s: Switching FEC PHY on\n", __FUNCTION__);
++ clk_enable(tx25_fec_clk);
++ gpio_fec_active();
++ return 0;
++}
++
++#if 0
++/*
++ * i.MX25 allows RMII mode to be configured via a gasket
++ */
++#define FEC_MIIGSK_CFGR_FRCONT (1 << 6)
++#define FEC_MIIGSK_CFGR_LBMODE (1 << 4)
++#define FEC_MIIGSK_CFGR_EMODE (1 << 3)
++#define FEC_MIIGSK_CFGR_IF_MODE_MASK (3 << 0)
++#define FEC_MIIGSK_CFGR_IF_MODE_MII (0 << 0)
++#define FEC_MIIGSK_CFGR_IF_MODE_RMII (1 << 0)
++
++#define FEC_MIIGSK_ENR_READY (1 << 2)
++#define FEC_MIIGSK_ENR_EN (1 << 1)
++
++#include "../arch/arm/mach-mx25/crm_regs.h"
++static void __inline__ fec_localhw_setup(struct net_device *dev)
++{
++ struct fec_enet_private *fep = netdev_priv(dev);
++
++ /*
++ * Set up the MII gasket for RMII mode
++ */
++ printk("%s: enable RMII gasket\n", dev->name);
++
++ /* disable the gasket and wait */
++ fec_reg_write16(fep, FEC_MIIGSK_ENR, 0);
++ while (fec_reg_read16(fep, FEC_MIIGSK_ENR) & FEC_MIIGSK_ENR_READY)
++ udelay(1);
++
++ /* configure the gasket for RMII, 50 MHz, no loopback, no echo */
++ fec_reg_write16(fep, FEC_MIIGSK_CFGR, FEC_MIIGSK_CFGR_IF_MODE_RMII);
++
++ /* re-enable the gasket */
++ fec_reg_write16(fep, FEC_MIIGSK_ENR, FEC_MIIGSK_ENR_EN);
++ fec_reg_read16(fep, FEC_MIIGSK_CFGR);
++ fec_reg_read16(fep, FEC_MIIGSK_ENR);
++}
++#endif
++
++static int fec_arch_init(struct platform_device *pdev)
++{
++ int ret;
++
++ DBG(0, "%s: Activating FEC GPIOs\n", __FUNCTION__);
++ dump_regs();
++
++ ret = gpio_fec_active();
++ if (ret) {
++ printk(KERN_ERR "%s: could not enable FEC gpios: %d\n", __FUNCTION__, ret);
++ return ret;
++ }
++
++ BUG_ON(tx25_fec_clk != NULL);
++ tx25_fec_clk = clk_get(&pdev->dev, NULL);
++ if (unlikely(IS_ERR(tx25_fec_clk))) {
++ printk(KERN_ERR "Failed to get fec_clk\n");
++ return PTR_ERR(tx25_fec_clk);
++ }
++ DBG(0, "%s: Enabling FEC clock\n", __FUNCTION__);
++ clk_enable(tx25_fec_clk);
++ dump_regs();
++ return 0;
++}
++
++static void fec_arch_exit(struct platform_device *pdev)
++{
++ BUG_ON(tx25_fec_clk == NULL);
++ if (unlikely(IS_ERR(tx25_fec_clk))) {
++ printk(KERN_ERR "Failed to get fec_clk\n");
++ return;
++ }
++ DBG(0, "%s: Disabling FEC clock\n", __FUNCTION__);
++ clk_disable(tx25_fec_clk);
++ clk_put(tx25_fec_clk);
++ tx25_fec_clk = NULL;
++ DBG(0, "%s: Deactivating FEC GPIOs\n", __FUNCTION__);
++ gpio_fec_inactive();
++}
++
++static struct fec_enet_platform_data fec_data = {
++ .arch_init = fec_arch_init,
++ .arch_exit = fec_arch_exit,
++ .suspend = tx25_fec_suspend,
++ .resume = tx25_fec_resume,
++};
++
++static struct platform_device fec_device = {
++ .name = "fec",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(fec_resources),
++ .resource = fec_resources,
++ .dev = {
++ .platform_data = &fec_data,
++ .coherent_dma_mask = 0xFFFFFFFF,
++ },
++};
++#endif
++
++/* MTD NAND flash */
++#if defined(CONFIG_MTD_NAND_MXC) || defined(CONFIG_MTD_NAND_MXC_MODULE)
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V2
++static struct mtd_partition tx25_nand_partitions[] = {
++ {
++ .name = "RedBoot",
++ .offset = 0,
++ .size = 0x00040000,
++ }, {
++ .name = "kernel",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 0x001A0000,
++ }, {
++ .name = "rootfs",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 0x07E000000,
++ }, {
++ .name = "FIS directory",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 0x00003000,
++ .mask_flags = MTD_WRITEABLE,
++ }, {
++ .name = "RedBoot config",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 0x00001000,
++ .mask_flags = MTD_WRITEABLE,
++ },
++};
++
++static struct pad_desc karo_tx25_nand_pads[] = {
++ MX25_PAD_NF_CE0__NF_CE0,
++ MX25_PAD_NFWE_B__NFWE_B,
++ MX25_PAD_NFRE_B__NFRE_B,
++ MX25_PAD_NFALE__NFALE,
++ MX25_PAD_NFCLE__NFCLE,
++ MX25_PAD_NFWP_B__NFWP_B,
++ MX25_PAD_NFRB__NFRB,
++ MX25_PAD_D7__D7,
++ MX25_PAD_D6__D6,
++ MX25_PAD_D5__D5,
++ MX25_PAD_D4__D4,
++ MX25_PAD_D3__D3,
++ MX25_PAD_D2__D2,
++ MX25_PAD_D1__D1,
++ MX25_PAD_D0__D0,
++};
++
++static int tx25_nand_init(void)
++{
++ int ret;
++
++ DBG(0, "%s: Configuring NAND pins\n", __FUNCTION__);
++ ret = mxc_iomux_v3_setup_multiple_pads(karo_tx25_nand_pads,
++ ARRAY_SIZE(karo_tx25_nand_pads));
++ if (ret) {
++ return ret;
++ }
++ return 0;
++}
++
++static void tx25_nand_exit(void)
++{
++ mxc_iomux_v3_release_multiple_pads(karo_tx25_nand_pads,
++ ARRAY_SIZE(karo_tx25_nand_pads));
++}
++
++static struct flash_platform_data tx25_nand_data = {
++ .map_name = "nand_probe",
++ .name = "tx25-nand",
++ .parts = tx25_nand_partitions,
++ .nr_parts = ARRAY_SIZE(tx25_nand_partitions),
++ .width = 1,
++ .init = tx25_nand_init,
++ .exit = tx25_nand_exit,
++};
++#else
++static struct mxc_nand_platform_data tx25_nand_data = {
++ .hw_ecc = 1,
++ .width = 1,
++};
++#endif
++
++static struct resource tx25_nand_resources[] = {
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V1_1
++ {
++ .start = NFC_BASE_ADDR + 0x1e00,
++ .end = NFC_BASE_ADDR + 0x1e2f,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = NFC_BASE_ADDR,
++ .end = NFC_BASE_ADDR + 0x11ff,
++ .flags = IORESOURCE_MEM,
++#else
++ {
++ .start = NFC_BASE_ADDR,
++ .end = NFC_BASE_ADDR + 0x1e2f,
++ .flags = IORESOURCE_MEM,
++#endif
++ }, {
++ .start = MXC_INT_NANDFC,
++ .end = MXC_INT_NANDFC,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct platform_device tx25_nand_mtd_device = {
++ .name = "mxc_nand",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(tx25_nand_resources),
++ .resource = tx25_nand_resources,
++ .dev = {
++ .platform_data = &tx25_nand_data,
++ },
++};
++#endif
++
++#if defined(CONFIG_VIDEO_MXC_EMMA_OUTPUT) || defined(CONFIG_VIDEO_MXC_EMMA_OUTPUT_MODULE)
++static u64 mxc_emma_dmamask = 0xffffffffUL;
++
++static struct platform_device tx25_v4l2out_device = {
++ .name = "MXC Video Output",
++ .id = 0,
++ .dev = {
++ .dma_mask = &mxc_emma_dmamask,
++ .coherent_dma_mask = ~0UL,
++ },
++};
++#endif
++
++#if 0
++#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
++static struct pad_desc mxc_i2c0_pins[] = {
++ /*
++ * it seems the data line misses a pullup, so we must enable
++ * the internal pullup as a local workaround
++ */
++ MX25_PAD_I2C1_CLK__I2C1_CLK,
++ MX25_PAD_I2C1_DAT__I2C1_DAT,
++};
++
++static int karo_tx25_i2c_0_init(struct device *dev)
++{
++ DBG(-1, "%s: \n", __FUNCTION__);
++ return mxc_iomux_v3_setup_multiple_pads(mxc_i2c0_pins,
++ ARRAY_SIZE(mxc_i2c0_pins));
++}
++
++static void karo_tx25_i2c_0_exit(struct device *dev)
++{
++ DBG(-1, "%s: \n", __FUNCTION__);
++ mxc_iomux_v3_release_multiple_pads(mxc_i2c0_pins,
++ ARRAY_SIZE(mxc_i2c0_pins));
++}
++
++static struct imxi2c_platform_data karo_tx25_i2c_0_data = {
++ .bitrate = 100000,
++ .init = karo_tx25_i2c_0_init,
++ .exit = karo_tx25_i2c_0_exit,
++};
++
++static struct at24_platform_data karo_tx25_eeprom = {
++ .byte_len = 2048,
++ .page_size = 32,
++ .flags = AT24_FLAG_ADDR16 | AT24_FLAG_TAKE8ADDR,
++};
++
++static struct i2c_board_info karo_i2c_0_boardinfo[] __initdata = {
++ {
++ I2C_BOARD_INFO("24c16", 0x50),
++ .platform_data = &karo_tx25_eeprom,
++ .type = "24c16",
++ },
++};
++
++int __init karo_i2c_init(void)
++{
++ int ret;
++
++ DBG(0, "%s: Registering I2C bus 0\n", __FUNCTION__);
++ ret = mxc_register_device(&mx25_i2c_device0, &karo_tx25_i2c_0_data);
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to register I2C device: %d\n", ret);
++ return ret;
++ }
++ ret = i2c_register_board_info(0, karo_i2c_0_boardinfo,
++ ARRAY_SIZE(karo_i2c_0_boardinfo));
++ if (ret != 0) {
++ printk(KERN_ERR "Failed to register I2C board info: %d\n", ret);
++ }
++ return ret;
++}
++device_initcall(karo_i2c_init);
++#endif
++#endif
++
++struct platform_dev_list {
++ struct platform_device *pdev;
++ int flag;
++} tx25_devices[] __initdata = {
++#if defined(CONFIG_RTC_MXC) || defined(CONFIG_RTC_MXC_MODULE)
++ { .pdev = &mxc_rtc_device, .flag = -1, },
++#endif
++#if defined(CONFIG_MTD_NAND_MXC) || defined(CONFIG_MTD_NAND_MXC_MODULE)
++ { .pdev = &tx25_nand_mtd_device, .flag = 1, },
++#endif
++#if defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE)
++ { .pdev = &fec_device, .flag = 1, },
++#endif
++#if defined(CONFIG_SPI_MXC) || defined(CONFIG_SPI_MXC_MODULE)
++ { .pdev = &mxcspi1_device, .flag = 1, },
++#endif
++#if defined(CONFIG_VIDEO_MXC_EMMA_OUTPUT) || defined(CONFIG_VIDEO_MXC_EMMA_OUTPUT_MODULE)
++ { .pdev = &tx25_v4l2out_device, .flag = 1, },
++#endif
++#if defined(CONFIG_MXC_VPU) || defined(CONFIG_MXC_VPU_MODULE)
++ { .pdev = &mxc_vpu_device, .flag = 1, },
++#endif
++};
++#define TX25_NUM_DEVICES ARRAY_SIZE(tx25_devices)
++
++static __init void karo_tx25_board_init(void)
++{
++ int i;
++
++ DBG(0, "%s: \n", __FUNCTION__);
++
++ dump_regs();
++
++ for (i = 0; i < TX25_NUM_DEVICES; i++) {
++ int ret;
++
++ if (tx25_devices[i].pdev == NULL) continue;
++ if (!tx25_devices[i].flag) {
++ DBG(0, "%s: Skipping platform device[%d] @ %p dev %p: %s\n",
++ __FUNCTION__, i, tx25_devices[i].pdev, &tx25_devices[i].pdev->dev,
++ tx25_devices[i].pdev->name);
++ continue;
++ }
++ DBG(0, "%s: Registering platform device[%d] @ %p dev %p: %s\n",
++ __FUNCTION__, i, tx25_devices[i].pdev, &tx25_devices[i].pdev->dev,
++ tx25_devices[i].pdev->name);
++ ret = platform_device_register(tx25_devices[i].pdev);
++ if (ret) {
++ printk(KERN_WARNING "%s: Failed to register platform_device[%d]: %s: %d\n",
++ __FUNCTION__, i, tx25_devices[i].pdev->name, ret);
++ }
++ }
++ DBG(0, "%s: Done\n", __FUNCTION__);
++}
++
++static struct pad_desc karo_tx25_gpios[] __initdata = {
++ MX25_PAD_GPIO_A__GPIO_A,
++ MX25_PAD_GPIO_B__GPIO_B,
++ MX25_PAD_GPIO_C__GPIO_C,
++ MX25_PAD_GPIO_D__GPIO_D,
++ MX25_PAD_GPIO_E__GPIO_E,
++ MX25_PAD_GPIO_F__GPIO_F,
++ MX25_PAD_CSI_D7__GPIO_1_6,
++ MX25_PAD_CSI_D8__GPIO_1_7,
++ MX25_PAD_CSI_MCLK__GPIO_1_8,
++ MX25_PAD_CSI_VSYNC__GPIO_1_9,
++ MX25_PAD_CSI_HSYNC__GPIO_1_10,
++ MX25_PAD_CSI_PIXCLK__GPIO_1_11,
++ MX25_PAD_I2C1_CLK__GPIO_1_12,
++ MX25_PAD_I2C1_DAT__GPIO_1_13,
++ MX25_PAD_CSPI1_MOSI__GPIO_1_14,
++ MX25_PAD_CSPI1_MISO__GPIO_1_15,
++ MX25_PAD_CSPI1_SS0__GPIO_1_16,
++ MX25_PAD_CSPI1_SS1__GPIO_1_17,
++ MX25_PAD_CSPI1_SCLK__GPIO_1_18,
++ MX25_PAD_LD5__GPIO_1_19,
++ MX25_PAD_LD6__GPIO_1_20,
++ MX25_PAD_LD7__GPIO_1_21,
++ MX25_PAD_HSYNC__GPIO_1_22,
++ MX25_PAD_VSYNC__GPIO_1_23,
++ MX25_PAD_LSCLK__GPIO_1_24,
++ MX25_PAD_OE_ACD__GPIO_1_25,
++ MX25_PAD_PWM__GPIO_1_26,
++ MX25_PAD_CSI_D2__GPIO_1_27,
++ MX25_PAD_CSI_D3__GPIO_1_28,
++ MX25_PAD_CSI_D4__GPIO_1_29,
++ MX25_PAD_CSI_D5__GPIO_1_30,
++ MX25_PAD_CSI_D6__GPIO_1_31,
++
++ MX25_PAD_A14__GPIO_2_0,
++ MX25_PAD_A15__GPIO_2_1,
++ MX25_PAD_A16__GPIO_2_2,
++ MX25_PAD_A17__GPIO_2_3,
++ MX25_PAD_A18__GPIO_2_4,
++ MX25_PAD_A19__GPIO_2_5,
++ MX25_PAD_A20__GPIO_2_6,
++ MX25_PAD_A21__GPIO_2_7,
++ MX25_PAD_A22__GPIO_2_8,
++ MX25_PAD_A23__GPIO_2_9,
++ MX25_PAD_A24__GPIO_2_10,
++ MX25_PAD_A25__GPIO_2_11,
++ MX25_PAD_EB0__GPIO_2_12,
++ MX25_PAD_EB1__GPIO_2_13,
++ MX25_PAD_OE__GPIO_2_14,
++ MX25_PAD_LD0__GPIO_2_15,
++ MX25_PAD_LD1__GPIO_2_16,
++ MX25_PAD_LD2__GPIO_2_17,
++ MX25_PAD_LD3__GPIO_2_18,
++ MX25_PAD_LD4__GPIO_2_19,
++ MX25_PAD_DE_B__GPIO_2_20,
++ MX25_PAD_CLKO__GPIO_2_21,
++ MX25_PAD_CSPI1_RDY__GPIO_2_22,
++ MX25_PAD_SD1_CMD__GPIO_2_23,
++ MX25_PAD_SD1_CLK__GPIO_2_24,
++ MX25_PAD_SD1_DATA0__GPIO_2_25,
++ MX25_PAD_SD1_DATA1__GPIO_2_26,
++ MX25_PAD_SD1_DATA2__GPIO_2_27,
++ MX25_PAD_SD1_DATA3__GPIO_2_28,
++ MX25_PAD_KPP_ROW0__GPIO_2_29,
++ MX25_PAD_KPP_ROW1__GPIO_2_30,
++ MX25_PAD_KPP_ROW2__GPIO_2_31,
++
++ MX25_PAD_KPP_ROW3__GPIO_3_0,
++ MX25_PAD_KPP_COL0__GPIO_3_1,
++ MX25_PAD_KPP_COL1__GPIO_3_2,
++ MX25_PAD_KPP_COL2__GPIO_3_3,
++ MX25_PAD_KPP_COL3__GPIO_3_4,
++ MX25_PAD_FEC_MDC__GPIO_3_5,
++ MX25_PAD_FEC_MDIO__GPIO_3_6,
++ MX25_PAD_FEC_TDATA0__GPIO_3_7,
++ MX25_PAD_FEC_TDATA1__GPIO_3_8,
++ MX25_PAD_FEC_TX_EN__GPIO_3_9,
++ MX25_PAD_FEC_RDATA0__GPIO_3_10,
++ MX25_PAD_FEC_RDATA1__GPIO_3_11,
++ MX25_PAD_FEC_RX_DV__GPIO_3_12,
++ MX25_PAD_FEC_TX_CLK__GPIO_3_13,
++ MX25_PAD_RTCK__GPIO_3_14,
++ MX25_PAD_EXT_ARMCLK__GPIO_3_15,
++ MX25_PAD_UPLL_BYPCLK__GPIO_3_16,
++ MX25_PAD_VSTBY_REQ__GPIO_3_17,
++ MX25_PAD_VSTBY_ACK__GPIO_3_18,
++ MX25_PAD_POWER_FAIL__GPIO_3_19,
++ MX25_PAD_CS4__GPIO_3_20,
++ MX25_PAD_CS5__GPIO_3_21,
++ MX25_PAD_NF_CE0__GPIO_3_22,
++ MX25_PAD_ECB__GPIO_3_23,
++ MX25_PAD_LBA__GPIO_3_24,
++ MX25_PAD_RW__GPIO_3_25,
++ MX25_PAD_NFWE_B__GPIO_3_26,
++ MX25_PAD_NFRE_B__GPIO_3_27,
++ MX25_PAD_NFALE__GPIO_3_28,
++ MX25_PAD_NFCLE__GPIO_3_29,
++ MX25_PAD_NFWP_B__GPIO_3_30,
++ MX25_PAD_NFRB__GPIO_3_31,
++
++ MX25_PAD_A10__GPIO_4_0,
++ MX25_PAD_A13__GPIO_4_1,
++ MX25_PAD_CS0__GPIO_4_2,
++ MX25_PAD_CS1__GPIO_4_3,
++ MX25_PAD_BCLK__GPIO_4_4,
++ MX25_PAD_D15__GPIO_4_5,
++ MX25_PAD_D14__GPIO_4_6,
++ MX25_PAD_D13__GPIO_4_7,
++ MX25_PAD_D12__GPIO_4_8,
++ MX25_PAD_D11__GPIO_4_9,
++ MX25_PAD_D10__GPIO_4_10,
++ MX25_PAD_D9__GPIO_4_11,
++ MX25_PAD_D8__GPIO_4_12,
++ MX25_PAD_D7__GPIO_4_13,
++ MX25_PAD_D6__GPIO_4_14,
++ MX25_PAD_D5__GPIO_4_15,
++ MX25_PAD_D4__GPIO_4_16,
++ MX25_PAD_D3__GPIO_4_17,
++ MX25_PAD_D2__GPIO_4_18,
++ MX25_PAD_D1__GPIO_4_19,
++ MX25_PAD_D0__GPIO_4_20,
++ MX25_PAD_CSI_D9__GPIO_4_21,
++ MX25_PAD_UART1_RXD__GPIO_4_22,
++ MX25_PAD_UART1_TXD__GPIO_4_23,
++ MX25_PAD_UART1_RTS__GPIO_4_24,
++ MX25_PAD_UART1_CTS__GPIO_4_25,
++ MX25_PAD_UART2_RXD__GPIO_4_26,
++ MX25_PAD_UART2_TXD__GPIO_4_27,
++ MX25_PAD_UART2_RTS__GPIO_4_28,
++ MX25_PAD_UART2_CTS__GPIO_4_29,
++ MX25_PAD_BOOT_MODE0__GPIO_4_30,
++ MX25_PAD_BOOT_MODE1__GPIO_4_31,
++};
++
++static int __init karo_tx25_setup_gpios(void)
++{
++ int i;
++ int ret;
++ int count = 0;
++
++ for (i = 0; i < ARRAY_SIZE(karo_tx25_gpios); i++) {
++ struct pad_desc *pd = &karo_tx25_gpios[i];
++#if 0
++ if (i - 64 >= 16 && i - 64 < 32) {
++ continue;
++ }
++#endif
++ ret = mxc_iomux_v3_setup_pad(pd);
++ if (ret == 0) {
++#ifdef IOMUX_DEBUG
++ DBG(0, "%s: PAD[%d] %s set up as GPIO\n", __FUNCTION__, i, pd->name);
++#else
++ DBG(0, "%s: PAD[%d] set up as GPIO\n", __FUNCTION__, i);
++#endif
++ count++;
++ mxc_iomux_v3_release_pad(pd);
++ } else {
++#ifdef IOMUX_DEBUG
++ DBG(0, "%s: PAD[%d] %s skipped\n", __FUNCTION__, i, pd->name);
++#else
++ DBG(0, "%s: PAD[%d] skipped\n", __FUNCTION__, i);
++#endif
++ }
++ }
++ DBG(0, "%s: %d out of %d pins set up as GPIO\n", __FUNCTION__, count, i);
++#if 0
++ if (gpio_request(42, "TEST") == 0) {
++ gpio_direction_output(42, 1);
++ while (1) {
++ gpio_set_value(42, 0);
++ if (gpio_get_value(42)) {
++ DBG(0, "%s: GPIO 42 is HIGH instead of LOW\n", __FUNCTION__);
++ }
++ msleep(1000);
++ gpio_set_value(42, 1);
++ if (!gpio_get_value(42)) {
++ DBG(0, "%s: GPIO 42 is LOW instead of HIGH\n", __FUNCTION__);
++ }
++ msleep(1000);
++ }
++ }
++ gpio_free(42);
++#endif
++ return 0;
++}
++late_initcall(karo_tx25_setup_gpios);
++
++static void __init karo_tx25_map_io(void)
++{
++ mx25_map_io();
++}
++
++static void __init karo_tx25_fixup(struct machine_desc *desc, struct tag *tags,
++ char **cmdline, struct meminfo *mi)
++{
++}
++
++static void __init karo_tx25_timer_init(void)
++{
++ DBG(0, "%s: \n", __FUNCTION__);
++ mx25_clocks_init(24000000);
++ DBG(0, "%s: Done\n", __FUNCTION__);
++}
++
++struct sys_timer karo_tx25_timer = {
++ .init = karo_tx25_timer_init,
++};
++
++static int __init karo_mod_type_setup(char *line)
++{
++ get_option(&line, &karo_mod_type);
++ DBG(0, "%s: Module type set to 0x%02x by kernel cmd line\n", __FUNCTION__, karo_mod_type);
++
++ return 1;
++}
++__setup("module_type=", karo_mod_type_setup);
++
++static int __init karo_board_type_setup(char *line)
++{
++ get_option(&line, &karo_board_type);
++ DBG(0, "%s: Board type set to 0x%02x by kernel cmd line\n", __FUNCTION__, karo_board_type);
++
++ return 1;
++}
++__setup("board_type=", karo_board_type_setup);
++
++MACHINE_START(TX25, "Ka-Ro electronics TX25 module (Freescale i.MX25)")
++ /* Maintainer: <LW@KARO-electronics.de> */
++ .phys_io = AIPS1_BASE_ADDR,
++ .io_pg_offst = ((unsigned long)AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
++ .fixup = karo_tx25_fixup,
++ .map_io = karo_tx25_map_io,
++ .init_irq = mxc_init_irq,
++ .init_machine = karo_tx25_board_init,
++ .timer = &karo_tx25_timer,
++MACHINE_END
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/karo.h linux-2.6.30-rc4-karo/arch/arm/mach-mx2/karo.h
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/karo.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/karo.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,99 @@
++/*
++ * arch/arm/mach-mx2/karo.h
++ *
++ * Copyright (C) 2009 Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the:
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
++ *
++ * This file provides platform specific definitions for the
++ * Ka-Ro electronics TX25 processor modules
++ */
++
++#include <linux/io.h>
++#include "crm_regs_mx25.h"
++
++enum {
++ BOARD_KARO_STK5,
++};
++
++extern int karo_board_type;
++extern int karo_mod_type;
++
++#ifdef DEBUG
++extern int tx25_debug;
++#define dbg_lvl(n) ((n) < tx25_debug)
++#define DBG(lvl, fmt...) do { if (dbg_lvl(lvl)) printk(KERN_DEBUG fmt); } while (0)
++#else
++#define dbg_lvl(n) 0
++#define DBG(lvl, fmt...) do { } while (0)
++#endif
++
++static inline int karo_get_board_type(void)
++{
++ return karo_board_type;
++}
++
++static inline int karo_get_module_type(void)
++{
++ return karo_mod_type;
++}
++
++#define SHOW_REG(reg) DBG(0, "%s[%08lx]=%08x\n", #reg, MXC_PHYS_ADDRESS(reg), __raw_readl(reg))
++
++#define SHOW_GPIO_REG(port, reg) \
++ DBG(0, "GPIO%d_%s[%08lx]=%08x\n", port, #reg, \
++ GPIO_BASE_ADDR(port) + GPIO_##reg, \
++ __raw_readl(IO_ADDRESS(GPIO_BASE_ADDR(port) + GPIO_##reg)))
++
++static inline void dump_regs(void)
++{
++ int i;
++
++ SHOW_REG(MXC_CCM_MPCTL);
++ SHOW_REG(MXC_CCM_UPCTL);
++ SHOW_REG(MXC_CCM_CCTL);
++ SHOW_REG(MXC_CCM_RCSR);
++ SHOW_REG(MXC_CCM_CRDR);
++ SHOW_REG(MXC_CCM_PCDR0);
++ SHOW_REG(MXC_CCM_PCDR1);
++ SHOW_REG(MXC_CCM_PCDR2);
++ SHOW_REG(MXC_CCM_PCDR3);
++ SHOW_REG(MXC_CCM_CGCR0);
++ SHOW_REG(MXC_CCM_CGCR1);
++ SHOW_REG(MXC_CCM_CGCR2);
++ SHOW_REG(MXC_CCM_MCR);
++ SHOW_REG(MXC_CCM_PMCR0);
++ SHOW_REG(MXC_CCM_PMCR1);
++ SHOW_REG(MXC_CCM_PMCR2);
++ SHOW_REG(MXC_CCM_LTBR0);
++ SHOW_REG(MXC_CCM_LTBR1);
++ SHOW_REG(MXC_CCM_LTR0);
++ SHOW_REG(MXC_CCM_LTR1);
++ SHOW_REG(MXC_CCM_LTR2);
++ SHOW_REG(MXC_CCM_LTR3);
++ SHOW_REG(MXC_CCM_DCVR0);
++ SHOW_REG(MXC_CCM_DCVR1);
++ SHOW_REG(MXC_CCM_DCVR2);
++ SHOW_REG(MXC_CCM_DCVR3);
++
++ for (i = 1; i <= 4; i++) {
++ SHOW_GPIO_REG(i, DR);
++ SHOW_GPIO_REG(i, GDIR);
++ SHOW_GPIO_REG(i, PSR);
++ SHOW_GPIO_REG(i, ICR1);
++ SHOW_GPIO_REG(i, ICR2);
++ SHOW_GPIO_REG(i, IMR);
++ SHOW_GPIO_REG(i, ISR);
++ }
++}
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/sdma_script_code.h linux-2.6.30-rc4-karo/arch/arm/mach-mx2/sdma_script_code.h
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/sdma_script_code.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/sdma_script_code.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,159 @@
++
++/*
++ * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * 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
++ */
++
++/*!
++ * @file sdma_script_code.h
++ * @brief This file contains functions of SDMA scripts code initialization
++ *
++ * The file was generated automatically. Based on sdma scripts library.
++ *
++ * @ingroup SDMA
++ */
++/************************************************************************
++
++ SDMA RELEASE LABEL: "SS15_SENNA"
++
++************************************************************************/
++
++#ifndef SDMA_SCRIPT_CODE_H
++#define SDMA_SCRIPT_CODE_H
++
++/*!
++ * SDMA ROM scripts start addresses and sizes
++ */
++#define start_ADDR 0
++#define start_SIZE 22
++
++#define core_ADDR 80
++#define core_SIZE 233
++
++#define common_ADDR 313
++#define common_SIZE 416
++
++#define ap_2_ap_ADDR 729
++#define ap_2_ap_SIZE 41
++
++#define app_2_mcu_ADDR 770
++#define app_2_mcu_SIZE 64
++
++#define mcu_2_app_ADDR 834
++#define mcu_2_app_SIZE 70
++
++#define uart_2_mcu_ADDR 904
++#define uart_2_mcu_SIZE 75
++
++#define shp_2_mcu_ADDR 979
++#define shp_2_mcu_SIZE 69
++
++#define mcu_2_shp_ADDR 1048
++#define mcu_2_shp_SIZE 72
++
++#define uartsh_2_mcu_ADDR 1120
++#define uartsh_2_mcu_SIZE 69
++
++#define app_2_per_ADDR 1189
++#define app_2_per_SIZE 66
++
++#define per_2_app_ADDR 1255
++#define per_2_app_SIZE 74
++
++#define per_2_shp_ADDR 1329
++#define per_2_shp_SIZE 78
++
++#define shp_2_per_ADDR 1407
++#define shp_2_per_SIZE 72
++
++#define mcu_2_ata_ADDR 1479
++#define mcu_2_ata_SIZE 81
++
++#define ata_2_mcu_ADDR 1560
++#define ata_2_mcu_SIZE 96
++
++#define loop_DMAs_routines_ADDR 1656
++#define loop_DMAs_routines_SIZE 227
++
++#define test_ADDR 1883
++#define test_SIZE 63
++
++#define signature_ADDR 1022
++#define signature_SIZE 1
++
++/*!
++ * SDMA RAM scripts start addresses and sizes
++ */
++#define ext_mem__ipu_ram_ADDR 6144
++#define ext_mem__ipu_ram_SIZE 123
++
++#define uart_2_per_ADDR 6267
++#define uart_2_per_SIZE 73
++
++#define uartsh_2_per_ADDR 6340
++#define uartsh_2_per_SIZE 67
++
++/*!
++ * SDMA RAM image start address and size
++ */
++#define RAM_CODE_START_ADDR 6144
++#define RAM_CODE_SIZE 263
++
++/*!
++ * Buffer that holds the SDMA RAM image
++ */
++__attribute__ ((__aligned__(4)))
++#ifndef CONFIG_XIP_KERNEL
++const
++#endif
++static const short sdma_code[] = {
++ 0x0e70, 0x0611, 0x5616, 0xc18a, 0x7d2a, 0x5ade, 0x008e, 0xc19c,
++ 0x7c26, 0x5be0, 0x5ef0, 0x5ce8, 0x0688, 0x08ff, 0x0011, 0x28ff,
++ 0x00bc, 0x53f6, 0x05df, 0x7d0b, 0x6dc5, 0x03df, 0x7d03, 0x6bd5,
++ 0xd84f, 0x982b, 0x6b05, 0xc6d8, 0x7e27, 0x7f29, 0x982b, 0x6d01,
++ 0x03df, 0x7d05, 0x6bd5, 0xc702, 0x7e18, 0x7f1a, 0x982b, 0x6b05,
++ 0xc678, 0x7e07, 0x7f06, 0x52de, 0x53e6, 0xc1a8, 0x7dd7, 0x0200,
++ 0x9803, 0x0007, 0x6004, 0x680c, 0x53f6, 0x028e, 0x00a3, 0xc2ad,
++ 0x048b, 0x0498, 0x0454, 0x068a, 0x982b, 0x0207, 0x680c, 0x6ddf,
++ 0x0107, 0x68ff, 0x60d0, 0x9834, 0x0207, 0x68ff, 0x6d28, 0x0107,
++ 0x6004, 0x680c, 0x9834, 0x0007, 0x68ff, 0x60d0, 0x9834, 0x0288,
++ 0x03a5, 0x3b03, 0x3d03, 0x4d00, 0x7d0a, 0x0804, 0x00a5, 0x00da,
++ 0x7d1a, 0x02a0, 0x7b01, 0x65d8, 0x7eee, 0x65ff, 0x7eec, 0x0804,
++ 0x02d0, 0x7d11, 0x4b00, 0x7c0f, 0x008a, 0x3003, 0x6dcf, 0x6bdf,
++ 0x0015, 0x0015, 0x7b02, 0x65d8, 0x0000, 0x7edd, 0x63ff, 0x7edb,
++ 0x3a03, 0x6dcd, 0x6bdd, 0x008a, 0x7b02, 0x65d8, 0x0000, 0x7ed3,
++ 0x65ff, 0x7ed1, 0x0006, 0xc23a, 0x57db, 0x52f3, 0x6ad5, 0x56fb,
++ 0x028e, 0x1a94, 0x6ac3, 0x62c8, 0x0269, 0x7d1e, 0x1e94, 0x6ee3,
++ 0x62d0, 0x5aeb, 0x62c8, 0x0248, 0x6ed3, 0x6ac8, 0x2694, 0x52eb,
++ 0x6ad5, 0x6ee3, 0x62c8, 0x026e, 0x7d27, 0x6ac8, 0x7f23, 0x2501,
++ 0x4d00, 0x7d26, 0x028e, 0x1a98, 0x6ac3, 0x62c8, 0x6ec3, 0x0260,
++ 0x7df1, 0x62d0, 0xc2d1, 0x98c0, 0x6ee3, 0x008f, 0x2001, 0x00d5,
++ 0x7d01, 0x008d, 0x05a0, 0x62c8, 0x026e, 0x7d0e, 0x6ac8, 0x7f0a,
++ 0x2001, 0x7cf9, 0x6add, 0x7f06, 0x0000, 0x4d00, 0x7d09, 0xc251,
++ 0x57db, 0x987f, 0x0007, 0x6aff, 0x62d0, 0xc2d1, 0x0458, 0x0454,
++ 0x6add, 0x7ff8, 0xc261, 0x987c, 0xc230, 0xc23a, 0x57db, 0x52f3,
++ 0x6ad5, 0x56fb, 0x028e, 0x1a94, 0x5202, 0x0269, 0x7d17, 0x1e94,
++ 0x5206, 0x0248, 0x5a06, 0x2694, 0x5206, 0x026e, 0x7d26, 0x6ac8,
++ 0x7f22, 0x2501, 0x4d00, 0x7d27, 0x028e, 0x1a98, 0x5202, 0x0260,
++ 0x7df3, 0x6add, 0x7f18, 0x62d0, 0xc2d1, 0x9903, 0x008f, 0x2001,
++ 0x00d5, 0x7d01, 0x008d, 0x05a0, 0x5206, 0x026e, 0x7d0e, 0x6ac8,
++ 0x7f0a, 0x2001, 0x7cf9, 0x6add, 0x7f06, 0x0000, 0x4d00, 0x7d0b,
++ 0xc251, 0x57db, 0x98c9, 0x0007, 0x6aff, 0x6add, 0x7ffc, 0x62d0,
++ 0xc2d1, 0x0458, 0x0454, 0x6add, 0x7ff6, 0xc261, 0x98c6
++};
++#endif
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx2/stk5-baseboard.c linux-2.6.30-rc4-karo/arch/arm/mach-mx2/stk5-baseboard.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx2/stk5-baseboard.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx2/stk5-baseboard.c 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,1003 @@
++/*
++ * arch/arm/mach-mx2/stk5-baseboard.c
++ *
++ * Copyright (C) 2009 Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the:
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
++ *
++ * This file adds support for devices found on Ka-Ro electronics
++ * Starterkit-5 (STK5) baseboard
++ */
++
++#include <linux/types.h>
++#include <linux/sched.h>
++#include <linux/interrupt.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <linux/platform_device.h>
++#include <linux/input.h>
++#include <linux/clk.h>
++#include <linux/delay.h>
++#include <linux/fb.h>
++#include <linux/i2c.h>
++#include <linux/i2c/at24.h>
++#include <linux/spi/spi.h>
++//#include <linux/serial_8250.h>
++
++#include <linux/serial.h>
++#include <linux/fsl_devices.h>
++#include <linux/irq.h>
++#include <linux/mmc/host.h>
++#include <linux/gpio_keys.h>
++#include <linux/leds.h>
++
++#include <asm/setup.h>
++#include <asm/irq.h>
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/time.h>
++#include <mach/common.h>
++#include <mach/hardware.h>
++#include <mach/gpio.h>
++#include <mach/iomux.h>
++#include <mach/irqs.h>
++#include <mach/clock.h>
++#include <mach/imxfb.h>
++//#include <mach/imx_spi.h>
++#include <mach/i2c.h>
++#include <mach/mmc.h>
++#include <mach/imx-uart.h>
++//#include <mach/ulpi.h>
++//#include <mach/mxc_ehci.h>
++#include <mach/board-stk5.h>
++
++#include "crm_regs.h"
++#include "devices.h"
++#include "karo.h"
++
++#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
++static struct pad_desc stk5_uart_pads[][4] = {
++ {
++ MX25_PAD_UART1_TXD__UART1_TXD,
++ MX25_PAD_UART1_RXD__UART1_RXD,
++ MX25_PAD_UART1_CTS__UART1_CTS,
++ MX25_PAD_UART1_RTS__UART1_RTS,
++ }, {
++ MX25_PAD_UART2_TXD__UART2_TXD,
++ MX25_PAD_UART2_RXD__UART2_RXD,
++ MX25_PAD_UART2_CTS__UART2_CTS,
++ MX25_PAD_UART2_RTS__UART2_RTS,
++ }, {
++ MX25_PAD_ECB__UART5_TXD_MUX,
++ MX25_PAD_LBA__UART5_RXD_MUX,
++ MX25_PAD_CS4__UART5_CTS,
++ MX25_PAD_CS5__UART5_RTS,
++#if 0
++ }, {
++ MX25_PAD_UART4_TXD__UART4_TXD,
++ MX25_PAD_UART4_RXD__UART4_RXD,
++ MX25_PAD_UART4_CTS__UART4_CTS,
++ MX25_PAD_UART4_RTS__UART4_RTS,
++ }, {
++ MX25_PAD_UART5_TXD__UART5_TXD,
++ MX25_PAD_UART5_RXD__UART5_RXD,
++ MX25_PAD_UART5_CTS__UART5_CTS,
++ MX25_PAD_UART5_RTS__UART5_RTS,
++#endif
++ },
++};
++
++static int stk5_uart_init(struct platform_device *pdev)
++{
++ DBG(0, "%s: \n", __FUNCTION__);
++ return mxc_iomux_v3_setup_multiple_pads(stk5_uart_pads[pdev->id],
++ ARRAY_SIZE(stk5_uart_pads[pdev->id]));
++}
++
++static void stk5_uart_exit(struct platform_device *pdev)
++{
++ DBG(0, "%s: \n", __FUNCTION__);
++ mxc_iomux_v3_release_multiple_pads(stk5_uart_pads[pdev->id],
++ ARRAY_SIZE(stk5_uart_pads[pdev->id]));
++}
++
++static struct imxuart_platform_data stk5_uart_ports[] = {
++ {
++ .init = stk5_uart_init,
++ .exit = stk5_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ }, {
++ .init = stk5_uart_init,
++ .exit = stk5_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ }, {
++ .init = stk5_uart_init,
++ .exit = stk5_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ }, {
++ .init = stk5_uart_init,
++ .exit = stk5_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ }, {
++ .init = stk5_uart_init,
++ .exit = stk5_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ }, {
++ .init = stk5_uart_init,
++ .exit = stk5_uart_exit,
++ .flags = IMXUART_HAVE_RTSCTS,
++ },
++};
++
++static struct platform_device *stk5_uart_devices[] = {
++#if UART1_ENABLED
++ &mxc_uart_device0,
++#endif
++#if UART2_ENABLED
++ &mxc_uart_device1,
++#endif
++#if UART3_ENABLED
++ &mxc_uart_device2,
++#endif
++#if UART4_ENABLED
++ &mxc_uart_device3,
++#endif
++#if UART5_ENABLED
++ &mxc_uart_device4,
++#endif
++};
++
++static void __init karo_stk5_serial_init(void)
++{
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(stk5_uart_devices); i++) {
++ int ret;
++ int port = stk5_uart_devices[i]->id;
++
++ DBG(0, "%s: Registering platform device[%d] @ %p dev %p: %s\n",
++ __FUNCTION__, i, stk5_uart_devices[i],
++ &stk5_uart_devices[i]->dev, stk5_uart_devices[i]->name);
++ ret = mxc_register_device(stk5_uart_devices[i],
++ &stk5_uart_ports[port]);
++ if (ret != 0) {
++ printk(KERN_WARNING "%s: Failed to register platform_device[%d]: %s: %d\n",
++ __FUNCTION__, i, stk5_uart_devices[i]->name, ret);
++ }
++ }
++}
++#else
++static void __init karo_stk5_serial_init(void)
++{
++}
++#endif
++
++#ifdef CONFIG_USB_EHCI_MXC
++
++#define SMSC_VENDOR_ID 0x0424
++#define USB3317_PROD_ID 0x0006
++#define ULPI_FCTL 7
++
++static inline const char *ulpi_name(void __iomem *view)
++{
++ if ((unsigned long)view & 0x400) {
++ return "USBH2";
++ } else {
++ return "USBOTG";
++ }
++}
++
++static int usb3317_init(void __iomem *view)
++{
++ int vid, pid, ret;
++
++ ret = ulpi_read(ISP1504_VID_HIGH, view);
++ if (ret < 0) {
++ goto err;
++ }
++ vid = ret << 8;
++
++ ret = ulpi_read(ISP1504_VID_LOW, view);
++ if (ret < 0) {
++ goto err;
++ }
++ vid |= ret;
++
++ ret = ulpi_read(ISP1504_PID_HIGH, view);
++ if (ret < 0) {
++ goto err;
++ }
++ pid = ret << 8;
++
++ ret = ulpi_read(ISP1504_PID_LOW, view);
++ if (ret < 0) {
++ goto err;
++ }
++ pid |= ret;
++
++ pr_info("ULPI on %s port Vendor ID 0x%x Product ID 0x%x\n",
++ ulpi_name(view), vid, pid);
++ if (vid != SMSC_VENDOR_ID || pid != USB3317_PROD_ID) {
++ pr_err("No USB3317 found\n");
++ return -ENODEV;
++ }
++ err:
++ if (ret < 0) {
++ printk(KERN_ERR "ULPI read on %s port failed with error %d\n",
++ ulpi_name(view), ret);
++ return ret;
++ }
++ return 0;
++}
++
++static int usb3317_set_vbus_power(void __iomem *view, int on)
++{
++ int ret;
++
++ DBG(0, "%s: Switching %s port VBUS power %s\n", __FUNCTION__,
++ ulpi_name(view), on ? "on" : "off");
++
++ if (on) {
++ ret = ulpi_set(DRV_VBUS_EXT | /* enable external Vbus */
++ DRV_VBUS | /* enable internal Vbus */
++ CHRG_VBUS, /* charge Vbus */
++ ISP1504_OTGCTL, view);
++ } else {
++ ret = ulpi_clear(DRV_VBUS_EXT | /* disable external Vbus */
++ DRV_VBUS, /* disable internal Vbus */
++ ISP1504_OTGCTL, view);
++ if (ret == 0) {
++ ret = ulpi_set(DISCHRG_VBUS, /* discharge Vbus */
++ ISP1504_OTGCTL, view);
++ }
++ }
++ if (ret < 0) {
++ printk(KERN_ERR "ULPI read on %s port failed with error %d\n",
++ ulpi_name(view), ret);
++ return ret;
++ }
++ return 0;
++}
++
++static int stk5_usbh2_init(struct platform_device *pdev)
++{
++ int ret;
++ u32 temp;
++ unsigned long flags;
++ void __iomem *view = IO_ADDRESS(OTG_BASE_ADDR + 0x570);
++
++ local_irq_save(flags);
++ temp = readl(IO_ADDRESS(OTG_BASE_ADDR) + 0x600);
++ temp &= ~((3 << 21) | (1 << 0));
++ temp |= (1 << 5) | (1 << 16) | (1 << 19) | (1 << 20);
++ writel(temp, IO_ADDRESS(OTG_BASE_ADDR) + 0x600);
++ local_irq_restore(flags);
++
++ /* select ULPI transceiver */
++ /* this must be done _before_ setting up the GPIOs! */
++ temp = readl(view + 0x14);
++ DBG(0, "%s: Changing USBH2_PORTSC1 from %08x to %08x\n", __FUNCTION__,
++ temp, (temp & ~(3 << 30)) | (2 << 30));
++ temp &= ~(3 << 30);
++ temp |= 2 << 30;
++ writel(temp, view + 0x14);
++
++ /* Set to Host mode */
++ temp = readl(view + 0x38);
++ DBG(0, "%s: Changing USBH2_USBMODE from %08x to %08x\n", __FUNCTION__,
++ temp, temp | 3);
++ writel(temp | 0x3, view + 0x38);
++
++ ret = gpio_usbh2_active();
++ if (ret != 0) {
++ return ret;
++ }
++
++ ret = usb3317_init(view);
++ if (ret != 0) {
++ goto err;
++ }
++ ret = usb3317_set_vbus_power(view, 1);
++ if (ret != 0) {
++ goto err;
++ }
++ return 0;
++
++ err:
++ gpio_usbh2_inactive();
++ return ret;
++}
++
++static int stk5_usbh2_exit(struct platform_device *pdev)
++{
++ gpio_usbh2_inactive();
++ return 0;
++}
++
++static struct mxc_usbh_platform_data stk5_usbh2_data = {
++ .init = stk5_usbh2_init,
++ .exit = stk5_usbh2_exit,
++};
++
++static int __init karo_stk5_usbh2_register(void)
++{
++ int ret;
++
++ ret = mxc_register_device(&mxc_ehci2, &stk5_usbh2_data);
++ return ret;
++}
++#else
++static inline int karo_stk5_usbh2_register(void)
++{
++ return 0;
++}
++#endif // CONFIG_USB_EHCI_MXC
++
++#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
++static struct gpio_led stk5_leds[] = {
++ {
++ .name = "GPIO-LED",
++ .default_trigger = "heartbeat",
++ .gpio = GPIO_PORTB | 7,
++ },
++};
++
++static struct gpio_led_platform_data stk5_led_data = {
++ .leds = stk5_leds,
++ .num_leds = ARRAY_SIZE(stk5_leds),
++};
++
++static struct platform_device stk5_led_device = {
++ .name = "leds-gpio",
++ .id = -1,
++ .dev = {
++ .platform_data = &stk5_led_data,
++ },
++};
++#endif
++
++#if defined(CONFIG_KEYBOARD_MXC) || defined(CONFIG_KEYBOARD_MXC_MODULE)
++/*!
++ * This array is used for mapping mx25 ADS keypad scancodes to input keyboard
++ * keycodes.
++ */
++static u16 stk5_kpd_keycodes[] = {
++ KEY_POWER,
++};
++
++static struct keypad_data stk5_keypad = {
++ .rowmax = 1,
++ .colmax = 1,
++ .irq = MXC_INT_KPP,
++ .learning = 0,
++ //.delay = 2, /* unused in the driver! */
++ .matrix = stk5_kpd_keycodes,
++};
++
++static struct resource stk5_kpp_resources[] = {
++ {
++ .start = MXC_INT_KPP,
++ .end = MXC_INT_KPP,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++/* stk5 keypad driver */
++static struct platform_device stk5_keypad_device = {
++ .name = "mxc_keypad",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(stk5_kpp_resources),
++ .resource = stk5_kpp_resources,
++ .dev = {
++ .platform_data = &stk5_keypad,
++ },
++};
++#endif
++
++#if defined(CONFIG_FB_IMX) || defined(CONFIG_FB_IMX_MODULE)
++/*
++ * Setup GPIO for LCDC device to be active
++ *
++ */
++static struct pad_desc mx25_lcdc_gpios[] = {
++#if 0
++ MXC_PIN(A, 30, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA30 */
++ MXC_PIN(A, 25, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA25 */
++ MXC_PIN(A, 26, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA26 */
++ MXC_PIN(A, 24, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA24 */
++ MXC_PIN(A, 27, GPIO, GPIO_OUT | GPIO_DFLT_LOW), /* PA27 */
++#endif
++ MX25_PAD_LSCLK__LSCLK,
++ MX25_PAD_LD0__LD0,
++ MX25_PAD_LD1__LD1,
++ MX25_PAD_LD2__LD2,
++ MX25_PAD_LD3__LD3,
++ MX25_PAD_LD4__LD4,
++ MX25_PAD_LD5__LD5,
++ MX25_PAD_LD6__LD6,
++ MX25_PAD_LD7__LD7,
++ MX25_PAD_LD8__LD8,
++ MX25_PAD_LD9__LD9,
++ MX25_PAD_LD10__LD10,
++ MX25_PAD_LD11__LD11,
++ MX25_PAD_LD12__LD12,
++ MX25_PAD_LD13__LD13,
++ MX25_PAD_LD14__LD14,
++ MX25_PAD_LD15__LD15,
++ MX25_PAD_D15__LD16,
++ MX25_PAD_D14__LD17,
++ MX25_PAD_HSYNC__HSYNC,
++ MX25_PAD_VSYNC__VSYNC,
++ MX25_PAD_OE_ACD__OE_ACD,
++};
++
++static int stk5_gpio_lcdc_active(struct platform_device *dev)
++{
++ int ret;
++
++ DBG(0, "%s: Setting up GPIO pins for LCD\n", __FUNCTION__);
++ ret = mxc_iomux_v3_setup_multiple_pads(mx25_lcdc_gpios,
++ ARRAY_SIZE(mx25_lcdc_gpios));
++ if (ret) {
++ DBG(0, "%s: Failed to setup GPIO pins for LCD: %d\n",
++ __FUNCTION__, ret);
++ return ret;
++ }
++ return 0;
++}
++
++/*
++ * Setup GPIO for LCDC device to be inactive
++ *
++ */
++static void stk5_gpio_lcdc_inactive(struct platform_device *dev)
++{
++ mxc_iomux_v3_release_multiple_pads(mx25_lcdc_gpios,
++ ARRAY_SIZE(mx25_lcdc_gpios));
++}
++
++static struct imx_fb_platform_data stk5_fb_data[] __initdata = {
++ {
++ //.fb_mode = "Xenarc_700_Y-18",
++ .init = stk5_gpio_lcdc_active,
++ .exit = stk5_gpio_lcdc_inactive,
++ .lcd_power = NULL,
++ .backlight_power = NULL,
++
++ .pixclock = 34576,
++ .xres = 640,
++ .yres = 480,
++
++ .bpp = 32,
++
++ .hsync_len = 64,
++ .right_margin = 60 + 1,
++ .left_margin = 80 + 3,
++
++ .vsync_len = 2,
++ .upper_margin = 54,
++ .lower_margin = 54,
++#if 0
++ /* currently not used by driver! */
++ .sync = ((0*FB_SYNC_HOR_HIGH_ACT) |
++ (0*FB_SYNC_VERT_HIGH_ACT) |
++ (1*FB_SYNC_OE_ACT_HIGH)),
++#else
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 |
++ PCR_BPIX_18 | PCR_END_SEL | PCR_FLMPOL | PCR_LPPOL | PCR_SCLK_SEL,
++ .dmacr = 0x800a0078,
++#endif
++ .cmap_greyscale = 0,
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++
++ .fixed_screen_cpu = NULL,
++ }, {
++ //.fb_mode = "Xenarc_700_Y-16",
++ .init = stk5_gpio_lcdc_active,
++ .exit = stk5_gpio_lcdc_inactive,
++ .lcd_power = NULL,
++ .backlight_power = NULL,
++
++ .pixclock = 34576,
++ .xres = 640,
++ .yres = 480,
++
++ .bpp = 16,
++
++ .hsync_len = 64,
++ .right_margin = 138 + 1,
++ .left_margin = 118 + 3,
++
++ .vsync_len = 7,
++ .upper_margin = 44,
++ .lower_margin = 44,
++#if 0
++ /* currently not used by driver! */
++ .sync = ((0*FB_SYNC_HOR_HIGH_ACT) |
++ (0*FB_SYNC_VERT_HIGH_ACT) |
++ (1*FB_SYNC_OE_ACT_HIGH)),
++#else
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 |
++ PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL | PCR_SCLK_SEL,
++ .dmacr = 0x80040060,
++#endif
++ .cmap_greyscale = 0,
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++
++ .fixed_screen_cpu = NULL,
++ }, {
++ //.fb_mode = "SHARP LQ10D42-16",
++ .init = stk5_gpio_lcdc_active,
++ .exit = stk5_gpio_lcdc_inactive,
++ .lcd_power = NULL,
++ .backlight_power = NULL,
++
++ .pixclock = 34576,
++ .xres = 640,
++ .yres = 480,
++
++#ifdef USE_18BPP
++ .bpp = 32,
++#else
++ .bpp = 16,
++#endif
++ .hsync_len = 64,
++ .right_margin = 138 + 1,
++ .left_margin = 118 + 3,
++
++ .vsync_len = 7,
++ .upper_margin = 28,
++ .lower_margin = 60,
++#if 0
++ /* currently not used by driver! */
++ .sync = ((0*FB_SYNC_HOR_HIGH_ACT) |
++ (0*FB_SYNC_VERT_HIGH_ACT) |
++ (1*FB_SYNC_OE_ACT_HIGH)),
++#else
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 |
++#ifdef USE_18BPP
++ PCR_BPIX_18 | PCR_END_SEL | PCR_FLMPOL | PCR_LPPOL | PCR_SCLK_SEL,
++#else
++ PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL | PCR_SCLK_SEL,
++#endif
++ .dmacr = 0x80040060,
++#endif
++ .cmap_greyscale = 0,
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++
++ .fixed_screen_cpu = NULL,
++ }, {
++ //.fb_mode = "SHARP LQ104V1DG61-16",
++ .init = stk5_gpio_lcdc_active,
++ .exit = stk5_gpio_lcdc_inactive,
++ .lcd_power = NULL,
++ .backlight_power = NULL,
++
++ .pixclock = 40000,
++ .xres = 640,
++ .yres = 480,
++
++#ifdef USE_18BPP
++ .bpp = 32,
++#else
++ .bpp = 16,
++#endif
++ .hsync_len = 32,
++ .right_margin = 32 + 1,
++ .left_margin = 0 + 3,
++
++ .vsync_len = 35,
++ .upper_margin = 0,
++ .lower_margin = 0,
++#if 0
++ /* currently not used by driver! */
++ .sync = ((0*FB_SYNC_HOR_HIGH_ACT) |
++ (0*FB_SYNC_VERT_HIGH_ACT) |
++ (1*FB_SYNC_OE_ACT_HIGH)),
++#else
++ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 |
++#ifdef USE_18BPP
++ PCR_BPIX_18 | PCR_END_SEL | PCR_FLMPOL | PCR_LPPOL | PCR_SCLK_SEL,
++#else
++ PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL | PCR_CLKPOL | PCR_SCLK_SEL,
++#endif
++ .dmacr = 0x80040060,
++#endif
++ .cmap_greyscale = 0,
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++
++ .fixed_screen_cpu = NULL,
++ },
++};
++
++static int __init karo_stk5_fb_register(void)
++{
++ int ret;
++
++ ret = mxc_register_device(&mxc_fb_device, &stk5_fb_data[0]);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to register FB device: %d\n", __FUNCTION__, ret);
++ }
++ return ret;
++}
++#else
++static inline int karo_stk5_fb_register(void)
++{
++ return 0;
++}
++#endif
++
++#if defined(CONFIG_MMC_MXC) || defined(CONFIG_MMC_MXC_MODULE)
++/*!
++ * Resource definition for the SDHC1
++ */
++static struct resource stk5_sdhc1_resources[] = {
++ {
++ .start = MMC_SDHC1_BASE_ADDR,
++ .end = MMC_SDHC1_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = MXC_INT_SDHC1,
++ .end = MXC_INT_SDHC1,
++ .flags = IORESOURCE_IRQ,
++ }, {
++ .start = gpio_to_irq(4 * 32 + 4),
++ .end = gpio_to_irq(4 * 32 + 4),
++ .flags = IORESOURCE_IRQ,
++#if 0
++ }, {
++ .name = "sdhc1",
++ .start = DMA_REQ_SDHC1,
++ .end = DMA_REQ_SDHC1,
++ .flags = IORESOURCE_DMA
++#endif
++ },
++};
++
++static inline int stk5_mmc_get_irq(int id)
++{
++ int irq;
++
++ switch (id) {
++ case 0:
++ irq = stk5_sdhc1_resources[2].start;
++ break;
++ default:
++ BUG();
++ }
++ return irq;
++}
++
++static const char *stk5_mmc_irqdesc[] = {
++ "MMC card 0 detect",
++};
++
++static struct pad_desc stk5_sdhc_pads[] = {
++};
++
++static int stk5_mmc_init(struct device *dev, irqreturn_t (*mmc_detect_irq)(int, void *),
++ void *data)
++{
++ int err;
++ int id = to_platform_device(dev)->id;
++ struct mmc_host *host = data;
++ int irq = stk5_mmc_get_irq(id);
++
++ err = mxc_iomux_v3_setup_multiple_pads(stk5_sdhc_pads,
++ ARRAY_SIZE(stk5_sdhc_pads));
++ if (err) {
++ return err;
++ }
++
++ host->caps |= MMC_CAP_4_BIT_DATA;
++
++ err = request_irq(irq, mmc_detect_irq,
++ IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
++ stk5_mmc_irqdesc[id], data);
++ if (err) {
++ printk(KERN_ERR "%s: MMC/SD: can't request MMC card detect IRQ %d\n",
++ __FUNCTION__, irq);
++ return err;
++ }
++ device_set_wakeup_capable(dev, 1);
++
++ return 0;
++}
++
++static void stk5_mmc_exit(struct device *dev, void *data)
++{
++ int id = to_platform_device(dev)->id;
++ int irq = stk5_mmc_get_irq(id);
++
++ free_irq(irq, data);
++ mxc_iomux_v3_release_multiple_pads(stk5_sdhc_pads,
++ ARRAY_SIZE(stk5_sdhc_pads));
++}
++
++#if 0
++static int stk5_mmc_suspend(struct device *dev, pm_message_t state)
++{
++ int id = to_platform_device(dev)->id;
++ int irq = stk5_mmc_get_irq(id);
++
++ if (device_may_wakeup(dev)) {
++ DBG(0, "%s: Enabling IRQ %d wakeup\n", __FUNCTION__, irq);
++ return enable_irq_wake(irq);
++ }
++ return 0;
++}
++
++static int stk5_mmc_resume(struct device *dev)
++{
++ int id = to_platform_device(dev)->id;
++ int irq = stk5_mmc_get_irq(id);
++
++ if (device_may_wakeup(dev)) {
++ DBG(0, "%s: Disabling IRQ %d wakeup\n", __FUNCTION__, irq);
++ return disable_irq_wake(irq);
++ }
++ return 0;
++}
++#endif
++
++static struct imxmmc_platform_data stk5_sdhc1_data = {
++ //.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
++ //.min_clk = 150000,
++ //.max_clk = 25000000,
++ //.detect_delay = 20,
++ .init = stk5_mmc_init,
++ .exit = stk5_mmc_exit,
++// .suspend = stk5_mmc_suspend,
++// .resume = stk5_mmc_resume,
++};
++
++static struct platform_device stk5_sdhc1_device = {
++ .name = "imx-mmc",
++ .id = 0,
++ .dev = {
++ .platform_data = &stk5_sdhc1_data,
++ },
++ .num_resources = ARRAY_SIZE(stk5_sdhc1_resources),
++ .resource = stk5_sdhc1_resources,
++};
++#endif
++
++#if defined(CONFIG_SPI_MXC) || defined(CONFIG_SPI_MXC_MODULE)
++static struct resource mxcspi1_resources[] = {
++ {
++ .start = CSPI1_BASE_ADDR,
++ .end = CSPI1_BASE_ADDR + SZ_4K - 1,
++ .flags = IORESOURCE_MEM,
++ }, {
++ .start = MXC_INT_CSPI1,
++ .end = MXC_INT_CSPI1,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct mxc_spi_master mxcspi1_data = {
++ .maxchipselect = 2,
++ .spi_version = 0,
++};
++
++static struct platform_device mxcspi1_device = {
++ .name = "mxc_spi",
++ .id = 0,
++ .dev = {
++ .platform_data = &mxcspi1_data,
++ },
++ .num_resources = ARRAY_SIZE(mxcspi1_resources),
++ .resource = mxcspi1_resources,
++};
++#endif // defined(CONFIG_SPI_MXC) || defined(CONFIG_SPI_MXC_MODULE)
++
++#if defined(CONFIG_AC97_BUS) || defined(CONFIG_AC97_BUS_MODULE)
++static u64 stk5_dma_mask = ~0UL;
++
++static struct pad_desc stk5_ac97_pads_on[] = {
++ MX25_PAD_VSTBY_ACK__GPIO_3_18, /* UCB1400 Reset */
++ MX25_PAD_RW__AUD4_TXFS,
++ MX25_PAD_EB0__AUD4_TXD,
++ MX25_PAD_EB1__AUD4_RXD,
++ MX25_PAD_OE__AUD4_TXC,
++};
++
++static struct pad_desc stk5_ac97_pads_off[] = {
++ MX25_PAD_VSTBY_ACK__GPIO_3_18, /* UCB1400 Reset */
++ MX25_PAD_RW__GPIO_3_25,
++ MX25_PAD_EB0__GPIO_2_12,
++ MX25_PAD_EB1__AUD4_RXD,
++ MX25_PAD_OE__AUD4_TXC,
++};
++
++static struct gpio_desc {
++ unsigned int gpio:7;
++ unsigned int dir:1;
++ unsigned int level:1;
++} stk5_ac97_gpios[] = {
++ /* configure the PHY strap pins to the correct values */
++ { GPIO_PORTC | 18, 1, 0, },
++ { GPIO_PORTC | 25, 1, 0, },
++ { GPIO_PORTB | 12, 1, 0, },
++};
++
++static int stk5_ac97_init(struct platform_device *dev)
++{
++ int ret;
++ int i;
++
++ DBG(0, "%s: \n", __FUNCTION__);
++
++ ret = mxc_iomux_v3_setup_multiple_pads(stk5_ac97_pads_off,
++ ARRAY_SIZE(stk5_ac97_pads_off));
++ if (ret == 0) {
++ for (i = 0; i < ARRAY_SIZE(stk5_ac97_gpios); i++) {
++ struct gpio_desc *pd = &stk5_ac97_gpios[i];
++
++ ret = gpio_request(pd->gpio, "AC97");
++ if (ret < 0) {
++ DBG(0, "%s: Failed to request GPIO%d_%d: %d\n",
++ __FUNCTION__, pd->gpio / 32 + 1, pd->gpio % 32, ret);
++ goto rel_mux;
++ }
++ if (pd->dir) {
++ gpio_direction_output(pd->gpio,
++ pd->level);
++ } else {
++ gpio_direction_input(pd->gpio);
++ }
++ }
++
++ ret = mxc_iomux_v3_setup_multiple_pads(stk5_ac97_pads_on,
++ ARRAY_SIZE(stk5_ac97_pads_on));
++ if (ret != 0) {
++ goto rel_gpio;
++ }
++ udelay(1);
++ gpio_set_value(stk5_ac97_gpios[0].gpio, !stk5_ac97_gpios[0].level);
++ }
++ return ret;
++
++ rel_mux:
++ mxc_iomux_v3_release_multiple_pads(stk5_ac97_gpios_off,
++ ARRAY_SIZE(stk5_ac97_gpios_off));
++ rel_gpio:
++ while (--i >= 0) {
++ struct gpio_desc *pd = &stk5_ac97_gpios[i];
++ int grp = pd->gpio / 32 + 1;
++ int ofs = pd->gpio % 32;
++
++ DBG(0, "%s: Freeing GPIO%d_%d\n", __FUNCTION__,
++ grp, ofs);
++ gpio_free(pd->gpio);
++ }
++ return ret;
++}
++
++static void stk5_ac97_exit(struct platform_device *dev)
++{
++ int i;
++
++ DBG(0, "%s: Releasing AC97 GPIO pins\n", __FUNCTION__);
++
++ mxc_iomux_v3_release_multiple_pads(stk5_ac97_pads_on,
++ ARRAY_SIZE(stk5_ac97_pads_on));
++ for (i = 0; i < ARRAY_SIZE(stk5_ac97_gpios); i++) {
++ struct gpio_desc *pd = &stk5_ac97_gpios[i];
++ int grp = pd->gpio / 32 + 1;
++ int ofs = pd->gpio % 32;
++
++ DBG(0, "%s: Freeing GPIO%d_%d\n", __FUNCTION__,
++ grp, ofs);
++ gpio_free(pd->gpio);
++ }
++}
++
++static struct mxc_ac97_audio_ops stk5_ac97_ops = {
++ .init = stk5_ac97_init,
++ .exit = stk5_ac97_exit,
++ .startup = NULL,
++ .shutdown = NULL,
++ .suspend = NULL,
++ .resume = NULL,
++ .priv = NULL,
++};
++
++static struct platform_device ac97_device = {
++ .name = "mx25-ac97",
++ .id = -1,
++ .dev = {
++ .dma_mask = &stk5_dma_mask,
++ .coherent_dma_mask = ~0UL,
++ .platform_data = &stk5_ac97_ops,
++ },
++};
++#endif
++
++static struct platform_dev_list {
++ struct platform_device *pdev;
++ int flag;
++} stk5_devices[] __initdata = {
++#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
++ { .pdev = &stk5_led_device, .flag = -1, },
++#endif
++#if defined(CONFIG_KEYBOARD_MXC) || defined(CONFIG_KEYBOARD_MXC_MODULE)
++ { .pdev = &stk5_keypad_device, .flag = 1, },
++#endif
++#if defined(CONFIG_SPI_MXC) || defined(CONFIG_SPI_MXC_MODULE)
++ { .pdev = &mxcspi1_device, .flag = 1, },
++#endif
++#if defined(CONFIG_AC97_BUS) || defined(CONFIG_AC97_BUS_MODULE)
++ { .pdev = &ac97_device, .flag = 1, },
++#endif
++#if defined(CONFIG_MMC_MXC) || defined(CONFIG_MMC_MXC_MODULE)
++ { .pdev = &stk5_sdhc1_device, .flag = 1, },
++#endif
++};
++#define STK5_NUM_DEVICES ARRAY_SIZE(stk5_devices)
++
++static __init int karo_stk5_board_init(void)
++{
++ int ret;
++ int i;
++
++ if (karo_get_board_type() != BOARD_KARO_STK5) {
++ return -ENODEV;
++ }
++ DBG(0, "%s: \n", __FUNCTION__);
++
++ karo_stk5_serial_init();
++
++ dump_regs();
++
++ /* enable SSI1_INT (GPIO_3_15) for IRQ probing */
++ set_irq_flags(gpio_to_irq(GPIO_PORTC | 15), IRQF_VALID | IRQF_PROBE);
++
++ ret = karo_stk5_fb_register();
++ if (ret) {
++ printk(KERN_WARNING "%s: karo_stk5_fb_register() failed: %d\n",
++ __FUNCTION__, ret);
++ }
++ ret = karo_stk5_usbh2_register();
++ if (ret) {
++ printk(KERN_WARNING "%s: karo_stk5_usbh2_register() failed: %d\n",
++ __FUNCTION__, ret);
++ }
++
++ for (i = 0; i < STK5_NUM_DEVICES; i++) {
++ if (stk5_devices[i].pdev == NULL) continue;
++ if (!stk5_devices[i].flag) {
++ DBG(0, "%s: Skipping platform device[%d] @ %p dev %p: %s\n",
++ __FUNCTION__, i, stk5_devices[i].pdev, &stk5_devices[i].pdev->dev,
++ stk5_devices[i].pdev->name);
++ continue;
++ }
++ DBG(0, "%s: Registering platform device[%d] @ %p dev %p: %s\n",
++ __FUNCTION__, i, stk5_devices[i].pdev, &stk5_devices[i].pdev->dev,
++ stk5_devices[i].pdev->name);
++ ret = platform_device_register(stk5_devices[i].pdev);
++ if (ret) {
++ printk(KERN_WARNING "%s: Failed to register platform_device[%d]: %s: %d\n",
++ __FUNCTION__, i, stk5_devices[i].pdev->name, ret);
++ }
++ }
++ DBG(0, "%s: Done\n", __FUNCTION__);
++ return 0;
++}
++subsys_initcall(karo_stk5_board_init);
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx3/clock-imx35.c linux-2.6.30-rc4-karo/arch/arm/mach-mx3/clock-imx35.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx3/clock-imx35.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx3/clock-imx35.c 2009-06-02 17:05:26.000000000 +0200
+@@ -381,7 +381,7 @@ DEFINE_CLOCK(gpu2d_clk, 0, CCM_CGR3, 4
+ .clk = &c, \
+ },
+
+-static struct clk_lookup lookups[] __initdata = {
++static struct clk_lookup lookups[] = {
+ _REGISTER_CLOCK(NULL, "asrc", asrc_clk)
+ _REGISTER_CLOCK(NULL, "ata", ata_clk)
+ _REGISTER_CLOCK(NULL, "audmux", audmux_clk)
+diff -urNp linux-2.6.30-rc4/arch/arm/mach-mx3/clock.c linux-2.6.30-rc4-karo/arch/arm/mach-mx3/clock.c
+--- linux-2.6.30-rc4/arch/arm/mach-mx3/clock.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/mach-mx3/clock.c 2009-06-02 17:05:26.000000000 +0200
+@@ -516,7 +516,7 @@ DEFINE_CLOCK(ipg_clk, 0, NULL,
+ .clk = &c, \
+ },
+
+-static struct clk_lookup lookups[] __initdata = {
++static struct clk_lookup lookups[] = {
+ _REGISTER_CLOCK(NULL, "emi", emi_clk)
+ _REGISTER_CLOCK(NULL, "cspi", cspi1_clk)
+ _REGISTER_CLOCK(NULL, "cspi", cspi2_clk)
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/Kconfig linux-2.6.30-rc4-karo/arch/arm/plat-mxc/Kconfig
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/Kconfig 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/Kconfig 2009-06-02 17:05:27.000000000 +0200
+@@ -56,6 +56,9 @@ config ARCH_HAS_RNGA
+ bool
+ depends on ARCH_MXC
+
++config ARCH_MXC_IOMUX_V2
++ bool
++
+ config ARCH_MXC_IOMUX_V3
+ bool
+ endif
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/Makefile linux-2.6.30-rc4-karo/arch/arm/plat-mxc/Makefile
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/Makefile 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/Makefile 2009-06-02 17:05:27.000000000 +0200
+@@ -5,7 +5,7 @@
+ # Common support
+ obj-y := irq.o clock.o gpio.o time.o devices.o cpu.o system.o
+
+-obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o
+-obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o
+-obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
+-obj-$(CONFIG_MXC_PWM) += pwm.o
++obj-$(CONFIG_ARCH_MXC_IOMUX_V2) += iomux-mx1-mx2.o dma-mx1-mx2.o
++obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
++obj-$(CONFIG_MXC_PWM) += pwm.o
++obj-$(CONFIG_MACH_MX25) += spba.o
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/board-stk5.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/board-stk5.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/board-stk5.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/board-stk5.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,17 @@
++/*
++ * Copyright 2009 <LW@KARO-electronics.de>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#define UART1_ENABLED 1
++#define UART2_ENABLED 1
++#define UART3_ENABLED 1
++/* Not available on TX25 */
++#define UART4_ENABLED 0
++#define UART5_ENABLED 0
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/board-tx25.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/board-tx25.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/board-tx25.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/board-tx25.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,13 @@
++/*
++ * Copyright 2009 <LW@KARO-electronics.de>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#define MXC_LL_UART_PADDR UART1_BASE_ADDR
++#define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/common.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/common.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/common.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/common.h 2009-06-02 17:05:27.000000000 +0200
+@@ -17,6 +17,7 @@ struct clk;
+ extern void mx1_map_io(void);
+ extern void mx21_map_io(void);
+ extern void mx27_map_io(void);
++extern void mx25_map_io(void);
+ extern void mx31_map_io(void);
+ extern void mx35_map_io(void);
+ extern void mxc_init_irq(void);
+@@ -24,6 +25,7 @@ extern void mxc_timer_init(struct clk *t
+ extern int mx1_clocks_init(unsigned long fref);
+ extern int mx21_clocks_init(unsigned long lref, unsigned long fref);
+ extern int mx27_clocks_init(unsigned long fref);
++extern int mx25_clocks_init(unsigned long fref);
+ extern int mx31_clocks_init(unsigned long fref);
+ extern int mx35_clocks_init(void);
+ extern int mxc_register_gpios(void);
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/dma.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/dma.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/dma.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/dma.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,259 @@
++/*
++ * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#ifndef __ASM_ARCH_MXC_DMA_H__
++#define __ASM_ARCH_MXC_DMA_H__
++
++#include <mach/sdma.h>
++
++#define MXC_DMA_DYNAMIC_CHANNEL 255
++
++#define MXC_DMA_DONE 0x0
++#define MXC_DMA_REQUEST_TIMEOUT 0x1
++#define MXC_DMA_TRANSFER_ERROR 0x2
++
++/*! This defines the list of device ID's for DMA */
++typedef enum mxc_dma_device {
++ MXC_DMA_UART1_RX,
++ MXC_DMA_UART1_TX,
++ MXC_DMA_UART2_RX,
++ MXC_DMA_UART2_TX,
++ MXC_DMA_UART3_RX,
++ MXC_DMA_UART3_TX,
++ MXC_DMA_UART4_RX,
++ MXC_DMA_UART4_TX,
++ MXC_DMA_UART5_RX,
++ MXC_DMA_UART5_TX,
++ MXC_DMA_UART6_RX,
++ MXC_DMA_UART6_TX,
++ MXC_DMA_MMC1_WIDTH_1,
++ MXC_DMA_MMC1_WIDTH_4,
++ MXC_DMA_MMC2_WIDTH_1,
++ MXC_DMA_MMC2_WIDTH_4,
++ MXC_DMA_SSI1_8BIT_RX0,
++ MXC_DMA_SSI1_8BIT_TX0,
++ MXC_DMA_SSI1_16BIT_RX0,
++ MXC_DMA_SSI1_16BIT_TX0,
++ MXC_DMA_SSI1_24BIT_RX0,
++ MXC_DMA_SSI1_24BIT_TX0,
++ MXC_DMA_SSI1_8BIT_RX1,
++ MXC_DMA_SSI1_8BIT_TX1,
++ MXC_DMA_SSI1_16BIT_RX1,
++ MXC_DMA_SSI1_16BIT_TX1,
++ MXC_DMA_SSI1_24BIT_RX1,
++ MXC_DMA_SSI1_24BIT_TX1,
++ MXC_DMA_SSI2_8BIT_RX0,
++ MXC_DMA_SSI2_8BIT_TX0,
++ MXC_DMA_SSI2_16BIT_RX0,
++ MXC_DMA_SSI2_16BIT_TX0,
++ MXC_DMA_SSI2_24BIT_RX0,
++ MXC_DMA_SSI2_24BIT_TX0,
++ MXC_DMA_SSI2_8BIT_RX1,
++ MXC_DMA_SSI2_8BIT_TX1,
++ MXC_DMA_SSI2_16BIT_RX1,
++ MXC_DMA_SSI2_16BIT_TX1,
++ MXC_DMA_SSI2_24BIT_RX1,
++ MXC_DMA_SSI2_24BIT_TX1,
++ MXC_DMA_FIR_RX,
++ MXC_DMA_FIR_TX,
++ MXC_DMA_CSPI1_RX,
++ MXC_DMA_CSPI1_TX,
++ MXC_DMA_CSPI2_RX,
++ MXC_DMA_CSPI2_TX,
++ MXC_DMA_CSPI3_RX,
++ MXC_DMA_CSPI3_TX,
++ MXC_DMA_ATA_RX,
++ MXC_DMA_ATA_TX,
++ MXC_DMA_MEMORY,
++ MXC_DMA_FIFO_MEMORY,
++ MXC_DMA_DSP_PACKET_DATA0_RD,
++ MXC_DMA_DSP_PACKET_DATA0_WR,
++ MXC_DMA_DSP_PACKET_DATA1_RD,
++ MXC_DMA_DSP_PACKET_DATA1_WR,
++ MXC_DMA_DSP_LOG0_CHNL,
++ MXC_DMA_DSP_LOG1_CHNL,
++ MXC_DMA_DSP_LOG2_CHNL,
++ MXC_DMA_DSP_LOG3_CHNL,
++ MXC_DMA_CSI_RX,
++ MXC_DMA_SPDIF_16BIT_TX,
++ MXC_DMA_SPDIF_16BIT_RX,
++ MXC_DMA_SPDIF_32BIT_TX,
++ MXC_DMA_SPDIF_32BIT_RX,
++ MXC_DMA_ASRC_A_RX,
++ MXC_DMA_ASRC_A_TX,
++ MXC_DMA_ASRC_B_RX,
++ MXC_DMA_ASRC_B_TX,
++ MXC_DMA_ASRC_C_RX,
++ MXC_DMA_ASRC_C_TX,
++ MXC_DMA_ESAI_16BIT_RX,
++ MXC_DMA_ESAI_16BIT_TX,
++ MXC_DMA_ESAI_24BIT_RX,
++ MXC_DMA_ESAI_24BIT_TX,
++ MXC_DMA_TEST_RAM2D2RAM,
++ MXC_DMA_TEST_RAM2RAM2D,
++ MXC_DMA_TEST_RAM2D2RAM2D,
++ MXC_DMA_TEST_RAM2RAM,
++ MXC_DMA_TEST_HW_CHAINING,
++ MXC_DMA_TEST_SW_CHAINING
++} mxc_dma_device_t;
++
++/*! This defines the prototype of callback funtion registered by the drivers */
++typedef void (*mxc_dma_callback_t) (void *arg, int error_status,
++ unsigned int count);
++
++/*! This defines the type of DMA transfer requested */
++typedef enum mxc_dma_mode {
++ MXC_DMA_MODE_READ,
++ MXC_DMA_MODE_WRITE,
++} mxc_dma_mode_t;
++
++/*! This defines the DMA channel parameters */
++typedef struct mxc_dma_channel {
++ unsigned int active:1; /*!< When there has a active tranfer, it is set to 1 */
++ unsigned int lock; /*!< Defines the channel is allocated or not */
++ int curr_buf; /*!< Current buffer */
++ mxc_dma_mode_t mode; /*!< Read or Write */
++ unsigned int channel; /*!< Channel info */
++ unsigned int dynamic:1; /*!< Channel not statically allocated when 1 */
++ char *dev_name; /*!< Device name */
++ void *private; /*!< Private structure for platform */
++ mxc_dma_callback_t cb_fn; /*!< The callback function */
++ void *cb_args; /*!< The argument of callback function */
++} mxc_dma_channel_t;
++
++/*! This structure contains the information about a dma transfer */
++typedef struct mxc_dma_requestbuf {
++ dma_addr_t src_addr; /*!< source address */
++ dma_addr_t dst_addr; /*!< destination address */
++ int num_of_bytes; /*!< the length of this transfer : bytes */
++} mxc_dma_requestbuf_t;
++
++/*!
++ * This function is generally called by the driver at open time.
++ * The DMA driver would do any initialization steps that is required
++ * to get the channel ready for data transfer.
++ *
++ * @param channel_id a pre-defined id. The peripheral driver would specify
++ * the id associated with its peripheral. This would be
++ * used by the DMA driver to identify the peripheral
++ * requesting DMA and do the necessary setup on the
++ * channel associated with the particular peripheral.
++ * The DMA driver could use static or dynamic DMA channel
++ * allocation.
++ * @param dev_name module name or device name
++ * @return returns a negative number on error if request for a DMA channel did not
++ * succeed, returns the channel number to be used on success.
++ */
++extern int mxc_dma_request(mxc_dma_device_t channel_id, char *dev_name);
++
++/*!
++ * This function is generally called by the driver at close time. The DMA
++ * driver would do any cleanup associated with this channel.
++ *
++ * @param channel_num the channel number returned at request time. This
++ * would be used by the DMA driver to identify the calling
++ * driver and do the necessary cleanup on the channel
++ * associated with the particular peripheral
++ * @return returns a negative number on error or 0 on success
++ */
++extern int mxc_dma_free(int channel_num);
++
++/*!
++ * This function would just configure the buffers specified by the user into
++ * dma channel. The caller must call mxc_dma_enable to start this transfer.
++ *
++ * @param channel_num the channel number returned at request time. This
++ * would be used by the DMA driver to identify the calling
++ * driver and do the necessary cleanup on the channel
++ * associated with the particular peripheral
++ * @param dma_buf an array of physical addresses to the user defined
++ * buffers. The caller must guarantee the dma_buf is
++ * available until the transfer is completed.
++ * @param num_buf number of buffers in the array
++ * @param mode specifies whether this is READ or WRITE operation
++ * @return This function returns a negative number on error if buffer could not be
++ * added with DMA for transfer. On Success, it returns 0
++ */
++extern int mxc_dma_config(int channel_num, mxc_dma_requestbuf_t * dma_buf,
++ int num_buf, mxc_dma_mode_t mode);
++
++/*!
++ * This function would just configure the scatterlist specified by the
++ * user into dma channel. This is a slight variation of mxc_dma_config(),
++ * it is provided for the convenience of drivers that have a scatterlist
++ * passed into them. It is the calling driver's responsibility to have the
++ * correct physical address filled in the "dma_address" field of the
++ * scatterlist.
++ *
++ * @param channel_num the channel number returned at request time. This
++ * would be used by the DMA driver to identify the calling
++ * driver and do the necessary cleanup on the channel
++ * associated with the particular peripheral
++ * @param sg a scatterlist of buffers. The caller must guarantee
++ * the dma_buf is available until the transfer is
++ * completed.
++ * @param num_buf number of buffers in the array
++ * @param num_of_bytes total number of bytes to transfer. If set to 0, this
++ * would imply to use the length field of the scatterlist
++ * for each DMA transfer. Else it would calculate the size
++ * for each DMA transfer.
++ * @param mode specifies whether this is READ or WRITE operation
++ * @return This function returns a negative number on error if buffer could not
++ * be added with DMA for transfer. On Success, it returns 0
++ */
++extern int mxc_dma_sg_config(int channel_num, struct scatterlist *sg,
++ int num_buf, int num_of_bytes,
++ mxc_dma_mode_t mode);
++
++/*!
++ * This function is provided if the driver would like to set/change its
++ * callback function.
++ *
++ * @param channel_num the channel number returned at request time. This
++ * would be used by the DMA driver to identify the calling
++ * driver and do the necessary cleanup on the channel
++ * associated with the particular peripheral
++ * @param callback a callback function to provide notification on transfer
++ * completion, user could specify NULL if he does not wish
++ * to be notified
++ * @param arg an argument that gets passed in to the callback
++ * function, used by the user to do any driver specific
++ * operations.
++ * @return this function returns a negative number on error if the callback
++ * could not be set for the channel or 0 on success
++ */
++extern int mxc_dma_callback_set(int channel_num, mxc_dma_callback_t callback,
++ void *arg);
++
++/*!
++ * This stops the DMA channel and any ongoing transfers. Subsequent use of
++ * mxc_dma_enable() will restart the channel and restart the transfer.
++ *
++ * @param channel_num the channel number returned at request time. This
++ * would be used by the DMA driver to identify the calling
++ * driver and do the necessary cleanup on the channel
++ * associated with the particular peripheral
++ * @return returns a negative number on error or 0 on success
++ */
++extern int mxc_dma_disable(int channel_num);
++
++/*!
++ * This starts DMA transfer. Or it restarts DMA on a stopped channel
++ * previously stopped with mxc_dma_disable().
++ *
++ * @param channel_num the channel number returned at request time. This
++ * would be used by the DMA driver to identify the calling
++ * driver and do the necessary cleanup on the channel
++ * associated with the particular peripheral
++ * @return returns a negative number on error or 0 on success
++ */
++extern int mxc_dma_enable(int channel_num);
++
++#endif
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/hardware.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/hardware.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/hardware.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/hardware.h 2009-06-02 17:05:27.000000000 +0200
+@@ -29,13 +29,18 @@
+ #endif
+
+ #ifdef CONFIG_ARCH_MX2
++#ifndef CONFIG_MACH_MX25
+ # include <mach/mx2x.h>
++#endif
+ # ifdef CONFIG_MACH_MX21
+ # include <mach/mx21.h>
+ # endif
+ # ifdef CONFIG_MACH_MX27
+ # include <mach/mx27.h>
+ # endif
++# ifdef CONFIG_MACH_MX25
++# include <mach/mx25.h>
++# endif
+ #endif
+
+ #ifdef CONFIG_ARCH_MX1
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/imxfb.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/imxfb.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/imxfb.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/imxfb.h 2009-06-02 17:05:26.000000000 +0200
+@@ -13,7 +13,8 @@
+ #define PCR_BPIX_4 (2 << 25)
+ #define PCR_BPIX_8 (3 << 25)
+ #define PCR_BPIX_12 (4 << 25)
+-#define PCR_BPIX_16 (4 << 25)
++#define PCR_BPIX_16 (5 << 25)
++#define PCR_BPIX_18 (6 << 25)
+ #define PCR_PIXPOL (1 << 24)
+ #define PCR_FLMPOL (1 << 23)
+ #define PCR_LPPOL (1 << 22)
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/iomux-mx25.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/iomux-mx25.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/iomux-mx25.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/iomux-mx25.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,905 @@
++/*
++ * arch/arm/plat-mxc/include/mach/iomux-mx25.h
++ *
++ * Copyright (C) 2009 by Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ * based on arch/arm/mach-mx25/mx25_pins.h
++ * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ * and
++ * arch/arm/plat-mxc/include/mach/iomux-mx35.h
++ * Copyright (C, NO_PAD_CTRL) 2009 by Jan Weitzel Phytec Messtechnik GmbH <armlinux@phytec.de>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++#ifndef __IOMUX_MX25_H__
++#define __IOMUX_MX25_H__
++
++#include <mach/iomux-v3.h>
++
++/*
++ *
++ * @brief MX25 I/O Pin List
++ *
++ * @ingroup GPIO_MX25
++ */
++
++#ifndef __ASSEMBLY__
++
++/*
++ * IOMUX/PAD Bit field definitions
++ */
++
++#define MX25_PAD_A10__A10 IOMUX_PAD(A10, A10, 0x000, 0x008, 0x00, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_A10__GPIO_4_0 IOMUX_PAD(A10, GPIO_4_0, 0x000, 0x008, 0x05, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_A13__A13 IOMUX_PAD(A13, A13, 0x22C, 0x00c, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A13__GPIO_4_1 IOMUX_PAD(A13, GPIO_4_1, 0x22C, 0x00c, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A14__A14 IOMUX_PAD(A14, A14, 0x230, 0x010, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A14__GPIO_2_0 IOMUX_PAD(A14, GPIO_2_0, 0x230, 0x010, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A15__A15 IOMUX_PAD(A15, A15, 0x234, 0x014, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A15__GPIO_2_1 IOMUX_PAD(A15, GPIO_2_1, 0x234, 0x014, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A16__A16 IOMUX_PAD(A16, A16, 0x000, 0x018, 0x10, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_A16__GPIO_2_2 IOMUX_PAD(A16, GPIO_2_2, 0x000, 0x018, 0x15, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_A17__A17 IOMUX_PAD(A17, A17, 0x238, 0x01c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A17__GPIO_2_3 IOMUX_PAD(A17, GPIO_2_3, 0x238, 0x01c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A18__A18 IOMUX_PAD(A18, A18, 0x23c, 0x020, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A18__GPIO_2_4 IOMUX_PAD(A18, GPIO_2_4, 0x23c, 0x020, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A18__FEC_COL IOMUX_PAD(A18, FEC_COL, 0x23c, 0x020, 0x17, 0x504, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_A19__A19 IOMUX_PAD(A19, A19, 0x240, 0x024, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A19__FEC_RX_ER IOMUX_PAD(A19, FEC_RX_ER, 0x240, 0x024, 0x17, 0x518, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_A19__GPIO_2_5 IOMUX_PAD(A19, GPIO_2_5, 0x240, 0x024, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A20__A20 IOMUX_PAD(A20, A20, 0x244, 0x028, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A20__GPIO_2_6 IOMUX_PAD(A20, GPIO_2_6, 0x244, 0x028, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A20__FEC_RDATA2 IOMUX_PAD(A20, FEC_RDATA2, 0x244, 0x028, 0x17, 0x50c, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_A21__A21 IOMUX_PAD(A21, A21, 0x248, 0x02c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A21__GPIO_2_7 IOMUX_PAD(A21, GPIO_2_7, 0x248, 0x02c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A21__FEC_RDATA3 IOMUX_PAD(A21, FEC_RDATA3, 0x248, 0x02c, 0x17, 0x510, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_A22__A22 IOMUX_PAD(A22, A22, 0x000, 0x030, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A22__GPIO_2_8 IOMUX_PAD(A22, GPIO_2_8, 0x000, 0x030, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A23__A23 IOMUX_PAD(A23, A23, 0x24c, 0x034, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A23__GPIO_2_9 IOMUX_PAD(A23, GPIO_2_9, 0x24c, 0x034, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A24__A24 IOMUX_PAD(A24, A24, 0x250, 0x038, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A24__GPIO_2_10 IOMUX_PAD(A24, GPIO_2_10, 0x250, 0x038, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A24__FEC_RX_CLK IOMUX_PAD(A24, FEC_RX_CLK, 0x250, 0x038, 0x17, 0x514, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_A25__A25 IOMUX_PAD(A25, A25, 0x254, 0x03c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A25__GPIO_2_11 IOMUX_PAD(A25, GPIO_2_11, 0x254, 0x03c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_A25__FEC_CRS IOMUX_PAD(A25, FEC_CRS, 0x254, 0x03c, 0x17, 0x508, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_EB0__EB0 IOMUX_PAD(EB0, EB0, 0x258, 0x040, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_EB0__AUD4_TXD IOMUX_PAD(EB0, AUD4_TXD, 0x258, 0x040, 0x14, 0x464, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_EB0__GPIO_2_12 IOMUX_PAD(EB0, GPIO_2_12, 0x258, 0x040, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_EB1__EB1 IOMUX_PAD(EB1, EB1, 0x25c, 0x044, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_EB1__AUD4_RXD IOMUX_PAD(EB1, AUD4_RXD, 0x25c, 0x044, 0x14, 0x460, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_EB1__GPIO_2_13 IOMUX_PAD(EB1, GPIO_2_13, 0x25c, 0x044, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_OE__OE IOMUX_PAD(OE, OE, 0x260, 0x048, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_OE__AUD4_TXC IOMUX_PAD(OE, AUD4_TXC, 0x260, 0x048, 0x14, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_OE__GPIO_2_14 IOMUX_PAD(OE, GPIO_2_14, 0x260, 0x048, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CS0__CS0 IOMUX_PAD(CS0, CS0, 0x000, 0x04c, 0x00, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CS0__GPIO_4_2 IOMUX_PAD(CS0, GPIO_4_2, 0x000, 0x04c, 0x05, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CS1__CS1 IOMUX_PAD(CS1, CS1, 0x000, 0x050, 0x00, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CS1__GPIO_4_3 IOMUX_PAD(CS1, GPIO_4_3, 0x000, 0x050, 0x05, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CS4__CS4 IOMUX_PAD(CS4, CS4, 0x264, 0x054, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CS4__UART5_CTS IOMUX_PAD(CS4, UART5_CTS, 0x264, 0x054, 0x13, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CS4__GPIO_3_20 IOMUX_PAD(CS4, GPIO_3_20, 0x264, 0x054, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CS5__CS5 IOMUX_PAD(CS5, CS5, 0x268, 0x058, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CS5__UART5_RTS IOMUX_PAD(CS5, UART5_RTS, 0x268, 0x058, 0x13, 0x574, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CS5__GPIO_3_21 IOMUX_PAD(CS5, GPIO_3_21, 0x268, 0x058, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_NF_CE0__NF_CE0 IOMUX_PAD(NF_CE0, NF_CE0, 0x26c, 0x05c, 0x10, 0, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_NF_CE0__GPIO_3_22 IOMUX_PAD(NF_CE0, GPIO_3_22, 0x26c, 0x05c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_ECB__ECB IOMUX_PAD(ECB, ECB, 0x270, 0x060, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_ECB__UART5_TXD_MUX IOMUX_PAD(ECB, UART5_TXD_MUX, 0x270, 0x060, 0x13, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_ECB__GPIO_3_23 IOMUX_PAD(ECB, GPIO_3_23, 0x270, 0x060, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LBA__LBA IOMUX_PAD(LBA, LBA, 0x274, 0x064, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LBA__UART5_RXD_MUX IOMUX_PAD(LBA, UART5_RXD_MUX, 0x274, 0x064, 0x13, 0x578, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LBA__GPIO_3_24 IOMUX_PAD(LBA, GPIO_3_24, 0x274, 0x064, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_BCLK__BCLK IOMUX_PAD(BCLK, BCLK, 0x000, 0x068, 0x00, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_BCLK__GPIO_4_4 IOMUX_PAD(BCLK, GPIO_4_4, 0x000, 0x068, 0x05, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_RW__RW IOMUX_PAD(RW, RW, 0x278, 0x06c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_RW__AUD4_TXFS IOMUX_PAD(RW, AUD4_TXFS, 0x278, 0x06c, 0x14, 0x474, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_RW__GPIO_3_25 IOMUX_PAD(RW, GPIO_3_25, 0x278, 0x06c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_NFWE_B__NFWE_B IOMUX_PAD(NFWE_B, NFWE_B, 0x000, 0x070, 0x10, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFWE_B__GPIO_3_26 IOMUX_PAD(NFWE_B, GPIO_3_26, 0x000, 0x070, 0x15, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFRE_B__NFRE_B IOMUX_PAD(NFRE_B, NFRE_B, 0x000, 0x074, 0x10, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFRE_B__GPIO_3_27 IOMUX_PAD(NFRE_B, GPIO_3_27, 0x000, 0x074, 0x15, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFALE__NFALE IOMUX_PAD(NFALE, NFALE, 0x000, 0x078, 0x10, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFALE__GPIO_3_28 IOMUX_PAD(NFALE, GPIO_3_28, 0x000, 0x078, 0x15, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFCLE__NFCLE IOMUX_PAD(NFCLE, NFCLE, 0x000, 0x07c, 0x10, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFCLE__GPIO_3_29 IOMUX_PAD(NFCLE, GPIO_3_29, 0x000, 0x07c, 0x15, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFWP_B__NFWP_B IOMUX_PAD(NFWP_B, NFWP_B, 0x000, 0x080, 0x10, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFWP_B__GPIO_3_30 IOMUX_PAD(NFWP_B, GPIO_3_30, 0x000, 0x080, 0x15, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_NFRB__NFRB IOMUX_PAD(NFRB, NFRB, 0x27c, 0x084, 0x10, 0, 0, PAD_CTL_PULL_KEEPER)
++#define MX25_PAD_NFRB__GPIO_3_31 IOMUX_PAD(NFRB, GPIO_3_31, 0x27c, 0x084, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D15__D15 IOMUX_PAD(D15, D15, 0x280, 0x088, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D15__LD16 IOMUX_PAD(D15, LD16, 0x280, 0x088, 0x01, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D15__GPIO_4_5 IOMUX_PAD(D15, GPIO_4_5, 0x280, 0x088, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D14__D14 IOMUX_PAD(D14, D14, 0x284, 0x08c, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D14__LD17 IOMUX_PAD(D14, LD17, 0x284, 0x08c, 0x01, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D14__GPIO_4_6 IOMUX_PAD(D14, GPIO_4_6, 0x284, 0x08c, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D13__D13 IOMUX_PAD(D13, D13, 0x288, 0x090, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D13__LD18 IOMUX_PAD(D13, LD18, 0x288, 0x090, 0x01, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D13__GPIO_4_7 IOMUX_PAD(D13, GPIO_4_7, 0x288, 0x090, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D12__D12 IOMUX_PAD(D12, D12, 0x28c, 0x094, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D12__GPIO_4_8 IOMUX_PAD(D12, GPIO_4_8, 0x28c, 0x094, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D11__D11 IOMUX_PAD(D11, D11, 0x290, 0x098, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D11__GPIO_4_9 IOMUX_PAD(D11, GPIO_4_9, 0x290, 0x098, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D10__D10 IOMUX_PAD(D10, D10, 0x294, 0x09c, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D10__GPIO_4_10 IOMUX_PAD(D10, GPIO_4_10, 0x294, 0x09c, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D10__USBOTG_OC IOMUX_PAD(D10, USBOTG_OC, 0x294, 0x09c, 0x06, 0x57c, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D9__D9 IOMUX_PAD(D9, D9, 0x298, 0x0a0, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D9__GPIO_4_11 IOMUX_PAD(D9, GPIO_4_11, 0x298, 0x0a0, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D9__USBH2_PWR IOMUX_PAD(D9, USBH2_PWR, 0x298, 0x0a0, 0x06, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D8__D8 IOMUX_PAD(D8, D8, 0x29c, 0x0a4, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D8__GPIO_4_12 IOMUX_PAD(D8, GPIO_4_12, 0x29c, 0x0a4, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D8__USBH2_OC IOMUX_PAD(D8, USBH2_OC, 0x29c, 0x0a4, 0x06, 0x580, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D7__D7 IOMUX_PAD(D7, D7, 0x2a0, 0x0a8, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D7__GPIO_4_13 IOMUX_PAD(D7, GPIO_4_13, 0x2a0, 0x0a8, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D6__D6 IOMUX_PAD(D6, D6, 0x2a4, 0x0ac, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D6__GPIO_4_14 IOMUX_PAD(D6, GPIO_4_14, 0x2a4, 0x0ac, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D5__D5 IOMUX_PAD(D5, D5, 0x2a8, 0x0b0, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D5__GPIO_4_15 IOMUX_PAD(D5, GPIO_4_15, 0x2a8, 0x0b0, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D4__D4 IOMUX_PAD(D4, D4, 0x2ac, 0x0b4, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D4__GPIO_4_16 IOMUX_PAD(D4, GPIO_4_16, 0x2ac, 0x0b4, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D3__D3 IOMUX_PAD(D3, D3, 0x2b0, 0x0b8, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D3__GPIO_4_17 IOMUX_PAD(D3, GPIO_4_17, 0x2b0, 0x0b8, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D2__D2 IOMUX_PAD(D2, D2, 0x2b4, 0x0bc, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D2__GPIO_4_18 IOMUX_PAD(D2, GPIO_4_18, 0x2b4, 0x0bc, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D1__D1 IOMUX_PAD(D1, D1, 0x2b8, 0x0c0, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D1__GPIO_4_19 IOMUX_PAD(D1, GPIO_4_19, 0x2b8, 0x0c0, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D0__D0 IOMUX_PAD(D0, D0, 0x2bc, 0x0c4, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_D0__GPIO_4_20 IOMUX_PAD(D0, GPIO_4_20, 0x2bc, 0x0c4, 0x05, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD0__LD0 IOMUX_PAD(LD0, LD0, 0x2c0, 0x0c8, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD0__CSI_D0 IOMUX_PAD(LD0, CSI_D0, 0x2c0, 0x0c8, 0x12, 0x488, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD0__GPIO_2_15 IOMUX_PAD(LD0, GPIO_2_15, 0x2c0, 0x0c8, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD1__LD1 IOMUX_PAD(LD1, LD1, 0x2c4, 0x0cc, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD1__CSI_D1 IOMUX_PAD(LD1, CSI_D1, 0x2c4, 0x0cc, 0x12, 0x48c, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD1__GPIO_2_16 IOMUX_PAD(LD1, GPIO_2_16, 0x2c4, 0x0cc, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD2__LD2 IOMUX_PAD(LD2, LD2, 0x2c8, 0x0d0, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD2__GPIO_2_17 IOMUX_PAD(LD2, GPIO_2_17, 0x2c8, 0x0d0, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD3__LD3 IOMUX_PAD(LD3, LD3, 0x2cc, 0x0d4, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD3__GPIO_2_18 IOMUX_PAD(LD3, GPIO_2_18, 0x2cc, 0x0d4, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD4__LD4 IOMUX_PAD(LD4, LD4, 0x2d0, 0x0d8, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD4__GPIO_2_19 IOMUX_PAD(LD4, GPIO_2_19, 0x2d0, 0x0d8, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD5__LD5 IOMUX_PAD(LD5, LD5, 0x2d4, 0x0dc, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD5__GPIO_1_19 IOMUX_PAD(LD5, GPIO_1_19, 0x2d4, 0x0dc, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD6__LD6 IOMUX_PAD(LD6, LD6, 0x2d8, 0x0e0, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD6__GPIO_1_20 IOMUX_PAD(LD6, GPIO_1_20, 0x2d8, 0x0e0, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD7__LD7 IOMUX_PAD(LD7, LD7, 0x2dc, 0x0e4, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD7__GPIO_1_21 IOMUX_PAD(LD7, GPIO_1_21, 0x2dc, 0x0e4, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD8__LD8 IOMUX_PAD(LD8, LD8, 0x2e0, 0x0e8, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD8__FEC_TX_ERR IOMUX_PAD(LD8, FEC_TX_ERR, 0x2e0, 0x0e8, 0x15, 0, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_LD9__LD9 IOMUX_PAD(LD9, LD9, 0x2e4, 0x0ec, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD9__FEC_COL IOMUX_PAD(LD9, FEC_COL, 0x2e4, 0x0ec, 0x15, 0x504, 1, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_LD10__LD10 IOMUX_PAD(LD10, LD10, 0x2e8, 0x0f0, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD10__FEC_RX_ER IOMUX_PAD(LD10, FEC_RX_ER, 0x2e8, 0x0f0, 0x15, 0x518, 1, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_LD11__LD11 IOMUX_PAD(LD11, LD11, 0x2ec, 0x0f4, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD11__FEC_RDATA2 IOMUX_PAD(LD11, FEC_RDATA2, 0x2ec, 0x0f4, 0x15, 0x50c, 1, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_LD12__LD12 IOMUX_PAD(LD12, LD12, 0x2f0, 0x0f8, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD12__FEC_RDATA3 IOMUX_PAD(LD12, FEC_RDATA3, 0x2f0, 0x0f8, 0x15, 0x510, 1, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_LD13__LD13 IOMUX_PAD(LD13, LD13, 0x2f4, 0x0fc, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD13__FEC_TDATA2 IOMUX_PAD(LD13, FEC_TDATA2, 0x2f4, 0x0fc, 0x15, 0, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_LD14__LD14 IOMUX_PAD(LD14, LD14, 0x2f8, 0x100, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD14__FEC_TDATA3 IOMUX_PAD(LD14, FEC_TDATA3, 0x2f8, 0x100, 0x15, 0, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_LD15__LD15 IOMUX_PAD(LD15, LD15, 0x2fc, 0x104, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LD15__FEC_RX_CLK IOMUX_PAD(LD15, FEC_RX_CLK, 0x2fc, 0x104, 0x15, 0x514, 1, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_HSYNC__HSYNC IOMUX_PAD(HSYNC, HSYNC, 0x300, 0x108, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_HSYNC__GPIO_1_22 IOMUX_PAD(HSYNC, GPIO_1_22, 0x300, 0x108, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_VSYNC__VSYNC IOMUX_PAD(VSYNC, VSYNC, 0x304, 0x10c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_VSYNC__GPIO_1_23 IOMUX_PAD(VSYNC, GPIO_1_23, 0x304, 0x10c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LSCLK__LSCLK IOMUX_PAD(LSCLK, LSCLK, 0x308, 0x110, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_LSCLK__GPIO_1_24 IOMUX_PAD(LSCLK, GPIO_1_24, 0x308, 0x110, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_OE_ACD__OE_ACD IOMUX_PAD(OE_ACD, OE_ACD, 0x30c, 0x114, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_OE_ACD__GPIO_1_25 IOMUX_PAD(OE_ACD, GPIO_1_25, 0x30c, 0x114, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CONTRAST__CONTRAST IOMUX_PAD(CONTRAST, CONTRAST, 0x310, 0x118, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CONTRAST__FEC_CRS IOMUX_PAD(CONTRAST, FEC_CRS, 0x310, 0x118, 0x15, 0x508, 1, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_PWM__PWM IOMUX_PAD(PWM, PWM, 0x314, 0x11c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_PWM__GPIO_1_26 IOMUX_PAD(PWM, GPIO_1_26, 0x314, 0x11c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_PWM__USBH2_OC IOMUX_PAD(PWM, USBH2_OC, 0x314, 0x11c, 0x16, 0x580, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D2__CSI_D2 IOMUX_PAD(CSI_D2, CSI_D2, 0x318, 0x120, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D2__UART5_RXD_MUX IOMUX_PAD(CSI_D2, UART5_RXD_MUX, 0x318, 0x120, 0x11, 0x578, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D2__GPIO_1_27 IOMUX_PAD(CSI_D2, GPIO_1_27, 0x318, 0x120, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D3__CSI_D3 IOMUX_PAD(CSI_D3, CSI_D3, 0x31c, 0x124, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D3__GPIO_1_28 IOMUX_PAD(CSI_D3, GPIO_1_28, 0x31c, 0x124, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D4__CSI_D4 IOMUX_PAD(CSI_D4, CSI_D4, 0x320, 0x128, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D4__UART5_RTS IOMUX_PAD(CSI_D4, UART5_RTS, 0x320, 0x128, 0x11, 0x574, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D4__GPIO_1_29 IOMUX_PAD(CSI_D4, GPIO_1_29, 0x320, 0x128, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D5__CSI_D5 IOMUX_PAD(CSI_D5, CSI_D5, 0x324, 0x12c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D5__GPIO_1_30 IOMUX_PAD(CSI_D5, GPIO_1_30, 0x324, 0x12c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D6__CSI_D6 IOMUX_PAD(CSI_D6, CSI_D6, 0x328, 0x130, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D6__GPIO_1_31 IOMUX_PAD(CSI_D6, GPIO_1_31, 0x328, 0x130, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D7__CSI_D7 IOMUX_PAD(CSI_D7, CSI_D7, 0x32c, 0x134, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D7__GPIO_1_6 IOMUX_PAD(CSI_D7, GPIO_1_6, 0x32c, 0x134, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D8__CSI_D8 IOMUX_PAD(CSI_D8, CSI_D8, 0x330, 0x138, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D8__GPIO_1_7 IOMUX_PAD(CSI_D8, GPIO_1_7, 0x330, 0x138, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D9__CSI_D9 IOMUX_PAD(CSI_D9, CSI_D9, 0x334, 0x13c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_D9__GPIO_4_21 IOMUX_PAD(CSI_D9, GPIO_4_21, 0x334, 0x13c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_MCLK__CSI_MCLK IOMUX_PAD(CSI_MCLK, CSI_MCLK, 0x338, 0x140, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_MCLK__GPIO_1_8 IOMUX_PAD(CSI_MCLK, GPIO_1_8, 0x338, 0x140, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_VSYNC__CSI_VSYNC IOMUX_PAD(CSI_VSYNC, CSI_VSYNC, 0x33c, 0x144, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_VSYNC__GPIO_1_9 IOMUX_PAD(CSI_VSYNC, GPIO_1_9, 0x33c, 0x144, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_HSYNC__CSI_HSYNC IOMUX_PAD(CSI_HSYNC, CSI_HSYNC, 0x340, 0x148, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_HSYNC__GPIO_1_10 IOMUX_PAD(CSI_HSYNC, GPIO_1_10, 0x340, 0x148, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_PIXCLK__CSI_PIXCLK IOMUX_PAD(CSI_PIXCLK, CSI_PIXCLK, 0x344, 0x14c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSI_PIXCLK__GPIO_1_11 IOMUX_PAD(CSI_PIXCLK, GPIO_1_11, 0x344, 0x14c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_I2C1_CLK__I2C1_CLK IOMUX_PAD(I2C1_CLK, I2C1_CLK, 0x348, 0x150, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_I2C1_CLK__GPIO_1_12 IOMUX_PAD(I2C1_CLK, GPIO_1_12, 0x348, 0x150, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_I2C1_DAT__I2C1_DAT IOMUX_PAD(I2C1_DAT, I2C1_DAT, 0x34c, 0x154, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_I2C1_DAT__GPIO_1_13 IOMUX_PAD(I2C1_DAT, GPIO_1_13, 0x34c, 0x154, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_MOSI__CSPI1_MOSI IOMUX_PAD(CSPI1_MOSI, CSPI1_MOSI, 0x350, 0x158, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_MOSI__GPIO_1_14 IOMUX_PAD(CSPI1_MOSI, GPIO_1_14, 0x350, 0x158, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_MISO__CSPI1_MISO IOMUX_PAD(CSPI1_MISO, CSPI1_MISO, 0x354, 0x15c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_MISO__GPIO_1_15 IOMUX_PAD(CSPI1_MISO, GPIO_1_15, 0x354, 0x15c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_SS0__CSPI1_SS0 IOMUX_PAD(CSPI1_SS0, CSPI1_SS0, 0x358, 0x160, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_SS0__GPIO_1_16 IOMUX_PAD(CSPI1_SS0, GPIO_1_16, 0x358, 0x160, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_SS1__CSPI1_SS1 IOMUX_PAD(CSPI1_SS1, CSPI1_SS1, 0x35c, 0x164, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_SS1__GPIO_1_17 IOMUX_PAD(CSPI1_SS1, GPIO_1_17, 0x35c, 0x164, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_SCLK__CSPI1_SCLK IOMUX_PAD(CSPI1_SCLK, CSPI1_SCLK, 0x360, 0x168, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_SCLK__GPIO_1_18 IOMUX_PAD(CSPI1_SCLK, GPIO_1_18, 0x360, 0x168, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CSPI1_RDY__CSPI1_RDY IOMUX_PAD(CSPI1_RDY, CSPI1_RDY, 0x364, 0x16c, 0x10, 0, 0, PAD_CTL_PULL_KEEPER)
++#define MX25_PAD_CSPI1_RDY__GPIO_2_22 IOMUX_PAD(CSPI1_RDY, GPIO_2_22, 0x364, 0x16c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(UART1_RXD, UART1_RXD, 0x368, 0x170, 0x10, 0, 0, PAD_CTL_PULL_DOWN_100K)
++#define MX25_PAD_UART1_RXD__GPIO_4_22 IOMUX_PAD(UART1_RXD, GPIO_4_22, 0x368, 0x170, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(UART1_TXD, UART1_TXD, 0x36c, 0x174, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART1_TXD__GPIO_4_23 IOMUX_PAD(UART1_TXD, GPIO_4_23, 0x36c, 0x174, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(UART1_RTS, UART1_RTS, 0x370, 0x178, 0x10, 0, 0, PAD_CTL_PULL_UP_100K)
++#define MX25_PAD_UART1_RTS__CSI_D0 IOMUX_PAD(UART1_RTS, CSI_D0, 0x370, 0x178, 0x11, 0x488, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART1_RTS__GPIO_4_24 IOMUX_PAD(UART1_RTS, GPIO_4_24, 0x370, 0x178, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(UART1_CTS, UART1_CTS, 0x374, 0x17c, 0x10, 0, 0, PAD_CTL_PULL_UP_100K)
++#define MX25_PAD_UART1_CTS__CSI_D1 IOMUX_PAD(UART1_CTS, CSI_D1, 0x374, 0x17c, 0x11, 0x48c, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART1_CTS__GPIO_4_25 IOMUX_PAD(UART1_CTS, GPIO_4_25, 0x374, 0x17c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(UART2_RXD, UART2_RXD, 0x378, 0x180, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART2_RXD__GPIO_4_26 IOMUX_PAD(UART2_RXD, GPIO_4_26, 0x378, 0x180, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(UART2_TXD, UART2_TXD, 0x37c, 0x184, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART2_TXD__GPIO_4_27 IOMUX_PAD(UART2_TXD, GPIO_4_27, 0x37c, 0x184, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART2_RTS__UART2_RTS IOMUX_PAD(UART2_RTS, UART2_RTS, 0x380, 0x188, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART2_RTS__FEC_COL IOMUX_PAD(UART2_RTS, FEC_COL, 0x380, 0x188, 0x12, 0x504, 2, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_UART2_RTS__GPIO_4_28 IOMUX_PAD(UART2_RTS, GPIO_4_28, 0x380, 0x188, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART2_CTS__FEC_RX_ER IOMUX_PAD(UART2_CTS, FEC_RX_ER, 0x384, 0x18c, 0x12, 0x518, 2, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_UART2_CTS__UART2_CTS IOMUX_PAD(UART2_CTS, UART2_CTS, 0x384, 0x18c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_UART2_CTS__GPIO_4_29 IOMUX_PAD(UART2_CTS, GPIO_4_29, 0x384, 0x18c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(SD1_CMD, SD1_CMD, 0x388, 0x190, 0x10, 0, 0, PAD_CTL_PULL_UP_47K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_CMD__FEC_RDATA2 IOMUX_PAD(SD1_CMD, FEC_RDATA2, 0x388, 0x190, 0x12, 0x50c, 2, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_CMD__GPIO_2_23 IOMUX_PAD(SD1_CMD, GPIO_2_23, 0x388, 0x190, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(SD1_CLK, SD1_CLK, 0x38c, 0x194, 0x10, 0, 0, PAD_CTL_PULL_UP_47K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_CLK__FEC_RDATA3 IOMUX_PAD(SD1_CLK, FEC_RDATA3, 0x38c, 0x194, 0x12, 0x510, 2, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_CLK__GPIO_2_24 IOMUX_PAD(SD1_CLK, GPIO_2_24, 0x38c, 0x194, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(SD1_DATA0, SD1_DATA0, 0x390, 0x198, 0x10, 0, 0, PAD_CTL_PULL_UP_47K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_DATA0__GPIO_2_25 IOMUX_PAD(SD1_DATA0, GPIO_2_25, 0x390, 0x198, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(SD1_DATA1, SD1_DATA1, 0x394, 0x19c, 0x10, 0, 0, PAD_CTL_PULL_UP_47K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_DATA1__AUD7_RXD IOMUX_PAD(SD1_DATA1, AUD7_RXD, 0x394, 0x19c, 0x13, 0x478, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_SD1_DATA1__GPIO_2_26 IOMUX_PAD(SD1_DATA1, GPIO_2_26, 0x394, 0x19c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(SD1_DATA2, SD1_DATA2, 0x398, 0x1a0, 0x10, 0, 0, PAD_CTL_PULL_UP_47K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_DATA2__FEC_RX_CLK IOMUX_PAD(SD1_DATA2, FEC_RX_CLK, 0x398, 0x1a0, 0x15, 0x514, 2, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_DATA2__GPIO_2_27 IOMUX_PAD(SD1_DATA2, GPIO_2_27, 0x398, 0x1a0, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(SD1_DATA3, SD1_DATA3, 0x39c, 0x1a4, 0x10, 0, 0, PAD_CTL_PULL_UP_47K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_DATA3__FEC_CRS IOMUX_PAD(SD1_DATA3, FEC_CRS, 0x39c, 0x1a4, 0x10, 0x508, 2, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_SD1_DATA3__GPIO_2_28 IOMUX_PAD(SD1_DATA3, GPIO_2_28, 0x39c, 0x1a4, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_ROW0__KPP_ROW0 IOMUX_PAD(KPP_ROW0, KPP_ROW0, 0x3a0, 0x1a8, 0x10, 0, 0, PAD_CTL_PULL_KEEPER)
++#define MX25_PAD_KPP_ROW0__GPIO_2_29 IOMUX_PAD(KPP_ROW0, GPIO_2_29, 0x3a0, 0x1a8, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_ROW1__KPP_ROW1 IOMUX_PAD(KPP_ROW1, KPP_ROW1, 0x3a4, 0x1ac, 0x10, 0, 0, PAD_CTL_PULL_KEEPER)
++#define MX25_PAD_KPP_ROW1__GPIO_2_30 IOMUX_PAD(KPP_ROW1, GPIO_2_30, 0x3a4, 0x1ac, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_ROW2__KPP_ROW2 IOMUX_PAD(KPP_ROW2, KPP_ROW2, 0x3a8, 0x1b0, 0x10, 0, 0, PAD_CTL_PULL_KEEPER)
++#define MX25_PAD_KPP_ROW2__CSI_D0 IOMUX_PAD(KPP_ROW2, CSI_D0, 0x3a8, 0x1b0, 0x13, 0x488, 2, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_ROW2__GPIO_2_31 IOMUX_PAD(KPP_ROW2, GPIO_2_31, 0x3a8, 0x1b0, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_ROW3__KPP_ROW3 IOMUX_PAD(KPP_ROW3, KPP_ROW3, 0x3ac, 0x1b4, 0x10, 0, 0, PAD_CTL_PULL_KEEPER)
++#define MX25_PAD_KPP_ROW3__CSI_LD1 IOMUX_PAD(KPP_ROW3, CSI_LD1, 0x3ac, 0x1b4, 0x13, 0x48c, 2, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_ROW3__GPIO_3_0 IOMUX_PAD(KPP_ROW3, GPIO_3_0, 0x3ac, 0x1b4, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_COL0__KPP_COL0 IOMUX_PAD(KPP_COL0, KPP_COL0, 0x3b0, 0x1b8, 0x10, 0, 0, PAD_CTL_PULL_KEEPER | PAD_CTL_OUTPUT_OPEN_DRAIN)
++#define MX25_PAD_KPP_COL0__GPIO_3_1 IOMUX_PAD(KPP_COL0, GPIO_3_1, 0x3b0, 0x1b8, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_COL1__KPP_COL1 IOMUX_PAD(KPP_COL1, KPP_COL1, 0x3b4, 0x1bc, 0x10, 0, 0, PAD_CTL_PULL_KEEPER | PAD_CTL_OUTPUT_OPEN_DRAIN)
++#define MX25_PAD_KPP_COL1__GPIO_3_2 IOMUX_PAD(KPP_COL1, GPIO_3_2, 0x3b4, 0x1bc, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_COL2__KPP_COL2 IOMUX_PAD(KPP_COL2, KPP_COL2, 0x3b8, 0x1c0, 0x10, 0, 0, PAD_CTL_PULL_KEEPER | PAD_CTL_OUTPUT_OPEN_DRAIN)
++#define MX25_PAD_KPP_COL2__GPIO_3_3 IOMUX_PAD(KPP_COL2, GPIO_3_3, 0x3b8, 0x1c0, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_KPP_COL3__KPP_COL3 IOMUX_PAD(KPP_COL3, KPP_COL3, 0x3bc, 0x1c4, 0x10, 0, 0, PAD_CTL_PULL_KEEPER | PAD_CTL_OUTPUT_OPEN_DRAIN)
++#define MX25_PAD_KPP_COL3__GPIO_3_4 IOMUX_PAD(KPP_COL3, GPIO_3_4, 0x3bc, 0x1c4, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(FEC_MDC, FEC_MDC, 0x3c0, 0x1c8, 0x10, 0, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_FEC_MDC__AUD4_TXD IOMUX_PAD(FEC_MDC, AUD4_TXD, 0x3c0, 0x1c8, 0x12, 0x464, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_MDC__GPIO_3_5 IOMUX_PAD(FEC_MDC, GPIO_3_5, 0x3c0, 0x1c8, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(FEC_MDIO, FEC_MDIO, 0x3c4, 0x1cc, 0x10, 0, 0, PAD_CTL_HYSTERESIS | PAD_CTL_PULL_UP_22K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_FEC_MDIO__AUD4_RXD IOMUX_PAD(FEC_MDIO, AUD4_RXD, 0x3c4, 0x1cc, 0x12, 0x460, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_MDIO__GPIO_3_6 IOMUX_PAD(FEC_MDIO, GPIO_3_6, 0x3c4, 0x1cc, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_TDATA0__FEC_TDATA0 IOMUX_PAD(FEC_TDATA0, FEC_TDATA0, 0x3c8, 0x1d0, 0x10, 0, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_FEC_TDATA0__GPIO_3_7 IOMUX_PAD(FEC_TDATA0, GPIO_3_7, 0x3c8, 0x1d0, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_TDATA1__FEC_TDATA1 IOMUX_PAD(FEC_TDATA1, FEC_TDATA1, 0x3cc, 0x1d4, 0x10, 0, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_FEC_TDATA1__AUD4_TXFS IOMUX_PAD(FEC_TDATA1, AUD4_TXFS, 0x3cc, 0x1d4, 0x12, 0x474, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_TDATA1__GPIO_3_8 IOMUX_PAD(FEC_TDATA1, GPIO_3_8, 0x3cc, 0x1d4, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_TX_EN__FEC_TX_EN IOMUX_PAD(FEC_TX_EN, FEC_TX_EN, 0x3d0, 0x1d8, 0x10, 0, 0, PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_FEC_TX_EN__GPIO_3_9 IOMUX_PAD(FEC_TX_EN, GPIO_3_9 , 0x3d0, 0x1d8, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_RDATA0__FEC_RDATA0 IOMUX_PAD(FEC_RDATA0, FEC_RDATA0, 0x3d4, 0x1dc, 0x10, 0, 0, PAD_CTL_PULL_DOWN_100K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_FEC_RDATA0__GPIO_3_10 IOMUX_PAD(FEC_RDATA0, GPIO_3_10, 0x3d4, 0x1dc, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_RDATA1__FEC_RDATA1 IOMUX_PAD(FEC_RDATA1, FEC_RDATA1, 0x3d8, 0x1e0, 0x10, 0, 0, PAD_CTL_PULL_DOWN_100K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_FEC_RDATA1__GPIO_3_11 IOMUX_PAD(FEC_RDATA1, GPIO_3_11, 0x3d8, 0x1e0, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_RX_DV__FEC_RX_DV IOMUX_PAD(FEC_RX_DV, FEC_RX_DV, 0x3dc, 0x1e4, 0x10, 0, 0, PAD_CTL_PULL_DOWN_100K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_FEC_RX_DV__CAN2_RX IOMUX_PAD(FEC_RX_DV, CAN2_RX, 0x3dc, 0x1e4, 0x14, 0x484, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_RX_DV__GPIO_3_12 IOMUX_PAD(FEC_RX_DV, GPIO_3_12, 0x3dc, 0x1e4, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_FEC_TX_CLK__FEC_TX_CLK IOMUX_PAD(FEC_TX_CLK, FEC_TX_CLK, 0x3e0, 0x1e8, 0x10, 0, 0, PAD_CTL_HYSTERESIS | PAD_CTL_PULL_DOWN_100K | PAD_CTL_SLEW_RATE_FAST)
++#define MX25_PAD_FEC_TX_CLK__GPIO_3_13 IOMUX_PAD(FEC_TX_CLK, GPIO_3_13, 0x3e0, 0x1e8, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_RTCK__RTCK IOMUX_PAD(RTCK, RTCK, 0x3e4, 0x1ec, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_RTCK__OWIRE IOMUX_PAD(RTCK, OWIRE, 0x3e4, 0x1ec, 0x11, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_RTCK__GPIO_3_14 IOMUX_PAD(RTCK, GPIO_3_14, 0x3e4, 0x1ec, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_DE_B__DE_B IOMUX_PAD(DE_B, DE_B, 0x3ec, 0x1f0, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_DE_B__GPIO_2_20 IOMUX_PAD(DE_B, GPIO_2_20, 0x3ec, 0x1f0, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_TDO__TDO IOMUX_PAD(TDO, TDO, 0x3e8, 0x000, 0x00, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_A__GPIO_A IOMUX_PAD(GPIO_A, GPIO_A, 0x3f0, 0x1f4, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_A__USBOTG_PWR IOMUX_PAD(GPIO_A, USBOTG_PWR, 0x3f0, 0x1f4, 0x12, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_B__GPIO_B IOMUX_PAD(GPIO_B, GPIO_B, 0x3f4, 0x1f8, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_B__USBOTG_OC IOMUX_PAD(GPIO_B, USBOTG_OC, 0x3f4, 0x1f8, 0x12, 0x57c, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_C__GPIO_C IOMUX_PAD(GPIO_C, GPIO_C, 0x3f8, 0x1fc, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_C__CAN2_TX IOMUX_PAD(GPIO_C, CAN2_TX, 0x3f8, 0x1fc, 0x16, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_D__GPIO_D IOMUX_PAD(GPIO_D, GPIO_D, 0x3fc, 0x200, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_D__CAN2_RX IOMUX_PAD(GPIO_D, CAN2_RX, 0x3fc, 0x200, 0x16, 0x484, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_E__GPIO_E IOMUX_PAD(GPIO_E, GPIO_E, 0x400, 0x204, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_E__AUD7_TXD IOMUX_PAD(GPIO_E, AUD7_TXD, 0x400, 0x204, 0x14, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_F__GPIO_F IOMUX_PAD(GPIO_F, GPIO_F, 0x404, 0x208, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_GPIO_F__AUD7_TXC IOMUX_PAD(GPIO_F, AUD7_TXC, 0x404, 0x208, 0x14, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_EXT_ARMCLK__EXT_ARMCLK IOMUX_PAD(EXT_ARMCLK, EXT_ARMCLK, 0x000, 0x20c, 0x10, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_EXT_ARMCLK__GPIO_3_15 IOMUX_PAD(EXT_ARMCLK, GPIO_3_15, 0x000, 0x20c, 0x15, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_UPLL_BYPCLK__UPLL_BYPCLK IOMUX_PAD(UPLL_BYPCLK, UPLL_BYPCLK, 0x000, 0x210, 0x10, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_UPLL_BYPCLK__GPIO_3_16 IOMUX_PAD(UPLL_BYPCLK, GPIO_3_16, 0x000, 0x210, 0x15, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_VSTBY_REQ__VSTBY_REQ IOMUX_PAD(VSTBY_REQ, VSTBY_REQ, 0x408, 0x214, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_VSTBY_REQ__AUD7_TXFS IOMUX_PAD(VSTBY_REQ, AUD7_TXFS, 0x408, 0x214, 0x14, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_VSTBY_REQ__GPIO_3_17 IOMUX_PAD(VSTBY_REQ, GPIO_3_17, 0x408, 0x214, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_VSTBY_ACK__VSTBY_ACK IOMUX_PAD(VSTBY_ACK, VSTBY_ACK, 0x40c, 0x218, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_VSTBY_ACK__GPIO_3_18 IOMUX_PAD(VSTBY_ACK, GPIO_3_18, 0x40c, 0x218, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_POWER_FAIL__POWER_FAIL IOMUX_PAD(POWER_FAIL, POWER_FAIL, 0x410, 0x21c, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_POWER_FAIL__AUD7_RXD IOMUX_PAD(POWER_FAIL, AUD7_RXD, 0x410, 0x21c, 0x14, 0x478, 1, 0 | NO_PAD_CTRL)
++#define MX25_PAD_POWER_FAIL__GPIO_3_19 IOMUX_PAD(POWER_FAIL, GPIO_3_19, 0x410, 0x21c, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CLKO__CLKO IOMUX_PAD(CLKO, CLKO, 0x414, 0x220, 0x10, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_CLKO__GPIO_2_21 IOMUX_PAD(CLKO, GPIO_2_21, 0x414, 0x220, 0x15, 0, 0, 0 | NO_PAD_CTRL)
++#define MX25_PAD_BOOT_MODE0__BOOT_MODE0 IOMUX_PAD(BOOT_MODE0, BOOT_MODE0, 0x000, 0x224, 0x00, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_BOOT_MODE0__GPIO_4_30 IOMUX_PAD(BOOT_MODE0, GPIO_4_30, 0x000, 0x224, 0x05, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_BOOT_MODE1__BOOT_MODE1 IOMUX_PAD(BOOT_MODE1, BOOT_MODE1, 0x000, 0x228, 0x00, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_BOOT_MODE1__GPIO_4_31 IOMUX_PAD(BOOT_MODE1, GPIO_4_31, 0x000, 0x228, 0x05, 0, 0, NO_PAD_CTRL)
++
++#define MX25_PAD_CTL_GRP_DVS_MISC IOMUX_PAD(0x418, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_FEC IOMUX_PAD(0x41c, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DVS_JTAG IOMUX_PAD(0x420, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_NFC IOMUX_PAD(0x424, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_CSI IOMUX_PAD(0x428, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_WEIM IOMUX_PAD(0x42c, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_DDR IOMUX_PAD(0x430, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DVS_CRM IOMUX_PAD(0x434, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_KPP IOMUX_PAD(0x438, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_SDHC1 IOMUX_PAD(0x43c, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_LCD IOMUX_PAD(0x440, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_UART IOMUX_PAD(0x444, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DVS_NFC IOMUX_PAD(0x448, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DVS_CSI IOMUX_PAD(0x44c, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DSE_CSPI1 IOMUX_PAD(0x450, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DDRTYPE IOMUX_PAD(0x454, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DVS_SDHC1 IOMUX_PAD(0x458, 0x000, 0, 0, 0, NO_PAD_CTRL)
++#define MX25_PAD_CTL_GRP_DVS_LCD IOMUX_PAD(0x45c, 0x000, 0, 0, 0, NO_PAD_CTRL)
++
++#if 0
++enum {
++ GPIO_A,
++ GPIO_B,
++ GPIO_C,
++ GPIO_D,
++ GPIO_E,
++ GPIO_F,
++ GPIO_1_6,
++ GPIO_1_7,
++ GPIO_1_8,
++ GPIO_1_9,
++ GPIO_1_10,
++ GPIO_1_11,
++ GPIO_1_12,
++ GPIO_1_13,
++ GPIO_1_14,
++ GPIO_1_15,
++ GPIO_1_16,
++ GPIO_1_17,
++ GPIO_1_18,
++ GPIO_1_19,
++ GPIO_1_20,
++ GPIO_1_21,
++ GPIO_1_22,
++ GPIO_1_23,
++ GPIO_1_24,
++ GPIO_1_25,
++ GPIO_1_26,
++ GPIO_1_27,
++ GPIO_1_28,
++ GPIO_1_29,
++ GPIO_1_30,
++ GPIO_1_31,
++ GPIO_2_0,
++ GPIO_2_1,
++ GPIO_2_2,
++ GPIO_2_3,
++ GPIO_2_4,
++ GPIO_2_5,
++ GPIO_2_6,
++ GPIO_2_7,
++ GPIO_2_8,
++ GPIO_2_9,
++ GPIO_2_10,
++ GPIO_2_11,
++ GPIO_2_12,
++ GPIO_2_13,
++ GPIO_2_14,
++ GPIO_2_15,
++ GPIO_2_16,
++ GPIO_2_17,
++ GPIO_2_18,
++ GPIO_2_19,
++ GPIO_2_20,
++ GPIO_2_21,
++ GPIO_2_22,
++ GPIO_2_23,
++ GPIO_2_24,
++ GPIO_2_25,
++ GPIO_2_26,
++ GPIO_2_27,
++ GPIO_2_28,
++ GPIO_2_29,
++ GPIO_2_30,
++ GPIO_2_31,
++ GPIO_3_0,
++ GPIO_3_1,
++ GPIO_3_2,
++ GPIO_3_3,
++ GPIO_3_4,
++ GPIO_3_5,
++ GPIO_3_6,
++ GPIO_3_7,
++ GPIO_3_8,
++ GPIO_3_9,
++ GPIO_3_10,
++ GPIO_3_11,
++ GPIO_3_12,
++ GPIO_3_13,
++ GPIO_3_14,
++ GPIO_3_15,
++ GPIO_3_16,
++ GPIO_3_17,
++ GPIO_3_18,
++ GPIO_3_19,
++ GPIO_3_20,
++ GPIO_3_21,
++ GPIO_3_22,
++ GPIO_3_23,
++ GPIO_3_24,
++ GPIO_3_25,
++ GPIO_3_26,
++ GPIO_3_27,
++ GPIO_3_28,
++ GPIO_3_29,
++ GPIO_3_30,
++ GPIO_3_31,
++ GPIO_4_0,
++ GPIO_4_1,
++ GPIO_4_2,
++ GPIO_4_3,
++ GPIO_4_4,
++ GPIO_4_5,
++ GPIO_4_6,
++ GPIO_4_7,
++ GPIO_4_8,
++ GPIO_4_9,
++ GPIO_4_10,
++ GPIO_4_11,
++ GPIO_4_12,
++ GPIO_4_13,
++ GPIO_4_14,
++ GPIO_4_15,
++ GPIO_4_16,
++ GPIO_4_17,
++ GPIO_4_18,
++ GPIO_4_19,
++ GPIO_4_20,
++ GPIO_4_21,
++ GPIO_4_22,
++ GPIO_4_23,
++ GPIO_4_24,
++ GPIO_4_25,
++ GPIO_4_26,
++ GPIO_4_27,
++ GPIO_4_28,
++ GPIO_4_29,
++ GPIO_4_30,
++ GPIO_4_31,
++};
++
++#define IOMUX_TO_GPIO(__pad_desc) ({ \
++ int __gpio = -1; \
++ struct pad_desc *__pd = __pad_desc; \
++ \
++ switch (__pd->mux_ctrl_ofs) { \
++ case MX25_PAD_GPIO_A__GPIO_A: \
++ __gpio = GPIO_A; \
++ break; \
++ case MX25_PAD_GPIO_B__GPIO_B: \
++ __gpio = GPIO_B; \
++ break; \
++ case MX25_PAD_GPIO_C__GPIO_C: \
++ __gpio = GPIO_C; \
++ break; \
++ case MX25_PAD_GPIO_D__GPIO_D: \
++ __gpio = GPIO_D; \
++ break; \
++ case MX25_PAD_GPIO_E__GPIO_E: \
++ __gpio = GPIO_E; \
++ break; \
++ case MX25_PAD_GPIO_F__GPIO_F: \
++ __gpio = GPIO_F; \
++ break; \
++ case MX25_PAD_CSI_D7__GPIO_1_6: \
++ __gpio = GPIO_1_6; \
++ break; \
++ case MX25_PAD_CSI_D8__GPIO_1_7: \
++ __gpio = GPIO_1_7; \
++ break; \
++ case MX25_PAD_CSI_MCLK__GPIO_1_8: \
++ __gpio = GPIO_1_8; \
++ break; \
++ case MX25_PAD_CSI_VSYNC__GPIO_1_9: \
++ __gpio = GPIO_1_9; \
++ break; \
++ case MX25_PAD_CSI_HSYNC__GPIO_1_10: \
++ __gpio = GPIO_1_10; \
++ break; \
++ case MX25_PAD_CSI_PIXCLK__GPIO_1_11: \
++ __gpio = GPIO_1_11; \
++ break; \
++ case MX25_PAD_I2C1_CLK__GPIO_1_12: \
++ __gpio = GPIO_1_12; \
++ break; \
++ case MX25_PAD_I2C1_DAT__GPIO_1_13: \
++ __gpio = GPIO_1_13; \
++ break; \
++ case MX25_PAD_CSPI1_MOSI__GPIO_1_14: \
++ __gpio = GPIO_1_14; \
++ break; \
++ case MX25_PAD_CSPI1_MISO__GPIO_1_15: \
++ __gpio = GPIO_1_15; \
++ break; \
++ case MX25_PAD_CSPI1_SS0__GPIO_1_16: \
++ __gpio = GPIO_1_16; \
++ break; \
++ case MX25_PAD_CSPI1_SS1__GPIO_1_17: \
++ __gpio = GPIO_1_17; \
++ break; \
++ case MX25_PAD_CSPI1_SCLK__GPIO_1_18: \
++ __gpio = GPIO_1_18; \
++ break; \
++ case MX25_PAD_LD5__GPIO_1_19: \
++ __gpio = GPIO_1_19; \
++ break; \
++ case MX25_PAD_LD6__GPIO_1_20: \
++ __gpio = GPIO_1_20; \
++ break; \
++ case MX25_PAD_LD7__GPIO_1_21: \
++ __gpio = GPIO_1_21; \
++ break; \
++ case MX25_PAD_HSYNC__GPIO_1_22: \
++ __gpio = GPIO_1_22; \
++ break; \
++ case MX25_PAD_VSYNC__GPIO_1_23: \
++ __gpio = GPIO_1_23; \
++ break; \
++ case MX25_PAD_LSCLK__GPIO_1_24: \
++ __gpio = GPIO_1_24; \
++ break; \
++ case MX25_PAD_OE_ACD__GPIO_1_25: \
++ __gpio = GPIO_1_25; \
++ break; \
++ case MX25_PAD_PWM__GPIO_1_26: \
++ __gpio = GPIO_1_26; \
++ break; \
++ case MX25_PAD_CSI_D2__GPIO_1_27: \
++ __gpio = GPIO_1_27; \
++ break; \
++ case MX25_PAD_CSI_D3__GPIO_1_28: \
++ __gpio = GPIO_1_28; \
++ break; \
++ case MX25_PAD_CSI_D4__GPIO_1_29: \
++ __gpio = GPIO_1_29; \
++ break; \
++ case MX25_PAD_CSI_D5__GPIO_1_30: \
++ __gpio = GPIO_1_30; \
++ break; \
++ case MX25_PAD_CSI_D6__GPIO_1_31: \
++ __gpio = GPIO_1_31; \
++ break; \
++ \
++ case MX25_PAD_A14__GPIO_2_0: \
++ __gpio = GPIO_2_0; \
++ break; \
++ case MX25_PAD_A15__GPIO_2_1: \
++ __gpio = GPIO_2_1; \
++ break; \
++ case MX25_PAD_A16__GPIO_2_2: \
++ __gpio = GPIO_2_2; \
++ break; \
++ case MX25_PAD_A17__GPIO_2_3: \
++ __gpio = GPIO_2_3; \
++ break; \
++ case MX25_PAD_A18__GPIO_2_4: \
++ __gpio = GPIO_2_4; \
++ break; \
++ case MX25_PAD_A19__GPIO_2_5: \
++ __gpio = GPIO_2_5; \
++ break; \
++ case MX25_PAD_A20__GPIO_2_6: \
++ __gpio = GPIO_2_6; \
++ break; \
++ case MX25_PAD_A21__GPIO_2_7: \
++ __gpio = GPIO_2_7; \
++ break; \
++ case MX25_PAD_A22__GPIO_2_8: \
++ __gpio = GPIO_2_8; \
++ break; \
++ case MX25_PAD_A23__GPIO_2_9: \
++ __gpio = GPIO_2_9; \
++ break; \
++ case MX25_PAD_A24__GPIO_2_10: \
++ __gpio = GPIO_2_10; \
++ break; \
++ case MX25_PAD_A25__GPIO_2_11: \
++ __gpio = GPIO_2_11; \
++ break; \
++ case MX25_PAD_EB0__GPIO_2_12: \
++ __gpio = GPIO_2_12; \
++ break; \
++ case MX25_PAD_EB1__GPIO_2_13: \
++ __gpio = GPIO_2_13; \
++ break; \
++ case MX25_PAD_OE__GPIO_2_14: \
++ __gpio = GPIO_2_14; \
++ break; \
++ case MX25_PAD_LD0__GPIO_2_15: \
++ __gpio = GPIO_2_15; \
++ break; \
++ case MX25_PAD_LD1__GPIO_2_16: \
++ __gpio = GPIO_2_16; \
++ break; \
++ case MX25_PAD_LD2__GPIO_2_17: \
++ __gpio = GPIO_2_17; \
++ break; \
++ case MX25_PAD_LD3__GPIO_2_18: \
++ __gpio = GPIO_2_18; \
++ break; \
++ case MX25_PAD_LD4__GPIO_2_19: \
++ __gpio = GPIO_2_19; \
++ break; \
++ case MX25_PAD_DE_B__GPIO_2_20: \
++ __gpio = GPIO_2_20; \
++ break; \
++ case MX25_PAD_CLKO__GPIO_2_21: \
++ __gpio = GPIO_2_21; \
++ break; \
++ case MX25_PAD_CSPI1_RDY__GPIO_2_22: \
++ __gpio = GPIO_2_22; \
++ break; \
++ case MX25_PAD_SD1_CMD__GPIO_2_23: \
++ __gpio = GPIO_2_23; \
++ break; \
++ case MX25_PAD_SD1_CLK__GPIO_2_24: \
++ __gpio = GPIO_2_24; \
++ break; \
++ case MX25_PAD_SD1_DATA0__GPIO_2_25: \
++ __gpio = GPIO_2_25; \
++ break; \
++ case MX25_PAD_SD1_DATA1__GPIO_2_26: \
++ __gpio = GPIO_2_26; \
++ break; \
++ case MX25_PAD_SD1_DATA2__GPIO_2_27: \
++ __gpio = GPIO_2_27; \
++ break; \
++ case MX25_PAD_SD1_DATA3__GPIO_2_28: \
++ __gpio = GPIO_2_28; \
++ break; \
++ case MX25_PAD_KPP_ROW0__GPIO_2_29: \
++ __gpio = GPIO_2_29; \
++ break; \
++ case MX25_PAD_KPP_ROW1__GPIO_2_30: \
++ __gpio = GPIO_2_30; \
++ break; \
++ case MX25_PAD_KPP_ROW2__GPIO_2_31: \
++ __gpio = GPIO_2_31; \
++ break; \
++ \
++ case MX25_PAD_KPP_ROW3__GPIO_3_0: \
++ __gpio = GPIO_3_0; \
++ break; \
++ case MX25_PAD_KPP_COL0__GPIO_3_1: \
++ __gpio = GPIO_3_1; \
++ break; \
++ case MX25_PAD_KPP_COL1__GPIO_3_2: \
++ __gpio = GPIO_3_2; \
++ break; \
++ case MX25_PAD_KPP_COL2__GPIO_3_3: \
++ __gpio = GPIO_3_3; \
++ break; \
++ case MX25_PAD_KPP_COL3__GPIO_3_4: \
++ __gpio = GPIO_3_4; \
++ break; \
++ case MX25_PAD_FEC_MDC__GPIO_3_5: \
++ __gpio = GPIO_3_5; \
++ break; \
++ case MX25_PAD_FEC_MDIO__GPIO_3_6: \
++ __gpio = GPIO_3_6; \
++ break; \
++ case MX25_PAD_FEC_TDATA0__GPIO_3_7: \
++ __gpio = GPIO_3_7; \
++ break; \
++ case MX25_PAD_FEC_TDATA1__GPIO_3_8: \
++ __gpio = GPIO_3_8; \
++ break; \
++ case MX25_PAD_FEC_TX_EN__GPIO_3_9: \
++ __gpio = GPIO_3_9; \
++ break; \
++ case MX25_PAD_FEC_RDATA0__GPIO_3_10: \
++ __gpio = GPIO_3_10; \
++ break; \
++ case MX25_PAD_FEC_RDATA1__GPIO_3_11: \
++ __gpio = GPIO_3_11; \
++ break; \
++ case MX25_PAD_FEC_RX_DV__GPIO_3_12: \
++ __gpio = GPIO_3_12; \
++ break; \
++ case MX25_PAD_FEC_TX_CLK__GPIO_3_13: \
++ __gpio = GPIO_3_13; \
++ break; \
++ case MX25_PAD_RTCK__GPIO_3_14: \
++ __gpio = GPIO_3_14; \
++ break; \
++ case MX25_PAD_EXT_ARMCLK__GPIO_3_15: \
++ __gpio = GPIO_3_15; \
++ break; \
++ case MX25_PAD_UPLL_BYPCLK__GPIO_3_16: \
++ __gpio = GPIO_3_16; \
++ break; \
++ case MX25_PAD_VSTBY_REQ__GPIO_3_17: \
++ __gpio = GPIO_3_17; \
++ break; \
++ case MX25_PAD_VSTBY_ACK__GPIO_3_18: \
++ __gpio = GPIO_3_18; \
++ break; \
++ case MX25_PAD_POWER_FAIL__GPIO_3_19: \
++ __gpio = GPIO_3_19; \
++ break; \
++ case MX25_PAD_CS4__GPIO_3_20: \
++ __gpio = GPIO_3_20; \
++ break; \
++ case MX25_PAD_CS5__GPIO_3_21: \
++ __gpio = GPIO_3_21; \
++ break; \
++ case MX25_PAD_NF_CE0__GPIO_3_22: \
++ __gpio = GPIO_3_22; \
++ break; \
++ case MX25_PAD_ECB__GPIO_3_23: \
++ __gpio = GPIO_3_23; \
++ break; \
++ case MX25_PAD_LBA__GPIO_3_24: \
++ __gpio = GPIO_3_24; \
++ break; \
++ case MX25_PAD_RW__GPIO_3_25: \
++ __gpio = GPIO_3_25; \
++ break; \
++ case MX25_PAD_NFWE_B__GPIO_3_26: \
++ __gpio = GPIO_3_26; \
++ break; \
++ case MX25_PAD_NFRE_B__GPIO_3_27: \
++ __gpio = GPIO_3_27; \
++ break; \
++ case MX25_PAD_NFALE__GPIO_3_28: \
++ __gpio = GPIO_3_28; \
++ break; \
++ case MX25_PAD_NFCLE__GPIO_3_29: \
++ __gpio = GPIO_3_29; \
++ break; \
++ case MX25_PAD_NFWP_B__GPIO_3_30: \
++ __gpio = GPIO_3_30; \
++ break; \
++ case MX25_PAD_NFRB__GPIO_3_31: \
++ __gpio = GPIO_3_31; \
++ break; \
++ \
++ case MX25_PAD_A10__GPIO_4_0: \
++ __gpio = GPIO_4_0; \
++ break; \
++ case MX25_PAD_A13__GPIO_4_1: \
++ __gpio = GPIO_4_1; \
++ break; \
++ case MX25_PAD_CS0__GPIO_4_2: \
++ __gpio = GPIO_4_2; \
++ break; \
++ case MX25_PAD_CS1__GPIO_4_3: \
++ __gpio = GPIO_4_3; \
++ break; \
++ case MX25_PAD_BCLK__GPIO_4_4: \
++ __gpio = GPIO_4_4; \
++ break; \
++ case MX25_PAD_D15__GPIO_4_5: \
++ __gpio = GPIO_4_5; \
++ break; \
++ case MX25_PAD_D14__GPIO_4_6: \
++ __gpio = GPIO_4_6; \
++ break; \
++ case MX25_PAD_D13__GPIO_4_7: \
++ __gpio = GPIO_4_7; \
++ break; \
++ case MX25_PAD_D12__GPIO_4_8: \
++ __gpio = GPIO_4_8; \
++ break; \
++ case MX25_PAD_D11__GPIO_4_9: \
++ __gpio = GPIO_4_9; \
++ break; \
++ case MX25_PAD_D10__GPIO_4_10: \
++ __gpio = GPIO_4_10; \
++ break; \
++ case MX25_PAD_D9__GPIO_4_11: \
++ __gpio = GPIO_4_11; \
++ break; \
++ case MX25_PAD_D8__GPIO_4_12: \
++ __gpio = GPIO_4_12; \
++ break; \
++ case MX25_PAD_D7__GPIO_4_13: \
++ __gpio = GPIO_4_13; \
++ break; \
++ case MX25_PAD_D6__GPIO_4_14: \
++ __gpio = GPIO_4_14; \
++ break; \
++ case MX25_PAD_D5__GPIO_4_15: \
++ __gpio = GPIO_4_15; \
++ break; \
++ case MX25_PAD_D4__GPIO_4_16: \
++ __gpio = GPIO_4_16; \
++ break; \
++ case MX25_PAD_D3__GPIO_4_17: \
++ __gpio = GPIO_4_17; \
++ break; \
++ case MX25_PAD_D2__GPIO_4_18: \
++ __gpio = GPIO_4_18; \
++ break; \
++ case MX25_PAD_D1__GPIO_4_19: \
++ __gpio = GPIO_4_19; \
++ break; \
++ case MX25_PAD_D0__GPIO_4_20: \
++ __gpio = GPIO_4_20; \
++ break; \
++ case MX25_PAD_CSI_D9__GPIO_4_21: \
++ __gpio = GPIO_4_21; \
++ break; \
++ case MX25_PAD_UART1_RXD__GPIO_4_22: \
++ __gpio = GPIO_4_22; \
++ break; \
++ case MX25_PAD_UART1_TXD__GPIO_4_23: \
++ __gpio = GPIO_4_23; \
++ break; \
++ case MX25_PAD_UART1_RTS__GPIO_4_24: \
++ __gpio = GPIO_4_24; \
++ break; \
++ case MX25_PAD_UART1_CTS__GPIO_4_25: \
++ __gpio = GPIO_4_25; \
++ break; \
++ case MX25_PAD_UART2_RXD__GPIO_4_26: \
++ __gpio = GPIO_4_26; \
++ break; \
++ case MX25_PAD_UART2_TXD__GPIO_4_27: \
++ __gpio = GPIO_4_27; \
++ break; \
++ case MX25_PAD_UART2_RTS__GPIO_4_28: \
++ __gpio = GPIO_4_28; \
++ break; \
++ case MX25_PAD_UART2_CTS__GPIO_4_29: \
++ __gpio = GPIO_4_29; \
++ break; \
++ case MX25_PAD_BOOT_MODE0__GPIO_4_30: \
++ __gpio = GPIO_4_30; \
++ break; \
++ case MX25_PAD_BOOT_MODE1__GPIO_4_31: \
++ __gpio = GPIO_4_31; \
++ break; \
++ } \
++ __gpio; \
++})
++#endif
++
++#endif // __ASSEMBLY__
++#endif // __IOMUX_MX25_H__
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/iomux-v3.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/iomux-v3.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/iomux-v3.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/iomux-v3.h 2009-06-02 17:05:27.000000000 +0200
+@@ -54,7 +54,7 @@ struct pad_desc {
+ unsigned select_input:3;
+ };
+
+-#define IOMUX_PAD(_pad_ctrl_ofs, _mux_ctrl_ofs, _mux_mode, _select_input_ofs, \
++#define IOMUX_PAD(_pad, _func, _pad_ctrl_ofs, _mux_ctrl_ofs, _mux_mode, _select_input_ofs, \
+ _select_input, _pad_ctrl) \
+ { \
+ .mux_ctrl_ofs = _mux_ctrl_ofs, \
+@@ -68,28 +68,28 @@ struct pad_desc {
+ /*
+ * Use to set PAD control
+ */
+-#define PAD_CTL_DRIVE_VOLTAGE_3_3_V 0
+-#define PAD_CTL_DRIVE_VOLTAGE_1_8_V 1
++#define PAD_CTL_DRIVE_VOLTAGE_3_3_V (0 << 13)
++#define PAD_CTL_DRIVE_VOLTAGE_1_8_V (1 << 13)
+
+-#define PAD_CTL_NO_HYSTERESIS 0
+-#define PAD_CTL_HYSTERESIS 1
++#define PAD_CTL_NO_HYSTERESIS (0 << 8)
++#define PAD_CTL_HYSTERESIS (1 << 8)
+
+-#define PAD_CTL_PULL_DISABLED 0x0
+-#define PAD_CTL_PULL_KEEPER 0xa
+-#define PAD_CTL_PULL_DOWN_100K 0xc
+-#define PAD_CTL_PULL_UP_47K 0xd
+-#define PAD_CTL_PULL_UP_100K 0xe
+-#define PAD_CTL_PULL_UP_22K 0xf
+-
+-#define PAD_CTL_OUTPUT_CMOS 0
+-#define PAD_CTL_OUTPUT_OPEN_DRAIN 1
+-
+-#define PAD_CTL_DRIVE_STRENGTH_NORM 0
+-#define PAD_CTL_DRIVE_STRENGTH_HIGH 1
+-#define PAD_CTL_DRIVE_STRENGTH_MAX 2
++#define PAD_CTL_PULL_DISABLED (0x0 << 4)
++#define PAD_CTL_PULL_KEEPER (0x8 << 4)
++#define PAD_CTL_PULL_DOWN_100K (0xc << 4)
++#define PAD_CTL_PULL_UP_47K (0xd << 4)
++#define PAD_CTL_PULL_UP_100K (0xe << 4)
++#define PAD_CTL_PULL_UP_22K (0xf << 4)
++
++#define PAD_CTL_OUTPUT_CMOS (0 << 3)
++#define PAD_CTL_OUTPUT_OPEN_DRAIN (1 << 3)
++
++#define PAD_CTL_DRIVE_STRENGTH_NORM (0 << 1)
++#define PAD_CTL_DRIVE_STRENGTH_HIGH (1 << 1)
++#define PAD_CTL_DRIVE_STRENGTH_MAX (2 << 1)
+
+-#define PAD_CTL_SLEW_RATE_SLOW 0
+-#define PAD_CTL_SLEW_RATE_FAST 1
++#define PAD_CTL_SLEW_RATE_SLOW (0 << 0)
++#define PAD_CTL_SLEW_RATE_FAST (1 << 0)
+
+ /*
+ * setups a single pad:
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/iomux.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/iomux.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/iomux.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/iomux.h 2009-06-02 17:05:27.000000000 +0200
+@@ -24,10 +24,14 @@
+ * GPIO Module and I/O Multiplexer
+ * x = 0..3 for reg_A, reg_B, reg_C, reg_D
+ */
++#ifndef CONFIG_MACH_MX25
+ #define VA_GPIO_BASE IO_ADDRESS(GPIO_BASE_ADDR)
++#endif
+ #define MXC_DDIR(x) (0x00 + ((x) << 8))
++#ifndef CONFIG_MACH_MX25
+ #define MXC_OCR1(x) (0x04 + ((x) << 8))
+ #define MXC_OCR2(x) (0x08 + ((x) << 8))
++#endif
+ #define MXC_ICONFA1(x) (0x0c + ((x) << 8))
+ #define MXC_ICONFA2(x) (0x10 + ((x) << 8))
+ #define MXC_ICONFB1(x) (0x14 + ((x) << 8))
+@@ -96,16 +100,20 @@
+
+
+ #ifdef CONFIG_ARCH_MX1
+-#include <mach/iomux-mx1.h>
++# include <mach/iomux-mx1.h>
+ #endif
+ #ifdef CONFIG_ARCH_MX2
+-#include <mach/iomux-mx2x.h>
+-#ifdef CONFIG_MACH_MX21
+-#include <mach/iomux-mx21.h>
+-#endif
+-#ifdef CONFIG_MACH_MX27
+-#include <mach/iomux-mx27.h>
+-#endif
++# ifndef CONFIG_MACH_MX25
++# include <mach/iomux-mx2x.h>
++# ifdef CONFIG_MACH_MX21
++# include <mach/iomux-mx21.h>
++# endif
++# endif
++# ifdef CONFIG_MACH_MX27
++# include <mach/iomux-mx27.h>
++# else
++# include <mach/iomux-mx25.h>
++# endif
+ #endif
+
+
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/irqs.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/irqs.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/irqs.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/irqs.h 2009-06-02 17:05:27.000000000 +0200
+@@ -21,7 +21,11 @@
+ #if defined CONFIG_ARCH_MX1
+ #define MXC_GPIO_IRQS (32 * 4)
+ #elif defined CONFIG_ARCH_MX2
++#ifndef CONFIG_MACH_MX25
+ #define MXC_GPIO_IRQS (32 * 6)
++#else
++#define MXC_GPIO_IRQS (32 * 4)
++#endif
+ #elif defined CONFIG_ARCH_MX3
+ #define MXC_GPIO_IRQS (32 * 3)
+ #endif
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/memory.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/memory.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/memory.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/memory.h 2009-06-02 17:05:27.000000000 +0200
+@@ -14,12 +14,13 @@
+ #if defined CONFIG_ARCH_MX1
+ #define PHYS_OFFSET UL(0x08000000)
+ #elif defined CONFIG_ARCH_MX2
+-#ifdef CONFIG_MACH_MX21
++# if defined(CONFIG_MACH_MX21)
+ #define PHYS_OFFSET UL(0xC0000000)
+-#endif
+-#ifdef CONFIG_MACH_MX27
++# elif defined(CONFIG_MACH_MX27)
+ #define PHYS_OFFSET UL(0xA0000000)
+-#endif
++# elif defined(CONFIG_MACH_MX25)
++#define PHYS_OFFSET UL(0x80000000)
++# endif
+ #elif defined CONFIG_ARCH_MX3
+ #define PHYS_OFFSET UL(0x80000000)
+ #endif
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/mx25.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/mx25.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/mx25.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/mx25.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,482 @@
++/*
++ * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file arch-mxc/mx25.h
++ * @brief This file contains register definitions.
++ *
++ * @ingroup MSL_MX25
++ */
++
++#ifndef __ASM_ARCH_MXC_MX25_H__
++#define __ASM_ARCH_MXC_MX25_H__
++
++#ifndef __ASM_ARCH_MXC_HARDWARE_H__
++#error "Do not include directly."
++#endif
++
++#ifdef CONFIG_DEBUG_LL
++#ifdef CONFIG_MACH_TX25
++#include <mach/board-tx25.h>
++#endif
++#endif // CONFIG_DEBUG_LL
++
++/*
++ * MX25 memory map:
++ *
++ * Virt Phys Size What
++ * ---------------------------------------------------------------------------
++ * FC000000 43F00000 1M AIPS 1
++ * FC100000 50000000 1M SPBA
++ * FC200000 53F00000 1M AIPS 2
++ * FC300000 60000000 1M ROMPATCH (128M)
++ * FC400000 68000000 1M ASIC (128M)
++ * FC500000 78000000 128K FBC RAM (IRAM)
++ * 80000000 256M SDRAM0
++ * 90000000 256M SDRAM1
++ * A0000000 128M CS0 Flash
++ * A8000000 128M CS1 Flash
++ * B0000000 32M CS2 SRAM
++ * B2000000 32M CS3
++ * B4000000 32M CS4
++ * B6000000 32M CS5
++ * FC520000 B8000000 64K SDRAM, WEIM, M3IF, EMI controllers
++ * FC530000 BB000000 8K NFC
++ */
++
++#include <asm/memory.h>
++#define VA(x) _AT(void __force __iomem *,x)
++
++/*
++ * IRAM
++ */
++#define IRAM_BASE_ADDR UL(0x78000000) /* internal ram */
++#define IRAM_BASE_ADDR_VIRT VA(0xFC500000)
++#define IRAM_SIZE SZ_128K
++
++/*
++ * AIPS 1
++ */
++#define AIPS1_BASE_ADDR UL(0x43F00000)
++#define AIPS1_BASE_ADDR_VIRT VA(0xFC000000)
++#define AIPS1_SIZE SZ_1M
++
++#define MAX_BASE_ADDR (AIPS1_BASE_ADDR + 0x00004000)
++#define CLKCTL_BASE_ADDR (AIPS1_BASE_ADDR + 0x00008000)
++#define ETB_SLOT4_BASE_ADDR (AIPS1_BASE_ADDR + 0x0000C000)
++#define ETB_SLOT5_BASE_ADDR (AIPS1_BASE_ADDR + 0x00010000)
++#define AAPE_BASE_ADDR (AIPS1_BASE_ADDR + 0x00014000)
++#define I2C_BASE_ADDR (AIPS1_BASE_ADDR + 0x00080000)
++#define I2C3_BASE_ADDR (AIPS1_BASE_ADDR + 0x00084000)
++#define CAN1_BASE_ADDR (AIPS1_BASE_ADDR + 0x00088000)
++#define CAN3_BASE_ADDR (AIPS1_BASE_ADDR + 0x0008C000)
++#define UART1_BASE_ADDR (AIPS1_BASE_ADDR + 0x00090000)
++#define UART2_BASE_ADDR (AIPS1_BASE_ADDR + 0x00094000)
++#define I2C2_BASE_ADDR (AIPS1_BASE_ADDR + 0x00098000)
++#define OWIRE_BASE_ADDR (AIPS1_BASE_ADDR + 0x0009C000)
++#define ATA_BASE_ADDR (AIPS1_BASE_ADDR + 0x000A0000)
++#define CSPI1_BASE_ADDR (AIPS1_BASE_ADDR + 0x000A4000)
++#define KPP_BASE_ADDR (AIPS1_BASE_ADDR + 0x000A8000)
++#define IOMUXC_BASE_ADDR (AIPS1_BASE_ADDR + 0x000AC000)
++#define AUDMUX_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B0000)
++#define ECT_A_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B8000)
++#define ECT_B_BASE_ADDR (AIPS1_BASE_ADDR + 0x000BC000)
++
++/*
++ * SPBA global module enabled #0
++ */
++#define SPBA0_BASE_ADDR UL(0x50000000)
++#define SPBA0_BASE_ADDR_VIRT VA(0xFC100000)
++#define SPBA0_SIZE SZ_1M
++
++#define CSPI3_BASE_ADDR (SPBA0_BASE_ADDR + 0x00004000)
++#define UART4_BASE_ADDR (SPBA0_BASE_ADDR + 0x00008000)
++#define UART3_BASE_ADDR (SPBA0_BASE_ADDR + 0x0000C000)
++#define CSPI2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00010000)
++#define SSI2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00014000)
++#define ESAI_BASE_ADDR (SPBA0_BASE_ADDR + 0x00018000)
++#define ATA_DMA_BASE_ADDR (SPBA0_BASE_ADDR + 0x00020000)
++#define SIM1_BASE_ADDR (SPBA0_BASE_ADDR + 0x00024000)
++#define SIM2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00028000)
++#define UART5_BASE_ADDR (SPBA0_BASE_ADDR + 0x0002C000)
++#define TSC_BASE_ADDR (SPBA0_BASE_ADDR + 0x00030000)
++#define SSI1_BASE_ADDR (SPBA0_BASE_ADDR + 0x00034000)
++#define FEC_BASE_ADDR (SPBA0_BASE_ADDR + 0x00038000)
++#define SPBA_CTRL_BASE_ADDR (SPBA0_BASE_ADDR + 0x0003C000)
++
++/*!
++ * defines for SPBA modules
++ */
++#define SPBA_CSPI3 (0x1 << 2)
++#define SPBA_UART4 (0x2 << 2)
++#define SPBA_UART3 (0x3 << 2)
++#define SPBA_CSPI2 (0x4 << 2)
++#define SPBA_SSI2 (0x5 << 2)
++#define SPBA_ESAI (0x6 << 2)
++#define SPBA_ATA (0x8 << 2)
++#define SPBA_SIM1 (0x9 << 2)
++#define SPBA_SIM2 (0xA << 2)
++#define SPBA_UART5 (0xB << 2)
++#define SPBA_ANALOG (0xC << 2)
++#define SPBA_SSI1 (0xD << 2)
++#define SPBA_FEC (0xE << 2)
++
++/*!
++ * Defines for modules using static and dynamic DMA channels
++ */
++#define MXC_DMA_CHANNEL_IRAM 30
++#define MXC_DMA_CHANNEL_UART1_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_UART1_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_UART2_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_UART2_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_UART3_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_UART3_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_UART4_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_UART4_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_UART5_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_UART5_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_MMC1 MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_SSI1_RX MXC_DMA_DYNAMIC_CHANNEL
++#ifdef CONFIG_SDMA_IRAM
++#define MXC_DMA_CHANNEL_SSI1_TX (MXC_DMA_CHANNEL_IRAM + 1)
++#else
++#define MXC_DMA_CHANNEL_SSI1_TX MXC_DMA_DYNAMIC_CHANNEL
++#endif
++#define MXC_DMA_CHANNEL_SSI2_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_SSI2_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_CSPI1_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_CSPI1_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_CSPI2_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_CSPI2_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_CSPI3_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_CSPI3_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_ATA_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_ATA_TX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_MEMORY MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_ESAI_RX MXC_DMA_DYNAMIC_CHANNEL
++#define MXC_DMA_CHANNEL_ESAI_TX MXC_DMA_DYNAMIC_CHANNEL
++
++/*
++ * AIPS 2
++ */
++#define AIPS2_BASE_ADDR UL(0x53F00000)
++#define AIPS2_BASE_ADDR_VIRT VA(0xFC200000)
++#define AIPS2_SIZE SZ_1M
++
++#define CCM_BASE_ADDR (AIPS2_BASE_ADDR + 0x00080000)
++#define GPT4_BASE_ADDR (AIPS2_BASE_ADDR + 0x00084000)
++#define GPT3_BASE_ADDR (AIPS2_BASE_ADDR + 0x00088000)
++#define GPT2_BASE_ADDR (AIPS2_BASE_ADDR + 0x0008C000)
++#define GPT1_BASE_ADDR (AIPS2_BASE_ADDR + 0x00090000)
++#define EPIT1_BASE_ADDR (AIPS2_BASE_ADDR + 0x00094000)
++#define EPIT2_BASE_ADDR (AIPS2_BASE_ADDR + 0x00098000)
++#define GPIO4_BASE_ADDR (AIPS2_BASE_ADDR + 0x0009C000)
++#define PWM2_BASE_ADDR (AIPS2_BASE_ADDR + 0x000A0000)
++#define GPIO3_BASE_ADDR (AIPS2_BASE_ADDR + 0x000A4000)
++#define PWM3_BASE_ADDR (AIPS2_BASE_ADDR + 0x000A8000)
++#define SCC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000AC000)
++#define RNGD_BASE_ADDR (AIPS2_BASE_ADDR + 0x000B0000)
++#define MMC_SDHC1_BASE_ADDR (AIPS2_BASE_ADDR + 0x000B4000)
++#define MMC_SDHC2_BASE_ADDR (AIPS2_BASE_ADDR + 0x000B8000)
++#define LCDC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000BC000)
++#define SLCDC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000C0000)
++#define PWM4_BASE_ADDR (AIPS2_BASE_ADDR + 0x000C8000)
++#define GPIO1_BASE_ADDR (AIPS2_BASE_ADDR + 0x000CC000)
++#define GPIO2_BASE_ADDR (AIPS2_BASE_ADDR + 0x000D0000)
++#define SDMA_BASE_ADDR (AIPS2_BASE_ADDR + 0x000D4000)
++#define WDOG_BASE_ADDR (AIPS2_BASE_ADDR + 0x000DC000)
++#define PWM1_BASE_ADDR (AIPS2_BASE_ADDR + 0x000E0000)
++#define RTIC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000EC000)
++#define IIM_BASE_ADDR (AIPS2_BASE_ADDR + 0x000F0000)
++#define USBOTG_BASE_ADDR (AIPS2_BASE_ADDR + 0x000F4000)
++#define OTG_BASE_ADDR USBOTG_BASE_ADDR
++#define CSI_BASE_ADDR (AIPS2_BASE_ADDR + 0x000F8000)
++#define DRYICE_BASE_ADDR (AIPS2_BASE_ADDR + 0x000FC000)
++
++/*
++ * ROMP and ASIC
++ */
++#define ROMP_BASE_ADDR UL(0x60000000)
++#define ROMP_BASE_ADDR_VIRT VA(0xFC300000)
++#define ROMP_SIZE SZ_1M
++
++#define ASIC_BASE_ADDR UL(0x68000000)
++#define ASIC_BASE_ADDR_VIRT VA(0xFC400000)
++#define ASIC_SIZE SZ_1M
++#define AVIC_BASE_ADDR ASIC_BASE_ADDR
++#define AVIC_BASE_ADDR_VIRT ASIC_BASE_ADDR_VIRT
++#define AVIC_SIZE ASIC_SIZE
++
++/*
++ * SDRAM, WEIM, M3IF, EMI controllers
++ */
++#define X_MEMC_BASE_ADDR UL(0xB8000000)
++#define X_MEMC_BASE_ADDR_VIRT VA(0xFC520000)
++#define X_MEMC_SIZE SZ_64K
++
++#define SDRAMC_BASE_ADDR (X_MEMC_BASE_ADDR + 0x1000)
++#define WEIM_BASE_ADDR (X_MEMC_BASE_ADDR + 0x2000)
++#define M3IF_BASE_ADDR (X_MEMC_BASE_ADDR + 0x3000)
++#define EMI_CTL_BASE_ADDR (X_MEMC_BASE_ADDR + 0x4000)
++
++/*
++ * NFC controller
++ */
++#define NFC_BASE_ADDR UL(0xBB000000)
++#define NFC_BASE_ADDR_VIRT VA(0xFC530000)
++#define NFC_SIZE SZ_8K
++
++/*
++ * Memory regions and CS
++ */
++#define CSD0_BASE_ADDR UL(0x80000000)
++#define CSD1_BASE_ADDR UL(0x90000000)
++
++#define SDRAM_BASE_ADDR CSD0_BASE_ADDR
++
++#define CS0_BASE_ADDR UL(0xA0000000)
++#define CS1_BASE_ADDR UL(0xA8000000)
++#define CS2_BASE_ADDR UL(0xB0000000)
++#define CS3_BASE_ADDR UL(0xB2000000)
++#define CS4_BASE_ADDR UL(0xB4000000)
++#define CS4_SIZE SZ_32M
++#define CS5_BASE_ADDR UL(0xB6000000)
++#define CS5_SIZE SZ_32M
++
++/*!
++ * This macro defines the physical to virtual address mapping for all the
++ * peripheral modules. It is used by passing in the physical address as x
++ * and returning the virtual address. If the physical address is not mapped,
++ * it returns 0
++ */
++#define IO_ADDRESS(x) \
++ VA((((x) >= AIPS1_BASE_ADDR) && ((x) < (AIPS1_BASE_ADDR + AIPS1_SIZE))) ? AIPS1_IO_ADDRESS(x): \
++ (((x) >= SPBA0_BASE_ADDR) && ((x) < (SPBA0_BASE_ADDR + SPBA0_SIZE))) ? SPBA0_IO_ADDRESS(x): \
++ (((x) >= AIPS2_BASE_ADDR) && ((x) < (AIPS2_BASE_ADDR + AIPS2_SIZE))) ? AIPS2_IO_ADDRESS(x): \
++ (((x) >= ROMP_BASE_ADDR) && ((x) < (ROMP_BASE_ADDR + ROMP_SIZE))) ? ROMP_IO_ADDRESS(x): \
++ (((x) >= ASIC_BASE_ADDR) && ((x) < (ASIC_BASE_ADDR + AVIC_SIZE))) ? ASIC_IO_ADDRESS(x): \
++ (((x) >= IRAM_BASE_ADDR) && ((x) < (IRAM_BASE_ADDR + IRAM_SIZE))) ? IRAM_IO_ADDRESS(x): \
++ (((x) >= X_MEMC_BASE_ADDR) && ((x) < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? X_MEMC_IO_ADDRESS(x): \
++ (((x) >= NFC_BASE_ADDR) && ((x) < (NFC_BASE_ADDR + NFC_SIZE))) ? NFC_IO_ADDRESS(x): \
++ 0)
++
++#define MXC_VADDR_RANGE(v,n) \
++ (((v)) >= n##_BASE_ADDR_VIRT) && \
++ (((v)) < n##_BASE_ADDR_VIRT + n##_SIZE) ? \
++ ((v)-n##_BASE_ADDR_VIRT + n##_BASE_ADDR) :
++
++#define MXC_PHYS_ADDRESS(v) \
++ UL(MXC_VADDR_RANGE(v,AIPS1) \
++ MXC_VADDR_RANGE(v,AIPS2) \
++ MXC_VADDR_RANGE(v,SPBA0) \
++ MXC_VADDR_RANGE(v,ROMP) \
++ MXC_VADDR_RANGE(v,ASIC) \
++ MXC_VADDR_RANGE(v,IRAM) \
++ MXC_VADDR_RANGE(v,X_MEMC) \
++ MXC_VADDR_RANGE(v,NFC) \
++ 0)
++
++#define GPIO_BASE_ADDR(port) \
++ ((port == 1 ? GPIO1_BASE_ADDR : \
++ (port == 2 ? GPIO2_BASE_ADDR : \
++ (port == 3 ? GPIO3_BASE_ADDR : \
++ (port == 4 ? GPIO4_BASE_ADDR : 0)))))
++
++/*
++ * define the address mapping macros: in physical address order
++ */
++
++#define AIPS1_IO_ADDRESS(x) \
++ (((x) - AIPS1_BASE_ADDR) + AIPS1_BASE_ADDR_VIRT)
++
++#define SPBA0_IO_ADDRESS(x) \
++ (((x) - SPBA0_BASE_ADDR) + SPBA0_BASE_ADDR_VIRT)
++
++#define AIPS2_IO_ADDRESS(x) \
++ (((x) - AIPS2_BASE_ADDR) + AIPS2_BASE_ADDR_VIRT)
++
++#define ROMP_IO_ADDRESS(x) \
++ (((x) - ROMP_BASE_ADDR) + ROMP_BASE_ADDR_VIRT)
++
++#define ASIC_IO_ADDRESS(x) \
++ (((x) - ASIC_BASE_ADDR) + ASIC_BASE_ADDR_VIRT)
++
++/* for entry-macro.S */
++#define AVIC_IO_ADDRESS(x) ASIC_IO_ADDRESS(x)
++
++#define IRAM_IO_ADDRESS(x) \
++ (((x) - IRAM_BASE_ADDR) + IRAM_BASE_ADDR_VIRT)
++
++#define X_MEMC_IO_ADDRESS(x) \
++ (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT)
++
++#define NFC_IO_ADDRESS(x) \
++ (((x) - NFC_BASE_ADDR) + NFC_BASE_ADDR_VIRT)
++
++/*
++ * DMA request assignments
++ */
++#define DMA_REQ_EXTREQ0 0
++#define DMA_REQ_CCM 1
++#define DMA_REQ_ATA_TX_END 2
++#define DMA_REQ_ATA_TX 3
++#define DMA_REQ_ATA_RX 4
++#define DMA_REQ_CSPI2_RX 6
++#define DMA_REQ_CSPI2_TX 7
++#define DMA_REQ_CSPI1_RX 8
++#define DMA_REQ_CSPI1_TX 9
++#define DMA_REQ_UART3_RX 10
++#define DMA_REQ_UART3_TX 11
++#define DMA_REQ_UART4_RX 12
++#define DMA_REQ_UART4_TX 13
++#define DMA_REQ_EXTREQ1 14
++#define DMA_REQ_EXTREQ2 15
++#define DMA_REQ_UART2_RX 16
++#define DMA_REQ_UART2_TX 17
++#define DMA_REQ_UART1_RX 18
++#define DMA_REQ_UART1_TX 19
++#define DMA_REQ_SSI2_RX1 22
++#define DMA_REQ_SSI2_TX1 23
++#define DMA_REQ_SSI2_RX0 24
++#define DMA_REQ_SSI2_TX0 25
++#define DMA_REQ_SSI1_RX1 26
++#define DMA_REQ_SSI1_TX1 27
++#define DMA_REQ_SSI1_RX0 28
++#define DMA_REQ_SSI1_TX0 29
++#define DMA_REQ_NFC 30
++#define DMA_REQ_ECT 31
++#define DMA_REQ_ESAI_RX 32
++#define DMA_REQ_ESAI_TX 33
++#define DMA_REQ_CSPI3_RX 34
++#define DMA_REQ_CSPI3_TX 35
++#define DMA_REQ_SIM2_RX 36
++#define DMA_REQ_SIM2_TX 37
++#define DMA_REQ_SIM1_RX 38
++#define DMA_REQ_SIM1_TX 39
++#define DMA_REQ_TSC_GCQ 44
++#define DMA_REQ_TSC_TCQ 45
++#define DMA_REQ_UART5_RX 46
++#define DMA_REQ_UART5_TX 47
++
++/*
++ * Interrupt numbers
++ */
++#define MXC_INT_CSPI3 0
++#define MXC_INT_GPT4 1
++#define MXC_INT_OWIRE 2
++#define MXC_INT_I2C 3
++#define MXC_INT_I2C2 4
++#define MXC_INT_UART4 5
++#define MXC_INT_RTIC 6
++#define MXC_INT_ESAI 7
++#define MXC_INT_SDHC2 8
++#define MXC_INT_SDHC1 9
++#define MXC_INT_I2C3 10
++#define MXC_INT_SSI2 11
++#define MXC_INT_SSI1 12
++#define MXC_INT_CSPI2 13
++#define MXC_INT_CSPI1 14
++#define MXC_INT_ATA 15
++#define MXC_INT_GPIO3 16
++#define MXC_INT_CSI 17
++#define MXC_INT_UART3 18
++#define MXC_INT_IIM 19
++#define MXC_INT_SIM1 20
++#define MXC_INT_SIM2 21
++#define MXC_INT_RNGD 22
++#define MXC_INT_GPIO4 23
++#define MXC_INT_KPP 24
++#define MXC_INT_DRYICE_RTC 25
++#define MXC_INT_PWM 26
++#define MXC_INT_EPIT2 27
++#define MXC_INT_EPIT1 28
++#define MXC_INT_GPT3 29
++#define MXC_INT_POWER_FAIL 30
++#define MXC_INT_CRM 31
++#define MXC_INT_UART2 32
++#define MXC_INT_NANDFC 33
++#define MXC_INT_SDMA 34
++#define MXC_INT_USB_HTG 35
++#define MXC_INT_PWM2 36
++#define MXC_INT_USB_OTG 37
++#define MXC_INT_SLCDC 38
++#define MXC_INT_LCDC 39
++#define MXC_INT_UART5 40
++#define MXC_INT_PWM3 41
++#define MXC_INT_PWM4 42
++#define MXC_INT_CAN1 43
++#define MXC_INT_CAN2 44
++#define MXC_INT_UART1 45
++#define MXC_INT_TSC 46
++#define MXC_INT_ECT 48
++#define MXC_INT_SCC_SCM 49
++#define MXC_INT_SCC_SMN 50
++#define MXC_INT_GPIO2 51
++#define MXC_INT_GPIO1 52
++#define MXC_INT_GPT2 53
++#define MXC_INT_GPT1 54
++#define MXC_INT_WDOG 55
++#define MXC_INT_DRYICE 56
++#define MXC_INT_FEC 57
++#define MXC_INT_EXT_INT5 58
++#define MXC_INT_EXT_INT4 59
++#define MXC_INT_EXT_INT3 60
++#define MXC_INT_EXT_INT2 61
++#define MXC_INT_EXT_INT1 62
++#define MXC_INT_EXT_INT0 63
++
++#define MXC_INT_GPT MXC_INT_GPT1
++
++/* silicon revisions specific to i.MX25 */
++#define CHIP_REV_1_0 0x00
++#define CHIP_REV_1_1 0x01
++
++/* gpio and gpio based interrupt handling */
++#define GPIO_DR 0x00
++#define GPIO_GDIR 0x04
++#define GPIO_PSR 0x08
++#define GPIO_ICR1 0x0C
++#define GPIO_ICR2 0x10
++#define GPIO_IMR 0x14
++#define GPIO_ISR 0x18
++#define GPIO_INT_LOW_LEV 0x0
++#define GPIO_INT_HIGH_LEV 0x1
++#define GPIO_INT_RISE_EDGE 0x2
++#define GPIO_INT_FALL_EDGE 0x3
++#define GPIO_INT_NONE 0x4
++
++/* Mandatory defines used globally */
++
++/* this CPU supports up to 96 GPIOs */
++#define ARCH_NR_GPIOS 128
++
++#define MXC_TIMER_GPT1 1
++#define MXC_TIMER_GPT2 2
++#define MXC_TIMER_GPT3 3
++#define MXC_TIMER_GPT4 4
++
++/*!
++ * NFMS bit in RCSR register for pagesize of nandflash
++ */
++#define NFMS_REG IO_ADDRESS(CCM_BASE_ADDR + 0x28)
++#define NFMS_NF_DWIDTH 14
++#define NFMS_NF_PG_SZ 8
++
++#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
++#include <linux/io.h>
++
++extern int mx25_revision(void);
++
++#endif
++
++#endif /* __ASM_ARCH_MXC_MX25_H__ */
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/mx2x.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/mx2x.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/mx2x.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/mx2x.h 2009-06-02 17:05:27.000000000 +0200
+@@ -79,7 +79,7 @@
+ * This macro defines the physical to virtual address mapping for all the
+ * peripheral modules. It is used by passing in the physical address as x
+ * and returning the virtual address. If the physical address is not mapped,
+- * it returns 0xDEADBEEF
++ * it returns 0
+ */
+ #define IO_ADDRESS(x) \
+ (void __force __iomem *) \
+@@ -88,7 +88,7 @@
+ ((x >= SAHB1_BASE_ADDR) && (x < (SAHB1_BASE_ADDR + SAHB1_SIZE))) ? \
+ SAHB1_IO_ADDRESS(x) : \
+ ((x >= X_MEMC_BASE_ADDR) && (x < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? \
+- X_MEMC_IO_ADDRESS(x) : 0xDEADBEEF)
++ X_MEMC_IO_ADDRESS(x) : 0)
+
+ /* define the address mapping macros: in physical address order */
+ #define AIPI_IO_ADDRESS(x) \
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/mxc.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/mxc.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/mxc.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/mxc.h 2009-06-02 17:05:27.000000000 +0200
+@@ -27,6 +27,7 @@
+ #define MXC_CPU_MX1 1
+ #define MXC_CPU_MX21 21
+ #define MXC_CPU_MX27 27
++#define MXC_CPU_MX25 25
+ #define MXC_CPU_MX31 31
+ #define MXC_CPU_MX35 35
+
+@@ -70,6 +71,18 @@ extern unsigned int __mxc_cpu_type;
+ # define cpu_is_mx27() (0)
+ #endif
+
++#ifdef CONFIG_MACH_MX25
++# ifdef mxc_cpu_type
++# undef mxc_cpu_type
++# define mxc_cpu_type __mxc_cpu_type
++# else
++# define mxc_cpu_type MXC_CPU_MX25
++# endif
++# define cpu_is_mx25() (mxc_cpu_type == MXC_CPU_MX25)
++#else
++# define cpu_is_mx25() (0)
++#endif
++
+ #ifdef CONFIG_ARCH_MX31
+ # ifdef mxc_cpu_type
+ # undef mxc_cpu_type
+@@ -101,6 +114,6 @@ extern unsigned int __mxc_cpu_type;
+ #endif
+
+ #define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35())
+-#define cpu_is_mx2() (cpu_is_mx21() || cpu_is_mx27())
++#define cpu_is_mx2() (cpu_is_mx21() || cpu_is_mx25() || cpu_is_mx27())
+
+ #endif /* __ASM_ARCH_MXC_H__ */
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/sdma.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/sdma.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/sdma.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/sdma.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,504 @@
++
++/*
++ * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#ifndef __ASM_ARCH_MXC_SDMA_H__
++#define __ASM_ARCH_MXC_SDMA_H__
++
++/*!
++ * @defgroup SDMA Smart Direct Memory Access (SDMA) Driver
++ */
++
++/*!
++ * @file arch-mxc/sdma.h
++ *
++ * @brief This file contains the SDMA API declarations.
++ *
++ * SDMA is responsible on moving data between peripherals and memories (MCU, EMI and DSP).
++ *
++ * @ingroup SDMA
++ */
++
++#include <stdarg.h>
++#include <linux/interrupt.h>
++#include <mach/dma.h>
++#include <mach/hardware.h>
++
++/*!
++ * This defines maximum DMA address
++ */
++#define MAX_DMA_ADDRESS 0xffffffff
++
++/*!
++ * This defines maximum number of DMA channels
++ */
++#ifdef CONFIG_MXC_SDMA_API
++#define MAX_DMA_CHANNELS 32
++#define MAX_BD_NUMBER 16
++#define MXC_SDMA_DEFAULT_PRIORITY 1
++#define MXC_SDMA_MIN_PRIORITY 1
++#define MXC_SDMA_MAX_PRIORITY 7
++#else
++#define MAX_DMA_CHANNELS 0
++#endif
++
++#define MXC_FIFO_MEM_DEST_FIXED 0x1
++#define MXC_FIFO_MEM_SRC_FIXED 0x2
++/*!
++ * This enumerates transfer types
++ */
++typedef enum {
++ emi_2_per = 0, /*!< EMI memory to peripheral */
++ emi_2_int, /*!< EMI memory to internal RAM */
++ emi_2_emi, /*!< EMI memory to EMI memory */
++ emi_2_dsp, /*!< EMI memory to DSP memory */
++ per_2_int, /*!< Peripheral to internal RAM */
++ per_2_emi, /*!< Peripheral to internal EMI memory */
++ per_2_dsp, /*!< Peripheral to DSP memory */
++ per_2_per, /*!< Peripheral to Peripheral */
++ int_2_per, /*!< Internal RAM to peripheral */
++ int_2_int, /*!< Internal RAM to Internal RAM */
++ int_2_emi, /*!< Internal RAM to EMI memory */
++ int_2_dsp, /*!< Internal RAM to DSP memory */
++ dsp_2_per, /*!< DSP memory to peripheral */
++ dsp_2_int, /*!< DSP memory to internal RAM */
++ dsp_2_emi, /*!< DSP memory to EMI memory */
++ dsp_2_dsp, /*!< DSP memory to DSP memory */
++ emi_2_dsp_loop, /*!< EMI memory to DSP memory loopback */
++ dsp_2_emi_loop, /*!< DSP memory to EMI memory loopback */
++ dvfs_pll, /*!< DVFS script with PLL change */
++ dvfs_pdr /*!< DVFS script without PLL change */
++} sdma_transferT;
++
++/*!
++ * This enumerates peripheral types
++ */
++typedef enum {
++ SSI, /*!< MCU domain SSI */
++ SSI_SP, /*!< Shared SSI */
++ MMC, /*!< MMC */
++ SDHC, /*!< SDHC */
++ UART, /*!< MCU domain UART */
++ UART_SP, /*!< Shared UART */
++ FIRI, /*!< FIRI */
++ CSPI, /*!< MCU domain CSPI */
++ CSPI_SP, /*!< Shared CSPI */
++ SIM, /*!< SIM */
++ ATA, /*!< ATA */
++ CCM, /*!< CCM */
++ EXT, /*!< External peripheral */
++ MSHC, /*!< Memory Stick Host Controller */
++ MSHC_SP, /*!< Shared Memory Stick Host Controller */
++ DSP, /*!< DSP */
++ MEMORY, /*!< Memory */
++ FIFO_MEMORY, /*!< FIFO type Memory */
++ SPDIF, /*!< SPDIF */
++ IPU_MEMORY, /*!< IPU Memory */
++ ASRC, /*!< ASRC */
++ ESAI, /*!< ESAI */
++} sdma_periphT;
++
++#ifndef TRANSFER_32BIT
++/*!
++ * This defines SDMA access data size
++ */
++#define TRANSFER_32BIT 0x00
++#define TRANSFER_8BIT 0x01
++#define TRANSFER_16BIT 0x02
++#define TRANSFER_24BIT 0x03
++
++#endif
++
++/*!
++ * This defines maximum device name length passed during mxc_request_dma().
++ */
++#define MAX_DEVNAME_LENGTH 32
++
++/*!
++ * This defines SDMA interrupt callback function prototype.
++ */
++typedef void (*dma_callback_t) (void *arg);
++
++/*!
++ * Structure containing sdma channel parameters.
++ */
++typedef struct {
++ __u32 watermark_level; /*!< Lower/upper threshold that
++ * triggers SDMA event
++ */
++ __u32 per_address; /*!< Peripheral source/destination
++ * physical address
++ */
++ sdma_periphT peripheral_type; /*!< Peripheral type */
++ sdma_transferT transfer_type; /*!< Transfer type */
++ int event_id; /*!< Event number,
++ * needed by all channels
++ * that started by peripherals dma
++ * request (per_2_*,*_2_per)
++ * Not used for memory and DSP
++ * transfers.
++ */
++ int event_id2; /*!< Second event number,
++ * used in ATA scripts only.
++ */
++ int bd_number; /*!< Buffer descriptors number.
++ * If not set, single buffer
++ * descriptor will be used.
++ */
++ dma_callback_t callback; /*! callback function */
++ void *arg; /*! callback argument */
++ unsigned long word_size:8; /*!< SDMA data access word size */
++} dma_channel_params;
++
++/*!
++ * Structure containing sdma request parameters.
++ */
++typedef struct {
++ /*! physical source memory address */
++ __u8 *sourceAddr;
++ /*! physical destination memory address */
++ __u8 *destAddr;
++ /*! amount of data to transfer,
++ * updated during mxc_dma_get_config
++ */
++ __u16 count;
++ /*!< DONE bit of the buffer descriptor,
++ * updated during mxc_dma_get_config
++ * 0 - means the BD is done and closed by SDMA
++ * 1 - means the BD is still being processed by SDMA
++ */
++ int bd_done;
++ /*!< CONT bit of the buffer descriptor,
++ * set it if full multi-buffer descriptor mechanism
++ * required.
++ */
++ int bd_cont;
++ /*!< ERROR bit of the buffer descriptor,
++ * updated during mxc_dma_get_config.
++ * If it is set - there was an error during BD processing.
++ */
++ int bd_error;
++} dma_request_t;
++
++/*!
++ * Structure containing sdma request parameters.
++ */
++typedef struct {
++ /*! address of ap_2_ap script */
++ int mxc_sdma_ap_2_ap_addr;
++ /*! address of ap_2_bp script */
++ int mxc_sdma_ap_2_bp_addr;
++ /*! address of ap_2_ap_fixed script */
++ int mxc_sdma_ap_2_ap_fixed_addr;
++ /*! address of bp_2_ap script */
++ int mxc_sdma_bp_2_ap_addr;
++ /*! address of loopback_on_dsp_side script */
++ int mxc_sdma_loopback_on_dsp_side_addr;
++ /*! address of mcu_interrupt_only script */
++ int mxc_sdma_mcu_interrupt_only_addr;
++
++ /*! address of firi_2_per script */
++ int mxc_sdma_firi_2_per_addr;
++ /*! address of firi_2_mcu script */
++ int mxc_sdma_firi_2_mcu_addr;
++ /*! address of per_2_firi script */
++ int mxc_sdma_per_2_firi_addr;
++ /*! address of mcu_2_firi script */
++ int mxc_sdma_mcu_2_firi_addr;
++
++ /*! address of uart_2_per script */
++ int mxc_sdma_uart_2_per_addr;
++ /*! address of uart_2_mcu script */
++ int mxc_sdma_uart_2_mcu_addr;
++ /*! address of per_2_app script */
++ int mxc_sdma_per_2_app_addr;
++ /*! address of mcu_2_app script */
++ int mxc_sdma_mcu_2_app_addr;
++ /*! address of per_2_per script */
++ int mxc_sdma_per_2_per_addr;
++
++ /*! address of uartsh_2_per script */
++ int mxc_sdma_uartsh_2_per_addr;
++ /*! address of uartsh_2_mcu script */
++ int mxc_sdma_uartsh_2_mcu_addr;
++ /*! address of per_2_shp script */
++ int mxc_sdma_per_2_shp_addr;
++ /*! address of mcu_2_shp script */
++ int mxc_sdma_mcu_2_shp_addr;
++
++ /*! address of ata_2_mcu script */
++ int mxc_sdma_ata_2_mcu_addr;
++ /*! address of mcu_2_ata script */
++ int mxc_sdma_mcu_2_ata_addr;
++
++ /*! address of app_2_per script */
++ int mxc_sdma_app_2_per_addr;
++ /*! address of app_2_mcu script */
++ int mxc_sdma_app_2_mcu_addr;
++ /*! address of shp_2_per script */
++ int mxc_sdma_shp_2_per_addr;
++ /*! address of shp_2_mcu script */
++ int mxc_sdma_shp_2_mcu_addr;
++
++ /*! address of mshc_2_mcu script */
++ int mxc_sdma_mshc_2_mcu_addr;
++ /*! address of mcu_2_mshc script */
++ int mxc_sdma_mcu_2_mshc_addr;
++
++ /*! address of spdif_2_mcu script */
++ int mxc_sdma_spdif_2_mcu_addr;
++ /*! address of mcu_2_spdif script */
++ int mxc_sdma_mcu_2_spdif_addr;
++
++ /*! address of asrc_2_mcu script */
++ int mxc_sdma_asrc_2_mcu_addr;
++
++ /*! address of ext_mem_2_ipu script */
++ int mxc_sdma_ext_mem_2_ipu_addr;
++
++ /*! address of descrambler script */
++ int mxc_sdma_descrambler_addr;
++
++ /*! address of dptc_dvfs script */
++ int mxc_sdma_dptc_dvfs_addr;
++
++ int mxc_sdma_utra_addr;
++
++ /*! address where ram code starts */
++ int mxc_sdma_ram_code_start_addr;
++ /*! size of the ram code */
++ int mxc_sdma_ram_code_size;
++ /*! RAM image address */
++ unsigned short *mxc_sdma_start_addr;
++} sdma_script_start_addrs;
++
++/*! Structure to store the initialized dma_channel parameters */
++typedef struct mxc_sdma_channel_params {
++ /*! Channel params */
++ dma_channel_params chnl_params;
++ /*! Channel type (static channel number or dynamic channel) */
++ unsigned int channel_num;
++ /*! Channel priority [0x1(lowest) - 0x7(highest)] */
++ unsigned int chnl_priority;
++} mxc_sdma_channel_params_t;
++
++/*! Private SDMA data structure */
++typedef struct mxc_dma_channel_private {
++ /*! ID of the buffer that was processed */
++ unsigned int buf_tail;
++ /*! Tasklet for the channel */
++ struct tasklet_struct chnl_tasklet;
++ /*! Flag indicates if interrupt is required after every BD transfer */
++ int intr_after_every_bd;
++} mxc_dma_channel_private_t;
++
++/*!
++ * Setup channel according to parameters.
++ * Must be called once after mxc_request_dma()
++ *
++ * @param channel channel number
++ * @param p channel parameters pointer
++ * @return 0 on success, error code on fail
++ */
++int mxc_dma_setup_channel(int channel, dma_channel_params * p);
++
++/*!
++ * Setup the channel priority. This can be used to change the default priority
++ * for the channel.
++ *
++ * @param channel channel number
++ * @param priority priority to be set for the channel
++ *
++ * @return 0 on success, error code on failure
++ */
++int mxc_dma_set_channel_priority(unsigned int channel, unsigned int priority);
++
++/*!
++ * Allocates dma channel.
++ * If channel's value is 0, then the function allocates a free channel
++ * dynamically and sets its value to channel.
++ * Else allocates requested channel if it is free.
++ * If the channel is busy or no free channels (in dynamic allocation) -EBUSY returned.
++ *
++ * @param channel pointer to channel number
++ * @param devicename device name
++ * @return 0 on success, error code on fail
++ */
++int mxc_request_dma(int *channel, const char *devicename);
++
++/*!
++ * Configures request parameters. Can be called multiple times after
++ * mxc_request_dma() and mxc_dma_setup_channel().
++ *
++ *
++ * @param channel channel number
++ * @param p request parameters pointer
++ * @param bd_index index of buffer descriptor to set
++ * @return 0 on success, error code on fail
++ */
++/* int mxc_dma_set_config(int channel, dma_request_t *p, int bd_index); */
++int mxc_dma_set_config(int channel, dma_request_t * p, int bd_index);
++
++/*!
++ * Returns request parameters.
++ *
++ * @param channel channel number
++ * @param p request parameters pointer
++ * @param bd_index index of buffer descriptor to get
++ * @return 0 on success, error code on fail
++ */
++/* int mxc_dma_get_config(int channel, dma_request_t *p, int bd_index); */
++int mxc_dma_get_config(int channel, dma_request_t * p, int bd_index);
++
++/*!
++ * This function is used by MXC IPC's write_ex2. It passes the a pointer to the
++ * data control structure to iapi_write_ipcv2()
++ *
++ * @param channel SDMA channel number
++ * @param ctrl_ptr Data Control structure pointer
++ */
++int mxc_sdma_write_ipcv2(int channel, void *ctrl_ptr);
++
++/*!
++ * This function is used by MXC IPC's read_ex2. It passes the a pointer to the
++ * data control structure to iapi_read_ipcv2()
++ *
++ * @param channel SDMA channel number
++ * @param ctrl_ptr Data Control structure pointer
++ */
++int mxc_sdma_read_ipcv2(int channel, void *ctrl_ptr);
++
++/*!
++ * Starts dma channel.
++ *
++ * @param channel channel number
++ */
++int mxc_dma_start(int channel);
++
++/*!
++ * Stops dma channel.
++ *
++ * @param channel channel number
++ */
++int mxc_dma_stop(int channel);
++
++/*!
++ * Frees dma channel.
++ *
++ * @param channel channel number
++ */
++void mxc_free_dma(int channel);
++
++/*!
++ * Sets callback function. Used with standard dma api
++ * for supporting interrupts
++ *
++ * @param channel channel number
++ * @param callback callback function pointer
++ * @param arg argument for callback function
++ */
++void mxc_dma_set_callback(int channel, dma_callback_t callback, void *arg);
++
++/*!
++ * Allocates uncachable buffer. Uses hash table.
++ *
++ * @param size size of allocated buffer
++ * @return pointer to buffer
++ */
++void *sdma_malloc(size_t size);
++
++#ifdef CONFIG_SDMA_IRAM
++/*!
++ * Allocates uncachable buffer from IRAM..
++ *
++ * @param size size of allocated buffer
++ * @return pointer to buffer
++ */
++void *sdma_iram_malloc(size_t size);
++#endif /*CONFIG_SDMA_IRAM */
++
++/*!
++ * Frees uncachable buffer. Uses hash table.
++ */
++void sdma_free(void *buf);
++
++/*!
++ * Converts virtual to physical address. Uses hash table.
++ *
++ * @param buf virtual address pointer
++ * @return physical address value
++ */
++unsigned long sdma_virt_to_phys(void *buf);
++
++/*!
++ * Converts physical to virtual address. Uses hash table.
++ *
++ * @param buf physical address value
++ * @return virtual address pointer
++ */
++void *sdma_phys_to_virt(unsigned long buf);
++
++/*!
++ * Configures the BD_INTR bit on a buffer descriptor parameters.
++ *
++ *
++ * @param channel channel number
++ * @param bd_index index of buffer descriptor to set
++ * @param bd_intr flag to set or clear the BD_INTR bit
++ */
++void mxc_dma_set_bd_intr(int channel, int bd_index, int bd_intr);
++
++/*!
++ * Gets the BD_INTR bit on a buffer descriptor.
++ *
++ *
++ * @param channel channel number
++ * @param bd_index index of buffer descriptor to set
++ *
++ * @return returns the BD_INTR bit status
++ */
++int mxc_dma_get_bd_intr(int channel, int bd_index);
++
++/*!
++ * Stop the current transfer
++ *
++ * @param channel channel number
++ * @param buffer_number number of buffers (beginning with 0),
++ * whose done bits should be reset to 0
++ */
++int mxc_dma_reset(int channel, int buffer_number);
++
++/*!
++ * This functions Returns the SDMA paramaters associated for a module
++ *
++ * @param channel_id the ID of the module requesting DMA
++ * @return returns the sdma parameters structure for the device
++ */
++mxc_sdma_channel_params_t *mxc_sdma_get_channel_params(mxc_dma_device_t
++ channel_id);
++
++/*!
++ * This functions marks the SDMA channels that are statically allocated
++ *
++ * @param chnl the channel array used to store channel information
++ */
++void mxc_get_static_channels(mxc_dma_channel_t * chnl);
++
++/*!
++ * Initializes SDMA driver
++ */
++int __init sdma_init(void);
++
++#define DEFAULT_ERR 1
++
++#endif
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/spba.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/spba.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/spba.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/spba.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,66 @@
++
++/*
++ * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @defgroup SPBA Shared Peripheral Bus Arbiter (SPBA)
++ * @ingroup MSL_MX31 MSL_MX35 MSL_MX37 MSL_MX51 MSL_MXC91321
++ */
++
++/*!
++ * @file arch-mxc/spba.h
++ * @brief This file contains the Shared Peripheral Bus Arbiter (spba) API.
++ *
++ * @ingroup SPBA
++ */
++
++#ifndef __ASM_ARCH_MXC_SPBA_H__
++#define __ASM_ARCH_MXC_SPBA_H__
++
++#ifdef __KERNEL__
++
++#define MXC_SPBA_RAR_MASK 0x7
++
++/*!
++ * Defines three SPBA masters: A - ARM, C - SDMA (no master B for MX31)
++ */
++enum spba_masters {
++ SPBA_MASTER_A = 1,
++ SPBA_MASTER_B = 2,
++ SPBA_MASTER_C = 4,
++};
++
++/*!
++ * This function allows the three masters (A, B, C) to take ownership of a
++ * shared peripheral.
++ *
++ * @param mod specified module as defined in \b enum \b #spba_module
++ * @param master one of more (or-ed together) masters as defined in \b enum \b #spba_masters
++ *
++ * @return 0 if successful; -1 otherwise.
++ */
++int spba_take_ownership(int mod, int master);
++
++/*!
++ * This function releases the ownership for a shared peripheral.
++ *
++ * @param mod specified module as defined in \b enum \b #spba_module
++ * @param master one of more (or-ed together) masters as defined in \b enum \b #spba_masters
++ *
++ * @return 0 if successful; -1 otherwise.
++ */
++int spba_rel_ownership(int mod, int master);
++
++#endif /* __KERNEL__ */
++
++#endif /* __ASM_ARCH_MXC_SPBA_H__ */
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/timex.h linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/timex.h
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/include/mach/timex.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/include/mach/timex.h 2009-06-02 17:05:27.000000000 +0200
+@@ -23,7 +23,11 @@
+ #if defined CONFIG_ARCH_MX1
+ #define CLOCK_TICK_RATE 16000000
+ #elif defined CONFIG_ARCH_MX2
++#ifndef CONFIG_MACH_MX25
+ #define CLOCK_TICK_RATE 13300000
++#else
++#define CLOCK_TICK_RATE 12000000
++#endif
+ #elif defined CONFIG_ARCH_MX3
+ #define CLOCK_TICK_RATE 16625000
+ #endif
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/iomux-mx1-mx2.c linux-2.6.30-rc4-karo/arch/arm/plat-mxc/iomux-mx1-mx2.c
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/iomux-mx1-mx2.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/iomux-mx1-mx2.c 2009-06-02 17:05:27.000000000 +0200
+@@ -74,11 +74,12 @@ void mxc_gpio_mode(int gpio_mode)
+ __raw_writel(tmp, VA_GPIO_BASE + MXC_GIUS(port));
+
+ if (pin < 16) {
++#ifndef CONFIG_MACH_MX25
+ tmp = __raw_readl(VA_GPIO_BASE + MXC_OCR1(port));
+ tmp &= ~(3 << (pin * 2));
+ tmp |= (ocr << (pin * 2));
+ __raw_writel(tmp, VA_GPIO_BASE + MXC_OCR1(port));
+-
++#endif
+ tmp = __raw_readl(VA_GPIO_BASE + MXC_ICONFA1(port));
+ tmp &= ~(3 << (pin * 2));
+ tmp |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << (pin * 2);
+@@ -90,12 +91,12 @@ void mxc_gpio_mode(int gpio_mode)
+ __raw_writel(tmp, VA_GPIO_BASE + MXC_ICONFB1(port));
+ } else {
+ pin -= 16;
+-
++#ifndef CONFIG_MACH_MX25
+ tmp = __raw_readl(VA_GPIO_BASE + MXC_OCR2(port));
+ tmp &= ~(3 << (pin * 2));
+ tmp |= (ocr << (pin * 2));
+ __raw_writel(tmp, VA_GPIO_BASE + MXC_OCR2(port));
+-
++#endif
+ tmp = __raw_readl(VA_GPIO_BASE + MXC_ICONFA2(port));
+ tmp &= ~(3 << (pin * 2));
+ tmp |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << (pin * 2);
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/iomux-v3.c linux-2.6.30-rc4-karo/arch/arm/plat-mxc/iomux-v3.c
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/iomux-v3.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/iomux-v3.c 2009-06-02 17:05:27.000000000 +0200
+@@ -31,7 +31,24 @@
+
+ #define IOMUX_BASE IO_ADDRESS(IOMUXC_BASE_ADDR)
+
+-static unsigned long iomux_v3_pad_alloc_map[0x200 / BITS_PER_LONG];
++#ifdef CONFIG_MACH_MX25
++#define NUM_PADS 0x228
++#else
++#define NUM_PADS 0x200
++#endif
++
++static unsigned long iomux_v3_pad_alloc_map[NUM_PADS / BITS_PER_LONG];
++
++static inline int mxc_iomux_v3_pad_offset(struct pad_desc *pad)
++{
++ int pad_ofs;
++ if (cpu_is_mx25())
++ pad_ofs = pad->mux_ctrl_ofs;
++ else
++ pad_ofs = pad->pad_ctrl_ofs;
++ BUG_ON((pad_ofs >> 7) >= ARRAY_SIZE(iomux_v3_pad_alloc_map));
++ return pad_ofs;
++}
+
+ /*
+ * setups a single pin:
+@@ -40,7 +57,7 @@ static unsigned long iomux_v3_pad_alloc_
+ */
+ int mxc_iomux_v3_setup_pad(struct pad_desc *pad)
+ {
+- unsigned int pad_ofs = pad->pad_ctrl_ofs;
++ unsigned int pad_ofs = mxc_iomux_v3_pad_offset(pad);
+
+ if (test_and_set_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map))
+ return -EBUSY;
+@@ -65,8 +82,10 @@ int mxc_iomux_v3_setup_multiple_pads(str
+
+ for (i = 0; i < count; i++) {
+ ret = mxc_iomux_v3_setup_pad(p);
+- if (ret)
++ if (ret) {
++ printk(KERN_ERR "Failed to setup PAD[%d]: %d\n", i, ret);
+ goto setup_error;
++ }
+ p++;
+ }
+ return 0;
+@@ -79,7 +98,7 @@ EXPORT_SYMBOL(mxc_iomux_v3_setup_multipl
+
+ void mxc_iomux_v3_release_pad(struct pad_desc *pad)
+ {
+- unsigned int pad_ofs = pad->pad_ctrl_ofs;
++ unsigned int pad_ofs = mxc_iomux_v3_pad_offset(pad);
+
+ clear_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map);
+ }
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/pwm.c linux-2.6.30-rc4-karo/arch/arm/plat-mxc/pwm.c
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/pwm.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/pwm.c 2009-06-02 17:05:27.000000000 +0200
+@@ -55,7 +55,7 @@ int pwm_config(struct pwm_device *pwm, i
+ if (pwm == NULL || period_ns == 0 || duty_ns > period_ns)
+ return -EINVAL;
+
+- if (cpu_is_mx27() || cpu_is_mx3()) {
++ if (cpu_is_mx27() || cpu_is_mx3() || cpu_is_mx25()) {
+ unsigned long long c;
+ unsigned long period_cycles, duty_cycles, prescale;
+ c = clk_get_rate(pwm->clk);
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/spba.c linux-2.6.30-rc4-karo/arch/arm/plat-mxc/spba.c
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/spba.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/spba.c 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,143 @@
++/*
++ * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/types.h>
++#include <linux/module.h>
++#include <linux/clk.h>
++#include <linux/err.h>
++#include <asm/io.h>
++#include <mach/hardware.h>
++#include <mach/spba.h>
++
++/*!
++ * @file plat-mxc/spba.c
++ *
++ * @brief This file contains the SPBA API implementation details.
++ *
++ * @ingroup SPBA
++ */
++
++static DEFINE_SPINLOCK(spba_lock);
++
++#define SPBA_MASTER_MIN 1
++#define SPBA_MASTER_MAX 7
++
++/*!
++ * the base addresses for the SPBA modules
++ */
++static unsigned long spba_base = (unsigned long)IO_ADDRESS(SPBA_CTRL_BASE_ADDR);
++
++/*!
++ * SPBA clock
++ */
++static struct clk *spba_clk;
++/*!
++ * This function allows the three masters (A, B, C) to take ownership of a
++ * shared peripheral.
++ *
++ * @param mod specified module as defined in \b enum \b #spba_module
++ * @param master one of more (or-ed together) masters as defined in \b enum \b #spba_masters
++ *
++ * @return 0 if successful; a negative errno value otherwise.
++ */
++int spba_take_ownership(int mod, int master)
++{
++ unsigned long spba_flags;
++ int rtn_val = -EIO;
++
++ if (master < SPBA_MASTER_MIN || master > SPBA_MASTER_MAX) {
++ printk("%s() invalid master %d\n", __FUNCTION__, master);
++ return -EINVAL;
++ }
++
++ if (spba_clk == NULL) {
++ spba_clk = clk_get(NULL, "spba");
++ if (IS_ERR(spba_clk)) {
++ int ret = PTR_ERR(spba_clk);
++
++ spba_clk = NULL;
++ return ret;
++ }
++ }
++ clk_enable(spba_clk);
++
++ spin_lock_irqsave(&spba_lock, spba_flags);
++ __raw_writel(master, spba_base + mod);
++
++ if ((__raw_readl(spba_base + mod) & MXC_SPBA_RAR_MASK) == master) {
++ rtn_val = 0;
++ }
++
++ spin_unlock_irqrestore(&spba_lock, spba_flags);
++
++ clk_disable(spba_clk);
++ return rtn_val;
++}
++
++/*!
++ * This function releases the ownership for a shared peripheral.
++ *
++ * @param mod specified module as defined in \b enum \b #spba_module
++ * @param master one of more (or-ed together) masters as defined in \b enum \b #spba_masters
++ *
++ * @return 0 if successful; a negativ errno value otherwise.
++ */
++int spba_rel_ownership(int mod, int master)
++{
++ unsigned long spba_flags;
++ volatile unsigned long rar;
++
++ if (master < SPBA_MASTER_MIN || master > SPBA_MASTER_MAX) {
++ printk("%s() invalid master %d\n", __FUNCTION__, master);
++ return -EINVAL;
++ }
++
++ if (spba_clk == NULL) {
++ spba_clk = clk_get(NULL, "spba");
++ if (IS_ERR(spba_clk)) {
++ int ret = PTR_ERR(spba_clk);
++ spba_clk = NULL;
++ return ret;
++ }
++ }
++ clk_enable(spba_clk);
++
++ if ((__raw_readl(spba_base + mod) & master) == 0) {
++ clk_disable(spba_clk);
++ return -EBUSY; /* does not own it */
++ }
++
++ spin_lock_irqsave(&spba_lock, spba_flags);
++
++ /* Since only the last 3 bits are writeable, doesn't need to mask off
++ bits 31-3 */
++ rar = __raw_readl(spba_base + mod) & (~master);
++ __raw_writel(rar, spba_base + mod);
++
++ if ((__raw_readl(spba_base + mod) & master) != 0) {
++ spin_unlock_irqrestore(&spba_lock, spba_flags);
++ clk_disable(spba_clk);
++ return -EIO;
++ }
++ spin_unlock_irqrestore(&spba_lock, spba_flags);
++
++ clk_disable(spba_clk);
++ return 0;
++}
++
++EXPORT_SYMBOL(spba_take_ownership);
++EXPORT_SYMBOL(spba_rel_ownership);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("SPBA");
++MODULE_LICENSE("GPL");
+diff -urNp linux-2.6.30-rc4/arch/arm/plat-mxc/time.c linux-2.6.30-rc4-karo/arch/arm/plat-mxc/time.c
+--- linux-2.6.30-rc4/arch/arm/plat-mxc/time.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/plat-mxc/time.c 2009-06-02 17:05:27.000000000 +0200
+@@ -66,7 +66,7 @@ static inline void gpt_irq_disable(void)
+ {
+ unsigned int tmp;
+
+- if (cpu_is_mx3())
++ if (cpu_is_mx3() || cpu_is_mx25())
+ __raw_writel(0, timer_base + MX3_IR);
+ else {
+ tmp = __raw_readl(timer_base + MXC_TCTL);
+@@ -76,7 +76,7 @@ static inline void gpt_irq_disable(void)
+
+ static inline void gpt_irq_enable(void)
+ {
+- if (cpu_is_mx3())
++ if (cpu_is_mx3() || cpu_is_mx25())
+ __raw_writel(1<<0, timer_base + MX3_IR);
+ else {
+ __raw_writel(__raw_readl(timer_base + MXC_TCTL) | MX1_2_TCTL_IRQEN,
+@@ -88,9 +88,9 @@ static void gpt_irq_acknowledge(void)
+ {
+ if (cpu_is_mx1())
+ __raw_writel(0, timer_base + MX1_2_TSTAT);
+- if (cpu_is_mx2())
++ if (cpu_is_mx2() && !cpu_is_mx25())
+ __raw_writel(MX2_TSTAT_CAPT | MX2_TSTAT_COMP, timer_base + MX1_2_TSTAT);
+- if (cpu_is_mx3())
++ if (cpu_is_mx3() || cpu_is_mx25())
+ __raw_writel(MX3_TSTAT_OF1, timer_base + MX3_TSTAT);
+ }
+
+@@ -117,7 +117,7 @@ static int __init mxc_clocksource_init(s
+ {
+ unsigned int c = clk_get_rate(timer_clk);
+
+- if (cpu_is_mx3())
++ if (cpu_is_mx3() || cpu_is_mx25())
+ clocksource_mxc.read = mx3_get_cycles;
+
+ clocksource_mxc.mult = clocksource_hz2mult(c,
+@@ -180,7 +180,7 @@ static void mxc_set_mode(enum clock_even
+
+ if (mode != clockevent_mode) {
+ /* Set event time into far-far future */
+- if (cpu_is_mx3())
++ if (cpu_is_mx3() || cpu_is_mx25())
+ __raw_writel(__raw_readl(timer_base + MX3_TCN) - 3,
+ timer_base + MX3_TCMP);
+ else
+@@ -233,7 +233,7 @@ static irqreturn_t mxc_timer_interrupt(i
+ struct clock_event_device *evt = &clockevent_mxc;
+ uint32_t tstat;
+
+- if (cpu_is_mx3())
++ if (cpu_is_mx3() || cpu_is_mx25())
+ tstat = __raw_readl(timer_base + MX3_TSTAT);
+ else
+ tstat = __raw_readl(timer_base + MX1_2_TSTAT);
+@@ -264,7 +264,7 @@ static int __init mxc_clockevent_init(st
+ {
+ unsigned int c = clk_get_rate(timer_clk);
+
+- if (cpu_is_mx3())
++ if (cpu_is_mx3() || cpu_is_mx25())
+ clockevent_mxc.set_next_event = mx3_set_next_event;
+
+ clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC,
+@@ -287,6 +287,7 @@ void __init mxc_timer_init(struct clk *t
+ int irq;
+
+ clk_enable(timer_clk);
++printk(KERN_DEBUG "%s: \n", __FUNCTION__);
+
+ if (cpu_is_mx1()) {
+ #ifdef CONFIG_ARCH_MX1
+@@ -306,6 +307,7 @@ void __init mxc_timer_init(struct clk *t
+ } else
+ BUG();
+
++printk(KERN_DEBUG "%s: timer_base=%p IRQ=%d\n", __FUNCTION__, timer_base, irq);
+ /*
+ * Initialise to a known state (all timers off, and timing reset)
+ */
+@@ -313,7 +315,7 @@ void __init mxc_timer_init(struct clk *t
+ __raw_writel(0, timer_base + MXC_TCTL);
+ __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */
+
+- if (cpu_is_mx3())
++ if (cpu_is_mx3() || cpu_is_mx25())
+ tctl_val = MX3_TCTL_CLK_IPG | MX3_TCTL_FRR | MX3_TCTL_WAITEN | MXC_TCTL_TEN;
+ else
+ tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN;
+diff -urNp linux-2.6.30-rc4/arch/arm/tools/mach-types linux-2.6.30-rc4-karo/arch/arm/tools/mach-types
+--- linux-2.6.30-rc4/arch/arm/tools/mach-types 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/arch/arm/tools/mach-types 2009-06-02 17:05:27.000000000 +0200
+@@ -12,7 +12,7 @@
+ #
+ # http://www.arm.linux.org.uk/developer/machines/?action=new
+ #
+-# Last update: Mon Mar 23 20:09:01 2009
++# Last update: Mon Apr 20 10:31:38 2009
+ #
+ # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
+ #
+@@ -1721,7 +1721,7 @@ sapphire MACH_SAPPHIRE SAPPHIRE 1729
+ csb637xo MACH_CSB637XO CSB637XO 1730
+ evisiong MACH_EVISIONG EVISIONG 1731
+ stmp37xx MACH_STMP37XX STMP37XX 1732
+-stmp378x MACH_STMP38XX STMP38XX 1733
++stmp378x MACH_STMP378X STMP378X 1733
+ tnt MACH_TNT TNT 1734
+ tbxt MACH_TBXT TBXT 1735
+ playmate MACH_PLAYMATE PLAYMATE 1736
+@@ -2132,3 +2132,41 @@ apollo MACH_APOLLO APOLLO 2141
+ at91cap9stk MACH_AT91CAP9STK AT91CAP9STK 2142
+ spc300 MACH_SPC300 SPC300 2143
+ eko MACH_EKO EKO 2144
++ccw9m2443 MACH_CCW9M2443 CCW9M2443 2145
++ccw9m2443js MACH_CCW9M2443JS CCW9M2443JS 2146
++m2m_router_device MACH_M2M_ROUTER_DEVICE M2M_ROUTER_DEVICE 2147
++str9104nas MACH_STAR9104NAS STAR9104NAS 2148
++pca100 MACH_PCA100 PCA100 2149
++z3_dm365_mod_01 MACH_Z3_DM365_MOD_01 Z3_DM365_MOD_01 2150
++hipox MACH_HIPOX HIPOX 2151
++omap3_piteds MACH_OMAP3_PITEDS OMAP3_PITEDS 2152
++bm150r MACH_BM150R BM150R 2153
++tbone MACH_TBONE TBONE 2154
++merlin MACH_MERLIN MERLIN 2155
++falcon MACH_FALCON FALCON 2156
++davinci_da850_evm MACH_DAVINCI_DA850_EVM DAVINCI_DA850_EVM 2157
++s5p6440 MACH_S5P6440 S5P6440 2158
++at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159
++omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160
++lpc313x MACH_LPC313X LPC313X 2161
++magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162
++magx_em30 MACH_MAGX_EM30 MAGX_EM30 2163
++magx_ve66 MACH_MAGX_VE66 MAGX_VE66 2164
++meesc MACH_MEESC MEESC 2165
++otc570 MACH_OTC570 OTC570 2166
++bcu2412 MACH_BCU2412 BCU2412 2167
++beacon MACH_BEACON BEACON 2168
++actia_tgw MACH_ACTIA_TGW ACTIA_TGW 2169
++e4430 MACH_E4430 E4430 2170
++ql300 MACH_QL300 QL300 2171
++btmavb101 MACH_BTMAVB101 BTMAVB101 2172
++btmawb101 MACH_BTMAWB101 BTMAWB101 2173
++sq201 MACH_SQ201 SQ201 2174
++quatro45xx MACH_QUATRO45XX QUATRO45XX 2175
++openpad MACH_OPENPAD OPENPAD 2176
++tx25 MACH_TX25 TX25 2177
++omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178
++htcraphael_k MACH_HTCRAPHAEL_K HTCRAPHAEL_K 2179
++pxa255 MACH_PXA255 PXA255 2180
++lal43 MACH_LAL43 LAL43 2181
++htcraphael_cdma500 MACH_HTCRAPHAEL_CDMA500 HTCRAPHAEL_CDMA500 2182
+diff -urNp linux-2.6.30-rc4/drivers/leds/leds-gpio.c linux-2.6.30-rc4-karo/drivers/leds/leds-gpio.c
+--- linux-2.6.30-rc4/drivers/leds/leds-gpio.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/drivers/leds/leds-gpio.c 2009-06-02 17:05:27.000000000 +0200
+@@ -82,7 +82,7 @@ static int __devinit create_gpio_led(con
+ if (!gpio_is_valid(template->gpio)) {
+ printk(KERN_INFO "Skipping unavilable LED gpio %d (%s)\n",
+ template->gpio, template->name);
+- return 0;
++ return -EINVAL;
+ }
+
+ ret = gpio_request(template->gpio, template->name);
+diff -urNp linux-2.6.30-rc4/drivers/mtd/nand/Kconfig linux-2.6.30-rc4-karo/drivers/mtd/nand/Kconfig
+--- linux-2.6.30-rc4/drivers/mtd/nand/Kconfig 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/drivers/mtd/nand/Kconfig 2009-06-02 17:05:27.000000000 +0200
+@@ -420,6 +420,27 @@ config MTD_NAND_MXC
+ This enables the driver for the NAND flash controller on the
+ MXC processors.
+
++config MTD_NAND_MXC_FLASH_BBT
++ bool "Support a flash based bad block table"
++ depends on MTD_NAND_MXC
++
++config ARCH_MXC_HAS_NFC_V1
++ bool
++
++config ARCH_MXC_HAS_NFC_V1_1
++ select ARCH_MXC_HAS_NFC_V1
++ bool
++
++config ARCH_MXC_HAS_NFC_V2
++ bool
++
++config ARCH_MXC_HAS_NFC_V2_1
++ bool
++ select ARCH_MXC_HAS_NFC_V2
++
++config ARCH_MXC_HAS_NFC_V3
++ bool
++
+ config MTD_NAND_SH_FLCTL
+ tristate "Support for NAND on Renesas SuperH FLCTL"
+ depends on MTD_NAND && SUPERH && CPU_SUBTYPE_SH7723
+diff -urNp linux-2.6.30-rc4/drivers/mtd/nand/Makefile linux-2.6.30-rc4-karo/drivers/mtd/nand/Makefile
+--- linux-2.6.30-rc4/drivers/mtd/nand/Makefile 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/drivers/mtd/nand/Makefile 2009-06-02 17:05:27.000000000 +0200
+@@ -36,7 +36,13 @@ obj-$(CONFIG_MTD_NAND_ORION) += orion_n
+ obj-$(CONFIG_MTD_NAND_FSL_ELBC) += fsl_elbc_nand.o
+ obj-$(CONFIG_MTD_NAND_FSL_UPM) += fsl_upm.o
+ obj-$(CONFIG_MTD_NAND_SH_FLCTL) += sh_flctl.o
++ifneq ($(CONFIG_ARCH_MXC_HAS_NFC_V1),)
+ obj-$(CONFIG_MTD_NAND_MXC) += mxc_nand.o
++else
++ifneq ($(CONFIG_ARCH_MXC_HAS_NFC_V2),)
++obj-$(CONFIG_MTD_NAND_MXC) += mxc_nd2.o
++endif
++endif
+ obj-$(CONFIG_MTD_NAND_SOCRATES) += socrates_nand.o
+ obj-$(CONFIG_MTD_NAND_TXX9NDFMC) += txx9ndfmc.o
+
+diff -urNp linux-2.6.30-rc4/drivers/mtd/nand/mxc_nand.c linux-2.6.30-rc4-karo/drivers/mtd/nand/mxc_nand.c
+--- linux-2.6.30-rc4/drivers/mtd/nand/mxc_nand.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/drivers/mtd/nand/mxc_nand.c 2009-06-02 17:05:27.000000000 +0200
+@@ -34,23 +34,52 @@
+ #include <asm/mach/flash.h>
+ #include <mach/mxc_nand.h>
+
++#ifdef CONFIG_MTD_DEBUG
++static int debug = 3;
++module_param(debug, int, S_IRUGO | S_IWUSR);
++
++#define dbg_lvl(n) ((n) < debug)
++#define DBG(lvl, fmt...) do { if (dbg_lvl(lvl)) printk(KERN_DEBUG fmt); } while (0)
++#undef DEBUG
++#define DEBUG(l, fmt...) DBG(l, fmt)
++#else
++static int debug;
++module_param(debug, int, 0);
++
++#define dbg_lvl(n) 0
++#define DBG(lvl, fmt...) do { } while (0)
++#endif
++
++
+ #define DRIVER_NAME "mxc_nand"
+
+ /* Addresses for NFC registers */
+-#define NFC_BUF_SIZE 0xE00
+-#define NFC_BUF_ADDR 0xE04
+-#define NFC_FLASH_ADDR 0xE06
+-#define NFC_FLASH_CMD 0xE08
+-#define NFC_CONFIG 0xE0A
+-#define NFC_ECC_STATUS_RESULT 0xE0C
+-#define NFC_RSLTMAIN_AREA 0xE0E
+-#define NFC_RSLTSPARE_AREA 0xE10
+-#define NFC_WRPROT 0xE12
+-#define NFC_UNLOCKSTART_BLKADDR 0xE14
+-#define NFC_UNLOCKEND_BLKADDR 0xE16
+-#define NFC_NF_WRPRST 0xE18
+-#define NFC_CONFIG1 0xE1A
+-#define NFC_CONFIG2 0xE1C
++#define NFC_BUF_SIZE 0x000
++#define NFC_BUF_ADDR 0x004
++#define NFC_FLASH_ADDR 0x006
++#define NFC_FLASH_CMD 0x008
++#define NFC_CONFIG 0x00A
++#define NFC_ECC_STATUS_RESULT 0x00C
++#define NFC_RSLTMAIN_AREA 0x00E
++#define NFC_RSLTSPARE_AREA 0x010
++#define NFC_WRPROT 0x012
++#ifndef CONFIG_ARCH_MXC_HAS_NFC_V1_1
++#define NFC_UNLOCKSTART_BLKADDR 0x014
++#define NFC_UNLOCKEND_BLKADDR 0x016
++#endif
++#define NFC_NF_WRPRST 0x018
++#define NFC_CONFIG1 0x01A
++#define NFC_CONFIG2 0x01C
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V1_1
++#define NFC_UNLOCKSTART_BLKADDR 0x020
++#define NFC_UNLOCKEND_BLKADDR 0x022
++#define NFC_UNLOCKSTART_BLKADDR1 0x024
++#define NFC_UNLOCKEND_BLKADDR1 0x026
++#define NFC_UNLOCKSTART_BLKADDR2 0x028
++#define NFC_UNLOCKEND_BLKADDR2 0x02a
++#define NFC_UNLOCKSTART_BLKADDR3 0x02c
++#define NFC_UNLOCKEND_BLKADDR3 0x02e
++#endif
+
+ /* Addresses for NFC RAM BUFFER Main area 0 */
+ #define MAIN_AREA0 0x000
+@@ -59,10 +88,27 @@
+ #define MAIN_AREA3 0x600
+
+ /* Addresses for NFC SPARE BUFFER Spare area 0 */
++#ifndef CONFIG_ARCH_MXC_HAS_NFC_V1_1
++#define SPARE_AREA_SIZE 16
+ #define SPARE_AREA0 0x800
+ #define SPARE_AREA1 0x810
+ #define SPARE_AREA2 0x820
+ #define SPARE_AREA3 0x830
++#else
++#define SPARE_AREA_SIZE 64
++#define MAIN_AREA4 0x800
++#define MAIN_AREA5 0xa00
++#define MAIN_AREA6 0xc00
++#define MAIN_AREA7 0xe00
++#define SPARE_AREA0 0x1000
++#define SPARE_AREA1 0x1040
++#define SPARE_AREA2 0x1080
++#define SPARE_AREA3 0x10c0
++#define SPARE_AREA4 0x1100
++#define SPARE_AREA5 0x1140
++#define SPARE_AREA6 0x1180
++#define SPARE_AREA7 0x11c0
++#endif
+
+ /* Set INT to 0, FCMD to 1, rest to 0 in NFC_CONFIG2 Register
+ * for Command operation */
+@@ -107,6 +153,7 @@ struct mxc_nand_host {
+ struct device *dev;
+
+ void __iomem *regs;
++ void __iomem *nfc_buf;
+ int spare_only;
+ int status_request;
+ int pagesize_2k;
+@@ -128,32 +175,149 @@ struct mxc_nand_host {
+ #define MAIN_SINGLEBIT_ERROR 0x4
+ #define SPARE_SINGLEBIT_ERROR 0x1
+
++#ifndef CONFIG_ARCH_MXC_HAS_NFC_V1_1
+ /* OOB placement block for use with hardware ecc generation */
++static struct nand_ecclayout nand_hw_eccoob2k_8 = {
++ .eccbytes = 5,
++ .eccpos = {6, 7, 8, 9, 10},
++ .oobfree = {{0, 5}, {11, 11}, {27, 11}, {43, 5}}
++};
++
+ static struct nand_ecclayout nand_hw_eccoob_8 = {
+ .eccbytes = 5,
+ .eccpos = {6, 7, 8, 9, 10},
+- .oobfree = {{0, 5}, {11, 5}, }
++ .oobfree = {{0, 5}, {11, 5}}
++};
++
++static struct nand_ecclayout nand_hw_eccoob2k_16 = {
++ .eccbytes = 5,
++ .eccpos = {6, 7, 8, 9, 10},
++ .oobfree = {{0, 6}, {12, 10}, {28, 10}, {44, 4}}
+ };
+
+ static struct nand_ecclayout nand_hw_eccoob_16 = {
+ .eccbytes = 5,
+ .eccpos = {6, 7, 8, 9, 10},
+- .oobfree = {{0, 6}, {12, 4}, }
++ .oobfree = {{0, 6}, {12, 4}}
++};
++
++#ifdef CONFIG_MTD_NAND_MXC_FLASH_BBT
++static u8 bbt_pattern[] = {'B', 'b', 't', '0' };
++static u8 mirror_pattern[] = {'1', 't', 'b', 'B' };
++
++static struct nand_bbt_descr bbt_main_descr = {
++ .options = (NAND_BBT_LASTBLOCK | NAND_BBT_WRITE |
++ NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP),
++ .offs = 12,
++ .len = 4,
++ .veroffs = 11,
++ .maxblocks = 4,
++ .pattern = bbt_pattern,
++};
++
++static struct nand_bbt_descr bbt_mirror_descr = {
++ .options = (NAND_BBT_LASTBLOCK | NAND_BBT_WRITE |
++ NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP),
++ .offs = 12,
++ .len = 4,
++ .veroffs = 11,
++ .maxblocks = 4,
++ .pattern = mirror_pattern,
++};
++#endif
++#else
++/*
++ * OOB placement block for use with hardware ecc generation
++ */
++static struct nand_ecclayout nand_hw_eccoob2k_8 = {
++ .eccbytes = 9,
++ .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15},
++ .oobfree = {{0, 7}, {16, 7}, {32, 7}, {48, 7}},
++};
++
++static struct nand_ecclayout nand_hw_eccoob_8 = {
++ .eccbytes = 9,
++ .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15},
++ .oobfree = {{0, 4}},
++};
++
++static struct nand_ecclayout nand_hw_eccoob2k_16 = {
++ .eccbytes = 9,
++ .eccpos = {6, 7, 8, 9, 10, 11, 12, 13, 14},
++ .oobfree = {{0, 6}, {17, 6}, {33, 6}, {47, 6}},
+ };
+
++static struct nand_ecclayout nand_hw_eccoob_16 = {
++ .eccbytes = 9,
++ .eccpos = {6, 7, 8, 9, 10, 11, 12, 13, 14},
++ .oobfree = {{0, 3}}
++};
++
++#ifdef CONFIG_MTD_NAND_MXC_FLASH_BBT
++/* Generic flash bbt decriptors
++*/
++static u8 bbt_pattern[] = { 'B', 'b', 't', '0' };
++static u8 mirror_pattern[] = { '1', 't', 'b', 'B' };
++
++static struct nand_bbt_descr bbt_main_descr = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
++ NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
++ .offs = 0,
++ .len = 4,
++ .veroffs = 4,
++ .maxblocks = 4,
++ .pattern = bbt_pattern
++};
++
++static struct nand_bbt_descr bbt_mirror_descr = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
++ NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
++ .offs = 0,
++ .len = 4,
++ .veroffs = 4,
++ .maxblocks = 4,
++ .pattern = mirror_pattern
++};
++#endif
++#endif
++
+ #ifdef CONFIG_MTD_PARTITIONS
+ static const char *part_probes[] = { "RedBoot", "cmdlinepart", NULL };
+ #endif
+
++#ifdef CONFIG_MTD_DEBUG
++#define nfc_read_reg(b, r) __nfc_read_reg(b, r, #r, __FUNCTION__)
++static inline u16 __nfc_read_reg(void __iomem *base, unsigned int reg,
++ const char *name, const char *fn)
++{
++ u16 val = readw(base + reg);
++ DBG(3, "%s: Read %04x from %s[%02x]\n", fn, val, name, reg);
++ return val;
++}
++
++#define nfc_write_reg(v, b, r) __nfc_write_reg(v, b, r, #r, __FUNCTION__)
++static inline void __nfc_write_reg(u16 val, void __iomem *base, unsigned int reg,
++ const char *name, const char *fn)
++{
++ DBG(3, "%s: Writing %04x to %s[%02x]\n", fn, val, name, reg);
++ writew(val, base + reg);
++}
++#else
++#define nfc_read_reg(b, r) readw(b + r)
++#define nfc_write_reg(v, b, r) writew(v, b + r)
++#endif
++
+ static irqreturn_t mxc_nfc_irq(int irq, void *dev_id)
+ {
+ struct mxc_nand_host *host = dev_id;
+
+ uint16_t tmp;
+
+- tmp = readw(host->regs + NFC_CONFIG1);
++ DEBUG(MTD_DEBUG_LEVEL0, "%s(%d)\n", __FUNCTION__, irq);
++
++ tmp = nfc_read_reg(host->regs, NFC_CONFIG1);
+ tmp |= NFC_INT_MSK; /* Disable interrupt */
+- writew(tmp, host->regs + NFC_CONFIG1);
++ nfc_write_reg(tmp, host->regs, NFC_CONFIG1);
+
+ wake_up(&host->irq_waitq);
+
+@@ -166,36 +330,31 @@ static irqreturn_t mxc_nfc_irq(int irq,
+ static void wait_op_done(struct mxc_nand_host *host, int max_retries,
+ uint16_t param, int useirq)
+ {
+- uint32_t tmp;
++ uint32_t nfc_stat;
+
++ nfc_stat = nfc_read_reg(host->regs, NFC_CONFIG2);
+ if (useirq) {
+- if ((readw(host->regs + NFC_CONFIG2) & NFC_INT) == 0) {
+-
+- tmp = readw(host->regs + NFC_CONFIG1);
+- tmp &= ~NFC_INT_MSK; /* Enable interrupt */
+- writew(tmp, host->regs + NFC_CONFIG1);
+-
+- wait_event(host->irq_waitq,
+- readw(host->regs + NFC_CONFIG2) & NFC_INT);
+-
+- tmp = readw(host->regs + NFC_CONFIG2);
+- tmp &= ~NFC_INT;
+- writew(tmp, host->regs + NFC_CONFIG2);
++ if (!(nfc_stat & NFC_INT)) {
++ uint32_t cfg1;
++ const unsigned long timeout = 10;
++
++ cfg1 = nfc_read_reg(host->regs, NFC_CONFIG1);
++ cfg1 &= ~NFC_INT_MSK; /* Enable interrupt */
++ nfc_write_reg(cfg1, host->regs, NFC_CONFIG1);
++
++ max_retries = wait_event_timeout(host->irq_waitq,
++ (nfc_stat = nfc_read_reg(host->regs,
++ NFC_CONFIG2)) & NFC_INT,
++ timeout);
+ }
+ } else {
+- while (max_retries-- > 0) {
+- if (readw(host->regs + NFC_CONFIG2) & NFC_INT) {
+- tmp = readw(host->regs + NFC_CONFIG2);
+- tmp &= ~NFC_INT;
+- writew(tmp, host->regs + NFC_CONFIG2);
+- break;
+- }
++ while (!(nfc_stat & NFC_INT) && max_retries-- > 0) {
++ nfc_stat = nfc_read_reg(host->regs, NFC_CONFIG2);
+ udelay(1);
+ }
+- if (max_retries <= 0)
+- DEBUG(MTD_DEBUG_LEVEL0, "%s(%d): INT not set\n",
+- __func__, param);
+ }
++ nfc_write_reg(nfc_stat & ~NFC_INT, host->regs, NFC_CONFIG2);
++ WARN_ONCE(max_retries <= 0, "%s(%d): INT not set\n", __func__, param);
+ }
+
+ /* This function issues the specified command to the NAND device and
+@@ -204,8 +363,8 @@ static void send_cmd(struct mxc_nand_hos
+ {
+ DEBUG(MTD_DEBUG_LEVEL3, "send_cmd(host, 0x%x, %d)\n", cmd, useirq);
+
+- writew(cmd, host->regs + NFC_FLASH_CMD);
+- writew(NFC_CMD, host->regs + NFC_CONFIG2);
++ nfc_write_reg(cmd, host->regs, NFC_FLASH_CMD);
++ nfc_write_reg(NFC_CMD, host->regs, NFC_CONFIG2);
+
+ /* Wait for operation to complete */
+ wait_op_done(host, TROP_US_DELAY, cmd, useirq);
+@@ -218,8 +377,8 @@ static void send_addr(struct mxc_nand_ho
+ {
+ DEBUG(MTD_DEBUG_LEVEL3, "send_addr(host, 0x%x %d)\n", addr, islast);
+
+- writew(addr, host->regs + NFC_FLASH_ADDR);
+- writew(NFC_ADDR, host->regs + NFC_CONFIG2);
++ nfc_write_reg(addr, host->regs, NFC_FLASH_ADDR);
++ nfc_write_reg(NFC_ADDR, host->regs, NFC_CONFIG2);
+
+ /* Wait for operation to complete */
+ wait_op_done(host, TROP_US_DELAY, addr, islast);
+@@ -233,19 +392,19 @@ static void send_prog_page(struct mxc_na
+ DEBUG(MTD_DEBUG_LEVEL3, "send_prog_page (%d)\n", spare_only);
+
+ /* NANDFC buffer 0 is used for page read/write */
+- writew(buf_id, host->regs + NFC_BUF_ADDR);
++ nfc_write_reg(buf_id, host->regs, NFC_BUF_ADDR);
+
+ /* Configure spare or page+spare access */
+ if (!host->pagesize_2k) {
+- uint16_t config1 = readw(host->regs + NFC_CONFIG1);
++ uint16_t config1 = nfc_read_reg(host->regs, NFC_CONFIG1);
+ if (spare_only)
+ config1 |= NFC_SP_EN;
+ else
+ config1 &= ~(NFC_SP_EN);
+- writew(config1, host->regs + NFC_CONFIG1);
++ nfc_write_reg(config1, host->regs, NFC_CONFIG1);
+ }
+
+- writew(NFC_INPUT, host->regs + NFC_CONFIG2);
++ nfc_write_reg(NFC_INPUT, host->regs, NFC_CONFIG2);
+
+ /* Wait for operation to complete */
+ wait_op_done(host, TROP_US_DELAY, spare_only, true);
+@@ -259,19 +418,19 @@ static void send_read_page(struct mxc_na
+ DEBUG(MTD_DEBUG_LEVEL3, "send_read_page (%d)\n", spare_only);
+
+ /* NANDFC buffer 0 is used for page read/write */
+- writew(buf_id, host->regs + NFC_BUF_ADDR);
++ nfc_write_reg(buf_id, host->regs, NFC_BUF_ADDR);
+
+ /* Configure spare or page+spare access */
+ if (!host->pagesize_2k) {
+- uint32_t config1 = readw(host->regs + NFC_CONFIG1);
++ uint32_t config1 = nfc_read_reg(host->regs, NFC_CONFIG1);
+ if (spare_only)
+ config1 |= NFC_SP_EN;
+ else
+ config1 &= ~NFC_SP_EN;
+- writew(config1, host->regs + NFC_CONFIG1);
++ nfc_write_reg(config1, host->regs, NFC_CONFIG1);
+ }
+
+- writew(NFC_OUTPUT, host->regs + NFC_CONFIG2);
++ nfc_write_reg(NFC_OUTPUT, host->regs, NFC_CONFIG2);
+
+ /* Wait for operation to complete */
+ wait_op_done(host, TROP_US_DELAY, spare_only, true);
+@@ -284,20 +443,20 @@ static void send_read_id(struct mxc_nand
+ uint16_t tmp;
+
+ /* NANDFC buffer 0 is used for device ID output */
+- writew(0x0, host->regs + NFC_BUF_ADDR);
++ nfc_write_reg(0x0, host->regs, NFC_BUF_ADDR);
+
+ /* Read ID into main buffer */
+- tmp = readw(host->regs + NFC_CONFIG1);
++ tmp = nfc_read_reg(host->regs, NFC_CONFIG1);
+ tmp &= ~NFC_SP_EN;
+- writew(tmp, host->regs + NFC_CONFIG1);
++ nfc_write_reg(tmp, host->regs, NFC_CONFIG1);
+
+- writew(NFC_ID, host->regs + NFC_CONFIG2);
++ nfc_write_reg(NFC_ID, host->regs, NFC_CONFIG2);
+
+ /* Wait for operation to complete */
+ wait_op_done(host, TROP_US_DELAY, 0, true);
+
+ if (this->options & NAND_BUSWIDTH_16) {
+- void __iomem *main_buf = host->regs + MAIN_AREA0;
++ void __iomem *main_buf = host->nfc_buf + MAIN_AREA0;
+ /* compress the ID info */
+ writeb(readb(main_buf + 2), main_buf + 1);
+ writeb(readb(main_buf + 4), main_buf + 2);
+@@ -311,29 +470,29 @@ static void send_read_id(struct mxc_nand
+ * NAND device status and returns the current status. */
+ static uint16_t get_dev_status(struct mxc_nand_host *host)
+ {
+- void __iomem *main_buf = host->regs + MAIN_AREA1;
++ void __iomem *main_buf = host->nfc_buf + MAIN_AREA0;
+ uint32_t store;
+ uint16_t ret, tmp;
+ /* Issue status request to NAND device */
+
+- /* store the main area1 first word, later do recovery */
++ /* store the main area first word, later do recovery */
+ store = readl(main_buf);
+- /* NANDFC buffer 1 is used for device status to prevent
++ /* NANDFC buffer 0 is used for device status to prevent
+ * corruption of read/write buffer on status requests. */
+- writew(1, host->regs + NFC_BUF_ADDR);
++ nfc_write_reg(0, host->regs, NFC_BUF_ADDR);
+
+ /* Read status into main buffer */
+- tmp = readw(host->regs + NFC_CONFIG1);
++ tmp = nfc_read_reg(host->regs, NFC_CONFIG1);
+ tmp &= ~NFC_SP_EN;
+- writew(tmp, host->regs + NFC_CONFIG1);
++ nfc_write_reg(tmp, host->regs, NFC_CONFIG1);
+
+- writew(NFC_STATUS, host->regs + NFC_CONFIG2);
++ nfc_write_reg(NFC_STATUS, host->regs, NFC_CONFIG2);
+
+ /* Wait for operation to complete */
+ wait_op_done(host, TROP_US_DELAY, 0, true);
+
+ /* Status is placed in first word of main buffer */
+- /* get status, then recovery area 1 data */
++ /* get status, then recover area 0 data */
+ ret = readw(main_buf);
+ writel(store, main_buf);
+
+@@ -369,7 +528,7 @@ static int mxc_nand_correct_data(struct
+ * additional correction. 2-Bit errors cannot be corrected by
+ * HW ECC, so we need to return failure
+ */
+- uint16_t ecc_status = readw(host->regs + NFC_ECC_STATUS_RESULT);
++ uint16_t ecc_status = nfc_read_reg(host->regs, NFC_ECC_STATUS_RESULT);
+
+ if (((ecc_status & 0x3) == 2) || ((ecc_status >> 2) == 2)) {
+ DEBUG(MTD_DEBUG_LEVEL0,
+@@ -392,8 +551,8 @@ static u_char mxc_nand_read_byte(struct
+ struct mxc_nand_host *host = nand_chip->priv;
+ uint8_t ret = 0;
+ uint16_t col, rd_word;
+- uint16_t __iomem *main_buf = host->regs + MAIN_AREA0;
+- uint16_t __iomem *spare_buf = host->regs + SPARE_AREA0;
++ uint16_t __iomem *main_buf = host->nfc_buf + MAIN_AREA0;
++ uint16_t __iomem *spare_buf = host->nfc_buf + SPARE_AREA0;
+
+ /* Check for status request */
+ if (host->status_request)
+@@ -436,9 +595,9 @@ static uint16_t mxc_nand_read_word(struc
+ col += mtd->writesize;
+
+ if (col < mtd->writesize)
+- p = (host->regs + MAIN_AREA0) + (col >> 1);
++ p = (host->nfc_buf + MAIN_AREA0) + (col >> 1);
+ else
+- p = (host->regs + SPARE_AREA0) + ((col - mtd->writesize) >> 1);
++ p = (host->nfc_buf + SPARE_AREA0) + ((col - mtd->writesize) >> 1);
+
+ if (col & 1) {
+ rd_word = readw(p);
+@@ -464,6 +623,7 @@ static void mxc_nand_write_buf(struct mt
+ struct nand_chip *nand_chip = mtd->priv;
+ struct mxc_nand_host *host = nand_chip->priv;
+ int n, col, i = 0;
++ int ss = mtd->oobsize / (mtd->writesize >> 9);
+
+ DEBUG(MTD_DEBUG_LEVEL3,
+ "mxc_nand_write_buf(col = %d, len = %d)\n", host->col_addr,
+@@ -474,21 +634,27 @@ static void mxc_nand_write_buf(struct mt
+ /* Adjust saved column address */
+ if (col < mtd->writesize && host->spare_only)
+ col += mtd->writesize;
+-
++#if 0
+ n = mtd->writesize + mtd->oobsize - col;
+ n = min(len, n);
++#else
++ BUG_ON(len > mtd->writesize + mtd->oobsize - col);
++ n = len;
++#endif
+
+ DEBUG(MTD_DEBUG_LEVEL3,
+ "%s:%d: col = %d, n = %d\n", __func__, __LINE__, col, n);
+
+ while (n) {
+ void __iomem *p;
++ int si = (col - mtd->writesize) / 16;
+
+ if (col < mtd->writesize)
+- p = host->regs + MAIN_AREA0 + (col & ~3);
++ p = host->nfc_buf + MAIN_AREA0 + (col & ~3);
+ else
+- p = host->regs + SPARE_AREA0 -
+- mtd->writesize + (col & ~3);
++ p = host->nfc_buf + SPARE_AREA0 +
++ si * SPARE_AREA_SIZE +
++ (col - mtd->writesize) % ss;
+
+ DEBUG(MTD_DEBUG_LEVEL3, "%s:%d: p = %p\n", __func__,
+ __LINE__, p);
+@@ -542,6 +708,7 @@ static void mxc_nand_write_buf(struct mt
+ DEBUG(MTD_DEBUG_LEVEL3,
+ "%s:%d: n = %d, m = %d, i = %d, col = %d\n",
+ __func__, __LINE__, n, m, i, col);
++ BUG_ON(m == 0);
+
+ memcpy(p, &buf[i], m);
+ col += m;
+@@ -562,27 +729,50 @@ static void mxc_nand_read_buf(struct mtd
+ struct nand_chip *nand_chip = mtd->priv;
+ struct mxc_nand_host *host = nand_chip->priv;
+ int n, col, i = 0;
++ int ss = mtd->oobsize / (mtd->writesize >> 9);
+
+ DEBUG(MTD_DEBUG_LEVEL3,
+ "mxc_nand_read_buf(col = %d, len = %d)\n", host->col_addr, len);
+
+ col = host->col_addr;
++ if (dbg_lvl(2)) {
++ int si = col / 512;
++ print_hex_dump(KERN_DEBUG, "main: ", DUMP_PREFIX_ADDRESS,
++ 16, 2, host->nfc_buf + MAIN_AREA0, 64, 0);
++ print_hex_dump(KERN_DEBUG, "spare: ", DUMP_PREFIX_ADDRESS,
++ 16, 2, host->nfc_buf + SPARE_AREA0 +
++ si * SPARE_AREA_SIZE, 16, 0);
++ }
+
+ /* Adjust saved column address */
+ if (col < mtd->writesize && host->spare_only)
+ col += mtd->writesize;
+-
++#if 0
+ n = mtd->writesize + mtd->oobsize - col;
+ n = min(len, n);
+-
++#else
++ /* If more data is requested to be read than is available in
++ * the flash buffer this is clearly a BUG! */
++ BUG_ON(len > mtd->writesize + mtd->oobsize - col);
++ n = len;
++#endif
+ while (n) {
+ void __iomem *p;
++ int si = (col - mtd->writesize) / ss;
+
+ if (col < mtd->writesize)
+- p = host->regs + MAIN_AREA0 + (col & ~3);
++ p = host->nfc_buf + MAIN_AREA0 + (col & ~3);
+ else
+- p = host->regs + SPARE_AREA0 -
+- mtd->writesize + (col & ~3);
++ p = host->nfc_buf + SPARE_AREA0 +
++ si * SPARE_AREA_SIZE +
++ (col - mtd->writesize) % ss;
++
++ DBG(1, "p=%p col=%03x ss=%d si=%d\n", p, col, ss, si);
++
++ if (dbg_lvl(3)) {
++ print_hex_dump(KERN_DEBUG, "spare: ", DUMP_PREFIX_ADDRESS,
++ 16, 2, p, 64, 0);
++ }
+
+ if (((col | (int)&buf[i]) & 3) || n < 16) {
+ uint32_t data;
+@@ -618,18 +808,23 @@ static void mxc_nand_read_buf(struct mtd
+ int m = mtd->writesize - col;
+
+ if (col >= mtd->writesize)
+- m += mtd->oobsize;
++ m = ss;
+
+ m = min(n, m) & ~3;
++ DBG(1, "Copying %u byte from offset %03x[%p]\n",
++ m + (col & 3), col, p);
++ BUG_ON(m == 0);
+ memcpy(&buf[i], p, m);
+ col += m;
+ i += m;
+ n -= m;
+ }
+ }
++ if (dbg_lvl(1)) {
++ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len);
++ }
+ /* Update saved column address */
+ host->col_addr = col;
+-
+ }
+
+ /* Used by the upper layer to verify the data in NAND Flash
+@@ -655,13 +850,15 @@ static void mxc_nand_select_chip(struct
+ }
+
+ if (chip == -1) {
+- writew(readw(host->regs + NFC_CONFIG1) & ~NFC_CE,
+- host->regs + NFC_CONFIG1);
++ nfc_write_reg(host->regs,
++ nfc_read_reg(host->regs, NFC_CONFIG1) & ~NFC_CE,
++ NFC_CONFIG1);
+ return;
+ }
+
+- writew(readw(host->regs + NFC_CONFIG1) | NFC_CE,
+- host->regs + NFC_CONFIG1);
++ nfc_write_reg(host->regs,
++ nfc_read_reg(host->regs, NFC_CONFIG1) | NFC_CE,
++ NFC_CONFIG1);
+ #endif
+
+ switch (chip) {
+@@ -831,6 +1028,7 @@ static void mxc_nand_command(struct mtd_
+ break;
+
+ case NAND_CMD_READID:
++ host->col_addr = 0;
+ send_read_id(host);
+ break;
+
+@@ -851,9 +1049,12 @@ static int __init mxcnd_probe(struct pla
+ struct mtd_info *mtd;
+ struct mxc_nand_platform_data *pdata = pdev->dev.platform_data;
+ struct mxc_nand_host *host;
+- struct resource *res;
++ struct resource *res1, *res2;
+ uint16_t tmp;
+- int err = 0, nr_parts = 0;
++ int err, nr_parts;
++
++ DBG(0, "%s: pdata=%p hw_ecc=%d width=%d\n", __FUNCTION__,
++ pdata, pdata->hw_ecc, pdata->width);
+
+ /* Allocate memory for MTD device structure and private data */
+ host = kzalloc(sizeof(struct mxc_nand_host), GFP_KERNEL);
+@@ -868,9 +1069,6 @@ static int __init mxcnd_probe(struct pla
+ mtd->owner = THIS_MODULE;
+ mtd->dev.parent = &pdev->dev;
+
+- /* 50 us command delay time */
+- this->chip_delay = 5;
+-
+ this->priv = host;
+ this->dev_ready = mxc_nand_dev_ready;
+ this->cmdfunc = mxc_nand_command;
+@@ -880,29 +1078,61 @@ static int __init mxcnd_probe(struct pla
+ this->write_buf = mxc_nand_write_buf;
+ this->read_buf = mxc_nand_read_buf;
+ this->verify_buf = mxc_nand_verify_buf;
++#ifdef CONFIG_MTD_NAND_MXC_FLASH_BBT
++ this->bbt_td = &bbt_main_descr;
++ this->bbt_md = &bbt_mirror_descr;
++ this->options |= NAND_USE_FLASH_BBT;
++#endif
+
+- host->clk = clk_get(&pdev->dev, "nfc");
+- if (IS_ERR(host->clk))
++ host->clk = clk_get(&pdev->dev, "nfc_clk");
++ if (IS_ERR(host->clk)) {
++ err = PTR_ERR(host->clk);
+ goto eclk;
++ }
++ printk(KERN_DEBUG "NFC clk rate: %lu\n", clk_get_rate(host->clk));
++ clk_set_rate(host->clk, 11000000);
++ printk(KERN_DEBUG "NFC clk rate: %lu\n", clk_get_rate(host->clk));
+
+ clk_enable(host->clk);
+ host->clk_act = 1;
+
+- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+- if (!res) {
++ res1 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res1) {
+ err = -ENODEV;
+ goto eres;
+ }
++ if (!request_mem_region(res1->start, resource_size(res1), "mxc_nand")) {
++ err = -EBUSY;
++ goto ereq1;
++ }
+
+- host->regs = ioremap(res->start, res->end - res->start + 1);
++ res2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
++ if (res2) {
++ if (!request_mem_region(res2->start, resource_size(res2), "mxc_nand")) {
++ err = -EBUSY;
++ goto ereq2;
++ }
++ }
++
++ host->regs = ioremap(res1->start, resource_size(res1));
+ if (!host->regs) {
+- err = -EIO;
+- goto eres;
++ err = -ENOMEM;
++ goto eunmap1;
+ }
+
+- tmp = readw(host->regs + NFC_CONFIG1);
++ if (!res2) {
++ host->nfc_buf = host->regs;
++ host->regs += 0xe00;
++ } else {
++ host->nfc_buf = ioremap(res2->start, resource_size(res2));
++ if (!host->regs) {
++ err = -ENOMEM;
++ goto eunmap2;
++ }
++ }
++ tmp = nfc_read_reg(host->regs, NFC_CONFIG1);
+ tmp |= NFC_INT_MSK;
+- writew(tmp, host->regs + NFC_CONFIG1);
++ nfc_write_reg(tmp, host->regs, NFC_CONFIG1);
+
+ init_waitqueue_head(&host->irq_waitq);
+
+@@ -911,7 +1141,7 @@ static int __init mxcnd_probe(struct pla
+ err = request_irq(host->irq, mxc_nfc_irq, 0, "mxc_nd", host);
+ if (err)
+ goto eirq;
+-
++#if 0
+ if (pdata->hw_ecc) {
+ this->ecc.calculate = mxc_nand_calculate_ecc;
+ this->ecc.hwctl = mxc_nand_enable_hwecc;
+@@ -919,50 +1149,90 @@ static int __init mxcnd_probe(struct pla
+ this->ecc.mode = NAND_ECC_HW;
+ this->ecc.size = 512;
+ this->ecc.bytes = 3;
++ if (
+ this->ecc.layout = &nand_hw_eccoob_8;
+- tmp = readw(host->regs + NFC_CONFIG1);
++ tmp = nfc_read_reg(host->regs, NFC_CONFIG1);
+ tmp |= NFC_ECC_EN;
+- writew(tmp, host->regs + NFC_CONFIG1);
++ nfc_write_reg(tmp, host->regs, NFC_CONFIG1);
+ } else {
+ this->ecc.size = 512;
+ this->ecc.bytes = 3;
+ this->ecc.layout = &nand_hw_eccoob_8;
+ this->ecc.mode = NAND_ECC_SOFT;
+- tmp = readw(host->regs + NFC_CONFIG1);
++ tmp = nfc_read_reg(host->regs, NFC_CONFIG1);
+ tmp &= ~NFC_ECC_EN;
+- writew(tmp, host->regs + NFC_CONFIG1);
++ nfc_write_reg(tmp, host->regs, NFC_CONFIG1);
+ }
+-
++#endif
+ /* Reset NAND */
+ this->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
+
+ /* preset operation */
+ /* Unlock the internal RAM Buffer */
+- writew(0x2, host->regs + NFC_CONFIG);
++ nfc_write_reg(0x2, host->regs, NFC_CONFIG);
+
+ /* Blocks to be unlocked */
+- writew(0x0, host->regs + NFC_UNLOCKSTART_BLKADDR);
+- writew(0x4000, host->regs + NFC_UNLOCKEND_BLKADDR);
++ nfc_write_reg(0x0, host->regs, NFC_UNLOCKSTART_BLKADDR);
++ nfc_write_reg(0x4000, host->regs, NFC_UNLOCKEND_BLKADDR);
+
+ /* Unlock Block Command for given address range */
+- writew(0x4, host->regs + NFC_WRPROT);
++ nfc_write_reg(0x4, host->regs, NFC_WRPROT);
+
+ /* NAND bus width determines access funtions used by upper layer */
+ if (pdata->width == 2) {
+ this->options |= NAND_BUSWIDTH_16;
+- this->ecc.layout = &nand_hw_eccoob_16;
+ }
+
+- host->pagesize_2k = 0;
+-
+ /* Scan to find existence of the device */
+- if (nand_scan(mtd, 1)) {
++ err = nand_scan_ident(mtd, 1);
++ if (err) {
+ DEBUG(MTD_DEBUG_LEVEL0,
+ "MXC_ND: Unable to find any NAND device.\n");
+- err = -ENXIO;
++ goto escan;
++ }
++ /* this is required before completing the scan */
++ host->pagesize_2k = (mtd->writesize == 2048);
++
++ if (pdata->width == 2) {
++ if (host->pagesize_2k) {
++ this->ecc.layout = &nand_hw_eccoob2k_16;
++ } else {
++ this->ecc.layout = &nand_hw_eccoob_16;
++ }
++ } else {
++ if (host->pagesize_2k) {
++ this->ecc.layout = &nand_hw_eccoob2k_8;
++ } else {
++ this->ecc.layout = &nand_hw_eccoob_8;
++ }
++ }
++ if (pdata->hw_ecc) {
++ this->ecc.calculate = mxc_nand_calculate_ecc;
++ this->ecc.hwctl = mxc_nand_enable_hwecc;
++ this->ecc.correct = mxc_nand_correct_data;
++ this->ecc.mode = NAND_ECC_HW;
++ this->ecc.size = 512;
++ this->ecc.bytes = 3;
++ tmp = nfc_read_reg(host->regs, NFC_CONFIG1);
++ tmp |= NFC_ECC_EN;
++ nfc_write_reg(tmp, host->regs, NFC_CONFIG1);
++ } else {
++ this->ecc.size = 512;
++ this->ecc.bytes = 3;
++ this->ecc.mode = NAND_ECC_SOFT;
++ tmp = nfc_read_reg(host->regs, NFC_CONFIG1);
++ tmp &= ~NFC_ECC_EN;
++ nfc_write_reg(tmp, host->regs, NFC_CONFIG1);
++ }
++
++ err = nand_scan_tail(mtd);
++ if (err) {
+ goto escan;
+ }
+
++ pr_info("MXC MTD nand Driver IRQ %d bus width: %u bit %s ECC IO: %08lx\n",
++ host->irq, pdata->width * 8, pdata->hw_ecc ? "HW" : "SW",
++ (unsigned long)res1->start);
+ /* Register the partitions */
+ #ifdef CONFIG_MTD_PARTITIONS
+ nr_parts =
+@@ -981,10 +1251,19 @@ static int __init mxcnd_probe(struct pla
+ return 0;
+
+ escan:
+- free_irq(host->irq, NULL);
++ free_irq(host->irq, host);
+ eirq:
++ if (host->regs != host->nfc_buf)
++ iounmap(host->nfc_buf);
++eunmap2:
+ iounmap(host->regs);
++eunmap1:
++ release_mem_region(res2->start, resource_size(res2));
++ereq2:
++ release_mem_region(res1->start, resource_size(res1));
++ereq1:
+ eres:
++ clk_disable(host->clk);
+ clk_put(host->clk);
+ eclk:
+ kfree(host);
+@@ -995,46 +1274,63 @@ eclk:
+ static int __devexit mxcnd_remove(struct platform_device *pdev)
+ {
+ struct mxc_nand_host *host = platform_get_drvdata(pdev);
++ struct resource *res;
+
++ if (host->clk_act)
++ clk_disable(host->clk);
+ clk_put(host->clk);
+
+- platform_set_drvdata(pdev, NULL);
+-
+ nand_release(&host->mtd);
+- free_irq(host->irq, NULL);
++ free_irq(host->irq, host);
+ iounmap(host->regs);
+ kfree(host);
+
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (res) {
++ release_mem_region(res->start, resource_size(res));
++ }
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
++ if (res) {
++ release_mem_region(res->start, resource_size(res));
++ }
+ return 0;
+ }
+
+ #ifdef CONFIG_PM
+ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
+ {
+- struct mtd_info *info = platform_get_drvdata(pdev);
++ struct mtd_info *mtd = platform_get_drvdata(pdev);
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_nand_host *host = nand_chip->priv;
+ int ret = 0;
+
+ DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
+- if (info)
+- ret = info->suspend(info);
++ if (mtd)
++ ret = mtd->suspend(mtd);
+
++ if (host->clk_act) {
+ /* Disable the NFC clock */
+- clk_disable(nfc_clk); /* FIXME */
++ clk_disable(host->clk);
++ }
+
+ return ret;
+ }
+
+ static int mxcnd_resume(struct platform_device *pdev)
+ {
+- struct mtd_info *info = platform_get_drvdata(pdev);
++ struct mtd_info *mtd = platform_get_drvdata(pdev);
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_nand_host *host = nand_chip->priv;
+ int ret = 0;
+
+ DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
+- /* Enable the NFC clock */
+- clk_enable(nfc_clk); /* FIXME */
+
+- if (info)
+- info->resume(info);
++ if (host->clk_act) {
++ /* Enable the NFC clock */
++ clk_enable(host->clk);
++ }
++ if (mtd)
++ mtd->resume(mtd);
+
+ return ret;
+ }
+@@ -1047,7 +1343,7 @@ static int mxcnd_resume(struct platform_
+ static struct platform_driver mxcnd_driver = {
+ .driver = {
+ .name = DRIVER_NAME,
+- },
++ },
+ .remove = __exit_p(mxcnd_remove),
+ .suspend = mxcnd_suspend,
+ .resume = mxcnd_resume,
+@@ -1055,13 +1351,14 @@ static struct platform_driver mxcnd_driv
+
+ static int __init mxc_nd_init(void)
+ {
++ int ret;
++
+ /* Register the device driver structure. */
+- pr_info("MXC MTD nand Driver\n");
+- if (platform_driver_probe(&mxcnd_driver, mxcnd_probe) != 0) {
++ ret = platform_driver_probe(&mxcnd_driver, mxcnd_probe);
++ if (ret != 0) {
+ printk(KERN_ERR "Driver register failed for mxcnd_driver\n");
+- return -ENODEV;
+ }
+- return 0;
++ return ret;
+ }
+
+ static void __exit mxc_nd_cleanup(void)
+diff -urNp linux-2.6.30-rc4/drivers/mtd/nand/mxc_nd2.c linux-2.6.30-rc4-karo/drivers/mtd/nand/mxc_nd2.c
+--- linux-2.6.30-rc4/drivers/mtd/nand/mxc_nd2.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/drivers/mtd/nand/mxc_nd2.c 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,1651 @@
++/*
++ * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++#include <linux/delay.h>
++#include <linux/slab.h>
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/nand.h>
++#include <linux/interrupt.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/err.h>
++#include <linux/mtd/partitions.h>
++#include <asm/mach/flash.h>
++#include <asm/io.h>
++
++#ifdef CONFIG_MTD_DEBUG
++static int debug = 0;
++module_param(debug, int, S_IRUGO | S_IWUSR);
++
++#define dbg_lvl(n) ((n) < debug)
++#define DBG(lvl, fmt...) do { if (dbg_lvl(lvl)) printk(KERN_DEBUG fmt); } while (0)
++#undef DEBUG
++#define DEBUG DBG
++#else
++static int debug;
++module_param(debug, int, 0);
++
++#define dbg_lvl(n) 0
++#define DBG(lvl, fmt...) do { } while (0)
++#endif
++
++#include "mxc_nd2.h"
++
++#define DRV_NAME "mxc_nand"
++
++
++/* Global address Variables */
++/*
++static void __iomem *nfc_axi_base;
++static void __iomem *nfc_ip_base;
++*/
++
++struct mxc_mtd_s {
++ struct mtd_info mtd;
++ struct nand_chip nand;
++ struct mtd_partition *parts;
++ struct device *dev;
++ wait_queue_head_t irq_waitq;
++ int irq;
++
++ u8 *data_buf;
++ u8 *oob_buf;
++ struct clk *clk;
++ int clk_act;
++
++ struct resource *res_ip;
++ struct resource *res_axi;
++ void __iomem *reg_base;
++ void __iomem *axi_base;
++ u16 __iomem *main_buf;
++ u16 __iomem *spare_buf;
++
++ bool status_req;
++ u16 col_addr;
++};
++
++/*
++ * Define delays in microsec for NAND device operations
++ */
++#define TROP_US_DELAY 2000
++
++#ifdef CONFIG_MTD_NAND_MXC_SWECC
++static int hardware_ecc = 0;
++#else
++static int hardware_ecc = 1;
++#endif
++
++static u8 num_of_interleave = 1;
++
++/*
++ * OOB placement block for use with hardware ecc generation
++ */
++static struct nand_ecclayout nand_hw_eccoob_512 = {
++ .eccbytes = 9,
++ .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15},
++ .oobfree = {{0, 4}},
++};
++
++static struct nand_ecclayout nand_hw_eccoob_2k = {
++ .eccbytes = 9,
++ .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15},
++ .oobfree = {{2, 5}, {16, 7}, {32, 7}, {48,7}},
++};
++
++static struct nand_ecclayout nand_hw_eccoob_4k = {
++ .eccbytes = 9,
++ .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15},
++ .oobfree = {{2, 5}, {16, 218 - 16}},
++};
++
++/*!
++ * @defgroup NAND_MTD NAND Flash MTD Driver for MXC processors
++ */
++
++/*!
++ * @file mxc_nd2.c
++ *
++ * @brief This file contains the hardware specific layer for NAND Flash on
++ * MXC processor
++ *
++ * @ingroup NAND_MTD
++ */
++
++#ifdef CONFIG_MTD_PARTITIONS
++static const char *part_probes[] = { "RedBoot", "cmdlinepart", NULL };
++#endif
++
++static irqreturn_t mxc_nfc_irq(int irq, void *dev_id)
++{
++ struct mxc_mtd_s *mxc_nand_data = dev_id;
++
++ /* Disable Interrupt */
++ nfc_write_reg(mxc_nand_data,
++ nfc_read_reg(mxc_nand_data, REG_NFC_INTERRUPT) |
++ NFC_INT_MSK, REG_NFC_INTERRUPT);
++ wake_up(&mxc_nand_data->irq_waitq);
++
++ return IRQ_HANDLED;
++}
++
++/*
++ * Functions to transfer data to/from spare erea.
++ */
++static void
++copy_spare(struct mtd_info *mtd, void *pbuf, void *pspare, int len, bool bfrom)
++{
++ u16 i, j;
++ u16 m = mtd->oobsize;
++ u16 n = mtd->writesize >> 9;
++ u8 *d = (u8 *) pbuf;
++ u8 *s = (u8 *) pspare;
++ u16 t = SPARE_LEN;
++
++ m /= num_of_interleave;
++ n /= num_of_interleave;
++
++ j = (m / n >> 1) << 1;
++
++ if (bfrom) {
++ for (i = 0; i < n - 1; i++)
++ memcpy(&d[i * j], &s[i * t], j);
++
++ /* the last section */
++ memcpy(&d[i * j], &s[i * t], len - i * j);
++ } else {
++ for (i = 0; i < n - 1; i++)
++ memcpy(&s[i * t], &d[i * j], j);
++
++ /* the last section */
++ memcpy(&s[i * t], &d[i * j], len - i * j);
++ }
++}
++
++/*!
++ * This function polls the NFC to wait for the basic operation to complete by
++ * checking the INT bit of config2 register.
++ *
++ * @param retries number of retry attempts (separated by 1 us)
++ * @param useirq True if IRQ should be used rather than polling
++ */
++static void wait_op_done(struct mxc_mtd_s *mxc_nand_data, int retries, bool useirq)
++{
++ u32 nfc_stat;
++ static unsigned long max_wait[2];
++ unsigned long timeout = msecs_to_jiffies(retries);
++ int op;
++
++ nfc_stat = nfc_read_reg(mxc_nand_data, REG_NFC_OPS_STAT);
++ op = nfc_stat & 0xff;
++ DBG(2, "%s: cmd: 0x%02x op: 0x%02x irq: %d\n", __FUNCTION__,
++ __raw_readw(mxc_nand_data->reg_base + REG_NFC_FLASH_CMD),
++ op, useirq);
++ if (useirq) {
++ if (!(nfc_stat & NFC_OPS_STAT)) {
++ /* Enable Interrupt */
++ nfc_write_reg(mxc_nand_data,
++ nfc_read_reg(mxc_nand_data,
++ REG_NFC_INTERRUPT) & ~NFC_INT_MSK,
++ REG_NFC_INTERRUPT);
++ retries = wait_event_timeout(mxc_nand_data->irq_waitq,
++ (nfc_stat = nfc_read_reg(mxc_nand_data,
++ REG_NFC_OPS_STAT)) & NFC_OPS_STAT,
++ timeout);
++ }
++ } else {
++ while (!(nfc_stat & NFC_OPS_STAT) && retries-- > 0) {
++ udelay(1);
++ nfc_stat = nfc_read_reg(mxc_nand_data, REG_NFC_OPS_STAT);
++ }
++ }
++ if (!(nfc_stat & NFC_OPS_STAT) && retries <= 0) {
++ printk(KERN_ERR "%s: timeout waiting for NFC INT for cmd: 0x%02x op 0x%02x: %d\n",
++ __FUNCTION__, __raw_readw(mxc_nand_data->reg_base +
++ REG_NFC_FLASH_CMD), op, useirq);
++ BUG();
++ } else {
++ unsigned long wait = (useirq ? timeout : TROP_US_DELAY) - retries;
++ if (wait > max_wait[useirq]) {
++ max_wait[useirq] = wait;
++ DBG(2, "%s: ready(%d) after %lu ticks\n", __FUNCTION__,
++ useirq, max_wait[useirq]);
++ }
++ }
++ WRITE_NFC_IP_REG(nfc_stat & ~NFC_OPS_STAT, REG_NFC_OPS_STAT);
++ if (nfc_stat & NFC_OPS_STAT) {
++ DBG(2, "%s: Done: irq: %d ticks: %d\n", __FUNCTION__, useirq, retries);
++ } else {
++ DBG(0, "%s: Failed: irq: %d\n", __FUNCTION__, useirq);
++ }
++}
++
++static inline void send_atomic_cmd(struct mxc_mtd_s *mxc_nand_data, u16 cmd, bool useirq)
++{
++ /* fill command */
++ nfc_write_reg(mxc_nand_data, cmd, REG_NFC_FLASH_CMD);
++
++ /* clear status */
++ ACK_OPS;
++
++ /* send out command */
++ nfc_write_reg(mxc_nand_data, NFC_CMD, REG_NFC_OPS);
++
++ /* Wait for operation to complete */
++ wait_op_done(mxc_nand_data, TROP_US_DELAY, useirq);
++}
++
++static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr);
++static int mxc_check_ecc_status(struct mtd_info *mtd);
++
++#ifdef NFC_AUTO_MODE_ENABLE
++/*!
++ * This function handle the interleave related work
++ * @param mtd mtd info
++ * @param cmd command
++ */
++static void auto_cmd_interleave(struct mtd_info *mtd, u16 cmd)
++{
++ u32 i;
++ u32 j = num_of_interleave;
++ struct nand_chip *this = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++ u32 addr_low = nfc_read_reg(mxc_nand_data, NFC_FLASH_ADDR0);
++ u32 addr_high = nfc_read_reg(mxc_nand_data, NFC_FLASH_ADDR8);
++ u32 page_addr = addr_low >> 16 | addr_high << 16;
++ u8 *dbuf = mxc_nand_data->data_buf;
++ u8 *obuf = mxc_nand_data->oob_buf;
++ u32 dlen = mtd->writesize / j;
++ u32 olen = mtd->oobsize / j;
++
++ /* adjust the addr value
++ * since ADD_OP mode is 01
++ */
++ if (j > 1)
++ page_addr *= j;
++ else
++ page_addr *= this->numchips;
++
++ switch (cmd) {
++ case NAND_CMD_PAGEPROG:
++ for (i = 0; i < j; i++) {
++ /* reset addr cycle */
++ if (j > 1)
++ mxc_do_addr_cycle(mtd, 0, page_addr++);
++
++ /* data transfer */
++ memcpy(mxc_nand_data->main_buf, dbuf, dlen);
++ copy_spare(mtd, obuf, mxc_nand_data->spare_buf, olen, false);
++
++ /* update the value */
++ dbuf += dlen;
++ obuf += olen;
++
++ NFC_SET_RBA(0);
++ ACK_OPS;
++ nfc_write_reg(mxc_nand_data, NFC_AUTO_PROG, REG_NFC_OPS);
++
++ /* wait auto_prog_done bit set */
++ while (!(raw_read(REG_NFC_OPS_STAT) & NFC_OP_DONE)) ;
++ }
++
++ wait_op_done(TROP_US_DELAY, false);
++ while (!(raw_read(REG_NFC_OPS_STAT) & NFC_RB)) ;
++
++ break;
++ case NAND_CMD_READSTART:
++ for (i = 0; i < j; i++) {
++ /* reset addr cycle */
++ if (j > 1)
++ mxc_do_addr_cycle(mtd, 0, page_addr++);
++
++ NFC_SET_RBA(0);
++ ACK_OPS;
++ nfc_write_reg(mxc_nand_data, NFC_AUTO_READ, REG_NFC_OPS);
++ wait_op_done(mxc_nand_data, TROP_US_DELAY, true);
++
++ /* check ecc error */
++ mxc_check_ecc_status(mtd);
++
++ /* data transfer */
++ memcpy(dbuf, mxc_nand_data->main_buf, dlen);
++ copy_spare(mtd, obuf, mxc_nand_data->spare_buf, olen, true);
++
++ /* update the value */
++ dbuf += dlen;
++ obuf += olen;
++ }
++ break;
++ case NAND_CMD_ERASE2:
++ for (i = 0; i < j; i++) {
++ if (!i) {
++ page_addr = addr_low;
++ page_addr *= (j > 1 ? j : this->numchips);
++ }
++ mxc_do_addr_cycle(mtd, -1, page_addr++);
++ ACK_OPS;
++ nfc_write_reg(NFC_AUTO_ERASE, REG_NFC_OPS);
++ wait_op_done(TROP_US_DELAY, true);
++ }
++ break;
++ case NAND_CMD_RESET:
++ for (i = 0; i < j; i++) {
++ if (j > 1)
++ NFC_SET_NFC_ACTIVE_CS(i);
++ send_atomic_cmd(cmd, false);
++ }
++ break;
++ }
++}
++#endif
++
++static void send_addr(struct mxc_mtd_s *mxc_nand_data, u16 addr, bool useirq);
++
++/*!
++ * This function issues the specified command to the NAND device and
++ * waits for completion.
++ *
++ * @param cmd command for NAND Flash
++ * @param useirq True if IRQ should be used rather than polling
++ */
++static void send_cmd(struct mtd_info *mtd, u16 cmd, bool useirq)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++
++ DEBUG(MTD_DEBUG_LEVEL3, "send_cmd(0x%x, %d)\n", cmd, useirq);
++
++#ifdef NFC_AUTO_MODE_ENABLE
++ switch (cmd) {
++ case NAND_CMD_READ0:
++ case NAND_CMD_READOOB:
++ nfc_write_reg(mxc_nand_data, NAND_CMD_READ0, REG_NFC_FLASH_CMD);
++ break;
++ case NAND_CMD_SEQIN:
++ case NAND_CMD_ERASE1:
++ nfc_write_reg(mxc_nand_data, cmd, REG_NFC_FLASH_CMD);
++ break;
++ case NAND_CMD_PAGEPROG:
++ case NAND_CMD_ERASE2:
++ case NAND_CMD_READSTART:
++ nfc_write_reg(mxc_nand_data,
++ nfc_read_reg(mxc_nand_data, REG_NFC_FLASH_CMD) |
++ cmd << NFC_CMD_1_SHIFT,
++ REG_NFC_FLASH_CMD);
++ auto_cmd_interleave(mtd, cmd);
++ break;
++ case NAND_CMD_READID:
++ send_atomic_cmd(mxc_nand_data, cmd, useirq);
++ send_addr(mxc_nand_data, 0, false);
++ break;
++ case NAND_CMD_RESET:
++ auto_cmd_interleave(mtd, cmd);
++ case NAND_CMD_STATUS:
++ break;
++ }
++#else
++ send_atomic_cmd(mxc_nand_data, cmd, useirq);
++#endif
++}
++
++/*!
++ * This function sends an address (or partial address) to the
++ * NAND device. The address is used to select the source/destination for
++ * a NAND command.
++ *
++ * @param addr address to be written to NFC.
++ * @param useirq True if IRQ should be used rather than polling
++ */
++static void send_addr(struct mxc_mtd_s *mxc_nand_data, u16 addr, bool useirq)
++{
++ DEBUG(MTD_DEBUG_LEVEL3, "send_addr(0x%x %d)\n", addr, useirq);
++
++ /* fill address */
++ nfc_write_reg(mxc_nand_data, (addr << NFC_FLASH_ADDR_SHIFT),
++ REG_NFC_FLASH_ADDR);
++
++ /* clear status */
++ ACK_OPS;
++
++ /* send out address */
++ nfc_write_reg(mxc_nand_data, NFC_ADDR, REG_NFC_OPS);
++
++ /* Wait for operation to complete */
++ wait_op_done(mxc_nand_data, TROP_US_DELAY, useirq);
++}
++
++/*!
++ * This function requests the NFC to initate the transfer
++ * of data currently in the NFC RAM buffer to the NAND device.
++ *
++ * @param buf_id Specify Internal RAM Buffer number
++ */
++static void send_prog_page(struct mxc_mtd_s *mxc_nand_data, u8 buf_id)
++{
++#ifndef NFC_AUTO_MODE_ENABLE
++ DEBUG(MTD_DEBUG_LEVEL0, "%s\n", __FUNCTION__);
++
++ /* set ram buffer id */
++ NFC_SET_RBA(buf_id);
++
++ /* clear status */
++ ACK_OPS;
++
++ /* transfer data from NFC ram to nand */
++ nfc_write_reg(mxc_nand_data, NFC_INPUT, REG_NFC_OPS);
++
++ /* Wait for operation to complete */
++ wait_op_done(mxc_nand_data, TROP_US_DELAY, true);
++#endif
++}
++
++/*!
++ * This function requests the NFC to initated the transfer
++ * of data from the NAND device into in the NFC ram buffer.
++ *
++ * @param buf_id Specify Internal RAM Buffer number
++ */
++static void send_read_page(struct mxc_mtd_s *mxc_nand_data, u8 buf_id)
++{
++#ifndef NFC_AUTO_MODE_ENABLE
++ DEBUG(MTD_DEBUG_LEVEL2, "%s(%d)\n", __FUNCTION__, buf_id);
++
++ /* set ram buffer id */
++ NFC_SET_RBA(buf_id);
++
++ /* clear status */
++ ACK_OPS;
++
++ /* transfer data from nand to NFC ram */
++ nfc_write_reg(mxc_nand_data, NFC_OUTPUT, REG_NFC_OPS);
++
++ /* Wait for operation to complete */
++ wait_op_done(mxc_nand_data, TROP_US_DELAY, true);
++#endif
++}
++
++/*!
++ * This function requests the NFC to perform a read of the
++ * NAND device ID.
++ */
++static void send_read_id(struct mxc_mtd_s *mxc_nand_data)
++{
++ DBG(2, "%s: \n", __FUNCTION__);
++
++ /* Set RBA bits for BUFFER0 */
++ NFC_SET_RBA(0);
++
++ /* clear status */
++ ACK_OPS;
++
++ /* Read ID into main buffer */
++ nfc_write_reg(mxc_nand_data, NFC_ID, REG_NFC_OPS);
++
++ /* Wait for operation to complete */
++ wait_op_done(mxc_nand_data, TROP_US_DELAY, true);
++}
++
++#ifdef NFC_AUTO_MODE_ENABLE
++static inline void read_dev_status(u16 *status)
++{
++ u32 mask = 0xFF << 16;
++
++ /* clear status */
++ ACK_OPS;
++
++ do {
++ /* send auto read status command */
++ nfc_write_reg(NFC_AUTO_STATE, REG_NFC_OPS);
++ if (cpu_is_mx51_rev(CHIP_REV_2_0) == 1)
++ wait_op_done(TROP_US_DELAY, false);
++ *status = (raw_read(NFC_CONFIG1) & mask) >> 16;
++ } while ((*status & NAND_STATUS_READY) == 0);
++}
++#endif
++
++/*!
++ * This function requests the NFC to perform a read of the
++ * NAND device status and returns the current status.
++ *
++ * @return device status
++ */
++static u16 get_dev_status(struct mxc_mtd_s *mxc_nand_data)
++{
++#ifdef NFC_AUTO_MODE_ENABLE
++ int i;
++ u16 status = 0;
++ for (i = 0; i < num_of_interleave; i++) {
++
++ /* set ative cs */
++ NFC_SET_NFC_ACTIVE_CS(i);
++
++ /* FIXME, NFC Auto erase may have
++ * problem, have to poll it until
++ * the nand get idle, otherwise
++ * it may get error
++ */
++ read_dev_status(&status);
++ if (status & NAND_STATUS_FAIL)
++ break;
++ }
++
++ return status;
++#else
++ u8 val = 1;
++ u16 *main_buf = mxc_nand_data->main_buf + val * (0x200 >> 1);
++ u16 ret;
++ u16 save = *main_buf;
++
++ /* Set ram buffer id */
++ NFC_SET_RBA(val);
++
++ /* clear status */
++ ACK_OPS;
++
++ if (dbg_lvl(3)) {
++ for (val = 0; val < 8; val++) {
++ u16 *main_buf = mxc_nand_data->main_buf + val * (0x200 >> 1);
++ print_hex_dump(KERN_DEBUG, "mainbuf0: ",
++ DUMP_PREFIX_ADDRESS,
++ 16, 2, main_buf, 16, 0);
++ }
++ }
++
++ /* Read status into main buffer */
++ nfc_write_reg(mxc_nand_data, NFC_STATUS, REG_NFC_OPS);
++
++ /* Wait for operation to complete */
++ wait_op_done(mxc_nand_data, TROP_US_DELAY, true);
++
++ if (dbg_lvl(3)) {
++ for (val = 0; val < 8; val++) {
++ u16 *main_buf = mxc_nand_data->main_buf + val * (0x200 >> 1);
++ print_hex_dump(KERN_DEBUG, "mainbuf1: ",
++ DUMP_PREFIX_ADDRESS,
++ 16, 2, main_buf, 16, 0);
++ }
++ }
++
++ /* Status is placed in first word of main buffer */
++ /* get status, then recover area 1 data */
++ ret = *main_buf;
++ *main_buf = save;
++
++ return ret;
++#endif
++}
++
++static void mxc_nand_enable_hwecc(struct mtd_info *mtd, int mode)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++
++ nfc_write_reg(mxc_nand_data,
++ (nfc_read_reg(mxc_nand_data, REG_NFC_ECC_EN) | NFC_ECC_EN),
++ REG_NFC_ECC_EN);
++ return;
++}
++
++/*
++ * Function to record the ECC corrected/uncorrected errors resulted
++ * after a page read. This NFC detects and corrects upto to 4 symbols
++ * of 9-bits each.
++ */
++static int mxc_check_ecc_status(struct mtd_info *mtd)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++ int no_subpages = (mtd->writesize >> 9) / num_of_interleave;
++ int ret = 0;
++ u8 ecc_bit_mask = (IS_4BIT_ECC ? 0x7 : 0xf);
++ u8 err_limit = (IS_4BIT_ECC ? 0x4 : 0x8);
++ u32 ecc_stat;
++
++ ecc_stat = GET_NFC_ECC_STATUS();
++ do {
++ u32 err = ecc_stat & ecc_bit_mask;
++ if (err > err_limit) {
++ mtd->ecc_stats.failed++;
++ printk(KERN_WARNING "UnCorrectable RS-ECC Error\n");
++ return -EILSEQ;
++ } else {
++ ret += err;
++ }
++ ecc_stat >>= 4;
++ } while (--no_subpages);
++
++ mtd->ecc_stats.corrected += ret;
++ pr_debug("%d Symbol Correctable RS-ECC Error\n", ret);
++
++ return ret;
++}
++
++/*
++ * Function to correct the detected errors. This NFC corrects all the errors
++ * detected. So this function just return 0.
++ */
++static int mxc_nand_correct_data(struct mtd_info *mtd, u_char *dat,
++ u_char *read_ecc, u_char *calc_ecc)
++{
++ return 0;
++}
++
++/*
++ * Function to calculate the ECC for the data to be stored in the Nand device.
++ * This NFC has a hardware RS(511,503) ECC engine together with the RS ECC
++ * CONTROL blocks are responsible for detection and correction of up to
++ * 8 symbols of 9 bits each in 528 byte page.
++ * So this function is just return 0.
++ */
++
++static int mxc_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
++ u_char *ecc_code)
++{
++ return 0;
++}
++
++/*!
++ * This function id is used to read the data buffer from the NAND Flash. To
++ * read the data from NAND Flash first the data output cycle is initiated by
++ * the NFC, which copies the data to RAMbuffer. This data of length \b len is
++ * then copied to buffer \b buf.
++ *
++ * @param mtd MTD structure for the NAND Flash
++ * @param buf data to be read from NAND Flash
++ * @param len number of bytes to be read
++ */
++static void mxc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++ u16 col = mxc_nand_data->col_addr;
++
++ if (mtd->writesize) {
++ int j = mtd->writesize - col;
++ int n = min((int)mtd->oobsize + j, len);
++
++ if (j > 0) {
++ if (WARN_ON(n > j)) {
++ memcpy(buf, &mxc_nand_data->data_buf[col], j);
++ memcpy(buf + j, &mxc_nand_data->oob_buf[0], n - j);
++ } else {
++ memcpy(buf, &mxc_nand_data->data_buf[col], n);
++ }
++ } else {
++ col -= mtd->writesize;
++ memcpy(buf, &mxc_nand_data->oob_buf[col], len);
++ }
++
++ /* update */
++ mxc_nand_data->col_addr += n;
++ } else {
++ /* At flash identify phase,
++ * mtd->writesize has not been
++ * set correctly, it should
++ * be zero. And len will less 2
++ */
++ memcpy(buf, &mxc_nand_data->data_buf[col], len);
++
++ /* update */
++ mxc_nand_data->col_addr += len;
++ }
++}
++
++/*!
++ * This function reads byte from the NAND Flash
++ *
++ * @param mtd MTD structure for the NAND Flash
++ *
++ * @return data read from the NAND Flash
++ */
++static u8 mxc_nand_read_byte(struct mtd_info *mtd)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++ u8 ret;
++
++ /* Check for status request */
++ if (mxc_nand_data->status_req) {
++ ret = get_dev_status(mxc_nand_data) & 0xFF;
++ DBG(1, "%s: NAND status=%02x\n", __FUNCTION__, ret);
++ return ret;
++ }
++
++ mxc_nand_read_buf(mtd, &ret, 1);
++ return ret;
++}
++
++/*!
++ * This function reads word from the NAND Flash
++ *
++ * @param mtd MTD structure for the NAND Flash
++ *
++ * @return data read from the NAND Flash
++ */
++static u16 mxc_nand_read_word(struct mtd_info *mtd)
++{
++ u16 ret;
++
++ mxc_nand_read_buf(mtd, (u8 *)&ret, sizeof(u16));
++ return ret;
++}
++
++/*!
++ * This function reads byte from the NAND Flash
++ *
++ * @param mtd MTD structure for the NAND Flash
++ *
++ * @return data read from the NAND Flash
++ */
++static u_char mxc_nand_read_byte16(struct mtd_info *mtd)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++
++ /* Check for status request */
++ if (mxc_nand_data->status_req) {
++ return get_dev_status(mxc_nand_data) & 0xFF;
++ }
++
++ return mxc_nand_read_word(mtd) & 0xFF;
++}
++
++/*!
++ * This function writes data of length \b len from buffer \b buf to the NAND
++ * internal RAM buffer's MAIN area 0.
++ *
++ * @param mtd MTD structure for the NAND Flash
++ * @param buf data to be written to NAND Flash
++ * @param len number of bytes to be written
++ */
++static void mxc_nand_write_buf(struct mtd_info *mtd,
++ const u_char *buf, int len)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++ u16 col = mxc_nand_data->col_addr;
++ int j = mtd->writesize - col;
++ int n = mtd->oobsize + j;
++
++ n = min(n, len);
++
++ if (j > 0) {
++ if (n > j) {
++ memcpy(&mxc_nand_data->data_buf[col], buf, j);
++ memcpy(&mxc_nand_data->oob_buf[0], buf + j, n - j);
++ } else {
++ memcpy(&mxc_nand_data->data_buf[col], buf, n);
++ }
++ } else {
++ col -= mtd->writesize;
++ memcpy(&mxc_nand_data->oob_buf[col], buf, len);
++ }
++
++ /* update */
++ mxc_nand_data->col_addr += n;
++}
++
++/*!
++ * This function is used by the upper layer to verify the data in NAND Flash
++ * with the data in the \b buf.
++ *
++ * @param mtd MTD structure for the NAND Flash
++ * @param buf data to be verified
++ * @param len length of the data to be verified
++ *
++ * @return -EFAULT if error else 0
++ *
++ */
++static int mxc_nand_verify_buf(struct mtd_info *mtd, const u_char *buf,
++ int len)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++ u_char *s = mxc_nand_data->data_buf;
++ const u_char *p = buf;
++
++ for (; len > 0; len--) {
++ if (*p++ != *s++)
++ return -EFAULT;
++ }
++
++ return 0;
++}
++
++/*!
++ * This function is used by upper layer for select and deselect of the NAND
++ * chip
++ *
++ * @param mtd MTD structure for the NAND Flash
++ * @param chip val indicating select or deselect
++ */
++static void mxc_nand_select_chip(struct mtd_info *mtd, int chip)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++
++ switch (chip) {
++ case -1:
++ if (mxc_nand_data->clk_act) {
++ /* Disable the NFC clock */
++ clk_disable(mxc_nand_data->clk);
++ mxc_nand_data->clk_act = 0;
++ }
++ break;
++ case 0 ... 7:
++ /* Enable the NFC clock */
++ if (!mxc_nand_data->clk_act) {
++ clk_enable(mxc_nand_data->clk);
++ mxc_nand_data->clk_act = 1;
++ }
++ NFC_SET_NFC_ACTIVE_CS(chip);
++ break;
++ default:
++ BUG();
++ }
++}
++
++/*
++ * Function to perform the address cycles.
++ */
++static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++#ifdef NFC_AUTO_MODE_ENABLE
++ if (page_addr != -1 && column != -1) {
++ u32 mask = 0xFFFF;
++ /* the column address */
++ nfc_write_reg(mxc_nand_data, column & mask, NFC_FLASH_ADDR0);
++ nfc_write_reg(mxc_nand_data,
++ (nfc_read_reg(mxc_nand_data, NFC_FLASH_ADDR0) |
++ ((page_addr & mask) << 16)), NFC_FLASH_ADDR0);
++ /* the row address */
++ nfc_write_reg(mxc_nand_data,
++ ((nfc_read_reg(mxc_nand_data, NFC_FLASH_ADDR8) &
++ (mask << 16)) |
++ ((page_addr & (mask << 16)) >> 16)),
++ NFC_FLASH_ADDR8);
++ } else if (page_addr != -1) {
++ nfc_write_reg(mxc_nand_data, page_addr, NFC_FLASH_ADDR0);
++ }
++
++ DEBUG(MTD_DEBUG_LEVEL3,
++ "AutoMode:the ADDR REGS value is (0x%x, 0x%x)\n",
++ nfc_read_reg(mxc_nand_data, NFC_FLASH_ADDR0),
++ nfc_read_reg(mxc_nand_data, NFC_FLASH_ADDR8));
++#else
++
++ u32 page_mask = nand_chip->pagemask;
++
++ if (column != -1) {
++ send_addr(mxc_nand_data, column & 0xFF, false);
++ if (IS_2K_PAGE_NAND) {
++ /* another col addr cycle for 2k page */
++ send_addr(mxc_nand_data, (column >> 8) & 0xF, false);
++ } else if (IS_4K_PAGE_NAND) {
++ /* another col addr cycle for 4k page */
++ send_addr(mxc_nand_data, (column >> 8) & 0x1F, false);
++ }
++ }
++ if (page_addr != -1) {
++ do {
++ send_addr(mxc_nand_data, (page_addr & 0xff), false);
++ page_mask >>= 8;
++ page_addr >>= 8;
++ } while (page_mask != 0);
++ }
++#endif
++}
++
++/*!
++ * This function is used by the upper layer to write command to NAND Flash for
++ * different operations to be carried out on NAND Flash
++ *
++ * @param mtd MTD structure for the NAND Flash
++ * @param command command for NAND Flash
++ * @param column column offset for the page read
++ * @param page_addr page to be read from NAND Flash
++ */
++static void mxc_nand_command(struct mtd_info *mtd, unsigned command,
++ int column, int page_addr)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++ bool useirq = false;
++
++ DEBUG(MTD_DEBUG_LEVEL2,
++ "mxc_nand_command (cmd = 0x%x, col = 0x%x, page = 0x%x)\n",
++ command, column, page_addr);
++ /*
++ * Reset command state information
++ */
++ mxc_nand_data->status_req = false;
++
++ /*
++ * Command pre-processing step
++ */
++ switch (command) {
++ case NAND_CMD_STATUS:
++ mxc_nand_data->col_addr = 0;
++ mxc_nand_data->status_req = true;
++ break;
++
++ case NAND_CMD_READ0:
++ mxc_nand_data->col_addr = column;
++ break;
++
++ case NAND_CMD_READOOB:
++ mxc_nand_data->col_addr = column;
++ command = NAND_CMD_READ0;
++ break;
++
++ case NAND_CMD_SEQIN:
++ if (column != 0) {
++ /* Before sending SEQIN command for partial
++ * write, we need to read one page out.
++ * FSL NFC does not support partial write
++ * for large page devices. It alway sends out
++ * 512+ecc+512+ecc....
++ * For small page nand flash, it would support
++ * SPARE ONLY operation. But to simplify the driver,
++ * we take the same approach for small page and
++ * large page devices:
++ * read out the whole page and update.
++ * As for MLC nand NOP(num of operation) = 1.
++ * Partial writing to one programmed page is
++ * not allowed! We can't limit it in the driver,
++ * the upper layer application needs to take care of it.
++ */
++ mxc_nand_command(mtd, NAND_CMD_READ0, 0, page_addr);
++ }
++
++ mxc_nand_data->col_addr = column;
++ break;
++
++ case NAND_CMD_PAGEPROG:
++#ifndef NFC_AUTO_MODE_ENABLE
++ /* The NFC internal buffer access
++ * has some limitation, it does not
++ * allow byte access. To make the code
++ * simple and easy to use, do not check
++ * the address alignment each time.
++ * Use the temp buffer to accomodate
++ * the data alignment.
++ * We know data_buf will be at least 4
++ * byte aligned, so we can use
++ * memcpy safely.
++ */
++ memcpy(mxc_nand_data->main_buf, mxc_nand_data->data_buf, mtd->writesize);
++ copy_spare(mtd, mxc_nand_data->oob_buf, mxc_nand_data->spare_buf,
++ mtd->oobsize, false);
++#endif
++
++ if (IS_LARGE_PAGE_NAND)
++ PROG_PAGE(mxc_nand_data);
++ else
++ send_prog_page(mxc_nand_data, 0);
++ useirq = true;
++ break;
++
++ case NAND_CMD_ERASE1:
++ break;
++ case NAND_CMD_ERASE2:
++ useirq = true;
++
++ break;
++ }
++
++ /*
++ * Write out the command to the device.
++ */
++ send_cmd(mtd, command, useirq);
++
++ mxc_do_addr_cycle(mtd, column, page_addr);
++
++ /*
++ * Command post-processing step
++ */
++ switch (command) {
++
++ case NAND_CMD_READOOB:
++ case NAND_CMD_READ0:
++ if (IS_LARGE_PAGE_NAND) {
++ /* send read confirm command */
++ send_cmd(mtd, NAND_CMD_READSTART, true);
++ /* read for each AREA */
++ READ_PAGE(mxc_nand_data);
++ } else {
++ send_read_page(mxc_nand_data, 0);
++ }
++
++#ifndef NFC_AUTO_MODE_ENABLE
++ /* FIXME, the NFC interal buffer
++ * access has some limitation, it
++ * does not allow byte access. To
++ * make the code simple and ease use
++ * do not check the address alignment
++ * on each access. Use the temp buffer
++ * to accomodate the data. Since we
++ * know data_buf will be at least 4
++ * byte alignment, so we can use
++ * memcpy safely
++ */
++ memcpy(mxc_nand_data->data_buf, mxc_nand_data->main_buf, mtd->writesize);
++ copy_spare(mtd, mxc_nand_data->oob_buf,
++ mxc_nand_data->spare_buf, mtd->oobsize, true);
++#endif
++
++ break;
++
++ case NAND_CMD_READID:
++ send_read_id(mxc_nand_data);
++ mxc_nand_data->col_addr = column;
++ memcpy(mxc_nand_data->data_buf, mxc_nand_data->main_buf, 2048);
++ break;
++ }
++}
++
++static int mxc_nand_read_oob(struct mtd_info *mtd,
++ struct nand_chip *chip, int page, int sndcmd)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++
++ if (sndcmd) {
++ chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page);
++ sndcmd = 0;
++ }
++
++ memcpy(chip->oob_poi, mxc_nand_data->oob_buf, mtd->oobsize);
++
++ return sndcmd;
++}
++
++static int mxc_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip,
++ u8 *buf)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++
++#ifndef NFC_AUTO_MODE_ENABLE
++ if (mxc_check_ecc_status(mtd) < 0) {
++ //printk(KERN_ERR "ECC error in block %u page %u\n",);
++ }
++#endif
++
++ memcpy(buf, mxc_nand_data->data_buf, mtd->writesize);
++ memcpy(chip->oob_poi, mxc_nand_data->oob_buf, mtd->oobsize);
++
++ return 0;
++}
++
++static void mxc_nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,
++ const u8 *buf)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++
++ memcpy(mxc_nand_data->data_buf, buf, mtd->writesize);
++ memcpy(mxc_nand_data->oob_buf, chip->oob_poi, mtd->oobsize);
++}
++
++/* Define some generic bad / good block scan pattern which are used
++ * while scanning a device for factory marked good / bad blocks. */
++static u8 scan_ff_pattern[] = { 0xff, 0xff };
++
++static struct nand_bbt_descr smallpage_memorybased = {
++ .options = NAND_BBT_SCAN2NDPAGE,
++ .offs = 5,
++ .len = 1,
++ .pattern = scan_ff_pattern
++};
++
++static struct nand_bbt_descr largepage_memorybased = {
++ .options = 0,
++ .offs = 0,
++ .len = 2,
++ .pattern = scan_ff_pattern
++};
++
++/* Generic flash bbt decriptors
++*/
++static u8 bbt_pattern[] = { 'B', 'b', 't', '0' };
++static u8 mirror_pattern[] = { '1', 't', 'b', 'B' };
++
++static struct nand_bbt_descr bbt_main_descr = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
++ NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
++ .offs = 0,
++ .len = 4,
++ .veroffs = 4,
++ .maxblocks = 4,
++ .pattern = bbt_pattern
++};
++
++static struct nand_bbt_descr bbt_mirror_descr = {
++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
++ NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
++ .offs = 0,
++ .len = 4,
++ .veroffs = 4,
++ .maxblocks = 4,
++ .pattern = mirror_pattern
++};
++
++static int mxc_nand_scan_bbt(struct mtd_info *mtd)
++{
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++
++ if (IS_2K_PAGE_NAND) {
++ NFC_SET_NFMS(1 << NFMS_NF_PG_SZ);
++ } else if (IS_4K_PAGE_NAND) {
++ NFC_SET_NFMS(1 << NFMS_NF_PG_SZ);
++ } else {
++ }
++
++ /* reconfig for interleave mode */
++#ifdef NFC_AUTO_MODE_ENABLE
++ if (nand_chip->numchips > 1) {
++ num_of_interleave = nand_chip->numchips;
++ nand_chip->numchips = 1;
++
++ /* FIXEME:need remove it
++ * when kernel support
++ * 4G larger space
++ */
++ mtd->size = nand_chip->chipsize;
++ mtd->erasesize *= num_of_interleave;
++ mtd->writesize *= num_of_interleave;
++ mtd->oobsize *= num_of_interleave;
++ nand_chip->page_shift = ffs(mtd->writesize) - 1;
++ nand_chip->bbt_erase_shift =
++ nand_chip->phys_erase_shift = ffs(mtd->erasesize) - 1;
++ nand_chip->chip_shift = ffs(nand_chip->chipsize) - 1;
++ nand_chip->oob_poi = nand_chip->buffers->databuf + mtd->writesize;
++ }
++#endif
++ /* jffs2 not write oob */
++ //mtd->flags |= MTD_OOB_READONLY;
++
++ /* use flash based bbt */
++ nand_chip->bbt_td = &bbt_main_descr;
++ nand_chip->bbt_md = &bbt_mirror_descr;
++
++ /* update flash based bbt */
++ nand_chip->options |= NAND_USE_FLASH_BBT;
++
++ if (!nand_chip->badblock_pattern) {
++ nand_chip->badblock_pattern = (mtd->writesize > 512) ?
++ &largepage_memorybased : &smallpage_memorybased;
++ }
++
++ /* Build bad block table */
++ return nand_scan_bbt(mtd, nand_chip->badblock_pattern);
++}
++
++static void mxc_nfc_init(struct mxc_mtd_s *mxc_nand_data)
++{
++ /* Disable interrupt */
++ nfc_write_reg(mxc_nand_data,
++ nfc_read_reg(mxc_nand_data, REG_NFC_INTERRUPT) |
++ NFC_INT_MSK, REG_NFC_INTERRUPT);
++
++ /* disable spare enable */
++ nfc_write_reg(mxc_nand_data,
++ nfc_read_reg(mxc_nand_data, REG_NFC_SP_EN) &
++ ~NFC_SP_EN, REG_NFC_SP_EN);
++
++ /* Unlock the internal RAM Buffer */
++ nfc_write_reg(mxc_nand_data, NFC_SET_BLS(NFC_BLS_UNLOCKED),
++ REG_NFC_BLS);
++
++ /* Blocks to be unlocked */
++ UNLOCK_ADDR(0x0, 0xFFFF);
++
++ /* Unlock Block Command for given address range */
++ nfc_write_reg(mxc_nand_data, NFC_SET_WPC(NFC_WPC_UNLOCK), REG_NFC_WPC);
++
++ /* Enable symmetric mode by default except mx37TO1.0 */
++ if (!cpu_is_mx25()) {
++ nfc_write_reg(mxc_nand_data,
++ nfc_read_reg(mxc_nand_data, REG_NFC_ONE_CYCLE) |
++ NFC_ONE_CYCLE, REG_NFC_ONE_CYCLE);
++ } else {
++ nfc_write_reg(mxc_nand_data,
++ nfc_read_reg(mxc_nand_data, REG_NFC_ONE_CYCLE) &
++ ~NFC_ONE_CYCLE, REG_NFC_ONE_CYCLE);
++ }
++}
++
++static int mxc_alloc_buf(struct mxc_mtd_s *mxc_nand_data)
++{
++ u8 *buf;
++
++ buf = kzalloc(NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE, GFP_KERNEL);
++ if (!buf) {
++ printk(KERN_ERR "%s: failed to allocate data_buf\n", __func__);
++ return -ENOMEM;
++ }
++ mxc_nand_data->data_buf = buf;
++ mxc_nand_data->oob_buf = &buf[NAND_MAX_PAGESIZE];
++ return 0;
++}
++
++static void mxc_free_buf(struct mxc_mtd_s *mxc_nand_data)
++{
++ kfree(mxc_nand_data->data_buf);
++}
++
++/*!
++ * This function is called during the driver binding process.
++ *
++ * @param pdev the device structure used to store device specific
++ * information that is used by the suspend, resume and
++ * remove functions
++ *
++ * @return The function always returns 0.
++ */
++#define SPLIT_SCAN
++
++static int __init mxcnd_probe(struct platform_device *pdev)
++{
++ int err;
++ struct nand_chip *this;
++ struct mtd_info *mtd;
++ struct flash_platform_data *pdata = pdev->dev.platform_data;
++ int nr_parts;
++ struct resource *res;
++ struct mxc_mtd_s *mxc_nand_data;
++ struct clk *clk;
++ void __iomem *nfc_axi_base;
++ void __iomem *nfc_ip_base;
++
++ if (!pdata) {
++ dev_err(&pdev->dev, "No platform_data\n");
++ return -ENODEV;
++ }
++
++ /* Allocate memory for MTD device structure and private data */
++ mxc_nand_data = kzalloc(sizeof(struct mxc_mtd_s), GFP_KERNEL);
++ if (!mxc_nand_data) {
++ printk(KERN_ERR "%s: failed to allocate mtd_info\n",
++ __FUNCTION__);
++ return -ENOMEM;
++ }
++
++ /* allocate data buffer */
++ if (mxc_alloc_buf(mxc_nand_data)) {
++ err = -ENOMEM;
++ goto out;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res) {
++ dev_err(&pdev->dev, "no memory resource\n");
++ err = -ENODEV;
++ goto out1;
++ }
++ if (!request_mem_region(res->start, resource_size(res), DRV_NAME)) {
++ err = -EBUSY;
++ goto out1;
++ }
++ mxc_nand_data->res_ip = res;
++
++ nfc_ip_base = ioremap(res->start, resource_size(res));
++ if (nfc_ip_base == NULL) {
++ dev_err(&pdev->dev, "Failed to ioremap %08lx..%08lx\n",
++ (unsigned long)res->start, (unsigned long)res->end);
++ err = -ENOMEM;
++ goto out2;
++ }
++ DBG(0, "%s: %08lx..%08lx remapped to %p\n", __FUNCTION__,
++ (unsigned long)res->start, (unsigned long)res->end,
++ nfc_ip_base);
++
++ mxc_nand_data->reg_base = nfc_ip_base;
++ mxc_nand_data->main_buf = mxc_nand_data->reg_base + MAIN_AREA0;
++ mxc_nand_data->spare_buf = mxc_nand_data->reg_base + SPARE_AREA0;
++
++ DBG(1, "%s: reg_base=%p\n", __FUNCTION__, mxc_nand_data->reg_base);
++ DBG(1, "%s: main_buf=%p\n", __FUNCTION__, mxc_nand_data->main_buf);
++ DBG(1, "%s: spare_buf=%p\n", __FUNCTION__, mxc_nand_data->spare_buf);
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
++ if (res) {
++ if (!request_mem_region(res->start, resource_size(res), DRV_NAME)) {
++ err = -EBUSY;
++ goto out3;
++ }
++ nfc_axi_base = ioremap(res->start, resource_size(res));
++ if (nfc_axi_base == NULL) {
++ dev_err(&pdev->dev, "Failed to ioremap %08lx..%08lx\n",
++ (unsigned long)res->start, (unsigned long)res->end);
++ err = -ENOMEM;
++ goto out4;
++ }
++ mxc_nand_data->res_axi = res;
++ DBG(0, "%s: %08lx..%08lx remapped to %p\n", __FUNCTION__,
++ (unsigned long)res->start, (unsigned long)res->end,
++ nfc_axi_base);
++ mxc_nand_data->axi_base = nfc_axi_base;
++ }
++
++ err = platform_get_irq(pdev, 0);
++ if (err < 0) {
++ dev_err(&pdev->dev, "Failed to get IRQ\n");
++ goto out5;
++ }
++ mxc_nand_data->irq = err;
++ DBG(0, "%s: IRQ=%d\n", __FUNCTION__, mxc_nand_data->irq);
++
++ /* init the nfc */
++ mxc_nfc_init(mxc_nand_data);
++
++ mxc_nand_data->dev = &pdev->dev;
++ /* structures must be linked */
++ this = &mxc_nand_data->nand;
++ mtd = &mxc_nand_data->mtd;
++ mtd->priv = this;
++ mtd->owner = THIS_MODULE;
++
++ this->priv = mxc_nand_data;
++ this->cmdfunc = mxc_nand_command;
++ this->select_chip = mxc_nand_select_chip;
++ this->read_byte = mxc_nand_read_byte;
++ this->read_word = mxc_nand_read_word;
++ this->write_buf = mxc_nand_write_buf;
++ this->read_buf = mxc_nand_read_buf;
++ this->verify_buf = mxc_nand_verify_buf;
++ this->scan_bbt = mxc_nand_scan_bbt;
++
++ /* NAND bus width determines access funtions used by upper layer */
++ if (pdata->width == 2) {
++ this->read_byte = mxc_nand_read_byte16;
++ this->options |= NAND_BUSWIDTH_16;
++ NFC_SET_NFMS(1 << NFMS_NF_DWIDTH);
++ } else {
++ NFC_SET_NFMS(0);
++ }
++
++ clk = clk_get(&pdev->dev, "nfc_clk");
++ if (IS_ERR(clk)) {
++ dev_err(&pdev->dev, "Failed to get nfc_clk: %ld\n",
++ PTR_ERR(clk));
++ err = PTR_ERR(clk);
++ goto out6;
++ }
++ mxc_nand_data->clk = clk;
++ clk_enable(clk);
++ mxc_nand_data->clk_act = 1;
++
++ init_waitqueue_head(&mxc_nand_data->irq_waitq);
++ err = request_irq(mxc_nand_data->irq, mxc_nfc_irq, 0, "mxc_nd",
++ mxc_nand_data);
++ if (err) {
++ goto out7;
++ }
++
++ DBG(0, "%s: Init GPIOs\n", __FUNCTION__);
++ /* config the gpio */
++ if (pdata->init) {
++ err = pdata->init();
++ if (err) {
++ printk(KERN_ERR "%s: Failed to init GPIOs: %d\n",
++ __FUNCTION__, err);
++ goto out8;
++ }
++ }
++
++ DBG(0, "%s: Resetting NAND chip\n", __FUNCTION__);
++ /* Reset NAND */
++ this->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
++
++ /* Scan to find existence of the device */
++ err = nand_scan_ident(mtd, 1);
++ if (err) {
++ DEBUG(MTD_DEBUG_LEVEL0,
++ "MXC_ND: Unable to find any NAND device.\n");
++ goto out9;
++ }
++
++ if (IS_2K_PAGE_NAND) {
++ DBG(0, "%s: Using 2k ecc layout\n", __FUNCTION__);
++ this->ecc.layout = &nand_hw_eccoob_2k;
++ } else if (IS_4K_PAGE_NAND) {
++ DBG(0, "%s: Using 4k ecc layout\n", __FUNCTION__);
++ this->ecc.layout = &nand_hw_eccoob_4k;
++ } else {
++ DBG(0, "%s: Using 512b ecc layout\n", __FUNCTION__);
++ this->ecc.layout = &nand_hw_eccoob_512;
++ }
++ if (hardware_ecc) {
++ this->ecc.read_page = mxc_nand_read_page;
++ this->ecc.write_page = mxc_nand_write_page;
++ this->ecc.read_oob = mxc_nand_read_oob;
++ this->ecc.calculate = mxc_nand_calculate_ecc;
++ this->ecc.hwctl = mxc_nand_enable_hwecc;
++ this->ecc.correct = mxc_nand_correct_data;
++ this->ecc.mode = NAND_ECC_HW;
++ this->ecc.size = 512;
++ this->ecc.bytes = 9;
++ nfc_write_reg(mxc_nand_data,
++ (nfc_read_reg(mxc_nand_data, REG_NFC_ECC_EN) | NFC_ECC_EN),
++ REG_NFC_ECC_EN);
++ } else {
++ this->ecc.mode = NAND_ECC_SOFT;
++ nfc_write_reg(mxc_nand_data,
++ (nfc_read_reg(mxc_nand_data, REG_NFC_ECC_EN) & ~NFC_ECC_EN),
++ REG_NFC_ECC_EN);
++ }
++
++ DBG(0, "%s: Scanning for NAND devices\n", __FUNCTION__);
++ err = nand_scan_tail(mtd);
++ if (err) {
++ goto out9;
++ }
++
++ printk(KERN_INFO "MXC NAND V2 driver %d bit bus width %s ECC with %u/%u byte\n",
++ pdata->width * 8, hardware_ecc ? "HW" : "SW",
++ this->ecc.bytes, this->ecc.size);
++
++ /* Register the partitions */
++#ifdef CONFIG_MTD_PARTITIONS
++ nr_parts =
++ parse_mtd_partitions(mtd, part_probes, &mxc_nand_data->parts, 0);
++ if (nr_parts > 0)
++ add_mtd_partitions(mtd, mxc_nand_data->parts, nr_parts);
++ else if (pdata->parts)
++ add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
++ else
++#endif
++ {
++ pr_info("Registering %s as whole device\n", mtd->name);
++ add_mtd_device(mtd);
++ }
++
++ platform_set_drvdata(pdev, mtd);
++ return 0;
++
++ out9:
++ if (pdata->exit)
++ pdata->exit();
++ out8:
++ free_irq(mxc_nand_data->irq, mxc_nand_data);
++ out7:
++ clk_disable(clk);
++ clk_put(clk);
++ out6:
++ mxc_free_buf(mxc_nand_data);
++ out5:
++ if (mxc_nand_data->axi_base)
++ iounmap(mxc_nand_data->axi_base);
++ out4:
++ if (mxc_nand_data->res_axi)
++ release_mem_region(mxc_nand_data->res_axi->start,
++ resource_size(mxc_nand_data->res_axi));
++ out3:
++ iounmap(mxc_nand_data->reg_base);
++ out2:
++ release_mem_region(mxc_nand_data->res_ip->start,
++ resource_size(mxc_nand_data->res_ip));
++ out1:
++ mxc_free_buf(mxc_nand_data);
++ out:
++ kfree(mxc_nand_data);
++ return err;
++}
++
++ /*!
++ * Dissociates the driver from the device.
++ *
++ * @param pdev the device structure used to give information on which
++ *
++ * @return The function always returns 0.
++ */
++
++static int __exit mxcnd_remove(struct platform_device *pdev)
++{
++ struct mtd_info *mtd = platform_get_drvdata(pdev);
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++ struct flash_platform_data *pdata = pdev->dev.platform_data;
++
++ if (pdata->exit)
++ pdata->exit();
++
++ nand_release(mtd);
++
++ free_irq(mxc_nand_data->irq, mxc_nand_data);
++ clk_disable(mxc_nand_data->clk);
++ clk_put(mxc_nand_data->clk);
++
++ iounmap(mxc_nand_data->reg_base);
++ release_mem_region(mxc_nand_data->res_ip->start,
++ resource_size(mxc_nand_data->res_ip));
++ if (mxc_nand_data->res_axi) {
++ iounmap(mxc_nand_data->axi_base);
++ release_mem_region(mxc_nand_data->res_axi->start,
++ resource_size(mxc_nand_data->res_axi));
++ }
++ mxc_free_buf(mxc_nand_data);
++ kfree(mxc_nand_data);
++ return 0;
++}
++
++#ifdef CONFIG_PM
++/*!
++ * This function is called to put the NAND in a low power state. Refer to the
++ * document driver-model/driver.txt in the kernel source tree for more
++ * information.
++ *
++ * @param pdev the device information structure
++ *
++ * @param state the power state the device is entering
++ *
++ * @return The function returns 0 on success and a negative errno value on failure
++ */
++
++static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ int ret;
++ struct mtd_info *mtd = platform_get_drvdata(pdev);
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++
++ DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND2 : NAND suspend\n");
++ ret = mtd->suspend(mtd);
++ if (ret == 0) {
++ /* Disable the NFC clock */
++ clk_disable(mxc_nand_data->clk);
++ }
++ return ret;
++}
++
++/*!
++ * This function is called to bring the NAND back from a low power state. Refer
++ * to the document driver-model/driver.txt in the kernel source tree for more
++ * information.
++ *
++ * @param pdev the device information structure
++ *
++ * @return The function returns 0 on success and a negative errno value on failure
++ */
++static int mxcnd_resume(struct platform_device *pdev)
++{
++ struct mtd_info *mtd = platform_get_drvdata(pdev);
++ struct nand_chip *nand_chip = mtd->priv;
++ struct mxc_mtd_s *mxc_nand_data = nand_chip->priv;
++ int ret = 0;
++
++ DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND2 : NAND resume\n");
++ /* Enable the NFC clock */
++ clk_enable(mxc_nand_data->clk);
++
++ mtd->resume(mtd);
++
++ return ret;
++}
++
++#else
++#define mxcnd_suspend NULL
++#define mxcnd_resume NULL
++#endif /* CONFIG_PM */
++
++/*!
++ * This structure contains pointers to the power management callback functions.
++ */
++static struct platform_driver mxcnd_driver = {
++ .driver = {
++ .name = DRV_NAME,
++ },
++ .probe = mxcnd_probe,
++ .remove = __exit_p(mxcnd_remove),
++ .suspend = mxcnd_suspend,
++ .resume = mxcnd_resume,
++};
++
++/*!
++ * Main initialization routine
++ * @return 0 if successful; non-zero otherwise
++ */
++static int __init mxc_nd_init(void)
++{
++ int ret;
++
++ /* Register the device driver structure. */
++ ret = platform_driver_register(&mxcnd_driver);
++ if (ret != 0) {
++ printk(KERN_ERR "Driver register failed for mxcnd_driver\n");
++ }
++ return ret;
++}
++
++/*!
++ * Clean up routine
++ */
++static void __exit mxc_nd_cleanup(void)
++{
++ /* Unregister the device structure */
++ platform_driver_unregister(&mxcnd_driver);
++}
++
++module_init(mxc_nd_init);
++module_exit(mxc_nd_cleanup);
++
++MODULE_AUTHOR("Freescale Semiconductor, Inc.");
++MODULE_DESCRIPTION("MXC NAND MTD driver Version 2-5");
++MODULE_LICENSE("GPL");
+diff -urNp linux-2.6.30-rc4/drivers/mtd/nand/mxc_nd2.h linux-2.6.30-rc4-karo/drivers/mtd/nand/mxc_nd2.h
+--- linux-2.6.30-rc4/drivers/mtd/nand/mxc_nd2.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/drivers/mtd/nand/mxc_nd2.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,699 @@
++/*
++ * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
++
++/*
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/*!
++ * @file mxc_nd2.h
++ *
++ * @brief This file contains the NAND Flash Controller register information.
++ *
++ *
++ * @ingroup NAND_MTD
++ */
++
++#ifndef __MXC_ND2_H__
++#define __MXC_ND2_H__
++
++#include <mach/hardware.h>
++
++#define IS_2K_PAGE_NAND ((mtd->writesize / num_of_interleave) \
++ == NAND_PAGESIZE_2KB)
++#define IS_4K_PAGE_NAND ((mtd->writesize / num_of_interleave) \
++ == NAND_PAGESIZE_4KB)
++#define IS_LARGE_PAGE_NAND ((mtd->writesize / num_of_interleave) > 512)
++
++#define GET_NAND_OOB_SIZE (mtd->oobsize / num_of_interleave)
++
++#define NAND_PAGESIZE_2KB 2048
++#define NAND_PAGESIZE_4KB 4096
++
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V3
++/*
++ * For V3 NFC registers Definition
++ */
++/* AXI Bus Mapped */
++#define NFC_AXI_BASE_ADDR NFC_BASE_ADDR_AXI
++
++#if defined(CONFIG_ARCH_MXC_HAS_NFC_V3_1) /* mx37 */
++#define MXC_INT_NANDFC MXC_INT_EMI
++#define NFC_FLASH_ADDR_CMD (nfc_axi_base + 0x1E00)
++#define NFC_CONFIG1 (nfc_axi_base + 0x1E04)
++#define NFC_ECC_STATUS_RESULT (nfc_axi_base + 0x1E08)
++#define LAUNCH_NFC (nfc_axi_base + 0x1E0c)
++#define NFC_WRPROT 0x00
++#define NFC_WRPROT_UNLOCK_BLK_ADD0 0x04
++#define NFC_CONFIG2 0x14
++#define NFC_IPC 0x18
++#elif defined(CONFIG_ARCH_MXC_HAS_NFC_V3_2) /* mx51 */
++#define MXC_INT_NANDFC MXC_INT_NFC
++#define NFC_AUTO_MODE_ENABLE
++#define NFC_FLASH_CMD (nfc_axi_base + 0x1E00)
++#define NFC_FLASH_ADDR0 (nfc_axi_base + 0x1E04)
++#define NFC_FLASH_ADDR8 (nfc_axi_base + 0x1E24)
++#define NFC_CONFIG1 (nfc_axi_base + 0x1E34)
++#define NFC_ECC_STATUS_RESULT (nfc_axi_base + 0x1E38)
++#define NFC_ECC_STATUS_SUM (nfc_axi_base + 0x1E3C)
++#define LAUNCH_NFC (nfc_axi_base + 0x1E40)
++#define NFC_WRPROT 0x00
++#define NFC_WRPROT_UNLOCK_BLK_ADD0 0x04
++#define NFC_CONFIG2 0x24
++#define NFC_CONFIG3 0x28
++#define NFC_IPC 0x2C
++#else /* skye */
++#define NFC_FLASH_ADDR_CMD (nfc_axi_base + 0xE00)
++#define NFC_CONFIG1 (nfc_axi_base + 0xE04)
++#define NFC_ECC_STATUS_RESULT (nfc_axi_base + 0xE08)
++#define LAUNCH_NFC (nfc_axi_base + 0xE0C)
++#define NFC_WRPROT 0x00
++#define NFC_WRPROT_UNLOCK_BLK_ADD0 0x04
++#define NFC_CONFIG2 0x14
++#define NFC_IPC 0x18
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_1 */
++/*!
++ * Addresses for NFC RAM BUFFER Main area 0
++ */
++#define MAIN_AREA0 ((u16 *)(nfc_axi_base + 0x000))
++#define MAIN_AREA1 ((u16 *)(nfc_axi_base + 0x200))
++
++/*!
++ * Addresses for NFC SPARE BUFFER Spare area 0
++ */
++#if defined(CONFIG_ARCH_MXC_HAS_NFC_V3_1) || \
++ defined(CONFIG_ARCH_MXC_HAS_NFC_V3_2)
++#define SPARE_AREA0 ((u16 *)(nfc_axi_base + 0x1000))
++#define SPARE_LEN 64
++#define SPARE_COUNT 8
++#define SPARE_SIZE (SPARE_LEN * SPARE_COUNT)
++#else
++#define SPARE_AREA0 ((u16 *)(nfc_axi_base + 0x800))
++#define SPARE_LEN 16
++#define SPARE_COUNT 4
++#define SPARE_SIZE (SPARE_LEN * SPARE_COUNT)
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_1 */
++
++#if defined(CONFIG_ARCH_MXC_HAS_NFC_V3_1) || \
++ defined(CONFIG_ARCH_MXC_HAS_NFC_V3_2)
++#define NFC_SPAS_WIDTH 8
++#define NFC_SPAS_SHIFT 16
++
++#define IS_4BIT_ECC \
++( \
++ cpu_is_mx51_rev(CHIP_REV_2_0) == 1 ? \
++ !((raw_read(NFC_CONFIG2) & NFC_ECC_MODE_4) >> 6) : \
++ ((raw_read(NFC_CONFIG2) & NFC_ECC_MODE_4) >> 6) \
++)
++
++#define NFC_SET_SPAS(v) \
++ raw_write((((raw_read(NFC_CONFIG2) & \
++ NFC_FIELD_RESET(NFC_SPAS_WIDTH, NFC_SPAS_SHIFT)) | ((v) << 16))), \
++ NFC_CONFIG2)
++
++#define NFC_SET_ECC_MODE(v) \
++do { \
++ if (cpu_is_mx51_rev(CHIP_REV_2_0) == 1) { \
++ if ((v) == NFC_SPAS_218 || (v) == NFC_SPAS_112) \
++ raw_write(((raw_read(NFC_CONFIG2) & \
++ NFC_ECC_MODE_MASK) | \
++ NFC_ECC_MODE_4), NFC_CONFIG2); \
++ else \
++ raw_write(((raw_read(NFC_CONFIG2) & \
++ NFC_ECC_MODE_MASK) & \
++ ~NFC_ECC_MODE_4), NFC_CONFIG2); \
++ } else { \
++ if ((v) == NFC_SPAS_218 || (v) == NFC_SPAS_112) \
++ raw_write(((raw_read(NFC_CONFIG2) & \
++ NFC_ECC_MODE_MASK) & \
++ ~NFC_ECC_MODE_4), NFC_CONFIG2); \
++ else \
++ raw_write(((raw_read(NFC_CONFIG2) & \
++ NFC_ECC_MODE_MASK) | \
++ NFC_ECC_MODE_4), NFC_CONFIG2); \
++ } \
++} while (0)
++
++#define WRITE_NFC_IP_REG(val,reg) \
++ do { \
++ nfc_write_reg(mxc_nand_data, NFC_IPC_CREQ, NFC_IPC); \
++ while (!(nfc_read_reg(mxc_nand_data, NFC_IPC) & NFC_IPC_ACK)); \
++ nfc_write_reg(mxc_nand_data, val, reg); \
++ nfc_write_reg(mxc_nand_data, 0, NFC_IPC); \
++ } while(0)
++#else
++#define IS_4BIT_ECC 1
++#define NFC_SET_SPAS(v)
++#define NFC_SET_ECC_MODE(v)
++#define NFC_SET_NFMS(v) (NFMS |= (v))
++
++#define WRITE_NFC_IP_REG(val,reg) \
++ nfc_write_reg(mxc_nand_data, val, REG_NFC_OPS_STAT)
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_1 */
++
++#define GET_NFC_ECC_STATUS() nfc_read_reg(mxc_nand_data, REG_NFC_ECC_STATUS_RESULT);
++
++/*!
++ * Set 1 to specific operation bit, rest to 0 in LAUNCH_NFC Register for
++ * Specific operation
++ */
++#define NFC_CMD 0x1
++#define NFC_ADDR 0x2
++#define NFC_INPUT 0x4
++#define NFC_OUTPUT 0x8
++#define NFC_ID 0x10
++#define NFC_STATUS 0x20
++
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V3_2 /* mx51 */
++#define NFC_AUTO_PROG 0x40
++#define NFC_AUTO_READ 0x80
++#define NFC_AUTO_ERASE 0x200
++#define NFC_COPY_BACK_0 0x400
++#define NFC_COPY_BACK_1 0x800
++#define NFC_AUTO_STATE 0x1000
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_2 */
++
++/* Bit Definitions for NFC_IPC*/
++#define NFC_OPS_STAT (1 << 31)
++
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V3_2 /* mx51 */
++#define NFC_OP_DONE (1 << 30)
++#define NFC_RB (1 << 28)
++#define NFC_PS_WIDTH 2
++#define NFC_PS_SHIFT 0
++#define NFC_PS_512 0
++#define NFC_PS_2K 1
++#define NFC_PS_4K 2
++#else
++#define NFC_RB (1 << 29)
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_2 */
++
++#define NFC_ONE_CYCLE (1 << 2)
++
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V3_2 /* mx51 */
++#define NFC_INT_MSK (1 << 15)
++#define NFC_AUTO_PROG_DONE_MSK (1 << 14)
++#define NFC_NUM_ADDR_PHASE1_WIDTH 2
++#define NFC_NUM_ADDR_PHASE1_SHIFT 12
++
++#define NFC_NUM_ADDR_PHASE0_WIDTH 1
++#define NFC_NUM_ADDR_PHASE0_SHIFT 5
++
++#define NFC_ONE_LESS_PHASE1 0
++#define NFC_TWO_LESS_PHASE1 1
++
++#define NFC_FLASH_ADDR_SHIFT 0
++#else
++#define NFC_INT_MSK (1 << 4)
++#define NFC_BIG (1 << 5)
++#define NFC_FLASH_ADDR_SHIFT 16
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_2 */
++
++#define NFC_UNLOCK_END_ADDR_SHIFT 16
++
++/* Bit definition for NFC_CONFIGRATION_1 */
++#define NFC_SP_EN (1 << 0)
++#define NFC_CE (1 << 1)
++#define NFC_RST (1 << 2)
++#define NFC_ECC_EN (1 << 3)
++
++#define NFC_FIELD_RESET(width, shift) ~(((1 << (width)) - 1) << (shift))
++
++#define NFC_RBA_SHIFT 4
++
++#if defined(CONFIG_ARCH_MXC_HAS_NFC_V3_1) || \
++ defined(CONFIG_ARCH_MXC_HAS_NFC_V3_2) /* mx51 */
++#define NFC_RBA_WIDTH 3
++#else
++#define NFC_RBA_WIDTH 2
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_1 */
++
++#if defined(CONFIG_ARCH_MXC_HAS_NFC_V3_2) /* mx51 */
++#define NFC_ITERATION_SHIFT 8
++#define NFC_ITERATION_WIDTH 4
++#define NFC_ACTIVE_CS_SHIFT 12
++#define NFC_ACTIVE_CS_WIDTH 3
++/* bit definition for CONFIGRATION3 */
++#define NFC_NO_SDMA (1 << 20)
++#define NFC_FMP_SHIFT 16
++#define NFC_FMP_WIDTH 4
++#define NFC_RBB_MODE (1 << 15)
++#define NFC_NUM_OF_DEVICES_SHIFT 12
++#define NFC_NUM_OF_DEVICES_WIDTH 4
++#define NFC_DMA_MODE_SHIFT 11
++#define NFC_DMA_MODE_WIDTH 1
++#define NFC_SBB_SHIFT 8
++#define NFC_SBB_WIDTH 3
++#define NFC_BIG (1 << 7)
++#define NFC_SB2R_SHIFT 4
++#define NFC_SB2R_WIDTH 3
++#define NFC_FW_SHIFT 3
++#define NFC_FW_WIDTH 1
++#define NFC_TOO (1 << 2)
++#define NFC_ADD_OP_SHIFT 0
++#define NFC_ADD_OP_WIDTH 2
++#define NFC_FW_8 1
++#define NFC_FW_16 0
++#define NFC_ST_CMD_SHITF 24
++#define NFC_ST_CMD_WIDTH 8
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_2 */
++
++#define NFC_PPB_32 (0 << 7)
++#define NFC_PPB_64 (1 << 7)
++#define NFC_PPB_128 (2 << 7)
++#define NFC_PPB_256 (3 << 7)
++#define NFC_PPB_RESET ~(3 << 7)
++
++#define NFC_BLS_LOCKED (0 << 16)
++#define NFC_BLS_LOCKED_DEFAULT (1 << 16)
++#define NFC_BLS_UNLOCKED (2 << 16)
++#define NFC_BLS_RESET ~(3 << 16)
++#define NFC_WPC_LOCK_TIGHT 1
++#define NFC_WPC_LOCK (1 << 1)
++#define NFC_WPC_UNLOCK (1 << 2)
++#define NFC_WPC_RESET ~7
++#if defined(CONFIG_ARCH_MXC_HAS_NFC_V3_1) || \
++ defined(CONFIG_ARCH_MXC_HAS_NFC_V3_2)
++#define NFC_ECC_MODE_4 (1 << 6)
++#define NFC_ECC_MODE_MASK ~(1 << 6)
++#define NFC_SPAS_16 8
++#define NFC_SPAS_64 32
++#define NFC_SPAS_128 64
++#define NFC_SPAS_112 56
++#define NFC_SPAS_218 109
++#define NFC_IPC_CREQ (1 << 0)
++#define NFC_IPC_ACK (1 << 1)
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_1 */
++
++#define REG_NFC_OPS_STAT NFC_IPC
++#define REG_NFC_INTERRUPT NFC_CONFIG2
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V3_2
++#define REG_NFC_FLASH_ADDR NFC_FLASH_ADDR0
++#define REG_NFC_FLASH_CMD NFC_FLASH_CMD
++#else
++#define REG_NFC_FLASH_ADDR NFC_FLASH_ADDR_CMD
++#define REG_NFC_FLASH_CMD NFC_FLASH_ADDR_CMD
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_2 */
++#define REG_NFC_OPS LAUNCH_NFC
++#define REG_NFC_SET_RBA NFC_CONFIG1
++#define REG_NFC_RB NFC_IPC
++#define REG_NFC_ECC_EN NFC_CONFIG2
++#define REG_NFC_ECC_STATUS_RESULT NFC_ECC_STATUS_RESULT
++#define REG_NFC_CE NFC_CONFIG1
++#define REG_NFC_RST NFC_CONFIG1
++#define REG_NFC_PPB NFC_CONFIG2
++#define REG_NFC_SP_EN NFC_CONFIG1
++#define REG_NFC_BLS NFC_WRPROT
++#define REG_UNLOCK_BLK_ADD0 NFC_WRPROT_UNLOCK_BLK_ADD0
++#define REG_UNLOCK_BLK_ADD1 NFC_WRPROT_UNLOCK_BLK_ADD1
++#define REG_UNLOCK_BLK_ADD2 NFC_WRPROT_UNLOCK_BLK_ADD2
++#define REG_UNLOCK_BLK_ADD3 NFC_WRPROT_UNLOCK_BLK_ADD3
++#define REG_NFC_WPC NFC_WRPROT
++#define REG_NFC_ONE_CYCLE NFC_CONFIG2
++
++/* NFC V3 Specific MACRO function definitions */
++#define raw_write(v,a) __raw_writel(v,a)
++#define raw_read(a) __raw_readl(a)
++
++/* Explicitly ack ops status (if any), before issuing any command */
++#define ACK_OPS \
++ nfc_write_reg(mxc_nand_data, \
++ (nfc_read_reg(mxc_nand_data, REG_NFC_OPS_STAT) & ~NFC_OPS_STAT), \
++ REG_NFC_OPS_STAT)
++
++/* Set RBA buffer id*/
++#define NFC_SET_RBA(val) \
++ nfc_write_reg(mxc_nand_data, \
++ (nfc_read_reg(mxc_nand_data, REG_NFC_SET_RBA) & \
++ (NFC_FIELD_RESET(NFC_RBA_WIDTH, NFC_RBA_SHIFT))) | \
++ ((val) << NFC_RBA_SHIFT), REG_NFC_SET_RBA)
++
++#define NFC_SET_PS(val) \
++ nfc_write_reg(mxc_nand_data, \
++ (nfc_read_reg(mxc_nand_data, NFC_CONFIG2) & \
++ (NFC_FIELD_RESET(NFC_PS_WIDTH, NFC_PS_SHIFT))) | \
++ ((val) << NFC_PS_SHIFT), NFC_CONFIG2)
++
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V3_2
++#define UNLOCK_ADDR(start_addr,end_addr) \
++{ \
++ int i = 0; \
++ for (; i < NAND_MAX_CHIPS; i++) \
++ nfc_write_reg(mxc_nand_data, start_addr | \
++ (end_addr << NFC_UNLOCK_END_ADDR_SHIFT), \
++ REG_UNLOCK_BLK_ADD0 + (i << 2)); \
++}
++
++#define NFC_SET_NFC_ACTIVE_CS(val) \
++ nfc_write_reg(mxc_nand_data, (nfc_read_reg(mxc_nand_data, NFC_CONFIG1) & \
++ (NFC_FIELD_RESET(NFC_ACTIVE_CS_WIDTH, NFC_ACTIVE_CS_SHIFT))) | \
++ ((val) << NFC_ACTIVE_CS_SHIFT), NFC_CONFIG1)
++
++#define NFC_GET_MAXCHIP_SP() 8
++
++#else
++#define UNLOCK_ADDR(start_addr,end_addr) \
++ nfc_write_reg(mxc_nand_data, start_addr | \
++ (end_addr << NFC_UNLOCK_END_ADDR_SHIFT), REG_UNLOCK_BLK_ADD0)
++
++#define NFC_SET_NFC_ACTIVE_CS(val)
++#define NFC_GET_MAXCHIP_SP() 1
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_2 */
++
++#define NFC_SET_BLS(val) ((nfc_read_reg(mxc_nand_data, REG_NFC_BLS) & NFC_BLS_RESET) | val)
++#define NFC_SET_WPC(val) ((nfc_read_reg(mxc_nand_data, REG_NFC_WPC) & NFC_WPC_RESET) | val)
++#define CHECK_NFC_RB nfc_read_reg(mxc_nand_data, REG_NFC_RB) & NFC_RB
++
++#if defined(CONFIG_ARCH_MXC_HAS_NFC_V3_2)
++#define NFC_SET_NFC_NUM_ADDR_PHASE1(val) \
++ nfc_write_reg(mxc_nand_data, (nfc_read_reg(mxc_nand_data, NFC_CONFIG2) & \
++ (NFC_FIELD_RESET(NFC_NUM_ADDR_PHASE1_WIDTH, \
++ NFC_NUM_ADDR_PHASE1_SHIFT))) | \
++ ((val) << NFC_NUM_ADDR_PHASE1_SHIFT), NFC_CONFIG2);
++
++#define NFC_SET_NFC_NUM_ADDR_PHASE0(val) \
++ nfc_write_reg(mxc_nand_data, (nfc_read_reg(mxc_nand_data, NFC_CONFIG2) & \
++ (NFC_FIELD_RESET(NFC_NUM_ADDR_PHASE0_WIDTH, \
++ NFC_NUM_ADDR_PHASE0_SHIFT))) | \
++ ((val) << NFC_NUM_ADDR_PHASE0_SHIFT), NFC_CONFIG2);
++
++#define NFC_SET_NFC_ITERATION(val) \
++ nfc_write_reg(mxc_nand_data, (nfc_read_reg(mxc_nand_data, NFC_CONFIG1) & \
++ (NFC_FIELD_RESET(NFC_ITERATION_WIDTH, NFC_ITERATION_SHIFT))) | \
++ ((val) << NFC_ITERATION_SHIFT), NFC_CONFIG1);
++
++#define NFC_SET_FW(val) \
++ nfc_write_reg(mxc_nand_data, (nfc_read_reg(mxc_nand_data, NFC_CONFIG3) & \
++ (NFC_FIELD_RESET(NFC_FW_WIDTH, NFC_FW_SHIFT))) | \
++ ((val) << NFC_FW_SHIFT), NFC_CONFIG3);
++
++#define NFC_SET_NUM_OF_DEVICE(val) \
++ nfc_write_reg(mxc_nand_data, (nfc_read_reg(mxc_nand_data, NFC_CONFIG3) & \
++ (NFC_FIELD_RESET(NFC_NUM_OF_DEVICES_WIDTH, \
++ NFC_NUM_OF_DEVICES_SHIFT))) | \
++ ((val) << NFC_NUM_OF_DEVICES_SHIFT), NFC_CONFIG3);
++
++#define NFC_SET_ADD_OP_MODE(val) \
++ nfc_write_reg(mxc_nand_data, (nfc_read_reg(mxc_nand_data, NFC_CONFIG3) & \
++ (NFC_FIELD_RESET(NFC_ADD_OP_WIDTH, NFC_ADD_OP_SHIFT))) | \
++ ((val) << NFC_ADD_OP_SHIFT), NFC_CONFIG3);
++
++#define NFC_SET_ADD_CS_MODE(val) \
++{ \
++ NFC_SET_ADD_OP_MODE(val); \
++ NFC_SET_NUM_OF_DEVICE(this->numchips - 1); \
++}
++
++#define NFC_SET_ST_CMD(val) \
++ nfc_write_reg((raw_read(NFC_CONFIG2) & \
++ (NFC_FIELD_RESET(NFC_ST_CMD_WIDTH, \
++ NFC_ST_CMD_SHITF))) | \
++ ((val) << NFC_ST_CMD_SHITF), NFC_CONFIG2);
++
++#define NFMS_NF_DWIDTH 0
++#define NFMS_NF_PG_SZ 1
++#define NFC_CMD_1_SHIFT 8
++
++#define NUM_OF_ADDR_CYCLE (fls(g_page_mask) >> 3)
++
++/*should set the fw,ps,spas,ppb*/
++#define NFC_SET_NFMS(v) \
++do { \
++ NFC_SET_FW(NFC_FW_8); \
++ if (((v) & (1 << NFMS_NF_DWIDTH))) \
++ NFC_SET_FW(NFC_FW_16); \
++ if (((v) & (1 << NFMS_NF_PG_SZ))) { \
++ if (IS_2K_PAGE_NAND) { \
++ NFC_SET_PS(NFC_PS_2K); \
++ NFC_SET_NFC_NUM_ADDR_PHASE1(NUM_OF_ADDR_CYCLE); \
++ NFC_SET_NFC_NUM_ADDR_PHASE0(NFC_TWO_LESS_PHASE1); \
++ } else if (IS_4K_PAGE_NAND) { \
++ NFC_SET_PS(NFC_PS_4K); \
++ NFC_SET_NFC_NUM_ADDR_PHASE1(NUM_OF_ADDR_CYCLE); \
++ NFC_SET_NFC_NUM_ADDR_PHASE0(NFC_TWO_LESS_PHASE1); \
++ } else { \
++ NFC_SET_PS(NFC_PS_512); \
++ NFC_SET_NFC_NUM_ADDR_PHASE1(NUM_OF_ADDR_CYCLE - 1); \
++ NFC_SET_NFC_NUM_ADDR_PHASE0(NFC_ONE_LESS_PHASE1); \
++ } \
++ NFC_SET_ADD_CS_MODE(1); \
++ NFC_SET_SPAS(GET_NAND_OOB_SIZE >> 1); \
++ NFC_SET_ECC_MODE(GET_NAND_OOB_SIZE >> 1); \
++ NFC_SET_ST_CMD(0x70); \
++ nfc_write_reg(raw_read(NFC_CONFIG3) | 1 << 20, NFC_CONFIG3); \
++ } \
++} while (0)
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_2 */
++
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V3_1
++#define NFC_SET_NFMS(v)
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3_1 */
++
++#define READ_PAGE(c) send_read_page(c,0)
++#define PROG_PAGE(c) send_prog_page(c,0)
++
++#elif CONFIG_ARCH_MXC_HAS_NFC_V2
++
++/*
++ * For V1/V2 NFC registers Definition
++ */
++
++#define NFC_AXI_BASE_ADDR 0x00
++/*
++ * Addresses for NFC registers
++ */
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V2_1
++#define NFC_REG_BASE 0x1000
++#else
++#define NFC_REG_BASE 0x0000
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V2_1 */
++#define NFC_BUF_SIZE (NFC_REG_BASE + 0xE00)
++#define NFC_BUF_ADDR (NFC_REG_BASE + 0xE04)
++#define NFC_FLASH_ADDR (NFC_REG_BASE + 0xE06)
++#define NFC_FLASH_CMD (NFC_REG_BASE + 0xE08)
++#define NFC_CONFIG (NFC_REG_BASE + 0xE0A)
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V2_1
++#define NFC_ECC_STATUS_RESULT (NFC_REG_BASE + 0xE0C)
++#define NFC_ECC_STATUS_RESULT_1 (NFC_REG_BASE + 0xE0C)
++#define NFC_ECC_STATUS_RESULT_2 (NFC_REG_BASE + 0xE0E)
++#define NFC_SPAS (NFC_REG_BASE + 0xE10)
++#else
++#define NFC_ECC_STATUS_RESULT (NFC_REG_BASE + 0xE0C)
++#define NFC_RSLTMAIN_AREA (NFC_REG_BASE + 0xE0E)
++#define NFC_RSLTSPARE_AREA (NFC_REG_BASE + 0xE10)
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V2_1 */
++#define NFC_WRPROT (NFC_REG_BASE + 0xE12)
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V2_1
++#define NFC_UNLOCKSTART_BLKADDR (NFC_REG_BASE + 0xE20)
++#define NFC_UNLOCKEND_BLKADDR (NFC_REG_BASE + 0xE22)
++#define NFC_UNLOCKSTART_BLKADDR1 (NFC_REG_BASE + 0xE24)
++#define NFC_UNLOCKEND_BLKADDR1 (NFC_REG_BASE + 0xE26)
++#define NFC_UNLOCKSTART_BLKADDR2 (NFC_REG_BASE + 0xE28)
++#define NFC_UNLOCKEND_BLKADDR2 (NFC_REG_BASE + 0xE2A)
++#define NFC_UNLOCKSTART_BLKADDR3 (NFC_REG_BASE + 0xE2C)
++#define NFC_UNLOCKEND_BLKADDR3 (NFC_REG_BASE + 0xE2E)
++#else
++#define NFC_UNLOCKSTART_BLKADDR (NFC_REG_BASE + 0xE14)
++#define NFC_UNLOCKEND_BLKADDR (NFC_REG_BASE + 0xE16)
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V2_1 */
++#define NFC_NF_WRPRST (NFC_REG_BASE + 0xE18)
++#define NFC_CONFIG1 (NFC_REG_BASE + 0xE1A)
++#define NFC_CONFIG2 (NFC_REG_BASE + 0xE1C)
++
++/*!
++ * Addresses for NFC RAM BUFFER Main area 0
++ */
++#define MAIN_AREA0 0x000
++#define MAIN_AREA1 0x200
++
++/*!
++ * Addresses for NFC SPARE BUFFER Spare area 0
++ */
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V2_1
++#define SPARE_AREA0 0x1000
++#define SPARE_LEN 64
++#define SPARE_COUNT 8
++#else
++#define SPARE_AREA0 0x800
++#define SPARE_LEN 16
++#define SPARE_COUNT 4
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V2_1 */
++#define SPARE_SIZE (SPARE_LEN * SPARE_COUNT)
++
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V2_1
++#define REG_NFC_ECC_MODE NFC_CONFIG1
++#define SPAS_SHIFT 0
++#define REG_NFC_SPAS NFC_SPAS
++#define SPAS_MASK 0xFF00
++#define IS_4BIT_ECC \
++ (!!(nfc_read_reg(mxc_nand_data, REG_NFC_ECC_MODE) & NFC_ECC_MODE_4))
++
++#define NFC_SET_SPAS(v) \
++ nfc_write_reg(mxc_nand_data, \
++ ((nfc_read_reg(mxc_nand_data, REG_NFC_SPAS) & SPAS_MASK) | \
++ (((v) << SPAS_SHIFT))), \
++ REG_NFC_SPAS)
++
++#define NFC_SET_ECC_MODE(v) \
++do { \
++ if ((v) == NFC_SPAS_218) { \
++ nfc_write_reg(mxc_nand_data, \
++ (nfc_read_reg(mxc_nand_data, REG_NFC_ECC_MODE) & ~NFC_ECC_MODE_4),\
++ REG_NFC_ECC_MODE); \
++ } else { \
++ nfc_write_reg(mxc_nand_data, \
++ (nfc_read_reg(mxc_nand_data, REG_NFC_ECC_MODE) | NFC_ECC_MODE_4), \
++ REG_NFC_ECC_MODE); \
++ } \
++} while (0)
++
++#define NFC_SET_NFMS(v) \
++do { \
++ DBG(0, "Setting NFMS[%p:%08lx] to %08x | %08x\n", NFMS_REG, \
++ MXC_PHYS_ADDRESS(NFMS_REG), __raw_readl(NFMS_REG), v); \
++ __raw_writel(__raw_readl(NFMS_REG) | (v), NFMS_REG); \
++ if (((v) & (1 << NFMS_NF_PG_SZ))) { \
++ NFC_SET_SPAS(GET_NAND_OOB_SIZE >> 1); \
++ NFC_SET_ECC_MODE(GET_NAND_OOB_SIZE >> 1); \
++ } \
++} while (0)
++#else
++#define IS_4BIT_ECC 1
++#define NFC_SET_SPAS(v)
++#define NFC_SET_ECC_MODE(v)
++#define NFC_SET_NFMS(v) (NFMS |= (v))
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V2_1 */
++
++#define WRITE_NFC_IP_REG(val,reg) \
++ nfc_write_reg(mxc_nand_data, val, REG_NFC_OPS_STAT)
++
++#define GET_NFC_ECC_STATUS() nfc_read_reg(mxc_nand_data, REG_NFC_ECC_STATUS_RESULT)
++
++/*!
++ * Set INT to 0, Set 1 to specific operation bit, rest to 0 in NFC_CONFIG2 Register for
++ * Specific operation
++ */
++#define NFC_CMD 0x1
++#define NFC_ADDR 0x2
++#define NFC_INPUT 0x4
++#define NFC_OUTPUT 0x8
++#define NFC_ID 0x10
++#define NFC_STATUS 0x20
++
++/* Bit Definitions */
++#define NFC_OPS_STAT (1 << 15)
++#define NFC_SP_EN (1 << 2)
++#define NFC_ECC_EN (1 << 3)
++#define NFC_INT_MSK (1 << 4)
++#define NFC_BIG (1 << 5)
++#define NFC_RST (1 << 6)
++#define NFC_CE (1 << 7)
++#define NFC_ONE_CYCLE (1 << 8)
++#define NFC_BLS_LOCKED 0
++#define NFC_BLS_LOCKED_DEFAULT 1
++#define NFC_BLS_UNLOCKED 2
++#define NFC_WPC_LOCK_TIGHT (1 << 0)
++#define NFC_WPC_LOCK (1 << 1)
++#define NFC_WPC_UNLOCK (1 << 2)
++#define NFC_FLASH_ADDR_SHIFT 0
++#define NFC_UNLOCK_END_ADDR_SHIFT 0
++
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V2_1
++#define NFC_ECC_MODE_4 (1 << 0)
++#define NFC_SPAS_16 8
++#define NFC_SPAS_64 32
++#define NFC_SPAS_112 56
++#define NFC_SPAS_128 64
++#define NFC_SPAS_218 109
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V2_1 */
++/* NFC Register Mapping */
++#define REG_NFC_OPS_STAT NFC_CONFIG2
++#define REG_NFC_INTERRUPT NFC_CONFIG1
++#define REG_NFC_FLASH_ADDR NFC_FLASH_ADDR
++#define REG_NFC_FLASH_CMD NFC_FLASH_CMD
++#define REG_NFC_OPS NFC_CONFIG2
++#define REG_NFC_SET_RBA NFC_BUF_ADDR
++#define REG_NFC_ECC_EN NFC_CONFIG1
++#define REG_NFC_ECC_STATUS_RESULT NFC_ECC_STATUS_RESULT
++#define REG_NFC_CE NFC_CONFIG1
++#define REG_NFC_SP_EN NFC_CONFIG1
++#define REG_NFC_BLS NFC_CONFIG
++#define REG_NFC_WPC NFC_WRPROT
++#define REG_START_BLKADDR NFC_UNLOCKSTART_BLKADDR
++#define REG_END_BLKADDR NFC_UNLOCKEND_BLKADDR
++#define REG_NFC_RST NFC_CONFIG1
++#define REG_NFC_ONE_CYCLE NFC_CONFIG1
++
++/* NFC V1/V2 Specific MACRO functions definitions */
++
++#if defined(CONFIG_MTD_DEBUG)
++#define nfc_write_reg(c, v, r) __nfc_reg_write(v, (c)->reg_base + r, #r, __FUNCTION__)
++static inline void __nfc_reg_write(u16 val, void __iomem *addr,
++ const char *reg, const char *fn)
++{
++ DBG(3, "%s: Writing %04x to %s[%04lx]\n", fn, val, reg,
++ (unsigned long)addr & 0x1fff);
++ __raw_writew(val, addr);
++}
++
++#define nfc_read_reg(c, r) __nfc_reg_read((c)->reg_base + r, #r, __FUNCTION__)
++static inline u16 __nfc_reg_read(void __iomem *addr,
++ const char *reg, const char *fn)
++{
++ u16 val;
++ val = __raw_readw(addr);
++ DBG(3, "%s: Read %04x from %s[%04lx]\n", fn, val, reg,
++ (unsigned long)addr & 0x1fff);
++ return val;
++}
++#else
++#define nfc_read_reg(c, r) __raw_readw((c)->reg_base + r)
++#define nfc_write_reg(c, v, r) __raw_writew(v, (c)->reg_base + r)
++#endif /* CONFIG_MTD_DEBUG */
++
++#define NFC_SET_BLS(val) (val)
++
++#define UNLOCK_ADDR(start_addr,end_addr) \
++{ \
++ nfc_write_reg(mxc_nand_data, start_addr,REG_START_BLKADDR); \
++ nfc_write_reg(mxc_nand_data, end_addr,REG_END_BLKADDR); \
++}
++
++#define NFC_SET_NFC_ACTIVE_CS(val)
++#define NFC_GET_MAXCHIP_SP() 1
++#define NFC_SET_WPC(val) (val)
++
++#define ACK_OPS
++#define NFC_SET_RBA(val) nfc_write_reg(mxc_nand_data, val, REG_NFC_SET_RBA);
++
++#ifdef CONFIG_ARCH_MXC_HAS_NFC_V2_1
++#define READ_PAGE(c) send_read_page(c,0)
++#define PROG_PAGE(c) send_prog_page(c,0)
++#else
++#define READ_PAGE(c) \
++do { \
++ send_read_page(c,0); \
++ send_read_page(c,1); \
++ send_read_page(c,2); \
++ send_read_page(c,3); \
++} while (0)
++
++#define PROG_PAGE(c) \
++do { \
++ send_prog_page(c,0); \
++ send_prog_page(c,1); \
++ send_prog_page(c,2); \
++ send_prog_page(c,3); \
++} while (0)
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V2_1 */
++#define CHECK_NFC_RB 1
++
++#endif /* CONFIG_ARCH_MXC_HAS_NFC_V3 */
++
++#endif /* __MXC_ND2_H__ */
+diff -urNp linux-2.6.30-rc4/drivers/net/Kconfig linux-2.6.30-rc4-karo/drivers/net/Kconfig
+--- linux-2.6.30-rc4/drivers/net/Kconfig 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/drivers/net/Kconfig 2009-06-02 17:05:27.000000000 +0200
+@@ -1859,7 +1859,7 @@ config 68360_ENET
+
+ config FEC
+ bool "FEC ethernet controller (of ColdFire CPUs)"
+- depends on M523x || M527x || M5272 || M528x || M520x || M532x || MACH_MX27
++ depends on M523x || M527x || M5272 || M528x || M520x || M532x || MACH_MX27 || MACH_TX25
+ help
+ Say Y here if you want to use the built-in 10/100 Fast ethernet
+ controller on some Motorola ColdFire and Freescale i.MX processors.
+diff -urNp linux-2.6.30-rc4/drivers/net/fec.c linux-2.6.30-rc4-karo/drivers/net/fec.c
+--- linux-2.6.30-rc4/drivers/net/fec.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/drivers/net/fec.c 2009-06-02 17:05:27.000000000 +0200
+@@ -2,6 +2,12 @@
+ * Fast Ethernet Controller (FEC) driver for Motorola MPC8xx.
+ * Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
+ *
++ * This version of the driver is specific to the FADS implementation,
++ * since the board contains control registers external to the processor
++ * for the control of the LevelOne LXT970 transceiver. The MPC860T manual
++ * describes connections using the internal parallel port I/O, which
++ * is basically all of Port D.
++ *
+ * Right now, I am very wasteful with the buffers. I allocate memory
+ * pages and then divide them into 2K frame buffers. This way I know I
+ * have buffers large enough to hold one frame within one buffer descriptor.
+@@ -18,77 +24,123 @@
+ * Bug fixes and cleanup by Philippe De Muyter (phdm@macqel.be)
+ * Copyright (c) 2004-2006 Macq Electronique SA.
+ */
++/*
++ * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
++ */
+
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+-#include <linux/string.h>
+-#include <linux/ptrace.h>
++#include <linux/resource.h>
+ #include <linux/errno.h>
+ #include <linux/ioport.h>
+ #include <linux/slab.h>
+ #include <linux/interrupt.h>
+-#include <linux/pci.h>
+-#include <linux/init.h>
++#include <linux/wait.h>
+ #include <linux/delay.h>
++#include <linux/platform_device.h>
+ #include <linux/netdevice.h>
+ #include <linux/etherdevice.h>
+ #include <linux/skbuff.h>
+ #include <linux/spinlock.h>
+-#include <linux/workqueue.h>
+-#include <linux/bitops.h>
+-#include <linux/io.h>
+-#include <linux/irq.h>
++#include <linux/dma-mapping.h>
+ #include <linux/clk.h>
+-#include <linux/platform_device.h>
++#include <linux/fec_enet.h>
++#include <linux/phy.h>
+
+-#include <asm/cacheflush.h>
++#include <asm/irq.h>
++#include <asm/io.h>
+
+-#ifndef CONFIG_ARCH_MXC
+-#include <asm/coldfire.h>
+-#include <asm/mcfsim.h>
++#define DRV_NAME "fec"
++#define DEBUG
++
++#ifdef DEBUG
++static int debug = 0;
++#define dbg_lvl(n) ((n) < debug)
++module_param(debug, int, S_IRUGO | S_IWUSR);
++
++#define DBG(lvl, fmt...) do { if (dbg_lvl(lvl)) printk(KERN_DEBUG fmt); } while (0)
++#else
++static int debug;
++#define dbg_lvl(n) 0
++module_param(debug, int, 0);
++
++#define DBG(lvl, fmt...) do { } while (0)
+ #endif
+
++#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || \
++ defined(CONFIG_M5272) || defined(CONFIG_M528x) || \
++ defined(CONFIG_M520x) || defined(CONFIG_M532x)
++#include <asm/coldfire.h>
++#include <asm/mcfsim.h>
+ #include "fec.h"
+-
+-#ifdef CONFIG_ARCH_MXC
++#define FEC_ALIGNMENT (0x03) /*FEC needs 4bytes alignment*/
++#elif defined(CONFIG_ARCH_MXC)
+ #include <mach/hardware.h>
+-#define FEC_ALIGNMENT 0xf
++#include <mach/iim.h>
++#include "fec.h"
++#define FEC_ALIGNMENT (0x0F) /*FEC needs 128bits(16bytes) alignment*/
+ #else
+-#define FEC_ALIGNMENT 0x3
++#include <asm/8xx_immap.h>
++#include <asm/mpc8xx.h>
++#include "commproc.h"
++#define FEC_ALIGNMENT (0x03) /*FEC needs 4bytes alignment */
+ #endif
+
++#define FEC_ADDR_ALIGNMENT(x) ((unsigned char *)(((unsigned long)(x) + (FEC_ALIGNMENT)) & (~FEC_ALIGNMENT)))
++
++#if 0
+ /*
+ * Define the fixed address of the FEC hardware.
+ */
++/* USE resources provided by platform_device! */
++static unsigned int fec_hw[] = {
+ #if defined(CONFIG_M5272)
+-#define HAVE_mii_link_interrupt
+-
+-static unsigned char fec_mac_default[] = {
+- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
++ (MCF_MBAR + 0x840),
++#elif defined(CONFIG_M527x)
++ (MCF_MBAR + 0x1000),
++ (MCF_MBAR + 0x1800),
++#elif defined(CONFIG_M523x) || defined(CONFIG_M528x)
++ (MCF_MBAR + 0x1000),
++#elif defined(CONFIG_M520x)
++ (MCF_MBAR+0x30000),
++#elif defined(CONFIG_M532x)
++ (MCF_MBAR+0xfc030000),
++#elif defined(CONFIG_ARCH_MXC)
++ (IO_ADDRESS(FEC_BASE_ADDR)),
++#else
++ &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec),
++#endif
+ };
++#endif
+
++#if 0
+ /*
+ * Some hardware gets it MAC address out of local flash memory.
+ * if this is non-zero then assume it is the address to get MAC from.
+ */
++/* implemented using platform_data! */
+ #if defined(CONFIG_NETtel)
+ #define FEC_FLASHMAC 0xf0006006
+ #elif defined(CONFIG_GILBARCONAP) || defined(CONFIG_SCALES)
+ #define FEC_FLASHMAC 0xf0006000
++#elif defined (CONFIG_MTD_KeyTechnology)
++#define FEC_FLASHMAC 0xffe04000
+ #elif defined(CONFIG_CANCam)
+ #define FEC_FLASHMAC 0xf0020000
+ #elif defined (CONFIG_M5272C3)
+ #define FEC_FLASHMAC (0xffe04000 + 4)
+ #elif defined(CONFIG_MOD5272)
+-#define FEC_FLASHMAC 0xffc0406b
++#define FEC_FLASHMAC 0xffc0406b
+ #else
+ #define FEC_FLASHMAC 0
+ #endif
+-#endif /* CONFIG_M5272 */
++#endif
++
++#define platform_func(p, args...) ((p) ? (p)(args) : 0)
+
+ /* Forward declarations of some structures to support different PHYs
+ */
+-
++#ifndef CONFIG_PHYLIB
+ typedef struct {
+ uint mii_data;
+ void (*funct)(uint mii_reg, struct net_device *dev);
+@@ -103,6 +155,7 @@ typedef struct {
+ const phy_cmd_t *ack_int;
+ const phy_cmd_t *shutdown;
+ } phy_info_t;
++#endif
+
+ /* The number of Tx and Rx buffers. These are allocated from the page
+ * pool. The code may assume these are power of two, so it it best
+@@ -116,12 +169,13 @@ typedef struct {
+ #define RX_RING_SIZE (FEC_ENET_RX_FRPPG * FEC_ENET_RX_PAGES)
+ #define FEC_ENET_TX_FRSIZE 2048
+ #define FEC_ENET_TX_FRPPG (PAGE_SIZE / FEC_ENET_TX_FRSIZE)
+-#define TX_RING_SIZE 16 /* Must be power of two */
+-#define TX_RING_MOD_MASK 15 /* for this to work */
++#define TX_RING_SIZE 16 /* Must be power of two */
++#define TX_RING_MOD_MASK (TX_RING_SIZE - 1) /* for this to work */
+
+ #if (((RX_RING_SIZE + TX_RING_SIZE) * 8) > PAGE_SIZE)
+ #error "FEC: descriptor ring size constants too large"
+ #endif
++#define CBD_BUF_SIZE ((RX_RING_SIZE + TX_RING_SIZE) * sizeof(cbd_t))
+
+ /* Interrupt events/masks.
+ */
+@@ -136,6 +190,17 @@ typedef struct {
+ #define FEC_ENET_MII ((uint)0x00800000) /* MII interrupt */
+ #define FEC_ENET_EBERR ((uint)0x00400000) /* SDMA bus error */
+
++/* MXC arch interrupt bits */
++#define FEC_ENET_LC ((uint)0x00200000) /* Late collision */
++#define FEC_ENET_RL ((uint)0x00100000) /* Collision retry limit exceeded */
++#define FEC_ENET_UN ((uint)0x00080000) /* TX Fifo underrun */
++
++#ifndef CONFIG_ARCH_MXC
++#define FEC_ENET_MASK ((uint)0xffc00000)
++#else
++#define FEC_ENET_MASK ((uint)0xfff80000)
++#endif
++
+ /* The FEC stores dest/src/type, data, and checksum for receive packets.
+ */
+ #define PKT_MAXBUF_SIZE 1518
+@@ -150,7 +215,7 @@ typedef struct {
+ */
+ #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
+ defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARCH_MXC)
+-#define OPT_FRAME_SIZE (PKT_MAXBUF_SIZE << 16)
++#define OPT_FRAME_SIZE (RCR_MAX_FL_set(PKT_MAXBUF_SIZE))
+ #else
+ #define OPT_FRAME_SIZE 0
+ #endif
+@@ -165,31 +230,45 @@ typedef struct {
+ */
+ struct fec_enet_private {
+ /* Hardware registers of the FEC device */
+- volatile fec_t *hwp;
+-
+- struct net_device *netdev;
+-
+- struct clk *clk;
++ void __iomem *reg_base;
++ void __iomem *mib_base;
++ struct resource *res_mem1;
++ struct resource *res_mem2;
++ int etn_irq;
++ int mii_irq;
++#ifndef CONFIG_PHYLIB
++ struct timer_list *phy_timer;
++#else
++ struct mii_bus *mii;
++ int mii_complete;
++#endif
++ u32 msg_enable;
+
+ /* The saved address of a sent-in-place packet/buffer, for skfree(). */
+- unsigned char *tx_bounce[TX_RING_SIZE];
++ void *tx_bounce[TX_RING_SIZE];
+ struct sk_buff* tx_skbuff[TX_RING_SIZE];
++ struct sk_buff* rx_skbuff[RX_RING_SIZE];
+ ushort skb_cur;
+ ushort skb_dirty;
+
+ /* CPM dual port RAM relative addresses.
+ */
+- dma_addr_t bd_dma;
++ struct device *dma_dev; /* pointer to (platform_)device for dma_sync*() functions */
++ void *cbd_mem_base; /* save the virtual base address of rx&tx buffer descriptor */
++ dma_addr_t cbd_phys_base; /* physical address of buffer descriptor memory for access by FEC HW */
++
+ cbd_t *rx_bd_base; /* Address of Rx and Tx buffers. */
+ cbd_t *tx_bd_base;
+- cbd_t *cur_rx, *cur_tx; /* The next free ring entry */
+- cbd_t *dirty_tx; /* The ring entries to be free()ed. */
++ cbd_t *cur_rx, *cur_tx; /* The next free ring entry */
++ cbd_t *dirty_tx; /* The ring entries to be free()ed. */
++ struct net_device_stats stats;
+ uint tx_full;
+- /* hold while accessing the HW like ringbuffer for tx/rx but not MAC */
+- spinlock_t hw_lock;
+- /* hold while accessing the mii_list_t() elements */
+- spinlock_t mii_lock;
++ spinlock_t lock;
+
++#ifdef CONFIG_PHYLIB
++ struct phy_device *phy;
++ uint phy_speed;
++#else
+ uint phy_id;
+ uint phy_id_done;
+ uint phy_status;
+@@ -199,28 +278,41 @@ struct fec_enet_private {
+
+ uint sequence_done;
+ uint mii_phy_task_queued;
+-
++#endif
+ uint phy_addr;
+
+- int index;
+- int opened;
+- int link;
+- int old_link;
+- int full_duplex;
++ unsigned int opened:1;
++ unsigned int phy_int_enabled:1;
++ unsigned int linkstatus:1;
++#ifndef CONFIG_PHYLIB
++ unsigned int old_linkstatus:1;
++#endif
++ unsigned int full_duplex:1;
++
++ struct clk *clk;
+ };
+
+-static int fec_enet_open(struct net_device *dev);
+-static int fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
+-static void fec_enet_mii(struct net_device *dev);
+-static irqreturn_t fec_enet_interrupt(int irq, void * dev_id);
++#ifdef CONFIG_PHYLIB
++static int fec_connect_phy(struct net_device *dev, struct fec_enet_private *fep);
++#else
++static irqreturn_t mii_link_interrupt(int irq, void *dev_id);
++#endif
++static void fec_restart(struct net_device *dev, int duplex);
+ static void fec_enet_tx(struct net_device *dev);
+ static void fec_enet_rx(struct net_device *dev);
+-static int fec_enet_close(struct net_device *dev);
+-static void set_multicast_list(struct net_device *dev);
+-static void fec_restart(struct net_device *dev, int duplex);
++static void fec_enet_mii(struct net_device *dev);
+ static void fec_stop(struct net_device *dev);
+-static void fec_set_mac_address(struct net_device *dev);
++static void _fec_set_mac_address(struct net_device *dev);
+
++/*
++ * fec_copy_threshold controls the copy when receiving ethernet frame.
++ * If ethernet header is aligned on a 4byte boundary, the ip header and
++ * higher level header will not be aligned.
++ * The reason is, that an ethernet header is 14bytes long.
++ * And the max size of tcp & ip header is 128bytes. Normally it is 40bytes.
++ * So I set the default value between 128 to 256.
++ */
++static int fec_copy_threshold = 192;
+
+ /* MII processing. We keep this as simple as possible. Requests are
+ * placed on the list (if there is room). When the request is finished
+@@ -232,14 +324,16 @@ typedef struct mii_list {
+ struct mii_list *mii_next;
+ } mii_list_t;
+
++#ifndef CONFIG_PHYLIB
+ #define NMII 20
+ static mii_list_t mii_cmds[NMII];
+ static mii_list_t *mii_free;
+ static mii_list_t *mii_head;
+ static mii_list_t *mii_tail;
+
+-static int mii_queue(struct net_device *dev, int request,
+- void (*func)(uint, struct net_device *));
++static int mii_queue(struct net_device *dev, int request,
++ void (*func)(uint, struct net_device *));
++#endif
+
+ /* Make MII read/write commands for the FEC.
+ */
+@@ -284,87 +378,233 @@ static int mii_queue(struct net_device *
+ #define PHY_STAT_100HDX 0x4000 /* 100 Mbit half duplex selected */
+ #define PHY_STAT_100FDX 0x8000 /* 100 Mbit full duplex selected */
+
++#ifndef DEBUG
++static inline unsigned long fec_reg_read(struct fec_enet_private *fep, unsigned int reg)
++{
++ return readl(fep->reg_base + reg);
++}
++
++static inline void fec_reg_write(struct fec_enet_private *fep, unsigned int reg, unsigned long val)
++{
++ writel(val, fep->reg_base + reg);
++}
++#else
++#define fec_reg_read(fep, reg) __fec_reg_read(fep, reg, __FUNCTION__, #reg)
++#define fec_reg_write(fep, reg, val) __fec_reg_write(fep, reg, val, __FUNCTION__, #reg)
++
++static inline unsigned long __fec_reg_read(struct fec_enet_private *fep, unsigned int reg,
++ const char *func, const char *reg_name)
++{
++ unsigned long val = readl(fep->reg_base + reg);
++ DBG(3, "%s: Read %08lx from %s(%03x)\n", func, val, reg_name, reg);
++ return val;
++}
++
++static inline void __fec_reg_write(struct fec_enet_private *fep, unsigned int reg,
++ unsigned long val, const char *func, const char *reg_name)
++{
++ DBG(3, "%s: Writing %08lx to %s(%03x)\n", func, val, reg_name, reg);
++ writel(val, fep->reg_base + reg);
++}
++#endif
++
++static inline void fec_enet_cbd_get(struct fec_enet_private *fep)
++{
++ DBG(2, "%s: Requesting cbd area: %08lx\n", __FUNCTION__,
++ (unsigned long)fep->cbd_phys_base);
++ dma_sync_single_for_cpu(fep->dma_dev, fep->cbd_phys_base,
++ CBD_BUF_SIZE, DMA_BIDIRECTIONAL);
++}
++
++static inline void fec_enet_cbd_put(struct fec_enet_private *fep)
++{
++ DBG(2, "%s: Flushing changes to cbd area\n", __FUNCTION__);
++ dma_sync_single_for_device(fep->dma_dev, fep->cbd_phys_base,
++ CBD_BUF_SIZE, DMA_BIDIRECTIONAL);
++}
++
++static inline void fec_enet_rxbuf_get(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Requesting RX buffer %08lx(%u)\n", __FUNCTION__,
++ (unsigned long)bdp->cbd_bufaddr, len);
++ dma_sync_single_for_cpu(fep->dma_dev, bdp->cbd_bufaddr,
++ len, DMA_FROM_DEVICE);
++}
++
++static inline void fec_enet_rxbuf_put(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Releasing RX buffer %08lx(%u)\n", __FUNCTION__, (ulong)bdp->cbd_bufaddr, len);
++ dma_sync_single_for_device(fep->dma_dev, bdp->cbd_bufaddr, len, DMA_FROM_DEVICE);
++}
++
++static inline void fec_enet_rxbuf_map(struct fec_enet_private *fep, cbd_t *bdp,
++ void *buf, ushort len)
++{
++ BUG_ON(!dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr));
++ bdp->cbd_bufaddr = dma_map_single(fep->dma_dev, buf,
++ len, DMA_FROM_DEVICE);
++ DBG(2, "%s: RX buffer %p(%u) mapped to %08lx\n", __FUNCTION__,
++ buf, len, (unsigned long)bdp->cbd_bufaddr);
++}
++
++static inline void fec_enet_rxbuf_unmap(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Unmapping RX buffer %08lx(%u)\n", __FUNCTION__,
++ (unsigned long)bdp->cbd_bufaddr, len);
++ BUG_ON(dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr));
++ dma_unmap_single(fep->dma_dev, bdp->cbd_bufaddr,
++ len, DMA_FROM_DEVICE);
++ bdp->cbd_bufaddr = ~0;
++}
++
++static inline void fec_enet_txbuf_map(struct fec_enet_private *fep, cbd_t *bdp,
++ void *buf, ushort len)
++{
++ BUG_ON(!dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr));
++ bdp->cbd_bufaddr = dma_map_single(fep->dma_dev, buf,
++ len, DMA_TO_DEVICE);
++ DBG(2, "%s: TX buffer %p(%u) mapped to %08lx\n", __FUNCTION__,
++ buf, len, (unsigned long)bdp->cbd_bufaddr);
++}
++
++static inline void fec_enet_txbuf_unmap(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Unmapping TX buffer %08lx(%u)\n", __FUNCTION__,
++ (unsigned long)bdp->cbd_bufaddr, len);
++ BUG_ON(dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr));
++ dma_unmap_single(fep->dma_dev, bdp->cbd_bufaddr,
++ len, DMA_TO_DEVICE);
++ bdp->cbd_bufaddr = ~0;
++}
++
++static inline void fec_enet_txbuf_get(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Requesting TX buffer %08lx(%u)\n", __FUNCTION__,
++ (unsigned long)bdp->cbd_bufaddr, len);
++ dma_sync_single_for_cpu(fep->dma_dev, bdp->cbd_bufaddr,
++ len, DMA_TO_DEVICE);
++}
++
++static inline void fec_enet_txbuf_put(struct fec_enet_private *fep, cbd_t *bdp, ushort len)
++{
++ DBG(2, "%s: Releasing TX buffer %08lx(%u)\n", __FUNCTION__,
++ (unsigned long)bdp->cbd_bufaddr, len);
++ dma_sync_single_for_device(fep->dma_dev, bdp->cbd_bufaddr,
++ len, DMA_TO_DEVICE);
++}
++
++static void dump_packet(const char *prefix, const unsigned char *data, int len)
++{
++ if (dbg_lvl(3)) {
++ print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, data, len);
++ }
++}
++
++static void dump_tx_buffers(struct fec_enet_private *fep)
++{
++ cbd_t *bdp = fep->tx_bd_base;
++ int i;
++
++ printk(KERN_DEBUG "tx buffers: %u buffers\n", TX_RING_SIZE);
++ for (i = 0; i < TX_RING_SIZE; i++, bdp++) {
++ printk(KERN_DEBUG " %p: %04x %04x %08x\n",
++ bdp,
++ bdp->cbd_sc,
++ bdp->cbd_datlen,
++ bdp->cbd_bufaddr);
++ print_hex_dump_bytes("tx buffers:", DUMP_PREFIX_ADDRESS, bdp, sizeof(cbd_t));
++ }
++}
++
++static void dump_rx_buffers(struct fec_enet_private *fep)
++{
++ cbd_t *bdp = fep->rx_bd_base;
++ int i;
++
++ printk(KERN_DEBUG "rx buffers: %lu buffers\n", RX_RING_SIZE);
++ for (i = 0; i < RX_RING_SIZE; i++, bdp++) {
++ printk(KERN_DEBUG " %p: %04x %04x %08x\n",
++ bdp,
++ bdp->cbd_sc,
++ bdp->cbd_datlen,
++ bdp->cbd_bufaddr);
++ print_hex_dump_bytes("rx buffers:", DUMP_PREFIX_ADDRESS, bdp, sizeof(cbd_t));
++ }
++}
+
+ static int
+ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *fecp;
+- volatile cbd_t *bdp;
+- unsigned short status;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
++ unsigned short status;
+ unsigned long flags;
+
+- fep = netdev_priv(dev);
+- fecp = (volatile fec_t*)dev->base_addr;
+-
+- if (!fep->link) {
++ if (!fep->linkstatus) {
++ DBG(0, "%s: Cannot send packet; link is down\n", __FUNCTION__);
+ /* Link is down or autonegotiation is in progress. */
+ return 1;
+ }
+
+- spin_lock_irqsave(&fep->hw_lock, flags);
++ spin_lock_irqsave(&fep->lock, flags);
++
++ //WARN_ON(fec_reg_read(fep, FEC_TDAR) & TDAR_BUSY);
++ fec_enet_cbd_get(fep);
++
+ /* Fill in a Tx ring entry */
+ bdp = fep->cur_tx;
+
+ status = bdp->cbd_sc;
+-#ifndef final_version
++#ifdef DEBUG
+ if (status & BD_ENET_TX_READY) {
+ /* Ooops. All transmit buffers are full. Bail out.
+ * This should not happen, since dev->tbusy should be set.
+ */
+ printk("%s: tx queue full!.\n", dev->name);
+- spin_unlock_irqrestore(&fep->hw_lock, flags);
++ fec_enet_cbd_put(fep);
++ spin_unlock_irqrestore(&fep->lock, flags);
+ return 1;
+ }
+ #endif
+-
+ /* Clear all of the status flags.
+ */
+ status &= ~BD_ENET_TX_STATS;
+
+ /* Set buffer length and buffer pointer.
+ */
+- bdp->cbd_bufaddr = __pa(skb->data);
+ bdp->cbd_datlen = skb->len;
+
++ dump_packet("sending packet:", skb->data, skb->len);
+ /*
+ * On some FEC implementations data must be aligned on
+ * 4-byte boundaries. Use bounce buffers to copy data
+ * and get it aligned. Ugh.
+ */
+- if (bdp->cbd_bufaddr & FEC_ALIGNMENT) {
++ if (unlikely((bdp->cbd_bufaddr) & FEC_ALIGNMENT)) {
+ unsigned int index;
+ index = bdp - fep->tx_bd_base;
+- memcpy(fep->tx_bounce[index], (void *)skb->data, skb->len);
+- bdp->cbd_bufaddr = __pa(fep->tx_bounce[index]);
++ memcpy(fep->tx_bounce[index], skb->data, skb->len);
++ fec_enet_txbuf_map(fep, bdp, fep->tx_bounce[index], skb->len);
++ } else {
++ fec_enet_txbuf_map(fep, bdp, skb->data, skb->len);
+ }
+
+ /* Save skb pointer.
+ */
+ fep->tx_skbuff[fep->skb_cur] = skb;
+
+- dev->stats.tx_bytes += skb->len;
+- fep->skb_cur = (fep->skb_cur+1) & TX_RING_MOD_MASK;
+-
+- /* Push the data cache so the CPM does not get stale memory
+- * data.
+- */
+- dma_sync_single(NULL, bdp->cbd_bufaddr,
+- bdp->cbd_datlen, DMA_TO_DEVICE);
++ fep->stats.tx_bytes += skb->len;
++ fep->skb_cur = (fep->skb_cur + 1) & TX_RING_MOD_MASK;
+
+ /* Send it on its way. Tell FEC it's ready, interrupt when done,
+ * it's the last BD of the frame, and to put the CRC on the end.
+ */
+-
+ status |= (BD_ENET_TX_READY | BD_ENET_TX_INTR
+ | BD_ENET_TX_LAST | BD_ENET_TX_TC);
+ bdp->cbd_sc = status;
+
+ dev->trans_start = jiffies;
+
+- /* Trigger transmission start */
+- fecp->fec_x_des_active = 0;
+-
+ /* If this was the last BD in the ring, start at the beginning again.
+ */
+ if (status & BD_ENET_TX_WRAP) {
+@@ -375,12 +615,22 @@ fec_enet_start_xmit(struct sk_buff *skb,
+
+ if (bdp == fep->dirty_tx) {
+ fep->tx_full = 1;
++ DBG(0, "TX ring full, stopping netif queue\n");
+ netif_stop_queue(dev);
+ }
+
+- fep->cur_tx = (cbd_t *)bdp;
++ fep->cur_tx = bdp;
++ fec_enet_cbd_put(fep);
++#if 0
++ if (dbg_lvl(3)) {
++ dump_tx_buffers(fep);
++ dump_rx_buffers(fep);
++ }
++#endif
++ /* Trigger transmission start */
++ fec_reg_write(fep, FEC_TDAR, DONT_CARE);
+
+- spin_unlock_irqrestore(&fep->hw_lock, flags);
++ spin_unlock_irqrestore(&fep->lock, flags);
+
+ return 0;
+ }
+@@ -390,101 +640,126 @@ fec_timeout(struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+- printk("%s: transmit timed out.\n", dev->name);
+- dev->stats.tx_errors++;
+-#ifndef final_version
++ printk(KERN_WARNING "%s: transmit timed out.\n", dev->name);
++ fep->stats.tx_errors++;
++#ifdef DEBUG
+ {
+- int i;
+- cbd_t *bdp;
++ int i;
++ cbd_t *bdp;
+
+- printk("Ring data dump: cur_tx %lx%s, dirty_tx %lx cur_rx: %lx\n",
+- (unsigned long)fep->cur_tx, fep->tx_full ? " (full)" : "",
+- (unsigned long)fep->dirty_tx,
+- (unsigned long)fep->cur_rx);
++ fec_enet_cbd_get(fep);
+
+- bdp = fep->tx_bd_base;
+- printk(" tx: %u buffers\n", TX_RING_SIZE);
+- for (i = 0 ; i < TX_RING_SIZE; i++) {
+- printk(" %08x: %04x %04x %08x\n",
+- (uint) bdp,
+- bdp->cbd_sc,
+- bdp->cbd_datlen,
+- (int) bdp->cbd_bufaddr);
+- bdp++;
+- }
++ printk(KERN_DEBUG "%s: Ring data dump: cur_tx %p%s, dirty_tx %p cur_rx: %p\n",
++ __FUNCTION__,
++ fep->cur_tx, fep->tx_full ? " (full)" : "",
++ fep->dirty_tx,
++ fep->cur_rx);
+
+- bdp = fep->rx_bd_base;
+- printk(" rx: %lu buffers\n", (unsigned long) RX_RING_SIZE);
+- for (i = 0 ; i < RX_RING_SIZE; i++) {
+- printk(" %08x: %04x %04x %08x\n",
+- (uint) bdp,
+- bdp->cbd_sc,
+- bdp->cbd_datlen,
+- (int) bdp->cbd_bufaddr);
+- bdp++;
+- }
++ bdp = fep->tx_bd_base;
++ printk(" tx: %u buffers\n", TX_RING_SIZE);
++ for (i = 0; i < TX_RING_SIZE; i++) {
++ printk(" %p: %04x %04x %08x\n",
++ bdp,
++ bdp->cbd_sc,
++ bdp->cbd_datlen,
++ bdp->cbd_bufaddr);
++ bdp++;
++ }
++
++ bdp = fep->rx_bd_base;
++ printk(" rx: %lu buffers\n", RX_RING_SIZE);
++ for (i = 0; i < RX_RING_SIZE; i++) {
++ printk(" %p: %04x %04x %08x\n",
++ bdp,
++ bdp->cbd_sc,
++ bdp->cbd_datlen,
++ bdp->cbd_bufaddr);
++ bdp++;
++ }
++ fec_enet_cbd_put(fep);
+ }
+ #endif
+ fec_restart(dev, fep->full_duplex);
+- netif_wake_queue(dev);
++ DBG(0, "%s: Scheduling netif queue\n", __FUNCTION__);
++ //netif_schedule(dev);
+ }
+
+ /* The interrupt handler.
+ * This is called from the MPC core interrupt.
+ */
+ static irqreturn_t
+-fec_enet_interrupt(int irq, void * dev_id)
++fec_enet_interrupt(int irq, void *dev_id)
+ {
+- struct net_device *dev = dev_id;
+- volatile fec_t *fecp;
+- uint int_events;
+- irqreturn_t ret = IRQ_NONE;
+-
+- fecp = (volatile fec_t*)dev->base_addr;
++ struct net_device *dev = dev_id;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ uint int_events;
++ int handled = 0;
++ unsigned int eimr = fec_reg_read(fep, FEC_EIMR);
+
++ DBG(2, "%s: %08lx:%08lx\n", __FUNCTION__,
++ fec_reg_read(fep, FEC_EIR), fec_reg_read(fep, FEC_EIMR));
+ /* Get the interrupt events that caused us to be here.
+ */
+- do {
+- int_events = fecp->fec_ievent;
+- fecp->fec_ievent = int_events;
++ while ((int_events = fec_reg_read(fep, FEC_EIR) & FEC_ENET_MASK) != 0) {
++ if (int_events & ~eimr) {
++ printk(KERN_WARNING "%s: masked interrupt condition: %08x\n",
++ __FUNCTION__, int_events & ~eimr);
++ }
++
++ fec_reg_write(fep, FEC_EIR, int_events);
+
+ /* Handle receive event in its own function.
+ */
+- if (int_events & FEC_ENET_RXF) {
+- ret = IRQ_HANDLED;
++ if (int_events & (FEC_ENET_RXF | FEC_ENET_RXB)) {
++ DBG(2, "%s: Handling RX Interrupt\n", __FUNCTION__);
++ handled = 1;
+ fec_enet_rx(dev);
+ }
+
++ if (int_events & FEC_ENET_UN) {
++ printk(KERN_WARNING "TX fifo underrun");
++ }
+ /* Transmit OK, or non-fatal error. Update the buffer
+ descriptors. FEC handles all errors, we just discover
+ them as part of the transmit process.
+ */
+- if (int_events & FEC_ENET_TXF) {
+- ret = IRQ_HANDLED;
++ if (int_events & (FEC_ENET_TXF | FEC_ENET_TXB)) {
++ DBG(2, "%s: Handling TX Interrupt\n", __FUNCTION__);
++ handled = 1;
+ fec_enet_tx(dev);
+ }
+
+- if (int_events & FEC_ENET_MII) {
+- ret = IRQ_HANDLED;
++ if (int_events & (FEC_ENET_MII | FEC_ENET_HBERR)) {
++ DBG(2, "%s: Handling MII Interrupt\n", __FUNCTION__);
++ handled = 1;
+ fec_enet_mii(dev);
+ }
+-
+- } while (int_events);
+-
+- return ret;
++ }
++ return IRQ_RETVAL(handled);
+ }
+
++static void fec_free_skb(struct fec_enet_private *fep, cbd_t *bdp, struct sk_buff **pskb)
++{
++ struct sk_buff *skb = *pskb;
++ if (!dma_mapping_error(fep->dma_dev, bdp->cbd_bufaddr)) {
++ fec_enet_txbuf_unmap(fep, bdp, skb->len);
++ }
++ dev_kfree_skb_any(skb);
++ *pskb = NULL;
++}
+
+ static void
+ fec_enet_tx(struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile cbd_t *bdp;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
+ unsigned short status;
+- struct sk_buff *skb;
++ struct sk_buff *skb;
+
+- fep = netdev_priv(dev);
+- spin_lock_irq(&fep->hw_lock);
++ spin_lock(&fep->lock);
++
++ //WARN_ON(fec_reg_read(fep, FEC_TDAR) & TDAR_BUSY);
++ fec_enet_cbd_get(fep);
+ bdp = fep->dirty_tx;
+
+ while (((status = bdp->cbd_sc) & BD_ENET_TX_READY) == 0) {
+@@ -495,22 +770,22 @@ fec_enet_tx(struct net_device *dev)
+ if (status & (BD_ENET_TX_HB | BD_ENET_TX_LC |
+ BD_ENET_TX_RL | BD_ENET_TX_UN |
+ BD_ENET_TX_CSL)) {
+- dev->stats.tx_errors++;
++ fep->stats.tx_errors++;
+ if (status & BD_ENET_TX_HB) /* No heartbeat */
+- dev->stats.tx_heartbeat_errors++;
++ fep->stats.tx_heartbeat_errors++;
+ if (status & BD_ENET_TX_LC) /* Late collision */
+- dev->stats.tx_window_errors++;
++ fep->stats.tx_window_errors++;
+ if (status & BD_ENET_TX_RL) /* Retrans limit */
+- dev->stats.tx_aborted_errors++;
++ fep->stats.tx_aborted_errors++;
+ if (status & BD_ENET_TX_UN) /* Underrun */
+- dev->stats.tx_fifo_errors++;
++ fep->stats.tx_fifo_errors++;
+ if (status & BD_ENET_TX_CSL) /* Carrier lost */
+- dev->stats.tx_carrier_errors++;
++ fep->stats.tx_carrier_errors++;
+ } else {
+- dev->stats.tx_packets++;
++ fep->stats.tx_packets++;
+ }
+
+-#ifndef final_version
++#ifdef DEBUG
+ if (status & BD_ENET_TX_READY)
+ printk("HEY! Enet xmit interrupt and TX_READY.\n");
+ #endif
+@@ -518,12 +793,13 @@ fec_enet_tx(struct net_device *dev)
+ * but we eventually sent the packet OK.
+ */
+ if (status & BD_ENET_TX_DEF)
+- dev->stats.collisions++;
++ fep->stats.collisions++;
+
++ dump_packet("sent packet:", fep->tx_skbuff[fep->skb_dirty]->data,
++ fep->tx_skbuff[fep->skb_dirty]->len);
+ /* Free the sk buffer associated with this last transmit.
+ */
+- dev_kfree_skb_any(skb);
+- fep->tx_skbuff[fep->skb_dirty] = NULL;
++ fec_free_skb(fep, bdp, &fep->tx_skbuff[fep->skb_dirty]);
+ fep->skb_dirty = (fep->skb_dirty + 1) & TX_RING_MOD_MASK;
+
+ /* Update pointer to next buffer descriptor to be transmitted.
+@@ -538,12 +814,15 @@ fec_enet_tx(struct net_device *dev)
+ */
+ if (fep->tx_full) {
+ fep->tx_full = 0;
+- if (netif_queue_stopped(dev))
++ if (netif_queue_stopped(dev)) {
++ DBG(0, "%s: Waking up netif queue\n", __FUNCTION__);
+ netif_wake_queue(dev);
++ }
+ }
+ }
+- fep->dirty_tx = (cbd_t *)bdp;
+- spin_unlock_irq(&fep->hw_lock);
++ fec_enet_cbd_put(fep);
++ fep->dirty_tx = bdp;
++ spin_unlock(&fep->lock);
+ }
+
+
+@@ -555,22 +834,22 @@ fec_enet_tx(struct net_device *dev)
+ static void
+ fec_enet_rx(struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *fecp;
+- volatile cbd_t *bdp;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
+ unsigned short status;
+- struct sk_buff *skb;
+- ushort pkt_len;
+- __u8 *data;
++ struct sk_buff *skb;
++ ushort pkt_len;
++ int rx_index;
+
+ #ifdef CONFIG_M532x
++ /* This is probably nonsense
++ Proper use of dma-mapping functions should make this obsolete
++ */
+ flush_cache_all();
+ #endif
+-
+- fep = netdev_priv(dev);
+- fecp = (volatile fec_t*)dev->base_addr;
+-
+- spin_lock_irq(&fep->hw_lock);
++ /* reserve the dual port memory area for our use */
++ //WARN_ON(fec_reg_read(fep, FEC_RDAR) & RDAR_BUSY);
++ fec_enet_cbd_get(fep);
+
+ /* First, grab all of the stats for the incoming packet.
+ * These get messed up if we get called due to a busy condition.
+@@ -578,32 +857,34 @@ fec_enet_rx(struct net_device *dev)
+ bdp = fep->cur_rx;
+
+ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) {
+-
+-#ifndef final_version
++ rx_index = bdp - fep->rx_bd_base;
++#ifdef DEBUG
+ /* Since we have allocated space to hold a complete frame,
+ * the last indicator should be set.
+ */
+- if ((status & BD_ENET_RX_LAST) == 0)
+- printk("FEC ENET: rcv is not +last\n");
++ WARN_ON(!(status & BD_ENET_RX_LAST));
+ #endif
+
+- if (!fep->opened)
++ if (WARN_ON(!fep->opened)) {
++ DBG(0, "%s: Driver not opened; ignoring packet\n", __FUNCTION__);
++#if 0
+ goto rx_processing_done;
+-
++#endif
++ }
+ /* Check for errors. */
+ if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
+ BD_ENET_RX_CR | BD_ENET_RX_OV)) {
+- dev->stats.rx_errors++;
++ fep->stats.rx_errors++;
+ if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH)) {
+ /* Frame too long or too short. */
+- dev->stats.rx_length_errors++;
++ fep->stats.rx_length_errors++;
+ }
+ if (status & BD_ENET_RX_NO) /* Frame alignment */
+- dev->stats.rx_frame_errors++;
++ fep->stats.rx_frame_errors++;
+ if (status & BD_ENET_RX_CR) /* CRC Error */
+- dev->stats.rx_crc_errors++;
++ fep->stats.rx_crc_errors++;
+ if (status & BD_ENET_RX_OV) /* FIFO overrun */
+- dev->stats.rx_fifo_errors++;
++ fep->stats.rx_fifo_errors++;
+ }
+
+ /* Report late collisions as a frame error.
+@@ -611,39 +892,91 @@ while (!((status = bdp->cbd_sc) & BD_ENE
+ * have in the buffer. So, just drop this frame on the floor.
+ */
+ if (status & BD_ENET_RX_CL) {
+- dev->stats.rx_errors++;
+- dev->stats.rx_frame_errors++;
++ fep->stats.rx_errors++;
++ fep->stats.rx_frame_errors++;
++ DBG(0, "%s: Collision detected; dropping packet\n", __FUNCTION__);
++ if (bdp->cbd_datlen > PKT_MAXBUF_SIZE) {
++ printk(KERN_ERR "invalid packet size %u; max %u\n", bdp->cbd_datlen,
++ PKT_MAXBUF_SIZE);
++ } else {
++ fec_enet_rxbuf_get(fep, bdp, bdp->cbd_datlen);
++ dump_packet("received packet:",
++ fep->rx_skbuff[rx_index]->data, bdp->cbd_datlen);
++ fec_enet_rxbuf_put(fep, bdp, bdp->cbd_datlen);
++ }
+ goto rx_processing_done;
+ }
+-
++#if 1
++ if (!fep->opened) {
++ DBG(0, "%s: Driver not opened; ignoring packet\n", __FUNCTION__);
++ if (bdp->cbd_datlen > PKT_MAXBUF_SIZE) {
++ printk(KERN_ERR "invalid packet size %u; max %u\n", bdp->cbd_datlen,
++ PKT_MAXBUF_SIZE);
++ } else {
++ fec_enet_rxbuf_get(fep, bdp, bdp->cbd_datlen);
++ dump_packet("received packet:",
++ fep->rx_skbuff[rx_index]->data, bdp->cbd_datlen);
++ fec_enet_rxbuf_put(fep, bdp, bdp->cbd_datlen);
++ }
++ goto rx_processing_done;
++ }
++#endif
+ /* Process the incoming frame.
+ */
+- dev->stats.rx_packets++;
++ fep->stats.rx_packets++;
+ pkt_len = bdp->cbd_datlen;
+- dev->stats.rx_bytes += pkt_len;
+- data = (__u8*)__va(bdp->cbd_bufaddr);
+-
+- dma_sync_single(NULL, (unsigned long)__pa(data),
+- pkt_len - 4, DMA_FROM_DEVICE);
++ fep->stats.rx_bytes += pkt_len;
+
+ /* This does 16 byte alignment, exactly what we need.
+ * The packet length includes FCS, but we don't want to
+ * include that when passing upstream as it messes up
+ * bridging applications.
+ */
+- skb = dev_alloc_skb(pkt_len-4);
++ if ((pkt_len - 4) < fec_copy_threshold) {
++ skb = dev_alloc_skb(pkt_len);
++ } else {
++ skb = dev_alloc_skb(FEC_ENET_RX_FRSIZE);
++ }
+
+ if (skb == NULL) {
+ printk("%s: Memory squeeze, dropping packet.\n", dev->name);
+- dev->stats.rx_dropped++;
++ fep->stats.rx_dropped++;
+ } else {
+- skb_put(skb,pkt_len-4); /* Make room */
+- skb_copy_to_linear_data(skb, data, pkt_len-4);
+- skb->protocol=eth_type_trans(skb,dev);
++ if ((pkt_len - 4) < fec_copy_threshold) {
++ /* skip 2 bytes, so IP header is on a 4 bytes boundary */
++ skb_reserve(skb, 2);
++ skb_put(skb, pkt_len - 4); /* Make room */
++ fec_enet_rxbuf_get(fep, bdp, pkt_len - 4);
++ skb_copy_to_linear_data(skb,
++ fep->rx_skbuff[rx_index]->data,
++ pkt_len - 4);
++ fec_enet_rxbuf_put(fep, bdp, pkt_len - 4);
++ } else {
++ struct sk_buff *pskb = fep->rx_skbuff[rx_index];
++
++ /* unmap the skb we are going to hand down to the network layer */
++ fec_enet_rxbuf_unmap(fep, bdp, FEC_ENET_RX_FRSIZE);
++
++ /* init the newly allocated skb */
++ fep->rx_skbuff[rx_index] = skb;
++ skb->data = FEC_ADDR_ALIGNMENT(skb->data);
++ /* map the newly allocated skb's data buffer for DMA */
++ fec_enet_rxbuf_map(fep, bdp, skb->data, FEC_ENET_RX_FRSIZE);
++
++ skb_put(pskb, pkt_len - 4); /* Make room */
++ skb = pskb;
++ }
++ skb->dev = dev;
++ skb->protocol = eth_type_trans(skb, dev);
+ netif_rx(skb);
+ }
+ rx_processing_done:
+-
++#if 0
++ if (dbg_lvl(3)) {
++ dump_rx_buffers(fep);
++ dump_tx_buffers(fep);
++ }
++#endif
+ /* Clear the status flags for this buffer.
+ */
+ status &= ~BD_ENET_RX_STATS;
+@@ -653,6 +986,9 @@ while (!((status = bdp->cbd_sc) & BD_ENE
+ status |= BD_ENET_RX_EMPTY;
+ bdp->cbd_sc = status;
+
++ /* release the dual port memory area for use by the FEC hardware */
++ fec_enet_cbd_put(fep);
++
+ /* Update BD pointer to next entry.
+ */
+ if (status & BD_ENET_RX_WRAP)
+@@ -665,10 +1001,10 @@ while (!((status = bdp->cbd_sc) & BD_ENE
+ * incoming frames. On a heavily loaded network, we should be
+ * able to keep up at the expense of system resources.
+ */
+- fecp->fec_r_des_active = 0;
++ fec_reg_write(fep, FEC_RDAR, DONT_CARE);
+ #endif
+ } /* while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) */
+- fep->cur_rx = (cbd_t *)bdp;
++ fep->cur_rx = bdp;
+
+ #if 0
+ /* Doing this here will allow us to process all frames in the
+@@ -678,27 +1014,28 @@ while (!((status = bdp->cbd_sc) & BD_ENE
+ * our way back to the interrupt return only to come right back
+ * here.
+ */
+- fecp->fec_r_des_active = 0;
++ fec_reg_write(fep, FEC_RDAR, DONT_CARE);
+ #endif
+-
+- spin_unlock_irq(&fep->hw_lock);
+ }
+
+-
++#ifdef CONFIG_PHYLIB
+ /* called from interrupt context */
++static void fec_enet_mii(struct net_device *dev)
++{
++ struct fec_enet_private *fep = netdev_priv(dev);
++ fep->mii_complete = 1;
++}
++#else
+ static void
+ fec_enet_mii(struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *ep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ mii_list_t *mip;
+ uint mii_reg;
+
+- fep = netdev_priv(dev);
+- spin_lock_irq(&fep->mii_lock);
++ mii_reg = fec_reg_read(fep, FEC_MMFR);
+
+- ep = fep->hwp;
+- mii_reg = ep->fec_mii_data;
++ spin_lock(&fep->lock);
+
+ if ((mip = mii_head) == NULL) {
+ printk("MII and no head!\n");
+@@ -713,27 +1050,27 @@ fec_enet_mii(struct net_device *dev)
+ mii_free = mip;
+
+ if ((mip = mii_head) != NULL)
+- ep->fec_mii_data = mip->mii_regval;
++ fec_reg_write(fep, FEC_MMFR, mip->mii_regval);
+
+ unlock:
+- spin_unlock_irq(&fep->mii_lock);
++ spin_unlock(&fep->lock);
+ }
+
+ static int
+ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_device *))
+ {
+- struct fec_enet_private *fep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ unsigned long flags;
+ mii_list_t *mip;
+ int retval;
+
++ retval = 0;
++
++ spin_lock_irqsave(&fep->lock,flags);
++
+ /* Add PHY address to register command.
+ */
+- fep = netdev_priv(dev);
+- spin_lock_irqsave(&fep->mii_lock, flags);
+-
+ regval |= fep->phy_addr << 23;
+- retval = 0;
+
+ if ((mip = mii_free) != NULL) {
+ mii_free = mip->mii_next;
+@@ -745,32 +1082,32 @@ mii_queue(struct net_device *dev, int re
+ mii_tail = mip;
+ } else {
+ mii_head = mii_tail = mip;
+- fep->hwp->fec_mii_data = regval;
++ fec_reg_write(fep, FEC_MMFR, regval);
+ }
+ } else {
+ retval = 1;
+ }
+
+- spin_unlock_irqrestore(&fep->mii_lock, flags);
+- return retval;
++ spin_unlock_irqrestore(&fep->lock,flags);
++
++ return(retval);
+ }
+
+ static void mii_do_cmd(struct net_device *dev, const phy_cmd_t *c)
+ {
+- if(!c)
+- return;
++ int k;
+
+- for (; c->mii_data != mk_mii_end; c++)
+- mii_queue(dev, c->mii_data, c->funct);
++ for (k = 0; c != NULL && c[k].mii_data != mk_mii_end; k++) {
++ mii_queue(dev, c[k].mii_data, c[k].funct);
++ }
+ }
+
+ static void mii_parse_sr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_LINK | PHY_STAT_FAULT | PHY_STAT_ANC);
++ status = fep->phy_status & ~(PHY_STAT_LINK | PHY_STAT_FAULT | PHY_STAT_ANC);
+
+ if (mii_reg & 0x0004)
+ status |= PHY_STAT_LINK;
+@@ -778,31 +1115,30 @@ static void mii_parse_sr(uint mii_reg, s
+ status |= PHY_STAT_FAULT;
+ if (mii_reg & 0x0020)
+ status |= PHY_STAT_ANC;
+- *s = status;
++
++ fep->phy_status = status;
+ }
+
+ static void mii_parse_cr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_CONF_ANE | PHY_CONF_LOOP);
++ status = fep->phy_status & ~(PHY_CONF_ANE | PHY_CONF_LOOP);
+
+ if (mii_reg & 0x1000)
+ status |= PHY_CONF_ANE;
+ if (mii_reg & 0x4000)
+ status |= PHY_CONF_LOOP;
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static void mii_parse_anar(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_CONF_SPMASK);
++ status = fep->phy_status & ~(PHY_CONF_SPMASK);
+
+ if (mii_reg & 0x0020)
+ status |= PHY_CONF_10HDX;
+@@ -812,7 +1148,7 @@ static void mii_parse_anar(uint mii_reg,
+ status |= PHY_CONF_100HDX;
+ if (mii_reg & 0x00100)
+ status |= PHY_CONF_100FDX;
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ /* ------------------------------------------------------------------------- */
+@@ -827,10 +1163,9 @@ static void mii_parse_anar(uint mii_reg,
+ static void mii_parse_lxt970_csr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_SPMASK);
++ status = fep->phy_status & ~(PHY_STAT_SPMASK);
+ if (mii_reg & 0x0800) {
+ if (mii_reg & 0x1000)
+ status |= PHY_STAT_100FDX;
+@@ -842,7 +1177,7 @@ static void mii_parse_lxt970_csr(uint mi
+ else
+ status |= PHY_STAT_10HDX;
+ }
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static phy_cmd_t const phy_cmd_lxt970_config[] = {
+@@ -898,16 +1233,15 @@ static phy_info_t const phy_info_lxt970
+ static void mii_parse_lxt971_sr2(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_SPMASK | PHY_STAT_LINK | PHY_STAT_ANC);
++ status = fep->phy_status & ~(PHY_STAT_SPMASK | PHY_STAT_LINK | PHY_STAT_ANC);
+
+ if (mii_reg & 0x0400) {
+- fep->link = 1;
++ fep->linkstatus = 1;
+ status |= PHY_STAT_LINK;
+ } else {
+- fep->link = 0;
++ fep->linkstatus = 0;
+ }
+ if (mii_reg & 0x0080)
+ status |= PHY_STAT_ANC;
+@@ -925,7 +1259,7 @@ static void mii_parse_lxt971_sr2(uint mi
+ if (mii_reg & 0x0008)
+ status |= PHY_STAT_FAULT;
+
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static phy_cmd_t const phy_cmd_lxt971_config[] = {
+@@ -982,10 +1316,9 @@ static phy_info_t const phy_info_lxt971
+ static void mii_parse_qs6612_pcr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_SPMASK);
++ status = fep->phy_status & ~(PHY_STAT_SPMASK);
+
+ switch((mii_reg >> 2) & 7) {
+ case 1: status |= PHY_STAT_10HDX; break;
+@@ -994,7 +1327,7 @@ static void mii_parse_qs6612_pcr(uint mi
+ case 6: status |= PHY_STAT_100FDX; break;
+ }
+
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static phy_cmd_t const phy_cmd_qs6612_config[] = {
+@@ -1052,10 +1385,9 @@ static phy_info_t const phy_info_qs6612
+ static void mii_parse_am79c874_dr(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+ uint status;
+
+- status = *s & ~(PHY_STAT_SPMASK | PHY_STAT_ANC);
++ status = fep->phy_status & ~(PHY_STAT_SPMASK | PHY_STAT_ANC);
+
+ if (mii_reg & 0x0080)
+ status |= PHY_STAT_ANC;
+@@ -1064,7 +1396,7 @@ static void mii_parse_am79c874_dr(uint m
+ else
+ status |= ((mii_reg & 0x0800) ? PHY_STAT_10FDX : PHY_STAT_10HDX);
+
+- *s = status;
++ fep->phy_status = status;
+ }
+
+ static phy_cmd_t const phy_cmd_am79c874_config[] = {
+@@ -1107,7 +1439,7 @@ static phy_info_t const phy_info_am79c87
+ /* register definitions for the 8721 */
+
+ #define MII_KS8721BL_RXERCR 21
+-#define MII_KS8721BL_ICSR 27
++#define MII_KS8721BL_ICSR 22
+ #define MII_KS8721BL_PHYCR 31
+
+ static phy_cmd_t const phy_cmd_ks8721bl_config[] = {
+@@ -1149,32 +1481,31 @@ static phy_info_t const phy_info_ks8721b
+ static void mii_parse_dp8384x_sr2(uint mii_reg, struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
+
+- *s &= ~(PHY_STAT_SPMASK | PHY_STAT_LINK | PHY_STAT_ANC);
++ fep->phy_status &= ~(PHY_STAT_SPMASK | PHY_STAT_LINK | PHY_STAT_ANC);
+
+ /* Link up */
+ if (mii_reg & 0x0001) {
+- fep->link = 1;
+- *s |= PHY_STAT_LINK;
++ fep->linkstatus = 1;
++ fep->phy_status |= PHY_STAT_LINK;
+ } else
+- fep->link = 0;
++ fep->linkstatus = 0;
+ /* Status of link */
+ if (mii_reg & 0x0010) /* Autonegotioation complete */
+- *s |= PHY_STAT_ANC;
++ fep->phy_status |= PHY_STAT_ANC;
+ if (mii_reg & 0x0002) { /* 10MBps? */
+ if (mii_reg & 0x0004) /* Full Duplex? */
+- *s |= PHY_STAT_10FDX;
++ fep->phy_status |= PHY_STAT_10FDX;
+ else
+- *s |= PHY_STAT_10HDX;
++ fep->phy_status |= PHY_STAT_10HDX;
+ } else { /* 100 Mbps? */
+ if (mii_reg & 0x0004) /* Full Duplex? */
+- *s |= PHY_STAT_100FDX;
++ fep->phy_status |= PHY_STAT_100FDX;
+ else
+- *s |= PHY_STAT_100HDX;
++ fep->phy_status |= PHY_STAT_100HDX;
+ }
+ if (mii_reg & 0x0008)
+- *s |= PHY_STAT_FAULT;
++ fep->phy_status |= PHY_STAT_FAULT;
+ }
+
+ static phy_info_t phy_info_dp83848= {
+@@ -1211,92 +1542,362 @@ static phy_info_t const * const phy_info
+ &phy_info_dp83848,
+ NULL
+ };
+-
+-/* ------------------------------------------------------------------------- */
+-#ifdef HAVE_mii_link_interrupt
+-static irqreturn_t
+-mii_link_interrupt(int irq, void * dev_id);
++#endif
+
+ /*
+- * This is specific to the MII interrupt setup of the M5272EVB.
++ * do some initializtion based architecture of this chip
++MOVED to platform_data hooks!
+ */
+-static void __inline__ fec_request_mii_intr(struct net_device *dev)
+-{
+- if (request_irq(66, mii_link_interrupt, IRQF_DISABLED, "fec(MII)", dev) != 0)
+- printk("FEC: Could not allocate fec(MII) IRQ(66)!\n");
+-}
+
+-static void __inline__ fec_disable_phy_intr(void)
+-{
+- volatile unsigned long *icrp;
+- icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
+- *icrp = 0x08000000;
+-}
++#define PHY_POLL_LINK_ON (1 * HZ)
++#define PHY_POLL_LINK_OFF (HZ / 5)
+
+-static void __inline__ fec_phy_ack_intr(void)
++static int fec_mii_read(struct mii_bus *bus, int phy_id, int regnum);
++
++#ifdef CONFIG_PHYLIB
++static void fec_link_change(struct net_device *dev)
+ {
+- volatile unsigned long *icrp;
+- /* Acknowledge the interrupt */
+- icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
+- *icrp = 0x0d000000;
+-}
+-#endif
++ struct fec_enet_private *fep = netdev_priv(dev);
++ struct phy_device *phydev = fep->phy;
+
+-#ifdef CONFIG_M5272
+-static void __inline__ fec_get_mac(struct net_device *dev)
++ if (phydev->link != fep->linkstatus ||
++ phydev->duplex != fep->full_duplex) {
++ DBG(0, "%s: link status changed from %d to %d %s -> %s duplex\n", __FUNCTION__,
++ fep->linkstatus, phydev->link, fep->full_duplex ? "full" : "half",
++ phydev->duplex ? "full" : "half");
++ if (phydev->link) {
++ fec_restart(dev, phydev->duplex);
++ } else {
++ fec_stop(dev);
++ }
++ if (fep->linkstatus != phydev->link && netif_msg_link(fep)) {
++ phy_print_status(phydev);
++ }
++ fep->linkstatus = phydev->link;
++#if 0
++ int i;
++ for (i = 0; i < 32; i++) {
++ DBG(0, "%s: PHY reg[%02x]=%04x\n", __FUNCTION__, i,
++ fec_mii_read(fep->mii, fep->phy_addr, i));
++ }
++#endif
++ }
++}
++#else
++static void fec_link_change(struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile fec_t *fecp;
+- unsigned char *iap, tmpaddr[ETH_ALEN];
+
+- fecp = fep->hwp;
++ DBG(0, "%s: link status changed from %d to %d\n", __FUNCTION__,
++ fep->old_linkstatus, fep->linkstatus);
++ if (fep->linkstatus) {
++ int duplex;
+
+- if (FEC_FLASHMAC) {
+- /*
+- * Get MAC address from FLASH.
+- * If it is all 1's or 0's, use the default.
+- */
+- iap = (unsigned char *)FEC_FLASHMAC;
+- if ((iap[0] == 0) && (iap[1] == 0) && (iap[2] == 0) &&
+- (iap[3] == 0) && (iap[4] == 0) && (iap[5] == 0))
+- iap = fec_mac_default;
+- if ((iap[0] == 0xff) && (iap[1] == 0xff) && (iap[2] == 0xff) &&
+- (iap[3] == 0xff) && (iap[4] == 0xff) && (iap[5] == 0xff))
+- iap = fec_mac_default;
++ duplex = 0;
++ if (fep->phy_status & (PHY_STAT_100FDX | PHY_STAT_10FDX)) {
++ duplex = 1;
++ }
++ fec_restart(dev, duplex);
++ if (fep->phy_timer) {
++ mod_timer(fep->phy_timer, jiffies + PHY_POLL_LINK_ON);
++ }
+ } else {
+- *((unsigned long *) &tmpaddr[0]) = fecp->fec_addr_low;
+- *((unsigned short *) &tmpaddr[4]) = (fecp->fec_addr_high >> 16);
+- iap = &tmpaddr[0];
++ fec_stop(dev);
++ if (fep->phy_timer) {
++ mod_timer(fep->phy_timer, jiffies + PHY_POLL_LINK_OFF);
++ }
+ }
+
+- memcpy(dev->dev_addr, iap, ETH_ALEN);
+-
+- /* Adjust MAC if using default MAC address */
+- if (iap == fec_mac_default)
+- dev->dev_addr[ETH_ALEN-1] = fec_mac_default[ETH_ALEN-1] + fep->index;
++ fep->old_linkstatus = fep->linkstatus;
+ }
+-#endif
+
+-/* ------------------------------------------------------------------------- */
+-
+-static void mii_display_status(struct net_device *dev)
++static void fec_phy_timer(unsigned long data)
+ {
++ struct net_device *dev = (struct net_device *)data;
+ struct fec_enet_private *fep = netdev_priv(dev);
+- volatile uint *s = &(fep->phy_status);
++ int link_poll_interval = fep->linkstatus ? PHY_POLL_LINK_ON : PHY_POLL_LINK_OFF;
+
+- if (!fep->link && !fep->old_link) {
+- /* Link is still down - don't print anything */
++ if (fep->old_linkstatus != fep->linkstatus) {
++ fec_link_change(dev);
++ }
++ mod_timer(fep->phy_timer, link_poll_interval);
++}
++#endif
++
++/*
++ * Code specific to Freescale i.MXC
++ */
++static int fec_request_intrs(struct platform_device *pdev, struct net_device *dev)
++{
++ int ret;
++ struct fec_enet_private *fep = netdev_priv(dev);
++
++ fep->etn_irq = platform_get_irq(pdev, 0);
++ fep->mii_irq = platform_get_irq(pdev, 1);
++
++ /* Setup interrupt handlers. */
++ ret = request_irq(fep->etn_irq, fec_enet_interrupt, 0, "fec", dev);
++ if (ret != 0) {
++ printk(KERN_ERR "FEC: Could not allocate FEC IRQ(%d)!\n", fep->etn_irq);
++ return ret;
++ }
++#ifndef CONFIG_PHYLIB
++ if (fep->mii_irq >= 0) {
++ /* TODO: disable now due to CPLD issue */
++ ret = request_irq(fep->mii_irq, mii_link_interrupt, 0, "fec(MII)", dev);
++ if (ret != 0) {
++ printk(KERN_ERR "FEC: Could not allocate FEC(MII) IRQ(%d)!\n",
++ fep->mii_irq);
++ free_irq(fep->etn_irq, dev);
++ return ret;
++ }
++ /*
++ * board specific workaround should be done in board specific code
++ * This is unsafe anyway. An interrupt might have been asserted
++ * already. Use IRQ_NOAUTOEN with request_irq() to have irq initially disabled.
++ */
++ fep->phy_int_enabled = 1;
++ } else {
++ fep->phy_timer = kzalloc(sizeof(struct timer_list), GFP_KERNEL);
++ if (fep->phy_timer == NULL) {
++ free_irq(fep->etn_irq, dev);
++ return -ENOMEM;
++ }
++ init_timer(fep->phy_timer);
++ fep->phy_timer->function = fec_phy_timer;
++ fep->phy_timer->data = (unsigned long)dev;
++ fec_link_change(dev);
++ }
++#endif
++
++ return 0;
++}
++
++static void fec_release_intrs(struct net_device *dev)
++{
++ struct fec_enet_private *fep = netdev_priv(dev);
++
++ free_irq(fep->etn_irq, dev);
++#ifndef CONFIG_PHYLIB
++ if (fep->mii_irq >= 0) {
++ free_irq(fep->mii_irq, dev);
++ }
++#endif
++}
++
++#ifdef CONFIG_MACH_MX25
++/*
++ * i.MX25 allows RMII mode to be configured via a gasket
++ */
++#define FEC_MIIGSK_CFGR 0x300
++#define FEC_MIIGSK_ENR 0x308
++
++#define FEC_MIIGSK_CFGR_FRCONT (1 << 6)
++#define FEC_MIIGSK_CFGR_LBMODE (1 << 4)
++#define FEC_MIIGSK_CFGR_EMODE (1 << 3)
++#define FEC_MIIGSK_CFGR_IF_MODE_MASK (3 << 0)
++#define FEC_MIIGSK_CFGR_IF_MODE_MII (0 << 0)
++#define FEC_MIIGSK_CFGR_IF_MODE_RMII (1 << 0)
++
++#define FEC_MIIGSK_ENR_READY (1 << 2)
++#define FEC_MIIGSK_ENR_EN (1 << 1)
++
++#ifndef DEBUG
++static inline unsigned long fec_reg_read16(struct fec_enet_private *fep, unsigned int reg)
++{
++ return readw(fep->reg_base + reg);
++}
++
++static inline void fec_reg_write(struct fec_enet_private *fep, unsigned int reg, unsigned long val)
++{
++ writew(val, fep->reg_base + reg);
++}
++#else
++#define fec_reg_read16(fep, reg) __fec_reg_read16(fep, reg, __FUNCTION__, #reg)
++#define fec_reg_write16(fep, reg, val) __fec_reg_write16(fep, reg, val, __FUNCTION__, #reg)
++
++static inline u16 __fec_reg_read16(struct fec_enet_private *fep, unsigned int reg,
++ const char *func, const char *reg_name)
++{
++ u16 val = readw(fep->reg_base + reg);
++ DBG(0, "%s: Read %04x from %s(%03x)\n", func, val, reg_name, reg);
++ return val;
++}
++
++static inline void __fec_reg_write16(struct fec_enet_private *fep, unsigned int reg,
++ u16 val, const char *func, const char *reg_name)
++{
++ DBG(0, "%s: Writing %04x to %s(%03x)\n", func, val, reg_name, reg);
++ writew(val, fep->reg_base + reg);
++}
++#endif
++
++static void fec_localhw_setup(struct net_device *dev)
++{
++ struct fec_enet_private *fep = netdev_priv(dev);
++ int loops;
++ const int max_loops = 10000;
++
++ /*
++ * Set up the MII gasket for RMII mode
++ */
++ dev_dbg(&dev->dev, "enable RMII gasket\n");
++
++ /* disable the gasket and wait */
++ fec_reg_write16(fep, FEC_MIIGSK_ENR, 0);
++ DBG(0, "%s: Waiting for RMII gasket idle\n", __FUNCTION__);
++ while (fec_reg_read16(fep, FEC_MIIGSK_ENR) & FEC_MIIGSK_ENR_READY)
++ udelay(1);
++ DBG(0, "%s: RMII gasket idle\n", __FUNCTION__);
++
++ /* configure the gasket for RMII, 50 MHz, no loopback, no echo */
++ fec_reg_write16(fep, FEC_MIIGSK_CFGR, FEC_MIIGSK_CFGR_IF_MODE_RMII);
++
++ /* re-enable the gasket */
++ fec_reg_write16(fep, FEC_MIIGSK_ENR, FEC_MIIGSK_ENR_EN);
++ fec_reg_read16(fep, FEC_MIIGSK_CFGR);
++ fec_reg_read16(fep, FEC_MIIGSK_ENR);
++
++#if 1
++ DBG(0, "%s: Waiting for RMII gasket ready\n", __FUNCTION__);
++ for (loops = 0; loops < max_loops; loops++) {
++ if (readw(fep->reg_base + FEC_MIIGSK_ENR) & FEC_MIIGSK_ENR_READY)
++ break;
++ udelay(1);
++ }
++ if (fec_reg_read16(fep, FEC_MIIGSK_ENR) & FEC_MIIGSK_ENR_READY) {
++ DBG(0, "%s: RMII gasket ready after %u loops\n", __FUNCTION__, loops);
++ } else {
++ DBG(0, "%s: RMII gasket NOT ready after %u loops\n", __FUNCTION__, loops);
++ }
++#endif
++}
++#else
++static inline void fec_localhw_setup(struct net_device *dev)
++{
++}
++#endif
++
++static int fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)
++{
++ unsigned long rate;
++ struct clk *clk;
++
++ DBG(0, "%s: \n", __FUNCTION__);
++
++ fec_reg_write(fep, FEC_RCR, OPT_FRAME_SIZE | RCR_MII_MODE);
++ fec_reg_write(fep, FEC_TCR, 0x00);
++
++ /*
++ * Set MII speed to 2.5 MHz
++ */
++ clk = clk_get(fep->dma_dev, NULL);
++ if (!IS_ERR(clk)) {
++ rate = clk_get_rate(clk);
++ clk_put(clk);
++ } else {
++ printk(KERN_ERR "Failed to get fec clock: %ld\n", PTR_ERR(clk));
++ return PTR_ERR(clk);
++ }
++ fep->phy_speed = ((((rate + 4999999) / 2500000) / 2) & 0x3F) << 1;
++ fec_reg_write(fep, FEC_MSCR, fep->phy_speed);
++ DBG(0, "%s: clkdiv set to %u for MII clock %u at base clock %lu\n",
++ __FUNCTION__, fep->phy_speed >> 1, 2500000, rate);
++ DBG(0, "%s: actual MII clock is: %lu\n", __FUNCTION__, rate / (fep->phy_speed));
++
++ return 0;
++}
++
++static const unsigned char default_mac[ETH_ALEN] = {
++ 0x00, 0x04, 0x9f, 0x00, 0x74, 0x4a,
++};
++
++#define FEC_IIM_BASE IO_ADDRESS(IIM_BASE_ADDR)
++static void fec_get_mac(struct net_device *dev)
++{
++#if 1
++ // keep bootloader assigned MAC address
++ struct fec_enet_private *fep = netdev_priv(dev);
++ unsigned long eth_addr = fec_reg_read(fep, FEC_PALR);
++ dev->dev_addr[0] = eth_addr >> 24;
++ dev->dev_addr[1] = eth_addr >> 16;
++ dev->dev_addr[2] = eth_addr >> 8;
++ dev->dev_addr[3] = eth_addr >> 0;
++ eth_addr = fec_reg_read(fep, FEC_PAUR);
++ dev->dev_addr[5] = eth_addr >> 16;
++ dev->dev_addr[4] = eth_addr >> 24;
++#else
++ int i;
++ unsigned long fec_mac_base = FEC_IIM_BASE + MXC_IIMKEY0;
++
++ if (cpu_is_mx27_rev(CHIP_REV_2_0) > 0) {
++ fec_mac_base = FEC_IIM_BASE + MXC_IIMMAC;
++ }
++
++ DBG(0, "%s: Reading MAC address from %08lx\n", __FUNCTION__, fec_mac_base);
++ for (i = 0; i < ETH_ALEN; i++) {
++ dev->dev_addr[ETH_ALEN - 1 - i] = __raw_readb(fec_mac_base + i * 4);
++ }
++ //memcpy(dev->dev_addr, default_mac, ETH_ALEN);
++#endif
++}
++
++#ifdef CONFIG_PHYLIB
++static inline void fec_enable_phy_intr(struct fec_enet_private *fep)
++{
++}
++static inline void fec_disable_phy_intr(struct fec_enet_private *fep)
++{
++}
++static inline void fec_phy_ack_intr(struct fec_enet_private *fep)
++{
++}
++#else
++static inline void fec_enable_phy_intr(struct fec_enet_private *fep)
++{
++ if (!fep->phy_int_enabled) {
++ fep->phy_int_enabled = 1;
++ enable_irq(fep->mii_irq);
++ }
++}
++
++static inline void fec_disable_phy_intr(struct fec_enet_private *fep)
++{
++ if (fep->phy_int_enabled) {
++ disable_irq(fep->mii_irq);
++ fep->phy_int_enabled = 0;
++ }
++}
++
++static inline void fec_phy_ack_intr(struct fec_enet_private *fep)
++{
++ if (fep->phy_int_enabled) {
++ disable_irq(fep->mii_irq);
++ fep->phy_int_enabled = 0;
++ }
++}
++#endif
++
++/* ------------------------------------------------------------------------- */
++
++#ifndef CONFIG_PHYLIB
++static void mii_display_status(struct net_device *dev)
++{
++ struct fec_enet_private *fep = netdev_priv(dev);
++
++ if (!fep->linkstatus && !fep->old_linkstatus) {
++ /* Link is still down - don't print anything */
+ return;
+ }
+
+ printk("%s: status: ", dev->name);
+
+- if (!fep->link) {
++ if (!fep->linkstatus) {
+ printk("link down");
+ } else {
+ printk("link up");
+
+- switch(*s & PHY_STAT_SPMASK) {
++ switch(fep->phy_status & PHY_STAT_SPMASK) {
+ case PHY_STAT_100FDX: printk(", 100MBit Full Duplex"); break;
+ case PHY_STAT_100HDX: printk(", 100MBit Half Duplex"); break;
+ case PHY_STAT_10FDX: printk(", 10MBit Full Duplex"); break;
+@@ -1305,20 +1906,19 @@ static void mii_display_status(struct ne
+ printk(", Unknown speed/duplex");
+ }
+
+- if (*s & PHY_STAT_ANC)
++ if (fep->phy_status & PHY_STAT_ANC)
+ printk(", auto-negotiation complete");
+ }
+
+- if (*s & PHY_STAT_FAULT)
++ if (fep->phy_status & PHY_STAT_FAULT)
+ printk(", remote fault");
+
+ printk(".\n");
+ }
+
+-static void mii_display_config(struct work_struct *work)
++static void mii_display_config(struct work_struct *w)
+ {
+- struct fec_enet_private *fep = container_of(work, struct fec_enet_private, phy_task);
+- struct net_device *dev = fep->netdev;
++ struct fec_enet_private *fep = container_of(w, struct fec_enet_private, phy_task);
+ uint status = fep->phy_status;
+
+ /*
+@@ -1326,7 +1926,7 @@ static void mii_display_config(struct wo
+ ** the workqueue. It is thus safe to allow to reuse it.
+ */
+ fep->mii_phy_task_queued = 0;
+- printk("%s: config: auto-negotiation ", dev->name);
++ //printk("%s: config: auto-negotiation ", dev->name);
+
+ if (status & PHY_CONF_ANE)
+ printk("on");
+@@ -1351,11 +1951,21 @@ static void mii_display_config(struct wo
+
+ fep->sequence_done = 1;
+ }
++#endif
+
+-static void mii_relink(struct work_struct *work)
++#ifndef CONFIG_PHYLIB
++static inline void *priv_netdev(struct fec_enet_private *fep)
+ {
+- struct fec_enet_private *fep = container_of(work, struct fec_enet_private, phy_task);
+- struct net_device *dev = fep->netdev;
++ /* ugly hack, stolen from include linux/netdevice.h */
++ return (char *)fep - ((sizeof(struct net_device)
++ + NETDEV_ALIGN_CONST)
++ & ~NETDEV_ALIGN_CONST);
++}
++
++static void mii_relink(struct work_struct *w)
++{
++ struct fec_enet_private *fep = container_of(w, struct fec_enet_private, phy_task);
++ struct net_device *dev = priv_netdev(fep);
+ int duplex;
+
+ /*
+@@ -1363,23 +1973,19 @@ static void mii_relink(struct work_struc
+ ** the workqueue. It is thus safe to allow to reuse it.
+ */
+ fep->mii_phy_task_queued = 0;
+- fep->link = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0;
++ fep->linkstatus = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0;
+ mii_display_status(dev);
+- fep->old_link = fep->link;
++ fep->old_linkstatus = fep->linkstatus;
+
+- if (fep->link) {
++ if (fep->linkstatus) {
+ duplex = 0;
+- if (fep->phy_status
+- & (PHY_STAT_100FDX | PHY_STAT_10FDX))
++ if (fep->phy_status & (PHY_STAT_100FDX | PHY_STAT_10FDX)) {
+ duplex = 1;
++ }
+ fec_restart(dev, duplex);
+- } else
++ } else {
+ fec_stop(dev);
+-
+-#if 0
+- enable_irq(fep->mii_irq);
+-#endif
+-
++ }
+ }
+
+ /* mii_queue_relink is called in interrupt context from mii_link_interrupt */
+@@ -1429,15 +2035,14 @@ phy_cmd_t const phy_cmd_config[] = {
+ static void
+ mii_discover_phy3(uint mii_reg, struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ int i;
+
+- fep = netdev_priv(dev);
+ fep->phy_id |= (mii_reg & 0xffff);
+ printk("fec: PHY @ 0x%x, ID 0x%08x", fep->phy_addr, fep->phy_id);
+
+- for(i = 0; phy_info[i]; i++) {
+- if(phy_info[i]->id == (fep->phy_id >> 4))
++ for (i = 0; phy_info[i]; i++) {
++ if (phy_info[i]->id == (fep->phy_id >> 4))
+ break;
+ }
+
+@@ -1456,13 +2061,9 @@ mii_discover_phy3(uint mii_reg, struct n
+ static void
+ mii_discover_phy(uint mii_reg, struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *fecp;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ uint phytype;
+
+- fep = netdev_priv(dev);
+- fecp = fep->hwp;
+-
+ if (fep->phy_addr < 32) {
+ if ((phytype = (mii_reg & 0xffff)) != 0xffff && phytype != 0) {
+
+@@ -1470,39 +2071,40 @@ mii_discover_phy(uint mii_reg, struct ne
+ */
+ fep->phy_id = phytype << 16;
+ mii_queue(dev, mk_mii_read(MII_REG_PHYIR2),
+- mii_discover_phy3);
++ mii_discover_phy3);
+ } else {
+ fep->phy_addr++;
+ mii_queue(dev, mk_mii_read(MII_REG_PHYIR1),
+- mii_discover_phy);
++ mii_discover_phy);
+ }
+ } else {
+ printk("FEC: No PHY device found.\n");
+ /* Disable external MII interface */
+- fecp->fec_mii_speed = fep->phy_speed = 0;
+-#ifdef HAVE_mii_link_interrupt
+- fec_disable_phy_intr();
+-#endif
++ fec_disable_phy_intr(fep);
++ fec_reg_write(fep, FEC_MSCR, 0);
+ }
+ }
++#endif
+
+-/* This interrupt occurs when the PHY detects a link change.
+-*/
+-#ifdef HAVE_mii_link_interrupt
++#ifndef CONFIG_PHYLIB
+ static irqreturn_t
+-mii_link_interrupt(int irq, void * dev_id)
++mii_link_interrupt(int irq, void *dev_id)
+ {
+- struct net_device *dev = dev_id;
++ struct net_device *dev = dev_id;
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+- fec_phy_ack_intr();
++ DBG(0, "%s: \n", __FUNCTION__);
+
+-#if 0
+- disable_irq(fep->mii_irq); /* disable now, enable later */
+-#endif
++ fec_phy_ack_intr(fep);
+
+- mii_do_cmd(dev, fep->phy->ack_int);
+- mii_do_cmd(dev, phy_cmd_relink); /* restart and display status */
++ /*
++ * Some board will trigger phy interrupt before phy enable.
++ * And at that moment , fep->phy is not initialized.
++ */
++ if (fep->phy) {
++ mii_do_cmd(dev, fep->phy->ack_int);
++ mii_do_cmd(dev, phy_cmd_relink); /* restart and display status */
++ }
+
+ return IRQ_HANDLED;
+ }
+@@ -1511,16 +2113,31 @@ mii_link_interrupt(int irq, void * dev_i
+ static int
+ fec_enet_open(struct net_device *dev)
+ {
++ int ret = 0;
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+ /* I should reset the ring buffers here, but I don't yet know
+ * a simple way to do that.
+ */
+- fec_set_mac_address(dev);
++ DBG(0, "%s: \n", __FUNCTION__);
++ _fec_set_mac_address(dev);
+
+- fep->sequence_done = 0;
+- fep->link = 0;
++#ifdef CONFIG_PHYLIB
++ fec_restart(dev, 0);
+
++ ret = fec_connect_phy(dev, fep);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to connect to PHY: %d\n", __FUNCTION__, ret);
++ return ret;
++ }
++ phy_start(fep->phy);
++
++ fep->linkstatus = fep->phy->link;
++ //fec_restart(dev, 0);
++ DBG(0, "%s: Link status is: %d\n", __FUNCTION__, fep->linkstatus);
++#else
++ fep->linkstatus = 0;
++ fep->sequence_done = 0;
+ if (fep->phy) {
+ mii_do_cmd(dev, fep->phy->ack_int);
+ mii_do_cmd(dev, fep->phy->config);
+@@ -1542,16 +2159,20 @@ fec_enet_open(struct net_device *dev)
+ * based on this device does not implement a PHY interrupt,
+ * so we are never notified of link change.
+ */
+- fep->link = 1;
++ fep->linkstatus = 1;
+ } else {
+- fep->link = 1; /* lets just try it and see */
++ fep->linkstatus = 1; /* lets just try it and see */
+ /* no phy, go full duplex, it's most likely a hub chip */
+ fec_restart(dev, 1);
+ }
+-
+- netif_start_queue(dev);
++ fep->old_linkstatus = fep->linkstatus;
++#endif
+ fep->opened = 1;
+- return 0; /* Success */
++#if 1
++ /* enable receiver */
++ fec_reg_write(fep, FEC_RDAR, DONT_CARE);
++#endif
++ return ret;
+ }
+
+ static int
+@@ -1559,15 +2180,46 @@ fec_enet_close(struct net_device *dev)
+ {
+ struct fec_enet_private *fep = netdev_priv(dev);
+
+- /* Don't know what to do yet.
+- */
++ DBG(0, "%s: \n", __FUNCTION__);
++
+ fep->opened = 0;
+- netif_stop_queue(dev);
+- fec_stop(dev);
++ if (fep->linkstatus) {
++ fec_stop(dev);
++ }
++#ifdef CONFIG_PHYLIB
++ if (fep->phy) {
++ DBG(0, "%s: Stopping PHY %p\n", __FUNCTION__, fep->phy);
++ phy_stop(fep->phy);
+
++ DBG(0, "%s: Disconnecting PHY %p\n", __FUNCTION__, fep->phy);
++ phy_disconnect(fep->phy);
++ fep->phy = NULL;
++ }
++#endif
++#if 1
++ /* Whack a reset. We should wait for this.
++ */
++ fec_reg_write(fep, FEC_ECR, FEC_ECR_RESET);
++ udelay(10);
++
++ /* Mask and clear outstanding MII command interrupts.
++ */
++ fec_reg_write(fep, FEC_EIMR, 0);
++ fec_reg_write(fep, FEC_EIR, FEC_ENET_MII);
++ fec_disable_phy_intr(fep);
++ /* Switch off MII */
++ fec_reg_write(fep, FEC_MSCR, 0);
++#endif
+ return 0;
+ }
+
++static struct net_device_stats *fec_enet_get_stats(struct net_device *dev)
++{
++ struct fec_enet_private *fep = netdev_priv(dev);
++
++ return &fep->stats;
++}
++
+ /* Set or clear the multicast filter for this adaptor.
+ * Skeleton taken from sunlance driver.
+ * The CPM Ethernet implementation allows Multicast as well as individual
+@@ -1583,37 +2235,32 @@ fec_enet_close(struct net_device *dev)
+
+ static void set_multicast_list(struct net_device *dev)
+ {
+- struct fec_enet_private *fep;
+- volatile fec_t *ep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+ struct dev_mc_list *dmi;
+ unsigned int i, j, bit, data, crc;
+ unsigned char hash;
+
+- fep = netdev_priv(dev);
+- ep = fep->hwp;
+-
+- if (dev->flags&IFF_PROMISC) {
+- ep->fec_r_cntrl |= 0x0008;
++ if (dev->flags & IFF_PROMISC) {
++ fec_reg_write(fep, FEC_RCR, fec_reg_read(fep, FEC_RCR) | RCR_PROM);
+ } else {
+
+- ep->fec_r_cntrl &= ~0x0008;
++ fec_reg_write(fep, FEC_RCR, fec_reg_read(fep, FEC_RCR) & ~RCR_PROM);
+
+ if (dev->flags & IFF_ALLMULTI) {
+ /* Catch all multicast addresses, so set the
+ * filter to all 1's.
+ */
+- ep->fec_grp_hash_table_high = 0xffffffff;
+- ep->fec_grp_hash_table_low = 0xffffffff;
++ fec_reg_write(fep, FEC_IAUR, ~0);
++ fec_reg_write(fep, FEC_IALR, ~0);
+ } else {
+ /* Clear filter and add the addresses in hash register.
+ */
+- ep->fec_grp_hash_table_high = 0;
+- ep->fec_grp_hash_table_low = 0;
++ fec_reg_write(fep, FEC_IAUR, 0);
++ fec_reg_write(fep, FEC_IALR, 0);
+
+ dmi = dev->mc_list;
+
+- for (j = 0; j < dev->mc_count; j++, dmi = dmi->next)
+- {
++ for (j = 0; j < dev->mc_count; j++, dmi = dmi->next) {
+ /* Only support group multicast for now.
+ */
+ if (!(dmi->dmi_addr[0] & 1))
+@@ -1621,13 +2268,11 @@ static void set_multicast_list(struct ne
+
+ /* calculate crc32 value of mac address
+ */
+- crc = 0xffffffff;
++ crc = ~0;
+
+- for (i = 0; i < dmi->dmi_addrlen; i++)
+- {
++ for (i = 0; i < dmi->dmi_addrlen; i++) {
+ data = dmi->dmi_addr[i];
+- for (bit = 0; bit < 8; bit++, data >>= 1)
+- {
++ for (bit = 0; bit < 8; bit++, data >>= 1) {
+ crc = (crc >> 1) ^
+ (((crc ^ data) & 1) ? CRC32_POLY : 0);
+ }
+@@ -1639,9 +2284,13 @@ static void set_multicast_list(struct ne
+ hash = (crc >> (32 - HASH_BITS)) & 0x3f;
+
+ if (hash > 31)
+- ep->fec_grp_hash_table_high |= 1 << (hash - 32);
++ fec_reg_write(fep, FEC_IAUR,
++ fec_reg_read(fep, FEC_IAUR) |
++ (1 << (hash - 32)));
+ else
+- ep->fec_grp_hash_table_low |= 1 << hash;
++ fec_reg_write(fep, FEC_IALR,
++ fec_reg_read(fep, FEC_IALR) |
++ (1 << hash));
+ }
+ }
+ }
+@@ -1650,106 +2299,272 @@ static void set_multicast_list(struct ne
+ /* Set a MAC change in hardware.
+ */
+ static void
+-fec_set_mac_address(struct net_device *dev)
++_fec_set_mac_address(struct net_device *dev)
+ {
+- volatile fec_t *fecp;
+-
+- fecp = ((struct fec_enet_private *)netdev_priv(dev))->hwp;
++ struct fec_enet_private *fep = netdev_priv(dev);
+
+ /* Set station address. */
+- fecp->fec_addr_low = dev->dev_addr[3] | (dev->dev_addr[2] << 8) |
+- (dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24);
+- fecp->fec_addr_high = (dev->dev_addr[5] << 16) |
+- (dev->dev_addr[4] << 24);
++ fec_reg_write(fep, FEC_PALR, dev->dev_addr[3] | (dev->dev_addr[2] << 8) |
++ (dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24));
++ fec_reg_write(fep, FEC_PAUR, (dev->dev_addr[5] << 16) |
++ (dev->dev_addr[4] << 24));
++}
++
++static int
++fec_set_mac_address(struct net_device *dev, void *_addr)
++{
++ struct sockaddr *addr = _addr;
++
++ if (!is_valid_ether_addr((const char *)&addr->sa_data)) {
++ printk(KERN_WARNING "Bad ethernet address: %02x:%02x:%02x:%02x:%02x:%02x\n",
++ addr->sa_data[0], addr->sa_data[1], addr->sa_data[2], addr->sa_data[3],
++ addr->sa_data[4], addr->sa_data[5]);
++ return -EINVAL;
++ }
++ printk(KERN_DEBUG "Setting MAC address to %02x:%02x:%02x:%02x:%02x:%02x\n",
++ addr->sa_data[0], addr->sa_data[1], addr->sa_data[2], addr->sa_data[3],
++ addr->sa_data[4], addr->sa_data[5]);
++
++ memcpy(&dev->dev_addr, &addr->sa_data, ETH_ALEN);
+
++ _fec_set_mac_address(dev);
++
++ return 0;
+ }
+
+- /*
+- * XXX: We need to clean up on failure exits here.
+- *
+- * index is only used in legacy code
+- */
+-int __init fec_enet_init(struct net_device *dev, int index)
++static void fec_enet_free_buffers(struct fec_enet_private *fep)
++{
++ cbd_t *bdp = fep->rx_bd_base;
++ int i;
++
++ DBG(0, "%s: Freeing TX bounce buffers %p\n", __FUNCTION__, fep->tx_bounce[0]);
++ kfree(fep->tx_bounce[0]);
++ memset(fep->tx_bounce, 0, TX_RING_SIZE * sizeof(void*));
++ for (i = 0; i < RX_RING_SIZE; i++, bdp++) {
++ if (fep->rx_skbuff[i] != NULL) {
++ DBG(0, "%s: Freeing RX skb %p\n", __FUNCTION__, fep->rx_skbuff[i]);
++ fec_enet_rxbuf_unmap(fep, bdp, FEC_ENET_RX_FRSIZE);
++ kfree_skb(fep->rx_skbuff[i]);
++ fep->rx_skbuff[i] = NULL;
++ }
++ }
++}
++
++#ifdef CONFIG_PHYLIB
++/* called by the generic PHY layer in interrupt context */
++static int phy_regs[32] = { [0 ... ARRAY_SIZE(phy_regs) - 1] = -1};
++static int fec_mii_read(struct mii_bus *bus, int phy_id, int regnum)
+ {
++ int ret;
++ struct net_device *dev = bus->priv;
+ struct fec_enet_private *fep = netdev_priv(dev);
+- unsigned long mem_addr;
+- volatile cbd_t *bdp;
+- cbd_t *cbd_base;
+- volatile fec_t *fecp;
+- int i, j;
++ unsigned long regval = mk_mii_read(regnum) | phy_id << 23;
++ unsigned long flags;
++ int loops = 0;
+
+- /* Allocate memory for buffer descriptors.
+- */
+- mem_addr = (unsigned long)dma_alloc_coherent(NULL, PAGE_SIZE,
+- &fep->bd_dma, GFP_KERNEL);
+- if (mem_addr == 0) {
+- printk("FEC: allocate descriptor memory failed?\n");
++ DBG(1, "%s: \n", __FUNCTION__);
++#if 0
++ DBG(0, "%s: ECR: %08lx\n", __FUNCTION__, fec_reg_read(fep, FEC_ECR));
++ DBG(0, "%s: EIR: %08lx\n", __FUNCTION__, fec_reg_read(fep, FEC_EIR));
++ DBG(0, "%s: EIMR: %08lx\n", __FUNCTION__, fec_reg_read(fep, FEC_EIMR));
++ DBG(0, "%s: RCR: %08lx\n", __FUNCTION__, fec_reg_read(fep, FEC_RCR));
++ DBG(0, "%s: TCR: %08lx\n", __FUNCTION__, fec_reg_read(fep, FEC_TCR));
++#endif
++ spin_lock_irqsave(&fep->lock, flags);
++ fep->mii_complete = 0;
++ fec_reg_write(fep, FEC_MMFR, regval);
++ spin_unlock_irqrestore(&fep->lock, flags);
++
++ while (!fep->mii_complete) {
++ if (loops++ == 1000) {
++ DBG(1, "%s: Waiting for MII completion\n", __FUNCTION__);
++ }
++ cpu_relax();
++ }
++ if (loops >= 1000) {
++ DBG(1, "%s: MII transaction completed\n", __FUNCTION__);
++ }
++ ret = fec_reg_read(fep, FEC_MMFR);
++ if (ret < 0) {
++ DBG(0, "%s: Failed to read PHY[%02x] reg %02x: %d\n", __FUNCTION__,
++ phy_id, regnum, ret);
++ return ret;
++ }
++ ret &= 0xffff;
++ if (phy_regs[regnum] != ret) {
++ DBG(1, "%s: Read %04x from PHY[%02x] reg %02x\n", __FUNCTION__,
++ ret, phy_id, regnum);
++ phy_regs[regnum] = ret;
++ }
++ return ret;
++}
++
++static int fec_mii_write(struct mii_bus *bus, int phy_id, int regnum, u16 val)
++{
++ struct net_device *dev = bus->priv;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ unsigned long regval = mk_mii_write(regnum, val) | phy_id << 23;
++ unsigned long flags;
++
++ DBG(0, "%s: \n", __FUNCTION__);
++
++ spin_lock_irqsave(&fep->lock, flags);
++ fep->mii_complete = 0;
++ fec_reg_write(fep, FEC_MMFR, regval);
++ spin_unlock_irqrestore(&fep->lock, flags);
++
++ while (!fep->mii_complete) {
++ cpu_relax();
++ }
++ DBG(1, "%s: Wrote %04x to PHY[%02x] reg %02x\n", __FUNCTION__, val, phy_id, regnum);
++ return 0;
++}
++
++static int fec_mii_reset(struct mii_bus *bus)
++{
++ DBG(0, "%s: \n", __FUNCTION__);
++ memset(phy_regs, -1, sizeof(phy_regs));
++ return 0;
++}
++
++static int fec_init_phy(struct net_device *dev, struct fec_enet_private *fep)
++{
++ int ret;
++ int i;
++ struct mii_bus *mii;
++
++ mii = mdiobus_alloc();
++ if (mii == NULL) {
+ return -ENOMEM;
+ }
++ mii->name = "fec mii";
++ mii->read = fec_mii_read;
++ mii->write = fec_mii_write;
++ mii->reset = fec_mii_reset;
++ mii->priv = dev;
++ snprintf(mii->id, MII_BUS_ID_SIZE, "%x", 0);
++ mii->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
++ for (i = 0; i < PHY_MAX_ADDR; i++) {
++ mii->irq[i] = fep->mii_irq >= 0 ? fep->mii_irq : PHY_POLL;
++ }
++
++ ret = mdiobus_register(mii);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to register MII bus: %d\n", __FUNCTION__, ret);
++ kfree(mii->irq);
++ mdiobus_free(mii);
++ return ret;
++ }
++ fep->phy_addr = -1;
++ DBG(0, "%s: MII bus registered\n", __FUNCTION__);
++ for (i = 0; i < PHY_MAX_ADDR; i++) {
++ if (mii->phy_map[i] != NULL) {
++ fep->phy_addr = i;
++ break;
++ }
++ }
++ if (fep->phy_addr == -1) {
++ DBG(0, "%s: No PHY found\n", __FUNCTION__);
++ return -ENODEV;
++ }
++ DBG(0, "%s: Using PHY at addr %02x\n", __FUNCTION__, fep->phy_addr);
++ fep->mii = mii;
+
+- spin_lock_init(&fep->hw_lock);
+- spin_lock_init(&fep->mii_lock);
++ return 0;
++}
+
+- /* Create an Ethernet device instance.
+- */
+- fecp = (volatile fec_t *)dev->base_addr;
++static int fec_connect_phy(struct net_device *dev, struct fec_enet_private *fep)
++{
++ struct mii_bus *mii = fep->mii;
+
+- fep->index = index;
+- fep->hwp = fecp;
+- fep->netdev = dev;
++ DBG(0, "%s: Connecting PHY at addr %02x\n", __FUNCTION__,
++ fep->phy_addr);
+
+- /* Whack a reset. We should wait for this.
+- */
+- fecp->fec_ecntrl = 1;
+- udelay(10);
++ fep->phy = phy_connect(dev, dev_name(&mii->phy_map[fep->phy_addr]->dev),
++ fec_link_change, 0, mii->phy_map[fep->phy_addr]->interface);
++ if (IS_ERR(fep->phy)) {
++ int ret = PTR_ERR(fep->phy);
++ printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
++ fep->phy = NULL;
++ return ret;
++ }
++ DBG(0, "%s: Registered PHY %s[%02x] IRQ %d with %s\n", __FUNCTION__,
++ dev_name(&fep->phy->dev), fep->phy_addr, fep->phy->irq, dev->name);
+
+- /* Set the Ethernet address */
+-#ifdef CONFIG_M5272
+- fec_get_mac(dev);
++ return 0;
++}
+ #else
+- {
+- unsigned long l;
+- l = fecp->fec_addr_low;
+- dev->dev_addr[0] = (unsigned char)((l & 0xFF000000) >> 24);
+- dev->dev_addr[1] = (unsigned char)((l & 0x00FF0000) >> 16);
+- dev->dev_addr[2] = (unsigned char)((l & 0x0000FF00) >> 8);
+- dev->dev_addr[3] = (unsigned char)((l & 0x000000FF) >> 0);
+- l = fecp->fec_addr_high;
+- dev->dev_addr[4] = (unsigned char)((l & 0xFF000000) >> 24);
+- dev->dev_addr[5] = (unsigned char)((l & 0x00FF0000) >> 16);
+- }
++static int fec_init_phy(struct net_device *dev, struct fec_enet_private *fep)
++{
++ /* Queue up command to detect the PHY and initialize the
++ * remainder of the interface.
++ */
++ fep->phy_id_done = 0;
++ fep->phy_addr = 0;
++ mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy);
++
++ return 0;
++}
+ #endif
+
+- cbd_base = (cbd_t *)mem_addr;
++/* Initialize the FEC Ethernet on 860T (or ColdFire 5272).
++ */
++ /*
++ * XXX: We need to clean up on failure exits here.
++ */
+
+- /* Set receive and transmit descriptor base.
++int __devinit fec_enet_init(struct platform_device *pdev, struct net_device *dev)
++{
++ int ret;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
++ struct sk_buff *pskb;
++ int i;
++ void *mem;
++
++ spin_lock_init(&fep->lock);
++
++ /* Whack a reset. We should wait for this.
+ */
+- fep->rx_bd_base = cbd_base;
+- fep->tx_bd_base = cbd_base + RX_RING_SIZE;
++ fec_reg_write(fep, FEC_ECR, FEC_ECR_RESET);
++ udelay(10);
++
++ /* Set the Ethernet address. If using multiple Enets on the 8xx,
++ * this needs some work to get unique addresses.
++ *
++ * This is our default MAC address unless the user changes
++ * it via eth_mac_addr (our dev->set_mac_addr handler).
++ */
++ fec_get_mac(dev);
+
+ fep->dirty_tx = fep->cur_tx = fep->tx_bd_base;
+ fep->cur_rx = fep->rx_bd_base;
+
+ fep->skb_cur = fep->skb_dirty = 0;
+
+- /* Initialize the receive buffer descriptors.
++ /* allocate memory for TX bounce buffers */
++ mem = kzalloc(TX_RING_SIZE * FEC_ENET_TX_FRSIZE, GFP_KERNEL);
++ if (mem == NULL) {
++ return -ENOMEM;
++ }
++
++ fec_enet_cbd_get(fep);
++
++ /* Initialize the transmit buffer descriptors.
+ */
+- bdp = fep->rx_bd_base;
+- for (i=0; i<FEC_ENET_RX_PAGES; i++) {
++ bdp = fep->tx_bd_base;
+
+- /* Allocate a page.
+- */
+- mem_addr = __get_free_page(GFP_KERNEL);
+- /* XXX: missing check for allocation failure */
++ DBG(0, "%s: Allocated %d byte of TX buffer memory @ %p\n", __FUNCTION__,
++ TX_RING_SIZE * FEC_ENET_TX_FRSIZE, mem);
++ for (i = 0; i < TX_RING_SIZE; i++) {
++ fep->tx_bounce[i] = mem;
++ DBG(0, "%s: TX bounce buffer[%d]=%p\n", __FUNCTION__, i, fep->tx_bounce[i]);
++ mem = (void *)((unsigned long)(mem + FEC_ENET_TX_FRSIZE));
+
+ /* Initialize the BD for every fragment in the page.
+ */
+- for (j=0; j<FEC_ENET_RX_FRPPG; j++) {
+- bdp->cbd_sc = BD_ENET_RX_EMPTY;
+- bdp->cbd_bufaddr = __pa(mem_addr);
+- mem_addr += FEC_ENET_RX_FRSIZE;
+- bdp++;
+- }
++ bdp->cbd_bufaddr = ~0;
++ bdp++;
+ }
+
+ /* Set the last buffer to wrap.
+@@ -1757,87 +2572,88 @@ int __init fec_enet_init(struct net_devi
+ bdp--;
+ bdp->cbd_sc |= BD_SC_WRAP;
+
+- /* ...and the same for transmmit.
++ /* ...and the same for receive.
+ */
+- bdp = fep->tx_bd_base;
+- for (i=0, j=FEC_ENET_TX_FRPPG; i<TX_RING_SIZE; i++) {
+- if (j >= FEC_ENET_TX_FRPPG) {
+- mem_addr = __get_free_page(GFP_KERNEL);
+- j = 1;
+- } else {
+- mem_addr += FEC_ENET_TX_FRSIZE;
+- j++;
++ bdp = fep->rx_bd_base;
++ for (i = 0; i < RX_RING_SIZE; i++, bdp++) {
++ pskb = __dev_alloc_skb(FEC_ENET_RX_FRSIZE, GFP_KERNEL);
++ if (pskb == NULL) {
++ DBG(0, "%s: Failed to allocate RX skb; cleaning up\n", __FUNCTION__);
++ ret = -ENOMEM;
++ goto cleanup;
+ }
+- fep->tx_bounce[i] = (unsigned char *) mem_addr;
+-
+- /* Initialize the BD for every fragment in the page.
+- */
+- bdp->cbd_sc = 0;
+- bdp->cbd_bufaddr = 0;
+- bdp++;
++ DBG(0, "%s: RX skb allocated @ %p\n", __FUNCTION__, pskb);
++ fep->rx_skbuff[i] = pskb;
++ pskb->data = FEC_ADDR_ALIGNMENT(pskb->data);
++ bdp->cbd_sc = BD_ENET_RX_EMPTY;
++ bdp->cbd_bufaddr = ~0;
++ fec_enet_rxbuf_map(fep, bdp, pskb->data, FEC_ENET_RX_FRSIZE);
+ }
+-
+ /* Set the last buffer to wrap.
+ */
+ bdp--;
+ bdp->cbd_sc |= BD_SC_WRAP;
++ fec_enet_cbd_put(fep);
+
+ /* Set receive and transmit descriptor base.
+ */
+- fecp->fec_r_des_start = fep->bd_dma;
+- fecp->fec_x_des_start = (unsigned long)fep->bd_dma + sizeof(cbd_t)
+- * RX_RING_SIZE;
+-
+-#ifdef HAVE_mii_link_interrupt
+- fec_request_mii_intr(dev);
+-#endif
+-
+- fecp->fec_grp_hash_table_high = 0;
+- fecp->fec_grp_hash_table_low = 0;
+- fecp->fec_r_buff_size = PKT_MAXBLR_SIZE;
+- fecp->fec_ecntrl = 2;
+- fecp->fec_r_des_active = 0;
+-#ifndef CONFIG_M5272
+- fecp->fec_hash_table_high = 0;
+- fecp->fec_hash_table_low = 0;
+-#endif
++ fec_reg_write(fep, FEC_ERDSR, fep->cbd_phys_base);
++ fec_reg_write(fep, FEC_ETDSR, fep->cbd_phys_base + RX_RING_SIZE * sizeof(cbd_t));
+
++ /* Install our interrupt handlers. This varies depending on
++ * the architecture.
++ */
++ ret = fec_request_intrs(pdev, dev);
++ if (ret != 0) {
++ goto cleanup;
++ }
++ /* Clear and enable interrupts */
++ fec_reg_write(fep, FEC_EIR, fec_reg_read(fep, FEC_EIR));
++ fec_reg_write(fep, FEC_EIMR, FEC_ENET_TXF | FEC_ENET_TXB |
++ FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII);
++
++ fec_reg_write(fep, FEC_IAUR, 0);
++ fec_reg_write(fep, FEC_IALR, 0);
++ fec_reg_write(fep, FEC_EMRBR, PKT_MAXBLR_SIZE);
++ fec_reg_write(fep, FEC_ECR, FEC_ECR_ETHER_EN);
++ fec_localhw_setup(dev);
++#if 0
++ /* do this in enet_open()! */
++ fec_reg_write(fep, FEC_RDAR, DONT_CARE);
++#endif
+ /* The FEC Ethernet specific entries in the device structure. */
+ dev->open = fec_enet_open;
+ dev->hard_start_xmit = fec_enet_start_xmit;
+ dev->tx_timeout = fec_timeout;
+ dev->watchdog_timeo = TX_TIMEOUT;
+ dev->stop = fec_enet_close;
++ dev->get_stats = fec_enet_get_stats;
+ dev->set_multicast_list = set_multicast_list;
++ dev->set_mac_address = fec_set_mac_address;
+
+- for (i=0; i<NMII-1; i++)
+- mii_cmds[i].mii_next = &mii_cmds[i+1];
++#ifndef CONFIG_PHYLIB
++ for (i = 1; i < NMII; i++) {
++ mii_cmds[i - 1].mii_next = &mii_cmds[i];
++ }
+ mii_free = mii_cmds;
+-
++#endif
+ /* setup MII interface */
+- fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;
+- fecp->fec_x_cntrl = 0x00;
+-
+- /*
+- * Set MII speed to 2.5 MHz
+- */
+- fep->phy_speed = ((((clk_get_rate(fep->clk) / 2 + 4999999)
+- / 2500000) / 2) & 0x3F) << 1;
+- fecp->fec_mii_speed = fep->phy_speed;
+- fec_restart(dev, 0);
+-
+- /* Clear and enable interrupts */
+- fecp->fec_ievent = 0xffc00000;
+- fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII);
+-
+- /* Queue up command to detect the PHY and initialize the
+- * remainder of the interface.
+- */
+- fep->phy_id_done = 0;
+- fep->phy_addr = 0;
+- mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy);
++ ret = fec_set_mii(dev, fep);
++ if (ret) {
++ DBG(0, "%s: Failed to initialize MII interface: %d\n", __FUNCTION__, ret);
++ goto cleanup;
++ }
+
++ ret = fec_init_phy(dev, fep);
++ if (ret) {
++ DBG(0, "%s: Failed to initialize PHY: %d\n", __FUNCTION__, ret);
++ goto cleanup;
++ }
+ return 0;
++ cleanup:
++ fec_enet_free_buffers(fep);
++ fec_enet_cbd_put(fep);
++ return ret;
+ }
+
+ /* This function is called to start or restart the FEC during a link
+@@ -1847,60 +2663,67 @@ int __init fec_enet_init(struct net_devi
+ static void
+ fec_restart(struct net_device *dev, int duplex)
+ {
+- struct fec_enet_private *fep;
+- volatile cbd_t *bdp;
+- volatile fec_t *fecp;
++ struct fec_enet_private *fep = netdev_priv(dev);
++ cbd_t *bdp;
+ int i;
++ u32 rcr = OPT_FRAME_SIZE | RCR_MII_MODE; /* MII enable */
++ u32 tcr = TCR_HBC;
+
+- fep = netdev_priv(dev);
+- fecp = fep->hwp;
+-
++ DBG(0, "%s: Restarting FEC in %s-duplex mode\n", __FUNCTION__,
++ duplex ? "full" : "half");
+ /* Whack a reset. We should wait for this.
+- */
+- fecp->fec_ecntrl = 1;
++ */
++ fec_reg_write(fep, FEC_ECR, FEC_ECR_RESET);
+ udelay(10);
+
++ /* Enable interrupts we wish to service.
++ */
++ fec_reg_write(fep, FEC_EIMR, FEC_ENET_TXF | FEC_ENET_TXB |
++ FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII);
++
+ /* Clear any outstanding interrupt.
+- */
+- fecp->fec_ievent = 0xffc00000;
++ *
++ */
++ fec_reg_write(fep, FEC_EIR, FEC_ENET_MASK);
++
++ fec_enable_phy_intr(fep);
+
+ /* Set station address.
+- */
+- fec_set_mac_address(dev);
++ */
++ _fec_set_mac_address(dev);
+
+ /* Reset all multicast.
+- */
+- fecp->fec_grp_hash_table_high = 0;
+- fecp->fec_grp_hash_table_low = 0;
++ */
++ fec_reg_write(fep, FEC_IAUR, 0);
++ fec_reg_write(fep, FEC_IALR, 0);
+
+ /* Set maximum receive buffer size.
+- */
+- fecp->fec_r_buff_size = PKT_MAXBLR_SIZE;
++ */
++ fec_reg_write(fep, FEC_EMRBR, PKT_MAXBLR_SIZE);
+
+ /* Set receive and transmit descriptor base.
+- */
+- fecp->fec_r_des_start = fep->bd_dma;
+- fecp->fec_x_des_start = (unsigned long)fep->bd_dma + sizeof(cbd_t)
+- * RX_RING_SIZE;
++ */
++ fec_reg_write(fep, FEC_ERDSR, fep->cbd_phys_base);
++ fec_reg_write(fep, FEC_ETDSR, fep->cbd_phys_base + RX_RING_SIZE * sizeof(cbd_t));
+
+ fep->dirty_tx = fep->cur_tx = fep->tx_bd_base;
+ fep->cur_rx = fep->rx_bd_base;
+
+ /* Reset SKB transmit buffers.
+- */
++ */
+ fep->skb_cur = fep->skb_dirty = 0;
+- for (i=0; i<=TX_RING_MOD_MASK; i++) {
++ bdp = fep->tx_bd_base;
++ for (i = 0; i <= TX_RING_MOD_MASK; i++) {
+ if (fep->tx_skbuff[i] != NULL) {
+- dev_kfree_skb_any(fep->tx_skbuff[i]);
+- fep->tx_skbuff[i] = NULL;
++ fec_free_skb(fep, bdp, &fep->tx_skbuff[i]);
++ bdp++;
+ }
+ }
+
+ /* Initialize the receive buffer descriptors.
+- */
++ */
+ bdp = fep->rx_bd_base;
+- for (i=0; i<RX_RING_SIZE; i++) {
+-
++ for (i = 0; i < RX_RING_SIZE; i++) {
+ /* Initialize the BD for every fragment in the page.
+ */
+ bdp->cbd_sc = BD_ENET_RX_EMPTY;
+@@ -1908,246 +2731,366 @@ fec_restart(struct net_device *dev, int
+ }
+
+ /* Set the last buffer to wrap.
+- */
++ */
+ bdp--;
+ bdp->cbd_sc |= BD_SC_WRAP;
+
+ /* ...and the same for transmmit.
+- */
++ */
+ bdp = fep->tx_bd_base;
+- for (i=0; i<TX_RING_SIZE; i++) {
+-
++ for (i = 0; i < TX_RING_SIZE; i++) {
+ /* Initialize the BD for every fragment in the page.
+ */
+ bdp->cbd_sc = 0;
+- bdp->cbd_bufaddr = 0;
++ bdp->cbd_bufaddr = ~0;
+ bdp++;
+ }
+
+ /* Set the last buffer to wrap.
+- */
++ */
+ bdp--;
+ bdp->cbd_sc |= BD_SC_WRAP;
+
+ /* Enable MII mode.
+- */
++ */
+ if (duplex) {
+- fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;/* MII enable */
+- fecp->fec_x_cntrl = 0x04; /* FD enable */
++ tcr |= TCR_FDEN; /* FD enable */
+ } else {
+- /* MII enable|No Rcv on Xmit */
+- fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x06;
+- fecp->fec_x_cntrl = 0x00;
++ rcr |= RCR_DRT; /* No Rcv on Xmit */
+ }
++ fec_reg_write(fep, FEC_RCR, rcr);
++ fec_reg_write(fep, FEC_TCR, tcr);
+ fep->full_duplex = duplex;
+
+ /* Set MII speed.
+- */
+- fecp->fec_mii_speed = fep->phy_speed;
++ */
++ fec_reg_write(fep, FEC_MSCR, fep->phy_speed);
+
+ /* And last, enable the transmit and receive processing.
+- */
+- fecp->fec_ecntrl = 2;
+- fecp->fec_r_des_active = 0;
++ */
++ fec_reg_write(fep, FEC_ECR, FEC_ECR_ETHER_EN);
++ fec_localhw_setup(dev);
++ fec_reg_write(fep, FEC_RDAR, DONT_CARE);
+
+- /* Enable interrupts we wish to service.
+- */
+- fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII);
++ DBG(0, "%s: Starting netif queue\n", __FUNCTION__);
++ netif_start_queue(dev);
+ }
+
+ static void
+ fec_stop(struct net_device *dev)
+ {
+- volatile fec_t *fecp;
+- struct fec_enet_private *fep;
++ struct fec_enet_private *fep = netdev_priv(dev);
+
+- fep = netdev_priv(dev);
+- fecp = fep->hwp;
++ DBG(0, "%s: Stopping netif queue\n", __FUNCTION__);
++ netif_stop_queue(dev);
+
+ /*
+- ** We cannot expect a graceful transmit stop without link !!!
+- */
+- if (fep->link)
+- {
+- fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */
++ * We cannot expect a graceful transmit stop without link!
++ */
++ if (fep->linkstatus) {
++ fec_reg_write(fep, FEC_TCR, 0x01); /* Graceful transmit stop */
+ udelay(10);
+- if (!(fecp->fec_ievent & FEC_ENET_GRA))
+- printk("fec_stop : Graceful transmit stop did not complete !\n");
+- }
+-
++ if (!(fec_reg_read(fep, FEC_EIR) & FEC_ENET_GRA))
++ dev_warn(&dev->dev, "Graceful transmit stop did not complete!\n");
++ }
++#if 0
+ /* Whack a reset. We should wait for this.
+- */
+- fecp->fec_ecntrl = 1;
++ */
++ fec_reg_write(fep, FEC_ECR, FEC_ECR_RESET);
+ udelay(10);
+-
+- /* Clear outstanding MII command interrupts.
+- */
+- fecp->fec_ievent = FEC_ENET_MII;
+-
+- fecp->fec_imask = FEC_ENET_MII;
+- fecp->fec_mii_speed = fep->phy_speed;
++ /* Mask and clear outstanding MII command interrupts.
++ */
++ fec_reg_write(fep, FEC_EIMR, 0);
++ fec_reg_write(fep, FEC_EIR, FEC_ENET_MII);
++ fec_enable_phy_intr(fep);
++ fec_reg_write(fep, FEC_MSCR, fep->phy_speed);
++#endif
+ }
+
+-static int __devinit
+-fec_probe(struct platform_device *pdev)
++static int __devinit fec_enet_probe(struct platform_device *pdev)
+ {
++ int ret;
+ struct fec_enet_private *fep;
+- struct net_device *ndev;
+- int i, irq, ret = 0;
+- struct resource *r;
+-
+- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+- if (!r)
+- return -ENXIO;
++ struct net_device *dev;
++ struct fec_enet_platform_data *pdata = pdev->dev.platform_data;
++ struct resource *res_mem1;
++ struct resource *res_mem2;
++
++ res_mem1 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (res_mem1 == NULL) {
++ return -ENODEV;
++ }
+
+- r = request_mem_region(r->start, resource_size(r), pdev->name);
+- if (!r)
++ res_mem1 = request_mem_region(res_mem1->start,
++ resource_size(res_mem1),
++ DRV_NAME);
++ if (res_mem1 == NULL) {
+ return -EBUSY;
++ }
++ res_mem2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
++ if (res_mem2 != NULL) {
++ res_mem2 = request_mem_region(res_mem2->start,
++ resource_size(res_mem2),
++ DRV_NAME);
++ if (res_mem2 == NULL) {
++ ret = -EBUSY;
++ goto release1;
++ }
++ }
+
+- /* Init network device */
+- ndev = alloc_etherdev(sizeof(struct fec_enet_private));
+- if (!ndev)
+- return -ENOMEM;
+-
+- SET_NETDEV_DEV(ndev, &pdev->dev);
+-
+- /* setup board info structure */
+- fep = netdev_priv(ndev);
+- memset(fep, 0, sizeof(*fep));
++ dev = alloc_etherdev(sizeof(struct fec_enet_private));
++ if (dev == NULL) {
++ ret = -ENOMEM;
++ goto release2;
++ }
++ platform_set_drvdata(pdev, dev);
++ fep = netdev_priv(dev);
++ fep->res_mem1 = res_mem1;
++ fep->res_mem2 = res_mem2;
++ fep->dma_dev = &pdev->dev;
++
++ fep->reg_base = ioremap(res_mem1->start, resource_size(res_mem1));
++ if (fep->reg_base == NULL) {
++ printk("FEC: Mapping FEC registers failed\n");
++ ret = -ENOMEM;
++ goto free_netdev;
++ }
++ DBG(0, "%s: FEC registers @ %08lx mapped to %p\n", __FUNCTION__,
++ (unsigned long)res_mem1->start, fep->reg_base);
+
+- ndev->base_addr = (unsigned long)ioremap(r->start, resource_size(r));
++ fep->mib_base = ioremap(res_mem2->start, resource_size(res_mem2));
++ if (fep->mib_base == NULL) {
++ printk("FEC: Mapping FEC registers failed\n");
++ ret = -ENOMEM;
++ goto unmap1;
++ }
++ DBG(0, "%s: FEC registers @ %08lx mapped to %p\n", __FUNCTION__,
++ (unsigned long)res_mem2->start, fep->mib_base);
+
+- if (!ndev->base_addr) {
++ /* Allocate memory for buffer descriptors. */
++ fep->cbd_mem_base = dma_alloc_coherent(&pdev->dev, CBD_BUF_SIZE,
++ &fep->cbd_phys_base,
++ GFP_KERNEL);
++ if (fep->cbd_mem_base == NULL) {
++ printk("FEC: allocate descriptor memory failed\n");
+ ret = -ENOMEM;
+- goto failed_ioremap;
++ goto unmap2;
+ }
++ DBG(0, "%s: Allocated %lu [(%u + %lu) * %d] byte for CBD buffer @ %p[%08lx]\n",
++ __FUNCTION__, CBD_BUF_SIZE, TX_RING_SIZE, RX_RING_SIZE,
++ sizeof(cbd_t), fep->cbd_mem_base,
++ (unsigned long)fep->cbd_phys_base);
+
+- platform_set_drvdata(pdev, ndev);
++ /* Set receive and transmit descriptor base.
++ */
++ fep->rx_bd_base = fep->cbd_mem_base;
++ fep->tx_bd_base = fep->rx_bd_base + RX_RING_SIZE;
+
+- /* This device has up to three irqs on some platforms */
+- for (i = 0; i < 3; i++) {
+- irq = platform_get_irq(pdev, i);
+- if (i && irq < 0)
+- break;
+- ret = request_irq(irq, fec_enet_interrupt, IRQF_DISABLED, pdev->name, ndev);
+- if (ret) {
+- while (i >= 0) {
+- irq = platform_get_irq(pdev, i);
+- free_irq(irq, ndev);
+- i--;
+- }
+- goto failed_irq;
+- }
++ printk("FEC ENET Driver\n");
++ ret = platform_func(pdata->arch_init, pdev);
++ if (ret != 0) {
++ dev_err(&pdev->dev, "platform init failed: %d\n", ret);
++ goto free_dma;
+ }
+
+- fep->clk = clk_get(&pdev->dev, "fec_clk");
+- if (IS_ERR(fep->clk)) {
+- ret = PTR_ERR(fep->clk);
+- goto failed_clk;
++ ret = fec_enet_init(pdev, dev);
++ if (ret != 0) {
++ goto fec_disable;
+ }
+- clk_enable(fep->clk);
+
+- ret = fec_enet_init(ndev, 0);
+- if (ret)
+- goto failed_init;
++ /* Enable most messages by default */
++ fep->msg_enable = (NETIF_MSG_IFUP << 1) - 1;
++ ret = register_netdev(dev);
++ if (ret != 0) {
++ /* XXX: missing cleanup here */
++ goto free_buffers;
++ }
+
+- ret = register_netdev(ndev);
+- if (ret)
+- goto failed_register;
++ printk(KERN_INFO "%s: ethernet %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name,
++ dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
++ dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
+
+ return 0;
+
+-failed_register:
+-failed_init:
+- clk_disable(fep->clk);
+- clk_put(fep->clk);
+-failed_clk:
+- for (i = 0; i < 3; i++) {
+- irq = platform_get_irq(pdev, i);
+- if (irq > 0)
+- free_irq(irq, ndev);
+- }
+-failed_irq:
+- iounmap((void __iomem *)ndev->base_addr);
+-failed_ioremap:
+- free_netdev(ndev);
++ free_buffers:
++ fec_enet_free_buffers(fep);
++
++ fec_disable:
++ platform_func(pdata->arch_exit, pdev);
++
++ free_dma:
++ dma_free_coherent(&pdev->dev, CBD_BUF_SIZE, fep->cbd_mem_base, fep->cbd_phys_base);
++
++ unmap2:
++ if (fep->mib_base)
++ iounmap(fep->mib_base);
++
++ unmap1:
++ iounmap(fep->reg_base);
++
++ free_netdev:
++ free_netdev(dev);
++
++ release2:
++ if (res_mem2 != NULL) {
++ release_resource(res_mem2);
++ }
++
++ release1:
++ release_resource(res_mem1);
+
+ return ret;
+ }
+
+-static int __devexit
+-fec_drv_remove(struct platform_device *pdev)
++static int __devexit fec_enet_remove(struct platform_device *pdev)
+ {
+- struct net_device *ndev = platform_get_drvdata(pdev);
+- struct fec_enet_private *fep = netdev_priv(ndev);
++ struct net_device *dev = platform_get_drvdata(pdev);
++ struct fec_enet_private *fep = netdev_priv(dev);
++
++ unregister_netdev(dev);
++ free_netdev(dev);
++
++#ifdef CONFIG_PHYLIB
++ if (fep->mii != NULL) {
++ kfree(fep->mii->irq);
++ mdiobus_unregister(fep->mii);
++ }
++ mdiobus_free(fep->mii);
++#endif
++ fec_release_intrs(dev);
++
++ DBG(0, "%s: Unmapping FEC registers %p\n", __FUNCTION__, fep->reg_base);
++ iounmap(fep->reg_base);
++ if (fep->mib_base)
++ iounmap(fep->mib_base);
++
++ fec_enet_free_buffers(fep);
+
+- platform_set_drvdata(pdev, NULL);
++ DBG(0, "%s: Freeing CBD buffer area %p[%08lx]\n", __FUNCTION__,
++ fep->cbd_mem_base, (unsigned long)fep->cbd_phys_base);
++ dma_free_coherent(&pdev->dev, CBD_BUF_SIZE, fep->cbd_mem_base, fep->cbd_phys_base);
+
+- fec_stop(ndev);
+- clk_disable(fep->clk);
+- clk_put(fep->clk);
+- iounmap((void __iomem *)ndev->base_addr);
+- unregister_netdev(ndev);
+- free_netdev(ndev);
++ release_resource(fep->res_mem1);
++ if (fep->res_mem2 != NULL) {
++ release_resource(fep->res_mem2);
++ }
+ return 0;
+ }
+
+-static int
+-fec_suspend(struct platform_device *dev, pm_message_t state)
++static void fec_enet_shutdown(struct platform_device *pdev)
+ {
+- struct net_device *ndev = platform_get_drvdata(dev);
+- struct fec_enet_private *fep;
++ struct fec_enet_platform_data *pdata = pdev->dev.platform_data;
++
++ DBG(0, "%s: Shutting down FEC Hardware\n", __FUNCTION__);
++ platform_func(pdata->arch_exit, pdev);
++}
++
++#ifdef CONFIG_PM
++static int fec_enet_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ int ret;
++ struct fec_enet_platform_data *pdata = pdev->dev.platform_data;
++ struct net_device *ndev = platform_get_drvdata(pdev);
++ struct fec_enet_private *fep = netdev_priv(ndev);
+
+- if (ndev) {
+- fep = netdev_priv(ndev);
+- if (netif_running(ndev)) {
+- netif_device_detach(ndev);
+- fec_stop(ndev);
++ if (netif_running(ndev)) {
++ DBG(0, "%s: Detaching netif\n", __FUNCTION__);
++ netif_device_detach(ndev);
++#ifdef CONFIG_PHYLIB
++ DBG(0, "%s: Disconnecting PHY %p\n", __FUNCTION__, fep->phy);
++ phy_disconnect(fep->phy);
++ fep->phy = NULL;
++#endif
++ }
++#ifndef CONFIG_PHYLIB
++ if (fep->phy_timer) {
++ ret = del_timer_sync(fep->phy_timer);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to delete PHY timer: %d\n", __FUNCTION__, ret);
++ return ret;
+ }
+ }
+- return 0;
++#endif
++ DBG(0, "%s: Shutting down FEC Hardware %d\n", __FUNCTION__,
++ netif_running(ndev));
++ ret = platform_func(pdata->suspend, pdev);
++ if (ret != 0 && netif_running(ndev)) {
++ DBG(0, "%s: Failed to suspend: %d\n", __FUNCTION__, ret);
++ /* Undo suspend */
++#ifdef CONFIG_PHYLIB
++ DBG(0, "%s: Reconnecting PHY\n", __FUNCTION__);
++ if (fec_connect_phy(ndev, fep) != 0) {
++ DBG(0, "%s: Failed to connect to PHY\n", __FUNCTION__);
++ return ret;
++ }
++ phy_start(fep->phy);
++#endif
++ fec_link_change(ndev);
++ netif_device_attach(ndev);
++ }
++ return ret;
+ }
+
+-static int
+-fec_resume(struct platform_device *dev)
++static int fec_enet_resume(struct platform_device *pdev)
+ {
+- struct net_device *ndev = platform_get_drvdata(dev);
++ int ret;
++ struct fec_enet_platform_data *pdata = pdev->dev.platform_data;
++ struct net_device *ndev = platform_get_drvdata(pdev);
+
+- if (ndev) {
+- if (netif_running(ndev)) {
+- fec_enet_init(ndev, 0);
+- netif_device_attach(ndev);
++ DBG(0, "%s: Powering up FEC Hardware %d\n", __FUNCTION__,
++ netif_running(ndev));
++ ret = platform_func(pdata->resume, pdev);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to resume: %d\n", __FUNCTION__, ret);
++ return ret;
++ }
++ if (netif_running(ndev)) {
++#ifdef CONFIG_PHYLIB
++ struct fec_enet_private *fep = netdev_priv(ndev);
++
++ DBG(0, "%s: Reconnecting PHY\n", __FUNCTION__);
++ ret = fec_connect_phy(ndev, fep);
++ if (ret != 0) {
++ DBG(0, "%s: Failed to connect to PHY: %d\n", __FUNCTION__, ret);
++ return ret;
+ }
++ phy_start(fep->phy);
++#endif
++ fec_link_change(ndev);
++ netif_device_attach(ndev);
+ }
+ return 0;
+ }
++#else
++#define fec_enet_suspend NULL
++#define fec_enet_resume NULL
++#endif
+
+-static struct platform_driver fec_driver = {
+- .driver = {
+- .name = "fec",
+- .owner = THIS_MODULE,
++static struct platform_driver fec_enet_driver = {
++ .driver = {
++ .name = DRV_NAME,
+ },
+- .probe = fec_probe,
+- .remove = __devexit_p(fec_drv_remove),
+- .suspend = fec_suspend,
+- .resume = fec_resume,
++ .probe = fec_enet_probe,
++ .remove = __devexit_p(fec_enet_remove),
++ .shutdown = fec_enet_shutdown,
++ .suspend = fec_enet_suspend,
++ .resume = fec_enet_resume,
+ };
+
+-static int __init
+-fec_enet_module_init(void)
++static int __init fec_enet_module_init(void)
+ {
+- printk(KERN_INFO "FEC Ethernet Driver\n");
++ int ret;
++
++ ret = platform_driver_register(&fec_enet_driver);
+
+- return platform_driver_register(&fec_driver);
++ return ret;
+ }
++module_init(fec_enet_module_init);
+
+-static void __exit
+-fec_enet_cleanup(void)
++static void __exit fec_enet_module_cleanup(void)
+ {
+- platform_driver_unregister(&fec_driver);
++ platform_driver_unregister(&fec_enet_driver);
+ }
+-
+-module_exit(fec_enet_cleanup);
+-module_init(fec_enet_module_init);
++module_exit(fec_enet_module_cleanup);
+
+ MODULE_LICENSE("GPL");
+diff -urNp linux-2.6.30-rc4/drivers/net/fec.h linux-2.6.30-rc4-karo/drivers/net/fec.h
+--- linux-2.6.30-rc4/drivers/net/fec.h 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/drivers/net/fec.h 2009-06-02 17:05:27.000000000 +0200
+@@ -13,6 +13,15 @@
+ #define FEC_H
+ /****************************************************************************/
+
++/*
++ * dummy value to write into RDAR,TDAR. FEC hardware will scan the TX/RX
++ * descriptors in memory upon any write access to those registers.
++ * The actual value written to those registers does not matter.
++*/
++#define DONT_CARE 0
++#define RDAR_BUSY (1 << 24)
++#define TDAR_BUSY (1 << 24)
++
+ #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
+ defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARCH_MXC)
+ /*
+@@ -20,6 +29,36 @@
+ * registers in the same peripheral device on different models
+ * of the ColdFire!
+ */
++// relying on structure alignment for hardware register is just evil
++#ifndef GARBAGE
++#define FEC_EIR 0x004
++#define FEC_EIMR 0x008
++#define FEC_RDAR 0x010
++#define FEC_TDAR 0x014
++#define FEC_ECR 0x024
++#define FEC_MMFR 0x040
++#define FEC_MSCR 0x044
++#define FEC_MIBC 0x064
++#define FEC_RCR 0x084
++#define FEC_TCR 0x0c4
++#define FEC_PALR 0x0e4
++#define FEC_PAUR 0x0e8
++#define FEC_OPD 0x0ec
++#define FEC_IAUR 0x118
++#define FEC_IALR 0x11c
++#define FEC_GAUR 0x120
++#define FEC_GALR 0x124
++#define FEC_TFWR 0x144
++#define FEC_FRBR 0x14c
++#define FEC_FRSR 0x150
++#define FEC_ERDSR 0x180
++#define FEC_ETDSR 0x184
++#define FEC_EMRBR 0x188
++
++#define FEC_ECR_RESET (1 << 0)
++#define FEC_ECR_ETHER_EN (1 << 1)
++#else
++
+ typedef struct fec {
+ unsigned long fec_reserved0;
+ unsigned long fec_ievent; /* Interrupt event reg */
+@@ -57,6 +96,7 @@ typedef struct fec {
+ unsigned long fec_x_des_start; /* Transmit descriptor ring */
+ unsigned long fec_r_buff_size; /* Maximum receive buff size */
+ } fec_t;
++#endif
+
+ #else
+
+@@ -88,8 +128,8 @@ typedef struct fec {
+ unsigned long fec_reserved7[158];
+ unsigned long fec_addr_low; /* Low 32bits MAC address */
+ unsigned long fec_addr_high; /* High 16bits MAC address */
+- unsigned long fec_grp_hash_table_high;/* High 32bits hash table */
+- unsigned long fec_grp_hash_table_low; /* Low 32bits hash table */
++ unsigned long fec_hash_table_high; /* High 32bits hash table */
++ unsigned long fec_hash_table_low; /* Low 32bits hash table */
+ unsigned long fec_r_des_start; /* Receive descriptor ring */
+ unsigned long fec_x_des_start; /* Transmit descriptor ring */
+ unsigned long fec_r_buff_size; /* Maximum receive buff size */
+@@ -103,17 +143,20 @@ typedef struct fec {
+ /*
+ * Define the buffer descriptor structure.
+ */
+-#ifdef CONFIG_ARCH_MXC
++/* Please see "Receive Buffer Descriptor Field Definitions" in Specification.
++ * It's LE.
++ */
++#if defined(CONFIG_ARCH_MXC)
+ typedef struct bufdesc {
+- unsigned short cbd_datlen; /* Data length */
+- unsigned short cbd_sc; /* Control and status info */
+- unsigned long cbd_bufaddr; /* Buffer address */
++ unsigned short cbd_datlen; /* Data length */
++ unsigned short cbd_sc; /* Control and status info */
++ dma_addr_t cbd_bufaddr; /* Buffer address as seen by FEC Hardware */
+ } cbd_t;
+ #else
+ typedef struct bufdesc {
+ unsigned short cbd_sc; /* Control and status info */
+ unsigned short cbd_datlen; /* Data length */
+- unsigned long cbd_bufaddr; /* Buffer address */
++ dma_addr_t cbd_bufaddr; /* Buffer address */
+ } cbd_t;
+ #endif
+
+@@ -121,7 +164,7 @@ typedef struct bufdesc {
+ * The following definitions courtesy of commproc.h, which where
+ * Copyright (c) 1997 Dan Malek (dmalek@jlc.net).
+ */
+-#define BD_SC_EMPTY ((ushort)0x8000) /* Recieve is empty */
++#define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */
+ #define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */
+ #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */
+ #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */
+@@ -168,5 +211,22 @@ typedef struct bufdesc {
+ #define BD_ENET_TX_STATS ((ushort)0x03ff) /* All status bits */
+
+
++#define RCR_LOOP (1 << 0)
++#define RCR_DRT (1 << 1)
++#define RCR_MII_MODE (1 << 2)
++#define RCR_PROM (1 << 3)
++#define RCR_BC_REJ (1 << 4)
++#define RCR_FCE (1 << 5)
++#define RCR_MAX_FL_SHIFT 16
++#define RCR_MAX_FL_MASK (0x7ff << (RCR_MAX_FL_SHIFT))
++#define RCR_MAX_FL_set(n) (((n) << (RCR_MAX_FL_SHIFT)) & (RCR_MAX_FL_MASK))
++#define RCR_MAX_FL_get(n) (((n) & (RCR_MAX_FL_MASK)) >> (RCR_MAX_FL_SHIFT))
++
++#define TCR_GTS (1 << 0)
++#define TCR_HBC (1 << 1)
++#define TCR_FDEN (1 << 2)
++#define TCR_TFCPAUSE (1 << 3)
++#define TCR_RFCPAUSE (1 << 4)
++
+ /****************************************************************************/
+ #endif /* FEC_H */
+diff -urNp linux-2.6.30-rc4/drivers/video/imxfb.c linux-2.6.30-rc4-karo/drivers/video/imxfb.c
+--- linux-2.6.30-rc4/drivers/video/imxfb.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/drivers/video/imxfb.c 2009-06-02 17:05:26.000000000 +0200
+@@ -570,7 +570,7 @@ static int imxfb_resume(struct platform_
+ #define imxfb_resume NULL
+ #endif
+
+-static int __init imxfb_init_fbinfo(struct platform_device *pdev)
++static int __devinit imxfb_init_fbinfo(struct platform_device *pdev)
+ {
+ struct imx_fb_platform_data *pdata = pdev->dev.platform_data;
+ struct fb_info *info = dev_get_drvdata(&pdev->dev);
+@@ -636,7 +636,7 @@ static int __init imxfb_init_fbinfo(stru
+ return 0;
+ }
+
+-static int __init imxfb_probe(struct platform_device *pdev)
++static int __devinit imxfb_probe(struct platform_device *pdev)
+ {
+ struct imxfb_info *fbi;
+ struct fb_info *info;
+@@ -754,7 +754,7 @@ failed_map:
+ failed_getclock:
+ iounmap(fbi->regs);
+ failed_ioremap:
+- release_mem_region(res->start, res->end - res->start);
++ release_mem_region(res->start, resource_size(res));
+ failed_req:
+ kfree(info->pseudo_palette);
+ failed_init:
+@@ -763,7 +763,7 @@ failed_init:
+ return ret;
+ }
+
+-static int __devexit imxfb_remove(struct platform_device *pdev)
++static int imxfb_remove(struct platform_device *pdev)
+ {
+ struct imx_fb_platform_data *pdata;
+ struct fb_info *info = platform_get_drvdata(pdev);
+@@ -785,7 +785,7 @@ static int __devexit imxfb_remove(struct
+ framebuffer_release(info);
+
+ iounmap(fbi->regs);
+- release_mem_region(res->start, res->end - res->start + 1);
++ release_mem_region(res->start, resource_size(res));
+ clk_disable(fbi->clk);
+ clk_put(fbi->clk);
+
+@@ -794,7 +794,7 @@ static int __devexit imxfb_remove(struct
+ return 0;
+ }
+
+-void imxfb_shutdown(struct platform_device * dev)
++void imxfb_shutdown(struct platform_device *dev)
+ {
+ struct fb_info *info = platform_get_drvdata(dev);
+ struct imxfb_info *fbi = info->par;
+@@ -804,7 +804,8 @@ void imxfb_shutdown(struct platform_dev
+ static struct platform_driver imxfb_driver = {
+ .suspend = imxfb_suspend,
+ .resume = imxfb_resume,
+- .remove = __devexit_p(imxfb_remove),
++// .remove = __devexit_p(imxfb_remove),
++ .remove = imxfb_remove,
+ .shutdown = imxfb_shutdown,
+ .driver = {
+ .name = DRIVER_NAME,
+diff -urNp linux-2.6.30-rc4/include/linux/fec_enet.h linux-2.6.30-rc4-karo/include/linux/fec_enet.h
+--- linux-2.6.30-rc4/include/linux/fec_enet.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.30-rc4-karo/include/linux/fec_enet.h 2009-06-02 17:05:27.000000000 +0200
+@@ -0,0 +1,26 @@
++/*
++ * Copyright (C) 2007 Lothar Wassmann <LW@KARO-electronics.de>
++ *
++ * platform_data definitions for fec_enet device
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the:
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
++ */
++
++struct fec_enet_platform_data {
++ /* callback for platform specific initialization */
++ int (*arch_init)(struct platform_device *dev);
++ void (*arch_exit)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++};
+diff -urNp linux-2.6.30-rc4/kernel/printk.c linux-2.6.30-rc4-karo/kernel/printk.c
+--- linux-2.6.30-rc4/kernel/printk.c 2009-05-13 09:46:19.000000000 +0200
++++ linux-2.6.30-rc4-karo/kernel/printk.c 2009-06-02 17:05:27.000000000 +0200
+@@ -637,9 +637,12 @@ static int acquire_console_semaphore_for
+ static const char recursion_bug_msg [] =
+ KERN_CRIT "BUG: recent printk recursion!\n";
+ static int recursion_bug;
+-static int new_text_line = 1;
++ static int new_text_line = 1;
+ static char printk_buf[1024];
+
++#ifdef CONFIG_DEBUG_LL
++extern void asmlinkage printascii(const char *);
++#endif
+ asmlinkage int vprintk(const char *fmt, va_list args)
+ {
+ int printed_len = 0;
+@@ -687,6 +690,9 @@ asmlinkage int vprintk(const char *fmt,
+ sizeof(printk_buf) - printed_len, fmt, args);
+
+
++#ifdef CONFIG_DEBUG_LL
++ printascii(printk_buf);
++#endif
+ /*
+ * Copy the output into log_buf. If the caller didn't provide
+ * appropriate log level tags, we insert them here
diff --git a/recipes/linux/linux-davinci/dm355-evm/defconfig b/recipes/linux/linux-davinci/dm355-evm/defconfig
new file mode 100644
index 0000000000..cbf12de79e
--- /dev/null
+++ b/recipes/linux/linux-davinci/dm355-evm/defconfig
@@ -0,0 +1,1223 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-rc7-davinci1
+# Wed Apr 22 15:49:34 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=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_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=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_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE 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"
+# CONFIG_FREEZER is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+CONFIG_ARCH_DAVINCI=y
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+
+#
+# TI DaVinci Implementations
+#
+
+#
+# DaVinci Core Type
+#
+# CONFIG_ARCH_DAVINCI_DM644x is not set
+# CONFIG_ARCH_DAVINCI_DM646x is not set
+CONFIG_ARCH_DAVINCI_DM355=y
+
+#
+# DaVinci Board Type
+#
+CONFIG_MACH_DAVINCI_DM355_EVM=y
+CONFIG_DAVINCI_MUX=y
+# CONFIG_DAVINCI_MUX_DEBUG is not set
+# CONFIG_DAVINCI_MUX_WARNINGS is not set
+# CONFIG_DAVINCI_RESET_CLOCKS 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
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=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
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_IDLE 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_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+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 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_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=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
+# CONFIG_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_NF_DEFRAG_IPV4 is not set
+# 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_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_LIB80211 is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=1
+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_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=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_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_LIBFC is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# 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_TI_DAVINCI_EMAC is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_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
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+# 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_NETCONSOLE=y
+# CONFIG_NETCONSOLE_DYNAMIC is not set
+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=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=m
+CONFIG_INPUT_EVBUG=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=m
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_XTKBD=m
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_GPIO=y
+# 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_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+# CONFIG_VT_CONSOLE is not set
+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=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_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# 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
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_DAVINCI=y
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_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
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+CONFIG_GPIO_PCF857X=m
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# 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_AD7414 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_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 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_LTC4245 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_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_MFD_DM355EVM_MSP is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L2_COMMON=y
+CONFIG_VIDEO_ALLOW_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=y
+
+#
+# Multimedia drivers
+#
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=y
+# 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_V4L1=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_VPFE_CAPTURE is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_SOC_CAMERA is not set
+# CONFIG_RADIO_ADAPTERS is not set
+CONFIG_DAB=y
+
+#
+# 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_BOOT_VESA_SUPPORT is not set
+# CONFIG_FB_CFB_FILLRECT is not set
+# CONFIG_FB_CFB_COPYAREA is not set
+# CONFIG_FB_CFB_IMAGEBLIT is not set
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT 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_DAVINCI is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT 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 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
+CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
+# CONFIG_SND is not set
+CONFIG_SOUND_PRIME=m
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_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=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_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+CONFIG_MINIX_FS=m
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 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
+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
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_MANAGER2 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-davinci/dm355-leopard/defconfig b/recipes/linux/linux-davinci/dm355-leopard/defconfig
index d8bd0cdc78..a20e5cf9e7 100644
--- a/recipes/linux/linux-davinci/dm355-leopard/defconfig
+++ b/recipes/linux/linux-davinci/dm355-leopard/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29-rc7-davinci1
-# Tue Mar 17 22:47:40 2009
+# Linux kernel version: 2.6.30-rc7-davinci1
+# Thu Jun 4 08:38:08 2009
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -35,11 +35,12 @@ 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 is not set
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
@@ -61,27 +62,30 @@ CONFIG_FAIR_GROUP_SCHED=y
CONFIG_USER_SCHED=y
# CONFIG_CGROUP_SCHED is not set
# CONFIG_CGROUPS is not set
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
CONFIG_RELAY=y
# CONFIG_NAMESPACES is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
CONFIG_EMBEDDED=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
+# CONFIG_STRIP_ASM_SYMS 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
@@ -89,6 +93,7 @@ CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_COMPAT_BRK=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
@@ -100,6 +105,7 @@ CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_CLK=y
+# CONFIG_SLOW_WORK is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
@@ -112,7 +118,6 @@ CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_BLOCK=y
CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEV_INTEGRITY is not set
@@ -121,14 +126,14 @@ CONFIG_BLK_DEV_IO_TRACE=y
#
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_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-# CONFIG_FREEZER is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+CONFIG_FREEZER=y
#
# System Type
@@ -141,6 +146,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_GEMINI is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_NETX is not set
# CONFIG_ARCH_H720X is not set
@@ -161,6 +167,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_ARCH_ORION5X is not set
# CONFIG_ARCH_PNX4008 is not set
# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MMP is not set
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_S3C2410 is not set
@@ -171,6 +178,7 @@ CONFIG_ARCH_DAVINCI=y
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_MSM is not set
# CONFIG_ARCH_W90X900 is not set
+CONFIG_AINTC=y
#
# TI DaVinci Implementations
@@ -180,8 +188,8 @@ CONFIG_ARCH_DAVINCI=y
# DaVinci Core Type
#
# CONFIG_ARCH_DAVINCI_DM644x is not set
-# CONFIG_ARCH_DAVINCI_DM646x is not set
CONFIG_ARCH_DAVINCI_DM355=y
+# CONFIG_ARCH_DAVINCI_DM646x is not set
#
# DaVinci Board Type
@@ -240,9 +248,10 @@ CONFIG_PREEMPT=y
CONFIG_HZ=100
CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set
-CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_HIGHMEM is not set
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -256,6 +265,8 @@ CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
CONFIG_LEDS=y
# CONFIG_LEDS_CPU is not set
CONFIG_ALIGNMENT_TRAP=y
@@ -298,14 +309,18 @@ CONFIG_BINFMT_MISC=m
#
# Power management options
#
-# CONFIG_PM is not set
+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
CONFIG_NET=y
#
# Networking options
#
-CONFIG_COMPAT_NET_DEV_OPS=y
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
@@ -403,6 +418,7 @@ CONFIG_NETFILTER_ADVANCED=y
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
# CONFIG_NET_SCHED is not set
# CONFIG_DCB is not set
@@ -410,18 +426,56 @@ CONFIG_NETFILTER_ADVANCED=y
# Network testing
#
# CONFIG_NET_PKTGEN is not set
+# CONFIG_NET_DROP_MONITOR is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
-# CONFIG_BT 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_HCIBTUSB=m
+CONFIG_BT_HCIBTSDIO=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_LL=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
# CONFIG_AF_RXRPC is not set
-# CONFIG_PHONET is not set
CONFIG_WIRELESS=y
-# CONFIG_CFG80211 is not set
+CONFIG_CFG80211=m
+# CONFIG_CFG80211_REG_DEBUG is not set
CONFIG_WIRELESS_OLD_REGULATORY=y
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_LIB80211 is not set
-# CONFIG_MAC80211 is not set
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=m
+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_MAC80211=m
+
+#
+# Rate control algorithm selection
+#
+# CONFIG_MAC80211_RC_PID is not set
+CONFIG_MAC80211_RC_MINSTREL=y
+# CONFIG_MAC80211_RC_DEFAULT_PID is not set
+CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
+CONFIG_MAC80211_RC_DEFAULT="minstrel"
+# CONFIG_MAC80211_MESH is not set
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
@@ -436,7 +490,9 @@ CONFIG_WIRELESS_OLD_REGULATORY=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=m
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
CONFIG_MTD=y
@@ -547,6 +603,7 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
CONFIG_MISC_DEVICES=y
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_ISL29003 is not set
# CONFIG_C2PORT is not set
#
@@ -598,11 +655,14 @@ CONFIG_SCSI_WAIT_SCAN=m
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_LIBFC is not set
+# CONFIG_LIBFCOE is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
CONFIG_NETDEVICES=y
+CONFIG_COMPAT_NET_DEV_OPS=y
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
@@ -618,8 +678,10 @@ CONFIG_MII=y
CONFIG_DM9000=y
CONFIG_DM9000_DEBUGLEVEL=4
# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
+# CONFIG_ETHOC is not set
# CONFIG_SMC911X is not set
# CONFIG_SMSC911X is not set
+# CONFIG_DNET is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -636,7 +698,6 @@ CONFIG_DM9000_DEBUGLEVEL=4
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set
-# CONFIG_IWLWIFI_LEDS is not set
#
# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -703,6 +764,8 @@ CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
+# CONFIG_TOUCHSCREEN_AD7879 is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_ELO is not set
@@ -758,6 +821,7 @@ CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_IPMI_HANDLER is not set
CONFIG_HW_RANDOM=m
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_R3964 is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_TCG_TPM is not set
@@ -796,7 +860,6 @@ CONFIG_I2C_DAVINCI=y
#
# CONFIG_DS1682 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
@@ -847,6 +910,7 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_IT87 is not set
@@ -861,11 +925,15 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_SHT15 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
@@ -884,7 +952,19 @@ CONFIG_HWMON=y
# CONFIG_HWMON_DEBUG_CHIP is not set
# CONFIG_THERMAL is not set
# CONFIG_THERMAL_HWMON is not set
-# CONFIG_WATCHDOG is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+CONFIG_SOFT_WATCHDOG=m
+CONFIG_DAVINCI_WATCHDOG=m
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
CONFIG_SSB_POSSIBLE=y
#
@@ -930,7 +1010,7 @@ CONFIG_VIDEO_MEDIA=y
#
# CONFIG_MEDIA_ATTACH is not set
CONFIG_MEDIA_TUNER=y
-# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
+# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
CONFIG_MEDIA_TUNER_SIMPLE=y
CONFIG_MEDIA_TUNER_TDA8290=y
CONFIG_MEDIA_TUNER_TDA9887=y
@@ -939,14 +1019,20 @@ CONFIG_MEDIA_TUNER_TEA5767=y
CONFIG_MEDIA_TUNER_MT20XX=y
CONFIG_MEDIA_TUNER_XC2028=y
CONFIG_MEDIA_TUNER_XC5000=y
+CONFIG_MEDIA_TUNER_MC44S803=y
CONFIG_VIDEO_V4L2=y
CONFIG_VIDEO_V4L1=y
CONFIG_VIDEOBUF_GEN=y
+CONFIG_VIDEOBUF_VMALLOC=m
CONFIG_VIDEOBUF_DMA_CONTIG=y
+CONFIG_VIDEO_IR=m
+CONFIG_VIDEO_TVEEPROM=m
+CONFIG_VIDEO_TUNER=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
+CONFIG_VIDEO_IR_I2C=m
#
# Encoders/decoders and other helper chips
@@ -961,16 +1047,21 @@ CONFIG_VIDEO_CAPTURE_DRIVERS=y
# CONFIG_VIDEO_TDA9875 is not set
# CONFIG_VIDEO_TEA6415C is not set
# CONFIG_VIDEO_TEA6420 is not set
-# CONFIG_VIDEO_MSP3400 is not set
+CONFIG_VIDEO_MSP3400=m
# CONFIG_VIDEO_CS5345 is not set
-# CONFIG_VIDEO_CS53L32A is not set
+CONFIG_VIDEO_CS53L32A=m
# CONFIG_VIDEO_M52790 is not set
CONFIG_VIDEO_TLV320AIC23B=y
-# CONFIG_VIDEO_WM8775 is not set
+CONFIG_VIDEO_WM8775=m
# CONFIG_VIDEO_WM8739 is not set
# CONFIG_VIDEO_VP27SMPX is not set
#
+# RDS decoders
+#
+# CONFIG_VIDEO_SAA6588 is not set
+
+#
# Video decoders
#
# CONFIG_VIDEO_BT819 is not set
@@ -980,9 +1071,7 @@ CONFIG_VIDEO_TLV320AIC23B=y
# CONFIG_VIDEO_OV7670 is not set
# CONFIG_VIDEO_TCM825X is not set
# CONFIG_VIDEO_SAA7110 is not set
-# CONFIG_VIDEO_SAA7111 is not set
-# CONFIG_VIDEO_SAA7114 is not set
-# CONFIG_VIDEO_SAA711X is not set
+CONFIG_VIDEO_SAA711X=m
# CONFIG_VIDEO_SAA717X is not set
# CONFIG_VIDEO_SAA7191 is not set
CONFIG_VIDEO_TVP514X=y
@@ -992,12 +1081,12 @@ CONFIG_VIDEO_VPX3220=y
#
# Video and audio decoders
#
-# CONFIG_VIDEO_CX25840 is not set
+CONFIG_VIDEO_CX25840=m
#
# MPEG video encoders
#
-# CONFIG_VIDEO_CX2341X is not set
+CONFIG_VIDEO_CX2341X=m
#
# Video encoders
@@ -1013,70 +1102,84 @@ CONFIG_VIDEO_VPX3220=y
# CONFIG_VIDEO_UPD64031A is not set
# CONFIG_VIDEO_UPD64083 is not set
# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_TVP5146 is not set
CONFIG_VIDEO_VPFE_CAPTURE=y
CONFIG_VIDEO_DM355_CCDC=y
# CONFIG_VIDEO_CPIA is not set
# CONFIG_VIDEO_CPIA2 is not set
# CONFIG_VIDEO_SAA5246A is not set
# CONFIG_VIDEO_SAA5249 is not set
-CONFIG_SOC_CAMERA=y
-# CONFIG_SOC_CAMERA_MT9M001 is not set
-# CONFIG_SOC_CAMERA_MT9M111 is not set
-CONFIG_SOC_CAMERA_MT9T031=y
-# CONFIG_SOC_CAMERA_MT9V022 is not set
-# CONFIG_SOC_CAMERA_TW9910 is not set
-CONFIG_SOC_CAMERA_PLATFORM=y
+CONFIG_SOC_CAMERA=m
+CONFIG_SOC_CAMERA_MT9M001=m
+CONFIG_SOC_CAMERA_MT9M111=m
+CONFIG_SOC_CAMERA_MT9T031=m
+CONFIG_SOC_CAMERA_MT9V022=m
+CONFIG_SOC_CAMERA_TW9910=m
+CONFIG_SOC_CAMERA_PLATFORM=m
# CONFIG_SOC_CAMERA_OV772X is not set
# CONFIG_VIDEO_SH_MOBILE_CEU is not set
CONFIG_V4L_USB_DRIVERS=y
CONFIG_USB_VIDEO_CLASS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
-# CONFIG_USB_M5602 is not set
-# CONFIG_USB_STV06XX is not set
-# CONFIG_USB_GSPCA_CONEX is not set
-# CONFIG_USB_GSPCA_ETOMS is not set
-# CONFIG_USB_GSPCA_FINEPIX is not set
-# CONFIG_USB_GSPCA_MARS is not set
-# CONFIG_USB_GSPCA_OV519 is not set
-# CONFIG_USB_GSPCA_OV534 is not set
-# CONFIG_USB_GSPCA_PAC207 is not set
-# CONFIG_USB_GSPCA_PAC7311 is not set
-# CONFIG_USB_GSPCA_SONIXB is not set
-# CONFIG_USB_GSPCA_SONIXJ is not set
-# CONFIG_USB_GSPCA_SPCA500 is not set
-# CONFIG_USB_GSPCA_SPCA501 is not set
-# CONFIG_USB_GSPCA_SPCA505 is not set
-# CONFIG_USB_GSPCA_SPCA506 is not set
-# CONFIG_USB_GSPCA_SPCA508 is not set
-# CONFIG_USB_GSPCA_SPCA561 is not set
-# CONFIG_USB_GSPCA_STK014 is not set
-# CONFIG_USB_GSPCA_SUNPLUS is not set
-# CONFIG_USB_GSPCA_T613 is not set
-# CONFIG_USB_GSPCA_TV8532 is not set
-# CONFIG_USB_GSPCA_VC032X is not set
-# CONFIG_USB_GSPCA_ZC3XX is not set
-# CONFIG_VIDEO_PVRUSB2 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_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_USB_S2255 is not set
+CONFIG_USB_M5602=m
+CONFIG_USB_STV06XX=m
+CONFIG_USB_GSPCA_CONEX=m
+CONFIG_USB_GSPCA_ETOMS=m
+CONFIG_USB_GSPCA_FINEPIX=m
+CONFIG_USB_GSPCA_MARS=m
+CONFIG_USB_GSPCA_MR97310A=m
+CONFIG_USB_GSPCA_OV519=m
+CONFIG_USB_GSPCA_OV534=m
+CONFIG_USB_GSPCA_PAC207=m
+CONFIG_USB_GSPCA_PAC7311=m
+CONFIG_USB_GSPCA_SONIXB=m
+CONFIG_USB_GSPCA_SONIXJ=m
+CONFIG_USB_GSPCA_SPCA500=m
+CONFIG_USB_GSPCA_SPCA501=m
+CONFIG_USB_GSPCA_SPCA505=m
+CONFIG_USB_GSPCA_SPCA506=m
+CONFIG_USB_GSPCA_SPCA508=m
+CONFIG_USB_GSPCA_SPCA561=m
+CONFIG_USB_GSPCA_SQ905=m
+CONFIG_USB_GSPCA_SQ905C=m
+CONFIG_USB_GSPCA_STK014=m
+CONFIG_USB_GSPCA_SUNPLUS=m
+CONFIG_USB_GSPCA_T613=m
+CONFIG_USB_GSPCA_TV8532=m
+CONFIG_USB_GSPCA_VC032X=m
+CONFIG_USB_GSPCA_ZC3XX=m
+CONFIG_VIDEO_PVRUSB2=m
+CONFIG_VIDEO_PVRUSB2_SYSFS=y
+# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
+CONFIG_VIDEO_HDPVR=m
+CONFIG_VIDEO_EM28XX=m
+CONFIG_VIDEO_EM28XX_ALSA=m
+CONFIG_VIDEO_CX231XX=m
+CONFIG_VIDEO_CX231XX_ALSA=m
+CONFIG_VIDEO_USBVISION=m
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_QUICKCAM_MESSENGER=m
+CONFIG_USB_ET61X251=m
+CONFIG_VIDEO_OVCAMCHIP=m
+CONFIG_USB_W9968CF=m
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+CONFIG_USB_ZC0301=m
+CONFIG_USB_PWC=m
+# CONFIG_USB_PWC_DEBUG is not set
+CONFIG_USB_PWC_INPUT_EVDEV=y
+CONFIG_USB_ZR364XX=m
+CONFIG_USB_STKWEBCAM=m
+CONFIG_USB_S2255=m
# CONFIG_RADIO_ADAPTERS is not set
CONFIG_DAB=y
-# CONFIG_USB_DABUSB is not set
+CONFIG_USB_DABUSB=m
#
# Graphics support
@@ -1110,6 +1213,7 @@ CONFIG_FB_DAVINCI=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
@@ -1124,7 +1228,7 @@ CONFIG_FB_DAVINCI=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
@@ -1134,6 +1238,8 @@ CONFIG_SOUND_OSS_CORE=y
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_JACK=y
# CONFIG_SND_SEQUENCER is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
@@ -1155,7 +1261,7 @@ CONFIG_SND_USB=y
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_CAIAQ is not set
CONFIG_SND_SOC=y
-# CONFIG_SND_DAVINCI_SOC is not set
+CONFIG_SND_DAVINCI_SOC=y
CONFIG_SND_SOC_I2C_AND_SPI=y
# CONFIG_SND_SOC_ALL_CODECS is not set
# CONFIG_SOUND_PRIME is not set
@@ -1174,15 +1280,17 @@ CONFIG_USB_HID=y
#
# Special HID drivers
#
-CONFIG_HID_COMPAT=y
# CONFIG_HID_A4TECH is not set
# CONFIG_HID_APPLE is not set
# CONFIG_HID_BELKIN is not set
# CONFIG_HID_CHERRY is not set
# CONFIG_HID_CHICONY is not set
# CONFIG_HID_CYPRESS is not set
+# CONFIG_DRAGONRISE_FF is not set
# CONFIG_HID_EZKEY is not set
+# CONFIG_HID_KYE is not set
# CONFIG_HID_GYRATION is not set
+# CONFIG_HID_KENSINGTON is not set
# CONFIG_HID_LOGITECH is not set
# CONFIG_HID_MICROSOFT is not set
# CONFIG_HID_MONTEREY is not set
@@ -1210,7 +1318,8 @@ CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
CONFIG_USB_DYNAMIC_MINORS=y
-# CONFIG_USB_OTG is not set
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_OTG=y
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
CONFIG_USB_MON=y
@@ -1223,6 +1332,7 @@ CONFIG_USB_MON=y
# CONFIG_USB_C67X00_HCD is not set
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_HWA_HCD is not set
@@ -1232,10 +1342,10 @@ CONFIG_USB_MUSB_SOC=y
#
# DaVinci 35x and 644x USB support
#
-CONFIG_USB_MUSB_HOST=y
+# CONFIG_USB_MUSB_HOST is not set
# 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_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 is not set
@@ -1245,17 +1355,17 @@ CONFIG_USB_TI_CPPI_DMA=y
#
# USB Device Class drivers
#
-# CONFIG_USB_ACM is not set
+CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_WDM=m
-# CONFIG_USB_TMC is not set
+CONFIG_USB_TMC=m
#
-# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#
#
-# see USB_STORAGE Help for more information
+# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
@@ -1290,7 +1400,7 @@ CONFIG_USB_SERIAL=m
# CONFIG_USB_SERIAL_CH341 is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
-# CONFIG_USB_SERIAL_CP2101 is not set
+# CONFIG_USB_SERIAL_CP210X is not set
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
@@ -1314,11 +1424,13 @@ CONFIG_USB_SERIAL=m
# CONFIG_USB_SERIAL_NAVMAN is not set
# CONFIG_USB_SERIAL_PL2303 is not set
# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_QUALCOMM is not set
# CONFIG_USB_SERIAL_SPCP8X5 is not set
# CONFIG_USB_SERIAL_HP4X is not set
# CONFIG_USB_SERIAL_SAFE is not set
# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+# CONFIG_USB_SERIAL_SYMBOL is not set
# CONFIG_USB_SERIAL_TI is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
@@ -1341,7 +1453,6 @@ CONFIG_USB_SERIAL=m
CONFIG_USB_LED=m
# 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
@@ -1365,8 +1476,7 @@ CONFIG_USB_GADGET_SELECTED=y
# CONFIG_USB_GADGET_PXA27X is not set
# CONFIG_USB_GADGET_S3C2410 is not set
# CONFIG_USB_GADGET_IMX is not set
-CONFIG_USB_GADGET_M66592=y
-CONFIG_USB_M66592=m
+# CONFIG_USB_GADGET_M66592 is not set
# CONFIG_USB_GADGET_AMD5536UDC is not set
# CONFIG_USB_GADGET_FSL_QE is not set
# CONFIG_USB_GADGET_CI13XXX is not set
@@ -1374,22 +1484,24 @@ CONFIG_USB_M66592=m
# CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_DUMMY_HCD is not set
CONFIG_USB_GADGET_DUALSPEED=y
-# CONFIG_USB_ZERO is not set
+CONFIG_USB_ZERO=m
+# CONFIG_USB_ZERO_HNPTEST is not set
CONFIG_USB_ETH=m
CONFIG_USB_ETH_RNDIS=y
# CONFIG_USB_GADGETFS is not set
CONFIG_USB_FILE_STORAGE=m
# CONFIG_USB_FILE_STORAGE_TEST is not set
-# CONFIG_USB_G_SERIAL is not set
-# CONFIG_USB_MIDI_GADGET is not set
-# CONFIG_USB_G_PRINTER is not set
+CONFIG_USB_G_SERIAL=m
+CONFIG_USB_MIDI_GADGET=m
+CONFIG_USB_G_PRINTER=m
CONFIG_USB_CDC_COMPOSITE=m
#
# OTG and related infrastructure
#
CONFIG_USB_OTG_UTILS=y
-# CONFIG_USB_GPIO_VBUS is not set
+CONFIG_USB_GPIO_VBUS=m
+CONFIG_NOP_USB_XCEIV=m
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_UNSAFE_RESUME=y
@@ -1409,7 +1521,32 @@ CONFIG_MMC_SDHCI=y
CONFIG_MMC_DAVINCI=y
# CONFIG_MEMSTICK is not set
# CONFIG_ACCESSIBILITY is not set
-# CONFIG_NEW_LEDS is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=m
+CONFIG_LEDS_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP5521 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_BD2802 is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+CONFIG_LEDS_TRIGGER_BACKLIGHT=m
+CONFIG_LEDS_TRIGGER_GPIO=m
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
CONFIG_RTC_LIB=y
# CONFIG_RTC_CLASS is not set
CONFIG_DMADEVICES=y
@@ -1417,9 +1554,40 @@ CONFIG_DMADEVICES=y
#
# DMA Devices
#
-# CONFIG_REGULATOR is not set
+# CONFIG_AUXDISPLAY is not set
+CONFIG_REGULATOR=y
+# CONFIG_REGULATOR_DEBUG is not set
+CONFIG_REGULATOR_FIXED_VOLTAGE=m
+CONFIG_REGULATOR_VIRTUAL_CONSUMER=m
+# CONFIG_REGULATOR_BQ24022 is not set
# CONFIG_UIO is not set
-# CONFIG_STAGING is not set
+CONFIG_STAGING=y
+# CONFIG_STAGING_EXCLUDE_BUILD is not set
+# CONFIG_MEILHAUS is not set
+# CONFIG_USB_IP_COMMON is not set
+# CONFIG_ECHO is not set
+# CONFIG_COMEDI is not set
+# CONFIG_ASUS_OLED is not set
+# CONFIG_INPUT_MIMIO is not set
+# CONFIG_TRANZPORT is not set
+
+#
+# Android
+#
+# CONFIG_ANDROID is not set
+# CONFIG_ANDROID_BINDER_IPC is not set
+# CONFIG_ANDROID_LOGGER is not set
+# CONFIG_ANDROID_RAM_CONSOLE is not set
+# CONFIG_ANDROID_TIMED_GPIO is not set
+# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set
+# CONFIG_DST is not set
+# CONFIG_POHMELFS is not set
+# CONFIG_USB_SERIAL_ATEN2011 is not set
+# CONFIG_B3DFG is not set
+# CONFIG_PLAN9AUTH is not set
+# CONFIG_HECI is not set
+# CONFIG_LINE6_USB is not set
+# CONFIG_USB_SERIAL_QUATECH_ESU100 is not set
#
# File systems
@@ -1428,6 +1596,7 @@ CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
@@ -1456,6 +1625,11 @@ CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
#
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
@@ -1510,6 +1684,7 @@ CONFIG_MINIX_FS=m
# CONFIG_ROMFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
@@ -1525,7 +1700,6 @@ CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_REGISTER_V4 is not set
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
CONFIG_SMB_FS=m
@@ -1601,29 +1775,50 @@ CONFIG_NLS_UTF8=m
#
# Kernel hacking
#
-# CONFIG_PRINTK_TIME is not set
+CONFIG_PRINTK_TIME=y
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set
CONFIG_FRAME_WARN=1024
-# CONFIG_MAGIC_SYSRQ is not set
+CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_KERNEL is not set
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCHEDSTATS=y
+CONFIG_STACKTRACE=y
# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_DEBUG_MEMORY_INIT is not set
CONFIG_FRAME_POINTER=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
-# CONFIG_LATENCYTOP is not set
+CONFIG_LATENCYTOP=y
CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_NOP_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
+CONFIG_TRACING_SUPPORT=y
#
# Tracers
#
-# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+CONFIG_BLK_DEV_IO_TRACE=y
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_DYNAMIC_DEBUG is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_ARM_UNWIND=y
# CONFIG_DEBUG_USER is not set
#
@@ -1638,88 +1833,101 @@ CONFIG_CRYPTO=y
#
# Crypto core or helper
#
-# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_FIPS=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
-# CONFIG_CRYPTO_MANAGER is not set
-# CONFIG_CRYPTO_MANAGER2 is not set
-# CONFIG_CRYPTO_GF128MUL is not set
-# CONFIG_CRYPTO_NULL is not set
-# CONFIG_CRYPTO_CRYPTD is not set
-# CONFIG_CRYPTO_AUTHENC is not set
-# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_WORKQUEUE=y
+CONFIG_CRYPTO_CRYPTD=m
+CONFIG_CRYPTO_AUTHENC=m
+CONFIG_CRYPTO_TEST=m
#
# Authenticated Encryption with Associated Data
#
-# CONFIG_CRYPTO_CCM is not set
-# CONFIG_CRYPTO_GCM is not set
-# CONFIG_CRYPTO_SEQIV is not set
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
#
# Block modes
#
-# CONFIG_CRYPTO_CBC is not set
-# CONFIG_CRYPTO_CTR is not set
-# CONFIG_CRYPTO_CTS is not set
-# CONFIG_CRYPTO_ECB is not set
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_PCBC is not set
-# CONFIG_CRYPTO_XTS is not set
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XTS=m
#
# Hash modes
#
-# CONFIG_CRYPTO_HMAC is not set
-# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_XCBC=m
#
# Digest
#
-# CONFIG_CRYPTO_CRC32C is not set
-# CONFIG_CRYPTO_MD4 is not set
-# CONFIG_CRYPTO_MD5 is not set
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_RMD128 is not set
-# CONFIG_CRYPTO_RMD160 is not set
-# CONFIG_CRYPTO_RMD256 is not set
-# CONFIG_CRYPTO_RMD320 is not set
-# CONFIG_CRYPTO_SHA1 is not set
-# CONFIG_CRYPTO_SHA256 is not set
-# CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-# CONFIG_CRYPTO_WP512 is not set
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_WP512=m
#
# Ciphers
#
-# CONFIG_CRYPTO_AES is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-# CONFIG_CRYPTO_ARC4 is not set
-# CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_CAMELLIA is not set
-# CONFIG_CRYPTO_CAST5 is not set
-# CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_DES is not set
-# CONFIG_CRYPTO_FCRYPT is not set
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_SALSA20 is not set
-# CONFIG_CRYPTO_SEED is not set
-# CONFIG_CRYPTO_SERPENT is not set
-# CONFIG_CRYPTO_TEA is not set
-# CONFIG_CRYPTO_TWOFISH is not set
+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=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_ZLIB=m
CONFIG_CRYPTO_LZO=y
#
# Random Number Generation
#
-# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_ANSI_CPRNG=m
# CONFIG_CRYPTO_HW is not set
+CONFIG_BINARY_PRINTF=y
#
# Library routines
@@ -1731,13 +1939,15 @@ CONFIG_CRC16=y
# CONFIG_CRC_T10DIF is not set
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
-# CONFIG_CRC7 is not set
-# CONFIG_LIBCRC32C is not set
+CONFIG_CRC7=m
+CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
-CONFIG_PLIST=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_GENERIC_ALLOCATOR=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
diff --git a/recipes/linux/linux-davinci/dm6446-evm/defconfig b/recipes/linux/linux-davinci/dm6446-evm/defconfig
new file mode 100644
index 0000000000..130a0109ce
--- /dev/null
+++ b/recipes/linux/linux-davinci/dm6446-evm/defconfig
@@ -0,0 +1,1738 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-rc7-davinci1
+# Wed Apr 22 16:40:17 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=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_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=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_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE 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"
+# CONFIG_FREEZER is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+CONFIG_ARCH_DAVINCI=y
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+
+#
+# TI DaVinci Implementations
+#
+
+#
+# DaVinci Core Type
+#
+CONFIG_ARCH_DAVINCI_DM644x=y
+# CONFIG_ARCH_DAVINCI_DM646x is not set
+# CONFIG_ARCH_DAVINCI_DM355 is not set
+
+#
+# DaVinci Board Type
+#
+CONFIG_MACH_DAVINCI_EVM=y
+# CONFIG_MACH_SFFSDR is not set
+CONFIG_DAVINCI_MUX=y
+# CONFIG_DAVINCI_MUX_DEBUG is not set
+# CONFIG_DAVINCI_MUX_WARNINGS is not set
+# CONFIG_DAVINCI_RESET_CLOCKS 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
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=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
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+# CONFIG_VFP is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+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 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_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=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
+# CONFIG_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_NF_DEFRAG_IPV4 is not set
+# 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_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_LIB80211 is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# 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_TESTS is not set
+# 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=m
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=m
+# 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=m
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=m
+# 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=m
+# CONFIG_MTD_PHYSMAP_COMPAT is not set
+# 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=m
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_GPIO is not set
+CONFIG_MTD_NAND_IDS=m
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+CONFIG_MTD_NAND_DAVINCI=m
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=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_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=m
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+CONFIG_IDE_TIMINGS=y
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=m
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE 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_SFF=y
+CONFIG_BLK_DEV_PALMCHIP_BK3710=m
+CONFIG_BLK_DEV_IDEDMA=y
+
+#
+# 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_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_LIBFC is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+CONFIG_LXT_PHY=y
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+CONFIG_TI_DAVINCI_EMAC=y
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_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
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET 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_NETCONSOLE=y
+# CONFIG_NETCONSOLE_DYNAMIC is not set
+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=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=m
+CONFIG_INPUT_EVBUG=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=m
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_XTKBD=m
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_GPIO=y
+# 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_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+# CONFIG_VT_CONSOLE is not set
+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=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_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# 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
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_DAVINCI=y
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_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
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+CONFIG_GPIO_PCF857X=m
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# 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_AD7414 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_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 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_LTC4245 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_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_DAVINCI_WATCHDOG=m
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L2_COMMON=y
+CONFIG_VIDEO_ALLOW_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=y
+
+#
+# Multimedia drivers
+#
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=y
+# 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_V4L1=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_VPFE_CAPTURE 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_SOC_CAMERA is not set
+# CONFIG_V4L_USB_DRIVERS is not set
+# CONFIG_RADIO_ADAPTERS is not set
+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_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_DAVINCI=y
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX 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 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
+CONFIG_SOUND=m
+# CONFIG_SOUND_OSS_CORE is not set
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_HRTIMER is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+CONFIG_SND_ARM=y
+CONFIG_SND_USB=y
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+CONFIG_SND_SOC=m
+CONFIG_SND_DAVINCI_SOC=m
+CONFIG_SND_DAVINCI_SOC_I2S=m
+CONFIG_SND_DAVINCI_SOC_EVM=m
+CONFIG_SND_SOC_I2C_AND_SPI=m
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_TLV320AIC3X=m
+# CONFIG_SOUND_PRIME 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_HID_PID 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
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+# CONFIG_HID_A4TECH is not set
+# CONFIG_HID_APPLE is not set
+# CONFIG_HID_BELKIN is not set
+# CONFIG_HID_CHERRY is not set
+# CONFIG_HID_CHICONY is not set
+# CONFIG_HID_CYPRESS is not set
+# CONFIG_HID_EZKEY is not set
+# CONFIG_HID_GYRATION is not set
+# CONFIG_HID_LOGITECH is not set
+# CONFIG_HID_MICROSOFT is not set
+# CONFIG_HID_MONTEREY is not set
+# CONFIG_HID_NTRIG is not set
+# CONFIG_HID_PANTHERLORD is not set
+# CONFIG_HID_PETALYNX is not set
+# CONFIG_HID_SAMSUNG is not set
+# CONFIG_HID_SONY is not set
+# CONFIG_HID_SUNPLUS is not set
+# CONFIG_GREENASIA_FF is not set
+# CONFIG_HID_TOPSEED is not set
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF 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
+# 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
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=m
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+CONFIG_USB_MUSB_HDRC=m
+CONFIG_USB_MUSB_SOC=y
+
+#
+# DaVinci 35x and 644x USB support
+#
+# CONFIG_USB_MUSB_HOST is not set
+CONFIG_USB_MUSB_PERIPHERAL=y
+# CONFIG_USB_MUSB_OTG is not set
+CONFIG_USB_GADGET_MUSB_HDRC=y
+CONFIG_MUSB_PIO_ONLY=y
+# CONFIG_USB_MUSB_DEBUG is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more 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_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_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
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG is not set
+CONFIG_USB_GADGET_DEBUG_FILES=y
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_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_USB_G_PRINTER=m
+# CONFIG_USB_CDC_COMPOSITE is not set
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+# CONFIG_USB_GPIO_VBUS is not set
+CONFIG_MMC=m
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+CONFIG_MMC_DAVINCI=m
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=m
+# CONFIG_LEDS_PCA955X 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_LEDS_TRIGGER_BACKLIGHT is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=m
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DAVINCI_EVM is not set
+# 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
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+# CONFIG_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_FILE_LOCKING=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_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=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_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=m
+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=y
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+CONFIG_MINIX_FS=m
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 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
+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
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_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_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS 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 is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_MANAGER2 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+CONFIG_CRC_T10DIF=m
+# 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=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-davinci/dm6467-evm/defconfig b/recipes/linux/linux-davinci/dm6467-evm/defconfig
new file mode 100644
index 0000000000..b8b10e1229
--- /dev/null
+++ b/recipes/linux/linux-davinci/dm6467-evm/defconfig
@@ -0,0 +1,1241 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-rc7-davinci1
+# Wed Apr 22 16:56:18 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=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_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=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_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE 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"
+# CONFIG_FREEZER is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+CONFIG_ARCH_DAVINCI=y
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+
+#
+# TI DaVinci Implementations
+#
+
+#
+# DaVinci Core Type
+#
+# CONFIG_ARCH_DAVINCI_DM644x is not set
+CONFIG_ARCH_DAVINCI_DM646x=y
+# CONFIG_ARCH_DAVINCI_DM355 is not set
+
+#
+# DaVinci Board Type
+#
+CONFIG_MACH_DAVINCI_DM646X_EVM=y
+CONFIG_DAVINCI_MUX=y
+# CONFIG_DAVINCI_MUX_DEBUG is not set
+# CONFIG_DAVINCI_MUX_WARNINGS is not set
+# CONFIG_DAVINCI_RESET_CLOCKS 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
+CONFIG_COMMON_CLKDEV=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=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
+
+#
+# CPU Power Management
+#
+# CONFIG_CPU_IDLE 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_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+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 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_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=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
+# CONFIG_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_NF_DEFRAG_IPV4 is not set
+# 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_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_LIB80211 is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=1
+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_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=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_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_LIBFC is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+CONFIG_LSI_ET1011C_PHY=y
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+CONFIG_TI_DAVINCI_EMAC=y
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_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
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+# 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_NETCONSOLE=y
+# CONFIG_NETCONSOLE_DYNAMIC is not set
+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=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=m
+CONFIG_INPUT_EVBUG=m
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=m
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_XTKBD=m
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_GPIO=y
+# 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_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+# CONFIG_VT_CONSOLE is not set
+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=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_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# 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
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_DAVINCI=y
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_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
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+CONFIG_GPIO_PCF857X=m
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# 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_AD7414 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_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 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_LTC4245 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_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L2_COMMON=y
+CONFIG_VIDEO_ALLOW_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=y
+
+#
+# Multimedia drivers
+#
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=y
+# 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_V4L1=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_VPFE_CAPTURE is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_SOC_CAMERA is not set
+# CONFIG_RADIO_ADAPTERS is not set
+CONFIG_DAB=y
+
+#
+# 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_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_DAVINCI=y
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX 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 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
+CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
+# CONFIG_SND is not set
+CONFIG_SOUND_PRIME=m
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_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=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_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+CONFIG_MINIX_FS=m
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 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
+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
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_MANAGER2 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-davinci/update-mach-types.patch b/recipes/linux/linux-davinci/update-mach-types.patch
index 43d16a563c..f72836bf41 100644
--- a/recipes/linux/linux-davinci/update-mach-types.patch
+++ b/recipes/linux/linux-davinci/update-mach-types.patch
@@ -155,6 +155,6 @@
+rd78x00_masa MACH_RD78X00_MASA RD78X00_MASA 2135
+smallogger MACH_SMALLOGGER SMALLOGGER 2136
+ccw9p9215 MACH_CCW9P9215 CCW9P9215 2137
-+dm355_leopard MACH_DM355_LEOPARD DM355_LEOPARD 1381
++dm355_leopard MACH_DM355_LEOPARD DM355_LEOPARD 2138
+ts219 MACH_TS219 TS219 2139
+tny_a9263 MACH_TNY_A9263 TNY_A9263 2140
diff --git a/recipes/linux/linux-davinci_2.6.25.bb b/recipes/linux/linux-davinci_2.6.25.bb
index 97fd0d5210..ef4c919e0e 100644
--- a/recipes/linux/linux-davinci_2.6.25.bb
+++ b/recipes/linux/linux-davinci_2.6.25.bb
@@ -2,8 +2,8 @@ require linux-omap.inc
SRCREV = "f5691bc8f65a08a6cb9900a5c7099a36b2b9b7a7"
+# The main PR is now using MACHINE_KERNEL_PR, for davinci see conf/machine/include/davinci.inc
PV = "2.6.25"
-PR = "r3"
COMPATIBLE_MACHINE = "(davinci-dvevm|davinci-sffsdr)"
diff --git a/recipes/linux/linux-davinci_2.6.27.bb b/recipes/linux/linux-davinci_2.6.27.bb
index ad45330b47..4309ed5793 100644
--- a/recipes/linux/linux-davinci_2.6.27.bb
+++ b/recipes/linux/linux-davinci_2.6.27.bb
@@ -8,8 +8,8 @@ require linux-omap.inc
DAVINCI_SRCREV ?= "9d6ed804d27b9452fb96d68b16ee5f124a07e4f9"
SRCREV = "${DAVINCI_SRCREV}"
+# The main PR is now using MACHINE_KERNEL_PR, for davinci see conf/machine/include/davinci.inc
PV = "2.6.27"
-PR = "r0"
COMPATIBLE_MACHINE = "(davinci-dvevm)"
diff --git a/recipes/linux/linux-davinci_2.6.28.bb b/recipes/linux/linux-davinci_2.6.28.bb
index a5fe57bb4c..79abccfef7 100644
--- a/recipes/linux/linux-davinci_2.6.28.bb
+++ b/recipes/linux/linux-davinci_2.6.28.bb
@@ -3,7 +3,9 @@ require linux.inc
DESCRIPTION = "Linux kernel for Davinci processors"
KERNEL_IMAGETYPE = "uImage"
-COMPATIBLE_MACHINE = "davinci-sffsdr"
+COMPATIBLE_MACHINE = "(dm6446-evm|dm6467-evm|davinci-sffsdr)"
+
+# The main PR is now using MACHINE_KERNEL_PR, for davinci see conf/machine/include/davinci.inc
SRCREV = "0fc192ac07c977ad6f14333651b53096a6027bc6"
diff --git a/recipes/linux/linux-davinci_git.bb b/recipes/linux/linux-davinci_git.bb
index 332aeb6e04..7af90fa440 100644
--- a/recipes/linux/linux-davinci_git.bb
+++ b/recipes/linux/linux-davinci_git.bb
@@ -3,26 +3,19 @@ require linux.inc
DESCRIPTION = "Linux kernel for Davinci processors"
KERNEL_IMAGETYPE = "uImage"
-COMPATIBLE_MACHINE = "(davinci-dvevm|davinci-sffsdr|dm355-leopard)"
+COMPATIBLE_MACHINE = "(dm6446-evm|dm6467-evm|dm355-evm|davinci-sffsdr|dm355-leopard)"
-DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE = "1"
-SRCREV = "486afa37130356662213cc1a2199a285b4fd72af"
+SRCREV = "03022e38318bef016836dae71c70b9ea975723e7"
-PV = "2.6.29+2.6.29-rc7-${PR}+gitr${SRCREV}"
-PR = "r3"
+# The main PR is now using MACHINE_KERNEL_PR, for davinci see conf/machine/include/davinci.inc
+PV = "2.6.29+2.6.30-rc7-${PR}+gitr${SRCREV}"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git;protocol=git \
- file://update-mach-types.patch;patch=1 \
- file://vfpe1.patch;patch=1 \
- file://vfpe2.patch;patch=1 \
- file://vfpe3.patch;patch=1 \
- file://vfpe4.patch;patch=1 \
- file://vfpe5.patch;patch=1 \
- file://vfpe6.patch;patch=1 \
- file://vfpe7.patch;patch=1 \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git;protocol=git;branch=staging/vpfe \
file://defconfig"
+# Need checking
SRC_URI_append_davinci-sffsdr = " \
file://0001-USB-musb-cppi-bugfixes.patch;patch=1 \
file://0002-ARM-Mark-unsupported-syscalls-as-IGNORE.patch;patch=1 \
@@ -38,9 +31,4 @@ SRC_URI_append_davinci-sffsdr = " \
file://0012-Update-SFFSDR-to-support-FPGA-and-lyrvpss-drivers.patch;patch=1 \
"
-SRC_URI_append_dm355-leopard = " \
- file://0001-dm355-leopard-add-board-file-based-on-board-dm355-e.patch;patch=1 \
- file://vfpe.patch;patch=1 \
-"
-
S = "${WORKDIR}/git"
diff --git a/recipes/linux/linux-hackndev-2.6_git.bb b/recipes/linux/linux-hackndev-2.6_git.bb
index 71e1235b46..2f9f902bf7 100644
--- a/recipes/linux/linux-hackndev-2.6_git.bb
+++ b/recipes/linux/linux-hackndev-2.6_git.bb
@@ -6,9 +6,8 @@ PR = "r14"
COMPATIBLE_MACHINE = "(palmld|palmtc|palmtt3|palmtt5|palmtx|palmz31|palmz72|palmt650)"
-SRC_URI = "git://git.hackndev.com/linux-hnd;protocol=git;tag=master \
- file://defconfig"
-
+SRC_URI = "git://git.hackndev.com/hackndev/linux-hnd.git;protocol=git;tag=master \
+ file://defconfig "
S = "${WORKDIR}/git"
K_MAJOR = "2"
diff --git a/recipes/linux/linux-handhelds-2.6-2.6.21/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch b/recipes/linux/linux-handhelds-2.6-2.6.21/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
new file mode 100644
index 0000000000..ad10b67639
--- /dev/null
+++ b/recipes/linux/linux-handhelds-2.6-2.6.21/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
@@ -0,0 +1,34 @@
+From 38332cb98772f5ea757e6486bed7ed0381cb5f98 Mon Sep 17 00:00:00 2001
+From: Segher Boessenkool <segher@kernel.crashing.org>
+Date: Tue, 4 Mar 2008 14:59:54 -0800
+Subject: [PATCH] time: prevent the loop in timespec_add_ns() from being optimised away
+
+Since some architectures don't support __udivdi3().
+
+Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
+Cc: john stultz <johnstul@us.ibm.com>
+Cc: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+---
+ include/linux/time.h | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/time.h b/include/linux/time.h
+index 2091a19..d32ef0a 100644
+--- a/include/linux/time.h
++++ b/include/linux/time.h
+@@ -174,6 +174,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
+ {
+ 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++;
+ }
+--
+1.6.0.6
+
diff --git a/recipes/linux/linux-handhelds-2.6_2.6.21-hh20.bb b/recipes/linux/linux-handhelds-2.6_2.6.21-hh20.bb
index f6bb17302d..d955c0ab39 100644
--- a/recipes/linux/linux-handhelds-2.6_2.6.21-hh20.bb
+++ b/recipes/linux/linux-handhelds-2.6_2.6.21-hh20.bb
@@ -1,7 +1,7 @@
SECTION = "kernel"
DESCRIPTION = "handhelds.org Linux kernel 2.6 for PocketPCs and other consumer handheld devices."
LICENSE = "GPL"
-PR = "r25"
+PR = "r26"
DEFAULT_PREFERENCE = "-1"
@@ -13,6 +13,7 @@ SRC_URI = "${HANDHELDS_CVS};module=linux/kernel26;tag=${@'K' + bb.data.getVar('P
file://linux-2.6.git-9d20fdd58e74d4d26dc5216efaaa0f800c23dd3a.patch;patch=1 \
http://www.rpsys.net/openzaurus/patches/archive/export_atags-r0a.patch;patch=1 \
file://gcc4x-limits.patch;patch=1 \
+ file://0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch;patch=1 \
file://defconfig"
require linux-handhelds-2.6.inc
diff --git a/recipes/linux/linux-kirkwood/0001--ARM-Kirkwood-CPU-idle-driver.patch b/recipes/linux/linux-kirkwood/0001--ARM-Kirkwood-CPU-idle-driver.patch
new file mode 100644
index 0000000000..29e7851c7f
--- /dev/null
+++ b/recipes/linux/linux-kirkwood/0001--ARM-Kirkwood-CPU-idle-driver.patch
@@ -0,0 +1,162 @@
+From 286f96f0b2e1ee5a124effba59a01f8d4bf69ddf Mon Sep 17 00:00:00 2001
+From: Rabeeh Khoury <rabeeh@marvell.com>
+Date: Tue, 24 Mar 2009 16:10:15 +0200
+Subject: [PATCH] [ARM] Kirkwood: CPU idle driver
+
+The patch adds support for Kirkwood cpu idle.
+Two idle states are defined:
+1. Wait-for-interrupt (replacing default kirkwood wfi)
+2. Wait-for-interrupt and DDR self refresh
+
+Signed-off-by: Rabeeh Khoury <rabeeh@marvell.com>
+Signed-off-by: Nicolas Pitre <nico@marvell.com>
+---
+ arch/arm/configs/kirkwood_defconfig | 4 +-
+ arch/arm/mach-kirkwood/Makefile | 2 +
+ arch/arm/mach-kirkwood/cpuidle.c | 96 ++++++++++++++++++++++++
+ arch/arm/mach-kirkwood/include/mach/kirkwood.h | 1 +
+ 4 files changed, 102 insertions(+), 1 deletions(-)
+ create mode 100644 arch/arm/mach-kirkwood/cpuidle.c
+
+diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
+index c367ae4..a99b3eb 100644
+--- a/arch/arm/configs/kirkwood_defconfig
++++ b/arch/arm/configs/kirkwood_defconfig
+@@ -263,7 +263,9 @@ CONFIG_CMDLINE=""
+ #
+ # CPU Power Management
+ #
+-# CONFIG_CPU_IDLE is not set
++CONFIG_CPU_IDLE=y
++CONFIG_CPU_IDLE_GOV_LADDER=y
++CONFIG_CPU_IDLE_GOV_MENU=y
+
+ #
+ # Floating point emulation
+diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
+index 8f03c9b..f21f35d 100644
+--- a/arch/arm/mach-kirkwood/Makefile
++++ b/arch/arm/mach-kirkwood/Makefile
+@@ -5,3 +5,5 @@ obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
+ obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
+ obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
+ obj-$(CONFIG_MACH_TS219) += ts219-setup.o
++
++obj-$(CONFIG_CPU_IDLE) += cpuidle.o
+diff --git a/arch/arm/mach-kirkwood/cpuidle.c b/arch/arm/mach-kirkwood/cpuidle.c
+new file mode 100644
+index 0000000..43052c7
+--- /dev/null
++++ b/arch/arm/mach-kirkwood/cpuidle.c
+@@ -0,0 +1,96 @@
++/*
++ * arch/arm/mach-kirkwood/cpuidle.c
++ *
++ * CPU idle Marvell Kirkwood SoCs
++ *
++ * This file is licensed under the terms of the GNU General Public
++ * License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ *
++ * The cpu idle uses wait-for-interrupt and DDR self refresh in order
++ * to implement two idle states -
++ * #1 wait-for-interrupt
++ * #2 wait-for-interrupt and DDR self refresh
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/cpuidle.h>
++#include <asm/io.h>
++#include <asm/proc-fns.h>
++#include <mach/kirkwood.h>
++
++#define KIRKWOOD_MAX_STATES 2
++
++static struct cpuidle_driver kirkwood_idle_driver = {
++ .name = "kirkwood_idle",
++ .owner = THIS_MODULE,
++};
++
++static DEFINE_PER_CPU(struct cpuidle_device, kirkwood_cpuidle_device);
++
++/* Actual code that puts the SoC in different idle states */
++static int kirkwood_enter_idle(struct cpuidle_device *dev,
++ struct cpuidle_state *state)
++{
++ struct timeval before, after;
++ int idle_time;
++
++ local_irq_disable();
++ do_gettimeofday(&before);
++ if (state == &dev->states[0])
++ /* Wait for interrupt state */
++ cpu_do_idle();
++ else if (state == &dev->states[1]) {
++ /*
++ * Following write will put DDR in self refresh.
++ * Note that we have 256 cycles before DDR puts it
++ * self in self-refresh, so the wait-for-interrupt
++ * call afterwards won't get the DDR from self refresh
++ * mode.
++ */
++ writel(0x7, DDR_OPERATION_BASE);
++ cpu_do_idle();
++ }
++ do_gettimeofday(&after);
++ local_irq_enable();
++ idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
++ (after.tv_usec - before.tv_usec);
++ return idle_time;
++}
++
++/* Initialize CPU idle by registering the idle states */
++static int kirkwood_init_cpuidle(void)
++{
++ struct cpuidle_device *device;
++
++ cpuidle_register_driver(&kirkwood_idle_driver);
++
++ device = &per_cpu(kirkwood_cpuidle_device, smp_processor_id());
++ device->state_count = KIRKWOOD_MAX_STATES;
++
++ /* Wait for interrupt state */
++ device->states[0].enter = kirkwood_enter_idle;
++ device->states[0].exit_latency = 1;
++ device->states[0].target_residency = 10000;
++ device->states[0].flags = CPUIDLE_FLAG_TIME_VALID;
++ strcpy(device->states[0].name, "WFI");
++ strcpy(device->states[0].desc, "Wait for interrupt");
++
++ /* Wait for interrupt and DDR self refresh state */
++ device->states[1].enter = kirkwood_enter_idle;
++ device->states[1].exit_latency = 10;
++ device->states[1].target_residency = 10000;
++ device->states[1].flags = CPUIDLE_FLAG_TIME_VALID;
++ strcpy(device->states[1].name, "DDR SR");
++ strcpy(device->states[1].desc, "WFI and DDR Self Refresh");
++
++ if (cpuidle_register_device(device)) {
++ printk(KERN_ERR "kirkwood_init_cpuidle: Failed registering\n");
++ return -EIO;
++ }
++ return 0;
++}
++
++device_initcall(kirkwood_init_cpuidle);
+diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+index 38c9868..e9ae73d 100644
+--- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h
++++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+@@ -86,6 +86,7 @@
+ */
+ #define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000)
+ #define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500)
++#define DDR_OPERATION_BASE (DDR_VIRT_BASE | 0x1418)
+
+ #define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000)
+ #define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000)
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-kirkwood/0002--ARM-Kirkwood-peripherals-clock-gating-for-power-m.patch b/recipes/linux/linux-kirkwood/0002--ARM-Kirkwood-peripherals-clock-gating-for-power-m.patch
new file mode 100644
index 0000000000..b1c7f7ce00
--- /dev/null
+++ b/recipes/linux/linux-kirkwood/0002--ARM-Kirkwood-peripherals-clock-gating-for-power-m.patch
@@ -0,0 +1,131 @@
+From 17589962c1787310e6373478a9fcb7641184cd91 Mon Sep 17 00:00:00 2001
+From: Rabeeh Khoury <rabeeh@marvell.com>
+Date: Sun, 22 Mar 2009 17:30:32 +0200
+Subject: [PATCH] [ARM] Kirkwood: peripherals clock gating for power management
+
+1. Enabling clock gating of unused peripherals
+2. PLL and PHY of the units are also disabled (when possible.
+
+Signed-off-by: Rabeeh Khoury <rabeeh@marvell.com>
+
+[ This needs to be revisited to make power handling dynamic and
+ per device. -- Nico ]
+---
+ arch/arm/mach-kirkwood/common.c | 32 ++++++++++++++++++++++++
+ arch/arm/mach-kirkwood/common.h | 1 +
+ arch/arm/mach-kirkwood/include/mach/kirkwood.h | 23 +++++++++++++++++
+ arch/arm/mach-kirkwood/sheevaplug-setup.c | 2 +
+ 4 files changed, 58 insertions(+), 0 deletions(-)
+
+Index: git/arch/arm/mach-kirkwood/common.c
+===================================================================
+--- git.orig/arch/arm/mach-kirkwood/common.c
++++ git/arch/arm/mach-kirkwood/common.c
+@@ -779,6 +779,38 @@ static void __init kirkwood_l2_init(void
+ #endif
+ }
+
++void __init kirkwood_clock_gate(u32 reg)
++{
++ printk(KERN_INFO "Kirkwood: Gating clock using mask 0x%x\n", reg);
++ /* First make sure that the units are accessible */
++ writel(readl(CLOCK_GATING_CTRL) | reg, CLOCK_GATING_CTRL);
++ /* For SATA first shutdown the phy */
++ if (reg & CGC_SATA0) {
++ /* Disable PLL and IVREF */
++ writel(readl(SATA0_PHY_MODE_2) & ~0xf, SATA0_PHY_MODE_2);
++ /* Disable PHY */
++ writel(readl(SATA0_IF_CTRL) | 0x200, SATA0_IF_CTRL);
++ }
++ if (reg & CGC_SATA1) {
++ /* Disable PLL and IVREF */
++ writel(readl(SATA1_PHY_MODE_2) & ~0xf, SATA1_PHY_MODE_2);
++ /* Disable PHY */
++ writel(readl(SATA1_IF_CTRL) | 0x200, SATA1_IF_CTRL);
++ }
++ /* For PCI-E first shutdown the phy */
++ if (reg & CGC_PEX0) {
++ writel(readl(PCIE_LINK_CTRL) | 0x10, PCIE_LINK_CTRL);
++ while (1) {
++ if (readl(PCIE_STATUS) & 0x1)
++ break;
++ }
++ writel(readl(PCIE_LINK_CTRL) & ~0x10, PCIE_LINK_CTRL);
++ }
++ /* Now gate clock the required units */
++ writel(readl(CLOCK_GATING_CTRL) & ~reg, CLOCK_GATING_CTRL);
++ return;
++}
++
+ void __init kirkwood_init(void)
+ {
+ printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n",
+Index: git/arch/arm/mach-kirkwood/common.h
+===================================================================
+--- git.orig/arch/arm/mach-kirkwood/common.h
++++ git/arch/arm/mach-kirkwood/common.h
+@@ -22,6 +22,7 @@ struct mvsdio_platform_data;
+ void kirkwood_map_io(void);
+ void kirkwood_init(void);
+ void kirkwood_init_irq(void);
++void __init kirkwood_clock_gate(u32 reg);
+
+ extern struct mbus_dram_target_info kirkwood_mbus_dram_info;
+ void kirkwood_setup_cpu_mbus(void);
+Index: git/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+===================================================================
+--- git.orig/arch/arm/mach-kirkwood/include/mach/kirkwood.h
++++ git/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+@@ -65,6 +65,8 @@
+ #define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000)
+
+ #define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000)
++#define PCIE_LINK_CTRL (PCIE_VIRT_BASE | 0x70)
++#define PCIE_STATUS (PCIE_VIRT_BASE | 0x1a04)
+
+ #define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000)
+
+@@ -81,9 +83,30 @@
+ #define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000)
+
+ #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
++#define SATA_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x80000)
++#define SATA0_IF_CTRL (SATA_VIRT_BASE | 0x2050)
++#define SATA0_PHY_MODE_2 (SATA_VIRT_BASE | 0x2330)
++#define SATA1_IF_CTRL (SATA_VIRT_BASE | 0x4050)
++#define SATA1_PHY_MODE_2 (SATA_VIRT_BASE | 0x4330)
+
+ #define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000)
+
++#define CLOCK_GATING_CTRL (BRIDGE_VIRT_BASE | 0x11c)
++#define CGC_GE0 0x1
++#define CGC_PEX0 0x4
++#define CGC_USB0 0x8
++#define CGC_SDIO 0x10
++#define CGC_TSU 0x20
++#define CGC_NAND_SPI 0x80
++#define CGC_XOR0 0x100
++#define CGC_AUDIO 0x200
++#define CGC_SATA0 0x4000
++#define CGC_SATA1 0x8000
++#define CGC_XOR1 0x10000
++#define CGC_CRYPTO 0x20000
++#define CGC_GE1 0x80000
++#define CGC_TDM 0x100000
++
+ /*
+ * Supported devices and revisions.
+ */
+Index: git/arch/arm/mach-kirkwood/sheevaplug-setup.c
+===================================================================
+--- git.orig/arch/arm/mach-kirkwood/sheevaplug-setup.c
++++ git/arch/arm/mach-kirkwood/sheevaplug-setup.c
+@@ -122,6 +122,8 @@ static void __init sheevaplug_init(void)
+
+ platform_device_register(&sheevaplug_nand_flash);
+ platform_device_register(&sheevaplug_leds);
++ kirkwood_clock_gate(CGC_PEX0 | CGC_TSU | CGC_AUDIO | CGC_SATA0 |\
++ CGC_SATA1 | CGC_CRYPTO | CGC_GE1 | CGC_TDM);
+ }
+
+ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
diff --git a/recipes/linux/linux-kirkwood/defconfig b/recipes/linux/linux-kirkwood/defconfig
index 23bf5d9820..cddefb13af 100644
--- a/recipes/linux/linux-kirkwood/defconfig
+++ b/recipes/linux/linux-kirkwood/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29.2
-# Sat May 16 20:08:52 2009
+# Linux kernel version: 2.6.29.5
+# Sun Jun 21 17:09:24 2009
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -181,6 +181,7 @@ CONFIG_ARCH_KIRKWOOD=y
CONFIG_MACH_DB88F6281_BP=y
CONFIG_MACH_RD88F6192_NAS=y
CONFIG_MACH_RD88F6281=y
+# CONFIG_MACH_MV88F6281GTW_GE is not set
CONFIG_MACH_SHEEVAPLUG=y
# CONFIG_MACH_TS219 is not set
CONFIG_PLAT_ORION=y
@@ -267,7 +268,9 @@ CONFIG_ATAGS_PROC=y
#
# CPU Power Management
#
-# CONFIG_CPU_IDLE is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
#
# Floating point emulation
@@ -1182,7 +1185,7 @@ 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_DVB_CORE=m
CONFIG_VIDEO_MEDIA=m
#
@@ -1193,16 +1196,23 @@ CONFIG_MEDIA_TUNER=m
# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
CONFIG_MEDIA_TUNER_SIMPLE=m
CONFIG_MEDIA_TUNER_TDA8290=m
+CONFIG_MEDIA_TUNER_TDA827X=m
+CONFIG_MEDIA_TUNER_TDA18271=m
CONFIG_MEDIA_TUNER_TDA9887=m
CONFIG_MEDIA_TUNER_TEA5761=m
CONFIG_MEDIA_TUNER_TEA5767=m
CONFIG_MEDIA_TUNER_MT20XX=m
+CONFIG_MEDIA_TUNER_MT2060=m
+CONFIG_MEDIA_TUNER_MT2266=m
+CONFIG_MEDIA_TUNER_QT1010=m
CONFIG_MEDIA_TUNER_XC2028=m
CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_MEDIA_TUNER_MXL5005S=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEO_V4L1=m
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_VMALLOC=m
+CONFIG_VIDEOBUF_DVB=m
CONFIG_VIDEO_IR=m
CONFIG_VIDEO_TVEEPROM=m
CONFIG_VIDEO_TUNER=m
@@ -1218,7 +1228,7 @@ CONFIG_VIDEO_SAA711X=m
CONFIG_VIDEO_TVP5150=m
CONFIG_VIDEO_CX25840=m
CONFIG_VIDEO_CX2341X=m
-# CONFIG_VIDEO_VIVI is not set
+CONFIG_VIDEO_VIVI=m
# CONFIG_VIDEO_BT848 is not set
# CONFIG_VIDEO_CPIA is not set
# CONFIG_VIDEO_CPIA2 is not set
@@ -1230,7 +1240,10 @@ CONFIG_VIDEO_CX2341X=m
# CONFIG_VIDEO_HEXIUM_ORION is not set
# CONFIG_VIDEO_HEXIUM_GEMINI is not set
# CONFIG_VIDEO_CX88 is not set
+# CONFIG_VIDEO_CX23885 is not set
+# CONFIG_VIDEO_AU0828 is not set
# CONFIG_VIDEO_IVTV is not set
+# CONFIG_VIDEO_CX18 is not set
# CONFIG_VIDEO_CAFE_CCIC is not set
# CONFIG_SOC_CAMERA is not set
CONFIG_V4L_USB_DRIVERS=y
@@ -1263,9 +1276,11 @@ CONFIG_USB_GSPCA_VC032X=m
CONFIG_USB_GSPCA_ZC3XX=m
CONFIG_VIDEO_PVRUSB2=m
CONFIG_VIDEO_PVRUSB2_SYSFS=y
+CONFIG_VIDEO_PVRUSB2_DVB=y
# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
CONFIG_VIDEO_EM28XX=m
CONFIG_VIDEO_EM28XX_ALSA=m
+CONFIG_VIDEO_EM28XX_DVB=m
CONFIG_VIDEO_USBVISION=m
CONFIG_VIDEO_USBVIDEO=m
CONFIG_USB_VICAM=m
@@ -1293,7 +1308,172 @@ CONFIG_USB_DSBR=m
# CONFIG_USB_SI470X is not set
CONFIG_USB_MR800=m
# CONFIG_RADIO_TEA5764 is not set
-# CONFIG_DAB is not set
+CONFIG_DVB_DYNAMIC_MINORS=y
+CONFIG_DVB_CAPTURE_DRIVERS=y
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+# CONFIG_TTPCI_EEPROM is not set
+# CONFIG_DVB_AV7110 is not set
+# CONFIG_DVB_BUDGET_CORE is not set
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_USB=m
+# CONFIG_DVB_USB_DEBUG is not set
+CONFIG_DVB_USB_A800=m
+CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
+CONFIG_DVB_USB_DIBUSB_MC=m
+CONFIG_DVB_USB_DIB0700=m
+CONFIG_DVB_USB_UMT_010=m
+CONFIG_DVB_USB_CXUSB=m
+CONFIG_DVB_USB_M920X=m
+CONFIG_DVB_USB_GL861=m
+CONFIG_DVB_USB_AU6610=m
+CONFIG_DVB_USB_DIGITV=m
+CONFIG_DVB_USB_VP7045=m
+CONFIG_DVB_USB_VP702X=m
+CONFIG_DVB_USB_GP8PSK=m
+CONFIG_DVB_USB_NOVA_T_USB2=m
+CONFIG_DVB_USB_TTUSB2=m
+CONFIG_DVB_USB_DTT200U=m
+CONFIG_DVB_USB_OPERA1=m
+CONFIG_DVB_USB_AF9005=m
+CONFIG_DVB_USB_AF9005_REMOTE=m
+CONFIG_DVB_USB_DW2102=m
+CONFIG_DVB_USB_CINERGY_T2=m
+CONFIG_DVB_USB_ANYSEE=m
+CONFIG_DVB_USB_DTV5100=m
+# CONFIG_DVB_USB_AF9015 is not set
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+CONFIG_DVB_SIANO_SMS1XXX=m
+CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+# CONFIG_DVB_B2C2_FLEXCOP is not set
+
+#
+# Supported BT878 Adapters
+#
+
+#
+# Supported Pluto2 Adapters
+#
+# CONFIG_DVB_PLUTO2 is not set
+
+#
+# Supported SDMC DM1105 Adapters
+#
+# CONFIG_DVB_DM1105 is not set
+
+#
+# Supported DVB Frontends
+#
+
+#
+# Customise DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+
+#
+# Multistandard (satellite) frontends
+#
+CONFIG_DVB_STB0899=m
+CONFIG_DVB_STB6100=m
+
+#
+# DVB-S (satellite) frontends
+#
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_S5H1420=m
+CONFIG_DVB_STV0288=m
+CONFIG_DVB_STB6000=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_TDA8083=m
+CONFIG_DVB_TDA10086=m
+CONFIG_DVB_TDA8261=m
+CONFIG_DVB_VES1X93=m
+# CONFIG_DVB_TUNER_ITD1000 is not set
+CONFIG_DVB_TUNER_CX24113=m
+CONFIG_DVB_TDA826X=m
+CONFIG_DVB_TUA6100=m
+CONFIG_DVB_CX24116=m
+CONFIG_DVB_SI21XX=m
+
+#
+# DVB-T (terrestrial) frontends
+#
+CONFIG_DVB_SP8870=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_CX22700=m
+CONFIG_DVB_CX22702=m
+CONFIG_DVB_DRX397XD=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
+
+#
+# DVB-C (cable) frontends
+#
+CONFIG_DVB_VES1820=m
+# CONFIG_DVB_TDA10021 is not set
+CONFIG_DVB_TDA10023=m
+CONFIG_DVB_STV0297=m
+
+#
+# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
+#
+CONFIG_DVB_NXT200X=m
+CONFIG_DVB_OR51211=m
+CONFIG_DVB_OR51132=m
+CONFIG_DVB_BCM3510=m
+CONFIG_DVB_LGDT330X=m
+CONFIG_DVB_LGDT3304=m
+CONFIG_DVB_S5H1409=m
+CONFIG_DVB_AU8522=m
+CONFIG_DVB_S5H1411=m
+
+#
+# ISDB-T (terrestrial) frontends
+#
+CONFIG_DVB_S921=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=m
+CONFIG_DVB_ISL6421=m
+CONFIG_DVB_LGS8GL5=m
+
+#
+# Tools to develop new frontends
+#
+CONFIG_DVB_DUMMY_FE=m
+CONFIG_DVB_AF9013=m
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
#
# Graphics support
@@ -1301,7 +1481,60 @@ CONFIG_USB_MR800=m
# CONFIG_DRM is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
+CONFIG_FB=m
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT 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=m
+CONFIG_FB_SYS_COPYAREA=m
+CONFIG_FB_SYS_IMAGEBLIT=m
+CONFIG_FB_FOREIGN_ENDIAN=y
+CONFIG_FB_BOTH_ENDIAN=y
+# CONFIG_FB_BIG_ENDIAN is not set
+# CONFIG_FB_LITTLE_ENDIAN is not set
+CONFIG_FB_SYS_FOPS=m
+# 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_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 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=m
+# CONFIG_FB_RADEON_I2C is not set
+# CONFIG_FB_RADEON_BACKLIGHT is not set
+# CONFIG_FB_RADEON_DEBUG 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_VIA is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
+CONFIG_FB_VIRTUAL=m
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
@@ -1314,7 +1547,9 @@ CONFIG_USB_MR800=m
#
# CONFIG_VGA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE is not set
CONFIG_FONT_8x16=y
+# CONFIG_LOGO is not set
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
CONFIG_SND=m
@@ -1493,7 +1728,7 @@ CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_WDM=m
-# CONFIG_USB_TMC is not set
+CONFIG_USB_TMC=m
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
@@ -1590,15 +1825,15 @@ CONFIG_USB_SERIAL_OPTICON=m
#
CONFIG_USB_EMI62=m
CONFIG_USB_EMI26=m
-# CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_SEVSEG is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
+CONFIG_USB_ADUTUX=m
+CONFIG_USB_SEVSEG=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
CONFIG_USB_LCD=m
CONFIG_USB_BERRY_CHARGE=m
CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
+CONFIG_USB_CYPRESS_CY7C63=m
+CONFIG_USB_CYTHERM=m
# CONFIG_USB_PHIDGET is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
@@ -1765,7 +2000,37 @@ CONFIG_DMA_ENGINE=y
# CONFIG_DMATEST is not set
# CONFIG_REGULATOR is not set
# CONFIG_UIO is not set
-# CONFIG_STAGING is not set
+CONFIG_STAGING=y
+# CONFIG_STAGING_EXCLUDE_BUILD is not set
+# CONFIG_ET131X is not set
+# CONFIG_ME4000 is not set
+# CONFIG_MEILHAUS is not set
+# CONFIG_VIDEO_GO7007 is not set
+CONFIG_USB_IP_COMMON=m
+CONFIG_USB_IP_VHCI_HCD=m
+CONFIG_USB_IP_HOST=m
+CONFIG_W35UND=m
+CONFIG_PRISM2_USB=m
+# CONFIG_ECHO is not set
+# CONFIG_USB_ATMEL is not set
+# CONFIG_AGNX is not set
+CONFIG_OTUS=m
+# CONFIG_COMEDI is not set
+# CONFIG_ASUS_OLED is not set
+# CONFIG_ALTERA_PCIE_CHDMA is not set
+# CONFIG_RTL8187SE is not set
+# CONFIG_INPUT_MIMIO is not set
+# CONFIG_TRANZPORT is not set
+
+#
+# Android
+#
+# CONFIG_ANDROID is not set
+# CONFIG_ANDROID_BINDER_IPC is not set
+# CONFIG_ANDROID_LOGGER is not set
+# CONFIG_ANDROID_RAM_CONSOLE is not set
+# CONFIG_ANDROID_TIMED_GPIO is not set
+# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set
#
# File systems
diff --git a/recipes/linux/linux-kirkwood_2.6.29.2.bb b/recipes/linux/linux-kirkwood_2.6.29.5.bb
index 4dceb7601b..f503829211 100644
--- a/recipes/linux/linux-kirkwood_2.6.29.2.bb
+++ b/recipes/linux/linux-kirkwood_2.6.29.5.bb
@@ -6,14 +6,15 @@ COMPATIBLE_MACHINE = "sheevaplug"
require linux.inc
# Change MACHINE_KERNEL_PR in conf/machine/include/kirkwood.inc
-PV = "2.6.29.2"
+PV = "2.6.29.5"
PR_append = "+gitr${SRCREV}"
#PV = "2.6.28+2.6.29rc7-${PR}+gitr${SRCREV}"
-SRCREV = "10a12868405319fbf114af2bde9789aa64c34144"
+SRCREV = "70deca35020a5dc3bd3c228bd46852cab77a7f6b"
SRC_URI = "git://git.marvell.com/orion.git;protocol=git;branch=stable-2.6.29 \
file://fw.patch;patch=1 \
- file://mvsdio.patch;patch=1 \
+ file://0001--ARM-Kirkwood-CPU-idle-driver.patch;patch=1 \
+ file://0002--ARM-Kirkwood-peripherals-clock-gating-for-power-m.patch;patch=1 \
file://defconfig \
"
diff --git a/recipes/linux/linux-mini2440-2.6.29+git/defconfig-mini2440 b/recipes/linux/linux-mini2440-2.6.29+git/defconfig-mini2440
new file mode 100644
index 0000000000..9e71cbe0ee
--- /dev/null
+++ b/recipes/linux/linux-mini2440-2.6.29+git/defconfig-mini2440
@@ -0,0 +1,2122 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29.3
+# Sun May 10 15:49:07 2009
+#
+CONFIG_ARM=y
+CONFIG_HAVE_PWM=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_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_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
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=17
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+CONFIG_RELAY=y
+CONFIG_NAMESPACES=y
+CONFIG_UTS_NS=y
+CONFIG_IPC_NS=y
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_NET_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_BLK_DEV_INTEGRITY=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+CONFIG_ARCH_S3C2410=y
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+CONFIG_PLAT_S3C24XX=y
+CONFIG_S3C2410_CLOCK=y
+CONFIG_CPU_S3C244X=y
+CONFIG_S3C24XX_PWM=y
+CONFIG_S3C24XX_GPIO_EXTRA=0
+CONFIG_S3C2410_DMA=y
+# CONFIG_S3C2410_DMA_DEBUG is not set
+CONFIG_S3C24XX_ADC=y
+CONFIG_PLAT_S3C=y
+CONFIG_CPU_LLSERIAL_S3C2440_ONLY=y
+CONFIG_CPU_LLSERIAL_S3C2440=y
+
+#
+# Boot options
+#
+# CONFIG_S3C_BOOT_WATCHDOG is not set
+# CONFIG_S3C_BOOT_ERROR_RESET is not set
+CONFIG_S3C_BOOT_UART_FORCE_FIFO=y
+
+#
+# Power management
+#
+# CONFIG_S3C2410_PM_DEBUG is not set
+# CONFIG_S3C2410_PM_CHECK is not set
+CONFIG_S3C_LOWLEVEL_UART_PORT=0
+CONFIG_S3C_GPIO_SPACE=0
+
+#
+# S3C2400 Machines
+#
+CONFIG_S3C2410_PM=y
+CONFIG_S3C2410_GPIO=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_TCT_HAMMER is not set
+# CONFIG_MACH_VR1000 is not set
+# CONFIG_MACH_QT2410 is not set
+
+#
+# S3C2412 Machines
+#
+# CONFIG_MACH_JIVE is not set
+# 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
+
+#
+# S3C2440 Machines
+#
+# CONFIG_MACH_ANUBIS is not set
+# CONFIG_MACH_OSIRIS is not set
+# CONFIG_MACH_RX3715 is not set
+# CONFIG_ARCH_S3C2440 is not set
+# CONFIG_MACH_NEXCODER_2440 is not set
+# CONFIG_MACH_AT2440EVB is not set
+CONFIG_MACH_MINI2440=y
+
+#
+# S3C2442 Machines
+#
+
+#
+# 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_PABRT_NOIFAR=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_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=200
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE=""
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_NET_KEY=m
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# 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 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=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_IPV6 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_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG is not set
+# CONFIG_NF_CONNTRACK is not set
+# CONFIG_NETFILTER_XTABLES is not set
+# CONFIG_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_NF_DEFRAG_IPV4 is not set
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+# 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_STP=m
+CONFIG_GARP=m
+CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_VLAN_8021Q_GVRP=y
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+# 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_HCIBTUSB=m
+CONFIG_BT_HCIBTSDIO=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_LL=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_FIB_RULES=y
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=m
+CONFIG_CFG80211_REG_DEBUG=y
+CONFIG_NL80211=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=m
+CONFIG_LIB80211_CRYPT_WEP=m
+CONFIG_LIB80211_CRYPT_CCMP=m
+CONFIG_LIB80211_CRYPT_TKIP=m
+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_MAC80211=m
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_MINSTREL=y
+# CONFIG_MAC80211_RC_DEFAULT_PID is not set
+CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
+CONFIG_MAC80211_RC_DEFAULT="minstrel"
+CONFIG_MAC80211_MESH=y
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+# CONFIG_WIMAX 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_FIRMWARE_IN_KERNEL is not set
+CONFIG_EXTRA_FIRMWARE=""
+# 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=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_FTL=y
+CONFIG_NFTL=y
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=y
+CONFIG_RFD_FTL=y
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_CFI_UTIL=y
+CONFIG_MTD_RAM=y
+CONFIG_MTD_ROM=y
+# 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_IMPA7 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_GPIO 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 is not set
+# 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=y
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+CONFIG_MTD_LPDDR=y
+CONFIG_MTD_QINFO_PROBE=y
+
+#
+# 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=m
+# 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_XIP is not set
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+CONFIG_EEPROM_AT24=y
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+# 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 is not set
+
+#
+# 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=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 is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=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 is not set
+CONFIG_DM9000=y
+CONFIG_DM9000_DEBUGLEVEL=4
+# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
+# CONFIG_ENC28J60 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_DNET is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_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_LIBERTAS_THINFIRM is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_RTL8187 is not set
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_P54_COMMON 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=m
+CONFIG_ZD1211RW_DEBUG=y
+# CONFIG_RT2X00 is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=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_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=y
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=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 is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_FILTER=y
+CONFIG_TOUCHSCREEN_FILTER_GROUP=y
+CONFIG_TOUCHSCREEN_FILTER_MEDIAN=y
+CONFIG_TOUCHSCREEN_FILTER_MEAN=y
+CONFIG_TOUCHSCREEN_FILTER_LINEAR=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_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_RAW=y
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_UARTS=3
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
+CONFIG_SERIAL_S3C2440=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=128
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
+CONFIG_IPMI_POWEROFF=m
+CONFIG_HW_RANDOM=y
+# 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
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_ALGOBIT=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_S3C2410=y
+CONFIG_I2C_SIMTEC=y
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+CONFIG_SENSORS_TSL2550=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
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_S3C24XX=y
+# CONFIG_SPI_S3C24XX_GPIO is not set
+
+#
+# SPI Protocol Masters
+#
+CONFIG_SPI_SPIDEV=y
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 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_IBMAEM is not set
+# CONFIG_SENSORS_IBMPEX is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+CONFIG_SENSORS_LM75=y
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_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_THERMAL=m
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_S3C2410_WATCHDOG=y
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# 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=m
+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_VIDEOBUF_GEN=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_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_VIDEO_AU0828 is not set
+CONFIG_SOC_CAMERA=m
+# CONFIG_SOC_CAMERA_MT9M001 is not set
+# CONFIG_SOC_CAMERA_MT9M111 is not set
+# CONFIG_SOC_CAMERA_MT9T031 is not set
+# CONFIG_SOC_CAMERA_MT9V022 is not set
+# CONFIG_SOC_CAMERA_TW9910 is not set
+CONFIG_SOC_CAMERA_PLATFORM=m
+# CONFIG_SOC_CAMERA_OV772X is not set
+# CONFIG_VIDEO_SH_MOBILE_CEU is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_USB_VIDEO_CLASS is not set
+CONFIG_USB_GSPCA=m
+# CONFIG_USB_M5602 is not set
+# CONFIG_USB_STV06XX is not set
+# CONFIG_USB_GSPCA_CONEX is not set
+# CONFIG_USB_GSPCA_ETOMS is not set
+# CONFIG_USB_GSPCA_FINEPIX is not set
+# CONFIG_USB_GSPCA_MARS is not set
+# CONFIG_USB_GSPCA_OV519 is not set
+# CONFIG_USB_GSPCA_OV534 is not set
+# CONFIG_USB_GSPCA_PAC207 is not set
+# CONFIG_USB_GSPCA_PAC7311 is not set
+# CONFIG_USB_GSPCA_SONIXB is not set
+# CONFIG_USB_GSPCA_SONIXJ is not set
+# CONFIG_USB_GSPCA_SPCA500 is not set
+# CONFIG_USB_GSPCA_SPCA501 is not set
+# CONFIG_USB_GSPCA_SPCA505 is not set
+# CONFIG_USB_GSPCA_SPCA506 is not set
+# CONFIG_USB_GSPCA_SPCA508 is not set
+# CONFIG_USB_GSPCA_SPCA561 is not set
+# CONFIG_USB_GSPCA_STK014 is not set
+# CONFIG_USB_GSPCA_SUNPLUS is not set
+# CONFIG_USB_GSPCA_T613 is not set
+# CONFIG_USB_GSPCA_TV8532 is not set
+# CONFIG_USB_GSPCA_VC032X is not set
+CONFIG_USB_GSPCA_ZC3XX=m
+# 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_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_USB_S2255 is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_USB_DSBR is not set
+# CONFIG_USB_SI470X is not set
+# CONFIG_USB_MR800 is not set
+# CONFIG_RADIO_TEA5764 is not set
+# CONFIG_DVB_DYNAMIC_MINORS is not set
+CONFIG_DVB_CAPTURE_DRIVERS=y
+# CONFIG_TTPCI_EEPROM is not set
+
+#
+# Supported USB Adapters
+#
+# CONFIG_DVB_USB is not set
+# CONFIG_DVB_SIANO_SMS1XXX is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+# CONFIG_DVB_B2C2_FLEXCOP is not set
+
+#
+# Supported DVB Frontends
+#
+
+#
+# Customise DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+
+#
+# Multistandard (satellite) frontends
+#
+# CONFIG_DVB_STB0899 is not set
+# CONFIG_DVB_STB6100 is not set
+
+#
+# DVB-S (satellite) frontends
+#
+# CONFIG_DVB_CX24110 is not set
+# CONFIG_DVB_CX24123 is not set
+# CONFIG_DVB_MT312 is not set
+# CONFIG_DVB_S5H1420 is not set
+# CONFIG_DVB_STV0288 is not set
+# CONFIG_DVB_STB6000 is not set
+# CONFIG_DVB_STV0299 is not set
+# CONFIG_DVB_TDA8083 is not set
+# CONFIG_DVB_TDA10086 is not set
+# CONFIG_DVB_TDA8261 is not set
+# CONFIG_DVB_VES1X93 is not set
+# CONFIG_DVB_TUNER_ITD1000 is not set
+# CONFIG_DVB_TUNER_CX24113 is not set
+# CONFIG_DVB_TDA826X is not set
+# CONFIG_DVB_TUA6100 is not set
+# CONFIG_DVB_CX24116 is not set
+# CONFIG_DVB_SI21XX is not set
+
+#
+# DVB-T (terrestrial) frontends
+#
+# CONFIG_DVB_SP8870 is not set
+# CONFIG_DVB_SP887X is not set
+# CONFIG_DVB_CX22700 is not set
+# CONFIG_DVB_CX22702 is not set
+# CONFIG_DVB_DRX397XD is not set
+# CONFIG_DVB_L64781 is not set
+# CONFIG_DVB_TDA1004X is not set
+# CONFIG_DVB_NXT6000 is not set
+# CONFIG_DVB_MT352 is not set
+# CONFIG_DVB_ZL10353 is not set
+# CONFIG_DVB_DIB3000MB is not set
+# CONFIG_DVB_DIB3000MC is not set
+# CONFIG_DVB_DIB7000M is not set
+# CONFIG_DVB_DIB7000P is not set
+# CONFIG_DVB_TDA10048 is not set
+
+#
+# DVB-C (cable) frontends
+#
+# CONFIG_DVB_VES1820 is not set
+# CONFIG_DVB_TDA10021 is not set
+# CONFIG_DVB_TDA10023 is not set
+# CONFIG_DVB_STV0297 is not set
+
+#
+# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
+#
+# CONFIG_DVB_NXT200X is not set
+# CONFIG_DVB_OR51211 is not set
+# CONFIG_DVB_OR51132 is not set
+# CONFIG_DVB_BCM3510 is not set
+# CONFIG_DVB_LGDT330X is not set
+# CONFIG_DVB_LGDT3304 is not set
+# CONFIG_DVB_S5H1409 is not set
+# CONFIG_DVB_AU8522 is not set
+# CONFIG_DVB_S5H1411 is not set
+
+#
+# ISDB-T (terrestrial) frontends
+#
+# CONFIG_DVB_S921 is not set
+
+#
+# Digital terrestrial only tuners/PLL
+#
+# CONFIG_DVB_PLL is not set
+# CONFIG_DVB_TUNER_DIB0070 is not set
+
+#
+# SEC control devices for DVB-S
+#
+# CONFIG_DVB_LNBP21 is not set
+# CONFIG_DVB_ISL6405 is not set
+# CONFIG_DVB_ISL6421 is not set
+# CONFIG_DVB_LGS8GL5 is not set
+
+#
+# Tools to develop new frontends
+#
+# CONFIG_DVB_DUMMY_FE is not set
+# CONFIG_DVB_AF9013 is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+
+#
+# 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_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_LTV350QV is not set
+# CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_TDO24M is not set
+# CONFIG_LCD_VGG2432A4 is not set
+CONFIG_LCD_PLATFORM=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=y
+
+#
+# Display hardware drivers
+#
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+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=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=y
+# CONFIG_LOGO_ARMWORKS_CLUT224 is not set
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+# CONFIG_SND_DRIVERS is not set
+# CONFIG_SND_ARM is not set
+# CONFIG_SND_SPI is not set
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_USB_CAIAQ=m
+CONFIG_SND_USB_CAIAQ_INPUT=y
+CONFIG_SND_SOC=y
+CONFIG_SND_S3C24XX_SOC=y
+CONFIG_SND_S3C24XX_SOC_I2S=y
+# CONFIG_SND_S3C24XX_SOC_LN2440SBC_ALC650 is not set
+CONFIG_SND_S3C24XX_SOC_S3C24XX_UDA134X=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_L3=y
+CONFIG_SND_SOC_UDA134X=y
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+CONFIG_HIDRAW=y
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+CONFIG_HID_PID=y
+CONFIG_USB_HIDDEV=y
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_EZKEY=y
+CONFIG_HID_GYRATION=y
+CONFIG_HID_LOGITECH=y
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
+CONFIG_HID_NTRIG=y
+CONFIG_HID_PANTHERLORD=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SONY=y
+CONFIG_HID_SUNPLUS=y
+# CONFIG_GREENASIA_FF is not set
+CONFIG_HID_TOPSEED=y
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_MON is not set
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+# CONFIG_USB_PRINTER is not set
+CONFIG_USB_WDM=m
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+# CONFIG_USB_STORAGE_FREECOM is not set
+CONFIG_USB_STORAGE_ISD200=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_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+CONFIG_USB_LIBUSUAL=y
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_EZUSB is not set
+# CONFIG_USB_SERIAL_GENERIC is not set
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+CONFIG_USB_SERIAL_CP2101=m
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+# CONFIG_USB_SERIAL_GARMIN is not set
+# CONFIG_USB_SERIAL_IPW is not set
+# CONFIG_USB_SERIAL_IUU is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_MOTOROLA is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+# CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_OTI6858 is not set
+CONFIG_USB_SERIAL_SPCP8X5=m
+# CONFIG_USB_SERIAL_HP4X is not set
+# CONFIG_USB_SERIAL_SAFE is not set
+# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+# CONFIG_USB_SERIAL_TI is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OPTION is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_SERIAL_OPTICON is not set
+# 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_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_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
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+CONFIG_USB_GADGET_S3C2410=y
+CONFIG_USB_S3C2410=y
+# CONFIG_USB_S3C2410_DEBUG is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_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_USB_CDC_COMPOSITE=m
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_USB_GPIO_VBUS is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+CONFIG_SDIO_UART=y
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SPI=y
+CONFIG_MMC_S3C=y
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_S3C24XX=y
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_PCA955X is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+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 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
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_S3C=y
+CONFIG_DMADEVICES=y
+
+#
+# DMA Devices
+#
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_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
+CONFIG_GENERIC_ACL=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=m
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_ECRYPT_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY 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=y
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+CONFIG_ROMFS_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 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 is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_BSD_DISKLABEL=y
+CONFIG_MINIX_SUBPARTITION=y
+CONFIG_SOLARIS_X86_PARTITION=y
+CONFIG_UNIXWARE_DISKLABEL=y
+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=y
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+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
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_DEBUG_USER=y
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+CONFIG_DEBUG_S3C_UART=0
+
+#
+# Security options
+#
+CONFIG_KEYS=y
+# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+CONFIG_SECURITY_FILE_CAPABILITIES=y
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_FIPS=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_CRYPTD=m
+CONFIG_CRYPTO_AUTHENC=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Authenticated Encryption with Associated Data
+#
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XTS=m
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-mini2440-2.6.30+git/defconfig-mini2440 b/recipes/linux/linux-mini2440-2.6.30+git/defconfig-mini2440
new file mode 100644
index 0000000000..71152187ac
--- /dev/null
+++ b/recipes/linux/linux-mini2440-2.6.30+git/defconfig-mini2440
@@ -0,0 +1,2062 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.30
+# Wed Jun 17 15:34:49 2009
+#
+CONFIG_ARM=y
+CONFIG_HAVE_PWM=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_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_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_POSIX_MQUEUE_SYSCTL=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=17
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+CONFIG_RELAY=y
+CONFIG_NAMESPACES=y
+CONFIG_UTS_NS=y
+CONFIG_IPC_NS=y
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_NET_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+# CONFIG_STRIP_ASM_SYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_COMPAT_BRK is not set
+# 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_HAVE_CLK=y
+# CONFIG_SLOW_WORK is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_BLK_DEV_INTEGRITY=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_GEMINI is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_MMP is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+CONFIG_ARCH_S3C2410=y
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
+CONFIG_PLAT_S3C24XX=y
+CONFIG_S3C2410_CLOCK=y
+CONFIG_CPU_S3C244X=y
+CONFIG_S3C24XX_PWM=y
+CONFIG_S3C24XX_GPIO_EXTRA=0
+CONFIG_S3C2410_DMA=y
+# CONFIG_S3C2410_DMA_DEBUG is not set
+CONFIG_S3C24XX_ADC=y
+CONFIG_PLAT_S3C=y
+CONFIG_CPU_LLSERIAL_S3C2440_ONLY=y
+CONFIG_CPU_LLSERIAL_S3C2440=y
+
+#
+# Boot options
+#
+# CONFIG_S3C_BOOT_WATCHDOG is not set
+# CONFIG_S3C_BOOT_ERROR_RESET is not set
+CONFIG_S3C_BOOT_UART_FORCE_FIFO=y
+
+#
+# Power management
+#
+# CONFIG_S3C2410_PM_DEBUG is not set
+# CONFIG_S3C2410_PM_CHECK is not set
+CONFIG_S3C_LOWLEVEL_UART_PORT=0
+CONFIG_S3C_GPIO_SPACE=0
+
+#
+# S3C2400 Machines
+#
+CONFIG_S3C2410_PM=y
+CONFIG_S3C2410_GPIO=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_TCT_HAMMER is not set
+# CONFIG_MACH_VR1000 is not set
+# CONFIG_MACH_QT2410 is not set
+
+#
+# S3C2412 Machines
+#
+# CONFIG_MACH_JIVE is not set
+# 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
+
+#
+# S3C2440 Machines
+#
+# CONFIG_MACH_ANUBIS is not set
+# CONFIG_MACH_OSIRIS is not set
+# CONFIG_MACH_RX3715 is not set
+# CONFIG_ARCH_S3C2440 is not set
+# CONFIG_MACH_NEXCODER_2440 is not set
+# CONFIG_MACH_AT2440EVB is not set
+CONFIG_MACH_MINI2440=y
+
+#
+# S3C2442 Machines
+#
+
+#
+# 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_PABRT_NOIFAR=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_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=200
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_CMDLINE=""
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Power Management
+#
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_NET_KEY=m
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# 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 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=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_IPV6 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_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG is not set
+# CONFIG_NF_CONNTRACK is not set
+# CONFIG_NETFILTER_XTABLES is not set
+# CONFIG_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_NF_DEFRAG_IPV4 is not set
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+# 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_STP=m
+CONFIG_GARP=m
+CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_VLAN_8021Q_GVRP=y
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+# 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_HCIBTUSB=m
+CONFIG_BT_HCIBTSDIO=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_LL=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+CONFIG_FIB_RULES=y
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=y
+CONFIG_CFG80211_REG_DEBUG=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=y
+CONFIG_LIB80211_CRYPT_WEP=m
+CONFIG_LIB80211_CRYPT_CCMP=m
+CONFIG_LIB80211_CRYPT_TKIP=m
+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_MAC80211=y
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_MINSTREL=y
+# CONFIG_MAC80211_RC_DEFAULT_PID is not set
+CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
+CONFIG_MAC80211_RC_DEFAULT="minstrel"
+CONFIG_MAC80211_MESH=y
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+# CONFIG_WIMAX 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_FIRMWARE_IN_KERNEL is not set
+CONFIG_EXTRA_FIRMWARE=""
+# 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=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_FTL=y
+CONFIG_NFTL=y
+CONFIG_NFTL_RW=y
+CONFIG_INFTL=y
+CONFIG_RFD_FTL=y
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_CFI_UTIL=y
+CONFIG_MTD_RAM=y
+CONFIG_MTD_ROM=y
+# 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_IMPA7 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_GPIO 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 is not set
+# 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=y
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+CONFIG_MTD_LPDDR=y
+CONFIG_MTD_QINFO_PROBE=y
+
+#
+# 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=m
+# 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_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_ISL29003 is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+CONFIG_EEPROM_AT24=y
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+CONFIG_EEPROM_93CX6=m
+CONFIG_HAVE_IDE=y
+# 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 is not set
+
+#
+# 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=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 is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+CONFIG_COMPAT_NET_DEV_OPS=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+CONFIG_DM9000=y
+CONFIG_DM9000_DEBUGLEVEL=4
+# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
+# CONFIG_ENC28J60 is not set
+# CONFIG_ETHOC is not set
+# CONFIG_SMC911X is not set
+# CONFIG_SMSC911X is not set
+# CONFIG_DNET is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_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_SPI is not set
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_LIBERTAS_THINFIRM=m
+CONFIG_LIBERTAS_THINFIRM_USB=m
+CONFIG_AT76C50X_USB=m
+CONFIG_USB_ZD1201=m
+CONFIG_USB_NET_RNDIS_WLAN=m
+CONFIG_RTL8187=m
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_P54_COMMON is not set
+# CONFIG_AR9170_USB 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=m
+CONFIG_ZD1211RW_DEBUG=y
+CONFIG_RT2X00=y
+# CONFIG_RT2500USB is not set
+CONFIG_RT73USB=y
+CONFIG_RT2X00_LIB_USB=y
+CONFIG_RT2X00_LIB=y
+CONFIG_RT2X00_LIB_FIRMWARE=y
+CONFIG_RT2X00_LIB_CRYPTO=y
+CONFIG_RT2X00_LIB_RFKILL=y
+CONFIG_RT2X00_LIB_LEDS=y
+# CONFIG_RT2X00_DEBUG is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_CDC_EEM is not set
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_SMSC95XX is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+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_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=y
+CONFIG_INPUT_POLLDEV=y
+
+#
+# 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_GPIO=y
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_FILTER=y
+CONFIG_TOUCHSCREEN_FILTER_GROUP=y
+CONFIG_TOUCHSCREEN_FILTER_MEDIAN=y
+CONFIG_TOUCHSCREEN_FILTER_MEAN=y
+CONFIG_TOUCHSCREEN_FILTER_LINEAR=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_AD7877 is not set
+# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
+# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
+# CONFIG_TOUCHSCREEN_AD7879 is not set
+# CONFIG_TOUCHSCREEN_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_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_RAW=y
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_UARTS=3
+# CONFIG_SERIAL_SAMSUNG_DEBUG is not set
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
+CONFIG_SERIAL_S3C2440=y
+# CONFIG_SERIAL_MAX3100 is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=16
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
+CONFIG_IPMI_POWEROFF=m
+CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_ALGOBIT=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_S3C2410=y
+CONFIG_I2C_SIMTEC=y
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+CONFIG_SENSORS_TSL2550=y
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_S3C24XX=y
+# CONFIG_SPI_S3C24XX_GPIO is not set
+
+#
+# SPI Protocol Masters
+#
+CONFIG_SPI_SPIDEV=y
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+CONFIG_THERMAL=m
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_S3C2410_WATCHDOG=y
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# 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=m
+CONFIG_VIDEO_MEDIA=m
+
+#
+# Multimedia drivers
+#
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_MEDIA_TUNER=m
+# CONFIG_MEDIA_TUNER_CUSTOMISE 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_MEDIA_TUNER_MC44S803=m
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_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_VIDEO_AU0828 is not set
+CONFIG_SOC_CAMERA=m
+# CONFIG_SOC_CAMERA_MT9M001 is not set
+# CONFIG_SOC_CAMERA_MT9M111 is not set
+# CONFIG_SOC_CAMERA_MT9T031 is not set
+# CONFIG_SOC_CAMERA_MT9V022 is not set
+# CONFIG_SOC_CAMERA_TW9910 is not set
+CONFIG_SOC_CAMERA_PLATFORM=m
+# CONFIG_SOC_CAMERA_OV772X is not set
+# CONFIG_VIDEO_SH_MOBILE_CEU is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_USB_VIDEO_CLASS is not set
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
+CONFIG_USB_GSPCA=m
+# CONFIG_USB_M5602 is not set
+# CONFIG_USB_STV06XX is not set
+# CONFIG_USB_GSPCA_CONEX is not set
+# CONFIG_USB_GSPCA_ETOMS is not set
+# CONFIG_USB_GSPCA_FINEPIX is not set
+# CONFIG_USB_GSPCA_MARS is not set
+# CONFIG_USB_GSPCA_MR97310A is not set
+# CONFIG_USB_GSPCA_OV519 is not set
+# CONFIG_USB_GSPCA_OV534 is not set
+# CONFIG_USB_GSPCA_PAC207 is not set
+# CONFIG_USB_GSPCA_PAC7311 is not set
+# CONFIG_USB_GSPCA_SONIXB is not set
+# CONFIG_USB_GSPCA_SONIXJ is not set
+# CONFIG_USB_GSPCA_SPCA500 is not set
+# CONFIG_USB_GSPCA_SPCA501 is not set
+# CONFIG_USB_GSPCA_SPCA505 is not set
+# CONFIG_USB_GSPCA_SPCA506 is not set
+# CONFIG_USB_GSPCA_SPCA508 is not set
+# CONFIG_USB_GSPCA_SPCA561 is not set
+# CONFIG_USB_GSPCA_SQ905 is not set
+# CONFIG_USB_GSPCA_SQ905C is not set
+# CONFIG_USB_GSPCA_STK014 is not set
+# CONFIG_USB_GSPCA_SUNPLUS is not set
+# CONFIG_USB_GSPCA_T613 is not set
+# CONFIG_USB_GSPCA_TV8532 is not set
+# CONFIG_USB_GSPCA_VC032X is not set
+CONFIG_USB_GSPCA_ZC3XX=m
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_HDPVR is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_CX231XX 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_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_PWC_INPUT_EVDEV=y
+# CONFIG_USB_ZR364XX is not set
+# CONFIG_USB_STKWEBCAM is not set
+# CONFIG_USB_S2255 is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_USB_DSBR is not set
+# CONFIG_USB_SI470X is not set
+# CONFIG_USB_MR800 is not set
+# CONFIG_RADIO_TEA5764 is not set
+# CONFIG_DVB_DYNAMIC_MINORS is not set
+CONFIG_DVB_CAPTURE_DRIVERS=y
+# CONFIG_TTPCI_EEPROM is not set
+
+#
+# Supported USB Adapters
+#
+# CONFIG_DVB_USB is not set
+# CONFIG_DVB_SIANO_SMS1XXX is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+# CONFIG_DVB_B2C2_FLEXCOP is not set
+
+#
+# Supported DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+
+#
+# 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_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_LTV350QV is not set
+# CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_TDO24M is not set
+# CONFIG_LCD_VGG2432A4 is not set
+CONFIG_LCD_PLATFORM=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_BACKLIGHT_PWM=y
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=y
+
+#
+# Display hardware drivers
+#
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+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=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_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+CONFIG_SND_JACK=y
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+# CONFIG_SND_DRIVERS is not set
+# CONFIG_SND_ARM is not set
+# CONFIG_SND_SPI is not set
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_USB_CAIAQ=m
+CONFIG_SND_USB_CAIAQ_INPUT=y
+CONFIG_SND_SOC=y
+CONFIG_SND_S3C24XX_SOC=y
+CONFIG_SND_S3C24XX_SOC_I2S=y
+# CONFIG_SND_S3C24XX_SOC_LN2440SBC_ALC650 is not set
+CONFIG_SND_S3C24XX_SOC_S3C24XX_UDA134X=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_L3=y
+CONFIG_SND_SOC_UDA134X=y
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+CONFIG_HIDRAW=y
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+CONFIG_HID_PID=y
+CONFIG_USB_HIDDEV=y
+
+#
+# Special HID drivers
+#
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+# CONFIG_DRAGONRISE_FF is not set
+CONFIG_HID_EZKEY=y
+CONFIG_HID_KYE=y
+CONFIG_HID_GYRATION=y
+CONFIG_HID_KENSINGTON=y
+CONFIG_HID_LOGITECH=y
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
+CONFIG_HID_NTRIG=y
+CONFIG_HID_PANTHERLORD=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SONY=y
+CONFIG_HID_SUNPLUS=y
+# CONFIG_GREENASIA_FF is not set
+CONFIG_HID_TOPSEED=y
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_MON is not set
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+# CONFIG_USB_PRINTER is not set
+CONFIG_USB_WDM=y
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
+#
+
+#
+# also be needed; see USB_STORAGE Help for more info
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=m
+# CONFIG_USB_STORAGE_FREECOM is not set
+CONFIG_USB_STORAGE_ISD200=m
+CONFIG_USB_STORAGE_USBAT=m
+CONFIG_USB_STORAGE_SDDR09=m
+CONFIG_USB_STORAGE_SDDR55=m
+CONFIG_USB_STORAGE_JUMPSHOT=m
+CONFIG_USB_STORAGE_ALAUDA=m
+# 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=y
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_EZUSB is not set
+# CONFIG_USB_SERIAL_GENERIC is not set
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_CP210X is not set
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+# CONFIG_USB_SERIAL_GARMIN is not set
+# CONFIG_USB_SERIAL_IPW is not set
+# CONFIG_USB_SERIAL_IUU is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_MOTOROLA is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+# CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_QUALCOMM is not set
+CONFIG_USB_SERIAL_SPCP8X5=m
+# CONFIG_USB_SERIAL_HP4X is not set
+# CONFIG_USB_SERIAL_SAFE is not set
+# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+# CONFIG_USB_SERIAL_SYMBOL is not set
+# CONFIG_USB_SERIAL_TI is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OPTION is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_SERIAL_OPTICON is not set
+# 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_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+CONFIG_USB_GADGET_S3C2410=y
+CONFIG_USB_S3C2410=y
+# CONFIG_USB_S3C2410_DEBUG is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_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_USB_CDC_COMPOSITE=m
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_USB_GPIO_VBUS is not set
+# CONFIG_NOP_USB_XCEIV is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+CONFIG_SDIO_UART=y
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SPI=y
+CONFIG_MMC_S3C=y
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_S3C24XX=y
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_GPIO_PLATFORM=y
+# CONFIG_LEDS_LP5521 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_PWM is not set
+# CONFIG_LEDS_BD2802 is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+# CONFIG_LEDS_TRIGGER_GPIO is not set
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
+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 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
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_S3C=y
+CONFIG_DMADEVICES=y
+
+#
+# DMA Devices
+#
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_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=m
+CONFIG_GENERIC_ACL=y
+
+#
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=m
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_ECRYPT_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY 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_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+CONFIG_ROMFS_FS=y
+CONFIG_ROMFS_BACKED_BY_BLOCK=y
+# CONFIG_ROMFS_BACKED_BY_MTD is not set
+# CONFIG_ROMFS_BACKED_BY_BOTH is not set
+CONFIG_ROMFS_ON_BLOCK=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_UPCALL is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_DFS_UPCALL is not set
+# CONFIG_CIFS_EXPERIMENTAL 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=y
+CONFIG_MINIX_SUBPARTITION=y
+CONFIG_SOLARIS_X86_PARTITION=y
+CONFIG_UNIXWARE_DISKLABEL=y
+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=y
+# 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=y
+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=y
+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 is not set
+# CONFIG_ENABLE_MUST_CHECK is not set
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_DETECT_HUNG_TASK=y
+# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+# CONFIG_PAGE_POISONING is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACING_SUPPORT=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_DYNAMIC_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_ARM_UNWIND=y
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+CONFIG_DEBUG_S3C_PORT=y
+CONFIG_DEBUG_S3C_UART=0
+
+#
+# Security options
+#
+CONFIG_KEYS=y
+# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+CONFIG_SECURITY_FILE_CAPABILITIES=y
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_FIPS=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_WORKQUEUE=y
+CONFIG_CRYPTO_CRYPTD=m
+CONFIG_CRYPTO_AUTHENC=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Authenticated Encryption with Associated Data
+#
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XTS=m
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_ZLIB is not set
+CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_HW=y
+# CONFIG_BINARY_PRINTF is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=m
+CONFIG_LZO_DECOMPRESS=m
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
diff --git a/recipes/linux/linux-mini2440_2.6.29+git.bb b/recipes/linux/linux-mini2440_2.6.29+git.bb
new file mode 100644
index 0000000000..e57697b664
--- /dev/null
+++ b/recipes/linux/linux-mini2440_2.6.29+git.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Linux Kernel for mini2440 development board"
+SECTION = "kernel"
+LICENSE = "GPL"
+MACHINE_KERNEL_PR = "r9"
+
+GGSRC = "http://www.xora.org.uk/oe/patches/"
+
+SRCREV = "${AUTOREV}"
+
+SRC_URI = "git://repo.or.cz/linux-2.6/mini2440.git;protocol=git;branch=mini2440-stable-v2.6.29 \
+ file://defconfig-mini2440"
+
+S = "${WORKDIR}/git"
+
+inherit kernel
+
+COMPATIBLE_HOST = "arm.*-linux"
+COMPATIBLE_MACHINE = "(mini2440|micro2440)"
+
+do_configure() {
+ install ${WORKDIR}/defconfig-mini2440 ${S}/.config
+ oe_runmake oldconfig
+}
+
+KERNEL_RELEASE = "2.6.29"
diff --git a/recipes/linux/linux-mini2440_2.6.30+git.bb b/recipes/linux/linux-mini2440_2.6.30+git.bb
new file mode 100644
index 0000000000..09706e8bb5
--- /dev/null
+++ b/recipes/linux/linux-mini2440_2.6.30+git.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "Linux Kernel for mini2440 development board"
+SECTION = "kernel"
+LICENSE = "GPL"
+MACHINE_KERNEL_PR = "r5"
+
+GGSRC = "http://www.xora.org.uk/oe/patches/"
+
+SRCREV = "${AUTOREV}"
+
+SRC_URI = "git://repo.or.cz/linux-2.6/mini2440.git;protocol=git;branch=mini2440-stable-v2.6.30 \
+ file://defconfig-mini2440"
+
+S = "${WORKDIR}/git"
+
+inherit kernel
+
+COMPATIBLE_HOST = "arm.*-linux"
+COMPATIBLE_MACHINE = "(mini2440|micro2440)"
+
+FILES_kernel-image = ""
+ALLOW_EMPTY_kernel_image = "1"
+
+do_configure() {
+ install ${WORKDIR}/defconfig-mini2440 ${S}/.config
+ oe_runmake oldconfig
+}
+
+KERNEL_RELEASE = "2.6.30"
diff --git a/recipes/linux/linux-mtx-1-2.4.27/06-zboot-2.4.26.patch b/recipes/linux/linux-mtx-1-2.4.27/06-zboot-2.4.26.patch
index 4e8a7576bd..f4a8754228 100644
--- a/recipes/linux/linux-mtx-1-2.4.27/06-zboot-2.4.26.patch
+++ b/recipes/linux/linux-mtx-1-2.4.27/06-zboot-2.4.26.patch
@@ -1,6 +1,15 @@
diff -Naru linux/arch/mips/Makefile linux.spi/arch/mips/Makefile
--- linux/arch/mips/Makefile 2004-05-06 15:23:41.000000000 -0400
+++ linux.spi/arch/mips/Makefile 2004-05-11 23:19:24.000000000 -0400
+@@ -17,7 +17,7 @@
+ # Select the object file format to substitute into the linker script.
+ #
+ ifdef CONFIG_CPU_LITTLE_ENDIAN
+-tool-prefix = mipsel-linux-
++tool-prefix = mipsel-nylon-linux-
+ ld-emul = elf32ltsmip
+ else
+ tool-prefix = mips-linux-
@@ -29,6 +29,8 @@
endif
diff --git a/recipes/linux/linux-mtx-1-2.4.27/32-usbserial-stalled-hack.diff b/recipes/linux/linux-mtx-1-2.4.27/32-usbserial-stalled-hack.diff
index bfc1af9db9..1651bd5678 100644
--- a/recipes/linux/linux-mtx-1-2.4.27/32-usbserial-stalled-hack.diff
+++ b/recipes/linux/linux-mtx-1-2.4.27/32-usbserial-stalled-hack.diff
@@ -1,5 +1,5 @@
---- linux-2.4.27-mtx1/drivers/usb/serial/usbserial.c 2005-08-28 20:23:40.000000000 +0200
-+++ linux-2.4.27-mtx1/drivers/usb/serial/usbserial.c 2005-08-28 20:23:12.000000000 +0200
+--- linux-old/drivers/usb/serial/usbserial.c 2005-08-28 20:23:40.000000000 +0200
++++ linux/drivers/usb/serial/usbserial.c 2005-08-28 20:23:12.000000000 +0200
@@ -499,6 +499,19 @@
/* get_usb_serial checks port->tty, so cannot be used */
serial = port->serial;
diff --git a/recipes/linux/linux-mtx-1-2.4.27/33-usbserial-bulk_in_size-4096.diff b/recipes/linux/linux-mtx-1-2.4.27/33-usbserial-bulk_in_size-4096.diff
index e615a92fa4..91690057e2 100644
--- a/recipes/linux/linux-mtx-1-2.4.27/33-usbserial-bulk_in_size-4096.diff
+++ b/recipes/linux/linux-mtx-1-2.4.27/33-usbserial-bulk_in_size-4096.diff
@@ -1,5 +1,53 @@
---- linux/drivers/usb/serial/usbserial.c~33-usbserial-bulk_in_size-4096.diff 2006-03-31 15:05:46.674445000 +0200
-+++ linux/drivers/usb/serial/usbserial.c 2006-04-07 12:23:56.970400500 +0200
+--- linux/drivers/usb/acm.c.orig 2006-04-07 13:56:33.837683000 +0200
++++ linux/drivers/usb/acm.c 2006-04-07 12:14:37.995466750 +0200
+@@ -155,6 +155,11 @@
+ unsigned char clocal; /* termios CLOCAL */
+ };
+
++/* global params controlling max sizes for read, write, control */
++static int maxszr = 0;
++static int maxszw = 0;
++static int maxszc = 0;
++
+ static struct usb_driver acm_driver;
+ static struct tty_driver acm_tty_driver;
+ static struct acm *acm_table[ACM_TTY_MINORS];
+@@ -573,9 +578,13 @@
+ }
+ memset(acm, 0, sizeof(struct acm));
+
+- ctrlsize = epctrl->wMaxPacketSize;
+- readsize = epread->wMaxPacketSize;
+- acm->writesize = epwrite->wMaxPacketSize;
++ ctrlsize = (epctrl->wMaxPacketSize > maxszc)?
++ epctrl->wMaxPacketSize: maxszc;
++ readsize = (epread->wMaxPacketSize > maxszr)?
++ epread->wMaxPacketSize: maxszr;
++ acm->writesize = (epwrite->wMaxPacketSize > maxszw)?
++ epwrite->wMaxPacketSize: maxszw;
++
+ acm->iface = cfacm->interface + j;
+ acm->minor = minor;
+ acm->dev = dev;
+@@ -740,6 +749,16 @@
+ module_init(acm_init);
+ module_exit(acm_exit);
+
++
++MODULE_PARM(maxszr, "i");
++MODULE_PARM_DESC(maxszr, "User specified USB endpoint read size");
++
++MODULE_PARM(maxszw, "i");
++MODULE_PARM_DESC(maxszw, "User specified USB endpoint write size");
++
++MODULE_PARM(maxszc, "i");
++MODULE_PARM_DESC(maxszc, "User specified USB endpoint control size");
++
+ MODULE_AUTHOR( DRIVER_AUTHOR );
+ MODULE_DESCRIPTION( DRIVER_DESC );
+ MODULE_LICENSE("GPL");
+--- linux/drivers/usb/serial/usbserial.c-orig 2009-02-27 23:34:48.000000000 +0100
++++ linux/drivers/usb/serial/usbserial.c 2009-02-27 23:34:54.000000000 +0100
@@ -332,6 +332,9 @@
static __u16 vendor = 0x05f9;
static __u16 product = 0xffff;
@@ -7,7 +55,7 @@
+static int count_smaller64 = 0;
+static int count_bigger64 = 0;
+
- static struct usb_device_id generic_device_ids[5]; /* Initially all zeroes. */
+ static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
/* All of the device info needed for the Generic Serial Converter */
@@ -396,6 +399,10 @@
@@ -66,7 +114,7 @@
port->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->interrupt_in_buffer) {
-@@ -1807,6 +1825,7 @@
+@@ -1798,6 +1816,7 @@
static void __exit usb_serial_exit(void)
{
@@ -74,7 +122,7 @@
#ifdef CONFIG_USB_SERIAL_GENERIC
/* remove our generic driver */
-@@ -1874,6 +1893,15 @@
+@@ -1865,6 +1884,15 @@
MODULE_PARM(debug, "i");
MODULE_PARM_DESC(debug, "Debug enabled or not");
@@ -90,51 +138,3 @@
#ifdef CONFIG_USB_SERIAL_GENERIC
MODULE_PARM(vendor, "h");
MODULE_PARM_DESC(vendor, "User specified USB idVendor");
---- linux/drivers/usb/acm.c.orig 2006-04-07 13:56:33.837683000 +0200
-+++ linux/drivers/usb/acm.c 2006-04-07 12:14:37.995466750 +0200
-@@ -155,6 +155,11 @@
- unsigned char clocal; /* termios CLOCAL */
- };
-
-+/* global params controlling max sizes for read, write, control */
-+static int maxszr = 0;
-+static int maxszw = 0;
-+static int maxszc = 0;
-+
- static struct usb_driver acm_driver;
- static struct tty_driver acm_tty_driver;
- static struct acm *acm_table[ACM_TTY_MINORS];
-@@ -573,9 +578,13 @@
- }
- memset(acm, 0, sizeof(struct acm));
-
-- ctrlsize = epctrl->wMaxPacketSize;
-- readsize = epread->wMaxPacketSize;
-- acm->writesize = epwrite->wMaxPacketSize;
-+ ctrlsize = (epctrl->wMaxPacketSize > maxszc)?
-+ epctrl->wMaxPacketSize: maxszc;
-+ readsize = (epread->wMaxPacketSize > maxszr)?
-+ epread->wMaxPacketSize: maxszr;
-+ acm->writesize = (epwrite->wMaxPacketSize > maxszw)?
-+ epwrite->wMaxPacketSize: maxszw;
-+
- acm->iface = cfacm->interface + j;
- acm->minor = minor;
- acm->dev = dev;
-@@ -740,6 +749,16 @@
- module_init(acm_init);
- module_exit(acm_exit);
-
-+
-+MODULE_PARM(maxszr, "i");
-+MODULE_PARM_DESC(maxszr, "User specified USB endpoint read size");
-+
-+MODULE_PARM(maxszw, "i");
-+MODULE_PARM_DESC(maxszw, "User specified USB endpoint write size");
-+
-+MODULE_PARM(maxszc, "i");
-+MODULE_PARM_DESC(maxszc, "User specified USB endpoint control size");
-+
- MODULE_AUTHOR( DRIVER_AUTHOR );
- MODULE_DESCRIPTION( DRIVER_DESC );
- MODULE_LICENSE("GPL");
diff --git a/recipes/linux/linux-mtx-1-2.4.27/43-usbserial-27-32-backport.diff b/recipes/linux/linux-mtx-1-2.4.27/43-usbserial-27-32-backport.diff
new file mode 100644
index 0000000000..6a98f76c7a
--- /dev/null
+++ b/recipes/linux/linux-mtx-1-2.4.27/43-usbserial-27-32-backport.diff
@@ -0,0 +1,33 @@
+--- linux/drivers/usb/serial/usbserial.c-27 2006-06-27 10:26:06.294476250 +0200
++++ linux/drivers/usb/serial/usbserial.c 2006-06-27 10:30:31.011020000 +0200
+@@ -528,8 +528,18 @@
+ down(&port->sem);
+ dbg("%s - port %d len %d backlog %d", __FUNCTION__,
+ port->number, job->len, port->write_backlog);
+- if (port->tty != NULL)
+- __serial_write(port, 0, job->buff, job->len);
++ if (port->tty != NULL) {
++ int rc;
++ int sent = 0;
++ while (sent < job->len) {
++ rc = __serial_write(port, 0, job->buff + sent, job->len - sent);
++ if ((rc < 0) || signal_pending(current))
++ break;
++ sent += rc;
++ if ((sent < job->len) && current->need_resched)
++ schedule();
++ }
++ }
+ up(&port->sem);
+
+ spin_lock_irqsave(&post_lock, flags);
+@@ -725,6 +735,9 @@
+ struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
+ int rc;
+
++ if (!port)
++ return -ENODEV;
++
+ if (!in_interrupt()) {
+ /*
+ * Run post_list to reduce a possiblity of reordered writes.
diff --git a/recipes/linux/linux-mtx-1-2.4.27/45-acm-tty-and-sb2.patch b/recipes/linux/linux-mtx-1-2.4.27/45-acm-tty-and-sb2.patch
new file mode 100644
index 0000000000..4561facb73
--- /dev/null
+++ b/recipes/linux/linux-mtx-1-2.4.27/45-acm-tty-and-sb2.patch
@@ -0,0 +1,721 @@
+--- linux/drivers/usb/acm.c-orig 2007-04-13 18:32:16.352672105 +0200
++++ linux/drivers/usb/acm.c 2007-04-13 18:33:21.063526545 +0200
+@@ -124,6 +124,9 @@
+ #define ACM_CTRL_PARITY 0x20
+ #define ACM_CTRL_OVERRUN 0x40
+
++// some devices don't have one comm and one data interface, but only one interface with endpoints for comm and data
++#define SINGLE_IF_ACM 0x01
++
+ /*
+ * Line speed and caracter encoding.
+ */
+@@ -139,6 +142,8 @@
+ * Internal driver structures.
+ */
+
++#define TD_SIZE 16384
++
+ struct acm {
+ struct usb_device *dev; /* the coresponding usb device */
+ struct usb_interface *iface; /* the interfaces - +0 control +1 data */
+@@ -153,12 +158,23 @@
+ unsigned int minor; /* acm minor number */
+ unsigned char throttle; /* throttled by tty layer */
+ unsigned char clocal; /* termios CLOCAL */
++ unsigned long throttle_start;
++ unsigned char resubmit_to_unthrottle; /* Leftover data from last operation */
++ unsigned char *throttle_data;
++ int td_len;
++ int td_busy;
++ unsigned char used_interfaces;
++ struct semaphore mutex;
+ };
+
++#define mutex_lock(x) down(x)
++#define mutex_unlock(x) up(x)
++
+ /* global params controlling max sizes for read, write, control */
+ static int maxszr = 0;
+ static int maxszw = 0;
+ static int maxszc = 0;
++static int nonlegacy = 0;
+
+ static struct usb_driver acm_driver;
+ static struct tty_driver acm_tty_driver;
+@@ -167,6 +183,95 @@
+ #define ACM_READY(acm) (acm && acm->dev && acm->used)
+
+ /*
++ * Helper functions to optimize throttleing
++ */
++static int
++acm_fill_tty(struct urb *urb, struct tty_struct *tty, unsigned char *data, int length)
++{
++ struct acm *acm = urb->context;
++ int n = 0;
++ /*printk("acm_fill_tty: %d bytes\n", length);*/
++ if (!urb->status && !acm->throttle) {
++ for (n = 0; n < length && !acm->throttle; n++) {
++ /* if we insert more than TTY_FLIPBUF_SIZE characters,
++ * we drop them. */
++ if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
++ tty_flip_buffer_push(tty);
++ }
++ tty_insert_flip_char(tty, data[n], 0);
++ }
++ tty_flip_buffer_push(tty);
++ }
++ /*printk("copied %d bytes.\n", n);*/
++ return n;
++}
++
++static int
++acm_shift_if_throttle(unsigned char *data, int *length, int shift_by)
++{
++ if (shift_by < *length) {
++ dbg("need to shift uncopied %d bytes to front.", *length - shift_by);
++ memmove(data, data + shift_by, *length - shift_by);
++ *length -= shift_by;
++ return 1;
++ }
++ return 0;
++}
++
++static int
++acm_buffer_if_thottle(struct acm *acm, unsigned char *data, int start, int *length)
++{
++ int copied = *length;
++ if (start < *length) {
++ int space = TD_SIZE - acm->td_len;
++ int needed = *length - start;
++ copied = (space < needed)? space: needed;
++ dbg("need to push %d to throttle buffer, can copy %d.",
++ needed, copied);
++ memcpy(acm->throttle_data + acm->td_len, data, copied);
++ acm->td_len += copied;
++ *length -= copied;
++ }
++ return copied;
++}
++
++static int
++acm_empty_throttle(struct urb *urb, struct tty_struct *tty)
++{
++ unsigned long flags;
++ struct acm *acm = urb->context;
++
++ save_flags(flags);
++ cli();
++
++ if (acm->td_busy) {
++ restore_flags(flags);
++ return 0;
++ }
++ acm->td_busy = 1;
++ restore_flags(flags);
++
++ if (acm->td_len > 0) {
++
++ dbg("acm_empty_throttle: trying to empty throttle buffer: %d bytes.",
++ acm->td_len);
++
++ /* if there has been something left from previous operations
++ * we try to complete this before looking at the urb */
++ int copied = acm_fill_tty(urb, tty, acm->throttle_data, acm->td_len);
++ if (acm_shift_if_throttle(acm->throttle_data, &acm->td_len, copied)) {
++ /* we were unable to empty the throttle data, so we can't
++ * copy anything more now */
++ acm->td_busy = 0;
++ return 0;
++ }
++ acm->td_len = 0;
++ }
++ acm->td_busy = 0;
++ return 1;
++}
++
++/*
+ * Functions for ACM control messages.
+ */
+
+@@ -174,7 +279,10 @@
+ {
+ int retval = usb_control_msg(acm->dev, usb_sndctrlpipe(acm->dev, 0),
+ request, USB_RT_ACM, value, acm->iface[0].altsetting[0].bInterfaceNumber, buf, len, HZ * 5);
+- dbg("acm_control_msg: rq: 0x%02x val: %#x len: %#x result: %d", request, value, len, retval);
++ if (retval < 0)
++ err("acm_control_msg: rq: 0x%02x val: %#x len: %#x result: %d", request, value, len, retval);
++ else
++ dbg("acm_control_msg: rq: 0x%02x val: %#x len: %#x result: %d", request, value, len, retval);
+ return retval < 0 ? retval : 0;
+ }
+
+@@ -191,10 +299,12 @@
+ struct acm *acm = urb->context;
+ struct usb_ctrlrequest *dr = urb->transfer_buffer;
+ unsigned char *data = (unsigned char *)(dr + 1);
+- int newctrl;
++ int newctrl, s1, s2;
+
+ if (!ACM_READY(acm)) return;
+
++ //err("acm_ctrl_irq %p %i", urb, dr->bRequestType);
++
+ if (urb->status < 0) {
+ dbg("nonzero ctrl irq status received: %d", urb->status);
+ return;
+@@ -226,8 +336,15 @@
+
+ return;
+
++ case 0x2a:
++ s1 = le32_to_cpup((__u32 *) data);
++ s2 = le32_to_cpup((__u32 *) (data+4));
++
++ dbg("acm.c: ctrl 0x2a: idx %i len %i speed %i %i", dr->wIndex, dr->wLength, s1, s2);
++ return;
++
+ default:
+- dbg("unknown control event received: request %d index %d len %d data0 %d data1 %d",
++ err("unknown control event received: request %d index %d len %d data0 %d data1 %d",
+ dr->bRequest, dr->wIndex, dr->wLength, data[0], data[1]);
+ return;
+ }
+@@ -238,36 +355,39 @@
+ struct acm *acm = urb->context;
+ struct tty_struct *tty = acm->tty;
+ unsigned char *data = urb->transfer_buffer;
+- int i = 0;
++ int copied = 0;
++ int buffered = 0;
+
+ if (!ACM_READY(acm)) return;
+
+- if (urb->status)
+- dbg("nonzero read bulk status received: %d", urb->status);
++ if (urb->status) {
++ err("nonzero read bulk status received: %d", urb->status);
++ }
+
+- if (!urb->status && !acm->throttle) {
+- for (i = 0; i < urb->actual_length && !acm->throttle; i++) {
+- /* if we insert more than TTY_FLIPBUF_SIZE characters,
+- * we drop them. */
+- if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
+- tty_flip_buffer_push(tty);
+- }
+- tty_insert_flip_char(tty, data[i], 0);
+- }
+- tty_flip_buffer_push(tty);
++ if (!acm_empty_throttle(urb, tty)) {
++ dbg("could not empty throttle buffer, entering throttle state, acm->td_busy: %d.", acm->td_busy);
+ }
+
++ /* got here, either there was nothing in the throttle data or it could
++ * all be copied without throttleing again */
++ copied = acm_fill_tty(urb, tty, data, urb->actual_length);
+ if (acm->throttle) {
+- memmove(data, data + i, urb->actual_length - i);
+- urb->actual_length -= i;
+- return;
++ int length = urb->actual_length;
++ buffered = acm_buffer_if_thottle(acm, data, copied, &urb->actual_length);
++ if (buffered < length - copied
++ && acm_shift_if_throttle(data, &urb->actual_length, copied + buffered)) {
++ dbg("need to resubmit to unthrottle\n");
++ acm->resubmit_to_unthrottle = 1;
++ return;
++ }
+ }
+
+ urb->actual_length = 0;
+ urb->dev = acm->dev;
+
+- if (usb_submit_urb(urb))
++ if (usb_submit_urb(urb)) {
+ dbg("failed resubmitting read urb");
++ }
+ }
+
+ static void acm_write_bulk(struct urb *urb)
+@@ -283,6 +403,9 @@
+ mark_bh(IMMEDIATE_BH);
+ }
+
++static int unlinking_in_progress=0;
++static int closing=0;
++
+ static void acm_softint(void *private)
+ {
+ struct acm *acm = private;
+@@ -306,34 +429,57 @@
+
+ if (!acm || !acm->dev) return -EINVAL;
+
++ mutex_lock (&acm->mutex);
++
+ tty->driver_data = acm;
+ acm->tty = tty;
+
+ MOD_INC_USE_COUNT;
+
+- lock_kernel();
++ if ( closing )
++ err("acm_tty_open: potential possibility of race condition detected");
++
++ if ( unlinking_in_progress ) {
++ err("acm_tty_open: cannot open because unlinking_in_progress %i", acm->used);
++ mutex_unlock (&acm->mutex);
++ return -1;
++ }
+
+- if (acm->used++) {
+- unlock_kernel();
+- return 0;
+- }
++ if (acm->used) {
++ acm->used++;
++ mutex_unlock (&acm->mutex);
++ return 0;
++ }
+
+- unlock_kernel();
++ unlinking_in_progress=1;
++ err("acm_tty_open: %i %p !!", acm->used, tty);
++
++ acm->resubmit_to_unthrottle = 0;
++ acm->td_len = 0;
++ acm->td_busy = 0;
+
+ acm->ctrlurb.dev = acm->dev;
+ if (usb_submit_urb(&acm->ctrlurb))
+- dbg("usb_submit_urb(ctrl irq) failed");
++ dbg("acm open: usb_submit_urb(ctrl irq) failed");
++ else
++ dbg("acm open: ctrlurb %p submitted", &acm->ctrlurb);
++
++ acm->used++;
++ acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS);
+
+ acm->readurb.dev = acm->dev;
+ if (usb_submit_urb(&acm->readurb))
+- dbg("usb_submit_urb(read bulk) failed");
+-
+- acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS);
++ dbg("acm open: usb_submit_urb(read bulk) failed");
++ else
++ dbg("acm open: readurb %p submitted", &acm->readurb);
+
+- /* force low_latency on so that our tty_push actually forces the data through,
++ /* force low_latency on so that our tty_push actually forces the data through,
+ otherwise it is scheduled, and with high data rates data can get lost. */
+ tty->low_latency = 1;
+
++ unlinking_in_progress=0;
++ mutex_unlock (&acm->mutex);
++
+ return 0;
+ }
+
+@@ -343,19 +489,35 @@
+
+ if (!acm || !acm->used) return;
+
+- if (!--acm->used) {
+- if (acm->dev) {
+- acm_set_control(acm, acm->ctrlout = 0);
+- usb_unlink_urb(&acm->ctrlurb);
+- usb_unlink_urb(&acm->writeurb);
+- usb_unlink_urb(&acm->readurb);
+- } else {
+- tty_unregister_devfs(&acm_tty_driver, acm->minor);
+- acm_table[acm->minor] = NULL;
+- kfree(acm);
+- }
++ mutex_lock (&acm->mutex);
++
++ closing = 1;
++ if (--acm->used) {
++ closing=0;
++ MOD_DEC_USE_COUNT;
++ mutex_unlock (&acm->mutex);
++ return;
++ }
++ unlinking_in_progress = 1;
++
++ err("acm_tty_close: %i %p", acm->used, tty);
++
++ if (acm->dev) {
++ acm_set_control(acm, acm->ctrlout = 0);
++ usb_unlink_urb(&acm->ctrlurb);
++ usb_unlink_urb(&acm->writeurb);
++ usb_unlink_urb(&acm->readurb);
++ } else {
++ tty_unregister_devfs(&acm_tty_driver, acm->minor);
++ acm_table[acm->minor] = NULL;
++ kfree(acm->throttle_data);
++ kfree(acm);
+ }
++
++ closing=0;
++ unlinking_in_progress = 0;
+ MOD_DEC_USE_COUNT;
++ mutex_unlock (&acm->mutex);
+ }
+
+ static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count)
+@@ -363,8 +525,16 @@
+ struct acm *acm = tty->driver_data;
+
+ if (!ACM_READY(acm)) return -EINVAL;
+- if (acm->writeurb.status == -EINPROGRESS) return 0;
+- if (!count) return 0;
++
++ if (acm->writeurb.status == -EINPROGRESS) {
++ dbg("tty_write in progress");
++ return 0;
++ }
++
++ if (!count) {
++ dbg("tty_write: nothing to write");
++ return 0;
++ }
+
+ count = (count > acm->writesize) ? acm->writesize : count;
+
+@@ -401,22 +571,44 @@
+ {
+ struct acm *acm = tty->driver_data;
+ if (!ACM_READY(acm)) return;
++ dbg("acm_tty_throttle ON %ld ---> %ld", jiffies-acm->throttle_start, jiffies);
+ acm->throttle = 1;
++ acm->throttle_start = jiffies;
+ }
+
+ static void acm_tty_unthrottle(struct tty_struct *tty)
+ {
+ struct acm *acm = tty->driver_data;
+ if (!ACM_READY(acm)) return;
++ dbg("acm_tty_throttle OFF %ld ---> %ld", jiffies, jiffies-acm->throttle_start);
+ acm->throttle = 0;
+- if (acm->readurb.status != -EINPROGRESS)
++
++ if (!acm_empty_throttle(&acm->readurb, tty)) {
++ if (acm->td_busy) {
++ printk("***** pending acm_empty_throttle!\n");
++ } else {
++ dbg("throttle not emptied.\n");
++ }
++ }
++
++ if (acm->resubmit_to_unthrottle != 0) {
++ dbg("resubmit_to_unthrottle: acm_read_bulk");
++ acm->resubmit_to_unthrottle = 0;
+ acm_read_bulk(&acm->readurb);
++ }
+ }
+
+ static void acm_tty_break_ctl(struct tty_struct *tty, int state)
+ {
+ struct acm *acm = tty->driver_data;
++
+ if (!ACM_READY(acm)) return;
++
++ if (nonlegacy) {
++ err("non-legacy port, skipping acm_tty_break_ctl");
++ return;
++ }
++
+ if (acm_send_break(acm, state ? 0xffff : 0))
+ dbg("send break failed");
+ }
+@@ -455,7 +647,19 @@
+ case TIOCMBIC: newctrl &= ~mask; break;
+ }
+
+- if (acm->ctrlout == newctrl) return 0;
++ if (acm->ctrlout == newctrl) {
++ dbg("acm_tty_ioctl: set old state %x", newctrl);
++ return 0;
++ }
++
++ err("acm_tty_ioctl: %s%s%s -> dtr%s rts%s (%lx)",
++ cmd==TIOCMBIC?"Clear":(cmd==TIOCMBIS?"Set":"SET"),
++ mask & ACM_CTRL_DTR ? " DTR":"",
++ mask & ACM_CTRL_RTS ? " RTS":"",
++ newctrl & ACM_CTRL_DTR ? "+":"-",
++ newctrl & ACM_CTRL_RTS ? "+":"-",
++ arg);
++
+ return acm_set_control(acm, acm->ctrlout = newctrl);
+ }
+
+@@ -483,6 +687,12 @@
+
+ if (!ACM_READY(acm)) return;
+
++ if (nonlegacy) {
++ acm->clocal = ((termios->c_cflag & CLOCAL) != 0);
++ dbg("non-legacy port, skipping acm_tty_set_termios");
++ return;
++ }
++
+ newline.speed = cpu_to_le32p(acm_tty_speed +
+ (termios->c_cflag & CBAUD & ~CBAUDEX) + (termios->c_cflag & CBAUDEX ? 15 : 0));
+ newline.stopbits = termios->c_cflag & CSTOPB ? 2 : 0;
+@@ -518,34 +727,64 @@
+ struct usb_config_descriptor *cfacm;
+ struct usb_interface_descriptor *ifcom, *ifdata;
+ struct usb_endpoint_descriptor *epctrl, *epread, *epwrite;
+- int readsize, ctrlsize, minor, i, j;
++ int readsize, ctrlsize, minor, i;
+ unsigned char *buf;
++ unsigned char used_interfaces=2;
+
+ for (i = 0; i < dev->descriptor.bNumConfigurations; i++) {
+
+ cfacm = dev->config + i;
+
+- dbg("probing config %d", cfacm->bConfigurationValue);
++ ifcom = cfacm->interface[ifnum].altsetting + 0;
++
++ if (id->driver_info == SINGLE_IF_ACM) {
++ printk("using single_if_acm\n");
++ struct usb_endpoint_descriptor *ep=ifcom->endpoint;
++ int k;
++
++ if (ifcom->bNumEndpoints != 3) {
++ continue;
++ }
++
++ epctrl = epread = epwrite = NULL;
++ for (k=0; k<3; ++k, ++ep) {
++ if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT &&
++ (ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) {
++ epctrl = ep;
++ } else if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK &&
++ (ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) {
++ epread = ep;
++ } else if ( (ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) {
++ epwrite = ep;
++ }
++ }
+
+- for (j = 0; j < cfacm->bNumInterfaces - 1; j++) {
++ if ( !epctrl || !epread || !epwrite ) {
++ dbg("SINGLE_IF_ACM acm_probe inv eps epctrl %s epread %s epwrite %s", epctrl?"ok":"missing",
++ epread?"ok":"missing", epwrite?"ok":"missing");
++ dbg("SINGLE_IF_ACM Invalid enpoint configuration");
++ continue;
++ }
+
+- if (usb_interface_claimed(cfacm->interface + j) ||
+- usb_interface_claimed(cfacm->interface + j + 1))
++ used_interfaces = 1;
++ } else {
++ if ((ifnum+1)>=cfacm->bNumInterfaces || usb_interface_claimed(cfacm->interface + ifnum + 1)) {
++ // no data interface available
+ continue;
++ }
+
+- ifcom = cfacm->interface[j].altsetting + 0;
+- ifdata = cfacm->interface[j + 1].altsetting + 0;
++ ifdata = cfacm->interface[ifnum + 1].altsetting + 0;
+
+ if (ifdata->bInterfaceClass != 10 || ifdata->bNumEndpoints < 2) {
+- ifcom = cfacm->interface[j + 1].altsetting + 0;
+- ifdata = cfacm->interface[j].altsetting + 0;
++ ifcom = cfacm->interface[ifnum + 1].altsetting + 0;
++ ifdata = cfacm->interface[ifnum].altsetting + 0;
+ if (ifdata->bInterfaceClass != 10 || ifdata->bNumEndpoints < 2)
+ continue;
+ }
+
+ if (ifcom->bInterfaceClass != 2 || ifcom->bInterfaceSubClass != 2 ||
+- ifcom->bInterfaceProtocol < 1 || ifcom->bInterfaceProtocol > 6 ||
+- ifcom->bNumEndpoints < 1)
++ ifcom->bInterfaceProtocol < 1 || ifcom->bInterfaceProtocol > 6 ||
++ ifcom->bNumEndpoints < 1)
+ continue;
+
+ epctrl = ifcom->endpoint + 0;
+@@ -553,76 +792,86 @@
+ epwrite = ifdata->endpoint + 1;
+
+ if ((epctrl->bEndpointAddress & 0x80) != 0x80 || (epctrl->bmAttributes & 3) != 3 ||
+- (epread->bmAttributes & 3) != 2 || (epwrite->bmAttributes & 3) != 2 ||
+- ((epread->bEndpointAddress & 0x80) ^ (epwrite->bEndpointAddress & 0x80)) != 0x80)
++ (epread->bmAttributes & 3) != 2 || (epwrite->bmAttributes & 3) != 2 ||
++ ((epread->bEndpointAddress & 0x80) ^ (epwrite->bEndpointAddress & 0x80)) != 0x80)
+ continue;
+
+- dbg("using interface %d\n", j);
+-
+ if ((epread->bEndpointAddress & 0x80) != 0x80) {
+ epread = ifdata->endpoint + 1;
+ epwrite = ifdata->endpoint + 0;
+ }
++ }
+
+- usb_set_configuration(dev, cfacm->bConfigurationValue);
++ usb_set_configuration(dev, cfacm->bConfigurationValue);
+
+- for (minor = 0; minor < ACM_TTY_MINORS && acm_table[minor]; minor++);
+- if (acm_table[minor]) {
+- err("no more free acm devices");
+- return NULL;
+- }
++ for (minor = 0; minor < ACM_TTY_MINORS && acm_table[minor]; minor++);
++ if (acm_table[minor]) {
++ err("no more free acm devices");
++ return NULL;
++ }
+
+- if (!(acm = kmalloc(sizeof(struct acm), GFP_KERNEL))) {
+- err("out of memory");
+- return NULL;
+- }
+- memset(acm, 0, sizeof(struct acm));
++ if (!(acm = kmalloc(sizeof(struct acm), GFP_KERNEL))) {
++ err("out of memory");
++ return NULL;
++ }
++ memset(acm, 0, sizeof(struct acm));
+
+- ctrlsize = (epctrl->wMaxPacketSize > maxszc)?
+- epctrl->wMaxPacketSize: maxszc;
+- readsize = (epread->wMaxPacketSize > maxszr)?
+- epread->wMaxPacketSize: maxszr;
+- acm->writesize = (epwrite->wMaxPacketSize > maxszw)?
+- epwrite->wMaxPacketSize: maxszw;
+-
+- acm->iface = cfacm->interface + j;
+- acm->minor = minor;
+- acm->dev = dev;
+-
+- acm->tqueue.routine = acm_softint;
+- acm->tqueue.data = acm;
+-
+- if (!(buf = kmalloc(ctrlsize + readsize + acm->writesize, GFP_KERNEL))) {
+- err("out of memory");
+- kfree(acm);
+- return NULL;
+- }
++ ctrlsize = (epctrl->wMaxPacketSize > maxszc)?
++ epctrl->wMaxPacketSize: maxszc;
++ readsize = (epread->wMaxPacketSize > maxszr)?
++ epread->wMaxPacketSize: maxszr;
++ acm->writesize = (epwrite->wMaxPacketSize > maxszw)?
++ epwrite->wMaxPacketSize: maxszw;
++
++ init_MUTEX (&acm->mutex);
++ if (!(acm->throttle_data = kmalloc(TD_SIZE * sizeof (*acm->throttle_data), GFP_KERNEL))) {
++ err("out of memory (throttle_data)");
++ kfree(acm);
++ return NULL;
++ }
++ acm->iface = cfacm->interface + ifnum;
++ acm->minor = minor;
++ acm->dev = dev;
+
+- FILL_INT_URB(&acm->ctrlurb, dev, usb_rcvintpipe(dev, epctrl->bEndpointAddress),
+- buf, ctrlsize, acm_ctrl_irq, acm, epctrl->bInterval);
++ acm->used_interfaces = used_interfaces;
+
+- FILL_BULK_URB(&acm->readurb, dev, usb_rcvbulkpipe(dev, epread->bEndpointAddress),
+- buf += ctrlsize, readsize, acm_read_bulk, acm);
+- acm->readurb.transfer_flags |= USB_NO_FSBR;
++ acm->tqueue.routine = acm_softint;
++ acm->tqueue.data = acm;
+
+- FILL_BULK_URB(&acm->writeurb, dev, usb_sndbulkpipe(dev, epwrite->bEndpointAddress),
+- buf += readsize, acm->writesize, acm_write_bulk, acm);
+- acm->writeurb.transfer_flags |= USB_NO_FSBR;
++ if (!(buf = kmalloc(ctrlsize + readsize + acm->writesize, GFP_KERNEL))) {
++ err("out of memory (urb buf)");
++ kfree(acm);
++ return NULL;
++ }
+
+- printk(KERN_INFO "ttyACM%d: USB ACM device\n", minor);
++ FILL_INT_URB(&acm->ctrlurb, dev, usb_rcvintpipe(dev, epctrl->bEndpointAddress),
++ buf, ctrlsize, acm_ctrl_irq, acm, epctrl->bInterval);
+
+- acm_set_control(acm, acm->ctrlout);
++ FILL_BULK_URB(&acm->readurb, dev, usb_rcvbulkpipe(dev, epread->bEndpointAddress),
++ buf += ctrlsize, readsize, acm_read_bulk, acm);
++ acm->readurb.transfer_flags |= USB_NO_FSBR;
+
+- acm->line.speed = cpu_to_le32(9600);
+- acm->line.databits = 8;
+- acm_set_line(acm, &acm->line);
++ FILL_BULK_URB(&acm->writeurb, dev, usb_sndbulkpipe(dev, epwrite->bEndpointAddress),
++ buf += readsize, acm->writesize, acm_write_bulk, acm);
++ acm->writeurb.transfer_flags |= USB_NO_FSBR;
+
+- usb_driver_claim_interface(&acm_driver, acm->iface + 0, acm);
+- usb_driver_claim_interface(&acm_driver, acm->iface + 1, acm);
++ printk(KERN_INFO "ttyACM%d: USB ACM device C %p W %p R %p %x\n", minor, &acm->ctrlurb,
++ &acm->writeurb, &acm->readurb, acm->ctrlout);
++
++ acm_set_control(acm, acm->ctrlout);
+
+- tty_register_devfs(&acm_tty_driver, 0, minor);
+- return acm_table[minor] = acm;
++ acm->line.speed = cpu_to_le32(9600);
++ acm->line.databits = 8;
++ acm_set_line(acm, &acm->line);
++
++ if ( acm->used_interfaces == 2 ) {
++ // only just checked interface is claimed automatically, so claim data interface too
++ usb_driver_claim_interface(&acm_driver, acm->iface + 1, acm);
+ }
++
++ tty_register_devfs(&acm_tty_driver, 0, minor);
++
++ return acm_table[minor] = acm;
+ }
+
+ return NULL;
+@@ -646,7 +895,9 @@
+ kfree(acm->ctrlurb.transfer_buffer);
+
+ usb_driver_release_interface(&acm_driver, acm->iface + 0);
+- usb_driver_release_interface(&acm_driver, acm->iface + 1);
++ if ( acm->used_interfaces == 2 ) {
++ usb_driver_release_interface(&acm_driver, acm->iface + 1);
++ }
+
+ if (!acm->used) {
+ tty_unregister_devfs(&acm_tty_driver, acm->minor);
+@@ -665,6 +916,9 @@
+
+ static struct usb_device_id acm_ids[] = {
+ { USB_DEVICE(0x22B8, 0x1005) }, /* Motorola TimePort 280 */
++ { USB_DEVICE(0x05C6, 0x7001), driver_info: SINGLE_IF_ACM }, /* Siemens HC15/HC25 */
++ { USB_DEVICE(0x0681, 0x003e), driver_info: SINGLE_IF_ACM }, /* Siemens HC15/HC25 */
++ { USB_DEVICE(0x22B8, 0x1006) },
+ { USB_DEVICE_INFO(USB_CLASS_COMM, 0, 0) },
+ { USB_DEVICE_INFO(USB_CLASS_COMM, 2, 0) },
+ { }
+@@ -735,7 +989,7 @@
+ return -1;
+ }
+
+- info(DRIVER_VERSION ":" DRIVER_DESC);
++ info(DRIVER_VERSION ":" DRIVER_DESC "(non-legacy %d)", nonlegacy);
+
+ return 0;
+ }
+@@ -759,7 +1013,9 @@
+ MODULE_PARM(maxszc, "i");
+ MODULE_PARM_DESC(maxszc, "User specified USB endpoint control size");
+
++MODULE_PARM(nonlegacy, "i");
++MODULE_PARM_DESC(nonlegacy, "Set this to 1 to for use with non-legacy device");
++
+ MODULE_AUTHOR( DRIVER_AUTHOR );
+ MODULE_DESCRIPTION( DRIVER_DESC );
+ MODULE_LICENSE("GPL");
+-
diff --git a/recipes/linux/linux-mtx-1_2.4.27.bb b/recipes/linux/linux-mtx-1_2.4.27.bb
index 5815a570ee..6dd7121bae 100644
--- a/recipes/linux/linux-mtx-1_2.4.27.bb
+++ b/recipes/linux/linux-mtx-1_2.4.27.bb
@@ -35,7 +35,11 @@ SRC_URI = "cvs://cvs:cvs@ftp.linux-mips.org/home/cvs;module=linux;tag=linux_2_4_
file://26-usbd-amd-pb1x00-kit-23may2003-update.diff;patch=1 \
file://27-usbd-amd-pb1x00-kit-23may2003-usbd.diff;patch=1 \
file://29-au1000-pci-config-clear-errors.diff;patch=1 \
+ file://32-usbserial-stalled-hack.diff;patch=1 \
+ file://33-usbserial-bulk_in_size-4096.diff;patch=1 \
file://42-usb-ohci-fixes.patch;patch=1 \
+ file://43-usbserial-27-32-backport.diff;patch=1 \
+ file://45-acm-tty-and-sb2.patch;patch=1 \
file://48-pptp.patch;patch=1 \
file://defconfig-mtx-1"
@@ -74,8 +78,8 @@ fi
FILES_kernel += " /tmp"
do_deploy() {
- install -d ${DEPLOY_DIR}/images
- install -m 0644 arch/mips/zboot/images/mtx-1.flash.bin ${DEPLOY_DIR}/images/${KERNEL_IMAGE_NAME}.flash.bin
- install -m 0644 arch/mips/zboot/images/mtx-1.flash.srec ${DEPLOY_DIR}/images/${KERNEL_IMAGE_NAME}.flash.srec
- install -m 0644 arch/mips/zboot/images/mtx-1.srec ${DEPLOY_DIR}/images/${KERNEL_IMAGE_NAME}.ram.srec
+ install -d 0755 ${DEPLOY_DIR_IMAGE}
+ install -m 0644 arch/mips/zboot/images/mtx-1.flash.bin ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.bin
+ install -m 0644 arch/mips/zboot/images/mtx-1.flash.srec ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.srec
+ install -m 0644 arch/mips/zboot/images/mtx-1.srec ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.ram.srec
}
diff --git a/recipes/linux/linux-mtx-2-2.4.27/06-zboot-2.4.26.patch b/recipes/linux/linux-mtx-2-2.4.27/06-zboot-2.4.26.patch
index 48495b5e5f..b4cb9fef9d 100644
--- a/recipes/linux/linux-mtx-2-2.4.27/06-zboot-2.4.26.patch
+++ b/recipes/linux/linux-mtx-2-2.4.27/06-zboot-2.4.26.patch
@@ -1,6 +1,15 @@
diff -Naru linux/arch/mips/Makefile linux.spi/arch/mips/Makefile
--- linux/arch/mips/Makefile 2004-05-06 15:23:41.000000000 -0400
+++ linux.spi/arch/mips/Makefile 2004-05-11 23:19:24.000000000 -0400
+@@ -17,7 +17,7 @@
+ # Select the object file format to substitute into the linker script.
+ #
+ ifdef CONFIG_CPU_LITTLE_ENDIAN
+-tool-prefix = mipsel-linux-
++tool-prefix = mipsel-nylon-linux-
+ ld-emul = elf32ltsmip
+ else
+ tool-prefix = mips-linux-
@@ -29,6 +29,8 @@
endif
diff --git a/recipes/linux/linux-mtx-2_2.4.27.bb b/recipes/linux/linux-mtx-2_2.4.27.bb
index 66ce06c6ca..5b26903ec0 100644
--- a/recipes/linux/linux-mtx-2_2.4.27.bb
+++ b/recipes/linux/linux-mtx-2_2.4.27.bb
@@ -86,8 +86,8 @@ fi
FILES_kernel += " /tmp"
do_deploy() {
- install -d ${DEPLOY_DIR}/images
- install -m 0644 arch/mips/zboot/images/mtx-2.flash.bin ${DEPLOY_DIR}/images/${KERNEL_IMAGE_NAME}.flash.bin
- install -m 0644 arch/mips/zboot/images/mtx-2.flash.srec ${DEPLOY_DIR}/images/${KERNEL_IMAGE_NAME}.flash.srec
- install -m 0644 arch/mips/zboot/images/mtx-2.srec ${DEPLOY_DIR}/images/${KERNEL_IMAGE_NAME}.ram.srec
+ install -d 0755 ${DEPLOY_DIR_IMAGE}
+ install -m 0644 arch/mips/zboot/images/mtx-2.flash.bin ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.bin
+ install -m 0644 arch/mips/zboot/images/mtx-2.flash.srec ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.srec
+ install -m 0644 arch/mips/zboot/images/mtx-2.srec ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.ram.srec
}
diff --git a/recipes/linux/linux-omap-2.6.29/0001-implement-TIF_RESTORE_SIGMASK-support-and-enable-the.patch b/recipes/linux/linux-omap-2.6.29/0001-implement-TIF_RESTORE_SIGMASK-support-and-enable-the.patch
new file mode 100644
index 0000000000..7852f0afdb
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/0001-implement-TIF_RESTORE_SIGMASK-support-and-enable-the.patch
@@ -0,0 +1,287 @@
+From 8a7643b09856f4f661403dcedbe0455b3cbeeea9 Mon Sep 17 00:00:00 2001
+From: Steven Newbury <s_j_newbury@yahoo.co.uk>
+Date: Fri, 22 May 2009 14:25:40 +0200
+Subject: [PATCH] implement TIF_RESTORE_SIGMASK support and enable the related
+ syscalls:
+
+pselect6
+ppoll
+epoll_pwait
+
+Based on http://www.spinics.net/lists/arm-kernel/msg38114.html
+---
+ arch/arm/include/asm/thread_info.h | 2 +
+ arch/arm/include/asm/unistd.h | 7 ++-
+ arch/arm/kernel/calls.S | 6 +-
+ arch/arm/kernel/signal.c | 90 +++++++++++++++---------------------
+ 4 files changed, 46 insertions(+), 59 deletions(-)
+
+diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
+index 4f88482..2cf0917 100644
+--- a/arch/arm/include/asm/thread_info.h
++++ b/arch/arm/include/asm/thread_info.h
+@@ -136,6 +136,7 @@ extern void vfp_sync_state(struct thread_info *thread);
+ #define TIF_SIGPENDING 0
+ #define TIF_NEED_RESCHED 1
+ #define TIF_SYSCALL_TRACE 8
++#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */
+ #define TIF_POLLING_NRFLAG 16
+ #define TIF_USING_IWMMXT 17
+ #define TIF_MEMDIE 18
+@@ -144,6 +145,7 @@ extern void vfp_sync_state(struct thread_info *thread);
+ #define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
+ #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
+ #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
++#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
+ #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
+ #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
+ #define _TIF_FREEZE (1 << TIF_FREEZE)
+diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
+index 94cc58e..cd1eaa0 100644
+--- a/arch/arm/include/asm/unistd.h
++++ b/arch/arm/include/asm/unistd.h
+@@ -360,8 +360,8 @@
+ #define __NR_readlinkat (__NR_SYSCALL_BASE+332)
+ #define __NR_fchmodat (__NR_SYSCALL_BASE+333)
+ #define __NR_faccessat (__NR_SYSCALL_BASE+334)
+- /* 335 for pselect6 */
+- /* 336 for ppoll */
++#define __NR_pselect6 (__NR_SYSCALL_BASE+335)
++#define __NR_ppoll (__NR_SYSCALL_BASE+336)
+ #define __NR_unshare (__NR_SYSCALL_BASE+337)
+ #define __NR_set_robust_list (__NR_SYSCALL_BASE+338)
+ #define __NR_get_robust_list (__NR_SYSCALL_BASE+339)
+@@ -372,7 +372,7 @@
+ #define __NR_vmsplice (__NR_SYSCALL_BASE+343)
+ #define __NR_move_pages (__NR_SYSCALL_BASE+344)
+ #define __NR_getcpu (__NR_SYSCALL_BASE+345)
+- /* 346 for epoll_pwait */
++#define __NR_epoll_pwait (__NR_SYSCALL_BASE+346)
+ #define __NR_kexec_load (__NR_SYSCALL_BASE+347)
+ #define __NR_utimensat (__NR_SYSCALL_BASE+348)
+ #define __NR_signalfd (__NR_SYSCALL_BASE+349)
+@@ -430,6 +430,7 @@
+ #define __ARCH_WANT_SYS_SIGPENDING
+ #define __ARCH_WANT_SYS_SIGPROCMASK
+ #define __ARCH_WANT_SYS_RT_SIGACTION
++#define __ARCH_WANT_SYS_RT_SIGSUSPEND
+
+ #if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT)
+ #define __ARCH_WANT_SYS_TIME
+diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
+index 1680e9e..534000d 100644
+--- a/arch/arm/kernel/calls.S
++++ b/arch/arm/kernel/calls.S
+@@ -344,8 +344,8 @@
+ CALL(sys_readlinkat)
+ CALL(sys_fchmodat)
+ CALL(sys_faccessat)
+-/* 335 */ CALL(sys_ni_syscall) /* eventually pselect6 */
+- CALL(sys_ni_syscall) /* eventually ppoll */
++/* 335 */ CALL(sys_pselect6)
++ CALL(sys_ppoll)
+ CALL(sys_unshare)
+ CALL(sys_set_robust_list)
+ CALL(sys_get_robust_list)
+@@ -355,7 +355,7 @@
+ CALL(sys_vmsplice)
+ CALL(sys_move_pages)
+ /* 345 */ CALL(sys_getcpu)
+- CALL(sys_ni_syscall) /* eventually epoll_pwait */
++ CALL(sys_epoll_pwait)
+ CALL(sys_kexec_load)
+ CALL(sys_utimensat)
+ CALL(sys_signalfd)
+diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
+index 80b8b5c..7645048 100644
+--- a/arch/arm/kernel/signal.c
++++ b/arch/arm/kernel/signal.c
+@@ -47,57 +47,23 @@ const unsigned long sigreturn_codes[7] = {
+ MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN,
+ };
+
+-static int do_signal(sigset_t *oldset, struct pt_regs * regs, int syscall);
++static void do_signal(struct pt_regs * regs, int syscall);
+
+ /*
+ * atomically swap in the new signal mask, and wait for a signal.
+ */
+-asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, old_sigset_t mask, struct pt_regs *regs)
++asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, old_sigset_t mask)
+ {
+- sigset_t saveset;
+-
+ mask &= _BLOCKABLE;
+ spin_lock_irq(&current->sighand->siglock);
+- saveset = current->blocked;
++ current->saved_sigmask = current->blocked;
+ siginitset(&current->blocked, mask);
+ recalc_sigpending();
+ spin_unlock_irq(&current->sighand->siglock);
+- regs->ARM_r0 = -EINTR;
+-
+- while (1) {
+- current->state = TASK_INTERRUPTIBLE;
+- schedule();
+- if (do_signal(&saveset, regs, 0))
+- return regs->ARM_r0;
+- }
+-}
+-
+-asmlinkage int
+-sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, struct pt_regs *regs)
+-{
+- sigset_t saveset, newset;
+-
+- /* XXX: Don't preclude handling different sized sigset_t's. */
+- if (sigsetsize != sizeof(sigset_t))
+- return -EINVAL;
+-
+- if (copy_from_user(&newset, unewset, sizeof(newset)))
+- return -EFAULT;
+- sigdelsetmask(&newset, ~_BLOCKABLE);
+-
+- spin_lock_irq(&current->sighand->siglock);
+- saveset = current->blocked;
+- current->blocked = newset;
+- recalc_sigpending();
+- spin_unlock_irq(&current->sighand->siglock);
+- regs->ARM_r0 = -EINTR;
+-
+- while (1) {
+- current->state = TASK_INTERRUPTIBLE;
+- schedule();
+- if (do_signal(&saveset, regs, 0))
+- return regs->ARM_r0;
+- }
++ current->state = TASK_INTERRUPTIBLE;
++ schedule();
++ set_thread_flag(TIF_RESTORE_SIGMASK);
++ return -ERESTARTNOHAND;
+ }
+
+ asmlinkage int
+@@ -290,7 +256,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
+
+ badframe:
+ force_sig(SIGSEGV, current);
+- return 0;
++ return -EFAULT;
+ }
+
+ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
+@@ -325,7 +291,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
+
+ badframe:
+ force_sig(SIGSEGV, current);
+- return 0;
++ return -EFAULT;
+ }
+
+ static int
+@@ -541,7 +507,7 @@ static inline void restart_syscall(struct pt_regs *regs)
+ /*
+ * OK, we're invoking a handler
+ */
+-static void
++static int
+ handle_signal(unsigned long sig, struct k_sigaction *ka,
+ siginfo_t *info, sigset_t *oldset,
+ struct pt_regs * regs, int syscall)
+@@ -592,7 +558,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
+
+ if (ret != 0) {
+ force_sigsegv(sig, tsk);
+- return;
++ return ret;
+ }
+
+ /*
+@@ -606,6 +572,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
+ recalc_sigpending();
+ spin_unlock_irq(&tsk->sighand->siglock);
+
++ return ret;
+ }
+
+ /*
+@@ -617,11 +584,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
+ * the kernel can handle, and then we build all the user-level signal handling
+ * stack-frames in one go after that.
+ */
+-static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
++static void do_signal(struct pt_regs *regs, int syscall)
+ {
+ struct k_sigaction ka;
+ siginfo_t info;
+ int signr;
++ sigset_t *oldset;
+
+ /*
+ * We want the common case to go fast, which
+@@ -630,18 +598,29 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
+ * if so.
+ */
+ if (!user_mode(regs))
+- return 0;
++ return;
+
+ if (try_to_freeze())
+ goto no_signal;
+
+ single_step_clear(current);
+
++ if (test_thread_flag(TIF_RESTORE_SIGMASK))
++ oldset = &current->saved_sigmask;
++ else
++ oldset = &current->blocked;
++
+ signr = get_signal_to_deliver(&info, &ka, regs, NULL);
+ if (signr > 0) {
+- handle_signal(signr, &ka, &info, oldset, regs, syscall);
++ if (handle_signal(signr, &ka, &info, oldset, regs, syscall) == 0) {
++ /* a signal was successfully delivered; the saved
++ * sigmask will have been stored in the signal frame,
++ * and will be restored by sigreturn, so we can simply
++ * clear the TIF_RESTORE_SIGMASK flag */
++ clear_thread_flag(TIF_RESTORE_SIGMASK);
++ }
+ single_step_set(current);
+- return 1;
++ return;
+ }
+
+ no_signal:
+@@ -665,7 +644,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
+ usp = (u32 __user *)regs->ARM_sp;
+
+ /*
+- * Either we supports OABI only, or we have
++ * Either we support OABI only, or we have
+ * EABI with the OABI compat layer enabled.
+ * In the later case we don't know if user
+ * space is EABI or not, and if not we must
+@@ -695,12 +674,17 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
+ }
+ }
+ single_step_set(current);
+- return 0;
++ /* if there's no signal to deliver, we just put the saved sigmask
++ back. */
++ if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
++ clear_thread_flag(TIF_RESTORE_SIGMASK);
++ sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
++ }
+ }
+
+ asmlinkage void
+ do_notify_resume(struct pt_regs *regs, unsigned int thread_flags, int syscall)
+ {
+- if (thread_flags & _TIF_SIGPENDING)
+- do_signal(&current->blocked, regs, syscall);
++ if (thread_flags & (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK))
++ do_signal(regs, syscall);
+ }
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/beagleboard/defconfig b/recipes/linux/linux-omap-2.6.29/beagleboard/defconfig
index d939aa6b42..1aa7cf57ac 100644
--- a/recipes/linux/linux-omap-2.6.29/beagleboard/defconfig
+++ b/recipes/linux/linux-omap-2.6.29/beagleboard/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29-omap1
-# Mon May 11 13:05:20 2009
+# Fri May 29 14:47:52 2009
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -64,8 +64,7 @@ CONFIG_FAIR_GROUP_SCHED=y
CONFIG_USER_SCHED=y
# CONFIG_CGROUP_SCHED is not set
# CONFIG_CGROUPS is not set
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
# CONFIG_RELAY is not set
# CONFIG_NAMESPACES is not set
CONFIG_BLK_DEV_INITRD=y
@@ -786,7 +785,9 @@ CONFIG_BT_HCIBFUSB=y
# CONFIG_BT_HCIBRF6150 is not set
# CONFIG_BT_HCIH4P is not set
# CONFIG_BT_HCIVHCI is not set
-# CONFIG_AF_RXRPC is not set
+CONFIG_AF_RXRPC=m
+# CONFIG_AF_RXRPC_DEBUG is not set
+# CONFIG_RXKAD is not set
# CONFIG_PHONET is not set
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
@@ -1095,7 +1096,7 @@ CONFIG_USB_NET_SMSC95XX=y
CONFIG_USB_NET_GL620A=y
CONFIG_USB_NET_NET1080=y
CONFIG_USB_NET_PLUSB=y
-CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_MCS7830=y
CONFIG_USB_NET_RNDIS_HOST=y
CONFIG_USB_NET_CDC_SUBSET=y
CONFIG_USB_ALI_M5632=y
@@ -1104,7 +1105,7 @@ CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
CONFIG_USB_EPSON2888=y
CONFIG_USB_KC2190=y
-CONFIG_USB_NET_ZAURUS=m
+CONFIG_USB_NET_ZAURUS=y
# CONFIG_WAN is not set
CONFIG_ATM_DRIVERS=y
# CONFIG_ATM_DUMMY is not set
@@ -2024,7 +2025,7 @@ CONFIG_USB_EMI26=m
# CONFIG_USB_RIO500 is not set
CONFIG_USB_LEGOTOWER=m
CONFIG_USB_LCD=m
-# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_BERRY_CHARGE=m
CONFIG_USB_LED=m
CONFIG_USB_CYPRESS_CY7C63=m
CONFIG_USB_CYTHERM=m
@@ -2038,9 +2039,9 @@ CONFIG_USB_FTDI_ELAN=m
CONFIG_USB_SISUSBVGA=m
CONFIG_USB_SISUSBVGA_CON=y
CONFIG_USB_LD=m
-# CONFIG_USB_TRANCEVIBRATOR is not set
+CONFIG_USB_TRANCEVIBRATOR=m
# CONFIG_USB_IOWARRIOR is not set
-# CONFIG_USB_TEST is not set
+CONFIG_USB_TEST=m
# CONFIG_USB_ISIGHTFW is not set
CONFIG_USB_VST=m
CONFIG_USB_ATM=m
@@ -2071,14 +2072,17 @@ CONFIG_USB_GADGET_SELECTED=y
# CONFIG_USB_GADGET_GOKU 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 is not set
-# CONFIG_USB_G_SERIAL is not set
-# CONFIG_USB_MIDI_GADGET is not set
-# CONFIG_USB_G_PRINTER is not set
-CONFIG_USB_CDC_COMPOSITE=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ZERO_HNPTEST=y
+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=m
+CONFIG_USB_G_PRINTER=m
+CONFIG_USB_CDC_COMPOSITE=m
#
# OTG and related infrastructure
@@ -2126,7 +2130,7 @@ CONFIG_LEDS_GPIO=y
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_TIMER=m
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_BACKLIGHT=m
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
@@ -2199,7 +2203,11 @@ CONFIG_REGULATOR=y
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_BQ24022 is not set
CONFIG_REGULATOR_TWL4030=y
-# CONFIG_UIO is not set
+CONFIG_UIO=m
+CONFIG_UIO_PDRV=m
+CONFIG_UIO_PDRV_GENIRQ=m
+# CONFIG_UIO_SMX is not set
+# CONFIG_UIO_SERCOS3 is not set
CONFIG_STAGING=y
# CONFIG_STAGING_EXCLUDE_BUILD is not set
# CONFIG_MEILHAUS is not set
@@ -2251,8 +2259,17 @@ CONFIG_JBD=y
CONFIG_JBD2=m
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=m
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+CONFIG_REISERFS_PROC_INFO=y
+CONFIG_REISERFS_FS_XATTR=y
+# CONFIG_REISERFS_FS_POSIX_ACL is not set
+# CONFIG_REISERFS_FS_SECURITY is not set
+CONFIG_JFS_FS=m
+# CONFIG_JFS_POSIX_ACL is not set
+# CONFIG_JFS_SECURITY is not set
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_FILE_LOCKING=y
CONFIG_XFS_FS=m
@@ -2260,9 +2277,17 @@ CONFIG_XFS_FS=m
# 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_BTRFS_FS is not set
+CONFIG_GFS2_FS=m
+CONFIG_GFS2_FS_LOCKING_DLM=m
+CONFIG_OCFS2_FS=m
+CONFIG_OCFS2_FS_O2CB=m
+CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
+CONFIG_OCFS2_FS_STATS=y
+CONFIG_OCFS2_DEBUG_MASKLOG=y
+# CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_FS_POSIX_ACL is not set
+CONFIG_BTRFS_FS=m
+# CONFIG_BTRFS_FS_POSIX_ACL is not set
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
@@ -2274,7 +2299,7 @@ CONFIG_QUOTA_TREE=y
CONFIG_QFMT_V2=y
CONFIG_QUOTACTL=y
# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
+CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
#
@@ -2294,7 +2319,9 @@ 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
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
#
# Pseudo filesystems
@@ -2308,13 +2335,16 @@ CONFIG_TMPFS=y
# CONFIG_HUGETLB_PAGE is not set
CONFIG_CONFIGFS_FS=m
CONFIG_MISC_FILESYSTEMS=y
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
+CONFIG_ADFS_FS=m
+# CONFIG_ADFS_FS_RW is not set
+CONFIG_AFFS_FS=m
+# CONFIG_ECRYPT_FS is not set
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -2333,23 +2363,25 @@ CONFIG_JFFS2_RUBIN=y
# CONFIG_JFFS2_CMODE_SIZE is not set
CONFIG_JFFS2_CMODE_FAVOURLZO=y
CONFIG_UBIFS_FS=y
-# CONFIG_UBIFS_FS_XATTR is not set
-# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+CONFIG_UBIFS_FS_XATTR=y
+CONFIG_UBIFS_FS_ADVANCED_COMPR=y
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
# CONFIG_UBIFS_FS_DEBUG is not set
-# CONFIG_CRAMFS is not set
+CONFIG_CRAMFS=m
CONFIG_SQUASHFS=y
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-# CONFIG_VXFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_OMFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
+CONFIG_VXFS_FS=m
+CONFIG_MINIX_FS=m
+CONFIG_OMFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_ROMFS_FS=m
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
@@ -2371,12 +2403,30 @@ CONFIG_SUNRPC_GSS=y
# CONFIG_SUNRPC_REGISTER_V4 is not set
CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
-# CONFIG_SMB_FS 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
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=y
+CONFIG_CIFS_STATS2=y
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_UPCALL is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+CONFIG_CIFS_EXPERIMENTAL=y
+# CONFIG_CIFS_DFS_UPCALL is not set
+CONFIG_NCP_FS=m
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+CONFIG_CODA_FS=m
+CONFIG_AFS_FS=m
+# CONFIG_AFS_DEBUG is not set
+CONFIG_9P_FS=m
#
# Partition Types
@@ -2386,60 +2436,62 @@ CONFIG_PARTITION_ADVANCED=y
# 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_MAC_PARTITION=y
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_BSD_DISKLABEL=y
+CONFIG_MINIX_SUBPARTITION=y
+CONFIG_SOLARIS_X86_PARTITION=y
+CONFIG_UNIXWARE_DISKLABEL=y
+CONFIG_LDM_PARTITION=y
+CONFIG_LDM_DEBUG=y
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
+CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-CONFIG_NLS_ISO8859_1=y
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-# CONFIG_DLM is not set
+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=y
+CONFIG_DLM=m
+# CONFIG_DLM_DEBUG is not set
#
# Kernel hacking
@@ -2517,7 +2569,8 @@ CONFIG_HAVE_ARCH_KGDB=y
#
# Security options
#
-# CONFIG_KEYS is not set
+CONFIG_KEYS=y
+# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
@@ -2530,7 +2583,7 @@ CONFIG_CRYPTO=y
#
# Crypto core or helper
#
-# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_FIPS=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=m
@@ -2539,6 +2592,7 @@ CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
@@ -2551,20 +2605,20 @@ 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
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
#
# Block modes
#
CONFIG_CRYPTO_CBC=y
-# CONFIG_CRYPTO_CTR is not set
-# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_XTS is not set
+CONFIG_CRYPTO_XTS=m
#
# Hash modes
@@ -2579,10 +2633,10 @@ CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=y
-# CONFIG_CRYPTO_RMD128 is not set
-# CONFIG_CRYPTO_RMD160 is not set
-# CONFIG_CRYPTO_RMD256 is not set
-# CONFIG_CRYPTO_RMD320 is not set
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
@@ -2602,8 +2656,8 @@ CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_FCRYPT=m
CONFIG_CRYPTO_KHAZAD=m
-# CONFIG_CRYPTO_SALSA20 is not set
-# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
@@ -2618,7 +2672,7 @@ CONFIG_CRYPTO_LZO=y
#
# Random Number Generation
#
-# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_ANSI_CPRNG=m
CONFIG_CRYPTO_HW=y
#
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch b/recipes/linux/linux-omap-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch
index aeab62f105..ac26554845 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch
@@ -1,7 +1,7 @@
From 26abf45ac80be4c54a63fecf1c3c1e1efb416e0a Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 1 Apr 2009 18:27:09 +0300
-Subject: [PATCH] Revert "gro: Fix legacy path napi_complete crash"
+Subject: [PATCH 01/69] Revert "gro: Fix legacy path napi_complete crash"
This reverts commit 303c6a0251852ecbdc5c15e466dcaff5971f7517.
@@ -35,5 +35,5 @@ index e3fe5c7..c1e9dc0 100644
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch b/recipes/linux/linux-omap-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch
index 04ac6a9ce8..5c86e6a654 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch
@@ -1,7 +1,7 @@
From 02243f13eec816e11d16676a131bc04b8a0666ab Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 11 Feb 2009 16:33:02 +0200
-Subject: [PATCH] OMAPFB: move omapfb.h to include/linux/
+Subject: [PATCH 02/69] OMAPFB: move omapfb.h to include/linux/
This is needed so that omapfb.h is automatically exported to user space.
@@ -1312,5 +1312,5 @@ index 0000000..b226bdf
+
+#endif /* __OMAPFB_H */
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch b/recipes/linux/linux-omap-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch
index c3523362c6..4610e28704 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch
@@ -1,7 +1,7 @@
From 284deec412f9c6f15c971d8eaf4d0156a51a2f3b Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 10:23:42 +0300
-Subject: [PATCH] DSS2: OMAP2/3 Display Subsystem driver
+Subject: [PATCH 03/69] DSS2: OMAP2/3 Display Subsystem driver
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
---
@@ -14446,5 +14446,5 @@ index 0000000..aceed9f
+ display->check_timings = venc_check_timings;
+}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch b/recipes/linux/linux-omap-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch
index 09afa7e5be..877bb43c56 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch
@@ -1,7 +1,7 @@
From db9314f01a207e256d545244d3d00dc4ce535280 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 10:25:48 +0300
-Subject: [PATCH] DSS2: OMAP framebuffer driver
+Subject: [PATCH 04/69] DSS2: OMAP framebuffer driver
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
---
@@ -3399,5 +3399,5 @@ index b226bdf..96190b2 100644
extern void omapfb_register_panel(struct lcd_panel *panel);
extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch b/recipes/linux/linux-omap-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch
index d12586ca2f..c68c89e171 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch
@@ -1,7 +1,7 @@
From 4cc0368574f587f448231ccd121266bed4bf9729 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 10:29:56 +0300
-Subject: [PATCH] DSS2: Add panel drivers
+Subject: [PATCH 05/69] DSS2: Add panel drivers
- Generic panel
- Samsung LTE430WQ-F0C LCD Panel
@@ -254,7 +254,7 @@ index 0000000..e4bb781
+ .vfp = 4,
+ .vbp = 12-10,
+ },
-+ .recommended_bpp = 16,
++
+ .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IVS,
+};
+
@@ -392,5 +392,5 @@ index 0000000..1f99150
+module_exit(sharp_ls_panel_drv_exit);
+MODULE_LICENSE("GPL");
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch b/recipes/linux/linux-omap-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch
index 0025f1aa8b..258b0b6531 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch
@@ -1,7 +1,7 @@
From 18a25382e81c03230e022ca2eb7e0fce24479d6a Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 10:31:57 +0300
-Subject: [PATCH] DSS2: HACK: Add DSS2 support for N800
+Subject: [PATCH 06/69] DSS2: HACK: Add DSS2 support for N800
Works, but it an ugly quick hack.
@@ -1075,5 +1075,5 @@ index 0000000..91d3e37
+MODULE_DESCRIPTION("N800 LCD Driver");
+MODULE_LICENSE("GPL");
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch b/recipes/linux/linux-omap-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch
index 4c8d432dd5..f4cd192bdd 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch
@@ -1,7 +1,7 @@
From 4741076cae4f4284e1fff9a03f35475b8455af54 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Wed, 1 Apr 2009 14:36:39 +0200
-Subject: [PATCH] DSS2: Add function to display object to get the backlight level
+Subject: [PATCH 08/69] DSS2: Add function to display object to get the backlight level
This is needed by an upcoming patch that changes the backlight
initialization to use the backlight level set by the bootloader.
@@ -35,5 +35,5 @@ index 6288353..6b702c7 100644
struct device;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch b/recipes/linux/linux-omap-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch
index 3f55f04460..82a1474056 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch
@@ -1,7 +1,7 @@
From 66e16f86d3f4c5b34b37e965c65102b7192371de Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Thu, 2 Apr 2009 11:47:13 +0300
-Subject: [PATCH] DSS2: Add acx565akm panel
+Subject: [PATCH 09/69] DSS2: Add acx565akm panel
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
@@ -774,5 +774,5 @@ index 0000000..6d3727b
+#endif
+
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch b/recipes/linux/linux-omap-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch
index c7efc58a05..f994327ec1 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch
@@ -1,7 +1,7 @@
From 370510e24ddbf539392ebb6a1e43280965fcb19b Mon Sep 17 00:00:00 2001
From: Vaibhav Hiremath <hvaibhav@ti.com>
Date: Tue, 31 Mar 2009 18:47:32 +0530
-Subject: [PATCH] DSS2: Small VRFB context allocation bug fixed
+Subject: [PATCH 10/69] DSS2: Small VRFB context allocation bug fixed
This is minor bug while requesting and mapping memory for
VRFB space.
@@ -24,5 +24,5 @@ index 852abe5..44febef 100644
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch b/recipes/linux/linux-omap-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch
index 1a82ed2a22..2dad1d337f 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch
@@ -1,7 +1,7 @@
From 370d1f93a32e8fcaeac5c16574417e354af21d08 Mon Sep 17 00:00:00 2001
From: Vaibhav Hiremath <hvaibhav@ti.com>
Date: Tue, 31 Mar 2009 18:38:31 +0530
-Subject: [PATCH] DSS2: Allocated memory for Color Look-up-table
+Subject: [PATCH 11/69] DSS2: Allocated memory for Color Look-up-table
We were not allocating memory for CMAP buffer and due to that
G_CMAP was failing, since it does check for size of CMAP buffer.
@@ -33,5 +33,5 @@ index 44febef..afe40a9 100644
return r;
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch b/recipes/linux/linux-omap-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch
index 22add6efd2..8e1d139c72 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch
@@ -1,7 +1,7 @@
From 9c93bcab724b5935d745604773ed43825efefd87 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 13:47:11 +0300
-Subject: [PATCH] DSS2: Fix DMA rotation
+Subject: [PATCH 12/69] DSS2: Fix DMA rotation
u16 was not a good type for offsets. First, they need to be signed,
and second, 16 bits is not enough.
@@ -61,5 +61,5 @@ index ffb5648..6cea545 100644
if (plane == OMAP_DSS_GFX) {
if (width != out_width || height != out_height)
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch b/recipes/linux/linux-omap-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch
index 76b8c73630..1abc7a8264 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch
@@ -1,7 +1,7 @@
From 360a55ddd309e3a45b227a4a905ae7120dd16169 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 14:21:12 +0300
-Subject: [PATCH] DSS2: Verify that overlay paddr != 0
+Subject: [PATCH 13/69] DSS2: Verify that overlay paddr != 0
---
drivers/video/omap2/dss/dispc.c | 3 +++
@@ -37,5 +37,5 @@ index 968edbe..9209acf 100644
ovl->info = *info;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch b/recipes/linux/linux-omap-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch
index 3b3fd77a9a..d8aa4eb893 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch
@@ -1,7 +1,7 @@
From 832b763db235da8e62f7b6ab02bcb8ad6bcb7a01 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 16:48:41 +0300
-Subject: [PATCH] DSS2: Add function to get DSS logic clock rate
+Subject: [PATCH 14/69] DSS2: Add function to get DSS logic clock rate
---
drivers/video/omap2/dss/dispc.c | 15 +++++++++++++++
@@ -47,5 +47,5 @@ index bac5ece..0be42b6 100644
void dispc_set_pol_freq(struct omap_panel *panel);
void find_lck_pck_divs(bool is_tft, unsigned long req_pck, unsigned long fck,
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch b/recipes/linux/linux-omap-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch
index d6b0cbbb41..a0f2b9f528 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch
@@ -1,7 +1,7 @@
From a5c235a6f0094494ae1fc1a1ba4728e0d33dfd3b Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 16:49:27 +0300
-Subject: [PATCH] DSS2: DSI: calculate VP_CLK_RATIO properly
+Subject: [PATCH 15/69] DSS2: DSI: calculate VP_CLK_RATIO properly
---
drivers/video/omap2/dss/dsi.c | 17 +++++++++++------
@@ -64,5 +64,5 @@ index 4442931..aecb89d 100644
r = FLD_MOD(r, 0, 8, 8); /* VP_CLK_POL */
r = FLD_MOD(r, 2, 13, 12); /* LINE_BUFFER, 2 lines */
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch b/recipes/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch
index bca449f169..35d65a996d 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch
@@ -1,7 +1,7 @@
From 6b2c9d84c7accdfe1067fcdc8a00e50674aab4bb Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 17:42:26 +0300
-Subject: [PATCH] DSS2: DSI: improve packet len calculation
+Subject: [PATCH 16/69] DSS2: DSI: improve packet len calculation
---
drivers/video/omap2/dss/dsi.c | 21 ++++++++++++++++-----
@@ -54,5 +54,5 @@ index aecb89d..66ac6ea 100644
if (dsi.use_te)
l = FLD_MOD(l, 1, 30, 30); /* TE_EN */
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch b/recipes/linux/linux-omap-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch
index 5b68b57da9..e9a5dcc67a 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch
@@ -1,7 +1,7 @@
From 85848d329ca3a2d6ee6841cdc11cc5951d187931 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Fri, 3 Apr 2009 19:09:20 +0200
-Subject: [PATCH] DSS2: Disable video planes on sync lost error
+Subject: [PATCH 17/69] DSS2: Disable video planes on sync lost error
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -99,5 +99,5 @@ index 1bc23f7..41734f3 100644
if (errors & DISPC_IRQ_OCP_ERR) {
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch b/recipes/linux/linux-omap-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch
index 088135c0a8..0261db2bd4 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch
@@ -1,7 +1,7 @@
From 63e15ba8d5f95b13d3abf359da718537d769f112 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Tue, 7 Apr 2009 10:01:58 +0300
-Subject: [PATCH] DSS2: check for ovl paddr only when enabling
+Subject: [PATCH 18/69] DSS2: check for ovl paddr only when enabling
It seems Xvideo uses SETUP_PLANE ioctl even when
the fb memory has not been allocated. Sigh.
@@ -36,5 +36,5 @@ index 9209acf..c047206 100644
ovl->info = *info;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch b/recipes/linux/linux-omap-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch
index daa95ca50d..6569c71471 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch
@@ -1,7 +1,7 @@
From 67f3fc050ab4e2006d5b7ec6ec341896627181ab Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 6 Apr 2009 17:32:04 +0200
-Subject: [PATCH] DSS2: Check fclk limits when configuring video planes
+Subject: [PATCH 19/69] DSS2: Check fclk limits when configuring video planes
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -179,5 +179,5 @@ index 41734f3..61861d8 100644
_dispc_set_vid_color_conv(plane, cconv);
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch b/recipes/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch
index b3248527e8..c6971ea452 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch
@@ -1,7 +1,7 @@
From 9f8f1613253656f155b3844c8255a560f86e0acd Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 6 Apr 2009 17:32:05 +0200
-Subject: [PATCH] DSS2: Check scaling limits against proper values
+Subject: [PATCH 20/69] DSS2: Check scaling limits against proper values
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -75,5 +75,5 @@ index 61861d8..ae7be3d 100644
_dispc_set_color_mode(plane, color_mode);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch b/recipes/linux/linux-omap-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch
index 31ff180228..44f126e7a4 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch
@@ -1,7 +1,7 @@
From c5e71be877e71c7df329205307e830f158c403bf Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 6 Apr 2009 17:32:06 +0200
-Subject: [PATCH] DSS2: Add venc register dump
+Subject: [PATCH 21/69] DSS2: Add venc register dump
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -92,5 +92,5 @@ index aceed9f..b655df4 100644
+#undef DUMPREG
+}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch b/recipes/linux/linux-omap-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch
index d4fb327c76..207a85f115 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch
@@ -1,7 +1,7 @@
From facfd479bb6efad76eec1e74048cb7a31da7287d Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Mon, 6 Apr 2009 22:26:04 +0200
-Subject: [PATCH] DSS2: FB: remove unused var warning
+Subject: [PATCH 22/69] DSS2: FB: remove unused var warning
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
@@ -23,5 +23,5 @@ index afe40a9..12ce0c3 100644
omap_vrfb_adjust_size(&w, &h, bytespp);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch b/recipes/linux/linux-omap-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch
index 6492905530..45045c4b4b 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch
@@ -1,7 +1,7 @@
From c02b843c2732bc7b15a3e35b5dd715d68225bbd1 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Wed, 8 Apr 2009 12:51:46 +0200
-Subject: [PATCH] DSS2: pass the default FB color format through board info
+Subject: [PATCH 23/69] DSS2: pass the default FB color format through board info
Add a field to the FB memory region platform data, so that board
init code can pass a default color format to the driver. Set this
@@ -210,5 +210,5 @@ index 96190b2..7a34f22 100644
unsigned map:1; /* kernel mapped by the driver */
};
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch b/recipes/linux/linux-omap-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch
index 559e49f40a..1a68d9425a 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch
@@ -1,7 +1,7 @@
From 2710416c43572652cb5355a5eaf68038c95659e8 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 9 Apr 2009 12:10:46 +0300
-Subject: [PATCH] DSS2: Beagle: Use gpio_set_value
+Subject: [PATCH 24/69] DSS2: Beagle: Use gpio_set_value
---
arch/arm/mach-omap2/board-omap3beagle.c | 10 +++++++---
@@ -44,5 +44,5 @@ index b67e7a5..8c1961d 100644
static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch b/recipes/linux/linux-omap-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch
index e81b1331bb..7f889d95d8 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch
@@ -1,7 +1,7 @@
From 990f3160d33361c135ee72e91f202e05a8c378fc Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Mon, 13 Apr 2009 18:50:24 +0530
-Subject: [PATCH] DSS2: VRFB: Macro for calculating base address of the VRFB context was faulty
+Subject: [PATCH 25/69] DSS2: VRFB: Macro for calculating base address of the VRFB context was faulty
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -24,5 +24,5 @@ index 7e0f8fc..d68065f 100644
#define OMAP_VRFB_SIZE (2048 * 2048 * 4)
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch b/recipes/linux/linux-omap-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch
index 6ee3908d10..f5c249e045 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch
@@ -1,7 +1,7 @@
From a1e8018c0806a1a0579eda4b93b7d6764a2ff643 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 15 Apr 2009 14:06:54 +0300
-Subject: [PATCH] DSS2: DSI: sidlemode to noidle while sending frame
+Subject: [PATCH 26/69] DSS2: DSI: sidlemode to noidle while sending frame
DISPC interrupts are not wake-up capable. Smart-idle in DISPC_SIDLEMODE
causes DSS interface to go to idle at the end of the frame, and the
@@ -74,5 +74,5 @@ index 0be42b6..d0917a8 100644
void dispc_lcd_enable_signal(bool enable);
void dispc_pck_free_enable(bool enable);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch b/recipes/linux/linux-omap-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch
index b56e32a11c..5265ae6b0a 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch
@@ -1,7 +1,7 @@
From 77e848eeba461e9b55b09d39fd0d640caea13e19 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 9 Apr 2009 12:09:44 +0530
-Subject: [PATCH] DSS2: VRFB rotation and mirroring implemented.
+Subject: [PATCH 27/69] DSS2: VRFB rotation and mirroring implemented.
DSS2 modified to accept the rotation_type input
to get the dma or VRFB rotation.
@@ -320,5 +320,5 @@ index b0fee80..8ca0bbb 100644
ovl->info.mirror);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch b/recipes/linux/linux-omap-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch
index 6400da3c24..178349ed2a 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch
@@ -1,7 +1,7 @@
From c09f1a0642fd58a1b081594ea36dfd1bf71aec52 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 9 Apr 2009 12:13:07 +0530
-Subject: [PATCH] DSS2: OMAPFB: Added support for the YUV VRFB rotation and mirroring.
+Subject: [PATCH 28/69] DSS2: OMAPFB: Added support for the YUV VRFB rotation and mirroring.
DSS2 now requires roatation_type to be specified by driver.
Added support for that.
@@ -232,5 +232,5 @@ index 2607def..43f6922 100644
bool mirror;
};
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch b/recipes/linux/linux-omap-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch
index 072978670b..e9f25dfef1 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch
@@ -1,7 +1,7 @@
From a8a37babe4856170f4cba86c425a8f21975d9e9e Mon Sep 17 00:00:00 2001
From: Tim Yamin <plasm@roo.me.uk>
Date: Mon, 13 Apr 2009 13:57:42 -0700
-Subject: [PATCH] DSS2: OMAPFB: Set line_length correctly for YUV with VRFB.
+Subject: [PATCH 29/69] DSS2: OMAPFB: Set line_length correctly for YUV with VRFB.
Signed-off-by: Tim Yamin <plasm@roo.me.uk>
---
@@ -57,5 +57,5 @@ index 57f5900..cd63740 100644
ovl->get_overlay_info(ovl, &info);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch b/recipes/linux/linux-omap-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch
index 7e2bb48938..63b3594ef5 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch
@@ -1,7 +1,7 @@
From bda19b9359d9dc60f8b0beb5685e173e236ee30f Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Wed, 15 Apr 2009 17:05:18 +0530
-Subject: [PATCH] DSS2: dispc_get_trans_key was returning wrong key type
+Subject: [PATCH 30/69] DSS2: dispc_get_trans_key was returning wrong key type
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -25,5 +25,5 @@ index 23a8155..076d3d4 100644
BUG();
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch b/recipes/linux/linux-omap-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch
index ae777ed04e..684857c15f 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch
@@ -1,7 +1,7 @@
From 30c40f5e6b1794430f678bf23d3319354321cab7 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Tue, 14 Apr 2009 14:50:11 +0200
-Subject: [PATCH] DSS2: do bootmem reserve for exclusive access
+Subject: [PATCH 31/69] DSS2: do bootmem reserve for exclusive access
BOOTMEM_DEFAULT would allow multiple reservations for the same location,
we need to reserve the region for our exclusive use. Also check if the
@@ -29,5 +29,5 @@ index f24a110..520f260 100644
if (size > sdram_size) {
printk(KERN_ERR "Illegal SDRAM size for VRAM\n");
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch b/recipes/linux/linux-omap-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch
index 4959a760b1..df3a7a9dd9 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch
@@ -1,7 +1,7 @@
From ed7a9223f6785be03951c55f3b0695b0d5635c80 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Thu, 9 Apr 2009 15:04:44 +0200
-Subject: [PATCH] DSS2: Fix DISPC_VID_FIR value for omap34xx
+Subject: [PATCH 32/69] DSS2: Fix DISPC_VID_FIR value for omap34xx
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -31,5 +31,5 @@ index 076d3d4..b8a3329 100644
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch b/recipes/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch
index f643ca64f3..6457a5b94a 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch
@@ -1,7 +1,7 @@
From 5390230ed12585a79683733209db34e9130b8e3b Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Thu, 9 Apr 2009 15:04:43 +0200
-Subject: [PATCH] DSS2: Prefer 3-tap filter
+Subject: [PATCH 33/69] DSS2: Prefer 3-tap filter
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -78,5 +78,5 @@ index b8a3329..b631dd8 100644
DSSDBG("required fclk rate = %lu Hz\n", fclk);
DSSDBG("current fclk rate = %lu Hz\n", dispc_fclk_rate());
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch b/recipes/linux/linux-omap-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
index fdfc25fb47..dd01886406 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
@@ -1,7 +1,7 @@
From 946eb774e95cdc2f2fa5cdc24aa69229f82814b8 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 16 Apr 2009 17:56:00 +0300
-Subject: [PATCH] DSS2: VRAM: improve omap_vram_add_region()
+Subject: [PATCH 34/69] DSS2: VRAM: improve omap_vram_add_region()
Combine postponed and non-posponed versions of omap_vram_add_region.
Make the func non-static, so it can be called from board files.
@@ -131,5 +131,5 @@ index 520f260..8e9fe77 100644
if (reserved)
pr_info("Reserving %lu bytes SRAM for VRAM\n", reserved);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch b/recipes/linux/linux-omap-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
index b7b395458f..6b29d50dc0 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
@@ -1,7 +1,7 @@
From f825cafd5ee5c600218740507f85594c825b0c00 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 16 Apr 2009 18:47:49 +0530
-Subject: [PATCH] DSS2: Added the function pointer for getting default color.
+Subject: [PATCH 35/69] DSS2: Added the function pointer for getting default color.
V4L2 Framework has a CID for getting/setting default color.
So added the function pointer for doing same.
@@ -62,5 +62,5 @@ index 8ca0bbb..12cf7b0 100644
dss_overlay_setup_dispc_manager(mgr);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch b/recipes/linux/linux-omap-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
index c6e9f16b3a..ace5079234 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
@@ -1,7 +1,7 @@
From 6c56dc10226c84f41917ac2117b0e654fa080d40 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 16 Apr 2009 19:00:11 +0530
-Subject: [PATCH] DSS2: Added support for setting and querying alpha blending.
+Subject: [PATCH 36/69] DSS2: Added support for setting and querying alpha blending.
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -114,5 +114,5 @@ index 12cf7b0..90acd28 100644
mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC,
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch b/recipes/linux/linux-omap-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
index fc62b09512..e7f43ad83d 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
@@ -1,7 +1,7 @@
From 2c9edd6af31a812a9487dd8bc12322e105a29f44 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Fri, 17 Apr 2009 09:42:36 +0530
-Subject: [PATCH] DSS2: Added support for querying color keying.
+Subject: [PATCH 37/69] DSS2: Added support for querying color keying.
V4L2 Framework has a ioctl for getting/setting color keying.
So added the function manager pointers for doing same.
@@ -146,5 +146,5 @@ index 90acd28..e0501c4 100644
&omap_dss_mgr_enable_alpha_blending;
mgr->get_alpha_blending_status =
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch b/recipes/linux/linux-omap-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
index 65cb113574..096c976a70 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
@@ -1,7 +1,7 @@
From 9e8877f0e5b17d3ddd101d6a63aa86fdb14d35d5 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Fri, 17 Apr 2009 09:51:25 +0530
-Subject: [PATCH] DSS2:OMAPFB: Some color keying pointerd renamed in DSS2. Replicated in FB
+Subject: [PATCH 38/69] DSS2:OMAPFB: Some color keying pointerd renamed in DSS2. Replicated in FB
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -52,5 +52,5 @@ index 7f18d2a..79d8916 100644
r = -ENODEV;
goto err;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch b/recipes/linux/linux-omap-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
index af8c2cd09b..d731b78008 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
@@ -1,7 +1,7 @@
From 6f1f0c7b19ecb468824b79f9d181ef0da41b7d7d Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Fri, 17 Apr 2009 13:58:21 +0530
-Subject: [PATCH] DSS2: Add sysfs entry to for the alpha blending support.
+Subject: [PATCH 39/69] DSS2: Add sysfs entry to for the alpha blending support.
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -55,5 +55,5 @@ index e0501c4..7965a84 100644
};
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch b/recipes/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
index 66be75f3f7..471a2a7f6c 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
@@ -1,7 +1,7 @@
From a5129f272a48aa22629137c9c31e60eddb8c3f5d Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Fri, 17 Apr 2009 14:24:46 +0530
-Subject: [PATCH] DSS2: Provided proper exclusion for destination color keying and alpha blending.
+Subject: [PATCH 40/69] DSS2: Provided proper exclusion for destination color keying and alpha blending.
OMAP does not support destination color key and alpha blending
simultaneously. So this patch does not allow the user
@@ -93,5 +93,5 @@ index 7965a84..108489c 100644
return size;
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch b/recipes/linux/linux-omap-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch
index 6785ade279..2c90c0cc06 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch
@@ -1,7 +1,7 @@
From 9bcac9b9e678f476c83b5679b1215b6bc946130a Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 20 Apr 2009 16:26:18 +0200
-Subject: [PATCH] DSS2: Disable vertical offset with fieldmode
+Subject: [PATCH 41/69] DSS2: Disable vertical offset with fieldmode
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -67,5 +67,5 @@ index 7e551c2..f15614b 100644
_dispc_set_vid_color_conv(plane, cconv);
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch b/recipes/linux/linux-omap-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch
index 5264911b41..7e2e44d809 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch
@@ -1,7 +1,7 @@
From 9c6de0fed6e8a598d026d348533fdf731b737d55 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 20 Apr 2009 16:26:19 +0200
-Subject: [PATCH] DSS2: Don't enable fieldmode automatically
+Subject: [PATCH 42/69] DSS2: Don't enable fieldmode automatically
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -30,5 +30,5 @@ index f15614b..1c036c1 100644
if (ilace) {
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch b/recipes/linux/linux-omap-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch
index 76e37817c4..2e09335611 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch
@@ -1,7 +1,7 @@
From 35e88797e93b107ba602dee1e2ac8ea761dccd4b Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 20 Apr 2009 16:26:20 +0200
-Subject: [PATCH] DSS2: Swap field 0 and field 1 registers
+Subject: [PATCH 43/69] DSS2: Swap field 0 and field 1 registers
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -166,5 +166,5 @@ index 1c036c1..9bab6cf 100644
(fieldmode ? 1 : 0),
ps);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch b/recipes/linux/linux-omap-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch
index 32def9e8d5..19d24c3a07 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch
@@ -1,7 +1,7 @@
From a9b3500bd14609750a2337e866e1df62627c1bac Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Mon, 20 Apr 2009 14:55:33 +0200
-Subject: [PATCH] DSS2: add sysfs entry for seting the rotate type
+Subject: [PATCH 44/69] DSS2: add sysfs entry for seting the rotate type
This can help in utilizing VRAM memory better. Since with VRFB rotation
we waste a lot of physical memory due to the VRFB HW design, provide the
@@ -72,5 +72,5 @@ index 2c88718..4e3da42 100644
__ATTR(size, S_IRUGO | S_IWUSR, show_size, store_size),
__ATTR(overlays, S_IRUGO | S_IWUSR, show_overlays, store_overlays),
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch b/recipes/linux/linux-omap-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch
index 9382469850..3206306cc7 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch
@@ -1,7 +1,7 @@
From b0e081456a9b094109c04467d041ff693843ca47 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Tue, 21 Apr 2009 09:25:16 +0300
-Subject: [PATCH] DSS2: Fixed line endings from , to ;
+Subject: [PATCH 45/69] DSS2: Fixed line endings from , to ;
---
drivers/video/omap2/dss/manager.c | 18 +++++++++---------
@@ -44,5 +44,5 @@ index 108489c..bf059e0 100644
dss_overlay_setup_dispc_manager(mgr);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch b/recipes/linux/linux-omap-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch
index 4ae5fbdd9a..301db79267 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch
@@ -1,7 +1,7 @@
From 0f88992b2681aed4f31dc7dd3926b357bbc95154 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Tue, 21 Apr 2009 10:11:55 +0300
-Subject: [PATCH] DSS2: DSI: decrease sync timeout from 60s to 2s
+Subject: [PATCH 46/69] DSS2: DSI: decrease sync timeout from 60s to 2s
The framedone-problem should be ok now, so we shouldn't get long waits.
---
@@ -22,5 +22,5 @@ index 50af925..d59ad38 100644
DSSDBGF("");
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch b/recipes/linux/linux-omap-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch
index 0b0f104b30..fbc30b8858 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch
@@ -1,7 +1,7 @@
From 7ddd5eaa7bc345c3719d613a46a95b7e8052ad2c Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Tue, 21 Apr 2009 15:18:36 +0200
-Subject: [PATCH] DSS2: fix return value for rotate_type sysfs function
+Subject: [PATCH 47/69] DSS2: fix return value for rotate_type sysfs function
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
@@ -40,5 +40,5 @@ index 4e3da42..13028ae 100644
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch b/recipes/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch
index cc6663fa21..1097fedabf 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch
@@ -1,7 +1,7 @@
From e34564db95627ad20e918b240c45e2bd5555f7e8 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 22 Apr 2009 10:06:08 +0300
-Subject: [PATCH] OMAP2/3: DMA: implement trans copy and const fill
+Subject: [PATCH 48/69] OMAP2/3: DMA: implement trans copy and const fill
Implement transparent copy and constant fill features for OMAP2/3.
@@ -119,5 +119,5 @@ index 224b077..4e34f47 100644
/*----------------------------------------------------------------------------*/
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch b/recipes/linux/linux-omap-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch
index e9fc76ce15..d9901f95d9 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch
@@ -1,7 +1,7 @@
From 02034cc79f69512a6037f03ad1243c28f59fdd8a Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 22 Apr 2009 10:25:20 +0300
-Subject: [PATCH] DSS2: VRAM: clear allocated area with DMA
+Subject: [PATCH 49/69] DSS2: VRAM: clear allocated area with DMA
Use DMA constant fill feature to clear VRAM area when
someone allocates it.
@@ -97,5 +97,5 @@ index 8e9fe77..90276ac 100644
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch b/recipes/linux/linux-omap-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch
index 8c5edd0c3d..4a0a078bc7 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch
@@ -1,7 +1,7 @@
From 07482193cccdfe9ede1f47d72790dfbe54343505 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 22 Apr 2009 10:26:06 +0300
-Subject: [PATCH] DSS2: OMAPFB: remove fb clearing code
+Subject: [PATCH 50/69] DSS2: OMAPFB: remove fb clearing code
VRAM manager does the clearing now when the area is allocated.
---
@@ -49,5 +49,5 @@ index cd63740..76e7c6c 100644
rg->paddr = paddr;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch b/recipes/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
index 93ff3205d3..739d3cd1a6 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
@@ -1,7 +1,7 @@
From b47aef28536f3c276d232c41cd3084c69389dca4 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 22 Apr 2009 14:11:52 +0300
-Subject: [PATCH] DSS2: VRAM: use debugfs, not procfs
+Subject: [PATCH 51/69] DSS2: VRAM: use debugfs, not procfs
---
arch/arm/plat-omap/vram.c | 103 +++++++++++++++------------------------------
@@ -166,5 +166,5 @@ index 90276ac..e847579 100644
return 0;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch b/recipes/linux/linux-omap-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch
index b8f89b6239..a28a96b23b 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch
@@ -1,7 +1,7 @@
From 635fa66abe6e502c9b78b1dc66757bf67fd163e1 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Wed, 22 Apr 2009 14:40:48 +0200
-Subject: [PATCH] DSS2: VRAM: fix section mismatch warning
+Subject: [PATCH 52/69] DSS2: VRAM: fix section mismatch warning
postponed_regions are accessed from the non __init
omap_vram_add_region().
@@ -30,5 +30,5 @@ index e847579..b126a64 100644
struct vram_alloc {
struct list_head list;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch b/recipes/linux/linux-omap-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch
index f591fb700a..38d162d024 100644
--- a/recipes/linux/linux-omap-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch
@@ -1,7 +1,7 @@
From c7ce3c5e9f7e28900b8ea9c3e1afe41dcdc0863d Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 23 Apr 2009 10:46:53 +0300
-Subject: [PATCH] DSS2: disable LCD & DIGIT before resetting DSS
+Subject: [PATCH 53/69] DSS2: disable LCD & DIGIT before resetting DSS
This seems to fix the synclost problem that we get, if the bootloader
starts the DSS and the kernel resets it.
@@ -37,5 +37,5 @@ index adc1f34..aab9758 100644
/* autoidle */
REG_FLD_MOD(DSS_SYSCONFIG, 1, 0, 0);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch b/recipes/linux/linux-omap-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch
new file mode 100644
index 0000000000..5f4f155452
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch
@@ -0,0 +1,85 @@
+From 3b27a3c4f6b84e46c84509f610dfe1456c0d72d3 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Mon, 27 Apr 2009 11:06:16 +0300
+Subject: [PATCH 54/69] DSS2: DSI: more error handling
+
+---
+ drivers/video/omap2/dss/dsi.c | 27 +++++++++++++++++++++++++++
+ 1 files changed, 27 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index d59ad38..d8df353 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -289,6 +289,8 @@ static struct
+
+ bool autoupdate_setup;
+
++ u32 errors;
++ spinlock_t errors_lock;
+ #ifdef DEBUG
+ ktime_t perf_setup_time;
+ ktime_t perf_start_time;
+@@ -541,6 +543,9 @@ void dsi_irq_handler(void)
+ if (irqstatus & DSI_IRQ_ERROR_MASK) {
+ DSSERR("DSI error, irqstatus %x\n", irqstatus);
+ print_irq_status(irqstatus);
++ spin_lock(&dsi.errors_lock);
++ dsi.errors |= irqstatus & DSI_IRQ_ERROR_MASK;
++ spin_unlock(&dsi.errors_lock);
+ } else if (debug_irq) {
+ print_irq_status(irqstatus);
+ }
+@@ -616,6 +621,17 @@ static void _dsi_initialize_irq(void)
+ -1 & (~DSI_CIO_IRQ_ERRCONTROL2));
+ }
+
++static u32 dsi_get_errors(void)
++{
++ unsigned long flags;
++ u32 e;
++ spin_lock_irqsave(&dsi.errors_lock, flags);
++ e = dsi.errors;
++ dsi.errors = 0;
++ spin_unlock_irqrestore(&dsi.errors_lock, flags);
++ return e;
++}
++
+ static void dsi_vc_enable_bta_irq(int channel)
+ {
+ u32 l;
+@@ -1807,6 +1823,7 @@ static int dsi_vc_send_bta(int channel)
+ static int dsi_vc_send_bta_sync(int channel)
+ {
+ int r = 0;
++ u32 err;
+
+ init_completion(&dsi.bta_completion);
+
+@@ -1822,6 +1839,13 @@ static int dsi_vc_send_bta_sync(int channel)
+ r = -EIO;
+ goto err;
+ }
++
++ err = dsi_get_errors();
++ if (err) {
++ DSSERR("Error while sending BTA: %x\n", err);
++ r = -EIO;
++ goto err;
++ }
+ err:
+ dsi_vc_disable_bta_irq(channel);
+
+@@ -3720,6 +3744,9 @@ int dsi_init(void)
+ {
+ u32 rev;
+
++ spin_lock_init(&dsi.errors_lock);
++ dsi.errors = 0;
++
+ spin_lock_init(&dsi.cmd_lock);
+ dsi.cmd_fifo = kfifo_alloc(
+ DSI_CMD_FIFO_LEN * sizeof(struct dsi_cmd_item),
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch b/recipes/linux/linux-omap-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch
new file mode 100644
index 0000000000..c545b648cc
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch
@@ -0,0 +1,230 @@
+From c8588370442424ac31e2392b07891615629eb999 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 24 Apr 2009 15:29:06 +0530
+Subject: [PATCH 55/69] DSS2: Added global alpha support.
+
+global_alpha sysfs entry for video1 plane will always show 255 as
+it does not support global_alpha.
+Initliazied the global alpha field for all the overlays
+to 255 (fully opaque).
+Documentation also updated.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ Documentation/arm/OMAP/DSS | 1 +
+ arch/arm/plat-omap/include/mach/display.h | 1 +
+ drivers/video/omap2/dss/dispc.c | 25 ++++++++++++++++---
+ drivers/video/omap2/dss/dss.h | 3 +-
+ drivers/video/omap2/dss/manager.c | 3 +-
+ drivers/video/omap2/dss/overlay.c | 37 +++++++++++++++++++++++++++++
+ 6 files changed, 64 insertions(+), 6 deletions(-)
+
+diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
+index 9e902a2..249e1a3 100644
+--- a/Documentation/arm/OMAP/DSS
++++ b/Documentation/arm/OMAP/DSS
+@@ -133,6 +133,7 @@ name
+ output_size width,height
+ position x,y
+ screen_width width
++global_alpha global alpha 0-255 0=transparent 255=opaque
+
+ /sys/devices/platform/omapdss/manager? directory:
+ display Destination display
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index d0b4c83..45b16ca 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -363,6 +363,7 @@ struct omap_overlay_info {
+ u16 pos_y;
+ u16 out_width; /* if 0, out_width == width */
+ u16 out_height; /* if 0, out_height == height */
++ u8 global_alpha;
+ };
+
+ enum omap_overlay_caps {
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 9bab6cf..b6a39f5 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -778,6 +778,17 @@ static void _dispc_set_vid_size(enum omap_plane plane, int width, int height)
+ dispc_write_reg(vsi_reg[plane-1], val);
+ }
+
++static void _dispc_setup_global_alpha(enum omap_plane plane, u8 global_alpha)
++{
++
++ BUG_ON(plane == OMAP_DSS_VIDEO1);
++
++ if (plane == OMAP_DSS_GFX)
++ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, global_alpha, 7, 0);
++ else if (plane == OMAP_DSS_VIDEO2)
++ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, global_alpha, 23, 16);
++}
++
+ static void _dispc_set_pix_inc(enum omap_plane plane, s32 inc)
+ {
+ const struct dispc_reg ri_reg[] = { DISPC_GFX_PIXEL_INC,
+@@ -1444,7 +1455,8 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ enum omap_color_mode color_mode,
+ bool ilace,
+ enum omap_dss_rotation_type rotation_type,
+- u8 rotation, int mirror)
++ u8 rotation, int mirror,
++ u8 global_alpha)
+ {
+ const int maxdownscale = cpu_is_omap34xx() ? 4 : 2;
+ bool five_taps = 0;
+@@ -1592,6 +1604,9 @@ static int _dispc_setup_plane(enum omap_plane plane,
+
+ _dispc_set_rotation_attrs(plane, rotation, mirror, color_mode);
+
++ if (plane != OMAP_DSS_VIDEO1)
++ _dispc_setup_global_alpha(plane, global_alpha);
++
+ return 0;
+ }
+
+@@ -3011,7 +3026,7 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ enum omap_color_mode color_mode,
+ bool ilace,
+ enum omap_dss_rotation_type rotation_type,
+- u8 rotation, bool mirror)
++ u8 rotation, bool mirror, u8 global_alpha)
+ {
+ int r = 0;
+
+@@ -3032,7 +3047,8 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ out_width, out_height,
+ color_mode, ilace,
+ rotation_type,
+- rotation, mirror);
++ rotation, mirror,
++ global_alpha);
+
+ enable_clocks(0);
+
+@@ -3247,7 +3263,8 @@ void dispc_setup_partial_planes(struct omap_display *display,
+ pi->color_mode, 0,
+ pi->rotation_type,
+ pi->rotation,
+- pi->mirror);
++ pi->mirror,
++ pi->global_alpha);
+
+ dispc_enable_plane(ovl->id, 1);
+ }
+diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
+index 1d01ff6..20cef0a 100644
+--- a/drivers/video/omap2/dss/dss.h
++++ b/drivers/video/omap2/dss/dss.h
+@@ -273,7 +273,8 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ enum omap_color_mode color_mode,
+ bool ilace,
+ enum omap_dss_rotation_type rotation_type,
+- u8 rotation, bool mirror);
++ u8 rotation, bool mirror,
++ u8 global_alpha);
+
+ void dispc_go(enum omap_channel channel);
+ void dispc_enable_lcd_out(bool enable);
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index bf059e0..1e6cd8d 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -464,7 +464,8 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
+ ilace,
+ ovl->info.rotation_type,
+ ovl->info.rotation,
+- ovl->info.mirror);
++ ovl->info.mirror,
++ ovl->info.global_alpha);
+
+ if (r) {
+ DSSERR("dispc_setup_plane failed for ovl %d\n",
+diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
+index c047206..035a57a 100644
+--- a/drivers/video/omap2/dss/overlay.c
++++ b/drivers/video/omap2/dss/overlay.c
+@@ -194,6 +194,37 @@ static ssize_t overlay_enabled_store(struct omap_overlay *ovl, const char *buf,
+ return size;
+ }
+
++static ssize_t overlay_global_alpha_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d\n",
++ ovl->info.global_alpha);
++}
++
++static ssize_t overlay_global_alpha_store(struct omap_overlay *ovl,
++ const char *buf, size_t size)
++{
++ int r;
++ struct omap_overlay_info info;
++
++ ovl->get_overlay_info(ovl, &info);
++
++ /* Video1 plane does not support global alpha
++ * to always make it 255 completely opaque
++ */
++ if (ovl->id == OMAP_DSS_VIDEO1)
++ info.global_alpha = 255;
++ else
++ info.global_alpha = simple_strtoul(buf, NULL, 10);
++
++ if ((r = ovl->set_overlay_info(ovl, &info)))
++ return r;
++
++ if (ovl->manager && (r = ovl->manager->apply(ovl->manager)))
++ return r;
++
++ return size;
++}
++
+ struct overlay_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct omap_overlay *, char *);
+@@ -215,6 +246,8 @@ static OVERLAY_ATTR(output_size, S_IRUGO|S_IWUSR,
+ overlay_output_size_show, overlay_output_size_store);
+ static OVERLAY_ATTR(enabled, S_IRUGO|S_IWUSR,
+ overlay_enabled_show, overlay_enabled_store);
++static OVERLAY_ATTR(global_alpha, S_IRUGO|S_IWUSR,
++ overlay_global_alpha_show, overlay_global_alpha_store);
+
+ static struct attribute *overlay_sysfs_attrs[] = {
+ &overlay_attr_name.attr,
+@@ -224,6 +257,7 @@ static struct attribute *overlay_sysfs_attrs[] = {
+ &overlay_attr_position.attr,
+ &overlay_attr_output_size.attr,
+ &overlay_attr_enabled.attr,
++ &overlay_attr_global_alpha.attr,
+ NULL
+ };
+
+@@ -444,6 +478,7 @@ void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
+ ovl->id = OMAP_DSS_GFX;
+ ovl->supported_modes = OMAP_DSS_COLOR_GFX_OMAP3;
+ ovl->caps = OMAP_DSS_OVL_CAP_DISPC;
++ ovl->info.global_alpha = 255;
+ break;
+ case 1:
+ ovl->name = "vid1";
+@@ -451,6 +486,7 @@ void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
+ ovl->supported_modes = OMAP_DSS_COLOR_VID_OMAP3;
+ ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
+ OMAP_DSS_OVL_CAP_DISPC;
++ ovl->info.global_alpha = 255;
+ break;
+ case 2:
+ ovl->name = "vid2";
+@@ -458,6 +494,7 @@ void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
+ ovl->supported_modes = OMAP_DSS_COLOR_VID_OMAP3;
+ ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
+ OMAP_DSS_OVL_CAP_DISPC;
++ ovl->info.global_alpha = 255;
+ break;
+ }
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch b/recipes/linux/linux-omap-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch
new file mode 100644
index 0000000000..c46fda0d52
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch
@@ -0,0 +1,35 @@
+From 32cf39c92dfd28e18936c31eea90b4d43a3c0968 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 24 Apr 2009 14:33:48 +0530
+Subject: [PATCH 56/69] DSS2: Rotation attrs for YUV need not to be reversed for 90 and 270
+
+DSS2 supports horizontal mirroing. so only 180 and 0 degree attributes needs
+to be reversed for mirroring.
+Slight corrupt image is seen with 90 ad 270 degree rotation with mirroring
+when the image height and widht is not 32-pixels aligned. To be specific
+resolution is 168X192.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/dss/dispc.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b6a39f5..f79decb 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1110,9 +1110,9 @@ static void _dispc_set_rotation_attrs(enum omap_plane plane, u8 rotation,
+ if (mirroring) {
+ switch (rotation) {
+ case 0: vidrot = 2; break;
+- case 1: vidrot = 3; break;
++ case 1: vidrot = 1; break;
+ case 2: vidrot = 0; break;
+- case 3: vidrot = 1; break;
++ case 3: vidrot = 3; break;
+ }
+ } else {
+ switch (rotation) {
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch b/recipes/linux/linux-omap-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch
new file mode 100644
index 0000000000..929f41b590
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch
@@ -0,0 +1,32 @@
+From bc67f1fce4472087014fdacd3f44ea732200533e Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Mon, 27 Apr 2009 13:15:07 +0530
+Subject: [PATCH 57/69] DSS2: Documentation update for new sysfs entries in omapdss/manager
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ Documentation/arm/OMAP/DSS | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
+index 249e1a3..751000b 100644
+--- a/Documentation/arm/OMAP/DSS
++++ b/Documentation/arm/OMAP/DSS
+@@ -136,8 +136,13 @@ screen_width width
+ global_alpha global alpha 0-255 0=transparent 255=opaque
+
+ /sys/devices/platform/omapdss/manager? directory:
+-display Destination display
++display Destination display
+ name
++alpha_blending_enabled 0=off 1=on
++color_key_enabled 0=off 1=on
++color_key_type gfx-destination video-source
++color_key_value 0 to 2^24
++default_color default background color RGB24 0 to 2^24
+
+ /sys/devices/platform/omapdss/display? directory:
+ ctrl_name Controller name
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch b/recipes/linux/linux-omap-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch
new file mode 100644
index 0000000000..7a6f23b349
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch
@@ -0,0 +1,56 @@
+From 9500c899f05048d17ced4340ecfd377656a23934 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Fri, 17 Apr 2009 18:34:33 +0200
+Subject: [PATCH 58/69] DSS2: Don't touch plane coordinates when changing fb->ovl mapping
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+When attaching overlays to a framebuffer via the 'overlays' sysfs file
+do not touch the planes' coordinates. Without this change attaching
+VID2 to a framebuffer which already has VID1 attached would cause VID1
+to be reset to position 0,0 and scaled to 1:1 size. Also call
+omapfb_apply_changes() only once after all the overlays have been
+attached to avoid fiddling with all the overlays several times.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/omapfb/omapfb-sysfs.c | 13 ++++++-------
+ 1 files changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+index 13028ae..702199d 100644
+--- a/drivers/video/omap2/omapfb/omapfb-sysfs.c
++++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+@@ -183,6 +183,7 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
+ struct omap_overlay *ovl;
+ int num_ovls, r, i;
+ int len;
++ bool added = false;
+
+ num_ovls = 0;
+
+@@ -284,15 +285,13 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
+
+ ofbi->overlays[ofbi->num_overlays++] = ovl;
+
+- r = omapfb_apply_changes(fbi, 1);
++ added = true;
++ }
++
++ if (added) {
++ r = omapfb_apply_changes(fbi, 0);
+ if (r)
+ goto out;
+-
+- if (ovl->manager) {
+- r = ovl->manager->apply(ovl->manager);
+- if (r)
+- goto out;
+- }
+ }
+
+ r = count;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch b/recipes/linux/linux-omap-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch
new file mode 100644
index 0000000000..9ca0f2eab1
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch
@@ -0,0 +1,97 @@
+From 750f7ddc0881834f3400c40e9a59d11f9427cf99 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 29 Apr 2009 17:26:30 +0300
+Subject: [PATCH 59/69] DSS2: DSI: configure ENTER/EXIT_HS_MODE_LATENCY
+
+---
+ drivers/video/omap2/dss/dsi.c | 49 ++++++++++++++++++++++++++++++++--------
+ 1 files changed, 39 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index d8df353..5225ed6 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -2309,15 +2309,26 @@ static int dsi_proto_config(struct omap_display *display)
+ return 0;
+ }
+
+-static void dsi_proto_timings(void)
+-{
+- int tlpx_half, tclk_zero, tclk_prepare, tclk_trail;
+- int tclk_pre, tclk_post;
+- int ddr_clk_pre, ddr_clk_post;
++static void dsi_proto_timings(struct omap_display *display)
++{
++ unsigned tlpx, tclk_zero, tclk_prepare, tclk_trail;
++ unsigned tclk_pre, tclk_post;
++ unsigned ths_prepare, ths_prepare_ths_zero, ths_zero;
++ unsigned ths_trail, ths_exit;
++ unsigned ddr_clk_pre, ddr_clk_post;
++ unsigned enter_hs_mode_lat, exit_hs_mode_lat;
++ unsigned ths_eot;
+ u32 r;
+
++ r = dsi_read_reg(DSI_DSIPHY_CFG0);
++ ths_prepare = FLD_GET(r, 31, 24);
++ ths_prepare_ths_zero = FLD_GET(r, 23, 16);
++ ths_zero = ths_prepare_ths_zero - ths_prepare;
++ ths_trail = FLD_GET(r, 15, 8);
++ ths_exit = FLD_GET(r, 7, 0);
++
+ r = dsi_read_reg(DSI_DSIPHY_CFG1);
+- tlpx_half = FLD_GET(r, 22, 16);
++ tlpx = FLD_GET(r, 22, 16) * 2;
+ tclk_trail = FLD_GET(r, 15, 8);
+ tclk_zero = FLD_GET(r, 7, 0);
+
+@@ -2329,17 +2340,35 @@ static void dsi_proto_timings(void)
+ /* min 60ns + 52*UI */
+ tclk_post = ns2ddr(60) + 26;
+
+- ddr_clk_pre = (tclk_pre + tlpx_half*2 + tclk_zero + tclk_prepare) / 4;
+- ddr_clk_post = (tclk_post + tclk_trail) / 4;
++ ddr_clk_pre = DIV_ROUND_UP(tclk_pre + tlpx + tclk_zero + tclk_prepare,
++ 4);
++ ddr_clk_post = DIV_ROUND_UP(tclk_post + tclk_trail, 4);
+
+ r = dsi_read_reg(DSI_CLK_TIMING);
+ r = FLD_MOD(r, ddr_clk_pre, 15, 8);
+ r = FLD_MOD(r, ddr_clk_post, 7, 0);
+ dsi_write_reg(DSI_CLK_TIMING, r);
+
+- DSSDBG("ddr_clk_pre %d, ddr_clk_post %d\n",
++ DSSDBG("ddr_clk_pre %u, ddr_clk_post %u\n",
+ ddr_clk_pre,
+ ddr_clk_post);
++
++ /* ths_eot is 2 for 2 datalanes and 4 for 1 datalane */
++ if (display->hw_config.u.dsi.data1_lane != 0 &&
++ display->hw_config.u.dsi.data2_lane != 0)
++ ths_eot = 2;
++ else
++ ths_eot = 4;
++
++ enter_hs_mode_lat = DIV_ROUND_UP(tlpx + ths_prepare + ths_zero, 4) + 4;
++ exit_hs_mode_lat = DIV_ROUND_UP(ths_trail + ths_exit, 4) + 1 + ths_eot;
++
++ r = FLD_VAL(enter_hs_mode_lat, 31, 16) |
++ FLD_VAL(exit_hs_mode_lat, 15, 0);
++ dsi_write_reg(DSI_VM_TIMING7, r);
++
++ DSSDBG("enter_hs_mode_lat %u, exit_hs_mode_lat %u\n",
++ enter_hs_mode_lat, exit_hs_mode_lat);
+ }
+
+
+@@ -3340,7 +3369,7 @@ static int dsi_display_init_dsi(struct omap_display *display)
+
+ _dsi_print_reset_status();
+
+- dsi_proto_timings();
++ dsi_proto_timings(display);
+ dsi_set_lp_clk_divisor();
+
+ if (1)
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch b/recipes/linux/linux-omap-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch
new file mode 100644
index 0000000000..0ff2c7b1a6
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch
@@ -0,0 +1,34 @@
+From 233a6e4f4ccaf5827f04ab38c590397755e61ecb Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Mon, 4 May 2009 16:18:30 +0200
+Subject: [PATCH 60/69] DSS2: Avoid div by zero when calculating required fclk
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+When calculating the required fclk rate for five tap filtering if the
+display width and output width are equal div by zero could occur. The
+TRM doesn't actually specify how this case should be handled but for
+now just skip the calculation which would trigger the div by zero.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index f79decb..5fc9457 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1399,7 +1399,7 @@ static unsigned long calc_fclk_five_taps(u16 width, u16 height,
+ do_div(tmp, 2 * out_height * ppl);
+ fclk = tmp;
+
+- if (height > 2 * out_height) {
++ if (height > 2 * out_height && ppl != out_width) {
+ tmp = pclk * (height - 2 * out_height) * out_width;
+ do_div(tmp, 2 * out_height * (ppl - out_width));
+ fclk = max(fclk, (u32) tmp);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch b/recipes/linux/linux-omap-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch
new file mode 100644
index 0000000000..a0b694736b
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch
@@ -0,0 +1,106 @@
+From e58576ceca922bfe4c793e6f77a873c4ea14f768 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 09:05:12 +0300
+Subject: [PATCH 61/69] DSS2: VRFB: save / restore context
+
+The VRFB is part of the SMS and supplied by the core power domain; do
+the context saving while VRFB is configured and restore it along with
+the rest of the domain context.
+
+This patch only implements the restore functionality, but not the
+actual call to the restore. That belongs to PM functionality.
+---
+ arch/arm/plat-omap/include/mach/vrfb.h | 1 +
+ arch/arm/plat-omap/vrfb.c | 50 ++++++++++++++++++++++++++-----
+ 2 files changed, 43 insertions(+), 8 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/vrfb.h b/arch/arm/plat-omap/include/mach/vrfb.h
+index 12c7fab..ee6c062 100644
+--- a/arch/arm/plat-omap/include/mach/vrfb.h
++++ b/arch/arm/plat-omap/include/mach/vrfb.h
+@@ -44,5 +44,6 @@ extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u16 width, u16 height,
+ enum omap_color_mode color_mode);
++extern void omap_vrfb_restore_context(void);
+
+ #endif /* __VRFB_H */
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 2ae0d68..649803e 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -39,6 +39,33 @@
+ /* bitmap of reserved contexts */
+ static unsigned ctx_map;
+
++/*
++ * Access to this happens from client drivers or the PM core after wake-up.
++ * For the first case we require locking at the driver level, for the second
++ * we don't need locking, since no drivers will run until after the wake-up
++ * has finished.
++ */
++struct {
++ u32 physical_ba;
++ u32 control;
++ u32 size;
++} vrfb_hw_context[VRFB_NUM_CTXS];
++
++void omap_vrfb_restore_context(void)
++{
++ int i;
++
++ for (i = 0; i < VRFB_NUM_CTXS; i++) {
++ /* Restore only the active contexts */
++ if (!(ctx_map & (1 << i)))
++ continue;
++ omap_writel(vrfb_hw_context[i].control, SMS_ROT_CONTROL(i));
++ omap_writel(vrfb_hw_context[i].size, SMS_ROT_SIZE(i));
++ omap_writel(vrfb_hw_context[i].physical_ba,
++ SMS_ROT_PHYSICAL_BA(i));
++ }
++}
++
+ void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ u8 bytespp)
+ {
+@@ -56,6 +83,8 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u16 vrfb_height;
+ u8 ctx = vrfb->context;
+ u8 bytespp;
++ u32 size;
++ u32 control;
+
+ DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d)\n", ctx, paddr,
+ width, height, bytespp);
+@@ -100,15 +129,20 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+
+ DBG("vrfb w %u, h %u\n", vrfb_width, vrfb_height);
+
++ size = vrfb_width << SMS_IMAGEWIDTH_OFFSET;
++ size |= vrfb_height << SMS_IMAGEHEIGHT_OFFSET;
++
++ control = pixel_size_exp << SMS_PS_OFFSET;
++ control |= VRFB_PAGE_WIDTH_EXP << SMS_PW_OFFSET;
++ control |= VRFB_PAGE_HEIGHT_EXP << SMS_PH_OFFSET;
++
++ vrfb_hw_context[ctx].physical_ba = paddr;
++ vrfb_hw_context[ctx].size = size;
++ vrfb_hw_context[ctx].control = control;
++
+ omap_writel(paddr, SMS_ROT_PHYSICAL_BA(ctx));
+- omap_writel((vrfb_width << SMS_IMAGEWIDTH_OFFSET) |
+- (vrfb_height << SMS_IMAGEHEIGHT_OFFSET),
+- SMS_ROT_SIZE(ctx));
+-
+- omap_writel(pixel_size_exp << SMS_PS_OFFSET |
+- VRFB_PAGE_WIDTH_EXP << SMS_PW_OFFSET |
+- VRFB_PAGE_HEIGHT_EXP << SMS_PH_OFFSET,
+- SMS_ROT_CONTROL(ctx));
++ omap_writel(size, SMS_ROT_SIZE(ctx));
++ omap_writel(control, SMS_ROT_CONTROL(ctx));
+
+ DBG("vrfb offset pixels %d, %d\n",
+ vrfb_width - width, vrfb_height - height);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch b/recipes/linux/linux-omap-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch
new file mode 100644
index 0000000000..8d5f57866d
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch
@@ -0,0 +1,65 @@
+From 0fb6754f996b5022e1d856fda3d3258382383596 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 6 May 2009 09:03:43 +0300
+Subject: [PATCH 62/69] DSS2: VRAM: Fix indentation
+
+---
+ arch/arm/plat-omap/vram.c | 26 +++++++++++++-------------
+ 1 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index b126a64..f3ce849 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -287,35 +287,35 @@ static void _omap_vram_dma_cb(int lch, u16 ch_status, void *data)
+ static int _omap_vram_clear(u32 paddr, unsigned pages)
+ {
+ struct completion compl;
+- unsigned elem_count;
+- unsigned frame_count;
++ unsigned elem_count;
++ unsigned frame_count;
+ int r;
+ int lch;
+
+ init_completion(&compl);
+
+- r = omap_request_dma(OMAP_DMA_NO_DEVICE, "VRAM DMA",
++ r = omap_request_dma(OMAP_DMA_NO_DEVICE, "VRAM DMA",
+ _omap_vram_dma_cb,
+- &compl, &lch);
+- if (r) {
++ &compl, &lch);
++ if (r) {
+ pr_err("VRAM: request_dma failed for memory clear\n");
+ return -EBUSY;
+ }
+
+- elem_count = pages * PAGE_SIZE / 4;
+- frame_count = 1;
++ elem_count = pages * PAGE_SIZE / 4;
++ frame_count = 1;
+
+- omap_set_dma_transfer_params(lch, OMAP_DMA_DATA_TYPE_S32,
+- elem_count, frame_count,
+- OMAP_DMA_SYNC_ELEMENT,
+- 0, 0);
++ omap_set_dma_transfer_params(lch, OMAP_DMA_DATA_TYPE_S32,
++ elem_count, frame_count,
++ OMAP_DMA_SYNC_ELEMENT,
++ 0, 0);
+
+- omap_set_dma_dest_params(lch, 0, OMAP_DMA_AMODE_POST_INC,
++ omap_set_dma_dest_params(lch, 0, OMAP_DMA_AMODE_POST_INC,
+ paddr, 0, 0);
+
+ omap_set_dma_color_mode(lch, OMAP_DMA_CONSTANT_FILL, 0x000000);
+
+- omap_start_dma(lch);
++ omap_start_dma(lch);
+
+ if (wait_for_completion_timeout(&compl, msecs_to_jiffies(1000)) == 0) {
+ omap_stop_dma(lch);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch b/recipes/linux/linux-omap-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch
new file mode 100644
index 0000000000..8633921979
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch
@@ -0,0 +1,82 @@
+From 5d3426ae63c27b9405be8179beabe1e095b44a35 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 19:00:19 +0200
+Subject: [PATCH 63/69] DSS2: fix the usage of get_last_off_on_transaction_id
+
+The function returns int not unsigned since it can fail. Handle the
+failing case as if the context had been lost. So now:
+
+1. No get_last_off_on_transaction_id func in platform data->
+ never restore the context
+2. Return val < 0 -> force the restore
+3. Return val >= 0 do the restore only if the counter has changed.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 2 +-
+ drivers/video/omap2/dss/core.c | 18 ++++++++++++------
+ 2 files changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index 45b16ca..31ebb96 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -234,7 +234,7 @@ struct device;
+
+ /* Board specific data */
+ struct omap_dss_board_info {
+- unsigned (*get_last_off_on_transaction_id)(struct device *dev);
++ int (*get_last_off_on_transaction_id)(struct device *dev);
+ int (*dsi_power_up)(void);
+ void (*dsi_power_down)(void);
+ int num_displays;
+diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
+index ae7cd06..6d11b04 100644
+--- a/drivers/video/omap2/dss/core.c
++++ b/drivers/video/omap2/dss/core.c
+@@ -38,7 +38,7 @@
+
+ static struct {
+ struct platform_device *pdev;
+- unsigned ctx_id;
++ int ctx_id;
+
+ struct clk *dss_ick;
+ struct clk *dss1_fck;
+@@ -63,22 +63,28 @@ module_param_named(debug, dss_debug, bool, 0644);
+ #endif
+
+ /* CONTEXT */
+-static unsigned dss_get_ctx_id(void)
++static int dss_get_ctx_id(void)
+ {
+ struct omap_dss_board_info *pdata = core.pdev->dev.platform_data;
++ int r;
+
+ if (!pdata->get_last_off_on_transaction_id)
+ return 0;
+-
+- return pdata->get_last_off_on_transaction_id(&core.pdev->dev);
++ r = pdata->get_last_off_on_transaction_id(&core.pdev->dev);
++ if (r < 0) {
++ dev_err(&core.pdev->dev,
++ "getting transaction ID failed, will force context restore\n");
++ r = -1;
++ }
++ return r;
+ }
+
+ int dss_need_ctx_restore(void)
+ {
+ int id = dss_get_ctx_id();
+
+- if (id != core.ctx_id) {
+- DSSDBG("ctx id %u -> id %u\n",
++ if (id < 0 || id != core.ctx_id) {
++ DSSDBG("ctx id %d -> id %d\n",
+ core.ctx_id, id);
+ core.ctx_id = id;
+ return 1;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch b/recipes/linux/linux-omap-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch
new file mode 100644
index 0000000000..2ba9b1b1a2
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch
@@ -0,0 +1,35 @@
+From 784271e9546844c5e69ec6d8f2fd3713847b6ab2 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 11:16:14 +0200
+Subject: [PATCH 64/69] VRFB: fix debug messages
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/vrfb.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 649803e..289fc8a 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -87,7 +87,7 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u32 control;
+
+ DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d)\n", ctx, paddr,
+- width, height, bytespp);
++ width, height, color_mode);
+
+ switch (color_mode) {
+ case OMAP_DSS_COLOR_RGB16:
+@@ -127,7 +127,7 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ vrfb_width = ALIGN(width * bytespp, VRFB_PAGE_WIDTH) / bytespp;
+ vrfb_height = ALIGN(height, VRFB_PAGE_HEIGHT);
+
+- DBG("vrfb w %u, h %u\n", vrfb_width, vrfb_height);
++ DBG("vrfb w %u, h %u bytespp %d\n", vrfb_width, vrfb_height, bytespp);
+
+ size = vrfb_width << SMS_IMAGEWIDTH_OFFSET;
+ size |= vrfb_height << SMS_IMAGEHEIGHT_OFFSET;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch b/recipes/linux/linux-omap-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch
new file mode 100644
index 0000000000..17f959cb27
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch
@@ -0,0 +1,216 @@
+From 1269429fe6ddd6e5f15e3b4edb4fc2bcd6fc0410 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 11:16:13 +0200
+Subject: [PATCH 65/69] VRFB: add suspend/resume functionality
+
+At the moment the VRFB context is restored at each core power domain
+OFF->ON transition. This is not optimal since the VRFB might be unused
+temporarily for example when the screen is blanked. Add a suspend /
+resume function to mark these unused periods during which we'll avoid
+thea the context restore.
+
+Use atomic bitops for ctx_map for consistency.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/include/mach/vrfb.h | 2 +
+ arch/arm/plat-omap/vrfb.c | 75 ++++++++++++++++++++++++-----
+ drivers/video/omap2/omapfb/omapfb-main.c | 28 +++++++++++
+ 3 files changed, 92 insertions(+), 13 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/vrfb.h b/arch/arm/plat-omap/include/mach/vrfb.h
+index ee6c062..9647d82 100644
+--- a/arch/arm/plat-omap/include/mach/vrfb.h
++++ b/arch/arm/plat-omap/include/mach/vrfb.h
+@@ -39,6 +39,8 @@ struct vrfb
+
+ extern int omap_vrfb_request_ctx(struct vrfb *vrfb);
+ extern void omap_vrfb_release_ctx(struct vrfb *vrfb);
++extern void omap_vrfb_suspend_ctx(struct vrfb *vrfb);
++extern void omap_vrfb_resume_ctx(struct vrfb *vrfb);
+ extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ u8 bytespp);
+ extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 289fc8a..29f04e2 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -1,7 +1,9 @@
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/ioport.h>
++
+ #include <asm/io.h>
++#include <asm/bitops.h>
+
+ #include <mach/io.h>
+ #include <mach/vrfb.h>
+@@ -37,7 +39,9 @@
+
+ #define VRFB_NUM_CTXS 12
+ /* bitmap of reserved contexts */
+-static unsigned ctx_map;
++static unsigned long ctx_map;
++/* bitmap of contexts for which we have to keep the HW context valid */
++static unsigned long ctx_map_active;
+
+ /*
+ * Access to this happens from client drivers or the PM core after wake-up.
+@@ -51,18 +55,23 @@ struct {
+ u32 size;
+ } vrfb_hw_context[VRFB_NUM_CTXS];
+
++static void inline restore_hw_context(int ctx)
++{
++ omap_writel(vrfb_hw_context[ctx].control, SMS_ROT_CONTROL(ctx));
++ omap_writel(vrfb_hw_context[ctx].size, SMS_ROT_SIZE(ctx));
++ omap_writel(vrfb_hw_context[ctx].physical_ba, SMS_ROT_PHYSICAL_BA(ctx));
++}
++
+ void omap_vrfb_restore_context(void)
+ {
+ int i;
++ unsigned long map = ctx_map_active;
+
+- for (i = 0; i < VRFB_NUM_CTXS; i++) {
+- /* Restore only the active contexts */
+- if (!(ctx_map & (1 << i)))
+- continue;
+- omap_writel(vrfb_hw_context[i].control, SMS_ROT_CONTROL(i));
+- omap_writel(vrfb_hw_context[i].size, SMS_ROT_SIZE(i));
+- omap_writel(vrfb_hw_context[i].physical_ba,
+- SMS_ROT_PHYSICAL_BA(i));
++ for (i = ffs(map); i; i = ffs(map)) {
++ /* i=1..32 */
++ i--;
++ map &= ~(1 << i);
++ restore_hw_context(i);
+ }
+ }
+
+@@ -156,13 +165,20 @@ EXPORT_SYMBOL(omap_vrfb_setup);
+ void omap_vrfb_release_ctx(struct vrfb *vrfb)
+ {
+ int rot;
++ int ctx = vrfb->context;
+
+- if (vrfb->context == 0xff)
++ if (ctx == 0xff)
+ return;
+
+- DBG("release ctx %d\n", vrfb->context);
++ DBG("release ctx %d\n", ctx);
+
+- ctx_map &= ~(1 << vrfb->context);
++ if (!(ctx_map & (1 << ctx))) {
++ BUG();
++ return;
++ }
++ WARN_ON(!(ctx_map_active & (1 << ctx)));
++ clear_bit(ctx, &ctx_map_active);
++ clear_bit(ctx, &ctx_map);
+
+ for (rot = 0; rot < 4; ++rot) {
+ if(vrfb->paddr[rot]) {
+@@ -194,7 +210,9 @@ int omap_vrfb_request_ctx(struct vrfb *vrfb)
+
+ DBG("found free ctx %d\n", ctx);
+
+- ctx_map |= 1 << ctx;
++ set_bit(ctx, &ctx_map);
++ WARN_ON(ctx_map_active & (1 << ctx));
++ set_bit(ctx, &ctx_map_active);
+
+ memset(vrfb, 0, sizeof(*vrfb));
+
+@@ -219,3 +237,34 @@ int omap_vrfb_request_ctx(struct vrfb *vrfb)
+ }
+ EXPORT_SYMBOL(omap_vrfb_request_ctx);
+
++void omap_vrfb_suspend_ctx(struct vrfb *vrfb)
++{
++ DBG("suspend ctx %d\n", vrfb->context);
++ if (vrfb->context >= VRFB_NUM_CTXS ||
++ (!(1 << vrfb->context) & ctx_map_active)) {
++ BUG();
++ return;
++ }
++ clear_bit(vrfb->context, &ctx_map_active);
++}
++EXPORT_SYMBOL(omap_vrfb_suspend_ctx);
++
++void omap_vrfb_resume_ctx(struct vrfb *vrfb)
++{
++ DBG("resume ctx %d\n", vrfb->context);
++ if (vrfb->context >= VRFB_NUM_CTXS ||
++ ((1 << vrfb->context) & ctx_map_active)) {
++ BUG();
++ return;
++ }
++ /*
++ * omap_vrfb_restore_context is normally called by the core domain
++ * save / restore logic, but since this VRFB context was suspended
++ * those calls didn't actually restore the context and now we might
++ * have an invalid context. Do an explicit restore here.
++ */
++ restore_hw_context(vrfb->context);
++ set_bit(vrfb->context, &ctx_map_active);
++}
++EXPORT_SYMBOL(omap_vrfb_resume_ctx);
++
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index 76e7c6c..4bb74b7 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -1036,6 +1036,30 @@ static int omapfb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
+ return 0;
+ }
+
++static void omapfb_vrfb_suspend_all(struct omapfb2_device *fbdev)
++{
++ int i;
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
++
++ if (ofbi->region.vrfb.vaddr[0])
++ omap_vrfb_suspend_ctx(&ofbi->region.vrfb);
++ }
++}
++
++static void omapfb_vrfb_resume_all(struct omapfb2_device *fbdev)
++{
++ int i;
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
++
++ if (ofbi->region.vrfb.vaddr[0])
++ omap_vrfb_resume_ctx(&ofbi->region.vrfb);
++ }
++}
++
+ static int omapfb_blank(int blank, struct fb_info *fbi)
+ {
+ struct omapfb_info *ofbi = FB2OFB(fbi);
+@@ -1051,6 +1075,8 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
+ if (display->state != OMAP_DSS_DISPLAY_SUSPENDED)
+ goto exit;
+
++ omapfb_vrfb_resume_all(fbdev);
++
+ if (display->resume)
+ r = display->resume(display);
+
+@@ -1073,6 +1099,8 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
+ if (display->suspend)
+ r = display->suspend(display);
+
++ omapfb_vrfb_suspend_all(fbdev);
++
+ break;
+
+ default:
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch b/recipes/linux/linux-omap-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch
new file mode 100644
index 0000000000..a3af90d959
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch
@@ -0,0 +1,92 @@
+From 0201b40018d9e264f8c4ea7871223c94e0de61b1 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 7 May 2009 14:32:55 +0300
+Subject: [PATCH 66/69] DSS2: DSI: tune the timings to be more relaxed
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ drivers/video/omap2/dss/dsi.c | 37 +++++++++++++++++++++----------------
+ 1 files changed, 21 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index 5225ed6..67ecfcf 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -1396,28 +1396,28 @@ static void dsi_complexio_timings(void)
+ /* 1 * DDR_CLK = 2 * UI */
+
+ /* min 40ns + 4*UI max 85ns + 6*UI */
+- ths_prepare = ns2ddr(59) + 2;
++ ths_prepare = ns2ddr(70) + 2;
+
+ /* min 145ns + 10*UI */
+- ths_prepare_ths_zero = ns2ddr(145) + 5;
++ ths_prepare_ths_zero = ns2ddr(175) + 2;
+
+ /* min max(8*UI, 60ns+4*UI) */
+- ths_trail = max((unsigned)4, ns2ddr(60) + 2);
++ ths_trail = ns2ddr(60) + 5;
+
+ /* min 100ns */
+- ths_exit = ns2ddr(100);
++ ths_exit = ns2ddr(145);
+
+ /* tlpx min 50n */
+ tlpx_half = ns2ddr(25);
+
+ /* min 60ns */
+- tclk_trail = ns2ddr(60);
++ tclk_trail = ns2ddr(60) + 2;
+
+ /* min 38ns, max 95ns */
+- tclk_prepare = ns2ddr(38);
++ tclk_prepare = ns2ddr(65);
+
+ /* min tclk-prepare + tclk-zero = 300ns */
+- tclk_zero = ns2ddr(300 - 38);
++ tclk_zero = ns2ddr(260);
+
+ DSSDBG("ths_prepare %u (%uns), ths_prepare_ths_zero %u (%uns)\n",
+ ths_prepare, ddr2ns(ths_prepare),
+@@ -2340,9 +2340,19 @@ static void dsi_proto_timings(struct omap_display *display)
+ /* min 60ns + 52*UI */
+ tclk_post = ns2ddr(60) + 26;
+
++ /* ths_eot is 2 for 2 datalanes and 4 for 1 datalane */
++ if (display->hw_config.u.dsi.data1_lane != 0 &&
++ display->hw_config.u.dsi.data2_lane != 0)
++ ths_eot = 2;
++ else
++ ths_eot = 4;
++
+ ddr_clk_pre = DIV_ROUND_UP(tclk_pre + tlpx + tclk_zero + tclk_prepare,
+ 4);
+- ddr_clk_post = DIV_ROUND_UP(tclk_post + tclk_trail, 4);
++ ddr_clk_post = DIV_ROUND_UP(tclk_post + tclk_trail, 4) + ths_eot;
++
++ BUG_ON(ddr_clk_pre == 0 || ddr_clk_pre > 255);
++ BUG_ON(ddr_clk_post == 0 || ddr_clk_post > 255);
+
+ r = dsi_read_reg(DSI_CLK_TIMING);
+ r = FLD_MOD(r, ddr_clk_pre, 15, 8);
+@@ -2353,14 +2363,9 @@ static void dsi_proto_timings(struct omap_display *display)
+ ddr_clk_pre,
+ ddr_clk_post);
+
+- /* ths_eot is 2 for 2 datalanes and 4 for 1 datalane */
+- if (display->hw_config.u.dsi.data1_lane != 0 &&
+- display->hw_config.u.dsi.data2_lane != 0)
+- ths_eot = 2;
+- else
+- ths_eot = 4;
+-
+- enter_hs_mode_lat = DIV_ROUND_UP(tlpx + ths_prepare + ths_zero, 4) + 4;
++ enter_hs_mode_lat = 1 + DIV_ROUND_UP(tlpx, 4) +
++ DIV_ROUND_UP(ths_prepare, 4) +
++ DIV_ROUND_UP(ths_zero + 3, 4);
+ exit_hs_mode_lat = DIV_ROUND_UP(ths_trail + ths_exit, 4) + 1 + ths_eot;
+
+ r = FLD_VAL(enter_hs_mode_lat, 31, 16) |
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch b/recipes/linux/linux-omap-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch
new file mode 100644
index 0000000000..911fe79bfa
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch
@@ -0,0 +1,29 @@
+From c474849d7aff57d578c639f63a9c3cbdec0501dd Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Mon, 11 May 2009 15:15:52 +0200
+Subject: [PATCH 67/69] DSS2: VRFB: don't WARN when releasing inactive ctx
+
+Releasing an inactive context is valid, it can happen when
+the application first blanks the screen then frees the
+framebuffer.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/vrfb.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 29f04e2..34395c2 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -176,7 +176,6 @@ void omap_vrfb_release_ctx(struct vrfb *vrfb)
+ BUG();
+ return;
+ }
+- WARN_ON(!(ctx_map_active & (1 << ctx)));
+ clear_bit(ctx, &ctx_map_active);
+ clear_bit(ctx, &ctx_map);
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch b/recipes/linux/linux-omap-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch
new file mode 100644
index 0000000000..fba2ebd5db
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch
@@ -0,0 +1,65 @@
+From 0db37fa025f0eac64f9fdad49e310d7660f48944 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Tue, 12 May 2009 14:38:05 +0200
+Subject: [PATCH 68/69] DSS2: Swap field offset values w/ VRFB rotation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+The field 0 and field 1 offset values were still incorrect when VRFB
+rotation is used. Swap them to put the fields into proper order.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 17 +++++++++++------
+ 1 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 5fc9457..b0e4960 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1182,6 +1182,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+
+ DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width,
+ width, height);
++
++ /*
++ * field 0 = even field = bottom field
++ * field 1 = odd field = top field
++ */
+ switch (rotation + mirror * 4) {
+ case 0:
+ case 2:
+@@ -1194,11 +1199,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+ width = width >> 1;
+ case 1:
+ case 3:
+- *offset0 = 0;
++ *offset1 = 0;
+ if (fieldmode)
+- *offset1 = screen_width * ps;
++ *offset0 = screen_width * ps;
+ else
+- *offset1 = 0;
++ *offset0 = 0;
+
+ *row_inc = pixinc(1 + (screen_width - width) +
+ (fieldmode ? screen_width : 0),
+@@ -1216,11 +1221,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+ width = width >> 1;
+ case 5:
+ case 7:
+- *offset0 = 0;
++ *offset1 = 0;
+ if (fieldmode)
+- *offset1 = screen_width * ps;
++ *offset0 = screen_width * ps;
+ else
+- *offset1 = 0;
++ *offset0 = 0;
+ *row_inc = pixinc(1 - (screen_width + width) -
+ (fieldmode ? screen_width : 0),
+ ps);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch b/recipes/linux/linux-omap-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch
new file mode 100644
index 0000000000..c637c48602
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch
@@ -0,0 +1,125 @@
+From b06406f3e5c3958f69185314c969f7c1a3265f71 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Thu, 14 May 2009 15:04:17 +0530
+Subject: [PATCH 69/69] DSS2: OMAP3EVM: Added DSI powerup and powerdown functions
+
+Copied fom 3430sdp implementation.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/mach-omap2/board-omap3evm.c | 62 +++++++++++++++++++++-------------
+ 1 files changed, 38 insertions(+), 24 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
+index 6f5a866..57c4fc7 100644
+--- a/arch/arm/mach-omap2/board-omap3evm.c
++++ b/arch/arm/mach-omap2/board-omap3evm.c
+@@ -237,6 +237,38 @@ static int __init omap3_evm_i2c_init(void)
+ static int lcd_enabled;
+ static int dvi_enabled;
+
++static void enable_vpll2(int enable)
++{
++ u8 ded_val, grp_val;
++
++ if (enable) {
++ ded_val = ENABLE_VPLL2_DEDICATED;
++ grp_val = ENABLE_VPLL2_DEV_GRP;
++ } else {
++ ded_val = 0;
++ grp_val = 0;
++ }
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ded_val, TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ grp_val, TWL4030_VPLL2_DEV_GRP);
++}
++
++static int omap3evm_dsi_power_up(void)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0)
++ enable_vpll2(1);
++ return 0;
++}
++
++static void omap3evm_dsi_power_down(void)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0)
++ enable_vpll2(0);
++}
++
++
+ static void __init omap3_evm_display_init(void)
+ {
+ int r;
+@@ -306,12 +338,7 @@ static int omap3_evm_panel_enable_lcd(struct omap_display *display)
+ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
+ return -EINVAL;
+ }
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
+- }
++ omap3evm_dsi_power_up();
+ gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 0);
+ lcd_enabled = 1;
+ return 0;
+@@ -319,12 +346,7 @@ static int omap3_evm_panel_enable_lcd(struct omap_display *display)
+
+ static void omap3_evm_panel_disable_lcd(struct omap_display *display)
+ {
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEV_GRP);
+- }
++ omap3evm_dsi_power_down();
+ gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 1);
+ lcd_enabled = 0;
+ }
+@@ -370,13 +392,8 @@ static int omap3_evm_panel_enable_dvi(struct omap_display *display)
+ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
+ return -EINVAL;
+ }
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
+- }
+
++ omap3evm_dsi_power_up();
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
+ TWL4030_GPIODATA_IN3);
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
+@@ -388,13 +405,8 @@ static int omap3_evm_panel_enable_dvi(struct omap_display *display)
+
+ static void omap3_evm_panel_disable_dvi(struct omap_display *display)
+ {
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEV_GRP);
+- }
+
++ omap3evm_dsi_power_down();
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
+ TWL4030_GPIODATA_IN3);
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
+@@ -413,6 +425,8 @@ static struct omap_dss_display_config omap3_evm_display_data_dvi = {
+ };
+
+ static struct omap_dss_board_info omap3_evm_dss_data = {
++ .dsi_power_up = omap3evm_dsi_power_up,
++ .dsi_power_down = omap3evm_dsi_power_down,
+ .num_displays = 3,
+ .displays = {
+ &omap3_evm_display_data,
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0070-DSS2-fix-irq1.diff b/recipes/linux/linux-omap-2.6.29/dss2/0070-DSS2-fix-irq1.diff
new file mode 100644
index 0000000000..8f384dfe2d
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0070-DSS2-fix-irq1.diff
@@ -0,0 +1,221 @@
+From 093988f36ffcb0201927f8b452e546e1141aa0fa Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Sat, 23 May 2009 15:00:21 +0000
+Subject: DSS2: DISPC: fix irq handling locking
+
+---
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b0e4960..b3685b2 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -154,23 +154,20 @@ static struct {
+
+ struct clk *dpll4_m4_ck;
+
+- spinlock_t irq_lock;
+-
+ unsigned long cache_req_pck;
+ unsigned long cache_prate;
+ struct dispc_clock_info cache_cinfo;
+
+- u32 irq_error_mask;
++ spinlock_t irq_lock;
++ u32 irq_error_mask;
+ struct omap_dispc_isr_data registered_isr[DISPC_MAX_NR_ISRS];
+-
+- spinlock_t error_lock;
+ u32 error_irqs;
+ struct work_struct error_work;
+
+ u32 ctx[DISPC_SZ_REGS / sizeof(u32)];
+ } dispc;
+
+-static void omap_dispc_set_irqs(void);
++static void _omap_dispc_set_irqs(void);
+
+ static inline void dispc_write_reg(const struct dispc_reg idx, u32 val)
+ {
+@@ -1691,10 +1688,13 @@ void dispc_enable_digit_out(bool enable)
+ }
+
+ if (enable) {
++ unsigned long flags;
+ /* When we enable digit output, we'll get an extra digit
+ * sync lost interrupt, that we need to ignore */
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ dispc.irq_error_mask &= ~DISPC_IRQ_SYNC_LOST_DIGIT;
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ /* When we disable digit output, we need to wait until fields are done.
+@@ -1728,9 +1728,12 @@ void dispc_enable_digit_out(bool enable)
+ DSSERR("failed to unregister EVSYNC isr\n");
+
+ if (enable) {
++ unsigned long flags;
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ dispc.irq_error_mask = DISPC_IRQ_MASK_ERROR;
+ dispc_write_reg(DISPC_IRQSTATUS, DISPC_IRQ_SYNC_LOST_DIGIT);
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ enable_clocks(0);
+@@ -2508,14 +2511,14 @@ int dispc_get_clock_div(struct dispc_clock_info *cinfo)
+ return 0;
+ }
+
+-static void omap_dispc_set_irqs(void)
++/* dispc.irq_lock has to be locked by the caller */
++static void _omap_dispc_set_irqs(void)
+ {
+- unsigned long flags;
+- u32 mask = dispc.irq_error_mask;
++ u32 mask;
+ int i;
+ struct omap_dispc_isr_data *isr_data;
+
+- spin_lock_irqsave(&dispc.irq_lock, flags);
++ mask = dispc.irq_error_mask;
+
+ for (i = 0; i < DISPC_MAX_NR_ISRS; i++) {
+ isr_data = &dispc.registered_isr[i];
+@@ -2528,9 +2531,8 @@ static void omap_dispc_set_irqs(void)
+
+ enable_clocks(1);
+ dispc_write_reg(DISPC_IRQENABLE, mask);
+- enable_clocks(0);
+
+- spin_unlock_irqrestore(&dispc.irq_lock, flags);
++ enable_clocks(0);
+ }
+
+ int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
+@@ -2571,11 +2573,14 @@ int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
+
+ break;
+ }
+-err:
++
++ _omap_dispc_set_irqs();
++
+ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+- if (ret == 0)
+- omap_dispc_set_irqs();
++ return 0;
++err:
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+ return ret;
+ }
+@@ -2606,10 +2611,10 @@ int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
+ break;
+ }
+
+- spin_unlock_irqrestore(&dispc.irq_lock, flags);
+-
+ if (ret == 0)
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+ return ret;
+ }
+@@ -2645,11 +2650,15 @@ static void print_irq_status(u32 status)
+ void dispc_irq_handler(void)
+ {
+ int i;
+- u32 irqstatus = dispc_read_reg(DISPC_IRQSTATUS);
++ u32 irqstatus;
+ u32 handledirqs = 0;
+ u32 unhandled_errors;
+ struct omap_dispc_isr_data *isr_data;
+
++ spin_lock(&dispc.irq_lock);
++
++ irqstatus = dispc_read_reg(DISPC_IRQSTATUS);
++
+ #ifdef DEBUG
+ if (dss_debug)
+ print_irq_status(irqstatus);
+@@ -2673,15 +2682,15 @@ void dispc_irq_handler(void)
+ unhandled_errors = irqstatus & ~handledirqs & dispc.irq_error_mask;
+
+ if (unhandled_errors) {
+- spin_lock(&dispc.error_lock);
+ dispc.error_irqs |= unhandled_errors;
+- spin_unlock(&dispc.error_lock);
+
+ dispc.irq_error_mask &= ~unhandled_errors;
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
+
+ schedule_work(&dispc.error_work);
+ }
++
++ spin_unlock(&dispc.irq_lock);
+ }
+
+ static void dispc_error_worker(struct work_struct *work)
+@@ -2690,10 +2699,10 @@ static void dispc_error_worker(struct work_struct *work)
+ u32 errors;
+ unsigned long flags;
+
+- spin_lock_irqsave(&dispc.error_lock, flags);
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ errors = dispc.error_irqs;
+ dispc.error_irqs = 0;
+- spin_unlock_irqrestore(&dispc.error_lock, flags);
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+ if (errors & DISPC_IRQ_GFX_FIFO_UNDERFLOW) {
+ DSSERR("GFX_FIFO_UNDERFLOW, disabling GFX\n");
+@@ -2836,8 +2845,10 @@ static void dispc_error_worker(struct work_struct *work)
+ }
+ }
+
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ dispc.irq_error_mask |= errors;
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout)
+@@ -2921,6 +2932,10 @@ void dispc_fake_vsync_irq(void)
+
+ static void _omap_dispc_initialize_irq(void)
+ {
++ unsigned long flags;
++
++ spin_lock_irqsave(&dispc.irq_lock, flags);
++
+ memset(dispc.registered_isr, 0, sizeof(dispc.registered_isr));
+
+ dispc.irq_error_mask = DISPC_IRQ_MASK_ERROR;
+@@ -2929,7 +2944,9 @@ static void _omap_dispc_initialize_irq(void)
+ * so clear it */
+ dispc_write_reg(DISPC_IRQSTATUS, dispc_read_reg(DISPC_IRQSTATUS));
+
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ void dispc_enable_sidle(void)
+@@ -2970,7 +2987,6 @@ int dispc_init(void)
+ u32 rev;
+
+ spin_lock_init(&dispc.irq_lock);
+- spin_lock_init(&dispc.error_lock);
+
+ INIT_WORK(&dispc.error_work, dispc_error_worker);
+
+--
+cgit v0.8.2.1-10-g45e7
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0071-DSS2-fix-irq2.diff b/recipes/linux/linux-omap-2.6.29/dss2/0071-DSS2-fix-irq2.diff
new file mode 100644
index 0000000000..cb8aaf1a28
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0071-DSS2-fix-irq2.diff
@@ -0,0 +1,35 @@
+From 8af2f6550d6971875e4c5d3f93982f86f4bcf216 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Sat, 23 May 2009 15:00:00 +0000
+Subject: DSS2: DISPC: clear irqstatus for newly enabled irqs
+
+This fixes the problem that when requesting a new irq
+we could get the isr called too early in case irqstatus
+already had that irq flag on.
+---
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b3685b2..2471cfe 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -2515,6 +2515,7 @@ int dispc_get_clock_div(struct dispc_clock_info *cinfo)
+ static void _omap_dispc_set_irqs(void)
+ {
+ u32 mask;
++ u32 old_mask;
+ int i;
+ struct omap_dispc_isr_data *isr_data;
+
+@@ -2530,6 +2531,11 @@ static void _omap_dispc_set_irqs(void)
+ }
+
+ enable_clocks(1);
++
++ old_mask = dispc_read_reg(DISPC_IRQENABLE);
++ /* clear the irqstatus for newly enabled irqs */
++ dispc_write_reg(DISPC_IRQSTATUS, (mask ^ old_mask) & mask);
++
+ dispc_write_reg(DISPC_IRQENABLE, mask);
+
+ enable_clocks(0);
+--
+cgit v0.8.2.1-10-g45e7
diff --git a/recipes/linux/linux-omap-pm-2.6.29/0124-leds-gpio-broken-with-current-git.patch b/recipes/linux/linux-omap-pm-2.6.29/0124-leds-gpio-broken-with-current-git.patch
new file mode 100644
index 0000000000..dc6e190e89
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/0124-leds-gpio-broken-with-current-git.patch
@@ -0,0 +1,79 @@
+From c810e850d830330cf04225a4cff8e981e153f269 Mon Sep 17 00:00:00 2001
+From: David Brownell <david-b@pacbell.net>
+Date: Mon, 23 Feb 2009 14:08:14 -0800
+Subject: [PATCH 124/133] leds-gpio broken with current git?
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+On Monday 23 February 2009, David Brownell wrote:
+>
+> > Perhaps something broke with Tony's RC1 merge?
+> > The LEDs are broken for me as well.
+>
+> Still works for me.  Did you maybe not enable the twl4030
+> GPIO support in Kconfig?
+
+Oh, and if you did *not*, please give this patch a try.
+I've been meaning to test it.
+
+- Dave
+
+==============
+Sometimes it's awkward to make sure that the array in the
+platform_data handed to the leds-gpio driver has only valid
+data ... some leds may not be always available, and coping
+with that currently requires patching or rebuilding the array.
+
+This patch fixes that by making it be OK to pass an invalid
+GPIO (such as "-EINVAL") ... such table entries are skipped.
+---
+ drivers/leds/leds-gpio.c | 12 +++++++++++-
+ 1 files changed, 11 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
+index b13bd29..83737e6 100644
+--- a/drivers/leds/leds-gpio.c
++++ b/drivers/leds/leds-gpio.c
+@@ -90,13 +90,19 @@ static int gpio_led_probe(struct platform_device *pdev)
+ cur_led = &pdata->leds[i];
+ led_dat = &leds_data[i];
+
++ /* skip leds that aren't available */
++ led_dat->gpio = cur_led->gpio;
++ if (!gpio_is_valid(led_dat->gpio)) {
++ dev_dbg(&pdev->dev, "skipping %s\n", cur_led->name);
++ continue;
++ }
++
+ ret = gpio_request(cur_led->gpio, cur_led->name);
+ if (ret < 0)
+ goto err;
+
+ led_dat->cdev.name = cur_led->name;
+ led_dat->cdev.default_trigger = cur_led->default_trigger;
+- led_dat->gpio = cur_led->gpio;
+ led_dat->can_sleep = gpio_cansleep(cur_led->gpio);
+ led_dat->active_low = cur_led->active_low;
+ if (pdata->gpio_blink_set) {
+@@ -124,6 +130,8 @@ static int gpio_led_probe(struct platform_device *pdev)
+ err:
+ if (i > 0) {
+ for (i = i - 1; i >= 0; i--) {
++ if (!gpio_is_valid(leds_data[i].gpio))
++ continue;
+ led_classdev_unregister(&leds_data[i].cdev);
+ cancel_work_sync(&leds_data[i].work);
+ gpio_free(leds_data[i].gpio);
+@@ -144,6 +152,8 @@ static int __devexit gpio_led_remove(struct platform_device *pdev)
+ leds_data = platform_get_drvdata(pdev);
+
+ for (i = 0; i < pdata->num_leds; i++) {
++ if (!gpio_is_valid(leds_data[i].gpio))
++ continue;
+ led_classdev_unregister(&leds_data[i].cdev);
+ cancel_work_sync(&leds_data[i].work);
+ gpio_free(leds_data[i].gpio);
+--
+1.6.0.4.790.gaa14a
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/beagleboard/defconfig b/recipes/linux/linux-omap-pm-2.6.29/beagleboard/defconfig
new file mode 100644
index 0000000000..a992a5994e
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/beagleboard/defconfig
@@ -0,0 +1,2705 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-omap1
+# Sat Jun 20 13:15:25 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_OPROFILE_ARMV7=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 is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
+# 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_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+CONFIG_TRACEPOINTS=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=y
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_BLK_DEV_INTEGRITY=y
+
+#
+# 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_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 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_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN 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 is not set
+CONFIG_OMAP_MCBSP=y
+# CONFIG_OMAP_MBOX_FWK is not set
+# CONFIG_OMAP_MPU_TIMER is not set
+CONFIG_OMAP_32K_TIMER=y
+# CONFIG_OMAP3_DEBOBS is not set
+CONFIG_OMAP_32K_TIMER_HZ=128
+CONFIG_OMAP_TICK_GPTIMER=12
+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_PM_NONE is not set
+# CONFIG_OMAP_PM_NOOP is not set
+CONFIG_OMAP_PM_SRF=y
+CONFIG_ARCH_OMAP34XX=y
+CONFIG_ARCH_OMAP3430=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_NOKIA_RX51 is not set
+# CONFIG_MACH_OMAP_LDP is not set
+# CONFIG_MACH_OMAP_3430SDP is not set
+CONFIG_MACH_OMAP3EVM=y
+CONFIG_MACH_OMAP3_BEAGLE=y
+CONFIG_MACH_OVERO=y
+# CONFIG_MACH_OMAP3_PANDORA is not set
+
+#
+# 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=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_HAS_TLS_REG=y
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=128
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_LEDS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=" debug "
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_NEON=y
+# CONFIG_ARM_ERRATUM_451034 is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_HAVE_AOUT=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_DEBUG=y
+# CONFIG_PM_VERBOSE is not set
+CONFIG_CAN_PM_TRACE=y
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+# CONFIG_PM_TEST_SUSPEND is not set
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+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_XFRM_IPCOMP=m
+CONFIG_NET_KEY=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_LRO=m
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+CONFIG_TCP_CONG_HSTCP=m
+CONFIG_TCP_CONG_HYBLA=m
+CONFIG_TCP_CONG_VEGAS=m
+CONFIG_TCP_CONG_SCALABLE=m
+CONFIG_TCP_CONG_LP=m
+CONFIG_TCP_CONG_VENO=m
+CONFIG_TCP_CONG_YEAH=m
+CONFIG_TCP_CONG_ILLINOIS=m
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_MIP6=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_NDISC_NODETYPE=y
+CONFIG_IPV6_TUNNEL=m
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+# CONFIG_IPV6_PIMSM_V2 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=y
+CONFIG_NF_CT_PROTO_DCCP=m
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+CONFIG_NF_CT_PROTO_UDPLITE=m
+CONFIG_NF_CONNTRACK_AMANDA=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+# CONFIG_NETFILTER_TPROXY is not set
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
+CONFIG_NETFILTER_XT_TARGET_RATEEST=m
+# CONFIG_NETFILTER_XT_TARGET_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_HASHLIMIT=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_OWNER=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_RATEEST=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_RECENT=m
+# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_TIME=m
+CONFIG_NETFILTER_XT_MATCH_U32=m
+CONFIG_IP_VS=m
+CONFIG_IP_VS_IPV6=y
+CONFIG_IP_VS_DEBUG=y
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_AH_ESP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_DEFRAG_IPV4=m
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_IDLETIMER=m
+CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_DCCP=m
+CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_PROTO_UDPLITE=m
+CONFIG_NF_NAT_PROTO_SCTP=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+CONFIG_IP6_NF_QUEUE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_HL=m
+CONFIG_IP6_NF_RAW=m
+# CONFIG_BRIDGE_NF_EBTABLES is not set
+CONFIG_IP_DCCP=m
+CONFIG_INET_DCCP_DIAG=m
+
+#
+# DCCP CCIDs Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP_CCID2_DEBUG is not set
+CONFIG_IP_DCCP_CCID3=y
+# CONFIG_IP_DCCP_CCID3_DEBUG is not set
+CONFIG_IP_DCCP_CCID3_RTO=100
+CONFIG_IP_DCCP_TFRC_LIB=y
+
+#
+# DCCP Kernel Hacking
+#
+# CONFIG_IP_DCCP_DEBUG is not set
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_TIPC=m
+# CONFIG_TIPC_ADVANCED is not set
+# CONFIG_TIPC_DEBUG is not set
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+# CONFIG_ATM_CLIP_NO_ICMP is not set
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_STP=m
+CONFIG_GARP=m
+CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_VLAN_8021Q_GVRP=y
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+CONFIG_WAN_ROUTER=m
+CONFIG_NET_SCHED=y
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_MULTIQ=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_DRR=m
+
+#
+# Classification
+#
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_CLS_FLOW=m
+# CONFIG_NET_EMATCH is not set
+# CONFIG_NET_CLS_ACT is not set
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_SCH_FIFO=y
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_CAN=m
+CONFIG_CAN_RAW=m
+CONFIG_CAN_BCM=m
+
+#
+# CAN Device Drivers
+#
+CONFIG_CAN_VCAN=m
+# CONFIG_CAN_DEBUG_DEVICES is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+CONFIG_IRDA_DEBUG=y
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_TOIM3232_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+# CONFIG_ACT200L_DONGLE is not set
+CONFIG_KINGSUN_DONGLE=m
+CONFIG_KSDAZZLE_DONGLE=m
+CONFIG_KS959_DONGLE=m
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+CONFIG_SIGMATEL_FIR=m
+CONFIG_MCS_FIR=m
+# CONFIG_OMAP_IR is not set
+CONFIG_BT=y
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
+CONFIG_BT_RFCOMM=y
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=y
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=y
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIBTUSB=y
+CONFIG_BT_HCIBTSDIO=y
+CONFIG_BT_HCIUART=y
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_LL=y
+CONFIG_BT_HCIBCM203X=y
+CONFIG_BT_HCIBPA10X=y
+CONFIG_BT_HCIBFUSB=y
+# CONFIG_BT_HCIBRF6150 is not set
+# CONFIG_BT_HCIH4P is not set
+# CONFIG_BT_HCIVHCI is not set
+CONFIG_AF_RXRPC=m
+# CONFIG_AF_RXRPC_DEBUG is not set
+# CONFIG_RXKAD is not set
+# CONFIG_PHONET is not set
+CONFIG_FIB_RULES=y
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=y
+# CONFIG_CFG80211_REG_DEBUG is not set
+CONFIG_NL80211=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=y
+CONFIG_LIB80211_CRYPT_WEP=y
+CONFIG_LIB80211_CRYPT_CCMP=y
+CONFIG_LIB80211_CRYPT_TKIP=y
+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_MAC80211=y
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_PID=y
+# CONFIG_MAC80211_RC_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT="pid"
+# CONFIG_MAC80211_MESH is not set
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+CONFIG_WIMAX=m
+CONFIG_WIMAX_DEBUG_LEVEL=8
+# CONFIG_RFKILL is not set
+CONFIG_NET_9P=m
+# CONFIG_NET_9P_DEBUG is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_GPIO is not set
+CONFIG_MTD_NAND_OMAP2=y
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+CONFIG_MTD_NAND_PLATFORM=y
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+# CONFIG_MTD_UBI_GLUEBI is not set
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_DEBUG is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+# CONFIG_BLK_DEV_XIP is not set
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ICS932S401 is not set
+# CONFIG_OMAP_STI is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+CONFIG_EEPROM_93CX6=y
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=m
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_CHR_DEV_SCH=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+CONFIG_ISCSI_TCP=m
+# CONFIG_LIBFC is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID5_RESHAPE=y
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_DELAY=m
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_MACVLAN=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_VETH=m
+# CONFIG_NET_ETHERNET is not set
+CONFIG_MII=y
+# 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=y
+CONFIG_LIBERTAS_USB=y
+# CONFIG_LIBERTAS_SDIO is not set
+# CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_LIBERTAS_THINFIRM is not set
+CONFIG_USB_ZD1201=y
+CONFIG_USB_NET_RNDIS_WLAN=y
+CONFIG_RTL8187=y
+# CONFIG_MAC80211_HWSIM is not set
+CONFIG_P54_COMMON=y
+CONFIG_P54_USB=y
+# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_HOSTAP=y
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+CONFIG_B43=y
+CONFIG_B43_LEDS=y
+# CONFIG_B43_DEBUG is not set
+# CONFIG_B43LEGACY is not set
+CONFIG_ZD1211RW=y
+# CONFIG_ZD1211RW_DEBUG is not set
+CONFIG_RT2X00=y
+CONFIG_RT2500USB=y
+CONFIG_RT73USB=y
+CONFIG_RT2X00_LIB_USB=y
+CONFIG_RT2X00_LIB=y
+CONFIG_RT2X00_LIB_FIRMWARE=y
+CONFIG_RT2X00_LIB_CRYPTO=y
+CONFIG_RT2X00_LIB_LEDS=y
+# CONFIG_RT2X00_DEBUG is not set
+
+#
+# WiMAX Wireless Broadband devices
+#
+# CONFIG_WIMAX_I2400M_USB is not set
+# CONFIG_WIMAX_I2400M_SDIO is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=y
+CONFIG_USB_KAWETH=y
+CONFIG_USB_PEGASUS=y
+CONFIG_USB_RTL8150=y
+CONFIG_USB_USBNET=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_CDCETHER=y
+CONFIG_USB_NET_DM9601=y
+CONFIG_USB_NET_SMSC95XX=y
+CONFIG_USB_NET_GL620A=y
+CONFIG_USB_NET_NET1080=y
+CONFIG_USB_NET_PLUSB=y
+CONFIG_USB_NET_MCS7830=y
+CONFIG_USB_NET_RNDIS_HOST=y
+CONFIG_USB_NET_CDC_SUBSET=y
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_KC2190=y
+CONFIG_USB_NET_ZAURUS=y
+# CONFIG_WAN is not set
+CONFIG_ATM_DRIVERS=y
+# CONFIG_ATM_DUMMY is not set
+# CONFIG_ATM_TCP 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_PPPOATM is not set
+CONFIG_PPPOL2TP=m
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+CONFIG_NETCONSOLE=m
+CONFIG_NETCONSOLE_DYNAMIC=y
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=y
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD 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_TWL4030 is not set
+# CONFIG_KEYBOARD_LM8323 is not set
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# 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_CM109 is not set
+CONFIG_INPUT_TWL4030_PWRBUTTON=y
+CONFIG_INPUT_UINPUT=y
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+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_DEVPTS_MULTIPLE_INSTANCES is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# 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
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_OMAP=y
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+CONFIG_TWL4030_MADC=m
+CONFIG_TWL4030_POWEROFF=y
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_SENSORS_TSL2563 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+# CONFIG_SPI_OMAP24XX is not set
+
+#
+# SPI Protocol Masters
+#
+# 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_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=m
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_TWL4030_BCI_BATTERY is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 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_LTC4245 is not set
+# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_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_THERMAL=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_OMAP_WATCHDOG=y
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB=y
+# CONFIG_SSB_SILENT is not set
+# CONFIG_SSB_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+CONFIG_TWL4030_CORE=y
+# CONFIG_TWL4030_POWER is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# 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=m
+CONFIG_VIDEO_MEDIA=m
+
+#
+# Multimedia drivers
+#
+CONFIG_MEDIA_ATTACH=y
+CONFIG_MEDIA_TUNER=m
+# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
+CONFIG_MEDIA_TUNER_SIMPLE=m
+CONFIG_MEDIA_TUNER_TDA8290=m
+CONFIG_MEDIA_TUNER_TDA827X=m
+CONFIG_MEDIA_TUNER_TDA18271=m
+CONFIG_MEDIA_TUNER_TDA9887=m
+CONFIG_MEDIA_TUNER_TEA5761=m
+CONFIG_MEDIA_TUNER_TEA5767=m
+CONFIG_MEDIA_TUNER_MT20XX=m
+CONFIG_MEDIA_TUNER_MT2060=m
+CONFIG_MEDIA_TUNER_MT2266=m
+CONFIG_MEDIA_TUNER_QT1010=m
+CONFIG_MEDIA_TUNER_XC2028=m
+CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_MEDIA_TUNER_MXL5005S=m
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEOBUF_VMALLOC=m
+CONFIG_VIDEOBUF_DVB=m
+CONFIG_VIDEO_IR=m
+CONFIG_VIDEO_TVEEPROM=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+CONFIG_VIDEO_IR_I2C=m
+CONFIG_VIDEO_MSP3400=m
+CONFIG_VIDEO_CS53L32A=m
+CONFIG_VIDEO_WM8775=m
+CONFIG_VIDEO_SAA711X=m
+CONFIG_VIDEO_TVP5150=m
+CONFIG_VIDEO_CX25840=m
+CONFIG_VIDEO_CX2341X=m
+CONFIG_VIDEO_VIVI=m
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_VIDEO_AU0828 is not set
+# CONFIG_SOC_CAMERA is not set
+CONFIG_V4L_USB_DRIVERS=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
+CONFIG_USB_GSPCA=m
+CONFIG_USB_M5602=m
+CONFIG_USB_STV06XX=m
+CONFIG_USB_GSPCA_CONEX=m
+CONFIG_USB_GSPCA_ETOMS=m
+CONFIG_USB_GSPCA_FINEPIX=m
+CONFIG_USB_GSPCA_MARS=m
+CONFIG_USB_GSPCA_OV519=m
+CONFIG_USB_GSPCA_OV534=m
+CONFIG_USB_GSPCA_PAC207=m
+CONFIG_USB_GSPCA_PAC7311=m
+CONFIG_USB_GSPCA_SONIXB=m
+CONFIG_USB_GSPCA_SONIXJ=m
+CONFIG_USB_GSPCA_SPCA500=m
+CONFIG_USB_GSPCA_SPCA501=m
+CONFIG_USB_GSPCA_SPCA505=m
+CONFIG_USB_GSPCA_SPCA506=m
+CONFIG_USB_GSPCA_SPCA508=m
+CONFIG_USB_GSPCA_SPCA561=m
+CONFIG_USB_GSPCA_STK014=m
+CONFIG_USB_GSPCA_SUNPLUS=m
+CONFIG_USB_GSPCA_T613=m
+CONFIG_USB_GSPCA_TV8532=m
+CONFIG_USB_GSPCA_VC032X=m
+CONFIG_USB_GSPCA_ZC3XX=m
+CONFIG_VIDEO_PVRUSB2=m
+CONFIG_VIDEO_PVRUSB2_SYSFS=y
+CONFIG_VIDEO_PVRUSB2_DVB=y
+# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
+CONFIG_VIDEO_EM28XX=m
+CONFIG_VIDEO_EM28XX_ALSA=m
+CONFIG_VIDEO_EM28XX_DVB=m
+CONFIG_VIDEO_USBVISION=m
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_QUICKCAM_MESSENGER=m
+CONFIG_USB_ET61X251=m
+CONFIG_VIDEO_OVCAMCHIP=m
+CONFIG_USB_W9968CF=m
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+CONFIG_USB_ZC0301=m
+CONFIG_USB_PWC=m
+# CONFIG_USB_PWC_DEBUG is not set
+CONFIG_USB_ZR364XX=m
+CONFIG_USB_STKWEBCAM=m
+CONFIG_USB_S2255=m
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_USB_DSBR is not set
+# CONFIG_USB_SI470X is not set
+# CONFIG_USB_MR800 is not set
+# CONFIG_RADIO_TEA5764 is not set
+CONFIG_DVB_DYNAMIC_MINORS=y
+CONFIG_DVB_CAPTURE_DRIVERS=y
+# CONFIG_TTPCI_EEPROM is not set
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_USB=m
+# CONFIG_DVB_USB_DEBUG is not set
+CONFIG_DVB_USB_A800=m
+CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
+CONFIG_DVB_USB_DIBUSB_MC=m
+CONFIG_DVB_USB_DIB0700=m
+CONFIG_DVB_USB_UMT_010=m
+CONFIG_DVB_USB_CXUSB=m
+CONFIG_DVB_USB_M920X=m
+CONFIG_DVB_USB_GL861=m
+CONFIG_DVB_USB_AU6610=m
+CONFIG_DVB_USB_DIGITV=m
+CONFIG_DVB_USB_VP7045=m
+CONFIG_DVB_USB_VP702X=m
+CONFIG_DVB_USB_GP8PSK=m
+CONFIG_DVB_USB_NOVA_T_USB2=m
+CONFIG_DVB_USB_TTUSB2=m
+CONFIG_DVB_USB_DTT200U=m
+CONFIG_DVB_USB_OPERA1=m
+CONFIG_DVB_USB_AF9005=m
+CONFIG_DVB_USB_AF9005_REMOTE=m
+CONFIG_DVB_USB_DW2102=m
+CONFIG_DVB_USB_CINERGY_T2=m
+CONFIG_DVB_USB_ANYSEE=m
+CONFIG_DVB_USB_DTV5100=m
+CONFIG_DVB_USB_AF9015=m
+CONFIG_DVB_SIANO_SMS1XXX=m
+CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_FLEXCOP=m
+CONFIG_DVB_B2C2_FLEXCOP_USB=m
+# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
+
+#
+# Supported DVB Frontends
+#
+
+#
+# Customise DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+
+#
+# Multistandard (satellite) frontends
+#
+CONFIG_DVB_STB0899=m
+CONFIG_DVB_STB6100=m
+
+#
+# DVB-S (satellite) frontends
+#
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_S5H1420=m
+CONFIG_DVB_STV0288=m
+CONFIG_DVB_STB6000=m
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_TDA8083=m
+CONFIG_DVB_TDA10086=m
+CONFIG_DVB_TDA8261=m
+CONFIG_DVB_VES1X93=m
+CONFIG_DVB_TUNER_ITD1000=m
+CONFIG_DVB_TUNER_CX24113=m
+CONFIG_DVB_TDA826X=m
+CONFIG_DVB_TUA6100=m
+CONFIG_DVB_CX24116=m
+CONFIG_DVB_SI21XX=m
+
+#
+# DVB-T (terrestrial) frontends
+#
+CONFIG_DVB_SP8870=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_CX22700=m
+CONFIG_DVB_CX22702=m
+CONFIG_DVB_DRX397XD=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
+
+#
+# DVB-C (cable) frontends
+#
+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=m
+CONFIG_DVB_OR51132=m
+CONFIG_DVB_BCM3510=m
+CONFIG_DVB_LGDT330X=m
+CONFIG_DVB_LGDT3304=m
+CONFIG_DVB_S5H1409=m
+CONFIG_DVB_AU8522=m
+CONFIG_DVB_S5H1411=m
+
+#
+# ISDB-T (terrestrial) frontends
+#
+CONFIG_DVB_S921=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_DVB_LGS8GL5=m
+
+#
+# Tools to develop new frontends
+#
+# CONFIG_DVB_DUMMY_FE is not set
+CONFIG_DVB_AF9013=m
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_DSS_VRAM_SIZE=14
+CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
+# CONFIG_OMAP2_DSS_RFBI is not set
+CONFIG_OMAP2_DSS_VENC=y
+# CONFIG_OMAP2_DSS_SDI is not set
+CONFIG_OMAP2_DSS_DSI=y
+CONFIG_OMAP2_DSS_USE_DSI_PLL=y
+# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
+
+#
+# OMAP2/3 Display Device Drivers
+#
+CONFIG_PANEL_GENERIC=y
+CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C=m
+# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
+# CONFIG_PANEL_N800 is not set
+# CONFIG_CTRL_BLIZZARD is not set
+CONFIG_FB_OMAP2=y
+CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
+# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
+CONFIG_FB_OMAP2_NUM_FBS=3
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=y
+
+#
+# Display hardware drivers
+#
+
+#
+# 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=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+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=y
+CONFIG_SND_HRTIMER=m
+CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+# CONFIG_SND_ARM is not set
+CONFIG_SND_SPI=y
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_USB_CAIAQ=m
+CONFIG_SND_USB_CAIAQ_INPUT=y
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_OMAP_SOC_MCBSP=y
+CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y
+CONFIG_SND_OMAP_SOC_OVERO=m
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_TWL4030=y
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_EZKEY=y
+CONFIG_HID_GYRATION=y
+CONFIG_HID_LOGITECH=y
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
+CONFIG_HID_NTRIG=y
+CONFIG_HID_PANTHERLORD=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SONY=y
+CONFIG_HID_SUNPLUS=y
+CONFIG_GREENASIA_FF=y
+CONFIG_HID_TOPSEED=y
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF 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=y
+CONFIG_USB_OTG=y
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_OMAP_EHCI_PHY_MODE=y
+# CONFIG_OMAP_EHCI_TLL_MODE is not set
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+CONFIG_USB_OXU210HP_HCD=y
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_U132_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SOC=y
+
+#
+# OMAP 343x high speed USB support
+#
+# CONFIG_USB_MUSB_HOST is not set
+# CONFIG_USB_MUSB_PERIPHERAL is not set
+CONFIG_USB_MUSB_OTG=y
+CONFIG_USB_GADGET_MUSB_HDRC=y
+CONFIG_USB_MUSB_HDRC_HCD=y
+# CONFIG_MUSB_PIO_ONLY is not set
+CONFIG_USB_INVENTRA_DMA=y
+# CONFIG_USB_TI_CPPI_DMA is not set
+# CONFIG_USB_MUSB_DEBUG is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_WDM=m
+CONFIG_USB_TMC=m
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more 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_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_EZUSB=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_AIRCABLE=m
+CONFIG_USB_SERIAL_ARK3116=m
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_CH341=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_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=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_MOTOROLA=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_OTI6858=m
+CONFIG_USB_SERIAL_SPCP8X5=m
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+CONFIG_USB_SERIAL_SIEMENS_MPI=m
+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_OPTICON=m
+CONFIG_USB_SERIAL_DEBUG=m
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_BERRY_CHARGE=m
+CONFIG_USB_LED=m
+CONFIG_USB_CYPRESS_CY7C63=m
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_PHIDGET=m
+CONFIG_USB_PHIDGETKIT=m
+CONFIG_USB_PHIDGETMOTORCONTROL=m
+CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_IDMOUSE=m
+CONFIG_USB_FTDI_ELAN=m
+# CONFIG_USB_APPLEDISPLAY is not set
+CONFIG_USB_SISUSBVGA=m
+CONFIG_USB_SISUSBVGA_CON=y
+CONFIG_USB_LD=m
+CONFIG_USB_TRANCEVIBRATOR=m
+# CONFIG_USB_IOWARRIOR is not set
+CONFIG_USB_TEST=m
+# CONFIG_USB_ISIGHTFW is not set
+CONFIG_USB_VST=m
+CONFIG_USB_ATM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_CXACRU=m
+CONFIG_USB_UEAGLEATM=m
+CONFIG_USB_XUSBATM=m
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_DEBUG_FS=y
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ZERO_HNPTEST=y
+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=m
+CONFIG_USB_G_PRINTER=m
+CONFIG_USB_CDC_COMPOSITE=m
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+CONFIG_USB_GPIO_VBUS=y
+# CONFIG_ISP1301_OMAP is not set
+CONFIG_TWL4030_USB=y
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+CONFIG_SDIO_UART=y
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+CONFIG_MMC_OMAP_HS=y
+CONFIG_MMC_SPI=m
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_OMAP_DEBUG is not set
+CONFIG_LEDS_OMAP=y
+# CONFIG_LEDS_OMAP_PWM is not set
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_LP5521 is not set
+# CONFIG_LEDS_PCA955X is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=m
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# 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
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+CONFIG_REGULATOR=y
+# CONFIG_REGULATOR_DEBUG is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+CONFIG_REGULATOR_TWL4030=y
+CONFIG_UIO=m
+CONFIG_UIO_PDRV=m
+CONFIG_UIO_PDRV_GENIRQ=m
+# CONFIG_UIO_SMX is not set
+# CONFIG_UIO_SERCOS3 is not set
+CONFIG_STAGING=y
+# CONFIG_STAGING_EXCLUDE_BUILD is not set
+# CONFIG_MEILHAUS is not set
+# CONFIG_USB_IP_COMMON is not set
+CONFIG_W35UND=m
+CONFIG_PRISM2_USB=m
+# CONFIG_ECHO is not set
+CONFIG_USB_ATMEL=m
+# CONFIG_AGNX is not set
+CONFIG_OTUS=m
+# CONFIG_COMEDI is not set
+# CONFIG_ASUS_OLED is not set
+# CONFIG_INPUT_MIMIO is not set
+# CONFIG_TRANZPORT is not set
+
+#
+# Android
+#
+CONFIG_ANDROID=y
+CONFIG_ANDROID_BINDER_IPC=y
+CONFIG_ANDROID_LOGGER=m
+CONFIG_ANDROID_RAM_CONSOLE=y
+CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE=y
+# CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION is not set
+# CONFIG_ANDROID_RAM_CONSOLE_EARLY_INIT is not set
+CONFIG_ANDROID_TIMED_GPIO=m
+CONFIG_ANDROID_LOW_MEMORY_KILLER=y
+
+#
+# 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_EXT4_FS=m
+# CONFIG_EXT4DEV_COMPAT is not set
+CONFIG_EXT4_FS_XATTR=y
+# CONFIG_EXT4_FS_POSIX_ACL is not set
+# CONFIG_EXT4_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=m
+# CONFIG_JBD2_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+CONFIG_REISERFS_PROC_INFO=y
+CONFIG_REISERFS_FS_XATTR=y
+# CONFIG_REISERFS_FS_POSIX_ACL is not set
+# CONFIG_REISERFS_FS_SECURITY is not set
+CONFIG_JFS_FS=m
+# CONFIG_JFS_POSIX_ACL is not set
+# CONFIG_JFS_SECURITY is not set
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
+CONFIG_GFS2_FS=m
+CONFIG_GFS2_FS_LOCKING_DLM=m
+CONFIG_OCFS2_FS=m
+CONFIG_OCFS2_FS_O2CB=m
+CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
+CONFIG_OCFS2_FS_STATS=y
+CONFIG_OCFS2_DEBUG_MASKLOG=y
+# CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_FS_POSIX_ACL is not set
+CONFIG_BTRFS_FS=m
+# CONFIG_BTRFS_FS_POSIX_ACL 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_QUOTA_TREE=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=m
+CONFIG_MISC_FILESYSTEMS=y
+CONFIG_ADFS_FS=m
+# CONFIG_ADFS_FS_RW is not set
+CONFIG_AFFS_FS=m
+# CONFIG_ECRYPT_FS is not set
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+CONFIG_JFFS2_FS_XATTR=y
+CONFIG_JFFS2_FS_POSIX_ACL=y
+CONFIG_JFFS2_FS_SECURITY=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+# CONFIG_JFFS2_CMODE_PRIORITY is not set
+# CONFIG_JFFS2_CMODE_SIZE is not set
+CONFIG_JFFS2_CMODE_FAVOURLZO=y
+CONFIG_UBIFS_FS=y
+CONFIG_UBIFS_FS_XATTR=y
+CONFIG_UBIFS_FS_ADVANCED_COMPR=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=y
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+CONFIG_VXFS_FS=m
+CONFIG_MINIX_FS=m
+CONFIG_OMFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_ROMFS_FS=m
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V3_ACL=y
+CONFIG_NFSD_V4=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_ACL_SUPPORT=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=y
+CONFIG_CIFS_STATS2=y
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_UPCALL is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+CONFIG_CIFS_EXPERIMENTAL=y
+# CONFIG_CIFS_DFS_UPCALL is not set
+CONFIG_NCP_FS=m
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+CONFIG_CODA_FS=m
+CONFIG_AFS_FS=m
+# CONFIG_AFS_DEBUG is not set
+CONFIG_9P_FS=m
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+CONFIG_MAC_PARTITION=y
+CONFIG_MSDOS_PARTITION=y
+CONFIG_BSD_DISKLABEL=y
+CONFIG_MINIX_SUBPARTITION=y
+CONFIG_SOLARIS_X86_PARTITION=y
+CONFIG_UNIXWARE_DISKLABEL=y
+CONFIG_LDM_PARTITION=y
+CONFIG_LDM_DEBUG=y
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+CONFIG_EFI_PARTITION=y
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=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=y
+CONFIG_DLM=m
+# CONFIG_DLM_DEBUG is not set
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_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_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_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_STACKTRACE=y
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_NOP_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+CONFIG_KEYS=y
+# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_XOR_BLOCKS=m
+CONFIG_ASYNC_CORE=m
+CONFIG_ASYNC_MEMCPY=m
+CONFIG_ASYNC_XOR=m
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_FIPS=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_CRYPTD=m
+CONFIG_CRYPTO_AUTHENC=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Authenticated Encryption with Associated Data
+#
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XTS=m
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_XCBC=m
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC16=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+CONFIG_LIBCRC32C=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-omap-pm-2.6.29/beagleboard/ehci.patch b/recipes/linux/linux-omap-pm-2.6.29/beagleboard/ehci.patch
new file mode 100644
index 0000000000..5a8c84471b
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/beagleboard/ehci.patch
@@ -0,0 +1,131 @@
+Index: git/arch/arm/mach-omap2/board-omap3beagle.c
+===================================================================
+--- git.orig/arch/arm/mach-omap2/board-omap3beagle.c
++++ git/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -154,6 +154,7 @@ static int beagle_twl_gpio_setup(struct
+ * power switch and overcurrent detect
+ */
+
++#if 0 /* TODO: This needs to be modified to not rely on u-boot */
+ gpio_request(gpio + 1, "EHCI_nOC");
+ gpio_direction_input(gpio + 1);
+
+@@ -163,7 +164,7 @@ static int beagle_twl_gpio_setup(struct
+
+ /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
+ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
+-
++#endif
+ return 0;
+ }
+
+Index: git/arch/arm/mach-omap2/usb-ehci.c
+===================================================================
+--- git.orig/arch/arm/mach-omap2/usb-ehci.c
++++ git/arch/arm/mach-omap2/usb-ehci.c
+@@ -147,9 +147,11 @@ static void setup_ehci_io_mux(void)
+
+ void __init usb_ehci_init(void)
+ {
++#if 0 /* TODO: Setup Pin IO MUX for EHCI - moved this temporarily to U-boot */
+ /* Setup Pin IO MUX for EHCI */
+ if (cpu_is_omap34xx())
+ setup_ehci_io_mux();
++#endif
+
+ if (platform_device_register(&ehci_device) < 0) {
+ printk(KERN_ERR "Unable to register HS-USB (EHCI) device\n");
+Index: git/drivers/usb/host/ehci-omap.c
+===================================================================
+--- git.orig/drivers/usb/host/ehci-omap.c
++++ git/drivers/usb/host/ehci-omap.c
+@@ -48,16 +48,25 @@
+ * to get the PHY state machine in working state
+ */
+ #define EXTERNAL_PHY_RESET
++#ifdef CONFIG_MACH_OMAP3_BEAGLE
++#define EXT_PHY_RESET_GPIO_PORT2 (147)
++#else
+ #define EXT_PHY_RESET_GPIO_PORT1 (57)
+ #define EXT_PHY_RESET_GPIO_PORT2 (61)
++#endif
+ #define EXT_PHY_RESET_DELAY (10)
+
++#define PHY_STP_PULLUP_ENABLE (0x10)
++#define PHY_STP_PULLUP_DISABLE (0x90)
++
+ /* ISSUE2:
+ * USBHOST supports External charge pump PHYs only
+ * Use the VBUS from Port1 to power VBUS of Port2 externally
+ * So use Port2 as the working ULPI port
+ */
++#ifndef CONFIG_MACH_OMAP3_BEAGLE
+ #define VBUS_INTERNAL_CHARGEPUMP_HACK
++#endif
+
+ #endif /* CONFIG_OMAP_EHCI_PHY_MODE */
+
+@@ -225,14 +234,43 @@ static int omap_start_ehc(struct platfor
+
+ #ifdef EXTERNAL_PHY_RESET
+ /* Refer: ISSUE1 */
++#ifndef CONFIG_MACH_OMAP3_BEAGLE
+ gpio_request(EXT_PHY_RESET_GPIO_PORT1, "USB1 PHY reset");
+ gpio_direction_output(EXT_PHY_RESET_GPIO_PORT1, 0);
++#endif
+ gpio_request(EXT_PHY_RESET_GPIO_PORT2, "USB2 PHY reset");
+ gpio_direction_output(EXT_PHY_RESET_GPIO_PORT2, 0);
++ gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 0);
+ /* Hold the PHY in RESET for enough time till DIR is high */
+ udelay(EXT_PHY_RESET_DELAY);
+ #endif
+
++ /*
++ * The PHY register 0x7 - Interface Control register is
++ * configured to disable the integrated STP pull-up resistor
++ * used for interface protection.
++ *
++ * May not need to be here.
++ */
++ omap_writel((0x7 << EHCI_INSNREG05_ULPI_REGADD_SHIFT) |/* interface reg */
++ (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT) |/* Write */
++ (1 << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) |/* Port1 */
++ (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT) |/* Start */
++ (PHY_STP_PULLUP_DISABLE),
++ EHCI_INSNREG05_ULPI);
++
++ while (!(omap_readl(EHCI_INSNREG05_ULPI) & (1<<EHCI_INSNREG05_ULPI_CONTROL_SHIFT)));
++
++ /* Force PHY to HS */
++ omap_writel((0x4 << EHCI_INSNREG05_ULPI_REGADD_SHIFT) |/* function ctrl */
++ (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT) |/* Write */
++ (1 << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) |/* Port1 */
++ (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT) |/* Start */
++ (0x40),
++ EHCI_INSNREG05_ULPI);
++
++ while (!(omap_readl(EHCI_INSNREG05_ULPI) & (1<<EHCI_INSNREG05_ULPI_CONTROL_SHIFT)));
++
+ /* Configure TLL for 60Mhz clk for ULPI */
+ ehci_clocks->usbtll_fck_clk = clk_get(&dev->dev, USBHOST_TLL_FCLK);
+ if (IS_ERR(ehci_clocks->usbtll_fck_clk))
+@@ -307,7 +345,9 @@ static int omap_start_ehc(struct platfor
+ * Hold the PHY in RESET for enough time till PHY is settled and ready
+ */
+ udelay(EXT_PHY_RESET_DELAY);
++#ifndef CONFIG_MACH_OMAP3_BEAGLE
+ gpio_set_value(EXT_PHY_RESET_GPIO_PORT1, 1);
++#endif
+ gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 1);
+ #endif
+
+@@ -393,7 +433,9 @@ static void omap_stop_ehc(struct platfor
+
+
+ #ifdef EXTERNAL_PHY_RESET
++#ifndef CONFIG_MACH_OMAP3_BEAGLE
+ gpio_free(EXT_PHY_RESET_GPIO_PORT1);
++#endif
+ gpio_free(EXT_PHY_RESET_GPIO_PORT2);
+ #endif
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/beagleboard/logo_linux_clut224.ppm b/recipes/linux/linux-omap-pm-2.6.29/beagleboard/logo_linux_clut224.ppm
new file mode 100644
index 0000000000..d29fc1c544
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/beagleboard/logo_linux_clut224.ppm
@@ -0,0 +1,73147 @@
+P3
+# CREATOR: GIMP PNM Filter Version 1.1
+387 63
+255
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+246
+116
+28
+246
+116
+28
+246
+116
+28
+246
+116
+28
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+118
+39
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+118
+39
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+118
+39
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+118
+39
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+118
+39
+246
+116
+28
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+130
+53
+248
+138
+64
+250
+139
+73
+247
+143
+74
+247
+143
+74
+249
+146
+83
+249
+146
+83
+249
+146
+83
+247
+143
+74
+250
+139
+73
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+118
+39
+246
+116
+28
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+53
+248
+138
+64
+250
+139
+73
+247
+143
+74
+247
+143
+74
+250
+139
+73
+248
+138
+64
+247
+130
+53
+247
+123
+41
+246
+116
+28
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+130
+60
+248
+138
+64
+247
+143
+74
+247
+143
+74
+247
+143
+74
+250
+139
+73
+247
+130
+60
+247
+130
+53
+247
+123
+41
+246
+116
+28
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+130
+53
+247
+130
+60
+250
+139
+73
+247
+143
+74
+247
+143
+74
+247
+143
+74
+248
+138
+64
+247
+130
+60
+247
+130
+53
+247
+118
+39
+247
+111
+26
+247
+111
+26
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+130
+60
+248
+138
+64
+247
+143
+74
+247
+143
+74
+247
+143
+74
+250
+139
+73
+247
+130
+60
+247
+130
+53
+247
+123
+41
+246
+116
+28
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+130
+53
+247
+130
+60
+250
+139
+73
+249
+146
+83
+249
+152
+92
+249
+159
+103
+249
+159
+103
+247
+165
+111
+251
+168
+115
+251
+168
+115
+247
+165
+111
+247
+165
+111
+249
+159
+103
+249
+152
+92
+249
+146
+83
+250
+139
+73
+247
+130
+60
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+60
+247
+143
+74
+247
+150
+84
+246
+156
+93
+249
+159
+103
+249
+159
+103
+246
+156
+93
+247
+150
+84
+250
+139
+73
+247
+130
+60
+247
+123
+41
+246
+116
+28
+247
+111
+26
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+123
+41
+248
+138
+64
+247
+143
+74
+249
+152
+92
+249
+159
+103
+249
+159
+103
+249
+159
+103
+246
+156
+93
+247
+150
+84
+250
+139
+73
+247
+130
+53
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+53
+248
+138
+64
+249
+146
+83
+249
+152
+92
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+152
+92
+249
+146
+83
+248
+138
+64
+247
+130
+53
+247
+118
+39
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+53
+248
+138
+64
+247
+143
+74
+249
+152
+92
+249
+159
+103
+249
+159
+103
+249
+159
+103
+246
+156
+93
+247
+150
+84
+250
+139
+73
+247
+130
+53
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+130
+60
+250
+139
+73
+247
+150
+84
+249
+159
+103
+247
+165
+111
+249
+174
+124
+248
+180
+134
+252
+185
+144
+240
+181
+138
+219
+170
+138
+219
+170
+138
+230
+173
+136
+240
+181
+138
+248
+180
+134
+249
+174
+124
+247
+165
+111
+249
+159
+103
+249
+146
+83
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+247
+130
+60
+247
+143
+74
+249
+159
+103
+214
+151
+109
+121
+100
+85
+65
+67
+64
+74
+68
+68
+129
+102
+78
+214
+151
+109
+246
+156
+93
+247
+143
+74
+247
+130
+53
+247
+118
+39
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+111
+26
+246
+116
+28
+247
+123
+41
+248
+138
+64
+249
+146
+83
+249
+159
+103
+204
+141
+99
+102
+91
+75
+65
+67
+64
+81
+77
+76
+146
+111
+88
+238
+159
+107
+249
+152
+92
+250
+139
+73
+247
+130
+53
+247
+118
+39
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+53
+248
+138
+64
+247
+150
+84
+245
+162
+103
+162
+125
+96
+81
+77
+76
+55
+66
+67
+99
+90
+79
+187
+140
+108
+249
+159
+103
+247
+150
+84
+248
+138
+64
+247
+123
+41
+246
+116
+28
+247
+111
+26
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+111
+26
+246
+116
+28
+247
+123
+41
+248
+138
+64
+249
+146
+83
+249
+159
+103
+187
+140
+108
+102
+91
+75
+58
+69
+70
+76
+78
+76
+146
+111
+88
+238
+159
+107
+249
+152
+92
+250
+139
+73
+247
+130
+53
+247
+118
+39
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+53
+248
+138
+64
+249
+146
+83
+249
+159
+103
+251
+168
+115
+248
+180
+134
+239
+182
+144
+186
+157
+134
+124
+111
+99
+82
+69
+65
+65
+58
+56
+55
+48
+48
+65
+58
+56
+65
+58
+56
+65
+58
+56
+99
+90
+79
+158
+130
+108
+230
+173
+136
+250
+176
+132
+247
+165
+111
+249
+152
+92
+247
+143
+74
+247
+130
+53
+247
+123
+41
+246
+116
+28
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+53
+250
+139
+73
+246
+156
+93
+214
+151
+109
+74
+68
+68
+56
+64
+60
+95
+87
+59
+88
+82
+59
+56
+64
+60
+81
+77
+76
+238
+159
+107
+249
+152
+92
+248
+138
+64
+247
+130
+53
+246
+116
+28
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+53
+247
+143
+74
+249
+159
+103
+187
+140
+108
+51
+62
+63
+69
+69
+61
+95
+87
+59
+83
+78
+61
+48
+58
+59
+121
+100
+85
+247
+165
+111
+247
+150
+84
+248
+138
+64
+247
+123
+41
+246
+116
+28
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+247
+130
+60
+247
+150
+84
+247
+165
+111
+139
+115
+96
+48
+58
+59
+95
+78
+64
+118
+86
+65
+81
+73
+62
+48
+58
+59
+162
+125
+96
+249
+159
+103
+249
+146
+83
+247
+130
+60
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+53
+247
+143
+74
+249
+159
+103
+187
+140
+108
+48
+58
+59
+76
+70
+64
+118
+86
+65
+95
+78
+64
+51
+62
+63
+121
+100
+85
+247
+165
+111
+247
+150
+84
+248
+138
+64
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+60
+247
+143
+74
+249
+152
+92
+247
+165
+111
+250
+176
+132
+251
+192
+154
+167
+142
+123
+65
+58
+56
+35
+31
+30
+71
+60
+43
+108
+87
+46
+129
+106
+52
+137
+110
+49
+156
+125
+62
+187
+166
+150
+129
+106
+52
+101
+83
+47
+59
+50
+39
+55
+48
+48
+139
+115
+96
+240
+181
+138
+249
+174
+124
+249
+159
+103
+247
+143
+74
+247
+130
+53
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+247
+130
+60
+247
+150
+84
+247
+165
+111
+124
+111
+99
+56
+64
+60
+137
+110
+49
+171
+129
+45
+171
+129
+45
+129
+106
+52
+51
+62
+63
+162
+125
+96
+247
+165
+111
+249
+146
+83
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+249
+152
+92
+245
+169
+119
+81
+77
+76
+69
+69
+61
+152
+119
+47
+171
+129
+45
+171
+129
+45
+105
+93
+60
+48
+58
+59
+187
+140
+108
+249
+159
+103
+247
+143
+74
+247
+130
+53
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+111
+26
+246
+116
+28
+247
+130
+53
+250
+139
+73
+249
+159
+103
+210
+156
+119
+51
+62
+63
+112
+85
+63
+234
+126
+45
+234
+126
+45
+225
+124
+48
+95
+78
+64
+63
+74
+74
+234
+168
+124
+246
+156
+93
+250
+139
+73
+247
+123
+41
+246
+116
+28
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+249
+152
+92
+245
+169
+119
+81
+77
+76
+81
+73
+62
+212
+120
+56
+234
+126
+45
+234
+126
+45
+135
+94
+64
+41
+58
+57
+187
+140
+108
+249
+159
+103
+247
+143
+74
+247
+130
+53
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+60
+249
+146
+83
+249
+159
+103
+249
+174
+124
+249
+189
+146
+236
+186
+153
+99
+90
+79
+47
+40
+38
+85
+71
+43
+145
+114
+49
+171
+129
+45
+171
+129
+45
+171
+129
+45
+168
+127
+42
+160
+120
+43
+195
+167
+113
+216
+194
+154
+168
+127
+42
+168
+127
+42
+123
+102
+54
+59
+50
+39
+82
+69
+65
+230
+173
+136
+249
+174
+124
+249
+159
+103
+247
+143
+74
+247
+130
+53
+247
+118
+39
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+246
+156
+93
+245
+169
+119
+84
+85
+82
+83
+78
+61
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+75
+74
+61
+101
+100
+92
+249
+174
+124
+246
+156
+93
+248
+138
+64
+247
+123
+41
+246
+116
+28
+247
+111
+26
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+53
+247
+143
+74
+249
+159
+103
+210
+156
+119
+48
+58
+59
+105
+93
+60
+171
+129
+45
+158
+125
+46
+161
+127
+40
+152
+119
+47
+62
+63
+61
+139
+115
+96
+251
+168
+115
+247
+150
+84
+247
+130
+60
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+53
+249
+146
+83
+247
+165
+111
+158
+130
+108
+51
+62
+63
+188
+112
+56
+234
+125
+52
+224
+123
+55
+234
+126
+45
+163
+104
+61
+48
+58
+59
+210
+156
+119
+247
+165
+111
+249
+146
+83
+247
+130
+60
+247
+118
+39
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+53
+247
+143
+74
+247
+165
+111
+210
+156
+119
+55
+66
+67
+146
+97
+64
+234
+126
+45
+224
+123
+55
+234
+125
+52
+199
+115
+54
+62
+63
+61
+139
+115
+96
+251
+168
+115
+247
+150
+84
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+60
+249
+146
+83
+249
+159
+103
+250
+176
+132
+219
+170
+138
+150
+125
+114
+65
+58
+56
+24
+22
+23
+59
+50
+39
+152
+119
+47
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+160
+120
+43
+158
+125
+46
+227
+196
+175
+192
+155
+91
+160
+120
+43
+171
+129
+45
+158
+125
+46
+85
+71
+43
+65
+58
+56
+219
+170
+138
+249
+174
+124
+246
+156
+93
+250
+139
+73
+247
+130
+53
+247
+118
+39
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+247
+103
+7
+246
+109
+10
+246
+116
+28
+247
+130
+53
+247
+143
+74
+249
+159
+103
+230
+173
+136
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+91
+92
+89
+252
+185
+144
+247
+165
+111
+249
+146
+83
+247
+130
+60
+247
+123
+41
+246
+116
+28
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+123
+41
+248
+138
+64
+249
+152
+92
+249
+174
+124
+203
+161
+131
+43
+57
+62
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+133
+120
+107
+250
+176
+132
+246
+156
+93
+248
+138
+64
+247
+123
+41
+246
+116
+28
+247
+111
+26
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+249
+152
+92
+249
+174
+124
+154
+133
+118
+56
+64
+60
+199
+115
+54
+227
+126
+50
+224
+123
+55
+234
+125
+52
+183
+110
+59
+51
+62
+63
+186
+157
+134
+250
+176
+132
+246
+156
+93
+250
+139
+73
+247
+130
+53
+247
+118
+39
+247
+111
+26
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+53
+250
+139
+73
+246
+156
+93
+249
+174
+124
+209
+171
+139
+51
+62
+63
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+133
+120
+107
+249
+174
+124
+246
+156
+93
+248
+138
+64
+247
+123
+41
+247
+111
+26
+246
+109
+10
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+53
+247
+143
+74
+249
+159
+103
+250
+176
+132
+158
+130
+108
+47
+40
+38
+59
+50
+39
+85
+71
+43
+85
+71
+43
+59
+50
+39
+35
+31
+30
+123
+102
+54
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+152
+119
+47
+192
+155
+91
+224
+207
+180
+158
+125
+46
+160
+120
+43
+168
+127
+42
+171
+129
+45
+71
+60
+43
+82
+69
+65
+239
+182
+144
+249
+174
+124
+249
+152
+92
+248
+138
+64
+247
+123
+41
+246
+116
+28
+247
+111
+26
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+53
+249
+146
+83
+247
+165
+111
+239
+182
+144
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+91
+92
+89
+250
+197
+158
+250
+176
+132
+249
+159
+103
+247
+143
+74
+247
+130
+60
+247
+123
+41
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+118
+39
+247
+118
+39
+246
+116
+28
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+116
+28
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+118
+39
+246
+116
+28
+246
+116
+28
+246
+116
+28
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+118
+39
+246
+116
+28
+246
+116
+28
+246
+116
+28
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+130
+60
+249
+146
+83
+249
+159
+103
+248
+180
+134
+212
+173
+150
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+65
+67
+64
+137
+127
+115
+248
+180
+134
+249
+159
+103
+247
+143
+74
+247
+130
+53
+247
+118
+39
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+118
+39
+247
+118
+39
+246
+116
+28
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+130
+53
+250
+139
+73
+249
+159
+103
+250
+176
+132
+167
+142
+123
+56
+64
+60
+199
+115
+54
+227
+126
+50
+224
+123
+55
+234
+125
+52
+173
+106
+60
+48
+58
+59
+187
+166
+150
+249
+189
+146
+251
+168
+115
+249
+152
+92
+250
+139
+73
+247
+130
+53
+247
+123
+41
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+118
+39
+246
+116
+28
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+118
+39
+246
+116
+28
+246
+116
+28
+246
+116
+28
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+53
+248
+138
+64
+247
+150
+84
+247
+165
+111
+252
+185
+144
+212
+173
+150
+51
+62
+63
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+133
+120
+107
+248
+180
+134
+249
+159
+103
+250
+139
+73
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+118
+39
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+103
+7
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+118
+39
+246
+116
+28
+246
+116
+28
+246
+116
+28
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+53
+250
+139
+73
+249
+159
+103
+250
+176
+132
+167
+142
+123
+24
+22
+23
+85
+71
+43
+158
+125
+46
+171
+129
+45
+171
+129
+45
+171
+129
+45
+85
+71
+43
+35
+31
+30
+145
+114
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+152
+119
+47
+216
+194
+154
+195
+167
+113
+152
+119
+47
+158
+125
+46
+168
+127
+42
+158
+125
+46
+59
+50
+39
+139
+115
+96
+252
+185
+144
+247
+165
+111
+247
+150
+84
+247
+130
+60
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+60
+247
+150
+84
+251
+168
+115
+236
+186
+153
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+91
+92
+89
+251
+209
+178
+249
+189
+146
+249
+174
+124
+249
+159
+103
+249
+146
+83
+248
+138
+64
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+123
+41
+246
+116
+28
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+118
+39
+246
+116
+28
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+248
+138
+64
+247
+143
+74
+246
+156
+93
+249
+174
+124
+251
+192
+154
+207
+178
+158
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+137
+127
+115
+249
+189
+146
+247
+165
+111
+247
+150
+84
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+118
+39
+247
+118
+39
+247
+123
+41
+247
+130
+60
+247
+143
+74
+249
+159
+103
+252
+185
+144
+167
+142
+123
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+234
+125
+52
+173
+106
+60
+51
+62
+63
+187
+166
+150
+250
+200
+166
+248
+180
+134
+247
+165
+111
+249
+152
+92
+247
+143
+74
+247
+130
+60
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+118
+39
+247
+118
+39
+247
+118
+39
+247
+118
+39
+247
+118
+39
+247
+118
+39
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+60
+250
+139
+73
+249
+152
+92
+247
+165
+111
+248
+180
+134
+250
+197
+158
+207
+178
+158
+51
+62
+63
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+252
+185
+144
+249
+159
+103
+247
+143
+74
+247
+130
+53
+246
+116
+28
+246
+109
+10
+247
+103
+7
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+118
+39
+247
+118
+39
+246
+116
+28
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+118
+39
+246
+116
+28
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+247
+150
+84
+251
+168
+115
+230
+173
+136
+47
+40
+38
+59
+50
+39
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+161
+127
+40
+171
+129
+45
+59
+50
+39
+71
+60
+43
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+152
+119
+47
+170
+137
+67
+239
+227
+208
+170
+137
+67
+160
+120
+43
+158
+125
+46
+171
+129
+45
+123
+102
+54
+47
+40
+38
+209
+171
+139
+248
+180
+134
+247
+165
+111
+249
+146
+83
+247
+130
+60
+247
+123
+41
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+111
+26
+247
+123
+41
+247
+130
+60
+247
+150
+84
+249
+174
+124
+236
+186
+153
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+91
+92
+89
+255
+215
+190
+253
+204
+176
+249
+189
+146
+249
+174
+124
+247
+165
+111
+246
+156
+93
+249
+146
+83
+247
+143
+74
+248
+138
+64
+247
+130
+60
+247
+130
+53
+247
+123
+41
+246
+116
+28
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+130
+53
+248
+138
+64
+250
+139
+73
+247
+143
+74
+249
+146
+83
+247
+150
+84
+249
+146
+83
+249
+146
+83
+247
+143
+74
+248
+138
+64
+247
+130
+60
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+130
+53
+248
+138
+64
+250
+139
+73
+247
+143
+74
+249
+146
+83
+249
+146
+83
+249
+146
+83
+249
+146
+83
+249
+146
+83
+247
+143
+74
+247
+143
+74
+250
+139
+73
+250
+139
+73
+248
+138
+64
+247
+130
+60
+247
+130
+53
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+60
+250
+139
+73
+247
+143
+74
+249
+146
+83
+249
+146
+83
+249
+146
+83
+249
+146
+83
+249
+146
+83
+247
+143
+74
+247
+143
+74
+247
+143
+74
+247
+143
+74
+247
+150
+84
+249
+159
+103
+249
+174
+124
+252
+185
+144
+250
+200
+166
+217
+187
+166
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+137
+127
+115
+251
+192
+154
+249
+174
+124
+246
+156
+93
+247
+143
+74
+248
+138
+64
+247
+130
+60
+247
+130
+60
+248
+138
+64
+250
+139
+73
+247
+143
+74
+249
+146
+83
+247
+150
+84
+249
+146
+83
+249
+146
+83
+247
+143
+74
+248
+138
+64
+247
+130
+60
+247
+130
+53
+247
+130
+53
+247
+130
+60
+250
+139
+73
+247
+150
+84
+251
+168
+115
+249
+189
+146
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+234
+125
+52
+173
+106
+60
+48
+58
+59
+187
+166
+150
+253
+212
+188
+250
+197
+158
+248
+180
+134
+251
+168
+115
+249
+159
+103
+247
+150
+84
+247
+143
+74
+250
+139
+73
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+130
+53
+248
+138
+64
+250
+139
+73
+247
+143
+74
+249
+146
+83
+247
+150
+84
+247
+150
+84
+249
+146
+83
+247
+143
+74
+250
+139
+73
+247
+130
+60
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+246
+109
+10
+246
+109
+10
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+130
+53
+247
+130
+60
+248
+138
+64
+247
+143
+74
+249
+146
+83
+249
+146
+83
+249
+146
+83
+249
+146
+83
+249
+146
+83
+247
+143
+74
+247
+143
+74
+247
+143
+74
+250
+139
+73
+250
+139
+73
+250
+139
+73
+248
+138
+64
+248
+138
+64
+248
+138
+64
+248
+138
+64
+248
+138
+64
+248
+138
+64
+250
+139
+73
+250
+139
+73
+250
+139
+73
+250
+139
+73
+247
+143
+74
+247
+143
+74
+250
+139
+73
+250
+139
+73
+248
+138
+64
+248
+138
+64
+247
+130
+60
+247
+130
+60
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+60
+247
+130
+60
+248
+138
+64
+250
+139
+73
+247
+143
+74
+247
+150
+84
+249
+159
+103
+251
+168
+115
+248
+180
+134
+250
+197
+158
+253
+212
+188
+207
+178
+158
+51
+62
+63
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+249
+189
+146
+247
+165
+111
+247
+143
+74
+247
+130
+53
+246
+116
+28
+246
+109
+10
+247
+103
+7
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+111
+26
+247
+118
+39
+247
+123
+41
+247
+130
+53
+247
+130
+60
+250
+139
+73
+247
+143
+74
+249
+146
+83
+247
+150
+84
+247
+150
+84
+249
+146
+83
+247
+143
+74
+250
+139
+73
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+118
+39
+247
+118
+39
+247
+118
+39
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+248
+138
+64
+248
+138
+64
+250
+139
+73
+250
+139
+73
+247
+143
+74
+247
+143
+74
+250
+139
+73
+250
+139
+73
+248
+138
+64
+247
+130
+60
+247
+130
+60
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+60
+248
+138
+64
+250
+139
+73
+247
+143
+74
+249
+146
+83
+249
+146
+83
+249
+146
+83
+249
+146
+83
+249
+146
+83
+247
+143
+74
+247
+143
+74
+250
+139
+73
+250
+139
+73
+248
+138
+64
+247
+130
+60
+247
+130
+53
+247
+123
+41
+247
+123
+41
+246
+116
+28
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+53
+247
+143
+74
+249
+159
+103
+252
+185
+144
+139
+115
+96
+35
+31
+30
+129
+106
+52
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+117
+98
+55
+35
+31
+30
+152
+119
+47
+168
+127
+42
+168
+127
+42
+160
+120
+43
+168
+127
+42
+171
+129
+45
+152
+119
+47
+216
+194
+154
+224
+207
+180
+160
+120
+43
+160
+120
+43
+137
+110
+49
+102
+91
+75
+35
+31
+30
+115
+102
+92
+250
+200
+166
+250
+176
+132
+249
+159
+103
+249
+146
+83
+247
+130
+60
+247
+123
+41
+246
+116
+28
+247
+111
+26
+246
+116
+28
+247
+123
+41
+248
+138
+64
+249
+152
+92
+249
+174
+124
+236
+186
+153
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+91
+92
+89
+255
+215
+190
+255
+215
+190
+253
+204
+176
+250
+197
+158
+252
+185
+144
+249
+174
+124
+251
+168
+115
+249
+159
+103
+246
+156
+93
+247
+150
+84
+250
+139
+73
+247
+130
+60
+247
+130
+53
+247
+123
+41
+247
+118
+39
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+130
+53
+248
+138
+64
+249
+146
+83
+249
+152
+92
+249
+159
+103
+247
+165
+111
+251
+168
+115
+251
+168
+115
+251
+168
+115
+251
+168
+115
+247
+165
+111
+249
+159
+103
+247
+150
+84
+247
+143
+74
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+118
+39
+246
+116
+28
+246
+116
+28
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+130
+60
+250
+139
+73
+249
+146
+83
+249
+152
+92
+249
+159
+103
+247
+165
+111
+251
+168
+115
+251
+168
+115
+251
+168
+115
+251
+168
+115
+247
+165
+111
+247
+165
+111
+247
+165
+111
+249
+159
+103
+249
+159
+103
+246
+156
+93
+247
+150
+84
+249
+146
+83
+247
+143
+74
+248
+138
+64
+247
+130
+60
+247
+130
+60
+247
+130
+60
+248
+138
+64
+250
+139
+73
+249
+146
+83
+249
+152
+92
+249
+159
+103
+249
+159
+103
+247
+165
+111
+251
+168
+115
+251
+168
+115
+251
+168
+115
+251
+168
+115
+247
+165
+111
+247
+165
+111
+249
+159
+103
+247
+165
+111
+251
+168
+115
+250
+176
+132
+252
+185
+144
+250
+200
+166
+255
+215
+190
+217
+187
+166
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+65
+67
+64
+137
+127
+115
+250
+200
+166
+250
+176
+132
+247
+165
+111
+249
+152
+92
+247
+150
+84
+249
+146
+83
+247
+150
+84
+249
+152
+92
+249
+159
+103
+247
+165
+111
+251
+168
+115
+251
+168
+115
+251
+168
+115
+247
+165
+111
+249
+159
+103
+246
+156
+93
+247
+150
+84
+247
+143
+74
+250
+139
+73
+247
+143
+74
+249
+146
+83
+249
+159
+103
+249
+174
+124
+251
+192
+154
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+173
+106
+60
+51
+62
+63
+187
+166
+150
+255
+215
+190
+253
+212
+188
+250
+200
+166
+249
+189
+146
+248
+180
+134
+249
+174
+124
+247
+165
+111
+249
+159
+103
+249
+152
+92
+247
+143
+74
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+118
+39
+246
+116
+28
+247
+111
+26
+246
+116
+28
+247
+118
+39
+247
+123
+41
+247
+130
+53
+248
+138
+64
+247
+143
+74
+249
+152
+92
+249
+159
+103
+247
+165
+111
+251
+168
+115
+251
+168
+115
+251
+168
+115
+251
+168
+115
+247
+165
+111
+249
+159
+103
+249
+152
+92
+247
+143
+74
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+111
+26
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+53
+248
+138
+64
+247
+143
+74
+247
+150
+84
+249
+159
+103
+249
+159
+103
+247
+165
+111
+251
+168
+115
+251
+168
+115
+251
+168
+115
+251
+168
+115
+247
+165
+111
+247
+165
+111
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+246
+156
+93
+246
+156
+93
+246
+156
+93
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+152
+92
+249
+152
+92
+247
+150
+84
+249
+146
+83
+249
+146
+83
+249
+146
+83
+247
+150
+84
+249
+152
+92
+246
+156
+93
+249
+159
+103
+247
+165
+111
+249
+174
+124
+250
+176
+132
+249
+189
+146
+250
+200
+166
+253
+212
+188
+255
+215
+190
+207
+178
+158
+51
+62
+63
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+249
+189
+146
+247
+165
+111
+247
+143
+74
+247
+130
+53
+246
+116
+28
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+53
+248
+138
+64
+247
+143
+74
+247
+150
+84
+249
+159
+103
+247
+165
+111
+251
+168
+115
+251
+168
+115
+251
+168
+115
+251
+168
+115
+247
+165
+111
+249
+159
+103
+249
+152
+92
+249
+146
+83
+250
+139
+73
+247
+130
+60
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+60
+248
+138
+64
+247
+143
+74
+249
+146
+83
+249
+152
+92
+246
+156
+93
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+249
+159
+103
+246
+156
+93
+249
+152
+92
+247
+150
+84
+249
+146
+83
+247
+143
+74
+247
+143
+74
+247
+143
+74
+249
+146
+83
+247
+150
+84
+246
+156
+93
+249
+159
+103
+247
+165
+111
+247
+165
+111
+251
+168
+115
+251
+168
+115
+251
+168
+115
+247
+165
+111
+247
+165
+111
+247
+165
+111
+249
+159
+103
+249
+159
+103
+246
+156
+93
+247
+150
+84
+247
+143
+74
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+111
+26
+246
+109
+10
+247
+103
+7
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+249
+152
+92
+249
+174
+124
+236
+186
+153
+47
+40
+38
+59
+50
+39
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+47
+40
+38
+108
+87
+46
+168
+127
+42
+111
+94
+57
+76
+70
+64
+59
+50
+39
+101
+83
+47
+160
+120
+43
+170
+137
+67
+253
+255
+252
+195
+167
+113
+145
+114
+49
+69
+69
+61
+120
+114
+108
+35
+31
+30
+47
+40
+38
+217
+187
+166
+250
+197
+158
+250
+176
+132
+249
+159
+103
+249
+146
+83
+248
+138
+64
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+130
+53
+250
+139
+73
+246
+156
+93
+250
+176
+132
+232
+190
+161
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+91
+92
+89
+255
+215
+190
+255
+215
+190
+245
+212
+186
+227
+196
+175
+212
+173
+150
+209
+171
+139
+219
+170
+138
+240
+181
+138
+250
+176
+132
+251
+168
+115
+249
+159
+103
+247
+150
+84
+250
+139
+73
+247
+130
+60
+247
+130
+53
+247
+130
+53
+247
+130
+53
+247
+130
+53
+248
+138
+64
+249
+146
+83
+246
+156
+93
+247
+165
+111
+249
+174
+124
+248
+180
+134
+240
+181
+138
+219
+170
+138
+203
+161
+131
+203
+161
+131
+219
+170
+138
+240
+181
+138
+250
+176
+132
+249
+174
+124
+249
+159
+103
+249
+152
+92
+247
+143
+74
+247
+130
+60
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+53
+248
+138
+64
+249
+146
+83
+246
+156
+93
+247
+165
+111
+249
+174
+124
+245
+179
+138
+230
+173
+136
+203
+161
+131
+203
+161
+131
+219
+170
+138
+239
+182
+144
+251
+192
+154
+249
+189
+146
+252
+185
+144
+252
+185
+144
+248
+180
+134
+245
+169
+119
+234
+168
+124
+247
+165
+111
+249
+159
+103
+249
+152
+92
+247
+150
+84
+247
+150
+84
+247
+150
+84
+249
+152
+92
+249
+159
+103
+247
+165
+111
+249
+174
+124
+248
+180
+134
+230
+173
+136
+219
+170
+138
+203
+161
+131
+209
+171
+139
+239
+182
+144
+251
+192
+154
+249
+189
+146
+249
+189
+146
+252
+185
+144
+252
+185
+144
+249
+189
+146
+236
+186
+153
+250
+200
+166
+255
+215
+190
+255
+215
+190
+217
+187
+166
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+65
+67
+64
+137
+127
+115
+253
+204
+176
+252
+185
+144
+249
+174
+124
+247
+165
+111
+247
+165
+111
+247
+165
+111
+251
+168
+115
+249
+174
+124
+248
+180
+134
+230
+173
+136
+219
+170
+138
+203
+161
+131
+209
+171
+139
+230
+173
+136
+245
+179
+138
+250
+176
+132
+251
+168
+115
+249
+159
+103
+249
+159
+103
+246
+156
+93
+249
+159
+103
+251
+168
+115
+248
+180
+134
+250
+197
+158
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+173
+106
+60
+51
+62
+63
+187
+166
+150
+255
+215
+190
+255
+215
+190
+234
+204
+183
+207
+178
+158
+209
+171
+139
+209
+171
+139
+230
+173
+136
+248
+180
+134
+249
+174
+124
+247
+165
+111
+249
+152
+92
+247
+143
+74
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+130
+53
+248
+138
+64
+247
+143
+74
+249
+152
+92
+247
+165
+111
+249
+174
+124
+248
+180
+134
+240
+181
+138
+219
+170
+138
+203
+161
+131
+203
+161
+131
+219
+170
+138
+240
+181
+138
+248
+180
+134
+249
+174
+124
+247
+165
+111
+249
+152
+92
+247
+143
+74
+248
+138
+64
+247
+130
+53
+247
+123
+41
+247
+123
+41
+247
+123
+41
+247
+130
+53
+247
+130
+60
+247
+143
+74
+249
+152
+92
+249
+159
+103
+249
+174
+124
+250
+176
+132
+240
+181
+138
+219
+170
+138
+203
+161
+131
+203
+161
+131
+230
+173
+136
+251
+192
+154
+249
+189
+146
+249
+189
+146
+252
+185
+144
+252
+185
+144
+248
+180
+134
+234
+168
+124
+250
+176
+132
+248
+180
+134
+250
+176
+132
+250
+176
+132
+250
+176
+132
+248
+180
+134
+248
+180
+134
+230
+173
+136
+240
+181
+138
+252
+185
+144
+252
+185
+144
+252
+185
+144
+252
+185
+144
+248
+180
+134
+234
+168
+124
+234
+168
+124
+249
+174
+124
+251
+168
+115
+247
+165
+111
+247
+165
+111
+247
+165
+111
+251
+168
+115
+249
+174
+124
+250
+176
+132
+248
+180
+134
+230
+173
+136
+219
+170
+138
+209
+171
+139
+207
+178
+158
+227
+196
+175
+253
+212
+188
+255
+215
+190
+217
+187
+166
+51
+62
+63
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+249
+189
+146
+247
+165
+111
+247
+143
+74
+247
+130
+53
+246
+116
+28
+247
+111
+26
+246
+109
+10
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+60
+247
+143
+74
+249
+152
+92
+249
+159
+103
+249
+174
+124
+248
+180
+134
+240
+181
+138
+219
+170
+138
+203
+161
+131
+203
+161
+131
+219
+170
+138
+240
+181
+138
+248
+180
+134
+249
+174
+124
+247
+165
+111
+249
+159
+103
+247
+150
+84
+249
+146
+83
+247
+143
+74
+247
+143
+74
+249
+146
+83
+249
+152
+92
+249
+159
+103
+247
+165
+111
+234
+168
+124
+234
+168
+124
+248
+180
+134
+252
+185
+144
+252
+185
+144
+252
+185
+144
+248
+180
+134
+250
+176
+132
+234
+168
+124
+249
+174
+124
+251
+168
+115
+247
+165
+111
+247
+165
+111
+249
+159
+103
+247
+165
+111
+251
+168
+115
+249
+174
+124
+250
+176
+132
+248
+180
+134
+230
+173
+136
+203
+161
+131
+203
+161
+131
+219
+170
+138
+239
+182
+144
+251
+192
+154
+249
+189
+146
+252
+185
+144
+252
+185
+144
+248
+180
+134
+234
+168
+124
+238
+159
+107
+247
+165
+111
+249
+152
+92
+247
+143
+74
+247
+130
+60
+247
+123
+41
+246
+116
+28
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+111
+26
+246
+116
+28
+247
+130
+53
+247
+143
+74
+247
+165
+111
+252
+185
+144
+154
+133
+118
+24
+22
+23
+108
+87
+46
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+71
+60
+43
+85
+71
+43
+101
+83
+47
+89
+84
+82
+152
+147
+147
+24
+22
+23
+24
+22
+23
+108
+87
+46
+168
+127
+42
+224
+207
+180
+253
+255
+252
+209
+171
+139
+101
+83
+47
+24
+22
+23
+35
+31
+30
+35
+31
+30
+167
+142
+123
+253
+212
+188
+250
+197
+158
+248
+180
+134
+247
+165
+111
+247
+150
+84
+250
+139
+73
+247
+130
+60
+247
+130
+60
+248
+138
+64
+249
+146
+83
+249
+159
+103
+250
+176
+132
+232
+190
+161
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+97
+98
+96
+217
+187
+166
+137
+127
+115
+91
+92
+89
+55
+66
+67
+48
+58
+59
+48
+58
+59
+55
+66
+67
+84
+85
+82
+133
+120
+107
+209
+171
+139
+248
+180
+134
+251
+168
+115
+249
+159
+103
+247
+150
+84
+247
+143
+74
+250
+139
+73
+250
+139
+73
+249
+146
+83
+249
+152
+92
+247
+165
+111
+249
+174
+124
+245
+179
+138
+178
+146
+122
+124
+111
+99
+76
+78
+76
+51
+62
+63
+48
+58
+59
+48
+58
+59
+58
+69
+70
+91
+92
+89
+144
+125
+110
+203
+161
+131
+248
+180
+134
+249
+174
+124
+249
+159
+103
+247
+150
+84
+247
+143
+74
+248
+138
+64
+248
+138
+64
+250
+139
+73
+249
+146
+83
+246
+156
+93
+247
+165
+111
+250
+176
+132
+230
+173
+136
+154
+133
+118
+101
+100
+92
+58
+69
+70
+48
+58
+59
+48
+58
+59
+51
+62
+63
+84
+85
+82
+137
+127
+115
+217
+187
+166
+253
+212
+188
+227
+196
+175
+144
+125
+110
+89
+84
+82
+81
+77
+76
+115
+102
+92
+210
+156
+119
+249
+174
+124
+251
+168
+115
+251
+168
+115
+251
+168
+115
+249
+174
+124
+250
+176
+132
+252
+185
+144
+195
+157
+134
+124
+111
+99
+76
+78
+76
+51
+62
+63
+48
+58
+59
+48
+58
+59
+70
+79
+77
+120
+114
+108
+187
+166
+150
+253
+212
+188
+253
+212
+188
+172
+150
+134
+101
+100
+92
+77
+85
+81
+101
+100
+92
+176
+156
+141
+255
+215
+190
+217
+187
+166
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+137
+127
+115
+253
+212
+188
+250
+197
+158
+252
+185
+144
+248
+180
+134
+248
+180
+134
+252
+185
+144
+239
+182
+144
+167
+142
+123
+109
+106
+99
+70
+79
+77
+48
+58
+59
+48
+58
+59
+48
+58
+59
+58
+69
+70
+91
+92
+89
+150
+125
+114
+219
+170
+138
+248
+180
+134
+249
+174
+124
+249
+174
+124
+249
+174
+124
+250
+176
+132
+249
+189
+146
+253
+204
+176
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+234
+125
+52
+183
+110
+59
+51
+62
+63
+176
+156
+141
+187
+166
+150
+109
+106
+99
+63
+74
+74
+43
+57
+62
+43
+57
+62
+43
+57
+62
+63
+74
+74
+109
+106
+99
+178
+146
+122
+245
+179
+138
+249
+174
+124
+249
+159
+103
+247
+150
+84
+247
+143
+74
+248
+138
+64
+248
+138
+64
+248
+138
+64
+247
+143
+74
+247
+150
+84
+249
+159
+103
+249
+174
+124
+252
+185
+144
+195
+157
+134
+124
+111
+99
+77
+85
+81
+51
+62
+63
+41
+58
+57
+43
+57
+62
+51
+62
+63
+77
+85
+81
+124
+111
+99
+195
+157
+134
+252
+185
+144
+249
+174
+124
+249
+159
+103
+247
+150
+84
+247
+143
+74
+248
+138
+64
+247
+130
+60
+248
+138
+64
+250
+139
+73
+247
+150
+84
+249
+159
+103
+251
+168
+115
+248
+180
+134
+203
+161
+131
+124
+111
+99
+77
+85
+81
+48
+58
+59
+43
+57
+62
+43
+57
+62
+63
+74
+74
+109
+106
+99
+187
+166
+150
+253
+212
+188
+253
+212
+188
+187
+166
+150
+109
+106
+99
+77
+85
+81
+84
+85
+82
+150
+125
+114
+232
+190
+161
+253
+204
+176
+253
+204
+176
+172
+150
+134
+101
+100
+92
+77
+85
+81
+91
+92
+89
+137
+127
+115
+227
+196
+175
+253
+212
+188
+186
+157
+134
+109
+106
+99
+77
+85
+81
+84
+85
+82
+124
+111
+99
+219
+170
+138
+249
+189
+146
+249
+189
+146
+249
+189
+146
+251
+192
+154
+250
+197
+158
+186
+157
+134
+109
+106
+99
+70
+79
+77
+43
+57
+62
+43
+57
+62
+41
+58
+57
+63
+74
+74
+101
+100
+92
+176
+156
+141
+194
+173
+157
+55
+66
+67
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+249
+189
+146
+247
+165
+111
+247
+143
+74
+247
+130
+53
+247
+118
+39
+247
+111
+26
+246
+109
+10
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+60
+249
+146
+83
+249
+159
+103
+249
+174
+124
+252
+185
+144
+203
+161
+131
+133
+120
+107
+84
+85
+82
+55
+66
+67
+43
+57
+62
+41
+58
+57
+51
+62
+63
+77
+85
+81
+124
+111
+99
+178
+146
+122
+239
+182
+144
+250
+176
+132
+249
+174
+124
+247
+165
+111
+249
+159
+103
+249
+159
+103
+247
+165
+111
+249
+174
+124
+210
+156
+119
+124
+111
+99
+77
+85
+81
+77
+85
+81
+109
+106
+99
+194
+173
+157
+253
+212
+188
+217
+187
+166
+133
+120
+107
+89
+84
+82
+76
+78
+76
+101
+100
+92
+178
+146
+122
+249
+189
+146
+252
+185
+144
+252
+185
+144
+252
+185
+144
+251
+192
+154
+236
+186
+153
+167
+142
+123
+101
+100
+92
+63
+74
+74
+41
+58
+57
+43
+57
+62
+51
+62
+63
+77
+85
+81
+137
+127
+115
+217
+187
+166
+253
+212
+188
+227
+196
+175
+144
+125
+110
+84
+85
+82
+76
+78
+76
+115
+102
+92
+204
+141
+99
+249
+159
+103
+247
+143
+74
+247
+130
+60
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+249
+152
+92
+249
+174
+124
+250
+197
+158
+82
+69
+65
+47
+40
+38
+152
+119
+47
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+101
+83
+47
+59
+50
+39
+101
+83
+47
+24
+22
+23
+35
+31
+30
+24
+22
+23
+24
+22
+23
+108
+87
+46
+168
+127
+42
+195
+167
+113
+253
+255
+252
+253
+255
+252
+239
+227
+208
+186
+157
+134
+162
+125
+96
+105
+93
+60
+47
+40
+38
+150
+125
+114
+217
+187
+166
+250
+200
+166
+252
+185
+144
+251
+168
+115
+246
+156
+93
+249
+146
+83
+247
+143
+74
+249
+146
+83
+249
+152
+92
+247
+165
+111
+252
+185
+144
+232
+190
+161
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+55
+66
+67
+58
+69
+70
+56
+64
+60
+83
+78
+61
+105
+93
+60
+117
+98
+55
+117
+98
+55
+105
+93
+60
+83
+78
+61
+56
+64
+60
+55
+66
+67
+144
+125
+110
+239
+182
+144
+250
+176
+132
+247
+165
+111
+249
+159
+103
+246
+156
+93
+249
+159
+103
+247
+165
+111
+249
+174
+124
+252
+185
+144
+195
+157
+134
+89
+84
+82
+48
+58
+59
+63
+69
+60
+95
+87
+59
+111
+94
+57
+123
+102
+54
+117
+98
+55
+105
+93
+60
+83
+78
+61
+56
+64
+60
+51
+62
+63
+124
+111
+99
+219
+170
+138
+248
+180
+134
+251
+168
+115
+249
+159
+103
+249
+152
+92
+249
+152
+92
+246
+156
+93
+247
+165
+111
+249
+174
+124
+252
+185
+144
+167
+142
+123
+70
+79
+77
+51
+62
+63
+75
+74
+61
+100
+89
+56
+117
+98
+55
+123
+102
+54
+105
+93
+60
+83
+78
+61
+51
+62
+63
+63
+74
+74
+172
+150
+134
+109
+106
+99
+51
+62
+63
+83
+78
+61
+95
+87
+59
+65
+67
+64
+65
+67
+64
+209
+171
+139
+249
+189
+146
+249
+189
+146
+249
+189
+146
+250
+197
+158
+212
+173
+150
+109
+106
+99
+48
+58
+59
+63
+69
+60
+95
+87
+59
+111
+94
+57
+123
+102
+54
+117
+98
+55
+95
+87
+59
+62
+63
+61
+48
+58
+59
+137
+127
+115
+146
+135
+124
+48
+58
+59
+75
+74
+61
+95
+87
+59
+75
+74
+61
+48
+58
+59
+161
+144
+134
+217
+187
+166
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+137
+127
+115
+255
+215
+190
+251
+209
+178
+250
+200
+166
+250
+200
+166
+250
+200
+166
+172
+150
+134
+77
+85
+81
+48
+58
+59
+69
+69
+61
+95
+87
+59
+111
+94
+57
+123
+102
+54
+117
+98
+55
+100
+89
+56
+75
+74
+61
+56
+64
+60
+55
+66
+67
+133
+120
+107
+236
+186
+153
+251
+192
+154
+249
+189
+146
+251
+192
+154
+250
+200
+166
+253
+212
+188
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+173
+106
+60
+51
+62
+63
+63
+74
+74
+48
+58
+59
+76
+70
+64
+118
+86
+65
+146
+97
+64
+155
+100
+63
+146
+97
+64
+118
+86
+65
+76
+70
+64
+43
+57
+62
+91
+92
+89
+203
+161
+131
+248
+180
+134
+251
+168
+115
+249
+159
+103
+249
+152
+92
+247
+150
+84
+249
+152
+92
+249
+159
+103
+251
+168
+115
+248
+180
+134
+209
+171
+139
+101
+100
+92
+43
+57
+62
+69
+69
+61
+106
+82
+65
+135
+94
+64
+155
+100
+63
+155
+100
+63
+135
+94
+64
+106
+82
+65
+65
+67
+64
+43
+57
+62
+101
+100
+92
+209
+171
+139
+248
+180
+134
+251
+168
+115
+249
+159
+103
+249
+152
+92
+247
+150
+84
+247
+150
+84
+246
+156
+93
+247
+165
+111
+250
+176
+132
+219
+170
+138
+124
+111
+99
+48
+58
+59
+62
+63
+61
+106
+82
+65
+139
+96
+61
+155
+100
+63
+146
+97
+64
+125
+90
+64
+76
+70
+64
+41
+58
+57
+120
+114
+108
+172
+150
+134
+51
+62
+63
+69
+69
+61
+112
+85
+63
+95
+78
+64
+51
+62
+63
+120
+114
+108
+245
+212
+186
+146
+135
+124
+43
+57
+62
+81
+73
+62
+118
+86
+65
+95
+78
+64
+56
+64
+60
+101
+100
+92
+133
+120
+107
+43
+57
+62
+76
+70
+64
+112
+85
+63
+106
+82
+65
+62
+63
+61
+77
+85
+81
+227
+196
+175
+253
+212
+188
+253
+212
+188
+217
+187
+166
+109
+106
+99
+41
+58
+57
+69
+69
+61
+112
+85
+63
+139
+96
+61
+155
+100
+63
+146
+97
+64
+118
+86
+65
+81
+73
+62
+48
+58
+59
+58
+69
+70
+51
+62
+63
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+247
+165
+111
+249
+146
+83
+247
+130
+53
+247
+118
+39
+247
+111
+26
+247
+111
+26
+246
+116
+28
+247
+123
+41
+248
+138
+64
+249
+146
+83
+249
+159
+103
+250
+176
+132
+219
+170
+138
+124
+111
+99
+43
+57
+62
+62
+63
+61
+106
+82
+65
+135
+94
+64
+155
+100
+63
+155
+100
+63
+139
+96
+61
+106
+82
+65
+69
+69
+61
+43
+57
+62
+91
+92
+89
+195
+157
+134
+251
+192
+154
+252
+185
+144
+248
+180
+134
+248
+180
+134
+252
+185
+144
+203
+161
+131
+63
+74
+74
+62
+63
+61
+106
+82
+65
+112
+85
+63
+69
+69
+61
+55
+66
+67
+146
+135
+124
+63
+74
+74
+56
+64
+60
+95
+78
+64
+112
+85
+63
+76
+70
+64
+48
+58
+59
+172
+150
+134
+253
+204
+176
+251
+209
+178
+251
+209
+178
+187
+166
+150
+77
+85
+81
+48
+58
+59
+81
+73
+62
+125
+90
+64
+146
+97
+64
+155
+100
+63
+139
+96
+61
+95
+78
+64
+56
+64
+60
+58
+69
+70
+161
+144
+134
+109
+106
+99
+51
+62
+63
+95
+78
+64
+112
+85
+63
+65
+67
+64
+65
+67
+64
+204
+141
+99
+246
+156
+93
+250
+139
+73
+247
+130
+53
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+246
+116
+28
+247
+130
+53
+247
+143
+74
+249
+159
+103
+252
+185
+144
+209
+171
+139
+24
+22
+23
+85
+71
+43
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+137
+110
+49
+47
+40
+38
+137
+110
+49
+101
+83
+47
+59
+50
+39
+59
+50
+39
+101
+83
+47
+158
+125
+46
+160
+120
+43
+192
+155
+91
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+237
+233
+225
+152
+147
+147
+81
+77
+76
+55
+48
+48
+115
+102
+92
+212
+173
+150
+251
+192
+154
+249
+174
+124
+247
+165
+111
+249
+159
+103
+249
+159
+103
+247
+165
+111
+249
+174
+124
+249
+189
+146
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+43
+57
+62
+95
+87
+59
+145
+114
+49
+168
+127
+42
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+168
+127
+42
+145
+114
+49
+95
+87
+59
+48
+58
+59
+109
+106
+99
+236
+186
+153
+252
+185
+144
+248
+180
+134
+250
+176
+132
+250
+176
+132
+252
+185
+144
+251
+192
+154
+150
+125
+114
+48
+58
+59
+69
+69
+61
+117
+98
+55
+158
+125
+46
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+168
+127
+42
+152
+119
+47
+100
+89
+56
+56
+64
+60
+63
+74
+74
+186
+157
+134
+249
+189
+146
+248
+180
+134
+249
+174
+124
+249
+174
+124
+250
+176
+132
+252
+185
+144
+251
+192
+154
+133
+120
+107
+48
+58
+59
+75
+74
+61
+137
+110
+49
+168
+127
+42
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+145
+114
+49
+75
+74
+61
+43
+57
+62
+51
+62
+63
+123
+102
+54
+171
+129
+45
+171
+129
+45
+145
+114
+49
+56
+64
+60
+133
+120
+107
+253
+212
+188
+251
+209
+178
+253
+212
+188
+194
+173
+157
+63
+74
+74
+56
+64
+60
+111
+94
+57
+158
+125
+46
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+158
+125
+46
+105
+93
+60
+51
+62
+63
+43
+57
+62
+88
+82
+59
+168
+127
+42
+171
+129
+45
+168
+127
+42
+88
+82
+59
+63
+74
+74
+187
+166
+150
+55
+66
+67
+111
+94
+57
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+137
+127
+115
+255
+215
+190
+255
+215
+190
+255
+215
+190
+245
+212
+186
+133
+120
+107
+48
+58
+59
+75
+74
+61
+129
+106
+52
+158
+125
+46
+171
+129
+45
+171
+129
+45
+171
+129
+45
+168
+127
+42
+171
+129
+45
+168
+127
+42
+145
+114
+49
+95
+87
+59
+51
+62
+63
+77
+85
+81
+212
+173
+150
+253
+204
+176
+253
+204
+176
+251
+209
+178
+255
+215
+190
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+41
+58
+57
+69
+69
+61
+155
+100
+63
+214
+121
+50
+234
+126
+45
+234
+126
+45
+234
+126
+45
+234
+126
+45
+234
+126
+45
+224
+123
+55
+155
+100
+63
+69
+69
+61
+51
+62
+63
+178
+146
+122
+249
+189
+146
+250
+176
+132
+251
+168
+115
+251
+168
+115
+249
+174
+124
+250
+176
+132
+249
+189
+146
+167
+142
+123
+55
+66
+67
+65
+67
+64
+146
+97
+64
+212
+120
+56
+234
+126
+45
+234
+125
+52
+234
+126
+45
+234
+125
+52
+234
+126
+45
+234
+125
+52
+209
+117
+53
+146
+97
+64
+65
+67
+64
+55
+66
+67
+178
+146
+122
+249
+189
+146
+250
+176
+132
+251
+168
+115
+247
+165
+111
+251
+168
+115
+249
+174
+124
+252
+185
+144
+203
+161
+131
+63
+74
+74
+56
+64
+60
+125
+90
+64
+209
+117
+53
+234
+126
+45
+234
+126
+45
+234
+125
+52
+234
+126
+45
+234
+126
+45
+214
+121
+50
+146
+97
+64
+56
+64
+60
+41
+58
+57
+81
+73
+62
+209
+117
+53
+234
+126
+45
+234
+126
+45
+125
+90
+64
+51
+62
+63
+176
+156
+141
+55
+66
+67
+106
+82
+65
+225
+124
+48
+234
+126
+45
+234
+126
+45
+146
+97
+64
+41
+58
+57
+43
+57
+62
+125
+90
+64
+214
+121
+50
+234
+126
+45
+234
+126
+45
+183
+110
+59
+56
+64
+60
+137
+127
+115
+255
+215
+190
+194
+173
+157
+63
+74
+74
+62
+63
+61
+146
+97
+64
+214
+121
+50
+234
+125
+52
+234
+126
+45
+234
+125
+52
+234
+125
+52
+234
+126
+45
+225
+124
+48
+173
+106
+60
+81
+73
+62
+35
+56
+60
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+247
+165
+111
+249
+146
+83
+247
+130
+53
+247
+118
+39
+246
+116
+28
+246
+116
+28
+247
+123
+41
+247
+130
+60
+249
+146
+83
+247
+165
+111
+248
+180
+134
+186
+157
+134
+58
+69
+70
+56
+64
+60
+135
+94
+64
+199
+115
+54
+234
+125
+52
+234
+126
+45
+234
+125
+52
+234
+125
+52
+234
+126
+45
+234
+125
+52
+212
+120
+56
+155
+100
+63
+76
+70
+64
+51
+62
+63
+146
+135
+124
+251
+209
+178
+253
+204
+176
+250
+200
+166
+253
+204
+176
+101
+100
+92
+69
+69
+61
+194
+112
+58
+234
+126
+45
+234
+126
+45
+199
+115
+54
+65
+67
+64
+35
+56
+60
+81
+73
+62
+194
+112
+58
+234
+125
+52
+234
+126
+45
+214
+121
+50
+95
+78
+64
+63
+74
+74
+238
+205
+179
+255
+215
+190
+161
+144
+134
+43
+57
+62
+81
+73
+62
+173
+106
+60
+225
+124
+48
+234
+126
+45
+234
+126
+45
+234
+125
+52
+234
+126
+45
+234
+126
+45
+194
+112
+58
+95
+78
+64
+41
+58
+57
+48
+58
+59
+155
+100
+63
+234
+126
+45
+234
+126
+45
+199
+115
+54
+69
+69
+61
+99
+90
+79
+251
+168
+115
+247
+150
+84
+247
+130
+60
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+60
+247
+150
+84
+249
+174
+124
+251
+192
+154
+124
+111
+99
+35
+31
+30
+137
+110
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+47
+40
+38
+108
+87
+46
+175
+132
+40
+161
+127
+40
+168
+127
+42
+171
+129
+45
+158
+125
+46
+152
+119
+47
+203
+161
+131
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+186
+181
+179
+89
+84
+82
+47
+40
+38
+139
+115
+96
+236
+186
+153
+252
+185
+144
+250
+176
+132
+249
+174
+124
+250
+176
+132
+252
+185
+144
+250
+197
+158
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+111
+94
+57
+171
+129
+45
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+111
+94
+57
+48
+58
+59
+109
+106
+99
+253
+204
+176
+250
+200
+166
+250
+200
+166
+250
+200
+166
+253
+204
+176
+137
+127
+115
+43
+57
+62
+88
+82
+59
+158
+125
+46
+171
+129
+45
+161
+127
+40
+158
+125
+46
+158
+125
+46
+168
+127
+42
+161
+127
+40
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+145
+114
+49
+69
+69
+61
+51
+62
+63
+187
+166
+150
+250
+200
+166
+250
+197
+158
+251
+192
+154
+250
+197
+158
+253
+204
+176
+133
+120
+107
+48
+58
+59
+95
+87
+59
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+158
+125
+46
+75
+74
+61
+62
+63
+61
+168
+127
+42
+161
+127
+40
+158
+125
+46
+171
+129
+45
+83
+78
+61
+91
+92
+89
+255
+215
+190
+255
+215
+190
+207
+178
+158
+58
+69
+70
+63
+69
+60
+145
+114
+49
+171
+129
+45
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+105
+93
+60
+43
+57
+62
+137
+110
+49
+171
+129
+45
+158
+125
+46
+171
+129
+45
+137
+110
+49
+51
+62
+63
+146
+135
+124
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+152
+119
+47
+65
+67
+64
+137
+127
+115
+255
+215
+190
+255
+215
+190
+245
+212
+186
+120
+114
+108
+48
+58
+59
+100
+89
+56
+168
+127
+42
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+129
+106
+52
+61
+67
+58
+63
+74
+74
+207
+178
+158
+255
+215
+190
+255
+215
+190
+255
+215
+190
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+234
+125
+52
+173
+106
+60
+95
+78
+64
+209
+117
+53
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+209
+117
+53
+89
+75
+66
+51
+62
+63
+187
+166
+150
+250
+197
+158
+251
+192
+154
+249
+189
+146
+251
+192
+154
+250
+200
+166
+161
+144
+134
+41
+58
+57
+95
+78
+64
+199
+115
+54
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+199
+115
+54
+89
+75
+66
+41
+58
+57
+167
+142
+123
+250
+200
+166
+251
+192
+154
+252
+185
+144
+249
+189
+146
+250
+197
+158
+212
+173
+150
+63
+74
+74
+69
+69
+61
+183
+110
+59
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+163
+104
+61
+41
+58
+57
+135
+94
+64
+234
+126
+45
+224
+123
+55
+234
+125
+52
+188
+112
+56
+51
+62
+63
+109
+106
+99
+51
+62
+63
+188
+112
+56
+234
+126
+45
+224
+123
+55
+234
+125
+52
+188
+112
+56
+43
+57
+62
+112
+85
+63
+234
+126
+45
+227
+126
+50
+224
+123
+55
+227
+126
+50
+234
+126
+45
+95
+78
+64
+109
+106
+99
+217
+187
+166
+58
+69
+70
+69
+69
+61
+188
+112
+56
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+214
+121
+50
+95
+78
+64
+146
+97
+64
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+247
+165
+111
+249
+146
+83
+247
+130
+53
+247
+123
+41
+247
+118
+39
+247
+123
+41
+247
+130
+53
+247
+143
+74
+249
+159
+103
+250
+176
+132
+186
+157
+134
+51
+62
+63
+81
+73
+62
+188
+112
+56
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+212
+120
+56
+106
+82
+65
+41
+58
+57
+146
+135
+124
+255
+215
+190
+255
+215
+190
+234
+204
+183
+63
+74
+74
+125
+90
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+234
+125
+52
+89
+75
+66
+62
+63
+61
+199
+115
+54
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+126
+45
+163
+104
+61
+48
+58
+59
+217
+187
+166
+172
+150
+134
+41
+58
+57
+106
+82
+65
+214
+121
+50
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+225
+124
+48
+81
+73
+62
+69
+69
+61
+227
+126
+50
+227
+126
+50
+224
+123
+55
+238
+123
+45
+125
+90
+64
+55
+66
+67
+250
+176
+132
+246
+156
+93
+250
+139
+73
+247
+123
+41
+247
+111
+26
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+250
+139
+73
+249
+159
+103
+248
+180
+134
+232
+190
+161
+47
+40
+38
+71
+60
+43
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+71
+60
+43
+71
+60
+43
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+160
+120
+43
+170
+137
+67
+237
+233
+225
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+186
+181
+179
+74
+68
+68
+89
+75
+66
+212
+173
+150
+250
+197
+158
+251
+192
+154
+249
+189
+146
+251
+192
+154
+253
+204
+176
+234
+204
+183
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+152
+119
+47
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+171
+129
+45
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+111
+94
+57
+48
+58
+59
+161
+144
+134
+255
+215
+190
+255
+215
+190
+255
+215
+190
+172
+150
+134
+48
+58
+59
+95
+87
+59
+168
+127
+42
+168
+127
+42
+158
+125
+46
+161
+127
+40
+171
+129
+45
+158
+125
+46
+152
+119
+47
+152
+119
+47
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+152
+119
+47
+69
+69
+61
+58
+69
+70
+217
+187
+166
+255
+215
+190
+255
+215
+190
+255
+215
+190
+172
+150
+134
+43
+57
+62
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+171
+129
+45
+171
+129
+45
+158
+125
+46
+168
+127
+42
+137
+110
+49
+83
+78
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+84
+85
+82
+255
+215
+190
+238
+205
+179
+84
+85
+82
+62
+63
+61
+145
+114
+49
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+171
+129
+45
+171
+129
+45
+168
+127
+42
+161
+127
+40
+158
+125
+46
+88
+82
+59
+152
+119
+47
+161
+127
+40
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+152
+119
+47
+63
+69
+60
+137
+127
+115
+255
+215
+190
+255
+215
+190
+137
+127
+115
+48
+58
+59
+105
+93
+60
+171
+129
+45
+161
+127
+40
+158
+125
+46
+168
+127
+42
+168
+127
+42
+158
+125
+46
+152
+119
+47
+152
+119
+47
+168
+127
+42
+171
+129
+45
+158
+125
+46
+158
+125
+46
+171
+129
+45
+145
+114
+49
+62
+63
+61
+70
+79
+77
+227
+196
+175
+255
+215
+190
+255
+215
+190
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+212
+120
+56
+214
+121
+50
+227
+126
+50
+224
+123
+55
+227
+126
+50
+234
+126
+45
+234
+126
+45
+234
+125
+52
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+76
+70
+64
+70
+79
+77
+234
+204
+183
+253
+212
+188
+251
+209
+178
+253
+212
+188
+187
+166
+150
+43
+57
+62
+95
+78
+64
+225
+124
+48
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+234
+126
+45
+234
+126
+45
+227
+126
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+214
+121
+50
+95
+78
+64
+48
+58
+59
+194
+173
+157
+253
+212
+188
+251
+209
+178
+251
+209
+178
+245
+212
+186
+91
+92
+89
+62
+63
+61
+188
+112
+56
+234
+126
+45
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+234
+125
+52
+234
+126
+45
+227
+126
+50
+224
+123
+55
+234
+126
+45
+125
+90
+64
+146
+97
+64
+234
+125
+52
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+97
+98
+96
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+224
+123
+55
+212
+120
+56
+183
+110
+59
+214
+121
+50
+227
+126
+50
+224
+123
+55
+227
+126
+50
+227
+126
+50
+234
+126
+45
+95
+78
+64
+84
+85
+82
+91
+92
+89
+62
+63
+61
+188
+112
+56
+234
+126
+45
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+234
+126
+45
+234
+126
+45
+227
+126
+50
+224
+123
+55
+227
+126
+50
+224
+123
+55
+209
+117
+53
+227
+126
+50
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+247
+165
+111
+249
+146
+83
+247
+130
+60
+247
+123
+41
+247
+123
+41
+247
+130
+53
+248
+138
+64
+249
+152
+92
+249
+174
+124
+209
+171
+139
+58
+69
+70
+81
+73
+62
+209
+117
+53
+234
+125
+52
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+234
+125
+52
+234
+125
+52
+234
+125
+52
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+112
+85
+63
+41
+58
+57
+172
+150
+134
+255
+215
+190
+227
+196
+175
+63
+74
+74
+135
+94
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+224
+123
+55
+194
+112
+58
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+238
+128
+40
+163
+104
+61
+55
+66
+67
+161
+144
+134
+58
+69
+70
+95
+78
+64
+225
+124
+48
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+234
+126
+45
+234
+126
+45
+234
+125
+52
+227
+126
+50
+234
+125
+52
+173
+106
+60
+118
+86
+65
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+146
+97
+64
+51
+62
+63
+252
+185
+144
+249
+159
+103
+247
+143
+74
+247
+130
+53
+246
+116
+28
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+53
+249
+146
+83
+251
+168
+115
+251
+192
+154
+154
+133
+118
+24
+22
+23
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+108
+87
+46
+47
+40
+38
+158
+125
+46
+158
+125
+46
+158
+125
+46
+160
+120
+43
+156
+125
+62
+224
+207
+180
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+152
+147
+147
+35
+31
+30
+55
+48
+48
+154
+133
+118
+217
+187
+166
+253
+204
+176
+253
+204
+176
+253
+212
+188
+234
+204
+183
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+158
+125
+46
+168
+127
+42
+158
+125
+46
+123
+102
+54
+105
+93
+60
+111
+94
+57
+129
+106
+52
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+83
+78
+61
+58
+69
+70
+227
+196
+175
+255
+215
+190
+217
+187
+166
+58
+69
+70
+75
+74
+61
+168
+127
+42
+161
+127
+40
+158
+125
+46
+168
+127
+42
+152
+119
+47
+105
+93
+60
+69
+69
+61
+62
+63
+61
+62
+63
+61
+75
+74
+61
+117
+98
+55
+161
+127
+40
+161
+127
+40
+158
+125
+46
+171
+129
+45
+145
+114
+49
+56
+64
+60
+97
+98
+96
+245
+212
+186
+255
+215
+190
+227
+196
+175
+63
+74
+74
+75
+74
+61
+158
+125
+46
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+158
+125
+46
+129
+106
+52
+111
+94
+57
+105
+93
+60
+129
+106
+52
+158
+125
+46
+168
+127
+42
+161
+127
+40
+152
+119
+47
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+84
+85
+82
+255
+215
+190
+161
+144
+134
+48
+58
+59
+123
+102
+54
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+117
+98
+55
+105
+93
+60
+117
+98
+55
+145
+114
+49
+171
+129
+45
+168
+127
+42
+152
+119
+47
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+137
+127
+115
+255
+215
+190
+194
+173
+157
+48
+58
+59
+88
+82
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+152
+119
+47
+95
+87
+59
+69
+69
+61
+62
+63
+61
+62
+63
+61
+83
+78
+61
+123
+102
+54
+168
+127
+42
+161
+127
+40
+158
+125
+46
+171
+129
+45
+129
+106
+52
+51
+62
+63
+120
+114
+108
+255
+215
+190
+255
+215
+190
+161
+144
+134
+56
+64
+60
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+227
+126
+50
+227
+126
+50
+188
+112
+56
+146
+97
+64
+135
+94
+64
+146
+97
+64
+199
+115
+54
+234
+125
+52
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+126
+45
+173
+106
+60
+48
+58
+59
+146
+135
+124
+255
+215
+190
+255
+215
+190
+234
+204
+183
+77
+85
+81
+76
+70
+64
+214
+121
+50
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+214
+121
+50
+163
+104
+61
+135
+94
+64
+135
+94
+64
+163
+104
+61
+224
+123
+55
+234
+125
+52
+224
+123
+55
+224
+123
+55
+227
+126
+50
+212
+120
+56
+76
+70
+64
+77
+85
+81
+238
+205
+179
+255
+215
+190
+255
+215
+190
+161
+144
+134
+48
+58
+59
+155
+100
+63
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+199
+115
+54
+155
+100
+63
+135
+94
+64
+146
+97
+64
+188
+112
+56
+227
+126
+50
+227
+126
+50
+214
+121
+50
+209
+117
+53
+227
+126
+50
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+125
+52
+227
+126
+50
+224
+123
+55
+227
+126
+50
+227
+126
+50
+199
+115
+54
+125
+90
+64
+51
+62
+63
+55
+66
+67
+41
+58
+57
+146
+97
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+126
+45
+209
+117
+53
+155
+100
+63
+135
+94
+64
+139
+96
+61
+183
+110
+59
+227
+126
+50
+227
+126
+50
+227
+126
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+247
+165
+111
+249
+146
+83
+247
+130
+60
+247
+130
+53
+247
+130
+53
+247
+130
+60
+249
+146
+83
+247
+165
+111
+252
+185
+144
+101
+100
+92
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+173
+106
+60
+135
+94
+64
+135
+94
+64
+163
+104
+61
+214
+121
+50
+234
+125
+52
+224
+123
+55
+224
+123
+55
+227
+126
+50
+224
+123
+55
+81
+73
+62
+58
+69
+70
+227
+196
+175
+234
+204
+183
+63
+74
+74
+135
+94
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+224
+123
+55
+227
+126
+50
+234
+125
+52
+212
+120
+56
+155
+100
+63
+69
+69
+61
+76
+78
+76
+84
+85
+82
+65
+67
+64
+209
+117
+53
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+183
+110
+59
+139
+96
+61
+135
+94
+64
+155
+100
+63
+209
+117
+53
+234
+125
+52
+224
+123
+55
+212
+120
+56
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+126
+45
+139
+96
+61
+55
+66
+67
+251
+192
+154
+251
+168
+115
+249
+146
+83
+247
+130
+53
+247
+118
+39
+246
+109
+10
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+249
+152
+92
+250
+176
+132
+232
+190
+161
+65
+58
+56
+59
+50
+39
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+47
+40
+38
+129
+106
+52
+168
+127
+42
+160
+120
+43
+158
+125
+46
+224
+207
+180
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+219
+212
+208
+62
+63
+61
+35
+31
+30
+91
+92
+89
+164
+158
+157
+186
+181
+179
+82
+69
+65
+176
+156
+141
+255
+215
+190
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+129
+106
+52
+65
+67
+64
+48
+58
+59
+55
+66
+67
+55
+66
+67
+48
+58
+59
+83
+78
+61
+145
+114
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+137
+110
+49
+51
+62
+63
+146
+135
+124
+255
+215
+190
+120
+114
+108
+56
+64
+60
+145
+114
+49
+171
+129
+45
+158
+125
+46
+168
+127
+42
+152
+119
+47
+69
+69
+61
+43
+57
+62
+109
+106
+99
+146
+135
+124
+137
+127
+115
+91
+92
+89
+43
+57
+62
+88
+82
+59
+158
+125
+46
+161
+127
+40
+158
+125
+46
+171
+129
+45
+117
+98
+55
+48
+58
+59
+172
+150
+134
+255
+215
+190
+146
+135
+124
+51
+62
+63
+137
+110
+49
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+75
+74
+61
+48
+58
+59
+55
+66
+67
+55
+66
+67
+48
+58
+59
+69
+69
+61
+137
+110
+49
+168
+127
+42
+161
+127
+40
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+91
+92
+89
+234
+204
+183
+70
+79
+77
+83
+78
+61
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+111
+94
+57
+56
+64
+60
+43
+57
+62
+58
+69
+70
+48
+58
+59
+56
+64
+60
+100
+89
+56
+158
+125
+46
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+111
+94
+57
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+65
+67
+64
+137
+127
+115
+255
+215
+190
+97
+98
+96
+62
+63
+61
+152
+119
+47
+168
+127
+42
+158
+125
+46
+168
+127
+42
+137
+110
+49
+62
+63
+61
+51
+62
+63
+120
+114
+108
+146
+135
+124
+137
+127
+115
+84
+85
+82
+43
+57
+62
+95
+87
+59
+168
+127
+42
+158
+125
+46
+158
+125
+46
+171
+129
+45
+100
+89
+56
+43
+57
+62
+194
+173
+157
+255
+215
+190
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+224
+123
+55
+118
+86
+65
+51
+62
+63
+43
+57
+62
+58
+69
+70
+41
+58
+57
+56
+64
+60
+146
+97
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+106
+82
+65
+63
+74
+74
+234
+204
+183
+255
+215
+190
+161
+144
+134
+48
+58
+59
+173
+106
+60
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+183
+110
+59
+76
+70
+64
+43
+57
+62
+55
+66
+67
+55
+66
+67
+48
+58
+59
+81
+73
+62
+183
+110
+59
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+126
+45
+163
+104
+61
+48
+58
+59
+161
+144
+134
+255
+215
+190
+234
+204
+183
+63
+74
+74
+95
+78
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+135
+94
+64
+62
+63
+61
+43
+57
+62
+58
+69
+70
+43
+57
+62
+51
+62
+63
+125
+90
+64
+225
+124
+48
+227
+126
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+97
+98
+96
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+125
+52
+227
+126
+50
+173
+106
+60
+95
+78
+64
+56
+64
+60
+51
+62
+63
+120
+114
+108
+70
+79
+77
+89
+75
+66
+225
+124
+48
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+163
+104
+61
+65
+67
+64
+41
+58
+57
+55
+66
+67
+51
+62
+63
+48
+58
+59
+106
+82
+65
+209
+117
+53
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+247
+165
+111
+249
+146
+83
+248
+138
+64
+247
+130
+53
+247
+130
+60
+250
+139
+73
+246
+156
+93
+250
+176
+132
+186
+157
+134
+41
+58
+57
+146
+97
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+125
+52
+199
+115
+54
+89
+75
+66
+48
+58
+59
+51
+62
+63
+55
+66
+67
+43
+57
+62
+76
+70
+64
+173
+106
+60
+234
+125
+52
+224
+123
+55
+224
+123
+55
+227
+126
+50
+183
+110
+59
+51
+62
+63
+137
+127
+115
+234
+204
+183
+63
+74
+74
+135
+94
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+199
+115
+54
+125
+90
+64
+69
+69
+61
+41
+58
+57
+97
+98
+96
+146
+135
+124
+51
+62
+63
+146
+97
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+214
+121
+50
+106
+82
+65
+48
+58
+59
+51
+62
+63
+55
+66
+67
+41
+58
+57
+65
+67
+64
+163
+104
+61
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+125
+52
+139
+96
+61
+55
+66
+67
+250
+197
+158
+251
+168
+115
+247
+150
+84
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+246
+116
+28
+247
+130
+53
+247
+143
+74
+249
+159
+103
+252
+185
+144
+154
+133
+118
+24
+22
+23
+108
+87
+46
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+71
+60
+43
+85
+71
+43
+171
+129
+45
+160
+120
+43
+216
+194
+154
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+237
+233
+225
+65
+58
+56
+62
+63
+61
+219
+212
+208
+253
+255
+252
+237
+233
+225
+120
+114
+108
+35
+31
+30
+55
+48
+48
+227
+196
+175
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+129
+106
+52
+51
+62
+63
+84
+85
+82
+187
+166
+150
+227
+196
+175
+227
+196
+175
+161
+144
+134
+51
+62
+63
+69
+69
+61
+152
+119
+47
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+91
+92
+89
+217
+187
+166
+55
+66
+67
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+75
+74
+61
+58
+69
+70
+187
+166
+150
+255
+215
+190
+255
+215
+190
+255
+215
+190
+245
+212
+186
+161
+144
+134
+43
+57
+62
+100
+89
+56
+171
+129
+45
+158
+125
+46
+158
+125
+46
+161
+127
+40
+75
+74
+61
+84
+85
+82
+234
+204
+183
+76
+78
+76
+88
+82
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+62
+63
+61
+63
+74
+74
+176
+156
+141
+227
+196
+175
+227
+196
+175
+176
+156
+141
+70
+79
+77
+62
+63
+61
+145
+114
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+97
+98
+96
+172
+150
+134
+48
+58
+59
+129
+106
+52
+168
+127
+42
+158
+125
+46
+158
+125
+46
+171
+129
+45
+105
+93
+60
+43
+57
+62
+120
+114
+108
+207
+178
+158
+227
+196
+175
+217
+187
+166
+120
+114
+108
+41
+58
+57
+95
+87
+59
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+56
+64
+60
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+65
+67
+64
+146
+135
+124
+207
+178
+158
+48
+58
+59
+111
+94
+57
+171
+129
+45
+158
+125
+46
+168
+127
+42
+152
+119
+47
+62
+63
+61
+70
+79
+77
+207
+178
+158
+255
+215
+190
+255
+215
+190
+255
+215
+190
+238
+205
+179
+137
+127
+115
+43
+57
+62
+117
+98
+55
+168
+127
+42
+158
+125
+46
+168
+127
+42
+152
+119
+47
+62
+63
+61
+109
+106
+99
+255
+215
+190
+161
+144
+134
+56
+64
+60
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+106
+82
+65
+41
+58
+57
+137
+127
+115
+217
+187
+166
+227
+196
+175
+207
+178
+158
+109
+106
+99
+41
+58
+57
+146
+97
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+173
+106
+60
+48
+58
+59
+176
+156
+141
+245
+212
+186
+70
+79
+77
+95
+78
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+188
+112
+56
+56
+64
+60
+70
+79
+77
+176
+156
+141
+227
+196
+175
+227
+196
+175
+176
+156
+141
+63
+74
+74
+62
+63
+61
+194
+112
+58
+227
+126
+50
+224
+123
+55
+227
+126
+50
+227
+126
+50
+95
+78
+64
+77
+85
+81
+245
+212
+186
+172
+150
+134
+48
+58
+59
+173
+106
+60
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+125
+52
+135
+94
+64
+35
+56
+60
+120
+114
+108
+207
+178
+158
+227
+196
+175
+217
+187
+166
+133
+120
+107
+35
+56
+60
+118
+86
+65
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+95
+78
+64
+48
+58
+59
+70
+79
+77
+146
+135
+124
+217
+187
+166
+207
+178
+158
+51
+62
+63
+155
+100
+63
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+125
+52
+163
+104
+61
+48
+58
+59
+91
+92
+89
+194
+173
+157
+227
+196
+175
+217
+187
+166
+146
+135
+124
+43
+57
+62
+89
+75
+66
+214
+121
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+247
+165
+111
+247
+150
+84
+248
+138
+64
+247
+130
+60
+248
+138
+64
+249
+146
+83
+247
+165
+111
+239
+182
+144
+91
+92
+89
+76
+70
+64
+224
+123
+55
+227
+126
+50
+224
+123
+55
+227
+126
+50
+209
+117
+53
+76
+70
+64
+55
+66
+67
+172
+150
+134
+227
+196
+175
+227
+196
+175
+187
+166
+150
+77
+85
+81
+51
+62
+63
+173
+106
+60
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+118
+86
+65
+58
+69
+70
+217
+187
+166
+70
+79
+77
+135
+94
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+225
+124
+48
+125
+90
+64
+56
+64
+60
+55
+66
+67
+120
+114
+108
+187
+166
+150
+245
+212
+186
+120
+114
+108
+76
+70
+64
+214
+121
+50
+227
+126
+50
+224
+123
+55
+227
+126
+50
+225
+124
+48
+95
+78
+64
+43
+57
+62
+146
+135
+124
+217
+187
+166
+227
+196
+175
+194
+173
+157
+91
+92
+89
+48
+58
+59
+163
+104
+61
+234
+125
+52
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+126
+45
+139
+96
+61
+55
+66
+67
+250
+197
+158
+249
+174
+124
+247
+150
+84
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+53
+249
+146
+83
+251
+168
+115
+239
+182
+144
+65
+58
+56
+59
+50
+39
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+108
+87
+46
+47
+40
+38
+152
+119
+47
+170
+137
+67
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+174
+168
+167
+24
+22
+23
+109
+106
+99
+152
+147
+147
+97
+98
+96
+47
+40
+38
+24
+22
+23
+35
+31
+30
+35
+31
+30
+176
+156
+141
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+69
+69
+61
+76
+78
+76
+227
+196
+175
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+187
+166
+150
+51
+62
+63
+95
+87
+59
+168
+127
+42
+158
+125
+46
+158
+125
+46
+171
+129
+45
+117
+98
+55
+55
+66
+67
+109
+106
+99
+48
+58
+59
+137
+110
+49
+168
+127
+42
+158
+125
+46
+168
+127
+42
+117
+98
+55
+48
+58
+59
+187
+166
+150
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+137
+127
+115
+51
+62
+63
+145
+114
+49
+168
+127
+42
+158
+125
+46
+171
+129
+45
+117
+98
+55
+55
+66
+67
+137
+127
+115
+55
+66
+67
+123
+102
+54
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+55
+66
+67
+207
+178
+158
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+217
+187
+166
+58
+69
+70
+83
+78
+61
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+91
+92
+89
+109
+106
+99
+69
+69
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+120
+114
+108
+245
+212
+186
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+137
+127
+115
+48
+58
+59
+129
+106
+52
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+65
+67
+64
+146
+135
+124
+146
+135
+124
+62
+63
+61
+152
+119
+47
+168
+127
+42
+158
+125
+46
+168
+127
+42
+100
+89
+56
+51
+62
+63
+207
+178
+158
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+109
+106
+99
+63
+69
+60
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+100
+89
+56
+51
+62
+63
+227
+196
+175
+172
+150
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+155
+100
+63
+41
+58
+57
+146
+135
+124
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+245
+212
+186
+109
+106
+99
+56
+64
+60
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+224
+123
+55
+76
+70
+64
+109
+106
+99
+194
+173
+157
+43
+57
+62
+163
+104
+61
+234
+125
+52
+224
+123
+55
+224
+123
+55
+225
+124
+48
+89
+75
+66
+63
+74
+74
+217
+187
+166
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+217
+187
+166
+58
+69
+70
+95
+78
+64
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+155
+100
+63
+43
+57
+62
+207
+178
+158
+109
+106
+99
+76
+70
+64
+224
+123
+55
+227
+126
+50
+224
+123
+55
+227
+126
+50
+194
+112
+58
+51
+62
+63
+120
+114
+108
+253
+212
+188
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+137
+127
+115
+48
+58
+59
+173
+106
+60
+234
+125
+52
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+188
+112
+56
+62
+63
+61
+58
+69
+70
+161
+144
+134
+234
+204
+183
+255
+215
+190
+255
+215
+190
+137
+127
+115
+62
+63
+61
+209
+117
+53
+227
+126
+50
+224
+123
+55
+227
+126
+50
+212
+120
+56
+69
+69
+61
+77
+85
+81
+234
+204
+183
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+176
+156
+141
+35
+56
+60
+135
+94
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+251
+168
+115
+247
+150
+84
+250
+139
+73
+248
+138
+64
+250
+139
+73
+249
+152
+92
+249
+174
+124
+209
+171
+139
+43
+57
+62
+135
+94
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+126
+45
+112
+85
+63
+51
+62
+63
+194
+173
+157
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+227
+196
+175
+70
+79
+77
+76
+70
+64
+214
+121
+50
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+48
+58
+59
+146
+135
+124
+77
+85
+81
+135
+94
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+227
+126
+50
+214
+121
+50
+95
+78
+64
+35
+56
+60
+120
+114
+108
+217
+187
+166
+255
+215
+190
+255
+215
+190
+227
+196
+175
+58
+69
+70
+125
+90
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+139
+96
+61
+41
+58
+57
+172
+150
+134
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+234
+204
+183
+77
+85
+81
+76
+70
+64
+214
+121
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+139
+96
+61
+51
+62
+63
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+111
+26
+247
+123
+41
+248
+138
+64
+249
+152
+92
+249
+174
+124
+178
+146
+122
+24
+22
+23
+101
+83
+47
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+152
+119
+47
+47
+40
+38
+123
+102
+54
+209
+171
+139
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+164
+158
+157
+24
+22
+23
+24
+22
+23
+24
+22
+23
+24
+22
+23
+24
+22
+23
+35
+31
+30
+35
+31
+30
+47
+40
+38
+194
+173
+157
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+129
+106
+52
+48
+58
+59
+176
+156
+141
+255
+215
+190
+255
+215
+190
+253
+212
+188
+255
+215
+190
+255
+215
+190
+255
+215
+190
+120
+114
+108
+56
+64
+60
+152
+119
+47
+161
+127
+40
+158
+125
+46
+168
+127
+42
+137
+110
+49
+51
+62
+63
+48
+58
+59
+75
+74
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+63
+74
+74
+194
+173
+157
+207
+178
+158
+207
+178
+158
+207
+178
+158
+207
+178
+158
+207
+178
+158
+207
+178
+158
+172
+150
+134
+48
+58
+59
+111
+94
+57
+171
+129
+45
+158
+125
+46
+168
+127
+42
+152
+119
+47
+56
+64
+60
+51
+62
+63
+56
+64
+60
+152
+119
+47
+168
+127
+42
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+146
+135
+124
+255
+215
+190
+255
+215
+190
+253
+212
+188
+253
+212
+188
+255
+215
+190
+255
+215
+190
+146
+135
+124
+51
+62
+63
+145
+114
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+70
+79
+77
+63
+74
+74
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+171
+129
+45
+95
+87
+59
+55
+66
+67
+227
+196
+175
+255
+215
+190
+255
+215
+190
+253
+212
+188
+255
+215
+190
+255
+215
+190
+234
+204
+183
+70
+79
+77
+88
+82
+59
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+56
+64
+60
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+137
+127
+115
+97
+98
+96
+83
+78
+61
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+69
+69
+61
+84
+85
+82
+207
+178
+158
+207
+178
+158
+207
+178
+158
+207
+178
+158
+207
+178
+158
+207
+178
+158
+217
+187
+166
+146
+135
+124
+48
+58
+59
+129
+106
+52
+168
+127
+42
+158
+125
+46
+168
+127
+42
+129
+106
+52
+51
+62
+63
+187
+166
+150
+176
+156
+141
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+89
+75
+66
+70
+79
+77
+245
+212
+186
+255
+215
+190
+255
+215
+190
+253
+212
+188
+255
+215
+190
+255
+215
+190
+217
+187
+166
+43
+57
+62
+125
+90
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+126
+45
+106
+82
+65
+77
+85
+81
+133
+120
+107
+62
+63
+61
+209
+117
+53
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+48
+58
+59
+161
+144
+134
+255
+215
+190
+255
+215
+190
+253
+212
+188
+253
+212
+188
+255
+215
+190
+255
+215
+190
+146
+135
+124
+48
+58
+59
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+199
+115
+54
+62
+63
+61
+133
+120
+107
+77
+85
+81
+118
+86
+65
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+126
+45
+125
+90
+64
+55
+66
+67
+227
+196
+175
+255
+215
+190
+255
+215
+190
+253
+212
+188
+255
+215
+190
+255
+215
+190
+234
+204
+183
+63
+74
+74
+106
+82
+65
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+97
+98
+96
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+224
+123
+55
+89
+75
+66
+63
+74
+74
+217
+187
+166
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+91
+92
+89
+95
+78
+64
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+126
+45
+146
+97
+64
+43
+57
+62
+187
+166
+150
+255
+215
+190
+255
+215
+190
+253
+212
+188
+255
+215
+190
+255
+215
+190
+255
+215
+190
+101
+100
+92
+76
+70
+64
+224
+123
+55
+227
+126
+50
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+251
+168
+115
+247
+150
+84
+250
+139
+73
+250
+139
+73
+247
+143
+74
+249
+159
+103
+250
+176
+132
+154
+133
+118
+51
+62
+63
+183
+110
+59
+227
+126
+50
+224
+123
+55
+227
+126
+50
+199
+115
+54
+62
+63
+61
+133
+120
+107
+255
+215
+190
+255
+215
+190
+253
+212
+188
+253
+212
+188
+255
+215
+190
+255
+215
+190
+176
+156
+141
+43
+57
+62
+163
+104
+61
+234
+125
+52
+224
+123
+55
+227
+126
+50
+214
+121
+50
+76
+70
+64
+91
+92
+89
+70
+79
+77
+135
+94
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+125
+52
+146
+97
+64
+35
+56
+60
+161
+144
+134
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+194
+173
+157
+48
+58
+59
+163
+104
+61
+234
+126
+45
+224
+123
+55
+227
+126
+50
+214
+121
+50
+76
+70
+64
+97
+98
+96
+255
+215
+190
+255
+215
+190
+255
+215
+190
+253
+212
+188
+255
+215
+190
+255
+215
+190
+187
+166
+150
+43
+57
+62
+163
+104
+61
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+249
+159
+103
+248
+180
+134
+124
+111
+99
+35
+31
+30
+137
+110
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+59
+50
+39
+85
+71
+43
+216
+194
+154
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+207
+202
+200
+47
+40
+38
+24
+22
+23
+35
+31
+30
+35
+31
+30
+35
+31
+30
+35
+31
+30
+24
+22
+23
+65
+58
+56
+238
+205
+179
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+100
+89
+56
+63
+74
+74
+227
+196
+175
+255
+215
+190
+253
+204
+176
+250
+200
+166
+250
+200
+166
+251
+209
+178
+255
+215
+190
+194
+173
+157
+48
+58
+59
+123
+102
+54
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+43
+57
+62
+95
+87
+59
+168
+127
+42
+158
+125
+46
+161
+127
+40
+158
+125
+46
+63
+69
+60
+43
+57
+62
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+43
+57
+62
+88
+82
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+75
+74
+61
+43
+57
+62
+75
+74
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+117
+98
+55
+51
+62
+63
+217
+187
+166
+255
+215
+190
+253
+204
+176
+250
+200
+166
+250
+200
+166
+253
+204
+176
+255
+215
+190
+217
+187
+166
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+48
+58
+59
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+69
+69
+61
+109
+106
+99
+255
+215
+190
+253
+212
+188
+253
+204
+176
+250
+200
+166
+250
+200
+166
+253
+212
+188
+255
+215
+190
+120
+114
+108
+63
+69
+60
+158
+125
+46
+161
+127
+40
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+120
+114
+108
+70
+79
+77
+105
+93
+60
+171
+129
+45
+158
+125
+46
+168
+127
+42
+152
+119
+47
+56
+64
+60
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+51
+62
+63
+43
+57
+62
+111
+94
+57
+171
+129
+45
+158
+125
+46
+161
+127
+40
+152
+119
+47
+62
+63
+61
+146
+135
+124
+172
+150
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+199
+115
+54
+62
+63
+61
+146
+135
+124
+255
+215
+190
+253
+212
+188
+250
+200
+166
+250
+200
+166
+253
+204
+176
+253
+212
+188
+253
+212
+188
+97
+98
+96
+89
+75
+66
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+126
+45
+139
+96
+61
+51
+62
+63
+63
+74
+74
+89
+75
+66
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+125
+52
+135
+94
+64
+55
+66
+67
+217
+187
+166
+255
+215
+190
+253
+204
+176
+250
+200
+166
+250
+200
+166
+253
+204
+176
+255
+215
+190
+217
+187
+166
+51
+62
+63
+139
+96
+61
+234
+126
+45
+224
+123
+55
+227
+126
+50
+225
+124
+48
+81
+73
+62
+58
+69
+70
+51
+62
+63
+146
+97
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+224
+123
+55
+81
+73
+62
+109
+106
+99
+255
+215
+190
+253
+212
+188
+253
+204
+176
+250
+200
+166
+250
+200
+166
+253
+212
+188
+255
+215
+190
+120
+114
+108
+69
+69
+61
+212
+120
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+234
+125
+52
+224
+123
+55
+227
+126
+50
+194
+112
+58
+51
+62
+63
+146
+135
+124
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+234
+204
+183
+70
+79
+77
+118
+86
+65
+234
+125
+52
+224
+123
+55
+227
+126
+50
+227
+126
+50
+106
+82
+65
+77
+85
+81
+245
+212
+186
+255
+215
+190
+253
+204
+176
+250
+200
+166
+250
+200
+166
+251
+209
+178
+255
+215
+190
+176
+156
+141
+56
+64
+60
+188
+112
+56
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+251
+168
+115
+249
+152
+92
+247
+143
+74
+247
+143
+74
+247
+150
+84
+249
+159
+103
+248
+180
+134
+120
+114
+108
+69
+69
+61
+212
+120
+56
+227
+126
+50
+224
+123
+55
+234
+125
+52
+155
+100
+63
+43
+57
+62
+194
+173
+157
+255
+215
+190
+253
+204
+176
+250
+200
+166
+250
+200
+166
+253
+204
+176
+255
+215
+190
+234
+204
+183
+63
+74
+74
+112
+85
+63
+234
+125
+52
+227
+126
+50
+224
+123
+55
+234
+125
+52
+106
+82
+65
+58
+69
+70
+55
+66
+67
+135
+94
+64
+234
+125
+52
+224
+123
+55
+227
+126
+50
+227
+126
+50
+95
+78
+64
+77
+85
+81
+245
+212
+186
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+48
+58
+59
+172
+150
+134
+255
+215
+190
+251
+209
+178
+250
+200
+166
+250
+200
+166
+253
+204
+176
+255
+215
+190
+245
+212
+186
+63
+74
+74
+112
+85
+63
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+126
+45
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+250
+139
+73
+249
+159
+103
+252
+185
+144
+82
+69
+65
+47
+40
+38
+158
+125
+46
+161
+127
+40
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+85
+71
+43
+59
+50
+39
+216
+194
+154
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+164
+158
+157
+47
+40
+38
+24
+22
+23
+24
+22
+23
+24
+22
+23
+35
+31
+30
+65
+67
+64
+65
+58
+56
+227
+196
+175
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+84
+85
+82
+255
+215
+190
+251
+209
+178
+250
+197
+158
+251
+192
+154
+251
+192
+154
+250
+200
+166
+253
+212
+188
+227
+196
+175
+58
+69
+70
+105
+93
+60
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+75
+74
+61
+41
+58
+57
+111
+94
+57
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+137
+110
+49
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+41
+58
+57
+83
+78
+61
+168
+127
+42
+158
+125
+46
+158
+125
+46
+171
+129
+45
+95
+87
+59
+70
+79
+77
+245
+212
+186
+253
+212
+188
+250
+200
+166
+251
+192
+154
+251
+192
+154
+250
+200
+166
+253
+212
+188
+238
+205
+179
+70
+79
+77
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+48
+58
+59
+48
+58
+59
+129
+106
+52
+168
+127
+42
+158
+125
+46
+168
+127
+42
+152
+119
+47
+56
+64
+60
+146
+135
+124
+255
+215
+190
+253
+204
+176
+250
+197
+158
+251
+192
+154
+251
+192
+154
+253
+204
+176
+255
+215
+190
+172
+150
+134
+51
+62
+63
+145
+114
+49
+168
+127
+42
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+97
+98
+96
+55
+66
+67
+123
+102
+54
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+123
+102
+54
+117
+98
+55
+145
+114
+49
+161
+127
+40
+158
+125
+46
+158
+125
+46
+158
+125
+46
+69
+69
+61
+137
+127
+115
+172
+150
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+234
+125
+52
+183
+110
+59
+51
+62
+63
+187
+166
+150
+255
+215
+190
+253
+204
+176
+251
+192
+154
+251
+192
+154
+250
+197
+158
+253
+204
+176
+255
+215
+190
+137
+127
+115
+65
+67
+64
+209
+117
+53
+227
+126
+50
+224
+123
+55
+234
+125
+52
+163
+104
+61
+43
+57
+62
+41
+58
+57
+106
+82
+65
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+106
+82
+65
+77
+85
+81
+245
+212
+186
+251
+209
+178
+250
+197
+158
+249
+189
+146
+251
+192
+154
+250
+197
+158
+251
+209
+178
+238
+205
+179
+77
+85
+81
+112
+85
+63
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+106
+82
+65
+41
+58
+57
+48
+58
+59
+163
+104
+61
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+62
+63
+61
+146
+135
+124
+255
+215
+190
+253
+204
+176
+250
+197
+158
+251
+192
+154
+251
+192
+154
+253
+204
+176
+255
+215
+190
+176
+156
+141
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+234
+125
+52
+224
+123
+55
+227
+126
+50
+183
+110
+59
+48
+58
+59
+176
+156
+141
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+227
+196
+175
+58
+69
+70
+139
+96
+61
+234
+125
+52
+224
+123
+55
+227
+126
+50
+214
+121
+50
+76
+70
+64
+120
+114
+108
+255
+215
+190
+253
+204
+176
+250
+197
+158
+251
+192
+154
+251
+192
+154
+250
+200
+166
+255
+215
+190
+207
+178
+158
+48
+58
+59
+163
+104
+61
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+192
+154
+249
+174
+124
+246
+156
+93
+247
+150
+84
+249
+146
+83
+249
+152
+92
+251
+168
+115
+249
+189
+146
+97
+98
+96
+89
+75
+66
+225
+124
+48
+227
+126
+50
+224
+123
+55
+234
+126
+45
+125
+90
+64
+58
+69
+70
+227
+196
+175
+253
+212
+188
+250
+200
+166
+251
+192
+154
+249
+189
+146
+250
+197
+158
+251
+209
+178
+255
+215
+190
+97
+98
+96
+89
+75
+66
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+126
+45
+125
+90
+64
+43
+57
+62
+43
+57
+62
+135
+94
+64
+234
+125
+52
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+137
+127
+115
+69
+69
+61
+212
+120
+56
+227
+126
+50
+224
+123
+55
+234
+126
+45
+155
+100
+63
+43
+57
+62
+207
+178
+158
+255
+215
+190
+250
+200
+166
+251
+192
+154
+251
+192
+154
+250
+197
+158
+251
+209
+178
+255
+215
+190
+109
+106
+99
+89
+75
+66
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+247
+143
+74
+249
+159
+103
+252
+185
+144
+55
+48
+48
+59
+50
+39
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+156
+125
+62
+101
+83
+47
+59
+50
+39
+209
+171
+139
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+219
+212
+208
+137
+127
+115
+101
+100
+92
+120
+114
+108
+186
+181
+179
+152
+147
+147
+55
+48
+48
+227
+196
+175
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+97
+98
+96
+255
+215
+190
+253
+204
+176
+251
+192
+154
+249
+189
+146
+249
+189
+146
+250
+197
+158
+251
+209
+178
+234
+204
+183
+70
+79
+77
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+161
+127
+40
+75
+74
+61
+41
+58
+57
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+168
+127
+42
+168
+127
+42
+168
+127
+42
+171
+129
+45
+75
+74
+61
+41
+58
+57
+88
+82
+59
+168
+127
+42
+158
+125
+46
+158
+125
+46
+171
+129
+45
+88
+82
+59
+77
+85
+81
+245
+212
+186
+251
+209
+178
+250
+197
+158
+249
+189
+146
+249
+189
+146
+250
+197
+158
+251
+209
+178
+245
+212
+186
+84
+85
+82
+88
+82
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+43
+57
+62
+48
+58
+59
+129
+106
+52
+168
+127
+42
+158
+125
+46
+168
+127
+42
+145
+114
+49
+56
+64
+60
+161
+144
+134
+255
+215
+190
+250
+200
+166
+251
+192
+154
+249
+189
+146
+251
+192
+154
+250
+200
+166
+255
+215
+190
+187
+166
+150
+51
+62
+63
+137
+110
+49
+168
+127
+42
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+65
+67
+64
+91
+92
+89
+55
+66
+67
+129
+106
+52
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+171
+129
+45
+168
+127
+42
+168
+127
+42
+168
+127
+42
+158
+125
+46
+63
+69
+60
+137
+127
+115
+172
+150
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+173
+106
+60
+48
+58
+59
+187
+166
+150
+255
+215
+190
+250
+200
+166
+251
+192
+154
+249
+189
+146
+251
+192
+154
+250
+200
+166
+255
+215
+190
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+234
+125
+52
+173
+106
+60
+48
+58
+59
+41
+58
+57
+118
+86
+65
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+125
+52
+95
+78
+64
+91
+92
+89
+255
+215
+190
+253
+204
+176
+251
+192
+154
+252
+185
+144
+252
+185
+144
+251
+192
+154
+253
+204
+176
+245
+212
+186
+91
+92
+89
+106
+82
+65
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+112
+85
+63
+41
+58
+57
+48
+58
+59
+173
+106
+60
+234
+125
+52
+224
+123
+55
+227
+126
+50
+199
+115
+54
+56
+64
+60
+161
+144
+134
+255
+215
+190
+250
+200
+166
+251
+192
+154
+249
+189
+146
+251
+192
+154
+250
+200
+166
+255
+215
+190
+187
+166
+150
+48
+58
+59
+183
+110
+59
+234
+125
+52
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+51
+62
+63
+176
+156
+141
+255
+215
+190
+253
+212
+188
+251
+209
+178
+253
+212
+188
+217
+187
+166
+55
+66
+67
+146
+97
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+214
+121
+50
+69
+69
+61
+137
+127
+115
+255
+215
+190
+253
+204
+176
+251
+192
+154
+249
+189
+146
+249
+189
+146
+250
+200
+166
+253
+212
+188
+217
+187
+166
+51
+62
+63
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+250
+197
+158
+249
+174
+124
+249
+159
+103
+249
+152
+92
+249
+152
+92
+249
+159
+103
+249
+174
+124
+250
+197
+158
+91
+92
+89
+95
+78
+64
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+125
+52
+125
+90
+64
+70
+79
+77
+234
+204
+183
+251
+209
+178
+250
+197
+158
+249
+189
+146
+252
+185
+144
+251
+192
+154
+253
+204
+176
+255
+215
+190
+120
+114
+108
+81
+73
+62
+224
+123
+55
+227
+126
+50
+224
+123
+55
+234
+126
+45
+135
+94
+64
+41
+58
+57
+41
+58
+57
+135
+94
+64
+234
+125
+52
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+253
+212
+188
+253
+212
+188
+251
+209
+178
+251
+209
+178
+255
+215
+190
+137
+127
+115
+76
+70
+64
+214
+121
+50
+227
+126
+50
+224
+123
+55
+234
+125
+52
+146
+97
+64
+51
+62
+63
+227
+196
+175
+253
+212
+188
+250
+197
+158
+249
+189
+146
+249
+189
+146
+251
+192
+154
+253
+204
+176
+255
+215
+190
+120
+114
+108
+81
+73
+62
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+126
+45
+139
+96
+61
+51
+62
+63
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+250
+139
+73
+249
+159
+103
+252
+185
+144
+55
+48
+48
+59
+50
+39
+161
+127
+40
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+154
+125
+71
+170
+137
+67
+108
+87
+46
+59
+50
+39
+192
+155
+91
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+186
+181
+179
+47
+40
+38
+65
+58
+56
+245
+212
+186
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+84
+85
+82
+253
+212
+188
+251
+209
+178
+250
+197
+158
+251
+192
+154
+251
+192
+154
+250
+200
+166
+253
+212
+188
+234
+204
+183
+63
+74
+74
+100
+89
+56
+171
+129
+45
+158
+125
+46
+158
+125
+46
+161
+127
+40
+75
+74
+61
+41
+58
+57
+111
+94
+57
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+111
+94
+57
+56
+64
+60
+43
+57
+62
+83
+78
+61
+168
+127
+42
+158
+125
+46
+158
+125
+46
+171
+129
+45
+95
+87
+59
+70
+79
+77
+245
+212
+186
+251
+209
+178
+250
+197
+158
+251
+192
+154
+251
+192
+154
+250
+197
+158
+251
+209
+178
+245
+212
+186
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+43
+57
+62
+48
+58
+59
+129
+106
+52
+168
+127
+42
+158
+125
+46
+158
+125
+46
+152
+119
+47
+56
+64
+60
+161
+144
+134
+255
+215
+190
+253
+204
+176
+251
+192
+154
+249
+189
+146
+251
+192
+154
+250
+200
+166
+255
+215
+190
+176
+156
+141
+51
+62
+63
+137
+110
+49
+168
+127
+42
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+91
+92
+89
+55
+66
+67
+123
+102
+54
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+145
+114
+49
+100
+89
+56
+48
+58
+59
+187
+166
+150
+176
+156
+141
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+51
+62
+63
+176
+156
+141
+255
+215
+190
+250
+200
+166
+251
+192
+154
+251
+192
+154
+250
+197
+158
+253
+204
+176
+255
+215
+190
+146
+135
+124
+62
+63
+61
+209
+117
+53
+227
+126
+50
+224
+123
+55
+234
+125
+52
+163
+104
+61
+48
+58
+59
+41
+58
+57
+112
+85
+63
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+106
+82
+65
+84
+85
+82
+255
+215
+190
+251
+209
+178
+250
+197
+158
+249
+189
+146
+249
+189
+146
+250
+197
+158
+251
+209
+178
+238
+205
+179
+84
+85
+82
+106
+82
+65
+234
+125
+52
+224
+123
+55
+227
+126
+50
+227
+126
+50
+106
+82
+65
+41
+58
+57
+48
+58
+59
+173
+106
+60
+227
+126
+50
+224
+123
+55
+227
+126
+50
+199
+115
+54
+62
+63
+61
+146
+135
+124
+255
+215
+190
+253
+204
+176
+251
+192
+154
+249
+189
+146
+251
+192
+154
+250
+200
+166
+255
+215
+190
+176
+156
+141
+51
+62
+63
+183
+110
+59
+227
+126
+50
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+51
+62
+63
+176
+156
+141
+253
+212
+188
+253
+204
+176
+250
+200
+166
+253
+204
+176
+217
+187
+166
+55
+66
+67
+146
+97
+64
+234
+125
+52
+224
+123
+55
+227
+126
+50
+214
+121
+50
+76
+70
+64
+120
+114
+108
+255
+215
+190
+253
+204
+176
+250
+197
+158
+251
+192
+154
+251
+192
+154
+250
+200
+166
+253
+212
+188
+207
+178
+158
+48
+58
+59
+163
+104
+61
+227
+126
+50
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+250
+200
+166
+248
+180
+134
+251
+168
+115
+247
+165
+111
+247
+165
+111
+251
+168
+115
+248
+180
+134
+250
+200
+166
+91
+92
+89
+89
+75
+66
+225
+124
+48
+227
+126
+50
+224
+123
+55
+234
+126
+45
+125
+90
+64
+63
+74
+74
+227
+196
+175
+251
+209
+178
+250
+197
+158
+249
+189
+146
+249
+189
+146
+250
+197
+158
+253
+204
+176
+255
+215
+190
+109
+106
+99
+89
+75
+66
+225
+124
+48
+227
+126
+50
+224
+123
+55
+234
+125
+52
+125
+90
+64
+43
+57
+62
+41
+58
+57
+135
+94
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+253
+212
+188
+253
+204
+176
+250
+200
+166
+250
+200
+166
+251
+209
+178
+137
+127
+115
+76
+70
+64
+214
+121
+50
+227
+126
+50
+224
+123
+55
+234
+125
+52
+155
+100
+63
+43
+57
+62
+217
+187
+166
+253
+212
+188
+250
+200
+166
+251
+192
+154
+249
+189
+146
+250
+197
+158
+253
+204
+176
+255
+215
+190
+120
+114
+108
+81
+73
+62
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+250
+139
+73
+249
+159
+103
+248
+180
+134
+76
+70
+64
+47
+40
+38
+152
+119
+47
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+156
+125
+62
+154
+125
+71
+170
+137
+67
+101
+83
+47
+59
+50
+39
+170
+137
+67
+255
+238
+227
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+152
+147
+147
+35
+31
+30
+24
+22
+23
+115
+102
+92
+255
+215
+190
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+171
+129
+45
+105
+93
+60
+58
+69
+70
+227
+196
+175
+255
+215
+190
+253
+204
+176
+250
+200
+166
+250
+200
+166
+253
+204
+176
+255
+215
+190
+207
+178
+158
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+69
+69
+61
+43
+57
+62
+100
+89
+56
+171
+129
+45
+158
+125
+46
+161
+127
+40
+158
+125
+46
+75
+74
+61
+48
+58
+59
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+48
+58
+59
+101
+100
+92
+91
+92
+89
+75
+74
+61
+168
+127
+42
+158
+125
+46
+158
+125
+46
+171
+129
+45
+111
+94
+57
+55
+66
+67
+227
+196
+175
+255
+215
+190
+253
+204
+176
+250
+200
+166
+250
+200
+166
+253
+204
+176
+255
+215
+190
+227
+196
+175
+51
+62
+63
+105
+93
+60
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+48
+58
+59
+48
+58
+59
+123
+102
+54
+168
+127
+42
+158
+125
+46
+161
+127
+40
+158
+125
+46
+69
+69
+61
+120
+114
+108
+255
+215
+190
+251
+209
+178
+250
+200
+166
+250
+197
+158
+250
+200
+166
+251
+209
+178
+255
+215
+190
+146
+135
+124
+56
+64
+60
+152
+119
+47
+168
+127
+42
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+109
+106
+99
+63
+74
+74
+111
+94
+57
+171
+129
+45
+158
+125
+46
+161
+127
+40
+152
+119
+47
+69
+69
+61
+51
+62
+63
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+56
+64
+60
+51
+62
+63
+48
+58
+59
+120
+114
+108
+245
+212
+186
+172
+150
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+209
+117
+53
+62
+63
+61
+137
+127
+115
+255
+215
+190
+251
+209
+178
+250
+200
+166
+250
+200
+166
+250
+200
+166
+253
+212
+188
+255
+215
+190
+109
+106
+99
+81
+73
+62
+224
+123
+55
+227
+126
+50
+224
+123
+55
+234
+125
+52
+155
+100
+63
+48
+58
+59
+43
+57
+62
+95
+78
+64
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+125
+90
+64
+63
+74
+74
+227
+196
+175
+253
+212
+188
+250
+200
+166
+250
+197
+158
+250
+197
+158
+253
+204
+176
+255
+215
+190
+227
+196
+175
+55
+66
+67
+125
+90
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+227
+126
+50
+89
+75
+66
+48
+58
+59
+48
+58
+59
+155
+100
+63
+234
+126
+45
+224
+123
+55
+227
+126
+50
+214
+121
+50
+76
+70
+64
+120
+114
+108
+255
+215
+190
+251
+209
+178
+250
+200
+166
+250
+197
+158
+250
+200
+166
+251
+209
+178
+255
+215
+190
+137
+127
+115
+62
+63
+61
+209
+117
+53
+227
+126
+50
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+97
+98
+96
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+48
+58
+59
+176
+156
+141
+251
+209
+178
+250
+200
+166
+250
+197
+158
+250
+200
+166
+227
+196
+175
+63
+74
+74
+135
+94
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+227
+126
+50
+95
+78
+64
+91
+92
+89
+253
+212
+188
+253
+212
+188
+250
+200
+166
+250
+200
+166
+250
+200
+166
+251
+209
+178
+255
+215
+190
+172
+150
+134
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+251
+209
+178
+251
+192
+154
+250
+176
+132
+249
+174
+124
+249
+174
+124
+248
+180
+134
+251
+192
+154
+251
+209
+178
+109
+106
+99
+76
+70
+64
+214
+121
+50
+227
+126
+50
+224
+123
+55
+234
+126
+45
+146
+97
+64
+43
+57
+62
+217
+187
+166
+255
+215
+190
+253
+204
+176
+250
+197
+158
+250
+197
+158
+250
+200
+166
+253
+212
+188
+245
+212
+186
+70
+79
+77
+106
+82
+65
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+112
+85
+63
+51
+62
+63
+51
+62
+63
+135
+94
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+245
+212
+186
+250
+200
+166
+251
+192
+154
+250
+197
+158
+253
+204
+176
+146
+135
+124
+65
+67
+64
+209
+117
+53
+227
+126
+50
+224
+123
+55
+234
+125
+52
+173
+106
+60
+48
+58
+59
+187
+166
+150
+255
+215
+190
+253
+204
+176
+250
+200
+166
+250
+197
+158
+250
+200
+166
+253
+212
+188
+255
+215
+190
+84
+85
+82
+95
+78
+64
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+109
+10
+247
+111
+26
+247
+123
+41
+248
+138
+64
+249
+152
+92
+249
+174
+124
+121
+100
+85
+35
+31
+30
+108
+87
+46
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+156
+125
+62
+154
+125
+71
+154
+125
+71
+171
+129
+45
+85
+71
+43
+71
+60
+43
+171
+129
+45
+224
+207
+180
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+237
+233
+225
+174
+168
+167
+81
+77
+76
+24
+22
+23
+35
+31
+30
+35
+31
+30
+187
+166
+150
+255
+215
+190
+255
+215
+190
+234
+204
+183
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+129
+106
+52
+51
+62
+63
+176
+156
+141
+255
+215
+190
+255
+215
+190
+253
+212
+188
+253
+212
+188
+255
+215
+190
+255
+215
+190
+146
+135
+124
+51
+62
+63
+145
+114
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+152
+119
+47
+56
+64
+60
+43
+57
+62
+83
+78
+61
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+48
+58
+59
+146
+135
+124
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+172
+150
+134
+172
+150
+134
+146
+135
+124
+146
+135
+124
+194
+173
+157
+245
+212
+186
+137
+127
+115
+63
+69
+60
+158
+125
+46
+161
+127
+40
+158
+125
+46
+168
+127
+42
+137
+110
+49
+51
+62
+63
+161
+144
+134
+255
+215
+190
+255
+215
+190
+253
+212
+188
+253
+212
+188
+255
+215
+190
+255
+215
+190
+161
+144
+134
+48
+58
+59
+137
+110
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+55
+66
+67
+51
+62
+63
+105
+93
+60
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+70
+79
+77
+245
+212
+186
+255
+215
+190
+253
+212
+188
+251
+209
+178
+253
+212
+188
+255
+215
+190
+255
+215
+190
+91
+92
+89
+75
+74
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+133
+120
+107
+84
+85
+82
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+75
+74
+61
+55
+66
+67
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+161
+144
+134
+172
+150
+134
+172
+150
+134
+137
+127
+115
+146
+135
+124
+207
+178
+158
+245
+212
+186
+255
+215
+190
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+76
+78
+76
+245
+212
+186
+255
+215
+190
+253
+212
+188
+253
+212
+188
+253
+212
+188
+255
+215
+190
+227
+196
+175
+58
+69
+70
+118
+86
+65
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+125
+90
+64
+63
+74
+74
+97
+98
+96
+76
+70
+64
+214
+121
+50
+227
+126
+50
+224
+123
+55
+234
+125
+52
+163
+104
+61
+48
+58
+59
+187
+166
+150
+255
+215
+190
+255
+215
+190
+251
+209
+178
+251
+209
+178
+255
+215
+190
+255
+215
+190
+176
+156
+141
+48
+58
+59
+173
+106
+60
+227
+126
+50
+224
+123
+55
+227
+126
+50
+212
+120
+56
+69
+69
+61
+101
+100
+92
+63
+74
+74
+125
+90
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+106
+82
+65
+63
+74
+74
+234
+204
+183
+255
+215
+190
+253
+212
+188
+253
+212
+188
+253
+212
+188
+255
+215
+190
+245
+212
+186
+70
+79
+77
+89
+75
+66
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+234
+125
+52
+183
+110
+59
+51
+62
+63
+176
+156
+141
+253
+204
+176
+251
+192
+154
+251
+192
+154
+251
+192
+154
+250
+200
+166
+77
+85
+81
+106
+82
+65
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+135
+94
+64
+51
+62
+63
+217
+187
+166
+255
+215
+190
+255
+215
+190
+253
+212
+188
+253
+212
+188
+255
+215
+190
+255
+215
+190
+109
+106
+99
+76
+70
+64
+224
+123
+55
+227
+126
+50
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+255
+215
+190
+250
+200
+166
+251
+192
+154
+252
+185
+144
+252
+185
+144
+251
+192
+154
+250
+200
+166
+255
+215
+190
+146
+135
+124
+56
+64
+60
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+194
+112
+58
+51
+62
+63
+146
+135
+124
+255
+215
+190
+255
+215
+190
+251
+209
+178
+251
+209
+178
+253
+212
+188
+255
+215
+190
+194
+173
+157
+43
+57
+62
+146
+97
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+77
+85
+81
+63
+74
+74
+135
+94
+64
+234
+125
+52
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+251
+209
+178
+250
+197
+158
+249
+189
+146
+249
+189
+146
+250
+200
+166
+172
+150
+134
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+120
+114
+108
+255
+215
+190
+255
+215
+190
+253
+212
+188
+251
+209
+178
+253
+212
+188
+255
+215
+190
+217
+187
+166
+51
+62
+63
+135
+94
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+126
+45
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+60
+247
+150
+84
+251
+168
+115
+187
+140
+108
+24
+22
+23
+59
+50
+39
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+156
+125
+62
+154
+125
+71
+154
+125
+71
+154
+125
+71
+156
+125
+62
+158
+125
+46
+47
+40
+38
+108
+87
+46
+158
+125
+46
+195
+167
+113
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+219
+212
+208
+164
+158
+157
+109
+106
+99
+65
+58
+56
+24
+22
+23
+24
+22
+23
+94
+60
+47
+178
+86
+46
+59
+50
+39
+150
+125
+114
+255
+215
+190
+255
+215
+190
+234
+204
+183
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+69
+69
+61
+84
+85
+82
+234
+204
+183
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+217
+187
+166
+55
+66
+67
+83
+78
+61
+168
+127
+42
+158
+125
+46
+158
+125
+46
+171
+129
+45
+123
+102
+54
+51
+62
+63
+76
+78
+76
+56
+64
+60
+152
+119
+47
+168
+127
+42
+158
+125
+46
+168
+127
+42
+129
+106
+52
+48
+58
+59
+161
+144
+134
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+217
+187
+166
+133
+120
+107
+77
+85
+81
+77
+85
+81
+146
+135
+124
+245
+212
+186
+176
+156
+141
+51
+62
+63
+137
+110
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+75
+74
+61
+63
+74
+74
+227
+196
+175
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+234
+204
+183
+76
+78
+76
+75
+74
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+77
+85
+81
+77
+85
+81
+88
+82
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+129
+106
+52
+48
+58
+59
+146
+135
+124
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+172
+150
+134
+48
+58
+59
+117
+98
+55
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+146
+135
+124
+120
+114
+108
+69
+69
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+111
+94
+57
+51
+62
+63
+176
+156
+141
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+194
+173
+157
+120
+114
+108
+70
+79
+77
+84
+85
+82
+161
+144
+134
+255
+215
+190
+255
+215
+190
+161
+144
+134
+56
+64
+60
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+155
+100
+63
+41
+58
+57
+161
+144
+134
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+137
+127
+115
+48
+58
+59
+183
+110
+59
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+89
+75
+66
+97
+98
+96
+172
+150
+134
+48
+58
+59
+183
+110
+59
+227
+126
+50
+224
+123
+55
+227
+126
+50
+214
+121
+50
+76
+70
+64
+84
+85
+82
+234
+204
+183
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+234
+204
+183
+77
+85
+81
+81
+73
+62
+224
+123
+55
+227
+126
+50
+224
+123
+55
+234
+125
+52
+173
+106
+60
+48
+58
+59
+176
+156
+141
+97
+98
+96
+95
+78
+64
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+125
+52
+173
+106
+60
+48
+58
+59
+146
+135
+124
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+161
+144
+134
+41
+58
+57
+155
+100
+63
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+51
+62
+63
+176
+156
+141
+250
+200
+166
+249
+189
+146
+252
+185
+144
+249
+189
+146
+250
+200
+166
+120
+114
+108
+69
+69
+61
+214
+121
+50
+227
+126
+50
+224
+123
+55
+227
+126
+50
+199
+115
+54
+62
+63
+61
+101
+100
+92
+245
+212
+186
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+187
+166
+150
+43
+57
+62
+135
+94
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+255
+215
+190
+253
+212
+188
+253
+204
+176
+250
+200
+166
+250
+200
+166
+253
+204
+176
+253
+212
+188
+255
+215
+190
+187
+166
+150
+41
+58
+57
+155
+100
+63
+234
+125
+52
+224
+123
+55
+227
+126
+50
+227
+126
+50
+95
+78
+64
+58
+69
+70
+227
+196
+175
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+245
+212
+186
+91
+92
+89
+62
+63
+61
+209
+117
+53
+227
+126
+50
+224
+123
+55
+227
+126
+50
+199
+115
+54
+62
+63
+61
+133
+120
+107
+77
+85
+81
+135
+94
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+253
+204
+176
+251
+192
+154
+252
+185
+144
+252
+185
+144
+251
+192
+154
+212
+173
+150
+48
+58
+59
+155
+100
+63
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+125
+52
+118
+86
+65
+51
+62
+63
+207
+178
+158
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+109
+106
+99
+56
+64
+60
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+247
+111
+26
+246
+116
+28
+247
+130
+53
+247
+143
+74
+249
+159
+103
+248
+180
+134
+89
+75
+66
+24
+22
+23
+85
+71
+43
+171
+129
+45
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+156
+125
+62
+154
+125
+71
+154
+125
+71
+154
+125
+71
+156
+125
+62
+175
+132
+40
+85
+71
+43
+47
+40
+38
+158
+125
+46
+158
+125
+46
+170
+137
+67
+237
+233
+225
+253
+255
+252
+253
+255
+252
+253
+255
+252
+207
+202
+200
+164
+158
+157
+146
+135
+124
+120
+114
+108
+89
+84
+82
+65
+58
+56
+47
+40
+38
+24
+22
+23
+24
+22
+23
+35
+31
+30
+94
+60
+47
+178
+86
+46
+226
+110
+35
+241
+100
+24
+144
+77
+47
+65
+58
+56
+253
+212
+188
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+129
+106
+52
+48
+58
+59
+101
+100
+92
+217
+187
+166
+245
+212
+186
+245
+212
+186
+194
+173
+157
+76
+78
+76
+56
+64
+60
+145
+114
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+171
+129
+45
+88
+82
+59
+77
+85
+81
+176
+156
+141
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+95
+87
+59
+41
+58
+57
+137
+127
+115
+227
+196
+175
+255
+215
+190
+255
+215
+190
+255
+215
+190
+245
+212
+186
+207
+178
+158
+120
+114
+108
+48
+58
+59
+62
+63
+61
+100
+89
+56
+95
+87
+59
+51
+62
+63
+120
+114
+108
+227
+196
+175
+55
+66
+67
+100
+89
+56
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+137
+110
+49
+51
+62
+63
+84
+85
+82
+207
+178
+158
+245
+212
+186
+245
+212
+186
+207
+178
+158
+97
+98
+96
+51
+62
+63
+137
+110
+49
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+91
+92
+89
+120
+114
+108
+63
+69
+60
+158
+125
+46
+161
+127
+40
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+43
+57
+62
+161
+144
+134
+227
+196
+175
+253
+212
+188
+234
+204
+183
+161
+144
+134
+51
+62
+63
+75
+74
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+146
+135
+124
+176
+156
+141
+48
+58
+59
+137
+110
+49
+171
+129
+45
+158
+125
+46
+161
+127
+40
+158
+125
+46
+75
+74
+61
+43
+57
+62
+161
+144
+134
+234
+204
+183
+255
+215
+190
+255
+215
+190
+255
+215
+190
+245
+212
+186
+194
+173
+157
+109
+106
+99
+43
+57
+62
+69
+69
+61
+105
+93
+60
+88
+82
+59
+48
+58
+59
+146
+135
+124
+255
+215
+190
+161
+144
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+225
+124
+48
+95
+78
+64
+43
+57
+62
+161
+144
+134
+234
+204
+183
+245
+212
+186
+227
+196
+175
+146
+135
+124
+35
+56
+60
+125
+90
+64
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+188
+112
+56
+51
+62
+63
+161
+144
+134
+234
+204
+183
+51
+62
+63
+125
+90
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+125
+52
+163
+104
+61
+43
+57
+62
+97
+98
+96
+207
+178
+158
+245
+212
+186
+245
+212
+186
+207
+178
+158
+91
+92
+89
+48
+58
+59
+173
+106
+60
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+118
+86
+65
+55
+66
+67
+234
+204
+183
+146
+135
+124
+56
+64
+60
+194
+112
+58
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+112
+85
+63
+35
+56
+60
+146
+135
+124
+227
+196
+175
+253
+212
+188
+234
+204
+183
+161
+144
+134
+43
+57
+62
+95
+78
+64
+225
+124
+48
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+51
+62
+63
+176
+156
+141
+250
+197
+158
+252
+185
+144
+248
+180
+134
+248
+180
+134
+251
+192
+154
+172
+150
+134
+48
+58
+59
+173
+106
+60
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+126
+45
+139
+96
+61
+41
+58
+57
+120
+114
+108
+217
+187
+166
+245
+212
+186
+234
+204
+183
+176
+156
+141
+58
+69
+70
+81
+73
+62
+214
+121
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+255
+215
+190
+255
+215
+190
+217
+187
+166
+133
+120
+107
+84
+85
+82
+91
+92
+89
+146
+135
+124
+234
+204
+183
+238
+205
+179
+63
+74
+74
+95
+78
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+84
+85
+82
+194
+173
+157
+245
+212
+186
+245
+212
+186
+217
+187
+166
+109
+106
+99
+41
+58
+57
+146
+97
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+126
+45
+146
+97
+64
+51
+62
+63
+187
+166
+150
+76
+78
+76
+135
+94
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+97
+98
+96
+250
+200
+166
+249
+189
+146
+248
+180
+134
+248
+180
+134
+252
+185
+144
+232
+190
+161
+70
+79
+77
+112
+85
+63
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+199
+115
+54
+65
+67
+64
+70
+79
+77
+187
+166
+150
+238
+205
+179
+245
+212
+186
+217
+187
+166
+133
+120
+107
+35
+56
+60
+135
+94
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+126
+45
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+123
+41
+247
+130
+60
+247
+150
+84
+251
+168
+115
+203
+161
+131
+55
+48
+48
+24
+22
+23
+71
+60
+43
+145
+114
+49
+171
+129
+45
+171
+129
+45
+158
+125
+46
+156
+125
+62
+154
+125
+71
+154
+125
+71
+156
+125
+62
+156
+125
+62
+171
+129
+45
+171
+129
+45
+101
+83
+47
+35
+31
+30
+123
+102
+54
+171
+129
+45
+158
+125
+46
+160
+120
+43
+224
+207
+180
+253
+255
+252
+253
+255
+252
+219
+212
+208
+47
+40
+38
+24
+22
+23
+24
+22
+23
+24
+22
+23
+24
+22
+23
+24
+22
+23
+35
+31
+30
+35
+31
+30
+24
+22
+23
+47
+40
+38
+226
+110
+35
+241
+100
+24
+226
+110
+35
+226
+110
+35
+144
+77
+47
+55
+48
+48
+238
+205
+179
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+123
+102
+54
+56
+64
+60
+51
+62
+63
+84
+85
+82
+84
+85
+82
+48
+58
+59
+63
+69
+60
+129
+106
+52
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+56
+64
+60
+137
+127
+115
+245
+212
+186
+84
+85
+82
+69
+69
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+161
+127
+40
+158
+125
+46
+95
+87
+59
+48
+58
+59
+63
+74
+74
+109
+106
+99
+133
+120
+107
+133
+120
+107
+91
+92
+89
+51
+62
+63
+56
+64
+60
+100
+89
+56
+152
+119
+47
+171
+129
+45
+175
+132
+40
+100
+89
+56
+48
+58
+59
+217
+187
+166
+120
+114
+108
+63
+69
+60
+152
+119
+47
+161
+127
+40
+158
+125
+46
+158
+125
+46
+168
+127
+42
+129
+106
+52
+61
+67
+58
+51
+62
+63
+84
+85
+82
+84
+85
+82
+51
+62
+63
+56
+64
+60
+123
+102
+54
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+97
+98
+96
+187
+166
+150
+48
+58
+59
+123
+102
+54
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+158
+125
+46
+83
+78
+61
+48
+58
+59
+63
+74
+74
+91
+92
+89
+70
+79
+77
+48
+58
+59
+75
+74
+61
+152
+119
+47
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+146
+135
+124
+234
+204
+183
+63
+74
+74
+83
+78
+61
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+152
+119
+47
+83
+78
+61
+48
+58
+59
+70
+79
+77
+109
+106
+99
+133
+120
+107
+120
+114
+108
+84
+85
+82
+48
+58
+59
+61
+67
+58
+111
+94
+57
+158
+125
+46
+171
+129
+45
+171
+129
+45
+88
+82
+59
+58
+69
+70
+238
+205
+179
+172
+150
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+212
+120
+56
+95
+78
+64
+43
+57
+62
+70
+79
+77
+84
+85
+82
+63
+74
+74
+48
+58
+59
+118
+86
+65
+225
+124
+48
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+112
+85
+63
+55
+66
+67
+227
+196
+175
+255
+215
+190
+120
+114
+108
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+155
+100
+63
+62
+63
+61
+51
+62
+63
+77
+85
+81
+77
+85
+81
+51
+62
+63
+62
+63
+61
+155
+100
+63
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+199
+115
+54
+56
+64
+60
+120
+114
+108
+255
+215
+190
+217
+187
+166
+43
+57
+62
+125
+90
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+224
+123
+55
+106
+82
+65
+48
+58
+59
+63
+74
+74
+84
+85
+82
+70
+79
+77
+43
+57
+62
+95
+78
+64
+212
+120
+56
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+234
+125
+52
+183
+110
+59
+51
+62
+63
+172
+150
+134
+251
+192
+154
+248
+180
+134
+249
+174
+124
+249
+174
+124
+248
+180
+134
+236
+186
+153
+63
+74
+74
+95
+78
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+135
+94
+64
+51
+62
+63
+55
+66
+67
+84
+85
+82
+70
+79
+77
+41
+58
+57
+81
+73
+62
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+255
+215
+190
+194
+173
+157
+58
+69
+70
+62
+63
+61
+106
+82
+65
+95
+78
+64
+51
+62
+63
+91
+92
+89
+238
+205
+179
+161
+144
+134
+48
+58
+59
+183
+110
+59
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+125
+52
+173
+106
+60
+65
+67
+64
+48
+58
+59
+77
+85
+81
+84
+85
+82
+55
+66
+67
+56
+64
+60
+146
+97
+64
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+69
+69
+61
+101
+100
+92
+227
+196
+175
+63
+74
+74
+135
+94
+64
+234
+125
+52
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+250
+197
+158
+252
+185
+144
+249
+174
+124
+249
+174
+124
+250
+176
+132
+251
+192
+154
+120
+114
+108
+62
+63
+61
+209
+117
+53
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+188
+112
+56
+76
+70
+64
+41
+58
+57
+77
+85
+81
+84
+85
+82
+58
+69
+70
+48
+58
+59
+125
+90
+64
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+126
+45
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+243
+101
+2
+247
+103
+7
+247
+103
+7
+247
+111
+26
+247
+118
+39
+247
+130
+53
+250
+139
+73
+246
+156
+93
+249
+174
+124
+203
+161
+131
+55
+48
+48
+24
+22
+23
+35
+31
+30
+85
+71
+43
+137
+110
+49
+152
+119
+47
+168
+127
+42
+171
+129
+45
+171
+129
+45
+168
+127
+42
+152
+119
+47
+117
+98
+55
+59
+50
+39
+35
+31
+30
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+152
+119
+47
+224
+207
+180
+253
+255
+252
+253
+255
+252
+253
+255
+252
+146
+135
+124
+65
+58
+56
+35
+31
+30
+24
+22
+23
+24
+22
+23
+35
+31
+30
+35
+31
+30
+35
+31
+30
+35
+31
+30
+24
+22
+23
+83
+53
+42
+236
+108
+29
+236
+108
+29
+226
+110
+35
+94
+60
+47
+65
+58
+56
+253
+212
+188
+255
+215
+190
+238
+205
+179
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+161
+127
+40
+168
+127
+42
+145
+114
+49
+105
+93
+60
+83
+78
+61
+83
+78
+61
+111
+94
+57
+158
+125
+46
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+88
+82
+59
+51
+62
+63
+217
+187
+166
+255
+215
+190
+176
+156
+141
+43
+57
+62
+105
+93
+60
+171
+129
+45
+158
+125
+46
+158
+125
+46
+161
+127
+40
+168
+127
+42
+137
+110
+49
+88
+82
+59
+69
+69
+61
+62
+63
+61
+63
+69
+60
+75
+74
+61
+105
+93
+60
+152
+119
+47
+171
+129
+45
+168
+127
+42
+158
+125
+46
+171
+129
+45
+129
+106
+52
+48
+58
+59
+194
+173
+157
+207
+178
+158
+43
+57
+62
+100
+89
+56
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+152
+119
+47
+111
+94
+57
+83
+78
+61
+83
+78
+61
+105
+93
+60
+145
+114
+49
+168
+127
+42
+161
+127
+40
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+84
+85
+82
+245
+212
+186
+77
+85
+81
+75
+74
+61
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+168
+127
+42
+129
+106
+52
+95
+87
+59
+81
+73
+62
+95
+87
+59
+123
+102
+54
+168
+127
+42
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+56
+64
+60
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+137
+127
+115
+255
+215
+190
+161
+144
+134
+48
+58
+59
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+168
+127
+42
+129
+106
+52
+88
+82
+59
+69
+69
+61
+62
+63
+61
+63
+69
+60
+75
+74
+61
+117
+98
+55
+152
+119
+47
+171
+129
+45
+161
+127
+40
+158
+125
+46
+171
+129
+45
+111
+94
+57
+48
+58
+59
+227
+196
+175
+176
+156
+141
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+227
+126
+50
+163
+104
+61
+112
+85
+63
+95
+78
+64
+118
+86
+65
+173
+106
+60
+227
+126
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+183
+110
+59
+51
+62
+63
+133
+120
+107
+255
+215
+190
+255
+215
+190
+217
+187
+166
+51
+62
+63
+106
+82
+65
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+199
+115
+54
+135
+94
+64
+95
+78
+64
+95
+78
+64
+135
+94
+64
+199
+115
+54
+234
+125
+52
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+106
+82
+65
+51
+62
+63
+217
+187
+166
+255
+215
+190
+255
+215
+190
+120
+114
+108
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+173
+106
+60
+118
+86
+65
+95
+78
+64
+112
+85
+63
+163
+104
+61
+227
+126
+50
+227
+126
+50
+227
+126
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+101
+100
+92
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+51
+62
+63
+172
+150
+134
+252
+185
+144
+249
+174
+124
+247
+165
+111
+247
+165
+111
+249
+174
+124
+252
+185
+144
+154
+133
+118
+48
+58
+59
+163
+104
+61
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+188
+112
+56
+125
+90
+64
+95
+78
+64
+106
+82
+65
+155
+100
+63
+224
+123
+55
+234
+125
+52
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+137
+127
+115
+253
+212
+188
+91
+92
+89
+69
+69
+61
+194
+112
+58
+234
+126
+45
+234
+126
+45
+163
+104
+61
+51
+62
+63
+137
+127
+115
+238
+205
+179
+63
+74
+74
+89
+75
+66
+227
+126
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+209
+117
+53
+146
+97
+64
+106
+82
+65
+95
+78
+64
+125
+90
+64
+194
+112
+58
+234
+126
+45
+227
+126
+50
+224
+123
+55
+227
+126
+50
+234
+126
+45
+125
+90
+64
+41
+58
+57
+194
+173
+157
+238
+205
+179
+63
+74
+74
+135
+94
+64
+234
+125
+52
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+251
+192
+154
+250
+176
+132
+251
+168
+115
+247
+165
+111
+249
+174
+124
+245
+179
+138
+195
+157
+134
+41
+58
+57
+135
+94
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+125
+52
+214
+121
+50
+146
+97
+64
+106
+82
+65
+95
+78
+64
+125
+90
+64
+183
+110
+59
+227
+126
+50
+227
+126
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+125
+52
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+249
+152
+92
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+247
+103
+7
+246
+109
+10
+247
+111
+26
+247
+118
+39
+247
+130
+53
+247
+143
+74
+249
+159
+103
+250
+176
+132
+219
+170
+138
+115
+102
+92
+47
+40
+38
+24
+22
+23
+35
+31
+30
+47
+40
+38
+59
+50
+39
+59
+50
+39
+59
+50
+39
+59
+50
+39
+47
+40
+38
+47
+40
+38
+71
+60
+43
+137
+110
+49
+171
+129
+45
+158
+125
+46
+158
+125
+46
+152
+119
+47
+170
+137
+67
+219
+212
+208
+237
+233
+225
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+219
+212
+208
+152
+147
+147
+109
+106
+99
+65
+67
+64
+35
+31
+30
+35
+31
+30
+35
+31
+30
+35
+31
+30
+24
+22
+23
+94
+60
+47
+178
+86
+46
+109
+63
+45
+35
+31
+30
+124
+111
+99
+251
+209
+178
+251
+209
+178
+234
+204
+183
+76
+78
+76
+95
+87
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+117
+98
+55
+129
+106
+52
+168
+127
+42
+168
+127
+42
+171
+129
+45
+168
+127
+42
+168
+127
+42
+171
+129
+45
+161
+127
+40
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+117
+98
+55
+48
+58
+59
+146
+135
+124
+255
+215
+190
+255
+215
+190
+255
+215
+190
+120
+114
+108
+51
+62
+63
+123
+102
+54
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+168
+127
+42
+158
+125
+46
+152
+119
+47
+152
+119
+47
+158
+125
+46
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+158
+125
+46
+81
+73
+62
+58
+69
+70
+227
+196
+175
+255
+215
+190
+120
+114
+108
+48
+58
+59
+129
+106
+52
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+161
+127
+40
+168
+127
+42
+168
+127
+42
+168
+127
+42
+171
+129
+45
+168
+127
+42
+168
+127
+42
+152
+119
+47
+117
+98
+55
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+88
+82
+59
+84
+85
+82
+255
+215
+190
+176
+156
+141
+48
+58
+59
+111
+94
+57
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+168
+127
+42
+168
+127
+42
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+145
+114
+49
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+117
+98
+55
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+63
+69
+60
+137
+127
+115
+255
+215
+190
+238
+205
+179
+91
+92
+89
+56
+64
+60
+137
+110
+49
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+168
+127
+42
+158
+125
+46
+152
+119
+47
+158
+125
+46
+168
+127
+42
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+152
+119
+47
+69
+69
+61
+84
+85
+82
+245
+212
+186
+172
+150
+134
+62
+63
+61
+199
+115
+54
+227
+126
+50
+224
+123
+55
+227
+126
+50
+199
+115
+54
+125
+90
+64
+227
+126
+50
+227
+126
+50
+227
+126
+50
+234
+125
+52
+227
+126
+50
+234
+125
+52
+234
+125
+52
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+214
+121
+50
+81
+73
+62
+63
+74
+74
+227
+196
+175
+255
+215
+190
+253
+212
+188
+255
+215
+190
+146
+135
+124
+48
+58
+59
+146
+97
+64
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+227
+126
+50
+227
+126
+50
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+139
+96
+61
+48
+58
+59
+146
+135
+124
+255
+215
+190
+253
+212
+188
+255
+215
+190
+217
+187
+166
+55
+66
+67
+95
+78
+64
+225
+124
+48
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+227
+126
+50
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+126
+45
+163
+104
+61
+183
+110
+59
+227
+126
+50
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+97
+98
+96
+56
+64
+60
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+183
+110
+59
+51
+62
+63
+167
+142
+123
+248
+180
+134
+247
+165
+111
+249
+159
+103
+246
+156
+93
+249
+159
+103
+249
+174
+124
+239
+182
+144
+77
+85
+81
+65
+67
+64
+199
+115
+54
+234
+125
+52
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+227
+126
+50
+227
+126
+50
+234
+125
+52
+227
+126
+50
+227
+126
+50
+135
+94
+64
+188
+112
+56
+227
+126
+50
+224
+123
+55
+227
+126
+50
+209
+117
+53
+65
+67
+64
+146
+135
+124
+227
+196
+175
+43
+57
+62
+146
+97
+64
+234
+126
+45
+224
+123
+55
+224
+123
+55
+234
+126
+45
+106
+82
+65
+70
+79
+77
+253
+212
+188
+176
+156
+141
+41
+58
+57
+125
+90
+64
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+234
+125
+52
+227
+126
+50
+234
+125
+52
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+155
+100
+63
+48
+58
+59
+120
+114
+108
+253
+212
+188
+234
+204
+183
+63
+74
+74
+135
+94
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+252
+185
+144
+245
+169
+119
+249
+159
+103
+249
+159
+103
+247
+165
+111
+249
+174
+124
+251
+192
+154
+109
+106
+99
+62
+63
+61
+188
+112
+56
+234
+125
+52
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+234
+125
+52
+227
+126
+50
+234
+125
+52
+227
+126
+50
+227
+126
+50
+212
+120
+56
+199
+115
+54
+224
+123
+55
+224
+123
+55
+224
+123
+55
+234
+126
+45
+139
+96
+61
+55
+66
+67
+250
+200
+166
+249
+174
+124
+247
+150
+84
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+243
+101
+2
+243
+101
+2
+247
+103
+7
+247
+111
+26
+247
+111
+26
+247
+123
+41
+247
+130
+60
+243
+141
+78
+249
+159
+103
+250
+176
+132
+251
+192
+154
+207
+178
+158
+154
+133
+118
+82
+69
+65
+24
+22
+23
+71
+60
+43
+101
+83
+47
+101
+83
+47
+101
+83
+47
+117
+98
+55
+145
+114
+49
+171
+129
+45
+168
+127
+42
+160
+120
+43
+160
+120
+43
+158
+125
+46
+192
+155
+91
+237
+233
+225
+81
+77
+76
+55
+48
+48
+74
+68
+68
+81
+77
+76
+89
+84
+82
+91
+92
+89
+89
+84
+82
+81
+77
+76
+65
+58
+56
+47
+40
+38
+35
+31
+30
+55
+48
+48
+115
+102
+92
+172
+150
+134
+55
+48
+48
+24
+22
+23
+24
+22
+23
+24
+22
+23
+65
+58
+56
+230
+173
+136
+251
+192
+154
+250
+197
+158
+250
+200
+166
+84
+85
+82
+88
+82
+59
+171
+129
+45
+158
+125
+46
+158
+125
+46
+171
+129
+45
+83
+78
+61
+69
+69
+61
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+117
+98
+55
+48
+58
+59
+101
+100
+92
+238
+205
+179
+253
+204
+176
+250
+200
+166
+253
+204
+176
+238
+205
+179
+91
+92
+89
+51
+62
+63
+117
+98
+55
+171
+129
+45
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+161
+127
+40
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+145
+114
+49
+75
+74
+61
+48
+58
+59
+172
+150
+134
+253
+212
+188
+255
+215
+190
+234
+204
+183
+84
+85
+82
+56
+64
+60
+129
+106
+52
+171
+129
+45
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+168
+127
+42
+81
+73
+62
+63
+69
+60
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+83
+78
+61
+84
+85
+82
+255
+215
+190
+245
+212
+186
+109
+106
+99
+51
+62
+63
+123
+102
+54
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+161
+127
+40
+171
+129
+45
+105
+93
+60
+51
+62
+63
+137
+110
+49
+168
+127
+42
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+137
+127
+115
+58
+69
+70
+111
+94
+57
+171
+129
+45
+158
+125
+46
+158
+125
+46
+158
+125
+46
+62
+63
+61
+137
+127
+115
+255
+215
+190
+255
+215
+190
+227
+196
+175
+77
+85
+81
+56
+64
+60
+129
+106
+52
+171
+129
+45
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+161
+127
+40
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+168
+127
+42
+137
+110
+49
+69
+69
+61
+51
+62
+63
+187
+166
+150
+255
+215
+190
+172
+150
+134
+51
+62
+63
+194
+112
+58
+227
+126
+50
+224
+123
+55
+234
+125
+52
+183
+110
+59
+48
+58
+59
+155
+100
+63
+234
+126
+45
+224
+123
+55
+224
+123
+55
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+125
+52
+209
+117
+53
+89
+75
+66
+48
+58
+59
+187
+166
+150
+250
+200
+166
+250
+197
+158
+251
+192
+154
+250
+197
+158
+250
+200
+166
+109
+106
+99
+48
+58
+59
+135
+94
+64
+234
+125
+52
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+135
+94
+64
+43
+57
+62
+120
+114
+108
+250
+200
+166
+250
+197
+158
+251
+192
+154
+250
+197
+158
+250
+200
+166
+172
+150
+134
+41
+58
+57
+106
+82
+65
+214
+121
+50
+234
+125
+52
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+224
+123
+55
+227
+126
+50
+234
+126
+45
+183
+110
+59
+48
+58
+59
+135
+94
+64
+234
+126
+45
+224
+123
+55
+227
+126
+50
+188
+112
+56
+51
+62
+63
+109
+106
+99
+51
+62
+63
+183
+110
+59
+227
+126
+50
+224
+123
+55
+234
+125
+52
+173
+106
+60
+48
+58
+59
+178
+146
+122
+245
+169
+119
+246
+156
+93
+247
+150
+84
+249
+146
+83
+247
+150
+84
+249
+159
+103
+249
+174
+124
+203
+161
+131
+58
+69
+70
+76
+70
+64
+194
+112
+58
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+183
+110
+59
+48
+58
+59
+163
+104
+61
+234
+126
+45
+224
+123
+55
+227
+126
+50
+209
+117
+53
+62
+63
+61
+146
+135
+124
+217
+187
+166
+43
+57
+62
+163
+104
+61
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+126
+45
+125
+90
+64
+58
+69
+70
+234
+204
+183
+255
+215
+190
+137
+127
+115
+41
+58
+57
+118
+86
+65
+225
+124
+48
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+146
+97
+64
+51
+62
+63
+97
+98
+96
+238
+205
+179
+255
+215
+190
+234
+204
+183
+63
+74
+74
+118
+86
+65
+234
+126
+45
+224
+123
+55
+227
+126
+50
+227
+126
+50
+81
+73
+62
+101
+100
+92
+250
+176
+132
+247
+165
+111
+246
+156
+93
+249
+152
+92
+249
+159
+103
+251
+168
+115
+252
+185
+144
+217
+187
+166
+58
+69
+70
+69
+69
+61
+199
+115
+54
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+224
+123
+55
+227
+126
+50
+225
+124
+48
+81
+73
+62
+81
+73
+62
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+126
+45
+139
+96
+61
+55
+66
+67
+250
+197
+158
+249
+174
+124
+247
+150
+84
+247
+130
+60
+247
+118
+39
+247
+111
+26
+247
+103
+7
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+237
+95
+0
+237
+95
+0
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+237
+95
+0
+243
+101
+2
+247
+103
+7
+236
+102
+14
+247
+111
+26
+246
+116
+28
+247
+123
+41
+247
+130
+60
+243
+141
+78
+249
+159
+103
+249
+174
+124
+249
+189
+146
+253
+204
+176
+124
+111
+99
+35
+31
+30
+145
+114
+49
+175
+132
+40
+171
+129
+45
+168
+127
+42
+192
+155
+91
+216
+194
+154
+224
+207
+180
+224
+207
+180
+216
+194
+154
+216
+194
+154
+239
+227
+208
+253
+255
+252
+253
+255
+252
+186
+181
+179
+146
+135
+124
+120
+114
+108
+109
+106
+99
+95
+78
+64
+71
+60
+43
+85
+71
+43
+101
+83
+47
+108
+87
+46
+35
+31
+30
+150
+125
+114
+227
+196
+175
+255
+215
+190
+253
+212
+188
+212
+173
+150
+121
+100
+85
+95
+78
+64
+129
+102
+78
+234
+168
+124
+250
+176
+132
+250
+176
+132
+248
+180
+134
+249
+189
+146
+124
+111
+99
+62
+63
+61
+152
+119
+47
+171
+129
+45
+171
+129
+45
+145
+114
+49
+56
+64
+60
+43
+57
+62
+83
+78
+61
+152
+119
+47
+171
+129
+45
+171
+129
+45
+168
+127
+42
+168
+127
+42
+171
+129
+45
+171
+129
+45
+152
+119
+47
+95
+87
+59
+48
+58
+59
+101
+100
+92
+236
+186
+153
+251
+192
+154
+252
+185
+144
+248
+180
+134
+245
+179
+138
+249
+189
+146
+236
+186
+153
+101
+100
+92
+48
+58
+59
+88
+82
+59
+137
+110
+49
+168
+127
+42
+171
+129
+45
+168
+127
+42
+168
+127
+42
+168
+127
+42
+168
+127
+42
+171
+129
+45
+171
+129
+45
+168
+127
+42
+145
+114
+49
+100
+89
+56
+56
+64
+60
+58
+69
+70
+172
+150
+134
+250
+200
+166
+251
+192
+154
+250
+197
+158
+250
+200
+166
+217
+187
+166
+84
+85
+82
+51
+62
+63
+105
+93
+60
+158
+125
+46
+171
+129
+45
+171
+129
+45
+168
+127
+42
+168
+127
+42
+168
+127
+42
+171
+129
+45
+152
+119
+47
+83
+78
+61
+43
+57
+62
+48
+58
+59
+129
+106
+52
+175
+132
+40
+171
+129
+45
+158
+125
+46
+63
+69
+60
+120
+114
+108
+255
+215
+190
+255
+215
+190
+227
+196
+175
+84
+85
+82
+51
+62
+63
+105
+93
+60
+158
+125
+46
+171
+129
+45
+171
+129
+45
+168
+127
+42
+168
+127
+42
+168
+127
+42
+171
+129
+45
+158
+125
+46
+105
+93
+60
+48
+58
+59
+48
+58
+59
+129
+106
+52
+168
+127
+42
+158
+125
+46
+168
+127
+42
+145
+114
+49
+51
+62
+63
+172
+150
+134
+91
+92
+89
+75
+74
+61
+168
+127
+42
+171
+129
+45
+175
+132
+40
+117
+98
+55
+48
+58
+59
+176
+156
+141
+253
+204
+176
+253
+204
+176
+253
+204
+176
+217
+187
+166
+84
+85
+82
+48
+58
+59
+95
+87
+59
+145
+114
+49
+168
+127
+42
+171
+129
+45
+168
+127
+42
+168
+127
+42
+168
+127
+42
+168
+127
+42
+171
+129
+45
+171
+129
+45
+158
+125
+46
+137
+110
+49
+95
+87
+59
+51
+62
+63
+70
+79
+77
+187
+166
+150
+251
+209
+178
+251
+209
+178
+207
+178
+158
+43
+57
+62
+135
+94
+64
+238
+123
+45
+234
+126
+45
+234
+126
+45
+118
+86
+65
+35
+56
+60
+56
+64
+60
+155
+100
+63
+234
+125
+52
+234
+126
+45
+234
+125
+52
+227
+126
+50
+227
+126
+50
+234
+126
+45
+227
+126
+50
+163
+104
+61
+76
+70
+64
+51
+62
+63
+167
+142
+123
+251
+192
+154
+248
+180
+134
+249
+174
+124
+249
+174
+124
+250
+176
+132
+245
+179
+138
+236
+186
+153
+109
+106
+99
+41
+58
+57
+95
+78
+64
+183
+110
+59
+234
+125
+52
+234
+126
+45
+234
+125
+52
+227
+126
+50
+227
+126
+50
+234
+125
+52
+234
+126
+45
+227
+126
+50
+183
+110
+59
+95
+78
+64
+43
+57
+62
+124
+111
+99
+236
+186
+153
+252
+185
+144
+250
+176
+132
+249
+174
+124
+249
+174
+124
+248
+180
+134
+251
+192
+154
+154
+133
+118
+43
+57
+62
+81
+73
+62
+173
+106
+60
+227
+126
+50
+234
+126
+45
+227
+126
+50
+227
+126
+50
+227
+126
+50
+234
+126
+45
+234
+125
+52
+155
+100
+63
+56
+64
+60
+35
+56
+60
+89
+75
+66
+227
+126
+50
+234
+126
+45
+238
+128
+40
+146
+97
+64
+43
+57
+62
+176
+156
+141
+58
+69
+70
+118
+86
+65
+234
+126
+45
+234
+126
+45
+234
+126
+45
+112
+85
+63
+43
+57
+62
+210
+156
+119
+245
+162
+103
+247
+150
+84
+247
+143
+74
+248
+138
+64
+241
+138
+68
+249
+146
+83
+249
+159
+103
+250
+176
+132
+195
+157
+134
+58
+69
+70
+65
+67
+64
+155
+100
+63
+227
+126
+50
+234
+126
+45
+227
+126
+50
+227
+126
+50
+234
+125
+52
+234
+126
+45
+234
+126
+45
+173
+106
+60
+65
+67
+64
+35
+56
+60
+106
+82
+65
+234
+126
+45
+234
+126
+45
+238
+128
+40
+146
+97
+64
+43
+57
+62
+187
+166
+150
+234
+204
+183
+55
+66
+67
+106
+82
+65
+234
+126
+45
+234
+125
+52
+234
+125
+52
+224
+123
+55
+81
+73
+62
+91
+92
+89
+245
+212
+186
+253
+212
+188
+253
+212
+188
+137
+127
+115
+41
+58
+57
+89
+75
+66
+173
+106
+60
+227
+126
+50
+234
+126
+45
+227
+126
+50
+227
+126
+50
+227
+126
+50
+234
+125
+52
+234
+126
+45
+234
+125
+52
+194
+112
+58
+106
+82
+65
+43
+57
+62
+101
+100
+92
+227
+196
+175
+251
+209
+178
+251
+209
+178
+253
+212
+188
+97
+98
+96
+69
+69
+61
+209
+117
+53
+234
+126
+45
+238
+128
+40
+173
+106
+60
+51
+62
+63
+139
+115
+96
+251
+168
+115
+246
+156
+93
+247
+150
+84
+249
+146
+83
+249
+152
+92
+247
+165
+111
+248
+180
+134
+250
+200
+166
+187
+166
+150
+55
+66
+67
+69
+69
+61
+163
+104
+61
+234
+125
+52
+234
+126
+45
+234
+125
+52
+227
+126
+50
+227
+126
+50
+234
+126
+45
+234
+126
+45
+199
+115
+54
+95
+78
+64
+35
+56
+60
+81
+73
+62
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+126
+45
+139
+96
+61
+51
+62
+63
+250
+197
+158
+245
+169
+119
+247
+150
+84
+247
+130
+60
+247
+118
+39
+235
+107
+16
+243
+101
+2
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+246
+97
+3
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+246
+97
+3
+237
+95
+0
+243
+101
+2
+247
+103
+7
+236
+102
+14
+247
+111
+26
+246
+116
+28
+238
+123
+45
+241
+132
+59
+247
+143
+74
+246
+156
+93
+245
+169
+119
+230
+173
+136
+47
+40
+38
+59
+50
+39
+168
+127
+42
+161
+127
+40
+160
+120
+43
+192
+155
+91
+255
+238
+227
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+253
+255
+252
+239
+227
+208
+170
+137
+67
+171
+129
+45
+171
+129
+45
+171
+129
+45
+59
+50
+39
+154
+133
+118
+250
+200
+166
+250
+197
+158
+249
+189
+146
+248
+180
+134
+249
+174
+124
+247
+165
+111
+247
+165
+111
+245
+162
+103
+249
+159
+103
+245
+162
+103
+247
+165
+111
+249
+174
+124
+203
+161
+131
+55
+66
+67
+69
+69
+61
+111
+94
+57
+105
+93
+60
+69
+69
+61
+63
+74
+74
+137
+127
+115
+51
+62
+63
+62
+63
+61
+95
+87
+59
+129
+106
+52
+137
+110
+49
+137
+110
+49
+123
+102
+54
+95
+87
+59
+62
+63
+61
+51
+62
+63
+133
+120
+107
+239
+182
+144
+248
+180
+134
+245
+169
+119
+247
+165
+111
+249
+159
+103
+245
+162
+103
+251
+168
+115
+250
+176
+132
+239
+182
+144
+154
+133
+118
+63
+74
+74
+51
+62
+63
+75
+74
+61
+105
+93
+60
+123
+102
+54
+137
+110
+49
+137
+110
+49
+137
+110
+49
+123
+102
+54
+100
+89
+56
+75
+74
+61
+56
+64
+60
+55
+66
+67
+124
+111
+99
+219
+170
+138
+252
+185
+144
+250
+176
+132
+249
+174
+124
+249
+174
+124
+250
+176
+132
+252
+185
+144
+236
+186
+153
+124
+111
+99
+48
+58
+59
+63
+69
+60
+95
+87
+59
+123
+102
+54
+137
+110
+49
+137
+110
+49
+129
+106
+52
+95
+87
+59
+62
+63
+61
+55
+66
+67
+146
+135
+124
+77
+85
+81
+61
+67
+58
+105
+93
+60
+111
+94
+57
+75
+74
+61
+48
+58
+59
+194
+173
+157
+255
+215
+190
+255
+215
+190
+255
+215
+190
+234
+204
+183
+120
+114
+108
+43
+57
+62
+69
+69
+61
+100
+89
+56
+129
+106
+52
+137
+110
+49
+137
+110
+49
+129
+106
+52
+105
+93
+60
+69
+69
+61
+48
+58
+59
+77
+85
+81
+51
+62
+63
+137
+110
+49
+168
+127
+42
+158
+125
+46
+168
+127
+42
+137
+110
+49
+51
+62
+63
+187
+166
+150
+187
+166
+150
+48
+58
+59
+75
+74
+61
+111
+94
+57
+95
+87
+59
+56
+64
+60
+99
+90
+79
+239
+182
+144
+252
+185
+144
+245
+179
+138
+252
+185
+144
+249
+189
+146
+236
+186
+153
+137
+127
+115
+55
+66
+67
+56
+64
+60
+83
+78
+61
+111
+94
+57
+129
+106
+52
+137
+110
+49
+137
+110
+49
+129
+106
+52
+117
+98
+55
+95
+87
+59
+69
+69
+61
+51
+62
+63
+63
+74
+74
+133
+120
+107
+236
+186
+153
+250
+197
+158
+251
+192
+154
+251
+192
+154
+250
+197
+158
+124
+111
+99
+51
+62
+63
+112
+85
+63
+146
+97
+64
+106
+82
+65
+48
+58
+59
+120
+114
+108
+101
+100
+92
+48
+58
+59
+95
+78
+64
+146
+97
+64
+183
+110
+59
+188
+112
+56
+173
+106
+60
+139
+96
+61
+89
+75
+66
+48
+58
+59
+77
+85
+81
+186
+157
+134
+245
+179
+138
+245
+169
+119
+245
+162
+103
+246
+156
+93
+246
+156
+93
+246
+156
+93
+247
+165
+111
+249
+174
+124
+249
+189
+146
+154
+133
+118
+58
+69
+70
+51
+62
+63
+95
+78
+64
+139
+96
+61
+173
+106
+60
+183
+110
+59
+183
+110
+59
+173
+106
+60
+139
+96
+61
+95
+78
+64
+51
+62
+63
+63
+74
+74
+167
+142
+123
+249
+189
+146
+249
+174
+124
+247
+165
+111
+246
+156
+93
+246
+156
+93
+246
+156
+93
+245
+162
+103
+245
+169
+119
+245
+179
+138
+178
+146
+122
+70
+79
+77
+48
+58
+59
+89
+75
+66
+139
+96
+61
+173
+106
+60
+188
+112
+56
+183
+110
+59
+155
+100
+63
+95
+78
+64
+48
+58
+59
+101
+100
+92
+146
+135
+124
+48
+58
+59
+95
+78
+64
+146
+97
+64
+125
+90
+64
+62
+63
+61
+101
+100
+92
+245
+212
+186
+137
+127
+115
+48
+58
+59
+106
+82
+65
+146
+97
+64
+106
+82
+65
+48
+58
+59
+124
+111
+99
+247
+165
+111
+247
+150
+84
+241
+138
+68
+241
+132
+59
+247
+130
+53
+247
+130
+53
+242
+133
+67
+241
+145
+79
+245
+162
+103
+250
+176
+132
+203
+161
+131
+91
+92
+89
+43
+57
+62
+81
+73
+62
+135
+94
+64
+173
+106
+60
+188
+112
+56
+183
+110
+59
+155
+100
+63
+106
+82
+65
+51
+62
+63
+91
+92
+89
+133
+120
+107
+48
+58
+59
+95
+78
+64
+146
+97
+64
+118
+86
+65
+56
+64
+60
+101
+100
+92
+245
+212
+186
+253
+212
+188
+146
+135
+124
+48
+58
+59
+118
+86
+65
+183
+110
+59
+173
+106
+60
+95
+78
+64
+43
+57
+62
+186
+157
+134
+250
+197
+158
+251
+192
+154
+250
+197
+158
+250
+200
+166
+172
+150
+134
+70
+79
+77
+48
+58
+59
+89
+75
+66
+135
+94
+64
+163
+104
+61
+183
+110
+59
+183
+110
+59
+173
+106
+60
+146
+97
+64
+95
+78
+64
+56
+64
+60
+55
+66
+67
+150
+125
+114
+236
+186
+153
+251
+192
+154
+249
+189
+146
+249
+189
+146
+251
+192
+154
+195
+157
+134
+51
+62
+63
+76
+70
+64
+139
+96
+61
+125
+90
+64
+65
+67
+64
+76
+78
+76
+234
+168
+124
+249
+159
+103
+247
+150
+84
+243
+141
+78
+247
+143
+74
+247
+150
+84
+249
+159
+103
+250
+176
+132
+250
+197
+158
+255
+215
+190
+207
+178
+158
+84
+85
+82
+48
+58
+59
+89
+75
+66
+146
+97
+64
+173
+106
+60
+183
+110
+59
+183
+110
+59
+163
+104
+61
+118
+86
+65
+62
+63
+61
+58
+69
+70
+63
+74
+74
+81
+73
+62
+227
+126
+50
+227
+126
+50
+224
+123
+55
+234
+126
+45
+135
+94
+64
+58
+69
+70
+251
+192
+154
+245
+169
+119
+249
+146
+83
+247
+130
+53
+238
+116
+34
+235
+107
+16
+243
+101
+2
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+246
+97
+3
+246
+97
+3
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+243
+101
+2
+236
+102
+14
+236
+102
+14
+235
+107
+16
+246
+116
+28
+239
+117
+44
+241
+132
+59
+247
+143
+74
+249
+152
+92
+214
+151
+109
+118
+86
+65
+146
+111
+88
+192
+155
+91
+192
+155
+91
+195
+167
+113
+239
+227
+208
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+255
+238
+227
+216
+194
+154
+192
+155
+91
+192
+155
+91
+192
+155
+91
+146
+111
+88
+162
+125
+96
+250
+176
+132
+245
+169
+119
+247
+165
+111
+249
+159
+103
+246
+156
+93
+247
+150
+84
+243
+141
+78
+243
+141
+78
+243
+141
+78
+241
+145
+79
+247
+150
+84
+249
+159
+103
+245
+169
+119
+187
+140
+108
+89
+84
+82
+48
+58
+59
+48
+58
+59
+91
+92
+89
+194
+173
+157
+255
+215
+190
+207
+178
+158
+109
+106
+99
+51
+62
+63
+48
+58
+59
+51
+62
+63
+48
+58
+59
+48
+58
+59
+55
+66
+67
+124
+111
+99
+203
+161
+131
+248
+180
+134
+245
+169
+119
+249
+159
+103
+247
+150
+84
+243
+141
+78
+243
+141
+78
+243
+141
+78
+247
+150
+84
+249
+159
+103
+245
+169
+119
+248
+180
+134
+219
+170
+138
+154
+133
+118
+84
+85
+82
+51
+62
+63
+48
+58
+59
+51
+62
+63
+51
+62
+63
+48
+58
+59
+48
+58
+59
+55
+66
+67
+91
+92
+89
+154
+133
+118
+209
+171
+139
+245
+179
+138
+249
+174
+124
+247
+165
+111
+249
+159
+103
+246
+156
+93
+246
+156
+93
+249
+159
+103
+247
+165
+111
+249
+174
+124
+252
+185
+144
+195
+157
+134
+109
+106
+99
+55
+66
+67
+48
+58
+59
+51
+62
+63
+51
+62
+63
+48
+58
+59
+51
+62
+63
+109
+106
+99
+207
+178
+158
+255
+215
+190
+217
+187
+166
+91
+92
+89
+51
+62
+63
+48
+58
+59
+76
+78
+76
+172
+150
+134
+253
+212
+188
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+255
+215
+190
+194
+173
+157
+101
+100
+92
+51
+62
+63
+48
+58
+59
+48
+58
+59
+51
+62
+63
+48
+58
+59
+48
+58
+59
+97
+98
+96
+194
+173
+157
+146
+135
+124
+56
+64
+60
+145
+114
+49
+168
+127
+42
+158
+125
+46
+168
+127
+42
+129
+106
+52
+48
+58
+59
+194
+173
+157
+255
+215
+190
+176
+156
+141
+76
+78
+76
+48
+58
+59
+55
+66
+67
+115
+102
+92
+234
+168
+124
+245
+169
+119
+247
+165
+111
+247
+165
+111
+247
+165
+111
+245
+169
+119
+249
+174
+124
+245
+179
+138
+209
+171
+139
+144
+125
+110
+76
+78
+76
+48
+58
+59
+48
+58
+59
+51
+62
+63
+51
+62
+63
+48
+58
+59
+48
+58
+59
+58
+69
+70
+101
+100
+92
+154
+133
+118
+219
+170
+138
+252
+185
+144
+248
+180
+134
+249
+174
+124
+245
+169
+119
+249
+174
+124
+250
+176
+132
+230
+173
+136
+124
+111
+99
+55
+66
+67
+43
+57
+62
+58
+69
+70
+137
+127
+115
+245
+212
+186
+245
+212
+186
+161
+144
+134
+70
+79
+77
+43
+57
+62
+51
+62
+63
+51
+62
+63
+48
+58
+59
+43
+57
+62
+84
+85
+82
+154
+133
+118
+240
+181
+138
+249
+174
+124
+247
+165
+111
+249
+152
+92
+243
+141
+78
+241
+138
+68
+242
+133
+67
+241
+138
+68
+241
+145
+79
+246
+156
+93
+247
+165
+111
+250
+176
+132
+219
+170
+138
+144
+125
+110
+77
+85
+81
+43
+57
+62
+48
+58
+59
+48
+58
+59
+51
+62
+63
+48
+58
+59
+43
+57
+62
+77
+85
+81
+150
+125
+114
+219
+170
+138
+250
+176
+132
+247
+165
+111
+246
+156
+93
+241
+145
+79
+241
+138
+68
+241
+138
+68
+241
+138
+68
+243
+141
+78
+249
+152
+92
+247
+165
+111
+250
+176
+132
+230
+173
+136
+154
+133
+118
+77
+85
+81
+43
+57
+62
+48
+58
+59
+51
+62
+63
+48
+58
+59
+43
+57
+62
+70
+79
+77
+161
+144
+134
+245
+212
+186
+255
+215
+190
+161
+144
+134
+63
+74
+74
+43
+57
+62
+51
+62
+63
+109
+106
+99
+217
+187
+166
+251
+209
+178
+238
+205
+179
+137
+127
+115
+58
+69
+70
+43
+57
+62
+58
+69
+70
+139
+115
+96
+238
+159
+107
+249
+152
+92
+241
+138
+68
+247
+130
+53
+238
+123
+45
+239
+117
+44
+247
+118
+39
+238
+123
+45
+241
+132
+59
+241
+145
+79
+249
+159
+103
+249
+174
+124
+240
+181
+138
+167
+142
+123
+91
+92
+89
+43
+57
+62
+48
+58
+59
+51
+62
+63
+48
+58
+59
+43
+57
+62
+63
+74
+74
+137
+127
+115
+234
+204
+183
+255
+215
+190
+146
+135
+124
+63
+74
+74
+43
+57
+62
+51
+62
+63
+115
+102
+92
+236
+186
+153
+251
+192
+154
+251
+192
+154
+236
+186
+153
+133
+120
+107
+43
+57
+62
+48
+58
+59
+48
+58
+59
+55
+66
+67
+158
+130
+108
+248
+180
+134
+250
+176
+132
+249
+174
+124
+249
+174
+124
+250
+176
+132
+252
+185
+144
+239
+182
+144
+154
+133
+118
+84
+85
+82
+43
+57
+62
+48
+58
+59
+48
+58
+59
+51
+62
+63
+48
+58
+59
+43
+57
+62
+70
+79
+77
+133
+120
+107
+219
+170
+138
+245
+179
+138
+250
+176
+132
+245
+169
+119
+247
+165
+111
+247
+165
+111
+245
+169
+119
+249
+174
+124
+187
+140
+108
+81
+77
+76
+43
+57
+62
+43
+57
+62
+99
+90
+79
+214
+151
+109
+249
+159
+103
+247
+150
+84
+247
+143
+74
+241
+138
+68
+241
+138
+68
+249
+146
+83
+249
+159
+103
+250
+176
+132
+250
+197
+158
+255
+215
+190
+255
+215
+190
+245
+212
+186
+161
+144
+134
+77
+85
+81
+43
+57
+62
+48
+58
+59
+51
+62
+63
+48
+58
+59
+41
+58
+57
+55
+66
+67
+120
+114
+108
+217
+187
+166
+97
+98
+96
+95
+78
+64
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+112
+85
+63
+70
+79
+77
+249
+189
+146
+247
+165
+111
+243
+141
+78
+247
+130
+53
+238
+116
+34
+236
+102
+14
+243
+101
+2
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+235
+94
+9
+235
+94
+9
+236
+102
+14
+235
+107
+16
+236
+108
+29
+239
+117
+44
+238
+123
+53
+242
+133
+67
+241
+145
+79
+241
+153
+96
+247
+165
+111
+249
+174
+124
+250
+176
+132
+245
+179
+138
+252
+185
+144
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+249
+189
+146
+252
+185
+144
+245
+179
+138
+250
+176
+132
+249
+174
+124
+245
+169
+119
+245
+162
+103
+241
+153
+96
+241
+145
+86
+243
+141
+78
+241
+138
+68
+242
+133
+67
+241
+132
+59
+238
+123
+53
+238
+123
+53
+238
+123
+53
+241
+132
+59
+242
+133
+67
+243
+141
+78
+241
+145
+86
+249
+159
+103
+238
+159
+107
+210
+156
+119
+210
+156
+119
+240
+181
+138
+249
+189
+146
+251
+192
+154
+251
+192
+154
+250
+197
+158
+212
+173
+150
+186
+157
+134
+167
+142
+123
+167
+142
+123
+195
+157
+134
+219
+170
+138
+248
+180
+134
+245
+169
+119
+245
+162
+103
+247
+150
+84
+243
+141
+78
+241
+132
+59
+238
+123
+53
+238
+123
+53
+238
+123
+53
+241
+132
+59
+241
+138
+68
+247
+150
+84
+245
+162
+103
+245
+169
+119
+250
+176
+132
+239
+182
+144
+219
+170
+138
+186
+157
+134
+167
+142
+123
+167
+142
+123
+172
+150
+134
+195
+157
+134
+219
+170
+138
+239
+182
+144
+248
+180
+134
+245
+169
+119
+245
+162
+103
+241
+153
+96
+241
+145
+79
+241
+138
+68
+241
+138
+68
+241
+138
+68
+241
+138
+68
+241
+145
+79
+241
+153
+96
+247
+165
+111
+249
+174
+124
+245
+179
+138
+219
+170
+138
+186
+157
+134
+167
+142
+123
+167
+142
+123
+186
+157
+134
+212
+173
+150
+250
+197
+158
+251
+192
+154
+251
+192
+154
+249
+189
+146
+239
+182
+144
+219
+170
+138
+219
+170
+138
+239
+182
+144
+250
+197
+158
+250
+200
+166
+251
+209
+178
+238
+205
+179
+172
+150
+134
+137
+127
+115
+161
+144
+134
+217
+187
+166
+253
+212
+188
+227
+196
+175
+194
+173
+157
+176
+156
+141
+172
+150
+134
+187
+166
+150
+217
+187
+166
+255
+215
+190
+245
+212
+186
+76
+78
+76
+75
+74
+61
+158
+125
+46
+158
+125
+46
+158
+125
+46
+171
+129
+45
+105
+93
+60
+58
+69
+70
+217
+187
+166
+255
+215
+190
+253
+204
+176
+236
+186
+153
+210
+156
+119
+210
+156
+119
+247
+165
+111
+249
+159
+103
+249
+152
+92
+241
+145
+86
+243
+141
+78
+241
+145
+79
+247
+150
+84
+241
+153
+96
+245
+162
+103
+245
+169
+119
+248
+180
+134
+239
+182
+144
+209
+171
+139
+186
+157
+134
+167
+142
+123
+167
+142
+123
+178
+146
+122
+195
+157
+134
+230
+173
+136
+239
+182
+144
+250
+176
+132
+245
+169
+119
+247
+165
+111
+249
+159
+103
+241
+153
+96
+249
+152
+92
+249
+152
+92
+241
+153
+96
+245
+162
+103
+247
+165
+111
+210
+156
+119
+210
+156
+119
+230
+173
+136
+249
+189
+146
+249
+189
+146
+251
+192
+154
+250
+197
+158
+236
+186
+153
+203
+161
+131
+167
+142
+123
+167
+142
+123
+178
+146
+122
+203
+161
+131
+240
+181
+138
+249
+174
+124
+247
+165
+111
+241
+153
+96
+243
+141
+78
+242
+133
+67
+238
+123
+53
+238
+123
+45
+238
+123
+45
+238
+123
+45
+241
+132
+59
+241
+138
+68
+241
+145
+86
+249
+159
+103
+245
+169
+119
+250
+176
+132
+240
+181
+138
+209
+171
+139
+178
+146
+122
+167
+142
+123
+167
+142
+123
+186
+157
+134
+209
+171
+139
+240
+181
+138
+250
+176
+132
+245
+169
+119
+249
+159
+103
+241
+145
+86
+241
+138
+68
+241
+132
+59
+238
+123
+45
+238
+123
+45
+238
+123
+45
+247
+130
+53
+242
+133
+67
+241
+145
+79
+241
+153
+96
+247
+165
+111
+250
+176
+132
+240
+181
+138
+203
+161
+131
+178
+146
+122
+167
+142
+123
+167
+142
+123
+195
+157
+134
+236
+186
+153
+251
+192
+154
+251
+192
+154
+249
+189
+146
+249
+189
+146
+230
+173
+136
+203
+161
+131
+219
+170
+138
+245
+179
+138
+245
+179
+138
+245
+179
+138
+245
+179
+138
+248
+180
+134
+234
+168
+124
+214
+151
+109
+214
+151
+109
+245
+162
+103
+241
+145
+86
+241
+138
+68
+238
+123
+53
+239
+117
+44
+238
+116
+34
+236
+108
+29
+236
+108
+29
+238
+116
+34
+238
+123
+45
+241
+132
+59
+243
+141
+78
+241
+153
+96
+247
+165
+111
+249
+174
+124
+240
+181
+138
+209
+171
+139
+178
+146
+122
+167
+142
+123
+167
+142
+123
+195
+157
+134
+236
+186
+153
+250
+197
+158
+251
+192
+154
+249
+189
+146
+249
+189
+146
+230
+173
+136
+210
+156
+119
+210
+156
+119
+250
+176
+132
+249
+174
+124
+249
+174
+124
+249
+174
+124
+249
+174
+124
+250
+176
+132
+210
+156
+119
+162
+125
+96
+162
+125
+96
+214
+151
+109
+247
+165
+111
+245
+162
+103
+241
+153
+96
+241
+153
+96
+241
+153
+96
+249
+159
+103
+247
+165
+111
+245
+169
+119
+250
+176
+132
+240
+181
+138
+209
+171
+139
+186
+157
+134
+167
+142
+123
+167
+142
+123
+178
+146
+122
+203
+161
+131
+239
+182
+144
+248
+180
+134
+245
+169
+119
+245
+162
+103
+241
+153
+96
+241
+145
+86
+241
+145
+86
+241
+145
+86
+247
+150
+84
+241
+153
+96
+245
+162
+103
+238
+159
+107
+204
+141
+99
+214
+151
+109
+241
+153
+96
+249
+152
+92
+243
+141
+78
+242
+133
+67
+241
+132
+59
+241
+132
+59
+241
+138
+68
+241
+145
+79
+245
+162
+103
+248
+180
+134
+212
+173
+150
+146
+135
+124
+137
+127
+115
+176
+156
+141
+234
+204
+183
+253
+212
+188
+217
+187
+166
+187
+166
+150
+172
+150
+134
+176
+156
+141
+194
+173
+157
+234
+204
+183
+255
+215
+190
+194
+173
+157
+43
+57
+62
+139
+96
+61
+234
+126
+45
+224
+123
+55
+227
+126
+50
+227
+126
+50
+89
+75
+66
+101
+100
+92
+245
+179
+138
+245
+162
+103
+241
+138
+68
+238
+123
+45
+236
+108
+29
+236
+102
+14
+235
+94
+9
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+235
+94
+9
+235
+94
+9
+236
+102
+14
+235
+107
+16
+236
+108
+29
+238
+116
+34
+238
+123
+45
+241
+132
+59
+241
+138
+68
+241
+145
+79
+249
+152
+92
+241
+153
+96
+245
+162
+103
+245
+162
+103
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+245
+162
+103
+245
+162
+103
+241
+153
+96
+241
+153
+96
+241
+145
+86
+243
+141
+78
+241
+138
+68
+241
+132
+59
+238
+123
+53
+238
+123
+45
+239
+117
+44
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+239
+117
+44
+238
+123
+45
+238
+123
+53
+241
+132
+59
+243
+141
+78
+241
+145
+86
+241
+153
+96
+245
+162
+103
+245
+162
+103
+247
+165
+111
+247
+165
+111
+245
+169
+119
+245
+169
+119
+245
+169
+119
+249
+174
+124
+245
+169
+119
+245
+169
+119
+245
+169
+119
+247
+165
+111
+241
+153
+96
+241
+145
+86
+243
+141
+78
+241
+132
+59
+238
+123
+53
+239
+117
+44
+238
+116
+34
+238
+116
+34
+238
+116
+34
+239
+117
+44
+238
+123
+45
+241
+132
+59
+241
+138
+68
+241
+145
+86
+241
+153
+96
+245
+162
+103
+245
+169
+119
+249
+174
+124
+250
+176
+132
+250
+176
+132
+250
+176
+132
+249
+174
+124
+245
+169
+119
+247
+165
+111
+241
+153
+96
+241
+145
+86
+243
+141
+78
+242
+133
+67
+241
+132
+59
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+241
+132
+59
+242
+133
+67
+243
+141
+78
+249
+152
+92
+245
+162
+103
+247
+165
+111
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+247
+165
+111
+247
+165
+111
+247
+165
+111
+247
+165
+111
+245
+169
+119
+249
+174
+124
+245
+179
+138
+251
+192
+154
+232
+190
+161
+101
+100
+92
+51
+62
+63
+63
+69
+60
+51
+62
+63
+55
+66
+67
+109
+106
+99
+176
+156
+141
+234
+204
+183
+255
+215
+190
+255
+215
+190
+255
+215
+190
+245
+212
+186
+207
+178
+158
+91
+92
+89
+51
+62
+63
+129
+106
+52
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+75
+74
+61
+91
+92
+89
+245
+212
+186
+250
+200
+166
+252
+185
+144
+249
+174
+124
+247
+165
+111
+241
+153
+96
+241
+145
+79
+241
+138
+68
+242
+133
+67
+241
+132
+59
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+138
+68
+243
+141
+78
+241
+145
+86
+241
+153
+96
+247
+165
+111
+245
+169
+119
+249
+174
+124
+250
+176
+132
+250
+176
+132
+249
+174
+124
+249
+174
+124
+245
+169
+119
+245
+162
+103
+241
+153
+96
+241
+145
+86
+241
+145
+79
+241
+138
+68
+242
+133
+67
+242
+133
+67
+242
+133
+67
+241
+138
+68
+243
+141
+78
+241
+145
+86
+241
+153
+96
+241
+153
+96
+245
+162
+103
+245
+162
+103
+247
+165
+111
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+247
+165
+111
+245
+162
+103
+241
+153
+96
+241
+145
+79
+241
+138
+68
+238
+123
+53
+238
+123
+45
+238
+116
+34
+235
+113
+30
+235
+113
+30
+238
+116
+34
+239
+117
+44
+238
+123
+45
+241
+132
+59
+241
+138
+68
+241
+145
+86
+241
+153
+96
+245
+162
+103
+245
+169
+119
+245
+169
+119
+249
+174
+124
+249
+174
+124
+245
+169
+119
+245
+169
+119
+245
+162
+103
+241
+153
+96
+241
+145
+86
+241
+138
+68
+241
+132
+59
+238
+123
+45
+239
+117
+44
+238
+116
+34
+235
+113
+30
+235
+113
+30
+238
+116
+34
+238
+123
+45
+241
+132
+59
+241
+138
+68
+241
+145
+86
+241
+153
+96
+245
+162
+103
+247
+165
+111
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+247
+165
+111
+247
+165
+111
+247
+165
+111
+245
+162
+103
+245
+162
+103
+245
+162
+103
+245
+162
+103
+245
+162
+103
+245
+162
+103
+245
+162
+103
+245
+162
+103
+241
+153
+96
+241
+153
+96
+241
+145
+86
+243
+141
+78
+241
+132
+59
+238
+123
+53
+239
+117
+44
+235
+113
+30
+236
+108
+29
+235
+107
+16
+235
+107
+16
+236
+108
+29
+235
+113
+30
+239
+117
+44
+238
+123
+53
+242
+133
+67
+241
+145
+79
+241
+153
+96
+245
+162
+103
+247
+165
+111
+245
+169
+119
+245
+169
+119
+249
+174
+124
+245
+169
+119
+245
+169
+119
+245
+169
+119
+245
+169
+119
+247
+165
+111
+247
+165
+111
+245
+162
+103
+245
+162
+103
+241
+153
+96
+241
+153
+96
+241
+153
+96
+241
+153
+96
+241
+153
+96
+241
+153
+96
+241
+153
+96
+241
+153
+96
+241
+153
+96
+241
+153
+96
+249
+152
+92
+241
+145
+86
+243
+141
+78
+241
+138
+68
+241
+138
+68
+241
+138
+68
+241
+138
+68
+243
+141
+78
+241
+145
+86
+241
+153
+96
+245
+162
+103
+245
+169
+119
+245
+169
+119
+249
+174
+124
+249
+174
+124
+249
+174
+124
+245
+169
+119
+247
+165
+111
+241
+153
+96
+241
+145
+86
+243
+141
+78
+241
+138
+68
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+138
+68
+243
+141
+78
+241
+145
+79
+241
+145
+79
+241
+145
+79
+243
+141
+78
+241
+138
+68
+241
+132
+59
+238
+123
+53
+238
+123
+53
+238
+123
+53
+242
+133
+67
+241
+145
+86
+247
+165
+111
+210
+156
+119
+63
+74
+74
+62
+63
+61
+69
+69
+61
+48
+58
+59
+63
+74
+74
+133
+120
+107
+194
+173
+157
+245
+212
+186
+255
+215
+190
+255
+215
+190
+255
+215
+190
+245
+212
+186
+176
+156
+141
+55
+66
+67
+76
+70
+64
+212
+120
+56
+227
+126
+50
+224
+123
+55
+234
+125
+52
+194
+112
+58
+56
+64
+60
+154
+133
+118
+250
+176
+132
+241
+153
+96
+242
+133
+67
+239
+117
+44
+236
+108
+29
+236
+102
+14
+235
+94
+9
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+236
+108
+29
+235
+113
+30
+239
+117
+44
+238
+123
+45
+238
+123
+53
+241
+132
+59
+241
+138
+68
+241
+138
+68
+243
+141
+78
+243
+141
+78
+241
+145
+79
+241
+145
+79
+241
+145
+79
+241
+145
+79
+241
+145
+79
+241
+145
+79
+241
+145
+79
+241
+145
+79
+241
+145
+79
+241
+145
+79
+241
+145
+79
+243
+141
+78
+243
+141
+78
+243
+141
+78
+241
+138
+68
+241
+138
+68
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+45
+238
+116
+34
+238
+116
+34
+236
+108
+29
+236
+108
+29
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+123
+45
+238
+123
+53
+241
+132
+59
+242
+133
+67
+241
+138
+68
+243
+141
+78
+243
+141
+78
+241
+145
+79
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+243
+141
+78
+241
+138
+68
+241
+132
+59
+238
+123
+53
+239
+117
+44
+238
+116
+34
+236
+108
+29
+236
+108
+29
+235
+107
+16
+235
+107
+16
+236
+108
+29
+238
+116
+34
+239
+117
+44
+238
+123
+45
+241
+132
+59
+241
+138
+68
+243
+141
+78
+241
+145
+86
+249
+152
+92
+241
+153
+96
+241
+153
+96
+241
+153
+96
+249
+152
+92
+241
+145
+86
+243
+141
+78
+241
+138
+68
+241
+132
+59
+238
+123
+53
+238
+123
+45
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+123
+45
+238
+123
+53
+241
+132
+59
+241
+138
+68
+241
+145
+79
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+79
+241
+145
+79
+241
+145
+79
+241
+145
+86
+241
+153
+96
+245
+162
+103
+245
+169
+119
+245
+179
+138
+144
+125
+110
+51
+62
+63
+117
+98
+55
+158
+125
+46
+145
+114
+49
+105
+93
+60
+69
+69
+61
+48
+58
+59
+58
+69
+70
+91
+92
+89
+120
+114
+108
+120
+114
+108
+91
+92
+89
+48
+58
+59
+56
+64
+60
+123
+102
+54
+171
+129
+45
+158
+125
+46
+158
+125
+46
+168
+127
+42
+137
+110
+49
+48
+58
+59
+161
+144
+134
+250
+197
+158
+248
+180
+134
+247
+165
+111
+241
+153
+96
+241
+145
+79
+241
+138
+68
+241
+132
+59
+238
+123
+53
+238
+123
+45
+239
+117
+44
+238
+116
+34
+238
+116
+34
+239
+117
+44
+238
+123
+45
+238
+123
+53
+241
+132
+59
+241
+138
+68
+243
+141
+78
+241
+145
+86
+249
+152
+92
+241
+153
+96
+241
+153
+96
+241
+153
+96
+241
+145
+86
+241
+145
+86
+243
+141
+78
+241
+138
+68
+241
+132
+59
+238
+123
+53
+238
+123
+45
+238
+123
+45
+239
+117
+44
+238
+123
+45
+238
+123
+45
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+138
+68
+241
+138
+68
+243
+141
+78
+241
+145
+79
+241
+145
+79
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+79
+243
+141
+78
+242
+133
+67
+241
+132
+59
+238
+123
+45
+238
+116
+34
+235
+113
+30
+236
+108
+29
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+108
+29
+235
+113
+30
+239
+117
+44
+238
+123
+45
+241
+132
+59
+241
+138
+68
+243
+141
+78
+241
+145
+86
+241
+145
+86
+241
+153
+96
+241
+153
+96
+241
+145
+86
+241
+145
+86
+243
+141
+78
+241
+138
+68
+241
+132
+59
+238
+123
+45
+239
+117
+44
+235
+113
+30
+236
+108
+29
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+108
+29
+235
+113
+30
+239
+117
+44
+238
+123
+45
+241
+132
+59
+242
+133
+67
+243
+141
+78
+241
+145
+79
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+79
+241
+145
+79
+243
+141
+78
+243
+141
+78
+243
+141
+78
+243
+141
+78
+241
+138
+68
+241
+138
+68
+241
+138
+68
+241
+138
+68
+241
+138
+68
+241
+138
+68
+242
+133
+67
+241
+132
+59
+238
+123
+53
+238
+123
+45
+238
+116
+34
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+238
+116
+34
+238
+123
+45
+238
+123
+53
+242
+133
+67
+241
+138
+68
+241
+145
+79
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+86
+241
+145
+79
+243
+141
+78
+243
+141
+78
+241
+138
+68
+241
+138
+68
+241
+138
+68
+242
+133
+67
+242
+133
+67
+242
+133
+67
+241
+138
+68
+241
+138
+68
+241
+138
+68
+241
+138
+68
+242
+133
+67
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+53
+241
+132
+59
+241
+138
+68
+243
+141
+78
+241
+145
+86
+241
+145
+86
+241
+153
+96
+241
+153
+96
+241
+145
+86
+241
+145
+86
+243
+141
+78
+241
+138
+68
+241
+132
+59
+238
+123
+53
+238
+123
+45
+239
+117
+44
+239
+117
+44
+239
+117
+44
+239
+117
+44
+238
+123
+45
+238
+123
+53
+238
+123
+53
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+45
+239
+117
+44
+239
+117
+44
+239
+117
+44
+238
+123
+53
+242
+133
+67
+241
+145
+86
+238
+159
+107
+84
+85
+82
+69
+69
+61
+188
+112
+56
+214
+121
+50
+173
+106
+60
+112
+85
+63
+62
+63
+61
+41
+58
+57
+63
+74
+74
+97
+98
+96
+120
+114
+108
+109
+106
+99
+77
+85
+81
+41
+58
+57
+81
+73
+62
+194
+112
+58
+234
+125
+52
+224
+123
+55
+224
+123
+55
+234
+126
+45
+125
+90
+64
+51
+62
+63
+209
+171
+139
+245
+169
+119
+241
+145
+86
+241
+132
+59
+238
+116
+34
+235
+107
+16
+236
+102
+14
+235
+94
+9
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+237
+95
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+235
+94
+9
+235
+94
+9
+236
+102
+14
+235
+107
+16
+236
+108
+29
+235
+113
+30
+238
+116
+34
+239
+117
+44
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+45
+238
+123
+45
+239
+117
+44
+239
+117
+44
+238
+116
+34
+235
+113
+30
+236
+108
+29
+235
+107
+16
+235
+107
+16
+236
+102
+14
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+236
+108
+29
+238
+116
+34
+239
+117
+44
+239
+117
+44
+238
+123
+45
+238
+123
+45
+238
+123
+53
+238
+123
+53
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+53
+238
+123
+45
+239
+117
+44
+238
+116
+34
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+123
+45
+238
+123
+53
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+45
+239
+117
+44
+238
+116
+34
+236
+108
+29
+235
+107
+16
+235
+107
+16
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+236
+108
+29
+238
+116
+34
+239
+117
+44
+238
+123
+45
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+241
+132
+59
+241
+138
+68
+241
+145
+86
+238
+159
+107
+234
+168
+124
+84
+85
+82
+83
+78
+61
+171
+129
+45
+158
+125
+46
+168
+127
+42
+168
+127
+42
+158
+125
+46
+129
+106
+52
+100
+89
+56
+83
+78
+61
+75
+74
+61
+69
+69
+61
+83
+78
+61
+105
+93
+60
+152
+119
+47
+168
+127
+42
+158
+125
+46
+158
+125
+46
+161
+127
+40
+168
+127
+42
+75
+74
+61
+63
+74
+74
+236
+186
+153
+245
+179
+138
+238
+159
+107
+241
+145
+86
+241
+138
+68
+241
+132
+59
+238
+123
+45
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+238
+116
+34
+239
+117
+44
+238
+123
+45
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+53
+238
+123
+45
+239
+117
+44
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+116
+34
+239
+117
+44
+238
+123
+45
+238
+123
+45
+238
+123
+53
+238
+123
+53
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+45
+239
+117
+44
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+94
+9
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+123
+45
+238
+123
+53
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+53
+238
+123
+45
+238
+116
+34
+235
+113
+30
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+235
+94
+9
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+123
+45
+238
+123
+53
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+239
+117
+44
+239
+117
+44
+238
+116
+34
+236
+108
+29
+236
+108
+29
+235
+107
+16
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+238
+116
+34
+239
+117
+44
+238
+123
+45
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+53
+238
+123
+53
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+239
+117
+44
+239
+117
+44
+239
+117
+44
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+238
+123
+45
+239
+117
+44
+239
+117
+44
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+239
+117
+44
+238
+123
+45
+238
+123
+53
+238
+123
+53
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+241
+132
+59
+238
+123
+53
+238
+123
+45
+239
+117
+44
+238
+116
+34
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+235
+113
+30
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+123
+45
+241
+132
+59
+241
+145
+86
+204
+141
+99
+41
+58
+57
+155
+100
+63
+234
+126
+45
+227
+126
+50
+227
+126
+50
+234
+125
+52
+209
+117
+53
+155
+100
+63
+118
+86
+65
+89
+75
+66
+81
+73
+62
+81
+73
+62
+106
+82
+65
+155
+100
+63
+214
+121
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+194
+112
+58
+56
+64
+60
+109
+106
+99
+245
+179
+138
+245
+162
+103
+241
+138
+68
+238
+123
+45
+235
+113
+30
+236
+102
+14
+235
+94
+9
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+235
+107
+16
+235
+107
+16
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+235
+113
+30
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+230
+97
+5
+230
+97
+5
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+236
+108
+29
+236
+108
+29
+235
+113
+30
+235
+113
+30
+235
+113
+30
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+235
+107
+16
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+116
+34
+239
+117
+44
+239
+117
+44
+239
+117
+44
+238
+116
+34
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+235
+113
+30
+235
+113
+30
+238
+116
+34
+238
+123
+45
+238
+123
+53
+241
+138
+68
+241
+145
+86
+238
+159
+107
+89
+84
+82
+75
+74
+61
+168
+127
+42
+168
+127
+42
+158
+125
+46
+158
+125
+46
+161
+127
+40
+168
+127
+42
+171
+129
+45
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+168
+127
+42
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+95
+87
+59
+48
+58
+59
+167
+142
+123
+245
+179
+138
+238
+159
+107
+241
+145
+86
+242
+133
+67
+238
+123
+45
+238
+116
+34
+236
+108
+29
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+116
+34
+239
+117
+44
+239
+117
+44
+239
+117
+44
+238
+116
+34
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+235
+107
+16
+236
+108
+29
+236
+108
+29
+236
+108
+29
+235
+113
+30
+235
+113
+30
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+235
+113
+30
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+235
+107
+16
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+108
+29
+235
+107
+16
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+235
+113
+30
+235
+113
+30
+235
+113
+30
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+235
+107
+16
+235
+107
+16
+236
+102
+14
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+230
+97
+5
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+235
+113
+30
+235
+113
+30
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+236
+108
+29
+235
+107
+16
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+236
+108
+29
+236
+108
+29
+235
+113
+30
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+238
+116
+34
+235
+113
+30
+236
+108
+29
+236
+108
+29
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+235
+107
+16
+236
+108
+29
+236
+108
+29
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+108
+29
+235
+113
+30
+239
+117
+44
+241
+132
+59
+241
+145
+79
+204
+141
+99
+48
+58
+59
+139
+96
+61
+234
+126
+45
+224
+123
+55
+224
+123
+55
+224
+123
+55
+227
+126
+50
+234
+126
+45
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+126
+45
+234
+126
+45
+227
+126
+50
+224
+123
+55
+224
+123
+55
+234
+125
+52
+214
+121
+50
+81
+73
+62
+58
+69
+70
+219
+170
+138
+245
+169
+119
+241
+145
+86
+241
+132
+59
+239
+117
+44
+236
+108
+29
+236
+102
+14
+235
+94
+9
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+235
+94
+9
+230
+97
+5
+229
+102
+7
+229
+102
+7
+236
+102
+14
+236
+102
+14
+224
+98
+18
+224
+98
+18
+224
+98
+18
+236
+102
+14
+224
+98
+18
+236
+102
+14
+236
+102
+14
+224
+98
+18
+224
+98
+18
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+224
+98
+18
+236
+102
+14
+236
+102
+14
+229
+102
+7
+229
+102
+7
+230
+97
+5
+235
+94
+9
+235
+94
+9
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+235
+94
+9
+230
+97
+5
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+102
+14
+224
+98
+18
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+235
+94
+9
+230
+97
+5
+229
+102
+7
+236
+102
+14
+236
+102
+14
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+102
+14
+224
+98
+18
+236
+102
+14
+229
+102
+7
+230
+97
+5
+235
+94
+9
+235
+94
+9
+230
+97
+5
+231
+91
+2
+230
+97
+5
+235
+94
+9
+235
+94
+9
+235
+94
+9
+230
+97
+5
+229
+102
+7
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+102
+14
+224
+98
+18
+236
+102
+14
+235
+107
+16
+236
+108
+29
+239
+117
+44
+234
+125
+52
+231
+136
+72
+241
+153
+96
+162
+125
+96
+48
+58
+59
+95
+87
+59
+158
+125
+46
+171
+129
+45
+168
+127
+42
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+158
+125
+46
+168
+127
+42
+171
+129
+45
+158
+125
+46
+95
+87
+59
+48
+58
+59
+124
+111
+99
+245
+179
+138
+247
+165
+111
+241
+145
+86
+241
+132
+59
+238
+123
+45
+238
+116
+34
+236
+108
+29
+224
+98
+18
+229
+102
+7
+230
+97
+5
+235
+94
+9
+235
+94
+9
+230
+97
+5
+230
+97
+5
+230
+97
+5
+235
+94
+9
+230
+97
+5
+229
+102
+7
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+94
+9
+230
+97
+5
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+236
+102
+14
+224
+98
+18
+224
+98
+18
+236
+102
+14
+236
+102
+14
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+224
+98
+18
+236
+102
+14
+229
+102
+7
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+229
+102
+7
+236
+102
+14
+224
+98
+18
+236
+102
+14
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+102
+14
+224
+98
+18
+236
+102
+14
+229
+102
+7
+230
+97
+5
+235
+94
+9
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+235
+94
+9
+235
+94
+9
+229
+102
+7
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+102
+14
+235
+107
+16
+236
+102
+14
+224
+98
+18
+224
+98
+18
+236
+102
+14
+224
+98
+18
+224
+98
+18
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+229
+102
+7
+236
+102
+14
+235
+94
+9
+230
+97
+5
+235
+94
+9
+235
+94
+9
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+235
+94
+9
+230
+97
+5
+230
+97
+5
+229
+102
+7
+236
+102
+14
+224
+98
+18
+236
+102
+14
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+224
+98
+18
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+236
+102
+14
+224
+98
+18
+236
+102
+14
+236
+102
+14
+236
+102
+14
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+236
+102
+14
+236
+102
+14
+224
+98
+18
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+235
+107
+16
+236
+102
+14
+236
+102
+14
+236
+102
+14
+229
+102
+7
+230
+97
+5
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+235
+94
+9
+230
+97
+5
+235
+94
+9
+236
+102
+14
+236
+102
+14
+236
+102
+14
+229
+102
+7
+230
+97
+5
+229
+102
+7
+224
+98
+18
+236
+108
+29
+238
+116
+34
+238
+123
+53
+243
+141
+78
+241
+153
+96
+99
+90
+79
+56
+64
+60
+155
+100
+63
+234
+126
+45
+234
+126
+45
+227
+126
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+227
+126
+50
+224
+123
+55
+224
+123
+55
+227
+126
+50
+227
+126
+50
+234
+126
+45
+194
+112
+58
+81
+73
+62
+48
+58
+59
+178
+146
+122
+249
+174
+124
+241
+153
+96
+231
+136
+72
+234
+125
+52
+238
+116
+34
+235
+107
+16
+229
+102
+7
+235
+94
+9
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+229
+102
+7
+236
+102
+14
+235
+113
+30
+239
+117
+44
+230
+128
+60
+236
+147
+85
+238
+159
+107
+139
+115
+96
+48
+58
+59
+69
+69
+61
+111
+94
+57
+145
+114
+49
+158
+125
+46
+168
+127
+42
+171
+129
+45
+168
+127
+42
+168
+127
+42
+168
+127
+42
+168
+127
+42
+171
+129
+45
+168
+127
+42
+152
+119
+47
+117
+98
+55
+69
+69
+61
+48
+58
+59
+144
+125
+110
+240
+181
+138
+247
+165
+111
+236
+147
+85
+242
+133
+67
+238
+123
+45
+235
+113
+30
+235
+107
+16
+236
+102
+14
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+230
+97
+5
+229
+102
+7
+235
+107
+16
+235
+113
+30
+238
+123
+45
+242
+133
+67
+241
+153
+96
+214
+151
+109
+99
+90
+79
+48
+58
+59
+95
+78
+64
+155
+100
+63
+209
+117
+53
+227
+126
+50
+234
+125
+52
+234
+125
+52
+234
+125
+52
+234
+125
+52
+234
+125
+52
+234
+126
+45
+234
+126
+45
+227
+126
+50
+194
+112
+58
+125
+90
+64
+56
+64
+60
+58
+69
+70
+178
+146
+122
+250
+176
+132
+238
+159
+107
+241
+145
+79
+234
+125
+52
+239
+117
+44
+236
+108
+29
+224
+98
+18
+230
+97
+5
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+230
+97
+5
+229
+102
+7
+223
+103
+18
+226
+110
+35
+234
+125
+52
+231
+136
+72
+241
+153
+96
+245
+169
+119
+178
+146
+122
+101
+100
+92
+48
+58
+59
+56
+64
+60
+69
+69
+61
+95
+87
+59
+111
+94
+57
+123
+102
+54
+129
+106
+52
+129
+106
+52
+123
+102
+54
+105
+93
+60
+88
+82
+59
+62
+63
+61
+48
+58
+59
+91
+92
+89
+186
+157
+134
+245
+179
+138
+238
+159
+107
+236
+147
+85
+230
+128
+60
+234
+125
+52
+226
+110
+35
+223
+103
+18
+224
+98
+18
+230
+97
+5
+226
+93
+0
+226
+93
+0
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+230
+97
+5
+224
+98
+18
+236
+108
+29
+239
+117
+44
+230
+123
+57
+243
+141
+78
+238
+159
+107
+234
+168
+124
+158
+130
+108
+76
+78
+76
+41
+58
+57
+62
+63
+61
+95
+78
+64
+125
+90
+64
+146
+97
+64
+163
+104
+61
+173
+106
+60
+163
+104
+61
+155
+100
+63
+125
+90
+64
+95
+78
+64
+56
+64
+60
+43
+57
+62
+124
+111
+99
+209
+171
+139
+234
+168
+124
+238
+159
+107
+241
+145
+79
+230
+128
+60
+239
+117
+44
+236
+108
+29
+236
+102
+14
+229
+102
+7
+230
+97
+5
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+231
+91
+2
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+226
+93
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+230
+97
+5
+230
+97
+5
+224
+98
+18
+236
+108
+29
+226
+110
+35
+230
+123
+57
+231
+136
+72
+241
+153
+96
+238
+159
+107
+240
+181
+138
+203
+161
+131
+150
+125
+114
+101
+100
+92
+76
+78
+76
+55
+66
+67
+48
+58
+59
+48
+58
+59
+48
+58
+59
+48
+58
+59
+58
+69
+70
+84
+85
+82
+124
+111
+99
+178
+146
+122
+240
+181
+138
+234
+168
+124
+238
+159
+107
+236
+147
+85
+230
+128
+60
+234
+125
+52
+226
+110
+35
+223
+103
+18
+224
+98
+18
+230
+97
+5
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+230
+97
+5
+224
+98
+18
+223
+103
+18
+226
+110
+35
+225
+124
+48
+230
+128
+60
+236
+147
+85
+241
+153
+96
+234
+168
+124
+230
+173
+136
+186
+157
+134
+133
+120
+107
+91
+92
+89
+63
+74
+74
+51
+62
+63
+48
+58
+59
+48
+58
+59
+48
+58
+59
+51
+62
+63
+63
+74
+74
+91
+92
+89
+144
+125
+110
+203
+161
+131
+240
+181
+138
+245
+169
+119
+241
+153
+96
+241
+145
+79
+230
+128
+60
+225
+124
+48
+226
+110
+35
+223
+103
+18
+224
+98
+18
+230
+97
+5
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+230
+97
+5
+224
+98
+18
+223
+103
+18
+226
+110
+35
+239
+117
+44
+230
+123
+57
+231
+136
+72
+236
+147
+85
+238
+159
+107
+245
+169
+119
+234
+168
+124
+240
+181
+138
+239
+182
+144
+236
+186
+153
+250
+197
+158
+250
+197
+158
+250
+197
+158
+251
+192
+154
+236
+186
+153
+239
+182
+144
+245
+179
+138
+234
+168
+124
+238
+159
+107
+241
+153
+96
+231
+136
+72
+230
+128
+60
+225
+124
+48
+226
+110
+35
+223
+103
+18
+224
+98
+18
+230
+97
+5
+230
+97
+5
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+230
+97
+5
+224
+98
+18
+223
+103
+18
+226
+110
+35
+225
+124
+48
+230
+128
+60
+231
+136
+72
+241
+153
+96
+238
+159
+107
+234
+168
+124
+240
+181
+138
+239
+182
+144
+236
+186
+153
+251
+192
+154
+250
+197
+158
+250
+197
+158
+250
+197
+158
+236
+186
+153
+239
+182
+144
+240
+181
+138
+234
+168
+124
+245
+169
+119
+238
+159
+107
+236
+147
+85
+231
+136
+72
+230
+123
+57
+239
+117
+44
+226
+110
+35
+223
+103
+18
+224
+98
+18
+230
+97
+5
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+225
+92
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+220
+93
+11
+220
+93
+11
+224
+98
+18
+223
+103
+18
+226
+110
+35
+226
+110
+35
+225
+124
+48
+230
+128
+60
+231
+136
+72
+236
+147
+85
+241
+153
+96
+238
+159
+107
+238
+159
+107
+234
+168
+124
+234
+168
+124
+234
+168
+124
+234
+168
+124
+234
+168
+124
+238
+159
+107
+238
+159
+107
+241
+153
+96
+236
+147
+85
+231
+136
+72
+230
+128
+60
+230
+123
+57
+226
+110
+35
+226
+110
+35
+223
+103
+18
+224
+98
+18
+220
+93
+11
+220
+93
+11
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+220
+93
+11
+220
+93
+11
+224
+98
+18
+223
+103
+18
+226
+110
+35
+225
+124
+48
+230
+123
+57
+230
+128
+60
+231
+136
+72
+236
+147
+85
+241
+153
+96
+238
+159
+107
+238
+159
+107
+234
+168
+124
+234
+168
+124
+234
+168
+124
+234
+168
+124
+234
+168
+124
+238
+159
+107
+238
+159
+107
+241
+153
+96
+236
+147
+85
+231
+136
+72
+230
+128
+60
+225
+124
+48
+226
+110
+35
+226
+110
+35
+223
+103
+18
+224
+98
+18
+220
+93
+11
+220
+93
+11
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+220
+93
+11
+220
+93
+11
+220
+93
+11
+224
+98
+18
+223
+103
+18
+226
+110
+35
+226
+110
+35
+225
+124
+48
+230
+128
+60
+230
+128
+60
+231
+136
+72
+231
+136
+72
+236
+147
+85
+236
+147
+85
+236
+147
+85
+236
+147
+85
+236
+147
+85
+231
+136
+72
+231
+136
+72
+231
+136
+72
+230
+128
+60
+227
+126
+50
+225
+124
+48
+226
+110
+35
+223
+103
+18
+223
+103
+18
+224
+98
+18
+220
+93
+11
+220
+93
+11
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+218
+87
+5
+220
+93
+11
+220
+93
+11
+224
+98
+18
+223
+103
+18
+226
+110
+35
+226
+110
+35
+225
+124
+48
+230
+123
+57
+230
+128
+60
+231
+136
+72
+231
+136
+72
+231
+136
+72
+236
+147
+85
+236
+147
+85
+236
+147
+85
+236
+147
+85
+236
+147
+85
+231
+136
+72
+231
+136
+72
+230
+128
+60
+230
+123
+57
+225
+124
+48
+226
+110
+35
+226
+110
+35
+223
+103
+18
+224
+98
+18
+220
+93
+11
+220
+93
+11
+220
+93
+11
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+217
+86
+3
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+217
+86
+3
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+218
+87
+5
+218
+87
+5
+220
+93
+11
+220
+93
+11
+224
+98
+18
+223
+103
+18
+223
+103
+18
+226
+110
+35
+226
+110
+35
+225
+124
+48
+225
+124
+48
+225
+124
+48
+224
+123
+55
+224
+123
+55
+224
+123
+55
+230
+123
+57
+224
+123
+55
+224
+123
+55
+225
+124
+48
+225
+124
+48
+226
+110
+35
+226
+110
+35
+223
+103
+18
+223
+103
+18
+224
+98
+18
+220
+93
+11
+220
+93
+11
+218
+87
+5
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+217
+86
+3
+218
+87
+5
+218
+87
+5
+220
+93
+11
+220
+93
+11
+220
+93
+11
+224
+98
+18
+223
+103
+18
+226
+110
+35
+226
+110
+35
+226
+110
+35
+225
+124
+48
+225
+124
+48
+224
+123
+55
+230
+123
+57
+230
+123
+57
+230
+123
+57
+230
+123
+57
+230
+123
+57
+225
+124
+48
+225
+124
+48
+226
+110
+35
+226
+110
+35
+226
+110
+35
+223
+103
+18
+224
+98
+18
+224
+98
+18
+220
+93
+11
+220
+93
+11
+218
+87
+5
+218
+87
+5
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+221
+89
+0
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+218
+87
+5
+218
+87
+5
+218
+87
+5
+220
+93
+11
+220
+93
+11
+224
+98
+18
+224
+98
+18
+224
+98
+18
+223
+103
+18
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+223
+103
+18
+223
+103
+18
+224
+98
+18
+224
+98
+18
+220
+93
+11
+220
+93
+11
+218
+87
+5
+218
+87
+5
+218
+87
+5
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+220
+93
+11
+220
+93
+11
+224
+98
+18
+224
+98
+18
+223
+103
+18
+223
+103
+18
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+226
+110
+35
+223
+103
+18
+224
+98
+18
+224
+98
+18
+220
+93
+11
+220
+93
+11
+220
+93
+11
+218
+87
+5
+218
+87
+5
+218
+87
+5
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+220
+93
+11
+220
+93
+11
+220
+93
+11
+220
+93
+11
+224
+98
+18
+224
+98
+18
+224
+98
+18
+224
+98
+18
+224
+98
+18
+224
+98
+18
+220
+93
+11
+224
+98
+18
+220
+93
+11
+220
+93
+11
+220
+93
+11
+218
+87
+5
+218
+87
+5
+218
+87
+5
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+218
+87
+5
+217
+86
+3
+218
+87
+5
+218
+87
+5
+218
+87
+5
+220
+93
+11
+220
+93
+11
+220
+93
+11
+220
+93
+11
+220
+93
+11
+224
+98
+18
+224
+98
+18
+224
+98
+18
+224
+98
+18
+224
+98
+18
+220
+93
+11
+220
+93
+11
+220
+93
+11
+220
+93
+11
+220
+93
+11
+218
+87
+5
+218
+87
+5
+218
+87
+5
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+218
+87
+5
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+217
+86
+3
+217
+86
+3
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
+214
+84
+0
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch
new file mode 100644
index 0000000000..ac26554845
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch
@@ -0,0 +1,39 @@
+From 26abf45ac80be4c54a63fecf1c3c1e1efb416e0a Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 1 Apr 2009 18:27:09 +0300
+Subject: [PATCH 01/69] Revert "gro: Fix legacy path napi_complete crash"
+
+This reverts commit 303c6a0251852ecbdc5c15e466dcaff5971f7517.
+
+Fixes USB network problems
+---
+ net/core/dev.c | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/net/core/dev.c b/net/core/dev.c
+index e3fe5c7..c1e9dc0 100644
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -2588,9 +2588,9 @@ static int process_backlog(struct napi_struct *napi, int quota)
+ local_irq_disable();
+ skb = __skb_dequeue(&queue->input_pkt_queue);
+ if (!skb) {
++ __napi_complete(napi);
+ local_irq_enable();
+- napi_complete(napi);
+- goto out;
++ break;
+ }
+ local_irq_enable();
+
+@@ -2599,7 +2599,6 @@ static int process_backlog(struct napi_struct *napi, int quota)
+
+ napi_gro_flush(napi);
+
+-out:
+ return work;
+ }
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch
new file mode 100644
index 0000000000..5873ae280c
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch
@@ -0,0 +1,1297 @@
+From 02243f13eec816e11d16676a131bc04b8a0666ab Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 11 Feb 2009 16:33:02 +0200
+Subject: [PATCH] OMAPFB: move omapfb.h to include/linux/
+
+This is needed so that omapfb.h is automatically exported to user space.
+
+omapfb.h should be cleaned up later. Some stuff can probably be moved
+to omapfb's private include file.
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ arch/arm/mach-omap1/board-nokia770.c | 2 +-
+ arch/arm/mach-omap2/board-n800.c | 2 +-
+ arch/arm/mach-omap2/io.c | 2 +-
+ arch/arm/plat-omap/fb.c | 2 +-
+ arch/arm/plat-omap/include/mach/omapfb.h | 398 ------------------------------
+ drivers/video/omap/blizzard.c | 2 +-
+ drivers/video/omap/dispc.c | 2 +-
+ drivers/video/omap/hwa742.c | 2 +-
+ drivers/video/omap/lcd_2430sdp.c | 2 +-
+ drivers/video/omap/lcd_ams_delta.c | 2 +-
+ drivers/video/omap/lcd_apollon.c | 2 +-
+ drivers/video/omap/lcd_h3.c | 2 +-
+ drivers/video/omap/lcd_h4.c | 3 +-
+ drivers/video/omap/lcd_inn1510.c | 2 +-
+ drivers/video/omap/lcd_inn1610.c | 2 +-
+ drivers/video/omap/lcd_ldp.c | 2 +-
+ drivers/video/omap/lcd_mipid.c | 2 +-
+ drivers/video/omap/lcd_omap2evm.c | 2 +-
+ drivers/video/omap/lcd_omap3beagle.c | 2 +-
+ drivers/video/omap/lcd_omap3evm.c | 2 +-
+ drivers/video/omap/lcd_osk.c | 2 +-
+ drivers/video/omap/lcd_overo.c | 2 +-
+ drivers/video/omap/lcd_p2.c | 2 +-
+ drivers/video/omap/lcd_palmte.c | 2 +-
+ drivers/video/omap/lcd_palmtt.c | 2 +-
+ drivers/video/omap/lcd_palmz71.c | 3 +-
+ drivers/video/omap/lcdc.c | 2 +-
+ drivers/video/omap/omapfb_main.c | 2 +-
+ drivers/video/omap/rfbi.c | 3 +-
+ drivers/video/omap/sossi.c | 2 +-
+ include/linux/omapfb.h | 398 ++++++++++++++++++++++++++++++
+ 31 files changed, 427 insertions(+), 430 deletions(-)
+ delete mode 100644 arch/arm/plat-omap/include/mach/omapfb.h
+ create mode 100644 include/linux/omapfb.h
+
+diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
+index 8780ca6..ca4680a 100644
+--- a/arch/arm/mach-omap1/board-nokia770.c
++++ b/arch/arm/mach-omap1/board-nokia770.c
+@@ -18,6 +18,7 @@
+ #include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
+ #include <linux/workqueue.h>
++#include <linux/omapfb.h>
+ #include <linux/delay.h>
+
+ #include <mach/hardware.h>
+@@ -32,7 +33,6 @@
+ #include <mach/keypad.h>
+ #include <mach/common.h>
+ #include <mach/dsp_common.h>
+-#include <mach/omapfb.h>
+ #include <mach/lcd_mipid.h>
+ #include <mach/mmc.h>
+ #include <mach/usb.h>
+diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
+index cb32b61..f6f6571 100644
+--- a/arch/arm/mach-omap2/board-n800.c
++++ b/arch/arm/mach-omap2/board-n800.c
+@@ -27,6 +27,7 @@
+ #include <linux/i2c/lm8323.h>
+ #include <linux/i2c/menelaus.h>
+ #include <linux/i2c/lp5521.h>
++#include <linux/omapfb.h>
+ #include <mach/hardware.h>
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+@@ -39,7 +40,6 @@
+ #include <mach/lcd_mipid.h>
+ #include <mach/clock.h>
+ #include <mach/gpio-switch.h>
+-#include <mach/omapfb.h>
+ #include <mach/blizzard.h>
+
+ #include <../drivers/cbus/tahvo.h>
+diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
+index 3746222..40615a6 100644
+--- a/arch/arm/plat-omap/fb.c
++++ b/arch/arm/plat-omap/fb.c
+@@ -28,13 +28,13 @@
+ #include <linux/platform_device.h>
+ #include <linux/bootmem.h>
+ #include <linux/io.h>
++#include <linux/omapfb.h>
+
+ #include <mach/hardware.h>
+ #include <asm/mach/map.h>
+
+ #include <mach/board.h>
+ #include <mach/sram.h>
+-#include <mach/omapfb.h>
+
+ #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
+
+diff --git a/arch/arm/plat-omap/include/mach/omapfb.h b/arch/arm/plat-omap/include/mach/omapfb.h
+deleted file mode 100644
+index b226bdf..0000000
+--- a/arch/arm/plat-omap/include/mach/omapfb.h
++++ /dev/null
+@@ -1,398 +0,0 @@
+-/*
+- * File: arch/arm/plat-omap/include/mach/omapfb.h
+- *
+- * Framebuffer driver for TI OMAP boards
+- *
+- * Copyright (C) 2004 Nokia Corporation
+- * Author: Imre Deak <imre.deak@nokia.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 __OMAPFB_H
+-#define __OMAPFB_H
+-
+-#include <asm/ioctl.h>
+-#include <asm/types.h>
+-
+-/* IOCTL commands. */
+-
+-#define OMAP_IOW(num, dtype) _IOW('O', num, dtype)
+-#define OMAP_IOR(num, dtype) _IOR('O', num, dtype)
+-#define OMAP_IOWR(num, dtype) _IOWR('O', num, dtype)
+-#define OMAP_IO(num) _IO('O', num)
+-
+-#define OMAPFB_MIRROR OMAP_IOW(31, int)
+-#define OMAPFB_SYNC_GFX OMAP_IO(37)
+-#define OMAPFB_VSYNC OMAP_IO(38)
+-#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
+-#define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
+-#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
+-#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
+-#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
+-#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
+-#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
+-#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
+-#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
+-#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
+-#define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
+-#define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info)
+-#define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
+-
+-#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
+-#define OMAPFB_CAPS_LCDC_MASK 0x00fff000
+-#define OMAPFB_CAPS_PANEL_MASK 0xff000000
+-
+-#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000
+-#define OMAPFB_CAPS_TEARSYNC 0x00002000
+-#define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000
+-#define OMAPFB_CAPS_PLANE_SCALE 0x00008000
+-#define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
+-#define OMAPFB_CAPS_WINDOW_SCALE 0x00020000
+-#define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000
+-#define OMAPFB_CAPS_WINDOW_ROTATE 0x00080000
+-#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
+-
+-/* Values from DSP must map to lower 16-bits */
+-#define OMAPFB_FORMAT_MASK 0x00ff
+-#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
+-#define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
+-#define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
+-#define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
+-#define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
+-
+-#define OMAPFB_EVENT_READY 1
+-#define OMAPFB_EVENT_DISABLED 2
+-
+-#define OMAPFB_MEMTYPE_SDRAM 0
+-#define OMAPFB_MEMTYPE_SRAM 1
+-#define OMAPFB_MEMTYPE_MAX 1
+-
+-enum omapfb_color_format {
+- OMAPFB_COLOR_RGB565 = 0,
+- OMAPFB_COLOR_YUV422,
+- OMAPFB_COLOR_YUV420,
+- OMAPFB_COLOR_CLUT_8BPP,
+- OMAPFB_COLOR_CLUT_4BPP,
+- OMAPFB_COLOR_CLUT_2BPP,
+- OMAPFB_COLOR_CLUT_1BPP,
+- OMAPFB_COLOR_RGB444,
+- OMAPFB_COLOR_YUY422,
+-};
+-
+-struct omapfb_update_window {
+- __u32 x, y;
+- __u32 width, height;
+- __u32 format;
+- __u32 out_x, out_y;
+- __u32 out_width, out_height;
+- __u32 reserved[8];
+-};
+-
+-struct omapfb_update_window_old {
+- __u32 x, y;
+- __u32 width, height;
+- __u32 format;
+-};
+-
+-enum omapfb_plane {
+- OMAPFB_PLANE_GFX = 0,
+- OMAPFB_PLANE_VID1,
+- OMAPFB_PLANE_VID2,
+-};
+-
+-enum omapfb_channel_out {
+- OMAPFB_CHANNEL_OUT_LCD = 0,
+- OMAPFB_CHANNEL_OUT_DIGIT,
+-};
+-
+-struct omapfb_plane_info {
+- __u32 pos_x;
+- __u32 pos_y;
+- __u8 enabled;
+- __u8 channel_out;
+- __u8 mirror;
+- __u8 reserved1;
+- __u32 out_width;
+- __u32 out_height;
+- __u32 reserved2[12];
+-};
+-
+-struct omapfb_mem_info {
+- __u32 size;
+- __u8 type;
+- __u8 reserved[3];
+-};
+-
+-struct omapfb_caps {
+- __u32 ctrl;
+- __u32 plane_color;
+- __u32 wnd_color;
+-};
+-
+-enum omapfb_color_key_type {
+- OMAPFB_COLOR_KEY_DISABLED = 0,
+- OMAPFB_COLOR_KEY_GFX_DST,
+- OMAPFB_COLOR_KEY_VID_SRC,
+-};
+-
+-struct omapfb_color_key {
+- __u8 channel_out;
+- __u32 background;
+- __u32 trans_key;
+- __u8 key_type;
+-};
+-
+-enum omapfb_update_mode {
+- OMAPFB_UPDATE_DISABLED = 0,
+- OMAPFB_AUTO_UPDATE,
+- OMAPFB_MANUAL_UPDATE
+-};
+-
+-#ifdef __KERNEL__
+-
+-#include <linux/completion.h>
+-#include <linux/interrupt.h>
+-#include <linux/fb.h>
+-#include <linux/mutex.h>
+-
+-#include <mach/board.h>
+-
+-#define OMAP_LCDC_INV_VSYNC 0x0001
+-#define OMAP_LCDC_INV_HSYNC 0x0002
+-#define OMAP_LCDC_INV_PIX_CLOCK 0x0004
+-#define OMAP_LCDC_INV_OUTPUT_EN 0x0008
+-#define OMAP_LCDC_HSVS_RISING_EDGE 0x0010
+-#define OMAP_LCDC_HSVS_OPPOSITE 0x0020
+-
+-#define OMAP_LCDC_SIGNAL_MASK 0x003f
+-
+-#define OMAP_LCDC_PANEL_TFT 0x0100
+-
+-#define OMAPFB_PLANE_XRES_MIN 8
+-#define OMAPFB_PLANE_YRES_MIN 8
+-
+-#ifdef CONFIG_ARCH_OMAP1
+-#define OMAPFB_PLANE_NUM 1
+-#else
+-#define OMAPFB_PLANE_NUM 3
+-#endif
+-
+-struct omapfb_device;
+-
+-struct lcd_panel {
+- const char *name;
+- int config; /* TFT/STN, signal inversion */
+- int bpp; /* Pixel format in fb mem */
+- int data_lines; /* Lines on LCD HW interface */
+-
+- int x_res, y_res;
+- int pixel_clock; /* In kHz */
+- int hsw; /* Horizontal synchronization
+- pulse width */
+- int hfp; /* Horizontal front porch */
+- int hbp; /* Horizontal back porch */
+- int vsw; /* Vertical synchronization
+- pulse width */
+- int vfp; /* Vertical front porch */
+- int vbp; /* Vertical back porch */
+- int acb; /* ac-bias pin frequency */
+- int pcd; /* pixel clock divider.
+- Obsolete use pixel_clock instead */
+-
+- int (*init) (struct lcd_panel *panel,
+- struct omapfb_device *fbdev);
+- void (*cleanup) (struct lcd_panel *panel);
+- int (*enable) (struct lcd_panel *panel);
+- void (*disable) (struct lcd_panel *panel);
+- unsigned long (*get_caps) (struct lcd_panel *panel);
+- int (*set_bklight_level)(struct lcd_panel *panel,
+- unsigned int level);
+- unsigned int (*get_bklight_level)(struct lcd_panel *panel);
+- unsigned int (*get_bklight_max) (struct lcd_panel *panel);
+- int (*run_test) (struct lcd_panel *panel, int test_num);
+-};
+-
+-struct extif_timings {
+- int cs_on_time;
+- int cs_off_time;
+- int we_on_time;
+- int we_off_time;
+- int re_on_time;
+- int re_off_time;
+- int we_cycle_time;
+- int re_cycle_time;
+- int cs_pulse_width;
+- int access_time;
+-
+- int clk_div;
+-
+- u32 tim[5]; /* set by extif->convert_timings */
+-
+- int converted;
+-};
+-
+-struct lcd_ctrl_extif {
+- int (*init) (struct omapfb_device *fbdev);
+- void (*cleanup) (void);
+- void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
+- unsigned long (*get_max_tx_rate)(void);
+- int (*convert_timings) (struct extif_timings *timings);
+- void (*set_timings) (const struct extif_timings *timings);
+- void (*set_bits_per_cycle)(int bpc);
+- void (*write_command) (const void *buf, unsigned int len);
+- void (*read_data) (void *buf, unsigned int len);
+- void (*write_data) (const void *buf, unsigned int len);
+- void (*transfer_area) (int width, int height,
+- void (callback)(void * data), void *data);
+- int (*setup_tearsync) (unsigned pin_cnt,
+- unsigned hs_pulse_time, unsigned vs_pulse_time,
+- int hs_pol_inv, int vs_pol_inv, int div);
+- int (*enable_tearsync) (int enable, unsigned line);
+-
+- unsigned long max_transmit_size;
+-};
+-
+-struct omapfb_notifier_block {
+- struct notifier_block nb;
+- void *data;
+- int plane_idx;
+-};
+-
+-typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
+- unsigned long event,
+- void *fbi);
+-
+-struct omapfb_mem_region {
+- u32 paddr;
+- void __iomem *vaddr;
+- unsigned long size;
+- u8 type; /* OMAPFB_PLANE_MEM_* */
+- unsigned alloc:1; /* allocated by the driver */
+- unsigned map:1; /* kernel mapped by the driver */
+-};
+-
+-struct omapfb_mem_desc {
+- int region_cnt;
+- struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
+-};
+-
+-struct lcd_ctrl {
+- const char *name;
+- void *data;
+-
+- int (*init) (struct omapfb_device *fbdev,
+- int ext_mode,
+- struct omapfb_mem_desc *req_md);
+- void (*cleanup) (void);
+- void (*bind_client) (struct omapfb_notifier_block *nb);
+- void (*get_caps) (int plane, struct omapfb_caps *caps);
+- int (*set_update_mode)(enum omapfb_update_mode mode);
+- enum omapfb_update_mode (*get_update_mode)(void);
+- int (*setup_plane) (int plane, int channel_out,
+- unsigned long offset,
+- int screen_width,
+- int pos_x, int pos_y, int width,
+- int height, int color_mode);
+- int (*set_rotate) (int angle);
+- int (*setup_mem) (int plane, size_t size,
+- int mem_type, unsigned long *paddr);
+- int (*mmap) (struct fb_info *info,
+- struct vm_area_struct *vma);
+- int (*set_scale) (int plane,
+- int orig_width, int orig_height,
+- int out_width, int out_height);
+- int (*enable_plane) (int plane, int enable);
+- int (*update_window) (struct fb_info *fbi,
+- struct omapfb_update_window *win,
+- void (*callback)(void *),
+- void *callback_data);
+- void (*sync) (void);
+- void (*suspend) (void);
+- void (*resume) (void);
+- int (*run_test) (int test_num);
+- int (*setcolreg) (u_int regno, u16 red, u16 green,
+- u16 blue, u16 transp,
+- int update_hw_mem);
+- int (*set_color_key) (struct omapfb_color_key *ck);
+- int (*get_color_key) (struct omapfb_color_key *ck);
+-};
+-
+-enum omapfb_state {
+- OMAPFB_DISABLED = 0,
+- OMAPFB_SUSPENDED= 99,
+- OMAPFB_ACTIVE = 100
+-};
+-
+-struct omapfb_plane_struct {
+- int idx;
+- struct omapfb_plane_info info;
+- enum omapfb_color_format color_mode;
+- struct omapfb_device *fbdev;
+-};
+-
+-struct omapfb_device {
+- int state;
+- int ext_lcdc; /* Using external
+- LCD controller */
+- struct mutex rqueue_mutex;
+-
+- int palette_size;
+- u32 pseudo_palette[17];
+-
+- struct lcd_panel *panel; /* LCD panel */
+- const struct lcd_ctrl *ctrl; /* LCD controller */
+- const struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
+- struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
+- interface */
+- struct device *dev;
+- struct fb_var_screeninfo new_var; /* for mode changes */
+-
+- struct omapfb_mem_desc mem_desc;
+- struct fb_info *fb_info[OMAPFB_PLANE_NUM];
+-};
+-
+-struct omapfb_platform_data {
+- struct omap_lcd_config lcd;
+- struct omapfb_mem_desc mem_desc;
+- void *ctrl_platform_data;
+-};
+-
+-#ifdef CONFIG_ARCH_OMAP1
+-extern struct lcd_ctrl omap1_lcd_ctrl;
+-#else
+-extern struct lcd_ctrl omap2_disp_ctrl;
+-#endif
+-
+-extern void omapfb_reserve_sdram(void);
+-extern void omapfb_register_panel(struct lcd_panel *panel);
+-extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
+-extern void omapfb_notify_clients(struct omapfb_device *fbdev,
+- unsigned long event);
+-extern int omapfb_register_client(struct omapfb_notifier_block *nb,
+- omapfb_notifier_callback_t callback,
+- void *callback_data);
+-extern int omapfb_unregister_client(struct omapfb_notifier_block *nb);
+-extern int omapfb_update_window_async(struct fb_info *fbi,
+- struct omapfb_update_window *win,
+- void (*callback)(void *),
+- void *callback_data);
+-
+-/* in arch/arm/plat-omap/fb.c */
+-extern void omapfb_set_ctrl_platform_data(void *pdata);
+-
+-#endif /* __KERNEL__ */
+-
+-#endif /* __OMAPFB_H */
+diff --git a/drivers/video/omap/blizzard.c b/drivers/video/omap/blizzard.c
+index f60a233..8121c09 100644
+--- a/drivers/video/omap/blizzard.c
++++ b/drivers/video/omap/blizzard.c
+@@ -25,9 +25,9 @@
+ #include <linux/fb.h>
+ #include <linux/delay.h>
+ #include <linux/clk.h>
++#include <linux/omapfb.h>
+
+ #include <mach/dma.h>
+-#include <mach/omapfb.h>
+ #include <mach/blizzard.h>
+
+ #include "dispc.h"
+diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
+index c140c21..1915af5 100644
+--- a/drivers/video/omap/dispc.c
++++ b/drivers/video/omap/dispc.c
+@@ -24,9 +24,9 @@
+ #include <linux/vmalloc.h>
+ #include <linux/clk.h>
+ #include <linux/io.h>
++#include <linux/omapfb.h>
+
+ #include <mach/sram.h>
+-#include <mach/omapfb.h>
+ #include <mach/board.h>
+
+ #include "dispc.h"
+diff --git a/drivers/video/omap/hwa742.c b/drivers/video/omap/hwa742.c
+index f24df0b..9b4c506 100644
+--- a/drivers/video/omap/hwa742.c
++++ b/drivers/video/omap/hwa742.c
+@@ -25,9 +25,9 @@
+ #include <linux/fb.h>
+ #include <linux/delay.h>
+ #include <linux/clk.h>
++#include <linux/omapfb.h>
+
+ #include <mach/dma.h>
+-#include <mach/omapfb.h>
+ #include <mach/hwa742.h>
+
+ #define HWA742_REV_CODE_REG 0x0
+diff --git a/drivers/video/omap/lcd_2430sdp.c b/drivers/video/omap/lcd_2430sdp.c
+index a22b452..1252cc3 100644
+--- a/drivers/video/omap/lcd_2430sdp.c
++++ b/drivers/video/omap/lcd_2430sdp.c
+@@ -26,9 +26,9 @@
+ #include <linux/delay.h>
+ #include <linux/gpio.h>
+ #include <linux/i2c/twl4030.h>
++#include <linux/omapfb.h>
+
+ #include <mach/mux.h>
+-#include <mach/omapfb.h>
+ #include <asm/mach-types.h>
+
+ #define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91
+diff --git a/drivers/video/omap/lcd_ams_delta.c b/drivers/video/omap/lcd_ams_delta.c
+index 3fd5342..4d54725 100644
+--- a/drivers/video/omap/lcd_ams_delta.c
++++ b/drivers/video/omap/lcd_ams_delta.c
+@@ -24,13 +24,13 @@
+
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
++#include <linux/omapfb.h>
+
+ #include <asm/delay.h>
+ #include <asm/io.h>
+
+ #include <mach/board-ams-delta.h>
+ #include <mach/hardware.h>
+-#include <mach/omapfb.h>
+
+ #define AMS_DELTA_DEFAULT_CONTRAST 112
+
+diff --git a/drivers/video/omap/lcd_apollon.c b/drivers/video/omap/lcd_apollon.c
+index beae5d9..e3b2224 100644
+--- a/drivers/video/omap/lcd_apollon.c
++++ b/drivers/video/omap/lcd_apollon.c
+@@ -23,10 +23,10 @@
+
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
++#include <linux/omapfb.h>
+
+ #include <mach/gpio.h>
+ #include <mach/mux.h>
+-#include <mach/omapfb.h>
+
+ /* #define USE_35INCH_LCD 1 */
+
+diff --git a/drivers/video/omap/lcd_h3.c b/drivers/video/omap/lcd_h3.c
+index 2486237..f7264ea 100644
+--- a/drivers/video/omap/lcd_h3.c
++++ b/drivers/video/omap/lcd_h3.c
+@@ -22,9 +22,9 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/i2c/tps65010.h>
++#include <linux/omapfb.h>
+
+ #include <mach/gpio.h>
+-#include <mach/omapfb.h>
+
+ #define MODULE_NAME "omapfb-lcd_h3"
+
+diff --git a/drivers/video/omap/lcd_h4.c b/drivers/video/omap/lcd_h4.c
+index 6ff5643..d72df0c 100644
+--- a/drivers/video/omap/lcd_h4.c
++++ b/drivers/video/omap/lcd_h4.c
+@@ -21,8 +21,7 @@
+
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+-
+-#include <mach/omapfb.h>
++#include <linux/omapfb.h>
+
+ static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
+ {
+diff --git a/drivers/video/omap/lcd_inn1510.c b/drivers/video/omap/lcd_inn1510.c
+index 6953ed4..f6e05d7 100644
+--- a/drivers/video/omap/lcd_inn1510.c
++++ b/drivers/video/omap/lcd_inn1510.c
+@@ -22,9 +22,9 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/io.h>
++#include <linux/omapfb.h>
+
+ #include <mach/fpga.h>
+-#include <mach/omapfb.h>
+
+ static int innovator1510_panel_init(struct lcd_panel *panel,
+ struct omapfb_device *fbdev)
+diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c
+index 4c4f7ee..c599e41 100644
+--- a/drivers/video/omap/lcd_inn1610.c
++++ b/drivers/video/omap/lcd_inn1610.c
+@@ -21,9 +21,9 @@
+
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
++#include <linux/omapfb.h>
+
+ #include <mach/gpio.h>
+-#include <mach/omapfb.h>
+
+ #define MODULE_NAME "omapfb-lcd_h3"
+
+diff --git a/drivers/video/omap/lcd_ldp.c b/drivers/video/omap/lcd_ldp.c
+index 8925230..1c25186 100644
+--- a/drivers/video/omap/lcd_ldp.c
++++ b/drivers/video/omap/lcd_ldp.c
+@@ -25,10 +25,10 @@
+ #include <linux/platform_device.h>
+ #include <linux/delay.h>
+ #include <linux/i2c/twl4030.h>
++#include <linux/omapfb.h>
+
+ #include <mach/gpio.h>
+ #include <mach/mux.h>
+-#include <mach/omapfb.h>
+ #include <asm/mach-types.h>
+
+ #define LCD_PANEL_BACKLIGHT_GPIO (15 + OMAP_MAX_GPIO_LINES)
+diff --git a/drivers/video/omap/lcd_mipid.c b/drivers/video/omap/lcd_mipid.c
+index 1895997..4b28005 100644
+--- a/drivers/video/omap/lcd_mipid.c
++++ b/drivers/video/omap/lcd_mipid.c
+@@ -22,8 +22,8 @@
+ #include <linux/delay.h>
+ #include <linux/workqueue.h>
+ #include <linux/spi/spi.h>
++#include <linux/omapfb.h>
+
+-#include <mach/omapfb.h>
+ #include <mach/lcd_mipid.h>
+
+ #include "../../cbus/tahvo.h"
+diff --git a/drivers/video/omap/lcd_omap2evm.c b/drivers/video/omap/lcd_omap2evm.c
+index 2fc46c2..1908a2b 100644
+--- a/drivers/video/omap/lcd_omap2evm.c
++++ b/drivers/video/omap/lcd_omap2evm.c
+@@ -25,9 +25,9 @@
+ #include <linux/platform_device.h>
+ #include <linux/gpio.h>
+ #include <linux/i2c/twl4030.h>
++#include <linux/omapfb.h>
+
+ #include <mach/mux.h>
+-#include <mach/omapfb.h>
+ #include <asm/mach-types.h>
+
+ #define LCD_PANEL_ENABLE_GPIO 154
+diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c
+index eae43e4..6be117e 100644
+--- a/drivers/video/omap/lcd_omap3beagle.c
++++ b/drivers/video/omap/lcd_omap3beagle.c
+@@ -24,9 +24,9 @@
+ #include <linux/platform_device.h>
+ #include <linux/gpio.h>
+ #include <linux/i2c/twl4030.h>
++#include <linux/omapfb.h>
+
+ #include <mach/mux.h>
+-#include <mach/omapfb.h>
+ #include <asm/mach-types.h>
+
+ #define LCD_PANEL_ENABLE_GPIO 170
+diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/lcd_omap3evm.c
+index 1c3d814..10ba48c 100644
+--- a/drivers/video/omap/lcd_omap3evm.c
++++ b/drivers/video/omap/lcd_omap3evm.c
+@@ -24,9 +24,9 @@
+ #include <linux/platform_device.h>
+ #include <linux/gpio.h>
+ #include <linux/i2c/twl4030.h>
++#include <linux/omapfb.h>
+
+ #include <mach/mux.h>
+-#include <mach/omapfb.h>
+ #include <asm/mach-types.h>
+
+ #define LCD_PANEL_ENABLE_GPIO 153
+diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c
+index 379c96d..d6b193e 100644
+--- a/drivers/video/omap/lcd_osk.c
++++ b/drivers/video/omap/lcd_osk.c
+@@ -22,10 +22,10 @@
+
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
++#include <linux/omapfb.h>
+
+ #include <mach/gpio.h>
+ #include <mach/mux.h>
+-#include <mach/omapfb.h>
+
+ static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
+ {
+diff --git a/drivers/video/omap/lcd_overo.c b/drivers/video/omap/lcd_overo.c
+index 2bc5c92..40c2026 100644
+--- a/drivers/video/omap/lcd_overo.c
++++ b/drivers/video/omap/lcd_overo.c
+@@ -22,10 +22,10 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/i2c/twl4030.h>
++#include <linux/omapfb.h>
+
+ #include <mach/gpio.h>
+ #include <mach/mux.h>
+-#include <mach/omapfb.h>
+ #include <asm/mach-types.h>
+
+ #define LCD_ENABLE 144
+diff --git a/drivers/video/omap/lcd_p2.c b/drivers/video/omap/lcd_p2.c
+index dd40fd7..bc5abef 100644
+--- a/drivers/video/omap/lcd_p2.c
++++ b/drivers/video/omap/lcd_p2.c
+@@ -24,10 +24,10 @@
+ #include <linux/module.h>
+ #include <linux/delay.h>
+ #include <linux/platform_device.h>
++#include <linux/omapfb.h>
+
+ #include <mach/mux.h>
+ #include <mach/gpio.h>
+-#include <mach/omapfb.h>
+
+ /*
+ * File: epson-md-tft.h
+diff --git a/drivers/video/omap/lcd_palmte.c b/drivers/video/omap/lcd_palmte.c
+index 2183173..dcb456c 100644
+--- a/drivers/video/omap/lcd_palmte.c
++++ b/drivers/video/omap/lcd_palmte.c
+@@ -22,9 +22,9 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/io.h>
++#include <linux/omapfb.h>
+
+ #include <mach/fpga.h>
+-#include <mach/omapfb.h>
+
+ static int palmte_panel_init(struct lcd_panel *panel,
+ struct omapfb_device *fbdev)
+diff --git a/drivers/video/omap/lcd_palmtt.c b/drivers/video/omap/lcd_palmtt.c
+index 57b0f6c..e8adab8 100644
+--- a/drivers/video/omap/lcd_palmtt.c
++++ b/drivers/video/omap/lcd_palmtt.c
+@@ -28,9 +28,9 @@ GPIO13 - screen blanking
+ #include <linux/platform_device.h>
+ #include <linux/module.h>
+ #include <linux/io.h>
++#include <linux/omapfb.h>
+
+ #include <mach/gpio.h>
+-#include <mach/omapfb.h>
+
+ static int palmtt_panel_init(struct lcd_panel *panel,
+ struct omapfb_device *fbdev)
+diff --git a/drivers/video/omap/lcd_palmz71.c b/drivers/video/omap/lcd_palmz71.c
+index d33d78b..d5b3f82 100644
+--- a/drivers/video/omap/lcd_palmz71.c
++++ b/drivers/video/omap/lcd_palmz71.c
+@@ -23,8 +23,7 @@
+ #include <linux/module.h>
+ #include <linux/platform_device.h>
+ #include <linux/io.h>
+-
+-#include <mach/omapfb.h>
++#include <linux/omapfb.h>
+
+ static int palmz71_panel_init(struct lcd_panel *panel,
+ struct omapfb_device *fbdev)
+diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c
+index ab39492..633e33c 100644
+--- a/drivers/video/omap/lcdc.c
++++ b/drivers/video/omap/lcdc.c
+@@ -28,9 +28,9 @@
+ #include <linux/dma-mapping.h>
+ #include <linux/vmalloc.h>
+ #include <linux/clk.h>
++#include <linux/omapfb.h>
+
+ #include <mach/dma.h>
+-#include <mach/omapfb.h>
+
+ #include <asm/mach-types.h>
+
+diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
+index 3bb4247..c6306af 100644
+--- a/drivers/video/omap/omapfb_main.c
++++ b/drivers/video/omap/omapfb_main.c
+@@ -27,9 +27,9 @@
+ #include <linux/platform_device.h>
+ #include <linux/mm.h>
+ #include <linux/uaccess.h>
++#include <linux/omapfb.h>
+
+ #include <mach/dma.h>
+-#include <mach/omapfb.h>
+
+ #include "lcdc.h"
+ #include "dispc.h"
+diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c
+index 29fa368..118cfa9 100644
+--- a/drivers/video/omap/rfbi.c
++++ b/drivers/video/omap/rfbi.c
+@@ -26,8 +26,7 @@
+ #include <linux/interrupt.h>
+ #include <linux/clk.h>
+ #include <linux/io.h>
+-
+-#include <mach/omapfb.h>
++#include <linux/omapfb.h>
+
+ #include "dispc.h"
+
+diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c
+index cc697cc..ff9dd71 100644
+--- a/drivers/video/omap/sossi.c
++++ b/drivers/video/omap/sossi.c
+@@ -23,9 +23,9 @@
+ #include <linux/clk.h>
+ #include <linux/irq.h>
+ #include <linux/io.h>
++#include <linux/omapfb.h>
+
+ #include <mach/dma.h>
+-#include <mach/omapfb.h>
+
+ #include "lcdc.h"
+
+diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h
+new file mode 100644
+index 0000000..b226bdf
+--- /dev/null
++++ b/include/linux/omapfb.h
+@@ -0,0 +1,398 @@
++/*
++ * File: arch/arm/plat-omap/include/mach/omapfb.h
++ *
++ * Framebuffer driver for TI OMAP boards
++ *
++ * Copyright (C) 2004 Nokia Corporation
++ * Author: Imre Deak <imre.deak@nokia.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 __OMAPFB_H
++#define __OMAPFB_H
++
++#include <asm/ioctl.h>
++#include <asm/types.h>
++
++/* IOCTL commands. */
++
++#define OMAP_IOW(num, dtype) _IOW('O', num, dtype)
++#define OMAP_IOR(num, dtype) _IOR('O', num, dtype)
++#define OMAP_IOWR(num, dtype) _IOWR('O', num, dtype)
++#define OMAP_IO(num) _IO('O', num)
++
++#define OMAPFB_MIRROR OMAP_IOW(31, int)
++#define OMAPFB_SYNC_GFX OMAP_IO(37)
++#define OMAPFB_VSYNC OMAP_IO(38)
++#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
++#define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
++#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
++#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
++#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
++#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
++#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
++#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
++#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
++#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
++#define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
++#define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info)
++#define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
++
++#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
++#define OMAPFB_CAPS_LCDC_MASK 0x00fff000
++#define OMAPFB_CAPS_PANEL_MASK 0xff000000
++
++#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000
++#define OMAPFB_CAPS_TEARSYNC 0x00002000
++#define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000
++#define OMAPFB_CAPS_PLANE_SCALE 0x00008000
++#define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
++#define OMAPFB_CAPS_WINDOW_SCALE 0x00020000
++#define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000
++#define OMAPFB_CAPS_WINDOW_ROTATE 0x00080000
++#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
++
++/* Values from DSP must map to lower 16-bits */
++#define OMAPFB_FORMAT_MASK 0x00ff
++#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
++#define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
++#define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
++#define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
++#define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
++
++#define OMAPFB_EVENT_READY 1
++#define OMAPFB_EVENT_DISABLED 2
++
++#define OMAPFB_MEMTYPE_SDRAM 0
++#define OMAPFB_MEMTYPE_SRAM 1
++#define OMAPFB_MEMTYPE_MAX 1
++
++enum omapfb_color_format {
++ OMAPFB_COLOR_RGB565 = 0,
++ OMAPFB_COLOR_YUV422,
++ OMAPFB_COLOR_YUV420,
++ OMAPFB_COLOR_CLUT_8BPP,
++ OMAPFB_COLOR_CLUT_4BPP,
++ OMAPFB_COLOR_CLUT_2BPP,
++ OMAPFB_COLOR_CLUT_1BPP,
++ OMAPFB_COLOR_RGB444,
++ OMAPFB_COLOR_YUY422,
++};
++
++struct omapfb_update_window {
++ __u32 x, y;
++ __u32 width, height;
++ __u32 format;
++ __u32 out_x, out_y;
++ __u32 out_width, out_height;
++ __u32 reserved[8];
++};
++
++struct omapfb_update_window_old {
++ __u32 x, y;
++ __u32 width, height;
++ __u32 format;
++};
++
++enum omapfb_plane {
++ OMAPFB_PLANE_GFX = 0,
++ OMAPFB_PLANE_VID1,
++ OMAPFB_PLANE_VID2,
++};
++
++enum omapfb_channel_out {
++ OMAPFB_CHANNEL_OUT_LCD = 0,
++ OMAPFB_CHANNEL_OUT_DIGIT,
++};
++
++struct omapfb_plane_info {
++ __u32 pos_x;
++ __u32 pos_y;
++ __u8 enabled;
++ __u8 channel_out;
++ __u8 mirror;
++ __u8 reserved1;
++ __u32 out_width;
++ __u32 out_height;
++ __u32 reserved2[12];
++};
++
++struct omapfb_mem_info {
++ __u32 size;
++ __u8 type;
++ __u8 reserved[3];
++};
++
++struct omapfb_caps {
++ __u32 ctrl;
++ __u32 plane_color;
++ __u32 wnd_color;
++};
++
++enum omapfb_color_key_type {
++ OMAPFB_COLOR_KEY_DISABLED = 0,
++ OMAPFB_COLOR_KEY_GFX_DST,
++ OMAPFB_COLOR_KEY_VID_SRC,
++};
++
++struct omapfb_color_key {
++ __u8 channel_out;
++ __u32 background;
++ __u32 trans_key;
++ __u8 key_type;
++};
++
++enum omapfb_update_mode {
++ OMAPFB_UPDATE_DISABLED = 0,
++ OMAPFB_AUTO_UPDATE,
++ OMAPFB_MANUAL_UPDATE
++};
++
++#ifdef __KERNEL__
++
++#include <linux/completion.h>
++#include <linux/interrupt.h>
++#include <linux/fb.h>
++#include <linux/mutex.h>
++
++#include <mach/board.h>
++
++#define OMAP_LCDC_INV_VSYNC 0x0001
++#define OMAP_LCDC_INV_HSYNC 0x0002
++#define OMAP_LCDC_INV_PIX_CLOCK 0x0004
++#define OMAP_LCDC_INV_OUTPUT_EN 0x0008
++#define OMAP_LCDC_HSVS_RISING_EDGE 0x0010
++#define OMAP_LCDC_HSVS_OPPOSITE 0x0020
++
++#define OMAP_LCDC_SIGNAL_MASK 0x003f
++
++#define OMAP_LCDC_PANEL_TFT 0x0100
++
++#define OMAPFB_PLANE_XRES_MIN 8
++#define OMAPFB_PLANE_YRES_MIN 8
++
++#ifdef CONFIG_ARCH_OMAP1
++#define OMAPFB_PLANE_NUM 1
++#else
++#define OMAPFB_PLANE_NUM 3
++#endif
++
++struct omapfb_device;
++
++struct lcd_panel {
++ const char *name;
++ int config; /* TFT/STN, signal inversion */
++ int bpp; /* Pixel format in fb mem */
++ int data_lines; /* Lines on LCD HW interface */
++
++ int x_res, y_res;
++ int pixel_clock; /* In kHz */
++ int hsw; /* Horizontal synchronization
++ pulse width */
++ int hfp; /* Horizontal front porch */
++ int hbp; /* Horizontal back porch */
++ int vsw; /* Vertical synchronization
++ pulse width */
++ int vfp; /* Vertical front porch */
++ int vbp; /* Vertical back porch */
++ int acb; /* ac-bias pin frequency */
++ int pcd; /* pixel clock divider.
++ Obsolete use pixel_clock instead */
++
++ int (*init) (struct lcd_panel *panel,
++ struct omapfb_device *fbdev);
++ void (*cleanup) (struct lcd_panel *panel);
++ int (*enable) (struct lcd_panel *panel);
++ void (*disable) (struct lcd_panel *panel);
++ unsigned long (*get_caps) (struct lcd_panel *panel);
++ int (*set_bklight_level)(struct lcd_panel *panel,
++ unsigned int level);
++ unsigned int (*get_bklight_level)(struct lcd_panel *panel);
++ unsigned int (*get_bklight_max) (struct lcd_panel *panel);
++ int (*run_test) (struct lcd_panel *panel, int test_num);
++};
++
++struct extif_timings {
++ int cs_on_time;
++ int cs_off_time;
++ int we_on_time;
++ int we_off_time;
++ int re_on_time;
++ int re_off_time;
++ int we_cycle_time;
++ int re_cycle_time;
++ int cs_pulse_width;
++ int access_time;
++
++ int clk_div;
++
++ u32 tim[5]; /* set by extif->convert_timings */
++
++ int converted;
++};
++
++struct lcd_ctrl_extif {
++ int (*init) (struct omapfb_device *fbdev);
++ void (*cleanup) (void);
++ void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
++ unsigned long (*get_max_tx_rate)(void);
++ int (*convert_timings) (struct extif_timings *timings);
++ void (*set_timings) (const struct extif_timings *timings);
++ void (*set_bits_per_cycle)(int bpc);
++ void (*write_command) (const void *buf, unsigned int len);
++ void (*read_data) (void *buf, unsigned int len);
++ void (*write_data) (const void *buf, unsigned int len);
++ void (*transfer_area) (int width, int height,
++ void (callback)(void * data), void *data);
++ int (*setup_tearsync) (unsigned pin_cnt,
++ unsigned hs_pulse_time, unsigned vs_pulse_time,
++ int hs_pol_inv, int vs_pol_inv, int div);
++ int (*enable_tearsync) (int enable, unsigned line);
++
++ unsigned long max_transmit_size;
++};
++
++struct omapfb_notifier_block {
++ struct notifier_block nb;
++ void *data;
++ int plane_idx;
++};
++
++typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
++ unsigned long event,
++ void *fbi);
++
++struct omapfb_mem_region {
++ u32 paddr;
++ void __iomem *vaddr;
++ unsigned long size;
++ u8 type; /* OMAPFB_PLANE_MEM_* */
++ unsigned alloc:1; /* allocated by the driver */
++ unsigned map:1; /* kernel mapped by the driver */
++};
++
++struct omapfb_mem_desc {
++ int region_cnt;
++ struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
++};
++
++struct lcd_ctrl {
++ const char *name;
++ void *data;
++
++ int (*init) (struct omapfb_device *fbdev,
++ int ext_mode,
++ struct omapfb_mem_desc *req_md);
++ void (*cleanup) (void);
++ void (*bind_client) (struct omapfb_notifier_block *nb);
++ void (*get_caps) (int plane, struct omapfb_caps *caps);
++ int (*set_update_mode)(enum omapfb_update_mode mode);
++ enum omapfb_update_mode (*get_update_mode)(void);
++ int (*setup_plane) (int plane, int channel_out,
++ unsigned long offset,
++ int screen_width,
++ int pos_x, int pos_y, int width,
++ int height, int color_mode);
++ int (*set_rotate) (int angle);
++ int (*setup_mem) (int plane, size_t size,
++ int mem_type, unsigned long *paddr);
++ int (*mmap) (struct fb_info *info,
++ struct vm_area_struct *vma);
++ int (*set_scale) (int plane,
++ int orig_width, int orig_height,
++ int out_width, int out_height);
++ int (*enable_plane) (int plane, int enable);
++ int (*update_window) (struct fb_info *fbi,
++ struct omapfb_update_window *win,
++ void (*callback)(void *),
++ void *callback_data);
++ void (*sync) (void);
++ void (*suspend) (void);
++ void (*resume) (void);
++ int (*run_test) (int test_num);
++ int (*setcolreg) (u_int regno, u16 red, u16 green,
++ u16 blue, u16 transp,
++ int update_hw_mem);
++ int (*set_color_key) (struct omapfb_color_key *ck);
++ int (*get_color_key) (struct omapfb_color_key *ck);
++};
++
++enum omapfb_state {
++ OMAPFB_DISABLED = 0,
++ OMAPFB_SUSPENDED= 99,
++ OMAPFB_ACTIVE = 100
++};
++
++struct omapfb_plane_struct {
++ int idx;
++ struct omapfb_plane_info info;
++ enum omapfb_color_format color_mode;
++ struct omapfb_device *fbdev;
++};
++
++struct omapfb_device {
++ int state;
++ int ext_lcdc; /* Using external
++ LCD controller */
++ struct mutex rqueue_mutex;
++
++ int palette_size;
++ u32 pseudo_palette[17];
++
++ struct lcd_panel *panel; /* LCD panel */
++ const struct lcd_ctrl *ctrl; /* LCD controller */
++ const struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
++ struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
++ interface */
++ struct device *dev;
++ struct fb_var_screeninfo new_var; /* for mode changes */
++
++ struct omapfb_mem_desc mem_desc;
++ struct fb_info *fb_info[OMAPFB_PLANE_NUM];
++};
++
++struct omapfb_platform_data {
++ struct omap_lcd_config lcd;
++ struct omapfb_mem_desc mem_desc;
++ void *ctrl_platform_data;
++};
++
++#ifdef CONFIG_ARCH_OMAP1
++extern struct lcd_ctrl omap1_lcd_ctrl;
++#else
++extern struct lcd_ctrl omap2_disp_ctrl;
++#endif
++
++extern void omapfb_reserve_sdram(void);
++extern void omapfb_register_panel(struct lcd_panel *panel);
++extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
++extern void omapfb_notify_clients(struct omapfb_device *fbdev,
++ unsigned long event);
++extern int omapfb_register_client(struct omapfb_notifier_block *nb,
++ omapfb_notifier_callback_t callback,
++ void *callback_data);
++extern int omapfb_unregister_client(struct omapfb_notifier_block *nb);
++extern int omapfb_update_window_async(struct fb_info *fbi,
++ struct omapfb_update_window *win,
++ void (*callback)(void *),
++ void *callback_data);
++
++/* in arch/arm/plat-omap/fb.c */
++extern void omapfb_set_ctrl_platform_data(void *pdata);
++
++#endif /* __KERNEL__ */
++
++#endif /* __OMAPFB_H */
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch
new file mode 100644
index 0000000000..4610e28704
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch
@@ -0,0 +1,14450 @@
+From 284deec412f9c6f15c971d8eaf4d0156a51a2f3b Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 10:23:42 +0300
+Subject: [PATCH 03/69] DSS2: OMAP2/3 Display Subsystem driver
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ Documentation/arm/OMAP/DSS | 311 +++
+ arch/arm/plat-omap/Makefile | 2 +-
+ arch/arm/plat-omap/include/mach/display.h | 520 ++++
+ arch/arm/plat-omap/include/mach/vram.h | 33 +
+ arch/arm/plat-omap/include/mach/vrfb.h | 47 +
+ arch/arm/plat-omap/vram.c | 615 +++++
+ arch/arm/plat-omap/vrfb.c | 159 ++
+ drivers/video/Kconfig | 1 +
+ drivers/video/Makefile | 1 +
+ drivers/video/omap2/Kconfig | 3 +
+ drivers/video/omap2/Makefile | 4 +
+ drivers/video/omap2/dss/Kconfig | 89 +
+ drivers/video/omap2/dss/Makefile | 6 +
+ drivers/video/omap2/dss/core.c | 641 +++++
+ drivers/video/omap2/dss/dispc.c | 2968 +++++++++++++++++++++++
+ drivers/video/omap2/dss/display.c | 693 ++++++
+ drivers/video/omap2/dss/dpi.c | 393 +++
+ drivers/video/omap2/dss/dsi.c | 3752 +++++++++++++++++++++++++++++
+ drivers/video/omap2/dss/dss.c | 345 +++
+ drivers/video/omap2/dss/dss.h | 331 +++
+ drivers/video/omap2/dss/manager.c | 576 +++++
+ drivers/video/omap2/dss/overlay.c | 587 +++++
+ drivers/video/omap2/dss/rfbi.c | 1304 ++++++++++
+ drivers/video/omap2/dss/sdi.c | 245 ++
+ drivers/video/omap2/dss/venc.c | 600 +++++
+ 25 files changed, 14225 insertions(+), 1 deletions(-)
+ create mode 100644 Documentation/arm/OMAP/DSS
+ create mode 100644 arch/arm/plat-omap/include/mach/display.h
+ create mode 100644 arch/arm/plat-omap/include/mach/vram.h
+ create mode 100644 arch/arm/plat-omap/include/mach/vrfb.h
+ create mode 100644 arch/arm/plat-omap/vram.c
+ create mode 100644 arch/arm/plat-omap/vrfb.c
+ create mode 100644 drivers/video/omap2/Kconfig
+ create mode 100644 drivers/video/omap2/Makefile
+ create mode 100644 drivers/video/omap2/dss/Kconfig
+ create mode 100644 drivers/video/omap2/dss/Makefile
+ create mode 100644 drivers/video/omap2/dss/core.c
+ create mode 100644 drivers/video/omap2/dss/dispc.c
+ create mode 100644 drivers/video/omap2/dss/display.c
+ create mode 100644 drivers/video/omap2/dss/dpi.c
+ create mode 100644 drivers/video/omap2/dss/dsi.c
+ create mode 100644 drivers/video/omap2/dss/dss.c
+ create mode 100644 drivers/video/omap2/dss/dss.h
+ create mode 100644 drivers/video/omap2/dss/manager.c
+ create mode 100644 drivers/video/omap2/dss/overlay.c
+ create mode 100644 drivers/video/omap2/dss/rfbi.c
+ create mode 100644 drivers/video/omap2/dss/sdi.c
+ create mode 100644 drivers/video/omap2/dss/venc.c
+
+diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
+new file mode 100644
+index 0000000..9e902a2
+--- /dev/null
++++ b/Documentation/arm/OMAP/DSS
+@@ -0,0 +1,311 @@
++OMAP2/3 Display Subsystem
++-------------------------
++
++This is an almost total rewrite of the OMAP FB driver in drivers/video/omap
++(let's call it DSS1). The main differences between DSS1 and DSS2 are DSI,
++TV-out and multiple display support, but there are lots of small improvements
++also.
++
++The DSS2 driver (omapdss module) is in arch/arm/plat-omap/dss/, and the FB,
++panel and controller drivers are in drivers/video/omap2/. DSS1 and DSS2 live
++currently side by side, you can choose which one to use.
++
++Features
++--------
++
++Working and tested features include:
++
++- MIPI DPI (parallel) output
++- MIPI DSI output in command mode
++- MIPI DBI (RFBI) output
++- SDI output
++- TV output
++- All pieces can be compiled as a module or inside kernel
++- Use DISPC to update any of the outputs
++- Use CPU to update RFBI or DSI output
++- OMAP DISPC planes
++- RGB16, RGB24 packed, RGB24 unpacked
++- YUV2, UYVY
++- Scaling
++- Adjusting DSS FCK to find a good pixel clock
++- Use DSI DPLL to create DSS FCK
++
++Tested boards include:
++- OMAP3 SDP board
++- Beagle board
++- N810
++
++omapdss driver
++--------------
++
++The DSS driver does not itself have any support for Linux framebuffer, V4L or
++such like the current ones, but it has an internal kernel API that upper level
++drivers can use.
++
++The DSS driver models OMAP's overlays, overlay managers and displays in a
++flexible way to enable non-common multi-display configuration. In addition to
++modelling the hardware overlays, omapdss supports virtual overlays and overlay
++managers. These can be used when updating a display with CPU or system DMA.
++
++Panel and controller drivers
++----------------------------
++
++The drivers implement panel or controller specific functionality and are not
++usually visible to users except through omapfb driver. They register
++themselves to the DSS driver.
++
++omapfb driver
++-------------
++
++The omapfb driver implements arbitrary number of standard linux framebuffers.
++These framebuffers can be routed flexibly to any overlays, thus allowing very
++dynamic display architecture.
++
++The driver exports some omapfb specific ioctls, which are compatible with the
++ioctls in the old driver.
++
++The rest of the non standard features are exported via sysfs. Whether the final
++implementation will use sysfs, or ioctls, is still open.
++
++V4L2 drivers
++------------
++
++V4L2 is being implemented in TI.
++
++From omapdss point of view the V4L2 drivers should be similar to framebuffer
++driver.
++
++Architecture
++--------------------
++
++Some clarification what the different components do:
++
++ - Framebuffer is a memory area inside OMAP's SRAM/SDRAM that contains the
++ pixel data for the image. Framebuffer has width and height and color
++ depth.
++ - Overlay defines where the pixels are read from and where they go on the
++ screen. The overlay may be smaller than framebuffer, thus displaying only
++ part of the framebuffer. The position of the overlay may be changed if
++ the overlay is smaller than the display.
++ - Overlay manager combines the overlays in to one image and feeds them to
++ display.
++ - Display is the actual physical display device.
++
++A framebuffer can be connected to multiple overlays to show the same pixel data
++on all of the overlays. Note that in this case the overlay input sizes must be
++the same, but, in case of video overlays, the output size can be different. Any
++framebuffer can be connected to any overlay.
++
++An overlay can be connected to one overlay manager. Also DISPC overlays can be
++connected only to DISPC overlay managers, and virtual overlays can be only
++connected to virtual overlays.
++
++An overlay manager can be connected to one display. There are certain
++restrictions which kinds of displays an overlay manager can be connected:
++
++ - DISPC TV overlay manager can be only connected to TV display.
++ - Virtual overlay managers can only be connected to DBI or DSI displays.
++ - DISPC LCD overlay manager can be connected to all displays, except TV
++ display.
++
++Sysfs
++-----
++The sysfs interface is mainly used for testing. I don't think sysfs
++interface is the best for this in the final version, but I don't quite know
++what would be the best interfaces for these things.
++
++The sysfs interface is divided to two parts: DSS and FB.
++
++/sys/class/graphics/fb? directory:
++mirror 0=off, 1=on
++rotate Rotation 0-3 for 0, 90, 180, 270 degrees
++rotate_type 0 = DMA rotation, 1 = VRFB rotation
++overlays List of overlay numbers to which framebuffer pixels go
++phys_addr Physical address of the framebuffer
++virt_addr Virtual address of the framebuffer
++size Size of the framebuffer
++
++/sys/devices/platform/omapdss/overlay? directory:
++enabled 0=off, 1=on
++input_size width,height (ie. the framebuffer size)
++manager Destination overlay manager name
++name
++output_size width,height
++position x,y
++screen_width width
++
++/sys/devices/platform/omapdss/manager? directory:
++display Destination display
++name
++
++/sys/devices/platform/omapdss/display? directory:
++ctrl_name Controller name
++mirror 0=off, 1=on
++update_mode 0=off, 1=auto, 2=manual
++enabled 0=off, 1=on
++name
++rotate Rotation 0-3 for 0, 90, 180, 270 degrees
++timings Display timings (pixclock,xres/hfp/hbp/hsw,yres/vfp/vbp/vsw)
++ When writing, two special timings are accepted for tv-out:
++ "pal" and "ntsc"
++panel_name
++tear_elim Tearing elimination 0=off, 1=on
++
++There are also some debugfs files at <debugfs>/omapdss/ which show information
++about clocks and registers.
++
++Examples
++--------
++
++The following definitions have been made for the examples below:
++
++ovl0=/sys/devices/platform/omapdss/overlay0
++ovl1=/sys/devices/platform/omapdss/overlay1
++ovl2=/sys/devices/platform/omapdss/overlay2
++
++mgr0=/sys/devices/platform/omapdss/manager0
++mgr1=/sys/devices/platform/omapdss/manager1
++
++lcd=/sys/devices/platform/omapdss/display0
++dvi=/sys/devices/platform/omapdss/display1
++tv=/sys/devices/platform/omapdss/display2
++
++fb0=/sys/class/graphics/fb0
++fb1=/sys/class/graphics/fb1
++fb2=/sys/class/graphics/fb2
++
++Default setup on OMAP3 SDP
++--------------------------
++
++Here's the default setup on OMAP3 SDP board. All planes go to LCD. DVI
++and TV-out are not in use. The columns from left to right are:
++framebuffers, overlays, overlay managers, displays. Framebuffers are
++handled by omapfb, and the rest by the DSS.
++
++FB0 --- GFX -\ DVI
++FB1 --- VID1 --+- LCD ---- LCD
++FB2 --- VID2 -/ TV ----- TV
++
++Example: Switch from LCD to DVI
++----------------------
++
++w=`cat $dvi/horizontal | cut -d "," -f 1`
++h=`cat $dvi/vertical | cut -d "," -f 1`
++
++echo "0" > $lcd/enabled
++echo "" > $mgr0/display
++fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h
++# at this point you have to switch the dvi/lcd dip-switch from the omap board
++echo "dvi" > $mgr0/display
++echo "1" > $dvi/enabled
++
++After this the configuration looks like:
++
++FB0 --- GFX -\ -- DVI
++FB1 --- VID1 --+- LCD -/ LCD
++FB2 --- VID2 -/ TV ----- TV
++
++Example: Clone GFX overlay to LCD and TV
++-------------------------------
++
++w=`cat $tv/horizontal | cut -d "," -f 1`
++h=`cat $tv/vertical | cut -d "," -f 1`
++
++echo "0" > $ovl0/enabled
++echo "0" > $ovl1/enabled
++
++echo "" > $fb1/overlays
++echo "0,1" > $fb0/overlays
++
++echo "$w,$h" > $ovl1/output_size
++echo "tv" > $ovl1/manager
++
++echo "1" > $ovl0/enabled
++echo "1" > $ovl1/enabled
++
++echo "1" > $tv/enabled
++
++After this the configuration looks like (only relevant parts shown):
++
++FB0 +-- GFX ---- LCD ---- LCD
++ \- VID1 ---- TV ---- TV
++
++Misc notes
++----------
++
++OMAP FB allocates the framebuffer memory using the OMAP VRAM allocator.
++
++Using DSI DPLL to generate pixel clock it is possible produce the pixel clock
++of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI.
++
++Rotation and mirroring currently only supports RGB565 and RGB8888 modes. VRFB
++does not support mirroring.
++
++VRFB rotation requires much more memory than non-rotated framebuffer, so you
++probably need to increase your vram setting before using VRFB rotation. Also,
++many applications may not work with VRFB if they do not pay attention to all
++framebuffer parameters.
++
++Kernel boot arguments
++---------------------
++
++vram=<size>
++ - Amount of total VRAM to preallocate. For example, "10M". omapfb
++ allocates memory for framebuffers from VRAM.
++
++omapfb.mode=<display>:<mode>[,...]
++ - Default video mode for specified displays. For example,
++ "dvi:800x400MR-24@60". See drivers/video/modedb.c.
++ There are also two special modes: "pal" and "ntsc" that
++ can be used to tv out.
++
++omapfb.vram=<fbnum>:<size>[@<physaddr>][,...]
++ - VRAM allocated for a framebuffer. Normally omapfb allocates vram
++ depending on the display size. With this you can manually allocate
++ more or define the physical address of each framebuffer. For example,
++ "1:4M" to allocate 4M for fb1.
++
++omapfb.debug=<y|n>
++ - Enable debug printing. You have to have OMAPFB debug support enabled
++ in kernel config.
++
++omapfb.test=<y|n>
++ - Draw test pattern to framebuffer whenever framebuffer settings change.
++ You need to have OMAPFB debug support enabled in kernel config.
++
++omapfb.vrfb=<y|n>
++ - Use VRFB rotation for all framebuffers.
++
++omapfb.rotate=<angle>
++ - Default rotation applied to all framebuffers.
++ 0 - 0 degree rotation
++ 1 - 90 degree rotation
++ 2 - 180 degree rotation
++ 3 - 270 degree rotation
++
++omapfb.mirror=<y|n>
++ - Default mirror for all framebuffers. Only works with DMA rotation.
++
++omapdss.def_disp=<display>
++ - Name of default display, to which all overlays will be connected.
++ Common examples are "lcd" or "tv".
++
++omapdss.debug=<y|n>
++ - Enable debug printing. You have to have DSS debug support enabled in
++ kernel config.
++
++TODO
++----
++
++DSS locking
++
++Error checking
++- Lots of checks are missing or implemented just as BUG()
++
++System DMA update for DSI
++- Can be used for RGB16 and RGB24P modes. Probably not for RGB24U (how
++ to skip the empty byte?)
++
++OMAP1 support
++- Not sure if needed
++
+diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
+index 3ebc09e..e6146b2 100644
+--- a/arch/arm/plat-omap/Makefile
++++ b/arch/arm/plat-omap/Makefile
+@@ -4,7 +4,7 @@
+
+ # Common support
+ obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \
+- usb.o fb.o io.o
++ usb.o fb.o vram.o vrfb.o io.o
+ obj-m :=
+ obj-n :=
+ obj- :=
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+new file mode 100644
+index 0000000..6288353
+--- /dev/null
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -0,0 +1,520 @@
++/*
++ * linux/include/asm-arm/arch-omap/display.h
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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, see <http://www.gnu.org/licenses/>.
++ */
++
++#ifndef __ASM_ARCH_OMAP_DISPLAY_H
++#define __ASM_ARCH_OMAP_DISPLAY_H
++
++#include <linux/list.h>
++#include <linux/kobject.h>
++#include <asm/atomic.h>
++
++#define DISPC_IRQ_FRAMEDONE (1 << 0)
++#define DISPC_IRQ_VSYNC (1 << 1)
++#define DISPC_IRQ_EVSYNC_EVEN (1 << 2)
++#define DISPC_IRQ_EVSYNC_ODD (1 << 3)
++#define DISPC_IRQ_ACBIAS_COUNT_STAT (1 << 4)
++#define DISPC_IRQ_PROG_LINE_NUM (1 << 5)
++#define DISPC_IRQ_GFX_FIFO_UNDERFLOW (1 << 6)
++#define DISPC_IRQ_GFX_END_WIN (1 << 7)
++#define DISPC_IRQ_PAL_GAMMA_MASK (1 << 8)
++#define DISPC_IRQ_OCP_ERR (1 << 9)
++#define DISPC_IRQ_VID1_FIFO_UNDERFLOW (1 << 10)
++#define DISPC_IRQ_VID1_END_WIN (1 << 11)
++#define DISPC_IRQ_VID2_FIFO_UNDERFLOW (1 << 12)
++#define DISPC_IRQ_VID2_END_WIN (1 << 13)
++#define DISPC_IRQ_SYNC_LOST (1 << 14)
++#define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15)
++#define DISPC_IRQ_WAKEUP (1 << 16)
++
++enum omap_display_type {
++ OMAP_DISPLAY_TYPE_NONE = 0,
++ OMAP_DISPLAY_TYPE_DPI = 1 << 0,
++ OMAP_DISPLAY_TYPE_DBI = 1 << 1,
++ OMAP_DISPLAY_TYPE_SDI = 1 << 2,
++ OMAP_DISPLAY_TYPE_DSI = 1 << 3,
++ OMAP_DISPLAY_TYPE_VENC = 1 << 4,
++};
++
++enum omap_plane {
++ OMAP_DSS_GFX = 0,
++ OMAP_DSS_VIDEO1 = 1,
++ OMAP_DSS_VIDEO2 = 2
++};
++
++enum omap_channel {
++ OMAP_DSS_CHANNEL_LCD = 0,
++ OMAP_DSS_CHANNEL_DIGIT = 1,
++};
++
++enum omap_color_mode {
++ OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */
++ OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */
++ OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */
++ OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */
++ OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */
++ OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */
++ OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */
++ OMAP_DSS_COLOR_RGB24U = 1 << 7, /* RGB24, 32-bit container */
++ OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24, 24-bit container */
++ OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */
++ OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */
++ OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */
++ OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */
++ OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */
++
++ OMAP_DSS_COLOR_GFX_OMAP3 =
++ OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
++ OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 |
++ OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 |
++ OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
++ OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 |
++ OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32,
++
++ OMAP_DSS_COLOR_VID_OMAP3 =
++ OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 |
++ OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
++ OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 |
++ OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32 |
++ OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY,
++};
++
++enum omap_lcd_display_type {
++ OMAP_DSS_LCD_DISPLAY_STN,
++ OMAP_DSS_LCD_DISPLAY_TFT,
++};
++
++enum omap_dss_load_mode {
++ OMAP_DSS_LOAD_CLUT_AND_FRAME = 0,
++ OMAP_DSS_LOAD_CLUT_ONLY = 1,
++ OMAP_DSS_LOAD_FRAME_ONLY = 2,
++ OMAP_DSS_LOAD_CLUT_ONCE_FRAME = 3,
++};
++
++enum omap_dss_color_key_type {
++ OMAP_DSS_COLOR_KEY_GFX_DST = 0,
++ OMAP_DSS_COLOR_KEY_VID_SRC = 1,
++};
++
++enum omap_rfbi_te_mode {
++ OMAP_DSS_RFBI_TE_MODE_1 = 1,
++ OMAP_DSS_RFBI_TE_MODE_2 = 2,
++};
++
++enum omap_panel_config {
++ OMAP_DSS_LCD_IVS = 1<<0,
++ OMAP_DSS_LCD_IHS = 1<<1,
++ OMAP_DSS_LCD_IPC = 1<<2,
++ OMAP_DSS_LCD_IEO = 1<<3,
++ OMAP_DSS_LCD_RF = 1<<4,
++ OMAP_DSS_LCD_ONOFF = 1<<5,
++
++ OMAP_DSS_LCD_TFT = 1<<20,
++};
++
++enum omap_dss_venc_type {
++ OMAP_DSS_VENC_TYPE_COMPOSITE,
++ OMAP_DSS_VENC_TYPE_SVIDEO,
++};
++
++struct omap_display;
++struct omap_panel;
++struct omap_ctrl;
++
++/* RFBI */
++
++struct rfbi_timings {
++ int cs_on_time;
++ int cs_off_time;
++ int we_on_time;
++ int we_off_time;
++ int re_on_time;
++ int re_off_time;
++ int we_cycle_time;
++ int re_cycle_time;
++ int cs_pulse_width;
++ int access_time;
++
++ int clk_div;
++
++ u32 tim[5]; /* set by rfbi_convert_timings() */
++
++ int converted;
++};
++
++void omap_rfbi_write_command(const void *buf, u32 len);
++void omap_rfbi_read_data(void *buf, u32 len);
++void omap_rfbi_write_data(const void *buf, u32 len);
++void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
++ u16 x, u16 y,
++ u16 w, u16 h);
++int omap_rfbi_enable_te(bool enable, unsigned line);
++int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
++ unsigned hs_pulse_time, unsigned vs_pulse_time,
++ int hs_pol_inv, int vs_pol_inv, int extif_div);
++
++/* DSI */
++int dsi_vc_dcs_write(int channel, u8 *data, int len);
++int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len);
++int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen);
++int dsi_vc_set_max_rx_packet_size(int channel, u16 len);
++int dsi_vc_send_null(int channel);
++
++/* Board specific data */
++struct omap_dss_display_config {
++ enum omap_display_type type;
++
++ union {
++ struct {
++ u8 data_lines;
++ } dpi;
++
++ struct {
++ u8 channel;
++ u8 data_lines;
++ } rfbi;
++
++ struct {
++ u8 datapairs;
++ } sdi;
++
++ struct {
++ u8 clk_lane;
++ u8 clk_pol;
++ u8 data1_lane;
++ u8 data1_pol;
++ u8 data2_lane;
++ u8 data2_pol;
++ unsigned long ddr_clk_hz;
++ } dsi;
++
++ struct {
++ enum omap_dss_venc_type type;
++ } venc;
++ } u;
++
++ int panel_reset_gpio;
++ int ctrl_reset_gpio;
++
++ const char *name; /* for debug */
++ const char *ctrl_name;
++ const char *panel_name;
++
++ void *panel_data;
++ void *ctrl_data;
++
++ /* platform specific enable/disable */
++ int (*panel_enable)(struct omap_display *display);
++ void (*panel_disable)(struct omap_display *display);
++ int (*ctrl_enable)(struct omap_display *display);
++ void (*ctrl_disable)(struct omap_display *display);
++ int (*set_backlight)(struct omap_display *display,
++ int level);
++};
++
++struct device;
++
++/* Board specific data */
++struct omap_dss_board_info {
++ unsigned (*get_last_off_on_transaction_id)(struct device *dev);
++ int (*dsi_power_up)(void);
++ void (*dsi_power_down)(void);
++ int num_displays;
++ struct omap_dss_display_config *displays[];
++};
++
++struct omap_ctrl {
++ struct module *owner;
++
++ const char *name;
++
++ int (*init)(struct omap_display *display);
++ void (*cleanup)(struct omap_display *display);
++ int (*enable)(struct omap_display *display);
++ void (*disable)(struct omap_display *display);
++ int (*suspend)(struct omap_display *display);
++ int (*resume)(struct omap_display *display);
++ void (*setup_update)(struct omap_display *display,
++ u16 x, u16 y, u16 w, u16 h);
++
++ int (*enable_te)(struct omap_display *display, bool enable);
++
++ u8 (*get_rotate)(struct omap_display *display);
++ int (*set_rotate)(struct omap_display *display, u8 rotate);
++
++ bool (*get_mirror)(struct omap_display *display);
++ int (*set_mirror)(struct omap_display *display, bool enable);
++
++ int (*run_test)(struct omap_display *display, int test);
++ int (*memory_read)(struct omap_display *display,
++ void *buf, size_t size,
++ u16 x, u16 y, u16 w, u16 h);
++
++ u8 pixel_size;
++
++ struct rfbi_timings timings;
++
++ void *priv;
++};
++
++struct omap_video_timings {
++ /* Unit: pixels */
++ u16 x_res;
++ /* Unit: pixels */
++ u16 y_res;
++ /* Unit: KHz */
++ u32 pixel_clock;
++ /* Unit: pixel clocks */
++ u16 hsw; /* Horizontal synchronization pulse width */
++ /* Unit: pixel clocks */
++ u16 hfp; /* Horizontal front porch */
++ /* Unit: pixel clocks */
++ u16 hbp; /* Horizontal back porch */
++ /* Unit: line clocks */
++ u16 vsw; /* Vertical synchronization pulse width */
++ /* Unit: line clocks */
++ u16 vfp; /* Vertical front porch */
++ /* Unit: line clocks */
++ u16 vbp; /* Vertical back porch */
++
++};
++
++#ifdef CONFIG_OMAP2_DSS_VENC
++/* Hardcoded timings for tv modes. Venc only uses these to
++ * identify the mode, and does not actually use the configs
++ * itself. However, the configs should be something that
++ * a normal monitor can also show */
++const extern struct omap_video_timings omap_dss_pal_timings;
++const extern struct omap_video_timings omap_dss_ntsc_timings;
++#endif
++
++struct omap_panel {
++ struct module *owner;
++
++ const char *name;
++
++ int (*init)(struct omap_display *display);
++ void (*cleanup)(struct omap_display *display);
++ int (*remove)(struct omap_display *display);
++ int (*enable)(struct omap_display *display);
++ void (*disable)(struct omap_display *display);
++ int (*suspend)(struct omap_display *display);
++ int (*resume)(struct omap_display *display);
++ int (*run_test)(struct omap_display *display, int test);
++
++ struct omap_video_timings timings;
++
++ int acbi; /* ac-bias pin transitions per interrupt */
++ /* Unit: line clocks */
++ int acb; /* ac-bias pin frequency */
++
++ enum omap_panel_config config;
++
++ u8 recommended_bpp;
++
++ void *priv;
++};
++
++/* XXX perhaps this should be removed */
++enum omap_dss_overlay_managers {
++ OMAP_DSS_OVL_MGR_LCD,
++ OMAP_DSS_OVL_MGR_TV,
++};
++
++struct omap_overlay_manager;
++
++struct omap_overlay_info {
++ bool enabled;
++
++ u32 paddr;
++ void __iomem *vaddr;
++ u16 screen_width;
++ u16 width;
++ u16 height;
++ enum omap_color_mode color_mode;
++ u8 rotation;
++ bool mirror;
++
++ u16 pos_x;
++ u16 pos_y;
++ u16 out_width; /* if 0, out_width == width */
++ u16 out_height; /* if 0, out_height == height */
++};
++
++enum omap_overlay_caps {
++ OMAP_DSS_OVL_CAP_SCALE = 1 << 0,
++ OMAP_DSS_OVL_CAP_DISPC = 1 << 1,
++};
++
++struct omap_overlay {
++ struct kobject kobj;
++ struct list_head list;
++
++ const char *name;
++ int id;
++ struct omap_overlay_manager *manager;
++ enum omap_color_mode supported_modes;
++ struct omap_overlay_info info;
++ enum omap_overlay_caps caps;
++
++ int (*set_manager)(struct omap_overlay *ovl,
++ struct omap_overlay_manager *mgr);
++ int (*unset_manager)(struct omap_overlay *ovl);
++
++ int (*set_overlay_info)(struct omap_overlay *ovl,
++ struct omap_overlay_info *info);
++ void (*get_overlay_info)(struct omap_overlay *ovl,
++ struct omap_overlay_info *info);
++};
++
++enum omap_overlay_manager_caps {
++ OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0,
++};
++
++struct omap_overlay_manager {
++ struct kobject kobj;
++ struct list_head list;
++
++ const char *name;
++ int id;
++ enum omap_overlay_manager_caps caps;
++ struct omap_display *display;
++ int num_overlays;
++ struct omap_overlay **overlays;
++ enum omap_display_type supported_displays;
++
++ int (*set_display)(struct omap_overlay_manager *mgr,
++ struct omap_display *display);
++ int (*unset_display)(struct omap_overlay_manager *mgr);
++
++ int (*apply)(struct omap_overlay_manager *mgr);
++
++ void (*set_default_color)(struct omap_overlay_manager *mgr, u32 color);
++ void (*set_trans_key)(struct omap_overlay_manager *mgr,
++ enum omap_dss_color_key_type type,
++ u32 trans_key);
++ void (*enable_trans_key)(struct omap_overlay_manager *mgr,
++ bool enable);
++};
++
++enum omap_display_caps {
++ OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0,
++};
++
++enum omap_dss_update_mode {
++ OMAP_DSS_UPDATE_DISABLED = 0,
++ OMAP_DSS_UPDATE_AUTO,
++ OMAP_DSS_UPDATE_MANUAL,
++};
++
++enum omap_dss_display_state {
++ OMAP_DSS_DISPLAY_DISABLED = 0,
++ OMAP_DSS_DISPLAY_ACTIVE,
++ OMAP_DSS_DISPLAY_SUSPENDED,
++};
++
++struct omap_display {
++ struct kobject kobj;
++ struct list_head list;
++
++ /*atomic_t ref_count;*/
++ int ref_count;
++ /* helper variable for driver suspend/resume */
++ int activate_after_resume;
++
++ enum omap_display_type type;
++ const char *name;
++
++ enum omap_display_caps caps;
++
++ struct omap_overlay_manager *manager;
++
++ enum omap_dss_display_state state;
++
++ struct omap_dss_display_config hw_config; /* board specific data */
++ struct omap_ctrl *ctrl; /* static common data */
++ struct omap_panel *panel; /* static common data */
++
++ int (*enable)(struct omap_display *display);
++ void (*disable)(struct omap_display *display);
++
++ int (*suspend)(struct omap_display *display);
++ int (*resume)(struct omap_display *display);
++
++ void (*get_resolution)(struct omap_display *display,
++ u16 *xres, u16 *yres);
++ int (*get_recommended_bpp)(struct omap_display *display);
++
++ int (*check_timings)(struct omap_display *display,
++ struct omap_video_timings *timings);
++ void (*set_timings)(struct omap_display *display,
++ struct omap_video_timings *timings);
++ void (*get_timings)(struct omap_display *display,
++ struct omap_video_timings *timings);
++ int (*update)(struct omap_display *display,
++ u16 x, u16 y, u16 w, u16 h);
++ int (*sync)(struct omap_display *display);
++ int (*wait_vsync)(struct omap_display *display);
++
++ int (*set_update_mode)(struct omap_display *display,
++ enum omap_dss_update_mode);
++ enum omap_dss_update_mode (*get_update_mode)
++ (struct omap_display *display);
++
++ int (*enable_te)(struct omap_display *display, bool enable);
++ int (*get_te)(struct omap_display *display);
++
++ u8 (*get_rotate)(struct omap_display *display);
++ int (*set_rotate)(struct omap_display *display, u8 rotate);
++
++ bool (*get_mirror)(struct omap_display *display);
++ int (*set_mirror)(struct omap_display *display, bool enable);
++
++ int (*run_test)(struct omap_display *display, int test);
++ int (*memory_read)(struct omap_display *display,
++ void *buf, size_t size,
++ u16 x, u16 y, u16 w, u16 h);
++
++ void (*configure_overlay)(struct omap_overlay *overlay);
++};
++
++int omap_dss_get_num_displays(void);
++struct omap_display *omap_dss_get_display(int no);
++void omap_dss_put_display(struct omap_display *display);
++
++void omap_dss_register_ctrl(struct omap_ctrl *ctrl);
++void omap_dss_unregister_ctrl(struct omap_ctrl *ctrl);
++
++void omap_dss_register_panel(struct omap_panel *panel);
++void omap_dss_unregister_panel(struct omap_panel *panel);
++
++int omap_dss_get_num_overlay_managers(void);
++struct omap_overlay_manager *omap_dss_get_overlay_manager(int num);
++
++int omap_dss_get_num_overlays(void);
++struct omap_overlay *omap_dss_get_overlay(int num);
++
++typedef void (*omap_dispc_isr_t) (void *arg, u32 mask);
++int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
++int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
++
++int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout);
++int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
++ unsigned long timeout);
++
++#endif
+diff --git a/arch/arm/plat-omap/include/mach/vram.h b/arch/arm/plat-omap/include/mach/vram.h
+new file mode 100644
+index 0000000..f176562
+--- /dev/null
++++ b/arch/arm/plat-omap/include/mach/vram.h
+@@ -0,0 +1,33 @@
++/*
++ * File: arch/arm/plat-omap/include/mach/vram.h
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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 __OMAPVRAM_H
++#define __OMAPVRAM_H
++
++#include <asm/types.h>
++
++extern int omap_vram_free(unsigned long paddr, size_t size);
++extern int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr);
++extern int omap_vram_reserve(unsigned long paddr, size_t size);
++extern void omap2_set_sdram_vram(u32 size, u32 start);
++extern void omap2_set_sram_vram(u32 size, u32 start);
++
++#endif
+diff --git a/arch/arm/plat-omap/include/mach/vrfb.h b/arch/arm/plat-omap/include/mach/vrfb.h
+new file mode 100644
+index 0000000..2047862
+--- /dev/null
++++ b/arch/arm/plat-omap/include/mach/vrfb.h
+@@ -0,0 +1,47 @@
++/*
++ * File: arch/arm/plat-omap/include/mach/vrfb.h
++ *
++ * VRFB
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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 __VRFB_H
++#define __VRFB_H
++
++#define OMAP_VRFB_LINE_LEN 2048
++
++struct vrfb
++{
++ u8 context;
++ void __iomem *vaddr[4];
++ unsigned long paddr[4];
++ u16 xoffset;
++ u16 yoffset;
++ u8 bytespp;
++};
++
++extern int omap_vrfb_request_ctx(struct vrfb *vrfb);
++extern void omap_vrfb_release_ctx(struct vrfb *vrfb);
++extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
++ u8 bytespp);
++extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
++ u16 width, u16 height,
++ u8 bytespp);
++
++#endif /* __VRFB_H */
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+new file mode 100644
+index 0000000..f24a110
+--- /dev/null
++++ b/arch/arm/plat-omap/vram.c
+@@ -0,0 +1,615 @@
++/*
++ * linux/arch/arm/plat-omap/vram.c
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++/*#define DEBUG*/
++
++#include <linux/vmalloc.h>
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/list.h>
++#include <linux/dma-mapping.h>
++#include <linux/proc_fs.h>
++#include <linux/seq_file.h>
++#include <linux/bootmem.h>
++#include <linux/omapfb.h>
++
++#include <asm/setup.h>
++
++#include <mach/sram.h>
++#include <mach/vram.h>
++
++#ifdef DEBUG
++#define DBG(format, ...) printk(KERN_DEBUG "VRAM: " format, ## __VA_ARGS__)
++#else
++#define DBG(format, ...)
++#endif
++
++#define OMAP2_SRAM_START 0x40200000
++/* Maximum size, in reality this is smaller if SRAM is partially locked. */
++#define OMAP2_SRAM_SIZE 0xa0000 /* 640k */
++
++#define REG_MAP_SIZE(_page_cnt) \
++ ((_page_cnt + (sizeof(unsigned long) * 8) - 1) / 8)
++#define REG_MAP_PTR(_rg, _page_nr) \
++ (((_rg)->map) + (_page_nr) / (sizeof(unsigned long) * 8))
++#define REG_MAP_MASK(_page_nr) \
++ (1 << ((_page_nr) & (sizeof(unsigned long) * 8 - 1)))
++
++#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
++
++/* postponed regions are used to temporarily store region information at boot
++ * time when we cannot yet allocate the region list */
++#define MAX_POSTPONED_REGIONS 10
++
++static int postponed_cnt __initdata;
++static struct {
++ unsigned long paddr;
++ size_t size;
++} postponed_regions[MAX_POSTPONED_REGIONS] __initdata;
++
++struct vram_alloc {
++ struct list_head list;
++ unsigned long paddr;
++ unsigned pages;
++};
++
++struct vram_region {
++ struct list_head list;
++ struct list_head alloc_list;
++ unsigned long paddr;
++ unsigned pages;
++};
++
++static DEFINE_MUTEX(region_mutex);
++static LIST_HEAD(region_list);
++
++static inline int region_mem_type(unsigned long paddr)
++{
++ if (paddr >= OMAP2_SRAM_START &&
++ paddr < OMAP2_SRAM_START + OMAP2_SRAM_SIZE)
++ return OMAPFB_MEMTYPE_SRAM;
++ else
++ return OMAPFB_MEMTYPE_SDRAM;
++}
++
++static struct vram_region *omap_vram_create_region(unsigned long paddr,
++ unsigned pages)
++{
++ struct vram_region *rm;
++
++ rm = kzalloc(sizeof(*rm), GFP_KERNEL);
++
++ if (rm) {
++ INIT_LIST_HEAD(&rm->alloc_list);
++ rm->paddr = paddr;
++ rm->pages = pages;
++ }
++
++ return rm;
++}
++
++#if 0
++static void omap_vram_free_region(struct vram_region *vr)
++{
++ list_del(&vr->list);
++ kfree(vr);
++}
++#endif
++
++static struct vram_alloc *omap_vram_create_allocation(struct vram_region *vr,
++ unsigned long paddr, unsigned pages)
++{
++ struct vram_alloc *va;
++ struct vram_alloc *new;
++
++ new = kzalloc(sizeof(*va), GFP_KERNEL);
++
++ if (!new)
++ return NULL;
++
++ new->paddr = paddr;
++ new->pages = pages;
++
++ list_for_each_entry(va, &vr->alloc_list, list) {
++ if (va->paddr > new->paddr)
++ break;
++ }
++
++ list_add_tail(&new->list, &va->list);
++
++ return new;
++}
++
++static void omap_vram_free_allocation(struct vram_alloc *va)
++{
++ list_del(&va->list);
++ kfree(va);
++}
++
++static __init int omap_vram_add_region_postponed(unsigned long paddr,
++ size_t size)
++{
++ if (postponed_cnt == MAX_POSTPONED_REGIONS)
++ return -ENOMEM;
++
++ postponed_regions[postponed_cnt].paddr = paddr;
++ postponed_regions[postponed_cnt].size = size;
++
++ ++postponed_cnt;
++
++ return 0;
++}
++
++/* add/remove_region can be exported if there's need to add/remove regions
++ * runtime */
++static int omap_vram_add_region(unsigned long paddr, size_t size)
++{
++ struct vram_region *rm;
++ unsigned pages;
++
++ DBG("adding region paddr %08lx size %d\n",
++ paddr, size);
++
++ size &= PAGE_MASK;
++ pages = size >> PAGE_SHIFT;
++
++ rm = omap_vram_create_region(paddr, pages);
++ if (rm == NULL)
++ return -ENOMEM;
++
++ list_add(&rm->list, &region_list);
++
++ return 0;
++}
++
++int omap_vram_free(unsigned long paddr, size_t size)
++{
++ struct vram_region *rm;
++ struct vram_alloc *alloc;
++ unsigned start, end;
++
++ DBG("free mem paddr %08lx size %d\n", paddr, size);
++
++ size = PAGE_ALIGN(size);
++
++ mutex_lock(&region_mutex);
++
++ list_for_each_entry(rm, &region_list, list) {
++ list_for_each_entry(alloc, &rm->alloc_list, list) {
++ start = alloc->paddr;
++ end = alloc->paddr + (alloc->pages >> PAGE_SHIFT);
++
++ if (start >= paddr && end < paddr + size)
++ goto found;
++ }
++ }
++
++ mutex_unlock(&region_mutex);
++ return -EINVAL;
++
++found:
++ omap_vram_free_allocation(alloc);
++
++ mutex_unlock(&region_mutex);
++ return 0;
++}
++EXPORT_SYMBOL(omap_vram_free);
++
++static int _omap_vram_reserve(unsigned long paddr, unsigned pages)
++{
++ struct vram_region *rm;
++ struct vram_alloc *alloc;
++ size_t size;
++
++ size = pages << PAGE_SHIFT;
++
++ list_for_each_entry(rm, &region_list, list) {
++ unsigned long start, end;
++
++ DBG("checking region %lx %d\n", rm->paddr, rm->pages);
++
++ if (region_mem_type(rm->paddr) != region_mem_type(paddr))
++ continue;
++
++ start = rm->paddr;
++ end = start + (rm->pages << PAGE_SHIFT) - 1;
++ if (start > paddr || end < paddr + size - 1)
++ continue;
++
++ DBG("block ok, checking allocs\n");
++
++ list_for_each_entry(alloc, &rm->alloc_list, list) {
++ end = alloc->paddr - 1;
++
++ if (start <= paddr && end >= paddr + size - 1)
++ goto found;
++
++ start = alloc->paddr + (alloc->pages << PAGE_SHIFT);
++ }
++
++ end = rm->paddr + (rm->pages << PAGE_SHIFT) - 1;
++
++ if (!(start <= paddr && end >= paddr + size - 1))
++ continue;
++found:
++ DBG("FOUND area start %lx, end %lx\n", start, end);
++
++ if (omap_vram_create_allocation(rm, paddr, pages) == NULL)
++ return -ENOMEM;
++
++ return 0;
++ }
++
++ return -ENOMEM;
++}
++
++int omap_vram_reserve(unsigned long paddr, size_t size)
++{
++ unsigned pages;
++ int r;
++
++ DBG("reserve mem paddr %08lx size %d\n", paddr, size);
++
++ size = PAGE_ALIGN(size);
++ pages = size >> PAGE_SHIFT;
++
++ mutex_lock(&region_mutex);
++
++ r = _omap_vram_reserve(paddr, pages);
++
++ mutex_unlock(&region_mutex);
++
++ return r;
++}
++EXPORT_SYMBOL(omap_vram_reserve);
++
++static int _omap_vram_alloc(int mtype, unsigned pages, unsigned long *paddr)
++{
++ struct vram_region *rm;
++ struct vram_alloc *alloc;
++
++ list_for_each_entry(rm, &region_list, list) {
++ unsigned long start, end;
++
++ DBG("checking region %lx %d\n", rm->paddr, rm->pages);
++
++ if (region_mem_type(rm->paddr) != mtype)
++ continue;
++
++ start = rm->paddr;
++
++ list_for_each_entry(alloc, &rm->alloc_list, list) {
++ end = alloc->paddr;
++
++ if (end - start >= pages << PAGE_SHIFT)
++ goto found;
++
++ start = alloc->paddr + (alloc->pages << PAGE_SHIFT);
++ }
++
++ end = rm->paddr + (rm->pages << PAGE_SHIFT);
++found:
++ if (end - start < pages << PAGE_SHIFT)
++ continue;
++
++ DBG("FOUND %lx, end %lx\n", start, end);
++
++ alloc = omap_vram_create_allocation(rm, start, pages);
++ if (alloc == NULL)
++ return -ENOMEM;
++
++ *paddr = start;
++
++ return 0;
++ }
++
++ return -ENOMEM;
++}
++
++int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr)
++{
++ unsigned pages;
++ int r;
++
++ BUG_ON(mtype > OMAPFB_MEMTYPE_MAX || !size);
++
++ DBG("alloc mem type %d size %d\n", mtype, size);
++
++ size = PAGE_ALIGN(size);
++ pages = size >> PAGE_SHIFT;
++
++ mutex_lock(&region_mutex);
++
++ r = _omap_vram_alloc(mtype, pages, paddr);
++
++ mutex_unlock(&region_mutex);
++
++ return r;
++}
++EXPORT_SYMBOL(omap_vram_alloc);
++
++#ifdef CONFIG_PROC_FS
++static void *r_next(struct seq_file *m, void *v, loff_t *pos)
++{
++ struct list_head *l = v;
++
++ (*pos)++;
++
++ if (list_is_last(l, &region_list))
++ return NULL;
++
++ return l->next;
++}
++
++static void *r_start(struct seq_file *m, loff_t *pos)
++{
++ loff_t p = *pos;
++ struct list_head *l = &region_list;
++
++ mutex_lock(&region_mutex);
++
++ do {
++ l = l->next;
++ if (l == &region_list)
++ return NULL;
++ } while (p--);
++
++ return l;
++}
++
++static void r_stop(struct seq_file *m, void *v)
++{
++ mutex_unlock(&region_mutex);
++}
++
++static int r_show(struct seq_file *m, void *v)
++{
++ struct vram_region *vr;
++ struct vram_alloc *va;
++ unsigned size;
++
++ vr = list_entry(v, struct vram_region, list);
++
++ size = vr->pages << PAGE_SHIFT;
++
++ seq_printf(m, "%08lx-%08lx (%d bytes)\n",
++ vr->paddr, vr->paddr + size - 1,
++ size);
++
++ list_for_each_entry(va, &vr->alloc_list, list) {
++ size = va->pages << PAGE_SHIFT;
++ seq_printf(m, " %08lx-%08lx (%d bytes)\n",
++ va->paddr, va->paddr + size - 1,
++ size);
++ }
++
++
++
++ return 0;
++}
++
++static const struct seq_operations resource_op = {
++ .start = r_start,
++ .next = r_next,
++ .stop = r_stop,
++ .show = r_show,
++};
++
++static int vram_open(struct inode *inode, struct file *file)
++{
++ return seq_open(file, &resource_op);
++}
++
++static const struct file_operations proc_vram_operations = {
++ .open = vram_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = seq_release,
++};
++
++static int __init omap_vram_create_proc(void)
++{
++ proc_create("omap-vram", 0, NULL, &proc_vram_operations);
++
++ return 0;
++}
++#endif
++
++static __init int omap_vram_init(void)
++{
++ int i, r;
++
++ for (i = 0; i < postponed_cnt; i++)
++ omap_vram_add_region(postponed_regions[i].paddr,
++ postponed_regions[i].size);
++
++#ifdef CONFIG_PROC_FS
++ r = omap_vram_create_proc();
++ if (r)
++ return -ENOMEM;
++#endif
++
++ return 0;
++}
++
++arch_initcall(omap_vram_init);
++
++/* boottime vram alloc stuff */
++
++/* set from board file */
++static u32 omapfb_sram_vram_start __initdata;
++static u32 omapfb_sram_vram_size __initdata;
++
++/* set from board file */
++static u32 omapfb_sdram_vram_start __initdata;
++static u32 omapfb_sdram_vram_size __initdata;
++
++/* set from kernel cmdline */
++static u32 omapfb_def_sdram_vram_size __initdata;
++static u32 omapfb_def_sdram_vram_start __initdata;
++
++static void __init omapfb_early_vram(char **p)
++{
++ omapfb_def_sdram_vram_size = memparse(*p, p);
++ if (**p == ',')
++ omapfb_def_sdram_vram_start = simple_strtoul((*p) + 1, p, 16);
++
++ printk("omapfb_early_vram, %d, 0x%x\n",
++ omapfb_def_sdram_vram_size,
++ omapfb_def_sdram_vram_start);
++}
++__early_param("vram=", omapfb_early_vram);
++
++/*
++ * Called from map_io. We need to call to this early enough so that we
++ * can reserve the fixed SDRAM regions before VM could get hold of them.
++ */
++void __init omapfb_reserve_sdram(void)
++{
++ struct bootmem_data *bdata;
++ unsigned long sdram_start, sdram_size;
++ u32 paddr;
++ u32 size = 0;
++
++ /* cmdline arg overrides the board file definition */
++ if (omapfb_def_sdram_vram_size) {
++ size = omapfb_def_sdram_vram_size;
++ paddr = omapfb_def_sdram_vram_start;
++ }
++
++ if (!size) {
++ size = omapfb_sdram_vram_size;
++ paddr = omapfb_sdram_vram_start;
++ }
++
++#ifdef CONFIG_OMAP2_DSS_VRAM_SIZE
++ if (!size) {
++ size = CONFIG_OMAP2_DSS_VRAM_SIZE * 1024 * 1024;
++ paddr = 0;
++ }
++#endif
++
++ if (!size)
++ return;
++
++ size = PAGE_ALIGN(size);
++
++ bdata = NODE_DATA(0)->bdata;
++ sdram_start = bdata->node_min_pfn << PAGE_SHIFT;
++ sdram_size = (bdata->node_low_pfn << PAGE_SHIFT) - sdram_start;
++
++ if (paddr) {
++ if ((paddr & ~PAGE_MASK) || paddr < sdram_start ||
++ paddr + size > sdram_start + sdram_size) {
++ printk(KERN_ERR "Illegal SDRAM region for VRAM\n");
++ return;
++ }
++
++ reserve_bootmem(paddr, size, BOOTMEM_DEFAULT);
++ } else {
++ if (size > sdram_size) {
++ printk(KERN_ERR "Illegal SDRAM size for VRAM\n");
++ return;
++ }
++
++ paddr = virt_to_phys(alloc_bootmem_pages(size));
++ BUG_ON(paddr & ~PAGE_MASK);
++ }
++
++ omap_vram_add_region_postponed(paddr, size);
++
++ pr_info("Reserving %u bytes SDRAM for VRAM\n", size);
++}
++
++/*
++ * Called at sram init time, before anything is pushed to the SRAM stack.
++ * Because of the stack scheme, we will allocate everything from the
++ * start of the lowest address region to the end of SRAM. This will also
++ * include padding for page alignment and possible holes between regions.
++ *
++ * As opposed to the SDRAM case, we'll also do any dynamic allocations at
++ * this point, since the driver built as a module would have problem with
++ * freeing / reallocating the regions.
++ */
++unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
++ unsigned long sram_vstart,
++ unsigned long sram_size,
++ unsigned long pstart_avail,
++ unsigned long size_avail)
++{
++ unsigned long pend_avail;
++ unsigned long reserved;
++ u32 paddr;
++ u32 size;
++
++ paddr = omapfb_sram_vram_start;
++ size = omapfb_sram_vram_size;
++
++ if (!size)
++ return 0;
++
++ reserved = 0;
++ pend_avail = pstart_avail + size_avail;
++
++ if (!paddr) {
++ /* Dynamic allocation */
++ if ((size_avail & PAGE_MASK) < size) {
++ printk(KERN_ERR "Not enough SRAM for VRAM\n");
++ return 0;
++ }
++ size_avail = (size_avail - size) & PAGE_MASK;
++ paddr = pstart_avail + size_avail;
++ }
++
++ if (paddr < sram_pstart ||
++ paddr + size > sram_pstart + sram_size) {
++ printk(KERN_ERR "Illegal SRAM region for VRAM\n");
++ return 0;
++ }
++
++ /* Reserve everything above the start of the region. */
++ if (pend_avail - paddr > reserved)
++ reserved = pend_avail - paddr;
++ size_avail = pend_avail - reserved - pstart_avail;
++
++ omap_vram_add_region_postponed(paddr, size);
++
++ if (reserved)
++ pr_info("Reserving %lu bytes SRAM for VRAM\n", reserved);
++
++ return reserved;
++}
++
++void __init omap2_set_sdram_vram(u32 size, u32 start)
++{
++ omapfb_sdram_vram_start = start;
++ omapfb_sdram_vram_size = size;
++}
++
++void __init omap2_set_sram_vram(u32 size, u32 start)
++{
++ omapfb_sram_vram_start = start;
++ omapfb_sram_vram_size = size;
++}
++
++#endif
++
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+new file mode 100644
+index 0000000..7e0f8fc
+--- /dev/null
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -0,0 +1,159 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/ioport.h>
++#include <asm/io.h>
++
++#include <mach/io.h>
++#include <mach/vrfb.h>
++
++/*#define DEBUG*/
++
++#ifdef DEBUG
++#define DBG(format, ...) printk(KERN_DEBUG "VRFB: " format, ## __VA_ARGS__)
++#else
++#define DBG(format, ...)
++#endif
++
++#define SMS_ROT_VIRT_BASE(context, rot) \
++ (((context >= 4) ? 0xD0000000 : 0x70000000) \
++ | 0x4000000 * (context) \
++ | 0x1000000 * (rot))
++
++#define OMAP_VRFB_SIZE (2048 * 2048 * 4)
++
++#define VRFB_PAGE_WIDTH_EXP 5 /* Assuming SDRAM pagesize= 1024 */
++#define VRFB_PAGE_HEIGHT_EXP 5 /* 1024 = 2^5 * 2^5 */
++#define VRFB_PAGE_WIDTH (1 << VRFB_PAGE_WIDTH_EXP)
++#define VRFB_PAGE_HEIGHT (1 << VRFB_PAGE_HEIGHT_EXP)
++#define SMS_IMAGEHEIGHT_OFFSET 16
++#define SMS_IMAGEWIDTH_OFFSET 0
++#define SMS_PH_OFFSET 8
++#define SMS_PW_OFFSET 4
++#define SMS_PS_OFFSET 0
++
++#define OMAP_SMS_BASE 0x6C000000
++#define SMS_ROT_CONTROL(context) (OMAP_SMS_BASE + 0x180 + 0x10 * context)
++#define SMS_ROT_SIZE(context) (OMAP_SMS_BASE + 0x184 + 0x10 * context)
++#define SMS_ROT_PHYSICAL_BA(context) (OMAP_SMS_BASE + 0x188 + 0x10 * context)
++
++#define VRFB_NUM_CTXS 12
++/* bitmap of reserved contexts */
++static unsigned ctx_map;
++
++void omap_vrfb_adjust_size(u16 *width, u16 *height,
++ u8 bytespp)
++{
++ *width = ALIGN(*width * bytespp, VRFB_PAGE_WIDTH) / bytespp;
++ *height = ALIGN(*height, VRFB_PAGE_HEIGHT);
++}
++EXPORT_SYMBOL(omap_vrfb_adjust_size);
++
++void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
++ u16 width, u16 height,
++ u8 bytespp)
++{
++ unsigned pixel_size_exp;
++ u16 vrfb_width;
++ u16 vrfb_height;
++ u8 ctx = vrfb->context;
++
++ DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d)\n", ctx, paddr,
++ width, height, bytespp);
++
++ if (bytespp == 4)
++ pixel_size_exp = 2;
++ else if (bytespp == 2)
++ pixel_size_exp = 1;
++ else
++ BUG();
++
++ vrfb_width = ALIGN(width * bytespp, VRFB_PAGE_WIDTH) / bytespp;
++ vrfb_height = ALIGN(height, VRFB_PAGE_HEIGHT);
++
++ DBG("vrfb w %u, h %u\n", vrfb_width, vrfb_height);
++
++ omap_writel(paddr, SMS_ROT_PHYSICAL_BA(ctx));
++ omap_writel((vrfb_width << SMS_IMAGEWIDTH_OFFSET) |
++ (vrfb_height << SMS_IMAGEHEIGHT_OFFSET),
++ SMS_ROT_SIZE(ctx));
++
++ omap_writel(pixel_size_exp << SMS_PS_OFFSET |
++ VRFB_PAGE_WIDTH_EXP << SMS_PW_OFFSET |
++ VRFB_PAGE_HEIGHT_EXP << SMS_PH_OFFSET,
++ SMS_ROT_CONTROL(ctx));
++
++ DBG("vrfb offset pixels %d, %d\n",
++ vrfb_width - width, vrfb_height - height);
++
++ vrfb->xoffset = vrfb_width - width;
++ vrfb->yoffset = vrfb_height - height;
++ vrfb->bytespp = bytespp;
++}
++EXPORT_SYMBOL(omap_vrfb_setup);
++
++void omap_vrfb_release_ctx(struct vrfb *vrfb)
++{
++ int rot;
++
++ if (vrfb->context == 0xff)
++ return;
++
++ DBG("release ctx %d\n", vrfb->context);
++
++ ctx_map &= ~(1 << vrfb->context);
++
++ for (rot = 0; rot < 4; ++rot) {
++ if(vrfb->paddr[rot]) {
++ release_mem_region(vrfb->paddr[rot], OMAP_VRFB_SIZE);
++ vrfb->paddr[rot] = 0;
++ }
++ }
++
++ vrfb->context = 0xff;
++}
++EXPORT_SYMBOL(omap_vrfb_release_ctx);
++
++int omap_vrfb_request_ctx(struct vrfb *vrfb)
++{
++ int rot;
++ u32 paddr;
++ u8 ctx;
++
++ DBG("request ctx\n");
++
++ for (ctx = 0; ctx < VRFB_NUM_CTXS; ++ctx)
++ if ((ctx_map & (1 << ctx)) == 0)
++ break;
++
++ if (ctx == VRFB_NUM_CTXS) {
++ printk(KERN_ERR "vrfb: no free contexts\n");
++ return -EBUSY;
++ }
++
++ DBG("found free ctx %d\n", ctx);
++
++ ctx_map |= 1 << ctx;
++
++ memset(vrfb, 0, sizeof(*vrfb));
++
++ vrfb->context = ctx;
++
++ for (rot = 0; rot < 4; ++rot) {
++ paddr = SMS_ROT_VIRT_BASE(ctx, rot);
++ if (!request_mem_region(paddr, OMAP_VRFB_SIZE, "vrfb")) {
++ printk(KERN_ERR "vrfb: failed to reserve VRFB "
++ "area for ctx %d, rotation %d\n",
++ ctx, rot * 90);
++ omap_vrfb_release_ctx(vrfb);
++ return -ENOMEM;
++ }
++
++ vrfb->paddr[rot] = paddr;
++
++ DBG("VRFB %d/%d: %lx\n", ctx, rot*90, vrfb->paddr[rot]);
++ }
++
++ return 0;
++}
++EXPORT_SYMBOL(omap_vrfb_request_ctx);
++
+diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
+index fb19803..8b3752b 100644
+--- a/drivers/video/Kconfig
++++ b/drivers/video/Kconfig
+@@ -2132,6 +2132,7 @@ config FB_MX3
+ an LCD display with your i.MX31 system, say Y here.
+
+ source "drivers/video/omap/Kconfig"
++source "drivers/video/omap2/Kconfig"
+
+ source "drivers/video/backlight/Kconfig"
+ source "drivers/video/display/Kconfig"
+diff --git a/drivers/video/Makefile b/drivers/video/Makefile
+index 2a998ca..1db8dd4 100644
+--- a/drivers/video/Makefile
++++ b/drivers/video/Makefile
+@@ -120,6 +120,7 @@ obj-$(CONFIG_FB_SM501) += sm501fb.o
+ obj-$(CONFIG_FB_XILINX) += xilinxfb.o
+ obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o
+ obj-$(CONFIG_FB_OMAP) += omap/
++obj-$(CONFIG_OMAP2_DSS) += omap2/
+ obj-$(CONFIG_XEN_FBDEV_FRONTEND) += xen-fbfront.o
+ obj-$(CONFIG_FB_CARMINE) += carminefb.o
+ obj-$(CONFIG_FB_MB862XX) += mb862xx/
+diff --git a/drivers/video/omap2/Kconfig b/drivers/video/omap2/Kconfig
+new file mode 100644
+index 0000000..89bf210
+--- /dev/null
++++ b/drivers/video/omap2/Kconfig
+@@ -0,0 +1,3 @@
++source "drivers/video/omap2/dss/Kconfig"
++source "drivers/video/omap2/displays/Kconfig"
++source "drivers/video/omap2/omapfb/Kconfig"
+diff --git a/drivers/video/omap2/Makefile b/drivers/video/omap2/Makefile
+new file mode 100644
+index 0000000..72134db
+--- /dev/null
++++ b/drivers/video/omap2/Makefile
+@@ -0,0 +1,4 @@
++# OMAP2/3 Display Subsystem
++obj-y += dss/
++obj-y += displays/
++obj-y += omapfb/
+diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig
+new file mode 100644
+index 0000000..f2ce068
+--- /dev/null
++++ b/drivers/video/omap2/dss/Kconfig
+@@ -0,0 +1,89 @@
++menuconfig OMAP2_DSS
++ tristate "OMAP2/3 Display Subsystem support (EXPERIMENTAL)"
++ depends on ARCH_OMAP2 || ARCH_OMAP3
++ help
++ OMAP2/3 Display Subsystem support.
++
++if OMAP2_DSS
++
++config OMAP2_DSS_VRAM_SIZE
++ int "VRAM size (MB)"
++ range 0 32
++ default 4
++ help
++ The amount of SDRAM to reserve at boot time for video RAM use.
++ This VRAM will be used by omapfb and other drivers that need
++ large continuous RAM area for video use.
++
++ You can also set this with "vram=<bytes>" kernel argument, or
++ in the board file.
++
++config OMAP2_DSS_DEBUG_SUPPORT
++ bool "Debug support"
++ default y
++ help
++ This enables debug messages. You need to enable printing
++ with 'debug' module parameter.
++
++config OMAP2_DSS_RFBI
++ bool "RFBI support"
++ default n
++ help
++ MIPI DBI, or RFBI (Remote Framebuffer Interface), support.
++
++config OMAP2_DSS_VENC
++ bool "VENC support"
++ default y
++ help
++ OMAP Video Encoder support.
++
++config OMAP2_DSS_SDI
++ bool "SDI support"
++ depends on ARCH_OMAP3
++ default n
++ help
++ SDI (Serial Display Interface) support.
++
++config OMAP2_DSS_DSI
++ bool "DSI support"
++ depends on ARCH_OMAP3
++ default n
++ help
++ MIPI DSI support.
++
++config OMAP2_DSS_USE_DSI_PLL
++ bool "Use DSI PLL for PCLK (EXPERIMENTAL)"
++ default n
++ depends on OMAP2_DSS_DSI
++ help
++ Use DSI PLL to generate pixel clock. Currently only for DPI output.
++ DSI PLL can be used to generate higher and more precise pixel clocks.
++
++config OMAP2_DSS_FAKE_VSYNC
++ bool "Fake VSYNC irq from manual update displays"
++ default n
++ help
++ If this is selected, DSI will generate a fake DISPC VSYNC interrupt
++ when DSI has sent a frame. This is only needed with DSI or RFBI
++ displays using manual mode, and you want VSYNC to, for example,
++ time animation.
++
++config OMAP2_DSS_MIN_FCK_PER_PCK
++ int "Minimum FCK/PCK ratio (for scaling)"
++ range 0 32
++ default 0
++ help
++ This can be used to adjust the minimum FCK/PCK ratio.
++
++ With this you can make sure that DISPC FCK is at least
++ n x PCK. Video plane scaling requires higher FCK than
++ normally.
++
++ If this is set to 0, there's no extra constraint on the
++ DISPC FCK. However, the FCK will at minimum be
++ 2xPCK (if active matrix) or 3xPCK (if passive matrix).
++
++ Max FCK is 173MHz, so this doesn't work if your PCK
++ is very high.
++
++endif
+diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile
+new file mode 100644
+index 0000000..980c72c
+--- /dev/null
++++ b/drivers/video/omap2/dss/Makefile
+@@ -0,0 +1,6 @@
++obj-$(CONFIG_OMAP2_DSS) += omapdss.o
++omapdss-y := core.o dss.o dispc.o dpi.o display.o manager.o overlay.o
++omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o
++omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o
++omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o
++omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o
+diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
+new file mode 100644
+index 0000000..ae7cd06
+--- /dev/null
++++ b/drivers/video/omap2/dss/core.c
+@@ -0,0 +1,641 @@
++/*
++ * linux/drivers/video/omap2/dss/core.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "CORE"
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/clk.h>
++#include <linux/err.h>
++#include <linux/platform_device.h>
++#include <linux/seq_file.h>
++#include <linux/debugfs.h>
++#include <linux/io.h>
++
++#include <mach/display.h>
++#include <mach/clock.h>
++
++#include "dss.h"
++
++static struct {
++ struct platform_device *pdev;
++ unsigned ctx_id;
++
++ struct clk *dss_ick;
++ struct clk *dss1_fck;
++ struct clk *dss2_fck;
++ struct clk *dss_54m_fck;
++ struct clk *dss_96m_fck;
++ unsigned num_clks_enabled;
++} core;
++
++static void dss_clk_enable_all_no_ctx(void);
++static void dss_clk_disable_all_no_ctx(void);
++static void dss_clk_enable_no_ctx(enum dss_clock clks);
++static void dss_clk_disable_no_ctx(enum dss_clock clks);
++
++static char *def_disp_name;
++module_param_named(def_disp, def_disp_name, charp, 0);
++MODULE_PARM_DESC(def_disp_name, "default display name");
++
++#ifdef DEBUG
++unsigned int dss_debug;
++module_param_named(debug, dss_debug, bool, 0644);
++#endif
++
++/* CONTEXT */
++static unsigned dss_get_ctx_id(void)
++{
++ struct omap_dss_board_info *pdata = core.pdev->dev.platform_data;
++
++ if (!pdata->get_last_off_on_transaction_id)
++ return 0;
++
++ return pdata->get_last_off_on_transaction_id(&core.pdev->dev);
++}
++
++int dss_need_ctx_restore(void)
++{
++ int id = dss_get_ctx_id();
++
++ if (id != core.ctx_id) {
++ DSSDBG("ctx id %u -> id %u\n",
++ core.ctx_id, id);
++ core.ctx_id = id;
++ return 1;
++ } else {
++ return 0;
++ }
++}
++
++static void save_all_ctx(void)
++{
++ DSSDBG("save context\n");
++
++ dss_clk_enable_no_ctx(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ dss_save_context();
++ dispc_save_context();
++#ifdef CONFIG_OMAP2_DSS_DSI
++ dsi_save_context();
++#endif
++
++ dss_clk_disable_no_ctx(DSS_CLK_ICK | DSS_CLK_FCK1);
++}
++
++static void restore_all_ctx(void)
++{
++ DSSDBG("restore context\n");
++
++ dss_clk_enable_all_no_ctx();
++
++ dss_restore_context();
++ dispc_restore_context();
++#ifdef CONFIG_OMAP2_DSS_DSI
++ dsi_restore_context();
++#endif
++
++ dss_clk_disable_all_no_ctx();
++}
++
++/* CLOCKS */
++void dss_dump_clocks(struct seq_file *s)
++{
++ int i;
++ struct clk *clocks[5] = {
++ core.dss_ick,
++ core.dss1_fck,
++ core.dss2_fck,
++ core.dss_54m_fck,
++ core.dss_96m_fck
++ };
++
++ seq_printf(s, "- dss -\n");
++
++ seq_printf(s, "internal clk count\t%u\n", core.num_clks_enabled);
++
++ for (i = 0; i < 5; i++) {
++ if (!clocks[i])
++ continue;
++ seq_printf(s, "%-15s\t%lu\t%d\n",
++ clocks[i]->name,
++ clk_get_rate(clocks[i]),
++ clocks[i]->usecount);
++ }
++}
++
++static int dss_get_clocks(void)
++{
++ const struct {
++ struct clk **clock;
++ char *omap2_name;
++ char *omap3_name;
++ } clocks[5] = {
++ { &core.dss_ick, "dss_ick", "dss_ick" }, /* L3 & L4 ick */
++ { &core.dss1_fck, "dss1_fck", "dss1_alwon_fck" },
++ { &core.dss2_fck, "dss2_fck", "dss2_alwon_fck" },
++ { &core.dss_54m_fck, "dss_54m_fck", "dss_tv_fck" },
++ { &core.dss_96m_fck, NULL, "dss_96m_fck" },
++ };
++
++ int r = 0;
++ int i;
++ const int num_clocks = 5;
++
++ for (i = 0; i < num_clocks; i++)
++ *clocks[i].clock = NULL;
++
++ for (i = 0; i < num_clocks; i++) {
++ struct clk *clk;
++ const char *clk_name;
++
++ clk_name = cpu_is_omap34xx() ? clocks[i].omap3_name
++ : clocks[i].omap2_name;
++
++ if (!clk_name)
++ continue;
++
++ clk = clk_get(NULL, clk_name);
++
++ if (IS_ERR(clk)) {
++ DSSERR("can't get clock %s", clk_name);
++ r = PTR_ERR(clk);
++ goto err;
++ }
++
++ DSSDBG("clk %s, rate %ld\n",
++ clk_name, clk_get_rate(clk));
++
++ *clocks[i].clock = clk;
++ }
++
++ return 0;
++
++err:
++ for (i = 0; i < num_clocks; i++) {
++ if (!IS_ERR(*clocks[i].clock))
++ clk_put(*clocks[i].clock);
++ }
++
++ return r;
++}
++
++static void dss_put_clocks(void)
++{
++ if (core.dss_96m_fck)
++ clk_put(core.dss_96m_fck);
++ clk_put(core.dss_54m_fck);
++ clk_put(core.dss1_fck);
++ clk_put(core.dss2_fck);
++ clk_put(core.dss_ick);
++}
++
++unsigned long dss_clk_get_rate(enum dss_clock clk)
++{
++ switch (clk) {
++ case DSS_CLK_ICK:
++ return clk_get_rate(core.dss_ick);
++ case DSS_CLK_FCK1:
++ return clk_get_rate(core.dss1_fck);
++ case DSS_CLK_FCK2:
++ return clk_get_rate(core.dss2_fck);
++ case DSS_CLK_54M:
++ return clk_get_rate(core.dss_54m_fck);
++ case DSS_CLK_96M:
++ return clk_get_rate(core.dss_96m_fck);
++ }
++
++ BUG();
++ return 0;
++}
++
++static unsigned count_clk_bits(enum dss_clock clks)
++{
++ unsigned num_clks = 0;
++
++ if (clks & DSS_CLK_ICK)
++ ++num_clks;
++ if (clks & DSS_CLK_FCK1)
++ ++num_clks;
++ if (clks & DSS_CLK_FCK2)
++ ++num_clks;
++ if (clks & DSS_CLK_54M)
++ ++num_clks;
++ if (clks & DSS_CLK_96M)
++ ++num_clks;
++
++ return num_clks;
++}
++
++static void dss_clk_enable_no_ctx(enum dss_clock clks)
++{
++ unsigned num_clks = count_clk_bits(clks);
++
++ if (clks & DSS_CLK_ICK)
++ clk_enable(core.dss_ick);
++ if (clks & DSS_CLK_FCK1)
++ clk_enable(core.dss1_fck);
++ if (clks & DSS_CLK_FCK2)
++ clk_enable(core.dss2_fck);
++ if (clks & DSS_CLK_54M)
++ clk_enable(core.dss_54m_fck);
++ if (clks & DSS_CLK_96M)
++ clk_enable(core.dss_96m_fck);
++
++ core.num_clks_enabled += num_clks;
++}
++
++void dss_clk_enable(enum dss_clock clks)
++{
++ dss_clk_enable_no_ctx(clks);
++
++ if (cpu_is_omap34xx() && dss_need_ctx_restore())
++ restore_all_ctx();
++}
++
++static void dss_clk_disable_no_ctx(enum dss_clock clks)
++{
++ unsigned num_clks = count_clk_bits(clks);
++
++ if (clks & DSS_CLK_ICK)
++ clk_disable(core.dss_ick);
++ if (clks & DSS_CLK_FCK1)
++ clk_disable(core.dss1_fck);
++ if (clks & DSS_CLK_FCK2)
++ clk_disable(core.dss2_fck);
++ if (clks & DSS_CLK_54M)
++ clk_disable(core.dss_54m_fck);
++ if (clks & DSS_CLK_96M)
++ clk_disable(core.dss_96m_fck);
++
++ core.num_clks_enabled -= num_clks;
++}
++
++void dss_clk_disable(enum dss_clock clks)
++{
++ if (cpu_is_omap34xx()) {
++ unsigned num_clks = count_clk_bits(clks);
++
++ BUG_ON(core.num_clks_enabled < num_clks);
++
++ if (core.num_clks_enabled == num_clks)
++ save_all_ctx();
++ }
++
++ dss_clk_disable_no_ctx(clks);
++}
++
++static void dss_clk_enable_all_no_ctx(void)
++{
++ enum dss_clock clks;
++
++ clks = DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_FCK2 | DSS_CLK_54M;
++ if (cpu_is_omap34xx())
++ clks |= DSS_CLK_96M;
++ dss_clk_enable_no_ctx(clks);
++}
++
++static void dss_clk_disable_all_no_ctx(void)
++{
++ enum dss_clock clks;
++
++ clks = DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_FCK2 | DSS_CLK_54M;
++ if (cpu_is_omap34xx())
++ clks |= DSS_CLK_96M;
++ dss_clk_disable_no_ctx(clks);
++}
++
++static void dss_clk_disable_all(void)
++{
++ enum dss_clock clks;
++
++ clks = DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_FCK2 | DSS_CLK_54M;
++ if (cpu_is_omap34xx())
++ clks |= DSS_CLK_96M;
++ dss_clk_disable(clks);
++}
++
++/* DEBUGFS */
++#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT)
++static void dss_debug_dump_clocks(struct seq_file *s)
++{
++ dss_dump_clocks(s);
++ dispc_dump_clocks(s);
++#ifdef CONFIG_OMAP2_DSS_DSI
++ dsi_dump_clocks(s);
++#endif
++}
++
++static int dss_debug_show(struct seq_file *s, void *unused)
++{
++ void (*func)(struct seq_file *) = s->private;
++ func(s);
++ return 0;
++}
++
++static int dss_debug_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, dss_debug_show, inode->i_private);
++}
++
++static const struct file_operations dss_debug_fops = {
++ .open = dss_debug_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static struct dentry *dss_debugfs_dir;
++
++static int dss_initialize_debugfs(void)
++{
++ dss_debugfs_dir = debugfs_create_dir("omapdss", NULL);
++ if (IS_ERR(dss_debugfs_dir)) {
++ int err = PTR_ERR(dss_debugfs_dir);
++ dss_debugfs_dir = NULL;
++ return err;
++ }
++
++ debugfs_create_file("clk", S_IRUGO, dss_debugfs_dir,
++ &dss_debug_dump_clocks, &dss_debug_fops);
++
++ debugfs_create_file("dss", S_IRUGO, dss_debugfs_dir,
++ &dss_dump_regs, &dss_debug_fops);
++ debugfs_create_file("dispc", S_IRUGO, dss_debugfs_dir,
++ &dispc_dump_regs, &dss_debug_fops);
++#ifdef CONFIG_OMAP2_DSS_RFBI
++ debugfs_create_file("rfbi", S_IRUGO, dss_debugfs_dir,
++ &rfbi_dump_regs, &dss_debug_fops);
++#endif
++#ifdef CONFIG_OMAP2_DSS_DSI
++ debugfs_create_file("dsi", S_IRUGO, dss_debugfs_dir,
++ &dsi_dump_regs, &dss_debug_fops);
++#endif
++ return 0;
++}
++
++static void dss_uninitialize_debugfs(void)
++{
++ if (dss_debugfs_dir)
++ debugfs_remove_recursive(dss_debugfs_dir);
++}
++#endif /* CONFIG_DEBUG_FS && CONFIG_OMAP2_DSS_DEBUG_SUPPORT */
++
++
++/* DSI powers */
++int dss_dsi_power_up(void)
++{
++ struct omap_dss_board_info *pdata = core.pdev->dev.platform_data;
++
++ if (!pdata->dsi_power_up)
++ return 0; /* presume power is always on then */
++
++ return pdata->dsi_power_up();
++}
++
++void dss_dsi_power_down(void)
++{
++ struct omap_dss_board_info *pdata = core.pdev->dev.platform_data;
++
++ if (!pdata->dsi_power_down)
++ return;
++
++ pdata->dsi_power_down();
++}
++
++
++
++/* PLATFORM DEVICE */
++static int omap_dss_probe(struct platform_device *pdev)
++{
++ int skip_init = 0;
++ int r;
++
++ core.pdev = pdev;
++
++ r = dss_get_clocks();
++ if (r)
++ goto fail0;
++
++ dss_clk_enable_all_no_ctx();
++
++ core.ctx_id = dss_get_ctx_id();
++ DSSDBG("initial ctx id %u\n", core.ctx_id);
++
++#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT
++ /* DISPC_CONTROL */
++ if (omap_readl(0x48050440) & 1) /* LCD enabled? */
++ skip_init = 1;
++#endif
++
++ r = dss_init(skip_init);
++ if (r) {
++ DSSERR("Failed to initialize DSS\n");
++ goto fail0;
++ }
++
++#ifdef CONFIG_OMAP2_DSS_RFBI
++ r = rfbi_init();
++ if (r) {
++ DSSERR("Failed to initialize rfbi\n");
++ goto fail0;
++ }
++#endif
++
++ r = dpi_init();
++ if (r) {
++ DSSERR("Failed to initialize dpi\n");
++ goto fail0;
++ }
++
++ r = dispc_init();
++ if (r) {
++ DSSERR("Failed to initialize dispc\n");
++ goto fail0;
++ }
++#ifdef CONFIG_OMAP2_DSS_VENC
++ r = venc_init();
++ if (r) {
++ DSSERR("Failed to initialize venc\n");
++ goto fail0;
++ }
++#endif
++ if (cpu_is_omap34xx()) {
++#ifdef CONFIG_OMAP2_DSS_SDI
++ r = sdi_init(skip_init);
++ if (r) {
++ DSSERR("Failed to initialize SDI\n");
++ goto fail0;
++ }
++#endif
++#ifdef CONFIG_OMAP2_DSS_DSI
++ r = dsi_init();
++ if (r) {
++ DSSERR("Failed to initialize DSI\n");
++ goto fail0;
++ }
++#endif
++ }
++
++#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT)
++ r = dss_initialize_debugfs();
++ if (r)
++ goto fail0;
++#endif
++
++ dss_init_displays(pdev);
++ dss_init_overlay_managers(pdev);
++ dss_init_overlays(pdev, def_disp_name);
++
++ dss_clk_disable_all();
++
++ return 0;
++
++ /* XXX fail correctly */
++fail0:
++ return r;
++}
++
++static int omap_dss_remove(struct platform_device *pdev)
++{
++ int c;
++
++ dss_uninit_overlays(pdev);
++ dss_uninit_overlay_managers(pdev);
++ dss_uninit_displays(pdev);
++
++#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT)
++ dss_uninitialize_debugfs();
++#endif
++
++#ifdef CONFIG_OMAP2_DSS_VENC
++ venc_exit();
++#endif
++ dispc_exit();
++ dpi_exit();
++#ifdef CONFIG_OMAP2_DSS_RFBI
++ rfbi_exit();
++#endif
++ if (cpu_is_omap34xx()) {
++#ifdef CONFIG_OMAP2_DSS_DSI
++ dsi_exit();
++#endif
++#ifdef CONFIG_OMAP2_DSS_SDI
++ sdi_exit();
++#endif
++ }
++
++ dss_exit();
++
++ /* these should be removed at some point */
++ c = core.dss_ick->usecount;
++ if (c > 0) {
++ DSSERR("warning: dss_ick usecount %d, disabling\n", c);
++ while (c-- > 0)
++ clk_disable(core.dss_ick);
++ }
++
++ c = core.dss1_fck->usecount;
++ if (c > 0) {
++ DSSERR("warning: dss1_fck usecount %d, disabling\n", c);
++ while (c-- > 0)
++ clk_disable(core.dss1_fck);
++ }
++
++ c = core.dss2_fck->usecount;
++ if (c > 0) {
++ DSSERR("warning: dss2_fck usecount %d, disabling\n", c);
++ while (c-- > 0)
++ clk_disable(core.dss2_fck);
++ }
++
++ c = core.dss_54m_fck->usecount;
++ if (c > 0) {
++ DSSERR("warning: dss_54m_fck usecount %d, disabling\n", c);
++ while (c-- > 0)
++ clk_disable(core.dss_54m_fck);
++ }
++
++ if (core.dss_96m_fck) {
++ c = core.dss_96m_fck->usecount;
++ if (c > 0) {
++ DSSERR("warning: dss_96m_fck usecount %d, disabling\n",
++ c);
++ while (c-- > 0)
++ clk_disable(core.dss_96m_fck);
++ }
++ }
++
++ dss_put_clocks();
++
++ return 0;
++}
++
++static void omap_dss_shutdown(struct platform_device *pdev)
++{
++ DSSDBG("shutdown\n");
++}
++
++static int omap_dss_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ DSSDBG("suspend %d\n", state.event);
++
++ return dss_suspend_all_displays();
++}
++
++static int omap_dss_resume(struct platform_device *pdev)
++{
++ DSSDBG("resume\n");
++
++ return dss_resume_all_displays();
++}
++
++static struct platform_driver omap_dss_driver = {
++ .probe = omap_dss_probe,
++ .remove = omap_dss_remove,
++ .shutdown = omap_dss_shutdown,
++ .suspend = omap_dss_suspend,
++ .resume = omap_dss_resume,
++ .driver = {
++ .name = "omapdss",
++ .owner = THIS_MODULE,
++ },
++};
++
++static int __init omap_dss_init(void)
++{
++ return platform_driver_register(&omap_dss_driver);
++}
++
++static void __exit omap_dss_exit(void)
++{
++ platform_driver_unregister(&omap_dss_driver);
++}
++
++subsys_initcall(omap_dss_init);
++module_exit(omap_dss_exit);
++
++
++MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
++MODULE_DESCRIPTION("OMAP2/3 Display Subsystem");
++MODULE_LICENSE("GPL v2");
++
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+new file mode 100644
+index 0000000..ffb5648
+--- /dev/null
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -0,0 +1,2968 @@
++/*
++ * linux/drivers/video/omap2/dss/dispc.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "DISPC"
++
++#include <linux/kernel.h>
++#include <linux/dma-mapping.h>
++#include <linux/vmalloc.h>
++#include <linux/clk.h>
++#include <linux/io.h>
++#include <linux/jiffies.h>
++#include <linux/seq_file.h>
++#include <linux/delay.h>
++#include <linux/workqueue.h>
++
++#include <mach/sram.h>
++#include <mach/board.h>
++#include <mach/clock.h>
++
++#include <mach/display.h>
++
++#include "dss.h"
++
++/* DISPC */
++#define DISPC_BASE 0x48050400
++
++#define DISPC_SZ_REGS SZ_1K
++
++struct dispc_reg { u16 idx; };
++
++#define DISPC_REG(idx) ((const struct dispc_reg) { idx })
++
++/* DISPC common */
++#define DISPC_REVISION DISPC_REG(0x0000)
++#define DISPC_SYSCONFIG DISPC_REG(0x0010)
++#define DISPC_SYSSTATUS DISPC_REG(0x0014)
++#define DISPC_IRQSTATUS DISPC_REG(0x0018)
++#define DISPC_IRQENABLE DISPC_REG(0x001C)
++#define DISPC_CONTROL DISPC_REG(0x0040)
++#define DISPC_CONFIG DISPC_REG(0x0044)
++#define DISPC_CAPABLE DISPC_REG(0x0048)
++#define DISPC_DEFAULT_COLOR0 DISPC_REG(0x004C)
++#define DISPC_DEFAULT_COLOR1 DISPC_REG(0x0050)
++#define DISPC_TRANS_COLOR0 DISPC_REG(0x0054)
++#define DISPC_TRANS_COLOR1 DISPC_REG(0x0058)
++#define DISPC_LINE_STATUS DISPC_REG(0x005C)
++#define DISPC_LINE_NUMBER DISPC_REG(0x0060)
++#define DISPC_TIMING_H DISPC_REG(0x0064)
++#define DISPC_TIMING_V DISPC_REG(0x0068)
++#define DISPC_POL_FREQ DISPC_REG(0x006C)
++#define DISPC_DIVISOR DISPC_REG(0x0070)
++#define DISPC_GLOBAL_ALPHA DISPC_REG(0x0074)
++#define DISPC_SIZE_DIG DISPC_REG(0x0078)
++#define DISPC_SIZE_LCD DISPC_REG(0x007C)
++
++/* DISPC GFX plane */
++#define DISPC_GFX_BA0 DISPC_REG(0x0080)
++#define DISPC_GFX_BA1 DISPC_REG(0x0084)
++#define DISPC_GFX_POSITION DISPC_REG(0x0088)
++#define DISPC_GFX_SIZE DISPC_REG(0x008C)
++#define DISPC_GFX_ATTRIBUTES DISPC_REG(0x00A0)
++#define DISPC_GFX_FIFO_THRESHOLD DISPC_REG(0x00A4)
++#define DISPC_GFX_FIFO_SIZE_STATUS DISPC_REG(0x00A8)
++#define DISPC_GFX_ROW_INC DISPC_REG(0x00AC)
++#define DISPC_GFX_PIXEL_INC DISPC_REG(0x00B0)
++#define DISPC_GFX_WINDOW_SKIP DISPC_REG(0x00B4)
++#define DISPC_GFX_TABLE_BA DISPC_REG(0x00B8)
++
++#define DISPC_DATA_CYCLE1 DISPC_REG(0x01D4)
++#define DISPC_DATA_CYCLE2 DISPC_REG(0x01D8)
++#define DISPC_DATA_CYCLE3 DISPC_REG(0x01DC)
++
++#define DISPC_CPR_COEF_R DISPC_REG(0x0220)
++#define DISPC_CPR_COEF_G DISPC_REG(0x0224)
++#define DISPC_CPR_COEF_B DISPC_REG(0x0228)
++
++#define DISPC_GFX_PRELOAD DISPC_REG(0x022C)
++
++/* DISPC Video plane, n = 0 for VID1 and n = 1 for VID2 */
++#define DISPC_VID_REG(n, idx) DISPC_REG(0x00BC + (n)*0x90 + idx)
++
++#define DISPC_VID_BA0(n) DISPC_VID_REG(n, 0x0000)
++#define DISPC_VID_BA1(n) DISPC_VID_REG(n, 0x0004)
++#define DISPC_VID_POSITION(n) DISPC_VID_REG(n, 0x0008)
++#define DISPC_VID_SIZE(n) DISPC_VID_REG(n, 0x000C)
++#define DISPC_VID_ATTRIBUTES(n) DISPC_VID_REG(n, 0x0010)
++#define DISPC_VID_FIFO_THRESHOLD(n) DISPC_VID_REG(n, 0x0014)
++#define DISPC_VID_FIFO_SIZE_STATUS(n) DISPC_VID_REG(n, 0x0018)
++#define DISPC_VID_ROW_INC(n) DISPC_VID_REG(n, 0x001C)
++#define DISPC_VID_PIXEL_INC(n) DISPC_VID_REG(n, 0x0020)
++#define DISPC_VID_FIR(n) DISPC_VID_REG(n, 0x0024)
++#define DISPC_VID_PICTURE_SIZE(n) DISPC_VID_REG(n, 0x0028)
++#define DISPC_VID_ACCU0(n) DISPC_VID_REG(n, 0x002C)
++#define DISPC_VID_ACCU1(n) DISPC_VID_REG(n, 0x0030)
++
++/* coef index i = {0, 1, 2, 3, 4, 5, 6, 7} */
++#define DISPC_VID_FIR_COEF_H(n, i) DISPC_REG(0x00F0 + (n)*0x90 + (i)*0x8)
++/* coef index i = {0, 1, 2, 3, 4, 5, 6, 7} */
++#define DISPC_VID_FIR_COEF_HV(n, i) DISPC_REG(0x00F4 + (n)*0x90 + (i)*0x8)
++/* coef index i = {0, 1, 2, 3, 4} */
++#define DISPC_VID_CONV_COEF(n, i) DISPC_REG(0x0130 + (n)*0x90 + (i)*0x4)
++/* coef index i = {0, 1, 2, 3, 4, 5, 6, 7} */
++#define DISPC_VID_FIR_COEF_V(n, i) DISPC_REG(0x01E0 + (n)*0x20 + (i)*0x4)
++
++#define DISPC_VID_PRELOAD(n) DISPC_REG(0x230 + (n)*0x04)
++
++
++#define DISPC_IRQ_MASK_ERROR (DISPC_IRQ_GFX_FIFO_UNDERFLOW | \
++ DISPC_IRQ_OCP_ERR | \
++ DISPC_IRQ_VID1_FIFO_UNDERFLOW | \
++ DISPC_IRQ_VID2_FIFO_UNDERFLOW | \
++ DISPC_IRQ_SYNC_LOST | \
++ DISPC_IRQ_SYNC_LOST_DIGIT)
++
++#define DISPC_MAX_NR_ISRS 8
++
++struct omap_dispc_isr_data {
++ omap_dispc_isr_t isr;
++ void *arg;
++ u32 mask;
++};
++
++#define REG_GET(idx, start, end) \
++ FLD_GET(dispc_read_reg(idx), start, end)
++
++#define REG_FLD_MOD(idx, val, start, end) \
++ dispc_write_reg(idx, FLD_MOD(dispc_read_reg(idx), val, start, end))
++
++static const struct dispc_reg dispc_reg_att[] = { DISPC_GFX_ATTRIBUTES,
++ DISPC_VID_ATTRIBUTES(0),
++ DISPC_VID_ATTRIBUTES(1) };
++
++static struct {
++ void __iomem *base;
++
++ struct clk *dpll4_m4_ck;
++
++ spinlock_t irq_lock;
++
++ unsigned long cache_req_pck;
++ unsigned long cache_prate;
++ struct dispc_clock_info cache_cinfo;
++
++ u32 irq_error_mask;
++ struct omap_dispc_isr_data registered_isr[DISPC_MAX_NR_ISRS];
++
++ spinlock_t error_lock;
++ u32 error_irqs;
++ struct work_struct error_work;
++
++ u32 ctx[DISPC_SZ_REGS / sizeof(u32)];
++} dispc;
++
++static void omap_dispc_set_irqs(void);
++
++static inline void dispc_write_reg(const struct dispc_reg idx, u32 val)
++{
++ __raw_writel(val, dispc.base + idx.idx);
++}
++
++static inline u32 dispc_read_reg(const struct dispc_reg idx)
++{
++ return __raw_readl(dispc.base + idx.idx);
++}
++
++#define SR(reg) \
++ dispc.ctx[(DISPC_##reg).idx / sizeof(u32)] = dispc_read_reg(DISPC_##reg)
++#define RR(reg) \
++ dispc_write_reg(DISPC_##reg, dispc.ctx[(DISPC_##reg).idx / sizeof(u32)])
++
++void dispc_save_context(void)
++{
++ if (cpu_is_omap24xx())
++ return;
++
++ SR(SYSCONFIG);
++ SR(IRQENABLE);
++ SR(CONTROL);
++ SR(CONFIG);
++ SR(DEFAULT_COLOR0);
++ SR(DEFAULT_COLOR1);
++ SR(TRANS_COLOR0);
++ SR(TRANS_COLOR1);
++ SR(LINE_NUMBER);
++ SR(TIMING_H);
++ SR(TIMING_V);
++ SR(POL_FREQ);
++ SR(DIVISOR);
++ SR(GLOBAL_ALPHA);
++ SR(SIZE_DIG);
++ SR(SIZE_LCD);
++
++ SR(GFX_BA0);
++ SR(GFX_BA1);
++ SR(GFX_POSITION);
++ SR(GFX_SIZE);
++ SR(GFX_ATTRIBUTES);
++ SR(GFX_FIFO_THRESHOLD);
++ SR(GFX_ROW_INC);
++ SR(GFX_PIXEL_INC);
++ SR(GFX_WINDOW_SKIP);
++ SR(GFX_TABLE_BA);
++
++ SR(DATA_CYCLE1);
++ SR(DATA_CYCLE2);
++ SR(DATA_CYCLE3);
++
++ SR(CPR_COEF_R);
++ SR(CPR_COEF_G);
++ SR(CPR_COEF_B);
++
++ SR(GFX_PRELOAD);
++
++ /* VID1 */
++ SR(VID_BA0(0));
++ SR(VID_BA1(0));
++ SR(VID_POSITION(0));
++ SR(VID_SIZE(0));
++ SR(VID_ATTRIBUTES(0));
++ SR(VID_FIFO_THRESHOLD(0));
++ SR(VID_ROW_INC(0));
++ SR(VID_PIXEL_INC(0));
++ SR(VID_FIR(0));
++ SR(VID_PICTURE_SIZE(0));
++ SR(VID_ACCU0(0));
++ SR(VID_ACCU1(0));
++
++ SR(VID_FIR_COEF_H(0, 0));
++ SR(VID_FIR_COEF_H(0, 1));
++ SR(VID_FIR_COEF_H(0, 2));
++ SR(VID_FIR_COEF_H(0, 3));
++ SR(VID_FIR_COEF_H(0, 4));
++ SR(VID_FIR_COEF_H(0, 5));
++ SR(VID_FIR_COEF_H(0, 6));
++ SR(VID_FIR_COEF_H(0, 7));
++
++ SR(VID_FIR_COEF_HV(0, 0));
++ SR(VID_FIR_COEF_HV(0, 1));
++ SR(VID_FIR_COEF_HV(0, 2));
++ SR(VID_FIR_COEF_HV(0, 3));
++ SR(VID_FIR_COEF_HV(0, 4));
++ SR(VID_FIR_COEF_HV(0, 5));
++ SR(VID_FIR_COEF_HV(0, 6));
++ SR(VID_FIR_COEF_HV(0, 7));
++
++ SR(VID_CONV_COEF(0, 0));
++ SR(VID_CONV_COEF(0, 1));
++ SR(VID_CONV_COEF(0, 2));
++ SR(VID_CONV_COEF(0, 3));
++ SR(VID_CONV_COEF(0, 4));
++
++ SR(VID_FIR_COEF_V(0, 0));
++ SR(VID_FIR_COEF_V(0, 1));
++ SR(VID_FIR_COEF_V(0, 2));
++ SR(VID_FIR_COEF_V(0, 3));
++ SR(VID_FIR_COEF_V(0, 4));
++ SR(VID_FIR_COEF_V(0, 5));
++ SR(VID_FIR_COEF_V(0, 6));
++ SR(VID_FIR_COEF_V(0, 7));
++
++ SR(VID_PRELOAD(0));
++
++ /* VID2 */
++ SR(VID_BA0(1));
++ SR(VID_BA1(1));
++ SR(VID_POSITION(1));
++ SR(VID_SIZE(1));
++ SR(VID_ATTRIBUTES(1));
++ SR(VID_FIFO_THRESHOLD(1));
++ SR(VID_ROW_INC(1));
++ SR(VID_PIXEL_INC(1));
++ SR(VID_FIR(1));
++ SR(VID_PICTURE_SIZE(1));
++ SR(VID_ACCU0(1));
++ SR(VID_ACCU1(1));
++
++ SR(VID_FIR_COEF_H(1, 0));
++ SR(VID_FIR_COEF_H(1, 1));
++ SR(VID_FIR_COEF_H(1, 2));
++ SR(VID_FIR_COEF_H(1, 3));
++ SR(VID_FIR_COEF_H(1, 4));
++ SR(VID_FIR_COEF_H(1, 5));
++ SR(VID_FIR_COEF_H(1, 6));
++ SR(VID_FIR_COEF_H(1, 7));
++
++ SR(VID_FIR_COEF_HV(1, 0));
++ SR(VID_FIR_COEF_HV(1, 1));
++ SR(VID_FIR_COEF_HV(1, 2));
++ SR(VID_FIR_COEF_HV(1, 3));
++ SR(VID_FIR_COEF_HV(1, 4));
++ SR(VID_FIR_COEF_HV(1, 5));
++ SR(VID_FIR_COEF_HV(1, 6));
++ SR(VID_FIR_COEF_HV(1, 7));
++
++ SR(VID_CONV_COEF(1, 0));
++ SR(VID_CONV_COEF(1, 1));
++ SR(VID_CONV_COEF(1, 2));
++ SR(VID_CONV_COEF(1, 3));
++ SR(VID_CONV_COEF(1, 4));
++
++ SR(VID_FIR_COEF_V(1, 0));
++ SR(VID_FIR_COEF_V(1, 1));
++ SR(VID_FIR_COEF_V(1, 2));
++ SR(VID_FIR_COEF_V(1, 3));
++ SR(VID_FIR_COEF_V(1, 4));
++ SR(VID_FIR_COEF_V(1, 5));
++ SR(VID_FIR_COEF_V(1, 6));
++ SR(VID_FIR_COEF_V(1, 7));
++
++ SR(VID_PRELOAD(1));
++}
++
++void dispc_restore_context(void)
++{
++ RR(SYSCONFIG);
++ RR(IRQENABLE);
++ /*RR(CONTROL);*/
++ RR(CONFIG);
++ RR(DEFAULT_COLOR0);
++ RR(DEFAULT_COLOR1);
++ RR(TRANS_COLOR0);
++ RR(TRANS_COLOR1);
++ RR(LINE_NUMBER);
++ RR(TIMING_H);
++ RR(TIMING_V);
++ RR(POL_FREQ);
++ RR(DIVISOR);
++ RR(GLOBAL_ALPHA);
++ RR(SIZE_DIG);
++ RR(SIZE_LCD);
++
++ RR(GFX_BA0);
++ RR(GFX_BA1);
++ RR(GFX_POSITION);
++ RR(GFX_SIZE);
++ RR(GFX_ATTRIBUTES);
++ RR(GFX_FIFO_THRESHOLD);
++ RR(GFX_ROW_INC);
++ RR(GFX_PIXEL_INC);
++ RR(GFX_WINDOW_SKIP);
++ RR(GFX_TABLE_BA);
++
++ RR(DATA_CYCLE1);
++ RR(DATA_CYCLE2);
++ RR(DATA_CYCLE3);
++
++ RR(CPR_COEF_R);
++ RR(CPR_COEF_G);
++ RR(CPR_COEF_B);
++
++ RR(GFX_PRELOAD);
++
++ /* VID1 */
++ RR(VID_BA0(0));
++ RR(VID_BA1(0));
++ RR(VID_POSITION(0));
++ RR(VID_SIZE(0));
++ RR(VID_ATTRIBUTES(0));
++ RR(VID_FIFO_THRESHOLD(0));
++ RR(VID_ROW_INC(0));
++ RR(VID_PIXEL_INC(0));
++ RR(VID_FIR(0));
++ RR(VID_PICTURE_SIZE(0));
++ RR(VID_ACCU0(0));
++ RR(VID_ACCU1(0));
++
++ RR(VID_FIR_COEF_H(0, 0));
++ RR(VID_FIR_COEF_H(0, 1));
++ RR(VID_FIR_COEF_H(0, 2));
++ RR(VID_FIR_COEF_H(0, 3));
++ RR(VID_FIR_COEF_H(0, 4));
++ RR(VID_FIR_COEF_H(0, 5));
++ RR(VID_FIR_COEF_H(0, 6));
++ RR(VID_FIR_COEF_H(0, 7));
++
++ RR(VID_FIR_COEF_HV(0, 0));
++ RR(VID_FIR_COEF_HV(0, 1));
++ RR(VID_FIR_COEF_HV(0, 2));
++ RR(VID_FIR_COEF_HV(0, 3));
++ RR(VID_FIR_COEF_HV(0, 4));
++ RR(VID_FIR_COEF_HV(0, 5));
++ RR(VID_FIR_COEF_HV(0, 6));
++ RR(VID_FIR_COEF_HV(0, 7));
++
++ RR(VID_CONV_COEF(0, 0));
++ RR(VID_CONV_COEF(0, 1));
++ RR(VID_CONV_COEF(0, 2));
++ RR(VID_CONV_COEF(0, 3));
++ RR(VID_CONV_COEF(0, 4));
++
++ RR(VID_FIR_COEF_V(0, 0));
++ RR(VID_FIR_COEF_V(0, 1));
++ RR(VID_FIR_COEF_V(0, 2));
++ RR(VID_FIR_COEF_V(0, 3));
++ RR(VID_FIR_COEF_V(0, 4));
++ RR(VID_FIR_COEF_V(0, 5));
++ RR(VID_FIR_COEF_V(0, 6));
++ RR(VID_FIR_COEF_V(0, 7));
++
++ RR(VID_PRELOAD(0));
++
++ /* VID2 */
++ RR(VID_BA0(1));
++ RR(VID_BA1(1));
++ RR(VID_POSITION(1));
++ RR(VID_SIZE(1));
++ RR(VID_ATTRIBUTES(1));
++ RR(VID_FIFO_THRESHOLD(1));
++ RR(VID_ROW_INC(1));
++ RR(VID_PIXEL_INC(1));
++ RR(VID_FIR(1));
++ RR(VID_PICTURE_SIZE(1));
++ RR(VID_ACCU0(1));
++ RR(VID_ACCU1(1));
++
++ RR(VID_FIR_COEF_H(1, 0));
++ RR(VID_FIR_COEF_H(1, 1));
++ RR(VID_FIR_COEF_H(1, 2));
++ RR(VID_FIR_COEF_H(1, 3));
++ RR(VID_FIR_COEF_H(1, 4));
++ RR(VID_FIR_COEF_H(1, 5));
++ RR(VID_FIR_COEF_H(1, 6));
++ RR(VID_FIR_COEF_H(1, 7));
++
++ RR(VID_FIR_COEF_HV(1, 0));
++ RR(VID_FIR_COEF_HV(1, 1));
++ RR(VID_FIR_COEF_HV(1, 2));
++ RR(VID_FIR_COEF_HV(1, 3));
++ RR(VID_FIR_COEF_HV(1, 4));
++ RR(VID_FIR_COEF_HV(1, 5));
++ RR(VID_FIR_COEF_HV(1, 6));
++ RR(VID_FIR_COEF_HV(1, 7));
++
++ RR(VID_CONV_COEF(1, 0));
++ RR(VID_CONV_COEF(1, 1));
++ RR(VID_CONV_COEF(1, 2));
++ RR(VID_CONV_COEF(1, 3));
++ RR(VID_CONV_COEF(1, 4));
++
++ RR(VID_FIR_COEF_V(1, 0));
++ RR(VID_FIR_COEF_V(1, 1));
++ RR(VID_FIR_COEF_V(1, 2));
++ RR(VID_FIR_COEF_V(1, 3));
++ RR(VID_FIR_COEF_V(1, 4));
++ RR(VID_FIR_COEF_V(1, 5));
++ RR(VID_FIR_COEF_V(1, 6));
++ RR(VID_FIR_COEF_V(1, 7));
++
++ RR(VID_PRELOAD(1));
++
++ /* enable last, because LCD & DIGIT enable are here */
++ RR(CONTROL);
++}
++
++#undef SR
++#undef RR
++
++static inline void enable_clocks(bool enable)
++{
++ if (enable)
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++ else
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++}
++
++void dispc_go(enum omap_channel channel)
++{
++ int bit;
++ unsigned long tmo;
++
++ enable_clocks(1);
++
++ if (channel == OMAP_DSS_CHANNEL_LCD)
++ bit = 0; /* LCDENABLE */
++ else
++ bit = 1; /* DIGITALENABLE */
++
++ /* if the channel is not enabled, we don't need GO */
++ if (REG_GET(DISPC_CONTROL, bit, bit) == 0)
++ goto end;
++
++ if (channel == OMAP_DSS_CHANNEL_LCD)
++ bit = 5; /* GOLCD */
++ else
++ bit = 6; /* GODIGIT */
++
++ tmo = jiffies + msecs_to_jiffies(200);
++ while (REG_GET(DISPC_CONTROL, bit, bit) == 1) {
++ if (time_after(jiffies, tmo)) {
++ DSSERR("timeout waiting GO flag\n");
++ goto end;
++ }
++ cpu_relax();
++ }
++
++ DSSDBG("GO %s\n", channel == OMAP_DSS_CHANNEL_LCD ? "LCD" : "DIGIT");
++
++ REG_FLD_MOD(DISPC_CONTROL, 1, bit, bit);
++end:
++ enable_clocks(0);
++}
++
++static void _dispc_write_firh_reg(enum omap_plane plane, int reg, u32 value)
++{
++ BUG_ON(plane == OMAP_DSS_GFX);
++
++ dispc_write_reg(DISPC_VID_FIR_COEF_H(plane-1, reg), value);
++}
++
++static void _dispc_write_firhv_reg(enum omap_plane plane, int reg, u32 value)
++{
++ BUG_ON(plane == OMAP_DSS_GFX);
++
++ dispc_write_reg(DISPC_VID_FIR_COEF_HV(plane-1, reg), value);
++}
++
++static void _dispc_write_firv_reg(enum omap_plane plane, int reg, u32 value)
++{
++ BUG_ON(plane == OMAP_DSS_GFX);
++
++ dispc_write_reg(DISPC_VID_FIR_COEF_V(plane-1, reg), value);
++}
++
++static void _dispc_set_scale_coef(enum omap_plane plane, int hscaleup,
++ int vscaleup, int five_taps)
++{
++ /* Coefficients for horizontal up-sampling */
++ static const u32 coef_hup[8] = {
++ 0x00800000,
++ 0x0D7CF800,
++ 0x1E70F5FF,
++ 0x335FF5FE,
++ 0xF74949F7,
++ 0xF55F33FB,
++ 0xF5701EFE,
++ 0xF87C0DFF,
++ };
++
++ /* Coefficients for horizontal down-sampling */
++ static const u32 coef_hdown[8] = {
++ 0x24382400,
++ 0x28371FFE,
++ 0x2C361BFB,
++ 0x303516F9,
++ 0x11343311,
++ 0x1635300C,
++ 0x1B362C08,
++ 0x1F372804,
++ };
++
++ /* Coefficients for horizontal and vertical up-sampling */
++ static const u32 coef_hvup[2][8] = {
++ {
++ 0x00800000,
++ 0x037B02FF,
++ 0x0C6F05FE,
++ 0x205907FB,
++ 0x00404000,
++ 0x075920FE,
++ 0x056F0CFF,
++ 0x027B0300,
++ },
++ {
++ 0x00800000,
++ 0x0D7CF8FF,
++ 0x1E70F5FE,
++ 0x335FF5FB,
++ 0xF7404000,
++ 0xF55F33FE,
++ 0xF5701EFF,
++ 0xF87C0D00,
++ },
++ };
++
++ /* Coefficients for horizontal and vertical down-sampling */
++ static const u32 coef_hvdown[2][8] = {
++ {
++ 0x24382400,
++ 0x28391F04,
++ 0x2D381B08,
++ 0x3237170C,
++ 0x123737F7,
++ 0x173732F9,
++ 0x1B382DFB,
++ 0x1F3928FE,
++ },
++ {
++ 0x24382400,
++ 0x28371F04,
++ 0x2C361B08,
++ 0x3035160C,
++ 0x113433F7,
++ 0x163530F9,
++ 0x1B362CFB,
++ 0x1F3728FE,
++ },
++ };
++
++ /* Coefficients for vertical up-sampling */
++ static const u32 coef_vup[8] = {
++ 0x00000000,
++ 0x0000FF00,
++ 0x0000FEFF,
++ 0x0000FBFE,
++ 0x000000F7,
++ 0x0000FEFB,
++ 0x0000FFFE,
++ 0x000000FF,
++ };
++
++
++ /* Coefficients for vertical down-sampling */
++ static const u32 coef_vdown[8] = {
++ 0x00000000,
++ 0x000004FE,
++ 0x000008FB,
++ 0x00000CF9,
++ 0x0000F711,
++ 0x0000F90C,
++ 0x0000FB08,
++ 0x0000FE04,
++ };
++
++ const u32 *h_coef;
++ const u32 *hv_coef;
++ const u32 *hv_coef_mod;
++ const u32 *v_coef;
++ int i;
++
++ if (hscaleup)
++ h_coef = coef_hup;
++ else
++ h_coef = coef_hdown;
++
++ if (vscaleup) {
++ hv_coef = coef_hvup[five_taps];
++ v_coef = coef_vup;
++
++ if (hscaleup)
++ hv_coef_mod = NULL;
++ else
++ hv_coef_mod = coef_hvdown[five_taps];
++ } else {
++ hv_coef = coef_hvdown[five_taps];
++ v_coef = coef_vdown;
++
++ if (hscaleup)
++ hv_coef_mod = coef_hvup[five_taps];
++ else
++ hv_coef_mod = NULL;
++ }
++
++ for (i = 0; i < 8; i++) {
++ u32 h, hv;
++
++ h = h_coef[i];
++
++ hv = hv_coef[i];
++
++ if (hv_coef_mod) {
++ hv &= 0xffffff00;
++ hv |= (hv_coef_mod[i] & 0xff);
++ }
++
++ _dispc_write_firh_reg(plane, i, h);
++ _dispc_write_firhv_reg(plane, i, hv);
++ }
++
++ if (!five_taps)
++ return;
++
++ for (i = 0; i < 8; i++) {
++ u32 v;
++ v = v_coef[i];
++ _dispc_write_firv_reg(plane, i, v);
++ }
++}
++
++static void _dispc_setup_color_conv_coef(void)
++{
++ const struct color_conv_coef {
++ int ry, rcr, rcb, gy, gcr, gcb, by, bcr, bcb;
++ int full_range;
++ } ctbl_bt601_5 = {
++ 298, 409, 0, 298, -208, -100, 298, 0, 517, 0,
++ };
++
++ const struct color_conv_coef *ct;
++
++#define CVAL(x, y) (FLD_VAL(x, 26, 16) | FLD_VAL(y, 10, 0))
++
++ ct = &ctbl_bt601_5;
++
++ dispc_write_reg(DISPC_VID_CONV_COEF(0, 0), CVAL(ct->rcr, ct->ry));
++ dispc_write_reg(DISPC_VID_CONV_COEF(0, 1), CVAL(ct->gy, ct->rcb));
++ dispc_write_reg(DISPC_VID_CONV_COEF(0, 2), CVAL(ct->gcb, ct->gcr));
++ dispc_write_reg(DISPC_VID_CONV_COEF(0, 3), CVAL(ct->bcr, ct->by));
++ dispc_write_reg(DISPC_VID_CONV_COEF(0, 4), CVAL(0, ct->bcb));
++
++ dispc_write_reg(DISPC_VID_CONV_COEF(1, 0), CVAL(ct->rcr, ct->ry));
++ dispc_write_reg(DISPC_VID_CONV_COEF(1, 1), CVAL(ct->gy, ct->rcb));
++ dispc_write_reg(DISPC_VID_CONV_COEF(1, 2), CVAL(ct->gcb, ct->gcr));
++ dispc_write_reg(DISPC_VID_CONV_COEF(1, 3), CVAL(ct->bcr, ct->by));
++ dispc_write_reg(DISPC_VID_CONV_COEF(1, 4), CVAL(0, ct->bcb));
++
++#undef CVAL
++
++ REG_FLD_MOD(DISPC_VID_ATTRIBUTES(0), ct->full_range, 11, 11);
++ REG_FLD_MOD(DISPC_VID_ATTRIBUTES(1), ct->full_range, 11, 11);
++}
++
++
++static void _dispc_set_plane_ba0(enum omap_plane plane, u32 paddr)
++{
++ const struct dispc_reg ba0_reg[] = { DISPC_GFX_BA0,
++ DISPC_VID_BA0(0),
++ DISPC_VID_BA0(1) };
++
++ dispc_write_reg(ba0_reg[plane], paddr);
++}
++
++static void _dispc_set_plane_ba1(enum omap_plane plane, u32 paddr)
++{
++ const struct dispc_reg ba1_reg[] = { DISPC_GFX_BA1,
++ DISPC_VID_BA1(0),
++ DISPC_VID_BA1(1) };
++
++ dispc_write_reg(ba1_reg[plane], paddr);
++}
++
++static void _dispc_set_plane_pos(enum omap_plane plane, int x, int y)
++{
++ const struct dispc_reg pos_reg[] = { DISPC_GFX_POSITION,
++ DISPC_VID_POSITION(0),
++ DISPC_VID_POSITION(1) };
++
++ u32 val = FLD_VAL(y, 26, 16) | FLD_VAL(x, 10, 0);
++ dispc_write_reg(pos_reg[plane], val);
++}
++
++static void _dispc_set_pic_size(enum omap_plane plane, int width, int height)
++{
++ const struct dispc_reg siz_reg[] = { DISPC_GFX_SIZE,
++ DISPC_VID_PICTURE_SIZE(0),
++ DISPC_VID_PICTURE_SIZE(1) };
++ u32 val = FLD_VAL(height - 1, 26, 16) | FLD_VAL(width - 1, 10, 0);
++ dispc_write_reg(siz_reg[plane], val);
++}
++
++static void _dispc_set_vid_size(enum omap_plane plane, int width, int height)
++{
++ u32 val;
++ const struct dispc_reg vsi_reg[] = { DISPC_VID_SIZE(0),
++ DISPC_VID_SIZE(1) };
++
++ BUG_ON(plane == OMAP_DSS_GFX);
++
++ val = FLD_VAL(height - 1, 26, 16) | FLD_VAL(width - 1, 10, 0);
++ dispc_write_reg(vsi_reg[plane-1], val);
++}
++
++static void _dispc_set_pix_inc(enum omap_plane plane, u16 inc)
++{
++ const struct dispc_reg ri_reg[] = { DISPC_GFX_PIXEL_INC,
++ DISPC_VID_PIXEL_INC(0),
++ DISPC_VID_PIXEL_INC(1) };
++
++ dispc_write_reg(ri_reg[plane], inc);
++}
++
++static void _dispc_set_row_inc(enum omap_plane plane, u16 inc)
++{
++ const struct dispc_reg ri_reg[] = { DISPC_GFX_ROW_INC,
++ DISPC_VID_ROW_INC(0),
++ DISPC_VID_ROW_INC(1) };
++
++ dispc_write_reg(ri_reg[plane], inc);
++}
++
++static void _dispc_set_color_mode(enum omap_plane plane,
++ enum omap_color_mode color_mode)
++{
++ u32 m = 0;
++
++ switch (color_mode) {
++ case OMAP_DSS_COLOR_CLUT1:
++ m = 0x0; break;
++ case OMAP_DSS_COLOR_CLUT2:
++ m = 0x1; break;
++ case OMAP_DSS_COLOR_CLUT4:
++ m = 0x2; break;
++ case OMAP_DSS_COLOR_CLUT8:
++ m = 0x3; break;
++ case OMAP_DSS_COLOR_RGB12U:
++ m = 0x4; break;
++ case OMAP_DSS_COLOR_ARGB16:
++ m = 0x5; break;
++ case OMAP_DSS_COLOR_RGB16:
++ m = 0x6; break;
++ case OMAP_DSS_COLOR_RGB24U:
++ m = 0x8; break;
++ case OMAP_DSS_COLOR_RGB24P:
++ m = 0x9; break;
++ case OMAP_DSS_COLOR_YUV2:
++ m = 0xa; break;
++ case OMAP_DSS_COLOR_UYVY:
++ m = 0xb; break;
++ case OMAP_DSS_COLOR_ARGB32:
++ m = 0xc; break;
++ case OMAP_DSS_COLOR_RGBA32:
++ m = 0xd; break;
++ case OMAP_DSS_COLOR_RGBX32:
++ m = 0xe; break;
++ default:
++ BUG(); break;
++ }
++
++ REG_FLD_MOD(dispc_reg_att[plane], m, 4, 1);
++}
++
++static void _dispc_set_channel_out(enum omap_plane plane,
++ enum omap_channel channel)
++{
++ int shift;
++ u32 val;
++
++ switch (plane) {
++ case OMAP_DSS_GFX:
++ shift = 8;
++ break;
++ case OMAP_DSS_VIDEO1:
++ case OMAP_DSS_VIDEO2:
++ shift = 16;
++ break;
++ default:
++ BUG();
++ return;
++ }
++
++ val = dispc_read_reg(dispc_reg_att[plane]);
++ val = FLD_MOD(val, channel, shift, shift);
++ dispc_write_reg(dispc_reg_att[plane], val);
++}
++
++void dispc_set_burst_size(enum omap_plane plane,
++ enum omap_burst_size burst_size)
++{
++ int shift;
++ u32 val;
++
++ enable_clocks(1);
++
++ switch (plane) {
++ case OMAP_DSS_GFX:
++ shift = 6;
++ break;
++ case OMAP_DSS_VIDEO1:
++ case OMAP_DSS_VIDEO2:
++ shift = 14;
++ break;
++ default:
++ BUG();
++ return;
++ }
++
++ val = dispc_read_reg(dispc_reg_att[plane]);
++ val = FLD_MOD(val, burst_size, shift+1, shift);
++ dispc_write_reg(dispc_reg_att[plane], val);
++
++ enable_clocks(0);
++}
++
++static void _dispc_set_vid_color_conv(enum omap_plane plane, bool enable)
++{
++ u32 val;
++
++ BUG_ON(plane == OMAP_DSS_GFX);
++
++ val = dispc_read_reg(dispc_reg_att[plane]);
++ val = FLD_MOD(val, enable, 9, 9);
++ dispc_write_reg(dispc_reg_att[plane], val);
++}
++
++void dispc_set_lcd_size(u16 width, u16 height)
++{
++ u32 val;
++ BUG_ON((width > (1 << 11)) || (height > (1 << 11)));
++ val = FLD_VAL(height - 1, 26, 16) | FLD_VAL(width - 1, 10, 0);
++ enable_clocks(1);
++ dispc_write_reg(DISPC_SIZE_LCD, val);
++ enable_clocks(0);
++}
++
++void dispc_set_digit_size(u16 width, u16 height)
++{
++ u32 val;
++ BUG_ON((width > (1 << 11)) || (height > (1 << 11)));
++ val = FLD_VAL(height - 1, 26, 16) | FLD_VAL(width - 1, 10, 0);
++ enable_clocks(1);
++ dispc_write_reg(DISPC_SIZE_DIG, val);
++ enable_clocks(0);
++}
++
++u32 dispc_get_plane_fifo_size(enum omap_plane plane)
++{
++ const struct dispc_reg fsz_reg[] = { DISPC_GFX_FIFO_SIZE_STATUS,
++ DISPC_VID_FIFO_SIZE_STATUS(0),
++ DISPC_VID_FIFO_SIZE_STATUS(1) };
++ u32 size;
++
++ enable_clocks(1);
++
++ if (cpu_is_omap24xx())
++ size = FLD_GET(dispc_read_reg(fsz_reg[plane]), 8, 0);
++ else if (cpu_is_omap34xx())
++ size = FLD_GET(dispc_read_reg(fsz_reg[plane]), 10, 0);
++ else
++ BUG();
++
++ if (cpu_is_omap34xx()) {
++ /* FIFOMERGE */
++ if (REG_GET(DISPC_CONFIG, 14, 14))
++ size *= 3;
++ }
++
++ enable_clocks(0);
++
++ return size;
++}
++
++void dispc_setup_plane_fifo(enum omap_plane plane, u32 low, u32 high)
++{
++ const struct dispc_reg ftrs_reg[] = { DISPC_GFX_FIFO_THRESHOLD,
++ DISPC_VID_FIFO_THRESHOLD(0),
++ DISPC_VID_FIFO_THRESHOLD(1) };
++ u32 size;
++
++ enable_clocks(1);
++
++ size = dispc_get_plane_fifo_size(plane);
++
++ BUG_ON(low > size || high > size);
++
++ DSSDBG("fifo(%d) size %d, low/high old %u/%u, new %u/%u\n",
++ plane, size,
++ REG_GET(ftrs_reg[plane], 11, 0),
++ REG_GET(ftrs_reg[plane], 27, 16),
++ low, high);
++
++ if (cpu_is_omap24xx())
++ dispc_write_reg(ftrs_reg[plane],
++ FLD_VAL(high, 24, 16) | FLD_VAL(low, 8, 0));
++ else
++ dispc_write_reg(ftrs_reg[plane],
++ FLD_VAL(high, 27, 16) | FLD_VAL(low, 11, 0));
++
++ enable_clocks(0);
++}
++
++void dispc_enable_fifomerge(bool enable)
++{
++ enable_clocks(1);
++
++ DSSDBG("FIFO merge %s\n", enable ? "enabled" : "disabled");
++ REG_FLD_MOD(DISPC_CONFIG, enable ? 1 : 0, 14, 14);
++
++ enable_clocks(0);
++}
++
++static void _dispc_set_fir(enum omap_plane plane, int hinc, int vinc)
++{
++ u32 val;
++ const struct dispc_reg fir_reg[] = { DISPC_VID_FIR(0),
++ DISPC_VID_FIR(1) };
++
++ BUG_ON(plane == OMAP_DSS_GFX);
++
++ val = FLD_VAL(vinc, 27, 16) | FLD_VAL(hinc, 11, 0);
++ dispc_write_reg(fir_reg[plane-1], val);
++}
++
++static void _dispc_set_vid_accu0(enum omap_plane plane, int haccu, int vaccu)
++{
++ u32 val;
++ const struct dispc_reg ac0_reg[] = { DISPC_VID_ACCU0(0),
++ DISPC_VID_ACCU0(1) };
++
++ BUG_ON(plane == OMAP_DSS_GFX);
++
++ val = FLD_VAL(vaccu, 25, 16) | FLD_VAL(haccu, 9, 0);
++ dispc_write_reg(ac0_reg[plane-1], val);
++}
++
++static void _dispc_set_vid_accu1(enum omap_plane plane, int haccu, int vaccu)
++{
++ u32 val;
++ const struct dispc_reg ac1_reg[] = { DISPC_VID_ACCU1(0),
++ DISPC_VID_ACCU1(1) };
++
++ BUG_ON(plane == OMAP_DSS_GFX);
++
++ val = FLD_VAL(vaccu, 25, 16) | FLD_VAL(haccu, 9, 0);
++ dispc_write_reg(ac1_reg[plane-1], val);
++}
++
++
++static void _dispc_set_scaling(enum omap_plane plane,
++ u16 orig_width, u16 orig_height,
++ u16 out_width, u16 out_height,
++ bool ilace)
++{
++ int fir_hinc;
++ int fir_vinc;
++ int hscaleup, vscaleup, five_taps;
++ int fieldmode = 0;
++ int accu0 = 0;
++ int accu1 = 0;
++ u32 l;
++
++ BUG_ON(plane == OMAP_DSS_GFX);
++
++ hscaleup = orig_width <= out_width;
++ vscaleup = orig_height <= out_height;
++ five_taps = orig_height > out_height * 2;
++
++ _dispc_set_scale_coef(plane, hscaleup, vscaleup, five_taps);
++
++ if (!orig_width || orig_width == out_width)
++ fir_hinc = 0;
++ else
++ fir_hinc = 1024 * orig_width / out_width;
++
++ if (!orig_height || orig_height == out_height)
++ fir_vinc = 0;
++ else
++ fir_vinc = 1024 * orig_height / out_height;
++
++ _dispc_set_fir(plane, fir_hinc, fir_vinc);
++
++ l = dispc_read_reg(dispc_reg_att[plane]);
++ l &= ~((0x0f << 5) | (0x3 << 21));
++
++ l |= fir_hinc ? (1 << 5) : 0;
++ l |= fir_vinc ? (1 << 6) : 0;
++
++ l |= hscaleup ? 0 : (1 << 7);
++ l |= vscaleup ? 0 : (1 << 8);
++
++ l |= five_taps ? (1 << 21) : 0;
++ l |= five_taps ? (1 << 22) : 0;
++
++ dispc_write_reg(dispc_reg_att[plane], l);
++
++ if (ilace) {
++ if (fieldmode) {
++ accu0 = fir_vinc / 2;
++ accu1 = 0;
++ } else {
++ accu0 = 0;
++ accu1 = fir_vinc / 2;
++ if (accu1 >= 1024/2) {
++ accu0 = 1024/2;
++ accu1 -= accu0;
++ }
++ }
++ }
++
++ _dispc_set_vid_accu0(plane, 0, accu0);
++ _dispc_set_vid_accu1(plane, 0, accu1);
++}
++
++static void _dispc_set_rotation_attrs(enum omap_plane plane, u8 rotation,
++ bool mirroring, enum omap_color_mode color_mode)
++{
++ if (color_mode == OMAP_DSS_COLOR_YUV2 ||
++ color_mode == OMAP_DSS_COLOR_UYVY) {
++ int vidrot = 0;
++
++ if (mirroring) {
++ switch (rotation) {
++ case 0: vidrot = 2; break;
++ case 1: vidrot = 3; break;
++ case 2: vidrot = 0; break;
++ case 3: vidrot = 1; break;
++ }
++ } else {
++ switch (rotation) {
++ case 0: vidrot = 0; break;
++ case 1: vidrot = 1; break;
++ case 2: vidrot = 2; break;
++ case 3: vidrot = 1; break;
++ }
++ }
++
++ REG_FLD_MOD(dispc_reg_att[plane], vidrot, 13, 12);
++
++ if (rotation == 1 || rotation == 3)
++ REG_FLD_MOD(dispc_reg_att[plane], 0x1, 18, 18);
++ else
++ REG_FLD_MOD(dispc_reg_att[plane], 0x0, 18, 18);
++ } else {
++ REG_FLD_MOD(dispc_reg_att[plane], 0, 13, 12);
++ REG_FLD_MOD(dispc_reg_att[plane], 0, 18, 18);
++ }
++}
++
++static int pixinc(int pixels, u8 ps)
++{
++ if (pixels == 1)
++ return 1;
++ else if (pixels > 1)
++ return 1 + (pixels - 1) * ps;
++ else if (pixels < 0)
++ return 1 - (-pixels + 1) * ps;
++ else
++ BUG();
++}
++
++static void calc_rotation_offset(u8 rotation, bool mirror,
++ u16 screen_width,
++ u16 width, u16 height,
++ enum omap_color_mode color_mode, bool fieldmode,
++ unsigned *offset0, unsigned *offset1,
++ u16 *row_inc, u16 *pix_inc)
++{
++ u8 ps;
++ u16 fbw, fbh;
++
++ switch (color_mode) {
++ case OMAP_DSS_COLOR_RGB16:
++ case OMAP_DSS_COLOR_ARGB16:
++ ps = 2;
++ break;
++
++ case OMAP_DSS_COLOR_RGB24P:
++ ps = 3;
++ break;
++
++ case OMAP_DSS_COLOR_RGB24U:
++ case OMAP_DSS_COLOR_ARGB32:
++ case OMAP_DSS_COLOR_RGBA32:
++ case OMAP_DSS_COLOR_RGBX32:
++ ps = 4;
++ break;
++
++ case OMAP_DSS_COLOR_YUV2:
++ case OMAP_DSS_COLOR_UYVY:
++ ps = 2;
++ break;
++ default:
++ BUG();
++ return;
++ }
++
++ DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width,
++ width, height);
++
++ /* width & height are overlay sizes, convert to fb sizes */
++
++ if (rotation == 0 || rotation == 2) {
++ fbw = width;
++ fbh = height;
++ } else {
++ fbw = height;
++ fbh = width;
++ }
++
++ switch (rotation + mirror * 4) {
++ case 0:
++ *offset0 = 0;
++ if (fieldmode)
++ *offset1 = screen_width * ps;
++ else
++ *offset1 = 0;
++ *row_inc = pixinc(1 + (screen_width - fbw) +
++ (fieldmode ? screen_width : 0),
++ ps);
++ *pix_inc = pixinc(1, ps);
++ break;
++ case 1:
++ *offset0 = screen_width * (fbh - 1) * ps;
++ if (fieldmode)
++ *offset1 = *offset0 + ps;
++ else
++ *offset1 = *offset0;
++ *row_inc = pixinc(screen_width * (fbh - 1) + 1 +
++ (fieldmode ? 1 : 0), ps);
++ *pix_inc = pixinc(-screen_width, ps);
++ break;
++ case 2:
++ *offset0 = (screen_width * (fbh - 1) + fbw - 1) * ps;
++ if (fieldmode)
++ *offset1 = *offset0 - screen_width * ps;
++ else
++ *offset1 = *offset0;
++ *row_inc = pixinc(-1 -
++ (screen_width - fbw) -
++ (fieldmode ? screen_width : 0),
++ ps);
++ *pix_inc = pixinc(-1, ps);
++ break;
++ case 3:
++ *offset0 = (fbw - 1) * ps;
++ if (fieldmode)
++ *offset1 = *offset0 - ps;
++ else
++ *offset1 = *offset0;
++ *row_inc = pixinc(-screen_width * (fbh - 1) - 1 -
++ (fieldmode ? 1 : 0), ps);
++ *pix_inc = pixinc(screen_width, ps);
++ break;
++
++ /* mirroring */
++ case 0 + 4:
++ *offset0 = (fbw - 1) * ps;
++ if (fieldmode)
++ *offset1 = *offset0 + screen_width * ps;
++ else
++ *offset1 = *offset0;
++ *row_inc = pixinc(screen_width * 2 - 1 +
++ (fieldmode ? screen_width : 0),
++ ps);
++ *pix_inc = pixinc(-1, ps);
++ break;
++
++ case 1 + 4:
++ *offset0 = 0;
++ if (fieldmode)
++ *offset1 = *offset0 + screen_width * ps;
++ else
++ *offset1 = *offset0;
++ *row_inc = pixinc(-screen_width * (fbh - 1) + 1 +
++ (fieldmode ? 1 : 0),
++ ps);
++ *pix_inc = pixinc(screen_width, ps);
++ break;
++
++ case 2 + 4:
++ *offset0 = screen_width * (fbh - 1) * ps;
++ if (fieldmode)
++ *offset1 = *offset0 + screen_width * ps;
++ else
++ *offset1 = *offset0;
++ *row_inc = pixinc(1 - screen_width * 2 -
++ (fieldmode ? screen_width : 0),
++ ps);
++ *pix_inc = pixinc(1, ps);
++ break;
++
++ case 3 + 4:
++ *offset0 = (screen_width * (fbh - 1) + fbw - 1) * ps;
++ if (fieldmode)
++ *offset1 = *offset0 + screen_width * ps;
++ else
++ *offset1 = *offset0;
++ *row_inc = pixinc(screen_width * (fbh - 1) - 1 -
++ (fieldmode ? 1 : 0),
++ ps);
++ *pix_inc = pixinc(-screen_width, ps);
++ break;
++
++ default:
++ BUG();
++ }
++}
++
++static int _dispc_setup_plane(enum omap_plane plane,
++ enum omap_channel channel_out,
++ u32 paddr, u16 screen_width,
++ u16 pos_x, u16 pos_y,
++ u16 width, u16 height,
++ u16 out_width, u16 out_height,
++ enum omap_color_mode color_mode,
++ bool ilace,
++ u8 rotation, int mirror)
++{
++ const int maxdownscale = cpu_is_omap34xx() ? 4 : 2;
++ bool five_taps = height > out_height * 2;
++ bool fieldmode = 0;
++ int cconv = 0;
++ unsigned offset0, offset1;
++ u16 row_inc;
++ u16 pix_inc;
++
++ if (plane == OMAP_DSS_GFX) {
++ if (width != out_width || height != out_height)
++ return -EINVAL;
++
++ switch (color_mode) {
++ case OMAP_DSS_COLOR_ARGB16:
++ case OMAP_DSS_COLOR_RGB16:
++ case OMAP_DSS_COLOR_RGB24P:
++ case OMAP_DSS_COLOR_RGB24U:
++ case OMAP_DSS_COLOR_ARGB32:
++ case OMAP_DSS_COLOR_RGBA32:
++ case OMAP_DSS_COLOR_RGBX32:
++ break;
++
++ default:
++ return -EINVAL;
++ }
++ } else {
++ /* video plane */
++ if (width > (2048 >> five_taps))
++ return -EINVAL;
++
++ if (out_width < width / maxdownscale ||
++ out_width > width * 8)
++ return -EINVAL;
++
++ if (out_height < height / maxdownscale ||
++ out_height > height * 8)
++ return -EINVAL;
++
++ switch (color_mode) {
++ case OMAP_DSS_COLOR_RGB16:
++ case OMAP_DSS_COLOR_RGB24P:
++ case OMAP_DSS_COLOR_RGB24U:
++ case OMAP_DSS_COLOR_RGBX32:
++ break;
++
++ case OMAP_DSS_COLOR_ARGB16:
++ case OMAP_DSS_COLOR_ARGB32:
++ case OMAP_DSS_COLOR_RGBA32:
++ if (plane == OMAP_DSS_VIDEO1)
++ return -EINVAL;
++ break;
++
++ case OMAP_DSS_COLOR_YUV2:
++ case OMAP_DSS_COLOR_UYVY:
++ cconv = 1;
++ break;
++
++ default:
++ return -EINVAL;
++ }
++ }
++
++ if (ilace && height >= out_height)
++ fieldmode = 1;
++
++ calc_rotation_offset(rotation, mirror,
++ screen_width, width, height, color_mode,
++ fieldmode,
++ &offset0, &offset1, &row_inc, &pix_inc);
++
++ DSSDBG("offset0 %u, offset1 %u, row_inc %d, pix_inc %d\n",
++ offset0, offset1, row_inc, pix_inc);
++
++ if (ilace) {
++ if (fieldmode)
++ height /= 2;
++ pos_y /= 2;
++ out_height /= 2;
++
++ DSSDBG("adjusting for ilace: height %d, pos_y %d, "
++ "out_height %d\n",
++ height, pos_y, out_height);
++ }
++
++ _dispc_set_channel_out(plane, channel_out);
++ _dispc_set_color_mode(plane, color_mode);
++
++ _dispc_set_plane_ba0(plane, paddr + offset0);
++ _dispc_set_plane_ba1(plane, paddr + offset1);
++
++ _dispc_set_row_inc(plane, row_inc);
++ _dispc_set_pix_inc(plane, pix_inc);
++
++ DSSDBG("%d,%d %dx%d -> %dx%d\n", pos_x, pos_y, width, height,
++ out_width, out_height);
++
++ _dispc_set_plane_pos(plane, pos_x, pos_y);
++
++ _dispc_set_pic_size(plane, width, height);
++
++ if (plane != OMAP_DSS_GFX) {
++ _dispc_set_scaling(plane, width, height,
++ out_width, out_height,
++ ilace);
++ _dispc_set_vid_size(plane, out_width, out_height);
++ _dispc_set_vid_color_conv(plane, cconv);
++ }
++
++ _dispc_set_rotation_attrs(plane, rotation, mirror, color_mode);
++
++ return 0;
++}
++
++static void _dispc_enable_plane(enum omap_plane plane, bool enable)
++{
++ REG_FLD_MOD(dispc_reg_att[plane], enable ? 1 : 0, 0, 0);
++}
++
++static void dispc_disable_isr(void *data, u32 mask)
++{
++ struct completion *compl = data;
++ complete(compl);
++}
++
++static void _enable_lcd_out(bool enable)
++{
++ REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 0, 0);
++}
++
++void dispc_enable_lcd_out(bool enable)
++{
++ struct completion frame_done_completion;
++ bool is_on;
++ int r;
++
++ enable_clocks(1);
++
++ /* When we disable LCD output, we need to wait until frame is done.
++ * Otherwise the DSS is still working, and turning off the clocks
++ * prevents DSS from going to OFF mode */
++ is_on = REG_GET(DISPC_CONTROL, 0, 0);
++
++ if (!enable && is_on) {
++ init_completion(&frame_done_completion);
++
++ r = omap_dispc_register_isr(dispc_disable_isr,
++ &frame_done_completion,
++ DISPC_IRQ_FRAMEDONE);
++
++ if (r)
++ DSSERR("failed to register FRAMEDONE isr\n");
++ }
++
++ _enable_lcd_out(enable);
++
++ if (!enable && is_on) {
++ if (!wait_for_completion_timeout(&frame_done_completion,
++ msecs_to_jiffies(100)))
++ DSSERR("timeout waiting for FRAME DONE\n");
++
++ r = omap_dispc_unregister_isr(dispc_disable_isr,
++ &frame_done_completion,
++ DISPC_IRQ_FRAMEDONE);
++
++ if (r)
++ DSSERR("failed to unregister FRAMEDONE isr\n");
++ }
++
++ enable_clocks(0);
++}
++
++static void _enable_digit_out(bool enable)
++{
++ REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 1, 1);
++}
++
++void dispc_enable_digit_out(bool enable)
++{
++ struct completion frame_done_completion;
++ int r;
++
++ enable_clocks(1);
++
++ if (REG_GET(DISPC_CONTROL, 1, 1) == enable) {
++ enable_clocks(0);
++ return;
++ }
++
++ if (enable) {
++ /* When we enable digit output, we'll get an extra digit
++ * sync lost interrupt, that we need to ignore */
++ dispc.irq_error_mask &= ~DISPC_IRQ_SYNC_LOST_DIGIT;
++ omap_dispc_set_irqs();
++ }
++
++ /* When we disable digit output, we need to wait until fields are done.
++ * Otherwise the DSS is still working, and turning off the clocks
++ * prevents DSS from going to OFF mode. And when enabling, we need to
++ * wait for the extra sync losts */
++ init_completion(&frame_done_completion);
++
++ r = omap_dispc_register_isr(dispc_disable_isr, &frame_done_completion,
++ DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD);
++ if (r)
++ DSSERR("failed to register EVSYNC isr\n");
++
++ _enable_digit_out(enable);
++
++ /* XXX I understand from TRM that we should only wait for the
++ * current field to complete. But it seems we have to wait
++ * for both fields */
++ if (!wait_for_completion_timeout(&frame_done_completion,
++ msecs_to_jiffies(100)))
++ DSSERR("timeout waiting for EVSYNC\n");
++
++ if (!wait_for_completion_timeout(&frame_done_completion,
++ msecs_to_jiffies(100)))
++ DSSERR("timeout waiting for EVSYNC\n");
++
++ r = omap_dispc_unregister_isr(dispc_disable_isr,
++ &frame_done_completion,
++ DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD);
++ if (r)
++ DSSERR("failed to unregister EVSYNC isr\n");
++
++ if (enable) {
++ dispc.irq_error_mask = DISPC_IRQ_MASK_ERROR;
++ dispc_write_reg(DISPC_IRQSTATUS, DISPC_IRQ_SYNC_LOST_DIGIT);
++ omap_dispc_set_irqs();
++ }
++
++ enable_clocks(0);
++}
++
++void dispc_lcd_enable_signal_polarity(bool act_high)
++{
++ enable_clocks(1);
++ REG_FLD_MOD(DISPC_CONTROL, act_high ? 1 : 0, 29, 29);
++ enable_clocks(0);
++}
++
++void dispc_lcd_enable_signal(bool enable)
++{
++ enable_clocks(1);
++ REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 28, 28);
++ enable_clocks(0);
++}
++
++void dispc_pck_free_enable(bool enable)
++{
++ enable_clocks(1);
++ REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 27, 27);
++ enable_clocks(0);
++}
++
++void dispc_enable_fifohandcheck(bool enable)
++{
++ enable_clocks(1);
++ REG_FLD_MOD(DISPC_CONFIG, enable ? 1 : 0, 16, 16);
++ enable_clocks(0);
++}
++
++
++void dispc_set_lcd_display_type(enum omap_lcd_display_type type)
++{
++ int mode;
++
++ switch (type) {
++ case OMAP_DSS_LCD_DISPLAY_STN:
++ mode = 0;
++ break;
++
++ case OMAP_DSS_LCD_DISPLAY_TFT:
++ mode = 1;
++ break;
++
++ default:
++ BUG();
++ return;
++ }
++
++ enable_clocks(1);
++ REG_FLD_MOD(DISPC_CONTROL, mode, 3, 3);
++ enable_clocks(0);
++}
++
++void dispc_set_loadmode(enum omap_dss_load_mode mode)
++{
++ enable_clocks(1);
++ REG_FLD_MOD(DISPC_CONFIG, mode, 2, 1);
++ enable_clocks(0);
++}
++
++
++void dispc_set_default_color(enum omap_channel channel, u32 color)
++{
++ const struct dispc_reg def_reg[] = { DISPC_DEFAULT_COLOR0,
++ DISPC_DEFAULT_COLOR1 };
++
++ enable_clocks(1);
++ dispc_write_reg(def_reg[channel], color);
++ enable_clocks(0);
++}
++
++u32 dispc_get_default_color(enum omap_channel channel)
++{
++ const struct dispc_reg def_reg[] = { DISPC_DEFAULT_COLOR0,
++ DISPC_DEFAULT_COLOR1 };
++ u32 l;
++
++ BUG_ON(channel != OMAP_DSS_CHANNEL_DIGIT &&
++ channel != OMAP_DSS_CHANNEL_LCD);
++
++ enable_clocks(1);
++ l = dispc_read_reg(def_reg[channel]);
++ enable_clocks(0);
++
++ return l;
++}
++
++void dispc_set_trans_key(enum omap_channel ch,
++ enum omap_dss_color_key_type type,
++ u32 trans_key)
++{
++ const struct dispc_reg tr_reg[] = {
++ DISPC_TRANS_COLOR0, DISPC_TRANS_COLOR1 };
++
++ enable_clocks(1);
++ if (ch == OMAP_DSS_CHANNEL_LCD)
++ REG_FLD_MOD(DISPC_CONFIG, type, 11, 11);
++ else /* OMAP_DSS_CHANNEL_DIGIT */
++ REG_FLD_MOD(DISPC_CONFIG, type, 13, 13);
++
++ dispc_write_reg(tr_reg[ch], trans_key);
++ enable_clocks(0);
++}
++
++void dispc_get_trans_key(enum omap_channel ch,
++ enum omap_dss_color_key_type *type,
++ u32 *trans_key)
++{
++ const struct dispc_reg tr_reg[] = {
++ DISPC_TRANS_COLOR0, DISPC_TRANS_COLOR1 };
++
++ enable_clocks(1);
++ if (type) {
++ if (ch == OMAP_DSS_CHANNEL_LCD)
++ *type = REG_GET(DISPC_CONFIG, 11, 11) >> 11;
++ else if (ch == OMAP_DSS_CHANNEL_DIGIT)
++ *type = REG_GET(DISPC_CONFIG, 13, 13) >> 13;
++ else
++ BUG();
++ }
++
++ if (trans_key)
++ *trans_key = dispc_read_reg(tr_reg[ch]);
++ enable_clocks(0);
++}
++
++void dispc_enable_trans_key(enum omap_channel ch, bool enable)
++{
++ enable_clocks(1);
++ if (ch == OMAP_DSS_CHANNEL_LCD)
++ REG_FLD_MOD(DISPC_CONFIG, enable, 10, 10);
++ else /* OMAP_DSS_CHANNEL_DIGIT */
++ REG_FLD_MOD(DISPC_CONFIG, enable, 12, 12);
++ enable_clocks(0);
++}
++
++bool dispc_trans_key_enabled(enum omap_channel ch)
++{
++ bool enabled;
++
++ enable_clocks(1);
++ if (ch == OMAP_DSS_CHANNEL_LCD)
++ enabled = REG_GET(DISPC_CONFIG, 10, 10);
++ else if (ch == OMAP_DSS_CHANNEL_DIGIT)
++ enabled = REG_GET(DISPC_CONFIG, 12, 12);
++ else BUG();
++ enable_clocks(0);
++
++ return enabled;
++}
++
++
++void dispc_set_tft_data_lines(u8 data_lines)
++{
++ int code;
++
++ switch (data_lines) {
++ case 12:
++ code = 0;
++ break;
++ case 16:
++ code = 1;
++ break;
++ case 18:
++ code = 2;
++ break;
++ case 24:
++ code = 3;
++ break;
++ default:
++ BUG();
++ return;
++ }
++
++ enable_clocks(1);
++ REG_FLD_MOD(DISPC_CONTROL, code, 9, 8);
++ enable_clocks(0);
++}
++
++void dispc_set_parallel_interface_mode(enum omap_parallel_interface_mode mode)
++{
++ u32 l;
++ int stallmode;
++ int gpout0 = 1;
++ int gpout1;
++
++ switch (mode) {
++ case OMAP_DSS_PARALLELMODE_BYPASS:
++ stallmode = 0;
++ gpout1 = 1;
++ break;
++
++ case OMAP_DSS_PARALLELMODE_RFBI:
++ stallmode = 1;
++ gpout1 = 0;
++ break;
++
++ case OMAP_DSS_PARALLELMODE_DSI:
++ stallmode = 1;
++ gpout1 = 1;
++ break;
++
++ default:
++ BUG();
++ return;
++ }
++
++ enable_clocks(1);
++
++ l = dispc_read_reg(DISPC_CONTROL);
++
++ l = FLD_MOD(l, stallmode, 11, 11);
++ l = FLD_MOD(l, gpout0, 15, 15);
++ l = FLD_MOD(l, gpout1, 16, 16);
++
++ dispc_write_reg(DISPC_CONTROL, l);
++
++ enable_clocks(0);
++}
++
++static void _dispc_set_lcd_timings(int hsw, int hfp, int hbp,
++ int vsw, int vfp, int vbp)
++{
++ u32 timing_h, timing_v;
++
++ if (cpu_is_omap24xx() || omap_rev() < OMAP3430_REV_ES3_0) {
++ BUG_ON(hsw < 1 || hsw > 64);
++ BUG_ON(hfp < 1 || hfp > 256);
++ BUG_ON(hbp < 1 || hbp > 256);
++
++ BUG_ON(vsw < 1 || vsw > 64);
++ BUG_ON(vfp < 0 || vfp > 255);
++ BUG_ON(vbp < 0 || vbp > 255);
++
++ timing_h = FLD_VAL(hsw-1, 5, 0) | FLD_VAL(hfp-1, 15, 8) |
++ FLD_VAL(hbp-1, 27, 20);
++
++ timing_v = FLD_VAL(vsw-1, 5, 0) | FLD_VAL(vfp, 15, 8) |
++ FLD_VAL(vbp, 27, 20);
++ } else {
++ BUG_ON(hsw < 1 || hsw > 256);
++ BUG_ON(hfp < 1 || hfp > 4096);
++ BUG_ON(hbp < 1 || hbp > 4096);
++
++ BUG_ON(vsw < 1 || vsw > 256);
++ BUG_ON(vfp < 0 || vfp > 4095);
++ BUG_ON(vbp < 0 || vbp > 4095);
++
++ timing_h = FLD_VAL(hsw-1, 7, 0) | FLD_VAL(hfp-1, 19, 8) |
++ FLD_VAL(hbp-1, 31, 20);
++
++ timing_v = FLD_VAL(vsw-1, 7, 0) | FLD_VAL(vfp, 19, 8) |
++ FLD_VAL(vbp, 31, 20);
++ }
++
++ enable_clocks(1);
++ dispc_write_reg(DISPC_TIMING_H, timing_h);
++ dispc_write_reg(DISPC_TIMING_V, timing_v);
++ enable_clocks(0);
++}
++
++/* change name to mode? */
++void dispc_set_lcd_timings(struct omap_video_timings *timings)
++{
++ unsigned xtot, ytot;
++ unsigned long ht, vt;
++
++ _dispc_set_lcd_timings(timings->hsw, timings->hfp, timings->hbp,
++ timings->vsw, timings->vfp, timings->vbp);
++
++ dispc_set_lcd_size(timings->x_res, timings->y_res);
++
++ xtot = timings->x_res + timings->hfp + timings->hsw + timings->hbp;
++ ytot = timings->y_res + timings->vfp + timings->vsw + timings->vbp;
++
++ ht = (timings->pixel_clock * 1000) / xtot;
++ vt = (timings->pixel_clock * 1000) / xtot / ytot;
++
++ DSSDBG("xres %u yres %u\n", timings->x_res, timings->y_res);
++ DSSDBG("pck %u\n", timings->pixel_clock);
++ DSSDBG("hsw %d hfp %d hbp %d vsw %d vfp %d vbp %d\n",
++ timings->hsw, timings->hfp, timings->hbp,
++ timings->vsw, timings->vfp, timings->vbp);
++
++ DSSDBG("hsync %luHz, vsync %luHz\n", ht, vt);
++}
++
++void dispc_set_lcd_divisor(u16 lck_div, u16 pck_div)
++{
++ BUG_ON(lck_div < 1);
++ BUG_ON(pck_div < 2);
++
++ enable_clocks(1);
++ dispc_write_reg(DISPC_DIVISOR,
++ FLD_VAL(lck_div, 23, 16) | FLD_VAL(pck_div, 7, 0));
++ enable_clocks(0);
++}
++
++static void dispc_get_lcd_divisor(int *lck_div, int *pck_div)
++{
++ u32 l;
++ l = dispc_read_reg(DISPC_DIVISOR);
++ *lck_div = FLD_GET(l, 23, 16);
++ *pck_div = FLD_GET(l, 7, 0);
++}
++
++unsigned long dispc_fclk_rate(void)
++{
++ unsigned long r = 0;
++
++ if (dss_get_dispc_clk_source() == 0)
++ r = dss_clk_get_rate(DSS_CLK_FCK1);
++ else
++#ifdef CONFIG_OMAP2_DSS_DSI
++ r = dsi_get_dsi1_pll_rate();
++#else
++ BUG();
++#endif
++ return r;
++}
++
++unsigned long dispc_pclk_rate(void)
++{
++ int lcd, pcd;
++ unsigned long r;
++ u32 l;
++
++ l = dispc_read_reg(DISPC_DIVISOR);
++
++ lcd = FLD_GET(l, 23, 16);
++ pcd = FLD_GET(l, 7, 0);
++
++ r = dispc_fclk_rate();
++
++ return r / lcd / pcd;
++}
++
++void dispc_dump_clocks(struct seq_file *s)
++{
++ int lcd, pcd;
++
++ enable_clocks(1);
++
++ dispc_get_lcd_divisor(&lcd, &pcd);
++
++ seq_printf(s, "- dispc -\n");
++
++ seq_printf(s, "dispc fclk source = %s\n",
++ dss_get_dispc_clk_source() == 0 ?
++ "dss1_alwon_fclk" : "dsi1_pll_fclk");
++
++ seq_printf(s, "pixel clk = %lu / %d / %d = %lu\n",
++ dispc_fclk_rate(),
++ lcd, pcd,
++ dispc_pclk_rate());
++
++ enable_clocks(0);
++}
++
++void dispc_dump_regs(struct seq_file *s)
++{
++#define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, dispc_read_reg(r))
++
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ DUMPREG(DISPC_REVISION);
++ DUMPREG(DISPC_SYSCONFIG);
++ DUMPREG(DISPC_SYSSTATUS);
++ DUMPREG(DISPC_IRQSTATUS);
++ DUMPREG(DISPC_IRQENABLE);
++ DUMPREG(DISPC_CONTROL);
++ DUMPREG(DISPC_CONFIG);
++ DUMPREG(DISPC_CAPABLE);
++ DUMPREG(DISPC_DEFAULT_COLOR0);
++ DUMPREG(DISPC_DEFAULT_COLOR1);
++ DUMPREG(DISPC_TRANS_COLOR0);
++ DUMPREG(DISPC_TRANS_COLOR1);
++ DUMPREG(DISPC_LINE_STATUS);
++ DUMPREG(DISPC_LINE_NUMBER);
++ DUMPREG(DISPC_TIMING_H);
++ DUMPREG(DISPC_TIMING_V);
++ DUMPREG(DISPC_POL_FREQ);
++ DUMPREG(DISPC_DIVISOR);
++ DUMPREG(DISPC_GLOBAL_ALPHA);
++ DUMPREG(DISPC_SIZE_DIG);
++ DUMPREG(DISPC_SIZE_LCD);
++
++ DUMPREG(DISPC_GFX_BA0);
++ DUMPREG(DISPC_GFX_BA1);
++ DUMPREG(DISPC_GFX_POSITION);
++ DUMPREG(DISPC_GFX_SIZE);
++ DUMPREG(DISPC_GFX_ATTRIBUTES);
++ DUMPREG(DISPC_GFX_FIFO_THRESHOLD);
++ DUMPREG(DISPC_GFX_FIFO_SIZE_STATUS);
++ DUMPREG(DISPC_GFX_ROW_INC);
++ DUMPREG(DISPC_GFX_PIXEL_INC);
++ DUMPREG(DISPC_GFX_WINDOW_SKIP);
++ DUMPREG(DISPC_GFX_TABLE_BA);
++
++ DUMPREG(DISPC_DATA_CYCLE1);
++ DUMPREG(DISPC_DATA_CYCLE2);
++ DUMPREG(DISPC_DATA_CYCLE3);
++
++ DUMPREG(DISPC_CPR_COEF_R);
++ DUMPREG(DISPC_CPR_COEF_G);
++ DUMPREG(DISPC_CPR_COEF_B);
++
++ DUMPREG(DISPC_GFX_PRELOAD);
++
++ DUMPREG(DISPC_VID_BA0(0));
++ DUMPREG(DISPC_VID_BA1(0));
++ DUMPREG(DISPC_VID_POSITION(0));
++ DUMPREG(DISPC_VID_SIZE(0));
++ DUMPREG(DISPC_VID_ATTRIBUTES(0));
++ DUMPREG(DISPC_VID_FIFO_THRESHOLD(0));
++ DUMPREG(DISPC_VID_FIFO_SIZE_STATUS(0));
++ DUMPREG(DISPC_VID_ROW_INC(0));
++ DUMPREG(DISPC_VID_PIXEL_INC(0));
++ DUMPREG(DISPC_VID_FIR(0));
++ DUMPREG(DISPC_VID_PICTURE_SIZE(0));
++ DUMPREG(DISPC_VID_ACCU0(0));
++ DUMPREG(DISPC_VID_ACCU1(0));
++
++ DUMPREG(DISPC_VID_BA0(1));
++ DUMPREG(DISPC_VID_BA1(1));
++ DUMPREG(DISPC_VID_POSITION(1));
++ DUMPREG(DISPC_VID_SIZE(1));
++ DUMPREG(DISPC_VID_ATTRIBUTES(1));
++ DUMPREG(DISPC_VID_FIFO_THRESHOLD(1));
++ DUMPREG(DISPC_VID_FIFO_SIZE_STATUS(1));
++ DUMPREG(DISPC_VID_ROW_INC(1));
++ DUMPREG(DISPC_VID_PIXEL_INC(1));
++ DUMPREG(DISPC_VID_FIR(1));
++ DUMPREG(DISPC_VID_PICTURE_SIZE(1));
++ DUMPREG(DISPC_VID_ACCU0(1));
++ DUMPREG(DISPC_VID_ACCU1(1));
++
++ DUMPREG(DISPC_VID_FIR_COEF_H(0, 0));
++ DUMPREG(DISPC_VID_FIR_COEF_H(0, 1));
++ DUMPREG(DISPC_VID_FIR_COEF_H(0, 2));
++ DUMPREG(DISPC_VID_FIR_COEF_H(0, 3));
++ DUMPREG(DISPC_VID_FIR_COEF_H(0, 4));
++ DUMPREG(DISPC_VID_FIR_COEF_H(0, 5));
++ DUMPREG(DISPC_VID_FIR_COEF_H(0, 6));
++ DUMPREG(DISPC_VID_FIR_COEF_H(0, 7));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(0, 0));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(0, 1));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(0, 2));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(0, 3));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(0, 4));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(0, 5));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(0, 6));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(0, 7));
++ DUMPREG(DISPC_VID_CONV_COEF(0, 0));
++ DUMPREG(DISPC_VID_CONV_COEF(0, 1));
++ DUMPREG(DISPC_VID_CONV_COEF(0, 2));
++ DUMPREG(DISPC_VID_CONV_COEF(0, 3));
++ DUMPREG(DISPC_VID_CONV_COEF(0, 4));
++ DUMPREG(DISPC_VID_FIR_COEF_V(0, 0));
++ DUMPREG(DISPC_VID_FIR_COEF_V(0, 1));
++ DUMPREG(DISPC_VID_FIR_COEF_V(0, 2));
++ DUMPREG(DISPC_VID_FIR_COEF_V(0, 3));
++ DUMPREG(DISPC_VID_FIR_COEF_V(0, 4));
++ DUMPREG(DISPC_VID_FIR_COEF_V(0, 5));
++ DUMPREG(DISPC_VID_FIR_COEF_V(0, 6));
++ DUMPREG(DISPC_VID_FIR_COEF_V(0, 7));
++
++ DUMPREG(DISPC_VID_FIR_COEF_H(1, 0));
++ DUMPREG(DISPC_VID_FIR_COEF_H(1, 1));
++ DUMPREG(DISPC_VID_FIR_COEF_H(1, 2));
++ DUMPREG(DISPC_VID_FIR_COEF_H(1, 3));
++ DUMPREG(DISPC_VID_FIR_COEF_H(1, 4));
++ DUMPREG(DISPC_VID_FIR_COEF_H(1, 5));
++ DUMPREG(DISPC_VID_FIR_COEF_H(1, 6));
++ DUMPREG(DISPC_VID_FIR_COEF_H(1, 7));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(1, 0));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(1, 1));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(1, 2));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(1, 3));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(1, 4));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(1, 5));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(1, 6));
++ DUMPREG(DISPC_VID_FIR_COEF_HV(1, 7));
++ DUMPREG(DISPC_VID_CONV_COEF(1, 0));
++ DUMPREG(DISPC_VID_CONV_COEF(1, 1));
++ DUMPREG(DISPC_VID_CONV_COEF(1, 2));
++ DUMPREG(DISPC_VID_CONV_COEF(1, 3));
++ DUMPREG(DISPC_VID_CONV_COEF(1, 4));
++ DUMPREG(DISPC_VID_FIR_COEF_V(1, 0));
++ DUMPREG(DISPC_VID_FIR_COEF_V(1, 1));
++ DUMPREG(DISPC_VID_FIR_COEF_V(1, 2));
++ DUMPREG(DISPC_VID_FIR_COEF_V(1, 3));
++ DUMPREG(DISPC_VID_FIR_COEF_V(1, 4));
++ DUMPREG(DISPC_VID_FIR_COEF_V(1, 5));
++ DUMPREG(DISPC_VID_FIR_COEF_V(1, 6));
++ DUMPREG(DISPC_VID_FIR_COEF_V(1, 7));
++
++ DUMPREG(DISPC_VID_PRELOAD(0));
++ DUMPREG(DISPC_VID_PRELOAD(1));
++
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++#undef DUMPREG
++}
++
++static void _dispc_set_pol_freq(bool onoff, bool rf, bool ieo, bool ipc,
++ bool ihs, bool ivs, u8 acbi, u8 acb)
++{
++ u32 l = 0;
++
++ DSSDBG("onoff %d rf %d ieo %d ipc %d ihs %d ivs %d acbi %d acb %d\n",
++ onoff, rf, ieo, ipc, ihs, ivs, acbi, acb);
++
++ l |= FLD_VAL(onoff, 17, 17);
++ l |= FLD_VAL(rf, 16, 16);
++ l |= FLD_VAL(ieo, 15, 15);
++ l |= FLD_VAL(ipc, 14, 14);
++ l |= FLD_VAL(ihs, 13, 13);
++ l |= FLD_VAL(ivs, 12, 12);
++ l |= FLD_VAL(acbi, 11, 8);
++ l |= FLD_VAL(acb, 7, 0);
++
++ enable_clocks(1);
++ dispc_write_reg(DISPC_POL_FREQ, l);
++ enable_clocks(0);
++}
++
++void dispc_set_pol_freq(struct omap_panel *panel)
++{
++ _dispc_set_pol_freq((panel->config & OMAP_DSS_LCD_ONOFF) != 0,
++ (panel->config & OMAP_DSS_LCD_RF) != 0,
++ (panel->config & OMAP_DSS_LCD_IEO) != 0,
++ (panel->config & OMAP_DSS_LCD_IPC) != 0,
++ (panel->config & OMAP_DSS_LCD_IHS) != 0,
++ (panel->config & OMAP_DSS_LCD_IVS) != 0,
++ panel->acbi, panel->acb);
++}
++
++void find_lck_pck_divs(bool is_tft, unsigned long req_pck, unsigned long fck,
++ u16 *lck_div, u16 *pck_div)
++{
++ u16 pcd_min = is_tft ? 2 : 3;
++ unsigned long best_pck;
++ u16 best_ld, cur_ld;
++ u16 best_pd, cur_pd;
++
++ best_pck = 0;
++ best_ld = 0;
++ best_pd = 0;
++
++ for (cur_ld = 1; cur_ld <= 255; ++cur_ld) {
++ unsigned long lck = fck / cur_ld;
++
++ for (cur_pd = pcd_min; cur_pd <= 255; ++cur_pd) {
++ unsigned long pck = lck / cur_pd;
++ long old_delta = abs(best_pck - req_pck);
++ long new_delta = abs(pck - req_pck);
++
++ if (best_pck == 0 || new_delta < old_delta) {
++ best_pck = pck;
++ best_ld = cur_ld;
++ best_pd = cur_pd;
++
++ if (pck == req_pck)
++ goto found;
++ }
++
++ if (pck < req_pck)
++ break;
++ }
++
++ if (lck / pcd_min < req_pck)
++ break;
++ }
++
++found:
++ *lck_div = best_ld;
++ *pck_div = best_pd;
++}
++
++int dispc_calc_clock_div(bool is_tft, unsigned long req_pck,
++ struct dispc_clock_info *cinfo)
++{
++ unsigned long prate;
++ struct dispc_clock_info cur, best;
++ int match = 0;
++ int min_fck_per_pck;
++ unsigned long fck_rate = dss_clk_get_rate(DSS_CLK_FCK1);
++
++ if (cpu_is_omap34xx())
++ prate = clk_get_rate(clk_get_parent(dispc.dpll4_m4_ck));
++ else
++ prate = 0;
++
++ if (req_pck == dispc.cache_req_pck &&
++ ((cpu_is_omap34xx() && prate == dispc.cache_prate) ||
++ dispc.cache_cinfo.fck == fck_rate)) {
++ DSSDBG("dispc clock info found from cache.\n");
++ *cinfo = dispc.cache_cinfo;
++ return 0;
++ }
++
++ min_fck_per_pck = CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK;
++
++ if (min_fck_per_pck &&
++ req_pck * min_fck_per_pck > DISPC_MAX_FCK) {
++ DSSERR("Requested pixel clock not possible with the current "
++ "OMAP2_DSS_MIN_FCK_PER_PCK setting. Turning "
++ "the constraint off.\n");
++ min_fck_per_pck = 0;
++ }
++
++retry:
++ memset(&cur, 0, sizeof(cur));
++ memset(&best, 0, sizeof(best));
++
++ if (cpu_is_omap24xx()) {
++ /* XXX can we change the clock on omap2? */
++ cur.fck = dss_clk_get_rate(DSS_CLK_FCK1);
++ cur.fck_div = 1;
++
++ match = 1;
++
++ find_lck_pck_divs(is_tft, req_pck, cur.fck,
++ &cur.lck_div, &cur.pck_div);
++
++ cur.lck = cur.fck / cur.lck_div;
++ cur.pck = cur.lck / cur.pck_div;
++
++ best = cur;
++
++ goto found;
++ } else if (cpu_is_omap34xx()) {
++ for (cur.fck_div = 16; cur.fck_div > 0; --cur.fck_div) {
++ cur.fck = prate / cur.fck_div * 2;
++
++ if (cur.fck > DISPC_MAX_FCK)
++ continue;
++
++ if (min_fck_per_pck &&
++ cur.fck < req_pck * min_fck_per_pck)
++ continue;
++
++ match = 1;
++
++ find_lck_pck_divs(is_tft, req_pck, cur.fck,
++ &cur.lck_div, &cur.pck_div);
++
++ cur.lck = cur.fck / cur.lck_div;
++ cur.pck = cur.lck / cur.pck_div;
++
++ if (abs(cur.pck - req_pck) < abs(best.pck - req_pck)) {
++ best = cur;
++
++ if (cur.pck == req_pck)
++ goto found;
++ }
++ }
++ } else {
++ BUG();
++ }
++
++found:
++ if (!match) {
++ if (min_fck_per_pck) {
++ DSSERR("Could not find suitable clock settings.\n"
++ "Turning FCK/PCK constraint off and"
++ "trying again.\n");
++ min_fck_per_pck = 0;
++ goto retry;
++ }
++
++ DSSERR("Could not find suitable clock settings.\n");
++
++ return -EINVAL;
++ }
++
++ if (cinfo)
++ *cinfo = best;
++
++ dispc.cache_req_pck = req_pck;
++ dispc.cache_prate = prate;
++ dispc.cache_cinfo = best;
++
++ return 0;
++}
++
++int dispc_set_clock_div(struct dispc_clock_info *cinfo)
++{
++ unsigned long prate;
++ int r;
++
++ if (cpu_is_omap34xx()) {
++ prate = clk_get_rate(clk_get_parent(dispc.dpll4_m4_ck));
++ DSSDBG("dpll4_m4 = %ld\n", prate);
++ }
++
++ DSSDBG("fck = %ld (%d)\n", cinfo->fck, cinfo->fck_div);
++ DSSDBG("lck = %ld (%d)\n", cinfo->lck, cinfo->lck_div);
++ DSSDBG("pck = %ld (%d)\n", cinfo->pck, cinfo->pck_div);
++
++ if (cpu_is_omap34xx()) {
++ r = clk_set_rate(dispc.dpll4_m4_ck, prate / cinfo->fck_div);
++ if (r)
++ return r;
++ }
++
++ dispc_set_lcd_divisor(cinfo->lck_div, cinfo->pck_div);
++
++ return 0;
++}
++
++int dispc_get_clock_div(struct dispc_clock_info *cinfo)
++{
++ cinfo->fck = dss_clk_get_rate(DSS_CLK_FCK1);
++
++ if (cpu_is_omap34xx()) {
++ unsigned long prate;
++ prate = clk_get_rate(clk_get_parent(dispc.dpll4_m4_ck));
++ cinfo->fck_div = prate / (cinfo->fck / 2);
++ } else {
++ cinfo->fck_div = 0;
++ }
++
++ cinfo->lck_div = REG_GET(DISPC_DIVISOR, 23, 16);
++ cinfo->pck_div = REG_GET(DISPC_DIVISOR, 7, 0);
++
++ cinfo->lck = cinfo->fck / cinfo->lck_div;
++ cinfo->pck = cinfo->lck / cinfo->pck_div;
++
++ return 0;
++}
++
++static void omap_dispc_set_irqs(void)
++{
++ unsigned long flags;
++ u32 mask = dispc.irq_error_mask;
++ int i;
++ struct omap_dispc_isr_data *isr_data;
++
++ spin_lock_irqsave(&dispc.irq_lock, flags);
++
++ for (i = 0; i < DISPC_MAX_NR_ISRS; i++) {
++ isr_data = &dispc.registered_isr[i];
++
++ if (isr_data->isr == NULL)
++ continue;
++
++ mask |= isr_data->mask;
++ }
++
++ enable_clocks(1);
++ dispc_write_reg(DISPC_IRQENABLE, mask);
++ enable_clocks(0);
++
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
++}
++
++int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
++{
++ int i;
++ int ret;
++ unsigned long flags;
++ struct omap_dispc_isr_data *isr_data;
++
++ if (isr == NULL)
++ return -EINVAL;
++
++ spin_lock_irqsave(&dispc.irq_lock, flags);
++
++ /* check for duplicate entry */
++ for (i = 0; i < DISPC_MAX_NR_ISRS; i++) {
++ isr_data = &dispc.registered_isr[i];
++ if (isr_data->isr == isr && isr_data->arg == arg &&
++ isr_data->mask == mask) {
++ ret = -EINVAL;
++ goto err;
++ }
++ }
++
++ isr_data = NULL;
++ ret = -EBUSY;
++
++ for (i = 0; i < DISPC_MAX_NR_ISRS; i++) {
++ isr_data = &dispc.registered_isr[i];
++
++ if (isr_data->isr != NULL)
++ continue;
++
++ isr_data->isr = isr;
++ isr_data->arg = arg;
++ isr_data->mask = mask;
++ ret = 0;
++
++ break;
++ }
++err:
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
++
++ if (ret == 0)
++ omap_dispc_set_irqs();
++
++ return ret;
++}
++EXPORT_SYMBOL(omap_dispc_register_isr);
++
++int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
++{
++ int i;
++ unsigned long flags;
++ int ret = -EINVAL;
++ struct omap_dispc_isr_data *isr_data;
++
++ spin_lock_irqsave(&dispc.irq_lock, flags);
++
++ for (i = 0; i < DISPC_MAX_NR_ISRS; i++) {
++ isr_data = &dispc.registered_isr[i];
++ if (isr_data->isr != isr || isr_data->arg != arg ||
++ isr_data->mask != mask)
++ continue;
++
++ /* found the correct isr */
++
++ isr_data->isr = NULL;
++ isr_data->arg = NULL;
++ isr_data->mask = 0;
++
++ ret = 0;
++ break;
++ }
++
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
++
++ if (ret == 0)
++ omap_dispc_set_irqs();
++
++ return ret;
++}
++EXPORT_SYMBOL(omap_dispc_unregister_isr);
++
++#ifdef DEBUG
++static void print_irq_status(u32 status)
++{
++ if ((status & dispc.irq_error_mask) == 0)
++ return;
++
++ printk(KERN_DEBUG "DISPC IRQ: 0x%x: ", status);
++
++#define PIS(x) \
++ if (status & DISPC_IRQ_##x) \
++ printk(#x " ");
++ PIS(GFX_FIFO_UNDERFLOW);
++ PIS(OCP_ERR);
++ PIS(VID1_FIFO_UNDERFLOW);
++ PIS(VID2_FIFO_UNDERFLOW);
++ PIS(SYNC_LOST);
++ PIS(SYNC_LOST_DIGIT);
++#undef PIS
++
++ printk("\n");
++}
++#endif
++
++/* Called from dss.c. Note that we don't touch clocks here,
++ * but we presume they are on because we got an IRQ. However,
++ * an irq handler may turn the clocks off, so we may not have
++ * clock later in the function. */
++void dispc_irq_handler(void)
++{
++ int i;
++ u32 irqstatus = dispc_read_reg(DISPC_IRQSTATUS);
++ u32 handledirqs = 0;
++ u32 unhandled_errors;
++ struct omap_dispc_isr_data *isr_data;
++
++#ifdef DEBUG
++ if (dss_debug)
++ print_irq_status(irqstatus);
++#endif
++ /* Ack the interrupt. Do it here before clocks are possibly turned
++ * off */
++ dispc_write_reg(DISPC_IRQSTATUS, irqstatus);
++
++ for (i = 0; i < DISPC_MAX_NR_ISRS; i++) {
++ isr_data = &dispc.registered_isr[i];
++
++ if (!isr_data->isr)
++ continue;
++
++ if (isr_data->mask & irqstatus) {
++ isr_data->isr(isr_data->arg, irqstatus);
++ handledirqs |= isr_data->mask;
++ }
++ }
++
++ unhandled_errors = irqstatus & ~handledirqs & dispc.irq_error_mask;
++
++ if (unhandled_errors) {
++ spin_lock(&dispc.error_lock);
++ dispc.error_irqs |= unhandled_errors;
++ spin_unlock(&dispc.error_lock);
++
++ dispc.irq_error_mask &= ~unhandled_errors;
++ omap_dispc_set_irqs();
++
++ schedule_work(&dispc.error_work);
++ }
++}
++
++static void dispc_error_worker(struct work_struct *work)
++{
++ int i;
++ u32 errors;
++ unsigned long flags;
++
++ spin_lock_irqsave(&dispc.error_lock, flags);
++ errors = dispc.error_irqs;
++ dispc.error_irqs = 0;
++ spin_unlock_irqrestore(&dispc.error_lock, flags);
++
++ if (errors & DISPC_IRQ_GFX_FIFO_UNDERFLOW) {
++ DSSERR("GFX_FIFO_UNDERFLOW, disabling GFX\n");
++ for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
++ struct omap_overlay *ovl;
++ ovl = omap_dss_get_overlay(i);
++
++ if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
++ continue;
++
++ if (ovl->id == 0) {
++ dispc_enable_plane(ovl->id, 0);
++ dispc_go(ovl->manager->id);
++ mdelay(50);
++ break;
++ }
++ }
++ }
++
++ if (errors & DISPC_IRQ_VID1_FIFO_UNDERFLOW) {
++ DSSERR("VID1_FIFO_UNDERFLOW, disabling VID1\n");
++ for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
++ struct omap_overlay *ovl;
++ ovl = omap_dss_get_overlay(i);
++
++ if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
++ continue;
++
++ if (ovl->id == 1) {
++ dispc_enable_plane(ovl->id, 0);
++ dispc_go(ovl->manager->id);
++ mdelay(50);
++ break;
++ }
++ }
++ }
++
++ if (errors & DISPC_IRQ_VID2_FIFO_UNDERFLOW) {
++ DSSERR("VID2_FIFO_UNDERFLOW, disabling VID2\n");
++ for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
++ struct omap_overlay *ovl;
++ ovl = omap_dss_get_overlay(i);
++
++ if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
++ continue;
++
++ if (ovl->id == 2) {
++ dispc_enable_plane(ovl->id, 0);
++ dispc_go(ovl->manager->id);
++ mdelay(50);
++ break;
++ }
++ }
++ }
++
++ if (errors & DISPC_IRQ_SYNC_LOST) {
++ DSSERR("SYNC_LOST, disabling LCD\n");
++ for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
++ struct omap_overlay_manager *mgr;
++ mgr = omap_dss_get_overlay_manager(i);
++
++ if (mgr->id == OMAP_DSS_CHANNEL_LCD) {
++ mgr->display->disable(mgr->display);
++ break;
++ }
++ }
++ }
++
++ if (errors & DISPC_IRQ_SYNC_LOST_DIGIT) {
++ DSSERR("SYNC_LOST_DIGIT, disabling TV\n");
++ for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
++ struct omap_overlay_manager *mgr;
++ mgr = omap_dss_get_overlay_manager(i);
++
++ if (mgr->id == OMAP_DSS_CHANNEL_DIGIT) {
++ mgr->display->disable(mgr->display);
++ break;
++ }
++ }
++ }
++
++ if (errors & DISPC_IRQ_OCP_ERR) {
++ DSSERR("OCP_ERR\n");
++ for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
++ struct omap_overlay_manager *mgr;
++ mgr = omap_dss_get_overlay_manager(i);
++
++ if (mgr->caps & OMAP_DSS_OVL_CAP_DISPC)
++ mgr->display->disable(mgr->display);
++ }
++ }
++
++ dispc.irq_error_mask |= errors;
++ omap_dispc_set_irqs();
++}
++
++int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout)
++{
++ void dispc_irq_wait_handler(void *data, u32 mask)
++ {
++ complete((struct completion *)data);
++ }
++
++ int r;
++ DECLARE_COMPLETION_ONSTACK(completion);
++
++ r = omap_dispc_register_isr(dispc_irq_wait_handler, &completion,
++ irqmask);
++
++ if (r)
++ return r;
++
++ timeout = wait_for_completion_timeout(&completion, timeout);
++
++ omap_dispc_unregister_isr(dispc_irq_wait_handler, &completion, irqmask);
++
++ if (timeout == 0)
++ return -ETIMEDOUT;
++
++ if (timeout == -ERESTARTSYS)
++ return -ERESTARTSYS;
++
++ return 0;
++}
++
++int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
++ unsigned long timeout)
++{
++ void dispc_irq_wait_handler(void *data, u32 mask)
++ {
++ complete((struct completion *)data);
++ }
++
++ int r;
++ DECLARE_COMPLETION_ONSTACK(completion);
++
++ r = omap_dispc_register_isr(dispc_irq_wait_handler, &completion,
++ irqmask);
++
++ if (r)
++ return r;
++
++ timeout = wait_for_completion_interruptible_timeout(&completion,
++ timeout);
++
++ omap_dispc_unregister_isr(dispc_irq_wait_handler, &completion, irqmask);
++
++ if (timeout == 0)
++ return -ETIMEDOUT;
++
++ if (timeout == -ERESTARTSYS)
++ return -ERESTARTSYS;
++
++ return 0;
++}
++
++#ifdef CONFIG_OMAP2_DSS_FAKE_VSYNC
++void dispc_fake_vsync_irq(void)
++{
++ u32 irqstatus = DISPC_IRQ_VSYNC;
++ int i;
++
++ for (i = 0; i < DISPC_MAX_NR_ISRS; i++) {
++ struct omap_dispc_isr_data *isr_data;
++ isr_data = &dispc.registered_isr[i];
++
++ if (!isr_data->isr)
++ continue;
++
++ if (isr_data->mask & irqstatus)
++ isr_data->isr(isr_data->arg, irqstatus);
++ }
++}
++#endif
++
++static void _omap_dispc_initialize_irq(void)
++{
++ memset(dispc.registered_isr, 0, sizeof(dispc.registered_isr));
++
++ dispc.irq_error_mask = DISPC_IRQ_MASK_ERROR;
++
++ /* there's SYNC_LOST_DIGIT waiting after enabling the DSS,
++ * so clear it */
++ dispc_write_reg(DISPC_IRQSTATUS, dispc_read_reg(DISPC_IRQSTATUS));
++
++ omap_dispc_set_irqs();
++}
++
++static void _omap_dispc_initial_config(void)
++{
++ u32 l;
++
++ l = dispc_read_reg(DISPC_SYSCONFIG);
++ l = FLD_MOD(l, 2, 13, 12); /* MIDLEMODE: smart standby */
++ l = FLD_MOD(l, 2, 4, 3); /* SIDLEMODE: smart idle */
++ l = FLD_MOD(l, 1, 2, 2); /* ENWAKEUP */
++ l = FLD_MOD(l, 1, 0, 0); /* AUTOIDLE */
++ dispc_write_reg(DISPC_SYSCONFIG, l);
++
++ /* FUNCGATED */
++ REG_FLD_MOD(DISPC_CONFIG, 1, 9, 9);
++
++ /* L3 firewall setting: enable access to OCM RAM */
++ if (cpu_is_omap24xx())
++ __raw_writel(0x402000b0, IO_ADDRESS(0x680050a0));
++
++ _dispc_setup_color_conv_coef();
++
++ dispc_set_loadmode(OMAP_DSS_LOAD_FRAME_ONLY);
++}
++
++int dispc_init(void)
++{
++ u32 rev;
++
++ spin_lock_init(&dispc.irq_lock);
++ spin_lock_init(&dispc.error_lock);
++
++ INIT_WORK(&dispc.error_work, dispc_error_worker);
++
++ dispc.base = ioremap(DISPC_BASE, DISPC_SZ_REGS);
++ if (!dispc.base) {
++ DSSERR("can't ioremap DISPC\n");
++ return -ENOMEM;
++ }
++
++ if (cpu_is_omap34xx()) {
++ dispc.dpll4_m4_ck = clk_get(NULL, "dpll4_m4_ck");
++ if (IS_ERR(dispc.dpll4_m4_ck)) {
++ DSSERR("Failed to get dpll4_m4_ck\n");
++ return -ENODEV;
++ }
++ }
++
++ enable_clocks(1);
++
++ _omap_dispc_initial_config();
++
++ _omap_dispc_initialize_irq();
++
++ dispc_save_context();
++
++ rev = dispc_read_reg(DISPC_REVISION);
++ printk(KERN_INFO "OMAP DISPC rev %d.%d\n",
++ FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0));
++
++ enable_clocks(0);
++
++ return 0;
++}
++
++void dispc_exit(void)
++{
++ if (cpu_is_omap34xx())
++ clk_put(dispc.dpll4_m4_ck);
++ iounmap(dispc.base);
++}
++
++int dispc_enable_plane(enum omap_plane plane, bool enable)
++{
++ DSSDBG("dispc_enable_plane %d, %d\n", plane, enable);
++
++ enable_clocks(1);
++ _dispc_enable_plane(plane, enable);
++ enable_clocks(0);
++
++ return 0;
++}
++
++int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
++ u32 paddr, u16 screen_width,
++ u16 pos_x, u16 pos_y,
++ u16 width, u16 height,
++ u16 out_width, u16 out_height,
++ enum omap_color_mode color_mode,
++ bool ilace,
++ u8 rotation, bool mirror)
++{
++ int r = 0;
++
++ DSSDBG("dispc_setup_plane %d, ch %d, pa %x, sw %d, %d,%d, %dx%d -> "
++ "%dx%d, ilace %d, cmode %x, rot %d, mir %d\n",
++ plane, channel_out, paddr, screen_width, pos_x, pos_y,
++ width, height,
++ out_width, out_height,
++ ilace, color_mode,
++ rotation, mirror);
++
++ enable_clocks(1);
++
++ r = _dispc_setup_plane(plane, channel_out,
++ paddr, screen_width,
++ pos_x, pos_y,
++ width, height,
++ out_width, out_height,
++ color_mode, ilace,
++ rotation, mirror);
++
++ enable_clocks(0);
++
++ return r;
++}
++
++static int dispc_is_intersecting(int x1, int y1, int w1, int h1,
++ int x2, int y2, int w2, int h2)
++{
++ if (x1 >= (x2+w2))
++ return 0;
++
++ if ((x1+w1) <= x2)
++ return 0;
++
++ if (y1 >= (y2+h2))
++ return 0;
++
++ if ((y1+h1) <= y2)
++ return 0;
++
++ return 1;
++}
++
++static int dispc_is_overlay_scaled(struct omap_overlay_info *pi)
++{
++ if (pi->width != pi->out_width)
++ return 1;
++
++ if (pi->height != pi->out_height)
++ return 1;
++
++ return 0;
++}
++
++/* returns the area that needs updating */
++void dispc_setup_partial_planes(struct omap_display *display,
++ u16 *xi, u16 *yi, u16 *wi, u16 *hi)
++{
++ struct omap_overlay_manager *mgr;
++ int i;
++
++ int x, y, w, h;
++
++ x = *xi;
++ y = *yi;
++ w = *wi;
++ h = *hi;
++
++ DSSDBG("dispc_setup_partial_planes %d,%d %dx%d\n",
++ *xi, *yi, *wi, *hi);
++
++
++ mgr = display->manager;
++
++ if (!mgr) {
++ DSSDBG("no manager\n");
++ return;
++ }
++
++ for (i = 0; i < mgr->num_overlays; i++) {
++ struct omap_overlay *ovl;
++ struct omap_overlay_info *pi;
++ ovl = mgr->overlays[i];
++
++ if (ovl->manager != mgr)
++ continue;
++
++ if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0)
++ continue;
++
++ pi = &ovl->info;
++
++ if (!pi->enabled)
++ continue;
++ /*
++ * If the plane is intersecting and scaled, we
++ * enlarge the update region to accomodate the
++ * whole area
++ */
++
++ if (dispc_is_intersecting(x, y, w, h,
++ pi->pos_x, pi->pos_y,
++ pi->out_width, pi->out_height)) {
++ if (dispc_is_overlay_scaled(pi)) {
++
++ int x1, y1, x2, y2;
++
++ if (x > pi->pos_x)
++ x1 = pi->pos_x;
++ else
++ x1 = x;
++
++ if (y > pi->pos_y)
++ y1 = pi->pos_y;
++ else
++ y1 = y;
++
++ if ((x + w) < (pi->pos_x + pi->out_width))
++ x2 = pi->pos_x + pi->out_width;
++ else
++ x2 = x + w;
++
++ if ((y + h) < (pi->pos_y + pi->out_height))
++ y2 = pi->pos_y + pi->out_height;
++ else
++ y2 = y + h;
++
++ x = x1;
++ y = y1;
++ w = x2 - x1;
++ h = y2 - y1;
++
++ DSSDBG("Update area after enlarge due to "
++ "scaling %d, %d %dx%d\n",
++ x, y, w, h);
++ }
++ }
++ }
++
++ for (i = 0; i < mgr->num_overlays; i++) {
++ struct omap_overlay *ovl = mgr->overlays[i];
++ struct omap_overlay_info *pi = &ovl->info;
++
++ int px = pi->pos_x;
++ int py = pi->pos_y;
++ int pw = pi->width;
++ int ph = pi->height;
++ int pow = pi->out_width;
++ int poh = pi->out_height;
++ u32 pa = pi->paddr;
++ int psw = pi->screen_width;
++ int bpp;
++
++ if (ovl->manager != mgr)
++ continue;
++
++ /*
++ * If plane is not enabled or the update region
++ * does not intersect with the plane in question,
++ * we really disable the plane from hardware
++ */
++
++ if (!pi->enabled ||
++ !dispc_is_intersecting(x, y, w, h,
++ px, py, pow, poh)) {
++ dispc_enable_plane(ovl->id, 0);
++ continue;
++ }
++
++ switch (pi->color_mode) {
++ case OMAP_DSS_COLOR_RGB16:
++ case OMAP_DSS_COLOR_ARGB16:
++ case OMAP_DSS_COLOR_YUV2:
++ case OMAP_DSS_COLOR_UYVY:
++ bpp = 16;
++ break;
++
++ case OMAP_DSS_COLOR_RGB24P:
++ bpp = 24;
++ break;
++
++ case OMAP_DSS_COLOR_RGB24U:
++ case OMAP_DSS_COLOR_ARGB32:
++ case OMAP_DSS_COLOR_RGBA32:
++ case OMAP_DSS_COLOR_RGBX32:
++ bpp = 32;
++ break;
++
++ default:
++ BUG();
++ return;
++ }
++
++ if (x > pi->pos_x) {
++ px = 0;
++ pw -= (x - pi->pos_x);
++ pa += (x - pi->pos_x) * bpp / 8;
++ } else {
++ px = pi->pos_x - x;
++ }
++
++ if (y > pi->pos_y) {
++ py = 0;
++ ph -= (y - pi->pos_y);
++ pa += (y - pi->pos_y) * psw * bpp / 8;
++ } else {
++ py = pi->pos_y - y;
++ }
++
++ if (w < (px+pw))
++ pw -= (px+pw) - (w);
++
++ if (h < (py+ph))
++ ph -= (py+ph) - (h);
++
++ /* Can't scale the GFX plane */
++ if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0 ||
++ dispc_is_overlay_scaled(pi) == 0) {
++ pow = pw;
++ poh = ph;
++ }
++
++ DSSDBG("calc plane %d, %x, sw %d, %d,%d, %dx%d -> %dx%d\n",
++ ovl->id, pa, psw, px, py, pw, ph, pow, poh);
++
++ dispc_setup_plane(ovl->id, mgr->id,
++ pa, psw,
++ px, py,
++ pw, ph,
++ pow, poh,
++ pi->color_mode, 0,
++ pi->rotation, // XXX rotation probably wrong
++ pi->mirror);
++
++ dispc_enable_plane(ovl->id, 1);
++ }
++
++ *xi = x;
++ *yi = y;
++ *wi = w;
++ *hi = h;
++
++}
++
+diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
+new file mode 100644
+index 0000000..9aaf392
+--- /dev/null
++++ b/drivers/video/omap2/dss/display.c
+@@ -0,0 +1,693 @@
++/*
++ * linux/drivers/video/omap2/dss/display.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "DISPLAY"
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/jiffies.h>
++#include <linux/list.h>
++#include <linux/platform_device.h>
++
++#include <mach/display.h>
++#include "dss.h"
++
++static int num_displays;
++static LIST_HEAD(display_list);
++
++static ssize_t display_name_show(struct omap_display *display, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%s\n", display->name);
++}
++
++static ssize_t display_enabled_show(struct omap_display *display, char *buf)
++{
++ bool enabled = display->state != OMAP_DSS_DISPLAY_DISABLED;
++
++ return snprintf(buf, PAGE_SIZE, "%d\n", enabled);
++}
++
++static ssize_t display_enabled_store(struct omap_display *display,
++ const char *buf, size_t size)
++{
++ bool enabled, r;
++
++ enabled = simple_strtoul(buf, NULL, 10);
++
++ if (enabled != (display->state != OMAP_DSS_DISPLAY_DISABLED)) {
++ if (enabled) {
++ r = display->enable(display);
++ if (r)
++ return r;
++ } else {
++ display->disable(display);
++ }
++ }
++
++ return size;
++}
++
++static ssize_t display_upd_mode_show(struct omap_display *display, char *buf)
++{
++ enum omap_dss_update_mode mode = OMAP_DSS_UPDATE_AUTO;
++ if (display->get_update_mode)
++ mode = display->get_update_mode(display);
++ return snprintf(buf, PAGE_SIZE, "%d\n", mode);
++}
++
++static ssize_t display_upd_mode_store(struct omap_display *display,
++ const char *buf, size_t size)
++{
++ int val, r;
++ enum omap_dss_update_mode mode;
++
++ val = simple_strtoul(buf, NULL, 10);
++
++ switch (val) {
++ case OMAP_DSS_UPDATE_DISABLED:
++ case OMAP_DSS_UPDATE_AUTO:
++ case OMAP_DSS_UPDATE_MANUAL:
++ mode = (enum omap_dss_update_mode)val;
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ if ((r = display->set_update_mode(display, mode)))
++ return r;
++
++ return size;
++}
++
++static ssize_t display_tear_show(struct omap_display *display, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d\n",
++ display->get_te ? display->get_te(display) : 0);
++}
++
++static ssize_t display_tear_store(struct omap_display *display,
++ const char *buf, size_t size)
++{
++ unsigned long te;
++ int r;
++
++ if (!display->enable_te || !display->get_te)
++ return -ENOENT;
++
++ te = simple_strtoul(buf, NULL, 0);
++
++ if ((r = display->enable_te(display, te)))
++ return r;
++
++ return size;
++}
++
++static ssize_t display_timings_show(struct omap_display *display, char *buf)
++{
++ struct omap_video_timings t;
++
++ if (!display->get_timings)
++ return -ENOENT;
++
++ display->get_timings(display, &t);
++
++ return snprintf(buf, PAGE_SIZE, "%u,%u/%u/%u/%u,%u/%u/%u/%u\n",
++ t.pixel_clock,
++ t.x_res, t.hfp, t.hbp, t.hsw,
++ t.y_res, t.vfp, t.vbp, t.vsw);
++}
++
++static ssize_t display_timings_store(struct omap_display *display,
++ const char *buf, size_t size)
++{
++ struct omap_video_timings t;
++ int r, found;
++
++ if (!display->set_timings || !display->check_timings)
++ return -ENOENT;
++
++ found = 0;
++#ifdef CONFIG_OMAP2_DSS_VENC
++ if (strncmp("pal", buf, 3) == 0) {
++ t = omap_dss_pal_timings;
++ found = 1;
++ } else if (strncmp("ntsc", buf, 4) == 0) {
++ t = omap_dss_ntsc_timings;
++ found = 1;
++ }
++#endif
++ if (!found && sscanf(buf, "%u,%hu/%hu/%hu/%hu,%hu/%hu/%hu/%hu",
++ &t.pixel_clock,
++ &t.x_res, &t.hfp, &t.hbp, &t.hsw,
++ &t.y_res, &t.vfp, &t.vbp, &t.vsw) != 9)
++ return -EINVAL;
++
++ if ((r = display->check_timings(display, &t)))
++ return r;
++
++ display->set_timings(display, &t);
++
++ return size;
++}
++
++static ssize_t display_rotate_show(struct omap_display *display, char *buf)
++{
++ int rotate;
++ if (!display->get_rotate)
++ return -ENOENT;
++ rotate = display->get_rotate(display);
++ return snprintf(buf, PAGE_SIZE, "%u\n", rotate);
++}
++
++static ssize_t display_rotate_store(struct omap_display *display,
++ const char *buf, size_t size)
++{
++ unsigned long rot;
++ int r;
++
++ if (!display->set_rotate || !display->get_rotate)
++ return -ENOENT;
++
++ rot = simple_strtoul(buf, NULL, 0);
++
++ if ((r = display->set_rotate(display, rot)))
++ return r;
++
++ return size;
++}
++
++static ssize_t display_mirror_show(struct omap_display *display, char *buf)
++{
++ int mirror;
++ if (!display->get_mirror)
++ return -ENOENT;
++ mirror = display->get_mirror(display);
++ return snprintf(buf, PAGE_SIZE, "%u\n", mirror);
++}
++
++static ssize_t display_mirror_store(struct omap_display *display,
++ const char *buf, size_t size)
++{
++ unsigned long mirror;
++ int r;
++
++ if (!display->set_mirror || !display->get_mirror)
++ return -ENOENT;
++
++ mirror = simple_strtoul(buf, NULL, 0);
++
++ if ((r = display->set_mirror(display, mirror)))
++ return r;
++
++ return size;
++}
++
++static ssize_t display_panel_name_show(struct omap_display *display, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%s\n",
++ display->panel ? display->panel->name : "");
++}
++
++static ssize_t display_ctrl_name_show(struct omap_display *display, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%s\n",
++ display->ctrl ? display->ctrl->name : "");
++}
++
++struct display_attribute {
++ struct attribute attr;
++ ssize_t (*show)(struct omap_display *, char *);
++ ssize_t (*store)(struct omap_display *, const char *, size_t);
++};
++
++#define DISPLAY_ATTR(_name, _mode, _show, _store) \
++ struct display_attribute display_attr_##_name = \
++ __ATTR(_name, _mode, _show, _store)
++
++static DISPLAY_ATTR(name, S_IRUGO, display_name_show, NULL);
++static DISPLAY_ATTR(enabled, S_IRUGO|S_IWUSR,
++ display_enabled_show, display_enabled_store);
++static DISPLAY_ATTR(update_mode, S_IRUGO|S_IWUSR,
++ display_upd_mode_show, display_upd_mode_store);
++static DISPLAY_ATTR(tear_elim, S_IRUGO|S_IWUSR,
++ display_tear_show, display_tear_store);
++static DISPLAY_ATTR(timings, S_IRUGO|S_IWUSR,
++ display_timings_show, display_timings_store);
++static DISPLAY_ATTR(rotate, S_IRUGO|S_IWUSR,
++ display_rotate_show, display_rotate_store);
++static DISPLAY_ATTR(mirror, S_IRUGO|S_IWUSR,
++ display_mirror_show, display_mirror_store);
++static DISPLAY_ATTR(panel_name, S_IRUGO, display_panel_name_show, NULL);
++static DISPLAY_ATTR(ctrl_name, S_IRUGO, display_ctrl_name_show, NULL);
++
++static struct attribute *display_sysfs_attrs[] = {
++ &display_attr_name.attr,
++ &display_attr_enabled.attr,
++ &display_attr_update_mode.attr,
++ &display_attr_tear_elim.attr,
++ &display_attr_timings.attr,
++ &display_attr_rotate.attr,
++ &display_attr_mirror.attr,
++ &display_attr_panel_name.attr,
++ &display_attr_ctrl_name.attr,
++ NULL
++};
++
++static ssize_t display_attr_show(struct kobject *kobj, struct attribute *attr, char *buf)
++{
++ struct omap_display *display;
++ struct display_attribute *display_attr;
++
++ display = container_of(kobj, struct omap_display, kobj);
++ display_attr = container_of(attr, struct display_attribute, attr);
++
++ if (!display_attr->show)
++ return -ENOENT;
++
++ return display_attr->show(display, buf);
++}
++
++static ssize_t display_attr_store(struct kobject *kobj, struct attribute *attr,
++ const char *buf, size_t size)
++{
++ struct omap_display *display;
++ struct display_attribute *display_attr;
++
++ display = container_of(kobj, struct omap_display, kobj);
++ display_attr = container_of(attr, struct display_attribute, attr);
++
++ if (!display_attr->store)
++ return -ENOENT;
++
++ return display_attr->store(display, buf, size);
++}
++
++static struct sysfs_ops display_sysfs_ops = {
++ .show = display_attr_show,
++ .store = display_attr_store,
++};
++
++static struct kobj_type display_ktype = {
++ .sysfs_ops = &display_sysfs_ops,
++ .default_attrs = display_sysfs_attrs,
++};
++
++static void default_get_resolution(struct omap_display *display,
++ u16 *xres, u16 *yres)
++{
++ *xres = display->panel->timings.x_res;
++ *yres = display->panel->timings.y_res;
++}
++
++static void default_configure_overlay(struct omap_overlay *ovl)
++{
++ unsigned low, high, size;
++ enum omap_burst_size burst;
++ enum omap_plane plane = ovl->id;
++
++ burst = OMAP_DSS_BURST_16x32;
++ size = 16 * 32 / 8;
++
++ dispc_set_burst_size(plane, burst);
++
++ high = dispc_get_plane_fifo_size(plane) - 1;
++ low = dispc_get_plane_fifo_size(plane) - size;
++
++ dispc_setup_plane_fifo(plane, low, high);
++}
++
++static int default_wait_vsync(struct omap_display *display)
++{
++ unsigned long timeout = msecs_to_jiffies(500);
++ u32 irq;
++
++ if (display->type == OMAP_DISPLAY_TYPE_VENC)
++ irq = DISPC_IRQ_EVSYNC_ODD;
++ else
++ irq = DISPC_IRQ_VSYNC;
++
++ return omap_dispc_wait_for_irq_interruptible_timeout(irq, timeout);
++}
++
++static int default_get_recommended_bpp(struct omap_display *display)
++{
++ if (display->panel->recommended_bpp)
++ return display->panel->recommended_bpp;
++
++ switch (display->type) {
++ case OMAP_DISPLAY_TYPE_DPI:
++ if (display->hw_config.u.dpi.data_lines == 24)
++ return 24;
++ else
++ return 16;
++
++ case OMAP_DISPLAY_TYPE_DBI:
++ case OMAP_DISPLAY_TYPE_DSI:
++ if (display->ctrl->pixel_size == 24)
++ return 24;
++ else
++ return 16;
++ case OMAP_DISPLAY_TYPE_VENC:
++ case OMAP_DISPLAY_TYPE_SDI:
++ return 24;
++ return 24;
++ default:
++ BUG();
++ }
++}
++
++void dss_init_displays(struct platform_device *pdev)
++{
++ struct omap_dss_board_info *pdata = pdev->dev.platform_data;
++ int i, r;
++
++ INIT_LIST_HEAD(&display_list);
++
++ num_displays = 0;
++
++ for (i = 0; i < pdata->num_displays; ++i) {
++ struct omap_display *display;
++
++ switch (pdata->displays[i]->type) {
++ case OMAP_DISPLAY_TYPE_DPI:
++#ifdef CONFIG_OMAP2_DSS_RFBI
++ case OMAP_DISPLAY_TYPE_DBI:
++#endif
++#ifdef CONFIG_OMAP2_DSS_SDI
++ case OMAP_DISPLAY_TYPE_SDI:
++#endif
++#ifdef CONFIG_OMAP2_DSS_DSI
++ case OMAP_DISPLAY_TYPE_DSI:
++#endif
++#ifdef CONFIG_OMAP2_DSS_VENC
++ case OMAP_DISPLAY_TYPE_VENC:
++#endif
++ break;
++ default:
++ DSSERR("Support for display '%s' not compiled in.\n",
++ pdata->displays[i]->name);
++ continue;
++ }
++
++ display = kzalloc(sizeof(*display), GFP_KERNEL);
++
++ /*atomic_set(&display->ref_count, 0);*/
++ display->ref_count = 0;
++
++ display->hw_config = *pdata->displays[i];
++ display->type = pdata->displays[i]->type;
++ display->name = pdata->displays[i]->name;
++
++ display->get_resolution = default_get_resolution;
++ display->get_recommended_bpp = default_get_recommended_bpp;
++ display->configure_overlay = default_configure_overlay;
++ display->wait_vsync = default_wait_vsync;
++
++ switch (display->type) {
++ case OMAP_DISPLAY_TYPE_DPI:
++ dpi_init_display(display);
++ break;
++#ifdef CONFIG_OMAP2_DSS_RFBI
++ case OMAP_DISPLAY_TYPE_DBI:
++ rfbi_init_display(display);
++ break;
++#endif
++#ifdef CONFIG_OMAP2_DSS_VENC
++ case OMAP_DISPLAY_TYPE_VENC:
++ venc_init_display(display);
++ break;
++#endif
++#ifdef CONFIG_OMAP2_DSS_SDI
++ case OMAP_DISPLAY_TYPE_SDI:
++ sdi_init_display(display);
++ break;
++#endif
++#ifdef CONFIG_OMAP2_DSS_DSI
++ case OMAP_DISPLAY_TYPE_DSI:
++ dsi_init_display(display);
++ break;
++#endif
++ default:
++ BUG();
++ }
++
++ r = kobject_init_and_add(&display->kobj, &display_ktype,
++ &pdev->dev.kobj, "display%d", num_displays);
++
++ if (r) {
++ DSSERR("failed to create sysfs file\n");
++ continue;
++ }
++
++ num_displays++;
++
++ list_add_tail(&display->list, &display_list);
++ }
++}
++
++void dss_uninit_displays(struct platform_device *pdev)
++{
++ struct omap_display *display;
++
++ while (!list_empty(&display_list)) {
++ display = list_first_entry(&display_list,
++ struct omap_display, list);
++ list_del(&display->list);
++ kobject_del(&display->kobj);
++ kobject_put(&display->kobj);
++ kfree(display);
++ }
++
++ num_displays = 0;
++}
++
++int dss_suspend_all_displays(void)
++{
++ int r;
++ struct omap_display *display;
++
++ list_for_each_entry(display, &display_list, list) {
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE) {
++ display->activate_after_resume = 0;
++ continue;
++ }
++
++ if (!display->suspend) {
++ DSSERR("display '%s' doesn't implement suspend\n",
++ display->name);
++ r = -ENOSYS;
++ goto err;
++ }
++
++ r = display->suspend(display);
++
++ if (r)
++ goto err;
++
++ display->activate_after_resume = 1;
++ }
++
++ return 0;
++err:
++ /* resume all displays that were suspended */
++ dss_resume_all_displays();
++ return r;
++}
++
++int dss_resume_all_displays(void)
++{
++ int r;
++ struct omap_display *display;
++
++ list_for_each_entry(display, &display_list, list) {
++ if (display->activate_after_resume && display->resume) {
++ r = display->resume(display);
++ if (r)
++ return r;
++ }
++
++ display->activate_after_resume = 0;
++ }
++
++ return 0;
++}
++
++int omap_dss_get_num_displays(void)
++{
++ return num_displays;
++}
++EXPORT_SYMBOL(omap_dss_get_num_displays);
++
++struct omap_display *dss_get_display(int no)
++{
++ int i = 0;
++ struct omap_display *display;
++
++ list_for_each_entry(display, &display_list, list) {
++ if (i++ == no)
++ return display;
++ }
++
++ return NULL;
++}
++
++struct omap_display *omap_dss_get_display(int no)
++{
++ struct omap_display *display;
++
++ display = dss_get_display(no);
++
++ if (!display)
++ return NULL;
++
++ switch (display->type) {
++ case OMAP_DISPLAY_TYPE_VENC:
++ break;
++
++ case OMAP_DISPLAY_TYPE_DPI:
++ case OMAP_DISPLAY_TYPE_SDI:
++ if (display->panel == NULL)
++ return NULL;
++ break;
++
++ case OMAP_DISPLAY_TYPE_DBI:
++ case OMAP_DISPLAY_TYPE_DSI:
++ if (display->panel == NULL || display->ctrl == NULL)
++ return NULL;
++ break;
++
++ default:
++ return NULL;
++ }
++
++ if (display->ctrl) {
++ if (!try_module_get(display->ctrl->owner))
++ goto err0;
++
++ if (display->ctrl->init)
++ if (display->ctrl->init(display) != 0)
++ goto err1;
++ }
++
++ if (display->panel) {
++ if (!try_module_get(display->panel->owner))
++ goto err2;
++
++ if (display->panel->init)
++ if (display->panel->init(display) != 0)
++ goto err3;
++ }
++
++ display->ref_count++;
++ /*
++ if (atomic_cmpxchg(&display->ref_count, 0, 1) != 0)
++ return 0;
++*/
++
++ return display;
++err3:
++ if (display->panel)
++ module_put(display->panel->owner);
++err2:
++ if (display->ctrl && display->ctrl->cleanup)
++ display->ctrl->cleanup(display);
++err1:
++ if (display->ctrl)
++ module_put(display->ctrl->owner);
++err0:
++ return NULL;
++}
++EXPORT_SYMBOL(omap_dss_get_display);
++
++void omap_dss_put_display(struct omap_display *display)
++{
++ if (--display->ref_count > 0)
++ return;
++/*
++ if (atomic_cmpxchg(&display->ref_count, 1, 0) != 1)
++ return;
++*/
++ if (display->ctrl) {
++ if (display->ctrl->cleanup)
++ display->ctrl->cleanup(display);
++ module_put(display->ctrl->owner);
++ }
++
++ if (display->panel) {
++ if (display->panel->cleanup)
++ display->panel->cleanup(display);
++ module_put(display->panel->owner);
++ }
++}
++EXPORT_SYMBOL(omap_dss_put_display);
++
++void omap_dss_register_ctrl(struct omap_ctrl *ctrl)
++{
++ struct omap_display *display;
++
++ list_for_each_entry(display, &display_list, list) {
++ if (display->hw_config.ctrl_name &&
++ strcmp(display->hw_config.ctrl_name, ctrl->name) == 0) {
++ display->ctrl = ctrl;
++ DSSDBG("ctrl '%s' registered\n", ctrl->name);
++ }
++ }
++}
++EXPORT_SYMBOL(omap_dss_register_ctrl);
++
++void omap_dss_register_panel(struct omap_panel *panel)
++{
++ struct omap_display *display;
++
++ list_for_each_entry(display, &display_list, list) {
++ if (display->hw_config.panel_name &&
++ strcmp(display->hw_config.panel_name, panel->name) == 0) {
++ display->panel = panel;
++ DSSDBG("panel '%s' registered\n", panel->name);
++ }
++ }
++}
++EXPORT_SYMBOL(omap_dss_register_panel);
++
++void omap_dss_unregister_ctrl(struct omap_ctrl *ctrl)
++{
++ struct omap_display *display;
++
++ list_for_each_entry(display, &display_list, list) {
++ if (display->hw_config.ctrl_name &&
++ strcmp(display->hw_config.ctrl_name, ctrl->name) == 0)
++ display->ctrl = NULL;
++ }
++}
++EXPORT_SYMBOL(omap_dss_unregister_ctrl);
++
++void omap_dss_unregister_panel(struct omap_panel *panel)
++{
++ struct omap_display *display;
++
++ list_for_each_entry(display, &display_list, list) {
++ if (display->hw_config.panel_name &&
++ strcmp(display->hw_config.panel_name, panel->name) == 0)
++ display->panel = NULL;
++ }
++}
++EXPORT_SYMBOL(omap_dss_unregister_panel);
+diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
+new file mode 100644
+index 0000000..71fffca
+--- /dev/null
++++ b/drivers/video/omap2/dss/dpi.c
+@@ -0,0 +1,393 @@
++/*
++ * linux/drivers/video/omap2/dss/dpi.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <linux/kernel.h>
++#include <linux/clk.h>
++#include <linux/delay.h>
++#include <linux/errno.h>
++
++#include <mach/board.h>
++#include <mach/display.h>
++#include <mach/cpu.h>
++
++#include "dss.h"
++
++static struct {
++ int update_enabled;
++} dpi;
++
++#ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL
++static int dpi_set_dsi_clk(bool is_tft, unsigned long pck_req,
++ unsigned long *fck, int *lck_div, int *pck_div)
++{
++ struct dsi_clock_info cinfo;
++ int r;
++
++ r = dsi_pll_calc_pck(is_tft, pck_req, &cinfo);
++ if (r)
++ return r;
++
++ r = dsi_pll_program(&cinfo);
++ if (r)
++ return r;
++
++ dss_select_clk_source(0, 1);
++
++ dispc_set_lcd_divisor(cinfo.lck_div, cinfo.pck_div);
++
++ *fck = cinfo.dsi1_pll_fclk;
++ *lck_div = cinfo.lck_div;
++ *pck_div = cinfo.pck_div;
++
++ return 0;
++}
++#else
++static int dpi_set_dispc_clk(bool is_tft, unsigned long pck_req,
++ unsigned long *fck, int *lck_div, int *pck_div)
++{
++ struct dispc_clock_info cinfo;
++ int r;
++
++ r = dispc_calc_clock_div(is_tft, pck_req, &cinfo);
++ if (r)
++ return r;
++
++ r = dispc_set_clock_div(&cinfo);
++ if (r)
++ return r;
++
++ *fck = cinfo.fck;
++ *lck_div = cinfo.lck_div;
++ *pck_div = cinfo.pck_div;
++
++ return 0;
++}
++#endif
++
++static int dpi_set_mode(struct omap_display *display)
++{
++ struct omap_panel *panel = display->panel;
++ int lck_div, pck_div;
++ unsigned long fck;
++ unsigned long pck;
++ bool is_tft;
++ int r = 0;
++
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ dispc_set_pol_freq(panel);
++
++ is_tft = (display->panel->config & OMAP_DSS_LCD_TFT) != 0;
++
++#ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL
++ r = dpi_set_dsi_clk(is_tft, panel->timings.pixel_clock * 1000,
++ &fck, &lck_div, &pck_div);
++#else
++ r = dpi_set_dispc_clk(is_tft, panel->timings.pixel_clock * 1000,
++ &fck, &lck_div, &pck_div);
++#endif
++ if (r)
++ goto err0;
++
++ pck = fck / lck_div / pck_div / 1000;
++
++ if (pck != panel->timings.pixel_clock) {
++ DSSWARN("Could not find exact pixel clock. "
++ "Requested %d kHz, got %lu kHz\n",
++ panel->timings.pixel_clock, pck);
++
++ panel->timings.pixel_clock = pck;
++ }
++
++ dispc_set_lcd_timings(&panel->timings);
++
++err0:
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++ return r;
++}
++
++static int dpi_basic_init(struct omap_display *display)
++{
++ bool is_tft;
++
++ is_tft = (display->panel->config & OMAP_DSS_LCD_TFT) != 0;
++
++ dispc_set_parallel_interface_mode(OMAP_DSS_PARALLELMODE_BYPASS);
++ dispc_set_lcd_display_type(is_tft ? OMAP_DSS_LCD_DISPLAY_TFT :
++ OMAP_DSS_LCD_DISPLAY_STN);
++ dispc_set_tft_data_lines(display->hw_config.u.dpi.data_lines);
++
++ return 0;
++}
++
++static int dpi_display_enable(struct omap_display *display)
++{
++ struct omap_panel *panel = display->panel;
++ int r;
++
++ if (display->state != OMAP_DSS_DISPLAY_DISABLED) {
++ DSSERR("display already enabled\n");
++ return -EINVAL;
++ }
++
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ r = dpi_basic_init(display);
++ if (r)
++ goto err0;
++
++#ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL
++ dss_clk_enable(DSS_CLK_FCK2);
++ r = dsi_pll_init(0, 1);
++ if (r)
++ goto err1;
++#endif
++ r = dpi_set_mode(display);
++ if (r)
++ goto err2;
++
++ mdelay(2);
++
++ dispc_enable_lcd_out(1);
++
++ r = panel->enable(display);
++ if (r)
++ goto err3;
++
++ display->state = OMAP_DSS_DISPLAY_ACTIVE;
++
++ return 0;
++
++err3:
++ dispc_enable_lcd_out(0);
++err2:
++#ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL
++ dsi_pll_uninit();
++err1:
++ dss_clk_disable(DSS_CLK_FCK2);
++#endif
++err0:
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++ return r;
++}
++
++static int dpi_display_resume(struct omap_display *display);
++
++static void dpi_display_disable(struct omap_display *display)
++{
++ if (display->state == OMAP_DSS_DISPLAY_DISABLED)
++ return;
++
++ if (display->state == OMAP_DSS_DISPLAY_SUSPENDED)
++ dpi_display_resume(display);
++
++ display->panel->disable(display);
++
++ dispc_enable_lcd_out(0);
++
++#ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL
++ dss_select_clk_source(0, 0);
++ dsi_pll_uninit();
++ dss_clk_disable(DSS_CLK_FCK2);
++#endif
++
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ display->state = OMAP_DSS_DISPLAY_DISABLED;
++}
++
++static int dpi_display_suspend(struct omap_display *display)
++{
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ return -EINVAL;
++
++ DSSDBG("dpi_display_suspend\n");
++
++ if (display->panel->suspend)
++ display->panel->suspend(display);
++
++ dispc_enable_lcd_out(0);
++
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ display->state = OMAP_DSS_DISPLAY_SUSPENDED;
++
++ return 0;
++}
++
++static int dpi_display_resume(struct omap_display *display)
++{
++ if (display->state != OMAP_DSS_DISPLAY_SUSPENDED)
++ return -EINVAL;
++
++ DSSDBG("dpi_display_resume\n");
++
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ dispc_enable_lcd_out(1);
++
++ if (display->panel->resume)
++ display->panel->resume(display);
++
++ display->state = OMAP_DSS_DISPLAY_ACTIVE;
++
++ return 0;
++}
++
++static void dpi_set_timings(struct omap_display *display,
++ struct omap_video_timings *timings)
++{
++ DSSDBG("dpi_set_timings\n");
++ display->panel->timings = *timings;
++ if (display->state == OMAP_DSS_DISPLAY_ACTIVE) {
++ dpi_set_mode(display);
++ dispc_go(OMAP_DSS_CHANNEL_LCD);
++ }
++}
++
++static int dpi_check_timings(struct omap_display *display,
++ struct omap_video_timings *timings)
++{
++ bool is_tft;
++ int r;
++ int lck_div, pck_div;
++ unsigned long fck;
++ unsigned long pck;
++
++ if (cpu_is_omap24xx() || omap_rev() < OMAP3430_REV_ES3_0) {
++ if (timings->hsw < 1 || timings->hsw > 64 ||
++ timings->hfp < 1 || timings->hfp > 256 ||
++ timings->hbp < 1 || timings->hbp > 256) {
++ return -EINVAL;
++ }
++
++ if (timings->vsw < 1 || timings->vsw > 64 ||
++ timings->vfp > 255 || timings->vbp > 255) {
++ return -EINVAL;
++ }
++ } else {
++ if (timings->hsw < 1 || timings->hsw > 256 ||
++ timings->hfp < 1 || timings->hfp > 4096 ||
++ timings->hbp < 1 || timings->hbp > 4096) {
++ return -EINVAL;
++ }
++
++ if (timings->vsw < 1 || timings->vsw > 64 ||
++ timings->vfp > 4095 || timings->vbp > 4095) {
++ return -EINVAL;
++ }
++ }
++
++ if (timings->pixel_clock == 0)
++ return -EINVAL;
++
++ is_tft = (display->panel->config & OMAP_DSS_LCD_TFT) != 0;
++
++#ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL
++ {
++ struct dsi_clock_info cinfo;
++ r = dsi_pll_calc_pck(is_tft, timings->pixel_clock * 1000,
++ &cinfo);
++
++ if (r)
++ return r;
++
++ fck = cinfo.dsi1_pll_fclk;
++ lck_div = cinfo.lck_div;
++ pck_div = cinfo.pck_div;
++ }
++#else
++ {
++ struct dispc_clock_info cinfo;
++ r = dispc_calc_clock_div(is_tft, timings->pixel_clock * 1000,
++ &cinfo);
++
++ if (r)
++ return r;
++
++ fck = cinfo.fck;
++ lck_div = cinfo.lck_div;
++ pck_div = cinfo.pck_div;
++ }
++#endif
++
++ pck = fck / lck_div / pck_div / 1000;
++
++ timings->pixel_clock = pck;
++
++ return 0;
++}
++
++static void dpi_get_timings(struct omap_display *display,
++ struct omap_video_timings *timings)
++{
++ *timings = display->panel->timings;
++}
++
++static int dpi_display_set_update_mode(struct omap_display *display,
++ enum omap_dss_update_mode mode)
++{
++ if (mode == OMAP_DSS_UPDATE_MANUAL)
++ return -EINVAL;
++
++ if (mode == OMAP_DSS_UPDATE_DISABLED) {
++ dispc_enable_lcd_out(0);
++ dpi.update_enabled = 0;
++ } else {
++ dispc_enable_lcd_out(1);
++ dpi.update_enabled = 1;
++ }
++
++ return 0;
++}
++
++static enum omap_dss_update_mode dpi_display_get_update_mode(
++ struct omap_display *display)
++{
++ return dpi.update_enabled ? OMAP_DSS_UPDATE_AUTO :
++ OMAP_DSS_UPDATE_DISABLED;
++}
++
++void dpi_init_display(struct omap_display *display)
++{
++ DSSDBG("DPI init_display\n");
++
++ display->enable = dpi_display_enable;
++ display->disable = dpi_display_disable;
++ display->suspend = dpi_display_suspend;
++ display->resume = dpi_display_resume;
++ display->set_timings = dpi_set_timings;
++ display->check_timings = dpi_check_timings;
++ display->get_timings = dpi_get_timings;
++ display->set_update_mode = dpi_display_set_update_mode;
++ display->get_update_mode = dpi_display_get_update_mode;
++}
++
++int dpi_init(void)
++{
++ return 0;
++}
++
++void dpi_exit(void)
++{
++}
++
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+new file mode 100644
+index 0000000..4442931
+--- /dev/null
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -0,0 +1,3752 @@
++/*
++ * linux/drivers/video/omap2/dss/dsi.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "DSI"
++
++#include <linux/kernel.h>
++#include <linux/io.h>
++#include <linux/clk.h>
++#include <linux/device.h>
++#include <linux/err.h>
++#include <linux/interrupt.h>
++#include <linux/delay.h>
++#include <linux/workqueue.h>
++#include <linux/mutex.h>
++#include <linux/seq_file.h>
++#include <linux/kfifo.h>
++
++#include <mach/board.h>
++#include <mach/display.h>
++#include <mach/clock.h>
++
++#include "dss.h"
++
++/*#define VERBOSE_IRQ*/
++
++#define DSI_BASE 0x4804FC00
++
++struct dsi_reg { u16 idx; };
++
++#define DSI_REG(idx) ((const struct dsi_reg) { idx })
++
++#define DSI_SZ_REGS SZ_1K
++/* DSI Protocol Engine */
++
++#define DSI_REVISION DSI_REG(0x0000)
++#define DSI_SYSCONFIG DSI_REG(0x0010)
++#define DSI_SYSSTATUS DSI_REG(0x0014)
++#define DSI_IRQSTATUS DSI_REG(0x0018)
++#define DSI_IRQENABLE DSI_REG(0x001C)
++#define DSI_CTRL DSI_REG(0x0040)
++#define DSI_COMPLEXIO_CFG1 DSI_REG(0x0048)
++#define DSI_COMPLEXIO_IRQ_STATUS DSI_REG(0x004C)
++#define DSI_COMPLEXIO_IRQ_ENABLE DSI_REG(0x0050)
++#define DSI_CLK_CTRL DSI_REG(0x0054)
++#define DSI_TIMING1 DSI_REG(0x0058)
++#define DSI_TIMING2 DSI_REG(0x005C)
++#define DSI_VM_TIMING1 DSI_REG(0x0060)
++#define DSI_VM_TIMING2 DSI_REG(0x0064)
++#define DSI_VM_TIMING3 DSI_REG(0x0068)
++#define DSI_CLK_TIMING DSI_REG(0x006C)
++#define DSI_TX_FIFO_VC_SIZE DSI_REG(0x0070)
++#define DSI_RX_FIFO_VC_SIZE DSI_REG(0x0074)
++#define DSI_COMPLEXIO_CFG2 DSI_REG(0x0078)
++#define DSI_RX_FIFO_VC_FULLNESS DSI_REG(0x007C)
++#define DSI_VM_TIMING4 DSI_REG(0x0080)
++#define DSI_TX_FIFO_VC_EMPTINESS DSI_REG(0x0084)
++#define DSI_VM_TIMING5 DSI_REG(0x0088)
++#define DSI_VM_TIMING6 DSI_REG(0x008C)
++#define DSI_VM_TIMING7 DSI_REG(0x0090)
++#define DSI_STOPCLK_TIMING DSI_REG(0x0094)
++#define DSI_VC_CTRL(n) DSI_REG(0x0100 + (n * 0x20))
++#define DSI_VC_TE(n) DSI_REG(0x0104 + (n * 0x20))
++#define DSI_VC_LONG_PACKET_HEADER(n) DSI_REG(0x0108 + (n * 0x20))
++#define DSI_VC_LONG_PACKET_PAYLOAD(n) DSI_REG(0x010C + (n * 0x20))
++#define DSI_VC_SHORT_PACKET_HEADER(n) DSI_REG(0x0110 + (n * 0x20))
++#define DSI_VC_IRQSTATUS(n) DSI_REG(0x0118 + (n * 0x20))
++#define DSI_VC_IRQENABLE(n) DSI_REG(0x011C + (n * 0x20))
++
++/* DSIPHY_SCP */
++
++#define DSI_DSIPHY_CFG0 DSI_REG(0x200 + 0x0000)
++#define DSI_DSIPHY_CFG1 DSI_REG(0x200 + 0x0004)
++#define DSI_DSIPHY_CFG2 DSI_REG(0x200 + 0x0008)
++#define DSI_DSIPHY_CFG5 DSI_REG(0x200 + 0x0014)
++
++/* DSI_PLL_CTRL_SCP */
++
++#define DSI_PLL_CONTROL DSI_REG(0x300 + 0x0000)
++#define DSI_PLL_STATUS DSI_REG(0x300 + 0x0004)
++#define DSI_PLL_GO DSI_REG(0x300 + 0x0008)
++#define DSI_PLL_CONFIGURATION1 DSI_REG(0x300 + 0x000C)
++#define DSI_PLL_CONFIGURATION2 DSI_REG(0x300 + 0x0010)
++
++#define REG_GET(idx, start, end) \
++ FLD_GET(dsi_read_reg(idx), start, end)
++
++#define REG_FLD_MOD(idx, val, start, end) \
++ dsi_write_reg(idx, FLD_MOD(dsi_read_reg(idx), val, start, end))
++
++/* Global interrupts */
++#define DSI_IRQ_VC0 (1 << 0)
++#define DSI_IRQ_VC1 (1 << 1)
++#define DSI_IRQ_VC2 (1 << 2)
++#define DSI_IRQ_VC3 (1 << 3)
++#define DSI_IRQ_WAKEUP (1 << 4)
++#define DSI_IRQ_RESYNC (1 << 5)
++#define DSI_IRQ_PLL_LOCK (1 << 7)
++#define DSI_IRQ_PLL_UNLOCK (1 << 8)
++#define DSI_IRQ_PLL_RECALL (1 << 9)
++#define DSI_IRQ_COMPLEXIO_ERR (1 << 10)
++#define DSI_IRQ_HS_TX_TIMEOUT (1 << 14)
++#define DSI_IRQ_LP_RX_TIMEOUT (1 << 15)
++#define DSI_IRQ_TE_TRIGGER (1 << 16)
++#define DSI_IRQ_ACK_TRIGGER (1 << 17)
++#define DSI_IRQ_SYNC_LOST (1 << 18)
++#define DSI_IRQ_LDO_POWER_GOOD (1 << 19)
++#define DSI_IRQ_TA_TIMEOUT (1 << 20)
++#define DSI_IRQ_ERROR_MASK \
++ (DSI_IRQ_HS_TX_TIMEOUT | DSI_IRQ_LP_RX_TIMEOUT | DSI_IRQ_SYNC_LOST | \
++ DSI_IRQ_TA_TIMEOUT)
++#define DSI_IRQ_CHANNEL_MASK 0xf
++
++/* Virtual channel interrupts */
++#define DSI_VC_IRQ_CS (1 << 0)
++#define DSI_VC_IRQ_ECC_CORR (1 << 1)
++#define DSI_VC_IRQ_PACKET_SENT (1 << 2)
++#define DSI_VC_IRQ_FIFO_TX_OVF (1 << 3)
++#define DSI_VC_IRQ_FIFO_RX_OVF (1 << 4)
++#define DSI_VC_IRQ_BTA (1 << 5)
++#define DSI_VC_IRQ_ECC_NO_CORR (1 << 6)
++#define DSI_VC_IRQ_FIFO_TX_UDF (1 << 7)
++#define DSI_VC_IRQ_PP_BUSY_CHANGE (1 << 8)
++#define DSI_VC_IRQ_ERROR_MASK \
++ (DSI_VC_IRQ_CS | DSI_VC_IRQ_ECC_CORR | DSI_VC_IRQ_FIFO_TX_OVF | \
++ DSI_VC_IRQ_FIFO_RX_OVF | DSI_VC_IRQ_ECC_NO_CORR | \
++ DSI_VC_IRQ_FIFO_TX_UDF)
++
++/* ComplexIO interrupts */
++#define DSI_CIO_IRQ_ERRSYNCESC1 (1 << 0)
++#define DSI_CIO_IRQ_ERRSYNCESC2 (1 << 1)
++#define DSI_CIO_IRQ_ERRSYNCESC3 (1 << 2)
++#define DSI_CIO_IRQ_ERRESC1 (1 << 5)
++#define DSI_CIO_IRQ_ERRESC2 (1 << 6)
++#define DSI_CIO_IRQ_ERRESC3 (1 << 7)
++#define DSI_CIO_IRQ_ERRCONTROL1 (1 << 10)
++#define DSI_CIO_IRQ_ERRCONTROL2 (1 << 11)
++#define DSI_CIO_IRQ_ERRCONTROL3 (1 << 12)
++#define DSI_CIO_IRQ_STATEULPS1 (1 << 15)
++#define DSI_CIO_IRQ_STATEULPS2 (1 << 16)
++#define DSI_CIO_IRQ_STATEULPS3 (1 << 17)
++#define DSI_CIO_IRQ_ERRCONTENTIONLP0_1 (1 << 20)
++#define DSI_CIO_IRQ_ERRCONTENTIONLP1_1 (1 << 21)
++#define DSI_CIO_IRQ_ERRCONTENTIONLP0_2 (1 << 22)
++#define DSI_CIO_IRQ_ERRCONTENTIONLP1_2 (1 << 23)
++#define DSI_CIO_IRQ_ERRCONTENTIONLP0_3 (1 << 24)
++#define DSI_CIO_IRQ_ERRCONTENTIONLP1_3 (1 << 25)
++#define DSI_CIO_IRQ_ULPSACTIVENOT_ALL0 (1 << 30)
++#define DSI_CIO_IRQ_ULPSACTIVENOT_ALL1 (1 << 31)
++
++#define DSI_DT_DCS_SHORT_WRITE_0 0x05
++#define DSI_DT_DCS_SHORT_WRITE_1 0x15
++#define DSI_DT_DCS_READ 0x06
++#define DSI_DT_SET_MAX_RET_PKG_SIZE 0x37
++#define DSI_DT_NULL_PACKET 0x09
++#define DSI_DT_DCS_LONG_WRITE 0x39
++
++#define DSI_DT_RX_ACK_WITH_ERR 0x02
++#define DSI_DT_RX_DCS_LONG_READ 0x1c
++#define DSI_DT_RX_SHORT_READ_1 0x21
++#define DSI_DT_RX_SHORT_READ_2 0x22
++
++#define FINT_MAX 2100000
++#define FINT_MIN 750000
++#define REGN_MAX (1 << 7)
++#define REGM_MAX ((1 << 11) - 1)
++#define REGM3_MAX (1 << 4)
++#define REGM4_MAX (1 << 4)
++
++enum fifo_size {
++ DSI_FIFO_SIZE_0 = 0,
++ DSI_FIFO_SIZE_32 = 1,
++ DSI_FIFO_SIZE_64 = 2,
++ DSI_FIFO_SIZE_96 = 3,
++ DSI_FIFO_SIZE_128 = 4,
++};
++
++#define DSI_CMD_FIFO_LEN 16
++
++struct dsi_cmd_update {
++ int bytespp;
++ u16 x;
++ u16 y;
++ u16 w;
++ u16 h;
++};
++
++struct dsi_cmd_mem_read {
++ void *buf;
++ size_t size;
++ u16 x;
++ u16 y;
++ u16 w;
++ u16 h;
++ size_t *ret_size;
++ struct completion *completion;
++};
++
++struct dsi_cmd_test {
++ int test_num;
++ int *result;
++ struct completion *completion;
++};
++
++enum dsi_cmd {
++ DSI_CMD_UPDATE,
++ DSI_CMD_AUTOUPDATE,
++ DSI_CMD_SYNC,
++ DSI_CMD_MEM_READ,
++ DSI_CMD_TEST,
++ DSI_CMD_SET_TE,
++ DSI_CMD_SET_UPDATE_MODE,
++ DSI_CMD_SET_ROTATE,
++ DSI_CMD_SET_MIRROR,
++};
++
++struct dsi_cmd_item {
++ struct omap_display *display;
++
++ enum dsi_cmd cmd;
++
++ union {
++ struct dsi_cmd_update r;
++ struct completion *sync;
++ struct dsi_cmd_mem_read mem_read;
++ struct dsi_cmd_test test;
++ int te;
++ enum omap_dss_update_mode update_mode;
++ int rotate;
++ int mirror;
++ } u;
++};
++
++static struct
++{
++ void __iomem *base;
++
++ unsigned long dsi1_pll_fclk; /* Hz */
++ unsigned long dsi2_pll_fclk; /* Hz */
++ unsigned long dsiphy; /* Hz */
++ unsigned long ddr_clk; /* Hz */
++
++ struct {
++ struct omap_display *display;
++ enum fifo_size fifo_size;
++ int dest_per; /* destination peripheral 0-3 */
++ } vc[4];
++
++ struct mutex lock;
++
++ unsigned pll_locked;
++
++ struct completion bta_completion;
++
++ struct work_struct framedone_work;
++ struct work_struct process_work;
++ struct workqueue_struct *workqueue;
++
++ enum omap_dss_update_mode user_update_mode;
++ enum omap_dss_update_mode target_update_mode;
++ enum omap_dss_update_mode update_mode;
++ int use_te;
++ int framedone_scheduled; /* helps to catch strange framedone bugs */
++
++ unsigned long cache_req_pck;
++ unsigned long cache_clk_freq;
++ struct dsi_clock_info cache_cinfo;
++
++ struct kfifo *cmd_fifo;
++ spinlock_t cmd_lock;
++ struct completion cmd_done;
++ atomic_t cmd_fifo_full;
++ atomic_t cmd_pending;
++
++ bool autoupdate_setup;
++
++#ifdef DEBUG
++ ktime_t perf_setup_time;
++ ktime_t perf_start_time;
++ int perf_measure_frames;
++
++ struct {
++ int x, y, w, h;
++ int bytespp;
++ } update_region;
++
++#endif
++ int debug_process;
++ int debug_read;
++ int debug_write;
++} dsi;
++
++#ifdef DEBUG
++static unsigned int dsi_perf;
++module_param_named(dsi_perf, dsi_perf, bool, 0644);
++#endif
++
++static void dsi_process_cmd_fifo(struct work_struct *work);
++static void dsi_push_update(struct omap_display *display,
++ int x, int y, int w, int h);
++static void dsi_push_autoupdate(struct omap_display *display);
++
++static inline void dsi_write_reg(const struct dsi_reg idx, u32 val)
++{
++ __raw_writel(val, dsi.base + idx.idx);
++}
++
++static inline u32 dsi_read_reg(const struct dsi_reg idx)
++{
++ return __raw_readl(dsi.base + idx.idx);
++}
++
++
++void dsi_save_context(void)
++{
++}
++
++void dsi_restore_context(void)
++{
++}
++
++static inline int wait_for_bit_change(const struct dsi_reg idx, int bitnum,
++ int value)
++{
++ int t = 100000;
++
++ while (REG_GET(idx, bitnum, bitnum) != value) {
++ if (--t == 0)
++ return !value;
++ }
++
++ return value;
++}
++
++#ifdef DEBUG
++static void perf_mark_setup(void)
++{
++ dsi.perf_setup_time = ktime_get();
++}
++
++static void perf_mark_start(void)
++{
++ dsi.perf_start_time = ktime_get();
++}
++
++static void perf_show(const char *name)
++{
++ ktime_t t, setup_time, trans_time;
++ u32 total_bytes;
++ u32 setup_us, trans_us, total_us;
++ const int numframes = 100;
++ static u32 s_trans_us, s_min_us = 0xffffffff, s_max_us;
++
++ if (!dsi_perf)
++ return;
++
++ if (dsi.update_mode == OMAP_DSS_UPDATE_DISABLED)
++ return;
++
++ t = ktime_get();
++
++ setup_time = ktime_sub(dsi.perf_start_time, dsi.perf_setup_time);
++ setup_us = (u32)ktime_to_us(setup_time);
++ if (setup_us == 0)
++ setup_us = 1;
++
++ trans_time = ktime_sub(t, dsi.perf_start_time);
++ trans_us = (u32)ktime_to_us(trans_time);
++ if (trans_us == 0)
++ trans_us = 1;
++
++ total_us = setup_us + trans_us;
++
++ total_bytes = dsi.update_region.w *
++ dsi.update_region.h *
++ dsi.update_region.bytespp;
++
++ if (dsi.update_mode == OMAP_DSS_UPDATE_AUTO) {
++ dsi.perf_measure_frames++;
++
++ if (trans_us < s_min_us)
++ s_min_us = trans_us;
++
++ if (trans_us > s_max_us)
++ s_max_us = trans_us;
++
++ s_trans_us += trans_us;
++
++ if (dsi.perf_measure_frames < numframes)
++ return;
++
++ DSSINFO("%s update: %d frames in %u us "
++ "(min/max/avg %u/%u/%u), %u fps\n",
++ name, numframes,
++ s_trans_us,
++ s_min_us,
++ s_max_us,
++ s_trans_us / numframes,
++ 1000*1000 / (s_trans_us / numframes));
++
++ dsi.perf_measure_frames = 0;
++ s_trans_us = 0;
++ s_min_us = 0xffffffff;
++ s_max_us = 0;
++ } else {
++ DSSINFO("%s update %u us + %u us = %u us (%uHz), %u bytes, "
++ "%u kbytes/sec\n",
++ name,
++ setup_us,
++ trans_us,
++ total_us,
++ 1000*1000 / total_us,
++ total_bytes,
++ total_bytes * 1000 / total_us);
++ }
++}
++#else
++#define perf_mark_setup()
++#define perf_mark_start()
++#define perf_show(x)
++#endif
++
++static void print_irq_status(u32 status)
++{
++#ifndef VERBOSE_IRQ
++ if ((status & ~DSI_IRQ_CHANNEL_MASK) == 0)
++ return;
++#endif
++ printk(KERN_DEBUG "DSI IRQ: 0x%x: ", status);
++
++#define PIS(x) \
++ if (status & DSI_IRQ_##x) \
++ printk(#x " ");
++#ifdef VERBOSE_IRQ
++ PIS(VC0);
++ PIS(VC1);
++ PIS(VC2);
++ PIS(VC3);
++#endif
++ PIS(WAKEUP);
++ PIS(RESYNC);
++ PIS(PLL_LOCK);
++ PIS(PLL_UNLOCK);
++ PIS(PLL_RECALL);
++ PIS(COMPLEXIO_ERR);
++ PIS(HS_TX_TIMEOUT);
++ PIS(LP_RX_TIMEOUT);
++ PIS(TE_TRIGGER);
++ PIS(ACK_TRIGGER);
++ PIS(SYNC_LOST);
++ PIS(LDO_POWER_GOOD);
++ PIS(TA_TIMEOUT);
++#undef PIS
++
++ printk("\n");
++}
++
++static void print_irq_status_vc(int channel, u32 status)
++{
++#ifndef VERBOSE_IRQ
++ if ((status & ~DSI_VC_IRQ_PACKET_SENT) == 0)
++ return;
++#endif
++ printk(KERN_DEBUG "DSI VC(%d) IRQ 0x%x: ", channel, status);
++
++#define PIS(x) \
++ if (status & DSI_VC_IRQ_##x) \
++ printk(#x " ");
++ PIS(CS);
++ PIS(ECC_CORR);
++#ifdef VERBOSE_IRQ
++ PIS(PACKET_SENT);
++#endif
++ PIS(FIFO_TX_OVF);
++ PIS(FIFO_RX_OVF);
++ PIS(BTA);
++ PIS(ECC_NO_CORR);
++ PIS(FIFO_TX_UDF);
++ PIS(PP_BUSY_CHANGE);
++#undef PIS
++ printk("\n");
++}
++
++static void print_irq_status_cio(u32 status)
++{
++ printk(KERN_DEBUG "DSI CIO IRQ 0x%x: ", status);
++
++#define PIS(x) \
++ if (status & DSI_CIO_IRQ_##x) \
++ printk(#x " ");
++ PIS(ERRSYNCESC1);
++ PIS(ERRSYNCESC2);
++ PIS(ERRSYNCESC3);
++ PIS(ERRESC1);
++ PIS(ERRESC2);
++ PIS(ERRESC3);
++ PIS(ERRCONTROL1);
++ PIS(ERRCONTROL2);
++ PIS(ERRCONTROL3);
++ PIS(STATEULPS1);
++ PIS(STATEULPS2);
++ PIS(STATEULPS3);
++ PIS(ERRCONTENTIONLP0_1);
++ PIS(ERRCONTENTIONLP1_1);
++ PIS(ERRCONTENTIONLP0_2);
++ PIS(ERRCONTENTIONLP1_2);
++ PIS(ERRCONTENTIONLP0_3);
++ PIS(ERRCONTENTIONLP1_3);
++ PIS(ULPSACTIVENOT_ALL0);
++ PIS(ULPSACTIVENOT_ALL1);
++#undef PIS
++
++ printk("\n");
++}
++
++static int debug_irq;
++
++/* called from dss */
++void dsi_irq_handler(void)
++{
++ u32 irqstatus, vcstatus, ciostatus;
++ int i;
++
++ irqstatus = dsi_read_reg(DSI_IRQSTATUS);
++
++ if (irqstatus & DSI_IRQ_ERROR_MASK) {
++ DSSERR("DSI error, irqstatus %x\n", irqstatus);
++ print_irq_status(irqstatus);
++ } else if (debug_irq) {
++ print_irq_status(irqstatus);
++ }
++
++ for (i = 0; i < 4; ++i) {
++ if ((irqstatus & (1<<i)) == 0)
++ continue;
++
++ vcstatus = dsi_read_reg(DSI_VC_IRQSTATUS(i));
++
++ if (vcstatus & DSI_VC_IRQ_BTA)
++ complete(&dsi.bta_completion);
++
++ if (vcstatus & DSI_VC_IRQ_ERROR_MASK) {
++ DSSERR("DSI VC(%d) error, vc irqstatus %x\n",
++ i, vcstatus);
++ print_irq_status_vc(i, vcstatus);
++ } else if (debug_irq) {
++ print_irq_status_vc(i, vcstatus);
++ }
++
++ dsi_write_reg(DSI_VC_IRQSTATUS(i), vcstatus);
++ }
++
++ if (irqstatus & DSI_IRQ_COMPLEXIO_ERR) {
++ ciostatus = dsi_read_reg(DSI_COMPLEXIO_IRQ_STATUS);
++
++ dsi_write_reg(DSI_COMPLEXIO_IRQ_STATUS, ciostatus);
++
++ DSSERR("DSI CIO error, cio irqstatus %x\n", ciostatus);
++ print_irq_status_cio(ciostatus);
++ }
++
++ dsi_write_reg(DSI_IRQSTATUS, irqstatus & ~DSI_IRQ_CHANNEL_MASK);
++}
++
++
++static void _dsi_initialize_irq(void)
++{
++ u32 l;
++ int i;
++
++ /* disable all interrupts */
++ dsi_write_reg(DSI_IRQENABLE, 0);
++ for (i = 0; i < 4; ++i)
++ dsi_write_reg(DSI_VC_IRQENABLE(i), 0);
++ dsi_write_reg(DSI_COMPLEXIO_IRQ_ENABLE, 0);
++
++ /* clear interrupt status */
++ l = dsi_read_reg(DSI_IRQSTATUS);
++ dsi_write_reg(DSI_IRQSTATUS, l & ~DSI_IRQ_CHANNEL_MASK);
++
++ for (i = 0; i < 4; ++i) {
++ l = dsi_read_reg(DSI_VC_IRQSTATUS(i));
++ dsi_write_reg(DSI_VC_IRQSTATUS(i), l);
++ }
++
++ l = dsi_read_reg(DSI_COMPLEXIO_IRQ_STATUS);
++ dsi_write_reg(DSI_COMPLEXIO_IRQ_STATUS, l);
++
++ /* enable error irqs */
++ l = DSI_IRQ_ERROR_MASK;
++ dsi_write_reg(DSI_IRQENABLE, l);
++
++ l = DSI_VC_IRQ_ERROR_MASK;
++ for (i = 0; i < 4; ++i)
++ dsi_write_reg(DSI_VC_IRQENABLE(i), l);
++
++ /* XXX zonda responds incorrectly, causing control error:
++ Exit from LP-ESC mode to LP11 uses wrong transition states on the
++ data lines LP0 and LN0. */
++ dsi_write_reg(DSI_COMPLEXIO_IRQ_ENABLE,
++ -1 & (~DSI_CIO_IRQ_ERRCONTROL2));
++}
++
++static void dsi_vc_enable_bta_irq(int channel)
++{
++ u32 l;
++
++ l = dsi_read_reg(DSI_VC_IRQENABLE(channel));
++ l |= DSI_VC_IRQ_BTA;
++ dsi_write_reg(DSI_VC_IRQENABLE(channel), l);
++}
++
++static void dsi_vc_disable_bta_irq(int channel)
++{
++ u32 l;
++
++ l = dsi_read_reg(DSI_VC_IRQENABLE(channel));
++ l &= ~DSI_VC_IRQ_BTA;
++ dsi_write_reg(DSI_VC_IRQENABLE(channel), l);
++}
++
++/* DSI func clock. this could also be DSI2_PLL_FCLK */
++static inline void enable_clocks(bool enable)
++{
++ if (enable)
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++ else
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++}
++
++/* source clock for DSI PLL. this could also be PCLKFREE */
++static inline void dsi_enable_pll_clock(bool enable)
++{
++ if (enable)
++ dss_clk_enable(DSS_CLK_FCK2);
++ else
++ dss_clk_disable(DSS_CLK_FCK2);
++
++ if (enable && dsi.pll_locked) {
++ if (wait_for_bit_change(DSI_PLL_STATUS, 1, 1) != 1)
++ DSSERR("cannot lock PLL when enabling clocks\n");
++ }
++}
++
++#ifdef DEBUG
++static void _dsi_print_reset_status(void)
++{
++ u32 l;
++
++ if (!dss_debug)
++ return;
++
++ /* A dummy read using the SCP interface to any DSIPHY register is
++ * required after DSIPHY reset to complete the reset of the DSI complex
++ * I/O. */
++ l = dsi_read_reg(DSI_DSIPHY_CFG5);
++
++ printk(KERN_DEBUG "DSI resets: ");
++
++ l = dsi_read_reg(DSI_PLL_STATUS);
++ printk("PLL (%d) ", FLD_GET(l, 0, 0));
++
++ l = dsi_read_reg(DSI_COMPLEXIO_CFG1);
++ printk("CIO (%d) ", FLD_GET(l, 29, 29));
++
++ l = dsi_read_reg(DSI_DSIPHY_CFG5);
++ printk("PHY (%x, %d, %d, %d)\n",
++ FLD_GET(l, 28, 26),
++ FLD_GET(l, 29, 29),
++ FLD_GET(l, 30, 30),
++ FLD_GET(l, 31, 31));
++}
++#else
++#define _dsi_print_reset_status()
++#endif
++
++static inline int dsi_if_enable(bool enable)
++{
++ DSSDBG("dsi_if_enable(%d)\n", enable);
++
++ enable = enable ? 1 : 0;
++ REG_FLD_MOD(DSI_CTRL, enable, 0, 0); /* IF_EN */
++
++ if (wait_for_bit_change(DSI_CTRL, 0, enable) != enable) {
++ DSSERR("Failed to set dsi_if_enable to %d\n", enable);
++ return -EIO;
++ }
++
++ return 0;
++}
++
++static unsigned long dsi_fclk_rate(void)
++{
++ unsigned long r;
++
++ if (dss_get_dsi_clk_source() == 0) {
++ /* DSI FCLK source is DSS1_ALWON_FCK, which is dss1_fck */
++ r = dss_clk_get_rate(DSS_CLK_FCK1);
++ } else {
++ /* DSI FCLK source is DSI2_PLL_FCLK */
++ r = dsi.dsi2_pll_fclk;
++ }
++
++ return r;
++}
++
++static int dsi_set_lp_clk_divisor(void)
++{
++ int n;
++ unsigned long dsi_fclk;
++ unsigned long mhz;
++
++ /* LP_CLK_DIVISOR, DSI fclk/n, should be 20MHz - 32kHz */
++
++ dsi_fclk = dsi_fclk_rate();
++
++ for (n = 1; n < (1 << 13) - 1; ++n) {
++ mhz = dsi_fclk / n;
++ if (mhz <= 20*1000*1000)
++ break;
++ }
++
++ if (n == (1 << 13) - 1) {
++ DSSERR("Failed to find LP_CLK_DIVISOR\n");
++ return -EINVAL;
++ }
++
++ DSSDBG("LP_CLK_DIV %d, LP_CLK %ld\n", n, mhz);
++
++ REG_FLD_MOD(DSI_CLK_CTRL, n, 12, 0); /* LP_CLK_DIVISOR */
++ if (dsi_fclk > 30*1000*1000)
++ REG_FLD_MOD(DSI_CLK_CTRL, 1, 21, 21); /* LP_RX_SYNCHRO_ENABLE */
++
++ return 0;
++}
++
++
++enum dsi_pll_power_state {
++ DSI_PLL_POWER_OFF = 0x0,
++ DSI_PLL_POWER_ON_HSCLK = 0x1,
++ DSI_PLL_POWER_ON_ALL = 0x2,
++ DSI_PLL_POWER_ON_DIV = 0x3,
++};
++
++static int dsi_pll_power(enum dsi_pll_power_state state)
++{
++ int t = 0;
++
++ REG_FLD_MOD(DSI_CLK_CTRL, state, 31, 30); /* PLL_PWR_CMD */
++
++ /* PLL_PWR_STATUS */
++ while (FLD_GET(dsi_read_reg(DSI_CLK_CTRL), 29, 28) != state) {
++ udelay(1);
++ if (t++ > 1000) {
++ DSSERR("Failed to set DSI PLL power mode to %d\n",
++ state);
++ return -ENODEV;
++ }
++ }
++
++ return 0;
++}
++
++int dsi_pll_calc_pck(bool is_tft, unsigned long req_pck,
++ struct dsi_clock_info *cinfo)
++{
++ struct dsi_clock_info cur, best;
++ int min_fck_per_pck;
++ int match = 0;
++
++ if (req_pck == dsi.cache_req_pck &&
++ dsi.cache_cinfo.clkin == dss_clk_get_rate(DSS_CLK_FCK2)) {
++ DSSDBG("DSI clock info found from cache\n");
++ *cinfo = dsi.cache_cinfo;
++ return 0;
++ }
++
++ min_fck_per_pck = CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK;
++
++ if (min_fck_per_pck &&
++ req_pck * min_fck_per_pck > DISPC_MAX_FCK) {
++ DSSERR("Requested pixel clock not possible with the current "
++ "OMAP2_DSS_MIN_FCK_PER_PCK setting. Turning "
++ "the constraint off.\n");
++ min_fck_per_pck = 0;
++ }
++
++ DSSDBG("dsi_pll_calc\n");
++
++retry:
++ memset(&best, 0, sizeof(best));
++
++ memset(&cur, 0, sizeof(cur));
++ cur.clkin = dss_clk_get_rate(DSS_CLK_FCK2);
++ cur.use_dss2_fck = 1;
++ cur.highfreq = 0;
++
++ /* no highfreq: 0.75MHz < Fint = clkin / regn < 2.1MHz */
++ /* highfreq: 0.75MHz < Fint = clkin / (2*regn) < 2.1MHz */
++ /* To reduce PLL lock time, keep Fint high (around 2 MHz) */
++ for (cur.regn = 1; cur.regn < REGN_MAX; ++cur.regn) {
++ if (cur.highfreq == 0)
++ cur.fint = cur.clkin / cur.regn;
++ else
++ cur.fint = cur.clkin / (2 * cur.regn);
++
++ if (cur.fint > FINT_MAX || cur.fint < FINT_MIN)
++ continue;
++
++ /* DSIPHY(MHz) = (2 * regm / regn) * (clkin / (highfreq + 1)) */
++ for (cur.regm = 1; cur.regm < REGM_MAX; ++cur.regm) {
++ unsigned long a, b;
++
++ a = 2 * cur.regm * (cur.clkin/1000);
++ b = cur.regn * (cur.highfreq + 1);
++ cur.dsiphy = a / b * 1000;
++
++ if (cur.dsiphy > 1800 * 1000 * 1000)
++ break;
++
++ /* DSI1_PLL_FCLK(MHz) = DSIPHY(MHz) / regm3 < 173MHz */
++ for (cur.regm3 = 1; cur.regm3 < REGM3_MAX;
++ ++cur.regm3) {
++ cur.dsi1_pll_fclk = cur.dsiphy / cur.regm3;
++
++ /* this will narrow down the search a bit,
++ * but still give pixclocks below what was
++ * requested */
++ if (cur.dsi1_pll_fclk < req_pck)
++ break;
++
++ if (cur.dsi1_pll_fclk > DISPC_MAX_FCK)
++ continue;
++
++ if (min_fck_per_pck &&
++ cur.dsi1_pll_fclk <
++ req_pck * min_fck_per_pck)
++ continue;
++
++ match = 1;
++
++ find_lck_pck_divs(is_tft, req_pck,
++ cur.dsi1_pll_fclk,
++ &cur.lck_div,
++ &cur.pck_div);
++
++ cur.lck = cur.dsi1_pll_fclk / cur.lck_div;
++ cur.pck = cur.lck / cur.pck_div;
++
++ if (abs(cur.pck - req_pck) <
++ abs(best.pck - req_pck)) {
++ best = cur;
++
++ if (cur.pck == req_pck)
++ goto found;
++ }
++ }
++ }
++ }
++found:
++ if (!match) {
++ if (min_fck_per_pck) {
++ DSSERR("Could not find suitable clock settings.\n"
++ "Turning FCK/PCK constraint off and"
++ "trying again.\n");
++ min_fck_per_pck = 0;
++ goto retry;
++ }
++
++ DSSERR("Could not find suitable clock settings.\n");
++
++ return -EINVAL;
++ }
++
++ /* DSI2_PLL_FCLK (regm4) is not used. Set it to something sane. */
++ best.regm4 = best.dsiphy / 48000000;
++ if (best.regm4 > REGM4_MAX)
++ best.regm4 = REGM4_MAX;
++ else if (best.regm4 == 0)
++ best.regm4 = 1;
++ best.dsi2_pll_fclk = best.dsiphy / best.regm4;
++
++ if (cinfo)
++ *cinfo = best;
++
++ dsi.cache_req_pck = req_pck;
++ dsi.cache_clk_freq = 0;
++ dsi.cache_cinfo = best;
++
++ return 0;
++}
++
++static int dsi_pll_calc_ddrfreq(unsigned long clk_freq,
++ struct dsi_clock_info *cinfo)
++{
++ struct dsi_clock_info cur, best;
++ const bool use_dss2_fck = 1;
++ unsigned long datafreq;
++
++ DSSDBG("dsi_pll_calc_ddrfreq\n");
++
++ if (clk_freq == dsi.cache_clk_freq &&
++ dsi.cache_cinfo.clkin == dss_clk_get_rate(DSS_CLK_FCK2)) {
++ DSSDBG("DSI clock info found from cache\n");
++ *cinfo = dsi.cache_cinfo;
++ return 0;
++ }
++
++ datafreq = clk_freq * 4;
++
++ memset(&best, 0, sizeof(best));
++
++ memset(&cur, 0, sizeof(cur));
++ cur.use_dss2_fck = use_dss2_fck;
++ if (use_dss2_fck) {
++ cur.clkin = dss_clk_get_rate(DSS_CLK_FCK2);
++ cur.highfreq = 0;
++ } else {
++ cur.clkin = dispc_pclk_rate();
++ if (cur.clkin < 32000000)
++ cur.highfreq = 0;
++ else
++ cur.highfreq = 1;
++ }
++
++ /* no highfreq: 0.75MHz < Fint = clkin / regn < 2.1MHz */
++ /* highfreq: 0.75MHz < Fint = clkin / (2*regn) < 2.1MHz */
++ /* To reduce PLL lock time, keep Fint high (around 2 MHz) */
++ for (cur.regn = 1; cur.regn < REGN_MAX; ++cur.regn) {
++ if (cur.highfreq == 0)
++ cur.fint = cur.clkin / cur.regn;
++ else
++ cur.fint = cur.clkin / (2 * cur.regn);
++
++ if (cur.fint > FINT_MAX || cur.fint < FINT_MIN)
++ continue;
++
++ /* DSIPHY(MHz) = (2 * regm / regn) * (clkin / (highfreq + 1)) */
++ for (cur.regm = 1; cur.regm < REGM_MAX; ++cur.regm) {
++ unsigned long a, b;
++
++ a = 2 * cur.regm * (cur.clkin/1000);
++ b = cur.regn * (cur.highfreq + 1);
++ cur.dsiphy = a / b * 1000;
++
++ if (cur.dsiphy > 1800 * 1000 * 1000)
++ break;
++
++ if (abs(cur.dsiphy - datafreq) <
++ abs(best.dsiphy - datafreq)) {
++ best = cur;
++ /* DSSDBG("best %ld\n", best.dsiphy); */
++ }
++
++ if (cur.dsiphy == datafreq)
++ goto found;
++ }
++ }
++found:
++ /* DSI1_PLL_FCLK (regm3) is not used. Set it to something sane. */
++ best.regm3 = best.dsiphy / 48000000;
++ if (best.regm3 > REGM3_MAX)
++ best.regm3 = REGM3_MAX;
++ else if (best.regm3 == 0)
++ best.regm3 = 1;
++ best.dsi1_pll_fclk = best.dsiphy / best.regm3;
++
++ /* DSI2_PLL_FCLK (regm4) is not used. Set it to something sane. */
++ best.regm4 = best.dsiphy / 48000000;
++ if (best.regm4 > REGM4_MAX)
++ best.regm4 = REGM4_MAX;
++ else if (best.regm4 == 0)
++ best.regm4 = 1;
++ best.dsi2_pll_fclk = best.dsiphy / best.regm4;
++
++ if (cinfo)
++ *cinfo = best;
++
++ dsi.cache_clk_freq = clk_freq;
++ dsi.cache_req_pck = 0;
++ dsi.cache_cinfo = best;
++
++ return 0;
++}
++
++int dsi_pll_program(struct dsi_clock_info *cinfo)
++{
++ int r = 0;
++ u32 l;
++
++ DSSDBG("dsi_pll_program\n");
++
++ dsi.dsiphy = cinfo->dsiphy;
++ dsi.ddr_clk = dsi.dsiphy / 4;
++ dsi.dsi1_pll_fclk = cinfo->dsi1_pll_fclk;
++ dsi.dsi2_pll_fclk = cinfo->dsi2_pll_fclk;
++
++ DSSDBG("DSI Fint %ld\n", cinfo->fint);
++
++ DSSDBG("clkin (%s) rate %ld, highfreq %d\n",
++ cinfo->use_dss2_fck ? "dss2_fck" : "pclkfree",
++ cinfo->clkin,
++ cinfo->highfreq);
++
++ /* DSIPHY == CLKIN4DDR */
++ DSSDBG("DSIPHY = 2 * %d / %d * %lu / %d = %lu\n",
++ cinfo->regm,
++ cinfo->regn,
++ cinfo->clkin,
++ cinfo->highfreq + 1,
++ cinfo->dsiphy);
++
++ DSSDBG("Data rate on 1 DSI lane %ld Mbps\n",
++ dsi.dsiphy / 1000 / 1000 / 2);
++
++ DSSDBG("Clock lane freq %ld Hz\n", dsi.ddr_clk);
++
++ DSSDBG("regm3 = %d, dsi1_pll_fclk = %lu\n",
++ cinfo->regm3, cinfo->dsi1_pll_fclk);
++ DSSDBG("regm4 = %d, dsi2_pll_fclk = %lu\n",
++ cinfo->regm4, cinfo->dsi2_pll_fclk);
++
++ REG_FLD_MOD(DSI_PLL_CONTROL, 0, 0, 0); /* DSI_PLL_AUTOMODE = manual */
++
++ l = dsi_read_reg(DSI_PLL_CONFIGURATION1);
++ l = FLD_MOD(l, 1, 0, 0); /* DSI_PLL_STOPMODE */
++ l = FLD_MOD(l, cinfo->regn - 1, 7, 1); /* DSI_PLL_REGN */
++ l = FLD_MOD(l, cinfo->regm, 18, 8); /* DSI_PLL_REGM */
++ l = FLD_MOD(l, cinfo->regm3 - 1, 22, 19); /* DSI_CLOCK_DIV */
++ l = FLD_MOD(l, cinfo->regm4 - 1, 26, 23); /* DSIPROTO_CLOCK_DIV */
++ dsi_write_reg(DSI_PLL_CONFIGURATION1, l);
++
++ l = dsi_read_reg(DSI_PLL_CONFIGURATION2);
++ l = FLD_MOD(l, 7, 4, 1); /* DSI_PLL_FREQSEL */
++ /* DSI_PLL_CLKSEL */
++ l = FLD_MOD(l, cinfo->use_dss2_fck ? 0 : 1, 11, 11);
++ l = FLD_MOD(l, cinfo->highfreq, 12, 12); /* DSI_PLL_HIGHFREQ */
++ l = FLD_MOD(l, 1, 13, 13); /* DSI_PLL_REFEN */
++ l = FLD_MOD(l, 0, 14, 14); /* DSIPHY_CLKINEN */
++ l = FLD_MOD(l, 1, 20, 20); /* DSI_HSDIVBYPASS */
++ dsi_write_reg(DSI_PLL_CONFIGURATION2, l);
++
++ REG_FLD_MOD(DSI_PLL_GO, 1, 0, 0); /* DSI_PLL_GO */
++
++ if (wait_for_bit_change(DSI_PLL_GO, 0, 0) != 0) {
++ DSSERR("dsi pll go bit not going down.\n");
++ r = -EIO;
++ goto err;
++ }
++
++ if (wait_for_bit_change(DSI_PLL_STATUS, 1, 1) != 1) {
++ DSSERR("cannot lock PLL\n");
++ r = -EIO;
++ goto err;
++ }
++
++ dsi.pll_locked = 1;
++
++ l = dsi_read_reg(DSI_PLL_CONFIGURATION2);
++ l = FLD_MOD(l, 0, 0, 0); /* DSI_PLL_IDLE */
++ l = FLD_MOD(l, 0, 5, 5); /* DSI_PLL_PLLLPMODE */
++ l = FLD_MOD(l, 0, 6, 6); /* DSI_PLL_LOWCURRSTBY */
++ l = FLD_MOD(l, 0, 7, 7); /* DSI_PLL_TIGHTPHASELOCK */
++ l = FLD_MOD(l, 0, 8, 8); /* DSI_PLL_DRIFTGUARDEN */
++ l = FLD_MOD(l, 0, 10, 9); /* DSI_PLL_LOCKSEL */
++ l = FLD_MOD(l, 1, 13, 13); /* DSI_PLL_REFEN */
++ l = FLD_MOD(l, 1, 14, 14); /* DSIPHY_CLKINEN */
++ l = FLD_MOD(l, 0, 15, 15); /* DSI_BYPASSEN */
++ l = FLD_MOD(l, 1, 16, 16); /* DSS_CLOCK_EN */
++ l = FLD_MOD(l, 0, 17, 17); /* DSS_CLOCK_PWDN */
++ l = FLD_MOD(l, 1, 18, 18); /* DSI_PROTO_CLOCK_EN */
++ l = FLD_MOD(l, 0, 19, 19); /* DSI_PROTO_CLOCK_PWDN */
++ l = FLD_MOD(l, 0, 20, 20); /* DSI_HSDIVBYPASS */
++ dsi_write_reg(DSI_PLL_CONFIGURATION2, l);
++
++ DSSDBG("PLL config done\n");
++err:
++ return r;
++}
++
++int dsi_pll_init(bool enable_hsclk, bool enable_hsdiv)
++{
++ int r = 0;
++ enum dsi_pll_power_state pwstate;
++ struct dispc_clock_info cinfo;
++
++ DSSDBG("PLL init\n");
++
++ enable_clocks(1);
++ dsi_enable_pll_clock(1);
++
++ /* configure dispc fck and pixel clock to something sane */
++ r = dispc_calc_clock_div(1, 48 * 1000 * 1000, &cinfo);
++ if (r)
++ goto err0;
++
++ r = dispc_set_clock_div(&cinfo);
++ if (r) {
++ DSSERR("Failed to set basic clocks\n");
++ goto err0;
++ }
++
++ r = dss_dsi_power_up();
++ if (r)
++ goto err0;
++
++ /* PLL does not come out of reset without this... */
++ dispc_pck_free_enable(1);
++
++ if (wait_for_bit_change(DSI_PLL_STATUS, 0, 1) != 1) {
++ DSSERR("PLL not coming out of reset.\n");
++ r = -ENODEV;
++ goto err1;
++ }
++
++ /* ... but if left on, we get problems when planes do not
++ * fill the whole display. No idea about this XXX */
++ dispc_pck_free_enable(0);
++
++ if (enable_hsclk && enable_hsdiv)
++ pwstate = DSI_PLL_POWER_ON_ALL;
++ else if (enable_hsclk)
++ pwstate = DSI_PLL_POWER_ON_HSCLK;
++ else if (enable_hsdiv)
++ pwstate = DSI_PLL_POWER_ON_DIV;
++ else
++ pwstate = DSI_PLL_POWER_OFF;
++
++ r = dsi_pll_power(pwstate);
++
++ if (r)
++ goto err1;
++
++ DSSDBG("PLL init done\n");
++
++ return 0;
++err1:
++ dss_dsi_power_down();
++err0:
++ enable_clocks(0);
++ dsi_enable_pll_clock(0);
++ return r;
++}
++
++void dsi_pll_uninit(void)
++{
++ enable_clocks(0);
++ dsi_enable_pll_clock(0);
++
++ dsi.pll_locked = 0;
++ dsi_pll_power(DSI_PLL_POWER_OFF);
++ dss_dsi_power_down();
++ DSSDBG("PLL uninit done\n");
++}
++
++unsigned long dsi_get_dsi1_pll_rate(void)
++{
++ return dsi.dsi1_pll_fclk;
++}
++
++unsigned long dsi_get_dsi2_pll_rate(void)
++{
++ return dsi.dsi2_pll_fclk;
++}
++
++void dsi_dump_clocks(struct seq_file *s)
++{
++ int clksel;
++
++ enable_clocks(1);
++
++ clksel = REG_GET(DSI_PLL_CONFIGURATION2, 11, 11);
++
++ seq_printf(s, "- dsi -\n");
++
++ seq_printf(s, "dsi fclk source = %s\n",
++ dss_get_dsi_clk_source() == 0 ?
++ "dss1_alwon_fclk" : "dsi2_pll_fclk");
++
++ seq_printf(s, "dsi pll source = %s\n",
++ clksel == 0 ?
++ "dss2_alwon_fclk" : "pclkfree");
++
++ seq_printf(s, "DSIPHY\t\t%lu\nDDR_CLK\t\t%lu\n",
++ dsi.dsiphy, dsi.ddr_clk);
++
++ seq_printf(s, "dsi1_pll_fck\t%lu (%s)\n"
++ "dsi2_pll_fck\t%lu (%s)\n",
++ dsi.dsi1_pll_fclk,
++ dss_get_dispc_clk_source() == 0 ? "off" : "on",
++ dsi.dsi2_pll_fclk,
++ dss_get_dsi_clk_source() == 0 ? "off" : "on");
++
++ enable_clocks(0);
++}
++
++void dsi_dump_regs(struct seq_file *s)
++{
++#define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, dsi_read_reg(r))
++
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ DUMPREG(DSI_REVISION);
++ DUMPREG(DSI_SYSCONFIG);
++ DUMPREG(DSI_SYSSTATUS);
++ DUMPREG(DSI_IRQSTATUS);
++ DUMPREG(DSI_IRQENABLE);
++ DUMPREG(DSI_CTRL);
++ DUMPREG(DSI_COMPLEXIO_CFG1);
++ DUMPREG(DSI_COMPLEXIO_IRQ_STATUS);
++ DUMPREG(DSI_COMPLEXIO_IRQ_ENABLE);
++ DUMPREG(DSI_CLK_CTRL);
++ DUMPREG(DSI_TIMING1);
++ DUMPREG(DSI_TIMING2);
++ DUMPREG(DSI_VM_TIMING1);
++ DUMPREG(DSI_VM_TIMING2);
++ DUMPREG(DSI_VM_TIMING3);
++ DUMPREG(DSI_CLK_TIMING);
++ DUMPREG(DSI_TX_FIFO_VC_SIZE);
++ DUMPREG(DSI_RX_FIFO_VC_SIZE);
++ DUMPREG(DSI_COMPLEXIO_CFG2);
++ DUMPREG(DSI_RX_FIFO_VC_FULLNESS);
++ DUMPREG(DSI_VM_TIMING4);
++ DUMPREG(DSI_TX_FIFO_VC_EMPTINESS);
++ DUMPREG(DSI_VM_TIMING5);
++ DUMPREG(DSI_VM_TIMING6);
++ DUMPREG(DSI_VM_TIMING7);
++ DUMPREG(DSI_STOPCLK_TIMING);
++
++ DUMPREG(DSI_VC_CTRL(0));
++ DUMPREG(DSI_VC_TE(0));
++ DUMPREG(DSI_VC_LONG_PACKET_HEADER(0));
++ DUMPREG(DSI_VC_LONG_PACKET_PAYLOAD(0));
++ DUMPREG(DSI_VC_SHORT_PACKET_HEADER(0));
++ DUMPREG(DSI_VC_IRQSTATUS(0));
++ DUMPREG(DSI_VC_IRQENABLE(0));
++
++ DUMPREG(DSI_VC_CTRL(1));
++ DUMPREG(DSI_VC_TE(1));
++ DUMPREG(DSI_VC_LONG_PACKET_HEADER(1));
++ DUMPREG(DSI_VC_LONG_PACKET_PAYLOAD(1));
++ DUMPREG(DSI_VC_SHORT_PACKET_HEADER(1));
++ DUMPREG(DSI_VC_IRQSTATUS(1));
++ DUMPREG(DSI_VC_IRQENABLE(1));
++
++ DUMPREG(DSI_VC_CTRL(2));
++ DUMPREG(DSI_VC_TE(2));
++ DUMPREG(DSI_VC_LONG_PACKET_HEADER(2));
++ DUMPREG(DSI_VC_LONG_PACKET_PAYLOAD(2));
++ DUMPREG(DSI_VC_SHORT_PACKET_HEADER(2));
++ DUMPREG(DSI_VC_IRQSTATUS(2));
++ DUMPREG(DSI_VC_IRQENABLE(2));
++
++ DUMPREG(DSI_VC_CTRL(3));
++ DUMPREG(DSI_VC_TE(3));
++ DUMPREG(DSI_VC_LONG_PACKET_HEADER(3));
++ DUMPREG(DSI_VC_LONG_PACKET_PAYLOAD(3));
++ DUMPREG(DSI_VC_SHORT_PACKET_HEADER(3));
++ DUMPREG(DSI_VC_IRQSTATUS(3));
++ DUMPREG(DSI_VC_IRQENABLE(3));
++
++ DUMPREG(DSI_DSIPHY_CFG0);
++ DUMPREG(DSI_DSIPHY_CFG1);
++ DUMPREG(DSI_DSIPHY_CFG2);
++ DUMPREG(DSI_DSIPHY_CFG5);
++
++ DUMPREG(DSI_PLL_CONTROL);
++ DUMPREG(DSI_PLL_STATUS);
++ DUMPREG(DSI_PLL_GO);
++ DUMPREG(DSI_PLL_CONFIGURATION1);
++ DUMPREG(DSI_PLL_CONFIGURATION2);
++
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++#undef DUMPREG
++}
++
++enum dsi_complexio_power_state {
++ DSI_COMPLEXIO_POWER_OFF = 0x0,
++ DSI_COMPLEXIO_POWER_ON = 0x1,
++ DSI_COMPLEXIO_POWER_ULPS = 0x2,
++};
++
++static int dsi_complexio_power(enum dsi_complexio_power_state state)
++{
++ int t = 0;
++
++ /* PWR_CMD */
++ REG_FLD_MOD(DSI_COMPLEXIO_CFG1, state, 28, 27);
++
++ /* PWR_STATUS */
++ while (FLD_GET(dsi_read_reg(DSI_COMPLEXIO_CFG1), 26, 25) != state) {
++ udelay(1);
++ if (t++ > 1000) {
++ DSSERR("failed to set complexio power state to "
++ "%d\n", state);
++ return -ENODEV;
++ }
++ }
++
++ return 0;
++}
++
++static void dsi_complexio_config(struct omap_display *display)
++{
++ u32 r;
++
++ int clk_lane = display->hw_config.u.dsi.clk_lane;
++ int data1_lane = display->hw_config.u.dsi.data1_lane;
++ int data2_lane = display->hw_config.u.dsi.data2_lane;
++ int clk_pol = display->hw_config.u.dsi.clk_pol;
++ int data1_pol = display->hw_config.u.dsi.data1_pol;
++ int data2_pol = display->hw_config.u.dsi.data2_pol;
++
++ r = dsi_read_reg(DSI_COMPLEXIO_CFG1);
++ r = FLD_MOD(r, clk_lane, 2, 0);
++ r = FLD_MOD(r, clk_pol, 3, 3);
++ r = FLD_MOD(r, data1_lane, 6, 4);
++ r = FLD_MOD(r, data1_pol, 7, 7);
++ r = FLD_MOD(r, data2_lane, 10, 8);
++ r = FLD_MOD(r, data2_pol, 11, 11);
++ dsi_write_reg(DSI_COMPLEXIO_CFG1, r);
++
++ /* The configuration of the DSI complex I/O (number of data lanes,
++ position, differential order) should not be changed while
++ DSS.DSI_CLK_CRTRL[20] LP_CLK_ENABLE bit is set to 1. In order for
++ the hardware to take into account a new configuration of the complex
++ I/O (done in DSS.DSI_COMPLEXIO_CFG1 register), it is recommended to
++ follow this sequence: First set the DSS.DSI_CTRL[0] IF_EN bit to 1,
++ then reset the DSS.DSI_CTRL[0] IF_EN to 0, then set
++ DSS.DSI_CLK_CTRL[20] LP_CLK_ENABLE to 1 and finally set again the
++ DSS.DSI_CTRL[0] IF_EN bit to 1. If the sequence is not followed, the
++ DSI complex I/O configuration is unknown. */
++
++ /*
++ REG_FLD_MOD(DSI_CTRL, 1, 0, 0);
++ REG_FLD_MOD(DSI_CTRL, 0, 0, 0);
++ REG_FLD_MOD(DSI_CLK_CTRL, 1, 20, 20);
++ REG_FLD_MOD(DSI_CTRL, 1, 0, 0);
++ */
++}
++
++static inline unsigned ns2ddr(unsigned ns)
++{
++ /* convert time in ns to ddr ticks, rounding up */
++ return (ns * (dsi.ddr_clk/1000/1000) + 999) / 1000;
++}
++
++static inline unsigned ddr2ns(unsigned ddr)
++{
++ return ddr * 1000 * 1000 / (dsi.ddr_clk / 1000);
++}
++
++static void dsi_complexio_timings(void)
++{
++ u32 r;
++ u32 ths_prepare, ths_prepare_ths_zero, ths_trail, ths_exit;
++ u32 tlpx_half, tclk_trail, tclk_zero;
++ u32 tclk_prepare;
++
++ /* calculate timings */
++
++ /* 1 * DDR_CLK = 2 * UI */
++
++ /* min 40ns + 4*UI max 85ns + 6*UI */
++ ths_prepare = ns2ddr(59) + 2;
++
++ /* min 145ns + 10*UI */
++ ths_prepare_ths_zero = ns2ddr(145) + 5;
++
++ /* min max(8*UI, 60ns+4*UI) */
++ ths_trail = max((unsigned)4, ns2ddr(60) + 2);
++
++ /* min 100ns */
++ ths_exit = ns2ddr(100);
++
++ /* tlpx min 50n */
++ tlpx_half = ns2ddr(25);
++
++ /* min 60ns */
++ tclk_trail = ns2ddr(60);
++
++ /* min 38ns, max 95ns */
++ tclk_prepare = ns2ddr(38);
++
++ /* min tclk-prepare + tclk-zero = 300ns */
++ tclk_zero = ns2ddr(300 - 38);
++
++ DSSDBG("ths_prepare %u (%uns), ths_prepare_ths_zero %u (%uns)\n",
++ ths_prepare, ddr2ns(ths_prepare),
++ ths_prepare_ths_zero, ddr2ns(ths_prepare_ths_zero));
++ DSSDBG("ths_trail %u (%uns), ths_exit %u (%uns)\n",
++ ths_trail, ddr2ns(ths_trail),
++ ths_exit, ddr2ns(ths_exit));
++
++ DSSDBG("tlpx_half %u (%uns), tclk_trail %u (%uns), "
++ "tclk_zero %u (%uns)\n",
++ tlpx_half, ddr2ns(tlpx_half),
++ tclk_trail, ddr2ns(tclk_trail),
++ tclk_zero, ddr2ns(tclk_zero));
++ DSSDBG("tclk_prepare %u (%uns)\n",
++ tclk_prepare, ddr2ns(tclk_prepare));
++
++ /* program timings */
++
++ r = dsi_read_reg(DSI_DSIPHY_CFG0);
++ r = FLD_MOD(r, ths_prepare, 31, 24);
++ r = FLD_MOD(r, ths_prepare_ths_zero, 23, 16);
++ r = FLD_MOD(r, ths_trail, 15, 8);
++ r = FLD_MOD(r, ths_exit, 7, 0);
++ dsi_write_reg(DSI_DSIPHY_CFG0, r);
++
++ r = dsi_read_reg(DSI_DSIPHY_CFG1);
++ r = FLD_MOD(r, tlpx_half, 22, 16);
++ r = FLD_MOD(r, tclk_trail, 15, 8);
++ r = FLD_MOD(r, tclk_zero, 7, 0);
++ dsi_write_reg(DSI_DSIPHY_CFG1, r);
++
++ r = dsi_read_reg(DSI_DSIPHY_CFG2);
++ r = FLD_MOD(r, tclk_prepare, 7, 0);
++ dsi_write_reg(DSI_DSIPHY_CFG2, r);
++}
++
++
++static int dsi_complexio_init(struct omap_display *display)
++{
++ int r = 0;
++
++ DSSDBG("dsi_complexio_init\n");
++
++ /* CIO_CLK_ICG, enable L3 clk to CIO */
++ REG_FLD_MOD(DSI_CLK_CTRL, 1, 14, 14);
++
++ /* A dummy read using the SCP interface to any DSIPHY register is
++ * required after DSIPHY reset to complete the reset of the DSI complex
++ * I/O. */
++ dsi_read_reg(DSI_DSIPHY_CFG5);
++
++ if (wait_for_bit_change(DSI_DSIPHY_CFG5, 30, 1) != 1) {
++ DSSERR("ComplexIO PHY not coming out of reset.\n");
++ r = -ENODEV;
++ goto err;
++ }
++
++ dsi_complexio_config(display);
++
++ r = dsi_complexio_power(DSI_COMPLEXIO_POWER_ON);
++
++ if (r)
++ goto err;
++
++ if (wait_for_bit_change(DSI_COMPLEXIO_CFG1, 29, 1) != 1) {
++ DSSERR("ComplexIO not coming out of reset.\n");
++ r = -ENODEV;
++ goto err;
++ }
++
++ if (wait_for_bit_change(DSI_COMPLEXIO_CFG1, 21, 1) != 1) {
++ DSSERR("ComplexIO LDO power down.\n");
++ r = -ENODEV;
++ goto err;
++ }
++
++ dsi_complexio_timings();
++
++ /*
++ The configuration of the DSI complex I/O (number of data lanes,
++ position, differential order) should not be changed while
++ DSS.DSI_CLK_CRTRL[20] LP_CLK_ENABLE bit is set to 1. For the
++ hardware to recognize a new configuration of the complex I/O (done
++ in DSS.DSI_COMPLEXIO_CFG1 register), it is recommended to follow
++ this sequence: First set the DSS.DSI_CTRL[0] IF_EN bit to 1, next
++ reset the DSS.DSI_CTRL[0] IF_EN to 0, then set DSS.DSI_CLK_CTRL[20]
++ LP_CLK_ENABLE to 1, and finally, set again the DSS.DSI_CTRL[0] IF_EN
++ bit to 1. If the sequence is not followed, the DSi complex I/O
++ configuration is undetermined.
++ */
++ dsi_if_enable(1);
++ dsi_if_enable(0);
++ REG_FLD_MOD(DSI_CLK_CTRL, 1, 20, 20); /* LP_CLK_ENABLE */
++ dsi_if_enable(1);
++ dsi_if_enable(0);
++
++ DSSDBG("CIO init done\n");
++err:
++ return r;
++}
++
++static void dsi_complexio_uninit(void)
++{
++ dsi_complexio_power(DSI_COMPLEXIO_POWER_OFF);
++}
++
++static int _dsi_wait_reset(void)
++{
++ int i = 0;
++
++ while (REG_GET(DSI_SYSSTATUS, 0, 0) == 0) {
++ if (i++ > 5) {
++ DSSERR("soft reset failed\n");
++ return -ENODEV;
++ }
++ udelay(1);
++ }
++
++ return 0;
++}
++
++static int _dsi_reset(void)
++{
++ /* Soft reset */
++ REG_FLD_MOD(DSI_SYSCONFIG, 1, 1, 1);
++ return _dsi_wait_reset();
++}
++
++
++static void dsi_config_tx_fifo(enum fifo_size size1, enum fifo_size size2,
++ enum fifo_size size3, enum fifo_size size4)
++{
++ u32 r = 0;
++ int add = 0;
++ int i;
++
++ dsi.vc[0].fifo_size = size1;
++ dsi.vc[1].fifo_size = size2;
++ dsi.vc[2].fifo_size = size3;
++ dsi.vc[3].fifo_size = size4;
++
++ for (i = 0; i < 4; i++) {
++ u8 v;
++ int size = dsi.vc[i].fifo_size;
++
++ if (add + size > 4) {
++ DSSERR("Illegal FIFO configuration\n");
++ BUG();
++ }
++
++ v = FLD_VAL(add, 2, 0) | FLD_VAL(size, 7, 4);
++ r |= v << (8 * i);
++ /*DSSDBG("TX FIFO vc %d: size %d, add %d\n", i, size, add); */
++ add += size;
++ }
++
++ dsi_write_reg(DSI_TX_FIFO_VC_SIZE, r);
++}
++
++static void dsi_config_rx_fifo(enum fifo_size size1, enum fifo_size size2,
++ enum fifo_size size3, enum fifo_size size4)
++{
++ u32 r = 0;
++ int add = 0;
++ int i;
++
++ dsi.vc[0].fifo_size = size1;
++ dsi.vc[1].fifo_size = size2;
++ dsi.vc[2].fifo_size = size3;
++ dsi.vc[3].fifo_size = size4;
++
++ for (i = 0; i < 4; i++) {
++ u8 v;
++ int size = dsi.vc[i].fifo_size;
++
++ if (add + size > 4) {
++ DSSERR("Illegal FIFO configuration\n");
++ BUG();
++ }
++
++ v = FLD_VAL(add, 2, 0) | FLD_VAL(size, 7, 4);
++ r |= v << (8 * i);
++ /*DSSDBG("RX FIFO vc %d: size %d, add %d\n", i, size, add); */
++ add += size;
++ }
++
++ dsi_write_reg(DSI_RX_FIFO_VC_SIZE, r);
++}
++
++static int dsi_force_tx_stop_mode_io(void)
++{
++ u32 r;
++
++ r = dsi_read_reg(DSI_TIMING1);
++ r = FLD_MOD(r, 1, 15, 15); /* FORCE_TX_STOP_MODE_IO */
++ dsi_write_reg(DSI_TIMING1, r);
++
++ if (wait_for_bit_change(DSI_TIMING1, 15, 0) != 0) {
++ DSSERR("TX_STOP bit not going down\n");
++ return -EIO;
++ }
++
++ return 0;
++}
++
++static void dsi_vc_print_status(int channel)
++{
++ u32 r;
++
++ r = dsi_read_reg(DSI_VC_CTRL(channel));
++ DSSDBG("vc %d: TX_FIFO_NOT_EMPTY %d, BTA_EN %d, VC_BUSY %d, "
++ "TX_FIFO_FULL %d, RX_FIFO_NOT_EMPTY %d, ",
++ channel,
++ FLD_GET(r, 5, 5),
++ FLD_GET(r, 6, 6),
++ FLD_GET(r, 15, 15),
++ FLD_GET(r, 16, 16),
++ FLD_GET(r, 20, 20));
++
++ r = dsi_read_reg(DSI_TX_FIFO_VC_EMPTINESS);
++ DSSDBG("EMPTINESS %d\n", (r >> (8 * channel)) & 0xff);
++}
++
++static void dsi_vc_config(int channel)
++{
++ u32 r;
++
++ DSSDBG("dsi_vc_config %d\n", channel);
++
++ r = dsi_read_reg(DSI_VC_CTRL(channel));
++
++ r = FLD_MOD(r, 0, 1, 1); /* SOURCE, 0 = L4 */
++ r = FLD_MOD(r, 0, 2, 2); /* BTA_SHORT_EN */
++ r = FLD_MOD(r, 0, 3, 3); /* BTA_LONG_EN */
++ r = FLD_MOD(r, 0, 4, 4); /* MODE, 0 = command */
++ r = FLD_MOD(r, 1, 7, 7); /* CS_TX_EN */
++ r = FLD_MOD(r, 1, 8, 8); /* ECC_TX_EN */
++ r = FLD_MOD(r, 0, 9, 9); /* MODE_SPEED, high speed on/off */
++
++ r = FLD_MOD(r, 4, 29, 27); /* DMA_RX_REQ_NB = no dma */
++ r = FLD_MOD(r, 4, 23, 21); /* DMA_TX_REQ_NB = no dma */
++
++ dsi_write_reg(DSI_VC_CTRL(channel), r);
++}
++
++static void dsi_vc_config_vp(int channel)
++{
++ u32 r;
++
++ DSSDBG("dsi_vc_config_vp\n");
++
++ r = dsi_read_reg(DSI_VC_CTRL(channel));
++
++ r = FLD_MOD(r, 1, 1, 1); /* SOURCE, 1 = video port */
++ r = FLD_MOD(r, 0, 2, 2); /* BTA_SHORT_EN */
++ r = FLD_MOD(r, 0, 3, 3); /* BTA_LONG_EN */
++ r = FLD_MOD(r, 0, 4, 4); /* MODE, 0 = command */
++ r = FLD_MOD(r, 1, 7, 7); /* CS_TX_EN */
++ r = FLD_MOD(r, 1, 8, 8); /* ECC_TX_EN */
++ r = FLD_MOD(r, 1, 9, 9); /* MODE_SPEED, high speed on/off */
++
++ r = FLD_MOD(r, 4, 29, 27); /* DMA_RX_REQ_NB = no dma */
++ r = FLD_MOD(r, 4, 23, 21); /* DMA_TX_REQ_NB = no dma */
++
++ dsi_write_reg(DSI_VC_CTRL(channel), r);
++}
++
++
++static int dsi_vc_enable(int channel, bool enable)
++{
++ DSSDBG("dsi_vc_enable channel %d, enable %d\n", channel, enable);
++
++ enable = enable ? 1 : 0;
++
++ REG_FLD_MOD(DSI_VC_CTRL(channel), enable, 0, 0);
++
++ if (wait_for_bit_change(DSI_VC_CTRL(channel), 0, enable) != enable) {
++ DSSERR("Failed to set dsi_vc_enable to %d\n", enable);
++ return -EIO;
++ }
++
++ return 0;
++}
++
++static void dsi_vc_enable_hs(int channel, bool enable)
++{
++ DSSDBG("dsi_vc_enable_hs(%d, %d)\n", channel, enable);
++
++ dsi_vc_enable(channel, 0);
++ dsi_if_enable(0);
++
++ REG_FLD_MOD(DSI_VC_CTRL(channel), enable, 9, 9);
++
++ dsi_vc_enable(channel, 1);
++ dsi_if_enable(1);
++
++ dsi_force_tx_stop_mode_io();
++}
++
++static void dsi_vc_flush_long_data(int channel)
++{
++ while (REG_GET(DSI_VC_CTRL(channel), 20, 20)) {
++ u32 val;
++ val = dsi_read_reg(DSI_VC_SHORT_PACKET_HEADER(channel));
++ DSSDBG("\t\tb1 %#02x b2 %#02x b3 %#02x b4 %#02x\n",
++ (val >> 0) & 0xff,
++ (val >> 8) & 0xff,
++ (val >> 16) & 0xff,
++ (val >> 24) & 0xff);
++ }
++}
++
++static void dsi_show_rx_ack_with_err(u16 err)
++{
++ DSSERR("\tACK with ERROR (%#x):\n", err);
++ if (err & (1 << 0))
++ DSSERR("\t\tSoT Error\n");
++ if (err & (1 << 1))
++ DSSERR("\t\tSoT Sync Error\n");
++ if (err & (1 << 2))
++ DSSERR("\t\tEoT Sync Error\n");
++ if (err & (1 << 3))
++ DSSERR("\t\tEscape Mode Entry Command Error\n");
++ if (err & (1 << 4))
++ DSSERR("\t\tLP Transmit Sync Error\n");
++ if (err & (1 << 5))
++ DSSERR("\t\tHS Receive Timeout Error\n");
++ if (err & (1 << 6))
++ DSSERR("\t\tFalse Control Error\n");
++ if (err & (1 << 7))
++ DSSERR("\t\t(reserved7)\n");
++ if (err & (1 << 8))
++ DSSERR("\t\tECC Error, single-bit (corrected)\n");
++ if (err & (1 << 9))
++ DSSERR("\t\tECC Error, multi-bit (not corrected)\n");
++ if (err & (1 << 10))
++ DSSERR("\t\tChecksum Error\n");
++ if (err & (1 << 11))
++ DSSERR("\t\tData type not recognized\n");
++ if (err & (1 << 12))
++ DSSERR("\t\tInvalid VC ID\n");
++ if (err & (1 << 13))
++ DSSERR("\t\tInvalid Transmission Length\n");
++ if (err & (1 << 14))
++ DSSERR("\t\t(reserved14)\n");
++ if (err & (1 << 15))
++ DSSERR("\t\tDSI Protocol Violation\n");
++}
++
++static u16 dsi_vc_flush_receive_data(int channel)
++{
++ /* RX_FIFO_NOT_EMPTY */
++ while (REG_GET(DSI_VC_CTRL(channel), 20, 20)) {
++ u32 val;
++ u8 dt;
++ val = dsi_read_reg(DSI_VC_SHORT_PACKET_HEADER(channel));
++ DSSDBG("\trawval %#08x\n", val);
++ dt = FLD_GET(val, 5, 0);
++ if (dt == DSI_DT_RX_ACK_WITH_ERR) {
++ u16 err = FLD_GET(val, 23, 8);
++ dsi_show_rx_ack_with_err(err);
++ } else if (dt == DSI_DT_RX_SHORT_READ_1) {
++ DSSDBG("\tDCS short response, 1 byte: %#x\n",
++ FLD_GET(val, 23, 8));
++ } else if (dt == DSI_DT_RX_SHORT_READ_2) {
++ DSSDBG("\tDCS short response, 2 byte: %#x\n",
++ FLD_GET(val, 23, 8));
++ } else if (dt == DSI_DT_RX_DCS_LONG_READ) {
++ DSSDBG("\tDCS long response, len %d\n",
++ FLD_GET(val, 23, 8));
++ dsi_vc_flush_long_data(channel);
++ } else {
++ DSSERR("\tunknown datatype 0x%02x\n", dt);
++ }
++ }
++ return 0;
++}
++
++static int dsi_vc_send_bta(int channel)
++{
++ unsigned long tmo;
++
++ /*DSSDBG("dsi_vc_send_bta_sync %d\n", channel); */
++
++ if (REG_GET(DSI_VC_CTRL(channel), 20, 20)) { /* RX_FIFO_NOT_EMPTY */
++ DSSERR("rx fifo not empty when sending BTA, dumping data:\n");
++ dsi_vc_flush_receive_data(channel);
++ }
++
++ REG_FLD_MOD(DSI_VC_CTRL(channel), 1, 6, 6); /* BTA_EN */
++
++ tmo = jiffies + msecs_to_jiffies(10);
++ while (REG_GET(DSI_VC_CTRL(channel), 6, 6) == 1) {
++ if (time_after(jiffies, tmo)) {
++ DSSERR("Failed to send BTA\n");
++ return -EIO;
++ }
++ }
++
++ return 0;
++}
++
++static int dsi_vc_send_bta_sync(int channel)
++{
++ int r = 0;
++
++ init_completion(&dsi.bta_completion);
++
++ dsi_vc_enable_bta_irq(channel);
++
++ r = dsi_vc_send_bta(channel);
++ if (r)
++ goto err;
++
++ if (wait_for_completion_timeout(&dsi.bta_completion,
++ msecs_to_jiffies(500)) == 0) {
++ DSSERR("Failed to receive BTA\n");
++ r = -EIO;
++ goto err;
++ }
++err:
++ dsi_vc_disable_bta_irq(channel);
++
++ return r;
++}
++
++static inline void dsi_vc_write_long_header(int channel, u8 data_type,
++ u16 len, u8 ecc)
++{
++ u32 val;
++ u8 data_id;
++
++ /*data_id = data_type | channel << 6; */
++ data_id = data_type | dsi.vc[channel].dest_per << 6;
++
++ val = FLD_VAL(data_id, 7, 0) | FLD_VAL(len, 23, 8) |
++ FLD_VAL(ecc, 31, 24);
++
++ dsi_write_reg(DSI_VC_LONG_PACKET_HEADER(channel), val);
++}
++
++static inline void dsi_vc_write_long_payload(int channel,
++ u8 b1, u8 b2, u8 b3, u8 b4)
++{
++ u32 val;
++
++ val = b4 << 24 | b3 << 16 | b2 << 8 | b1 << 0;
++
++/* DSSDBG("\twriting %02x, %02x, %02x, %02x (%#010x)\n",
++ b1, b2, b3, b4, val); */
++
++ dsi_write_reg(DSI_VC_LONG_PACKET_PAYLOAD(channel), val);
++}
++
++static int dsi_vc_send_long(int channel, u8 data_type, u8 *data, u16 len,
++ u8 ecc)
++{
++ /*u32 val; */
++ int i;
++ u8 *p;
++ int r = 0;
++ u8 b1, b2, b3, b4;
++
++ if (dsi.debug_write)
++ DSSDBG("dsi_vc_send_long, %d bytes\n", len);
++
++ /* len + header */
++ if (dsi.vc[channel].fifo_size * 32 * 4 < len + 4) {
++ DSSERR("unable to send long packet: packet too long.\n");
++ return -EINVAL;
++ }
++
++ dsi_vc_write_long_header(channel, data_type, len, ecc);
++
++ /*dsi_vc_print_status(0); */
++
++ p = data;
++ for (i = 0; i < len >> 2; i++) {
++ if (dsi.debug_write)
++ DSSDBG("\tsending full packet %d\n", i);
++ /*dsi_vc_print_status(0); */
++
++ b1 = *p++;
++ b2 = *p++;
++ b3 = *p++;
++ b4 = *p++;
++
++ dsi_vc_write_long_payload(channel, b1, b2, b3, b4);
++ }
++
++ i = len % 4;
++ if (i) {
++ b1 = 0; b2 = 0; b3 = 0;
++
++ if (dsi.debug_write)
++ DSSDBG("\tsending remainder bytes %d\n", i);
++
++ switch (i) {
++ case 3:
++ b1 = *p++;
++ b2 = *p++;
++ b3 = *p++;
++ break;
++ case 2:
++ b1 = *p++;
++ b2 = *p++;
++ break;
++ case 1:
++ b1 = *p++;
++ break;
++ }
++
++ dsi_vc_write_long_payload(channel, b1, b2, b3, 0);
++ }
++
++ return r;
++}
++
++static int dsi_vc_send_short(int channel, u8 data_type, u16 data, u8 ecc)
++{
++ u32 r;
++ u8 data_id;
++
++ if (dsi.debug_write)
++ DSSDBG("dsi_vc_send_short(ch%d, dt %#x, b1 %#x, b2 %#x)\n",
++ channel,
++ data_type, data & 0xff, (data >> 8) & 0xff);
++
++ if (FLD_GET(dsi_read_reg(DSI_VC_CTRL(channel)), 16, 16)) {
++ DSSERR("ERROR FIFO FULL, aborting transfer\n");
++ return -EINVAL;
++ }
++
++ data_id = data_type | channel << 6;
++
++ r = (data_id << 0) | (data << 8) | (ecc << 24);
++
++ dsi_write_reg(DSI_VC_SHORT_PACKET_HEADER(channel), r);
++
++ return 0;
++}
++
++int dsi_vc_send_null(int channel)
++{
++ u8 nullpkg[] = {0, 0, 0, 0};
++ return dsi_vc_send_long(0, DSI_DT_NULL_PACKET, nullpkg, 4, 0);
++}
++EXPORT_SYMBOL(dsi_vc_send_null);
++
++int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len)
++{
++ int r;
++
++ BUG_ON(len == 0);
++
++ if (len == 1) {
++ r = dsi_vc_send_short(channel, DSI_DT_DCS_SHORT_WRITE_0,
++ data[0], 0);
++ } else if (len == 2) {
++ r = dsi_vc_send_short(channel, DSI_DT_DCS_SHORT_WRITE_1,
++ data[0] | (data[1] << 8), 0);
++ } else {
++ /* 0x39 = DCS Long Write */
++ r = dsi_vc_send_long(channel, DSI_DT_DCS_LONG_WRITE,
++ data, len, 0);
++ }
++
++ return r;
++}
++EXPORT_SYMBOL(dsi_vc_dcs_write_nosync);
++
++int dsi_vc_dcs_write(int channel, u8 *data, int len)
++{
++ int r;
++
++ r = dsi_vc_dcs_write_nosync(channel, data, len);
++ if (r)
++ return r;
++
++ /* Some devices need time to process the msg in low power mode.
++ This also makes the write synchronous, and checks that
++ the peripheral is still alive */
++ r = dsi_vc_send_bta_sync(channel);
++
++ return r;
++}
++EXPORT_SYMBOL(dsi_vc_dcs_write);
++
++int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen)
++{
++ u32 val;
++ u8 dt;
++ int r;
++
++ if (dsi.debug_read)
++ DSSDBG("dsi_vc_dcs_read\n");
++
++ r = dsi_vc_send_short(channel, DSI_DT_DCS_READ, dcs_cmd, 0);
++ if (r)
++ return r;
++
++ r = dsi_vc_send_bta_sync(channel);
++ if (r)
++ return r;
++
++ if (REG_GET(DSI_VC_CTRL(channel), 20, 20) == 0) { /* RX_FIFO_NOT_EMPTY */
++ DSSERR("RX fifo empty when trying to read.\n");
++ return -EIO;
++ }
++
++ val = dsi_read_reg(DSI_VC_SHORT_PACKET_HEADER(channel));
++ if (dsi.debug_read)
++ DSSDBG("\theader: %08x\n", val);
++ dt = FLD_GET(val, 5, 0);
++ if (dt == DSI_DT_RX_ACK_WITH_ERR) {
++ u16 err = FLD_GET(val, 23, 8);
++ dsi_show_rx_ack_with_err(err);
++ return -1;
++
++ } else if (dt == DSI_DT_RX_SHORT_READ_1) {
++ u8 data = FLD_GET(val, 15, 8);
++ if (dsi.debug_read)
++ DSSDBG("\tDCS short response, 1 byte: %02x\n", data);
++
++ if (buflen < 1)
++ return -1;
++
++ buf[0] = data;
++
++ return 1;
++ } else if (dt == DSI_DT_RX_SHORT_READ_2) {
++ u16 data = FLD_GET(val, 23, 8);
++ if (dsi.debug_read)
++ DSSDBG("\tDCS short response, 2 byte: %04x\n", data);
++
++ if (buflen < 2)
++ return -1;
++
++ buf[0] = data & 0xff;
++ buf[1] = (data >> 8) & 0xff;
++
++ return 2;
++ } else if (dt == DSI_DT_RX_DCS_LONG_READ) {
++ int w;
++ int len = FLD_GET(val, 23, 8);
++ if (dsi.debug_read)
++ DSSDBG("\tDCS long response, len %d\n", len);
++
++ if (len > buflen)
++ return -1;
++
++ /* two byte checksum ends the packet, not included in len */
++ for (w = 0; w < len + 2;) {
++ int b;
++ val = dsi_read_reg(DSI_VC_SHORT_PACKET_HEADER(channel));
++ if (dsi.debug_read)
++ DSSDBG("\t\t%02x %02x %02x %02x\n",
++ (val >> 0) & 0xff,
++ (val >> 8) & 0xff,
++ (val >> 16) & 0xff,
++ (val >> 24) & 0xff);
++
++ for (b = 0; b < 4; ++b) {
++ if (w < len)
++ buf[w] = (val >> (b * 8)) & 0xff;
++ /* we discard the 2 byte checksum */
++ ++w;
++ }
++ }
++
++ return len;
++
++ } else {
++ DSSERR("\tunknown datatype 0x%02x\n", dt);
++ return -1;
++ }
++}
++EXPORT_SYMBOL(dsi_vc_dcs_read);
++
++
++int dsi_vc_set_max_rx_packet_size(int channel, u16 len)
++{
++ return dsi_vc_send_short(channel, DSI_DT_SET_MAX_RET_PKG_SIZE,
++ len, 0);
++}
++EXPORT_SYMBOL(dsi_vc_set_max_rx_packet_size);
++
++
++static int dsi_set_lp_rx_timeout(int ns, int x4, int x16)
++{
++ u32 r;
++ unsigned long fck;
++ int ticks;
++
++ /* ticks in DSI_FCK */
++
++ fck = dsi_fclk_rate();
++ ticks = (fck / 1000 / 1000) * ns / 1000;
++
++ if (ticks > 0x1fff) {
++ DSSERR("LP_TX_TO too high\n");
++ return -EINVAL;
++ }
++
++ r = dsi_read_reg(DSI_TIMING2);
++ r = FLD_MOD(r, 1, 15, 15); /* LP_RX_TO */
++ r = FLD_MOD(r, x16, 14, 14); /* LP_RX_TO_X16 */
++ r = FLD_MOD(r, x4, 13, 13); /* LP_RX_TO_X4 */
++ r = FLD_MOD(r, ticks, 12, 0); /* LP_RX_COUNTER */
++ dsi_write_reg(DSI_TIMING2, r);
++
++ DSSDBG("LP_RX_TO %ld ns (%#x ticks)\n",
++ (ticks * (x16 ? 16 : 1) * (x4 ? 4 : 1) * 1000) /
++ (fck / 1000 / 1000),
++ ticks);
++
++ return 0;
++}
++
++static int dsi_set_ta_timeout(int ns, int x8, int x16)
++{
++ u32 r;
++ unsigned long fck;
++ int ticks;
++
++ /* ticks in DSI_FCK */
++
++ fck = dsi_fclk_rate();
++ ticks = (fck / 1000 / 1000) * ns / 1000;
++
++ if (ticks > 0x1fff) {
++ DSSERR("TA_TO too high\n");
++ return -EINVAL;
++ }
++
++ r = dsi_read_reg(DSI_TIMING1);
++ r = FLD_MOD(r, 1, 31, 31); /* TA_TO */
++ r = FLD_MOD(r, x16, 30, 30); /* TA_TO_X16 */
++ r = FLD_MOD(r, x8, 29, 29); /* TA_TO_X8 */
++ r = FLD_MOD(r, ticks, 28, 16); /* TA_TO_COUNTER */
++ dsi_write_reg(DSI_TIMING1, r);
++
++ DSSDBG("TA_TO %ld ns (%#x ticks)\n",
++ (ticks * (x16 ? 16 : 1) * (x8 ? 8 : 1) * 1000) /
++ (fck / 1000 / 1000),
++ ticks);
++
++ return 0;
++}
++
++static int dsi_set_stop_state_counter(int ns, int x4, int x16)
++{
++ u32 r;
++ unsigned long fck;
++ int ticks;
++
++ /* ticks in DSI_FCK */
++
++ fck = dsi_fclk_rate();
++ ticks = (fck / 1000 / 1000) * ns / 1000;
++
++ if (ticks > 0x1fff) {
++ DSSERR("STOP_STATE_COUNTER_IO too high\n");
++ return -EINVAL;
++ }
++
++ r = dsi_read_reg(DSI_TIMING1);
++ r = FLD_MOD(r, 1, 15, 15); /* FORCE_TX_STOP_MODE_IO */
++ r = FLD_MOD(r, x16, 14, 14); /* STOP_STATE_X16_IO */
++ r = FLD_MOD(r, x4, 13, 13); /* STOP_STATE_X4_IO */
++ r = FLD_MOD(r, ticks, 12, 0); /* STOP_STATE_COUNTER_IO */
++ dsi_write_reg(DSI_TIMING1, r);
++
++ DSSDBG("STOP_STATE_COUNTER %ld ns (%#x ticks)\n",
++ (ticks * (x16 ? 16 : 1) * (x4 ? 4 : 1) * 1000) /
++ (fck / 1000 / 1000),
++ ticks);
++
++ return 0;
++}
++
++static int dsi_set_hs_tx_timeout(int ns, int x4, int x16)
++{
++ u32 r;
++ unsigned long fck;
++ int ticks;
++
++ /* ticks in TxByteClkHS */
++
++ fck = dsi.ddr_clk / 4;
++ ticks = (fck / 1000 / 1000) * ns / 1000;
++
++ if (ticks > 0x1fff) {
++ DSSERR("HS_TX_TO too high\n");
++ return -EINVAL;
++ }
++
++ r = dsi_read_reg(DSI_TIMING2);
++ r = FLD_MOD(r, 1, 31, 31); /* HS_TX_TO */
++ r = FLD_MOD(r, x16, 30, 30); /* HS_TX_TO_X16 */
++ r = FLD_MOD(r, x4, 29, 29); /* HS_TX_TO_X8 (4 really) */
++ r = FLD_MOD(r, ticks, 28, 16); /* HS_TX_TO_COUNTER */
++ dsi_write_reg(DSI_TIMING2, r);
++
++ DSSDBG("HS_TX_TO %ld ns (%#x ticks)\n",
++ (ticks * (x16 ? 16 : 1) * (x4 ? 4 : 1) * 1000) /
++ (fck / 1000 / 1000),
++ ticks);
++
++ return 0;
++}
++static int dsi_proto_config(struct omap_display *display)
++{
++ u32 r;
++ int buswidth = 0;
++
++ dsi_config_tx_fifo(DSI_FIFO_SIZE_128,
++ DSI_FIFO_SIZE_0,
++ DSI_FIFO_SIZE_0,
++ DSI_FIFO_SIZE_0);
++
++ dsi_config_rx_fifo(DSI_FIFO_SIZE_128,
++ DSI_FIFO_SIZE_0,
++ DSI_FIFO_SIZE_0,
++ DSI_FIFO_SIZE_0);
++
++ /* XXX what values for the timeouts? */
++ dsi_set_stop_state_counter(1000, 0, 0);
++
++ dsi_set_ta_timeout(50000, 1, 1);
++
++ /* 3000ns * 16 */
++ dsi_set_lp_rx_timeout(3000, 0, 1);
++
++ /* 10000ns * 4 */
++ dsi_set_hs_tx_timeout(10000, 1, 0);
++
++ switch (display->ctrl->pixel_size) {
++ case 16:
++ buswidth = 0;
++ break;
++ case 18:
++ buswidth = 1;
++ break;
++ case 24:
++ buswidth = 2;
++ break;
++ default:
++ BUG();
++ }
++
++ r = dsi_read_reg(DSI_CTRL);
++ r = FLD_MOD(r, 1, 1, 1); /* CS_RX_EN */
++ r = FLD_MOD(r, 1, 2, 2); /* ECC_RX_EN */
++ r = FLD_MOD(r, 1, 3, 3); /* TX_FIFO_ARBITRATION */
++ /* XXX what should the ratio be */
++ r = FLD_MOD(r, 0, 4, 4); /* VP_CLK_RATIO, VP_PCLK = VP_CLK/2 */
++ r = FLD_MOD(r, buswidth, 7, 6); /* VP_DATA_BUS_WIDTH */
++ r = FLD_MOD(r, 0, 8, 8); /* VP_CLK_POL */
++ r = FLD_MOD(r, 2, 13, 12); /* LINE_BUFFER, 2 lines */
++ r = FLD_MOD(r, 1, 14, 14); /* TRIGGER_RESET_MODE */
++ r = FLD_MOD(r, 1, 19, 19); /* EOT_ENABLE */
++ r = FLD_MOD(r, 1, 24, 24); /* DCS_CMD_ENABLE */
++ r = FLD_MOD(r, 0, 25, 25); /* DCS_CMD_CODE, 1=start, 0=continue */
++
++ dsi_write_reg(DSI_CTRL, r);
++
++ /* we configure vc0 for L4 communication, and
++ * vc1 for dispc */
++ dsi_vc_config(0);
++ dsi_vc_config_vp(1);
++
++ /* set all vc targets to peripheral 0 */
++ dsi.vc[0].dest_per = 0;
++ dsi.vc[1].dest_per = 0;
++ dsi.vc[2].dest_per = 0;
++ dsi.vc[3].dest_per = 0;
++
++ return 0;
++}
++
++static void dsi_proto_timings(void)
++{
++ int tlpx_half, tclk_zero, tclk_prepare, tclk_trail;
++ int tclk_pre, tclk_post;
++ int ddr_clk_pre, ddr_clk_post;
++ u32 r;
++
++ r = dsi_read_reg(DSI_DSIPHY_CFG1);
++ tlpx_half = FLD_GET(r, 22, 16);
++ tclk_trail = FLD_GET(r, 15, 8);
++ tclk_zero = FLD_GET(r, 7, 0);
++
++ r = dsi_read_reg(DSI_DSIPHY_CFG2);
++ tclk_prepare = FLD_GET(r, 7, 0);
++
++ /* min 8*UI */
++ tclk_pre = 20;
++ /* min 60ns + 52*UI */
++ tclk_post = ns2ddr(60) + 26;
++
++ ddr_clk_pre = (tclk_pre + tlpx_half*2 + tclk_zero + tclk_prepare) / 4;
++ ddr_clk_post = (tclk_post + tclk_trail) / 4;
++
++ r = dsi_read_reg(DSI_CLK_TIMING);
++ r = FLD_MOD(r, ddr_clk_pre, 15, 8);
++ r = FLD_MOD(r, ddr_clk_post, 7, 0);
++ dsi_write_reg(DSI_CLK_TIMING, r);
++
++ DSSDBG("ddr_clk_pre %d, ddr_clk_post %d\n",
++ ddr_clk_pre,
++ ddr_clk_post);
++}
++
++
++#define DSI_DECL_VARS \
++ int __dsi_cb = 0; u32 __dsi_cv = 0;
++
++#define DSI_FLUSH(ch) \
++ if (__dsi_cb > 0) { \
++ /*DSSDBG("sending long packet %#010x\n", __dsi_cv);*/ \
++ dsi_write_reg(DSI_VC_LONG_PACKET_PAYLOAD(ch), __dsi_cv); \
++ __dsi_cb = __dsi_cv = 0; \
++ }
++
++#define DSI_PUSH(ch, data) \
++ do { \
++ __dsi_cv |= (data) << (__dsi_cb * 8); \
++ /*DSSDBG("cv = %#010x, cb = %d\n", __dsi_cv, __dsi_cb);*/ \
++ if (++__dsi_cb > 3) \
++ DSI_FLUSH(ch); \
++ } while (0)
++
++static int dsi_update_screen_l4(struct omap_display *display,
++ int x, int y, int w, int h)
++{
++ /* Note: supports only 24bit colors in 32bit container */
++ int first = 1;
++ int fifo_stalls = 0;
++ int max_dsi_packet_size;
++ int max_data_per_packet;
++ int max_pixels_per_packet;
++ int pixels_left;
++ int bytespp = 3;
++ int scr_width;
++ u32 __iomem *data;
++ int start_offset;
++ int horiz_inc;
++ int current_x;
++ struct omap_overlay *ovl;
++
++ debug_irq = 0;
++
++ DSSDBG("dsi_update_screen_l4 (%d,%d %dx%d)\n",
++ x, y, w, h);
++
++ ovl = display->manager->overlays[0];
++
++ if (ovl->info.color_mode != OMAP_DSS_COLOR_RGB24U)
++ return -EINVAL;
++
++ if (display->ctrl->pixel_size != 24)
++ return -EINVAL;
++
++ scr_width = ovl->info.screen_width;
++ data = ovl->info.vaddr;
++
++ start_offset = scr_width * y + x;
++ horiz_inc = scr_width - w;
++ current_x = x;
++
++ /* We need header(4) + DCSCMD(1) + pixels(numpix*bytespp) bytes
++ * in fifo */
++
++ /* When using CPU, max long packet size is TX buffer size */
++ max_dsi_packet_size = dsi.vc[0].fifo_size * 32 * 4;
++
++ /* we seem to get better perf if we divide the tx fifo to half,
++ and while the other half is being sent, we fill the other half
++ max_dsi_packet_size /= 2; */
++
++ max_data_per_packet = max_dsi_packet_size - 4 - 1;
++
++ max_pixels_per_packet = max_data_per_packet / bytespp;
++
++ DSSDBG("max_pixels_per_packet %d\n", max_pixels_per_packet);
++
++ display->ctrl->setup_update(display, x, y, w, h);
++
++ pixels_left = w * h;
++
++ DSSDBG("total pixels %d\n", pixels_left);
++
++ data += start_offset;
++
++#ifdef DEBUG
++ dsi.update_region.x = x;
++ dsi.update_region.y = y;
++ dsi.update_region.w = w;
++ dsi.update_region.h = h;
++ dsi.update_region.bytespp = bytespp;
++#endif
++
++ perf_mark_start();
++
++ while (pixels_left > 0) {
++ /* 0x2c = write_memory_start */
++ /* 0x3c = write_memory_continue */
++ u8 dcs_cmd = first ? 0x2c : 0x3c;
++ int pixels;
++ DSI_DECL_VARS;
++ first = 0;
++
++#if 1
++ /* using fifo not empty */
++ /* TX_FIFO_NOT_EMPTY */
++ while (FLD_GET(dsi_read_reg(DSI_VC_CTRL(0)), 5, 5)) {
++ udelay(1);
++ fifo_stalls++;
++ if (fifo_stalls > 0xfffff) {
++ DSSERR("fifo stalls overflow, pixels left %d\n",
++ pixels_left);
++ dsi_if_enable(0);
++ return -EIO;
++ }
++ }
++#elif 1
++ /* using fifo emptiness */
++ while ((REG_GET(DSI_TX_FIFO_VC_EMPTINESS, 7, 0)+1)*4 <
++ max_dsi_packet_size) {
++ fifo_stalls++;
++ if (fifo_stalls > 0xfffff) {
++ DSSERR("fifo stalls overflow, pixels left %d\n",
++ pixels_left);
++ dsi_if_enable(0);
++ return -EIO;
++ }
++ }
++#else
++ while ((REG_GET(DSI_TX_FIFO_VC_EMPTINESS, 7, 0)+1)*4 == 0) {
++ fifo_stalls++;
++ if (fifo_stalls > 0xfffff) {
++ DSSERR("fifo stalls overflow, pixels left %d\n",
++ pixels_left);
++ dsi_if_enable(0);
++ return -EIO;
++ }
++ }
++#endif
++ pixels = min(max_pixels_per_packet, pixels_left);
++
++ pixels_left -= pixels;
++
++ dsi_vc_write_long_header(0, DSI_DT_DCS_LONG_WRITE,
++ 1 + pixels * bytespp, 0);
++
++ DSI_PUSH(0, dcs_cmd);
++
++ while (pixels-- > 0) {
++ u32 pix = __raw_readl(data++);
++
++ DSI_PUSH(0, (pix >> 16) & 0xff);
++ DSI_PUSH(0, (pix >> 8) & 0xff);
++ DSI_PUSH(0, (pix >> 0) & 0xff);
++
++ current_x++;
++ if (current_x == x+w) {
++ current_x = x;
++ data += horiz_inc;
++ }
++ }
++
++ DSI_FLUSH(0);
++ }
++
++ perf_show("L4");
++
++ return 0;
++}
++
++#if 0
++static void dsi_clear_screen_l4(struct omap_display *display,
++ int x, int y, int w, int h)
++{
++ int first = 1;
++ int fifo_stalls = 0;
++ int max_dsi_packet_size;
++ int max_data_per_packet;
++ int max_pixels_per_packet;
++ int pixels_left;
++ int bytespp = 3;
++ int pixnum;
++
++ debug_irq = 0;
++
++ DSSDBG("dsi_clear_screen_l4 (%d,%d %dx%d)\n",
++ x, y, w, h);
++
++ if (display->ctrl->bpp != 24)
++ return -EINVAL;
++
++ /* We need header(4) + DCSCMD(1) + pixels(numpix*bytespp)
++ * bytes in fifo */
++
++ /* When using CPU, max long packet size is TX buffer size */
++ max_dsi_packet_size = dsi.vc[0].fifo_size * 32 * 4;
++
++ max_data_per_packet = max_dsi_packet_size - 4 - 1;
++
++ max_pixels_per_packet = max_data_per_packet / bytespp;
++
++ enable_clocks(1);
++
++ display->ctrl->setup_update(display, x, y, w, h);
++
++ pixels_left = w * h;
++
++ dsi.update_region.x = x;
++ dsi.update_region.y = y;
++ dsi.update_region.w = w;
++ dsi.update_region.h = h;
++ dsi.update_region.bytespp = bytespp;
++
++ start_measuring();
++
++ pixnum = 0;
++
++ while (pixels_left > 0) {
++ /* 0x2c = write_memory_start */
++ /* 0x3c = write_memory_continue */
++ u8 dcs_cmd = first ? 0x2c : 0x3c;
++ int pixels;
++ DSI_DECL_VARS;
++ first = 0;
++
++ /* TX_FIFO_NOT_EMPTY */
++ while (FLD_GET(dsi_read_reg(DSI_VC_CTRL(0)), 5, 5)) {
++ fifo_stalls++;
++ if (fifo_stalls > 0xfffff) {
++ DSSERR("fifo stalls overflow\n");
++ dsi_if_enable(0);
++ enable_clocks(0);
++ return;
++ }
++ }
++
++ pixels = min(max_pixels_per_packet, pixels_left);
++
++ pixels_left -= pixels;
++
++ dsi_vc_write_long_header(0, DSI_DT_DCS_LONG_WRITE,
++ 1 + pixels * bytespp, 0);
++
++ DSI_PUSH(0, dcs_cmd);
++
++ while (pixels-- > 0) {
++ u32 pix;
++
++ pix = 0x000000;
++
++ DSI_PUSH(0, (pix >> 16) & 0xff);
++ DSI_PUSH(0, (pix >> 8) & 0xff);
++ DSI_PUSH(0, (pix >> 0) & 0xff);
++ }
++
++ DSI_FLUSH(0);
++ }
++
++ enable_clocks(0);
++
++ end_measuring("L4 CLEAR");
++}
++#endif
++
++static void dsi_setup_update_dispc(struct omap_display *display,
++ u16 x, u16 y, u16 w, u16 h)
++{
++ DSSDBG("dsi_setup_update_dispc(%d,%d %dx%d)\n",
++ x, y, w, h);
++
++#ifdef DEBUG
++ dsi.update_region.x = x;
++ dsi.update_region.y = y;
++ dsi.update_region.w = w;
++ dsi.update_region.h = h;
++ dsi.update_region.bytespp = 3; // XXX
++#endif
++
++ dispc_setup_partial_planes(display, &x, &y, &w, &h);
++
++ dispc_set_lcd_size(w, h);
++}
++
++static void dsi_setup_autoupdate_dispc(struct omap_display *display)
++{
++ u16 w, h;
++
++ display->get_resolution(display, &w, &h);
++
++#ifdef DEBUG
++ dsi.update_region.x = 0;
++ dsi.update_region.y = 0;
++ dsi.update_region.w = w;
++ dsi.update_region.h = h;
++ dsi.update_region.bytespp = 3; // XXX
++#endif
++
++ /* the overlay settings may not have been applied, if we were in manual
++ * mode earlier, so do it here */
++ display->manager->apply(display->manager);
++
++ dispc_set_lcd_size(w, h);
++
++ dsi.autoupdate_setup = 0;
++}
++
++static void dsi_update_screen_dispc(struct omap_display *display,
++ u16 x, u16 y, u16 w, u16 h)
++{
++ int bytespp = 3;
++ int total_len;
++ int line_packet_len;
++ u32 l;
++
++ if (dsi.update_mode == OMAP_DSS_UPDATE_MANUAL)
++ DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n",
++ x, y, w, h);
++
++ /* TODO: one packet could be longer, I think? Max is the line buffer */
++ line_packet_len = w * bytespp + 1; /* 1 byte for DCS cmd */
++ total_len = line_packet_len * h;
++
++ display->ctrl->setup_update(display, x, y, w, h);
++
++ if (0)
++ dsi_vc_print_status(1);
++
++ perf_mark_start();
++
++ l = FLD_VAL(total_len, 23, 0); /* TE_SIZE */
++ dsi_write_reg(DSI_VC_TE(1), l);
++
++ dsi_vc_write_long_header(1, DSI_DT_DCS_LONG_WRITE, line_packet_len, 0);
++
++ if (dsi.use_te)
++ l = FLD_MOD(l, 1, 30, 30); /* TE_EN */
++ else
++ l = FLD_MOD(l, 1, 31, 31); /* TE_START */
++ dsi_write_reg(DSI_VC_TE(1), l);
++
++ dispc_enable_lcd_out(1);
++
++ if (dsi.use_te)
++ dsi_vc_send_bta(1);
++}
++
++static void framedone_callback(void *data, u32 mask)
++{
++ if (dsi.framedone_scheduled) {
++ DSSERR("Framedone already scheduled. Bogus FRAMEDONE IRQ?\n");
++ return;
++ }
++
++ dsi.framedone_scheduled = 1;
++
++ /* We get FRAMEDONE when DISPC has finished sending pixels and turns
++ * itself off. However, DSI still has the pixels in its buffers, and
++ * is sending the data. Thus we have to wait until we can do a new
++ * transfer or turn the clocks off. We do that in a separate work
++ * func. */
++ queue_work(dsi.workqueue, &dsi.framedone_work);
++}
++
++static void framedone_worker(struct work_struct *work)
++{
++ u32 l;
++ unsigned long tmo;
++ int i = 0;
++
++ l = REG_GET(DSI_VC_TE(1), 23, 0); /* TE_SIZE */
++
++ /* There shouldn't be much stuff in DSI buffers, if any, so we'll
++ * just busyloop */
++ if (l > 0) {
++ tmo = jiffies + msecs_to_jiffies(50);
++ while (REG_GET(DSI_VC_TE(1), 23, 0) > 0) { /* TE_SIZE */
++ i++;
++ if (time_after(jiffies, tmo)) {
++ DSSERR("timeout waiting TE_SIZE to zero\n");
++ break;
++ }
++ cpu_relax();
++ }
++ }
++
++ if (REG_GET(DSI_VC_TE(1), 30, 30))
++ DSSERR("TE_EN not zero\n");
++
++ if (REG_GET(DSI_VC_TE(1), 31, 31))
++ DSSERR("TE_START not zero\n");
++
++ perf_show("DISPC");
++
++ if (dsi.update_mode == OMAP_DSS_UPDATE_MANUAL)
++ DSSDBG("FRAMEDONE\n");
++
++#if 0
++ if (l)
++ DSSWARN("FRAMEDONE irq too early, %d bytes, %d loops\n", l, i);
++#else
++ if (l > 1024*3)
++ DSSWARN("FRAMEDONE irq too early, %d bytes, %d loops\n", l, i);
++#endif
++
++#ifdef CONFIG_OMAP2_DSS_FAKE_VSYNC
++ dispc_fake_vsync_irq();
++#endif
++ dsi.framedone_scheduled = 0;
++
++ /* XXX check that fifo is not full. otherwise we would sleep and never
++ * get to process_cmd_fifo below */
++ /* We check for target_update_mode, not update_mode. No reason to push
++ * new updates if we're turning auto update off */
++ if (dsi.target_update_mode == OMAP_DSS_UPDATE_AUTO)
++ dsi_push_autoupdate(dsi.vc[1].display);
++
++ atomic_set(&dsi.cmd_pending, 0);
++ dsi_process_cmd_fifo(NULL);
++}
++
++static void dsi_start_auto_update(struct omap_display *display)
++{
++ DSSDBG("starting auto update\n");
++
++ dsi.autoupdate_setup = 1;
++
++ dsi_push_autoupdate(display);
++}
++
++
++
++
++
++
++
++
++
++
++
++
++
++/* FIFO functions */
++
++static void dsi_signal_fifo_waiters(void)
++{
++ if (atomic_read(&dsi.cmd_fifo_full) > 0) {
++ DSSDBG("SIGNALING: Fifo not full for waiter!\n");
++ complete(&dsi.cmd_done);
++ atomic_dec(&dsi.cmd_fifo_full);
++ }
++}
++
++/* returns 1 for async op, and 0 for sync op */
++static int dsi_do_update(struct omap_display *display,
++ struct dsi_cmd_update *upd)
++{
++ int r;
++ u16 x = upd->x, y = upd->y, w = upd->w, h = upd->h;
++ u16 dw, dh;
++
++ if (dsi.update_mode == OMAP_DSS_UPDATE_DISABLED)
++ return 0;
++
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ return 0;
++
++ display->get_resolution(display, &dw, &dh);
++ if (x > dw || y > dh)
++ return 0;
++
++ if (x + w > dw)
++ w = dw - x;
++
++ if (y + h > dh)
++ h = dh - y;
++
++ DSSDBGF("%d,%d %dx%d", x, y, w, h);
++
++ perf_mark_setup();
++
++ if (display->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) {
++ dsi_setup_update_dispc(display, x, y, w, h);
++ dsi_update_screen_dispc(display, x, y, w, h);
++ return 1;
++ } else {
++ r = dsi_update_screen_l4(display, x, y, w, h);
++ if (r)
++ DSSERR("L4 update failed\n");
++ return 0;
++ }
++}
++
++/* returns 1 for async op, and 0 for sync op */
++static int dsi_do_autoupdate(struct omap_display *display)
++{
++ int r;
++ u16 w, h;
++
++ if (dsi.update_mode == OMAP_DSS_UPDATE_DISABLED)
++ return 0;
++
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ return 0;
++
++ display->get_resolution(display, &w, &h);
++
++ perf_mark_setup();
++
++ if (display->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) {
++ if (dsi.autoupdate_setup)
++ dsi_setup_autoupdate_dispc(display);
++ dsi_update_screen_dispc(display, 0, 0, w, h);
++ return 1;
++ } else {
++ r = dsi_update_screen_l4(display, 0, 0, w, h);
++ if (r)
++ DSSERR("L4 update failed\n");
++ return 0;
++ }
++}
++
++static void dsi_do_cmd_mem_read(struct omap_display *display,
++ struct dsi_cmd_mem_read *mem_read)
++{
++ int r;
++ r = display->ctrl->memory_read(display,
++ mem_read->buf,
++ mem_read->size,
++ mem_read->x,
++ mem_read->y,
++ mem_read->w,
++ mem_read->h);
++
++ *mem_read->ret_size = (size_t)r;
++ complete(mem_read->completion);
++}
++
++static void dsi_do_cmd_test(struct omap_display *display,
++ struct dsi_cmd_test *test)
++{
++ int r = 0;
++
++ DSSDBGF("");
++
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ return;
++
++ /* run test first in low speed mode */
++ dsi_vc_enable_hs(0, 0);
++
++ if (display->ctrl->run_test) {
++ r = display->ctrl->run_test(display, test->test_num);
++ if (r)
++ goto end;
++ }
++
++ if (display->panel->run_test) {
++ r = display->panel->run_test(display, test->test_num);
++ if (r)
++ goto end;
++ }
++
++ /* then in high speed */
++ dsi_vc_enable_hs(0, 1);
++
++ if (display->ctrl->run_test) {
++ r = display->ctrl->run_test(display, test->test_num);
++ if (r)
++ goto end;
++ }
++
++ if (display->panel->run_test)
++ r = display->panel->run_test(display, test->test_num);
++
++end:
++ dsi_vc_enable_hs(0, 1);
++
++ *test->result = r;
++ complete(test->completion);
++
++ DSSDBG("test end\n");
++}
++
++static void dsi_do_cmd_set_te(struct omap_display *display, bool enable)
++{
++ dsi.use_te = enable;
++
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ return;
++
++ display->ctrl->enable_te(display, enable);
++
++ if (enable) {
++ /* disable LP_RX_TO, so that we can receive TE.
++ * Time to wait for TE is longer than the timer allows */
++ REG_FLD_MOD(DSI_TIMING2, 0, 15, 15); /* LP_RX_TO */
++ } else {
++ REG_FLD_MOD(DSI_TIMING2, 1, 15, 15); /* LP_RX_TO */
++ }
++}
++
++static void dsi_do_cmd_set_update_mode(struct omap_display *display,
++ enum omap_dss_update_mode mode)
++{
++ dsi.update_mode = mode;
++
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ return;
++
++ if (mode == OMAP_DSS_UPDATE_AUTO)
++ dsi_start_auto_update(display);
++}
++
++static void dsi_process_cmd_fifo(struct work_struct *work)
++{
++ int len;
++ struct dsi_cmd_item p;
++ unsigned long flags;
++ struct omap_display *display;
++ int exit = 0;
++
++ if (dsi.debug_process)
++ DSSDBGF("");
++
++ if (atomic_cmpxchg(&dsi.cmd_pending, 0, 1) == 1) {
++ if (dsi.debug_process)
++ DSSDBG("cmd pending, skip process\n");
++ return;
++ }
++
++ while (!exit) {
++ spin_lock_irqsave(dsi.cmd_fifo->lock, flags);
++
++ len = __kfifo_get(dsi.cmd_fifo, (unsigned char *)&p,
++ sizeof(p));
++ if (len == 0) {
++ if (dsi.debug_process)
++ DSSDBG("nothing more in fifo, atomic clear\n");
++ atomic_set(&dsi.cmd_pending, 0);
++ spin_unlock_irqrestore(dsi.cmd_fifo->lock, flags);
++ break;
++ }
++
++ spin_unlock_irqrestore(dsi.cmd_fifo->lock, flags);
++
++ BUG_ON(len != sizeof(p));
++
++ display = p.display;
++
++ if (dsi.debug_process)
++ DSSDBG("processing cmd %d\n", p.cmd);
++
++ switch (p.cmd) {
++ case DSI_CMD_UPDATE:
++ if (dsi_do_update(display, &p.u.r)) {
++ if (dsi.debug_process)
++ DSSDBG("async update\n");
++ exit = 1;
++ } else {
++ if (dsi.debug_process)
++ DSSDBG("sync update\n");
++ }
++ break;
++
++ case DSI_CMD_AUTOUPDATE:
++ if (dsi_do_autoupdate(display)) {
++ if (dsi.debug_process)
++ DSSDBG("async autoupdate\n");
++ exit = 1;
++ } else {
++ if (dsi.debug_process)
++ DSSDBG("sync autoupdate\n");
++ }
++ break;
++
++ case DSI_CMD_SYNC:
++ if (dsi.debug_process)
++ DSSDBG("Signaling SYNC done!\n");
++ complete(p.u.sync);
++ break;
++
++ case DSI_CMD_MEM_READ:
++ dsi_do_cmd_mem_read(display, &p.u.mem_read);
++ break;
++
++ case DSI_CMD_TEST:
++ dsi_do_cmd_test(display, &p.u.test);
++ break;
++
++ case DSI_CMD_SET_TE:
++ dsi_do_cmd_set_te(display, p.u.te);
++ break;
++
++ case DSI_CMD_SET_UPDATE_MODE:
++ dsi_do_cmd_set_update_mode(display, p.u.update_mode);
++ break;
++
++ case DSI_CMD_SET_ROTATE:
++ display->ctrl->set_rotate(display, p.u.rotate);
++ if (dsi.update_mode == OMAP_DSS_UPDATE_AUTO)
++ dsi.autoupdate_setup = 1;
++ break;
++
++ case DSI_CMD_SET_MIRROR:
++ display->ctrl->set_mirror(display, p.u.mirror);
++ break;
++
++ default:
++ BUG();
++ }
++ }
++
++ if (dsi.debug_process)
++ DSSDBG("exit dsi_process_cmd_fifo\n");
++
++ dsi_signal_fifo_waiters();
++}
++
++static void dsi_push_cmd(struct dsi_cmd_item *p)
++{
++ int ret;
++
++ if (dsi.debug_process)
++ DSSDBGF("");
++
++ while (1) {
++ unsigned long flags;
++ unsigned avail, used;
++
++ spin_lock_irqsave(dsi.cmd_fifo->lock, flags);
++ used = __kfifo_len(dsi.cmd_fifo) / sizeof(struct dsi_cmd_item);
++ avail = DSI_CMD_FIFO_LEN - used;
++
++ if (dsi.debug_process)
++ DSSDBG("%u/%u items left in fifo\n", avail, used);
++
++ if (avail == 0) {
++ if (dsi.debug_process)
++ DSSDBG("cmd fifo full, waiting...\n");
++ spin_unlock_irqrestore(dsi.cmd_fifo->lock, flags);
++ atomic_inc(&dsi.cmd_fifo_full);
++ wait_for_completion(&dsi.cmd_done);
++ if (dsi.debug_process)
++ DSSDBG("cmd fifo not full, woke up\n");
++ continue;
++ }
++
++ ret = __kfifo_put(dsi.cmd_fifo, (unsigned char *)p,
++ sizeof(*p));
++
++ spin_unlock_irqrestore(dsi.cmd_fifo->lock, flags);
++
++ BUG_ON(ret != sizeof(*p));
++
++ break;
++ }
++
++ queue_work(dsi.workqueue, &dsi.process_work);
++}
++
++static void dsi_push_update(struct omap_display *display,
++ int x, int y, int w, int h)
++{
++ struct dsi_cmd_item p;
++
++ p.display = display;
++ p.cmd = DSI_CMD_UPDATE;
++
++ p.u.r.x = x;
++ p.u.r.y = y;
++ p.u.r.w = w;
++ p.u.r.h = h;
++
++ DSSDBG("pushing UPDATE %d,%d %dx%d\n", x, y, w, h);
++
++ dsi_push_cmd(&p);
++}
++
++static void dsi_push_autoupdate(struct omap_display *display)
++{
++ struct dsi_cmd_item p;
++
++ p.display = display;
++ p.cmd = DSI_CMD_AUTOUPDATE;
++
++ dsi_push_cmd(&p);
++}
++
++static void dsi_push_sync(struct omap_display *display,
++ struct completion *sync_comp)
++{
++ struct dsi_cmd_item p;
++
++ p.display = display;
++ p.cmd = DSI_CMD_SYNC;
++ p.u.sync = sync_comp;
++
++ DSSDBG("pushing SYNC\n");
++
++ dsi_push_cmd(&p);
++}
++
++static void dsi_push_mem_read(struct omap_display *display,
++ struct dsi_cmd_mem_read *mem_read)
++{
++ struct dsi_cmd_item p;
++
++ p.display = display;
++ p.cmd = DSI_CMD_MEM_READ;
++ p.u.mem_read = *mem_read;
++
++ DSSDBG("pushing MEM_READ\n");
++
++ dsi_push_cmd(&p);
++}
++
++static void dsi_push_test(struct omap_display *display, int test_num,
++ int *result, struct completion *completion)
++{
++ struct dsi_cmd_item p;
++
++ p.display = display;
++ p.cmd = DSI_CMD_TEST;
++ p.u.test.test_num = test_num;
++ p.u.test.result = result;
++ p.u.test.completion = completion;
++
++ DSSDBG("pushing TEST\n");
++
++ dsi_push_cmd(&p);
++}
++
++static void dsi_push_set_te(struct omap_display *display, bool enable)
++{
++ struct dsi_cmd_item p;
++
++ p.display = display;
++ p.cmd = DSI_CMD_SET_TE;
++ p.u.te = enable;
++
++ DSSDBG("pushing SET_TE\n");
++
++ dsi_push_cmd(&p);
++}
++
++static void dsi_push_set_update_mode(struct omap_display *display,
++ enum omap_dss_update_mode mode)
++{
++ struct dsi_cmd_item p;
++
++ p.display = display;
++ p.cmd = DSI_CMD_SET_UPDATE_MODE;
++ p.u.update_mode = mode;
++
++ DSSDBG("pushing SET_UPDATE_MODE\n");
++
++ dsi_push_cmd(&p);
++}
++
++static void dsi_push_set_rotate(struct omap_display *display, int rotate)
++{
++ struct dsi_cmd_item p;
++
++ p.display = display;
++ p.cmd = DSI_CMD_SET_ROTATE;
++ p.u.rotate = rotate;
++
++ DSSDBG("pushing SET_ROTATE\n");
++
++ dsi_push_cmd(&p);
++}
++
++static void dsi_push_set_mirror(struct omap_display *display, int mirror)
++{
++ struct dsi_cmd_item p;
++
++ p.display = display;
++ p.cmd = DSI_CMD_SET_MIRROR;
++ p.u.mirror = mirror;
++
++ DSSDBG("pushing SET_MIRROR\n");
++
++ dsi_push_cmd(&p);
++}
++
++static int dsi_wait_sync(struct omap_display *display)
++{
++ long wait = msecs_to_jiffies(60000);
++ struct completion compl;
++
++ DSSDBGF("");
++
++ init_completion(&compl);
++ dsi_push_sync(display, &compl);
++
++ DSSDBG("Waiting for SYNC to happen...\n");
++ wait = wait_for_completion_timeout(&compl, wait);
++ DSSDBG("Released from SYNC\n");
++
++ if (wait == 0) {
++ DSSERR("timeout waiting sync\n");
++ return -ETIME;
++ }
++
++ return 0;
++}
++
++
++
++
++
++
++
++
++
++
++
++
++/* Display funcs */
++
++static int dsi_display_init_dispc(struct omap_display *display)
++{
++ int r;
++
++ r = omap_dispc_register_isr(framedone_callback, NULL,
++ DISPC_IRQ_FRAMEDONE);
++ if (r) {
++ DSSERR("can't get FRAMEDONE irq\n");
++ return r;
++ }
++
++ dispc_set_lcd_display_type(OMAP_DSS_LCD_DISPLAY_TFT);
++
++ dispc_set_parallel_interface_mode(OMAP_DSS_PARALLELMODE_DSI);
++ dispc_enable_fifohandcheck(1);
++
++ dispc_set_tft_data_lines(display->ctrl->pixel_size);
++
++ {
++ struct omap_video_timings timings = {
++ .hsw = 1,
++ .hfp = 1,
++ .hbp = 1,
++ .vsw = 1,
++ .vfp = 0,
++ .vbp = 0,
++ };
++
++ dispc_set_lcd_timings(&timings);
++ }
++
++ return 0;
++}
++
++static void dsi_display_uninit_dispc(struct omap_display *display)
++{
++ omap_dispc_unregister_isr(framedone_callback, NULL,
++ DISPC_IRQ_FRAMEDONE);
++}
++
++static int dsi_display_init_dsi(struct omap_display *display)
++{
++ struct dsi_clock_info cinfo;
++ int r;
++
++ _dsi_print_reset_status();
++
++ r = dsi_pll_init(1, 0);
++ if (r)
++ goto err0;
++
++ r = dsi_pll_calc_ddrfreq(display->hw_config.u.dsi.ddr_clk_hz, &cinfo);
++ if (r)
++ goto err1;
++
++ r = dsi_pll_program(&cinfo);
++ if (r)
++ goto err1;
++
++ DSSDBG("PLL OK\n");
++
++ r = dsi_complexio_init(display);
++ if (r)
++ goto err1;
++
++ _dsi_print_reset_status();
++
++ dsi_proto_timings();
++ dsi_set_lp_clk_divisor();
++
++ if (1)
++ _dsi_print_reset_status();
++
++ r = dsi_proto_config(display);
++ if (r)
++ goto err2;
++
++ /* enable interface */
++ dsi_vc_enable(0, 1);
++ dsi_vc_enable(1, 1);
++ dsi_if_enable(1);
++ dsi_force_tx_stop_mode_io();
++
++ if (display->ctrl && display->ctrl->enable) {
++ r = display->ctrl->enable(display);
++ if (r)
++ goto err3;
++ }
++
++ if (display->panel && display->panel->enable) {
++ r = display->panel->enable(display);
++ if (r)
++ goto err4;
++ }
++
++ /* enable high-speed after initial config */
++ dsi_vc_enable_hs(0, 1);
++
++ return 0;
++err4:
++ if (display->ctrl && display->ctrl->disable)
++ display->ctrl->disable(display);
++err3:
++ dsi_if_enable(0);
++err2:
++ dsi_complexio_uninit();
++err1:
++ dsi_pll_uninit();
++err0:
++ return r;
++}
++
++static void dsi_display_uninit_dsi(struct omap_display *display)
++{
++ if (display->panel && display->panel->disable)
++ display->panel->disable(display);
++ if (display->ctrl && display->ctrl->disable)
++ display->ctrl->disable(display);
++
++ dsi_complexio_uninit();
++ dsi_pll_uninit();
++}
++
++static int dsi_core_init(void)
++{
++ /* Autoidle */
++ REG_FLD_MOD(DSI_SYSCONFIG, 1, 0, 0);
++
++ /* ENWAKEUP */
++ REG_FLD_MOD(DSI_SYSCONFIG, 1, 2, 2);
++
++ /* SIDLEMODE smart-idle */
++ REG_FLD_MOD(DSI_SYSCONFIG, 2, 4, 3);
++
++ _dsi_initialize_irq();
++
++ return 0;
++}
++
++static int dsi_display_enable(struct omap_display *display)
++{
++ int r = 0;
++
++ DSSDBG("dsi_display_enable\n");
++
++ mutex_lock(&dsi.lock);
++
++ if (display->state != OMAP_DSS_DISPLAY_DISABLED) {
++ DSSERR("display already enabled\n");
++ r = -EINVAL;
++ goto err0;
++ }
++
++ enable_clocks(1);
++ dsi_enable_pll_clock(1);
++
++ r = _dsi_reset();
++ if (r)
++ return r;
++
++ dsi_core_init();
++
++ r = dsi_display_init_dispc(display);
++ if (r)
++ goto err1;
++
++ r = dsi_display_init_dsi(display);
++ if (r)
++ goto err2;
++
++ display->state = OMAP_DSS_DISPLAY_ACTIVE;
++
++ if (dsi.use_te)
++ dsi_push_set_te(display, 1);
++
++ dsi_push_set_update_mode(display, dsi.user_update_mode);
++ dsi.target_update_mode = dsi.user_update_mode;
++
++ mutex_unlock(&dsi.lock);
++
++ return dsi_wait_sync(display);
++
++err2:
++ dsi_display_uninit_dispc(display);
++err1:
++ enable_clocks(0);
++ dsi_enable_pll_clock(0);
++err0:
++ mutex_unlock(&dsi.lock);
++ DSSDBG("dsi_display_enable FAILED\n");
++ return r;
++}
++
++static void dsi_display_disable(struct omap_display *display)
++{
++ DSSDBG("dsi_display_disable\n");
++
++ mutex_lock(&dsi.lock);
++
++ if (display->state == OMAP_DSS_DISPLAY_DISABLED ||
++ display->state == OMAP_DSS_DISPLAY_SUSPENDED)
++ goto end;
++
++ if (dsi.target_update_mode != OMAP_DSS_UPDATE_DISABLED) {
++ dsi_push_set_update_mode(display, OMAP_DSS_UPDATE_DISABLED);
++ dsi.target_update_mode = OMAP_DSS_UPDATE_DISABLED;
++ }
++
++ dsi_wait_sync(display);
++
++ display->state = OMAP_DSS_DISPLAY_DISABLED;
++
++ dsi_display_uninit_dispc(display);
++
++ dsi_display_uninit_dsi(display);
++
++ enable_clocks(0);
++ dsi_enable_pll_clock(0);
++end:
++ mutex_unlock(&dsi.lock);
++}
++
++static int dsi_display_suspend(struct omap_display *display)
++{
++ DSSDBG("dsi_display_suspend\n");
++
++ dsi_display_disable(display);
++
++ display->state = OMAP_DSS_DISPLAY_SUSPENDED;
++
++ return 0;
++}
++
++static int dsi_display_resume(struct omap_display *display)
++{
++ DSSDBG("dsi_display_resume\n");
++
++ display->state = OMAP_DSS_DISPLAY_DISABLED;
++ return dsi_display_enable(display);
++}
++
++static int dsi_display_update(struct omap_display *display,
++ u16 x, u16 y, u16 w, u16 h)
++{
++ DSSDBG("dsi_display_update(%d,%d %dx%d)\n", x, y, w, h);
++
++ if (w == 0 || h == 0)
++ return 0;
++
++ mutex_lock(&dsi.lock);
++
++ if (dsi.target_update_mode == OMAP_DSS_UPDATE_MANUAL)
++ dsi_push_update(display, x, y, w, h);
++ /* XXX else return error? */
++
++ mutex_unlock(&dsi.lock);
++
++ return 0;
++}
++
++static int dsi_display_sync(struct omap_display *display)
++{
++ DSSDBGF("");
++ return dsi_wait_sync(display);
++}
++
++static int dsi_display_set_update_mode(struct omap_display *display,
++ enum omap_dss_update_mode mode)
++{
++ DSSDBGF("%d", mode);
++
++ mutex_lock(&dsi.lock);
++
++ if (dsi.target_update_mode != mode) {
++ dsi_push_set_update_mode(display, mode);
++
++ dsi.target_update_mode = mode;
++ dsi.user_update_mode = mode;
++ }
++
++ mutex_unlock(&dsi.lock);
++
++ return dsi_wait_sync(display);
++}
++
++static enum omap_dss_update_mode dsi_display_get_update_mode(
++ struct omap_display *display)
++{
++ return dsi.update_mode;
++}
++
++static int dsi_display_enable_te(struct omap_display *display, bool enable)
++{
++ DSSDBGF("%d", enable);
++
++ if (!display->ctrl->enable_te)
++ return -ENOENT;
++
++ dsi_push_set_te(display, enable);
++
++ return dsi_wait_sync(display);
++}
++
++static int dsi_display_get_te(struct omap_display *display)
++{
++ return dsi.use_te;
++}
++
++
++
++static int dsi_display_set_rotate(struct omap_display *display, u8 rotate)
++{
++ DSSDBGF("%d", rotate);
++
++ if (!display->ctrl->set_rotate || !display->ctrl->get_rotate)
++ return -EINVAL;
++
++ dsi_push_set_rotate(display, rotate);
++
++ return dsi_wait_sync(display);
++}
++
++static u8 dsi_display_get_rotate(struct omap_display *display)
++{
++ if (!display->ctrl->set_rotate || !display->ctrl->get_rotate)
++ return 0;
++
++ return display->ctrl->get_rotate(display);
++}
++
++static int dsi_display_set_mirror(struct omap_display *display, bool mirror)
++{
++ DSSDBGF("%d", mirror);
++
++ if (!display->ctrl->set_mirror || !display->ctrl->get_mirror)
++ return -EINVAL;
++
++ dsi_push_set_mirror(display, mirror);
++
++ return dsi_wait_sync(display);
++}
++
++static bool dsi_display_get_mirror(struct omap_display *display)
++{
++ if (!display->ctrl->set_mirror || !display->ctrl->get_mirror)
++ return 0;
++
++ return display->ctrl->get_mirror(display);
++}
++
++static int dsi_display_run_test(struct omap_display *display, int test_num)
++{
++ long wait = msecs_to_jiffies(60000);
++ struct completion compl;
++ int result;
++
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ return -EIO;
++
++ DSSDBGF("%d", test_num);
++
++ init_completion(&compl);
++
++ dsi_push_test(display, test_num, &result, &compl);
++
++ DSSDBG("Waiting for SYNC to happen...\n");
++ wait = wait_for_completion_timeout(&compl, wait);
++ DSSDBG("Released from SYNC\n");
++
++ if (wait == 0) {
++ DSSERR("timeout waiting test sync\n");
++ return -ETIME;
++ }
++
++ return result;
++}
++
++static int dsi_display_memory_read(struct omap_display *display,
++ void *buf, size_t size,
++ u16 x, u16 y, u16 w, u16 h)
++{
++ long wait = msecs_to_jiffies(60000);
++ struct completion compl;
++ struct dsi_cmd_mem_read mem_read;
++ size_t ret_size;
++
++ DSSDBGF("");
++
++ if (!display->ctrl->memory_read)
++ return -EINVAL;
++
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ return -EIO;
++
++ init_completion(&compl);
++
++ mem_read.x = x;
++ mem_read.y = y;
++ mem_read.w = w;
++ mem_read.h = h;
++ mem_read.buf = buf;
++ mem_read.size = size;
++ mem_read.ret_size = &ret_size;
++ mem_read.completion = &compl;
++
++ dsi_push_mem_read(display, &mem_read);
++
++ DSSDBG("Waiting for SYNC to happen...\n");
++ wait = wait_for_completion_timeout(&compl, wait);
++ DSSDBG("Released from SYNC\n");
++
++ if (wait == 0) {
++ DSSERR("timeout waiting mem read sync\n");
++ return -ETIME;
++ }
++
++ return ret_size;
++}
++
++static void dsi_configure_overlay(struct omap_overlay *ovl)
++{
++ unsigned low, high, size;
++ enum omap_burst_size burst;
++ enum omap_plane plane = ovl->id;
++
++ burst = OMAP_DSS_BURST_16x32;
++ size = 16 * 32 / 8;
++
++ dispc_set_burst_size(plane, burst);
++
++ high = dispc_get_plane_fifo_size(plane) - size;
++ low = 0;
++ dispc_setup_plane_fifo(plane, low, high);
++}
++
++void dsi_init_display(struct omap_display *display)
++{
++ DSSDBG("DSI init\n");
++
++ display->enable = dsi_display_enable;
++ display->disable = dsi_display_disable;
++ display->suspend = dsi_display_suspend;
++ display->resume = dsi_display_resume;
++ display->update = dsi_display_update;
++ display->sync = dsi_display_sync;
++ display->set_update_mode = dsi_display_set_update_mode;
++ display->get_update_mode = dsi_display_get_update_mode;
++ display->enable_te = dsi_display_enable_te;
++ display->get_te = dsi_display_get_te;
++
++ display->get_rotate = dsi_display_get_rotate;
++ display->set_rotate = dsi_display_set_rotate;
++
++ display->get_mirror = dsi_display_get_mirror;
++ display->set_mirror = dsi_display_set_mirror;
++
++ display->run_test = dsi_display_run_test;
++ display->memory_read = dsi_display_memory_read;
++
++ display->configure_overlay = dsi_configure_overlay;
++
++ display->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE;
++
++ dsi.vc[0].display = display;
++ dsi.vc[1].display = display;
++}
++
++int dsi_init(void)
++{
++ u32 rev;
++
++ spin_lock_init(&dsi.cmd_lock);
++ dsi.cmd_fifo = kfifo_alloc(
++ DSI_CMD_FIFO_LEN * sizeof(struct dsi_cmd_item),
++ GFP_KERNEL,
++ &dsi.cmd_lock);
++
++ init_completion(&dsi.cmd_done);
++ atomic_set(&dsi.cmd_fifo_full, 0);
++ atomic_set(&dsi.cmd_pending, 0);
++
++ init_completion(&dsi.bta_completion);
++
++ dsi.workqueue = create_singlethread_workqueue("dsi");
++ INIT_WORK(&dsi.framedone_work, framedone_worker);
++ INIT_WORK(&dsi.process_work, dsi_process_cmd_fifo);
++
++ mutex_init(&dsi.lock);
++
++ dsi.target_update_mode = OMAP_DSS_UPDATE_DISABLED;
++ dsi.user_update_mode = OMAP_DSS_UPDATE_DISABLED;
++
++ dsi.base = ioremap(DSI_BASE, DSI_SZ_REGS);
++ if (!dsi.base) {
++ DSSERR("can't ioremap DSI\n");
++ return -ENOMEM;
++ }
++
++ enable_clocks(1);
++
++ rev = dsi_read_reg(DSI_REVISION);
++ printk(KERN_INFO "OMAP DSI rev %d.%d\n",
++ FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0));
++
++ enable_clocks(0);
++
++ return 0;
++}
++
++void dsi_exit(void)
++{
++ flush_workqueue(dsi.workqueue);
++ destroy_workqueue(dsi.workqueue);
++
++ iounmap(dsi.base);
++
++ kfifo_free(dsi.cmd_fifo);
++
++ DSSDBG("omap_dsi_exit\n");
++}
++
+diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
+new file mode 100644
+index 0000000..adc1f34
+--- /dev/null
++++ b/drivers/video/omap2/dss/dss.c
+@@ -0,0 +1,345 @@
++/*
++ * linux/drivers/video/omap2/dss/dss.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "DSS"
++
++#include <linux/kernel.h>
++#include <linux/io.h>
++#include <linux/err.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++#include <linux/seq_file.h>
++
++#include <mach/display.h>
++#include "dss.h"
++
++#define DSS_BASE 0x48050000
++
++#define DSS_SZ_REGS SZ_512
++
++struct dss_reg {
++ u16 idx;
++};
++
++#define DSS_REG(idx) ((const struct dss_reg) { idx })
++
++#define DSS_REVISION DSS_REG(0x0000)
++#define DSS_SYSCONFIG DSS_REG(0x0010)
++#define DSS_SYSSTATUS DSS_REG(0x0014)
++#define DSS_IRQSTATUS DSS_REG(0x0018)
++#define DSS_CONTROL DSS_REG(0x0040)
++#define DSS_SDI_CONTROL DSS_REG(0x0044)
++#define DSS_PLL_CONTROL DSS_REG(0x0048)
++#define DSS_SDI_STATUS DSS_REG(0x005C)
++
++#define REG_GET(idx, start, end) \
++ FLD_GET(dss_read_reg(idx), start, end)
++
++#define REG_FLD_MOD(idx, val, start, end) \
++ dss_write_reg(idx, FLD_MOD(dss_read_reg(idx), val, start, end))
++
++static struct {
++ void __iomem *base;
++
++ u32 ctx[DSS_SZ_REGS / sizeof(u32)];
++} dss;
++
++static int _omap_dss_wait_reset(void);
++
++static inline void dss_write_reg(const struct dss_reg idx, u32 val)
++{
++ __raw_writel(val, dss.base + idx.idx);
++}
++
++static inline u32 dss_read_reg(const struct dss_reg idx)
++{
++ return __raw_readl(dss.base + idx.idx);
++}
++
++#define SR(reg) \
++ dss.ctx[(DSS_##reg).idx / sizeof(u32)] = dss_read_reg(DSS_##reg)
++#define RR(reg) \
++ dss_write_reg(DSS_##reg, dss.ctx[(DSS_##reg).idx / sizeof(u32)])
++
++void dss_save_context(void)
++{
++ if (cpu_is_omap24xx())
++ return;
++
++ SR(SYSCONFIG);
++ SR(CONTROL);
++
++#ifdef CONFIG_OMAP2_DSS_SDI
++ SR(SDI_CONTROL);
++ SR(PLL_CONTROL);
++#endif
++}
++
++void dss_restore_context(void)
++{
++ if (_omap_dss_wait_reset())
++ DSSERR("DSS not coming out of reset after sleep\n");
++
++ RR(SYSCONFIG);
++ RR(CONTROL);
++
++#ifdef CONFIG_OMAP2_DSS_SDI
++ RR(SDI_CONTROL);
++ RR(PLL_CONTROL);
++#endif
++}
++
++#undef SR
++#undef RR
++
++void dss_sdi_init(u8 datapairs)
++{
++ u32 l;
++
++ BUG_ON(datapairs > 3 || datapairs < 1);
++
++ l = dss_read_reg(DSS_SDI_CONTROL);
++ l = FLD_MOD(l, 0xf, 19, 15); /* SDI_PDIV */
++ l = FLD_MOD(l, datapairs-1, 3, 2); /* SDI_PRSEL */
++ l = FLD_MOD(l, 2, 1, 0); /* SDI_BWSEL */
++ dss_write_reg(DSS_SDI_CONTROL, l);
++
++ l = dss_read_reg(DSS_PLL_CONTROL);
++ l = FLD_MOD(l, 0x7, 25, 22); /* SDI_PLL_FREQSEL */
++ l = FLD_MOD(l, 0xb, 16, 11); /* SDI_PLL_REGN */
++ l = FLD_MOD(l, 0xb4, 10, 1); /* SDI_PLL_REGM */
++ dss_write_reg(DSS_PLL_CONTROL, l);
++}
++
++void dss_sdi_enable(void)
++{
++ dispc_pck_free_enable(1);
++
++ /* Reset SDI PLL */
++ REG_FLD_MOD(DSS_PLL_CONTROL, 1, 18, 18); /* SDI_PLL_SYSRESET */
++ udelay(1); /* wait 2x PCLK */
++
++ /* Lock SDI PLL */
++ REG_FLD_MOD(DSS_PLL_CONTROL, 1, 28, 28); /* SDI_PLL_GOBIT */
++
++ /* Waiting for PLL lock request to complete */
++ while (dss_read_reg(DSS_SDI_STATUS) & (1 << 6))
++ ;
++
++ /* Clearing PLL_GO bit */
++ REG_FLD_MOD(DSS_PLL_CONTROL, 0, 28, 28);
++
++ /* Waiting for PLL to lock */
++ while (!(dss_read_reg(DSS_SDI_STATUS) & (1 << 5)))
++ ;
++
++ dispc_lcd_enable_signal(1);
++
++ /* Waiting for SDI reset to complete */
++ while (!(dss_read_reg(DSS_SDI_STATUS) & (1 << 2)))
++ ;
++}
++
++void dss_sdi_disable(void)
++{
++ dispc_lcd_enable_signal(0);
++
++ dispc_pck_free_enable(0);
++
++ /* Reset SDI PLL */
++ REG_FLD_MOD(DSS_PLL_CONTROL, 0, 18, 18); /* SDI_PLL_SYSRESET */
++}
++
++void dss_dump_regs(struct seq_file *s)
++{
++#define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, dss_read_reg(r))
++
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ DUMPREG(DSS_REVISION);
++ DUMPREG(DSS_SYSCONFIG);
++ DUMPREG(DSS_SYSSTATUS);
++ DUMPREG(DSS_IRQSTATUS);
++ DUMPREG(DSS_CONTROL);
++ DUMPREG(DSS_SDI_CONTROL);
++ DUMPREG(DSS_PLL_CONTROL);
++ DUMPREG(DSS_SDI_STATUS);
++
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++#undef DUMPREG
++}
++
++void dss_select_clk_source(bool dsi, bool dispc)
++{
++ u32 r;
++ r = dss_read_reg(DSS_CONTROL);
++ r = FLD_MOD(r, dsi, 1, 1); /* DSI_CLK_SWITCH */
++ r = FLD_MOD(r, dispc, 0, 0); /* DISPC_CLK_SWITCH */
++ dss_write_reg(DSS_CONTROL, r);
++}
++
++int dss_get_dsi_clk_source(void)
++{
++ return FLD_GET(dss_read_reg(DSS_CONTROL), 1, 1);
++}
++
++int dss_get_dispc_clk_source(void)
++{
++ return FLD_GET(dss_read_reg(DSS_CONTROL), 0, 0);
++}
++
++static irqreturn_t dss_irq_handler_omap2(int irq, void *arg)
++{
++ dispc_irq_handler();
++
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t dss_irq_handler_omap3(int irq, void *arg)
++{
++ u32 irqstatus;
++
++ irqstatus = dss_read_reg(DSS_IRQSTATUS);
++
++ if (irqstatus & (1<<0)) /* DISPC_IRQ */
++ dispc_irq_handler();
++#ifdef CONFIG_OMAP2_DSS_DSI
++ if (irqstatus & (1<<1)) /* DSI_IRQ */
++ dsi_irq_handler();
++#endif
++
++ return IRQ_HANDLED;
++}
++
++static int _omap_dss_wait_reset(void)
++{
++ unsigned timeout = 1000;
++
++ while (REG_GET(DSS_SYSSTATUS, 0, 0) == 0) {
++ udelay(1);
++ if (!--timeout) {
++ DSSERR("soft reset failed\n");
++ return -ENODEV;
++ }
++ }
++
++ return 0;
++}
++
++static int _omap_dss_reset(void)
++{
++ /* Soft reset */
++ REG_FLD_MOD(DSS_SYSCONFIG, 1, 1, 1);
++ return _omap_dss_wait_reset();
++}
++
++void dss_set_venc_output(enum omap_dss_venc_type type)
++{
++ int l = 0;
++
++ if (type == OMAP_DSS_VENC_TYPE_COMPOSITE)
++ l = 0;
++ else if (type == OMAP_DSS_VENC_TYPE_SVIDEO)
++ l = 1;
++ else
++ BUG();
++
++ /* venc out selection. 0 = comp, 1 = svideo */
++ REG_FLD_MOD(DSS_CONTROL, l, 6, 6);
++}
++
++void dss_set_dac_pwrdn_bgz(bool enable)
++{
++ REG_FLD_MOD(DSS_CONTROL, enable, 5, 5); /* DAC Power-Down Control */
++}
++
++int dss_init(bool skip_init)
++{
++ int r;
++ u32 rev;
++
++ dss.base = ioremap(DSS_BASE, DSS_SZ_REGS);
++ if (!dss.base) {
++ DSSERR("can't ioremap DSS\n");
++ r = -ENOMEM;
++ goto fail0;
++ }
++
++ if (!skip_init) {
++ /* We need to wait here a bit, otherwise we sometimes start to
++ * get synclost errors, and after that only power cycle will
++ * restore DSS functionality. I have no idea why this happens.
++ * And we have to wait _before_ resetting the DSS, but after
++ * enabling clocks.
++ */
++ msleep(50);
++
++ _omap_dss_reset();
++
++ }
++ else
++ printk("DSS SKIP RESET\n");
++
++ /* autoidle */
++ REG_FLD_MOD(DSS_SYSCONFIG, 1, 0, 0);
++
++ /* Select DPLL */
++ REG_FLD_MOD(DSS_CONTROL, 0, 0, 0);
++
++#ifdef CONFIG_OMAP2_DSS_VENC
++ REG_FLD_MOD(DSS_CONTROL, 1, 4, 4); /* venc dac demen */
++ REG_FLD_MOD(DSS_CONTROL, 1, 3, 3); /* venc clock 4x enable */
++ REG_FLD_MOD(DSS_CONTROL, 0, 2, 2); /* venc clock mode = normal */
++#endif
++
++ r = request_irq(INT_24XX_DSS_IRQ,
++ cpu_is_omap24xx()
++ ? dss_irq_handler_omap2
++ : dss_irq_handler_omap3,
++ 0, "OMAP DSS", NULL);
++
++ if (r < 0) {
++ DSSERR("omap2 dss: request_irq failed\n");
++ goto fail1;
++ }
++
++ dss_save_context();
++
++ rev = dss_read_reg(DSS_REVISION);
++ printk(KERN_INFO "OMAP DSS rev %d.%d\n",
++ FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0));
++
++ return 0;
++
++fail1:
++ iounmap(dss.base);
++fail0:
++ return r;
++}
++
++void dss_exit(void)
++{
++ free_irq(INT_24XX_DSS_IRQ, NULL);
++
++ iounmap(dss.base);
++}
++
+diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
+new file mode 100644
+index 0000000..bac5ece
+--- /dev/null
++++ b/drivers/video/omap2/dss/dss.h
+@@ -0,0 +1,331 @@
++/*
++ * linux/drivers/video/omap2/dss/dss.h
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#ifndef __OMAP2_DSS_H
++#define __OMAP2_DSS_H
++
++#ifdef CONFIG_OMAP2_DSS_DEBUG_SUPPORT
++#define DEBUG
++#endif
++
++#ifdef DEBUG
++extern unsigned int dss_debug;
++#ifdef DSS_SUBSYS_NAME
++#define DSSDBG(format, ...) \
++ if (dss_debug) \
++ printk(KERN_DEBUG "omapdss " DSS_SUBSYS_NAME ": " format, \
++ ## __VA_ARGS__)
++#else
++#define DSSDBG(format, ...) \
++ if (dss_debug) \
++ printk(KERN_DEBUG "omapdss: " format, ## __VA_ARGS__)
++#endif
++
++#ifdef DSS_SUBSYS_NAME
++#define DSSDBGF(format, ...) \
++ if (dss_debug) \
++ printk(KERN_DEBUG "omapdss " DSS_SUBSYS_NAME \
++ ": %s(" format ")\n", \
++ __func__, \
++ ## __VA_ARGS__)
++#else
++#define DSSDBGF(format, ...) \
++ if (dss_debug) \
++ printk(KERN_DEBUG "omapdss: " \
++ ": %s(" format ")\n", \
++ __func__, \
++ ## __VA_ARGS__)
++#endif
++
++#else /* DEBUG */
++#define DSSDBG(format, ...)
++#define DSSDBGF(format, ...)
++#endif
++
++
++#ifdef DSS_SUBSYS_NAME
++#define DSSERR(format, ...) \
++ printk(KERN_ERR "omapdss " DSS_SUBSYS_NAME " error: " format, \
++ ## __VA_ARGS__)
++#else
++#define DSSERR(format, ...) \
++ printk(KERN_ERR "omapdss error: " format, ## __VA_ARGS__)
++#endif
++
++#ifdef DSS_SUBSYS_NAME
++#define DSSINFO(format, ...) \
++ printk(KERN_INFO "omapdss " DSS_SUBSYS_NAME ": " format, \
++ ## __VA_ARGS__)
++#else
++#define DSSINFO(format, ...) \
++ printk(KERN_INFO "omapdss: " format, ## __VA_ARGS__)
++#endif
++
++#ifdef DSS_SUBSYS_NAME
++#define DSSWARN(format, ...) \
++ printk(KERN_WARNING "omapdss " DSS_SUBSYS_NAME ": " format, \
++ ## __VA_ARGS__)
++#else
++#define DSSWARN(format, ...) \
++ printk(KERN_WARNING "omapdss: " format, ## __VA_ARGS__)
++#endif
++
++/* OMAP TRM gives bitfields as start:end, where start is the higher bit
++ number. For example 7:0 */
++#define FLD_MASK(start, end) (((1 << (start - end + 1)) - 1) << (end))
++#define FLD_VAL(val, start, end) (((val) << end) & FLD_MASK(start, end))
++#define FLD_GET(val, start, end) (((val) & FLD_MASK(start, end)) >> (end))
++#define FLD_MOD(orig, val, start, end) \
++ (((orig) & ~FLD_MASK(start, end)) | FLD_VAL(val, start, end))
++
++#define DISPC_MAX_FCK 173000000
++
++enum omap_burst_size {
++ OMAP_DSS_BURST_4x32 = 0,
++ OMAP_DSS_BURST_8x32 = 1,
++ OMAP_DSS_BURST_16x32 = 2,
++};
++
++enum omap_parallel_interface_mode {
++ OMAP_DSS_PARALLELMODE_BYPASS, /* MIPI DPI */
++ OMAP_DSS_PARALLELMODE_RFBI, /* MIPI DBI */
++ OMAP_DSS_PARALLELMODE_DSI,
++};
++
++enum dss_clock {
++ DSS_CLK_ICK = 1 << 0,
++ DSS_CLK_FCK1 = 1 << 1,
++ DSS_CLK_FCK2 = 1 << 2,
++ DSS_CLK_54M = 1 << 3,
++ DSS_CLK_96M = 1 << 4,
++};
++
++struct dispc_clock_info {
++ /* rates that we get with dividers below */
++ unsigned long fck;
++ unsigned long lck;
++ unsigned long pck;
++
++ /* dividers */
++ u16 fck_div;
++ u16 lck_div;
++ u16 pck_div;
++};
++
++struct dsi_clock_info {
++ /* rates that we get with dividers below */
++ unsigned long fint;
++ unsigned long dsiphy;
++ unsigned long clkin;
++ unsigned long dsi1_pll_fclk;
++ unsigned long dsi2_pll_fclk;
++ unsigned long lck;
++ unsigned long pck;
++
++ /* dividers */
++ u16 regn;
++ u16 regm;
++ u16 regm3;
++ u16 regm4;
++
++ u16 lck_div;
++ u16 pck_div;
++
++ u8 highfreq;
++ bool use_dss2_fck;
++};
++
++struct seq_file;
++struct platform_device;
++
++/* core */
++void dss_clk_enable(enum dss_clock clks);
++void dss_clk_disable(enum dss_clock clks);
++unsigned long dss_clk_get_rate(enum dss_clock clk);
++int dss_need_ctx_restore(void);
++void dss_dump_clocks(struct seq_file *s);
++
++int dss_dsi_power_up(void);
++void dss_dsi_power_down(void);
++
++/* display */
++void dss_init_displays(struct platform_device *pdev);
++void dss_uninit_displays(struct platform_device *pdev);
++int dss_suspend_all_displays(void);
++int dss_resume_all_displays(void);
++struct omap_display *dss_get_display(int no);
++
++/* manager */
++int dss_init_overlay_managers(struct platform_device *pdev);
++void dss_uninit_overlay_managers(struct platform_device *pdev);
++
++/* overlay */
++void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name);
++void dss_uninit_overlays(struct platform_device *pdev);
++int dss_check_overlay(struct omap_overlay *ovl, struct omap_display *display);
++void dss_overlay_setup_dispc_manager(struct omap_overlay_manager *mgr);
++
++/* DSS */
++int dss_init(bool skip_init);
++void dss_exit(void);
++
++void dss_save_context(void);
++void dss_restore_context(void);
++
++void dss_dump_regs(struct seq_file *s);
++
++void dss_sdi_init(u8 datapairs);
++void dss_sdi_enable(void);
++void dss_sdi_disable(void);
++
++void dss_select_clk_source(bool dsi, bool dispc);
++int dss_get_dsi_clk_source(void);
++int dss_get_dispc_clk_source(void);
++void dss_set_venc_output(enum omap_dss_venc_type type);
++void dss_set_dac_pwrdn_bgz(bool enable);
++
++/* SDI */
++int sdi_init(bool skip_init);
++void sdi_exit(void);
++void sdi_init_display(struct omap_display *display);
++
++/* DSI */
++int dsi_init(void);
++void dsi_exit(void);
++
++void dsi_dump_clocks(struct seq_file *s);
++void dsi_dump_regs(struct seq_file *s);
++
++void dsi_save_context(void);
++void dsi_restore_context(void);
++
++void dsi_init_display(struct omap_display *display);
++void dsi_irq_handler(void);
++unsigned long dsi_get_dsi1_pll_rate(void);
++unsigned long dsi_get_dsi2_pll_rate(void);
++int dsi_pll_calc_pck(bool is_tft, unsigned long req_pck,
++ struct dsi_clock_info *cinfo);
++int dsi_pll_program(struct dsi_clock_info *cinfo);
++int dsi_pll_init(bool enable_hsclk, bool enable_hsdiv);
++void dsi_pll_uninit(void);
++
++/* DPI */
++int dpi_init(void);
++void dpi_exit(void);
++void dpi_init_display(struct omap_display *display);
++
++/* DISPC */
++int dispc_init(void);
++void dispc_exit(void);
++void dispc_dump_clocks(struct seq_file *s);
++void dispc_dump_regs(struct seq_file *s);
++void dispc_irq_handler(void);
++void dispc_fake_vsync_irq(void);
++
++void dispc_save_context(void);
++void dispc_restore_context(void);
++
++void dispc_lcd_enable_signal_polarity(bool act_high);
++void dispc_lcd_enable_signal(bool enable);
++void dispc_pck_free_enable(bool enable);
++void dispc_enable_fifohandcheck(bool enable);
++
++void dispc_set_lcd_size(u16 width, u16 height);
++void dispc_set_digit_size(u16 width, u16 height);
++u32 dispc_get_plane_fifo_size(enum omap_plane plane);
++void dispc_setup_plane_fifo(enum omap_plane plane, u32 low, u32 high);
++void dispc_enable_fifomerge(bool enable);
++void dispc_set_burst_size(enum omap_plane plane,
++ enum omap_burst_size burst_size);
++
++void dispc_set_plane_ba0(enum omap_plane plane, u32 paddr);
++void dispc_set_plane_ba1(enum omap_plane plane, u32 paddr);
++void dispc_set_plane_pos(enum omap_plane plane, u16 x, u16 y);
++void dispc_set_plane_size(enum omap_plane plane, u16 width, u16 height);
++
++int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
++ u32 paddr, u16 screen_width,
++ u16 pos_x, u16 pos_y,
++ u16 width, u16 height,
++ u16 out_width, u16 out_height,
++ enum omap_color_mode color_mode,
++ bool ilace,
++ u8 rotation, bool mirror);
++
++void dispc_go(enum omap_channel channel);
++void dispc_enable_lcd_out(bool enable);
++void dispc_enable_digit_out(bool enable);
++int dispc_enable_plane(enum omap_plane plane, bool enable);
++
++void dispc_set_parallel_interface_mode(enum omap_parallel_interface_mode mode);
++void dispc_set_tft_data_lines(u8 data_lines);
++void dispc_set_lcd_display_type(enum omap_lcd_display_type type);
++void dispc_set_loadmode(enum omap_dss_load_mode mode);
++
++void dispc_set_default_color(enum omap_channel channel, u32 color);
++u32 dispc_get_default_color(enum omap_channel channel);
++void dispc_set_trans_key(enum omap_channel ch,
++ enum omap_dss_color_key_type type,
++ u32 trans_key);
++void dispc_get_trans_key(enum omap_channel ch,
++ enum omap_dss_color_key_type *type,
++ u32 *trans_key);
++void dispc_enable_trans_key(enum omap_channel ch, bool enable);
++bool dispc_trans_key_enabled(enum omap_channel ch);
++
++void dispc_set_lcd_timings(struct omap_video_timings *timings);
++unsigned long dispc_fclk_rate(void);
++unsigned long dispc_pclk_rate(void);
++void dispc_set_pol_freq(struct omap_panel *panel);
++void find_lck_pck_divs(bool is_tft, unsigned long req_pck, unsigned long fck,
++ u16 *lck_div, u16 *pck_div);
++int dispc_calc_clock_div(bool is_tft, unsigned long req_pck,
++ struct dispc_clock_info *cinfo);
++int dispc_set_clock_div(struct dispc_clock_info *cinfo);
++int dispc_get_clock_div(struct dispc_clock_info *cinfo);
++void dispc_set_lcd_divisor(u16 lck_div, u16 pck_div);
++
++void dispc_setup_partial_planes(struct omap_display *display,
++ u16 *x, u16 *y, u16 *w, u16 *h);
++void dispc_draw_partial_planes(struct omap_display *display);
++
++
++/* VENC */
++int venc_init(void);
++void venc_exit(void);
++void venc_dump_regs(struct seq_file *s);
++void venc_init_display(struct omap_display *display);
++
++/* RFBI */
++int rfbi_init(void);
++void rfbi_exit(void);
++void rfbi_dump_regs(struct seq_file *s);
++
++int rfbi_configure(int rfbi_module, int bpp, int lines);
++void rfbi_enable_rfbi(bool enable);
++void rfbi_transfer_area(u16 width, u16 height,
++ void (callback)(void *data), void *data);
++void rfbi_set_timings(int rfbi_module, struct rfbi_timings *t);
++unsigned long rfbi_get_max_tx_rate(void);
++void rfbi_init_display(struct omap_display *display);
++
++#endif
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+new file mode 100644
+index 0000000..b0fee80
+--- /dev/null
++++ b/drivers/video/omap2/dss/manager.c
+@@ -0,0 +1,576 @@
++/*
++ * linux/drivers/video/omap2/dss/manager.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "MANAGER"
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <mach/display.h>
++
++#include "dss.h"
++
++static int num_managers;
++static struct list_head manager_list;
++
++static ssize_t manager_name_show(struct omap_overlay_manager *mgr, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%s\n", mgr->name);
++}
++
++static ssize_t manager_display_show(struct omap_overlay_manager *mgr, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%s\n",
++ mgr->display ? mgr->display->name : "<none>");
++}
++
++static ssize_t manager_display_store(struct omap_overlay_manager *mgr, const char *buf, size_t size)
++{
++ int r, i;
++ int len = size;
++ struct omap_display *display = NULL;
++
++ if (buf[size-1] == '\n')
++ --len;
++
++ if (len > 0) {
++ for (i = 0; i < omap_dss_get_num_displays(); ++i) {
++ display = dss_get_display(i);
++
++ if (strncmp(buf, display->name, len) == 0)
++ break;
++
++ display = NULL;
++ }
++ }
++
++ if (len > 0 && display == NULL)
++ return -EINVAL;
++
++ if (display)
++ DSSDBG("display %s found\n", display->name);
++
++ if (mgr->display) {
++ r = mgr->unset_display(mgr);
++ if (r) {
++ DSSERR("failed to unset display\n");
++ return r;
++ }
++ }
++
++ if (display) {
++ r = mgr->set_display(mgr, display);
++ if (r) {
++ DSSERR("failed to set manager\n");
++ return r;
++ }
++
++ r = mgr->apply(mgr);
++ if (r) {
++ DSSERR("failed to apply dispc config\n");
++ return r;
++ }
++ }
++
++ return size;
++}
++
++static ssize_t manager_default_color_show(struct omap_overlay_manager *mgr,
++ char *buf)
++{
++ u32 default_color;
++
++ default_color = dispc_get_default_color(mgr->id);
++ return snprintf(buf, PAGE_SIZE, "%d", default_color);
++}
++
++static ssize_t manager_default_color_store(struct omap_overlay_manager *mgr,
++ const char *buf, size_t size)
++{
++ u32 default_color;
++
++ if (sscanf(buf, "%d", &default_color) != 1)
++ return -EINVAL;
++ dispc_set_default_color(mgr->id, default_color);
++
++ return size;
++}
++
++static const char *color_key_type_str[] = {
++ "gfx-destination",
++ "video-source",
++};
++
++static ssize_t manager_color_key_type_show(struct omap_overlay_manager *mgr,
++ char *buf)
++{
++ enum omap_dss_color_key_type key_type;
++
++ dispc_get_trans_key(mgr->id, &key_type, NULL);
++ BUG_ON(key_type >= ARRAY_SIZE(color_key_type_str));
++
++ return snprintf(buf, PAGE_SIZE, "%s\n", color_key_type_str[key_type]);
++}
++
++static ssize_t manager_color_key_type_store(struct omap_overlay_manager *mgr,
++ const char *buf, size_t size)
++{
++ enum omap_dss_color_key_type key_type;
++ u32 key_value;
++
++ for (key_type = OMAP_DSS_COLOR_KEY_GFX_DST;
++ key_type < ARRAY_SIZE(color_key_type_str); key_type++) {
++ if (sysfs_streq(buf, color_key_type_str[key_type]))
++ break;
++ }
++ if (key_type == ARRAY_SIZE(color_key_type_str))
++ return -EINVAL;
++ dispc_get_trans_key(mgr->id, NULL, &key_value);
++ dispc_set_trans_key(mgr->id, key_type, key_value);
++
++ return size;
++}
++
++static ssize_t manager_color_key_value_show(struct omap_overlay_manager *mgr,
++ char *buf)
++{
++ u32 key_value;
++
++ dispc_get_trans_key(mgr->id, NULL, &key_value);
++
++ return snprintf(buf, PAGE_SIZE, "%d\n", key_value);
++}
++
++static ssize_t manager_color_key_value_store(struct omap_overlay_manager *mgr,
++ const char *buf, size_t size)
++{
++ enum omap_dss_color_key_type key_type;
++ u32 key_value;
++
++ if (sscanf(buf, "%d", &key_value) != 1)
++ return -EINVAL;
++ dispc_get_trans_key(mgr->id, &key_type, NULL);
++ dispc_set_trans_key(mgr->id, key_type, key_value);
++
++ return size;
++}
++
++static ssize_t manager_color_key_enabled_show(struct omap_overlay_manager *mgr,
++ char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d\n",
++ dispc_trans_key_enabled(mgr->id));
++}
++
++static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr,
++ const char *buf, size_t size)
++{
++ int enable;
++
++ if (sscanf(buf, "%d", &enable) != 1)
++ return -EINVAL;
++
++ dispc_enable_trans_key(mgr->id, enable);
++
++ return size;
++}
++
++
++struct manager_attribute {
++ struct attribute attr;
++ ssize_t (*show)(struct omap_overlay_manager *, char *);
++ ssize_t (*store)(struct omap_overlay_manager *, const char *, size_t);
++};
++
++#define MANAGER_ATTR(_name, _mode, _show, _store) \
++ struct manager_attribute manager_attr_##_name = \
++ __ATTR(_name, _mode, _show, _store)
++
++static MANAGER_ATTR(name, S_IRUGO, manager_name_show, NULL);
++static MANAGER_ATTR(display, S_IRUGO|S_IWUSR,
++ manager_display_show, manager_display_store);
++static MANAGER_ATTR(default_color, S_IRUGO|S_IWUSR,
++ manager_default_color_show, manager_default_color_store);
++static MANAGER_ATTR(color_key_type, S_IRUGO|S_IWUSR,
++ manager_color_key_type_show, manager_color_key_type_store);
++static MANAGER_ATTR(color_key_value, S_IRUGO|S_IWUSR,
++ manager_color_key_value_show, manager_color_key_value_store);
++static MANAGER_ATTR(color_key_enabled, S_IRUGO|S_IWUSR,
++ manager_color_key_enabled_show, manager_color_key_enabled_store);
++
++static struct attribute *manager_sysfs_attrs[] = {
++ &manager_attr_name.attr,
++ &manager_attr_display.attr,
++ &manager_attr_default_color.attr,
++ &manager_attr_color_key_type.attr,
++ &manager_attr_color_key_value.attr,
++ &manager_attr_color_key_enabled.attr,
++ NULL
++};
++
++static ssize_t manager_attr_show(struct kobject *kobj, struct attribute *attr, char *buf)
++{
++ struct omap_overlay_manager *manager;
++ struct manager_attribute *manager_attr;
++
++ manager = container_of(kobj, struct omap_overlay_manager, kobj);
++ manager_attr = container_of(attr, struct manager_attribute, attr);
++
++ if (!manager_attr->show)
++ return -ENOENT;
++
++ return manager_attr->show(manager, buf);
++}
++
++static ssize_t manager_attr_store(struct kobject *kobj, struct attribute *attr,
++ const char *buf, size_t size)
++{
++ struct omap_overlay_manager *manager;
++ struct manager_attribute *manager_attr;
++
++ manager = container_of(kobj, struct omap_overlay_manager, kobj);
++ manager_attr = container_of(attr, struct manager_attribute, attr);
++
++ if (!manager_attr->store)
++ return -ENOENT;
++
++ return manager_attr->store(manager, buf, size);
++}
++
++static struct sysfs_ops manager_sysfs_ops = {
++ .show = manager_attr_show,
++ .store = manager_attr_store,
++};
++
++static struct kobj_type manager_ktype = {
++ .sysfs_ops = &manager_sysfs_ops,
++ .default_attrs = manager_sysfs_attrs,
++};
++
++static int omap_dss_set_display(struct omap_overlay_manager *mgr,
++ struct omap_display *display)
++{
++ int i;
++ int r;
++
++ if (display->manager) {
++ DSSERR("display '%s' already has a manager '%s'\n",
++ display->name, display->manager->name);
++ return -EINVAL;
++ }
++
++ if ((mgr->supported_displays & display->type) == 0) {
++ DSSERR("display '%s' does not support manager '%s'\n",
++ display->name, mgr->name);
++ return -EINVAL;
++ }
++
++ for (i = 0; i < mgr->num_overlays; i++) {
++ struct omap_overlay *ovl = mgr->overlays[i];
++
++ if (ovl->manager != mgr || !ovl->info.enabled)
++ continue;
++
++ r = dss_check_overlay(ovl, display);
++ if (r)
++ return r;
++ }
++
++ display->manager = mgr;
++ mgr->display = display;
++
++ return 0;
++}
++
++static int omap_dss_unset_display(struct omap_overlay_manager *mgr)
++{
++ if (!mgr->display) {
++ DSSERR("failed to unset display, display not set.\n");
++ return -EINVAL;
++ }
++
++ mgr->display->manager = NULL;
++ mgr->display = NULL;
++
++ return 0;
++}
++
++
++static int overlay_enabled(struct omap_overlay *ovl)
++{
++ return ovl->info.enabled && ovl->manager && ovl->manager->display;
++}
++
++/* We apply settings to both managers here so that we can use optimizations
++ * like fifomerge. Shadow registers can be changed first and the non-shadowed
++ * should be changed last, at the same time with GO */
++static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
++{
++ int i;
++ int ret = 0;
++ enum omap_dss_update_mode mode;
++ struct omap_display *display;
++ struct omap_overlay *ovl;
++ bool ilace = 0;
++ int outw, outh;
++ int r;
++ int num_planes_enabled = 0;
++
++ DSSDBG("omap_dss_mgr_apply(%s)\n", mgr->name);
++
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ /* Configure normal overlay parameters and disable unused overlays */
++ for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
++ ovl = omap_dss_get_overlay(i);
++
++ if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
++ continue;
++
++ if (!overlay_enabled(ovl)) {
++ dispc_enable_plane(ovl->id, 0);
++ continue;
++ }
++
++ display = ovl->manager->display;
++
++ if (dss_check_overlay(ovl, display)) {
++ dispc_enable_plane(ovl->id, 0);
++ continue;
++ }
++
++ ++num_planes_enabled;
++
++ /* On a manual update display, in manual update mode, update()
++ * handles configuring planes */
++ mode = OMAP_DSS_UPDATE_AUTO;
++ if (display->get_update_mode)
++ mode = display->get_update_mode(mgr->display);
++
++ if (display->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE &&
++ mode != OMAP_DSS_UPDATE_AUTO)
++ continue;
++
++ if (display->type == OMAP_DISPLAY_TYPE_VENC)
++ ilace = 1;
++
++ if (ovl->info.out_width == 0)
++ outw = ovl->info.width;
++ else
++ outw = ovl->info.out_width;
++
++ if (ovl->info.out_height == 0)
++ outh = ovl->info.height;
++ else
++ outh = ovl->info.out_height;
++
++ r = dispc_setup_plane(ovl->id, ovl->manager->id,
++ ovl->info.paddr,
++ ovl->info.screen_width,
++ ovl->info.pos_x,
++ ovl->info.pos_y,
++ ovl->info.width,
++ ovl->info.height,
++ outw,
++ outh,
++ ovl->info.color_mode,
++ ilace,
++ ovl->info.rotation,
++ ovl->info.mirror);
++
++ if (r) {
++ DSSERR("dispc_setup_plane failed for ovl %d\n",
++ ovl->id);
++ dispc_enable_plane(ovl->id, 0);
++ continue;
++ }
++
++ dispc_enable_plane(ovl->id, 1);
++ }
++
++ /* Enable fifo merge if possible */
++ dispc_enable_fifomerge(num_planes_enabled == 1);
++
++ /* Go through overlays again. This time we configure fifos. We have to
++ * do this after enabling/disabling fifomerge so that we have correct
++ * knowledge of fifo sizes */
++ for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
++ ovl = omap_dss_get_overlay(i);
++
++ if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
++ continue;
++
++ if (!overlay_enabled(ovl)) {
++ continue;
++ }
++
++ ovl->manager->display->configure_overlay(ovl);
++ }
++
++ /* Issue GO for managers */
++ list_for_each_entry(mgr, &manager_list, list) {
++ if (!(mgr->caps & OMAP_DSS_OVL_MGR_CAP_DISPC))
++ continue;
++
++ display = mgr->display;
++
++ if (!display)
++ continue;
++
++ /* We don't need GO with manual update display. LCD iface will
++ * always be turned off after frame, and new settings will
++ * be taken in to use at next update */
++ if (display->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE)
++ continue;
++
++ dispc_go(mgr->id);
++ }
++
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ return ret;
++}
++
++static void omap_dss_mgr_set_def_color(struct omap_overlay_manager *mgr,
++ u32 color)
++{
++ dispc_set_default_color(mgr->id, color);
++}
++
++static void omap_dss_mgr_set_trans_key(struct omap_overlay_manager *mgr,
++ enum omap_dss_color_key_type type,
++ u32 trans_key)
++{
++ dispc_set_trans_key(mgr->id, type, trans_key);
++}
++
++static void omap_dss_mgr_enable_trans_key(struct omap_overlay_manager *mgr,
++ bool enable)
++{
++ dispc_enable_trans_key(mgr->id, enable);
++}
++
++static void omap_dss_add_overlay_manager(struct omap_overlay_manager *manager)
++{
++ ++num_managers;
++ list_add_tail(&manager->list, &manager_list);
++}
++
++int dss_init_overlay_managers(struct platform_device *pdev)
++{
++ int i, r;
++
++ INIT_LIST_HEAD(&manager_list);
++
++ num_managers = 0;
++
++ for (i = 0; i < 2; ++i) {
++ struct omap_overlay_manager *mgr;
++ mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
++
++ BUG_ON(mgr == NULL);
++
++ switch (i) {
++ case 0:
++ mgr->name = "lcd";
++ mgr->id = OMAP_DSS_CHANNEL_LCD;
++ mgr->supported_displays =
++ OMAP_DISPLAY_TYPE_DPI | OMAP_DISPLAY_TYPE_DBI |
++ OMAP_DISPLAY_TYPE_SDI | OMAP_DISPLAY_TYPE_DSI;
++ break;
++ case 1:
++ mgr->name = "tv";
++ mgr->id = OMAP_DSS_CHANNEL_DIGIT;
++ mgr->supported_displays = OMAP_DISPLAY_TYPE_VENC;
++ break;
++ }
++
++ mgr->set_display = &omap_dss_set_display,
++ mgr->unset_display = &omap_dss_unset_display,
++ mgr->apply = &omap_dss_mgr_apply,
++ mgr->set_default_color = &omap_dss_mgr_set_def_color,
++ mgr->set_trans_key = &omap_dss_mgr_set_trans_key,
++ mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key,
++ mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC,
++
++ dss_overlay_setup_dispc_manager(mgr);
++
++ omap_dss_add_overlay_manager(mgr);
++
++ r = kobject_init_and_add(&mgr->kobj, &manager_ktype,
++ &pdev->dev.kobj, "manager%d", i);
++
++ if (r) {
++ DSSERR("failed to create sysfs file\n");
++ continue;
++ }
++ }
++
++ return 0;
++}
++
++void dss_uninit_overlay_managers(struct platform_device *pdev)
++{
++ struct omap_overlay_manager *mgr;
++
++ while (!list_empty(&manager_list)) {
++ mgr = list_first_entry(&manager_list,
++ struct omap_overlay_manager, list);
++ list_del(&mgr->list);
++ kobject_del(&mgr->kobj);
++ kobject_put(&mgr->kobj);
++ kfree(mgr);
++ }
++
++ num_managers = 0;
++}
++
++int omap_dss_get_num_overlay_managers(void)
++{
++ return num_managers;
++}
++EXPORT_SYMBOL(omap_dss_get_num_overlay_managers);
++
++struct omap_overlay_manager *omap_dss_get_overlay_manager(int num)
++{
++ int i = 0;
++ struct omap_overlay_manager *mgr;
++
++ list_for_each_entry(mgr, &manager_list, list) {
++ if (i++ == num)
++ return mgr;
++ }
++
++ return NULL;
++}
++EXPORT_SYMBOL(omap_dss_get_overlay_manager);
++
++#ifdef L4_EXAMPLE
++static int ovl_mgr_apply_l4(struct omap_overlay_manager *mgr)
++{
++ DSSDBG("omap_dss_mgr_apply_l4(%s)\n", mgr->name);
++
++ return 0;
++}
++#endif
++
+diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
+new file mode 100644
+index 0000000..968edbe
+--- /dev/null
++++ b/drivers/video/omap2/dss/overlay.c
+@@ -0,0 +1,587 @@
++/*
++ * linux/drivers/video/omap2/dss/overlay.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "OVERLAY"
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/err.h>
++#include <linux/sysfs.h>
++#include <linux/kobject.h>
++#include <linux/platform_device.h>
++
++#include <mach/display.h>
++
++#include "dss.h"
++
++static int num_overlays;
++static struct list_head overlay_list;
++
++static ssize_t overlay_name_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%s\n", ovl->name);
++}
++
++static ssize_t overlay_manager_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%s\n",
++ ovl->manager ? ovl->manager->name : "<none>");
++}
++
++static ssize_t overlay_manager_store(struct omap_overlay *ovl, const char *buf, size_t size)
++{
++ int i, r;
++ struct omap_overlay_manager *mgr = NULL;
++ int len = size;
++
++ if (buf[size-1] == '\n')
++ --len;
++
++ if (len > 0) {
++ for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
++ mgr = omap_dss_get_overlay_manager(i);
++
++ if (strncmp(buf, mgr->name, len) == 0)
++ break;
++
++ mgr = NULL;
++ }
++ }
++
++ if (len > 0 && mgr == NULL)
++ return -EINVAL;
++
++ if (mgr)
++ DSSDBG("manager %s found\n", mgr->name);
++
++ if (mgr != ovl->manager) {
++ /* detach old manager */
++ if (ovl->manager) {
++ r = ovl->unset_manager(ovl);
++ if (r) {
++ DSSERR("detach failed\n");
++ return r;
++ }
++ }
++
++ if (mgr) {
++ r = ovl->set_manager(ovl, mgr);
++ if (r) {
++ DSSERR("Failed to attach overlay\n");
++ return r;
++ }
++ }
++ }
++
++ if (ovl->manager && (r = ovl->manager->apply(ovl->manager)))
++ return r;
++
++ return size;
++}
++
++static ssize_t overlay_input_size_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d,%d\n",
++ ovl->info.width, ovl->info.height);
++}
++
++static ssize_t overlay_screen_width_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d\n", ovl->info.screen_width);
++}
++
++static ssize_t overlay_position_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d,%d\n",
++ ovl->info.pos_x, ovl->info.pos_y);
++}
++
++static ssize_t overlay_position_store(struct omap_overlay *ovl,
++ const char *buf, size_t size)
++{
++ int r;
++ char *last;
++ struct omap_overlay_info info;
++
++ ovl->get_overlay_info(ovl, &info);
++
++ info.pos_x = simple_strtoul(buf, &last, 10);
++ ++last;
++ if (last - buf >= size)
++ return -EINVAL;
++
++ info.pos_y = simple_strtoul(last, &last, 10);
++
++ if ((r = ovl->set_overlay_info(ovl, &info)))
++ return r;
++
++ if (ovl->manager && (r = ovl->manager->apply(ovl->manager)))
++ return r;
++
++ return size;
++}
++
++static ssize_t overlay_output_size_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d,%d\n",
++ ovl->info.out_width, ovl->info.out_height);
++}
++
++static ssize_t overlay_output_size_store(struct omap_overlay *ovl,
++ const char *buf, size_t size)
++{
++ int r;
++ char *last;
++ struct omap_overlay_info info;
++
++ ovl->get_overlay_info(ovl, &info);
++
++ info.out_width = simple_strtoul(buf, &last, 10);
++ ++last;
++ if (last - buf >= size)
++ return -EINVAL;
++
++ info.out_height = simple_strtoul(last, &last, 10);
++
++ if ((r = ovl->set_overlay_info(ovl, &info)))
++ return r;
++
++ if (ovl->manager && (r = ovl->manager->apply(ovl->manager)))
++ return r;
++
++ return size;
++}
++
++static ssize_t overlay_enabled_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d\n", ovl->info.enabled);
++}
++
++static ssize_t overlay_enabled_store(struct omap_overlay *ovl, const char *buf, size_t size)
++{
++ int r;
++ struct omap_overlay_info info;
++
++ ovl->get_overlay_info(ovl, &info);
++
++ info.enabled = simple_strtoul(buf, NULL, 10);
++
++ if ((r = ovl->set_overlay_info(ovl, &info)))
++ return r;
++
++ if (ovl->manager && (r = ovl->manager->apply(ovl->manager)))
++ return r;
++
++ return size;
++}
++
++struct overlay_attribute {
++ struct attribute attr;
++ ssize_t (*show)(struct omap_overlay *, char *);
++ ssize_t (*store)(struct omap_overlay *, const char *, size_t);
++};
++
++#define OVERLAY_ATTR(_name, _mode, _show, _store) \
++ struct overlay_attribute overlay_attr_##_name = \
++ __ATTR(_name, _mode, _show, _store)
++
++static OVERLAY_ATTR(name, S_IRUGO, overlay_name_show, NULL);
++static OVERLAY_ATTR(manager, S_IRUGO|S_IWUSR,
++ overlay_manager_show, overlay_manager_store);
++static OVERLAY_ATTR(input_size, S_IRUGO, overlay_input_size_show, NULL);
++static OVERLAY_ATTR(screen_width, S_IRUGO, overlay_screen_width_show, NULL);
++static OVERLAY_ATTR(position, S_IRUGO|S_IWUSR,
++ overlay_position_show, overlay_position_store);
++static OVERLAY_ATTR(output_size, S_IRUGO|S_IWUSR,
++ overlay_output_size_show, overlay_output_size_store);
++static OVERLAY_ATTR(enabled, S_IRUGO|S_IWUSR,
++ overlay_enabled_show, overlay_enabled_store);
++
++static struct attribute *overlay_sysfs_attrs[] = {
++ &overlay_attr_name.attr,
++ &overlay_attr_manager.attr,
++ &overlay_attr_input_size.attr,
++ &overlay_attr_screen_width.attr,
++ &overlay_attr_position.attr,
++ &overlay_attr_output_size.attr,
++ &overlay_attr_enabled.attr,
++ NULL
++};
++
++static ssize_t overlay_attr_show(struct kobject *kobj, struct attribute *attr, char *buf)
++{
++ struct omap_overlay *overlay;
++ struct overlay_attribute *overlay_attr;
++
++ overlay = container_of(kobj, struct omap_overlay, kobj);
++ overlay_attr = container_of(attr, struct overlay_attribute, attr);
++
++ if (!overlay_attr->show)
++ return -ENOENT;
++
++ return overlay_attr->show(overlay, buf);
++}
++
++static ssize_t overlay_attr_store(struct kobject *kobj, struct attribute *attr,
++ const char *buf, size_t size)
++{
++ struct omap_overlay *overlay;
++ struct overlay_attribute *overlay_attr;
++
++ overlay = container_of(kobj, struct omap_overlay, kobj);
++ overlay_attr = container_of(attr, struct overlay_attribute, attr);
++
++ if (!overlay_attr->store)
++ return -ENOENT;
++
++ return overlay_attr->store(overlay, buf, size);
++}
++
++static struct sysfs_ops overlay_sysfs_ops = {
++ .show = overlay_attr_show,
++ .store = overlay_attr_store,
++};
++
++static struct kobj_type overlay_ktype = {
++ .sysfs_ops = &overlay_sysfs_ops,
++ .default_attrs = overlay_sysfs_attrs,
++};
++
++/* Check if overlay parameters are compatible with display */
++int dss_check_overlay(struct omap_overlay *ovl, struct omap_display *display)
++{
++ struct omap_overlay_info *info;
++ u16 outw, outh;
++ u16 dw, dh;
++
++ if (!display)
++ return 0;
++
++ if (!ovl->info.enabled)
++ return 0;
++
++ info = &ovl->info;
++
++ display->get_resolution(display, &dw, &dh);
++
++ DSSDBG("check_overlay %d: (%d,%d %dx%d -> %dx%d) disp (%dx%d)\n",
++ ovl->id,
++ info->pos_x, info->pos_y,
++ info->width, info->height,
++ info->out_width, info->out_height,
++ dw, dh);
++
++ if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0) {
++ outw = info->width;
++ outh = info->height;
++ } else {
++ if (info->out_width == 0)
++ outw = info->width;
++ else
++ outw = info->out_width;
++
++ if (info->out_height == 0)
++ outh = info->height;
++ else
++ outh = info->out_height;
++ }
++
++ if (dw < info->pos_x + outw) {
++ DSSDBG("check_overlay failed 1: %d < %d + %d\n",
++ dw, info->pos_x, outw);
++ return -EINVAL;
++ }
++
++ if (dh < info->pos_y + outh) {
++ DSSDBG("check_overlay failed 2: %d < %d + %d\n",
++ dh, info->pos_y, outh);
++ return -EINVAL;
++ }
++
++ if ((ovl->supported_modes & info->color_mode) == 0) {
++ DSSERR("overlay doesn't support mode %d\n", info->color_mode);
++ return -EINVAL;
++ }
++
++ return 0;
++}
++
++static int dss_ovl_set_overlay_info(struct omap_overlay *ovl,
++ struct omap_overlay_info *info)
++{
++ int r;
++ struct omap_overlay_info old_info;
++
++ old_info = ovl->info;
++ ovl->info = *info;
++
++ if (ovl->manager) {
++ r = dss_check_overlay(ovl, ovl->manager->display);
++ if (r) {
++ ovl->info = old_info;
++ return r;
++ }
++ }
++
++ return 0;
++}
++
++static void dss_ovl_get_overlay_info(struct omap_overlay *ovl,
++ struct omap_overlay_info *info)
++{
++ *info = ovl->info;
++}
++
++static int omap_dss_set_manager(struct omap_overlay *ovl,
++ struct omap_overlay_manager *mgr)
++{
++ int r;
++
++ if (ovl->manager) {
++ DSSERR("overlay '%s' already has a manager '%s'\n",
++ ovl->name, ovl->manager->name);
++ }
++
++ r = dss_check_overlay(ovl, mgr->display);
++ if (r)
++ return r;
++
++ ovl->manager = mgr;
++
++ return 0;
++}
++
++static int omap_dss_unset_manager(struct omap_overlay *ovl)
++{
++ if (!ovl->manager) {
++ DSSERR("failed to detach overlay: manager not set\n");
++ return -EINVAL;
++ }
++
++ ovl->manager = NULL;
++
++ return 0;
++}
++
++int omap_dss_get_num_overlays(void)
++{
++ return num_overlays;
++}
++EXPORT_SYMBOL(omap_dss_get_num_overlays);
++
++struct omap_overlay *omap_dss_get_overlay(int num)
++{
++ int i = 0;
++ struct omap_overlay *ovl;
++
++ list_for_each_entry(ovl, &overlay_list, list) {
++ if (i++ == num)
++ return ovl;
++ }
++
++ return NULL;
++}
++EXPORT_SYMBOL(omap_dss_get_overlay);
++
++static void omap_dss_add_overlay(struct omap_overlay *overlay)
++{
++ ++num_overlays;
++ list_add_tail(&overlay->list, &overlay_list);
++}
++
++static struct omap_overlay *dispc_overlays[3];
++
++void dss_overlay_setup_dispc_manager(struct omap_overlay_manager *mgr)
++{
++ mgr->num_overlays = 3;
++ mgr->overlays = dispc_overlays;
++}
++
++void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
++{
++ int i, r;
++ struct omap_overlay_manager *lcd_mgr;
++ struct omap_overlay_manager *tv_mgr;
++ struct omap_overlay_manager *def_mgr = NULL;
++
++ INIT_LIST_HEAD(&overlay_list);
++
++ num_overlays = 0;
++
++ for (i = 0; i < 3; ++i) {
++ struct omap_overlay *ovl;
++ ovl = kzalloc(sizeof(*ovl), GFP_KERNEL);
++
++ BUG_ON(ovl == NULL);
++
++ switch (i) {
++ case 0:
++ ovl->name = "gfx";
++ ovl->id = OMAP_DSS_GFX;
++ ovl->supported_modes = OMAP_DSS_COLOR_GFX_OMAP3;
++ ovl->caps = OMAP_DSS_OVL_CAP_DISPC;
++ break;
++ case 1:
++ ovl->name = "vid1";
++ ovl->id = OMAP_DSS_VIDEO1;
++ ovl->supported_modes = OMAP_DSS_COLOR_VID_OMAP3;
++ ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
++ OMAP_DSS_OVL_CAP_DISPC;
++ break;
++ case 2:
++ ovl->name = "vid2";
++ ovl->id = OMAP_DSS_VIDEO2;
++ ovl->supported_modes = OMAP_DSS_COLOR_VID_OMAP3;
++ ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
++ OMAP_DSS_OVL_CAP_DISPC;
++ break;
++ }
++
++ ovl->set_manager = &omap_dss_set_manager;
++ ovl->unset_manager = &omap_dss_unset_manager;
++ ovl->set_overlay_info = &dss_ovl_set_overlay_info;
++ ovl->get_overlay_info = &dss_ovl_get_overlay_info;
++
++ omap_dss_add_overlay(ovl);
++
++ r = kobject_init_and_add(&ovl->kobj, &overlay_ktype,
++ &pdev->dev.kobj, "overlay%d", i);
++
++ if (r) {
++ DSSERR("failed to create sysfs file\n");
++ continue;
++ }
++
++ dispc_overlays[i] = ovl;
++ }
++
++ lcd_mgr = omap_dss_get_overlay_manager(OMAP_DSS_OVL_MGR_LCD);
++ tv_mgr = omap_dss_get_overlay_manager(OMAP_DSS_OVL_MGR_TV);
++
++ if (def_disp_name) {
++ for (i = 0; i < omap_dss_get_num_displays() ; i++) {
++ struct omap_display *display = dss_get_display(i);
++
++ if (strcmp(display->name, def_disp_name) == 0) {
++ if (display->type != OMAP_DISPLAY_TYPE_VENC) {
++ lcd_mgr->set_display(lcd_mgr, display);
++ def_mgr = lcd_mgr;
++ } else {
++ lcd_mgr->set_display(tv_mgr, display);
++ def_mgr = tv_mgr;
++ }
++
++ break;
++ }
++ }
++
++ if (!def_mgr)
++ DSSWARN("default display %s not found\n",
++ def_disp_name);
++ }
++
++ if (def_mgr != lcd_mgr) {
++ /* connect lcd manager to first non-VENC display found */
++ for (i = 0; i < omap_dss_get_num_displays(); i++) {
++ struct omap_display *display = dss_get_display(i);
++ if (display->type != OMAP_DISPLAY_TYPE_VENC) {
++ lcd_mgr->set_display(lcd_mgr, display);
++
++ if (!def_mgr)
++ def_mgr = lcd_mgr;
++
++ break;
++ }
++ }
++ }
++
++ if (def_mgr != tv_mgr) {
++ /* connect tv manager to first VENC display found */
++ for (i = 0; i < omap_dss_get_num_displays(); i++) {
++ struct omap_display *display = dss_get_display(i);
++ if (display->type == OMAP_DISPLAY_TYPE_VENC) {
++ tv_mgr->set_display(tv_mgr, display);
++
++ if (!def_mgr)
++ def_mgr = tv_mgr;
++
++ break;
++ }
++ }
++ }
++
++ /* connect all dispc overlays to def_mgr */
++ if (def_mgr) {
++ for (i = 0; i < 3; i++) {
++ struct omap_overlay *ovl;
++ ovl = omap_dss_get_overlay(i);
++ omap_dss_set_manager(ovl, def_mgr);
++ }
++ }
++
++#ifdef L4_EXAMPLE
++ /* setup L4 overlay as an example */
++ {
++ static struct omap_overlay ovl = {
++ .name = "l4-ovl",
++ .supported_modes = OMAP_DSS_COLOR_RGB24U,
++ .set_manager = &omap_dss_set_manager,
++ .unset_manager = &omap_dss_unset_manager,
++ .setup_input = &omap_dss_setup_overlay_input,
++ .setup_output = &omap_dss_setup_overlay_output,
++ .enable = &omap_dss_enable_overlay,
++ };
++
++ static struct omap_overlay_manager mgr = {
++ .name = "l4",
++ .num_overlays = 1,
++ .overlays = &ovl,
++ .set_display = &omap_dss_set_display,
++ .unset_display = &omap_dss_unset_display,
++ .apply = &ovl_mgr_apply_l4,
++ .supported_displays =
++ OMAP_DISPLAY_TYPE_DBI | OMAP_DISPLAY_TYPE_DSI,
++ };
++
++ omap_dss_add_overlay(&ovl);
++ omap_dss_add_overlay_manager(&mgr);
++ omap_dss_set_manager(&ovl, &mgr);
++ }
++#endif
++}
++
++void dss_uninit_overlays(struct platform_device *pdev)
++{
++ struct omap_overlay *ovl;
++
++ while (!list_empty(&overlay_list)) {
++ ovl = list_first_entry(&overlay_list,
++ struct omap_overlay, list);
++ list_del(&ovl->list);
++ kobject_del(&ovl->kobj);
++ kobject_put(&ovl->kobj);
++ kfree(ovl);
++ }
++
++ num_overlays = 0;
++}
++
+diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
+new file mode 100644
+index 0000000..3e9ae1e
+--- /dev/null
++++ b/drivers/video/omap2/dss/rfbi.c
+@@ -0,0 +1,1304 @@
++/*
++ * linux/drivers/video/omap2/dss/rfbi.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "RFBI"
++
++#include <linux/kernel.h>
++#include <linux/dma-mapping.h>
++#include <linux/vmalloc.h>
++#include <linux/clk.h>
++#include <linux/io.h>
++#include <linux/delay.h>
++#include <linux/kfifo.h>
++#include <linux/ktime.h>
++#include <linux/hrtimer.h>
++#include <linux/seq_file.h>
++
++#include <mach/board.h>
++#include <mach/display.h>
++#include "dss.h"
++
++/*#define MEASURE_PERF*/
++
++#define RFBI_BASE 0x48050800
++
++struct rfbi_reg { u16 idx; };
++
++#define RFBI_REG(idx) ((const struct rfbi_reg) { idx })
++
++#define RFBI_REVISION RFBI_REG(0x0000)
++#define RFBI_SYSCONFIG RFBI_REG(0x0010)
++#define RFBI_SYSSTATUS RFBI_REG(0x0014)
++#define RFBI_CONTROL RFBI_REG(0x0040)
++#define RFBI_PIXEL_CNT RFBI_REG(0x0044)
++#define RFBI_LINE_NUMBER RFBI_REG(0x0048)
++#define RFBI_CMD RFBI_REG(0x004c)
++#define RFBI_PARAM RFBI_REG(0x0050)
++#define RFBI_DATA RFBI_REG(0x0054)
++#define RFBI_READ RFBI_REG(0x0058)
++#define RFBI_STATUS RFBI_REG(0x005c)
++
++#define RFBI_CONFIG(n) RFBI_REG(0x0060 + (n)*0x18)
++#define RFBI_ONOFF_TIME(n) RFBI_REG(0x0064 + (n)*0x18)
++#define RFBI_CYCLE_TIME(n) RFBI_REG(0x0068 + (n)*0x18)
++#define RFBI_DATA_CYCLE1(n) RFBI_REG(0x006c + (n)*0x18)
++#define RFBI_DATA_CYCLE2(n) RFBI_REG(0x0070 + (n)*0x18)
++#define RFBI_DATA_CYCLE3(n) RFBI_REG(0x0074 + (n)*0x18)
++
++#define RFBI_VSYNC_WIDTH RFBI_REG(0x0090)
++#define RFBI_HSYNC_WIDTH RFBI_REG(0x0094)
++
++#define RFBI_CMD_FIFO_LEN_BYTES (16 * sizeof(struct update_param))
++
++#define REG_FLD_MOD(idx, val, start, end) \
++ rfbi_write_reg(idx, FLD_MOD(rfbi_read_reg(idx), val, start, end))
++
++/* To work around an RFBI transfer rate limitation */
++#define OMAP_RFBI_RATE_LIMIT 1
++
++enum omap_rfbi_cycleformat {
++ OMAP_DSS_RFBI_CYCLEFORMAT_1_1 = 0,
++ OMAP_DSS_RFBI_CYCLEFORMAT_2_1 = 1,
++ OMAP_DSS_RFBI_CYCLEFORMAT_3_1 = 2,
++ OMAP_DSS_RFBI_CYCLEFORMAT_3_2 = 3,
++};
++
++enum omap_rfbi_datatype {
++ OMAP_DSS_RFBI_DATATYPE_12 = 0,
++ OMAP_DSS_RFBI_DATATYPE_16 = 1,
++ OMAP_DSS_RFBI_DATATYPE_18 = 2,
++ OMAP_DSS_RFBI_DATATYPE_24 = 3,
++};
++
++enum omap_rfbi_parallelmode {
++ OMAP_DSS_RFBI_PARALLELMODE_8 = 0,
++ OMAP_DSS_RFBI_PARALLELMODE_9 = 1,
++ OMAP_DSS_RFBI_PARALLELMODE_12 = 2,
++ OMAP_DSS_RFBI_PARALLELMODE_16 = 3,
++};
++
++enum update_cmd {
++ RFBI_CMD_UPDATE = 0,
++ RFBI_CMD_SYNC = 1,
++};
++
++static int rfbi_convert_timings(struct rfbi_timings *t);
++static void rfbi_get_clk_info(u32 *clk_period, u32 *max_clk_div);
++static void process_cmd_fifo(void);
++
++static struct {
++ void __iomem *base;
++
++ unsigned long l4_khz;
++
++ enum omap_rfbi_datatype datatype;
++ enum omap_rfbi_parallelmode parallelmode;
++
++ enum omap_rfbi_te_mode te_mode;
++ int te_enabled;
++
++ void (*framedone_callback)(void *data);
++ void *framedone_callback_data;
++
++ struct omap_display *display[2];
++
++ struct kfifo *cmd_fifo;
++ spinlock_t cmd_lock;
++ struct completion cmd_done;
++ atomic_t cmd_fifo_full;
++ atomic_t cmd_pending;
++#ifdef MEASURE_PERF
++ unsigned perf_bytes;
++ ktime_t perf_setup_time;
++ ktime_t perf_start_time;
++#endif
++} rfbi;
++
++struct update_region {
++ u16 x;
++ u16 y;
++ u16 w;
++ u16 h;
++};
++
++struct update_param {
++ u8 rfbi_module;
++ u8 cmd;
++
++ union {
++ struct update_region r;
++ struct completion *sync;
++ } par;
++};
++
++static inline void rfbi_write_reg(const struct rfbi_reg idx, u32 val)
++{
++ __raw_writel(val, rfbi.base + idx.idx);
++}
++
++static inline u32 rfbi_read_reg(const struct rfbi_reg idx)
++{
++ return __raw_readl(rfbi.base + idx.idx);
++}
++
++static void rfbi_enable_clocks(bool enable)
++{
++ if (enable)
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++ else
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++}
++
++void omap_rfbi_write_command(const void *buf, u32 len)
++{
++ rfbi_enable_clocks(1);
++ switch (rfbi.parallelmode) {
++ case OMAP_DSS_RFBI_PARALLELMODE_8:
++ {
++ const u8 *b = buf;
++ for (; len; len--)
++ rfbi_write_reg(RFBI_CMD, *b++);
++ break;
++ }
++
++ case OMAP_DSS_RFBI_PARALLELMODE_16:
++ {
++ const u16 *w = buf;
++ BUG_ON(len & 1);
++ for (; len; len -= 2)
++ rfbi_write_reg(RFBI_CMD, *w++);
++ break;
++ }
++
++ case OMAP_DSS_RFBI_PARALLELMODE_9:
++ case OMAP_DSS_RFBI_PARALLELMODE_12:
++ default:
++ BUG();
++ }
++ rfbi_enable_clocks(0);
++}
++EXPORT_SYMBOL(omap_rfbi_write_command);
++
++void omap_rfbi_read_data(void *buf, u32 len)
++{
++ rfbi_enable_clocks(1);
++ switch (rfbi.parallelmode) {
++ case OMAP_DSS_RFBI_PARALLELMODE_8:
++ {
++ u8 *b = buf;
++ for (; len; len--) {
++ rfbi_write_reg(RFBI_READ, 0);
++ *b++ = rfbi_read_reg(RFBI_READ);
++ }
++ break;
++ }
++
++ case OMAP_DSS_RFBI_PARALLELMODE_16:
++ {
++ u16 *w = buf;
++ BUG_ON(len & ~1);
++ for (; len; len -= 2) {
++ rfbi_write_reg(RFBI_READ, 0);
++ *w++ = rfbi_read_reg(RFBI_READ);
++ }
++ break;
++ }
++
++ case OMAP_DSS_RFBI_PARALLELMODE_9:
++ case OMAP_DSS_RFBI_PARALLELMODE_12:
++ default:
++ BUG();
++ }
++ rfbi_enable_clocks(0);
++}
++EXPORT_SYMBOL(omap_rfbi_read_data);
++
++void omap_rfbi_write_data(const void *buf, u32 len)
++{
++ rfbi_enable_clocks(1);
++ switch (rfbi.parallelmode) {
++ case OMAP_DSS_RFBI_PARALLELMODE_8:
++ {
++ const u8 *b = buf;
++ for (; len; len--)
++ rfbi_write_reg(RFBI_PARAM, *b++);
++ break;
++ }
++
++ case OMAP_DSS_RFBI_PARALLELMODE_16:
++ {
++ const u16 *w = buf;
++ BUG_ON(len & 1);
++ for (; len; len -= 2)
++ rfbi_write_reg(RFBI_PARAM, *w++);
++ break;
++ }
++
++ case OMAP_DSS_RFBI_PARALLELMODE_9:
++ case OMAP_DSS_RFBI_PARALLELMODE_12:
++ default:
++ BUG();
++
++ }
++ rfbi_enable_clocks(0);
++}
++EXPORT_SYMBOL(omap_rfbi_write_data);
++
++void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
++ u16 x, u16 y,
++ u16 w, u16 h)
++{
++ int start_offset = scr_width * y + x;
++ int horiz_offset = scr_width - w;
++ int i;
++
++ rfbi_enable_clocks(1);
++
++ if (rfbi.datatype == OMAP_DSS_RFBI_DATATYPE_16 &&
++ rfbi.parallelmode == OMAP_DSS_RFBI_PARALLELMODE_8) {
++ const u16 __iomem *pd = buf;
++ pd += start_offset;
++
++ for (; h; --h) {
++ for (i = 0; i < w; ++i) {
++ const u8 __iomem *b = (const u8 __iomem *)pd;
++ rfbi_write_reg(RFBI_PARAM, __raw_readb(b+1));
++ rfbi_write_reg(RFBI_PARAM, __raw_readb(b+0));
++ ++pd;
++ }
++ pd += horiz_offset;
++ }
++ } else if (rfbi.datatype == OMAP_DSS_RFBI_DATATYPE_24 &&
++ rfbi.parallelmode == OMAP_DSS_RFBI_PARALLELMODE_8) {
++ const u32 __iomem *pd = buf;
++ pd += start_offset;
++
++ for (; h; --h) {
++ for (i = 0; i < w; ++i) {
++ const u8 __iomem *b = (const u8 __iomem *)pd;
++ rfbi_write_reg(RFBI_PARAM, __raw_readb(b+2));
++ rfbi_write_reg(RFBI_PARAM, __raw_readb(b+1));
++ rfbi_write_reg(RFBI_PARAM, __raw_readb(b+0));
++ ++pd;
++ }
++ pd += horiz_offset;
++ }
++ } else if (rfbi.datatype == OMAP_DSS_RFBI_DATATYPE_16 &&
++ rfbi.parallelmode == OMAP_DSS_RFBI_PARALLELMODE_16) {
++ const u16 __iomem *pd = buf;
++ pd += start_offset;
++
++ for (; h; --h) {
++ for (i = 0; i < w; ++i) {
++ rfbi_write_reg(RFBI_PARAM, __raw_readw(pd));
++ ++pd;
++ }
++ pd += horiz_offset;
++ }
++ } else {
++ BUG();
++ }
++
++ rfbi_enable_clocks(0);
++}
++EXPORT_SYMBOL(omap_rfbi_write_pixels);
++
++#ifdef MEASURE_PERF
++static void perf_mark_setup(void)
++{
++ rfbi.perf_setup_time = ktime_get();
++}
++
++static void perf_mark_start(void)
++{
++ rfbi.perf_start_time = ktime_get();
++}
++
++static void perf_show(const char *name)
++{
++ ktime_t t, setup_time, trans_time;
++ u32 total_bytes;
++ u32 setup_us, trans_us, total_us;
++
++ t = ktime_get();
++
++ setup_time = ktime_sub(rfbi.perf_start_time, rfbi.perf_setup_time);
++ setup_us = (u32)ktime_to_us(setup_time);
++ if (setup_us == 0)
++ setup_us = 1;
++
++ trans_time = ktime_sub(t, rfbi.perf_start_time);
++ trans_us = (u32)ktime_to_us(trans_time);
++ if (trans_us == 0)
++ trans_us = 1;
++
++ total_us = setup_us + trans_us;
++
++ total_bytes = rfbi.perf_bytes;
++
++ DSSINFO("%s update %u us + %u us = %u us (%uHz), %u bytes, "
++ "%u kbytes/sec\n",
++ name,
++ setup_us,
++ trans_us,
++ total_us,
++ 1000*1000 / total_us,
++ total_bytes,
++ total_bytes * 1000 / total_us);
++}
++#else
++#define perf_mark_setup()
++#define perf_mark_start()
++#define perf_show(x)
++#endif
++
++void rfbi_transfer_area(u16 width, u16 height,
++ void (callback)(void *data), void *data)
++{
++ u32 l;
++
++ /*BUG_ON(callback == 0);*/
++ BUG_ON(rfbi.framedone_callback != NULL);
++
++ DSSDBG("rfbi_transfer_area %dx%d\n", width, height);
++
++ dispc_set_lcd_size(width, height);
++
++ dispc_enable_lcd_out(1);
++
++ rfbi.framedone_callback = callback;
++ rfbi.framedone_callback_data = data;
++
++ rfbi_enable_clocks(1);
++
++ rfbi_write_reg(RFBI_PIXEL_CNT, width * height);
++
++ l = rfbi_read_reg(RFBI_CONTROL);
++ l = FLD_MOD(l, 1, 0, 0); /* enable */
++ if (!rfbi.te_enabled)
++ l = FLD_MOD(l, 1, 4, 4); /* ITE */
++
++ perf_mark_start();
++
++ rfbi_write_reg(RFBI_CONTROL, l);
++}
++
++static void framedone_callback(void *data, u32 mask)
++{
++ void (*callback)(void *data);
++
++ DSSDBG("FRAMEDONE\n");
++
++ perf_show("DISPC");
++
++ REG_FLD_MOD(RFBI_CONTROL, 0, 0, 0);
++
++ rfbi_enable_clocks(0);
++
++ callback = rfbi.framedone_callback;
++ rfbi.framedone_callback = NULL;
++
++ /*callback(rfbi.framedone_callback_data);*/
++
++ atomic_set(&rfbi.cmd_pending, 0);
++
++ process_cmd_fifo();
++}
++
++#if 1 /* VERBOSE */
++static void rfbi_print_timings(void)
++{
++ u32 l;
++ u32 time;
++
++ l = rfbi_read_reg(RFBI_CONFIG(0));
++ time = 1000000000 / rfbi.l4_khz;
++ if (l & (1 << 4))
++ time *= 2;
++
++ DSSDBG("Tick time %u ps\n", time);
++ l = rfbi_read_reg(RFBI_ONOFF_TIME(0));
++ DSSDBG("CSONTIME %d, CSOFFTIME %d, WEONTIME %d, WEOFFTIME %d, "
++ "REONTIME %d, REOFFTIME %d\n",
++ l & 0x0f, (l >> 4) & 0x3f, (l >> 10) & 0x0f, (l >> 14) & 0x3f,
++ (l >> 20) & 0x0f, (l >> 24) & 0x3f);
++
++ l = rfbi_read_reg(RFBI_CYCLE_TIME(0));
++ DSSDBG("WECYCLETIME %d, RECYCLETIME %d, CSPULSEWIDTH %d, "
++ "ACCESSTIME %d\n",
++ (l & 0x3f), (l >> 6) & 0x3f, (l >> 12) & 0x3f,
++ (l >> 22) & 0x3f);
++}
++#else
++static void rfbi_print_timings(void) {}
++#endif
++
++
++
++
++static u32 extif_clk_period;
++
++static inline unsigned long round_to_extif_ticks(unsigned long ps, int div)
++{
++ int bus_tick = extif_clk_period * div;
++ return (ps + bus_tick - 1) / bus_tick * bus_tick;
++}
++
++static int calc_reg_timing(struct rfbi_timings *t, int div)
++{
++ t->clk_div = div;
++
++ t->cs_on_time = round_to_extif_ticks(t->cs_on_time, div);
++
++ t->we_on_time = round_to_extif_ticks(t->we_on_time, div);
++ t->we_off_time = round_to_extif_ticks(t->we_off_time, div);
++ t->we_cycle_time = round_to_extif_ticks(t->we_cycle_time, div);
++
++ t->re_on_time = round_to_extif_ticks(t->re_on_time, div);
++ t->re_off_time = round_to_extif_ticks(t->re_off_time, div);
++ t->re_cycle_time = round_to_extif_ticks(t->re_cycle_time, div);
++
++ t->access_time = round_to_extif_ticks(t->access_time, div);
++ t->cs_off_time = round_to_extif_ticks(t->cs_off_time, div);
++ t->cs_pulse_width = round_to_extif_ticks(t->cs_pulse_width, div);
++
++ DSSDBG("[reg]cson %d csoff %d reon %d reoff %d\n",
++ t->cs_on_time, t->cs_off_time, t->re_on_time, t->re_off_time);
++ DSSDBG("[reg]weon %d weoff %d recyc %d wecyc %d\n",
++ t->we_on_time, t->we_off_time, t->re_cycle_time,
++ t->we_cycle_time);
++ DSSDBG("[reg]rdaccess %d cspulse %d\n",
++ t->access_time, t->cs_pulse_width);
++
++ return rfbi_convert_timings(t);
++}
++
++static int calc_extif_timings(struct rfbi_timings *t)
++{
++ u32 max_clk_div;
++ int div;
++
++ rfbi_get_clk_info(&extif_clk_period, &max_clk_div);
++ for (div = 1; div <= max_clk_div; div++) {
++ if (calc_reg_timing(t, div) == 0)
++ break;
++ }
++
++ if (div <= max_clk_div)
++ return 0;
++
++ DSSERR("can't setup timings\n");
++ return -1;
++}
++
++
++void rfbi_set_timings(int rfbi_module, struct rfbi_timings *t)
++{
++ int r;
++
++ if (!t->converted) {
++ r = calc_extif_timings(t);
++ if (r < 0)
++ DSSERR("Failed to calc timings\n");
++ }
++
++ BUG_ON(!t->converted);
++
++ rfbi_enable_clocks(1);
++ rfbi_write_reg(RFBI_ONOFF_TIME(rfbi_module), t->tim[0]);
++ rfbi_write_reg(RFBI_CYCLE_TIME(rfbi_module), t->tim[1]);
++
++ /* TIMEGRANULARITY */
++ REG_FLD_MOD(RFBI_CONFIG(rfbi_module),
++ (t->tim[2] ? 1 : 0), 4, 4);
++
++ rfbi_print_timings();
++ rfbi_enable_clocks(0);
++}
++
++static int ps_to_rfbi_ticks(int time, int div)
++{
++ unsigned long tick_ps;
++ int ret;
++
++ /* Calculate in picosecs to yield more exact results */
++ tick_ps = 1000000000 / (rfbi.l4_khz) * div;
++
++ ret = (time + tick_ps - 1) / tick_ps;
++
++ return ret;
++}
++
++#ifdef OMAP_RFBI_RATE_LIMIT
++unsigned long rfbi_get_max_tx_rate(void)
++{
++ unsigned long l4_rate, dss1_rate;
++ int min_l4_ticks = 0;
++ int i;
++
++ /* According to TI this can't be calculated so make the
++ * adjustments for a couple of known frequencies and warn for
++ * others.
++ */
++ static const struct {
++ unsigned long l4_clk; /* HZ */
++ unsigned long dss1_clk; /* HZ */
++ unsigned long min_l4_ticks;
++ } ftab[] = {
++ { 55, 132, 7, }, /* 7.86 MPix/s */
++ { 110, 110, 12, }, /* 9.16 MPix/s */
++ { 110, 132, 10, }, /* 11 Mpix/s */
++ { 120, 120, 10, }, /* 12 Mpix/s */
++ { 133, 133, 10, }, /* 13.3 Mpix/s */
++ };
++
++ l4_rate = rfbi.l4_khz / 1000;
++ dss1_rate = dss_clk_get_rate(DSS_CLK_FCK1) / 1000000;
++
++ for (i = 0; i < ARRAY_SIZE(ftab); i++) {
++ /* Use a window instead of an exact match, to account
++ * for different DPLL multiplier / divider pairs.
++ */
++ if (abs(ftab[i].l4_clk - l4_rate) < 3 &&
++ abs(ftab[i].dss1_clk - dss1_rate) < 3) {
++ min_l4_ticks = ftab[i].min_l4_ticks;
++ break;
++ }
++ }
++ if (i == ARRAY_SIZE(ftab)) {
++ /* Can't be sure, return anyway the maximum not
++ * rate-limited. This might cause a problem only for the
++ * tearing synchronisation.
++ */
++ DSSERR("can't determine maximum RFBI transfer rate\n");
++ return rfbi.l4_khz * 1000;
++ }
++ return rfbi.l4_khz * 1000 / min_l4_ticks;
++}
++#else
++int rfbi_get_max_tx_rate(void)
++{
++ return rfbi.l4_khz * 1000;
++}
++#endif
++
++static void rfbi_get_clk_info(u32 *clk_period, u32 *max_clk_div)
++{
++ *clk_period = 1000000000 / rfbi.l4_khz;
++ *max_clk_div = 2;
++}
++
++static int rfbi_convert_timings(struct rfbi_timings *t)
++{
++ u32 l;
++ int reon, reoff, weon, weoff, cson, csoff, cs_pulse;
++ int actim, recyc, wecyc;
++ int div = t->clk_div;
++
++ if (div <= 0 || div > 2)
++ return -1;
++
++ /* Make sure that after conversion it still holds that:
++ * weoff > weon, reoff > reon, recyc >= reoff, wecyc >= weoff,
++ * csoff > cson, csoff >= max(weoff, reoff), actim > reon
++ */
++ weon = ps_to_rfbi_ticks(t->we_on_time, div);
++ weoff = ps_to_rfbi_ticks(t->we_off_time, div);
++ if (weoff <= weon)
++ weoff = weon + 1;
++ if (weon > 0x0f)
++ return -1;
++ if (weoff > 0x3f)
++ return -1;
++
++ reon = ps_to_rfbi_ticks(t->re_on_time, div);
++ reoff = ps_to_rfbi_ticks(t->re_off_time, div);
++ if (reoff <= reon)
++ reoff = reon + 1;
++ if (reon > 0x0f)
++ return -1;
++ if (reoff > 0x3f)
++ return -1;
++
++ cson = ps_to_rfbi_ticks(t->cs_on_time, div);
++ csoff = ps_to_rfbi_ticks(t->cs_off_time, div);
++ if (csoff <= cson)
++ csoff = cson + 1;
++ if (csoff < max(weoff, reoff))
++ csoff = max(weoff, reoff);
++ if (cson > 0x0f)
++ return -1;
++ if (csoff > 0x3f)
++ return -1;
++
++ l = cson;
++ l |= csoff << 4;
++ l |= weon << 10;
++ l |= weoff << 14;
++ l |= reon << 20;
++ l |= reoff << 24;
++
++ t->tim[0] = l;
++
++ actim = ps_to_rfbi_ticks(t->access_time, div);
++ if (actim <= reon)
++ actim = reon + 1;
++ if (actim > 0x3f)
++ return -1;
++
++ wecyc = ps_to_rfbi_ticks(t->we_cycle_time, div);
++ if (wecyc < weoff)
++ wecyc = weoff;
++ if (wecyc > 0x3f)
++ return -1;
++
++ recyc = ps_to_rfbi_ticks(t->re_cycle_time, div);
++ if (recyc < reoff)
++ recyc = reoff;
++ if (recyc > 0x3f)
++ return -1;
++
++ cs_pulse = ps_to_rfbi_ticks(t->cs_pulse_width, div);
++ if (cs_pulse > 0x3f)
++ return -1;
++
++ l = wecyc;
++ l |= recyc << 6;
++ l |= cs_pulse << 12;
++ l |= actim << 22;
++
++ t->tim[1] = l;
++
++ t->tim[2] = div - 1;
++
++ t->converted = 1;
++
++ return 0;
++}
++
++/* xxx FIX module selection missing */
++int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
++ unsigned hs_pulse_time, unsigned vs_pulse_time,
++ int hs_pol_inv, int vs_pol_inv, int extif_div)
++{
++ int hs, vs;
++ int min;
++ u32 l;
++
++ hs = ps_to_rfbi_ticks(hs_pulse_time, 1);
++ vs = ps_to_rfbi_ticks(vs_pulse_time, 1);
++ if (hs < 2)
++ return -EDOM;
++ if (mode == OMAP_DSS_RFBI_TE_MODE_2)
++ min = 2;
++ else /* OMAP_DSS_RFBI_TE_MODE_1 */
++ min = 4;
++ if (vs < min)
++ return -EDOM;
++ if (vs == hs)
++ return -EINVAL;
++ rfbi.te_mode = mode;
++ DSSDBG("setup_te: mode %d hs %d vs %d hs_inv %d vs_inv %d\n",
++ mode, hs, vs, hs_pol_inv, vs_pol_inv);
++
++ rfbi_enable_clocks(1);
++ rfbi_write_reg(RFBI_HSYNC_WIDTH, hs);
++ rfbi_write_reg(RFBI_VSYNC_WIDTH, vs);
++
++ l = rfbi_read_reg(RFBI_CONFIG(0));
++ if (hs_pol_inv)
++ l &= ~(1 << 21);
++ else
++ l |= 1 << 21;
++ if (vs_pol_inv)
++ l &= ~(1 << 20);
++ else
++ l |= 1 << 20;
++ rfbi_enable_clocks(0);
++
++ return 0;
++}
++EXPORT_SYMBOL(omap_rfbi_setup_te);
++
++/* xxx FIX module selection missing */
++int omap_rfbi_enable_te(bool enable, unsigned line)
++{
++ u32 l;
++
++ DSSDBG("te %d line %d mode %d\n", enable, line, rfbi.te_mode);
++ if (line > (1 << 11) - 1)
++ return -EINVAL;
++
++ rfbi_enable_clocks(1);
++ l = rfbi_read_reg(RFBI_CONFIG(0));
++ l &= ~(0x3 << 2);
++ if (enable) {
++ rfbi.te_enabled = 1;
++ l |= rfbi.te_mode << 2;
++ } else
++ rfbi.te_enabled = 0;
++ rfbi_write_reg(RFBI_CONFIG(0), l);
++ rfbi_write_reg(RFBI_LINE_NUMBER, line);
++ rfbi_enable_clocks(0);
++
++ return 0;
++}
++EXPORT_SYMBOL(omap_rfbi_enable_te);
++
++#if 0
++static void rfbi_enable_config(int enable1, int enable2)
++{
++ u32 l;
++ int cs = 0;
++
++ if (enable1)
++ cs |= 1<<0;
++ if (enable2)
++ cs |= 1<<1;
++
++ rfbi_enable_clocks(1);
++
++ l = rfbi_read_reg(RFBI_CONTROL);
++
++ l = FLD_MOD(l, cs, 3, 2);
++ l = FLD_MOD(l, 0, 1, 1);
++
++ rfbi_write_reg(RFBI_CONTROL, l);
++
++
++ l = rfbi_read_reg(RFBI_CONFIG(0));
++ l = FLD_MOD(l, 0, 3, 2); /* TRIGGERMODE: ITE */
++ /*l |= FLD_VAL(2, 8, 7); */ /* L4FORMAT, 2pix/L4 */
++ /*l |= FLD_VAL(0, 8, 7); */ /* L4FORMAT, 1pix/L4 */
++
++ l = FLD_MOD(l, 0, 16, 16); /* A0POLARITY */
++ l = FLD_MOD(l, 1, 20, 20); /* TE_VSYNC_POLARITY */
++ l = FLD_MOD(l, 1, 21, 21); /* HSYNCPOLARITY */
++
++ l = FLD_MOD(l, OMAP_DSS_RFBI_PARALLELMODE_8, 1, 0);
++ rfbi_write_reg(RFBI_CONFIG(0), l);
++
++ rfbi_enable_clocks(0);
++}
++#endif
++
++int rfbi_configure(int rfbi_module, int bpp, int lines)
++{
++ u32 l;
++ int cycle1 = 0, cycle2 = 0, cycle3 = 0;
++ enum omap_rfbi_cycleformat cycleformat;
++ enum omap_rfbi_datatype datatype;
++ enum omap_rfbi_parallelmode parallelmode;
++
++ switch (bpp) {
++ case 12:
++ datatype = OMAP_DSS_RFBI_DATATYPE_12;
++ break;
++ case 16:
++ datatype = OMAP_DSS_RFBI_DATATYPE_16;
++ break;
++ case 18:
++ datatype = OMAP_DSS_RFBI_DATATYPE_18;
++ break;
++ case 24:
++ datatype = OMAP_DSS_RFBI_DATATYPE_24;
++ break;
++ default:
++ BUG();
++ return 1;
++ }
++ rfbi.datatype = datatype;
++
++ switch (lines) {
++ case 8:
++ parallelmode = OMAP_DSS_RFBI_PARALLELMODE_8;
++ break;
++ case 9:
++ parallelmode = OMAP_DSS_RFBI_PARALLELMODE_9;
++ break;
++ case 12:
++ parallelmode = OMAP_DSS_RFBI_PARALLELMODE_12;
++ break;
++ case 16:
++ parallelmode = OMAP_DSS_RFBI_PARALLELMODE_16;
++ break;
++ default:
++ BUG();
++ return 1;
++ }
++ rfbi.parallelmode = parallelmode;
++
++ if ((bpp % lines) == 0) {
++ switch (bpp / lines) {
++ case 1:
++ cycleformat = OMAP_DSS_RFBI_CYCLEFORMAT_1_1;
++ break;
++ case 2:
++ cycleformat = OMAP_DSS_RFBI_CYCLEFORMAT_2_1;
++ break;
++ case 3:
++ cycleformat = OMAP_DSS_RFBI_CYCLEFORMAT_3_1;
++ break;
++ default:
++ BUG();
++ return 1;
++ }
++ } else if ((2 * bpp % lines) == 0) {
++ if ((2 * bpp / lines) == 3)
++ cycleformat = OMAP_DSS_RFBI_CYCLEFORMAT_3_2;
++ else {
++ BUG();
++ return 1;
++ }
++ } else {
++ BUG();
++ return 1;
++ }
++
++ switch (cycleformat) {
++ case OMAP_DSS_RFBI_CYCLEFORMAT_1_1:
++ cycle1 = lines;
++ break;
++
++ case OMAP_DSS_RFBI_CYCLEFORMAT_2_1:
++ cycle1 = lines;
++ cycle2 = lines;
++ break;
++
++ case OMAP_DSS_RFBI_CYCLEFORMAT_3_1:
++ cycle1 = lines;
++ cycle2 = lines;
++ cycle3 = lines;
++ break;
++
++ case OMAP_DSS_RFBI_CYCLEFORMAT_3_2:
++ cycle1 = lines;
++ cycle2 = (lines / 2) | ((lines / 2) << 16);
++ cycle3 = (lines << 16);
++ break;
++ }
++
++ rfbi_enable_clocks(1);
++
++ REG_FLD_MOD(RFBI_CONTROL, 0, 3, 2); /* clear CS */
++
++ l = 0;
++ l |= FLD_VAL(parallelmode, 1, 0);
++ l |= FLD_VAL(0, 3, 2); /* TRIGGERMODE: ITE */
++ l |= FLD_VAL(0, 4, 4); /* TIMEGRANULARITY */
++ l |= FLD_VAL(datatype, 6, 5);
++ /* l |= FLD_VAL(2, 8, 7); */ /* L4FORMAT, 2pix/L4 */
++ l |= FLD_VAL(0, 8, 7); /* L4FORMAT, 1pix/L4 */
++ l |= FLD_VAL(cycleformat, 10, 9);
++ l |= FLD_VAL(0, 12, 11); /* UNUSEDBITS */
++ l |= FLD_VAL(0, 16, 16); /* A0POLARITY */
++ l |= FLD_VAL(0, 17, 17); /* REPOLARITY */
++ l |= FLD_VAL(0, 18, 18); /* WEPOLARITY */
++ l |= FLD_VAL(0, 19, 19); /* CSPOLARITY */
++ l |= FLD_VAL(1, 20, 20); /* TE_VSYNC_POLARITY */
++ l |= FLD_VAL(1, 21, 21); /* HSYNCPOLARITY */
++ rfbi_write_reg(RFBI_CONFIG(rfbi_module), l);
++
++ rfbi_write_reg(RFBI_DATA_CYCLE1(rfbi_module), cycle1);
++ rfbi_write_reg(RFBI_DATA_CYCLE2(rfbi_module), cycle2);
++ rfbi_write_reg(RFBI_DATA_CYCLE3(rfbi_module), cycle3);
++
++
++ l = rfbi_read_reg(RFBI_CONTROL);
++ l = FLD_MOD(l, rfbi_module+1, 3, 2); /* Select CSx */
++ l = FLD_MOD(l, 0, 1, 1); /* clear bypass */
++ rfbi_write_reg(RFBI_CONTROL, l);
++
++
++ DSSDBG("RFBI config: bpp %d, lines %d, cycles: 0x%x 0x%x 0x%x\n",
++ bpp, lines, cycle1, cycle2, cycle3);
++
++ rfbi_enable_clocks(0);
++
++ return 0;
++}
++EXPORT_SYMBOL(rfbi_configure);
++
++static int rfbi_find_display(struct omap_display *disp)
++{
++ if (disp == rfbi.display[0])
++ return 0;
++
++ if (disp == rfbi.display[1])
++ return 1;
++
++ BUG();
++ return -1;
++}
++
++
++static void signal_fifo_waiters(void)
++{
++ if (atomic_read(&rfbi.cmd_fifo_full) > 0) {
++ /* DSSDBG("SIGNALING: Fifo not full for waiter!\n"); */
++ complete(&rfbi.cmd_done);
++ atomic_dec(&rfbi.cmd_fifo_full);
++ }
++}
++
++/* returns 1 for async op, and 0 for sync op */
++static int do_update(struct omap_display *display, struct update_region *upd)
++{
++ u16 x = upd->x;
++ u16 y = upd->y;
++ u16 w = upd->w;
++ u16 h = upd->h;
++
++ perf_mark_setup();
++
++ if (display->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) {
++ /*display->ctrl->enable_te(display, 1); */
++ dispc_setup_partial_planes(display, &x, &y, &w, &h);
++ }
++
++#ifdef MEASURE_PERF
++ rfbi.perf_bytes = w * h * 2; /* XXX always 16bit */
++#endif
++
++ display->ctrl->setup_update(display, x, y, w, h);
++
++ if (display->manager->caps & OMAP_DSS_OVL_MGR_CAP_DISPC) {
++ rfbi_transfer_area(w, h, NULL, NULL);
++ return 1;
++ } else {
++ struct omap_overlay *ovl;
++ void __iomem *addr;
++ int scr_width;
++
++ ovl = display->manager->overlays[0];
++ scr_width = ovl->info.screen_width;
++ addr = ovl->info.vaddr;
++
++ omap_rfbi_write_pixels(addr, scr_width, x, y, w, h);
++
++ perf_show("L4");
++
++ return 0;
++ }
++}
++
++static void process_cmd_fifo(void)
++{
++ int len;
++ struct update_param p;
++ struct omap_display *display;
++ unsigned long flags;
++
++ if (atomic_inc_return(&rfbi.cmd_pending) != 1)
++ return;
++
++ while (true) {
++ spin_lock_irqsave(rfbi.cmd_fifo->lock, flags);
++
++ len = __kfifo_get(rfbi.cmd_fifo, (unsigned char *)&p,
++ sizeof(struct update_param));
++ if (len == 0) {
++ DSSDBG("nothing more in fifo\n");
++ atomic_set(&rfbi.cmd_pending, 0);
++ spin_unlock_irqrestore(rfbi.cmd_fifo->lock, flags);
++ break;
++ }
++
++ /* DSSDBG("fifo full %d\n", rfbi.cmd_fifo_full.counter);*/
++
++ spin_unlock_irqrestore(rfbi.cmd_fifo->lock, flags);
++
++ BUG_ON(len != sizeof(struct update_param));
++ BUG_ON(p.rfbi_module > 1);
++
++ display = rfbi.display[p.rfbi_module];
++
++ if (p.cmd == RFBI_CMD_UPDATE) {
++ if (do_update(display, &p.par.r))
++ break; /* async op */
++ } else if (p.cmd == RFBI_CMD_SYNC) {
++ DSSDBG("Signaling SYNC done!\n");
++ complete(p.par.sync);
++ } else
++ BUG();
++ }
++
++ signal_fifo_waiters();
++}
++
++static void rfbi_push_cmd(struct update_param *p)
++{
++ int ret;
++
++ while (1) {
++ unsigned long flags;
++ int available;
++
++ spin_lock_irqsave(rfbi.cmd_fifo->lock, flags);
++ available = RFBI_CMD_FIFO_LEN_BYTES -
++ __kfifo_len(rfbi.cmd_fifo);
++
++/* DSSDBG("%d bytes left in fifo\n", available); */
++ if (available < sizeof(struct update_param)) {
++ DSSDBG("Going to wait because FIFO FULL..\n");
++ spin_unlock_irqrestore(rfbi.cmd_fifo->lock, flags);
++ atomic_inc(&rfbi.cmd_fifo_full);
++ wait_for_completion(&rfbi.cmd_done);
++ /*DSSDBG("Woke up because fifo not full anymore\n");*/
++ continue;
++ }
++
++ ret = __kfifo_put(rfbi.cmd_fifo, (unsigned char *)p,
++ sizeof(struct update_param));
++/* DSSDBG("pushed %d bytes\n", ret);*/
++
++ spin_unlock_irqrestore(rfbi.cmd_fifo->lock, flags);
++
++ BUG_ON(ret != sizeof(struct update_param));
++
++ break;
++ }
++}
++
++static void rfbi_push_update(int rfbi_module, int x, int y, int w, int h)
++{
++ struct update_param p;
++
++ p.rfbi_module = rfbi_module;
++ p.cmd = RFBI_CMD_UPDATE;
++
++ p.par.r.x = x;
++ p.par.r.y = y;
++ p.par.r.w = w;
++ p.par.r.h = h;
++
++ DSSDBG("RFBI pushed %d,%d %dx%d\n", x, y, w, h);
++
++ rfbi_push_cmd(&p);
++
++ process_cmd_fifo();
++}
++
++static void rfbi_push_sync(int rfbi_module, struct completion *sync_comp)
++{
++ struct update_param p;
++
++ p.rfbi_module = rfbi_module;
++ p.cmd = RFBI_CMD_SYNC;
++ p.par.sync = sync_comp;
++
++ rfbi_push_cmd(&p);
++
++ DSSDBG("RFBI sync pushed to cmd fifo\n");
++
++ process_cmd_fifo();
++}
++
++void rfbi_dump_regs(struct seq_file *s)
++{
++#define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, rfbi_read_reg(r))
++
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ DUMPREG(RFBI_REVISION);
++ DUMPREG(RFBI_SYSCONFIG);
++ DUMPREG(RFBI_SYSSTATUS);
++ DUMPREG(RFBI_CONTROL);
++ DUMPREG(RFBI_PIXEL_CNT);
++ DUMPREG(RFBI_LINE_NUMBER);
++ DUMPREG(RFBI_CMD);
++ DUMPREG(RFBI_PARAM);
++ DUMPREG(RFBI_DATA);
++ DUMPREG(RFBI_READ);
++ DUMPREG(RFBI_STATUS);
++
++ DUMPREG(RFBI_CONFIG(0));
++ DUMPREG(RFBI_ONOFF_TIME(0));
++ DUMPREG(RFBI_CYCLE_TIME(0));
++ DUMPREG(RFBI_DATA_CYCLE1(0));
++ DUMPREG(RFBI_DATA_CYCLE2(0));
++ DUMPREG(RFBI_DATA_CYCLE3(0));
++
++ DUMPREG(RFBI_CONFIG(1));
++ DUMPREG(RFBI_ONOFF_TIME(1));
++ DUMPREG(RFBI_CYCLE_TIME(1));
++ DUMPREG(RFBI_DATA_CYCLE1(1));
++ DUMPREG(RFBI_DATA_CYCLE2(1));
++ DUMPREG(RFBI_DATA_CYCLE3(1));
++
++ DUMPREG(RFBI_VSYNC_WIDTH);
++ DUMPREG(RFBI_HSYNC_WIDTH);
++
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++#undef DUMPREG
++}
++
++int rfbi_init(void)
++{
++ u32 rev;
++ u32 l;
++
++ spin_lock_init(&rfbi.cmd_lock);
++ rfbi.cmd_fifo = kfifo_alloc(RFBI_CMD_FIFO_LEN_BYTES, GFP_KERNEL,
++ &rfbi.cmd_lock);
++ if (IS_ERR(rfbi.cmd_fifo))
++ return -ENOMEM;
++
++ init_completion(&rfbi.cmd_done);
++ atomic_set(&rfbi.cmd_fifo_full, 0);
++ atomic_set(&rfbi.cmd_pending, 0);
++
++ rfbi.base = ioremap(RFBI_BASE, SZ_256);
++ if (!rfbi.base) {
++ DSSERR("can't ioremap RFBI\n");
++ return -ENOMEM;
++ }
++
++ rfbi_enable_clocks(1);
++
++ msleep(10);
++
++ rfbi.l4_khz = dss_clk_get_rate(DSS_CLK_ICK) / 1000;
++
++ /* Enable autoidle and smart-idle */
++ l = rfbi_read_reg(RFBI_SYSCONFIG);
++ l |= (1 << 0) | (2 << 3);
++ rfbi_write_reg(RFBI_SYSCONFIG, l);
++
++ rev = rfbi_read_reg(RFBI_REVISION);
++ printk(KERN_INFO "OMAP RFBI rev %d.%d\n",
++ FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0));
++
++ rfbi_enable_clocks(0);
++
++ return 0;
++}
++
++void rfbi_exit(void)
++{
++ DSSDBG("rfbi_exit\n");
++
++ kfifo_free(rfbi.cmd_fifo);
++
++ iounmap(rfbi.base);
++}
++
++/* struct omap_display support */
++static int rfbi_display_update(struct omap_display *display,
++ u16 x, u16 y, u16 w, u16 h)
++{
++ int rfbi_module;
++
++ if (w == 0 || h == 0)
++ return 0;
++
++ rfbi_module = rfbi_find_display(display);
++
++ rfbi_push_update(rfbi_module, x, y, w, h);
++
++ return 0;
++}
++
++static int rfbi_display_sync(struct omap_display *display)
++{
++ struct completion sync_comp;
++ int rfbi_module;
++
++ rfbi_module = rfbi_find_display(display);
++
++ init_completion(&sync_comp);
++ rfbi_push_sync(rfbi_module, &sync_comp);
++ DSSDBG("Waiting for SYNC to happen...\n");
++ wait_for_completion(&sync_comp);
++ DSSDBG("Released from SYNC\n");
++ return 0;
++}
++
++static int rfbi_display_enable_te(struct omap_display *display, bool enable)
++{
++ display->ctrl->enable_te(display, enable);
++ return 0;
++}
++
++static int rfbi_display_enable(struct omap_display *display)
++{
++ int r;
++
++ BUG_ON(display->panel == NULL || display->ctrl == NULL);
++
++ r = omap_dispc_register_isr(framedone_callback, NULL,
++ DISPC_IRQ_FRAMEDONE);
++ if (r) {
++ DSSERR("can't get FRAMEDONE irq\n");
++ return r;
++ }
++
++ dispc_set_lcd_display_type(OMAP_DSS_LCD_DISPLAY_TFT);
++
++ dispc_set_parallel_interface_mode(OMAP_DSS_PARALLELMODE_RFBI);
++
++ dispc_set_tft_data_lines(display->ctrl->pixel_size);
++
++ rfbi_configure(display->hw_config.u.rfbi.channel,
++ display->ctrl->pixel_size,
++ display->hw_config.u.rfbi.data_lines);
++
++ rfbi_set_timings(display->hw_config.u.rfbi.channel,
++ &display->ctrl->timings);
++
++
++ if (display->ctrl && display->ctrl->enable) {
++ r = display->ctrl->enable(display);
++ if (r)
++ goto err;
++ }
++
++ if (display->panel && display->panel->enable) {
++ r = display->panel->enable(display);
++ if (r)
++ goto err;
++ }
++
++ return 0;
++err:
++ return -ENODEV;
++}
++
++static void rfbi_display_disable(struct omap_display *display)
++{
++ display->ctrl->disable(display);
++ omap_dispc_unregister_isr(framedone_callback, NULL,
++ DISPC_IRQ_FRAMEDONE);
++}
++
++void rfbi_init_display(struct omap_display *display)
++{
++ display->enable = rfbi_display_enable;
++ display->disable = rfbi_display_disable;
++ display->update = rfbi_display_update;
++ display->sync = rfbi_display_sync;
++ display->enable_te = rfbi_display_enable_te;
++
++ rfbi.display[display->hw_config.u.rfbi.channel] = display;
++
++ display->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE;
++}
+diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
+new file mode 100644
+index 0000000..fbff2b2
+--- /dev/null
++++ b/drivers/video/omap2/dss/sdi.c
+@@ -0,0 +1,245 @@
++/*
++ * linux/drivers/video/omap2/dss/sdi.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "SDI"
++
++#include <linux/kernel.h>
++#include <linux/clk.h>
++#include <linux/delay.h>
++#include <linux/err.h>
++
++#include <mach/board.h>
++#include <mach/display.h>
++#include "dss.h"
++
++
++static struct {
++ bool skip_init;
++ bool update_enabled;
++} sdi;
++
++static void sdi_basic_init(void)
++{
++ dispc_set_parallel_interface_mode(OMAP_DSS_PARALLELMODE_BYPASS);
++
++ dispc_set_lcd_display_type(OMAP_DSS_LCD_DISPLAY_TFT);
++ dispc_set_tft_data_lines(24);
++ dispc_lcd_enable_signal_polarity(1);
++}
++
++static int sdi_display_enable(struct omap_display *display)
++{
++ struct dispc_clock_info cinfo;
++ u16 lck_div, pck_div;
++ unsigned long fck;
++ struct omap_panel *panel = display->panel;
++ unsigned long pck;
++ int r;
++
++ if (display->state != OMAP_DSS_DISPLAY_DISABLED) {
++ DSSERR("display already enabled\n");
++ return -EINVAL;
++ }
++
++ /* In case of skip_init sdi_init has already enabled the clocks */
++ if (!sdi.skip_init)
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ sdi_basic_init();
++
++ /* 15.5.9.1.2 */
++ panel->config |= OMAP_DSS_LCD_RF | OMAP_DSS_LCD_ONOFF;
++
++ dispc_set_pol_freq(panel);
++
++ if (!sdi.skip_init)
++ r = dispc_calc_clock_div(1, panel->timings.pixel_clock * 1000,
++ &cinfo);
++ else
++ r = dispc_get_clock_div(&cinfo);
++
++ if (r)
++ goto err0;
++
++ fck = cinfo.fck;
++ lck_div = cinfo.lck_div;
++ pck_div = cinfo.pck_div;
++
++ pck = fck / lck_div / pck_div / 1000;
++
++ if (pck != panel->timings.pixel_clock) {
++ DSSWARN("Could not find exact pixel clock. Requested %d kHz, "
++ "got %lu kHz\n",
++ panel->timings.pixel_clock, pck);
++
++ panel->timings.pixel_clock = pck;
++ }
++
++
++ dispc_set_lcd_timings(&panel->timings);
++
++ r = dispc_set_clock_div(&cinfo);
++ if (r)
++ goto err1;
++
++ if (!sdi.skip_init) {
++ dss_sdi_init(display->hw_config.u.sdi.datapairs);
++ dss_sdi_enable();
++ mdelay(2);
++ }
++
++ dispc_enable_lcd_out(1);
++
++ r = panel->enable(display);
++ if (r)
++ goto err2;
++
++ display->state = OMAP_DSS_DISPLAY_ACTIVE;
++
++ sdi.skip_init = 0;
++
++ return 0;
++err2:
++ dispc_enable_lcd_out(0);
++err1:
++err0:
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++ return r;
++}
++
++static int sdi_display_resume(struct omap_display *display);
++
++static void sdi_display_disable(struct omap_display *display)
++{
++ if (display->state == OMAP_DSS_DISPLAY_DISABLED)
++ return;
++
++ if (display->state == OMAP_DSS_DISPLAY_SUSPENDED)
++ sdi_display_resume(display);
++
++ display->panel->disable(display);
++
++ dispc_enable_lcd_out(0);
++
++ dss_sdi_disable();
++
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ display->state = OMAP_DSS_DISPLAY_DISABLED;
++}
++
++static int sdi_display_suspend(struct omap_display *display)
++{
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ return -EINVAL;
++
++ if (display->panel->suspend)
++ display->panel->suspend(display);
++
++ dispc_enable_lcd_out(0);
++
++ dss_sdi_disable();
++
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ display->state = OMAP_DSS_DISPLAY_SUSPENDED;
++
++ return 0;
++}
++
++static int sdi_display_resume(struct omap_display *display)
++{
++ if (display->state != OMAP_DSS_DISPLAY_SUSPENDED)
++ return -EINVAL;
++
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++
++ dss_sdi_enable();
++ mdelay(2);
++
++ dispc_enable_lcd_out(1);
++
++ if (display->panel->resume)
++ display->panel->resume(display);
++
++ display->state = OMAP_DSS_DISPLAY_ACTIVE;
++
++ return 0;
++}
++
++static int sdi_display_set_update_mode(struct omap_display *display,
++ enum omap_dss_update_mode mode)
++{
++ if (mode == OMAP_DSS_UPDATE_MANUAL)
++ return -EINVAL;
++
++ if (mode == OMAP_DSS_UPDATE_DISABLED) {
++ dispc_enable_lcd_out(0);
++ sdi.update_enabled = 0;
++ } else {
++ dispc_enable_lcd_out(1);
++ sdi.update_enabled = 1;
++ }
++
++ return 0;
++}
++
++static enum omap_dss_update_mode sdi_display_get_update_mode(
++ struct omap_display *display)
++{
++ return sdi.update_enabled ? OMAP_DSS_UPDATE_AUTO :
++ OMAP_DSS_UPDATE_DISABLED;
++}
++
++static void sdi_get_timings(struct omap_display *display,
++ struct omap_video_timings *timings)
++{
++ *timings = display->panel->timings;
++}
++
++void sdi_init_display(struct omap_display *display)
++{
++ DSSDBG("SDI init\n");
++
++ display->enable = sdi_display_enable;
++ display->disable = sdi_display_disable;
++ display->suspend = sdi_display_suspend;
++ display->resume = sdi_display_resume;
++ display->set_update_mode = sdi_display_set_update_mode;
++ display->get_update_mode = sdi_display_get_update_mode;
++ display->get_timings = sdi_get_timings;
++}
++
++int sdi_init(bool skip_init)
++{
++ /* we store this for first display enable, then clear it */
++ sdi.skip_init = skip_init;
++
++ /*
++ * Enable clocks already here, otherwise there would be a toggle
++ * of them until sdi_display_enable is called.
++ */
++ if (skip_init)
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
++ return 0;
++}
++
++void sdi_exit(void)
++{
++}
+diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
+new file mode 100644
+index 0000000..aceed9f
+--- /dev/null
++++ b/drivers/video/omap2/dss/venc.c
+@@ -0,0 +1,600 @@
++/*
++ * linux/drivers/video/omap2/dss/venc.c
++ *
++ * Copyright (C) 2009 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * VENC settings from TI's DSS 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.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#define DSS_SUBSYS_NAME "VENC"
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/clk.h>
++#include <linux/err.h>
++#include <linux/io.h>
++#include <linux/mutex.h>
++#include <linux/completion.h>
++#include <linux/delay.h>
++#include <linux/string.h>
++
++#include <mach/display.h>
++#include <mach/cpu.h>
++
++#include "dss.h"
++
++#define VENC_BASE 0x48050C00
++
++/* Venc registers */
++#define VENC_REV_ID 0x00
++#define VENC_STATUS 0x04
++#define VENC_F_CONTROL 0x08
++#define VENC_VIDOUT_CTRL 0x10
++#define VENC_SYNC_CTRL 0x14
++#define VENC_LLEN 0x1C
++#define VENC_FLENS 0x20
++#define VENC_HFLTR_CTRL 0x24
++#define VENC_CC_CARR_WSS_CARR 0x28
++#define VENC_C_PHASE 0x2C
++#define VENC_GAIN_U 0x30
++#define VENC_GAIN_V 0x34
++#define VENC_GAIN_Y 0x38
++#define VENC_BLACK_LEVEL 0x3C
++#define VENC_BLANK_LEVEL 0x40
++#define VENC_X_COLOR 0x44
++#define VENC_M_CONTROL 0x48
++#define VENC_BSTAMP_WSS_DATA 0x4C
++#define VENC_S_CARR 0x50
++#define VENC_LINE21 0x54
++#define VENC_LN_SEL 0x58
++#define VENC_L21__WC_CTL 0x5C
++#define VENC_HTRIGGER_VTRIGGER 0x60
++#define VENC_SAVID__EAVID 0x64
++#define VENC_FLEN__FAL 0x68
++#define VENC_LAL__PHASE_RESET 0x6C
++#define VENC_HS_INT_START_STOP_X 0x70
++#define VENC_HS_EXT_START_STOP_X 0x74
++#define VENC_VS_INT_START_X 0x78
++#define VENC_VS_INT_STOP_X__VS_INT_START_Y 0x7C
++#define VENC_VS_INT_STOP_Y__VS_EXT_START_X 0x80
++#define VENC_VS_EXT_STOP_X__VS_EXT_START_Y 0x84
++#define VENC_VS_EXT_STOP_Y 0x88
++#define VENC_AVID_START_STOP_X 0x90
++#define VENC_AVID_START_STOP_Y 0x94
++#define VENC_FID_INT_START_X__FID_INT_START_Y 0xA0
++#define VENC_FID_INT_OFFSET_Y__FID_EXT_START_X 0xA4
++#define VENC_FID_EXT_START_Y__FID_EXT_OFFSET_Y 0xA8
++#define VENC_TVDETGP_INT_START_STOP_X 0xB0
++#define VENC_TVDETGP_INT_START_STOP_Y 0xB4
++#define VENC_GEN_CTRL 0xB8
++#define VENC_OUTPUT_CONTROL 0xC4
++#define VENC_DAC_B__DAC_C 0xC8
++
++struct venc_config {
++ u32 f_control;
++ u32 vidout_ctrl;
++ u32 sync_ctrl;
++ u32 llen;
++ u32 flens;
++ u32 hfltr_ctrl;
++ u32 cc_carr_wss_carr;
++ u32 c_phase;
++ u32 gain_u;
++ u32 gain_v;
++ u32 gain_y;
++ u32 black_level;
++ u32 blank_level;
++ u32 x_color;
++ u32 m_control;
++ u32 bstamp_wss_data;
++ u32 s_carr;
++ u32 line21;
++ u32 ln_sel;
++ u32 l21__wc_ctl;
++ u32 htrigger_vtrigger;
++ u32 savid__eavid;
++ u32 flen__fal;
++ u32 lal__phase_reset;
++ u32 hs_int_start_stop_x;
++ u32 hs_ext_start_stop_x;
++ u32 vs_int_start_x;
++ u32 vs_int_stop_x__vs_int_start_y;
++ u32 vs_int_stop_y__vs_ext_start_x;
++ u32 vs_ext_stop_x__vs_ext_start_y;
++ u32 vs_ext_stop_y;
++ u32 avid_start_stop_x;
++ u32 avid_start_stop_y;
++ u32 fid_int_start_x__fid_int_start_y;
++ u32 fid_int_offset_y__fid_ext_start_x;
++ u32 fid_ext_start_y__fid_ext_offset_y;
++ u32 tvdetgp_int_start_stop_x;
++ u32 tvdetgp_int_start_stop_y;
++ u32 gen_ctrl;
++};
++
++/* from TRM */
++static const struct venc_config venc_config_pal_trm = {
++ .f_control = 0,
++ .vidout_ctrl = 1,
++ .sync_ctrl = 0x40,
++ .llen = 0x35F, /* 863 */
++ .flens = 0x270, /* 624 */
++ .hfltr_ctrl = 0,
++ .cc_carr_wss_carr = 0x2F7225ED,
++ .c_phase = 0,
++ .gain_u = 0x111,
++ .gain_v = 0x181,
++ .gain_y = 0x140,
++ .black_level = 0x3B,
++ .blank_level = 0x3B,
++ .x_color = 0x7,
++ .m_control = 0x2,
++ .bstamp_wss_data = 0x3F,
++ .s_carr = 0x2A098ACB,
++ .line21 = 0,
++ .ln_sel = 0x01290015,
++ .l21__wc_ctl = 0x0000F603,
++ .htrigger_vtrigger = 0,
++
++ .savid__eavid = 0x06A70108,
++ .flen__fal = 0x00180270,
++ .lal__phase_reset = 0x00040135,
++ .hs_int_start_stop_x = 0x00880358,
++ .hs_ext_start_stop_x = 0x000F035F,
++ .vs_int_start_x = 0x01A70000,
++ .vs_int_stop_x__vs_int_start_y = 0x000001A7,
++ .vs_int_stop_y__vs_ext_start_x = 0x01AF0000,
++ .vs_ext_stop_x__vs_ext_start_y = 0x000101AF,
++ .vs_ext_stop_y = 0x00000025,
++ .avid_start_stop_x = 0x03530083,
++ .avid_start_stop_y = 0x026C002E,
++ .fid_int_start_x__fid_int_start_y = 0x0001008A,
++ .fid_int_offset_y__fid_ext_start_x = 0x002E0138,
++ .fid_ext_start_y__fid_ext_offset_y = 0x01380001,
++
++ .tvdetgp_int_start_stop_x = 0x00140001,
++ .tvdetgp_int_start_stop_y = 0x00010001,
++ .gen_ctrl = 0x00FF0000,
++};
++
++/* from TRM */
++static const struct venc_config venc_config_ntsc_trm = {
++ .f_control = 0,
++ .vidout_ctrl = 1,
++ .sync_ctrl = 0x8040,
++ .llen = 0x359,
++ .flens = 0x20C,
++ .hfltr_ctrl = 0,
++ .cc_carr_wss_carr = 0x043F2631,
++ .c_phase = 0,
++ .gain_u = 0x102,
++ .gain_v = 0x16C,
++ .gain_y = 0x12F,
++ .black_level = 0x43,
++ .blank_level = 0x38,
++ .x_color = 0x7,
++ .m_control = 0x1,
++ .bstamp_wss_data = 0x38,
++ .s_carr = 0x21F07C1F,
++ .line21 = 0,
++ .ln_sel = 0x01310011,
++ .l21__wc_ctl = 0x0000F003,
++ .htrigger_vtrigger = 0,
++
++ .savid__eavid = 0x069300F4,
++ .flen__fal = 0x0016020C,
++ .lal__phase_reset = 0x00060107,
++ .hs_int_start_stop_x = 0x008E0350,
++ .hs_ext_start_stop_x = 0x000F0359,
++ .vs_int_start_x = 0x01A00000,
++ .vs_int_stop_x__vs_int_start_y = 0x020701A0,
++ .vs_int_stop_y__vs_ext_start_x = 0x01AC0024,
++ .vs_ext_stop_x__vs_ext_start_y = 0x020D01AC,
++ .vs_ext_stop_y = 0x00000006,
++ .avid_start_stop_x = 0x03480078,
++ .avid_start_stop_y = 0x02060024,
++ .fid_int_start_x__fid_int_start_y = 0x0001008A,
++ .fid_int_offset_y__fid_ext_start_x = 0x01AC0106,
++ .fid_ext_start_y__fid_ext_offset_y = 0x01060006,
++
++ .tvdetgp_int_start_stop_x = 0x00140001,
++ .tvdetgp_int_start_stop_y = 0x00010001,
++ .gen_ctrl = 0x00F90000,
++};
++
++static const struct venc_config venc_config_pal_bdghi = {
++ .f_control = 0,
++ .vidout_ctrl = 0,
++ .sync_ctrl = 0,
++ .hfltr_ctrl = 0,
++ .x_color = 0,
++ .line21 = 0,
++ .ln_sel = 21,
++ .htrigger_vtrigger = 0,
++ .tvdetgp_int_start_stop_x = 0x00140001,
++ .tvdetgp_int_start_stop_y = 0x00010001,
++ .gen_ctrl = 0x00FB0000,
++
++ .llen = 864-1,
++ .flens = 625-1,
++ .cc_carr_wss_carr = 0x2F7625ED,
++ .c_phase = 0xDF,
++ .gain_u = 0x111,
++ .gain_v = 0x181,
++ .gain_y = 0x140,
++ .black_level = 0x3e,
++ .blank_level = 0x3e,
++ .m_control = 0<<2 | 1<<1,
++ .bstamp_wss_data = 0x42,
++ .s_carr = 0x2a098acb,
++ .l21__wc_ctl = 0<<13 | 0x16<<8 | 0<<0,
++ .savid__eavid = 0x06A70108,
++ .flen__fal = 23<<16 | 624<<0,
++ .lal__phase_reset = 2<<17 | 310<<0,
++ .hs_int_start_stop_x = 0x00920358,
++ .hs_ext_start_stop_x = 0x000F035F,
++ .vs_int_start_x = 0x1a7<<16,
++ .vs_int_stop_x__vs_int_start_y = 0x000601A7,
++ .vs_int_stop_y__vs_ext_start_x = 0x01AF0036,
++ .vs_ext_stop_x__vs_ext_start_y = 0x27101af,
++ .vs_ext_stop_y = 0x05,
++ .avid_start_stop_x = 0x03530082,
++ .avid_start_stop_y = 0x0270002E,
++ .fid_int_start_x__fid_int_start_y = 0x0005008A,
++ .fid_int_offset_y__fid_ext_start_x = 0x002E0138,
++ .fid_ext_start_y__fid_ext_offset_y = 0x01380005,
++};
++
++const struct omap_video_timings omap_dss_pal_timings = {
++ .x_res = 720,
++ .y_res = 574,
++ .pixel_clock = 26181,
++ .hsw = 32,
++ .hfp = 80,
++ .hbp = 48,
++ .vsw = 7,
++ .vfp = 3,
++ .vbp = 6,
++};
++EXPORT_SYMBOL(omap_dss_pal_timings);
++
++const struct omap_video_timings omap_dss_ntsc_timings = {
++ .x_res = 720,
++ .y_res = 482,
++ .pixel_clock = 22153,
++ .hsw = 32,
++ .hfp = 80,
++ .hbp = 48,
++ .vsw = 10,
++ .vfp = 3,
++ .vbp = 6,
++};
++EXPORT_SYMBOL(omap_dss_ntsc_timings);
++
++static struct {
++ void __iomem *base;
++ struct mutex venc_lock;
++} venc;
++
++static struct omap_panel venc_panel = {
++ .name = "tv-out",
++};
++
++static inline void venc_write_reg(int idx, u32 val)
++{
++ __raw_writel(val, venc.base + idx);
++}
++
++static inline u32 venc_read_reg(int idx)
++{
++ u32 l = __raw_readl(venc.base + idx);
++ return l;
++}
++
++static void venc_write_config(const struct venc_config *config)
++{
++ DSSDBG("write venc conf\n");
++
++ venc_write_reg(VENC_LLEN, config->llen);
++ venc_write_reg(VENC_FLENS, config->flens);
++ venc_write_reg(VENC_CC_CARR_WSS_CARR, config->cc_carr_wss_carr);
++ venc_write_reg(VENC_C_PHASE, config->c_phase);
++ venc_write_reg(VENC_GAIN_U, config->gain_u);
++ venc_write_reg(VENC_GAIN_V, config->gain_v);
++ venc_write_reg(VENC_GAIN_Y, config->gain_y);
++ venc_write_reg(VENC_BLACK_LEVEL, config->black_level);
++ venc_write_reg(VENC_BLANK_LEVEL, config->blank_level);
++ venc_write_reg(VENC_M_CONTROL, config->m_control);
++ venc_write_reg(VENC_BSTAMP_WSS_DATA, config->bstamp_wss_data);
++ venc_write_reg(VENC_S_CARR, config->s_carr);
++ venc_write_reg(VENC_L21__WC_CTL, config->l21__wc_ctl);
++ venc_write_reg(VENC_SAVID__EAVID, config->savid__eavid);
++ venc_write_reg(VENC_FLEN__FAL, config->flen__fal);
++ venc_write_reg(VENC_LAL__PHASE_RESET, config->lal__phase_reset);
++ venc_write_reg(VENC_HS_INT_START_STOP_X, config->hs_int_start_stop_x);
++ venc_write_reg(VENC_HS_EXT_START_STOP_X, config->hs_ext_start_stop_x);
++ venc_write_reg(VENC_VS_INT_START_X, config->vs_int_start_x);
++ venc_write_reg(VENC_VS_INT_STOP_X__VS_INT_START_Y,
++ config->vs_int_stop_x__vs_int_start_y);
++ venc_write_reg(VENC_VS_INT_STOP_Y__VS_EXT_START_X,
++ config->vs_int_stop_y__vs_ext_start_x);
++ venc_write_reg(VENC_VS_EXT_STOP_X__VS_EXT_START_Y,
++ config->vs_ext_stop_x__vs_ext_start_y);
++ venc_write_reg(VENC_VS_EXT_STOP_Y, config->vs_ext_stop_y);
++ venc_write_reg(VENC_AVID_START_STOP_X, config->avid_start_stop_x);
++ venc_write_reg(VENC_AVID_START_STOP_Y, config->avid_start_stop_y);
++ venc_write_reg(VENC_FID_INT_START_X__FID_INT_START_Y,
++ config->fid_int_start_x__fid_int_start_y);
++ venc_write_reg(VENC_FID_INT_OFFSET_Y__FID_EXT_START_X,
++ config->fid_int_offset_y__fid_ext_start_x);
++ venc_write_reg(VENC_FID_EXT_START_Y__FID_EXT_OFFSET_Y,
++ config->fid_ext_start_y__fid_ext_offset_y);
++
++ venc_write_reg(VENC_DAC_B__DAC_C, venc_read_reg(VENC_DAC_B__DAC_C));
++ venc_write_reg(VENC_VIDOUT_CTRL, config->vidout_ctrl);
++ venc_write_reg(VENC_HFLTR_CTRL, config->hfltr_ctrl);
++ venc_write_reg(VENC_X_COLOR, config->x_color);
++ venc_write_reg(VENC_LINE21, config->line21);
++ venc_write_reg(VENC_LN_SEL, config->ln_sel);
++ venc_write_reg(VENC_HTRIGGER_VTRIGGER, config->htrigger_vtrigger);
++ venc_write_reg(VENC_TVDETGP_INT_START_STOP_X,
++ config->tvdetgp_int_start_stop_x);
++ venc_write_reg(VENC_TVDETGP_INT_START_STOP_Y,
++ config->tvdetgp_int_start_stop_y);
++ venc_write_reg(VENC_GEN_CTRL, config->gen_ctrl);
++ venc_write_reg(VENC_F_CONTROL, config->f_control);
++ venc_write_reg(VENC_SYNC_CTRL, config->sync_ctrl);
++}
++
++static void venc_reset(void)
++{
++ int t = 1000;
++
++ venc_write_reg(VENC_F_CONTROL, 1<<8);
++ while (venc_read_reg(VENC_F_CONTROL) & (1<<8)) {
++ if (--t == 0) {
++ DSSERR("Failed to reset venc\n");
++ return;
++ }
++ }
++
++ /* the magical sleep that makes things work */
++ msleep(20);
++}
++
++static void venc_enable_clocks(int enable)
++{
++ if (enable)
++ dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M |
++ DSS_CLK_96M);
++ else
++ dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M |
++ DSS_CLK_96M);
++}
++
++static const struct venc_config *venc_timings_to_config(
++ struct omap_video_timings *timings)
++{
++ if (memcmp(&omap_dss_pal_timings, timings, sizeof(*timings)) == 0)
++ return &venc_config_pal_trm;
++
++ if (memcmp(&omap_dss_ntsc_timings, timings, sizeof(*timings)) == 0)
++ return &venc_config_ntsc_trm;
++
++ BUG();
++}
++
++int venc_init(void)
++{
++ u8 rev_id;
++
++ mutex_init(&venc.venc_lock);
++
++ venc_panel.timings = omap_dss_pal_timings;
++
++ venc.base = ioremap(VENC_BASE, SZ_1K);
++ if (!venc.base) {
++ DSSERR("can't ioremap VENC\n");
++ return -ENOMEM;
++ }
++
++ venc_enable_clocks(1);
++
++ rev_id = (u8)(venc_read_reg(VENC_REV_ID) & 0xff);
++ printk(KERN_INFO "OMAP VENC rev %d\n", rev_id);
++
++ venc_enable_clocks(0);
++
++ return 0;
++}
++
++void venc_exit(void)
++{
++ iounmap(venc.base);
++}
++
++static void venc_power_on(struct omap_display *display)
++{
++ venc_enable_clocks(1);
++
++ venc_reset();
++ venc_write_config(venc_timings_to_config(&display->panel->timings));
++
++ dss_set_venc_output(display->hw_config.u.venc.type);
++ dss_set_dac_pwrdn_bgz(1);
++
++ if (display->hw_config.u.venc.type == OMAP_DSS_VENC_TYPE_COMPOSITE) {
++ if (cpu_is_omap24xx())
++ venc_write_reg(VENC_OUTPUT_CONTROL, 0x2);
++ else
++ venc_write_reg(VENC_OUTPUT_CONTROL, 0xa);
++ } else { /* S-Video */
++ venc_write_reg(VENC_OUTPUT_CONTROL, 0xd);
++ }
++
++ dispc_set_digit_size(display->panel->timings.x_res,
++ display->panel->timings.y_res/2);
++
++ if (display->hw_config.panel_enable)
++ display->hw_config.panel_enable(display);
++
++ dispc_enable_digit_out(1);
++}
++
++static void venc_power_off(struct omap_display *display)
++{
++ venc_write_reg(VENC_OUTPUT_CONTROL, 0);
++ dss_set_dac_pwrdn_bgz(0);
++
++ dispc_enable_digit_out(0);
++
++ if (display->hw_config.panel_disable)
++ display->hw_config.panel_disable(display);
++
++ venc_enable_clocks(0);
++}
++
++static int venc_enable_display(struct omap_display *display)
++{
++ int r = 0;
++
++ DSSDBG("venc_enable_display\n");
++
++ mutex_lock(&venc.venc_lock);
++
++ if (display->state != OMAP_DSS_DISPLAY_DISABLED) {
++ r = -EINVAL;
++ goto err;
++ }
++
++ venc_power_on(display);
++
++ display->state = OMAP_DSS_DISPLAY_ACTIVE;
++err:
++ mutex_unlock(&venc.venc_lock);
++
++ return r;
++}
++
++static void venc_disable_display(struct omap_display *display)
++{
++ DSSDBG("venc_disable_display\n");
++
++ mutex_lock(&venc.venc_lock);
++
++ if (display->state == OMAP_DSS_DISPLAY_DISABLED)
++ goto end;
++
++ if (display->state == OMAP_DSS_DISPLAY_SUSPENDED) {
++ /* suspended is the same as disabled with venc */
++ display->state = OMAP_DSS_DISPLAY_DISABLED;
++ goto end;
++ }
++
++ venc_power_off(display);
++
++ display->state = OMAP_DSS_DISPLAY_DISABLED;
++end:
++ mutex_unlock(&venc.venc_lock);
++}
++
++static int venc_display_suspend(struct omap_display *display)
++{
++ int r = 0;
++
++ DSSDBG("venc_display_suspend\n");
++
++ mutex_lock(&venc.venc_lock);
++
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE) {
++ r = -EINVAL;
++ goto err;
++ }
++
++ venc_power_off(display);
++
++ display->state = OMAP_DSS_DISPLAY_SUSPENDED;
++err:
++ mutex_unlock(&venc.venc_lock);
++
++ return r;
++}
++
++static int venc_display_resume(struct omap_display *display)
++{
++ int r = 0;
++
++ DSSDBG("venc_display_resume\n");
++
++ mutex_lock(&venc.venc_lock);
++
++ if (display->state != OMAP_DSS_DISPLAY_SUSPENDED) {
++ r = -EINVAL;
++ goto err;
++ }
++
++ venc_power_on(display);
++
++ display->state = OMAP_DSS_DISPLAY_ACTIVE;
++err:
++ mutex_unlock(&venc.venc_lock);
++
++ return r;
++}
++
++static void venc_get_timings(struct omap_display *display,
++ struct omap_video_timings *timings)
++{
++ *timings = venc_panel.timings;
++}
++
++static void venc_set_timings(struct omap_display *display,
++ struct omap_video_timings *timings)
++{
++ DSSDBG("venc_set_timings\n");
++ display->panel->timings = *timings;
++ if (display->state == OMAP_DSS_DISPLAY_ACTIVE) {
++ /* turn the venc off and on to get new timings to use */
++ venc_disable_display(display);
++ venc_enable_display(display);
++ }
++}
++
++static int venc_check_timings(struct omap_display *display,
++ struct omap_video_timings *timings)
++{
++ DSSDBG("venc_check_timings\n");
++
++ if (memcmp(&omap_dss_pal_timings, timings, sizeof(*timings)) == 0)
++ return 0;
++
++ if (memcmp(&omap_dss_ntsc_timings, timings, sizeof(*timings)) == 0)
++ return 0;
++
++ return -EINVAL;
++}
++
++void venc_init_display(struct omap_display *display)
++{
++ display->panel = &venc_panel;
++ display->enable = venc_enable_display;
++ display->disable = venc_disable_display;
++ display->suspend = venc_display_suspend;
++ display->resume = venc_display_resume;
++ display->get_timings = venc_get_timings;
++ display->set_timings = venc_set_timings;
++ display->check_timings = venc_check_timings;
++}
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch
new file mode 100644
index 0000000000..877bb43c56
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0004-DSS2-OMAP-framebuffer-driver.patch
@@ -0,0 +1,3403 @@
+From db9314f01a207e256d545244d3d00dc4ce535280 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 10:25:48 +0300
+Subject: [PATCH 04/69] DSS2: OMAP framebuffer driver
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ arch/arm/plat-omap/fb.c | 28 +
+ drivers/video/omap/Kconfig | 5 +-
+ drivers/video/omap2/omapfb/Kconfig | 35 +
+ drivers/video/omap2/omapfb/Makefile | 2 +
+ drivers/video/omap2/omapfb/omapfb-ioctl.c | 656 ++++++++++
+ drivers/video/omap2/omapfb/omapfb-main.c | 2010 +++++++++++++++++++++++++++++
+ drivers/video/omap2/omapfb/omapfb-sysfs.c | 371 ++++++
+ drivers/video/omap2/omapfb/omapfb.h | 153 +++
+ include/linux/omapfb.h | 20 +
+ 9 files changed, 3278 insertions(+), 2 deletions(-)
+ create mode 100644 drivers/video/omap2/omapfb/Kconfig
+ create mode 100644 drivers/video/omap2/omapfb/Makefile
+ create mode 100644 drivers/video/omap2/omapfb/omapfb-ioctl.c
+ create mode 100644 drivers/video/omap2/omapfb/omapfb-main.c
+ create mode 100644 drivers/video/omap2/omapfb/omapfb-sysfs.c
+ create mode 100644 drivers/video/omap2/omapfb/omapfb.h
+
+diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
+index 40615a6..1dc3415 100644
+--- a/arch/arm/plat-omap/fb.c
++++ b/arch/arm/plat-omap/fb.c
+@@ -327,6 +327,34 @@ static inline int omap_init_fb(void)
+
+ arch_initcall(omap_init_fb);
+
++#elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
++
++static u64 omap_fb_dma_mask = ~(u32)0;
++static struct omapfb_platform_data omapfb_config;
++
++static struct platform_device omap_fb_device = {
++ .name = "omapfb",
++ .id = -1,
++ .dev = {
++ .dma_mask = &omap_fb_dma_mask,
++ .coherent_dma_mask = ~(u32)0,
++ .platform_data = &omapfb_config,
++ },
++ .num_resources = 0,
++};
++
++void omapfb_set_platform_data(struct omapfb_platform_data *data)
++{
++ omapfb_config = *data;
++}
++
++static inline int omap_init_fb(void)
++{
++ return platform_device_register(&omap_fb_device);
++}
++
++arch_initcall(omap_init_fb);
++
+ #else
+
+ void omapfb_reserve_sdram(void) {}
+diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig
+index c355b59..a1c10de 100644
+--- a/drivers/video/omap/Kconfig
++++ b/drivers/video/omap/Kconfig
+@@ -1,6 +1,7 @@
+ config FB_OMAP
+ tristate "OMAP frame buffer support (EXPERIMENTAL)"
+- depends on FB && ARCH_OMAP
++ depends on FB && ARCH_OMAP && (OMAP2_DSS = "n")
++
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
+@@ -72,7 +73,7 @@ config FB_OMAP_LCD_MIPID
+
+ config FB_OMAP_BOOTLOADER_INIT
+ bool "Check bootloader initialization"
+- depends on FB_OMAP
++ depends on FB_OMAP || FB_OMAP2
+ help
+ Say Y here if you want to enable checking if the bootloader has
+ already initialized the display controller. In this case the
+diff --git a/drivers/video/omap2/omapfb/Kconfig b/drivers/video/omap2/omapfb/Kconfig
+new file mode 100644
+index 0000000..4f66033
+--- /dev/null
++++ b/drivers/video/omap2/omapfb/Kconfig
+@@ -0,0 +1,35 @@
++menuconfig FB_OMAP2
++ tristate "OMAP2/3 frame buffer support (EXPERIMENTAL)"
++ depends on FB && OMAP2_DSS
++
++ select FB_CFB_FILLRECT
++ select FB_CFB_COPYAREA
++ select FB_CFB_IMAGEBLIT
++ help
++ Frame buffer driver for OMAP2/3 based boards.
++
++config FB_OMAP2_DEBUG_SUPPORT
++ bool "Debug support for OMAP2/3 FB"
++ default y
++ depends on FB_OMAP2
++ help
++ Support for debug output. You have to enable the actual printing
++ with debug module parameter.
++
++config FB_OMAP2_FORCE_AUTO_UPDATE
++ bool "Force main display to automatic update mode"
++ depends on FB_OMAP2
++ help
++ Forces main display to automatic update mode (if possible),
++ and also enables tearsync (if possible). By default
++ displays that support manual update are started in manual
++ update mode.
++
++config FB_OMAP2_NUM_FBS
++ int "Number of framebuffers"
++ range 1 10
++ default 3
++ depends on FB_OMAP2
++ help
++ Select the number of framebuffers created. OMAP2/3 has 3 overlays
++ so normally this would be 3.
+diff --git a/drivers/video/omap2/omapfb/Makefile b/drivers/video/omap2/omapfb/Makefile
+new file mode 100644
+index 0000000..51c2e00
+--- /dev/null
++++ b/drivers/video/omap2/omapfb/Makefile
+@@ -0,0 +1,2 @@
++obj-$(CONFIG_FB_OMAP2) += omapfb.o
++omapfb-y := omapfb-main.o omapfb-sysfs.o omapfb-ioctl.o
+diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c
+new file mode 100644
+index 0000000..7f18d2a
+--- /dev/null
++++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c
+@@ -0,0 +1,656 @@
++/*
++ * linux/drivers/video/omap2/omapfb-ioctl.c
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <linux/fb.h>
++#include <linux/device.h>
++#include <linux/uaccess.h>
++#include <linux/platform_device.h>
++#include <linux/mm.h>
++#include <linux/omapfb.h>
++#include <linux/vmalloc.h>
++
++#include <mach/display.h>
++#include <mach/vrfb.h>
++
++#include "omapfb.h"
++
++static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_display *display = fb2display(fbi);
++ struct omap_overlay *ovl;
++ struct omap_overlay_info info;
++ int r = 0;
++
++ DBG("omapfb_setup_plane\n");
++
++ omapfb_lock(fbdev);
++
++ if (ofbi->num_overlays != 1) {
++ r = -EINVAL;
++ goto out;
++ }
++
++ /* XXX uses only the first overlay */
++ ovl = ofbi->overlays[0];
++
++ if (pi->enabled && !ofbi->region.size) {
++ /*
++ * This plane's memory was freed, can't enable it
++ * until it's reallocated.
++ */
++ r = -EINVAL;
++ goto out;
++ }
++
++ ovl->get_overlay_info(ovl, &info);
++
++ info.pos_x = pi->pos_x;
++ info.pos_y = pi->pos_y;
++ info.out_width = pi->out_width;
++ info.out_height = pi->out_height;
++ info.enabled = pi->enabled;
++
++ r = ovl->set_overlay_info(ovl, &info);
++ if (r)
++ goto out;
++
++ if (ovl->manager) {
++ r = ovl->manager->apply(ovl->manager);
++ if (r)
++ goto out;
++ }
++
++ if (display) {
++ u16 w, h;
++
++ if (display->sync)
++ display->sync(display);
++
++ display->get_resolution(display, &w, &h);
++
++ if (display->update)
++ display->update(display, 0, 0, w, h);
++ }
++
++out:
++ omapfb_unlock(fbdev);
++ if (r)
++ dev_err(fbdev->dev, "setup_plane failed\n");
++ return r;
++}
++
++static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++
++ omapfb_lock(fbdev);
++
++ if (ofbi->num_overlays != 1) {
++ memset(pi, 0, sizeof(*pi));
++ } else {
++ struct omap_overlay_info *ovli;
++ struct omap_overlay *ovl;
++
++ ovl = ofbi->overlays[0];
++ ovli = &ovl->info;
++
++ pi->pos_x = ovli->pos_x;
++ pi->pos_y = ovli->pos_y;
++ pi->enabled = ovli->enabled;
++ pi->channel_out = 0; /* xxx */
++ pi->mirror = 0;
++ pi->out_width = ovli->out_width;
++ pi->out_height = ovli->out_height;
++ }
++
++ omapfb_unlock(fbdev);
++
++ return 0;
++}
++
++static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omapfb2_mem_region *rg;
++ int r, i;
++ size_t size;
++
++ if (mi->type > OMAPFB_MEMTYPE_MAX)
++ return -EINVAL;
++
++ size = PAGE_ALIGN(mi->size);
++
++ rg = &ofbi->region;
++
++ omapfb_lock(fbdev);
++
++ for (i = 0; i < ofbi->num_overlays; i++) {
++ if (ofbi->overlays[i]->info.enabled) {
++ r = -EBUSY;
++ goto out;
++ }
++ }
++
++ if (rg->size != size || rg->type != mi->type) {
++ r = omapfb_realloc_fbmem(fbi, size, mi->type);
++ if (r) {
++ dev_err(fbdev->dev, "realloc fbmem failed\n");
++ goto out;
++ }
++ }
++
++ r = 0;
++out:
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++static int omapfb_query_mem(struct fb_info *fbi, struct omapfb_mem_info *mi)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omapfb2_mem_region *rg;
++
++ rg = &ofbi->region;
++ memset(mi, 0, sizeof(*mi));
++
++ omapfb_lock(fbdev);
++ mi->size = rg->size;
++ mi->type = rg->type;
++ omapfb_unlock(fbdev);
++
++ return 0;
++}
++
++static int omapfb_update_window(struct fb_info *fbi,
++ u32 x, u32 y, u32 w, u32 h)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_display *display = fb2display(fbi);
++ u16 dw, dh;
++
++ if (!display)
++ return 0;
++
++ if (w == 0 || h == 0)
++ return 0;
++
++ display->get_resolution(display, &dw, &dh);
++
++ if (x + w > dw || y + h > dh)
++ return -EINVAL;
++
++ omapfb_lock(fbdev);
++ display->update(display, x, y, w, h);
++ omapfb_unlock(fbdev);
++
++ return 0;
++}
++
++static int omapfb_set_update_mode(struct fb_info *fbi,
++ enum omapfb_update_mode mode)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_display *display = fb2display(fbi);
++ enum omap_dss_update_mode um;
++ int r;
++
++ if (!display || !display->set_update_mode)
++ return -EINVAL;
++
++ switch (mode) {
++ case OMAPFB_UPDATE_DISABLED:
++ um = OMAP_DSS_UPDATE_DISABLED;
++ break;
++
++ case OMAPFB_AUTO_UPDATE:
++ um = OMAP_DSS_UPDATE_AUTO;
++ break;
++
++ case OMAPFB_MANUAL_UPDATE:
++ um = OMAP_DSS_UPDATE_MANUAL;
++ break;
++
++ default:
++ return -EINVAL;
++ }
++
++ omapfb_lock(fbdev);
++ r = display->set_update_mode(display, um);
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++static int omapfb_get_update_mode(struct fb_info *fbi,
++ enum omapfb_update_mode *mode)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_display *display = fb2display(fbi);
++ enum omap_dss_update_mode m;
++
++ if (!display || !display->get_update_mode)
++ return -EINVAL;
++
++ omapfb_lock(fbdev);
++ m = display->get_update_mode(display);
++ omapfb_unlock(fbdev);
++
++ switch (m) {
++ case OMAP_DSS_UPDATE_DISABLED:
++ *mode = OMAPFB_UPDATE_DISABLED;
++ break;
++ case OMAP_DSS_UPDATE_AUTO:
++ *mode = OMAPFB_AUTO_UPDATE;
++ break;
++ case OMAP_DSS_UPDATE_MANUAL:
++ *mode = OMAPFB_MANUAL_UPDATE;
++ break;
++ default:
++ BUG();
++ }
++
++ return 0;
++}
++
++/* XXX this color key handling is a hack... */
++static struct omapfb_color_key omapfb_color_keys[2];
++
++static int _omapfb_set_color_key(struct omap_overlay_manager *mgr,
++ struct omapfb_color_key *ck)
++{
++ enum omap_dss_color_key_type kt;
++
++ if(!mgr->set_default_color || !mgr->set_trans_key ||
++ !mgr->enable_trans_key)
++ return 0;
++
++ if (ck->key_type == OMAPFB_COLOR_KEY_DISABLED) {
++ mgr->enable_trans_key(mgr, 0);
++ omapfb_color_keys[mgr->id] = *ck;
++ return 0;
++ }
++
++ switch(ck->key_type) {
++ case OMAPFB_COLOR_KEY_GFX_DST:
++ kt = OMAP_DSS_COLOR_KEY_GFX_DST;
++ break;
++ case OMAPFB_COLOR_KEY_VID_SRC:
++ kt = OMAP_DSS_COLOR_KEY_VID_SRC;
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ mgr->set_default_color(mgr, ck->background);
++ mgr->set_trans_key(mgr, kt, ck->trans_key);
++ mgr->enable_trans_key(mgr, 1);
++
++ omapfb_color_keys[mgr->id] = *ck;
++
++ return 0;
++}
++
++static int omapfb_set_color_key(struct fb_info *fbi,
++ struct omapfb_color_key *ck)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ int r;
++ int i;
++ struct omap_overlay_manager *mgr = NULL;
++
++ omapfb_lock(fbdev);
++
++ for (i = 0; i < ofbi->num_overlays; i++) {
++ if (ofbi->overlays[i]->manager) {
++ mgr = ofbi->overlays[i]->manager;
++ break;
++ }
++ }
++
++ if (!mgr) {
++ r = -EINVAL;
++ goto err;
++ }
++
++ if(!mgr->set_default_color || !mgr->set_trans_key ||
++ !mgr->enable_trans_key) {
++ r = -ENODEV;
++ goto err;
++ }
++
++ r = _omapfb_set_color_key(mgr, ck);
++err:
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++static int omapfb_get_color_key(struct fb_info *fbi,
++ struct omapfb_color_key *ck)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_overlay_manager *mgr = NULL;
++ int r = 0;
++ int i;
++
++ omapfb_lock(fbdev);
++
++ for (i = 0; i < ofbi->num_overlays; i++) {
++ if (ofbi->overlays[i]->manager) {
++ mgr = ofbi->overlays[i]->manager;
++ break;
++ }
++ }
++
++ if (!mgr) {
++ r = -EINVAL;
++ goto err;
++ }
++
++ if(!mgr->set_default_color || !mgr->set_trans_key ||
++ !mgr->enable_trans_key) {
++ r = -ENODEV;
++ goto err;
++ }
++
++ *ck = omapfb_color_keys[mgr->id];
++err:
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++static int omapfb_memory_read(struct fb_info *fbi,
++ struct omapfb_memory_read *mr)
++{
++ struct omap_display *display = fb2display(fbi);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ void *buf;
++ int r;
++
++ if (!display || !display->memory_read)
++ return -ENOENT;
++
++ if (!access_ok(VERIFY_WRITE, mr->buffer, mr->buffer_size))
++ return -EFAULT;
++
++ if (mr->w * mr->h * 3 > mr->buffer_size)
++ return -EINVAL;
++
++ buf = vmalloc(mr->buffer_size);
++ if (!buf) {
++ DBG("vmalloc failed\n");
++ return -ENOMEM;
++ }
++
++ omapfb_lock(fbdev);
++
++ r = display->memory_read(display, buf, mr->buffer_size,
++ mr->x, mr->y, mr->w, mr->h);
++
++ if (r > 0) {
++ if (copy_to_user(mr->buffer, buf, mr->buffer_size))
++ r = -EFAULT;
++ }
++
++ vfree(buf);
++
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_display *display = fb2display(fbi);
++
++ union {
++ struct omapfb_update_window_old uwnd_o;
++ struct omapfb_update_window uwnd;
++ struct omapfb_plane_info plane_info;
++ struct omapfb_caps caps;
++ struct omapfb_mem_info mem_info;
++ struct omapfb_color_key color_key;
++ enum omapfb_update_mode update_mode;
++ int test_num;
++ struct omapfb_memory_read memory_read;
++ } p;
++
++ int r = 0;
++
++ switch (cmd) {
++ case OMAPFB_SYNC_GFX:
++ DBG("ioctl SYNC_GFX\n");
++ if (!display || !display->sync) {
++ /* DSS1 never returns an error here, so we neither */
++ /*r = -EINVAL;*/
++ break;
++ }
++
++ omapfb_lock(fbdev);
++ r = display->sync(display);
++ omapfb_unlock(fbdev);
++ break;
++
++ case OMAPFB_UPDATE_WINDOW_OLD:
++ DBG("ioctl UPDATE_WINDOW_OLD\n");
++ if (!display || !display->update) {
++ r = -EINVAL;
++ break;
++ }
++
++ if (copy_from_user(&p.uwnd_o,
++ (void __user *)arg,
++ sizeof(p.uwnd_o))) {
++ r = -EFAULT;
++ break;
++ }
++
++ r = omapfb_update_window(fbi, p.uwnd_o.x, p.uwnd_o.y,
++ p.uwnd_o.width, p.uwnd_o.height);
++ break;
++
++ case OMAPFB_UPDATE_WINDOW:
++ DBG("ioctl UPDATE_WINDOW\n");
++ if (!display || !display->update) {
++ r = -EINVAL;
++ break;
++ }
++
++ if (copy_from_user(&p.uwnd, (void __user *)arg,
++ sizeof(p.uwnd))) {
++ r = -EFAULT;
++ break;
++ }
++
++ r = omapfb_update_window(fbi, p.uwnd.x, p.uwnd.y,
++ p.uwnd.width, p.uwnd.height);
++ break;
++
++ case OMAPFB_SETUP_PLANE:
++ DBG("ioctl SETUP_PLANE\n");
++ if (copy_from_user(&p.plane_info, (void __user *)arg,
++ sizeof(p.plane_info)))
++ r = -EFAULT;
++ else
++ r = omapfb_setup_plane(fbi, &p.plane_info);
++ break;
++
++ case OMAPFB_QUERY_PLANE:
++ DBG("ioctl QUERY_PLANE\n");
++ r = omapfb_query_plane(fbi, &p.plane_info);
++ if (r < 0)
++ break;
++ if (copy_to_user((void __user *)arg, &p.plane_info,
++ sizeof(p.plane_info)))
++ r = -EFAULT;
++ break;
++
++ case OMAPFB_SETUP_MEM:
++ DBG("ioctl SETUP_MEM\n");
++ if (copy_from_user(&p.mem_info, (void __user *)arg,
++ sizeof(p.mem_info)))
++ r = -EFAULT;
++ else
++ r = omapfb_setup_mem(fbi, &p.mem_info);
++ break;
++
++ case OMAPFB_QUERY_MEM:
++ DBG("ioctl QUERY_MEM\n");
++ r = omapfb_query_mem(fbi, &p.mem_info);
++ if (r < 0)
++ break;
++ if (copy_to_user((void __user *)arg, &p.mem_info,
++ sizeof(p.mem_info)))
++ r = -EFAULT;
++ break;
++
++ case OMAPFB_GET_CAPS:
++ DBG("ioctl GET_CAPS\n");
++ if (!display) {
++ r = -EINVAL;
++ break;
++ }
++
++ p.caps.ctrl = display->caps;
++
++ if (copy_to_user((void __user *)arg, &p.caps, sizeof(p.caps)))
++ r = -EFAULT;
++ break;
++
++ case OMAPFB_SET_UPDATE_MODE:
++ DBG("ioctl SET_UPDATE_MODE\n");
++ if (get_user(p.update_mode, (int __user *)arg))
++ r = -EFAULT;
++ else
++ r = omapfb_set_update_mode(fbi, p.update_mode);
++ break;
++
++ case OMAPFB_GET_UPDATE_MODE:
++ DBG("ioctl GET_UPDATE_MODE\n");
++ r = omapfb_get_update_mode(fbi, &p.update_mode);
++ if (r)
++ break;
++ if (put_user(p.update_mode,
++ (enum omapfb_update_mode __user *)arg))
++ r = -EFAULT;
++ break;
++
++ case OMAPFB_SET_COLOR_KEY:
++ DBG("ioctl SET_COLOR_KEY\n");
++ if (copy_from_user(&p.color_key, (void __user *)arg,
++ sizeof(p.color_key)))
++ r = -EFAULT;
++ else
++ r = omapfb_set_color_key(fbi, &p.color_key);
++ break;
++
++ case OMAPFB_GET_COLOR_KEY:
++ DBG("ioctl GET_COLOR_KEY\n");
++ if ((r = omapfb_get_color_key(fbi, &p.color_key)) < 0)
++ break;
++ if (copy_to_user((void __user *)arg, &p.color_key,
++ sizeof(p.color_key)))
++ r = -EFAULT;
++ break;
++
++ case OMAPFB_WAITFORVSYNC:
++ DBG("ioctl WAITFORVSYNC\n");
++ if (!display) {
++ r = -EINVAL;
++ break;
++ }
++
++ r = display->wait_vsync(display);
++ break;
++
++ /* LCD and CTRL tests do the same thing for backward
++ * compatibility */
++ case OMAPFB_LCD_TEST:
++ DBG("ioctl LCD_TEST\n");
++ if (get_user(p.test_num, (int __user *)arg)) {
++ r = -EFAULT;
++ break;
++ }
++ if (!display || !display->run_test) {
++ r = -EINVAL;
++ break;
++ }
++
++ r = display->run_test(display, p.test_num);
++
++ break;
++
++ case OMAPFB_CTRL_TEST:
++ DBG("ioctl CTRL_TEST\n");
++ if (get_user(p.test_num, (int __user *)arg)) {
++ r = -EFAULT;
++ break;
++ }
++ if (!display || !display->run_test) {
++ r = -EINVAL;
++ break;
++ }
++
++ r = display->run_test(display, p.test_num);
++
++ break;
++
++ case OMAPFB_MEMORY_READ:
++ DBG("ioctl MEMORY_READ\n");
++
++ if (copy_from_user(&p.memory_read, (void __user *)arg,
++ sizeof(p.memory_read))) {
++ r = -EFAULT;
++ break;
++ }
++
++ r = omapfb_memory_read(fbi, &p.memory_read);
++
++ break;
++
++ default:
++ dev_err(fbdev->dev, "Unknown ioctl 0x%x\n", cmd);
++ r = -EINVAL;
++ }
++
++ if (r < 0)
++ DBG("ioctl failed: %d\n", r);
++
++ return r;
++}
++
++
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+new file mode 100644
+index 0000000..852abe5
+--- /dev/null
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -0,0 +1,2010 @@
++/*
++ * linux/drivers/video/omap2/omapfb-main.c
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <linux/module.h>
++#include <linux/delay.h>
++#include <linux/fb.h>
++#include <linux/dma-mapping.h>
++#include <linux/vmalloc.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/omapfb.h>
++
++#include <mach/display.h>
++#include <mach/vram.h>
++#include <mach/vrfb.h>
++
++#include "omapfb.h"
++
++#define MODULE_NAME "omapfb"
++
++static char *def_mode;
++static char *def_vram;
++static int def_vrfb;
++static int def_rotate;
++static int def_mirror;
++
++#ifdef DEBUG
++unsigned int omapfb_debug;
++module_param_named(debug, omapfb_debug, bool, 0644);
++static unsigned int omapfb_test_pattern;
++module_param_named(test, omapfb_test_pattern, bool, 0644);
++#endif
++
++#ifdef DEBUG
++static void draw_pixel(struct fb_info *fbi, int x, int y, unsigned color)
++{
++ struct fb_var_screeninfo *var = &fbi->var;
++ struct fb_fix_screeninfo *fix = &fbi->fix;
++ void __iomem *addr = fbi->screen_base;
++ const unsigned bytespp = var->bits_per_pixel >> 3;
++ const unsigned line_len = fix->line_length / bytespp;
++
++ int r = (color >> 16) & 0xff;
++ int g = (color >> 8) & 0xff;
++ int b = (color >> 0) & 0xff;
++
++ if (var->bits_per_pixel == 16) {
++ u16 __iomem *p = (u16 __iomem *)addr;
++ p += y * line_len + x;
++
++ r = r * 32 / 256;
++ g = g * 64 / 256;
++ b = b * 32 / 256;
++
++ __raw_writew((r << 11) | (g << 5) | (b << 0), p);
++ } else if (var->bits_per_pixel == 24) {
++ u8 __iomem *p = (u8 __iomem *)addr;
++ p += (y * line_len + x) * 3;
++
++ __raw_writeb(b, p + 0);
++ __raw_writeb(g, p + 1);
++ __raw_writeb(r, p + 2);
++ } else if (var->bits_per_pixel == 32) {
++ u32 __iomem *p = (u32 __iomem *)addr;
++ p += y * line_len + x;
++ __raw_writel(color, p);
++ }
++}
++
++static void fill_fb(struct fb_info *fbi)
++{
++ struct fb_var_screeninfo *var = &fbi->var;
++ const short w = var->xres_virtual;
++ const short h = var->yres_virtual;
++ void __iomem *addr = fbi->screen_base;
++ int y, x;
++
++ if (!addr)
++ return;
++
++ DBG("fill_fb %dx%d, line_len %d bytes\n", w, h, fbi->fix.line_length);
++
++ for (y = 0; y < h; y++) {
++ for (x = 0; x < w; x++) {
++ if (x < 20 && y < 20)
++ draw_pixel(fbi, x, y, 0xffffff);
++ else if (x < 20 && (y > 20 && y < h - 20))
++ draw_pixel(fbi, x, y, 0xff);
++ else if (y < 20 && (x > 20 && x < w - 20))
++ draw_pixel(fbi, x, y, 0xff00);
++ else if (x > w - 20 && (y > 20 && y < h - 20))
++ draw_pixel(fbi, x, y, 0xff0000);
++ else if (y > h - 20 && (x > 20 && x < w - 20))
++ draw_pixel(fbi, x, y, 0xffff00);
++ else if (x == 20 || x == w - 20 ||
++ y == 20 || y == h - 20)
++ draw_pixel(fbi, x, y, 0xffffff);
++ else if (x == y || w - x == h - y)
++ draw_pixel(fbi, x, y, 0xff00ff);
++ else if (w - x == y || x == h - y)
++ draw_pixel(fbi, x, y, 0x00ffff);
++ else if (x > 20 && y > 20 && x < w - 20 && y < h - 20) {
++ int t = x * 3 / w;
++ unsigned r = 0, g = 0, b = 0;
++ unsigned c;
++ if (var->bits_per_pixel == 16) {
++ if (t == 0)
++ b = (y % 32) * 256 / 32;
++ else if (t == 1)
++ g = (y % 64) * 256 / 64;
++ else if (t == 2)
++ r = (y % 32) * 256 / 32;
++ } else {
++ if (t == 0)
++ b = (y % 256);
++ else if (t == 1)
++ g = (y % 256);
++ else if (t == 2)
++ r = (y % 256);
++ }
++ c = (r << 16) | (g << 8) | (b << 0);
++ draw_pixel(fbi, x, y, c);
++ } else {
++ draw_pixel(fbi, x, y, 0);
++ }
++ }
++ }
++}
++#endif
++
++static unsigned omapfb_get_vrfb_offset(struct omapfb_info *ofbi, int rot)
++{
++ struct vrfb *vrfb = &ofbi->region.vrfb;
++ unsigned offset;
++
++ switch (rot) {
++ case FB_ROTATE_UR:
++ offset = 0;
++ break;
++ case FB_ROTATE_CW:
++ offset = vrfb->yoffset;
++ break;
++ case FB_ROTATE_UD:
++ offset = vrfb->yoffset * OMAP_VRFB_LINE_LEN + vrfb->xoffset;
++ break;
++ case FB_ROTATE_CCW:
++ offset = vrfb->xoffset * OMAP_VRFB_LINE_LEN;
++ break;
++ default:
++ BUG();
++ }
++
++ offset *= vrfb->bytespp;
++
++ return offset;
++}
++
++static u32 omapfb_get_region_rot_paddr(struct omapfb_info *ofbi)
++{
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
++ unsigned offset;
++ int rot;
++
++ rot = ofbi->rotation;
++
++ offset = omapfb_get_vrfb_offset(ofbi, rot);
++
++ return ofbi->region.vrfb.paddr[rot] + offset;
++ } else {
++ return ofbi->region.paddr;
++ }
++}
++
++u32 omapfb_get_region_paddr(struct omapfb_info *ofbi)
++{
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ return ofbi->region.vrfb.paddr[0];
++ else
++ return ofbi->region.paddr;
++}
++
++void __iomem *omapfb_get_region_vaddr(struct omapfb_info *ofbi)
++{
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ return ofbi->region.vrfb.vaddr[0];
++ else
++ return ofbi->region.vaddr;
++}
++
++static struct omapfb_colormode omapfb_colormodes[] = {
++ {
++ .dssmode = OMAP_DSS_COLOR_UYVY,
++ .bits_per_pixel = 16,
++ .nonstd = OMAPFB_COLOR_YUV422,
++ }, {
++ .dssmode = OMAP_DSS_COLOR_YUV2,
++ .bits_per_pixel = 16,
++ .nonstd = OMAPFB_COLOR_YUY422,
++ }, {
++ .dssmode = OMAP_DSS_COLOR_ARGB16,
++ .bits_per_pixel = 16,
++ .red = { .length = 4, .offset = 8, .msb_right = 0 },
++ .green = { .length = 4, .offset = 4, .msb_right = 0 },
++ .blue = { .length = 4, .offset = 0, .msb_right = 0 },
++ .transp = { .length = 4, .offset = 12, .msb_right = 0 },
++ }, {
++ .dssmode = OMAP_DSS_COLOR_RGB16,
++ .bits_per_pixel = 16,
++ .red = { .length = 5, .offset = 11, .msb_right = 0 },
++ .green = { .length = 6, .offset = 5, .msb_right = 0 },
++ .blue = { .length = 5, .offset = 0, .msb_right = 0 },
++ .transp = { .length = 0, .offset = 0, .msb_right = 0 },
++ }, {
++ .dssmode = OMAP_DSS_COLOR_RGB24P,
++ .bits_per_pixel = 24,
++ .red = { .length = 8, .offset = 16, .msb_right = 0 },
++ .green = { .length = 8, .offset = 8, .msb_right = 0 },
++ .blue = { .length = 8, .offset = 0, .msb_right = 0 },
++ .transp = { .length = 0, .offset = 0, .msb_right = 0 },
++ }, {
++ .dssmode = OMAP_DSS_COLOR_RGB24U,
++ .bits_per_pixel = 32,
++ .red = { .length = 8, .offset = 16, .msb_right = 0 },
++ .green = { .length = 8, .offset = 8, .msb_right = 0 },
++ .blue = { .length = 8, .offset = 0, .msb_right = 0 },
++ .transp = { .length = 0, .offset = 0, .msb_right = 0 },
++ }, {
++ .dssmode = OMAP_DSS_COLOR_ARGB32,
++ .bits_per_pixel = 32,
++ .red = { .length = 8, .offset = 16, .msb_right = 0 },
++ .green = { .length = 8, .offset = 8, .msb_right = 0 },
++ .blue = { .length = 8, .offset = 0, .msb_right = 0 },
++ .transp = { .length = 8, .offset = 24, .msb_right = 0 },
++ }, {
++ .dssmode = OMAP_DSS_COLOR_RGBA32,
++ .bits_per_pixel = 32,
++ .red = { .length = 8, .offset = 24, .msb_right = 0 },
++ .green = { .length = 8, .offset = 16, .msb_right = 0 },
++ .blue = { .length = 8, .offset = 8, .msb_right = 0 },
++ .transp = { .length = 8, .offset = 0, .msb_right = 0 },
++ }, {
++ .dssmode = OMAP_DSS_COLOR_RGBX32,
++ .bits_per_pixel = 32,
++ .red = { .length = 8, .offset = 24, .msb_right = 0 },
++ .green = { .length = 8, .offset = 16, .msb_right = 0 },
++ .blue = { .length = 8, .offset = 8, .msb_right = 0 },
++ .transp = { .length = 0, .offset = 0, .msb_right = 0 },
++ },
++};
++
++static bool cmp_var_to_colormode(struct fb_var_screeninfo *var,
++ struct omapfb_colormode *color)
++{
++ bool cmp_component(struct fb_bitfield *f1, struct fb_bitfield *f2)
++ {
++ return f1->length == f2->length &&
++ f1->offset == f2->offset &&
++ f1->msb_right == f2->msb_right;
++ }
++
++ if (var->bits_per_pixel == 0 ||
++ var->red.length == 0 ||
++ var->blue.length == 0 ||
++ var->green.length == 0)
++ return 0;
++
++ return var->bits_per_pixel == color->bits_per_pixel &&
++ cmp_component(&var->red, &color->red) &&
++ cmp_component(&var->green, &color->green) &&
++ cmp_component(&var->blue, &color->blue) &&
++ cmp_component(&var->transp, &color->transp);
++}
++
++static void assign_colormode_to_var(struct fb_var_screeninfo *var,
++ struct omapfb_colormode *color)
++{
++ var->bits_per_pixel = color->bits_per_pixel;
++ var->nonstd = color->nonstd;
++ var->red = color->red;
++ var->green = color->green;
++ var->blue = color->blue;
++ var->transp = color->transp;
++}
++
++static enum omap_color_mode fb_mode_to_dss_mode(struct fb_var_screeninfo *var)
++{
++ enum omap_color_mode dssmode;
++ int i;
++
++ /* first match with nonstd field */
++ if (var->nonstd) {
++ for (i = 0; i < ARRAY_SIZE(omapfb_colormodes); ++i) {
++ struct omapfb_colormode *mode = &omapfb_colormodes[i];
++ if (var->nonstd == mode->nonstd) {
++ assign_colormode_to_var(var, mode);
++ return mode->dssmode;
++ }
++ }
++
++ return -EINVAL;
++ }
++
++ /* then try exact match of bpp and colors */
++ for (i = 0; i < ARRAY_SIZE(omapfb_colormodes); ++i) {
++ struct omapfb_colormode *mode = &omapfb_colormodes[i];
++ if (cmp_var_to_colormode(var, mode)) {
++ assign_colormode_to_var(var, mode);
++ return mode->dssmode;
++ }
++ }
++
++ /* match with bpp if user has not filled color fields
++ * properly */
++ switch (var->bits_per_pixel) {
++ case 1:
++ dssmode = OMAP_DSS_COLOR_CLUT1;
++ break;
++ case 2:
++ dssmode = OMAP_DSS_COLOR_CLUT2;
++ break;
++ case 4:
++ dssmode = OMAP_DSS_COLOR_CLUT4;
++ break;
++ case 8:
++ dssmode = OMAP_DSS_COLOR_CLUT8;
++ break;
++ case 12:
++ dssmode = OMAP_DSS_COLOR_RGB12U;
++ break;
++ case 16:
++ dssmode = OMAP_DSS_COLOR_RGB16;
++ break;
++ case 24:
++ dssmode = OMAP_DSS_COLOR_RGB24P;
++ break;
++ case 32:
++ dssmode = OMAP_DSS_COLOR_RGB24U;
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ for (i = 0; i < ARRAY_SIZE(omapfb_colormodes); ++i) {
++ struct omapfb_colormode *mode = &omapfb_colormodes[i];
++ if (dssmode == mode->dssmode) {
++ assign_colormode_to_var(var, mode);
++ return mode->dssmode;
++ }
++ }
++
++ return -EINVAL;
++}
++
++void set_fb_fix(struct fb_info *fbi)
++{
++ struct fb_fix_screeninfo *fix = &fbi->fix;
++ struct fb_var_screeninfo *var = &fbi->var;
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_mem_region *rg = &ofbi->region;
++
++ DBG("set_fb_fix\n");
++
++ /* used by open/write in fbmem.c */
++ fbi->screen_base = (char __iomem *)omapfb_get_region_vaddr(ofbi);
++
++ /* used by mmap in fbmem.c */
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ fix->line_length =
++ (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 3;
++ else
++ fix->line_length =
++ (var->xres_virtual * var->bits_per_pixel) >> 3;
++ fix->smem_start = omapfb_get_region_paddr(ofbi);
++ fix->smem_len = rg->size;
++
++ fix->type = FB_TYPE_PACKED_PIXELS;
++
++ if (var->nonstd)
++ fix->visual = FB_VISUAL_PSEUDOCOLOR;
++ else {
++ switch (var->bits_per_pixel) {
++ case 32:
++ case 24:
++ case 16:
++ case 12:
++ fix->visual = FB_VISUAL_TRUECOLOR;
++ /* 12bpp is stored in 16 bits */
++ break;
++ case 1:
++ case 2:
++ case 4:
++ case 8:
++ fix->visual = FB_VISUAL_PSEUDOCOLOR;
++ break;
++ }
++ }
++
++ fix->accel = FB_ACCEL_NONE;
++
++ fix->xpanstep = 1;
++ fix->ypanstep = 1;
++
++ if (rg->size) {
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ omap_vrfb_setup(&rg->vrfb, rg->paddr,
++ var->xres_virtual, var->yres_virtual,
++ var->bits_per_pixel >> 3);
++ }
++}
++
++/* check new var and possibly modify it to be ok */
++int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omap_display *display = fb2display(fbi);
++ unsigned long max_frame_size;
++ unsigned long line_size;
++ int xres_min, yres_min;
++ int xres_max, yres_max;
++ enum omap_color_mode mode = 0;
++ int i;
++ int bytespp;
++
++ DBG("check_fb_var %d\n", ofbi->id);
++
++ if (ofbi->region.size == 0)
++ return 0;
++
++ mode = fb_mode_to_dss_mode(var);
++ if (mode < 0) {
++ DBG("cannot convert var to omap dss mode\n");
++ return -EINVAL;
++ }
++
++ for (i = 0; i < ofbi->num_overlays; ++i) {
++ if ((ofbi->overlays[i]->supported_modes & mode) == 0) {
++ DBG("invalid mode\n");
++ return -EINVAL;
++ }
++ }
++
++ if (var->rotate < 0 || var->rotate > 3)
++ return -EINVAL;
++
++ if (var->rotate != fbi->var.rotate) {
++ DBG("rotation changing\n");
++
++ ofbi->rotation = var->rotate;
++
++ if (abs(var->rotate - fbi->var.rotate) != 2) {
++ int tmp;
++ DBG("rotate changing 90/270 degrees. "
++ "swapping x/y res\n");
++
++ tmp = var->yres;
++ var->yres = var->xres;
++ var->xres = tmp;
++
++ tmp = var->yres_virtual;
++ var->yres_virtual = var->xres_virtual;
++ var->xres_virtual = tmp;
++ }
++ }
++
++ xres_min = OMAPFB_PLANE_XRES_MIN;
++ xres_max = 2048;
++ yres_min = OMAPFB_PLANE_YRES_MIN;
++ yres_max = 2048;
++
++ bytespp = var->bits_per_pixel >> 3;
++
++ /* XXX: some applications seem to set virtual res to 0. */
++ if (var->xres_virtual == 0)
++ var->xres_virtual = var->xres;
++
++ if (var->yres_virtual == 0)
++ var->yres_virtual = var->yres;
++
++ if (var->xres_virtual < xres_min || var->yres_virtual < yres_min)
++ return -EINVAL;
++
++ if (var->xres < xres_min)
++ var->xres = xres_min;
++ if (var->yres < yres_min)
++ var->yres = yres_min;
++ if (var->xres > xres_max)
++ var->xres = xres_max;
++ if (var->yres > yres_max)
++ var->yres = yres_max;
++
++ if (var->xres > var->xres_virtual)
++ var->xres = var->xres_virtual;
++ if (var->yres > var->yres_virtual)
++ var->yres = var->yres_virtual;
++
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ line_size = OMAP_VRFB_LINE_LEN * bytespp;
++ else
++ line_size = var->xres_virtual * bytespp;
++
++ max_frame_size = ofbi->region.size;
++
++ DBG("max frame size %lu, line size %lu\n", max_frame_size, line_size);
++
++ if (line_size * var->yres_virtual > max_frame_size) {
++ DBG("can't fit FB into memory, reducing y\n");
++ var->yres_virtual = max_frame_size / line_size;
++
++ if (var->yres_virtual < yres_min)
++ var->yres_virtual = yres_min;
++
++ if (var->yres > var->yres_virtual)
++ var->yres = var->yres_virtual;
++ }
++
++ if (line_size * var->yres_virtual > max_frame_size) {
++ DBG("can't fit FB into memory, reducing x\n");
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ return -EINVAL;
++
++ var->xres_virtual = max_frame_size / var->yres_virtual /
++ bytespp;
++
++ if (var->xres_virtual < xres_min)
++ var->xres_virtual = xres_min;
++
++ if (var->xres > var->xres_virtual)
++ var->xres = var->xres_virtual;
++
++ line_size = var->xres_virtual * bytespp;
++ }
++
++ if (line_size * var->yres_virtual > max_frame_size) {
++ DBG("cannot fit FB to memory\n");
++ return -EINVAL;
++ }
++
++ if (var->xres + var->xoffset > var->xres_virtual)
++ var->xoffset = var->xres_virtual - var->xres;
++ if (var->yres + var->yoffset > var->yres_virtual)
++ var->yoffset = var->yres_virtual - var->yres;
++
++ DBG("xres = %d, yres = %d, vxres = %d, vyres = %d\n",
++ var->xres, var->yres,
++ var->xres_virtual, var->yres_virtual);
++
++ var->height = -1;
++ var->width = -1;
++ var->grayscale = 0;
++
++ if (display && display->get_timings) {
++ struct omap_video_timings timings;
++ display->get_timings(display, &timings);
++
++ /* pixclock in ps, the rest in pixclock */
++ var->pixclock = timings.pixel_clock != 0 ?
++ KHZ2PICOS(timings.pixel_clock) :
++ 0;
++ var->left_margin = timings.hfp;
++ var->right_margin = timings.hbp;
++ var->upper_margin = timings.vfp;
++ var->lower_margin = timings.vbp;
++ var->hsync_len = timings.hsw;
++ var->vsync_len = timings.vsw;
++ } else {
++ var->pixclock = 0;
++ var->left_margin = 0;
++ var->right_margin = 0;
++ var->upper_margin = 0;
++ var->lower_margin = 0;
++ var->hsync_len = 0;
++ var->vsync_len = 0;
++ }
++
++ /* TODO: get these from panel->config */
++ var->vmode = FB_VMODE_NONINTERLACED;
++ var->sync = 0;
++
++ return 0;
++}
++
++/*
++ * ---------------------------------------------------------------------------
++ * fbdev framework callbacks
++ * ---------------------------------------------------------------------------
++ */
++static int omapfb_open(struct fb_info *fbi, int user)
++{
++ return 0;
++}
++
++static int omapfb_release(struct fb_info *fbi, int user)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_display *display = fb2display(fbi);
++
++ DBG("Closing fb with plane index %d\n", ofbi->id);
++
++ omapfb_lock(fbdev);
++#if 1
++ if (display && display->get_update_mode && display->update) {
++ /* XXX this update should be removed, I think. But it's
++ * good for debugging */
++ if (display->get_update_mode(display) ==
++ OMAP_DSS_UPDATE_MANUAL) {
++ u16 w, h;
++
++ if (display->sync)
++ display->sync(display);
++
++ display->get_resolution(display, &w, &h);
++ display->update(display, 0, 0, w, h);
++ }
++ }
++#endif
++
++ if (display && display->sync)
++ display->sync(display);
++
++ omapfb_unlock(fbdev);
++
++ return 0;
++}
++
++/* setup overlay according to the fb */
++static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
++ u16 posx, u16 posy, u16 outw, u16 outh)
++{
++ int r = 0;
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct fb_var_screeninfo *var = &fbi->var;
++ struct fb_fix_screeninfo *fix = &fbi->fix;
++ enum omap_color_mode mode = 0;
++ int offset;
++ u32 data_start_p;
++ void __iomem *data_start_v;
++ struct omap_overlay_info info;
++ int xres, yres;
++ int screen_width;
++ int rot, mirror;
++
++ DBG("setup_overlay %d, posx %d, posy %d, outw %d, outh %d\n", ofbi->id,
++ posx, posy, outw, outh);
++
++ if (ofbi->rotation == FB_ROTATE_CW || ofbi->rotation == FB_ROTATE_CCW) {
++ xres = var->yres;
++ yres = var->xres;
++ } else {
++ xres = var->xres;
++ yres = var->yres;
++ }
++
++ offset = ((var->yoffset * var->xres_virtual +
++ var->xoffset) * var->bits_per_pixel) >> 3;
++
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
++ data_start_p = omapfb_get_region_rot_paddr(ofbi);
++ data_start_v = NULL;
++ } else {
++ data_start_p = omapfb_get_region_paddr(ofbi);
++ data_start_v = omapfb_get_region_vaddr(ofbi);
++ }
++
++ data_start_p += offset;
++ data_start_v += offset;
++
++ mode = fb_mode_to_dss_mode(var);
++
++ if (mode == -EINVAL) {
++ DBG("fb_mode_to_dss_mode failed");
++ r = -EINVAL;
++ goto err;
++ }
++
++ screen_width = fix->line_length / (var->bits_per_pixel >> 3);
++
++ ovl->get_overlay_info(ovl, &info);
++
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
++ rot = 0;
++ mirror = 0;
++ } else {
++ rot = ofbi->rotation;
++ mirror = ofbi->mirror;
++ }
++
++ info.paddr = data_start_p;
++ info.vaddr = data_start_v;
++ info.screen_width = screen_width;
++ info.width = xres;
++ info.height = yres;
++ info.color_mode = mode;
++ info.rotation = rot;
++ info.mirror = mirror;
++
++ info.pos_x = posx;
++ info.pos_y = posy;
++ info.out_width = outw;
++ info.out_height = outh;
++
++ r = ovl->set_overlay_info(ovl, &info);
++ if (r) {
++ DBG("ovl->setup_overlay_info failed\n");
++ goto err;
++ }
++
++ return 0;
++
++err:
++ DBG("setup_overlay failed\n");
++ return r;
++}
++
++/* apply var to the overlay */
++int omapfb_apply_changes(struct fb_info *fbi, int init)
++{
++ int r = 0;
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct fb_var_screeninfo *var = &fbi->var;
++ struct omap_overlay *ovl;
++ u16 posx, posy;
++ u16 outw, outh;
++ int i;
++
++#ifdef DEBUG
++ if (omapfb_test_pattern)
++ fill_fb(fbi);
++#endif
++
++ for (i = 0; i < ofbi->num_overlays; i++) {
++ ovl = ofbi->overlays[i];
++
++ DBG("apply_changes, fb %d, ovl %d\n", ofbi->id, ovl->id);
++
++ if (ofbi->region.size == 0) {
++ /* the fb is not available. disable the overlay */
++ omapfb_overlay_enable(ovl, 0);
++ if (!init && ovl->manager)
++ ovl->manager->apply(ovl->manager);
++ continue;
++ }
++
++ if (init || (ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0) {
++ if (ofbi->rotation == FB_ROTATE_CW ||
++ ofbi->rotation == FB_ROTATE_CCW) {
++ outw = var->yres;
++ outh = var->xres;
++ } else {
++ outw = var->xres;
++ outh = var->yres;
++ }
++ } else {
++ outw = ovl->info.out_width;
++ outh = ovl->info.out_height;
++ }
++
++ if (init) {
++ posx = 0;
++ posy = 0;
++ } else {
++ posx = ovl->info.pos_x;
++ posy = ovl->info.pos_y;
++ }
++
++ r = omapfb_setup_overlay(fbi, ovl, posx, posy, outw, outh);
++ if (r)
++ goto err;
++
++ if (!init && ovl->manager)
++ ovl->manager->apply(ovl->manager);
++ }
++ return 0;
++err:
++ DBG("apply_changes failed\n");
++ return r;
++}
++
++/* checks var and eventually tweaks it to something supported,
++ * DO NOT MODIFY PAR */
++static int omapfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fbi)
++{
++ int r;
++
++ DBG("check_var(%d)\n", FB2OFB(fbi)->id);
++
++ r = check_fb_var(fbi, var);
++
++ return r;
++}
++
++/* set the video mode according to info->var */
++static int omapfb_set_par(struct fb_info *fbi)
++{
++ int r;
++
++ DBG("set_par(%d)\n", FB2OFB(fbi)->id);
++
++ set_fb_fix(fbi);
++ r = omapfb_apply_changes(fbi, 0);
++
++ return r;
++}
++
++static int omapfb_pan_display(struct fb_var_screeninfo *var,
++ struct fb_info *fbi)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ int r = 0;
++
++ DBG("pan_display(%d)\n", ofbi->id);
++
++ omapfb_lock(fbdev);
++
++ if (var->xoffset != fbi->var.xoffset ||
++ var->yoffset != fbi->var.yoffset) {
++ struct fb_var_screeninfo new_var;
++
++ new_var = fbi->var;
++ new_var.xoffset = var->xoffset;
++ new_var.yoffset = var->yoffset;
++
++ r = check_fb_var(fbi, &new_var);
++
++ if (r == 0) {
++ fbi->var = new_var;
++ set_fb_fix(fbi);
++ r = omapfb_apply_changes(fbi, 0);
++ }
++ }
++
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++static void mmap_user_open(struct vm_area_struct *vma)
++{
++ struct omapfb_info *ofbi = (struct omapfb_info *)vma->vm_private_data;
++
++ atomic_inc(&ofbi->map_count);
++}
++
++static void mmap_user_close(struct vm_area_struct *vma)
++{
++ struct omapfb_info *ofbi = (struct omapfb_info *)vma->vm_private_data;
++
++ atomic_dec(&ofbi->map_count);
++}
++
++static struct vm_operations_struct mmap_user_ops = {
++ .open = mmap_user_open,
++ .close = mmap_user_close,
++};
++
++static int omapfb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct fb_fix_screeninfo *fix = &fbi->fix;
++ unsigned long off;
++ unsigned long start;
++ u32 len;
++
++ if (vma->vm_end - vma->vm_start == 0)
++ return 0;
++ if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
++ return -EINVAL;
++ off = vma->vm_pgoff << PAGE_SHIFT;
++
++ start = omapfb_get_region_paddr(ofbi);
++ len = fix->smem_len;
++ if (off >= len)
++ return -EINVAL;
++ if ((vma->vm_end - vma->vm_start + off) > len)
++ return -EINVAL;
++
++ off += start;
++
++ DBG("user mmap region start %lx, len %d, off %lx\n", start, len, off);
++
++ vma->vm_pgoff = off >> PAGE_SHIFT;
++ vma->vm_flags |= VM_IO | VM_RESERVED;
++ vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
++ vma->vm_ops = &mmap_user_ops;
++ vma->vm_private_data = ofbi;
++ if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
++ vma->vm_end - vma->vm_start, vma->vm_page_prot))
++ return -EAGAIN;
++ /* vm_ops.open won't be called for mmap itself. */
++ atomic_inc(&ofbi->map_count);
++ return 0;
++}
++
++/* Store a single color palette entry into a pseudo palette or the hardware
++ * palette if one is available. For now we support only 16bpp and thus store
++ * the entry only to the pseudo palette.
++ */
++static int _setcolreg(struct fb_info *fbi, u_int regno, u_int red, u_int green,
++ u_int blue, u_int transp, int update_hw_pal)
++{
++ /*struct omapfb_info *ofbi = FB2OFB(fbi);*/
++ /*struct omapfb2_device *fbdev = ofbi->fbdev;*/
++ struct fb_var_screeninfo *var = &fbi->var;
++ int r = 0;
++
++ enum omapfb_color_format mode = OMAPFB_COLOR_RGB24U; /* XXX */
++
++ /*switch (plane->color_mode) {*/
++ switch (mode) {
++ case OMAPFB_COLOR_YUV422:
++ case OMAPFB_COLOR_YUV420:
++ case OMAPFB_COLOR_YUY422:
++ r = -EINVAL;
++ break;
++ case OMAPFB_COLOR_CLUT_8BPP:
++ case OMAPFB_COLOR_CLUT_4BPP:
++ case OMAPFB_COLOR_CLUT_2BPP:
++ case OMAPFB_COLOR_CLUT_1BPP:
++ /*
++ if (fbdev->ctrl->setcolreg)
++ r = fbdev->ctrl->setcolreg(regno, red, green, blue,
++ transp, update_hw_pal);
++ */
++ /* Fallthrough */
++ r = -EINVAL;
++ break;
++ case OMAPFB_COLOR_RGB565:
++ case OMAPFB_COLOR_RGB444:
++ case OMAPFB_COLOR_RGB24P:
++ case OMAPFB_COLOR_RGB24U:
++ if (r != 0)
++ break;
++
++ if (regno < 0) {
++ r = -EINVAL;
++ break;
++ }
++
++ if (regno < 16) {
++ u16 pal;
++ pal = ((red >> (16 - var->red.length)) <<
++ var->red.offset) |
++ ((green >> (16 - var->green.length)) <<
++ var->green.offset) |
++ (blue >> (16 - var->blue.length));
++ ((u32 *)(fbi->pseudo_palette))[regno] = pal;
++ }
++ break;
++ default:
++ BUG();
++ }
++ return r;
++}
++
++static int omapfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
++ u_int transp, struct fb_info *info)
++{
++ DBG("setcolreg\n");
++
++ return _setcolreg(info, regno, red, green, blue, transp, 1);
++}
++
++static int omapfb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
++{
++ int count, index, r;
++ u16 *red, *green, *blue, *transp;
++ u16 trans = 0xffff;
++
++ DBG("setcmap\n");
++
++ red = cmap->red;
++ green = cmap->green;
++ blue = cmap->blue;
++ transp = cmap->transp;
++ index = cmap->start;
++
++ for (count = 0; count < cmap->len; count++) {
++ if (transp)
++ trans = *transp++;
++ r = _setcolreg(info, index++, *red++, *green++, *blue++, trans,
++ count == cmap->len - 1);
++ if (r != 0)
++ return r;
++ }
++
++ return 0;
++}
++
++static int omapfb_blank(int blank, struct fb_info *fbi)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_display *display = fb2display(fbi);
++ int do_update = 0;
++ int r = 0;
++
++ omapfb_lock(fbdev);
++
++ switch (blank) {
++ case FB_BLANK_UNBLANK:
++ if (display->state != OMAP_DSS_DISPLAY_SUSPENDED)
++ goto exit;
++
++ if (display->resume)
++ r = display->resume(display);
++
++ if (r == 0 && display->get_update_mode &&
++ display->get_update_mode(display) ==
++ OMAP_DSS_UPDATE_MANUAL)
++ do_update = 1;
++
++ break;
++
++ case FB_BLANK_NORMAL:
++ /* FB_BLANK_NORMAL could be implemented.
++ * Needs DSS additions. */
++ case FB_BLANK_VSYNC_SUSPEND:
++ case FB_BLANK_HSYNC_SUSPEND:
++ case FB_BLANK_POWERDOWN:
++ if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
++ goto exit;
++
++ if (display->suspend)
++ r = display->suspend(display);
++
++ break;
++
++ default:
++ r = -EINVAL;
++ }
++
++exit:
++ omapfb_unlock(fbdev);
++
++ if (r == 0 && do_update && display->update) {
++ u16 w, h;
++ display->get_resolution(display, &w, &h);
++
++ r = display->update(display, 0, 0, w, h);
++ }
++
++ return r;
++}
++
++#if 0
++/* XXX fb_read and fb_write are needed for VRFB */
++ssize_t omapfb_write(struct fb_info *info, const char __user *buf,
++ size_t count, loff_t *ppos)
++{
++ DBG("omapfb_write %d, %lu\n", count, (unsigned long)*ppos);
++ // XXX needed for VRFB
++ return count;
++}
++#endif
++
++static struct fb_ops omapfb_ops = {
++ .owner = THIS_MODULE,
++ .fb_open = omapfb_open,
++ .fb_release = omapfb_release,
++ .fb_fillrect = cfb_fillrect,
++ .fb_copyarea = cfb_copyarea,
++ .fb_imageblit = cfb_imageblit,
++ .fb_blank = omapfb_blank,
++ .fb_ioctl = omapfb_ioctl,
++ .fb_check_var = omapfb_check_var,
++ .fb_set_par = omapfb_set_par,
++ .fb_pan_display = omapfb_pan_display,
++ .fb_mmap = omapfb_mmap,
++ .fb_setcolreg = omapfb_setcolreg,
++ .fb_setcmap = omapfb_setcmap,
++ //.fb_write = omapfb_write,
++};
++
++static void omapfb_free_fbmem(struct fb_info *fbi)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omapfb2_mem_region *rg;
++
++ rg = &ofbi->region;
++
++ if (rg->paddr)
++ if (omap_vram_free(rg->paddr, rg->size))
++ dev_err(fbdev->dev, "VRAM FREE failed\n");
++
++ if (rg->vaddr)
++ iounmap(rg->vaddr);
++
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
++ /* unmap the 0 angle rotation */
++ if (rg->vrfb.vaddr[0]) {
++ iounmap(rg->vrfb.vaddr[0]);
++ omap_vrfb_release_ctx(&rg->vrfb);
++ }
++ }
++
++ rg->vaddr = NULL;
++ rg->paddr = 0;
++ rg->alloc = 0;
++ rg->size = 0;
++}
++
++static int omapfb_free_all_fbmem(struct omapfb2_device *fbdev)
++{
++ int i;
++
++ DBG("free all fbmem\n");
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ struct fb_info *fbi = fbdev->fbs[i];
++ omapfb_free_fbmem(fbi);
++ memset(&fbi->fix, 0, sizeof(fbi->fix));
++ memset(&fbi->var, 0, sizeof(fbi->var));
++ }
++
++ return 0;
++}
++
++static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
++ unsigned long paddr)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omapfb2_mem_region *rg;
++ void __iomem *vaddr;
++ int r;
++ int clear = 0;
++
++ rg = &ofbi->region;
++ memset(rg, 0, sizeof(*rg));
++
++ size = PAGE_ALIGN(size);
++
++ if (!paddr) {
++ DBG("allocating %lu bytes for fb %d\n", size, ofbi->id);
++ r = omap_vram_alloc(OMAPFB_MEMTYPE_SDRAM, size, &paddr);
++ clear = 1;
++ } else {
++ DBG("reserving %lu bytes at %lx for fb %d\n", size, paddr,
++ ofbi->id);
++ r = omap_vram_reserve(paddr, size);
++ }
++
++ if (r) {
++ dev_err(fbdev->dev, "failed to allocate framebuffer\n");
++ return -ENOMEM;
++ }
++
++ if (ofbi->rotation_type != OMAPFB_ROT_VRFB) {
++ vaddr = ioremap_wc(paddr, size);
++
++ if (!vaddr) {
++ dev_err(fbdev->dev, "failed to ioremap framebuffer\n");
++ omap_vram_free(paddr, size);
++ return -ENOMEM;
++ }
++
++ DBG("allocated VRAM paddr %lx, vaddr %p\n", paddr, vaddr);
++
++ if (clear)
++ memset_io(vaddr, 0, size);
++ } else {
++ void __iomem *va;
++
++ r = omap_vrfb_request_ctx(&rg->vrfb);
++ if (r) {
++ dev_err(fbdev->dev, "vrfb create ctx failed\n");
++ return r;
++ }
++
++ /* only ioremap the 0 angle view */
++ va = ioremap_wc(rg->vrfb.paddr[0], size);
++
++ if(!va) {
++ printk(KERN_ERR "vrfb: ioremap failed\n");
++ return -ENOMEM;
++ }
++
++ DBG("ioremapped vrfb area 0 to %p\n", va);
++
++ rg->vrfb.vaddr[0] = va;
++
++ vaddr = NULL;
++
++ if (clear)
++ memset_io(va, 0, size);
++ }
++
++ rg->paddr = paddr;
++ rg->vaddr = vaddr;
++ rg->size = size;
++ rg->alloc = 1;
++
++ return 0;
++}
++
++/* allocate fbmem using display resolution as reference */
++static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
++ unsigned long paddr)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omap_display *display;
++ int bytespp;
++
++ display = fb2display(fbi);
++
++ if (!display)
++ return 0;
++
++ switch (display->get_recommended_bpp(display)) {
++ case 16:
++ bytespp = 2;
++ break;
++ case 24:
++ bytespp = 4;
++ break;
++ default:
++ bytespp = 4;
++ break;
++ }
++
++ if (!size) {
++ u16 w, h;
++
++ display->get_resolution(display, &w, &h);
++
++ if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
++ int oldw = w, oldh = h;
++
++ omap_vrfb_adjust_size(&w, &h, bytespp);
++
++ /* Because we change the resolution of the 0 degree view,
++ * we need to alloc max(w, h) for height */
++ h = max(w, h);
++ w = OMAP_VRFB_LINE_LEN;
++
++ DBG("adjusting fb mem size for VRFB, %dx%d -> %dx%d\n",
++ oldw, oldh, w, h);
++ }
++
++ size = w * h * bytespp;
++ }
++
++ return omapfb_alloc_fbmem(fbi, size, paddr);
++}
++
++static int omapfb_parse_vram_param(const char *param, int max_entries,
++ unsigned long *sizes, unsigned long *paddrs)
++{
++ int fbnum;
++ unsigned long size;
++ unsigned long paddr = 0;
++ char *p, *start;
++
++ start = (char *)param;
++
++ while (1) {
++ p = start;
++
++ fbnum = simple_strtoul(p, &p, 10);
++
++ if (p == param)
++ return -EINVAL;
++
++ if (*p != ':')
++ return -EINVAL;
++
++ if (fbnum >= max_entries)
++ return -EINVAL;
++
++ size = memparse(p + 1, &p);
++
++ if (!size)
++ return -EINVAL;
++
++ paddr = 0;
++
++ if (*p == '@') {
++ paddr = simple_strtoul(p + 1, &p, 16);
++
++ if (!paddr)
++ return -EINVAL;
++
++ }
++
++ paddrs[fbnum] = paddr;
++ sizes[fbnum] = size;
++
++ if (*p == 0)
++ break;
++
++ if (*p != ',')
++ return -EINVAL;
++
++ ++p;
++
++ start = p;
++ }
++
++ return 0;
++}
++
++static int omapfb_allocate_all_fbs(struct omapfb2_device *fbdev)
++{
++ int i, r;
++ unsigned long vram_sizes[10];
++ unsigned long vram_paddrs[10];
++
++ memset(&vram_sizes, 0, sizeof(vram_sizes));
++ memset(&vram_paddrs, 0, sizeof(vram_paddrs));
++
++ if (def_vram && omapfb_parse_vram_param(def_vram, 10,
++ vram_sizes, vram_paddrs)) {
++ dev_err(fbdev->dev, "failed to parse vram parameter\n");
++
++ memset(&vram_sizes, 0, sizeof(vram_sizes));
++ memset(&vram_paddrs, 0, sizeof(vram_paddrs));
++ }
++
++ if (fbdev->dev->platform_data) {
++ struct omapfb_platform_data *opd;
++ opd = fbdev->dev->platform_data;
++ for (i = 0; i < opd->mem_desc.region_cnt; ++i) {
++ if (!vram_sizes[i]) {
++ unsigned long size;
++ unsigned long paddr;
++
++ size = opd->mem_desc.region[i].size;
++ paddr = opd->mem_desc.region[i].paddr;
++
++ vram_sizes[i] = size;
++ vram_paddrs[i] = paddr;
++ }
++ }
++ }
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ /* allocate memory automatically only for fb0, or if
++ * excplicitly defined with vram or plat data option */
++ if (i == 0 || vram_sizes[i] != 0) {
++ r = omapfb_alloc_fbmem_display(fbdev->fbs[i],
++ vram_sizes[i], vram_paddrs[i]);
++
++ if (r)
++ return r;
++ }
++ }
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
++ struct omapfb2_mem_region *rg;
++ rg = &ofbi->region;
++
++ DBG("region%d phys %08x virt %p size=%lu\n",
++ i,
++ rg->paddr,
++ rg->vaddr,
++ rg->size);
++ }
++
++ return 0;
++}
++
++int omapfb_realloc_fbmem(struct fb_info *fbi, unsigned long size, int type)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_display *display = fb2display(fbi);
++ struct omapfb2_mem_region *rg = &ofbi->region;
++ unsigned long old_size = rg->size;
++ unsigned long old_paddr = rg->paddr;
++ int old_type = rg->type;
++ int r;
++
++ if (type > OMAPFB_MEMTYPE_MAX)
++ return -EINVAL;
++
++ size = PAGE_ALIGN(size);
++
++ if (old_size == size && old_type == type)
++ return 0;
++
++ if (display && display->sync)
++ display->sync(display);
++
++ omapfb_free_fbmem(fbi);
++
++ if (size == 0) {
++ memset(&fbi->fix, 0, sizeof(fbi->fix));
++ memset(&fbi->var, 0, sizeof(fbi->var));
++ return 0;
++ }
++
++ r = omapfb_alloc_fbmem(fbi, size, 0);
++
++ if (r) {
++ if (old_size)
++ omapfb_alloc_fbmem(fbi, old_size, old_paddr);
++
++ if (rg->size == 0) {
++ memset(&fbi->fix, 0, sizeof(fbi->fix));
++ memset(&fbi->var, 0, sizeof(fbi->var));
++ }
++
++ return r;
++ }
++
++ if (old_size == size)
++ return 0;
++
++ if (old_size == 0) {
++ DBG("initializing fb %d\n", ofbi->id);
++ r = omapfb_fb_init(fbdev, fbi);
++ if (r) {
++ DBG("omapfb_fb_init failed\n");
++ goto err;
++ }
++ r = omapfb_apply_changes(fbi, 1);
++ if (r) {
++ DBG("omapfb_apply_changes failed\n");
++ goto err;
++ }
++ } else {
++ struct fb_var_screeninfo new_var;
++ memcpy(&new_var, &fbi->var, sizeof(new_var));
++ r = check_fb_var(fbi, &new_var);
++ if (r)
++ goto err;
++ memcpy(&fbi->var, &new_var, sizeof(fbi->var));
++ set_fb_fix(fbi);
++ }
++
++ return 0;
++err:
++ omapfb_free_fbmem(fbi);
++ memset(&fbi->fix, 0, sizeof(fbi->fix));
++ memset(&fbi->var, 0, sizeof(fbi->var));
++ return r;
++}
++
++/* initialize fb_info, var, fix to something sane based on the display */
++int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
++{
++ struct fb_var_screeninfo *var = &fbi->var;
++ struct fb_fix_screeninfo *fix = &fbi->fix;
++ struct omap_display *display = fb2display(fbi);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ int r = 0;
++
++ fbi->fbops = &omapfb_ops;
++ fbi->flags = FBINFO_FLAG_DEFAULT;
++ fbi->pseudo_palette = fbdev->pseudo_palette;
++
++ strncpy(fix->id, MODULE_NAME, sizeof(fix->id));
++
++ if (ofbi->region.size == 0) {
++ memset(&fbi->fix, 0, sizeof(fbi->fix));
++ memset(&fbi->var, 0, sizeof(fbi->var));
++ return 0;
++ }
++
++ var->nonstd = 0;
++
++ var->rotate = ofbi->rotation;
++
++ if (display) {
++ u16 w, h;
++ display->get_resolution(display, &w, &h);
++
++ if (ofbi->rotation == FB_ROTATE_CW ||
++ ofbi->rotation == FB_ROTATE_CCW) {
++ var->xres = h;
++ var->yres = w;
++ } else {
++ var->xres = w;
++ var->yres = h;
++ }
++
++ var->xres_virtual = var->xres;
++ var->yres_virtual = var->yres;
++
++ switch (display->get_recommended_bpp(display)) {
++ case 16:
++ var->bits_per_pixel = 16;
++ break;
++ case 24:
++ var->bits_per_pixel = 32;
++ break;
++ default:
++ dev_err(fbdev->dev, "illegal display bpp\n");
++ return -EINVAL;
++ }
++ } else {
++ /* if there's no display, let's just guess some basic values */
++ var->xres = 320;
++ var->yres = 240;
++ var->xres_virtual = var->xres;
++ var->yres_virtual = var->yres;
++ var->bits_per_pixel = 16;
++ }
++
++ r = check_fb_var(fbi, var);
++ if (r)
++ goto err;
++
++ set_fb_fix(fbi);
++err:
++ return r;
++}
++
++static void fbinfo_cleanup(struct omapfb2_device *fbdev, struct fb_info *fbi)
++{
++ fb_dealloc_cmap(&fbi->cmap);
++}
++
++
++static void omapfb_free_resources(struct omapfb2_device *fbdev)
++{
++ int i;
++
++ DBG("free_resources\n");
++
++ if (fbdev == NULL)
++ return;
++
++ for (i = 0; i < fbdev->num_fbs; i++)
++ unregister_framebuffer(fbdev->fbs[i]);
++
++ /* free the reserved fbmem */
++ omapfb_free_all_fbmem(fbdev);
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ fbinfo_cleanup(fbdev, fbdev->fbs[i]);
++ framebuffer_release(fbdev->fbs[i]);
++ }
++
++ for (i = 0; i < fbdev->num_displays; i++) {
++ if (fbdev->displays[i]->state != OMAP_DSS_DISPLAY_DISABLED)
++ fbdev->displays[i]->disable(fbdev->displays[i]);
++
++ omap_dss_put_display(fbdev->displays[i]);
++ }
++
++ dev_set_drvdata(fbdev->dev, NULL);
++ kfree(fbdev);
++}
++
++static int omapfb_create_framebuffers(struct omapfb2_device *fbdev)
++{
++ int r, i;
++
++ fbdev->num_fbs = 0;
++
++ DBG("create %d framebuffers\n", CONFIG_FB_OMAP2_NUM_FBS);
++
++ /* allocate fb_infos */
++ for (i = 0; i < CONFIG_FB_OMAP2_NUM_FBS; i++) {
++ struct fb_info *fbi;
++ struct omapfb_info *ofbi;
++
++ fbi = framebuffer_alloc(sizeof(struct omapfb_info),
++ fbdev->dev);
++
++ if (fbi == NULL) {
++ dev_err(fbdev->dev,
++ "unable to allocate memory for plane info\n");
++ return -ENOMEM;
++ }
++
++ fbdev->fbs[i] = fbi;
++
++ ofbi = FB2OFB(fbi);
++ ofbi->fbdev = fbdev;
++ ofbi->id = i;
++
++ /* assign these early, so that fb alloc can use them */
++ ofbi->rotation_type = def_vrfb ? OMAPFB_ROT_VRFB :
++ OMAPFB_ROT_DMA;
++ ofbi->rotation = def_rotate;
++ ofbi->mirror = def_mirror;
++
++ fbdev->num_fbs++;
++ }
++
++ DBG("fb_infos allocated\n");
++
++ /* assign overlays for the fbs */
++ for (i = 0; i < min(fbdev->num_fbs, fbdev->num_overlays); i++) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
++
++ ofbi->overlays[0] = fbdev->overlays[i];
++ ofbi->num_overlays = 1;
++ }
++
++ /* allocate fb memories */
++ r = omapfb_allocate_all_fbs(fbdev);
++ if (r) {
++ dev_err(fbdev->dev, "failed to allocate fbmem\n");
++ return r;
++ }
++
++ DBG("fbmems allocated\n");
++
++ /* setup fb_infos */
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ r = omapfb_fb_init(fbdev, fbdev->fbs[i]);
++ if (r) {
++ dev_err(fbdev->dev, "failed to setup fb_info\n");
++ return r;
++ }
++ }
++
++ DBG("fb_infos initialized\n");
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ r = register_framebuffer(fbdev->fbs[i]);
++ if (r != 0) {
++ dev_err(fbdev->dev,
++ "registering framebuffer %d failed\n", i);
++ return r;
++ }
++ }
++
++ DBG("framebuffers registered\n");
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ r = omapfb_apply_changes(fbdev->fbs[i], 1);
++ if (r) {
++ dev_err(fbdev->dev, "failed to change mode\n");
++ return r;
++ }
++ }
++
++ DBG("create sysfs for fbs\n");
++ r = omapfb_create_sysfs(fbdev);
++ if (r) {
++ dev_err(fbdev->dev, "failed to create sysfs entries\n");
++ return r;
++ }
++
++ /* Enable fb0 */
++ if (fbdev->num_fbs > 0) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[0]);
++
++ if (ofbi->num_overlays > 0 ) {
++ struct omap_overlay *ovl = ofbi->overlays[0];
++
++ r = omapfb_overlay_enable(ovl, 1);
++
++ if (r) {
++ dev_err(fbdev->dev,
++ "failed to enable overlay\n");
++ return r;
++ }
++ }
++ }
++
++ DBG("create_framebuffers done\n");
++
++ return 0;
++}
++
++int omapfb_mode_to_timings(const char *mode_str,
++ struct omap_video_timings *timings, u8 *bpp)
++{
++ struct fb_info fbi;
++ struct fb_var_screeninfo var;
++ struct fb_ops fbops;
++ int r;
++
++#ifdef CONFIG_OMAP2_DSS_VENC
++ if (strcmp(mode_str, "pal") == 0) {
++ *timings = omap_dss_pal_timings;
++ *bpp = 0;
++ return 0;
++ } else if (strcmp(mode_str, "ntsc") == 0) {
++ *timings = omap_dss_ntsc_timings;
++ *bpp = 0;
++ return 0;
++ }
++#endif
++
++ /* this is quite a hack, but I wanted to use the modedb and for
++ * that we need fb_info and var, so we create dummy ones */
++
++ memset(&fbi, 0, sizeof(fbi));
++ memset(&var, 0, sizeof(var));
++ memset(&fbops, 0, sizeof(fbops));
++ fbi.fbops = &fbops;
++
++ r = fb_find_mode(&var, &fbi, mode_str, NULL, 0, NULL, 24);
++
++ if (r != 0) {
++ timings->pixel_clock = PICOS2KHZ(var.pixclock);
++ timings->hfp = var.left_margin;
++ timings->hbp = var.right_margin;
++ timings->vfp = var.upper_margin;
++ timings->vbp = var.lower_margin;
++ timings->hsw = var.hsync_len;
++ timings->vsw = var.vsync_len;
++ timings->x_res = var.xres;
++ timings->y_res = var.yres;
++
++ switch (var.bits_per_pixel) {
++ case 16:
++ *bpp = 16;
++ break;
++ case 24:
++ case 32:
++ default:
++ *bpp = 24;
++ break;
++ }
++
++ return 0;
++ } else {
++ return -EINVAL;
++ }
++}
++
++static int omapfb_set_def_mode(struct omap_display *display, char *mode_str)
++{
++ int r;
++ u8 bpp;
++ struct omap_video_timings timings;
++
++ r = omapfb_mode_to_timings(mode_str, &timings, &bpp);
++ if (r)
++ return r;
++
++ display->panel->recommended_bpp = bpp;
++
++ if (!display->check_timings || !display->set_timings)
++ return -EINVAL;
++
++ r = display->check_timings(display, &timings);
++ if (r)
++ return r;
++
++ display->set_timings(display, &timings);
++
++ return 0;
++}
++
++static int omapfb_parse_def_modes(struct omapfb2_device *fbdev)
++{
++ char *str, *options, *this_opt;
++ int r = 0;
++
++ str = kmalloc(strlen(def_mode) + 1, GFP_KERNEL);
++ strcpy(str, def_mode);
++ options = str;
++
++ while (!r && (this_opt = strsep(&options, ",")) != NULL) {
++ char *p, *display_str, *mode_str;
++ struct omap_display *display;
++ int i;
++
++ p = strchr(this_opt, ':');
++ if (!p) {
++ r = -EINVAL;
++ break;
++ }
++
++ *p = 0;
++ display_str = this_opt;
++ mode_str = p + 1;
++
++ display = NULL;
++ for (i = 0; i < fbdev->num_displays; ++i) {
++ if (strcmp(fbdev->displays[i]->name,
++ display_str) == 0) {
++ display = fbdev->displays[i];
++ break;
++ }
++ }
++
++ if (!display) {
++ r = -EINVAL;
++ break;
++ }
++
++ r = omapfb_set_def_mode(display, mode_str);
++ if (r)
++ break;
++ }
++
++ kfree(str);
++
++ return r;
++}
++
++static int omapfb_probe(struct platform_device *pdev)
++{
++ struct omapfb2_device *fbdev = NULL;
++ int r = 0;
++ int i, t;
++ struct omap_overlay *ovl;
++ struct omap_display *def_display;
++
++ DBG("omapfb_probe\n");
++
++ if (pdev->num_resources != 0) {
++ dev_err(&pdev->dev, "probed for an unknown device\n");
++ r = -ENODEV;
++ goto err0;
++ }
++
++ fbdev = kzalloc(sizeof(struct omapfb2_device), GFP_KERNEL);
++ if (fbdev == NULL) {
++ r = -ENOMEM;
++ goto err0;
++ }
++
++ mutex_init(&fbdev->mtx);
++
++ fbdev->dev = &pdev->dev;
++ platform_set_drvdata(pdev, fbdev);
++
++ fbdev->num_displays = 0;
++ t = omap_dss_get_num_displays();
++ for (i = 0; i < t; i++) {
++ struct omap_display *display;
++ display = omap_dss_get_display(i);
++ if (!display) {
++ dev_err(&pdev->dev, "can't get display %d\n", i);
++ r = -EINVAL;
++ goto cleanup;
++ }
++
++ fbdev->displays[fbdev->num_displays++] = display;
++ }
++
++ if (fbdev->num_displays == 0) {
++ dev_err(&pdev->dev, "no displays\n");
++ r = -EINVAL;
++ goto cleanup;
++ }
++
++ fbdev->num_overlays = omap_dss_get_num_overlays();
++ for (i = 0; i < fbdev->num_overlays; i++)
++ fbdev->overlays[i] = omap_dss_get_overlay(i);
++
++ fbdev->num_managers = omap_dss_get_num_overlay_managers();
++ for (i = 0; i < fbdev->num_managers; i++)
++ fbdev->managers[i] = omap_dss_get_overlay_manager(i);
++
++
++ /* gfx overlay should be the default one. find a display
++ * connected to that, and use it as default display */
++ ovl = omap_dss_get_overlay(0);
++ if (ovl->manager && ovl->manager->display) {
++ def_display = ovl->manager->display;
++ } else {
++ dev_err(&pdev->dev, "cannot find default display\n");
++ r = -EINVAL;
++ goto cleanup;
++ }
++
++ if (def_mode && strlen(def_mode) > 0) {
++ if (omapfb_parse_def_modes(fbdev))
++ dev_err(&pdev->dev, "cannot parse default modes\n");
++ }
++
++ r = omapfb_create_framebuffers(fbdev);
++ if (r)
++ goto cleanup;
++
++ for (i = 0; i < fbdev->num_managers; i++) {
++ struct omap_overlay_manager *mgr;
++ mgr = fbdev->managers[i];
++ r = mgr->apply(mgr);
++ if (r) {
++ dev_err(fbdev->dev, "failed to apply dispc config\n");
++ goto cleanup;
++ }
++ }
++
++ DBG("mgr->apply'ed\n");
++
++ r = def_display->enable(def_display);
++ if (r) {
++ dev_err(fbdev->dev, "Failed to enable display '%s'\n",
++ def_display->name);
++ goto cleanup;
++ }
++
++ /* set the update mode */
++ if (def_display->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) {
++#ifdef CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE
++ if (def_display->set_update_mode)
++ def_display->set_update_mode(def_display,
++ OMAP_DSS_UPDATE_AUTO);
++ if (def_display->enable_te)
++ def_display->enable_te(def_display, 1);
++#else
++ if (def_display->set_update_mode)
++ def_display->set_update_mode(def_display,
++ OMAP_DSS_UPDATE_MANUAL);
++ if (def_display->enable_te)
++ def_display->enable_te(def_display, 0);
++#endif
++ } else {
++ if (def_display->set_update_mode)
++ def_display->set_update_mode(def_display,
++ OMAP_DSS_UPDATE_AUTO);
++ }
++
++ for (i = 0; i < fbdev->num_displays; i++) {
++ struct omap_display *display = fbdev->displays[i];
++ u16 w, h;
++
++ if (!display->get_update_mode || !display->update)
++ continue;
++
++ if (display->get_update_mode(display) ==
++ OMAP_DSS_UPDATE_MANUAL) {
++
++ display->get_resolution(display, &w, &h);
++ display->update(display, 0, 0, w, h);
++ }
++ }
++
++ DBG("display->updated\n");
++
++ return 0;
++
++cleanup:
++ omapfb_free_resources(fbdev);
++err0:
++ dev_err(&pdev->dev, "failed to setup omapfb\n");
++ return r;
++}
++
++static int omapfb_remove(struct platform_device *pdev)
++{
++ struct omapfb2_device *fbdev = platform_get_drvdata(pdev);
++
++ /* FIXME: wait till completion of pending events */
++
++ omapfb_remove_sysfs(fbdev);
++
++ omapfb_free_resources(fbdev);
++
++ return 0;
++}
++
++static struct platform_driver omapfb_driver = {
++ .probe = omapfb_probe,
++ .remove = omapfb_remove,
++ .driver = {
++ .name = "omapfb",
++ .owner = THIS_MODULE,
++ },
++};
++
++static int __init omapfb_init(void)
++{
++ DBG("omapfb_init\n");
++
++ if (platform_driver_register(&omapfb_driver)) {
++ printk(KERN_ERR "failed to register omapfb driver\n");
++ return -ENODEV;
++ }
++
++ return 0;
++}
++
++static void __exit omapfb_exit(void)
++{
++ DBG("omapfb_exit\n");
++ platform_driver_unregister(&omapfb_driver);
++}
++
++module_param_named(mode, def_mode, charp, 0);
++module_param_named(vram, def_vram, charp, 0);
++module_param_named(rotate, def_rotate, int, 0);
++module_param_named(vrfb, def_vrfb, bool, 0);
++module_param_named(mirror, def_mirror, bool, 0);
++
++/* late_initcall to let panel/ctrl drivers loaded first.
++ * I guess better option would be a more dynamic approach,
++ * so that omapfb reacts to new panels when they are loaded */
++late_initcall(omapfb_init);
++/*module_init(omapfb_init);*/
++module_exit(omapfb_exit);
++
++MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
++MODULE_DESCRIPTION("OMAP2/3 Framebuffer");
++MODULE_LICENSE("GPL v2");
+diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+new file mode 100644
+index 0000000..2c88718
+--- /dev/null
++++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+@@ -0,0 +1,371 @@
++/*
++ * linux/drivers/video/omap2/omapfb-sysfs.c
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <linux/fb.h>
++#include <linux/sysfs.h>
++#include <linux/device.h>
++#include <linux/uaccess.h>
++#include <linux/platform_device.h>
++#include <linux/kernel.h>
++#include <linux/mm.h>
++#include <linux/omapfb.h>
++
++#include <mach/display.h>
++#include <mach/vrfb.h>
++
++#include "omapfb.h"
++
++static ssize_t show_rotate_type(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++
++ return snprintf(buf, PAGE_SIZE, "%d\n", ofbi->rotation_type);
++}
++
++static ssize_t show_mirror(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++
++ return snprintf(buf, PAGE_SIZE, "%d\n", ofbi->mirror);
++}
++
++static ssize_t store_mirror(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ bool mirror;
++ int r;
++ struct fb_var_screeninfo new_var;
++
++ mirror = simple_strtoul(buf, NULL, 0);
++
++ if (mirror != 0 && mirror != 1)
++ return -EINVAL;
++
++ omapfb_lock(fbdev);
++
++ ofbi->mirror = mirror;
++
++ memcpy(&new_var, &fbi->var, sizeof(new_var));
++ r = check_fb_var(fbi, &new_var);
++ if (r)
++ goto out;
++ memcpy(&fbi->var, &new_var, sizeof(fbi->var));
++
++ set_fb_fix(fbi);
++
++ r = omapfb_apply_changes(fbi, 0);
++ if (r)
++ goto out;
++
++ r = count;
++out:
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++static ssize_t show_overlays(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ ssize_t l = 0;
++ int t;
++
++ for (t = 0; t < ofbi->num_overlays; t++) {
++ struct omap_overlay *ovl = ofbi->overlays[t];
++ int ovlnum;
++
++ for (ovlnum = 0; ovlnum < fbdev->num_overlays; ++ovlnum)
++ if (ovl == fbdev->overlays[ovlnum])
++ break;
++
++ l += snprintf(buf + l, PAGE_SIZE - l, "%s%d",
++ t == 0 ? "" : ",", ovlnum);
++ }
++
++ l += snprintf(buf + l, PAGE_SIZE - l, "\n");
++
++ return l;
++}
++
++static struct omapfb_info *get_overlay_fb(struct omapfb2_device *fbdev,
++ struct omap_overlay *ovl)
++{
++ int i, t;
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
++
++ for (t = 0; t < ofbi->num_overlays; t++) {
++ if (ofbi->overlays[t] == ovl)
++ return ofbi;
++ }
++ }
++
++ return NULL;
++}
++
++static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ struct omap_overlay *ovls[OMAPFB_MAX_OVL_PER_FB];
++ struct omap_overlay *ovl;
++ int num_ovls, r, i;
++ int len;
++
++ num_ovls = 0;
++
++ len = strlen(buf);
++ if (buf[len - 1] == '\n')
++ len = len - 1;
++
++ omapfb_lock(fbdev);
++
++ if (len > 0) {
++ char *p = (char *)buf;
++ int ovlnum;
++
++ while (p < buf + len) {
++ int found;
++ if (num_ovls == OMAPFB_MAX_OVL_PER_FB) {
++ r = -EINVAL;
++ goto out;
++ }
++
++ ovlnum = simple_strtoul(p, &p, 0);
++ if (ovlnum > fbdev->num_overlays) {
++ r = -EINVAL;
++ goto out;
++ }
++
++ found = 0;
++ for (i = 0; i < num_ovls; ++i) {
++ if (ovls[i] == fbdev->overlays[ovlnum]) {
++ found = 1;
++ break;
++ }
++ }
++
++ if (!found)
++ ovls[num_ovls++] = fbdev->overlays[ovlnum];
++
++ p++;
++ }
++ }
++
++ for (i = 0; i < num_ovls; ++i) {
++ struct omapfb_info *ofbi2 = get_overlay_fb(fbdev, ovls[i]);
++ if (ofbi2 && ofbi2 != ofbi) {
++ dev_err(fbdev->dev, "overlay already in use\n");
++ r = -EINVAL;
++ goto out;
++ }
++ }
++
++ /* detach unused overlays */
++ for (i = 0; i < ofbi->num_overlays; ++i) {
++ int t, found;
++
++ ovl = ofbi->overlays[i];
++
++ found = 0;
++
++ for (t = 0; t < num_ovls; ++t) {
++ if (ovl == ovls[t]) {
++ found = 1;
++ break;
++ }
++ }
++
++ if (found)
++ continue;
++
++ DBG("detaching %d\n", ofbi->overlays[i]->id);
++
++ omapfb_overlay_enable(ovl, 0);
++
++ if (ovl->manager)
++ ovl->manager->apply(ovl->manager);
++
++ for (t = i + 1; t < ofbi->num_overlays; t++)
++ ofbi->overlays[t-1] = ofbi->overlays[t];
++
++ ofbi->num_overlays--;
++ i--;
++ }
++
++ for (i = 0; i < num_ovls; ++i) {
++ int t, found;
++
++ ovl = ovls[i];
++
++ found = 0;
++
++ for (t = 0; t < ofbi->num_overlays; ++t) {
++ if (ovl == ofbi->overlays[t]) {
++ found = 1;
++ break;
++ }
++ }
++
++ if (found)
++ continue;
++
++ ofbi->overlays[ofbi->num_overlays++] = ovl;
++
++ r = omapfb_apply_changes(fbi, 1);
++ if (r)
++ goto out;
++
++ if (ovl->manager) {
++ r = ovl->manager->apply(ovl->manager);
++ if (r)
++ goto out;
++ }
++ }
++
++ r = count;
++out:
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++static ssize_t show_size(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++
++ return snprintf(buf, PAGE_SIZE, "%lu\n", ofbi->region.size);
++}
++
++static ssize_t store_size(struct device *dev, struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ unsigned long size;
++ int r;
++ int i;
++
++ size = PAGE_ALIGN(simple_strtoul(buf, NULL, 0));
++
++ omapfb_lock(fbdev);
++
++ for (i = 0; i < ofbi->num_overlays; i++) {
++ if (ofbi->overlays[i]->info.enabled) {
++ r = -EBUSY;
++ goto out;
++ }
++ }
++
++ if (size != ofbi->region.size) {
++ r = omapfb_realloc_fbmem(fbi, size, ofbi->region.type);
++ if (r) {
++ dev_err(dev, "realloc fbmem failed\n");
++ goto out;
++ }
++ }
++
++ r = count;
++out:
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++static ssize_t show_phys(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++
++ return snprintf(buf, PAGE_SIZE, "%0x\n", ofbi->region.paddr);
++}
++
++static ssize_t show_virt(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++
++ return snprintf(buf, PAGE_SIZE, "%p\n", ofbi->region.vaddr);
++}
++
++static struct device_attribute omapfb_attrs[] = {
++ __ATTR(rotate_type, S_IRUGO, show_rotate_type, NULL),
++ __ATTR(mirror, S_IRUGO | S_IWUSR, show_mirror, store_mirror),
++ __ATTR(size, S_IRUGO | S_IWUSR, show_size, store_size),
++ __ATTR(overlays, S_IRUGO | S_IWUSR, show_overlays, store_overlays),
++ __ATTR(phys_addr, S_IRUGO, show_phys, NULL),
++ __ATTR(virt_addr, S_IRUGO, show_virt, NULL),
++};
++
++int omapfb_create_sysfs(struct omapfb2_device *fbdev)
++{
++ int i;
++ int r;
++
++ DBG("create sysfs for fbs\n");
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ int t;
++ for (t = 0; t < ARRAY_SIZE(omapfb_attrs); t++) {
++ r = device_create_file(fbdev->fbs[i]->dev,
++ &omapfb_attrs[t]);
++
++ if (r) {
++ dev_err(fbdev->dev, "failed to create sysfs file\n");
++ return r;
++ }
++ }
++ }
++
++ return 0;
++}
++
++void omapfb_remove_sysfs(struct omapfb2_device *fbdev)
++{
++ int i, t;
++
++ DBG("remove sysfs for fbs\n");
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ for (t = 0; t < ARRAY_SIZE(omapfb_attrs); t++)
++ device_remove_file(fbdev->fbs[i]->dev,
++ &omapfb_attrs[t]);
++ }
++}
++
+diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h
+new file mode 100644
+index 0000000..65e9e6e
+--- /dev/null
++++ b/drivers/video/omap2/omapfb/omapfb.h
+@@ -0,0 +1,153 @@
++/*
++ * linux/drivers/video/omap2/omapfb.h
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
++ *
++ * Some code and ideas taken from drivers/video/omap/ driver
++ * by Imre Deak.
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#ifndef __DRIVERS_VIDEO_OMAP2_OMAPFB_H__
++#define __DRIVERS_VIDEO_OMAP2_OMAPFB_H__
++
++#ifdef CONFIG_FB_OMAP2_DEBUG_SUPPORT
++#define DEBUG
++#endif
++
++#ifdef DEBUG
++extern unsigned int omapfb_debug;
++#define DBG(format, ...) \
++ if (omapfb_debug) \
++ printk(KERN_DEBUG "OMAPFB: " format, ## __VA_ARGS__)
++#else
++#define DBG(format, ...)
++#endif
++
++#define FB2OFB(fb_info) ((struct omapfb_info *)(fb_info->par))
++
++/* max number of overlays to which a framebuffer data can be direct */
++#define OMAPFB_MAX_OVL_PER_FB 3
++
++struct omapfb2_mem_region {
++ u32 paddr;
++ void __iomem *vaddr;
++ struct vrfb vrfb;
++ unsigned long size;
++ u8 type; /* OMAPFB_PLANE_MEM_* */
++ bool alloc; /* allocated by the driver */
++ bool map; /* kernel mapped by the driver */
++};
++
++enum omapfb_rotation_type {
++ OMAPFB_ROT_DMA = 0,
++ OMAPFB_ROT_VRFB = 1,
++};
++
++/* appended to fb_info */
++struct omapfb_info {
++ int id;
++ struct omapfb2_mem_region region;
++ atomic_t map_count;
++ int num_overlays;
++ struct omap_overlay *overlays[OMAPFB_MAX_OVL_PER_FB];
++ struct omapfb2_device *fbdev;
++ enum omapfb_rotation_type rotation_type;
++ u8 rotation;
++ bool mirror;
++};
++
++struct omapfb2_device {
++ struct device *dev;
++ struct mutex mtx;
++
++ u32 pseudo_palette[17];
++
++ int state;
++
++ unsigned num_fbs;
++ struct fb_info *fbs[10];
++
++ unsigned num_displays;
++ struct omap_display *displays[10];
++ unsigned num_overlays;
++ struct omap_overlay *overlays[10];
++ unsigned num_managers;
++ struct omap_overlay_manager *managers[10];
++};
++
++struct omapfb_colormode {
++ enum omap_color_mode dssmode;
++ u32 bits_per_pixel;
++ u32 nonstd;
++ struct fb_bitfield red;
++ struct fb_bitfield green;
++ struct fb_bitfield blue;
++ struct fb_bitfield transp;
++};
++
++u32 omapfb_get_region_paddr(struct omapfb_info *ofbi);
++void __iomem *omapfb_get_region_vaddr(struct omapfb_info *ofbi);
++
++void set_fb_fix(struct fb_info *fbi);
++int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var);
++int omapfb_realloc_fbmem(struct fb_info *fbi, unsigned long size, int type);
++int omapfb_apply_changes(struct fb_info *fbi, int init);
++int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi);
++
++int omapfb_create_sysfs(struct omapfb2_device *fbdev);
++void omapfb_remove_sysfs(struct omapfb2_device *fbdev);
++
++int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg);
++
++int omapfb_mode_to_timings(const char *mode_str,
++ struct omap_video_timings *timings, u8 *bpp);
++
++/* find the display connected to this fb, if any */
++static inline struct omap_display *fb2display(struct fb_info *fbi)
++{
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ int i;
++
++ /* XXX: returns the display connected to first attached overlay */
++ for (i = 0; i < ofbi->num_overlays; i++) {
++ if (ofbi->overlays[i]->manager)
++ return ofbi->overlays[i]->manager->display;
++ }
++
++ return NULL;
++}
++
++static inline void omapfb_lock(struct omapfb2_device *fbdev)
++{
++ mutex_lock(&fbdev->mtx);
++}
++
++static inline void omapfb_unlock(struct omapfb2_device *fbdev)
++{
++ mutex_unlock(&fbdev->mtx);
++}
++
++static inline int omapfb_overlay_enable(struct omap_overlay *ovl,
++ int enable)
++{
++ struct omap_overlay_info info;
++
++ ovl->get_overlay_info(ovl, &info);
++ info.enabled = enable;
++ return ovl->set_overlay_info(ovl, &info);
++}
++
++#endif
+diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h
+index b226bdf..96190b2 100644
+--- a/include/linux/omapfb.h
++++ b/include/linux/omapfb.h
+@@ -50,6 +50,8 @@
+ #define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
+ #define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info)
+ #define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
++#define OMAPFB_WAITFORVSYNC OMAP_IO(57)
++#define OMAPFB_MEMORY_READ OMAP_IOR(58, struct omapfb_memory_read)
+
+ #define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
+ #define OMAPFB_CAPS_LCDC_MASK 0x00fff000
+@@ -90,6 +92,13 @@ enum omapfb_color_format {
+ OMAPFB_COLOR_CLUT_1BPP,
+ OMAPFB_COLOR_RGB444,
+ OMAPFB_COLOR_YUY422,
++
++ OMAPFB_COLOR_ARGB16,
++ OMAPFB_COLOR_RGB24U, /* RGB24, 32-bit container */
++ OMAPFB_COLOR_RGB24P, /* RGB24, 24-bit container */
++ OMAPFB_COLOR_ARGB32,
++ OMAPFB_COLOR_RGBA32,
++ OMAPFB_COLOR_RGBX32,
+ };
+
+ struct omapfb_update_window {
+@@ -161,6 +170,15 @@ enum omapfb_update_mode {
+ OMAPFB_MANUAL_UPDATE
+ };
+
++struct omapfb_memory_read {
++ __u16 x;
++ __u16 y;
++ __u16 w;
++ __u16 h;
++ size_t buffer_size;
++ void __user *buffer;
++};
++
+ #ifdef __KERNEL__
+
+ #include <linux/completion.h>
+@@ -376,6 +394,8 @@ extern struct lcd_ctrl omap1_lcd_ctrl;
+ extern struct lcd_ctrl omap2_disp_ctrl;
+ #endif
+
++extern void omapfb_set_platform_data(struct omapfb_platform_data *data);
++
+ extern void omapfb_reserve_sdram(void);
+ extern void omapfb_register_panel(struct lcd_panel *panel);
+ extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch
new file mode 100644
index 0000000000..c68c89e171
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0005-DSS2-Add-panel-drivers.patch
@@ -0,0 +1,396 @@
+From 4cc0368574f587f448231ccd121266bed4bf9729 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 10:29:56 +0300
+Subject: [PATCH 05/69] DSS2: Add panel drivers
+
+- Generic panel
+- Samsung LTE430WQ-F0C LCD Panel
+- Sharp LS037V7DW01 LCD Panel
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ drivers/video/omap2/displays/Kconfig | 21 ++++
+ drivers/video/omap2/displays/Makefile | 3 +
+ drivers/video/omap2/displays/panel-generic.c | 96 +++++++++++++++++
+ .../omap2/displays/panel-samsung-lte430wq-f0c.c | 108 +++++++++++++++++++
+ .../video/omap2/displays/panel-sharp-ls037v7dw01.c | 112 ++++++++++++++++++++
+ 5 files changed, 340 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/video/omap2/displays/Kconfig
+ create mode 100644 drivers/video/omap2/displays/Makefile
+ create mode 100644 drivers/video/omap2/displays/panel-generic.c
+ create mode 100644 drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
+ create mode 100644 drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
+
+diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
+new file mode 100644
+index 0000000..0419ec8
+--- /dev/null
++++ b/drivers/video/omap2/displays/Kconfig
+@@ -0,0 +1,21 @@
++menu "OMAP2/3 Display Device Drivers"
++ depends on OMAP2_DSS
++
++config PANEL_GENERIC
++ tristate "Generic Panel"
++ help
++ Generic panel driver.
++ Used for DVI output for Beagle and OMAP3 SDP.
++
++config PANEL_SAMSUNG_LTE430WQ_F0C
++ tristate "Samsung LTE430WQ-F0C LCD Panel"
++ depends on OMAP2_DSS
++ help
++ LCD Panel used on Overo Palo43
++
++config PANEL_SHARP_LS037V7DW01
++ tristate "Sharp LS037V7DW01 LCD Panel"
++ depends on OMAP2_DSS
++ help
++ LCD Panel used in TI's SDP3430 and EVM boards
++endmenu
+diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
+new file mode 100644
+index 0000000..a26bbd2
+--- /dev/null
++++ b/drivers/video/omap2/displays/Makefile
+@@ -0,0 +1,3 @@
++obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o
++obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o
++obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
+diff --git a/drivers/video/omap2/displays/panel-generic.c b/drivers/video/omap2/displays/panel-generic.c
+new file mode 100644
+index 0000000..8382acb
+--- /dev/null
++++ b/drivers/video/omap2/displays/panel-generic.c
+@@ -0,0 +1,96 @@
++/*
++ * Generic panel support
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <linux/module.h>
++#include <linux/delay.h>
++
++#include <mach/display.h>
++
++static int generic_panel_init(struct omap_display *display)
++{
++ return 0;
++}
++
++static int generic_panel_enable(struct omap_display *display)
++{
++ int r = 0;
++
++ if (display->hw_config.panel_enable)
++ r = display->hw_config.panel_enable(display);
++
++ return r;
++}
++
++static void generic_panel_disable(struct omap_display *display)
++{
++ if (display->hw_config.panel_disable)
++ display->hw_config.panel_disable(display);
++}
++
++static int generic_panel_suspend(struct omap_display *display)
++{
++ generic_panel_disable(display);
++ return 0;
++}
++
++static int generic_panel_resume(struct omap_display *display)
++{
++ return generic_panel_enable(display);
++}
++
++static struct omap_panel generic_panel = {
++ .owner = THIS_MODULE,
++ .name = "panel-generic",
++ .init = generic_panel_init,
++ .enable = generic_panel_enable,
++ .disable = generic_panel_disable,
++ .suspend = generic_panel_suspend,
++ .resume = generic_panel_resume,
++
++ .timings = {
++ /* 640 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */
++ .x_res = 640,
++ .y_res = 480,
++ .pixel_clock = 23500,
++ .hfp = 48,
++ .hsw = 32,
++ .hbp = 80,
++ .vfp = 3,
++ .vsw = 4,
++ .vbp = 7,
++ },
++
++ .config = OMAP_DSS_LCD_TFT,
++};
++
++
++static int __init generic_panel_drv_init(void)
++{
++ omap_dss_register_panel(&generic_panel);
++ return 0;
++}
++
++static void __exit generic_panel_drv_exit(void)
++{
++ omap_dss_unregister_panel(&generic_panel);
++}
++
++module_init(generic_panel_drv_init);
++module_exit(generic_panel_drv_exit);
++MODULE_LICENSE("GPL");
+diff --git a/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
+new file mode 100644
+index 0000000..e4bb781
+--- /dev/null
++++ b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
+@@ -0,0 +1,108 @@
++/*
++ * LCD panel driver for Samsung LTE430WQ-F0C
++ *
++ * 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, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <linux/module.h>
++#include <linux/delay.h>
++
++#include <mach/display.h>
++
++static int samsung_lte_panel_init(struct omap_display *display)
++{
++ return 0;
++}
++
++static void samsung_lte_panel_cleanup(struct omap_display *display)
++{
++}
++
++static int samsung_lte_panel_enable(struct omap_display *display)
++{
++ int r = 0;
++
++ /* wait couple of vsyncs until enabling the LCD */
++ msleep(50);
++
++ if (display->hw_config.panel_enable)
++ r = display->hw_config.panel_enable(display);
++
++ return r;
++}
++
++static void samsung_lte_panel_disable(struct omap_display *display)
++{
++ if (display->hw_config.panel_disable)
++ display->hw_config.panel_disable(display);
++
++ /* wait at least 5 vsyncs after disabling the LCD */
++ msleep(100);
++}
++
++static int samsung_lte_panel_suspend(struct omap_display *display)
++{
++ samsung_lte_panel_disable(display);
++ return 0;
++}
++
++static int samsung_lte_panel_resume(struct omap_display *display)
++{
++ return samsung_lte_panel_enable(display);
++}
++
++static struct omap_panel samsung_lte_panel = {
++ .owner = THIS_MODULE,
++ .name = "samsung-lte430wq-f0c",
++ .init = samsung_lte_panel_init,
++ .cleanup = samsung_lte_panel_cleanup,
++ .enable = samsung_lte_panel_enable,
++ .disable = samsung_lte_panel_disable,
++ .suspend = samsung_lte_panel_suspend,
++ .resume = samsung_lte_panel_resume,
++
++ .timings = {
++ .x_res = 480,
++ .y_res = 272,
++
++ .pixel_clock = 9200,
++
++ .hsw = 41,
++ .hfp = 8,
++ .hbp = 45-41,
++
++ .vsw = 10,
++ .vfp = 4,
++ .vbp = 12-10,
++ },
++
++ .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IVS,
++};
++
++
++static int __init samsung_lte_panel_drv_init(void)
++{
++ omap_dss_register_panel(&samsung_lte_panel);
++ return 0;
++}
++
++static void __exit samsung_lte_panel_drv_exit(void)
++{
++ omap_dss_unregister_panel(&samsung_lte_panel);
++}
++
++module_init(samsung_lte_panel_drv_init);
++module_exit(samsung_lte_panel_drv_exit);
++MODULE_LICENSE("GPL");
+diff --git a/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
+new file mode 100644
+index 0000000..1f99150
+--- /dev/null
++++ b/drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c
+@@ -0,0 +1,112 @@
++/*
++ * LCD panel driver for Sharp LS037V7DW01
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <linux/module.h>
++#include <linux/delay.h>
++
++#include <mach/display.h>
++
++static int sharp_ls_panel_init(struct omap_display *display)
++{
++ return 0;
++}
++
++static void sharp_ls_panel_cleanup(struct omap_display *display)
++{
++}
++
++static int sharp_ls_panel_enable(struct omap_display *display)
++{
++ int r = 0;
++
++ /* wait couple of vsyncs until enabling the LCD */
++ msleep(50);
++
++ if (display->hw_config.panel_enable)
++ r = display->hw_config.panel_enable(display);
++
++ return r;
++}
++
++static void sharp_ls_panel_disable(struct omap_display *display)
++{
++ if (display->hw_config.panel_disable)
++ display->hw_config.panel_disable(display);
++
++ /* wait at least 5 vsyncs after disabling the LCD */
++
++ msleep(100);
++}
++
++static int sharp_ls_panel_suspend(struct omap_display *display)
++{
++ sharp_ls_panel_disable(display);
++ return 0;
++}
++
++static int sharp_ls_panel_resume(struct omap_display *display)
++{
++ return sharp_ls_panel_enable(display);
++}
++
++static struct omap_panel sharp_ls_panel = {
++ .owner = THIS_MODULE,
++ .name = "sharp-ls037v7dw01",
++ .init = sharp_ls_panel_init,
++ .cleanup = sharp_ls_panel_cleanup,
++ .enable = sharp_ls_panel_enable,
++ .disable = sharp_ls_panel_disable,
++ .suspend = sharp_ls_panel_suspend,
++ .resume = sharp_ls_panel_resume,
++
++ .timings = {
++ .x_res = 480,
++ .y_res = 640,
++
++ .pixel_clock = 19200,
++
++ .hsw = 2,
++ .hfp = 1,
++ .hbp = 28,
++
++ .vsw = 1,
++ .vfp = 1,
++ .vbp = 1,
++ },
++
++ .acb = 0x28,
++
++ .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS,
++};
++
++
++static int __init sharp_ls_panel_drv_init(void)
++{
++ omap_dss_register_panel(&sharp_ls_panel);
++ return 0;
++}
++
++static void __exit sharp_ls_panel_drv_exit(void)
++{
++ omap_dss_unregister_panel(&sharp_ls_panel);
++}
++
++module_init(sharp_ls_panel_drv_init);
++module_exit(sharp_ls_panel_drv_exit);
++MODULE_LICENSE("GPL");
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch
new file mode 100644
index 0000000000..258b0b6531
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch
@@ -0,0 +1,1079 @@
+From 18a25382e81c03230e022ca2eb7e0fce24479d6a Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 10:31:57 +0300
+Subject: [PATCH 06/69] DSS2: HACK: Add DSS2 support for N800
+
+Works, but it an ugly quick hack.
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ arch/arm/mach-omap2/board-n800.c | 216 +++++++++++---
+ drivers/video/omap2/displays/Kconfig | 10 +
+ drivers/video/omap2/displays/Makefile | 3 +
+ drivers/video/omap2/displays/ctrl-blizzard.c | 279 +++++++++++++++++
+ drivers/video/omap2/displays/panel-n800.c | 435 ++++++++++++++++++++++++++
+ 5 files changed, 905 insertions(+), 38 deletions(-)
+ create mode 100644 drivers/video/omap2/displays/ctrl-blizzard.c
+ create mode 100644 drivers/video/omap2/displays/panel-n800.c
+
+diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
+index f6f6571..6de60ae 100644
+--- a/arch/arm/mach-omap2/board-n800.c
++++ b/arch/arm/mach-omap2/board-n800.c
+@@ -41,6 +41,8 @@
+ #include <mach/clock.h>
+ #include <mach/gpio-switch.h>
+ #include <mach/blizzard.h>
++#include <mach/display.h>
++#include <mach/vram.h>
+
+ #include <../drivers/cbus/tahvo.h>
+ #include <../drivers/media/video/tcm825x.h>
+@@ -161,23 +163,176 @@ static struct omap_uart_config n800_uart_config __initdata = {
+
+ #include "../../../drivers/cbus/retu.h"
+
+-static struct omap_fbmem_config n800_fbmem0_config __initdata = {
+- .size = 752 * 1024,
++static struct omap_tmp105_config n800_tmp105_config __initdata = {
++ .tmp105_irq_pin = 125,
++ .set_power = n800_tmp105_set_power,
+ };
+
+-static struct omap_fbmem_config n800_fbmem1_config __initdata = {
+- .size = 752 * 1024,
+-};
+
+-static struct omap_fbmem_config n800_fbmem2_config __initdata = {
+- .size = 752 * 1024,
++
++
++/* DISPLAY */
++static struct {
++ struct clk *sys_ck;
++} blizzard;
++
++static int blizzard_get_clocks(void)
++{
++ blizzard.sys_ck = clk_get(0, "osc_ck");
++ if (IS_ERR(blizzard.sys_ck)) {
++ printk(KERN_ERR "can't get Blizzard clock\n");
++ return PTR_ERR(blizzard.sys_ck);
++ }
++ return 0;
++}
++
++static unsigned long blizzard_get_clock_rate(void)
++{
++ return clk_get_rate(blizzard.sys_ck);
++}
++
++static int n800_pn800_enable(struct omap_display *display)
++{
++ if (display->hw_config.panel_reset_gpio != -1) {
++ printk("enabling panel gpio\n");
++ gpio_direction_output(display->hw_config.panel_reset_gpio, 1);
++ }
++
++ return 0;
++}
++
++static void n800_pn800_disable(struct omap_display *display)
++{
++ if (display->hw_config.panel_reset_gpio != -1) {
++ printk("disabling panel gpio\n");
++ gpio_direction_output(display->hw_config.panel_reset_gpio, 0);
++ msleep(120);
++ }
++}
++
++static int n800_blizzard_enable(struct omap_display *display)
++{
++ printk("enabling bliz powers\n");
++
++ /* Vcore to 1.475V */
++ tahvo_set_clear_reg_bits(0x07, 0, 0xf);
++ msleep(10);
++
++ clk_enable(blizzard.sys_ck);
++
++ if (display->hw_config.ctrl_reset_gpio != -1)
++ gpio_direction_output(display->hw_config.ctrl_reset_gpio, 1);
++
++ printk("osc_ck %lu\n", blizzard_get_clock_rate());
++
++ return 0;
++}
++
++static void n800_blizzard_disable(struct omap_display *display)
++{
++ printk("disabling bliz powers\n");
++
++ if (display->hw_config.ctrl_reset_gpio != -1)
++ gpio_direction_output(display->hw_config.ctrl_reset_gpio, 0);
++
++ clk_disable(blizzard.sys_ck);
++
++ /* Vcore to 1.005V */
++ tahvo_set_clear_reg_bits(0x07, 0xf, 0);
++}
++
++static int n800_set_backlight_level(struct omap_display *display, int level)
++{
++ return 0;
++}
++
++static struct omap_dss_display_config n800_dsi_display_data = {
++ .type = OMAP_DISPLAY_TYPE_DBI,
++ .name = "lcd",
++ .ctrl_name = "ctrl-blizzard",
++ .panel_name = "panel-pn800",
++ .panel_reset_gpio = -1,
++ .ctrl_reset_gpio = N800_BLIZZARD_POWERDOWN_GPIO,
++ .panel_enable = n800_pn800_enable,
++ .panel_disable = n800_pn800_disable,
++ .ctrl_enable = n800_blizzard_enable,
++ .ctrl_disable = n800_blizzard_disable,
++ .set_backlight = n800_set_backlight_level,
++ .u.rfbi = {
++ .channel = 0,
++ /* 8 for cmd mode, 16 for pixel data. ctrl-blizzard handles switching */
++ .data_lines = 8,
++ },
++ .panel_data = 0, // XXX used for panel datalines
++};
++static struct omap_dss_board_info n800_dss_data = {
++ .num_displays = 1,
++ .displays = {
++ &n800_dsi_display_data,
++ },
+ };
+
+-static struct omap_tmp105_config n800_tmp105_config __initdata = {
+- .tmp105_irq_pin = 125,
+- .set_power = n800_tmp105_set_power,
++static struct platform_device n800_dss_device = {
++ .name = "omapdss",
++ .id = -1,
++ .dev = {
++ .platform_data = &n800_dss_data,
++ },
+ };
+
++static void __init n800_display_init(void)
++{
++ int r;
++ const struct omap_lcd_config *conf;
++
++ conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config);
++ if (conf != NULL) {
++ n800_dsi_display_data.panel_reset_gpio = conf->nreset_gpio;
++ n800_dsi_display_data.panel_data =
++ (void*)(u32)conf->data_lines; // XXX
++ //printk("\n\nTULI %d\n\n", conf->data_lines);
++ } else {
++ printk("\n\nEI TULLU MIOTÄÄÄ\n\n");
++ }
++
++ blizzard_get_clocks();
++ clk_enable(blizzard.sys_ck); // XXX always enable
++
++ //omapfb_set_ctrl_platform_data(&n800_blizzard_data);
++ //
++ if (n800_dsi_display_data.ctrl_reset_gpio != -1) {
++ r = gpio_request(n800_dsi_display_data.ctrl_reset_gpio,
++ "Blizzard pd");
++ if (r < 0) {
++ n800_dsi_display_data.ctrl_reset_gpio = -1;
++ printk(KERN_ERR "Unable to get Blizzard GPIO\n");
++ } else {
++ gpio_direction_output(n800_dsi_display_data.ctrl_reset_gpio,
++ 1);
++ // XXX always enable
++ }
++ }
++
++ if (n800_dsi_display_data.panel_reset_gpio != -1) {
++ r = gpio_request(n800_dsi_display_data.panel_reset_gpio,
++ "panel reset");
++ if (r < 0) {
++ n800_dsi_display_data.panel_reset_gpio = -1;
++ printk(KERN_ERR "Unable to get pn800 GPIO\n");
++ } else {
++ gpio_direction_output(n800_dsi_display_data.panel_reset_gpio,
++ 1);
++ // XXX always enable
++ }
++ }
++}
++
++/* DISPLAY END */
++
++
++
++
++
+ static void mipid_shutdown(struct mipid_platform_data *pdata)
+ {
+ if (pdata->nreset_gpio != -1) {
+@@ -191,6 +346,7 @@ static struct mipid_platform_data n800_mipid_platform_data = {
+ .shutdown = mipid_shutdown,
+ };
+
++#if 0
+ static void __init mipid_dev_init(void)
+ {
+ const struct omap_lcd_config *conf;
+@@ -201,26 +357,9 @@ static void __init mipid_dev_init(void)
+ n800_mipid_platform_data.data_lines = conf->data_lines;
+ }
+ }
++#endif
+
+-static struct {
+- struct clk *sys_ck;
+-} blizzard;
+-
+-static int blizzard_get_clocks(void)
+-{
+- blizzard.sys_ck = clk_get(0, "osc_ck");
+- if (IS_ERR(blizzard.sys_ck)) {
+- printk(KERN_ERR "can't get Blizzard clock\n");
+- return PTR_ERR(blizzard.sys_ck);
+- }
+- return 0;
+-}
+-
+-static unsigned long blizzard_get_clock_rate(struct device *dev)
+-{
+- return clk_get_rate(blizzard.sys_ck);
+-}
+-
++#if 0
+ static void blizzard_enable_clocks(int enable)
+ {
+ if (enable)
+@@ -265,14 +404,12 @@ static void __init blizzard_dev_init(void)
+ gpio_direction_output(N800_BLIZZARD_POWERDOWN_GPIO, 1);
+
+ blizzard_get_clocks();
+- omapfb_set_ctrl_platform_data(&n800_blizzard_data);
++ //omapfb_set_ctrl_platform_data(&n800_blizzard_data);
+ }
++#endif
+
+ static struct omap_board_config_kernel n800_config[] __initdata = {
+ { OMAP_TAG_UART, &n800_uart_config },
+- { OMAP_TAG_FBMEM, &n800_fbmem0_config },
+- { OMAP_TAG_FBMEM, &n800_fbmem1_config },
+- { OMAP_TAG_FBMEM, &n800_fbmem2_config },
+ { OMAP_TAG_TMP105, &n800_tmp105_config },
+ };
+
+@@ -379,7 +516,7 @@ static struct omap2_mcspi_device_config tsc2005_mcspi_config = {
+
+ static struct spi_board_info n800_spi_board_info[] __initdata = {
+ {
+- .modalias = "lcd_mipid",
++ .modalias = "panel-n800",
+ .bus_num = 1,
+ .chip_select = 1,
+ .max_speed_hz = 4000000,
+@@ -404,7 +541,7 @@ static struct spi_board_info n800_spi_board_info[] __initdata = {
+
+ static struct spi_board_info n810_spi_board_info[] __initdata = {
+ {
+- .modalias = "lcd_mipid",
++ .modalias = "panel-n800",
+ .bus_num = 1,
+ .chip_select = 1,
+ .max_speed_hz = 4000000,
+@@ -582,6 +719,7 @@ static struct platform_device *n800_devices[] __initdata = {
+ #if defined(CONFIG_CBUS_RETU_HEADSET)
+ &retu_headset_device,
+ #endif
++ &n800_dss_device,
+ };
+
+ #ifdef CONFIG_MENELAUS
+@@ -713,9 +851,10 @@ void __init nokia_n800_common_init(void)
+ if (machine_is_nokia_n810())
+ i2c_register_board_info(2, n810_i2c_board_info_2,
+ ARRAY_SIZE(n810_i2c_board_info_2));
+-
+- mipid_dev_init();
+- blizzard_dev_init();
++
++ //mipid_dev_init();
++ //blizzard_dev_init();
++ n800_display_init();
+ }
+
+ static void __init nokia_n800_init(void)
+@@ -735,6 +874,7 @@ void __init nokia_n800_map_io(void)
+ omap_board_config_size = ARRAY_SIZE(n800_config);
+
+ omap2_set_globals_242x();
++ omap2_set_sdram_vram(800 * 480 * 2 * 3, 0);
+ omap2_map_common_io();
+ }
+
+diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
+index 0419ec8..356ceb1 100644
+--- a/drivers/video/omap2/displays/Kconfig
++++ b/drivers/video/omap2/displays/Kconfig
+@@ -18,4 +18,14 @@ config PANEL_SHARP_LS037V7DW01
+ depends on OMAP2_DSS
+ help
+ LCD Panel used in TI's SDP3430 and EVM boards
++
++config PANEL_N800
++ tristate "Panel N8x0"
++ help
++ N8x0 LCD (hack)
++
++config CTRL_BLIZZARD
++ tristate "Blizzard Controller"
++ help
++ Blizzard Controller (hack)
+ endmenu
+diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
+index a26bbd2..1b74b7e 100644
+--- a/drivers/video/omap2/displays/Makefile
++++ b/drivers/video/omap2/displays/Makefile
+@@ -1,3 +1,6 @@
+ obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o
+ obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o
+ obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
++
++obj-$(CONFIG_CTRL_BLIZZARD) += ctrl-blizzard.o
++obj-$(CONFIG_PANEL_N800) += panel-n800.o
+diff --git a/drivers/video/omap2/displays/ctrl-blizzard.c b/drivers/video/omap2/displays/ctrl-blizzard.c
+new file mode 100644
+index 0000000..6698e4d
+--- /dev/null
++++ b/drivers/video/omap2/displays/ctrl-blizzard.c
+@@ -0,0 +1,279 @@
++
++//#define DEBUG
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/clk.h>
++#include <linux/delay.h>
++#include <linux/err.h>
++
++#include <mach/display.h>
++#include <mach/dma.h>
++
++#ifdef DEBUG
++#define DBG(format, ...) printk(KERN_DEBUG "Blizzard: " format, ## __VA_ARGS__)
++#else
++#define DBG(format, ...)
++#endif
++
++#define BLIZZARD_REV_CODE 0x00
++#define BLIZZARD_CONFIG 0x02
++#define BLIZZARD_PLL_DIV 0x04
++#define BLIZZARD_PLL_LOCK_RANGE 0x06
++#define BLIZZARD_PLL_CLOCK_SYNTH_0 0x08
++#define BLIZZARD_PLL_CLOCK_SYNTH_1 0x0a
++#define BLIZZARD_PLL_MODE 0x0c
++#define BLIZZARD_CLK_SRC 0x0e
++#define BLIZZARD_MEM_BANK0_ACTIVATE 0x10
++#define BLIZZARD_MEM_BANK0_STATUS 0x14
++#define BLIZZARD_PANEL_CONFIGURATION 0x28
++#define BLIZZARD_HDISP 0x2a
++#define BLIZZARD_HNDP 0x2c
++#define BLIZZARD_VDISP0 0x2e
++#define BLIZZARD_VDISP1 0x30
++#define BLIZZARD_VNDP 0x32
++#define BLIZZARD_HSW 0x34
++#define BLIZZARD_VSW 0x38
++#define BLIZZARD_DISPLAY_MODE 0x68
++#define BLIZZARD_INPUT_WIN_X_START_0 0x6c
++#define BLIZZARD_DATA_SOURCE_SELECT 0x8e
++#define BLIZZARD_DISP_MEM_DATA_PORT 0x90
++#define BLIZZARD_DISP_MEM_READ_ADDR0 0x92
++#define BLIZZARD_POWER_SAVE 0xE6
++#define BLIZZARD_NDISP_CTRL_STATUS 0xE8
++
++/* Data source select */
++/* For S1D13745 */
++#define BLIZZARD_SRC_WRITE_LCD_BACKGROUND 0x00
++#define BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE 0x01
++#define BLIZZARD_SRC_WRITE_OVERLAY_ENABLE 0x04
++#define BLIZZARD_SRC_DISABLE_OVERLAY 0x05
++/* For S1D13744 */
++#define BLIZZARD_SRC_WRITE_LCD 0x00
++#define BLIZZARD_SRC_BLT_LCD 0x06
++
++#define BLIZZARD_COLOR_RGB565 0x01
++#define BLIZZARD_COLOR_YUV420 0x09
++
++#define BLIZZARD_VERSION_S1D13745 0x01 /* Hailstorm */
++#define BLIZZARD_VERSION_S1D13744 0x02 /* Blizzard */
++
++#define BLIZZARD_AUTO_UPDATE_TIME (HZ / 20)
++
++
++
++static struct {
++ int version;
++} blizzard;
++
++
++static inline void blizzard_cmd(u8 cmd)
++{
++ omap_rfbi_write_command(&cmd, 1);
++}
++
++static inline void blizzard_write(u8 cmd, const u8 *buf, int len)
++{
++ omap_rfbi_write_command(&cmd, 1);
++ omap_rfbi_write_data(buf, len);
++}
++
++static inline void blizzard_read(u8 cmd, u8 *buf, int len)
++{
++ omap_rfbi_write_command(&cmd, 1);
++ omap_rfbi_read_data(buf, len);
++}
++
++static u8 blizzard_read_reg(u8 cmd)
++{
++ u8 data;
++ blizzard_read(cmd, &data, 1);
++ return data;
++}
++
++static int blizzard_ctrl_init(struct omap_display *display)
++{
++ DBG("blizzard_ctrl_init\n");
++
++ return 0;
++}
++
++
++static int blizzard_ctrl_enable(struct omap_display *display)
++{
++ int r = 0;
++ u8 rev, conf;
++
++ DBG("blizzard_ctrl_enable\n");
++
++ if (display->hw_config.ctrl_enable) {
++ r = display->hw_config.ctrl_enable(display);
++ if (r)
++ return r;
++ }
++
++ msleep(100);
++
++ rev = blizzard_read_reg(BLIZZARD_CLK_SRC);
++ printk("CLK_SRC %x\n", rev);
++
++ rev = blizzard_read_reg(BLIZZARD_PLL_DIV);
++ printk("PLLDIV %x\n", rev);
++
++ rev = blizzard_read_reg(BLIZZARD_REV_CODE);
++ conf = blizzard_read_reg(BLIZZARD_CONFIG);
++
++ printk("rev %x, conf %x\n", rev, conf);
++
++ switch (rev & 0xfc) {
++ case 0x9c:
++ blizzard.version = BLIZZARD_VERSION_S1D13744;
++ pr_info("omapfb: s1d13744 LCD controller rev %d "
++ "initialized (CNF pins %x)\n", rev & 0x03, conf & 0x07);
++ break;
++ case 0xa4:
++ blizzard.version = BLIZZARD_VERSION_S1D13745;
++ pr_info("omapfb: s1d13745 LCD controller rev %d "
++ "initialized (CNF pins %x)\n", rev & 0x03, conf & 0x07);
++ break;
++ default:
++ printk("invalid s1d1374x revision %02x\n",
++ rev);
++ r = -ENODEV;
++ }
++
++ return r;
++}
++
++static void blizzard_ctrl_disable(struct omap_display *display)
++{
++ DBG("blizzard_ctrl_disable\n");
++
++ if (display->hw_config.ctrl_disable)
++ display->hw_config.ctrl_disable(display);
++}
++
++int rfbi_configure(int rfbi_module, int bpp, int lines);
++
++static void blizzard_ctrl_setup_update(struct omap_display *display,
++ u16 x, u16 y, u16 w, u16 h)
++{
++ u8 tmp[18];
++ int x_end, y_end;
++
++ DBG("blizzard_ctrl_setup_update\n");
++
++ x_end = x + w - 1;
++ y_end = y + h - 1;
++
++ tmp[0] = x;
++ tmp[1] = x >> 8;
++ tmp[2] = y;
++ tmp[3] = y >> 8;
++ tmp[4] = x_end;
++ tmp[5] = x_end >> 8;
++ tmp[6] = y_end;
++ tmp[7] = y_end >> 8;
++
++ /* scaling? */
++ tmp[8] = x;
++ tmp[9] = x >> 8;
++ tmp[10] = y;
++ tmp[11] = y >> 8;
++ tmp[12] = x_end;
++ tmp[13] = x_end >> 8;
++ tmp[14] = y_end;
++ tmp[15] = y_end >> 8;
++
++ tmp[16] = BLIZZARD_COLOR_RGB565; //color_mode;
++
++ if (blizzard.version == BLIZZARD_VERSION_S1D13745)
++ tmp[17] = BLIZZARD_SRC_WRITE_LCD_BACKGROUND;
++ else
++ tmp[17] = blizzard.version == BLIZZARD_VERSION_S1D13744 ?
++ BLIZZARD_SRC_WRITE_LCD :
++ BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE;
++
++ rfbi_configure(display->hw_config.u.rfbi.channel,
++ 16,
++ 8);
++
++ blizzard_write(BLIZZARD_INPUT_WIN_X_START_0, tmp, 18);
++
++ rfbi_configure(display->hw_config.u.rfbi.channel,
++ 16,
++ 16);
++}
++
++static int blizzard_ctrl_enable_te(struct omap_display *display, bool enable)
++{
++ return 0;
++}
++
++static int blizzard_ctrl_rotate(struct omap_display *display, u8 rotate)
++{
++ return 0;
++}
++
++static int blizzard_ctrl_mirror(struct omap_display *display, bool enable)
++{
++ return 0;
++}
++
++static int blizzard_run_test(struct omap_display *display, int test_num)
++{
++ return 0;
++}
++
++static struct omap_ctrl blizzard_ctrl = {
++ .owner = THIS_MODULE,
++ .name = "ctrl-blizzard",
++ .init = blizzard_ctrl_init,
++ .enable = blizzard_ctrl_enable,
++ .disable = blizzard_ctrl_disable,
++ .setup_update = blizzard_ctrl_setup_update,
++ .enable_te = blizzard_ctrl_enable_te,
++ .set_rotate = blizzard_ctrl_rotate,
++ .set_mirror = blizzard_ctrl_mirror,
++ .run_test = blizzard_run_test,
++ .pixel_size = 16,
++
++ .timings = {
++ .cs_on_time = 0,
++
++ .we_on_time = 9000,
++ .we_off_time = 18000,
++ .we_cycle_time = 36000,
++
++ .re_on_time = 9000,
++ .re_off_time = 27000,
++ .re_cycle_time = 36000,
++
++ .access_time = 27000,
++ .cs_off_time = 36000,
++
++ .cs_pulse_width = 0,
++ },
++};
++
++
++static int __init blizzard_init(void)
++{
++ DBG("blizzard_init\n");
++ omap_dss_register_ctrl(&blizzard_ctrl);
++ return 0;
++}
++
++static void __exit blizzard_exit(void)
++{
++ DBG("blizzard_exit\n");
++
++ omap_dss_unregister_ctrl(&blizzard_ctrl);
++}
++
++module_init(blizzard_init);
++module_exit(blizzard_exit);
++
++MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
++MODULE_DESCRIPTION("Blizzard Driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/video/omap2/displays/panel-n800.c b/drivers/video/omap2/displays/panel-n800.c
+new file mode 100644
+index 0000000..91d3e37
+--- /dev/null
++++ b/drivers/video/omap2/displays/panel-n800.c
+@@ -0,0 +1,435 @@
++
++/*#define DEBUG*/
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/clk.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/spi/spi.h>
++#include <linux/jiffies.h>
++#include <linux/sched.h>
++#include <linux/backlight.h>
++#include <linux/fb.h>
++
++#include <mach/display.h>
++#include <mach/dma.h>
++
++#define MIPID_CMD_READ_DISP_ID 0x04
++#define MIPID_CMD_READ_RED 0x06
++#define MIPID_CMD_READ_GREEN 0x07
++#define MIPID_CMD_READ_BLUE 0x08
++#define MIPID_CMD_READ_DISP_STATUS 0x09
++#define MIPID_CMD_RDDSDR 0x0F
++#define MIPID_CMD_SLEEP_IN 0x10
++#define MIPID_CMD_SLEEP_OUT 0x11
++#define MIPID_CMD_DISP_OFF 0x28
++#define MIPID_CMD_DISP_ON 0x29
++
++#define MIPID_VER_LPH8923 3
++#define MIPID_VER_LS041Y3 4
++
++#define MIPID_ESD_CHECK_PERIOD msecs_to_jiffies(5000)
++
++#ifdef DEBUG
++#define DBG(format, ...) printk(KERN_DEBUG "PN800: " format, ## __VA_ARGS__)
++#else
++#define DBG(format, ...)
++#endif
++
++struct pn800_device {
++ struct backlight_device *bl_dev;
++ int enabled;
++ int model;
++ int revision;
++ u8 display_id[3];
++ unsigned int saved_bklight_level;
++ unsigned long hw_guard_end; /* next value of jiffies
++ when we can issue the
++ next sleep in/out command */
++ unsigned long hw_guard_wait; /* max guard time in jiffies */
++
++ struct spi_device *spi;
++ struct mutex mutex;
++ struct omap_panel panel;
++ struct omap_display *display;
++};
++
++
++static void pn800_transfer(struct pn800_device *md, int cmd,
++ const u8 *wbuf, int wlen, u8 *rbuf, int rlen)
++{
++ struct spi_message m;
++ struct spi_transfer *x, xfer[4];
++ u16 w;
++ int r;
++
++ BUG_ON(md->spi == NULL);
++
++ spi_message_init(&m);
++
++ memset(xfer, 0, sizeof(xfer));
++ x = &xfer[0];
++
++ cmd &= 0xff;
++ x->tx_buf = &cmd;
++ x->bits_per_word = 9;
++ x->len = 2;
++ spi_message_add_tail(x, &m);
++
++ if (wlen) {
++ x++;
++ x->tx_buf = wbuf;
++ x->len = wlen;
++ x->bits_per_word = 9;
++ spi_message_add_tail(x, &m);
++ }
++
++ if (rlen) {
++ x++;
++ x->rx_buf = &w;
++ x->len = 1;
++ spi_message_add_tail(x, &m);
++
++ if (rlen > 1) {
++ /* Arrange for the extra clock before the first
++ * data bit.
++ */
++ x->bits_per_word = 9;
++ x->len = 2;
++
++ x++;
++ x->rx_buf = &rbuf[1];
++ x->len = rlen - 1;
++ spi_message_add_tail(x, &m);
++ }
++ }
++
++ r = spi_sync(md->spi, &m);
++ if (r < 0)
++ dev_dbg(&md->spi->dev, "spi_sync %d\n", r);
++
++ if (rlen)
++ rbuf[0] = w & 0xff;
++}
++
++static inline void pn800_cmd(struct pn800_device *md, int cmd)
++{
++ pn800_transfer(md, cmd, NULL, 0, NULL, 0);
++}
++
++static inline void pn800_write(struct pn800_device *md,
++ int reg, const u8 *buf, int len)
++{
++ pn800_transfer(md, reg, buf, len, NULL, 0);
++}
++
++static inline void pn800_read(struct pn800_device *md,
++ int reg, u8 *buf, int len)
++{
++ pn800_transfer(md, reg, NULL, 0, buf, len);
++}
++
++static void set_data_lines(struct pn800_device *md, int data_lines)
++{
++ u16 par;
++
++ switch (data_lines) {
++ case 16:
++ par = 0x150;
++ break;
++ case 18:
++ par = 0x160;
++ break;
++ case 24:
++ par = 0x170;
++ break;
++ }
++ pn800_write(md, 0x3a, (u8 *)&par, 2);
++}
++
++static void send_init_string(struct pn800_device *md)
++{
++ u16 initpar[] = { 0x0102, 0x0100, 0x0100 };
++ int data_lines;
++
++ pn800_write(md, 0xc2, (u8 *)initpar, sizeof(initpar));
++
++ data_lines = (int)md->display->hw_config.panel_data; // XXX
++
++ set_data_lines(md, data_lines);
++}
++
++static void hw_guard_start(struct pn800_device *md, int guard_msec)
++{
++ md->hw_guard_wait = msecs_to_jiffies(guard_msec);
++ md->hw_guard_end = jiffies + md->hw_guard_wait;
++}
++
++static void hw_guard_wait(struct pn800_device *md)
++{
++ unsigned long wait = md->hw_guard_end - jiffies;
++
++ if ((long)wait > 0 && wait <= md->hw_guard_wait) {
++ set_current_state(TASK_UNINTERRUPTIBLE);
++ schedule_timeout(wait);
++ }
++}
++
++static void set_sleep_mode(struct pn800_device *md, int on)
++{
++ int cmd, sleep_time = 50;
++
++ if (on)
++ cmd = MIPID_CMD_SLEEP_IN;
++ else
++ cmd = MIPID_CMD_SLEEP_OUT;
++ hw_guard_wait(md);
++ pn800_cmd(md, cmd);
++ hw_guard_start(md, 120);
++ /*
++ * When we enable the panel, it seems we _have_ to sleep
++ * 120 ms before sending the init string. When disabling the
++ * panel we'll sleep for the duration of 2 frames, so that the
++ * controller can still provide the PCLK,HS,VS signals. */
++ if (!on)
++ sleep_time = 120;
++ msleep(sleep_time);
++}
++
++static void set_display_state(struct pn800_device *md, int enabled)
++{
++ int cmd = enabled ? MIPID_CMD_DISP_ON : MIPID_CMD_DISP_OFF;
++
++ pn800_cmd(md, cmd);
++}
++
++static int panel_enabled(struct pn800_device *md)
++{
++ u32 disp_status;
++ int enabled;
++
++ pn800_read(md, MIPID_CMD_READ_DISP_STATUS, (u8 *)&disp_status, 4);
++ disp_status = __be32_to_cpu(disp_status);
++ enabled = (disp_status & (1 << 17)) && (disp_status & (1 << 10));
++ dev_dbg(&md->spi->dev,
++ "LCD panel %s enabled by bootloader (status 0x%04x)\n",
++ enabled ? "" : "not ", disp_status);
++ DBG("status %#08x\n", disp_status);
++ return enabled;
++}
++
++static int panel_detect(struct pn800_device *md)
++{
++ pn800_read(md, MIPID_CMD_READ_DISP_ID, md->display_id, 3);
++ dev_dbg(&md->spi->dev, "MIPI display ID: %02x%02x%02x\n",
++ md->display_id[0], md->display_id[1], md->display_id[2]);
++
++ switch (md->display_id[0]) {
++ case 0x45:
++ md->model = MIPID_VER_LPH8923;
++ md->panel.name = "lph8923";
++ break;
++ case 0x83:
++ md->model = MIPID_VER_LS041Y3;
++ md->panel.name = "ls041y3";
++ //md->esd_check = ls041y3_esd_check;
++ break;
++ default:
++ md->panel.name = "unknown";
++ dev_err(&md->spi->dev, "invalid display ID\n");
++ return -ENODEV;
++ }
++
++ md->revision = md->display_id[1];
++ pr_info("omapfb: %s rev %02x LCD detected\n",
++ md->panel.name, md->revision);
++
++ return 0;
++}
++
++
++
++static int pn800_panel_enable(struct omap_display *display)
++{
++ int r;
++ struct pn800_device *md =
++ (struct pn800_device *)display->panel->priv;
++
++ DBG("pn800_panel_enable\n");
++
++ mutex_lock(&md->mutex);
++
++ if (display->hw_config.panel_enable)
++ display->hw_config.panel_enable(display);
++
++ msleep(50); // wait for power up
++
++ r = panel_detect(md);
++ if (r) {
++ mutex_unlock(&md->mutex);
++ return r;
++ }
++
++ md->enabled = panel_enabled(md);
++
++ if (md->enabled) {
++ DBG("panel already enabled\n");
++ ; /*pn800_esd_start_check(md);*/
++ } else {
++ ; /*md->saved_bklight_level = pn800_get_bklight_level(panel);*/
++ }
++
++
++ if (md->enabled) {
++ mutex_unlock(&md->mutex);
++ return 0;
++ }
++
++ set_sleep_mode(md, 0);
++ md->enabled = 1;
++ send_init_string(md);
++ set_display_state(md, 1);
++ //mipid_set_bklight_level(panel, md->saved_bklight_level);
++ //mipid_esd_start_check(md);
++
++ mutex_unlock(&md->mutex);
++ return 0;
++}
++
++static void pn800_panel_disable(struct omap_display *display)
++{
++ struct pn800_device *md =
++ (struct pn800_device *)display->panel->priv;
++
++ DBG("pn800_panel_disable\n");
++
++ mutex_lock(&md->mutex);
++
++ if (!md->enabled) {
++ mutex_unlock(&md->mutex);
++ return;
++ }
++ /*md->saved_bklight_level = pn800_get_bklight_level(panel);*/
++ /*pn800_set_bklight_level(panel, 0);*/
++
++ set_display_state(md, 0);
++ set_sleep_mode(md, 1);
++ md->enabled = 0;
++
++
++ if (display->hw_config.panel_disable)
++ display->hw_config.panel_disable(display);
++
++ mutex_unlock(&md->mutex);
++}
++
++static int pn800_panel_init(struct omap_display *display)
++{
++ struct pn800_device *md =
++ (struct pn800_device *)display->panel->priv;
++
++ DBG("pn800_panel_init\n");
++
++ mutex_init(&md->mutex);
++ md->display = display;
++
++ return 0;
++}
++
++static int pn800_run_test(struct omap_display *display, int test_num)
++{
++ return 0;
++}
++
++static struct omap_panel pn800_panel = {
++ .owner = THIS_MODULE,
++ .name = "panel-pn800",
++ .init = pn800_panel_init,
++ /*.remove = pn800_cleanup,*/
++ .enable = pn800_panel_enable,
++ .disable = pn800_panel_disable,
++ //.set_mode = pn800_set_mode,
++ .run_test = pn800_run_test,
++
++ .timings = {
++ .x_res = 800,
++ .y_res = 480,
++
++ .pixel_clock = 21940,
++ .hsw = 50,
++ .hfp = 20,
++ .hbp = 15,
++
++ .vsw = 2,
++ .vfp = 1,
++ .vbp = 3,
++ },
++ .config = OMAP_DSS_LCD_TFT,
++};
++
++static int pn800_spi_probe(struct spi_device *spi)
++{
++ struct pn800_device *md;
++
++ DBG("pn800_spi_probe\n");
++
++ md = kzalloc(sizeof(*md), GFP_KERNEL);
++ if (md == NULL) {
++ dev_err(&spi->dev, "out of memory\n");
++ return -ENOMEM;
++ }
++
++ spi->mode = SPI_MODE_0;
++ md->spi = spi;
++ dev_set_drvdata(&spi->dev, md);
++ md->panel = pn800_panel;
++ pn800_panel.priv = md;
++
++ omap_dss_register_panel(&pn800_panel);
++
++ return 0;
++}
++
++static int pn800_spi_remove(struct spi_device *spi)
++{
++ struct pn800_device *md = dev_get_drvdata(&spi->dev);
++
++ DBG("pn800_spi_remove\n");
++
++ omap_dss_unregister_panel(&pn800_panel);
++
++ /*pn800_disable(&md->panel);*/
++ kfree(md);
++
++ return 0;
++}
++
++static struct spi_driver pn800_spi_driver = {
++ .driver = {
++ .name = "panel-n800",
++ .bus = &spi_bus_type,
++ .owner = THIS_MODULE,
++ },
++ .probe = pn800_spi_probe,
++ .remove = __devexit_p(pn800_spi_remove),
++};
++
++static int __init pn800_init(void)
++{
++ DBG("pn800_init\n");
++ return spi_register_driver(&pn800_spi_driver);
++}
++
++static void __exit pn800_exit(void)
++{
++ DBG("pn800_exit\n");
++ spi_unregister_driver(&pn800_spi_driver);
++}
++
++module_init(pn800_init);
++module_exit(pn800_exit);
++
++MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
++MODULE_DESCRIPTION("N800 LCD Driver");
++MODULE_LICENSE("GPL");
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch
new file mode 100644
index 0000000000..62d653700e
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch
@@ -0,0 +1,5691 @@
+From 9292aae93419867b9d0fce5cf3b2697e9250f5b5 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 10:36:05 +0300
+Subject: [PATCH] DSS2: Add DSS2 support for SDP, Beagle, Overo, EVM
+
+Also custom dss_*_defconfigs as an example.
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ arch/arm/configs/dss_omap3_beagle_defconfig | 1371 ++++++++++++++++++++
+ arch/arm/configs/dss_omap_3430sdp_defconfig | 1634 +++++++++++++++++++++++
+ arch/arm/configs/dss_overo_defconfig | 1862 +++++++++++++++++++++++++++
+ arch/arm/mach-omap2/board-3430sdp.c | 227 ++++-
+ arch/arm/mach-omap2/board-omap3beagle.c | 95 ++-
+ arch/arm/mach-omap2/board-omap3evm.c | 217 +++-
+ arch/arm/mach-omap2/board-overo.c | 98 ++-
+ 7 files changed, 5475 insertions(+), 29 deletions(-)
+ create mode 100644 arch/arm/configs/dss_omap3_beagle_defconfig
+ create mode 100644 arch/arm/configs/dss_omap_3430sdp_defconfig
+ create mode 100644 arch/arm/configs/dss_overo_defconfig
+
+diff --git a/arch/arm/configs/dss_omap3_beagle_defconfig b/arch/arm/configs/dss_omap3_beagle_defconfig
+new file mode 100644
+index 0000000..7143168
+--- /dev/null
++++ b/arch/arm/configs/dss_omap3_beagle_defconfig
+@@ -0,0 +1,1371 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.29-omap1
++# Thu Apr 2 11:24:09 2009
++#
++CONFIG_ARM=y
++CONFIG_SYS_SUPPORTS_APM_EMULATION=y
++CONFIG_GENERIC_GPIO=y
++CONFIG_GENERIC_TIME=y
++CONFIG_GENERIC_CLOCKEVENTS=y
++CONFIG_MMU=y
++# CONFIG_NO_IOPORT is not set
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_HAVE_LATENCYTOP_SUPPORT=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++CONFIG_HARDIRQS_SW_RESEND=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++# CONFIG_ARCH_HAS_ILOG2_U32 is not set
++# CONFIG_ARCH_HAS_ILOG2_U64 is not set
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
++CONFIG_VECTORS_BASE=0xffff0000
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# General setup
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_BROKEN_ON_SMP=y
++CONFIG_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
++
++#
++# RCU Subsystem
++#
++CONFIG_CLASSIC_RCU=y
++# CONFIG_TREE_RCU is not set
++# CONFIG_PREEMPT_RCU is not set
++# CONFIG_TREE_RCU_TRACE is not set
++# CONFIG_PREEMPT_RCU_TRACE is not set
++# CONFIG_IKCONFIG is not set
++CONFIG_LOG_BUF_SHIFT=14
++CONFIG_GROUP_SCHED=y
++CONFIG_FAIR_GROUP_SCHED=y
++# CONFIG_RT_GROUP_SCHED is not set
++CONFIG_USER_SCHED=y
++# CONFIG_CGROUP_SCHED is not set
++# CONFIG_CGROUPS is not set
++CONFIG_SYSFS_DEPRECATED=y
++CONFIG_SYSFS_DEPRECATED_V2=y
++# CONFIG_RELAY is not set
++# CONFIG_NAMESPACES is not set
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++CONFIG_SYSCTL=y
++CONFIG_ANON_INODES=y
++CONFIG_EMBEDDED=y
++CONFIG_UID16=y
++# CONFIG_SYSCTL_SYSCALL is not set
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++CONFIG_KALLSYMS_EXTRA_PASS=y
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SIGNALFD=y
++CONFIG_TIMERFD=y
++CONFIG_EVENTFD=y
++CONFIG_SHMEM=y
++CONFIG_AIO=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_COMPAT_BRK=y
++CONFIG_SLAB=y
++# CONFIG_SLUB is not set
++# CONFIG_SLOB is not set
++# CONFIG_PROFILING is not set
++CONFIG_HAVE_OPROFILE=y
++# CONFIG_KPROBES is not set
++CONFIG_HAVE_KPROBES=y
++CONFIG_HAVE_KRETPROBES=y
++CONFIG_HAVE_CLK=y
++CONFIG_HAVE_GENERIC_DMA_COHERENT=y
++CONFIG_SLABINFO=y
++CONFIG_RT_MUTEXES=y
++CONFIG_BASE_SMALL=0
++CONFIG_MODULES=y
++# CONFIG_MODULE_FORCE_LOAD is not set
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++CONFIG_BLOCK=y
++# CONFIG_LBD is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++# CONFIG_BLK_DEV_BSG is not set
++# CONFIG_BLK_DEV_INTEGRITY is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++# CONFIG_FREEZER is not set
++
++#
++# System Type
++#
++# CONFIG_ARCH_AAEC2000 is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_REALVIEW is not set
++# CONFIG_ARCH_VERSATILE is not set
++# CONFIG_ARCH_AT91 is not set
++# CONFIG_ARCH_CLPS711X is not set
++# CONFIG_ARCH_EBSA110 is not set
++# CONFIG_ARCH_EP93XX is not set
++# CONFIG_ARCH_FOOTBRIDGE is not set
++# CONFIG_ARCH_NETX is not set
++# CONFIG_ARCH_H720X is not set
++# CONFIG_ARCH_IMX is not set
++# CONFIG_ARCH_IOP13XX is not set
++# CONFIG_ARCH_IOP32X is not set
++# CONFIG_ARCH_IOP33X is not set
++# CONFIG_ARCH_IXP23XX is not set
++# CONFIG_ARCH_IXP2000 is not set
++# CONFIG_ARCH_IXP4XX is not set
++# CONFIG_ARCH_L7200 is not set
++# CONFIG_ARCH_KIRKWOOD is not set
++# CONFIG_ARCH_KS8695 is not set
++# CONFIG_ARCH_NS9XXX is not set
++# CONFIG_ARCH_LOKI is not set
++# CONFIG_ARCH_MV78XX0 is not set
++# CONFIG_ARCH_MXC is not set
++# CONFIG_ARCH_ORION5X is not set
++# CONFIG_ARCH_PNX4008 is not set
++# CONFIG_ARCH_PXA is not set
++# CONFIG_ARCH_RPC is not set
++# CONFIG_ARCH_SA1100 is not set
++# CONFIG_ARCH_S3C2410 is not set
++# CONFIG_ARCH_S3C64XX is not set
++# CONFIG_ARCH_SHARK is not set
++# CONFIG_ARCH_LH7A40X is not set
++# CONFIG_ARCH_DAVINCI is not set
++CONFIG_ARCH_OMAP=y
++# CONFIG_ARCH_MSM is not set
++# CONFIG_ARCH_W90X900 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_POWERDOMAIN is not set
++# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
++# CONFIG_OMAP_SMARTREFLEX 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 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_TICK_GPTIMER=12
++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_NOKIA_RX51 is not set
++# CONFIG_MACH_OMAP_LDP is not set
++# CONFIG_MACH_OMAP_3430SDP is not set
++# CONFIG_MACH_OMAP3EVM is not set
++CONFIG_MACH_OMAP3_BEAGLE=y
++# CONFIG_MACH_OVERO is not set
++# CONFIG_MACH_OMAP3_PANDORA is not set
++
++#
++# 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_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=y
++CONFIG_NO_HZ=y
++CONFIG_HIGH_RES_TIMERS=y
++CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
++CONFIG_VMSPLIT_3G=y
++# CONFIG_VMSPLIT_2G is not set
++# CONFIG_VMSPLIT_1G is not set
++CONFIG_PAGE_OFFSET=0xC0000000
++# CONFIG_PREEMPT is not set
++CONFIG_HZ=128
++CONFIG_AEABI=y
++CONFIG_OABI_COMPAT=y
++CONFIG_ARCH_FLATMEM_HAS_HOLES=y
++# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
++# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++CONFIG_PAGEFLAGS_EXTENDED=y
++CONFIG_SPLIT_PTLOCK_CPUS=4
++# CONFIG_PHYS_ADDR_T_64BIT is not set
++CONFIG_ZONE_DMA_FLAG=0
++CONFIG_VIRT_TO_BUS=y
++CONFIG_UNEVICTABLE_LRU=y
++# CONFIG_LEDS is not set
++CONFIG_ALIGNMENT_TRAP=y
++
++#
++# Boot options
++#
++CONFIG_ZBOOT_ROM_TEXT=0x0
++CONFIG_ZBOOT_ROM_BSS=0x0
++CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.2.14:/tftpboot/rootfs ip=192.168.2.15 nolock,rsize=1024,wsize=1024 rw"
++# CONFIG_XIP_KERNEL is not set
++# CONFIG_KEXEC is not set
++
++#
++# CPU Power Management
++#
++# CONFIG_CPU_FREQ is not set
++# CONFIG_CPU_IDLE is not set
++
++#
++# Floating point emulation
++#
++
++#
++# At least one emulation must be selected
++#
++CONFIG_FPE_NWFPE=y
++# CONFIG_FPE_NWFPE_XP is not set
++# CONFIG_FPE_FASTFPE is not set
++CONFIG_VFP=y
++CONFIG_VFPv3=y
++# CONFIG_NEON is not set
++
++#
++# Userspace binary formats
++#
++CONFIG_BINFMT_ELF=y
++# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
++CONFIG_HAVE_AOUT=y
++# CONFIG_BINFMT_AOUT is not set
++CONFIG_BINFMT_MISC=y
++
++#
++# Power management options
++#
++CONFIG_PM=y
++# CONFIG_PM_DEBUG is not set
++# CONFIG_SUSPEND is not set
++# CONFIG_APM_EMULATION is not set
++CONFIG_ARCH_SUSPEND_POSSIBLE=y
++CONFIG_NET=y
++
++#
++# Networking options
++#
++CONFIG_COMPAT_NET_DEV_OPS=y
++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=y
++# CONFIG_NET_KEY_MIGRATE is not set
++CONFIG_INET=y
++# CONFIG_IP_MULTICAST is not set
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++CONFIG_IP_PNP_BOOTP=y
++CONFIG_IP_PNP_RARP=y
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_ARPD is not set
++# CONFIG_SYN_COOKIES is not set
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++CONFIG_INET_XFRM_MODE_BEET=y
++# CONFIG_INET_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_NETWORK_SECMARK is not set
++# CONFIG_NETFILTER is not set
++# CONFIG_IP_DCCP is not set
++# CONFIG_IP_SCTP is not set
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_NET_DSA is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++# CONFIG_NET_SCHED is not set
++# CONFIG_DCB is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_CAN is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_AF_RXRPC is not set
++# CONFIG_PHONET is not set
++CONFIG_WIRELESS=y
++# CONFIG_CFG80211 is not set
++CONFIG_WIRELESS_OLD_REGULATORY=y
++# CONFIG_WIRELESS_EXT is not set
++# CONFIG_LIB80211 is not set
++# CONFIG_MAC80211 is not set
++# CONFIG_WIMAX is not set
++# CONFIG_RFKILL is not set
++# CONFIG_NET_9P is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++# CONFIG_FW_LOADER is not set
++# CONFIG_DEBUG_DRIVER is not set
++# CONFIG_DEBUG_DEVRES is not set
++# CONFIG_SYS_HYPERVISOR is not set
++# CONFIG_CONNECTOR is not set
++CONFIG_MTD=y
++# CONFIG_MTD_DEBUG is not set
++# CONFIG_MTD_CONCAT is not set
++CONFIG_MTD_PARTITIONS=y
++# CONFIG_MTD_TESTS is not set
++# CONFIG_MTD_REDBOOT_PARTS is not set
++# CONFIG_MTD_CMDLINE_PARTS is not set
++# CONFIG_MTD_AFS_PARTS is not set
++# CONFIG_MTD_AR7_PARTS is not set
++
++#
++# User Modules And Translation Layers
++#
++CONFIG_MTD_CHAR=y
++CONFIG_MTD_BLKDEVS=y
++CONFIG_MTD_BLOCK=y
++# CONFIG_FTL is not set
++# CONFIG_NFTL is not set
++# CONFIG_INFTL is not set
++# CONFIG_RFD_FTL is not set
++# CONFIG_SSFDC is not set
++# CONFIG_MTD_OOPS is not set
++
++#
++# RAM/ROM/Flash chip drivers
++#
++# CONFIG_MTD_CFI is not set
++# CONFIG_MTD_JEDECPROBE is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++# CONFIG_MTD_RAM is not set
++# CONFIG_MTD_ROM is not set
++# CONFIG_MTD_ABSENT is not set
++
++#
++# Mapping drivers for chip access
++#
++# CONFIG_MTD_COMPLEX_MAPPINGS is not set
++# CONFIG_MTD_PLATRAM is not set
++
++#
++# Self-contained MTD device drivers
++#
++# CONFIG_MTD_SLRAM is not set
++# CONFIG_MTD_PHRAM is not set
++# CONFIG_MTD_MTDRAM is not set
++# CONFIG_MTD_BLOCK2MTD is not set
++
++#
++# Disk-On-Chip Device Drivers
++#
++# CONFIG_MTD_DOC2000 is not set
++# CONFIG_MTD_DOC2001 is not set
++# CONFIG_MTD_DOC2001PLUS is not set
++CONFIG_MTD_NAND=y
++# CONFIG_MTD_NAND_VERIFY_WRITE is not set
++# CONFIG_MTD_NAND_ECC_SMC is not set
++# CONFIG_MTD_NAND_MUSEUM_IDS is not set
++# CONFIG_MTD_NAND_GPIO is not set
++CONFIG_MTD_NAND_OMAP2=y
++CONFIG_MTD_NAND_IDS=y
++# CONFIG_MTD_NAND_DISKONCHIP is not set
++# CONFIG_MTD_NAND_NANDSIM is not set
++# CONFIG_MTD_NAND_PLATFORM is not set
++# CONFIG_MTD_ONENAND is not set
++
++#
++# LPDDR flash memory drivers
++#
++# CONFIG_MTD_LPDDR is not set
++
++#
++# UBI - Unsorted block images
++#
++# CONFIG_MTD_UBI is not set
++# CONFIG_PARPORT is not set
++CONFIG_BLK_DEV=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=16384
++# CONFIG_BLK_DEV_XIP is not set
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++# CONFIG_MISC_DEVICES 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 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_SRP_ATTRS is not set
++CONFIG_SCSI_LOWLEVEL=y
++# CONFIG_ISCSI_TCP is not set
++# CONFIG_LIBFC is not set
++# CONFIG_SCSI_DEBUG is not set
++# CONFIG_SCSI_DH is not set
++# CONFIG_ATA is not set
++# CONFIG_MD is not set
++CONFIG_NETDEVICES=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_MACVLAN is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++# CONFIG_VETH is not set
++# CONFIG_NET_ETHERNET is not set
++# CONFIG_NETDEV_1000 is not set
++# CONFIG_NETDEV_10000 is not set
++
++#
++# Wireless LAN
++#
++# CONFIG_WLAN_PRE80211 is not set
++# CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
++
++#
++# Enable WiMAX (Networking options) to see the WiMAX drivers
++#
++# CONFIG_WAN is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NETCONSOLE is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++# CONFIG_ISDN is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++# CONFIG_INPUT_FF_MEMLESS is not set
++# CONFIG_INPUT_POLLDEV is not set
++
++#
++# Userland interfaces
++#
++# CONFIG_INPUT_MOUSEDEV 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=y
++CONFIG_CONSOLE_TRANSLATIONS=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++CONFIG_DEVKMEM=y
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++CONFIG_SERIAL_8250=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_DEVPTS_MULTIPLE_INSTANCES is not set
++# CONFIG_LEGACY_PTYS is not set
++# CONFIG_IPMI_HANDLER is not set
++CONFIG_HW_RANDOM=y
++# 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
++CONFIG_I2C_HELPER_AUTO=y
++
++#
++# I2C Hardware Bus support
++#
++
++#
++# I2C system bus drivers (mostly embedded / system-on-chip)
++#
++# CONFIG_I2C_GPIO is not set
++# CONFIG_I2C_OCORES is not set
++CONFIG_I2C_OMAP=y
++# CONFIG_I2C_SIMTEC is not set
++
++#
++# External I2C/SMBus adapter drivers
++#
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_TAOS_EVM is not set
++
++#
++# Other I2C/SMBus bus drivers
++#
++# CONFIG_I2C_PCA_PLATFORM is not set
++# CONFIG_I2C_STUB is not set
++
++#
++# Miscellaneous I2C Chip support
++#
++# CONFIG_DS1682 is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_PCF8575 is not set
++# CONFIG_SENSORS_PCA9539 is not set
++# CONFIG_SENSORS_PCF8591 is not set
++# CONFIG_TWL4030_MADC is not set
++# CONFIG_TWL4030_POWEROFF 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_ARCH_REQUIRE_GPIOLIB=y
++CONFIG_GPIOLIB=y
++# CONFIG_DEBUG_GPIO is not set
++# CONFIG_GPIO_SYSFS is not set
++
++#
++# Memory mapped GPIO expanders:
++#
++
++#
++# I2C GPIO expanders:
++#
++# CONFIG_GPIO_MAX732X is not set
++# CONFIG_GPIO_PCA953X is not set
++# CONFIG_GPIO_PCF857X is not set
++CONFIG_GPIO_TWL4030=y
++
++#
++# PCI GPIO expanders:
++#
++
++#
++# SPI GPIO expanders:
++#
++# CONFIG_W1 is not set
++# CONFIG_POWER_SUPPLY is not set
++# CONFIG_HWMON is not set
++# CONFIG_THERMAL is not set
++# CONFIG_THERMAL_HWMON is not set
++# CONFIG_WATCHDOG is not set
++CONFIG_SSB_POSSIBLE=y
++
++#
++# Sonics Silicon Backplane
++#
++# CONFIG_SSB is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_CORE is not set
++# CONFIG_MFD_SM501 is not set
++# CONFIG_MFD_ASIC3 is not set
++# CONFIG_HTC_EGPIO is not set
++# CONFIG_HTC_PASIC3 is not set
++# CONFIG_TPS65010 is not set
++CONFIG_TWL4030_CORE=y
++# CONFIG_TWL4030_POWER is not set
++# CONFIG_MFD_TMIO is not set
++# CONFIG_MFD_T7L66XB is not set
++# CONFIG_MFD_TC6387XB is not set
++# CONFIG_MFD_TC6393XB is not set
++# CONFIG_PMIC_DA903X is not set
++# CONFIG_MFD_WM8400 is not set
++# CONFIG_MFD_WM8350_I2C is not set
++# CONFIG_MFD_PCF50633 is not set
++
++#
++# 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
++
++#
++# Graphics support
++#
++# CONFIG_VGASTATE is not set
++# CONFIG_VIDEO_OUTPUT_CONTROL is not set
++CONFIG_FB=y
++# CONFIG_FIRMWARE_EDID is not set
++# CONFIG_FB_DDC is not set
++# CONFIG_FB_BOOT_VESA_SUPPORT is not set
++CONFIG_FB_CFB_FILLRECT=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_FOREIGN_ENDIAN is not set
++# CONFIG_FB_SYS_FOPS is not set
++# CONFIG_FB_SVGALIB is not set
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++# CONFIG_FB_MODE_HELPERS is not set
++# CONFIG_FB_TILEBLITTING is not set
++
++#
++# Frame buffer hardware drivers
++#
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_VIRTUAL is not set
++# CONFIG_FB_METRONOME is not set
++# CONFIG_FB_MB862XX is not set
++# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
++CONFIG_OMAP2_DSS=m
++CONFIG_OMAP2_DSS_VRAM_SIZE=12
++CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
++# CONFIG_OMAP2_DSS_RFBI is not set
++CONFIG_OMAP2_DSS_VENC=y
++# CONFIG_OMAP2_DSS_SDI is not set
++# CONFIG_OMAP2_DSS_DSI is not set
++# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
++CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
++
++#
++# OMAP2/3 Display Device Drivers
++#
++CONFIG_PANEL_GENERIC=m
++# CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C is not set
++# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
++# CONFIG_PANEL_N800 is not set
++# CONFIG_CTRL_BLIZZARD is not set
++CONFIG_FB_OMAP2=m
++CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
++# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
++CONFIG_FB_OMAP2_NUM_FBS=3
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Display device support
++#
++# CONFIG_DISPLAY_SUPPORT is not set
++
++#
++# Console display driver support
++#
++# CONFIG_VGA_CONSOLE is not set
++CONFIG_DUMMY_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE is not set
++# CONFIG_LOGO is not set
++# CONFIG_SOUND is not set
++# CONFIG_HID_SUPPORT is not set
++CONFIG_USB_SUPPORT=y
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++# CONFIG_USB is not set
++# CONFIG_USB_OTG_WHITELIST is not set
++# CONFIG_USB_OTG_BLACKLIST_HUB is not set
++CONFIG_USB_MUSB_HDRC=y
++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_GADGET_MUSB_HDRC=y
++# CONFIG_MUSB_PIO_ONLY is not set
++CONFIG_USB_INVENTRA_DMA=y
++# CONFIG_USB_TI_CPPI_DMA is not set
++# CONFIG_USB_MUSB_DEBUG is not set
++
++#
++# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
++#
++CONFIG_USB_GADGET=y
++# CONFIG_USB_GADGET_DEBUG is not set
++# CONFIG_USB_GADGET_DEBUG_FILES is not set
++# CONFIG_USB_GADGET_DEBUG_FS is not set
++CONFIG_USB_GADGET_VBUS_DRAW=2
++CONFIG_USB_GADGET_SELECTED=y
++# CONFIG_USB_GADGET_AT91 is not set
++# CONFIG_USB_GADGET_ATMEL_USBA is not set
++# CONFIG_USB_GADGET_FSL_USB2 is not set
++# CONFIG_USB_GADGET_LH7A40X is not set
++# CONFIG_USB_GADGET_OMAP is not set
++# CONFIG_USB_GADGET_PXA25X is not set
++# CONFIG_USB_GADGET_PXA27X is not set
++# CONFIG_USB_GADGET_S3C2410 is not set
++# CONFIG_USB_GADGET_IMX is not set
++# CONFIG_USB_GADGET_M66592 is not set
++# CONFIG_USB_GADGET_AMD5536UDC is not set
++# CONFIG_USB_GADGET_FSL_QE is not set
++# CONFIG_USB_GADGET_CI13XXX is not set
++# CONFIG_USB_GADGET_NET2280 is not set
++# CONFIG_USB_GADGET_GOKU is not set
++# CONFIG_USB_GADGET_DUMMY_HCD is not set
++CONFIG_USB_GADGET_DUALSPEED=y
++# 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_USB_G_PRINTER is not set
++# CONFIG_USB_CDC_COMPOSITE is not set
++
++#
++# OTG and related infrastructure
++#
++CONFIG_USB_OTG_UTILS=y
++# CONFIG_USB_GPIO_VBUS is not set
++# CONFIG_ISP1301_OMAP is not set
++CONFIG_TWL4030_USB=y
++CONFIG_MMC=y
++# CONFIG_MMC_DEBUG is not set
++# CONFIG_MMC_UNSAFE_RESUME is not set
++
++#
++# MMC/SD/SDIO Card Drivers
++#
++CONFIG_MMC_BLOCK=y
++CONFIG_MMC_BLOCK_BOUNCE=y
++# CONFIG_SDIO_UART is not set
++# CONFIG_MMC_TEST is not set
++
++#
++# MMC/SD/SDIO Host Controller Drivers
++#
++# CONFIG_MMC_SDHCI is not set
++CONFIG_MMC_OMAP_HS=y
++# CONFIG_MEMSTICK is not set
++# CONFIG_ACCESSIBILITY is not set
++# CONFIG_NEW_LEDS is not set
++CONFIG_RTC_LIB=y
++CONFIG_RTC_CLASS=y
++CONFIG_RTC_HCTOSYS=y
++CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
++# CONFIG_RTC_DEBUG is not set
++
++#
++# RTC interfaces
++#
++CONFIG_RTC_INTF_SYSFS=y
++CONFIG_RTC_INTF_PROC=y
++CONFIG_RTC_INTF_DEV=y
++# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
++# CONFIG_RTC_DRV_TEST is not set
++
++#
++# I2C RTC drivers
++#
++# CONFIG_RTC_DRV_DS1307 is not set
++# CONFIG_RTC_DRV_DS1374 is not set
++# CONFIG_RTC_DRV_DS1672 is not set
++# CONFIG_RTC_DRV_MAX6900 is not set
++# CONFIG_RTC_DRV_RS5C372 is not set
++# CONFIG_RTC_DRV_ISL1208 is not set
++# CONFIG_RTC_DRV_X1205 is not set
++# CONFIG_RTC_DRV_PCF8563 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
++# CONFIG_RTC_DRV_FM3130 is not set
++# CONFIG_RTC_DRV_RX8581 is not set
++
++#
++# SPI RTC drivers
++#
++
++#
++# Platform RTC drivers
++#
++# CONFIG_RTC_DRV_CMOS is not set
++# CONFIG_RTC_DRV_DS1286 is not set
++# CONFIG_RTC_DRV_DS1511 is not set
++# CONFIG_RTC_DRV_DS1553 is not set
++# CONFIG_RTC_DRV_DS1742 is not set
++# CONFIG_RTC_DRV_STK17TA8 is not set
++# CONFIG_RTC_DRV_M48T86 is not set
++# CONFIG_RTC_DRV_M48T35 is not set
++# CONFIG_RTC_DRV_M48T59 is not set
++# CONFIG_RTC_DRV_BQ4802 is not set
++# CONFIG_RTC_DRV_V3020 is not set
++
++#
++# on-CPU RTC drivers
++#
++# CONFIG_DMADEVICES is not set
++CONFIG_REGULATOR=y
++# CONFIG_REGULATOR_DEBUG is not set
++# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
++# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
++# CONFIG_REGULATOR_BQ24022 is not set
++CONFIG_REGULATOR_TWL4030=y
++# CONFIG_UIO is not set
++# CONFIG_STAGING 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_EXT4_FS is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++# CONFIG_REISERFS_FS is not set
++# CONFIG_JFS_FS is not set
++# CONFIG_FS_POSIX_ACL is not set
++CONFIG_FILE_LOCKING=y
++# CONFIG_XFS_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_BTRFS_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_QUOTA_TREE=y
++# CONFIG_QFMT_V1 is not set
++CONFIG_QFMT_V2=y
++CONFIG_QUOTACTL=y
++# CONFIG_AUTOFS_FS is not set
++# CONFIG_AUTOFS4_FS is not set
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++# CONFIG_ISO9660_FS is not set
++# CONFIG_UDF_FS is not set
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_SYSCTL=y
++CONFIG_PROC_PAGE_MONITOR=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_TMPFS_POSIX_ACL is not set
++# CONFIG_HUGETLB_PAGE is not set
++# CONFIG_CONFIGFS_FS is not set
++CONFIG_MISC_FILESYSTEMS=y
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_JFFS2_FS=y
++CONFIG_JFFS2_FS_DEBUG=0
++CONFIG_JFFS2_FS_WRITEBUFFER=y
++# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
++# CONFIG_JFFS2_SUMMARY is not set
++# CONFIG_JFFS2_FS_XATTR is not set
++# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
++CONFIG_JFFS2_ZLIB=y
++# CONFIG_JFFS2_LZO is not set
++CONFIG_JFFS2_RTIME=y
++# CONFIG_JFFS2_RUBIN is not set
++# CONFIG_CRAMFS is not set
++# CONFIG_SQUASHFS is not set
++# CONFIG_VXFS_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_OMFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_ROMFS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++CONFIG_NETWORK_FILESYSTEMS=y
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++CONFIG_NFS_V4=y
++CONFIG_ROOT_NFS=y
++# CONFIG_NFSD is not set
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++# CONFIG_SUNRPC_REGISTER_V4 is not set
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++# CONFIG_SMB_FS 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
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++# CONFIG_NLS_CODEPAGE_737 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++# CONFIG_NLS_CODEPAGE_850 is not set
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++# CONFIG_NLS_CODEPAGE_1250 is not set
++# CONFIG_NLS_CODEPAGE_1251 is not set
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++# CONFIG_NLS_ISO8859_2 is not set
++# CONFIG_NLS_ISO8859_3 is not set
++# CONFIG_NLS_ISO8859_4 is not set
++# CONFIG_NLS_ISO8859_5 is not set
++# CONFIG_NLS_ISO8859_6 is not set
++# CONFIG_NLS_ISO8859_7 is not set
++# CONFIG_NLS_ISO8859_9 is not set
++# CONFIG_NLS_ISO8859_13 is not set
++# CONFIG_NLS_ISO8859_14 is not set
++# CONFIG_NLS_ISO8859_15 is not set
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++# CONFIG_NLS_UTF8 is not set
++# CONFIG_DLM is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_ENABLE_WARN_DEPRECATED=y
++CONFIG_ENABLE_MUST_CHECK=y
++CONFIG_FRAME_WARN=1024
++CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
++CONFIG_DEBUG_FS=y
++# CONFIG_HEADERS_CHECK is not set
++CONFIG_DEBUG_KERNEL=y
++# CONFIG_DEBUG_SHIRQ is not set
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
++CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
++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=y
++CONFIG_DEBUG_INFO=y
++# CONFIG_DEBUG_VM is not set
++# CONFIG_DEBUG_WRITECOUNT is not set
++# CONFIG_DEBUG_MEMORY_INIT is not set
++# CONFIG_DEBUG_LIST is not set
++# CONFIG_DEBUG_SG is not set
++# CONFIG_DEBUG_NOTIFIERS is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_BOOT_PRINTK_DELAY is not set
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_RCU_CPU_STALL_DETECTOR is not set
++# CONFIG_BACKTRACE_SELF_TEST is not set
++# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
++# CONFIG_FAULT_INJECTION is not set
++# CONFIG_LATENCYTOP is not set
++CONFIG_HAVE_FUNCTION_TRACER=y
++
++#
++# Tracers
++#
++# CONFIG_FUNCTION_TRACER is not set
++# CONFIG_IRQSOFF_TRACER is not set
++# CONFIG_SCHED_TRACER is not set
++# CONFIG_CONTEXT_SWITCH_TRACER is not set
++# CONFIG_BOOT_TRACER is not set
++# CONFIG_TRACE_BRANCH_PROFILING is not set
++# CONFIG_STACK_TRACER is not set
++# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
++# CONFIG_SAMPLES is not set
++CONFIG_HAVE_ARCH_KGDB=y
++# CONFIG_KGDB is not set
++CONFIG_DEBUG_USER=y
++CONFIG_DEBUG_ERRORS=y
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_LL is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++# CONFIG_SECURITYFS is not set
++# CONFIG_SECURITY_FILE_CAPABILITIES is not set
++CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
++# CONFIG_CRYPTO_FIPS is not set
++CONFIG_CRYPTO_ALGAPI=y
++CONFIG_CRYPTO_ALGAPI2=y
++CONFIG_CRYPTO_AEAD2=y
++CONFIG_CRYPTO_BLKCIPHER=y
++CONFIG_CRYPTO_BLKCIPHER2=y
++CONFIG_CRYPTO_HASH=y
++CONFIG_CRYPTO_HASH2=y
++CONFIG_CRYPTO_RNG2=y
++CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_MANAGER2=y
++# CONFIG_CRYPTO_GF128MUL is not set
++# CONFIG_CRYPTO_NULL 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=y
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=y
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_RMD128 is not set
++# CONFIG_CRYPTO_RMD160 is not set
++# CONFIG_CRYPTO_RMD256 is not set
++# CONFIG_CRYPTO_RMD320 is not set
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++# CONFIG_CRYPTO_WP512 is not set
++
++#
++# Ciphers
++#
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_CAMELLIA is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++CONFIG_CRYPTO_DES=y
++# CONFIG_CRYPTO_FCRYPT is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_SALSA20 is not set
++# CONFIG_CRYPTO_SEED is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++
++#
++# Compression
++#
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_LZO is not set
++
++#
++# Random Number Generation
++#
++# CONFIG_CRYPTO_ANSI_CPRNG is not set
++CONFIG_CRYPTO_HW=y
++
++#
++# Library routines
++#
++CONFIG_BITREVERSE=y
++CONFIG_GENERIC_FIND_LAST_BIT=y
++CONFIG_CRC_CCITT=y
++# CONFIG_CRC16 is not set
++# CONFIG_CRC_T10DIF is not set
++# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC32=y
++# CONFIG_CRC7 is not set
++CONFIG_LIBCRC32C=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/arch/arm/configs/dss_omap_3430sdp_defconfig b/arch/arm/configs/dss_omap_3430sdp_defconfig
+new file mode 100644
+index 0000000..dc30dce
+--- /dev/null
++++ b/arch/arm/configs/dss_omap_3430sdp_defconfig
+@@ -0,0 +1,1634 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.29-omap1
++# Thu Apr 2 11:11:24 2009
++#
++CONFIG_ARM=y
++CONFIG_SYS_SUPPORTS_APM_EMULATION=y
++CONFIG_GENERIC_GPIO=y
++CONFIG_GENERIC_TIME=y
++CONFIG_GENERIC_CLOCKEVENTS=y
++CONFIG_MMU=y
++# CONFIG_NO_IOPORT is not set
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_HAVE_LATENCYTOP_SUPPORT=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++CONFIG_HARDIRQS_SW_RESEND=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++# CONFIG_ARCH_HAS_ILOG2_U32 is not set
++# CONFIG_ARCH_HAS_ILOG2_U64 is not set
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
++CONFIG_VECTORS_BASE=0xffff0000
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# General setup
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_BROKEN_ON_SMP=y
++CONFIG_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
++
++#
++# RCU Subsystem
++#
++CONFIG_CLASSIC_RCU=y
++# CONFIG_TREE_RCU is not set
++# CONFIG_PREEMPT_RCU is not set
++# CONFIG_TREE_RCU_TRACE is not set
++# CONFIG_PREEMPT_RCU_TRACE is not set
++# CONFIG_IKCONFIG is not set
++CONFIG_LOG_BUF_SHIFT=14
++CONFIG_GROUP_SCHED=y
++CONFIG_FAIR_GROUP_SCHED=y
++# CONFIG_RT_GROUP_SCHED is not set
++CONFIG_USER_SCHED=y
++# CONFIG_CGROUP_SCHED is not set
++# CONFIG_CGROUPS is not set
++CONFIG_SYSFS_DEPRECATED=y
++CONFIG_SYSFS_DEPRECATED_V2=y
++# CONFIG_RELAY is not set
++# CONFIG_NAMESPACES is not set
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++CONFIG_SYSCTL=y
++CONFIG_ANON_INODES=y
++CONFIG_EMBEDDED=y
++CONFIG_UID16=y
++# CONFIG_SYSCTL_SYSCALL is not set
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++CONFIG_KALLSYMS_EXTRA_PASS=y
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SIGNALFD=y
++CONFIG_TIMERFD=y
++CONFIG_EVENTFD=y
++CONFIG_SHMEM=y
++CONFIG_AIO=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_COMPAT_BRK=y
++CONFIG_SLAB=y
++# CONFIG_SLUB is not set
++# CONFIG_SLOB is not set
++# CONFIG_PROFILING is not set
++CONFIG_HAVE_OPROFILE=y
++# CONFIG_KPROBES is not set
++CONFIG_HAVE_KPROBES=y
++CONFIG_HAVE_KRETPROBES=y
++CONFIG_HAVE_CLK=y
++CONFIG_HAVE_GENERIC_DMA_COHERENT=y
++CONFIG_SLABINFO=y
++CONFIG_RT_MUTEXES=y
++CONFIG_BASE_SMALL=0
++CONFIG_MODULES=y
++# CONFIG_MODULE_FORCE_LOAD is not set
++CONFIG_MODULE_UNLOAD=y
++# CONFIG_MODULE_FORCE_UNLOAD is not set
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++CONFIG_BLOCK=y
++# CONFIG_LBD is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++# CONFIG_BLK_DEV_BSG is not set
++# CONFIG_BLK_DEV_INTEGRITY is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++CONFIG_FREEZER=y
++
++#
++# System Type
++#
++# CONFIG_ARCH_AAEC2000 is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_REALVIEW is not set
++# CONFIG_ARCH_VERSATILE is not set
++# CONFIG_ARCH_AT91 is not set
++# CONFIG_ARCH_CLPS711X is not set
++# CONFIG_ARCH_EBSA110 is not set
++# CONFIG_ARCH_EP93XX is not set
++# CONFIG_ARCH_FOOTBRIDGE is not set
++# CONFIG_ARCH_NETX is not set
++# CONFIG_ARCH_H720X is not set
++# CONFIG_ARCH_IMX is not set
++# CONFIG_ARCH_IOP13XX is not set
++# CONFIG_ARCH_IOP32X is not set
++# CONFIG_ARCH_IOP33X is not set
++# CONFIG_ARCH_IXP23XX is not set
++# CONFIG_ARCH_IXP2000 is not set
++# CONFIG_ARCH_IXP4XX is not set
++# CONFIG_ARCH_L7200 is not set
++# CONFIG_ARCH_KIRKWOOD is not set
++# CONFIG_ARCH_KS8695 is not set
++# CONFIG_ARCH_NS9XXX is not set
++# CONFIG_ARCH_LOKI is not set
++# CONFIG_ARCH_MV78XX0 is not set
++# CONFIG_ARCH_MXC is not set
++# CONFIG_ARCH_ORION5X is not set
++# CONFIG_ARCH_PNX4008 is not set
++# CONFIG_ARCH_PXA is not set
++# CONFIG_ARCH_RPC is not set
++# CONFIG_ARCH_SA1100 is not set
++# CONFIG_ARCH_S3C2410 is not set
++# CONFIG_ARCH_S3C64XX is not set
++# CONFIG_ARCH_SHARK is not set
++# CONFIG_ARCH_LH7A40X is not set
++# CONFIG_ARCH_DAVINCI is not set
++CONFIG_ARCH_OMAP=y
++# CONFIG_ARCH_MSM is not set
++# CONFIG_ARCH_W90X900 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_POWERDOMAIN is not set
++# CONFIG_OMAP_DEBUG_CLOCKDOMAIN 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=y
++CONFIG_OMAP_MUX_DEBUG=y
++CONFIG_OMAP_MUX_WARNINGS=y
++# CONFIG_OMAP_MCBSP 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_TICK_GPTIMER=1
++CONFIG_OMAP_DM_TIMER=y
++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
++CONFIG_ARCH_OMAP34XX=y
++CONFIG_ARCH_OMAP3430=y
++
++#
++# OMAP Board Type
++#
++# CONFIG_MACH_NOKIA_RX51 is not set
++# CONFIG_MACH_OMAP_LDP is not set
++CONFIG_MACH_OMAP_3430SDP=y
++# CONFIG_MACH_OMAP3EVM is not set
++# CONFIG_MACH_OMAP3_BEAGLE is not set
++# CONFIG_MACH_OVERO is not set
++# CONFIG_MACH_OMAP3_PANDORA is not set
++
++#
++# 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_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=y
++CONFIG_NO_HZ=y
++CONFIG_HIGH_RES_TIMERS=y
++CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
++CONFIG_VMSPLIT_3G=y
++# CONFIG_VMSPLIT_2G is not set
++# CONFIG_VMSPLIT_1G is not set
++CONFIG_PAGE_OFFSET=0xC0000000
++# CONFIG_PREEMPT is not set
++CONFIG_HZ=128
++CONFIG_AEABI=y
++CONFIG_OABI_COMPAT=y
++CONFIG_ARCH_FLATMEM_HAS_HOLES=y
++# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
++# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++CONFIG_PAGEFLAGS_EXTENDED=y
++CONFIG_SPLIT_PTLOCK_CPUS=4
++# CONFIG_PHYS_ADDR_T_64BIT is not set
++CONFIG_ZONE_DMA_FLAG=0
++CONFIG_VIRT_TO_BUS=y
++CONFIG_UNEVICTABLE_LRU=y
++# CONFIG_LEDS is not set
++CONFIG_ALIGNMENT_TRAP=y
++
++#
++# Boot options
++#
++CONFIG_ZBOOT_ROM_TEXT=0x0
++CONFIG_ZBOOT_ROM_BSS=0x0
++CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/home/user/buildroot ip=192.168.0.2:192.168.0.1:192.168.0.1:255.255.255.0:tgt:eth0:off rw console=ttyS2,115200n8"
++# CONFIG_XIP_KERNEL is not set
++# CONFIG_KEXEC is not set
++
++#
++# CPU Power Management
++#
++# CONFIG_CPU_FREQ is not set
++# CONFIG_CPU_IDLE is not set
++
++#
++# Floating point emulation
++#
++
++#
++# At least one emulation must be selected
++#
++CONFIG_FPE_NWFPE=y
++# CONFIG_FPE_NWFPE_XP is not set
++# CONFIG_FPE_FASTFPE is not set
++CONFIG_VFP=y
++CONFIG_VFPv3=y
++# CONFIG_NEON is not set
++
++#
++# Userspace binary formats
++#
++CONFIG_BINFMT_ELF=y
++# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
++CONFIG_HAVE_AOUT=y
++# CONFIG_BINFMT_AOUT 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
++CONFIG_NET=y
++
++#
++# Networking options
++#
++CONFIG_COMPAT_NET_DEV_OPS=y
++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=y
++# CONFIG_NET_KEY_MIGRATE is not set
++CONFIG_INET=y
++# CONFIG_IP_MULTICAST is not set
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++CONFIG_IP_PNP_BOOTP=y
++CONFIG_IP_PNP_RARP=y
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_ARPD is not set
++# CONFIG_SYN_COOKIES is not set
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++CONFIG_INET_XFRM_MODE_BEET=y
++# CONFIG_INET_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_NETWORK_SECMARK is not set
++# CONFIG_NETFILTER is not set
++# CONFIG_IP_DCCP is not set
++# CONFIG_IP_SCTP is not set
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_NET_DSA is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++# CONFIG_NET_SCHED is not set
++# CONFIG_DCB is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_CAN is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT is not set
++# CONFIG_AF_RXRPC is not set
++# CONFIG_PHONET is not set
++CONFIG_WIRELESS=y
++# CONFIG_CFG80211 is not set
++CONFIG_WIRELESS_OLD_REGULATORY=y
++# CONFIG_WIRELESS_EXT is not set
++# CONFIG_LIB80211 is not set
++# CONFIG_MAC80211 is not set
++# CONFIG_WIMAX is not set
++# CONFIG_RFKILL is not set
++# CONFIG_NET_9P is not set
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++# CONFIG_FW_LOADER is not set
++# 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_TESTS is not set
++# CONFIG_MTD_REDBOOT_PARTS is not set
++CONFIG_MTD_CMDLINE_PARTS=y
++# CONFIG_MTD_AFS_PARTS is not set
++# CONFIG_MTD_AR7_PARTS is not set
++
++#
++# User Modules And Translation Layers
++#
++CONFIG_MTD_CHAR=y
++CONFIG_MTD_BLKDEVS=y
++CONFIG_MTD_BLOCK=y
++# CONFIG_FTL is not set
++# CONFIG_NFTL is not set
++# CONFIG_INFTL is not set
++# CONFIG_RFD_FTL is not set
++# CONFIG_SSFDC is not set
++# CONFIG_MTD_OOPS is not set
++
++#
++# RAM/ROM/Flash chip drivers
++#
++CONFIG_MTD_CFI=y
++# CONFIG_MTD_JEDECPROBE is not set
++CONFIG_MTD_GEN_PROBE=y
++# CONFIG_MTD_CFI_ADV_OPTIONS is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++CONFIG_MTD_CFI_INTELEXT=y
++# CONFIG_MTD_CFI_AMDSTD 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=y
++# CONFIG_MTD_NAND_VERIFY_WRITE is not set
++CONFIG_MTD_NAND_ECC_SMC=y
++# CONFIG_MTD_NAND_MUSEUM_IDS is not set
++# CONFIG_MTD_NAND_GPIO is not set
++CONFIG_MTD_NAND_OMAP2=y
++CONFIG_MTD_NAND_IDS=y
++# CONFIG_MTD_NAND_DISKONCHIP is not set
++# CONFIG_MTD_NAND_NANDSIM is not set
++# CONFIG_MTD_NAND_PLATFORM is not set
++# CONFIG_MTD_ALAUDA is not set
++CONFIG_MTD_ONENAND=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
++
++#
++# LPDDR flash memory drivers
++#
++# CONFIG_MTD_LPDDR is not set
++
++#
++# UBI - Unsorted block images
++#
++# CONFIG_MTD_UBI is not set
++# CONFIG_PARPORT is not set
++CONFIG_BLK_DEV=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_ICS932S401 is not set
++# CONFIG_OMAP_STI is not set
++# CONFIG_ENCLOSURE_SERVICES is not set
++# CONFIG_C2PORT is not set
++
++#
++# EEPROM support
++#
++# CONFIG_EEPROM_AT24 is not set
++# CONFIG_EEPROM_AT25 is not set
++# CONFIG_EEPROM_LEGACY is not set
++# CONFIG_EEPROM_93CX6 is not set
++CONFIG_HAVE_IDE=y
++# CONFIG_IDE is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=y
++CONFIG_SCSI_DMA=y
++# CONFIG_SCSI_TGT is not set
++# CONFIG_SCSI_NETLINK is not set
++CONFIG_SCSI_PROC_FS=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_SRP_ATTRS is not set
++CONFIG_SCSI_LOWLEVEL=y
++# CONFIG_ISCSI_TCP is not set
++# CONFIG_LIBFC is not set
++# CONFIG_SCSI_DEBUG is not set
++# CONFIG_SCSI_DH is not set
++# CONFIG_ATA is not set
++# CONFIG_MD is not set
++CONFIG_NETDEVICES=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_MACVLAN is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++# CONFIG_VETH is not set
++# CONFIG_PHYLIB is not set
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# CONFIG_AX88796 is not set
++CONFIG_SMC91X=y
++# CONFIG_DM9000 is not set
++# CONFIG_ENC28J60 is not set
++# CONFIG_SMC911X is not set
++# CONFIG_SMSC911X is not set
++# CONFIG_DNET is not set
++# CONFIG_IBM_NEW_EMAC_ZMII is not set
++# CONFIG_IBM_NEW_EMAC_RGMII is not set
++# CONFIG_IBM_NEW_EMAC_TAH is not set
++# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
++# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
++# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
++# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
++# CONFIG_B44 is not set
++CONFIG_NETDEV_1000=y
++CONFIG_NETDEV_10000=y
++
++#
++# Wireless LAN
++#
++# CONFIG_WLAN_PRE80211 is not set
++# CONFIG_WLAN_80211 is not set
++# CONFIG_IWLWIFI_LEDS is not set
++
++#
++# Enable WiMAX (Networking options) to see the WiMAX drivers
++#
++
++#
++# USB Network Adapters
++#
++# CONFIG_USB_CATC is not set
++# CONFIG_USB_KAWETH is not set
++# CONFIG_USB_PEGASUS is not set
++# CONFIG_USB_RTL8150 is not set
++# CONFIG_USB_USBNET is not set
++# CONFIG_WAN is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NETCONSOLE is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++# CONFIG_ISDN is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++# CONFIG_INPUT_FF_MEMLESS is not set
++# CONFIG_INPUT_POLLDEV is not set
++
++#
++# Userland interfaces
++#
++# CONFIG_INPUT_MOUSEDEV is not set
++# CONFIG_INPUT_JOYDEV is not set
++CONFIG_INPUT_EVDEV=y
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++# CONFIG_KEYBOARD_ATKBD is not set
++# CONFIG_KEYBOARD_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_TWL4030=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_ADS7846=y
++# CONFIG_TOUCHSCREEN_FUJITSU is not set
++# CONFIG_TOUCHSCREEN_GUNZE is not set
++# CONFIG_TOUCHSCREEN_ELO is not set
++# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
++# CONFIG_TOUCHSCREEN_MTOUCH is not set
++# CONFIG_TOUCHSCREEN_INEXIO is not set
++# CONFIG_TOUCHSCREEN_MK712 is not set
++# CONFIG_TOUCHSCREEN_PENMOUNT is not set
++# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
++# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
++# CONFIG_TOUCHSCREEN_TSC2005 is not set
++# CONFIG_TOUCHSCREEN_TSC210X is not set
++# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
++# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
++# CONFIG_TOUCHSCREEN_TSC2007 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_CONSOLE_TRANSLATIONS=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++CONFIG_DEVKMEM=y
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++CONFIG_SERIAL_8250=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_DEVPTS_MULTIPLE_INSTANCES is not set
++# CONFIG_LEGACY_PTYS is not set
++# CONFIG_IPMI_HANDLER is not set
++CONFIG_HW_RANDOM=y
++# 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
++CONFIG_I2C_HELPER_AUTO=y
++
++#
++# I2C Hardware Bus support
++#
++
++#
++# I2C system bus drivers (mostly embedded / system-on-chip)
++#
++# CONFIG_I2C_GPIO is not set
++# CONFIG_I2C_OCORES is not set
++CONFIG_I2C_OMAP=y
++# CONFIG_I2C_SIMTEC is not set
++
++#
++# External I2C/SMBus adapter drivers
++#
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_TAOS_EVM is not set
++# CONFIG_I2C_TINY_USB is not set
++
++#
++# Other I2C/SMBus bus drivers
++#
++# CONFIG_I2C_PCA_PLATFORM is not set
++# CONFIG_I2C_STUB is not set
++
++#
++# Miscellaneous I2C Chip support
++#
++# CONFIG_DS1682 is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_PCF8575 is not set
++# CONFIG_SENSORS_PCA9539 is not set
++# CONFIG_SENSORS_PCF8591 is not set
++# CONFIG_TWL4030_MADC is not set
++# CONFIG_TWL4030_POWEROFF 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=y
++# CONFIG_SPI_DEBUG is not set
++CONFIG_SPI_MASTER=y
++
++#
++# SPI Master Controller Drivers
++#
++# CONFIG_SPI_BITBANG is not set
++# CONFIG_SPI_GPIO is not set
++CONFIG_SPI_OMAP24XX=y
++
++#
++# SPI Protocol Masters
++#
++# 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_ARCH_REQUIRE_GPIOLIB=y
++CONFIG_GPIOLIB=y
++# CONFIG_DEBUG_GPIO is not set
++# CONFIG_GPIO_SYSFS is not set
++
++#
++# Memory mapped GPIO expanders:
++#
++
++#
++# I2C GPIO expanders:
++#
++# CONFIG_GPIO_MAX732X is not set
++# CONFIG_GPIO_PCA953X is not set
++# CONFIG_GPIO_PCF857X is not set
++CONFIG_GPIO_TWL4030=y
++
++#
++# PCI GPIO expanders:
++#
++
++#
++# SPI GPIO expanders:
++#
++# CONFIG_GPIO_MAX7301 is not set
++# CONFIG_GPIO_MCP23S08 is not set
++# CONFIG_W1 is not set
++# CONFIG_POWER_SUPPLY is not set
++# CONFIG_HWMON is not set
++# CONFIG_THERMAL is not set
++# CONFIG_THERMAL_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
++CONFIG_SSB_POSSIBLE=y
++
++#
++# Sonics Silicon Backplane
++#
++# CONFIG_SSB is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_CORE is not set
++# CONFIG_MFD_SM501 is not set
++# CONFIG_MFD_ASIC3 is not set
++# CONFIG_HTC_EGPIO is not set
++# CONFIG_HTC_PASIC3 is not set
++# CONFIG_TPS65010 is not set
++CONFIG_TWL4030_CORE=y
++# CONFIG_TWL4030_POWER is not set
++# CONFIG_MFD_TMIO is not set
++# CONFIG_MFD_T7L66XB is not set
++# CONFIG_MFD_TC6387XB is not set
++# CONFIG_MFD_TC6393XB is not set
++# CONFIG_PMIC_DA903X is not set
++# CONFIG_MFD_WM8400 is not set
++# CONFIG_MFD_WM8350_I2C is not set
++# CONFIG_MFD_PCF50633 is not set
++
++#
++# 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 is not set
++# CONFIG_FB_DDC is not set
++# CONFIG_FB_BOOT_VESA_SUPPORT 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_FOREIGN_ENDIAN is not set
++# CONFIG_FB_SYS_FOPS is not set
++# CONFIG_FB_SVGALIB is not set
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++# CONFIG_FB_MODE_HELPERS is not set
++# CONFIG_FB_TILEBLITTING is not set
++
++#
++# Frame buffer hardware drivers
++#
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_VIRTUAL is not set
++# CONFIG_FB_METRONOME is not set
++# CONFIG_FB_MB862XX is not set
++# CONFIG_FB_OMAP_LCD_VGA is not set
++# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
++CONFIG_OMAP2_DSS=m
++CONFIG_OMAP2_DSS_VRAM_SIZE=8
++CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
++# CONFIG_OMAP2_DSS_RFBI is not set
++CONFIG_OMAP2_DSS_VENC=y
++# CONFIG_OMAP2_DSS_SDI is not set
++# CONFIG_OMAP2_DSS_DSI is not set
++# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
++CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
++
++#
++# OMAP2/3 Display Device Drivers
++#
++CONFIG_PANEL_GENERIC=m
++# CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C is not set
++CONFIG_PANEL_SHARP_LS037V7DW01=m
++# CONFIG_PANEL_N800 is not set
++# CONFIG_CTRL_BLIZZARD is not set
++CONFIG_FB_OMAP2=m
++CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
++# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
++CONFIG_FB_OMAP2_NUM_FBS=3
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Display device support
++#
++# CONFIG_DISPLAY_SUPPORT is not set
++
++#
++# Console display driver support
++#
++# CONFIG_VGA_CONSOLE is not set
++CONFIG_DUMMY_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE is not set
++# CONFIG_LOGO is not set
++# CONFIG_SOUND 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_HID_PID is not set
++# CONFIG_USB_HIDDEV is not set
++
++#
++# Special HID drivers
++#
++CONFIG_HID_COMPAT=y
++# CONFIG_HID_A4TECH is not set
++# CONFIG_HID_APPLE is not set
++# CONFIG_HID_BELKIN is not set
++# CONFIG_HID_CHERRY is not set
++# CONFIG_HID_CHICONY is not set
++# CONFIG_HID_CYPRESS is not set
++# CONFIG_HID_EZKEY is not set
++# CONFIG_HID_GYRATION is not set
++# CONFIG_HID_LOGITECH is not set
++# CONFIG_HID_MICROSOFT is not set
++# CONFIG_HID_MONTEREY is not set
++# CONFIG_HID_NTRIG is not set
++# CONFIG_HID_PANTHERLORD is not set
++# CONFIG_HID_PETALYNX is not set
++# CONFIG_HID_SAMSUNG is not set
++# CONFIG_HID_SONY is not set
++# CONFIG_HID_SUNPLUS is not set
++# CONFIG_GREENASIA_FF is not set
++# CONFIG_HID_TOPSEED is not set
++# CONFIG_THRUSTMASTER_FF is not set
++# CONFIG_ZEROPLUS_FF is not set
++CONFIG_USB_SUPPORT=y
++CONFIG_USB_ARCH_HAS_HCD=y
++CONFIG_USB_ARCH_HAS_OHCI=y
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=y
++CONFIG_USB_DEBUG=y
++CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
++
++#
++# Miscellaneous USB options
++#
++CONFIG_USB_DEVICEFS=y
++# CONFIG_USB_DEVICE_CLASS is not set
++# CONFIG_USB_DYNAMIC_MINORS is not set
++CONFIG_USB_SUSPEND=y
++CONFIG_USB_OTG=y
++# CONFIG_USB_OTG_WHITELIST is not set
++# CONFIG_USB_OTG_BLACKLIST_HUB is not set
++CONFIG_USB_MON=y
++# CONFIG_USB_WUSB is not set
++# CONFIG_USB_WUSB_CBAF is not set
++
++#
++# USB Host Controller Drivers
++#
++# CONFIG_USB_C67X00_HCD is not set
++CONFIG_USB_EHCI_HCD=m
++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_OXU210HP_HCD is not set
++# CONFIG_USB_ISP116X_HCD is not set
++# CONFIG_USB_OHCI_HCD is not set
++# CONFIG_USB_SL811_HCD is not set
++# CONFIG_USB_R8A66597_HCD is not set
++# CONFIG_USB_HWA_HCD is not set
++CONFIG_USB_MUSB_HDRC=y
++CONFIG_USB_MUSB_SOC=y
++
++#
++# OMAP 343x high speed USB support
++#
++# CONFIG_USB_MUSB_HOST is not set
++# CONFIG_USB_MUSB_PERIPHERAL is not set
++CONFIG_USB_MUSB_OTG=y
++CONFIG_USB_GADGET_MUSB_HDRC=y
++CONFIG_USB_MUSB_HDRC_HCD=y
++# CONFIG_MUSB_PIO_ONLY is not set
++CONFIG_USB_INVENTRA_DMA=y
++# CONFIG_USB_TI_CPPI_DMA is not set
++# CONFIG_USB_MUSB_DEBUG is not set
++
++#
++# USB Device Class drivers
++#
++# CONFIG_USB_ACM is not set
++# CONFIG_USB_PRINTER is not set
++# CONFIG_USB_WDM is not set
++# CONFIG_USB_TMC is not set
++
++#
++# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
++#
++
++#
++# see USB_STORAGE Help for more information
++#
++CONFIG_USB_STORAGE=y
++CONFIG_USB_STORAGE_DEBUG=y
++# CONFIG_USB_STORAGE_DATAFAB is not set
++# CONFIG_USB_STORAGE_FREECOM is not set
++# CONFIG_USB_STORAGE_ISD200 is not set
++# CONFIG_USB_STORAGE_USBAT is not set
++# CONFIG_USB_STORAGE_SDDR09 is not set
++# CONFIG_USB_STORAGE_SDDR55 is not set
++# CONFIG_USB_STORAGE_JUMPSHOT is not set
++# CONFIG_USB_STORAGE_ALAUDA is not set
++# CONFIG_USB_STORAGE_ONETOUCH is not set
++# CONFIG_USB_STORAGE_KARMA is not set
++# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
++# CONFIG_USB_LIBUSUAL is not set
++
++#
++# USB Imaging devices
++#
++# CONFIG_USB_MDC800 is not set
++# CONFIG_USB_MICROTEK is not set
++
++#
++# USB port drivers
++#
++# CONFIG_USB_SERIAL is not set
++
++#
++# USB Miscellaneous drivers
++#
++# CONFIG_USB_EMI62 is not set
++# CONFIG_USB_EMI26 is not set
++# CONFIG_USB_ADUTUX is not set
++# CONFIG_USB_SEVSEG is not set
++# CONFIG_USB_RIO500 is not set
++# CONFIG_USB_LEGOTOWER is not set
++# CONFIG_USB_LCD is not set
++# CONFIG_USB_BERRY_CHARGE is not set
++# CONFIG_USB_LED is not set
++# CONFIG_USB_CYPRESS_CY7C63 is not set
++# CONFIG_USB_CYTHERM is not set
++# CONFIG_USB_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=y
++# CONFIG_USB_ISIGHTFW is not set
++# CONFIG_USB_VST is not set
++CONFIG_USB_GADGET=y
++CONFIG_USB_GADGET_DEBUG=y
++CONFIG_USB_GADGET_DEBUG_FILES=y
++# CONFIG_USB_GADGET_DEBUG_FS is not set
++CONFIG_USB_GADGET_VBUS_DRAW=2
++CONFIG_USB_GADGET_SELECTED=y
++# CONFIG_USB_GADGET_AT91 is not set
++# CONFIG_USB_GADGET_ATMEL_USBA is not set
++# CONFIG_USB_GADGET_FSL_USB2 is not set
++# CONFIG_USB_GADGET_LH7A40X is not set
++# CONFIG_USB_GADGET_OMAP is not set
++# CONFIG_USB_GADGET_PXA25X is not set
++# CONFIG_USB_GADGET_PXA27X is not set
++# CONFIG_USB_GADGET_S3C2410 is not set
++# CONFIG_USB_GADGET_IMX is not set
++# CONFIG_USB_GADGET_M66592 is not set
++# CONFIG_USB_GADGET_AMD5536UDC is not set
++# CONFIG_USB_GADGET_FSL_QE is not set
++# CONFIG_USB_GADGET_CI13XXX is not set
++# CONFIG_USB_GADGET_NET2280 is not set
++# CONFIG_USB_GADGET_GOKU is not set
++# CONFIG_USB_GADGET_DUMMY_HCD is not set
++CONFIG_USB_GADGET_DUALSPEED=y
++CONFIG_USB_ZERO=m
++# CONFIG_USB_ZERO_HNPTEST is not set
++# CONFIG_USB_ETH is not set
++# CONFIG_USB_GADGETFS is not set
++# CONFIG_USB_FILE_STORAGE is not set
++# CONFIG_USB_G_SERIAL is not set
++# CONFIG_USB_MIDI_GADGET is not set
++# CONFIG_USB_G_PRINTER is not set
++# CONFIG_USB_CDC_COMPOSITE is not set
++
++#
++# OTG and related infrastructure
++#
++CONFIG_USB_OTG_UTILS=y
++# CONFIG_USB_GPIO_VBUS is not set
++# CONFIG_ISP1301_OMAP is not set
++CONFIG_TWL4030_USB=y
++CONFIG_MMC=y
++# CONFIG_MMC_DEBUG is not set
++# CONFIG_MMC_UNSAFE_RESUME is not set
++
++#
++# MMC/SD/SDIO Card Drivers
++#
++CONFIG_MMC_BLOCK=y
++CONFIG_MMC_BLOCK_BOUNCE=y
++# CONFIG_SDIO_UART is not set
++# CONFIG_MMC_TEST is not set
++
++#
++# MMC/SD/SDIO Host Controller Drivers
++#
++# CONFIG_MMC_SDHCI is not set
++CONFIG_MMC_OMAP_HS=m
++# CONFIG_MMC_SPI is not set
++# CONFIG_MEMSTICK is not set
++# CONFIG_ACCESSIBILITY is not set
++# CONFIG_NEW_LEDS is not set
++CONFIG_RTC_LIB=y
++CONFIG_RTC_CLASS=y
++CONFIG_RTC_HCTOSYS=y
++CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
++# CONFIG_RTC_DEBUG is not set
++
++#
++# RTC interfaces
++#
++CONFIG_RTC_INTF_SYSFS=y
++CONFIG_RTC_INTF_PROC=y
++CONFIG_RTC_INTF_DEV=y
++# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
++# CONFIG_RTC_DRV_TEST is not set
++
++#
++# I2C RTC drivers
++#
++# CONFIG_RTC_DRV_DS1307 is not set
++# CONFIG_RTC_DRV_DS1374 is not set
++# CONFIG_RTC_DRV_DS1672 is not set
++# CONFIG_RTC_DRV_MAX6900 is not set
++# CONFIG_RTC_DRV_RS5C372 is not set
++# CONFIG_RTC_DRV_ISL1208 is not set
++# CONFIG_RTC_DRV_X1205 is not set
++# CONFIG_RTC_DRV_PCF8563 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
++# CONFIG_RTC_DRV_FM3130 is not set
++# CONFIG_RTC_DRV_RX8581 is not set
++
++#
++# SPI RTC drivers
++#
++# CONFIG_RTC_DRV_M41T94 is not set
++# CONFIG_RTC_DRV_DS1305 is not set
++# CONFIG_RTC_DRV_DS1390 is not set
++# CONFIG_RTC_DRV_MAX6902 is not set
++# CONFIG_RTC_DRV_R9701 is not set
++# CONFIG_RTC_DRV_RS5C348 is not set
++# CONFIG_RTC_DRV_DS3234 is not set
++
++#
++# Platform RTC drivers
++#
++# CONFIG_RTC_DRV_CMOS is not set
++# CONFIG_RTC_DRV_DS1286 is not set
++# CONFIG_RTC_DRV_DS1511 is not set
++# CONFIG_RTC_DRV_DS1553 is not set
++# CONFIG_RTC_DRV_DS1742 is not set
++# CONFIG_RTC_DRV_STK17TA8 is not set
++# CONFIG_RTC_DRV_M48T86 is not set
++# CONFIG_RTC_DRV_M48T35 is not set
++# CONFIG_RTC_DRV_M48T59 is not set
++# CONFIG_RTC_DRV_BQ4802 is not set
++# CONFIG_RTC_DRV_V3020 is not set
++
++#
++# on-CPU RTC drivers
++#
++# CONFIG_DMADEVICES is not set
++CONFIG_REGULATOR=y
++# CONFIG_REGULATOR_DEBUG is not set
++# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
++# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
++# CONFIG_REGULATOR_BQ24022 is not set
++CONFIG_REGULATOR_TWL4030=y
++# CONFIG_UIO is not set
++# CONFIG_STAGING 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_EXT4_FS is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++# CONFIG_REISERFS_FS is not set
++# CONFIG_JFS_FS is not set
++# CONFIG_FS_POSIX_ACL is not set
++CONFIG_FILE_LOCKING=y
++# CONFIG_XFS_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_BTRFS_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_QUOTA_TREE=y
++# CONFIG_QFMT_V1 is not set
++CONFIG_QFMT_V2=y
++CONFIG_QUOTACTL=y
++# CONFIG_AUTOFS_FS is not set
++# CONFIG_AUTOFS4_FS is not set
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++# CONFIG_ISO9660_FS is not set
++# CONFIG_UDF_FS is not set
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_SYSCTL=y
++CONFIG_PROC_PAGE_MONITOR=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_TMPFS_POSIX_ACL is not set
++# CONFIG_HUGETLB_PAGE is not set
++# CONFIG_CONFIGFS_FS is not set
++CONFIG_MISC_FILESYSTEMS=y
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_JFFS2_FS=y
++CONFIG_JFFS2_FS_DEBUG=0
++CONFIG_JFFS2_FS_WRITEBUFFER=y
++# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
++# CONFIG_JFFS2_SUMMARY is not set
++# CONFIG_JFFS2_FS_XATTR is not set
++CONFIG_JFFS2_COMPRESSION_OPTIONS=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 is not set
++# CONFIG_SQUASHFS is not set
++# CONFIG_VXFS_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_OMFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_ROMFS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++CONFIG_NETWORK_FILESYSTEMS=y
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++CONFIG_NFS_V4=y
++CONFIG_ROOT_NFS=y
++# CONFIG_NFSD is not set
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++# CONFIG_SUNRPC_REGISTER_V4 is not set
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++# CONFIG_SMB_FS 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
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++# CONFIG_NLS_CODEPAGE_737 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++# CONFIG_NLS_CODEPAGE_850 is not set
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++# CONFIG_NLS_CODEPAGE_1250 is not set
++# CONFIG_NLS_CODEPAGE_1251 is not set
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++# CONFIG_NLS_ISO8859_2 is not set
++# CONFIG_NLS_ISO8859_3 is not set
++# CONFIG_NLS_ISO8859_4 is not set
++# CONFIG_NLS_ISO8859_5 is not set
++# CONFIG_NLS_ISO8859_6 is not set
++# CONFIG_NLS_ISO8859_7 is not set
++# CONFIG_NLS_ISO8859_9 is not set
++# CONFIG_NLS_ISO8859_13 is not set
++# CONFIG_NLS_ISO8859_14 is not set
++# CONFIG_NLS_ISO8859_15 is not set
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++# CONFIG_NLS_UTF8 is not set
++# CONFIG_DLM is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_ENABLE_WARN_DEPRECATED=y
++CONFIG_ENABLE_MUST_CHECK=y
++CONFIG_FRAME_WARN=1024
++CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
++CONFIG_DEBUG_FS=y
++# CONFIG_HEADERS_CHECK is not set
++CONFIG_DEBUG_KERNEL=y
++# CONFIG_DEBUG_SHIRQ is not set
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
++CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
++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=y
++CONFIG_DEBUG_INFO=y
++# CONFIG_DEBUG_VM is not set
++# CONFIG_DEBUG_WRITECOUNT is not set
++# CONFIG_DEBUG_MEMORY_INIT is not set
++# CONFIG_DEBUG_LIST is not set
++# CONFIG_DEBUG_SG is not set
++# CONFIG_DEBUG_NOTIFIERS is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_BOOT_PRINTK_DELAY is not set
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_RCU_CPU_STALL_DETECTOR is not set
++# CONFIG_BACKTRACE_SELF_TEST is not set
++# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
++# CONFIG_FAULT_INJECTION is not set
++# CONFIG_LATENCYTOP is not set
++CONFIG_HAVE_FUNCTION_TRACER=y
++
++#
++# Tracers
++#
++# CONFIG_FUNCTION_TRACER is not set
++# CONFIG_IRQSOFF_TRACER is not set
++# CONFIG_SCHED_TRACER is not set
++# CONFIG_CONTEXT_SWITCH_TRACER is not set
++# CONFIG_BOOT_TRACER is not set
++# CONFIG_TRACE_BRANCH_PROFILING is not set
++# CONFIG_STACK_TRACER is not set
++# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
++# CONFIG_SAMPLES is not set
++CONFIG_HAVE_ARCH_KGDB=y
++# CONFIG_KGDB is not set
++CONFIG_DEBUG_USER=y
++CONFIG_DEBUG_ERRORS=y
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_LL is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++# CONFIG_SECURITYFS is not set
++# CONFIG_SECURITY_FILE_CAPABILITIES is not set
++CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
++# CONFIG_CRYPTO_FIPS is not set
++CONFIG_CRYPTO_ALGAPI=y
++CONFIG_CRYPTO_ALGAPI2=y
++CONFIG_CRYPTO_AEAD2=y
++CONFIG_CRYPTO_BLKCIPHER=y
++CONFIG_CRYPTO_BLKCIPHER2=y
++CONFIG_CRYPTO_HASH=y
++CONFIG_CRYPTO_HASH2=y
++CONFIG_CRYPTO_RNG2=y
++CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_MANAGER2=y
++# CONFIG_CRYPTO_GF128MUL is not set
++# CONFIG_CRYPTO_NULL 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=y
++# CONFIG_CRYPTO_MD4 is not set
++CONFIG_CRYPTO_MD5=y
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_RMD128 is not set
++# CONFIG_CRYPTO_RMD160 is not set
++# CONFIG_CRYPTO_RMD256 is not set
++# CONFIG_CRYPTO_RMD320 is not set
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++# CONFIG_CRYPTO_WP512 is not set
++
++#
++# Ciphers
++#
++# CONFIG_CRYPTO_AES is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_ARC4 is not set
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_CAMELLIA is not set
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++CONFIG_CRYPTO_DES=y
++# CONFIG_CRYPTO_FCRYPT is not set
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_SALSA20 is not set
++# CONFIG_CRYPTO_SEED is not set
++# CONFIG_CRYPTO_SERPENT is not set
++# CONFIG_CRYPTO_TEA is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++
++#
++# Compression
++#
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_LZO is not set
++
++#
++# Random Number Generation
++#
++# CONFIG_CRYPTO_ANSI_CPRNG is not set
++CONFIG_CRYPTO_HW=y
++
++#
++# Library routines
++#
++CONFIG_BITREVERSE=y
++CONFIG_GENERIC_FIND_LAST_BIT=y
++CONFIG_CRC_CCITT=y
++# CONFIG_CRC16 is not set
++# CONFIG_CRC_T10DIF is not set
++# CONFIG_CRC_ITU_T is not set
++CONFIG_CRC32=y
++# CONFIG_CRC7 is not set
++CONFIG_LIBCRC32C=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/arch/arm/configs/dss_overo_defconfig b/arch/arm/configs/dss_overo_defconfig
+new file mode 100644
+index 0000000..755a1b6
+--- /dev/null
++++ b/arch/arm/configs/dss_overo_defconfig
+@@ -0,0 +1,1862 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.29-omap1
++# Thu Apr 2 11:30:57 2009
++#
++CONFIG_ARM=y
++CONFIG_SYS_SUPPORTS_APM_EMULATION=y
++CONFIG_GENERIC_GPIO=y
++CONFIG_GENERIC_TIME=y
++CONFIG_GENERIC_CLOCKEVENTS=y
++CONFIG_MMU=y
++# CONFIG_NO_IOPORT is not set
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_HAVE_LATENCYTOP_SUPPORT=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++CONFIG_HARDIRQS_SW_RESEND=y
++CONFIG_GENERIC_IRQ_PROBE=y
++CONFIG_RWSEM_GENERIC_SPINLOCK=y
++# CONFIG_ARCH_HAS_ILOG2_U32 is not set
++# CONFIG_ARCH_HAS_ILOG2_U64 is not set
++CONFIG_GENERIC_HWEIGHT=y
++CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
++CONFIG_OPROFILE_ARMV7=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
++
++#
++# RCU Subsystem
++#
++CONFIG_CLASSIC_RCU=y
++# CONFIG_TREE_RCU is not set
++# CONFIG_PREEMPT_RCU is not set
++# CONFIG_TREE_RCU_TRACE is not set
++# CONFIG_PREEMPT_RCU_TRACE is not set
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++CONFIG_LOG_BUF_SHIFT=14
++CONFIG_GROUP_SCHED=y
++CONFIG_FAIR_GROUP_SCHED=y
++# CONFIG_RT_GROUP_SCHED is not set
++CONFIG_USER_SCHED=y
++# CONFIG_CGROUP_SCHED is not set
++# CONFIG_CGROUPS is not set
++CONFIG_SYSFS_DEPRECATED=y
++CONFIG_SYSFS_DEPRECATED_V2=y
++# CONFIG_RELAY is not set
++# CONFIG_NAMESPACES is not set
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++CONFIG_SYSCTL=y
++CONFIG_ANON_INODES=y
++CONFIG_EMBEDDED=y
++CONFIG_UID16=y
++# CONFIG_SYSCTL_SYSCALL is not set
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++# CONFIG_ELF_CORE is not set
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SIGNALFD=y
++CONFIG_TIMERFD=y
++CONFIG_EVENTFD=y
++CONFIG_SHMEM=y
++CONFIG_AIO=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_SLUB_DEBUG=y
++# CONFIG_COMPAT_BRK is not set
++# CONFIG_SLAB is not set
++CONFIG_SLUB=y
++# CONFIG_SLOB is not set
++CONFIG_PROFILING=y
++CONFIG_TRACEPOINTS=y
++# CONFIG_MARKERS is not set
++CONFIG_OPROFILE=y
++CONFIG_HAVE_OPROFILE=y
++# CONFIG_KPROBES is not set
++CONFIG_HAVE_KPROBES=y
++CONFIG_HAVE_KRETPROBES=y
++CONFIG_HAVE_CLK=y
++CONFIG_HAVE_GENERIC_DMA_COHERENT=y
++CONFIG_SLABINFO=y
++CONFIG_RT_MUTEXES=y
++CONFIG_BASE_SMALL=0
++CONFIG_MODULES=y
++# CONFIG_MODULE_FORCE_LOAD is not set
++CONFIG_MODULE_UNLOAD=y
++CONFIG_MODULE_FORCE_UNLOAD=y
++CONFIG_MODVERSIONS=y
++CONFIG_MODULE_SRCVERSION_ALL=y
++CONFIG_BLOCK=y
++CONFIG_LBD=y
++# CONFIG_BLK_DEV_IO_TRACE is not set
++# CONFIG_BLK_DEV_BSG is not set
++# CONFIG_BLK_DEV_INTEGRITY is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=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_FREEZER=y
++
++#
++# System Type
++#
++# CONFIG_ARCH_AAEC2000 is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_REALVIEW is not set
++# CONFIG_ARCH_VERSATILE is not set
++# CONFIG_ARCH_AT91 is not set
++# CONFIG_ARCH_CLPS711X is not set
++# CONFIG_ARCH_EBSA110 is not set
++# CONFIG_ARCH_EP93XX is not set
++# CONFIG_ARCH_FOOTBRIDGE is not set
++# CONFIG_ARCH_NETX is not set
++# CONFIG_ARCH_H720X is not set
++# CONFIG_ARCH_IMX is not set
++# CONFIG_ARCH_IOP13XX is not set
++# CONFIG_ARCH_IOP32X is not set
++# CONFIG_ARCH_IOP33X is not set
++# CONFIG_ARCH_IXP23XX is not set
++# CONFIG_ARCH_IXP2000 is not set
++# CONFIG_ARCH_IXP4XX is not set
++# CONFIG_ARCH_L7200 is not set
++# CONFIG_ARCH_KIRKWOOD is not set
++# CONFIG_ARCH_KS8695 is not set
++# CONFIG_ARCH_NS9XXX is not set
++# CONFIG_ARCH_LOKI is not set
++# CONFIG_ARCH_MV78XX0 is not set
++# CONFIG_ARCH_MXC is not set
++# CONFIG_ARCH_ORION5X is not set
++# CONFIG_ARCH_PNX4008 is not set
++# CONFIG_ARCH_PXA is not set
++# CONFIG_ARCH_RPC is not set
++# CONFIG_ARCH_SA1100 is not set
++# CONFIG_ARCH_S3C2410 is not set
++# CONFIG_ARCH_S3C64XX is not set
++# CONFIG_ARCH_SHARK is not set
++# CONFIG_ARCH_LH7A40X is not set
++# CONFIG_ARCH_DAVINCI is not set
++CONFIG_ARCH_OMAP=y
++# CONFIG_ARCH_MSM is not set
++# CONFIG_ARCH_W90X900 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_POWERDOMAIN is not set
++# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
++CONFIG_OMAP_SMARTREFLEX=y
++# CONFIG_OMAP_SMARTREFLEX_TESTING 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_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_TICK_GPTIMER=1
++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_NOKIA_RX51 is not set
++# CONFIG_MACH_OMAP_LDP is not set
++# CONFIG_MACH_OMAP_3430SDP is not set
++# CONFIG_MACH_OMAP3EVM is not set
++# CONFIG_MACH_OMAP3_BEAGLE is not set
++CONFIG_MACH_OVERO=y
++# CONFIG_MACH_OMAP3_PANDORA is not set
++
++#
++# 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=y
++# CONFIG_CPU_ICACHE_DISABLE is not set
++# CONFIG_CPU_DCACHE_DISABLE is not set
++# CONFIG_CPU_BPREDICT_DISABLE is not set
++CONFIG_HAS_TLS_REG=y
++# CONFIG_OUTER_CACHE is not set
++
++#
++# Bus support
++#
++# CONFIG_PCI_SYSCALL is not set
++# CONFIG_ARCH_SUPPORTS_MSI is not set
++# CONFIG_PCCARD is not set
++
++#
++# Kernel Features
++#
++CONFIG_TICK_ONESHOT=y
++CONFIG_NO_HZ=y
++CONFIG_HIGH_RES_TIMERS=y
++CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
++CONFIG_VMSPLIT_3G=y
++# CONFIG_VMSPLIT_2G is not set
++# CONFIG_VMSPLIT_1G is not set
++CONFIG_PAGE_OFFSET=0xC0000000
++# CONFIG_PREEMPT is not set
++CONFIG_HZ=128
++CONFIG_AEABI=y
++# CONFIG_OABI_COMPAT is not set
++CONFIG_ARCH_FLATMEM_HAS_HOLES=y
++# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
++# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
++CONFIG_SELECT_MEMORY_MODEL=y
++CONFIG_FLATMEM_MANUAL=y
++# CONFIG_DISCONTIGMEM_MANUAL is not set
++# CONFIG_SPARSEMEM_MANUAL is not set
++CONFIG_FLATMEM=y
++CONFIG_FLAT_NODE_MEM_MAP=y
++CONFIG_PAGEFLAGS_EXTENDED=y
++CONFIG_SPLIT_PTLOCK_CPUS=4
++# CONFIG_PHYS_ADDR_T_64BIT is not set
++CONFIG_ZONE_DMA_FLAG=0
++CONFIG_VIRT_TO_BUS=y
++CONFIG_UNEVICTABLE_LRU=y
++CONFIG_LEDS=y
++CONFIG_ALIGNMENT_TRAP=y
++
++#
++# Boot options
++#
++CONFIG_ZBOOT_ROM_TEXT=0x0
++CONFIG_ZBOOT_ROM_BSS=0x0
++CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.2.14:/tftpboot/rootfs ip=192.168.2.15 nolock,rsize=1024,wsize=1024 rw"
++# CONFIG_XIP_KERNEL is not set
++CONFIG_KEXEC=y
++CONFIG_ATAGS_PROC=y
++
++#
++# CPU Power Management
++#
++CONFIG_CPU_FREQ=y
++CONFIG_CPU_FREQ_TABLE=y
++# CONFIG_CPU_FREQ_DEBUG is not set
++CONFIG_CPU_FREQ_STAT=y
++CONFIG_CPU_FREQ_STAT_DETAILS=y
++CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
++# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
++# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
++# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
++# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
++CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
++# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
++CONFIG_CPU_FREQ_GOV_USERSPACE=y
++CONFIG_CPU_FREQ_GOV_ONDEMAND=y
++# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
++# CONFIG_CPU_IDLE is not set
++
++#
++# Floating point emulation
++#
++
++#
++# At least one emulation must be selected
++#
++CONFIG_VFP=y
++CONFIG_VFPv3=y
++CONFIG_NEON=y
++
++#
++# Userspace binary formats
++#
++CONFIG_BINFMT_ELF=y
++CONFIG_HAVE_AOUT=y
++CONFIG_BINFMT_AOUT=m
++CONFIG_BINFMT_MISC=y
++
++#
++# Power management options
++#
++CONFIG_PM=y
++# CONFIG_PM_DEBUG 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
++CONFIG_NET=y
++
++#
++# Networking options
++#
++CONFIG_COMPAT_NET_DEV_OPS=y
++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=y
++# CONFIG_NET_KEY_MIGRATE is not set
++CONFIG_INET=y
++# CONFIG_IP_MULTICAST is not set
++# CONFIG_IP_ADVANCED_ROUTER is not set
++CONFIG_IP_FIB_HASH=y
++CONFIG_IP_PNP=y
++CONFIG_IP_PNP_DHCP=y
++CONFIG_IP_PNP_BOOTP=y
++CONFIG_IP_PNP_RARP=y
++# CONFIG_NET_IPIP 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 is not set
++# CONFIG_NET_DSA is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++# CONFIG_NET_SCHED is not set
++# CONFIG_DCB is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_CAN is not set
++# CONFIG_IRDA is not set
++CONFIG_BT=y
++CONFIG_BT_L2CAP=y
++CONFIG_BT_SCO=y
++CONFIG_BT_RFCOMM=y
++CONFIG_BT_RFCOMM_TTY=y
++CONFIG_BT_BNEP=y
++CONFIG_BT_BNEP_MC_FILTER=y
++CONFIG_BT_BNEP_PROTO_FILTER=y
++CONFIG_BT_HIDP=y
++
++#
++# Bluetooth device drivers
++#
++# CONFIG_BT_HCIBTSDIO is not set
++CONFIG_BT_HCIUART=y
++CONFIG_BT_HCIUART_H4=y
++CONFIG_BT_HCIUART_BCSP=y
++# CONFIG_BT_HCIUART_LL 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
++# CONFIG_PHONET is not set
++CONFIG_WIRELESS=y
++CONFIG_CFG80211=y
++# CONFIG_CFG80211_REG_DEBUG is not set
++CONFIG_NL80211=y
++CONFIG_WIRELESS_OLD_REGULATORY=y
++CONFIG_WIRELESS_EXT=y
++CONFIG_WIRELESS_EXT_SYSFS=y
++CONFIG_LIB80211=y
++CONFIG_LIB80211_CRYPT_WEP=m
++CONFIG_LIB80211_CRYPT_CCMP=m
++CONFIG_LIB80211_CRYPT_TKIP=m
++# CONFIG_LIB80211_DEBUG is not set
++CONFIG_MAC80211=y
++
++#
++# Rate control algorithm selection
++#
++CONFIG_MAC80211_RC_PID=y
++CONFIG_MAC80211_RC_MINSTREL=y
++CONFIG_MAC80211_RC_DEFAULT_PID=y
++# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
++CONFIG_MAC80211_RC_DEFAULT="pid"
++# CONFIG_MAC80211_MESH is not set
++CONFIG_MAC80211_LEDS=y
++# CONFIG_MAC80211_DEBUGFS is not set
++# CONFIG_MAC80211_DEBUG_MENU is not set
++# CONFIG_WIMAX 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_FIRMWARE_IN_KERNEL=y
++CONFIG_EXTRA_FIRMWARE=""
++# CONFIG_DEBUG_DRIVER is not set
++# CONFIG_DEBUG_DEVRES is not set
++# CONFIG_SYS_HYPERVISOR is not set
++# CONFIG_CONNECTOR is not set
++CONFIG_MTD=y
++# CONFIG_MTD_DEBUG is not set
++CONFIG_MTD_CONCAT=y
++CONFIG_MTD_PARTITIONS=y
++# CONFIG_MTD_TESTS is not set
++# CONFIG_MTD_REDBOOT_PARTS is not set
++# CONFIG_MTD_CMDLINE_PARTS is not set
++# CONFIG_MTD_AFS_PARTS is not set
++# CONFIG_MTD_AR7_PARTS is not set
++
++#
++# User Modules And Translation Layers
++#
++CONFIG_MTD_CHAR=y
++CONFIG_MTD_BLKDEVS=y
++CONFIG_MTD_BLOCK=y
++# CONFIG_FTL is not set
++# CONFIG_NFTL is not set
++# CONFIG_INFTL is not set
++# CONFIG_RFD_FTL is not set
++# CONFIG_SSFDC is not set
++# CONFIG_MTD_OOPS is not set
++
++#
++# RAM/ROM/Flash chip drivers
++#
++# CONFIG_MTD_CFI is not set
++# CONFIG_MTD_JEDECPROBE is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++# CONFIG_MTD_RAM is not set
++# CONFIG_MTD_ROM is not set
++# CONFIG_MTD_ABSENT is not set
++
++#
++# Mapping drivers for chip access
++#
++# CONFIG_MTD_COMPLEX_MAPPINGS is not set
++# CONFIG_MTD_PLATRAM is not set
++
++#
++# Self-contained MTD device drivers
++#
++# CONFIG_MTD_DATAFLASH is not set
++# CONFIG_MTD_M25P80 is not set
++# CONFIG_MTD_SLRAM is not set
++# CONFIG_MTD_PHRAM is not set
++# CONFIG_MTD_MTDRAM is not set
++# CONFIG_MTD_BLOCK2MTD is not set
++
++#
++# Disk-On-Chip Device Drivers
++#
++# CONFIG_MTD_DOC2000 is not set
++# CONFIG_MTD_DOC2001 is not set
++# CONFIG_MTD_DOC2001PLUS is not set
++CONFIG_MTD_NAND=y
++# CONFIG_MTD_NAND_VERIFY_WRITE is not set
++# CONFIG_MTD_NAND_ECC_SMC is not set
++# CONFIG_MTD_NAND_MUSEUM_IDS is not set
++# CONFIG_MTD_NAND_GPIO is not set
++CONFIG_MTD_NAND_OMAP2=y
++CONFIG_MTD_NAND_IDS=y
++# CONFIG_MTD_NAND_DISKONCHIP is not set
++# CONFIG_MTD_NAND_NANDSIM is not set
++# CONFIG_MTD_NAND_PLATFORM is not set
++# CONFIG_MTD_ONENAND is not set
++
++#
++# LPDDR flash memory drivers
++#
++# CONFIG_MTD_LPDDR is not set
++
++#
++# UBI - Unsorted block images
++#
++# CONFIG_MTD_UBI is not set
++# CONFIG_PARPORT is not set
++CONFIG_BLK_DEV=y
++# 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_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=16384
++# CONFIG_BLK_DEV_XIP is not set
++CONFIG_CDROM_PKTCDVD=m
++CONFIG_CDROM_PKTCDVD_BUFFERS=8
++# CONFIG_CDROM_PKTCDVD_WCACHE is not set
++# CONFIG_ATA_OVER_ETH is not set
++CONFIG_MISC_DEVICES=y
++# CONFIG_ICS932S401 is not set
++# CONFIG_OMAP_STI is not set
++# CONFIG_ENCLOSURE_SERVICES is not set
++# CONFIG_C2PORT is not set
++
++#
++# EEPROM support
++#
++# CONFIG_EEPROM_AT24 is not set
++# CONFIG_EEPROM_AT25 is not set
++# CONFIG_EEPROM_LEGACY is not set
++CONFIG_EEPROM_93CX6=m
++CONFIG_HAVE_IDE=y
++# CONFIG_IDE is not set
++
++#
++# SCSI device support
++#
++CONFIG_RAID_ATTRS=m
++CONFIG_SCSI=y
++CONFIG_SCSI_DMA=y
++# CONFIG_SCSI_TGT is not set
++# CONFIG_SCSI_NETLINK is not set
++CONFIG_SCSI_PROC_FS=y
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++# CONFIG_CHR_DEV_ST is not set
++# CONFIG_CHR_DEV_OSST is not set
++# CONFIG_BLK_DEV_SR 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_LIBFC is not set
++# CONFIG_SCSI_DEBUG is not set
++# CONFIG_SCSI_DH is not set
++# CONFIG_ATA is not set
++CONFIG_MD=y
++CONFIG_BLK_DEV_MD=m
++CONFIG_MD_LINEAR=m
++CONFIG_MD_RAID0=m
++CONFIG_MD_RAID1=m
++CONFIG_MD_RAID10=m
++CONFIG_MD_RAID456=m
++CONFIG_MD_RAID5_RESHAPE=y
++CONFIG_MD_MULTIPATH=m
++CONFIG_MD_FAULTY=m
++CONFIG_BLK_DEV_DM=m
++# CONFIG_DM_DEBUG is not set
++CONFIG_DM_CRYPT=m
++CONFIG_DM_SNAPSHOT=m
++CONFIG_DM_MIRROR=m
++CONFIG_DM_ZERO=m
++CONFIG_DM_MULTIPATH=m
++CONFIG_DM_DELAY=m
++# CONFIG_DM_UEVENT is not set
++CONFIG_NETDEVICES=y
++CONFIG_DUMMY=m
++# 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_ETHERNET 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=y
++CONFIG_LIBERTAS_SDIO=y
++CONFIG_LIBERTAS_DEBUG=y
++# CONFIG_LIBERTAS_THINFIRM is not set
++# CONFIG_MAC80211_HWSIM is not set
++CONFIG_P54_COMMON=m
++# 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_RT2X00 is not set
++
++#
++# Enable WiMAX (Networking options) to see the WiMAX drivers
++#
++# CONFIG_WAN is not set
++CONFIG_PPP=m
++# CONFIG_PPP_MULTILINK is not set
++# CONFIG_PPP_FILTER is not set
++CONFIG_PPP_ASYNC=m
++CONFIG_PPP_SYNC_TTY=m
++CONFIG_PPP_DEFLATE=m
++CONFIG_PPP_BSDCOMP=m
++CONFIG_PPP_MPPE=m
++CONFIG_PPPOE=m
++# 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=y
++CONFIG_INPUT_MOUSEDEV_PSAUX=y
++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
++# CONFIG_INPUT_JOYDEV is not set
++CONFIG_INPUT_EVDEV=y
++# CONFIG_INPUT_EVBUG is not set
++
++#
++# Input Device Drivers
++#
++CONFIG_INPUT_KEYBOARD=y
++# CONFIG_KEYBOARD_ATKBD 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_TWL4030 is not set
++# CONFIG_KEYBOARD_LM8323 is not set
++# CONFIG_KEYBOARD_GPIO is not set
++CONFIG_INPUT_MOUSE=y
++CONFIG_MOUSE_PS2=y
++CONFIG_MOUSE_PS2_ALPS=y
++CONFIG_MOUSE_PS2_LOGIPS2PP=y
++CONFIG_MOUSE_PS2_SYNAPTICS=y
++CONFIG_MOUSE_PS2_TRACKPOINT=y
++# CONFIG_MOUSE_PS2_ELANTECH is not set
++# CONFIG_MOUSE_PS2_TOUCHKIT is not set
++# CONFIG_MOUSE_SERIAL is not set
++# CONFIG_MOUSE_APPLETOUCH is not set
++# CONFIG_MOUSE_BCM5974 is not set
++# CONFIG_MOUSE_VSXXXAA is not set
++# CONFIG_MOUSE_GPIO is not set
++# CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TABLET is not set
++# CONFIG_INPUT_TOUCHSCREEN is not set
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++CONFIG_SERIO=y
++CONFIG_SERIO_SERPORT=y
++CONFIG_SERIO_LIBPS2=y
++# CONFIG_SERIO_RAW is not set
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_CONSOLE_TRANSLATIONS=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++CONFIG_VT_HW_CONSOLE_BINDING=y
++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_DEVPTS_MULTIPLE_INSTANCES is not set
++# CONFIG_LEGACY_PTYS is not set
++# CONFIG_IPMI_HANDLER is not set
++CONFIG_HW_RANDOM=y
++# 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
++CONFIG_I2C_HELPER_AUTO=y
++
++#
++# I2C Hardware Bus support
++#
++
++#
++# I2C system bus drivers (mostly embedded / system-on-chip)
++#
++# CONFIG_I2C_GPIO is not set
++# CONFIG_I2C_OCORES is not set
++CONFIG_I2C_OMAP=y
++# CONFIG_I2C_SIMTEC is not set
++
++#
++# External I2C/SMBus adapter drivers
++#
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_TAOS_EVM is not set
++
++#
++# Other I2C/SMBus bus drivers
++#
++# CONFIG_I2C_PCA_PLATFORM is not set
++# CONFIG_I2C_STUB is not set
++
++#
++# Miscellaneous I2C Chip support
++#
++# CONFIG_DS1682 is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_PCF8575 is not set
++# CONFIG_SENSORS_PCA9539 is not set
++# CONFIG_SENSORS_PCF8591 is not set
++CONFIG_TWL4030_MADC=m
++CONFIG_TWL4030_POWEROFF=y
++# CONFIG_SENSORS_MAX6875 is not set
++# CONFIG_SENSORS_TSL2550 is not set
++# CONFIG_SENSORS_TSL2563 is not set
++# CONFIG_I2C_DEBUG_CORE is not set
++# CONFIG_I2C_DEBUG_ALGO is not set
++# CONFIG_I2C_DEBUG_BUS is not set
++# CONFIG_I2C_DEBUG_CHIP is not set
++CONFIG_SPI=y
++# CONFIG_SPI_DEBUG is not set
++CONFIG_SPI_MASTER=y
++
++#
++# SPI Master Controller Drivers
++#
++# CONFIG_SPI_BITBANG is not set
++# CONFIG_SPI_GPIO is not set
++CONFIG_SPI_OMAP24XX=y
++
++#
++# SPI Protocol Masters
++#
++# 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_ARCH_REQUIRE_GPIOLIB=y
++CONFIG_GPIOLIB=y
++CONFIG_DEBUG_GPIO=y
++CONFIG_GPIO_SYSFS=y
++
++#
++# Memory mapped GPIO expanders:
++#
++
++#
++# I2C GPIO expanders:
++#
++# CONFIG_GPIO_MAX732X is not set
++# CONFIG_GPIO_PCA953X is not set
++# CONFIG_GPIO_PCF857X is not set
++CONFIG_GPIO_TWL4030=y
++
++#
++# PCI GPIO expanders:
++#
++
++#
++# SPI GPIO expanders:
++#
++# CONFIG_GPIO_MAX7301 is not set
++# CONFIG_GPIO_MCP23S08 is not set
++# CONFIG_W1 is not set
++CONFIG_POWER_SUPPLY=m
++# CONFIG_POWER_SUPPLY_DEBUG is not set
++# CONFIG_PDA_POWER is not set
++# CONFIG_BATTERY_DS2760 is not set
++# CONFIG_TWL4030_BCI_BATTERY is not set
++# CONFIG_BATTERY_BQ27x00 is not set
++CONFIG_HWMON=y
++# CONFIG_HWMON_VID is not set
++# CONFIG_SENSORS_AD7414 is not set
++# CONFIG_SENSORS_AD7418 is not set
++# CONFIG_SENSORS_ADCXX is not set
++# CONFIG_SENSORS_ADM1021 is not set
++# CONFIG_SENSORS_ADM1025 is not set
++# CONFIG_SENSORS_ADM1026 is not set
++# CONFIG_SENSORS_ADM1029 is not set
++# CONFIG_SENSORS_ADM1031 is not set
++# CONFIG_SENSORS_ADM9240 is not set
++# CONFIG_SENSORS_ADT7462 is not set
++# CONFIG_SENSORS_ADT7470 is not set
++# CONFIG_SENSORS_ADT7473 is not set
++# CONFIG_SENSORS_ADT7475 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_LTC4245 is not set
++# CONFIG_SENSORS_MAX1111 is not set
++# CONFIG_SENSORS_MAX1619 is not set
++# CONFIG_SENSORS_MAX6650 is not set
++# CONFIG_SENSORS_PC87360 is not set
++# CONFIG_SENSORS_PC87427 is not set
++# CONFIG_SENSORS_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_THERMAL is not set
++# CONFIG_THERMAL_HWMON is not set
++CONFIG_WATCHDOG=y
++CONFIG_WATCHDOG_NOWAYOUT=y
++
++#
++# Watchdog Device Drivers
++#
++# CONFIG_SOFT_WATCHDOG is not set
++CONFIG_OMAP_WATCHDOG=y
++CONFIG_SSB_POSSIBLE=y
++
++#
++# Sonics Silicon Backplane
++#
++# CONFIG_SSB is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_CORE is not set
++# CONFIG_MFD_SM501 is not set
++# CONFIG_MFD_ASIC3 is not set
++# CONFIG_HTC_EGPIO is not set
++# CONFIG_HTC_PASIC3 is not set
++# CONFIG_TPS65010 is not set
++CONFIG_TWL4030_CORE=y
++# CONFIG_TWL4030_POWER is not set
++# CONFIG_MFD_TMIO is not set
++# CONFIG_MFD_T7L66XB is not set
++# CONFIG_MFD_TC6387XB is not set
++# CONFIG_MFD_TC6393XB is not set
++# CONFIG_PMIC_DA903X is not set
++# CONFIG_MFD_WM8400 is not set
++# CONFIG_MFD_WM8350_I2C is not set
++# CONFIG_MFD_PCF50633 is not set
++
++#
++# 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=m
++CONFIG_VIDEO_MEDIA=m
++
++#
++# Multimedia drivers
++#
++CONFIG_MEDIA_ATTACH=y
++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_FIXED_MINOR_RANGES is not set
++CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
++# CONFIG_VIDEO_VIVI is not set
++# CONFIG_VIDEO_CPIA is not set
++# CONFIG_VIDEO_SAA5246A is not set
++# CONFIG_VIDEO_SAA5249 is not set
++# CONFIG_SOC_CAMERA is not set
++CONFIG_RADIO_ADAPTERS=y
++# CONFIG_RADIO_TEA5764 is not set
++# CONFIG_DVB_DYNAMIC_MINORS is not set
++CONFIG_DVB_CAPTURE_DRIVERS=y
++# CONFIG_TTPCI_EEPROM is not set
++# CONFIG_DVB_B2C2_FLEXCOP is not set
++
++#
++# Supported DVB Frontends
++#
++
++#
++# Customise DVB Frontends
++#
++# CONFIG_DVB_FE_CUSTOMISE is not set
++
++#
++# Multistandard (satellite) frontends
++#
++# CONFIG_DVB_STB0899 is not set
++# CONFIG_DVB_STB6100 is not set
++
++#
++# DVB-S (satellite) frontends
++#
++CONFIG_DVB_CX24110=m
++CONFIG_DVB_CX24123=m
++CONFIG_DVB_MT312=m
++CONFIG_DVB_S5H1420=m
++# CONFIG_DVB_STV0288 is not set
++# CONFIG_DVB_STB6000 is not set
++CONFIG_DVB_STV0299=m
++CONFIG_DVB_TDA8083=m
++CONFIG_DVB_TDA10086=m
++# CONFIG_DVB_TDA8261 is not set
++CONFIG_DVB_VES1X93=m
++CONFIG_DVB_TUNER_ITD1000=m
++# CONFIG_DVB_TUNER_CX24113 is not set
++CONFIG_DVB_TDA826X=m
++CONFIG_DVB_TUA6100=m
++# CONFIG_DVB_CX24116 is not set
++# CONFIG_DVB_SI21XX is not set
++
++#
++# DVB-T (terrestrial) frontends
++#
++CONFIG_DVB_SP8870=m
++CONFIG_DVB_SP887X=m
++CONFIG_DVB_CX22700=m
++CONFIG_DVB_CX22702=m
++# CONFIG_DVB_DRX397XD is not set
++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
++
++#
++# DVB-C (cable) frontends
++#
++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_LGDT3304 is not set
++CONFIG_DVB_S5H1409=m
++CONFIG_DVB_AU8522=m
++CONFIG_DVB_S5H1411=m
++
++#
++# ISDB-T (terrestrial) frontends
++#
++# CONFIG_DVB_S921 is not set
++
++#
++# 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_DVB_LGS8GL5 is not set
++
++#
++# Tools to develop new frontends
++#
++# CONFIG_DVB_DUMMY_FE is not set
++# CONFIG_DVB_AF9013 is not set
++# CONFIG_DAB is not set
++
++#
++# Graphics support
++#
++# CONFIG_VGASTATE is not set
++# CONFIG_VIDEO_OUTPUT_CONTROL is not set
++CONFIG_FB=y
++# CONFIG_FIRMWARE_EDID is not set
++# CONFIG_FB_DDC is not set
++# CONFIG_FB_BOOT_VESA_SUPPORT is not set
++CONFIG_FB_CFB_FILLRECT=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_FOREIGN_ENDIAN is not set
++# CONFIG_FB_SYS_FOPS is not set
++# CONFIG_FB_SVGALIB is not set
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++# CONFIG_FB_MODE_HELPERS is not set
++# CONFIG_FB_TILEBLITTING is not set
++
++#
++# Frame buffer hardware drivers
++#
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_VIRTUAL is not set
++# CONFIG_FB_METRONOME is not set
++# CONFIG_FB_MB862XX is not set
++# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
++CONFIG_OMAP2_DSS=m
++CONFIG_OMAP2_DSS_VRAM_SIZE=12
++CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
++# CONFIG_OMAP2_DSS_RFBI is not set
++CONFIG_OMAP2_DSS_VENC=y
++# CONFIG_OMAP2_DSS_SDI is not set
++# CONFIG_OMAP2_DSS_DSI is not set
++# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
++CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
++
++#
++# OMAP2/3 Display Device Drivers
++#
++CONFIG_PANEL_GENERIC=m
++CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C=m
++# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
++# CONFIG_PANEL_N800 is not set
++# CONFIG_CTRL_BLIZZARD is not set
++CONFIG_FB_OMAP2=m
++CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
++# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
++CONFIG_FB_OMAP2_NUM_FBS=3
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Display device support
++#
++CONFIG_DISPLAY_SUPPORT=y
++
++#
++# Display hardware drivers
++#
++
++#
++# Console display driver support
++#
++# CONFIG_VGA_CONSOLE is not set
++CONFIG_DUMMY_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE is not set
++# CONFIG_LOGO is not set
++CONFIG_SOUND=y
++CONFIG_SOUND_OSS_CORE=y
++CONFIG_SND=y
++CONFIG_SND_TIMER=y
++CONFIG_SND_PCM=y
++CONFIG_SND_SEQUENCER=m
++# CONFIG_SND_SEQ_DUMMY is not set
++CONFIG_SND_OSSEMUL=y
++CONFIG_SND_MIXER_OSS=y
++CONFIG_SND_PCM_OSS=y
++CONFIG_SND_PCM_OSS_PLUGINS=y
++CONFIG_SND_SEQUENCER_OSS=y
++# CONFIG_SND_HRTIMER 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=y
++CONFIG_SND_DEBUG=y
++# CONFIG_SND_DEBUG_VERBOSE is not set
++# CONFIG_SND_PCM_XRUN_DEBUG is not set
++CONFIG_SND_DRIVERS=y
++# CONFIG_SND_DUMMY is not set
++# CONFIG_SND_VIRMIDI is not set
++# CONFIG_SND_MTPAV is not set
++# CONFIG_SND_SERIAL_U16550 is not set
++# CONFIG_SND_MPU401 is not set
++CONFIG_SND_ARM=y
++CONFIG_SND_SPI=y
++CONFIG_SND_SOC=y
++CONFIG_SND_OMAP_SOC=y
++CONFIG_SND_OMAP_SOC_MCBSP=y
++CONFIG_SND_OMAP_SOC_OVERO=y
++CONFIG_SND_SOC_I2C_AND_SPI=y
++# CONFIG_SND_SOC_ALL_CODECS is not set
++CONFIG_SND_SOC_TWL4030=y
++# CONFIG_SOUND_PRIME is not set
++CONFIG_HID_SUPPORT=y
++CONFIG_HID=y
++CONFIG_HID_DEBUG=y
++# CONFIG_HIDRAW is not set
++# CONFIG_HID_PID is not set
++
++#
++# Special HID drivers
++#
++CONFIG_HID_COMPAT=y
++# CONFIG_HID_APPLE 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 is not set
++# CONFIG_USB_OTG_WHITELIST is not set
++# CONFIG_USB_OTG_BLACKLIST_HUB is not set
++CONFIG_USB_MUSB_HDRC=y
++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_GADGET_MUSB_HDRC=y
++# CONFIG_MUSB_PIO_ONLY is not set
++CONFIG_USB_INVENTRA_DMA=y
++# CONFIG_USB_TI_CPPI_DMA is not set
++# CONFIG_USB_MUSB_DEBUG is not set
++
++#
++# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
++#
++CONFIG_USB_GADGET=y
++# CONFIG_USB_GADGET_DEBUG is not set
++# CONFIG_USB_GADGET_DEBUG_FILES is not set
++# CONFIG_USB_GADGET_DEBUG_FS is not set
++CONFIG_USB_GADGET_VBUS_DRAW=2
++CONFIG_USB_GADGET_SELECTED=y
++# CONFIG_USB_GADGET_AT91 is not set
++# CONFIG_USB_GADGET_ATMEL_USBA is not set
++# CONFIG_USB_GADGET_FSL_USB2 is not set
++# CONFIG_USB_GADGET_LH7A40X is not set
++# CONFIG_USB_GADGET_OMAP is not set
++# CONFIG_USB_GADGET_PXA25X is not set
++# CONFIG_USB_GADGET_PXA27X is not set
++# CONFIG_USB_GADGET_S3C2410 is not set
++# CONFIG_USB_GADGET_IMX is not set
++# CONFIG_USB_GADGET_M66592 is not set
++# CONFIG_USB_GADGET_AMD5536UDC is not set
++# CONFIG_USB_GADGET_FSL_QE is not set
++# CONFIG_USB_GADGET_CI13XXX is not set
++# CONFIG_USB_GADGET_NET2280 is not set
++# CONFIG_USB_GADGET_GOKU is not set
++# CONFIG_USB_GADGET_DUMMY_HCD is not set
++CONFIG_USB_GADGET_DUALSPEED=y
++# 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_USB_G_PRINTER is not set
++# CONFIG_USB_CDC_COMPOSITE is not set
++
++#
++# OTG and related infrastructure
++#
++CONFIG_USB_OTG_UTILS=y
++# CONFIG_USB_GPIO_VBUS is not set
++# CONFIG_ISP1301_OMAP is not set
++CONFIG_TWL4030_USB=y
++CONFIG_MMC=y
++# CONFIG_MMC_DEBUG is not set
++CONFIG_MMC_UNSAFE_RESUME=y
++
++#
++# MMC/SD/SDIO Card Drivers
++#
++CONFIG_MMC_BLOCK=y
++CONFIG_MMC_BLOCK_BOUNCE=y
++CONFIG_SDIO_UART=y
++# CONFIG_MMC_TEST is not set
++
++#
++# MMC/SD/SDIO Host Controller Drivers
++#
++# CONFIG_MMC_SDHCI is not set
++CONFIG_MMC_OMAP_HS=y
++# CONFIG_MMC_SPI is not set
++# CONFIG_MEMSTICK is not set
++# CONFIG_ACCESSIBILITY is not set
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=y
++
++#
++# LED drivers
++#
++# CONFIG_LEDS_OMAP_DEBUG is not set
++# CONFIG_LEDS_OMAP is not set
++# CONFIG_LEDS_OMAP_PWM is not set
++# CONFIG_LEDS_PCA9532 is not set
++CONFIG_LEDS_GPIO=y
++# CONFIG_LEDS_LP5521 is not set
++# CONFIG_LEDS_PCA955X is not set
++
++#
++# LED Triggers
++#
++CONFIG_LEDS_TRIGGERS=y
++CONFIG_LEDS_TRIGGER_TIMER=y
++CONFIG_LEDS_TRIGGER_HEARTBEAT=y
++# CONFIG_LEDS_TRIGGER_BACKLIGHT 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_TWL4030=y
++# CONFIG_RTC_DRV_S35390A is not set
++# CONFIG_RTC_DRV_FM3130 is not set
++# CONFIG_RTC_DRV_RX8581 is not set
++
++#
++# SPI RTC drivers
++#
++# CONFIG_RTC_DRV_M41T94 is not set
++# CONFIG_RTC_DRV_DS1305 is not set
++# CONFIG_RTC_DRV_DS1390 is not set
++# CONFIG_RTC_DRV_MAX6902 is not set
++# CONFIG_RTC_DRV_R9701 is not set
++# CONFIG_RTC_DRV_RS5C348 is not set
++# CONFIG_RTC_DRV_DS3234 is not set
++
++#
++# Platform RTC drivers
++#
++# CONFIG_RTC_DRV_CMOS is not set
++# CONFIG_RTC_DRV_DS1286 is not set
++# CONFIG_RTC_DRV_DS1511 is not set
++# CONFIG_RTC_DRV_DS1553 is not set
++# CONFIG_RTC_DRV_DS1742 is not set
++# CONFIG_RTC_DRV_STK17TA8 is not set
++# CONFIG_RTC_DRV_M48T86 is not set
++# CONFIG_RTC_DRV_M48T35 is not set
++# CONFIG_RTC_DRV_M48T59 is not set
++# CONFIG_RTC_DRV_BQ4802 is not set
++# CONFIG_RTC_DRV_V3020 is not set
++
++#
++# on-CPU RTC drivers
++#
++# CONFIG_DMADEVICES is not set
++CONFIG_REGULATOR=y
++# CONFIG_REGULATOR_DEBUG is not set
++# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
++# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
++# CONFIG_REGULATOR_BQ24022 is not set
++CONFIG_REGULATOR_TWL4030=y
++# CONFIG_UIO is not set
++# CONFIG_STAGING 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_EXT4_FS is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++# CONFIG_REISERFS_FS is not set
++# CONFIG_JFS_FS is not set
++CONFIG_FS_POSIX_ACL=y
++CONFIG_FILE_LOCKING=y
++CONFIG_XFS_FS=m
++# CONFIG_XFS_QUOTA is not set
++# CONFIG_XFS_POSIX_ACL is not set
++# CONFIG_XFS_RT is not set
++# CONFIG_XFS_DEBUG is not set
++# CONFIG_GFS2_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_BTRFS_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_QUOTA_TREE=y
++# CONFIG_QFMT_V1 is not set
++CONFIG_QFMT_V2=y
++CONFIG_QUOTACTL=y
++# CONFIG_AUTOFS_FS is not set
++# CONFIG_AUTOFS4_FS is not set
++CONFIG_FUSE_FS=m
++
++#
++# CD-ROM/DVD Filesystems
++#
++CONFIG_ISO9660_FS=m
++CONFIG_JOLIET=y
++CONFIG_ZISOFS=y
++CONFIG_UDF_FS=m
++CONFIG_UDF_NLS=y
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_SYSCTL=y
++CONFIG_PROC_PAGE_MONITOR=y
++CONFIG_SYSFS=y
++CONFIG_TMPFS=y
++# CONFIG_TMPFS_POSIX_ACL is not set
++# CONFIG_HUGETLB_PAGE is not set
++# CONFIG_CONFIGFS_FS is not set
++CONFIG_MISC_FILESYSTEMS=y
++# CONFIG_ADFS_FS is not set
++# CONFIG_AFFS_FS is not set
++# CONFIG_HFS_FS is not set
++# CONFIG_HFSPLUS_FS is not set
++# CONFIG_BEFS_FS is not set
++# CONFIG_BFS_FS is not set
++# CONFIG_EFS_FS is not set
++CONFIG_JFFS2_FS=y
++CONFIG_JFFS2_FS_DEBUG=0
++CONFIG_JFFS2_FS_WRITEBUFFER=y
++# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
++CONFIG_JFFS2_SUMMARY=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_SQUASHFS is not set
++# CONFIG_VXFS_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_OMFS_FS is not set
++# CONFIG_HPFS_FS is not set
++# CONFIG_QNX4FS_FS is not set
++# CONFIG_ROMFS_FS is not set
++# CONFIG_SYSV_FS is not set
++# CONFIG_UFS_FS is not set
++CONFIG_NETWORK_FILESYSTEMS=y
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++CONFIG_NFS_V4=y
++CONFIG_ROOT_NFS=y
++# CONFIG_NFSD is not set
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_EXPORTFS=m
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++CONFIG_SUNRPC_GSS=y
++# CONFIG_SUNRPC_REGISTER_V4 is not set
++CONFIG_RPCSEC_GSS_KRB5=y
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++# CONFIG_SMB_FS 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
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++# CONFIG_NLS_CODEPAGE_737 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++# CONFIG_NLS_CODEPAGE_850 is not set
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++# CONFIG_NLS_CODEPAGE_1250 is not set
++# CONFIG_NLS_CODEPAGE_1251 is not set
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++# CONFIG_NLS_ISO8859_2 is not set
++# CONFIG_NLS_ISO8859_3 is not set
++# CONFIG_NLS_ISO8859_4 is not set
++# CONFIG_NLS_ISO8859_5 is not set
++# CONFIG_NLS_ISO8859_6 is not set
++# CONFIG_NLS_ISO8859_7 is not set
++# CONFIG_NLS_ISO8859_9 is not set
++# CONFIG_NLS_ISO8859_13 is not set
++# CONFIG_NLS_ISO8859_14 is not set
++# CONFIG_NLS_ISO8859_15 is not set
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++# CONFIG_NLS_UTF8 is not set
++# CONFIG_DLM is not set
++
++#
++# Kernel hacking
++#
++# CONFIG_PRINTK_TIME is not set
++CONFIG_ENABLE_WARN_DEPRECATED=y
++CONFIG_ENABLE_MUST_CHECK=y
++CONFIG_FRAME_WARN=1024
++CONFIG_MAGIC_SYSRQ=y
++# CONFIG_UNUSED_SYMBOLS is not set
++CONFIG_DEBUG_FS=y
++# CONFIG_HEADERS_CHECK is not set
++CONFIG_DEBUG_KERNEL=y
++# CONFIG_DEBUG_SHIRQ is not set
++CONFIG_DETECT_SOFTLOCKUP=y
++# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
++CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
++CONFIG_SCHED_DEBUG=y
++CONFIG_SCHEDSTATS=y
++CONFIG_TIMER_STATS=y
++# CONFIG_DEBUG_OBJECTS is not set
++# CONFIG_SLUB_DEBUG_ON is not set
++# CONFIG_SLUB_STATS is not set
++# CONFIG_DEBUG_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_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_WRITECOUNT is not set
++# CONFIG_DEBUG_MEMORY_INIT is not set
++# CONFIG_DEBUG_LIST is not set
++# CONFIG_DEBUG_SG is not set
++# CONFIG_DEBUG_NOTIFIERS is not set
++CONFIG_FRAME_POINTER=y
++# CONFIG_BOOT_PRINTK_DELAY is not set
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_RCU_CPU_STALL_DETECTOR is not set
++# CONFIG_BACKTRACE_SELF_TEST is not set
++# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
++# CONFIG_FAULT_INJECTION is not set
++# CONFIG_LATENCYTOP is not set
++CONFIG_NOP_TRACER=y
++CONFIG_HAVE_FUNCTION_TRACER=y
++CONFIG_RING_BUFFER=y
++CONFIG_TRACING=y
++
++#
++# Tracers
++#
++# CONFIG_FUNCTION_TRACER is not set
++# CONFIG_IRQSOFF_TRACER is not set
++# CONFIG_SCHED_TRACER is not set
++# CONFIG_CONTEXT_SWITCH_TRACER is not set
++# CONFIG_BOOT_TRACER is not set
++# CONFIG_TRACE_BRANCH_PROFILING is not set
++# CONFIG_STACK_TRACER is not set
++# CONFIG_FTRACE_STARTUP_TEST is not set
++# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
++# CONFIG_SAMPLES is not set
++CONFIG_HAVE_ARCH_KGDB=y
++# CONFIG_KGDB is not set
++CONFIG_DEBUG_USER=y
++CONFIG_DEBUG_ERRORS=y
++# CONFIG_DEBUG_STACK_USAGE is not set
++# CONFIG_DEBUG_LL is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++# CONFIG_SECURITYFS is not set
++# CONFIG_SECURITY_FILE_CAPABILITIES is not set
++CONFIG_XOR_BLOCKS=m
++CONFIG_ASYNC_CORE=m
++CONFIG_ASYNC_MEMCPY=m
++CONFIG_ASYNC_XOR=m
++CONFIG_CRYPTO=y
++
++#
++# Crypto core or helper
++#
++# CONFIG_CRYPTO_FIPS is not set
++CONFIG_CRYPTO_ALGAPI=y
++CONFIG_CRYPTO_ALGAPI2=y
++CONFIG_CRYPTO_AEAD2=y
++CONFIG_CRYPTO_BLKCIPHER=y
++CONFIG_CRYPTO_BLKCIPHER2=y
++CONFIG_CRYPTO_HASH=y
++CONFIG_CRYPTO_HASH2=y
++CONFIG_CRYPTO_RNG2=y
++CONFIG_CRYPTO_MANAGER=y
++CONFIG_CRYPTO_MANAGER2=y
++CONFIG_CRYPTO_GF128MUL=m
++CONFIG_CRYPTO_NULL=m
++CONFIG_CRYPTO_CRYPTD=m
++# CONFIG_CRYPTO_AUTHENC is not set
++CONFIG_CRYPTO_TEST=m
++
++#
++# Authenticated Encryption with Associated Data
++#
++# CONFIG_CRYPTO_CCM is not set
++# CONFIG_CRYPTO_GCM is not set
++# CONFIG_CRYPTO_SEQIV is not set
++
++#
++# Block modes
++#
++CONFIG_CRYPTO_CBC=y
++# CONFIG_CRYPTO_CTR is not set
++# CONFIG_CRYPTO_CTS is not set
++CONFIG_CRYPTO_ECB=y
++CONFIG_CRYPTO_LRW=m
++CONFIG_CRYPTO_PCBC=m
++# CONFIG_CRYPTO_XTS is not set
++
++#
++# Hash modes
++#
++CONFIG_CRYPTO_HMAC=m
++CONFIG_CRYPTO_XCBC=m
++
++#
++# Digest
++#
++CONFIG_CRYPTO_CRC32C=y
++CONFIG_CRYPTO_MD4=m
++CONFIG_CRYPTO_MD5=y
++CONFIG_CRYPTO_MICHAEL_MIC=y
++# CONFIG_CRYPTO_RMD128 is not set
++# CONFIG_CRYPTO_RMD160 is not set
++# CONFIG_CRYPTO_RMD256 is not set
++# CONFIG_CRYPTO_RMD320 is not set
++CONFIG_CRYPTO_SHA1=m
++CONFIG_CRYPTO_SHA256=m
++CONFIG_CRYPTO_SHA512=m
++CONFIG_CRYPTO_TGR192=m
++CONFIG_CRYPTO_WP512=m
++
++#
++# Ciphers
++#
++CONFIG_CRYPTO_AES=y
++CONFIG_CRYPTO_ANUBIS=m
++CONFIG_CRYPTO_ARC4=y
++CONFIG_CRYPTO_BLOWFISH=m
++CONFIG_CRYPTO_CAMELLIA=m
++CONFIG_CRYPTO_CAST5=m
++CONFIG_CRYPTO_CAST6=m
++CONFIG_CRYPTO_DES=y
++CONFIG_CRYPTO_FCRYPT=m
++CONFIG_CRYPTO_KHAZAD=m
++# CONFIG_CRYPTO_SALSA20 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 is not set
++
++#
++# Random Number Generation
++#
++# CONFIG_CRYPTO_ANSI_CPRNG is not set
++CONFIG_CRYPTO_HW=y
++
++#
++# Library routines
++#
++CONFIG_BITREVERSE=y
++CONFIG_GENERIC_FIND_LAST_BIT=y
++CONFIG_CRC_CCITT=y
++CONFIG_CRC16=m
++CONFIG_CRC_T10DIF=y
++CONFIG_CRC_ITU_T=y
++CONFIG_CRC32=y
++CONFIG_CRC7=y
++CONFIG_LIBCRC32C=y
++CONFIG_ZLIB_INFLATE=y
++CONFIG_ZLIB_DEFLATE=y
++CONFIG_LZO_COMPRESS=y
++CONFIG_LZO_DECOMPRESS=y
++CONFIG_PLIST=y
++CONFIG_HAS_IOMEM=y
++CONFIG_HAS_IOPORT=y
++CONFIG_HAS_DMA=y
+diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
+index 0a1099e..3c664a9 100644
+--- a/arch/arm/mach-omap2/board-3430sdp.c
++++ b/arch/arm/mach-omap2/board-3430sdp.c
+@@ -242,6 +243,35 @@ static struct spi_board_info sdp3430_spi_board_info[] __initdata = {
+ },
+ };
+
++
++#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91
++#define SDP2430_LCD_PANEL_ENABLE_GPIO 154
++#if 0
++#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 24
++#define SDP3430_LCD_PANEL_ENABLE_GPIO 28
++#else
++#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 8
++#define SDP3430_LCD_PANEL_ENABLE_GPIO 5
++#endif
++
++#define PM_RECEIVER TWL4030_MODULE_PM_RECEIVER
++#define ENABLE_VAUX2_DEDICATED 0x09
++#define ENABLE_VAUX2_DEV_GRP 0x20
++#define ENABLE_VAUX3_DEDICATED 0x03
++#define ENABLE_VAUX3_DEV_GRP 0x20
++
++#define ENABLE_VPLL2_DEDICATED 0x05
++#define ENABLE_VPLL2_DEV_GRP 0xE0
++#define TWL4030_VPLL2_DEV_GRP 0x33
++#define TWL4030_VPLL2_DEDICATED 0x36
++
++#define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
++
++static unsigned backlight_gpio;
++static unsigned enable_gpio;
++static int lcd_enabled;
++static int dvi_enabled;
++
+ static struct platform_device sdp3430_lcd_device = {
+ .name = "sdp2430_lcd",
+ .id = -1,
+@@ -257,9 +287,198 @@ static struct regulator_consumer_supply sdp3430_vdvi_supply = {
+ .dev = &sdp3430_lcd_device.dev,
+ };
+
++static void enable_vpll2(int enable)
++{
++ u8 ded_val, grp_val;
++
++ if (enable) {
++ ded_val = ENABLE_VPLL2_DEDICATED;
++ grp_val = ENABLE_VPLL2_DEV_GRP;
++ } else {
++ ded_val = 0;
++ grp_val = 0;
++ }
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ded_val, TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ grp_val, TWL4030_VPLL2_DEV_GRP);
++}
++
++static int sdp3430_dsi_power_up(void)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0)
++ enable_vpll2(1);
++ return 0;
++}
++
++static void sdp3430_dsi_power_down(void)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0)
++ enable_vpll2(0);
++}
++
++static void __init sdp3430_display_init(void)
++{
++ int r;
++
++ enable_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO;
++ backlight_gpio = SDP3430_LCD_PANEL_BACKLIGHT_GPIO;
++
++ r = gpio_request(enable_gpio, "LCD reset");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD reset GPIO\n");
++ goto err0;
++ }
++
++ r = gpio_request(backlight_gpio, "LCD Backlight");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD backlight GPIO\n");
++ goto err1;
++ }
++
++ gpio_direction_output(enable_gpio, 0);
++ gpio_direction_output(backlight_gpio, 0);
++
++ return;
++err1:
++ gpio_free(enable_gpio);
++err0:
++ return;
++}
++
++static int sdp3430_panel_enable_lcd(struct omap_display *display)
++{
++ u8 ded_val, ded_reg;
++ u8 grp_val, grp_reg;
++
++ if (dvi_enabled) {
++ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
++ return -EINVAL;
++ }
++
++ ded_reg = TWL4030_VAUX3_DEDICATED;
++ ded_val = ENABLE_VAUX3_DEDICATED;
++ grp_reg = TWL4030_VAUX3_DEV_GRP;
++ grp_val = ENABLE_VAUX3_DEV_GRP;
++
++ gpio_direction_output(enable_gpio, 1);
++ gpio_direction_output(backlight_gpio, 1);
++
++ if (0 != t2_out(PM_RECEIVER, ded_val, ded_reg))
++ return -EIO;
++ if (0 != t2_out(PM_RECEIVER, grp_val, grp_reg))
++ return -EIO;
++
++ sdp3430_dsi_power_up();
++
++ lcd_enabled = 1;
++
++ return 0;
++}
++
++static void sdp3430_panel_disable_lcd(struct omap_display *display)
++{
++ lcd_enabled = 0;
++
++ sdp3430_dsi_power_down();
++
++ gpio_direction_output(enable_gpio, 0);
++ gpio_direction_output(backlight_gpio, 0);
++}
++
++static struct omap_dss_display_config sdp3430_display_data = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "lcd",
++ .panel_name = "sharp-ls037v7dw01",
++ .u.dpi.data_lines = 16,
++ .panel_enable = sdp3430_panel_enable_lcd,
++ .panel_disable = sdp3430_panel_disable_lcd,
++};
++
++static int sdp3430_panel_enable_dvi(struct omap_display *display)
++{
++ if (lcd_enabled) {
++ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
++ return -EINVAL;
++ }
++
++ sdp3430_dsi_power_up();
++
++ dvi_enabled = 1;
++
++ return 0;
++}
++
++static void sdp3430_panel_disable_dvi(struct omap_display *display)
++{
++ sdp3430_dsi_power_down();
++
++ dvi_enabled = 0;
++}
++
++
++static struct omap_dss_display_config sdp3430_display_data_dvi = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "dvi",
++ .panel_name = "panel-generic",
++ .u.dpi.data_lines = 24,
++ .panel_enable = sdp3430_panel_enable_dvi,
++ .panel_disable = sdp3430_panel_disable_dvi,
++};
++
++static int sdp3430_panel_enable_tv(struct omap_display *display)
++{
++#define ENABLE_VDAC_DEDICATED 0x03
++#define ENABLE_VDAC_DEV_GRP 0x20
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VDAC_DEDICATED,
++ TWL4030_VDAC_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VDAC_DEV_GRP, TWL4030_VDAC_DEV_GRP);
++
++ return 0;
++}
++
++static void sdp3430_panel_disable_tv(struct omap_display *display)
++{
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
++ TWL4030_VDAC_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
++ TWL4030_VDAC_DEV_GRP);
++}
++
++static struct omap_dss_display_config sdp3430_display_data_tv = {
++ .type = OMAP_DISPLAY_TYPE_VENC,
++ .name = "tv",
++ .u.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
++ .panel_enable = sdp3430_panel_enable_tv,
++ .panel_disable = sdp3430_panel_disable_tv,
++};
++
++static struct omap_dss_board_info sdp3430_dss_data = {
++ .dsi_power_up = sdp3430_dsi_power_up,
++ .dsi_power_down = sdp3430_dsi_power_down,
++ .num_displays = 3,
++ .displays = {
++ &sdp3430_display_data,
++ &sdp3430_display_data_dvi,
++ &sdp3430_display_data_tv,
++ }
++};
++
++static struct platform_device sdp3430_dss_device = {
++ .name = "omapdss",
++ .id = -1,
++ .dev = {
++ .platform_data = &sdp3430_dss_data,
++ },
++};
++
+ static struct platform_device *sdp3430_devices[] __initdata = {
+ &sdp3430_smc91x_device,
+- &sdp3430_lcd_device,
++ &sdp3430_dss_device,
+ };
+
+ static inline void __init sdp3430_init_smc91x(void)
+@@ -306,13 +525,8 @@ static struct omap_uart_config sdp3430_uart_config __initdata = {
+ .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
+ };
+
+-static struct omap_lcd_config sdp3430_lcd_config __initdata = {
+- .ctrl_name = "internal",
+-};
+-
+ static struct omap_board_config_kernel sdp3430_config[] __initdata = {
+ { OMAP_TAG_UART, &sdp3430_uart_config },
+- { OMAP_TAG_LCD, &sdp3430_lcd_config },
+ };
+
+ static int sdp3430_batt_table[] = {
+@@ -681,6 +895,7 @@ static void __init omap_3430sdp_init(void)
+ omap_serial_init();
+ usb_musb_init();
+ usb_ehci_init();
++ sdp3430_display_init();
+ }
+
+ static void __init omap_3430sdp_map_io(void)
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index 346351e..b67e7a5 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -30,6 +30,7 @@
+
+ #include <linux/regulator/machine.h>
+ #include <linux/i2c/twl4030.h>
++#include <linux/omapfb.h>
+
+ #include <mach/hardware.h>
+ #include <asm/mach-types.h>
+@@ -312,10 +314,6 @@ static void __init omap3_beagle_init_irq(void)
+ omap_gpio_init();
+ }
+
+-static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
+- .ctrl_name = "internal",
+-};
+-
+ static struct gpio_led gpio_leds[] = {
+ {
+ .name = "beagleboard::usr0",
+@@ -369,13 +367,94 @@ static struct platform_device keys_gpio = {
+ },
+ };
+
++/* DSS */
++
++static int beagle_enable_dvi(struct omap_display *display)
++{
++ if (display->hw_config.panel_reset_gpio != -1)
++ gpio_direction_output(display->hw_config.panel_reset_gpio, 1);
++
++ return 0;
++}
++
++static void beagle_disable_dvi(struct omap_display *display)
++{
++ if (display->hw_config.panel_reset_gpio != -1)
++ gpio_direction_output(display->hw_config.panel_reset_gpio, 0);
++}
++
++static struct omap_dss_display_config beagle_display_data_dvi = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "dvi",
++ .panel_name = "panel-generic",
++ .u.dpi.data_lines = 24,
++ .panel_reset_gpio = 170,
++ .panel_enable = beagle_enable_dvi,
++ .panel_disable = beagle_disable_dvi,
++};
++
++
++static int beagle_panel_enable_tv(struct omap_display *display)
++{
++#define ENABLE_VDAC_DEDICATED 0x03
++#define ENABLE_VDAC_DEV_GRP 0x20
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VDAC_DEDICATED,
++ TWL4030_VDAC_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VDAC_DEV_GRP, TWL4030_VDAC_DEV_GRP);
++
++ return 0;
++}
++
++static void beagle_panel_disable_tv(struct omap_display *display)
++{
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
++ TWL4030_VDAC_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
++ TWL4030_VDAC_DEV_GRP);
++}
++
++static struct omap_dss_display_config beagle_display_data_tv = {
++ .type = OMAP_DISPLAY_TYPE_VENC,
++ .name = "tv",
++ .u.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
++ .panel_enable = beagle_panel_enable_tv,
++ .panel_disable = beagle_panel_disable_tv,
++};
++
++static struct omap_dss_board_info beagle_dss_data = {
++ .num_displays = 2,
++ .displays = {
++ &beagle_display_data_dvi,
++ &beagle_display_data_tv,
++ }
++};
++
++static struct platform_device beagle_dss_device = {
++ .name = "omapdss",
++ .id = -1,
++ .dev = {
++ .platform_data = &beagle_dss_data,
++ },
++};
++
++static void __init beagle_display_init(void)
++{
++ int r;
++
++ r = gpio_request(beagle_display_data_dvi.panel_reset_gpio, "DVI reset");
++ if (r < 0)
++ printk(KERN_ERR "Unable to get DVI reset GPIO\n");
++}
++
+ static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
+ { OMAP_TAG_UART, &omap3_beagle_uart_config },
+- { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
+ };
+
+ static struct platform_device *omap3_beagle_devices[] __initdata = {
+- &omap3_beagle_lcd_device,
++ &beagle_dss_device,
+ &leds_gpio,
+ &keys_gpio,
+ };
+@@ -428,13 +507,11 @@ static void __init omap3_beagle_init(void)
+ omap_serial_init();
+
+ omap_cfg_reg(J25_34XX_GPIO170);
+- gpio_request(170, "DVI_nPD");
+- /* REVISIT leave DVI powered down until it's needed ... */
+- gpio_direction_output(170, true);
+
+ usb_musb_init();
+ usb_ehci_init();
+ omap3beagle_flash_init();
++ beagle_display_init();
+ }
+
+ static void __init omap3_beagle_map_io(void)
+diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
+index 024d7c4..6f5a866 100644
+--- a/arch/arm/mach-omap2/board-omap3evm.c
++++ b/arch/arm/mach-omap2/board-omap3evm.c
+@@ -216,13 +217,215 @@ static int __init omap3_evm_i2c_init(void)
+ return 0;
+ }
+
+-static struct platform_device omap3_evm_lcd_device = {
+- .name = "omap3evm_lcd",
+- .id = -1,
++#define LCD_PANEL_LR 2
++#define LCD_PANEL_UD 3
++#define LCD_PANEL_INI 152
++#define LCD_PANEL_ENABLE_GPIO 153
++#define LCD_PANEL_QVGA 154
++#define LCD_PANEL_RESB 155
++
++#define ENABLE_VDAC_DEDICATED 0x03
++#define ENABLE_VDAC_DEV_GRP 0x20
++#define ENABLE_VPLL2_DEDICATED 0x05
++#define ENABLE_VPLL2_DEV_GRP 0xE0
++
++#define TWL4030_GPIODATA_IN3 0x03
++#define TWL4030_GPIODATA_DIR3 0x06
++#define TWL4030_VPLL2_DEV_GRP 0x33
++#define TWL4030_VPLL2_DEDICATED 0x36
++
++static int lcd_enabled;
++static int dvi_enabled;
++
++static void __init omap3_evm_display_init(void)
++{
++ int r;
++ r = gpio_request(LCD_PANEL_LR, "lcd_panel_lr");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_LR\n");
++ return;
++ }
++ r = gpio_request(LCD_PANEL_UD, "lcd_panel_ud");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_UD\n");
++ goto err_1;
++ }
++
++ r = gpio_request(LCD_PANEL_INI, "lcd_panel_ini");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_INI\n");
++ goto err_2;
++ }
++ r = gpio_request(LCD_PANEL_RESB, "lcd_panel_resb");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_RESB\n");
++ goto err_3;
++ }
++ r = gpio_request(LCD_PANEL_QVGA, "lcd_panel_qvga");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_QVGA\n");
++ goto err_4;
++ }
++
++ gpio_direction_output(LCD_PANEL_LR, 0);
++ gpio_direction_output(LCD_PANEL_UD, 0);
++ gpio_direction_output(LCD_PANEL_INI, 0);
++ gpio_direction_output(LCD_PANEL_RESB, 0);
++ gpio_direction_output(LCD_PANEL_QVGA, 0);
++
++#define TWL_LED_LEDEN 0x00
++#define TWL_PWMA_PWMAON 0x00
++#define TWL_PWMA_PWMAOFF 0x01
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_LEDEN);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
++
++ gpio_direction_output(LCD_PANEL_RESB, 1);
++ gpio_direction_output(LCD_PANEL_INI, 1);
++ gpio_direction_output(LCD_PANEL_QVGA, 0);
++ gpio_direction_output(LCD_PANEL_LR, 1);
++ gpio_direction_output(LCD_PANEL_UD, 1);
++
++ return;
++
++err_4:
++ gpio_free(LCD_PANEL_RESB);
++err_3:
++ gpio_free(LCD_PANEL_INI);
++err_2:
++ gpio_free(LCD_PANEL_UD);
++err_1:
++ gpio_free(LCD_PANEL_LR);
++
++}
++
++static int omap3_evm_panel_enable_lcd(struct omap_display *display)
++{
++ if (dvi_enabled) {
++ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
++ return -EINVAL;
++ }
++ if (omap_rev() > OMAP3430_REV_ES1_0) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
++ }
++ gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 0);
++ lcd_enabled = 1;
++ return 0;
++}
++
++static void omap3_evm_panel_disable_lcd(struct omap_display *display)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
++ TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
++ TWL4030_VPLL2_DEV_GRP);
++ }
++ gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 1);
++ lcd_enabled = 0;
++}
++
++static struct omap_dss_display_config omap3_evm_display_data = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "lcd",
++ .panel_name = "sharp-ls037v7dw01",
++ .u.dpi.data_lines = 18,
++ .panel_enable = omap3_evm_panel_enable_lcd,
++ .panel_disable = omap3_evm_panel_disable_lcd,
+ };
+
+-static struct omap_lcd_config omap3_evm_lcd_config __initdata = {
+- .ctrl_name = "internal",
++static int omap3_evm_panel_enable_tv(struct omap_display *display)
++{
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VDAC_DEDICATED, TWL4030_VDAC_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VDAC_DEV_GRP, TWL4030_VDAC_DEV_GRP);
++ return 0;
++}
++
++static void omap3_evm_panel_disable_tv(struct omap_display *display)
++{
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
++ TWL4030_VDAC_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
++ TWL4030_VDAC_DEV_GRP);
++}
++
++static struct omap_dss_display_config omap3_evm_display_data_tv = {
++ .type = OMAP_DISPLAY_TYPE_VENC,
++ .name = "tv",
++ .u.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
++ .panel_enable = omap3_evm_panel_enable_tv,
++ .panel_disable = omap3_evm_panel_disable_tv,
++};
++
++
++static int omap3_evm_panel_enable_dvi(struct omap_display *display)
++{
++ if (lcd_enabled) {
++ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
++ return -EINVAL;
++ }
++ if (omap_rev() > OMAP3430_REV_ES1_0) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
++ }
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
++ TWL4030_GPIODATA_IN3);
++ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
++ TWL4030_GPIODATA_DIR3);
++ dvi_enabled = 1;
++
++ return 0;
++}
++
++static void omap3_evm_panel_disable_dvi(struct omap_display *display)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
++ TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
++ TWL4030_VPLL2_DEV_GRP);
++ }
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
++ TWL4030_GPIODATA_IN3);
++ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
++ TWL4030_GPIODATA_DIR3);
++ dvi_enabled = 0;
++}
++
++
++static struct omap_dss_display_config omap3_evm_display_data_dvi = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "dvi",
++ .panel_name = "panel-generic",
++ .u.dpi.data_lines = 24,
++ .panel_enable = omap3_evm_panel_enable_dvi,
++ .panel_disable = omap3_evm_panel_disable_dvi,
++};
++
++static struct omap_dss_board_info omap3_evm_dss_data = {
++ .num_displays = 3,
++ .displays = {
++ &omap3_evm_display_data,
++ &omap3_evm_display_data_dvi,
++ &omap3_evm_display_data_tv,
++ }
++};
++static struct platform_device omap3_evm_dss_device = {
++ .name = "omapdss",
++ .id = -1,
++ .dev = {
++ .platform_data = &omap3_evm_dss_data,
++ },
+ };
+
+ static void ads7846_dev_init(void)
+@@ -281,11 +484,10 @@ static void __init omap3_evm_init_irq(void)
+
+ static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
+ { OMAP_TAG_UART, &omap3_evm_uart_config },
+- { OMAP_TAG_LCD, &omap3_evm_lcd_config },
+ };
+
+ static struct platform_device *omap3_evm_devices[] __initdata = {
+- &omap3_evm_lcd_device,
++ &omap3_evm_dss_device,
+ &omap3evm_smc911x_device,
+ };
+
+@@ -305,6 +507,7 @@ static void __init omap3_evm_init(void)
+ usb_ehci_init();
+ omap3evm_flash_init();
+ ads7846_dev_init();
++ omap3_evm_display_init();
+ }
+
+ static void __init omap3_evm_map_io(void)
+diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
+index 071f4b0..267bb6b 100644
+--- a/arch/arm/mach-omap2/board-overo.c
++++ b/arch/arm/mach-omap2/board-overo.c
+@@ -41,6 +41,7 @@
+ #include <mach/board-overo.h>
+ #include <mach/board.h>
+ #include <mach/common.h>
++#include <mach/display.h>
+ #include <mach/gpio.h>
+ #include <mach/gpmc.h>
+ #include <mach/hardware.h>
+@@ -176,6 +177,9 @@ static void __init overo_ads7846_init(void)
+ static inline void __init overo_ads7846_init(void) { return; }
+ #endif
+
++static int lcd_enabled;
++static int dvi_enabled;
++
+ static struct mtd_partition overo_nand_partitions[] = {
+ {
+ .name = "xloader",
+@@ -360,22 +364,101 @@ static void __init overo_init_irq(void)
+ omap_gpio_init();
+ }
+
+-static struct platform_device overo_lcd_device = {
+- .name = "overo_lcd",
+- .id = -1,
++/* DSS */
++
++#define OVERO_GPIO_LCD_EN 144
++
++static void __init overo_display_init(void)
++{
++ int r;
++
++ r = gpio_request(OVERO_GPIO_LCD_EN, "display enable");
++ if (r)
++ printk("fail1\n");
++ r = gpio_direction_output(OVERO_GPIO_LCD_EN, 1);
++ if (r)
++ printk("fail2\n");
++ gpio_export(OVERO_GPIO_LCD_EN, 0);
++}
++
++static int overo_panel_enable_dvi(struct omap_display *display)
++{
++ if (lcd_enabled) {
++ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
++ return -EINVAL;
++ }
++ dvi_enabled = 1;
++
++ gpio_set_value(OVERO_GPIO_LCD_EN, 1);
++
++ return 0;
++}
++
++static void overo_panel_disable_dvi(struct omap_display *display)
++{
++ gpio_set_value(OVERO_GPIO_LCD_EN, 0);
++
++ dvi_enabled = 0;
++}
++
++static struct omap_dss_display_config overo_display_data_dvi = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "dvi",
++ .panel_name = "panel-generic",
++ .u.dpi.data_lines = 24,
++ .panel_enable = overo_panel_enable_dvi,
++ .panel_disable = overo_panel_disable_dvi,
+ };
+
+-static struct omap_lcd_config overo_lcd_config __initdata = {
+- .ctrl_name = "internal",
++static int overo_panel_enable_lcd(struct omap_display *display)
++{
++ if (dvi_enabled) {
++ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
++ return -EINVAL;
++ }
++
++ gpio_set_value(OVERO_GPIO_LCD_EN, 1);
++ lcd_enabled = 1;
++ return 0;
++}
++
++static void overo_panel_disable_lcd(struct omap_display *display)
++{
++ gpio_set_value(OVERO_GPIO_LCD_EN, 0);
++ lcd_enabled = 0;
++}
++
++static struct omap_dss_display_config overo_display_data_lcd = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "lcd43",
++ .panel_name = "samsung-lte430wq-f0c",
++ .u.dpi.data_lines = 24,
++ .panel_enable = overo_panel_enable_lcd,
++ .panel_disable = overo_panel_disable_lcd,
++ };
++
++static struct omap_dss_board_info overo_dss_data = {
++ .num_displays = 2,
++ .displays = {
++ &overo_display_data_dvi,
++ &overo_display_data_lcd,
++ }
++};
++
++static struct platform_device overo_dss_device = {
++ .name = "omapdss",
++ .id = -1,
++ .dev = {
++ .platform_data = &overo_dss_data,
++ },
+ };
+
+ static struct omap_board_config_kernel overo_config[] __initdata = {
+ { OMAP_TAG_UART, &overo_uart_config },
+- { OMAP_TAG_LCD, &overo_lcd_config },
+ };
+
+ static struct platform_device *overo_devices[] __initdata = {
+- &overo_lcd_device,
++ &overo_dss_device,
+ };
+
+ static void __init overo_init(void)
+@@ -390,6 +473,7 @@ static void __init overo_init(void)
+ overo_flash_init();
+ overo_init_smsc911x();
+ overo_ads7846_init();
++ overo_display_init();
+
+ if ((gpio_request(OVERO_GPIO_W2W_NRESET,
+ "OVERO_GPIO_W2W_NRESET") == 0) &&
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch
new file mode 100644
index 0000000000..f4cd192bdd
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch
@@ -0,0 +1,39 @@
+From 4741076cae4f4284e1fff9a03f35475b8455af54 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Wed, 1 Apr 2009 14:36:39 +0200
+Subject: [PATCH 08/69] DSS2: Add function to display object to get the backlight level
+
+This is needed by an upcoming patch that changes the backlight
+initialization to use the backlight level set by the bootloader.
+
+Also add a field for the maximum backlight level.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index 6288353..6b702c7 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -211,6 +211,8 @@ struct omap_dss_display_config {
+ int panel_reset_gpio;
+ int ctrl_reset_gpio;
+
++ int max_backlight_level;
++
+ const char *name; /* for debug */
+ const char *ctrl_name;
+ const char *panel_name;
+@@ -225,6 +227,7 @@ struct omap_dss_display_config {
+ void (*ctrl_disable)(struct omap_display *display);
+ int (*set_backlight)(struct omap_display *display,
+ int level);
++ int (*get_backlight)(struct omap_display *display);
+ };
+
+ struct device;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch
new file mode 100644
index 0000000000..82a1474056
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0009-DSS2-Add-acx565akm-panel.patch
@@ -0,0 +1,778 @@
+From 66e16f86d3f4c5b34b37e965c65102b7192371de Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Thu, 2 Apr 2009 11:47:13 +0300
+Subject: [PATCH 09/69] DSS2: Add acx565akm panel
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ drivers/video/omap2/displays/Kconfig | 8 +
+ drivers/video/omap2/displays/Makefile | 2 +
+ drivers/video/omap2/displays/panel-acx565akm.c | 712 ++++++++++++++++++++++++
+ drivers/video/omap2/displays/panel-acx565akm.h | 9 +
+ 4 files changed, 731 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/video/omap2/displays/panel-acx565akm.c
+ create mode 100644 drivers/video/omap2/displays/panel-acx565akm.h
+
+diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
+index 356ceb1..3feecee 100644
+--- a/drivers/video/omap2/displays/Kconfig
++++ b/drivers/video/omap2/displays/Kconfig
+@@ -28,4 +28,12 @@ config CTRL_BLIZZARD
+ tristate "Blizzard Controller"
+ help
+ Blizzard Controller (hack)
++
++config PANEL_ACX565AKM
++ tristate "ACX565AKM LCD Panel"
++ depends on OMAP2_DSS_SDI
++ select BACKLIGHT_CLASS_DEVICE
++ help
++ LCD Panel used in RX51
++
+ endmenu
+diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
+index 1b74b7e..9bafcb6 100644
+--- a/drivers/video/omap2/displays/Makefile
++++ b/drivers/video/omap2/displays/Makefile
+@@ -4,3 +4,5 @@ obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
+
+ obj-$(CONFIG_CTRL_BLIZZARD) += ctrl-blizzard.o
+ obj-$(CONFIG_PANEL_N800) += panel-n800.o
++
++obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
+diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c
+new file mode 100644
+index 0000000..2679d6c
+--- /dev/null
++++ b/drivers/video/omap2/displays/panel-acx565akm.c
+@@ -0,0 +1,712 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/clk.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/spi/spi.h>
++#include <linux/jiffies.h>
++#include <linux/sched.h>
++#include <linux/backlight.h>
++#include <linux/fb.h>
++
++#include <mach/display.h>
++#include <mach/dma.h>
++
++#include "panel-acx565akm.h"
++
++#define MIPID_CMD_READ_DISP_ID 0x04
++#define MIPID_CMD_READ_RED 0x06
++#define MIPID_CMD_READ_GREEN 0x07
++#define MIPID_CMD_READ_BLUE 0x08
++#define MIPID_CMD_READ_DISP_STATUS 0x09
++#define MIPID_CMD_RDDSDR 0x0F
++#define MIPID_CMD_SLEEP_IN 0x10
++#define MIPID_CMD_SLEEP_OUT 0x11
++#define MIPID_CMD_DISP_OFF 0x28
++#define MIPID_CMD_DISP_ON 0x29
++#define MIPID_CMD_WRITE_DISP_BRIGHTNESS 0x51
++#define MIPID_CMD_READ_DISP_BRIGHTNESS 0x52
++#define MIPID_CMD_WRITE_CTRL_DISP 0x53
++
++#define CTRL_DISP_BRIGHTNESS_CTRL_ON (1 << 5)
++#define CTRL_DISP_AMBIENT_LIGHT_CTRL_ON (1 << 4)
++#define CTRL_DISP_BACKLIGHT_ON (1 << 2)
++#define CTRL_DISP_AUTO_BRIGHTNESS_ON (1 << 1)
++
++#define MIPID_CMD_READ_CTRL_DISP 0x54
++#define MIPID_CMD_WRITE_CABC 0x55
++#define MIPID_CMD_READ_CABC 0x56
++
++#define MIPID_VER_LPH8923 3
++#define MIPID_VER_LS041Y3 4
++#define MIPID_VER_L4F00311 8
++#define MIPID_VER_ACX565AKM 9
++
++struct acx565akm_device {
++ struct backlight_device *bl_dev;
++ int enabled;
++ int model;
++ int revision;
++ u8 display_id[3];
++ int has_bc:1;
++ int has_cabc:1;
++ unsigned int saved_bklight_level;
++ unsigned long hw_guard_end; /* next value of jiffies
++ when we can issue the
++ next sleep in/out command */
++ unsigned long hw_guard_wait; /* max guard time in jiffies */
++
++ struct spi_device *spi;
++ struct mutex mutex;
++ struct omap_panel panel;
++ struct omap_display *display;
++};
++
++static int acx565akm_bl_update_status(struct backlight_device *dev);
++
++static void acx565akm_transfer(struct acx565akm_device *md, int cmd,
++ const u8 *wbuf, int wlen, u8 *rbuf, int rlen)
++{
++ struct spi_message m;
++ struct spi_transfer *x, xfer[5];
++ int r;
++
++ BUG_ON(md->spi == NULL);
++
++ spi_message_init(&m);
++
++ memset(xfer, 0, sizeof(xfer));
++ x = &xfer[0];
++
++ cmd &= 0xff;
++ x->tx_buf = &cmd;
++ x->bits_per_word = 9;
++ x->len = 2;
++
++ if (rlen > 1 && wlen == 0) {
++ /*
++ * Between the command and the response data there is a
++ * dummy clock cycle. Add an extra bit after the command
++ * word to account for this.
++ */
++ x->bits_per_word = 10;
++ cmd <<= 1;
++ }
++ spi_message_add_tail(x, &m);
++
++ if (wlen) {
++ x++;
++ x->tx_buf = wbuf;
++ x->len = wlen;
++ x->bits_per_word = 9;
++ spi_message_add_tail(x, &m);
++ }
++
++ if (rlen) {
++ x++;
++ x->rx_buf = rbuf;
++ x->len = rlen;
++ spi_message_add_tail(x, &m);
++ }
++
++ r = spi_sync(md->spi, &m);
++ if (r < 0)
++ dev_dbg(&md->spi->dev, "spi_sync %d\n", r);
++}
++
++static inline void acx565akm_cmd(struct acx565akm_device *md, int cmd)
++{
++ acx565akm_transfer(md, cmd, NULL, 0, NULL, 0);
++}
++
++static inline void acx565akm_write(struct acx565akm_device *md,
++ int reg, const u8 *buf, int len)
++{
++ acx565akm_transfer(md, reg, buf, len, NULL, 0);
++}
++
++static inline void acx565akm_read(struct acx565akm_device *md,
++ int reg, u8 *buf, int len)
++{
++ acx565akm_transfer(md, reg, NULL, 0, buf, len);
++}
++
++static void hw_guard_start(struct acx565akm_device *md, int guard_msec)
++{
++ md->hw_guard_wait = msecs_to_jiffies(guard_msec);
++ md->hw_guard_end = jiffies + md->hw_guard_wait;
++}
++
++static void hw_guard_wait(struct acx565akm_device *md)
++{
++ unsigned long wait = md->hw_guard_end - jiffies;
++
++ if ((long)wait > 0 && wait <= md->hw_guard_wait) {
++ set_current_state(TASK_UNINTERRUPTIBLE);
++ schedule_timeout(wait);
++ }
++}
++
++static void set_sleep_mode(struct acx565akm_device *md, int on)
++{
++ int cmd, sleep_time = 50;
++
++ if (on)
++ cmd = MIPID_CMD_SLEEP_IN;
++ else
++ cmd = MIPID_CMD_SLEEP_OUT;
++ hw_guard_wait(md);
++ acx565akm_cmd(md, cmd);
++ hw_guard_start(md, 120);
++ /*
++ * When we enable the panel, it seems we _have_ to sleep
++ * 120 ms before sending the init string. When disabling the
++ * panel we'll sleep for the duration of 2 frames, so that the
++ * controller can still provide the PCLK,HS,VS signals. */
++ if (!on)
++ sleep_time = 120;
++ msleep(sleep_time);
++}
++
++static void set_display_state(struct acx565akm_device *md, int enabled)
++{
++ int cmd = enabled ? MIPID_CMD_DISP_ON : MIPID_CMD_DISP_OFF;
++
++ acx565akm_cmd(md, cmd);
++}
++
++static int panel_enabled(struct acx565akm_device *md)
++{
++ u32 disp_status;
++ int enabled;
++
++ acx565akm_read(md, MIPID_CMD_READ_DISP_STATUS, (u8 *)&disp_status, 4);
++ disp_status = __be32_to_cpu(disp_status);
++ enabled = (disp_status & (1 << 17)) && (disp_status & (1 << 10));
++ dev_dbg(&md->spi->dev,
++ "LCD panel %senabled by bootloader (status 0x%04x)\n",
++ enabled ? "" : "not ", disp_status);
++ return enabled;
++}
++
++static void enable_backlight_ctrl(struct acx565akm_device *md, int enable)
++{
++ u16 ctrl;
++
++ acx565akm_read(md, MIPID_CMD_READ_CTRL_DISP, (u8 *)&ctrl, 1);
++ if (enable) {
++ ctrl |= CTRL_DISP_BRIGHTNESS_CTRL_ON |
++ CTRL_DISP_BACKLIGHT_ON;
++ } else {
++ ctrl &= ~(CTRL_DISP_BRIGHTNESS_CTRL_ON |
++ CTRL_DISP_BACKLIGHT_ON);
++ }
++
++ ctrl |= 1 << 8;
++ acx565akm_write(md, MIPID_CMD_WRITE_CTRL_DISP, (u8 *)&ctrl, 2);
++}
++
++static void set_cabc_mode(struct acx565akm_device *md, int mode)
++{
++ u16 cabc_ctrl;
++
++ cabc_ctrl = 0;
++ acx565akm_read(md, MIPID_CMD_READ_CABC, (u8 *)&cabc_ctrl, 1);
++ cabc_ctrl &= ~3;
++ cabc_ctrl |= (1 << 8) | (mode & 3);
++ acx565akm_write(md, MIPID_CMD_WRITE_CABC, (u8 *)&cabc_ctrl, 2);
++}
++
++static int get_cabc_mode(struct acx565akm_device *md)
++{
++ u8 cabc_ctrl;
++
++ acx565akm_read(md, MIPID_CMD_READ_CABC, &cabc_ctrl, 1);
++ return cabc_ctrl & 3;
++}
++
++static int panel_detect(struct acx565akm_device *md)
++{
++ acx565akm_read(md, MIPID_CMD_READ_DISP_ID, md->display_id, 3);
++ dev_dbg(&md->spi->dev, "MIPI display ID: %02x%02x%02x\n",
++ md->display_id[0], md->display_id[1], md->display_id[2]);
++
++ switch (md->display_id[0]) {
++ case 0x10:
++ md->model = MIPID_VER_ACX565AKM;
++ md->panel.name = "acx565akm";
++ md->has_bc = 1;
++ md->has_cabc = 1;
++ break;
++ case 0x29:
++ md->model = MIPID_VER_L4F00311;
++ md->panel.name = "l4f00311";
++ break;
++ case 0x45:
++ md->model = MIPID_VER_LPH8923;
++ md->panel.name = "lph8923";
++ break;
++ case 0x83:
++ md->model = MIPID_VER_LS041Y3;
++ md->panel.name = "ls041y3";
++ break;
++ default:
++ md->panel.name = "unknown";
++ dev_err(&md->spi->dev, "invalid display ID\n");
++ return -ENODEV;
++ }
++
++ md->revision = md->display_id[1];
++
++ pr_info("omapfb: %s rev %02x LCD detected\n",
++ md->panel.name, md->revision);
++
++ return 0;
++}
++
++static int acx565akm_panel_enable(struct omap_display *display)
++{
++ struct acx565akm_device *md =
++ (struct acx565akm_device *)display->panel->priv;
++
++ dev_dbg(&md->spi->dev, "%s\n", __func__);
++
++ mutex_lock(&md->mutex);
++
++ if (display->hw_config.panel_enable)
++ display->hw_config.panel_enable(display);
++
++ md->enabled = panel_enabled(md);
++
++ if (md->enabled) {
++ dev_dbg(&md->spi->dev, "panel already enabled\n");
++ mutex_unlock(&md->mutex);
++ return 0;
++ }
++
++ set_sleep_mode(md, 0);
++ md->enabled = 1;
++ set_display_state(md, 1);
++
++ mutex_unlock(&md->mutex);
++
++ return acx565akm_bl_update_status(md->bl_dev);
++}
++
++static void acx565akm_panel_disable(struct omap_display *display)
++{
++ struct acx565akm_device *md =
++ (struct acx565akm_device *)display->panel->priv;
++
++ dev_dbg(&md->spi->dev, "%s\n", __func__);
++
++ mutex_lock(&md->mutex);
++
++ if (!md->enabled) {
++ mutex_unlock(&md->mutex);
++ return;
++ }
++ set_display_state(md, 0);
++ set_sleep_mode(md, 1);
++ md->enabled = 0;
++
++ if (display->hw_config.panel_disable)
++ display->hw_config.panel_disable(display);
++
++ mutex_unlock(&md->mutex);
++}
++
++#if 0
++static void acx565akm_set_mode(struct omap_display *display,
++ int x_res, int y_res, int bpp)
++{
++ struct acx565akm_device *md =
++ (struct acx565akm_device *)display->panel->priv;
++ u16 par;
++
++ switch (bpp) {
++ case 16:
++ par = 0x150;
++ break;
++ case 18:
++ par = 0x160;
++ break;
++ case 24:
++ par = 0x170;
++ break;
++ }
++
++ acx565akm_write(md, 0x3a, (u8 *)&par, 2);
++}
++#endif
++
++static int acx565akm_panel_suspend(struct omap_display *display)
++{
++ acx565akm_panel_disable(display);
++ return 0;
++}
++
++static int acx565akm_panel_resume(struct omap_display *display)
++{
++ return acx565akm_panel_enable(display);
++}
++
++static void acx565akm_set_brightness(struct acx565akm_device *md, int level)
++{
++ int bv;
++
++ bv = level | (1 << 8);
++ acx565akm_write(md, MIPID_CMD_WRITE_DISP_BRIGHTNESS, (u8 *)&bv, 2);
++
++ if (level)
++ enable_backlight_ctrl(md, 1);
++ else
++ enable_backlight_ctrl(md, 0);
++}
++
++static int acx565akm_get_actual_brightness(struct acx565akm_device *md)
++{
++ u8 bv;
++
++ acx565akm_read(md, MIPID_CMD_READ_DISP_BRIGHTNESS, &bv, 1);
++
++ return bv;
++}
++
++static int acx565akm_bl_update_status(struct backlight_device *dev)
++{
++ struct acx565akm_device *md = dev_get_drvdata(&dev->dev);
++ struct omap_display *display = md->display;
++ int r;
++ int level;
++
++ dev_dbg(&md->spi->dev, "%s\n", __func__);
++
++ if (display->hw_config.set_backlight == NULL)
++ return -ENODEV;
++
++ mutex_lock(&md->mutex);
++
++ if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
++ dev->props.power == FB_BLANK_UNBLANK)
++ level = dev->props.brightness;
++ else
++ level = 0;
++
++ r = 0;
++ if (md->has_bc)
++ acx565akm_set_brightness(md, level);
++ else
++ if (display->hw_config.set_backlight != NULL)
++ r = display->hw_config.set_backlight(display, level);
++ else
++ r = -ENODEV;
++
++ mutex_unlock(&md->mutex);
++
++ return r;
++}
++
++static int acx565akm_bl_get_intensity(struct backlight_device *dev)
++{
++ struct acx565akm_device *md = dev_get_drvdata(&dev->dev);
++ struct omap_display *display = md->display;
++
++ dev_dbg(&dev->dev, "%s\n", __func__);
++
++ if (md->has_bc && display->hw_config.set_backlight == NULL)
++ return -ENODEV;
++
++ if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
++ dev->props.power == FB_BLANK_UNBLANK) {
++ if (md->has_bc)
++ return acx565akm_get_actual_brightness(md);
++ else
++ return dev->props.brightness;
++ }
++
++ return 0;
++}
++
++static struct backlight_ops acx565akm_bl_ops = {
++ .get_brightness = acx565akm_bl_get_intensity,
++ .update_status = acx565akm_bl_update_status,
++};
++
++static const char *cabc_modes[] = {
++ "off", /* used also always when CABC is not supported */
++ "ui",
++ "still-image",
++ "moving-image",
++};
++
++static ssize_t show_cabc_mode(struct device *dev,
++ struct device_attribute *attr,
++ char *buf)
++{
++ struct acx565akm_device *md = dev_get_drvdata(dev);
++ const char *mode_str;
++ int mode;
++ int len;
++
++ if (!md->has_cabc)
++ mode = 0;
++ else
++ mode = get_cabc_mode(md);
++ mode_str = "unknown";
++ if (mode >= 0 && mode < ARRAY_SIZE(cabc_modes))
++ mode_str = cabc_modes[mode];
++ len = snprintf(buf, PAGE_SIZE, "%s\n", mode_str);
++
++ return len < PAGE_SIZE - 1 ? len : PAGE_SIZE - 1;
++}
++
++static ssize_t store_cabc_mode(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ struct acx565akm_device *md = dev_get_drvdata(dev);
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(cabc_modes); i++) {
++ const char *mode_str = cabc_modes[i];
++ int cmp_len = strlen(mode_str);
++
++ if (count > 0 && buf[count - 1] == '\n')
++ count--;
++ if (count != cmp_len)
++ continue;
++
++ if (strncmp(buf, mode_str, cmp_len) == 0)
++ break;
++ }
++
++ if (i == ARRAY_SIZE(cabc_modes))
++ return -EINVAL;
++
++ if (!md->has_cabc && i != 0)
++ return -EINVAL;
++
++ mutex_lock(&md->mutex);
++ set_cabc_mode(md, i);
++ mutex_unlock(&md->mutex);
++
++ return count;
++}
++
++static ssize_t show_cabc_available_modes(struct device *dev,
++ struct device_attribute *attr,
++ char *buf)
++{
++ struct acx565akm_device *md = dev_get_drvdata(dev);
++ int len;
++ int i;
++
++ if (!md->has_cabc)
++ return snprintf(buf, PAGE_SIZE, "%s\n", cabc_modes[0]);
++
++ for (i = 0, len = 0;
++ len < PAGE_SIZE && i < ARRAY_SIZE(cabc_modes); i++)
++ len += snprintf(&buf[len], PAGE_SIZE - len, "%s%s%s",
++ i ? " " : "", cabc_modes[i],
++ i == ARRAY_SIZE(cabc_modes) - 1 ? "\n" : "");
++
++ return len < PAGE_SIZE ? len : PAGE_SIZE - 1;
++}
++
++static DEVICE_ATTR(cabc_mode, S_IRUGO | S_IWUSR,
++ show_cabc_mode, store_cabc_mode);
++static DEVICE_ATTR(cabc_available_modes, S_IRUGO,
++ show_cabc_available_modes, NULL);
++
++static struct attribute *bldev_attrs[] = {
++ &dev_attr_cabc_mode.attr,
++ &dev_attr_cabc_available_modes.attr,
++ NULL,
++};
++
++static struct attribute_group bldev_attr_group = {
++ .attrs = bldev_attrs,
++};
++
++static int acx565akm_panel_init(struct omap_display *display)
++{
++ struct omap_panel *panel = display->panel;
++ struct acx565akm_panel_data *panel_data = display->hw_config.panel_data;
++ struct acx565akm_device *md = (struct acx565akm_device *)panel->priv;
++
++ struct backlight_device *bldev;
++ int brightness;
++ int max_brightness;
++ int r;
++
++ dev_dbg(&md->spi->dev, "%s\n", __func__);
++
++ if (!panel_data) {
++ dev_err(&md->spi->dev, "no panel data\n");
++ return -ENODEV;
++ }
++
++ mutex_init(&md->mutex);
++ md->display = display;
++
++ if (display->hw_config.panel_enable)
++ display->hw_config.panel_enable(display);
++
++ md->enabled = panel_enabled(md);
++
++ r = panel_detect(md);
++ if (r) {
++ if (!md->enabled && display->hw_config.panel_disable)
++ display->hw_config.panel_disable(display);
++ mutex_unlock(&md->mutex);
++ return r;
++ }
++
++ if (!panel_data->bc_connected) {
++ md->has_bc = 0;
++ md->has_cabc = 0;
++ }
++
++#if 0
++ acx565akm_set_mode(display, panel->timings.x_res, panel->timings.y_res,
++ panel->bpp);
++#endif
++
++ if (!md->enabled)
++ display->hw_config.panel_disable(display);
++
++ bldev = backlight_device_register("acx565akm", &md->spi->dev,
++ md, &acx565akm_bl_ops);
++ md->bl_dev = bldev;
++
++ if (md->has_cabc) {
++ r = sysfs_create_group(&bldev->dev.kobj, &bldev_attr_group);
++ if (r) {
++ dev_err(&bldev->dev, "failed to create sysfs files\n");
++ backlight_device_unregister(bldev);
++ return r;
++ }
++ }
++
++ bldev->props.fb_blank = FB_BLANK_UNBLANK;
++ bldev->props.power = FB_BLANK_UNBLANK;
++
++ if (md->has_bc)
++ max_brightness = 255;
++ else
++ max_brightness = display->hw_config.max_backlight_level;
++
++ if (md->has_bc)
++ brightness = acx565akm_get_actual_brightness(md);
++ else {
++ if (display->hw_config.get_backlight != NULL)
++ brightness = display->hw_config.get_backlight(display);
++ else
++ brightness = 0;
++ }
++
++ bldev->props.max_brightness = max_brightness;
++ bldev->props.brightness = brightness;
++ acx565akm_bl_update_status(bldev);
++
++ return 0;
++}
++
++static struct omap_panel acx565akm_panel = {
++ .name = "panel-acx565akm",
++ .init = acx565akm_panel_init,
++ .suspend = acx565akm_panel_suspend,
++ .resume = acx565akm_panel_resume,
++ .enable = acx565akm_panel_enable,
++ .disable = acx565akm_panel_disable,
++
++ .timings = {
++ .x_res = 800,
++ .y_res = 480,
++
++ .pixel_clock = 24000,
++
++ .hsw = 4,
++ .hfp = 16,
++ .hbp = 12,
++
++ .vsw = 3,
++ .vfp = 3,
++ .vbp = 3,
++ },
++
++ .config = OMAP_DSS_LCD_TFT,
++
++ .recommended_bpp = 16,
++
++ /*
++ * supported modes: 12bpp(444), 16bpp(565), 18bpp(666), 24bpp(888)
++ * resolutions.
++ */
++};
++
++static int acx565akm_spi_probe(struct spi_device *spi)
++{
++ struct acx565akm_device *md;
++
++ dev_dbg(&md->spi->dev, "%s\n", __func__);
++
++ md = kzalloc(sizeof(*md), GFP_KERNEL);
++ if (md == NULL) {
++ dev_err(&spi->dev, "out of memory\n");
++ return -ENOMEM;
++ }
++
++ spi->mode = SPI_MODE_3;
++ md->spi = spi;
++ dev_set_drvdata(&spi->dev, md);
++ md->panel = acx565akm_panel;
++ acx565akm_panel.priv = md;
++
++ omap_dss_register_panel(&acx565akm_panel);
++
++ return 0;
++}
++
++static int acx565akm_spi_remove(struct spi_device *spi)
++{
++ struct acx565akm_device *md = dev_get_drvdata(&spi->dev);
++
++ dev_dbg(&md->spi->dev, "%s\n", __func__);
++
++ sysfs_remove_group(&md->bl_dev->dev.kobj, &bldev_attr_group);
++ backlight_device_unregister(md->bl_dev);
++ omap_dss_unregister_panel(&acx565akm_panel);
++
++ kfree(md);
++
++ return 0;
++}
++
++static struct spi_driver acx565akm_spi_driver = {
++ .driver = {
++ .name = "acx565akm",
++ .bus = &spi_bus_type,
++ .owner = THIS_MODULE,
++ },
++ .probe = acx565akm_spi_probe,
++ .remove = __devexit_p(acx565akm_spi_remove),
++};
++
++static int __init acx565akm_init(void)
++{
++ return spi_register_driver(&acx565akm_spi_driver);
++}
++
++static void __exit acx565akm_exit(void)
++{
++ spi_unregister_driver(&acx565akm_spi_driver);
++}
++
++module_init(acx565akm_init);
++module_exit(acx565akm_exit);
++
++MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
++MODULE_DESCRIPTION("acx565akm LCD Driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/video/omap2/displays/panel-acx565akm.h b/drivers/video/omap2/displays/panel-acx565akm.h
+new file mode 100644
+index 0000000..6d3727b
+--- /dev/null
++++ b/drivers/video/omap2/displays/panel-acx565akm.h
+@@ -0,0 +1,9 @@
++#ifndef __DRIVERS_VIDEO_OMAP2_DISPLAYS_PANEL_ACX565AKM_H
++#define __DRIVERS_VIDEO_OMAP2_DISPLAYS_PANEL_ACX565AKM_H
++
++struct acx565akm_panel_data {
++ unsigned bc_connected:1;
++};
++
++#endif
++
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch
new file mode 100644
index 0000000000..f994327ec1
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch
@@ -0,0 +1,28 @@
+From 370510e24ddbf539392ebb6a1e43280965fcb19b Mon Sep 17 00:00:00 2001
+From: Vaibhav Hiremath <hvaibhav@ti.com>
+Date: Tue, 31 Mar 2009 18:47:32 +0530
+Subject: [PATCH 10/69] DSS2: Small VRFB context allocation bug fixed
+
+This is minor bug while requesting and mapping memory for
+VRFB space.
+
+Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
+---
+ drivers/video/omap2/omapfb/omapfb-main.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index 852abe5..44febef 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -1193,6 +1193,7 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
+
+ if(!va) {
+ printk(KERN_ERR "vrfb: ioremap failed\n");
++ omap_vrfb_release_ctx(&rg->vrfb);
+ return -ENOMEM;
+ }
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch
new file mode 100644
index 0000000000..2dad1d337f
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch
@@ -0,0 +1,37 @@
+From 370d1f93a32e8fcaeac5c16574417e354af21d08 Mon Sep 17 00:00:00 2001
+From: Vaibhav Hiremath <hvaibhav@ti.com>
+Date: Tue, 31 Mar 2009 18:38:31 +0530
+Subject: [PATCH 11/69] DSS2: Allocated memory for Color Look-up-table
+
+We were not allocating memory for CMAP buffer and due to that
+G_CMAP was failing, since it does check for size of CMAP buffer.
+
+Called "fb_alloc_cmap" for llocating memory for CMAP.
+
+We are currently not supporting 1,2,4,8 bpp, so meaning less
+for us as of now. But for completeness this is required.
+
+Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
+---
+ drivers/video/omap2/omapfb/omapfb-main.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index 44febef..afe40a9 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -1525,6 +1525,11 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
+ goto err;
+
+ set_fb_fix(fbi);
++
++ r = fb_alloc_cmap(&fbi->cmap, 256, 0);
++ if (r)
++ dev_err(fbdev->dev, "unable to allocate color map memory\n");
++
+ err:
+ return r;
+ }
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch
new file mode 100644
index 0000000000..8e1d139c72
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0012-DSS2-Fix-DMA-rotation.patch
@@ -0,0 +1,65 @@
+From 9c93bcab724b5935d745604773ed43825efefd87 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 13:47:11 +0300
+Subject: [PATCH 12/69] DSS2: Fix DMA rotation
+
+u16 was not a good type for offsets. First, they need to be signed,
+and second, 16 bits is not enough.
+---
+ drivers/video/omap2/dss/dispc.c | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index ffb5648..6cea545 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -778,7 +778,7 @@ static void _dispc_set_vid_size(enum omap_plane plane, int width, int height)
+ dispc_write_reg(vsi_reg[plane-1], val);
+ }
+
+-static void _dispc_set_pix_inc(enum omap_plane plane, u16 inc)
++static void _dispc_set_pix_inc(enum omap_plane plane, s32 inc)
+ {
+ const struct dispc_reg ri_reg[] = { DISPC_GFX_PIXEL_INC,
+ DISPC_VID_PIXEL_INC(0),
+@@ -787,7 +787,7 @@ static void _dispc_set_pix_inc(enum omap_plane plane, u16 inc)
+ dispc_write_reg(ri_reg[plane], inc);
+ }
+
+-static void _dispc_set_row_inc(enum omap_plane plane, u16 inc)
++static void _dispc_set_row_inc(enum omap_plane plane, s32 inc)
+ {
+ const struct dispc_reg ri_reg[] = { DISPC_GFX_ROW_INC,
+ DISPC_VID_ROW_INC(0),
+@@ -1123,7 +1123,7 @@ static void _dispc_set_rotation_attrs(enum omap_plane plane, u8 rotation,
+ }
+ }
+
+-static int pixinc(int pixels, u8 ps)
++static s32 pixinc(int pixels, u8 ps)
+ {
+ if (pixels == 1)
+ return 1;
+@@ -1140,7 +1140,7 @@ static void calc_rotation_offset(u8 rotation, bool mirror,
+ u16 width, u16 height,
+ enum omap_color_mode color_mode, bool fieldmode,
+ unsigned *offset0, unsigned *offset1,
+- u16 *row_inc, u16 *pix_inc)
++ s32 *row_inc, s32 *pix_inc)
+ {
+ u8 ps;
+ u16 fbw, fbh;
+@@ -1298,8 +1298,8 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ bool fieldmode = 0;
+ int cconv = 0;
+ unsigned offset0, offset1;
+- u16 row_inc;
+- u16 pix_inc;
++ s32 row_inc;
++ s32 pix_inc;
+
+ if (plane == OMAP_DSS_GFX) {
+ if (width != out_width || height != out_height)
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch
new file mode 100644
index 0000000000..1abc7a8264
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch
@@ -0,0 +1,41 @@
+From 360a55ddd309e3a45b227a4a905ae7120dd16169 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 14:21:12 +0300
+Subject: [PATCH 13/69] DSS2: Verify that overlay paddr != 0
+
+---
+ drivers/video/omap2/dss/dispc.c | 3 +++
+ drivers/video/omap2/dss/overlay.c | 3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 6cea545..2480a03 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1301,6 +1301,9 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ s32 row_inc;
+ s32 pix_inc;
+
++ if (paddr == 0)
++ return -EINVAL;
++
+ if (plane == OMAP_DSS_GFX) {
+ if (width != out_width || height != out_height)
+ return -EINVAL;
+diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
+index 968edbe..9209acf 100644
+--- a/drivers/video/omap2/dss/overlay.c
++++ b/drivers/video/omap2/dss/overlay.c
+@@ -331,6 +331,9 @@ static int dss_ovl_set_overlay_info(struct omap_overlay *ovl,
+ int r;
+ struct omap_overlay_info old_info;
+
++ if (info->paddr == 0)
++ return -EINVAL;
++
+ old_info = ovl->info;
+ ovl->info = *info;
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch
new file mode 100644
index 0000000000..d8aa4eb893
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch
@@ -0,0 +1,51 @@
+From 832b763db235da8e62f7b6ab02bcb8ad6bcb7a01 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 16:48:41 +0300
+Subject: [PATCH 14/69] DSS2: Add function to get DSS logic clock rate
+
+---
+ drivers/video/omap2/dss/dispc.c | 15 +++++++++++++++
+ drivers/video/omap2/dss/dss.h | 1 +
+ 2 files changed, 16 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 2480a03..1bc23f7 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1850,6 +1850,21 @@ unsigned long dispc_fclk_rate(void)
+ return r;
+ }
+
++unsigned long dispc_lclk_rate(void)
++{
++ int lcd;
++ unsigned long r;
++ u32 l;
++
++ l = dispc_read_reg(DISPC_DIVISOR);
++
++ lcd = FLD_GET(l, 23, 16);
++
++ r = dispc_fclk_rate();
++
++ return r / lcd;
++}
++
+ unsigned long dispc_pclk_rate(void)
+ {
+ int lcd, pcd;
+diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
+index bac5ece..0be42b6 100644
+--- a/drivers/video/omap2/dss/dss.h
++++ b/drivers/video/omap2/dss/dss.h
+@@ -294,6 +294,7 @@ bool dispc_trans_key_enabled(enum omap_channel ch);
+
+ void dispc_set_lcd_timings(struct omap_video_timings *timings);
+ unsigned long dispc_fclk_rate(void);
++unsigned long dispc_lclk_rate(void);
+ unsigned long dispc_pclk_rate(void);
+ void dispc_set_pol_freq(struct omap_panel *panel);
+ void find_lck_pck_divs(bool is_tft, unsigned long req_pck, unsigned long fck,
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch
new file mode 100644
index 0000000000..a0f2b9f528
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch
@@ -0,0 +1,68 @@
+From a5c235a6f0094494ae1fc1a1ba4728e0d33dfd3b Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 16:49:27 +0300
+Subject: [PATCH 15/69] DSS2: DSI: calculate VP_CLK_RATIO properly
+
+---
+ drivers/video/omap2/dss/dsi.c | 17 +++++++++++------
+ 1 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index 4442931..aecb89d 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -1104,7 +1104,10 @@ int dsi_pll_init(bool enable_hsclk, bool enable_hsdiv)
+ enable_clocks(1);
+ dsi_enable_pll_clock(1);
+
+- /* configure dispc fck and pixel clock to something sane */
++ /* XXX this should be calculated depending on the screen size,
++ * required framerate and DSI speed.
++ * For now 48MHz is enough for 864x480@60 with 360Mbps/lane
++ * with two lanes */
+ r = dispc_calc_clock_div(1, 48 * 1000 * 1000, &cinfo);
+ if (r)
+ goto err0;
+@@ -1119,7 +1122,7 @@ int dsi_pll_init(bool enable_hsclk, bool enable_hsdiv)
+ if (r)
+ goto err0;
+
+- /* PLL does not come out of reset without this... */
++ /* XXX PLL does not come out of reset without this... */
+ dispc_pck_free_enable(1);
+
+ if (wait_for_bit_change(DSI_PLL_STATUS, 0, 1) != 1) {
+@@ -1128,8 +1131,8 @@ int dsi_pll_init(bool enable_hsclk, bool enable_hsdiv)
+ goto err1;
+ }
+
+- /* ... but if left on, we get problems when planes do not
+- * fill the whole display. No idea about this XXX */
++ /* XXX ... but if left on, we get problems when planes do not
++ * fill the whole display. No idea about this */
+ dispc_pck_free_enable(0);
+
+ if (enable_hsclk && enable_hsdiv)
+@@ -2214,6 +2217,7 @@ static int dsi_proto_config(struct omap_display *display)
+ {
+ u32 r;
+ int buswidth = 0;
++ int div;
+
+ dsi_config_tx_fifo(DSI_FIFO_SIZE_128,
+ DSI_FIFO_SIZE_0,
+@@ -2254,8 +2258,9 @@ static int dsi_proto_config(struct omap_display *display)
+ r = FLD_MOD(r, 1, 1, 1); /* CS_RX_EN */
+ r = FLD_MOD(r, 1, 2, 2); /* ECC_RX_EN */
+ r = FLD_MOD(r, 1, 3, 3); /* TX_FIFO_ARBITRATION */
+- /* XXX what should the ratio be */
+- r = FLD_MOD(r, 0, 4, 4); /* VP_CLK_RATIO, VP_PCLK = VP_CLK/2 */
++
++ div = dispc_lclk_rate() / dispc_pclk_rate();
++ r = FLD_MOD(r, div == 2 ? 0 : 1, 4, 4); /* VP_CLK_RATIO */
+ r = FLD_MOD(r, buswidth, 7, 6); /* VP_DATA_BUS_WIDTH */
+ r = FLD_MOD(r, 0, 8, 8); /* VP_CLK_POL */
+ r = FLD_MOD(r, 2, 13, 12); /* LINE_BUFFER, 2 lines */
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch
new file mode 100644
index 0000000000..35d65a996d
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch
@@ -0,0 +1,58 @@
+From 6b2c9d84c7accdfe1067fcdc8a00e50674aab4bb Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 2 Apr 2009 17:42:26 +0300
+Subject: [PATCH 16/69] DSS2: DSI: improve packet len calculation
+
+---
+ drivers/video/omap2/dss/dsi.c | 21 ++++++++++++++++-----
+ 1 files changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index aecb89d..66ac6ea 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -2624,17 +2624,28 @@ static void dsi_update_screen_dispc(struct omap_display *display,
+ u16 x, u16 y, u16 w, u16 h)
+ {
+ int bytespp = 3;
++ int len;
+ int total_len;
+- int line_packet_len;
++ int packet_payload;
++ int packet_len;
+ u32 l;
+
+ if (dsi.update_mode == OMAP_DSS_UPDATE_MANUAL)
+ DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n",
+ x, y, w, h);
+
+- /* TODO: one packet could be longer, I think? Max is the line buffer */
+- line_packet_len = w * bytespp + 1; /* 1 byte for DCS cmd */
+- total_len = line_packet_len * h;
++ len = w * h * bytespp;
++
++ /* XXX: one packet could be longer, I think? Line buffer is
++ * 1024 x 24bits, but we have to put DCS cmd there also.
++ * 1023 * 3 should work, but causes strange color effects. */
++ packet_payload = min(w, (u16)1020) * bytespp;
++
++ packet_len = packet_payload + 1; /* 1 byte for DCS cmd */
++ total_len = (len / packet_payload) * packet_len;
++
++ if (len % packet_payload)
++ total_len += (len % packet_payload) + 1;
+
+ display->ctrl->setup_update(display, x, y, w, h);
+
+@@ -2646,7 +2657,7 @@ static void dsi_update_screen_dispc(struct omap_display *display,
+ l = FLD_VAL(total_len, 23, 0); /* TE_SIZE */
+ dsi_write_reg(DSI_VC_TE(1), l);
+
+- dsi_vc_write_long_header(1, DSI_DT_DCS_LONG_WRITE, line_packet_len, 0);
++ dsi_vc_write_long_header(1, DSI_DT_DCS_LONG_WRITE, packet_len, 0);
+
+ if (dsi.use_te)
+ l = FLD_MOD(l, 1, 30, 30); /* TE_EN */
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch
new file mode 100644
index 0000000000..e9a5dcc67a
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch
@@ -0,0 +1,103 @@
+From 85848d329ca3a2d6ee6841cdc11cc5951d187931 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Fri, 3 Apr 2009 19:09:20 +0200
+Subject: [PATCH 17/69] DSS2: Disable video planes on sync lost error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+When encountering the sync lost error disable the display and all video
+planes on the affected manager. Afterwards re-enable the display.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 50 +++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 50 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 1bc23f7..41734f3 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -2518,29 +2518,79 @@ static void dispc_error_worker(struct work_struct *work)
+ }
+
+ if (errors & DISPC_IRQ_SYNC_LOST) {
++ struct omap_overlay_manager *manager = NULL;
++ bool enable = false;
++
+ DSSERR("SYNC_LOST, disabling LCD\n");
++
+ for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
+ struct omap_overlay_manager *mgr;
+ mgr = omap_dss_get_overlay_manager(i);
+
+ if (mgr->id == OMAP_DSS_CHANNEL_LCD) {
++ manager = mgr;
++ enable = mgr->display->state ==
++ OMAP_DSS_DISPLAY_ACTIVE;
+ mgr->display->disable(mgr->display);
+ break;
+ }
+ }
++
++ if (manager) {
++ for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
++ struct omap_overlay *ovl;
++ ovl = omap_dss_get_overlay(i);
++
++ if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
++ continue;
++
++ if (ovl->id != 0 && ovl->manager == manager)
++ dispc_enable_plane(ovl->id, 0);
++ }
++
++ dispc_go(manager->id);
++ mdelay(50);
++ if (enable)
++ manager->display->enable(manager->display);
++ }
+ }
+
+ if (errors & DISPC_IRQ_SYNC_LOST_DIGIT) {
++ struct omap_overlay_manager *manager = NULL;
++ bool enable = false;
++
+ DSSERR("SYNC_LOST_DIGIT, disabling TV\n");
++
+ for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
+ struct omap_overlay_manager *mgr;
+ mgr = omap_dss_get_overlay_manager(i);
+
+ if (mgr->id == OMAP_DSS_CHANNEL_DIGIT) {
++ manager = mgr;
++ enable = mgr->display->state ==
++ OMAP_DSS_DISPLAY_ACTIVE;
+ mgr->display->disable(mgr->display);
+ break;
+ }
+ }
++
++ if (manager) {
++ for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
++ struct omap_overlay *ovl;
++ ovl = omap_dss_get_overlay(i);
++
++ if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
++ continue;
++
++ if (ovl->id != 0 && ovl->manager == manager)
++ dispc_enable_plane(ovl->id, 0);
++ }
++
++ dispc_go(manager->id);
++ mdelay(50);
++ if (enable)
++ manager->display->enable(manager->display);
++ }
+ }
+
+ if (errors & DISPC_IRQ_OCP_ERR) {
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch
new file mode 100644
index 0000000000..0261db2bd4
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch
@@ -0,0 +1,40 @@
+From 63e15ba8d5f95b13d3abf359da718537d769f112 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Tue, 7 Apr 2009 10:01:58 +0300
+Subject: [PATCH 18/69] DSS2: check for ovl paddr only when enabling
+
+It seems Xvideo uses SETUP_PLANE ioctl even when
+the fb memory has not been allocated. Sigh.
+---
+ drivers/video/omap2/dss/overlay.c | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
+index 9209acf..c047206 100644
+--- a/drivers/video/omap2/dss/overlay.c
++++ b/drivers/video/omap2/dss/overlay.c
+@@ -281,6 +281,11 @@ int dss_check_overlay(struct omap_overlay *ovl, struct omap_display *display)
+
+ info = &ovl->info;
+
++ if (info->paddr == 0) {
++ DSSDBG("check_overlay failed: paddr 0\n");
++ return -EINVAL;
++ }
++
+ display->get_resolution(display, &dw, &dh);
+
+ DSSDBG("check_overlay %d: (%d,%d %dx%d -> %dx%d) disp (%dx%d)\n",
+@@ -331,9 +336,6 @@ static int dss_ovl_set_overlay_info(struct omap_overlay *ovl,
+ int r;
+ struct omap_overlay_info old_info;
+
+- if (info->paddr == 0)
+- return -EINVAL;
+-
+ old_info = ovl->info;
+ ovl->info = *info;
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch
new file mode 100644
index 0000000000..6569c71471
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch
@@ -0,0 +1,183 @@
+From 67f3fc050ab4e2006d5b7ec6ec341896627181ab Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Mon, 6 Apr 2009 17:32:04 +0200
+Subject: [PATCH 19/69] DSS2: Check fclk limits when configuring video planes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+Check that the currect functional clock is fast enough to support
+the requested scaling ratios. Also check if 5-tap filtering can be
+used even though the downscaling ratio is less than 1:2 since the
+functional clock rate required for 5-tap filtering can be less than
+the requirement for 3-tap filtering, and 5-tap filtering should look
+better.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 104 ++++++++++++++++++++++++++++++++++++---
+ 1 files changed, 97 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 41734f3..61861d8 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1026,11 +1026,11 @@ static void _dispc_set_vid_accu1(enum omap_plane plane, int haccu, int vaccu)
+ static void _dispc_set_scaling(enum omap_plane plane,
+ u16 orig_width, u16 orig_height,
+ u16 out_width, u16 out_height,
+- bool ilace)
++ bool ilace, bool five_taps)
+ {
+ int fir_hinc;
+ int fir_vinc;
+- int hscaleup, vscaleup, five_taps;
++ int hscaleup, vscaleup;
+ int fieldmode = 0;
+ int accu0 = 0;
+ int accu1 = 0;
+@@ -1040,7 +1040,6 @@ static void _dispc_set_scaling(enum omap_plane plane,
+
+ hscaleup = orig_width <= out_width;
+ vscaleup = orig_height <= out_height;
+- five_taps = orig_height > out_height * 2;
+
+ _dispc_set_scale_coef(plane, hscaleup, vscaleup, five_taps);
+
+@@ -1283,6 +1282,73 @@ static void calc_rotation_offset(u8 rotation, bool mirror,
+ }
+ }
+
++static unsigned long calc_fclk_five_taps(u16 width, u16 height,
++ u16 out_width, u16 out_height, enum omap_color_mode color_mode)
++{
++ u32 fclk = 0;
++ /* FIXME venc pclk? */
++ u64 tmp, pclk = dispc_pclk_rate();
++
++ if (height > out_height) {
++ /* FIXME get real display PPL */
++ unsigned int ppl = 800;
++
++ tmp = pclk * height * out_width;
++ do_div(tmp, 2 * out_height * ppl);
++ fclk = tmp;
++
++ if (height > 2 * out_height) {
++ tmp = pclk * (height - 2 * out_height) * out_width;
++ do_div(tmp, 2 * out_height * (ppl - out_width));
++ fclk = max(fclk, (u32) tmp);
++ }
++ }
++
++ if (width > out_width) {
++ tmp = pclk * width;
++ do_div(tmp, out_width);
++ fclk = max(fclk, (u32) tmp);
++
++ if (color_mode == OMAP_DSS_COLOR_RGB24U)
++ fclk <<= 1;
++ }
++
++ return fclk;
++}
++
++static unsigned long calc_fclk(u16 width, u16 height,
++ u16 out_width, u16 out_height,
++ enum omap_color_mode color_mode, bool five_taps)
++{
++ unsigned int hf, vf;
++
++ if (five_taps)
++ return calc_fclk_five_taps(width, height,
++ out_width, out_height, color_mode);
++
++ /*
++ * FIXME how to determine the 'A' factor
++ * for the no downscaling case ?
++ */
++
++ if (width > 3 * out_width)
++ hf = 4;
++ else if (width > 2 * out_width)
++ hf = 3;
++ else if (width > out_width)
++ hf = 2;
++ else
++ hf = 1;
++
++ if (height > out_height)
++ vf = 2;
++ else
++ vf = 1;
++
++ /* FIXME venc pclk? */
++ return dispc_pclk_rate() * vf * hf;
++}
++
+ static int _dispc_setup_plane(enum omap_plane plane,
+ enum omap_channel channel_out,
+ u32 paddr, u16 screen_width,
+@@ -1294,7 +1360,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ u8 rotation, int mirror)
+ {
+ const int maxdownscale = cpu_is_omap34xx() ? 4 : 2;
+- bool five_taps = height > out_height * 2;
++ bool five_taps = 0;
+ bool fieldmode = 0;
+ int cconv = 0;
+ unsigned offset0, offset1;
+@@ -1323,8 +1389,8 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ }
+ } else {
+ /* video plane */
+- if (width > (2048 >> five_taps))
+- return -EINVAL;
++
++ unsigned long fclk;
+
+ if (out_width < width / maxdownscale ||
+ out_width > width * 8)
+@@ -1356,6 +1422,30 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ default:
+ return -EINVAL;
+ }
++
++ /* Must use 5-tap filter? */
++ five_taps = height > out_height * 2;
++
++ /* Try to use 5-tap filter whenever possible. */
++ if (cpu_is_omap34xx() && !five_taps &&
++ height > out_height && width <= 1024) {
++ fclk = calc_fclk_five_taps(width, height,
++ out_width, out_height, color_mode);
++ if (fclk <= dispc_fclk_rate())
++ five_taps = true;
++ }
++
++ if (width > (2048 >> five_taps))
++ return -EINVAL;
++
++ fclk = calc_fclk(width, height, out_width, out_height,
++ color_mode, five_taps);
++
++ DSSDBG("required fclk rate = %lu Hz\n", fclk);
++ DSSDBG("current fclk rate = %lu Hz\n", dispc_fclk_rate());
++
++ if (fclk > dispc_fclk_rate())
++ return -EINVAL;
+ }
+
+ if (ilace && height >= out_height)
+@@ -1399,7 +1489,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ if (plane != OMAP_DSS_GFX) {
+ _dispc_set_scaling(plane, width, height,
+ out_width, out_height,
+- ilace);
++ ilace, five_taps);
+ _dispc_set_vid_size(plane, out_width, out_height);
+ _dispc_set_vid_color_conv(plane, cconv);
+ }
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch
new file mode 100644
index 0000000000..c6971ea452
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch
@@ -0,0 +1,79 @@
+From 9f8f1613253656f155b3844c8255a560f86e0acd Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Mon, 6 Apr 2009 17:32:05 +0200
+Subject: [PATCH 20/69] DSS2: Check scaling limits against proper values
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+Move the ilace and fieldmode related height adjustments to be performed
+before checking the scaling limits.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 31 ++++++++++++++++---------------
+ 1 files changed, 16 insertions(+), 15 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 61861d8..ae7be3d 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1366,10 +1366,25 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ unsigned offset0, offset1;
+ s32 row_inc;
+ s32 pix_inc;
++ u16 frame_height = height;
+
+ if (paddr == 0)
+ return -EINVAL;
+
++ if (ilace && height >= out_height)
++ fieldmode = 1;
++
++ if (ilace) {
++ if (fieldmode)
++ height /= 2;
++ pos_y /= 2;
++ out_height /= 2;
++
++ DSSDBG("adjusting for ilace: height %d, pos_y %d, "
++ "out_height %d\n",
++ height, pos_y, out_height);
++ }
++
+ if (plane == OMAP_DSS_GFX) {
+ if (width != out_width || height != out_height)
+ return -EINVAL;
+@@ -1448,28 +1463,14 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ return -EINVAL;
+ }
+
+- if (ilace && height >= out_height)
+- fieldmode = 1;
+-
+ calc_rotation_offset(rotation, mirror,
+- screen_width, width, height, color_mode,
++ screen_width, width, frame_height, color_mode,
+ fieldmode,
+ &offset0, &offset1, &row_inc, &pix_inc);
+
+ DSSDBG("offset0 %u, offset1 %u, row_inc %d, pix_inc %d\n",
+ offset0, offset1, row_inc, pix_inc);
+
+- if (ilace) {
+- if (fieldmode)
+- height /= 2;
+- pos_y /= 2;
+- out_height /= 2;
+-
+- DSSDBG("adjusting for ilace: height %d, pos_y %d, "
+- "out_height %d\n",
+- height, pos_y, out_height);
+- }
+-
+ _dispc_set_channel_out(plane, channel_out);
+ _dispc_set_color_mode(plane, color_mode);
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch
new file mode 100644
index 0000000000..44f126e7a4
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0021-DSS2-Add-venc-register-dump.patch
@@ -0,0 +1,96 @@
+From c5e71be877e71c7df329205307e830f158c403bf Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Mon, 6 Apr 2009 17:32:06 +0200
+Subject: [PATCH 21/69] DSS2: Add venc register dump
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+Add a new file to debugfs to dump the VENC registers. The function
+prototype was already there but the implementation was missing.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/venc.c | 55 ++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 55 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
+index aceed9f..b655df4 100644
+--- a/drivers/video/omap2/dss/venc.c
++++ b/drivers/video/omap2/dss/venc.c
+@@ -30,6 +30,7 @@
+ #include <linux/completion.h>
+ #include <linux/delay.h>
+ #include <linux/string.h>
++#include <linux/seq_file.h>
+
+ #include <mach/display.h>
+ #include <mach/cpu.h>
+@@ -81,6 +82,7 @@
+ #define VENC_TVDETGP_INT_START_STOP_Y 0xB4
+ #define VENC_GEN_CTRL 0xB8
+ #define VENC_OUTPUT_CONTROL 0xC4
++#define VENC_OUTPUT_TEST 0xC8
+ #define VENC_DAC_B__DAC_C 0xC8
+
+ struct venc_config {
+@@ -598,3 +600,56 @@ void venc_init_display(struct omap_display *display)
+ display->set_timings = venc_set_timings;
+ display->check_timings = venc_check_timings;
+ }
++
++void venc_dump_regs(struct seq_file *s)
++{
++#define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r))
++
++ venc_enable_clocks(1);
++
++ DUMPREG(VENC_F_CONTROL);
++ DUMPREG(VENC_VIDOUT_CTRL);
++ DUMPREG(VENC_SYNC_CTRL);
++ DUMPREG(VENC_LLEN);
++ DUMPREG(VENC_FLENS);
++ DUMPREG(VENC_HFLTR_CTRL);
++ DUMPREG(VENC_CC_CARR_WSS_CARR);
++ DUMPREG(VENC_C_PHASE);
++ DUMPREG(VENC_GAIN_U);
++ DUMPREG(VENC_GAIN_V);
++ DUMPREG(VENC_GAIN_Y);
++ DUMPREG(VENC_BLACK_LEVEL);
++ DUMPREG(VENC_BLANK_LEVEL);
++ DUMPREG(VENC_X_COLOR);
++ DUMPREG(VENC_M_CONTROL);
++ DUMPREG(VENC_BSTAMP_WSS_DATA);
++ DUMPREG(VENC_S_CARR);
++ DUMPREG(VENC_LINE21);
++ DUMPREG(VENC_LN_SEL);
++ DUMPREG(VENC_L21__WC_CTL);
++ DUMPREG(VENC_HTRIGGER_VTRIGGER);
++ DUMPREG(VENC_SAVID__EAVID);
++ DUMPREG(VENC_FLEN__FAL);
++ DUMPREG(VENC_LAL__PHASE_RESET);
++ DUMPREG(VENC_HS_INT_START_STOP_X);
++ DUMPREG(VENC_HS_EXT_START_STOP_X);
++ DUMPREG(VENC_VS_INT_START_X);
++ DUMPREG(VENC_VS_INT_STOP_X__VS_INT_START_Y);
++ DUMPREG(VENC_VS_INT_STOP_Y__VS_EXT_START_X);
++ DUMPREG(VENC_VS_EXT_STOP_X__VS_EXT_START_Y);
++ DUMPREG(VENC_VS_EXT_STOP_Y);
++ DUMPREG(VENC_AVID_START_STOP_X);
++ DUMPREG(VENC_AVID_START_STOP_Y);
++ DUMPREG(VENC_FID_INT_START_X__FID_INT_START_Y);
++ DUMPREG(VENC_FID_INT_OFFSET_Y__FID_EXT_START_X);
++ DUMPREG(VENC_FID_EXT_START_Y__FID_EXT_OFFSET_Y);
++ DUMPREG(VENC_TVDETGP_INT_START_STOP_X);
++ DUMPREG(VENC_TVDETGP_INT_START_STOP_Y);
++ DUMPREG(VENC_GEN_CTRL);
++ DUMPREG(VENC_OUTPUT_CONTROL);
++ DUMPREG(VENC_OUTPUT_TEST);
++
++ venc_enable_clocks(0);
++
++#undef DUMPREG
++}
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch
new file mode 100644
index 0000000000..207a85f115
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0022-DSS2-FB-remove-unused-var-warning.patch
@@ -0,0 +1,27 @@
+From facfd479bb6efad76eec1e74048cb7a31da7287d Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Mon, 6 Apr 2009 22:26:04 +0200
+Subject: [PATCH 22/69] DSS2: FB: remove unused var warning
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ drivers/video/omap2/omapfb/omapfb-main.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index afe40a9..12ce0c3 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -1246,7 +1246,9 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
+ display->get_resolution(display, &w, &h);
+
+ if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
++#ifdef DEBUG
+ int oldw = w, oldh = h;
++#endif
+
+ omap_vrfb_adjust_size(&w, &h, bytespp);
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch
new file mode 100644
index 0000000000..45045c4b4b
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch
@@ -0,0 +1,214 @@
+From c02b843c2732bc7b15a3e35b5dd715d68225bbd1 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Wed, 8 Apr 2009 12:51:46 +0200
+Subject: [PATCH 23/69] DSS2: pass the default FB color format through board info
+
+Add a field to the FB memory region platform data, so that board
+init code can pass a default color format to the driver. Set this
+format as an initial setting for the given FB.
+
+This is needed for an upcoming patch that adds detection of the
+color format set by the bootloader.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ drivers/video/omap2/omapfb/omapfb-main.c | 121 +++++++++++++++++++++++++++---
+ drivers/video/omap2/omapfb/omapfb.h | 2 +
+ include/linux/omapfb.h | 5 +
+ 3 files changed, 117 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index 12ce0c3..67c67c2 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -370,6 +370,21 @@ static enum omap_color_mode fb_mode_to_dss_mode(struct fb_var_screeninfo *var)
+ return -EINVAL;
+ }
+
++static int dss_mode_to_fb_mode(enum omap_color_mode dssmode,
++ struct fb_var_screeninfo *var)
++{
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(omapfb_colormodes); ++i) {
++ struct omapfb_colormode *mode = &omapfb_colormodes[i];
++ if (dssmode == mode->dssmode) {
++ assign_colormode_to_var(var, mode);
++ return 0;
++ }
++ }
++ return -ENOENT;
++}
++
+ void set_fb_fix(struct fb_info *fbi)
+ {
+ struct fb_fix_screeninfo *fix = &fbi->fix;
+@@ -1267,6 +1282,60 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
+ return omapfb_alloc_fbmem(fbi, size, paddr);
+ }
+
++static enum omap_color_mode fb_format_to_dss_mode(enum omapfb_color_format format)
++{
++ enum omap_color_mode mode;
++
++ switch (format) {
++ case OMAPFB_COLOR_RGB565:
++ mode = OMAP_DSS_COLOR_RGB16;
++ break;
++ case OMAPFB_COLOR_YUV422:
++ mode = OMAP_DSS_COLOR_YUV2;
++ break;
++ case OMAPFB_COLOR_CLUT_8BPP:
++ mode = OMAP_DSS_COLOR_CLUT8;
++ break;
++ case OMAPFB_COLOR_CLUT_4BPP:
++ mode = OMAP_DSS_COLOR_CLUT4;
++ break;
++ case OMAPFB_COLOR_CLUT_2BPP:
++ mode = OMAP_DSS_COLOR_CLUT2;
++ break;
++ case OMAPFB_COLOR_CLUT_1BPP:
++ mode = OMAP_DSS_COLOR_CLUT1;
++ break;
++ case OMAPFB_COLOR_RGB444:
++ mode = OMAP_DSS_COLOR_RGB12U;
++ break;
++ case OMAPFB_COLOR_YUY422:
++ mode = OMAP_DSS_COLOR_UYVY;
++ break;
++ case OMAPFB_COLOR_ARGB16:
++ mode = OMAP_DSS_COLOR_ARGB16;
++ break;
++ case OMAPFB_COLOR_RGB24U:
++ mode = OMAP_DSS_COLOR_RGB24U;
++ break;
++ case OMAPFB_COLOR_RGB24P:
++ mode = OMAP_DSS_COLOR_RGB24P;
++ break;
++ case OMAPFB_COLOR_ARGB32:
++ mode = OMAP_DSS_COLOR_ARGB32;
++ break;
++ case OMAPFB_COLOR_RGBA32:
++ mode = OMAP_DSS_COLOR_RGBA32;
++ break;
++ case OMAPFB_COLOR_RGBX32:
++ mode = OMAP_DSS_COLOR_RGBX32;
++ break;
++ default:
++ mode = -EINVAL;
++ }
++
++ return mode;
++}
++
+ static int omapfb_parse_vram_param(const char *param, int max_entries,
+ unsigned long *sizes, unsigned long *paddrs)
+ {
+@@ -1483,9 +1552,36 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
+ }
+
+ var->nonstd = 0;
++ var->bits_per_pixel = 0;
+
+ var->rotate = ofbi->rotation;
+
++ /*
++ * Check if there is a default color format set in the board file,
++ * and use this format instead the default deducted from the
++ * display bpp.
++ */
++ if (fbdev->dev->platform_data) {
++ struct omapfb_platform_data *opd;
++ int id = ofbi->id;
++
++ opd = fbdev->dev->platform_data;
++ if (opd->mem_desc.region[id].format_used) {
++ enum omap_color_mode mode;
++ enum omapfb_color_format format;
++
++ format = opd->mem_desc.region[id].format;
++ mode = fb_format_to_dss_mode(format);
++ if (mode < 0) {
++ r = mode;
++ goto err;
++ }
++ r = dss_mode_to_fb_mode(mode, var);
++ if (r < 0)
++ goto err;
++ }
++ }
++
+ if (display) {
+ u16 w, h;
+ display->get_resolution(display, &w, &h);
+@@ -1502,16 +1598,18 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
+ var->xres_virtual = var->xres;
+ var->yres_virtual = var->yres;
+
+- switch (display->get_recommended_bpp(display)) {
+- case 16:
+- var->bits_per_pixel = 16;
+- break;
+- case 24:
+- var->bits_per_pixel = 32;
+- break;
+- default:
+- dev_err(fbdev->dev, "illegal display bpp\n");
+- return -EINVAL;
++ if (!var->bits_per_pixel) {
++ switch (display->get_recommended_bpp(display)) {
++ case 16:
++ var->bits_per_pixel = 16;
++ break;
++ case 24:
++ var->bits_per_pixel = 32;
++ break;
++ default:
++ dev_err(fbdev->dev, "illegal display bpp\n");
++ return -EINVAL;
++ }
+ }
+ } else {
+ /* if there's no display, let's just guess some basic values */
+@@ -1519,7 +1617,8 @@ int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
+ var->yres = 240;
+ var->xres_virtual = var->xres;
+ var->yres_virtual = var->yres;
+- var->bits_per_pixel = 16;
++ if (!var->bits_per_pixel)
++ var->bits_per_pixel = 16;
+ }
+
+ r = check_fb_var(fbi, var);
+diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h
+index 65e9e6e..2607def 100644
+--- a/drivers/video/omap2/omapfb/omapfb.h
++++ b/drivers/video/omap2/omapfb/omapfb.h
+@@ -27,6 +27,8 @@
+ #define DEBUG
+ #endif
+
++#include <mach/display.h>
++
+ #ifdef DEBUG
+ extern unsigned int omapfb_debug;
+ #define DBG(format, ...) \
+diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h
+index 96190b2..7a34f22 100644
+--- a/include/linux/omapfb.h
++++ b/include/linux/omapfb.h
+@@ -298,6 +298,11 @@ struct omapfb_mem_region {
+ void __iomem *vaddr;
+ unsigned long size;
+ u8 type; /* OMAPFB_PLANE_MEM_* */
++ enum omapfb_color_format format;/* OMAPFB_COLOR_* */
++ unsigned format_used:1; /* Must be set when format is set.
++ * Needed b/c of the badly chosen 0
++ * base for OMAPFB_COLOR_* values
++ */
+ unsigned alloc:1; /* allocated by the driver */
+ unsigned map:1; /* kernel mapped by the driver */
+ };
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch
new file mode 100644
index 0000000000..1a68d9425a
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch
@@ -0,0 +1,48 @@
+From 2710416c43572652cb5355a5eaf68038c95659e8 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 9 Apr 2009 12:10:46 +0300
+Subject: [PATCH 24/69] DSS2: Beagle: Use gpio_set_value
+
+---
+ arch/arm/mach-omap2/board-omap3beagle.c | 10 +++++++---
+ 1 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index b67e7a5..8c1961d 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -372,7 +372,7 @@ static struct platform_device keys_gpio = {
+ static int beagle_enable_dvi(struct omap_display *display)
+ {
+ if (display->hw_config.panel_reset_gpio != -1)
+- gpio_direction_output(display->hw_config.panel_reset_gpio, 1);
++ gpio_set_value(display->hw_config.panel_reset_gpio, 1);
+
+ return 0;
+ }
+@@ -380,7 +380,7 @@ static int beagle_enable_dvi(struct omap_display *display)
+ static void beagle_disable_dvi(struct omap_display *display)
+ {
+ if (display->hw_config.panel_reset_gpio != -1)
+- gpio_direction_output(display->hw_config.panel_reset_gpio, 0);
++ gpio_set_value(display->hw_config.panel_reset_gpio, 0);
+ }
+
+ static struct omap_dss_display_config beagle_display_data_dvi = {
+@@ -445,8 +445,12 @@ static void __init beagle_display_init(void)
+ int r;
+
+ r = gpio_request(beagle_display_data_dvi.panel_reset_gpio, "DVI reset");
+- if (r < 0)
++ if (r < 0) {
+ printk(KERN_ERR "Unable to get DVI reset GPIO\n");
++ return;
++ }
++
++ gpio_direction_output(beagle_display_data_dvi.panel_reset_gpio, 0);
+ }
+
+ static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch
new file mode 100644
index 0000000000..7f889d95d8
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch
@@ -0,0 +1,28 @@
+From 990f3160d33361c135ee72e91f202e05a8c378fc Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Mon, 13 Apr 2009 18:50:24 +0530
+Subject: [PATCH 25/69] DSS2: VRFB: Macro for calculating base address of the VRFB context was faulty
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/plat-omap/vrfb.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 7e0f8fc..d68065f 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -16,8 +16,8 @@
+
+ #define SMS_ROT_VIRT_BASE(context, rot) \
+ (((context >= 4) ? 0xD0000000 : 0x70000000) \
+- | 0x4000000 * (context) \
+- | 0x1000000 * (rot))
++ + (0x4000000 * (context)) \
++ + (0x1000000 * (rot)))
+
+ #define OMAP_VRFB_SIZE (2048 * 2048 * 4)
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch
new file mode 100644
index 0000000000..f5c249e045
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch
@@ -0,0 +1,78 @@
+From a1e8018c0806a1a0579eda4b93b7d6764a2ff643 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 15 Apr 2009 14:06:54 +0300
+Subject: [PATCH 26/69] DSS2: DSI: sidlemode to noidle while sending frame
+
+DISPC interrupts are not wake-up capable. Smart-idle in DISPC_SIDLEMODE
+causes DSS interface to go to idle at the end of the frame, and the
+FRAMEDONE interrupt is then delayed until something wakes up the DSS
+interface.
+
+So we set SIDLEMODE to no-idle when we start sending the frame, and
+set it back to smart-idle after receiving FRAMEDONE.
+---
+ drivers/video/omap2/dss/dispc.c | 10 ++++++++++
+ drivers/video/omap2/dss/dsi.c | 4 ++++
+ drivers/video/omap2/dss/dss.h | 3 +++
+ 3 files changed, 17 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index ae7be3d..16c68b8 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -2791,6 +2791,16 @@ static void _omap_dispc_initialize_irq(void)
+ omap_dispc_set_irqs();
+ }
+
++void dispc_enable_sidle(void)
++{
++ REG_FLD_MOD(DISPC_SYSCONFIG, 2, 4, 3); /* SIDLEMODE: smart idle */
++}
++
++void dispc_disable_sidle(void)
++{
++ REG_FLD_MOD(DISPC_SYSCONFIG, 1, 4, 3); /* SIDLEMODE: no idle */
++}
++
+ static void _omap_dispc_initial_config(void)
+ {
+ u32 l;
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index 66ac6ea..50af925 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -2665,6 +2665,8 @@ static void dsi_update_screen_dispc(struct omap_display *display,
+ l = FLD_MOD(l, 1, 31, 31); /* TE_START */
+ dsi_write_reg(DSI_VC_TE(1), l);
+
++ dispc_disable_sidle();
++
+ dispc_enable_lcd_out(1);
+
+ if (dsi.use_te)
+@@ -2678,6 +2680,8 @@ static void framedone_callback(void *data, u32 mask)
+ return;
+ }
+
++ dispc_enable_sidle();
++
+ dsi.framedone_scheduled = 1;
+
+ /* We get FRAMEDONE when DISPC has finished sending pixels and turns
+diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
+index 0be42b6..d0917a8 100644
+--- a/drivers/video/omap2/dss/dss.h
++++ b/drivers/video/omap2/dss/dss.h
+@@ -244,6 +244,9 @@ void dispc_fake_vsync_irq(void);
+ void dispc_save_context(void);
+ void dispc_restore_context(void);
+
++void dispc_enable_sidle(void);
++void dispc_disable_sidle(void);
++
+ void dispc_lcd_enable_signal_polarity(bool act_high);
+ void dispc_lcd_enable_signal(bool enable);
+ void dispc_pck_free_enable(bool enable);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch
new file mode 100644
index 0000000000..5265ae6b0a
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch
@@ -0,0 +1,324 @@
+From 77e848eeba461e9b55b09d39fd0d640caea13e19 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Thu, 9 Apr 2009 12:09:44 +0530
+Subject: [PATCH 27/69] DSS2: VRFB rotation and mirroring implemented.
+
+DSS2 modified to accept the rotation_type input
+to get the dma or VRFB rotation.
+
+DSS2: VRFB: Changed to pass DSS mode to vrfb_setup instead of Bpp.
+
+VRFB size registers requires the width to be halved when the
+mode is YUV or UYVY. So modifed to pass the mode to omap_vrfb_setup
+function.
+
+Code added by Tim Yamin for few bug fixes
+
+Signed-off-by: Tim Yamin <plasm@roo.me.uk>
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 6 ++
+ arch/arm/plat-omap/include/mach/vrfb.h | 3 +-
+ arch/arm/plat-omap/vrfb.c | 36 +++++++++-
+ drivers/video/omap2/dss/dispc.c | 109 +++++++++++++++++++++++++++--
+ drivers/video/omap2/dss/dss.h | 1 +
+ drivers/video/omap2/dss/manager.c | 1 +
+ 6 files changed, 144 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index 6b702c7..b0a6272 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -341,6 +341,11 @@ enum omap_dss_overlay_managers {
+
+ struct omap_overlay_manager;
+
++enum omap_dss_rotation_type {
++ OMAP_DSS_ROT_DMA = 0,
++ OMAP_DSS_ROT_VRFB = 1,
++};
++
+ struct omap_overlay_info {
+ bool enabled;
+
+@@ -351,6 +356,7 @@ struct omap_overlay_info {
+ u16 height;
+ enum omap_color_mode color_mode;
+ u8 rotation;
++ enum omap_dss_rotation_type rotation_type;
+ bool mirror;
+
+ u16 pos_x;
+diff --git a/arch/arm/plat-omap/include/mach/vrfb.h b/arch/arm/plat-omap/include/mach/vrfb.h
+index 2047862..12c7fab 100644
+--- a/arch/arm/plat-omap/include/mach/vrfb.h
++++ b/arch/arm/plat-omap/include/mach/vrfb.h
+@@ -24,6 +24,7 @@
+ #ifndef __VRFB_H
+ #define __VRFB_H
+
++#include <mach/display.h>
+ #define OMAP_VRFB_LINE_LEN 2048
+
+ struct vrfb
+@@ -42,6 +43,6 @@ extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ u8 bytespp);
+ extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u16 width, u16 height,
+- u8 bytespp);
++ enum omap_color_mode color_mode);
+
+ #endif /* __VRFB_H */
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index d68065f..2f08f6d 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -5,7 +5,6 @@
+
+ #include <mach/io.h>
+ #include <mach/vrfb.h>
+-
+ /*#define DEBUG*/
+
+ #ifdef DEBUG
+@@ -50,19 +49,48 @@ EXPORT_SYMBOL(omap_vrfb_adjust_size);
+
+ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u16 width, u16 height,
+- u8 bytespp)
++ enum omap_color_mode color_mode)
+ {
+ unsigned pixel_size_exp;
+ u16 vrfb_width;
+ u16 vrfb_height;
+ u8 ctx = vrfb->context;
++ u8 bytespp;
+
+ DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d)\n", ctx, paddr,
+ width, height, bytespp);
+
+- if (bytespp == 4)
++ switch (color_mode) {
++ case OMAP_DSS_COLOR_RGB16:
++ case OMAP_DSS_COLOR_ARGB16:
++ bytespp = 2;
++ break;
++
++ case OMAP_DSS_COLOR_RGB24P:
++ bytespp = 3;
++ break;
++
++ case OMAP_DSS_COLOR_RGB24U:
++ case OMAP_DSS_COLOR_ARGB32:
++ case OMAP_DSS_COLOR_RGBA32:
++ case OMAP_DSS_COLOR_RGBX32:
++ case OMAP_DSS_COLOR_YUV2:
++ case OMAP_DSS_COLOR_UYVY:
++ bytespp = 4;
++ break;
++
++ default:
++ BUG();
++ return;
++ }
++
++ if (color_mode == OMAP_DSS_COLOR_YUV2 ||
++ color_mode == OMAP_DSS_COLOR_UYVY)
++ width >>= 1;
++
++ if (bytespp == 4) {
+ pixel_size_exp = 2;
+- else if (bytespp == 2)
++ } else if (bytespp == 2)
+ pixel_size_exp = 1;
+ else
+ BUG();
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 16c68b8..23a8155 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1106,7 +1106,7 @@ static void _dispc_set_rotation_attrs(enum omap_plane plane, u8 rotation,
+ case 0: vidrot = 0; break;
+ case 1: vidrot = 1; break;
+ case 2: vidrot = 2; break;
+- case 3: vidrot = 1; break;
++ case 3: vidrot = 3; break;
+ }
+ }
+
+@@ -1134,7 +1134,92 @@ static s32 pixinc(int pixels, u8 ps)
+ BUG();
+ }
+
+-static void calc_rotation_offset(u8 rotation, bool mirror,
++static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
++ u16 screen_width,
++ u16 width, u16 height,
++ enum omap_color_mode color_mode, bool fieldmode,
++ unsigned *offset0, unsigned *offset1,
++ s32 *row_inc, s32 *pix_inc)
++{
++ u8 ps;
++
++ switch (color_mode) {
++ case OMAP_DSS_COLOR_RGB16:
++ case OMAP_DSS_COLOR_ARGB16:
++ ps = 2;
++ break;
++
++ case OMAP_DSS_COLOR_RGB24P:
++ ps = 3;
++ break;
++
++ case OMAP_DSS_COLOR_RGB24U:
++ case OMAP_DSS_COLOR_ARGB32:
++ case OMAP_DSS_COLOR_RGBA32:
++ case OMAP_DSS_COLOR_RGBX32:
++ case OMAP_DSS_COLOR_YUV2:
++ case OMAP_DSS_COLOR_UYVY:
++ ps = 4;
++ break;
++
++ default:
++ BUG();
++ return;
++ }
++
++ DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width,
++ width, height);
++ switch (rotation + mirror * 4) {
++ case 0:
++ case 2:
++ /*
++ * If the pixel format is YUV or UYVY divide the width
++ * of the image by 2 for 0 and 180 degree rotation.
++ */
++ if (color_mode == OMAP_DSS_COLOR_YUV2 ||
++ color_mode == OMAP_DSS_COLOR_UYVY)
++ width = width >> 1;
++ case 1:
++ case 3:
++ *offset0 = 0;
++ if (fieldmode)
++ *offset1 = screen_width * ps;
++ else
++ *offset1 = 0;
++
++ *row_inc = pixinc(1 + (screen_width - width) +
++ (fieldmode ? screen_width : 0),
++ ps);
++ *pix_inc = pixinc(1, ps);
++ break;
++
++ case 4:
++ case 6:
++ /* If the pixel format is YUV or UYVY divide the width
++ * of the image by 2 for 0 degree and 180 degree
++ */
++ if (color_mode == OMAP_DSS_COLOR_YUV2 ||
++ color_mode == OMAP_DSS_COLOR_UYVY)
++ width = width >> 1;
++ case 5:
++ case 7:
++ *offset0 = 0;
++ if (fieldmode)
++ *offset1 = screen_width * ps;
++ else
++ *offset1 = 0;
++ *row_inc = pixinc(1 - (screen_width + width) -
++ (fieldmode ? screen_width : 0),
++ ps);
++ *pix_inc = pixinc(1, ps);
++ break;
++
++ default:
++ BUG();
++ }
++}
++
++static void calc_dma_rotation_offset(u8 rotation, bool mirror,
+ u16 screen_width,
+ u16 width, u16 height,
+ enum omap_color_mode color_mode, bool fieldmode,
+@@ -1357,6 +1442,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ u16 out_width, u16 out_height,
+ enum omap_color_mode color_mode,
+ bool ilace,
++ enum omap_dss_rotation_type rotation_type,
+ u8 rotation, int mirror)
+ {
+ const int maxdownscale = cpu_is_omap34xx() ? 4 : 2;
+@@ -1463,10 +1549,16 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ return -EINVAL;
+ }
+
+- calc_rotation_offset(rotation, mirror,
+- screen_width, width, frame_height, color_mode,
+- fieldmode,
+- &offset0, &offset1, &row_inc, &pix_inc);
++ if (rotation_type == OMAP_DSS_ROT_DMA)
++ calc_dma_rotation_offset(rotation, mirror,
++ screen_width, width, frame_height, color_mode,
++ fieldmode,
++ &offset0, &offset1, &row_inc, &pix_inc);
++ else
++ calc_vrfb_rotation_offset(rotation, mirror,
++ screen_width, width, frame_height, color_mode,
++ fieldmode,
++ &offset0, &offset1, &row_inc, &pix_inc);
+
+ DSSDBG("offset0 %u, offset1 %u, row_inc %d, pix_inc %d\n",
+ offset0, offset1, row_inc, pix_inc);
+@@ -2889,6 +2981,7 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ u16 out_width, u16 out_height,
+ enum omap_color_mode color_mode,
+ bool ilace,
++ enum omap_dss_rotation_type rotation_type,
+ u8 rotation, bool mirror)
+ {
+ int r = 0;
+@@ -2909,6 +3002,7 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ width, height,
+ out_width, out_height,
+ color_mode, ilace,
++ rotation_type,
+ rotation, mirror);
+
+ enable_clocks(0);
+@@ -3122,7 +3216,8 @@ void dispc_setup_partial_planes(struct omap_display *display,
+ pw, ph,
+ pow, poh,
+ pi->color_mode, 0,
+- pi->rotation, // XXX rotation probably wrong
++ pi->rotation_type,
++ pi->rotation,
+ pi->mirror);
+
+ dispc_enable_plane(ovl->id, 1);
+diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
+index d0917a8..584dce6 100644
+--- a/drivers/video/omap2/dss/dss.h
++++ b/drivers/video/omap2/dss/dss.h
+@@ -272,6 +272,7 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ u16 out_width, u16 out_height,
+ enum omap_color_mode color_mode,
+ bool ilace,
++ enum omap_dss_rotation_type rotation_type,
+ u8 rotation, bool mirror);
+
+ void dispc_go(enum omap_channel channel);
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index b0fee80..8ca0bbb 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -395,6 +395,7 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
+ outh,
+ ovl->info.color_mode,
+ ilace,
++ ovl->info.rotation_type,
+ ovl->info.rotation,
+ ovl->info.mirror);
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch
new file mode 100644
index 0000000000..178349ed2a
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch
@@ -0,0 +1,236 @@
+From c09f1a0642fd58a1b081594ea36dfd1bf71aec52 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Thu, 9 Apr 2009 12:13:07 +0530
+Subject: [PATCH 28/69] DSS2: OMAPFB: Added support for the YUV VRFB rotation and mirroring.
+
+DSS2 now requires roatation_type to be specified by driver.
+Added support for that.
+DSS2 OMAPFB: Modified to pass the dss mode to omap_vrfb_setup function.
+
+VRFB size register requires the width to be halved when the
+mode is YUV or UYVY. So VRFB is modifed to pass the mode to omap_vrfb_setup
+function.
+
+Few changes done by Tim Yamin
+Signed-off-by: Tim Yamin <plasm@roo.me.uk>
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/plat-omap/vrfb.c | 4 +-
+ drivers/video/omap2/omapfb/omapfb-main.c | 59 ++++++++++++++----------------
+ drivers/video/omap2/omapfb/omapfb.h | 7 +---
+ 3 files changed, 30 insertions(+), 40 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 2f08f6d..2ae0d68 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -88,9 +88,9 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ color_mode == OMAP_DSS_COLOR_UYVY)
+ width >>= 1;
+
+- if (bytespp == 4) {
++ if (bytespp == 4)
+ pixel_size_exp = 2;
+- } else if (bytespp == 2)
++ else if (bytespp == 2)
+ pixel_size_exp = 1;
+ else
+ BUG();
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index 67c67c2..57f5900 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -176,15 +176,9 @@ static unsigned omapfb_get_vrfb_offset(struct omapfb_info *ofbi, int rot)
+
+ static u32 omapfb_get_region_rot_paddr(struct omapfb_info *ofbi)
+ {
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
+- unsigned offset;
+- int rot;
+-
+- rot = ofbi->rotation;
+-
+- offset = omapfb_get_vrfb_offset(ofbi, rot);
+-
+- return ofbi->region.vrfb.paddr[rot] + offset;
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
++ return ofbi->region.vrfb.paddr[ofbi->rotation]
++ + omapfb_get_vrfb_offset(ofbi, ofbi->rotation);
+ } else {
+ return ofbi->region.paddr;
+ }
+@@ -192,7 +186,7 @@ static u32 omapfb_get_region_rot_paddr(struct omapfb_info *ofbi)
+
+ u32 omapfb_get_region_paddr(struct omapfb_info *ofbi)
+ {
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
+ return ofbi->region.vrfb.paddr[0];
+ else
+ return ofbi->region.paddr;
+@@ -200,7 +194,7 @@ u32 omapfb_get_region_paddr(struct omapfb_info *ofbi)
+
+ void __iomem *omapfb_get_region_vaddr(struct omapfb_info *ofbi)
+ {
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
+ return ofbi->region.vrfb.vaddr[0];
+ else
+ return ofbi->region.vaddr;
+@@ -398,7 +392,7 @@ void set_fb_fix(struct fb_info *fbi)
+ fbi->screen_base = (char __iomem *)omapfb_get_region_vaddr(ofbi);
+
+ /* used by mmap in fbmem.c */
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
+ fix->line_length =
+ (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 3;
+ else
+@@ -434,11 +428,14 @@ void set_fb_fix(struct fb_info *fbi)
+ fix->xpanstep = 1;
+ fix->ypanstep = 1;
+
+- if (rg->size) {
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
+- omap_vrfb_setup(&rg->vrfb, rg->paddr,
+- var->xres_virtual, var->yres_virtual,
+- var->bits_per_pixel >> 3);
++ if (rg->size && ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
++ enum omap_color_mode mode = 0;
++ mode = fb_mode_to_dss_mode(var);
++
++ omap_vrfb_setup(&rg->vrfb, rg->paddr,
++ var->xres_virtual,
++ var->yres_virtual,
++ mode);
+ }
+ }
+
+@@ -527,7 +524,7 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var)
+ if (var->yres > var->yres_virtual)
+ var->yres = var->yres_virtual;
+
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
+ line_size = OMAP_VRFB_LINE_LEN * bytespp;
+ else
+ line_size = var->xres_virtual * bytespp;
+@@ -549,7 +546,7 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var)
+
+ if (line_size * var->yres_virtual > max_frame_size) {
+ DBG("can't fit FB into memory, reducing x\n");
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB)
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
+ return -EINVAL;
+
+ var->xres_virtual = max_frame_size / var->yres_virtual /
+@@ -672,7 +669,7 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
+ struct omap_overlay_info info;
+ int xres, yres;
+ int screen_width;
+- int rot, mirror;
++ int mirror;
+
+ DBG("setup_overlay %d, posx %d, posy %d, outw %d, outh %d\n", ofbi->id,
+ posx, posy, outw, outh);
+@@ -688,7 +685,7 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
+ offset = ((var->yoffset * var->xres_virtual +
+ var->xoffset) * var->bits_per_pixel) >> 3;
+
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
+ data_start_p = omapfb_get_region_rot_paddr(ofbi);
+ data_start_v = NULL;
+ } else {
+@@ -711,13 +708,10 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
+
+ ovl->get_overlay_info(ovl, &info);
+
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
+- rot = 0;
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
+ mirror = 0;
+- } else {
+- rot = ofbi->rotation;
++ else
+ mirror = ofbi->mirror;
+- }
+
+ info.paddr = data_start_p;
+ info.vaddr = data_start_v;
+@@ -725,7 +719,8 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
+ info.width = xres;
+ info.height = yres;
+ info.color_mode = mode;
+- info.rotation = rot;
++ info.rotation_type = ofbi->rotation_type;
++ info.rotation = ofbi->rotation;
+ info.mirror = mirror;
+
+ info.pos_x = posx;
+@@ -1121,7 +1116,7 @@ static void omapfb_free_fbmem(struct fb_info *fbi)
+ if (rg->vaddr)
+ iounmap(rg->vaddr);
+
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
+ /* unmap the 0 angle rotation */
+ if (rg->vrfb.vaddr[0]) {
+ iounmap(rg->vrfb.vaddr[0]);
+@@ -1181,7 +1176,7 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
+ return -ENOMEM;
+ }
+
+- if (ofbi->rotation_type != OMAPFB_ROT_VRFB) {
++ if (ofbi->rotation_type != OMAP_DSS_ROT_VRFB) {
+ vaddr = ioremap_wc(paddr, size);
+
+ if (!vaddr) {
+@@ -1260,7 +1255,7 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
+
+ display->get_resolution(display, &w, &h);
+
+- if (ofbi->rotation_type == OMAPFB_ROT_VRFB) {
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
+ #ifdef DEBUG
+ int oldw = w, oldh = h;
+ #endif
+@@ -1701,8 +1696,8 @@ static int omapfb_create_framebuffers(struct omapfb2_device *fbdev)
+ ofbi->id = i;
+
+ /* assign these early, so that fb alloc can use them */
+- ofbi->rotation_type = def_vrfb ? OMAPFB_ROT_VRFB :
+- OMAPFB_ROT_DMA;
++ ofbi->rotation_type = def_vrfb ? OMAP_DSS_ROT_VRFB :
++ OMAP_DSS_ROT_DMA;
+ ofbi->rotation = def_rotate;
+ ofbi->mirror = def_mirror;
+
+diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h
+index 2607def..43f6922 100644
+--- a/drivers/video/omap2/omapfb/omapfb.h
++++ b/drivers/video/omap2/omapfb/omapfb.h
+@@ -53,11 +53,6 @@ struct omapfb2_mem_region {
+ bool map; /* kernel mapped by the driver */
+ };
+
+-enum omapfb_rotation_type {
+- OMAPFB_ROT_DMA = 0,
+- OMAPFB_ROT_VRFB = 1,
+-};
+-
+ /* appended to fb_info */
+ struct omapfb_info {
+ int id;
+@@ -66,7 +61,7 @@ struct omapfb_info {
+ int num_overlays;
+ struct omap_overlay *overlays[OMAPFB_MAX_OVL_PER_FB];
+ struct omapfb2_device *fbdev;
+- enum omapfb_rotation_type rotation_type;
++ enum omap_dss_rotation_type rotation_type;
+ u8 rotation;
+ bool mirror;
+ };
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch
new file mode 100644
index 0000000000..e9f25dfef1
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch
@@ -0,0 +1,61 @@
+From a8a37babe4856170f4cba86c425a8f21975d9e9e Mon Sep 17 00:00:00 2001
+From: Tim Yamin <plasm@roo.me.uk>
+Date: Mon, 13 Apr 2009 13:57:42 -0700
+Subject: [PATCH 29/69] DSS2: OMAPFB: Set line_length correctly for YUV with VRFB.
+
+Signed-off-by: Tim Yamin <plasm@roo.me.uk>
+---
+ drivers/video/omap2/omapfb/omapfb-main.c | 30 +++++++++++++++++++++++++-----
+ 1 files changed, 25 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index 57f5900..cd63740 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -392,10 +392,19 @@ void set_fb_fix(struct fb_info *fbi)
+ fbi->screen_base = (char __iomem *)omapfb_get_region_vaddr(ofbi);
+
+ /* used by mmap in fbmem.c */
+- if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
+- fix->line_length =
+- (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 3;
+- else
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
++ switch (var->nonstd) {
++ case OMAPFB_COLOR_YUV422:
++ case OMAPFB_COLOR_YUY422:
++ fix->line_length =
++ (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 2;
++ break;
++ default:
++ fix->line_length =
++ (OMAP_VRFB_LINE_LEN * var->bits_per_pixel) >> 3;
++ break;
++ }
++ } else
+ fix->line_length =
+ (var->xres_virtual * var->bits_per_pixel) >> 3;
+ fix->smem_start = omapfb_get_region_paddr(ofbi);
+@@ -704,7 +713,18 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl,
+ goto err;
+ }
+
+- screen_width = fix->line_length / (var->bits_per_pixel >> 3);
++ switch (var->nonstd) {
++ case OMAPFB_COLOR_YUV422:
++ case OMAPFB_COLOR_YUY422:
++ if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
++ screen_width = fix->line_length
++ / (var->bits_per_pixel >> 2);
++ break;
++ }
++ default:
++ screen_width = fix->line_length / (var->bits_per_pixel >> 3);
++ break;
++ }
+
+ ovl->get_overlay_info(ovl, &info);
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch
new file mode 100644
index 0000000000..63b3594ef5
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch
@@ -0,0 +1,29 @@
+From bda19b9359d9dc60f8b0beb5685e173e236ee30f Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Wed, 15 Apr 2009 17:05:18 +0530
+Subject: [PATCH 30/69] DSS2: dispc_get_trans_key was returning wrong key type
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/dss/dispc.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 23a8155..076d3d4 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1826,9 +1826,9 @@ void dispc_get_trans_key(enum omap_channel ch,
+ enable_clocks(1);
+ if (type) {
+ if (ch == OMAP_DSS_CHANNEL_LCD)
+- *type = REG_GET(DISPC_CONFIG, 11, 11) >> 11;
++ *type = REG_GET(DISPC_CONFIG, 11, 11);
+ else if (ch == OMAP_DSS_CHANNEL_DIGIT)
+- *type = REG_GET(DISPC_CONFIG, 13, 13) >> 13;
++ *type = REG_GET(DISPC_CONFIG, 13, 13);
+ else
+ BUG();
+ }
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch
new file mode 100644
index 0000000000..684857c15f
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch
@@ -0,0 +1,33 @@
+From 30c40f5e6b1794430f678bf23d3319354321cab7 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 14 Apr 2009 14:50:11 +0200
+Subject: [PATCH 31/69] DSS2: do bootmem reserve for exclusive access
+
+BOOTMEM_DEFAULT would allow multiple reservations for the same location,
+we need to reserve the region for our exclusive use. Also check if the
+reserve succeeded.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/vram.c | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index f24a110..520f260 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -524,7 +524,10 @@ void __init omapfb_reserve_sdram(void)
+ return;
+ }
+
+- reserve_bootmem(paddr, size, BOOTMEM_DEFAULT);
++ if (reserve_bootmem(paddr, size, BOOTMEM_EXCLUSIVE) < 0) {
++ pr_err("FB: failed to reserve VRAM\n");
++ return;
++ }
+ } else {
+ if (size > sdram_size) {
+ printk(KERN_ERR "Illegal SDRAM size for VRAM\n");
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch
new file mode 100644
index 0000000000..df3a7a9dd9
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch
@@ -0,0 +1,35 @@
+From ed7a9223f6785be03951c55f3b0695b0d5635c80 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Thu, 9 Apr 2009 15:04:44 +0200
+Subject: [PATCH 32/69] DSS2: Fix DISPC_VID_FIR value for omap34xx
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+The msbs of the DISPC_VID_FIR fields were incorrectly masked out on
+omap34xx and thus 4:1 downscale did not work correctly.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 076d3d4..b8a3329 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -994,7 +994,10 @@ static void _dispc_set_fir(enum omap_plane plane, int hinc, int vinc)
+
+ BUG_ON(plane == OMAP_DSS_GFX);
+
+- val = FLD_VAL(vinc, 27, 16) | FLD_VAL(hinc, 11, 0);
++ if (cpu_is_omap24xx())
++ val = FLD_VAL(vinc, 27, 16) | FLD_VAL(hinc, 11, 0);
++ else
++ val = FLD_VAL(vinc, 28, 16) | FLD_VAL(hinc, 12, 0);
+ dispc_write_reg(fir_reg[plane-1], val);
+ }
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch
new file mode 100644
index 0000000000..6457a5b94a
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0033-DSS2-Prefer-3-tap-filter.patch
@@ -0,0 +1,82 @@
+From 5390230ed12585a79683733209db34e9130b8e3b Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Thu, 9 Apr 2009 15:04:43 +0200
+Subject: [PATCH 33/69] DSS2: Prefer 3-tap filter
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+The 5-tap filter seems rather unstable. With some scaling settings it
+works and with some it doesn't even though the functional clock remains
+within the TRM limits. So prefer the 3-tap filter unless the functional
+clock required for it is too high.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 27 ++++++++++++---------------
+ 1 files changed, 12 insertions(+), 15 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b8a3329..b631dd8 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1405,15 +1405,10 @@ static unsigned long calc_fclk_five_taps(u16 width, u16 height,
+ }
+
+ static unsigned long calc_fclk(u16 width, u16 height,
+- u16 out_width, u16 out_height,
+- enum omap_color_mode color_mode, bool five_taps)
++ u16 out_width, u16 out_height)
+ {
+ unsigned int hf, vf;
+
+- if (five_taps)
+- return calc_fclk_five_taps(width, height,
+- out_width, out_height, color_mode);
+-
+ /*
+ * FIXME how to determine the 'A' factor
+ * for the no downscaling case ?
+@@ -1494,7 +1489,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ } else {
+ /* video plane */
+
+- unsigned long fclk;
++ unsigned long fclk = 0;
+
+ if (out_width < width / maxdownscale ||
+ out_width > width * 8)
+@@ -1530,20 +1525,22 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ /* Must use 5-tap filter? */
+ five_taps = height > out_height * 2;
+
+- /* Try to use 5-tap filter whenever possible. */
+- if (cpu_is_omap34xx() && !five_taps &&
+- height > out_height && width <= 1024) {
+- fclk = calc_fclk_five_taps(width, height,
+- out_width, out_height, color_mode);
+- if (fclk <= dispc_fclk_rate())
++ if (!five_taps) {
++ fclk = calc_fclk(width, height,
++ out_width, out_height);
++
++ /* Try 5-tap filter if 3-tap fclk is too high */
++ if (cpu_is_omap34xx() && height > out_height &&
++ fclk > dispc_fclk_rate())
+ five_taps = true;
+ }
+
+ if (width > (2048 >> five_taps))
+ return -EINVAL;
+
+- fclk = calc_fclk(width, height, out_width, out_height,
+- color_mode, five_taps);
++ if (five_taps)
++ fclk = calc_fclk_five_taps(width, height,
++ out_width, out_height, color_mode);
+
+ DSSDBG("required fclk rate = %lu Hz\n", fclk);
+ DSSDBG("current fclk rate = %lu Hz\n", dispc_fclk_rate());
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
new file mode 100644
index 0000000000..dd01886406
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
@@ -0,0 +1,135 @@
+From 946eb774e95cdc2f2fa5cdc24aa69229f82814b8 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 16 Apr 2009 17:56:00 +0300
+Subject: [PATCH 34/69] DSS2: VRAM: improve omap_vram_add_region()
+
+Combine postponed and non-posponed versions of omap_vram_add_region.
+Make the func non-static, so it can be called from board files.
+---
+ arch/arm/plat-omap/include/mach/vram.h | 1 +
+ arch/arm/plat-omap/vram.c | 54 +++++++++++++------------------
+ 2 files changed, 24 insertions(+), 31 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/vram.h b/arch/arm/plat-omap/include/mach/vram.h
+index f176562..8639e08 100644
+--- a/arch/arm/plat-omap/include/mach/vram.h
++++ b/arch/arm/plat-omap/include/mach/vram.h
+@@ -24,6 +24,7 @@
+
+ #include <asm/types.h>
+
++extern int omap_vram_add_region(unsigned long paddr, size_t size);
+ extern int omap_vram_free(unsigned long paddr, size_t size);
+ extern int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr);
+ extern int omap_vram_reserve(unsigned long paddr, size_t size);
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index 520f260..8e9fe77 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -60,6 +60,7 @@
+ * time when we cannot yet allocate the region list */
+ #define MAX_POSTPONED_REGIONS 10
+
++static bool vram_initialized;
+ static int postponed_cnt __initdata;
+ static struct {
+ unsigned long paddr;
+@@ -145,39 +146,32 @@ static void omap_vram_free_allocation(struct vram_alloc *va)
+ kfree(va);
+ }
+
+-static __init int omap_vram_add_region_postponed(unsigned long paddr,
+- size_t size)
+-{
+- if (postponed_cnt == MAX_POSTPONED_REGIONS)
+- return -ENOMEM;
+-
+- postponed_regions[postponed_cnt].paddr = paddr;
+- postponed_regions[postponed_cnt].size = size;
+-
+- ++postponed_cnt;
+-
+- return 0;
+-}
+-
+-/* add/remove_region can be exported if there's need to add/remove regions
+- * runtime */
+-static int omap_vram_add_region(unsigned long paddr, size_t size)
++int omap_vram_add_region(unsigned long paddr, size_t size)
+ {
+ struct vram_region *rm;
+ unsigned pages;
+
+- DBG("adding region paddr %08lx size %d\n",
+- paddr, size);
++ if (vram_initialized) {
++ DBG("adding region paddr %08lx size %d\n",
++ paddr, size);
+
+- size &= PAGE_MASK;
+- pages = size >> PAGE_SHIFT;
++ size &= PAGE_MASK;
++ pages = size >> PAGE_SHIFT;
+
+- rm = omap_vram_create_region(paddr, pages);
+- if (rm == NULL)
+- return -ENOMEM;
++ rm = omap_vram_create_region(paddr, pages);
++ if (rm == NULL)
++ return -ENOMEM;
++
++ list_add(&rm->list, &region_list);
++ } else {
++ if (postponed_cnt == MAX_POSTPONED_REGIONS)
++ return -ENOMEM;
+
+- list_add(&rm->list, &region_list);
++ postponed_regions[postponed_cnt].paddr = paddr;
++ postponed_regions[postponed_cnt].size = size;
+
++ ++postponed_cnt;
++ }
+ return 0;
+ }
+
+@@ -438,6 +432,8 @@ static __init int omap_vram_init(void)
+ {
+ int i, r;
+
++ vram_initialized = 1;
++
+ for (i = 0; i < postponed_cnt; i++)
+ omap_vram_add_region(postponed_regions[i].paddr,
+ postponed_regions[i].size);
+@@ -472,10 +468,6 @@ static void __init omapfb_early_vram(char **p)
+ omapfb_def_sdram_vram_size = memparse(*p, p);
+ if (**p == ',')
+ omapfb_def_sdram_vram_start = simple_strtoul((*p) + 1, p, 16);
+-
+- printk("omapfb_early_vram, %d, 0x%x\n",
+- omapfb_def_sdram_vram_size,
+- omapfb_def_sdram_vram_start);
+ }
+ __early_param("vram=", omapfb_early_vram);
+
+@@ -538,7 +530,7 @@ void __init omapfb_reserve_sdram(void)
+ BUG_ON(paddr & ~PAGE_MASK);
+ }
+
+- omap_vram_add_region_postponed(paddr, size);
++ omap_vram_add_region(paddr, size);
+
+ pr_info("Reserving %u bytes SDRAM for VRAM\n", size);
+ }
+@@ -594,7 +586,7 @@ unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
+ reserved = pend_avail - paddr;
+ size_avail = pend_avail - reserved - pstart_avail;
+
+- omap_vram_add_region_postponed(paddr, size);
++ omap_vram_add_region(paddr, size);
+
+ if (reserved)
+ pr_info("Reserving %lu bytes SRAM for VRAM\n", reserved);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
new file mode 100644
index 0000000000..6b29d50dc0
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
@@ -0,0 +1,66 @@
+From f825cafd5ee5c600218740507f85594c825b0c00 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Thu, 16 Apr 2009 18:47:49 +0530
+Subject: [PATCH 35/69] DSS2: Added the function pointer for getting default color.
+
+V4L2 Framework has a CID for getting/setting default color.
+So added the function pointer for doing same.
+SYSFS based getting the default color will remain same
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 1 +
+ drivers/video/omap2/dss/manager.c | 11 +++++++----
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index b0a6272..073cdda 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -414,6 +414,7 @@ struct omap_overlay_manager {
+ int (*apply)(struct omap_overlay_manager *mgr);
+
+ void (*set_default_color)(struct omap_overlay_manager *mgr, u32 color);
++ u32 (*get_default_color)(struct omap_overlay_manager *mgr);
+ void (*set_trans_key)(struct omap_overlay_manager *mgr,
+ enum omap_dss_color_key_type type,
+ u32 trans_key);
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 8ca0bbb..12cf7b0 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -98,10 +98,8 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr, const cha
+ static ssize_t manager_default_color_show(struct omap_overlay_manager *mgr,
+ char *buf)
+ {
+- u32 default_color;
+-
+- default_color = dispc_get_default_color(mgr->id);
+- return snprintf(buf, PAGE_SIZE, "%d", default_color);
++ return snprintf(buf, PAGE_SIZE, "%d",
++ mgr->get_default_color(mgr));
+ }
+
+ static ssize_t manager_default_color_store(struct omap_overlay_manager *mgr,
+@@ -470,6 +468,10 @@ static void omap_dss_mgr_enable_trans_key(struct omap_overlay_manager *mgr,
+ {
+ dispc_enable_trans_key(mgr->id, enable);
+ }
++static u32 omap_dss_mgr_get_default_color(struct omap_overlay_manager *mgr)
++{
++ return dispc_get_default_color(mgr->id);
++}
+
+ static void omap_dss_add_overlay_manager(struct omap_overlay_manager *manager)
+ {
+@@ -512,6 +514,7 @@ int dss_init_overlay_managers(struct platform_device *pdev)
+ mgr->set_default_color = &omap_dss_mgr_set_def_color,
+ mgr->set_trans_key = &omap_dss_mgr_set_trans_key,
+ mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key,
++ mgr->get_default_color = &omap_dss_mgr_get_default_color;
+ mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC,
+
+ dss_overlay_setup_dispc_manager(mgr);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
new file mode 100644
index 0000000000..ace5079234
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
@@ -0,0 +1,118 @@
+From 6c56dc10226c84f41917ac2117b0e654fa080d40 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Thu, 16 Apr 2009 19:00:11 +0530
+Subject: [PATCH 36/69] DSS2: Added support for setting and querying alpha blending.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 3 +++
+ drivers/video/omap2/dss/dispc.c | 26 ++++++++++++++++++++++++++
+ drivers/video/omap2/dss/dss.h | 2 ++
+ drivers/video/omap2/dss/manager.c | 14 ++++++++++++++
+ 4 files changed, 45 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index 073cdda..e1f615a 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -415,11 +415,14 @@ struct omap_overlay_manager {
+
+ void (*set_default_color)(struct omap_overlay_manager *mgr, u32 color);
+ u32 (*get_default_color)(struct omap_overlay_manager *mgr);
++ bool (*get_alpha_blending_status)(struct omap_overlay_manager *mgr);
+ void (*set_trans_key)(struct omap_overlay_manager *mgr,
+ enum omap_dss_color_key_type type,
+ u32 trans_key);
+ void (*enable_trans_key)(struct omap_overlay_manager *mgr,
+ bool enable);
++ void (*enable_alpha_blending)(struct omap_overlay_manager *mgr,
++ bool enable);
+ };
+
+ enum omap_display_caps {
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b631dd8..7e551c2 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1847,6 +1847,32 @@ void dispc_enable_trans_key(enum omap_channel ch, bool enable)
+ REG_FLD_MOD(DISPC_CONFIG, enable, 12, 12);
+ enable_clocks(0);
+ }
++void dispc_enable_alpha_blending(enum omap_channel ch, bool enable)
++{
++ enable_clocks(1);
++ if (ch == OMAP_DSS_CHANNEL_LCD)
++ REG_FLD_MOD(DISPC_CONFIG, enable, 18, 18);
++ else /* OMAP_DSS_CHANNEL_DIGIT */
++ REG_FLD_MOD(DISPC_CONFIG, enable, 19, 19);
++ enable_clocks(0);
++}
++bool dispc_alpha_blending_enabled(enum omap_channel ch)
++{
++ bool enabled;
++
++ enable_clocks(1);
++ if (ch == OMAP_DSS_CHANNEL_LCD)
++ enabled = REG_GET(DISPC_CONFIG, 18, 18);
++ else if (ch == OMAP_DSS_CHANNEL_DIGIT)
++ enabled = REG_GET(DISPC_CONFIG, 18, 18);
++ else
++ BUG();
++ enable_clocks(0);
++
++ return enabled;
++
++}
++
+
+ bool dispc_trans_key_enabled(enum omap_channel ch)
+ {
+diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
+index 584dce6..1d01ff6 100644
+--- a/drivers/video/omap2/dss/dss.h
++++ b/drivers/video/omap2/dss/dss.h
+@@ -294,7 +294,9 @@ void dispc_get_trans_key(enum omap_channel ch,
+ enum omap_dss_color_key_type *type,
+ u32 *trans_key);
+ void dispc_enable_trans_key(enum omap_channel ch, bool enable);
++void dispc_enable_alpha_blending(enum omap_channel ch, bool enable);
+ bool dispc_trans_key_enabled(enum omap_channel ch);
++bool dispc_alpha_blending_enabled(enum omap_channel ch);
+
+ void dispc_set_lcd_timings(struct omap_video_timings *timings);
+ unsigned long dispc_fclk_rate(void);
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 12cf7b0..90acd28 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -468,6 +468,16 @@ static void omap_dss_mgr_enable_trans_key(struct omap_overlay_manager *mgr,
+ {
+ dispc_enable_trans_key(mgr->id, enable);
+ }
++static void omap_dss_mgr_enable_alpha_blending(struct omap_overlay_manager *mgr,
++ bool enable)
++{
++ dispc_enable_alpha_blending(mgr->id, enable);
++}
++static bool omap_dss_mgr_get_alpha_blending_status(
++ struct omap_overlay_manager *mgr)
++{
++ return dispc_alpha_blending_enabled(mgr->id);
++}
+ static u32 omap_dss_mgr_get_default_color(struct omap_overlay_manager *mgr)
+ {
+ return dispc_get_default_color(mgr->id);
+@@ -514,6 +524,10 @@ int dss_init_overlay_managers(struct platform_device *pdev)
+ mgr->set_default_color = &omap_dss_mgr_set_def_color,
+ mgr->set_trans_key = &omap_dss_mgr_set_trans_key,
+ mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key,
++ mgr->enable_alpha_blending =
++ &omap_dss_mgr_enable_alpha_blending;
++ mgr->get_alpha_blending_status =
++ omap_dss_mgr_get_alpha_blending_status;
+ mgr->get_default_color = &omap_dss_mgr_get_default_color;
+ mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC,
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
new file mode 100644
index 0000000000..e7f43ad83d
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
@@ -0,0 +1,150 @@
+From 2c9edd6af31a812a9487dd8bc12322e105a29f44 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 17 Apr 2009 09:42:36 +0530
+Subject: [PATCH 37/69] DSS2: Added support for querying color keying.
+
+V4L2 Framework has a ioctl for getting/setting color keying.
+So added the function manager pointers for doing same.
+
+Modifed the color keying sysfs entries to use manager
+function pointer. Earlier they were calling direcly
+dispc function to set/enable color keying.
+
+Some of color-keying function pointers in the overlay_manager
+structure re-named to be more specific.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 6 ++++-
+ drivers/video/omap2/dss/manager.c | 36 +++++++++++++++++++++--------
+ 2 files changed, 31 insertions(+), 11 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index e1f615a..d0b4c83 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -416,7 +416,11 @@ struct omap_overlay_manager {
+ void (*set_default_color)(struct omap_overlay_manager *mgr, u32 color);
+ u32 (*get_default_color)(struct omap_overlay_manager *mgr);
+ bool (*get_alpha_blending_status)(struct omap_overlay_manager *mgr);
+- void (*set_trans_key)(struct omap_overlay_manager *mgr,
++ bool (*get_trans_key_status)(struct omap_overlay_manager *mgr);
++ void (*get_trans_key_type_and_value)(struct omap_overlay_manager *mgr,
++ enum omap_dss_color_key_type *type,
++ u32 *trans_key);
++ void (*set_trans_key_type_and_value)(struct omap_overlay_manager *mgr,
+ enum omap_dss_color_key_type type,
+ u32 trans_key);
+ void (*enable_trans_key)(struct omap_overlay_manager *mgr,
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 90acd28..e0501c4 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -124,7 +124,7 @@ static ssize_t manager_color_key_type_show(struct omap_overlay_manager *mgr,
+ {
+ enum omap_dss_color_key_type key_type;
+
+- dispc_get_trans_key(mgr->id, &key_type, NULL);
++ mgr->get_trans_key_type_and_value(mgr, &key_type, NULL);
+ BUG_ON(key_type >= ARRAY_SIZE(color_key_type_str));
+
+ return snprintf(buf, PAGE_SIZE, "%s\n", color_key_type_str[key_type]);
+@@ -143,8 +143,8 @@ static ssize_t manager_color_key_type_store(struct omap_overlay_manager *mgr,
+ }
+ if (key_type == ARRAY_SIZE(color_key_type_str))
+ return -EINVAL;
+- dispc_get_trans_key(mgr->id, NULL, &key_value);
+- dispc_set_trans_key(mgr->id, key_type, key_value);
++ mgr->get_trans_key_type_and_value(mgr, NULL, &key_value);
++ mgr->set_trans_key_type_and_value(mgr, key_type, key_value);
+
+ return size;
+ }
+@@ -154,7 +154,7 @@ static ssize_t manager_color_key_value_show(struct omap_overlay_manager *mgr,
+ {
+ u32 key_value;
+
+- dispc_get_trans_key(mgr->id, NULL, &key_value);
++ mgr->get_trans_key_type_and_value(mgr, NULL, &key_value);
+
+ return snprintf(buf, PAGE_SIZE, "%d\n", key_value);
+ }
+@@ -167,8 +167,8 @@ static ssize_t manager_color_key_value_store(struct omap_overlay_manager *mgr,
+
+ if (sscanf(buf, "%d", &key_value) != 1)
+ return -EINVAL;
+- dispc_get_trans_key(mgr->id, &key_type, NULL);
+- dispc_set_trans_key(mgr->id, key_type, key_value);
++ mgr->get_trans_key_type_and_value(mgr, &key_type, NULL);
++ mgr->set_trans_key_type_and_value(mgr, key_type, key_value);
+
+ return size;
+ }
+@@ -177,7 +177,7 @@ static ssize_t manager_color_key_enabled_show(struct omap_overlay_manager *mgr,
+ char *buf)
+ {
+ return snprintf(buf, PAGE_SIZE, "%d\n",
+- dispc_trans_key_enabled(mgr->id));
++ mgr->get_trans_key_status(mgr));
+ }
+
+ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr,
+@@ -188,7 +188,7 @@ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr,
+ if (sscanf(buf, "%d", &enable) != 1)
+ return -EINVAL;
+
+- dispc_enable_trans_key(mgr->id, enable);
++ mgr->enable_trans_key(mgr, enable);
+
+ return size;
+ }
+@@ -456,12 +456,20 @@ static void omap_dss_mgr_set_def_color(struct omap_overlay_manager *mgr,
+ dispc_set_default_color(mgr->id, color);
+ }
+
+-static void omap_dss_mgr_set_trans_key(struct omap_overlay_manager *mgr,
++static void omap_dss_mgr_set_trans_key_type_and_value(
++ struct omap_overlay_manager *mgr,
+ enum omap_dss_color_key_type type,
+ u32 trans_key)
+ {
+ dispc_set_trans_key(mgr->id, type, trans_key);
+ }
++static void omap_dss_mgr_get_trans_key_type_and_value(
++ struct omap_overlay_manager *mgr,
++ enum omap_dss_color_key_type *type,
++ u32 *trans_key)
++{
++ dispc_get_trans_key(mgr->id, type, trans_key);
++}
+
+ static void omap_dss_mgr_enable_trans_key(struct omap_overlay_manager *mgr,
+ bool enable)
+@@ -482,6 +490,10 @@ static u32 omap_dss_mgr_get_default_color(struct omap_overlay_manager *mgr)
+ {
+ return dispc_get_default_color(mgr->id);
+ }
++static bool omap_dss_mgr_get_trans_key_status(struct omap_overlay_manager *mgr)
++{
++ return dispc_trans_key_enabled(mgr->id);
++}
+
+ static void omap_dss_add_overlay_manager(struct omap_overlay_manager *manager)
+ {
+@@ -522,8 +534,12 @@ int dss_init_overlay_managers(struct platform_device *pdev)
+ mgr->unset_display = &omap_dss_unset_display,
+ mgr->apply = &omap_dss_mgr_apply,
+ mgr->set_default_color = &omap_dss_mgr_set_def_color,
+- mgr->set_trans_key = &omap_dss_mgr_set_trans_key,
++ mgr->set_trans_key_type_and_value =
++ &omap_dss_mgr_set_trans_key_type_and_value,
++ mgr->get_trans_key_type_and_value =
++ &omap_dss_mgr_get_trans_key_type_and_value,
+ mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key,
++ mgr->get_trans_key_status = &omap_dss_mgr_get_trans_key_status,
+ mgr->enable_alpha_blending =
+ &omap_dss_mgr_enable_alpha_blending;
+ mgr->get_alpha_blending_status =
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
new file mode 100644
index 0000000000..096c976a70
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
@@ -0,0 +1,56 @@
+From 9e8877f0e5b17d3ddd101d6a63aa86fdb14d35d5 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 17 Apr 2009 09:51:25 +0530
+Subject: [PATCH 38/69] DSS2:OMAPFB: Some color keying pointerd renamed in DSS2. Replicated in FB
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/omapfb/omapfb-ioctl.c | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c
+index 7f18d2a..79d8916 100644
+--- a/drivers/video/omap2/omapfb/omapfb-ioctl.c
++++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c
+@@ -288,7 +288,8 @@ static int _omapfb_set_color_key(struct omap_overlay_manager *mgr,
+ {
+ enum omap_dss_color_key_type kt;
+
+- if(!mgr->set_default_color || !mgr->set_trans_key ||
++ if (!mgr->set_default_color ||
++ !mgr->set_trans_key_type_and_value ||
+ !mgr->enable_trans_key)
+ return 0;
+
+@@ -310,7 +311,7 @@ static int _omapfb_set_color_key(struct omap_overlay_manager *mgr,
+ }
+
+ mgr->set_default_color(mgr, ck->background);
+- mgr->set_trans_key(mgr, kt, ck->trans_key);
++ mgr->set_trans_key_type_and_value(mgr, kt, ck->trans_key);
+ mgr->enable_trans_key(mgr, 1);
+
+ omapfb_color_keys[mgr->id] = *ck;
+@@ -341,7 +342,8 @@ static int omapfb_set_color_key(struct fb_info *fbi,
+ goto err;
+ }
+
+- if(!mgr->set_default_color || !mgr->set_trans_key ||
++ if (!mgr->set_default_color ||
++ !mgr->set_trans_key_type_and_value ||
+ !mgr->enable_trans_key) {
+ r = -ENODEV;
+ goto err;
+@@ -377,7 +379,8 @@ static int omapfb_get_color_key(struct fb_info *fbi,
+ goto err;
+ }
+
+- if(!mgr->set_default_color || !mgr->set_trans_key ||
++ if (!mgr->set_default_color ||
++ !mgr->set_trans_key_type_and_value ||
+ !mgr->enable_trans_key) {
+ r = -ENODEV;
+ goto err;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
new file mode 100644
index 0000000000..d731b78008
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
@@ -0,0 +1,59 @@
+From 6f1f0c7b19ecb468824b79f9d181ef0da41b7d7d Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 17 Apr 2009 13:58:21 +0530
+Subject: [PATCH 39/69] DSS2: Add sysfs entry to for the alpha blending support.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/dss/manager.c | 21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index e0501c4..7965a84 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -192,6 +192,22 @@ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr,
+
+ return size;
+ }
++static ssize_t manager_alpha_blending_enabled_show(
++ struct omap_overlay_manager *mgr, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d\n",
++ mgr->get_alpha_blending_status(mgr));
++}
++static ssize_t manager_alpha_blending_enabled_store(
++ struct omap_overlay_manager *mgr,
++ const char *buf, size_t size)
++{
++ int enable;
++ if (sscanf(buf, "%d", &enable) != 1)
++ return -EINVAL;
++ mgr->enable_alpha_blending(mgr, enable);
++ return size;
++}
+
+
+ struct manager_attribute {
+@@ -215,6 +231,10 @@ static MANAGER_ATTR(color_key_value, S_IRUGO|S_IWUSR,
+ manager_color_key_value_show, manager_color_key_value_store);
+ static MANAGER_ATTR(color_key_enabled, S_IRUGO|S_IWUSR,
+ manager_color_key_enabled_show, manager_color_key_enabled_store);
++static MANAGER_ATTR(alpha_blending_enabled, S_IRUGO|S_IWUSR,
++ manager_alpha_blending_enabled_show,
++ manager_alpha_blending_enabled_store);
++
+
+ static struct attribute *manager_sysfs_attrs[] = {
+ &manager_attr_name.attr,
+@@ -223,6 +243,7 @@ static struct attribute *manager_sysfs_attrs[] = {
+ &manager_attr_color_key_type.attr,
+ &manager_attr_color_key_value.attr,
+ &manager_attr_color_key_enabled.attr,
++ &manager_attr_alpha_blending_enabled.attr,
+ NULL
+ };
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
new file mode 100644
index 0000000000..471a2a7f6c
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
@@ -0,0 +1,97 @@
+From a5129f272a48aa22629137c9c31e60eddb8c3f5d Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 17 Apr 2009 14:24:46 +0530
+Subject: [PATCH 40/69] DSS2: Provided proper exclusion for destination color keying and alpha blending.
+
+OMAP does not support destination color key and alpha blending
+simultaneously. So this patch does not allow the user
+so set both at a time.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/dss/manager.c | 50 ++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 49 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 7965a84..108489c 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -137,12 +137,26 @@ static ssize_t manager_color_key_type_store(struct omap_overlay_manager *mgr,
+ u32 key_value;
+
+ for (key_type = OMAP_DSS_COLOR_KEY_GFX_DST;
+- key_type < ARRAY_SIZE(color_key_type_str); key_type++) {
++ key_type < ARRAY_SIZE(color_key_type_str); key_type++) {
+ if (sysfs_streq(buf, color_key_type_str[key_type]))
+ break;
+ }
+ if (key_type == ARRAY_SIZE(color_key_type_str))
+ return -EINVAL;
++ /* OMAP does not support destination color key and alpha blending
++ * simultaneously. So if alpha blending and color keying both are
++ * enabled then refrain from setting the color key type to
++ * gfx-destination
++ */
++ if (!key_type) {
++ bool color_key_enabled;
++ bool alpha_blending_enabled;
++ color_key_enabled = mgr->get_trans_key_status(mgr);
++ alpha_blending_enabled = mgr->get_alpha_blending_status(mgr);
++ if (color_key_enabled && alpha_blending_enabled)
++ return -EINVAL;
++ }
++
+ mgr->get_trans_key_type_and_value(mgr, NULL, &key_value);
+ mgr->set_trans_key_type_and_value(mgr, key_type, key_value);
+
+@@ -188,6 +202,23 @@ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr,
+ if (sscanf(buf, "%d", &enable) != 1)
+ return -EINVAL;
+
++ /* OMAP does not support destination color keying and
++ * alpha blending simultaneously. so if alpha blending
++ * is enabled refrain from enabling destination color
++ * keying.
++ */
++ if (enable) {
++ bool enabled;
++ enabled = mgr->get_alpha_blending_status(mgr);
++ if (enabled) {
++ enum omap_dss_color_key_type key_type;
++ mgr->get_trans_key_type_and_value(mgr,
++ &key_type, NULL);
++ if (!key_type)
++ return -EINVAL;
++ }
++
++ }
+ mgr->enable_trans_key(mgr, enable);
+
+ return size;
+@@ -205,6 +236,23 @@ static ssize_t manager_alpha_blending_enabled_store(
+ int enable;
+ if (sscanf(buf, "%d", &enable) != 1)
+ return -EINVAL;
++ /* OMAP does not support destination color keying and
++ * alpha blending simultaneously. so if destination
++ * color keying is enabled refrain from enabling
++ * alpha blending
++ */
++ if (enable) {
++ bool enabled;
++ enabled = mgr->get_trans_key_status(mgr);
++ if (enabled) {
++ enum omap_dss_color_key_type key_type;
++ mgr->get_trans_key_type_and_value(mgr, &key_type, NULL);
++ if (!key_type)
++ return -EINVAL;
++
++ }
++
++ }
+ mgr->enable_alpha_blending(mgr, enable);
+ return size;
+ }
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch
new file mode 100644
index 0000000000..2c90c0cc06
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch
@@ -0,0 +1,71 @@
+From 9bcac9b9e678f476c83b5679b1215b6bc946130a Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Mon, 20 Apr 2009 16:26:18 +0200
+Subject: [PATCH 41/69] DSS2: Disable vertical offset with fieldmode
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+When using fieldmode each field is basically a separate picture so the
+vertical filter should start at phase 0 for both fields.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 23 +++++++++--------------
+ 1 files changed, 9 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 7e551c2..f15614b 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1029,12 +1029,12 @@ static void _dispc_set_vid_accu1(enum omap_plane plane, int haccu, int vaccu)
+ static void _dispc_set_scaling(enum omap_plane plane,
+ u16 orig_width, u16 orig_height,
+ u16 out_width, u16 out_height,
+- bool ilace, bool five_taps)
++ bool ilace, bool five_taps,
++ bool fieldmode)
+ {
+ int fir_hinc;
+ int fir_vinc;
+ int hscaleup, vscaleup;
+- int fieldmode = 0;
+ int accu0 = 0;
+ int accu1 = 0;
+ u32 l;
+@@ -1072,17 +1072,12 @@ static void _dispc_set_scaling(enum omap_plane plane,
+
+ dispc_write_reg(dispc_reg_att[plane], l);
+
+- if (ilace) {
+- if (fieldmode) {
+- accu0 = fir_vinc / 2;
+- accu1 = 0;
+- } else {
+- accu0 = 0;
+- accu1 = fir_vinc / 2;
+- if (accu1 >= 1024/2) {
+- accu0 = 1024/2;
+- accu1 -= accu0;
+- }
++ if (ilace && !fieldmode) {
++ accu0 = 0;
++ accu1 = fir_vinc / 2;
++ if (accu1 >= 1024/2) {
++ accu0 = 1024/2;
++ accu1 -= accu0;
+ }
+ }
+
+@@ -1582,7 +1577,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ if (plane != OMAP_DSS_GFX) {
+ _dispc_set_scaling(plane, width, height,
+ out_width, out_height,
+- ilace, five_taps);
++ ilace, five_taps, fieldmode);
+ _dispc_set_vid_size(plane, out_width, out_height);
+ _dispc_set_vid_color_conv(plane, cconv);
+ }
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch
new file mode 100644
index 0000000000..7e2e44d809
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch
@@ -0,0 +1,34 @@
+From 9c6de0fed6e8a598d026d348533fdf731b737d55 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Mon, 20 Apr 2009 16:26:19 +0200
+Subject: [PATCH 42/69] DSS2: Don't enable fieldmode automatically
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+The only case where enabling fieldmode automatically seems reasonable
+is when source and destination heights are equal. Some kind of user
+controllable knob should be added so the user could enable field mode
+when the source is interlaced.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index f15614b..1c036c1 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1450,7 +1450,7 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ if (paddr == 0)
+ return -EINVAL;
+
+- if (ilace && height >= out_height)
++ if (ilace && height == out_height)
+ fieldmode = 1;
+
+ if (ilace) {
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch
new file mode 100644
index 0000000000..2e09335611
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch
@@ -0,0 +1,170 @@
+From 35e88797e93b107ba602dee1e2ac8ea761dccd4b Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Mon, 20 Apr 2009 16:26:20 +0200
+Subject: [PATCH 43/69] DSS2: Swap field 0 and field 1 registers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+The values for the registers which have alternate values for each field
+were reveresed to what the hardware expects. For the hardware field 0
+is the even field or the bottom field, field 1 is the odd field or the
+top field. So simply swap the register values.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 66 ++++++++++++++++++++++-----------------
+ 1 files changed, 37 insertions(+), 29 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 1c036c1..9bab6cf 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1072,12 +1072,16 @@ static void _dispc_set_scaling(enum omap_plane plane,
+
+ dispc_write_reg(dispc_reg_att[plane], l);
+
++ /*
++ * field 0 = even field = bottom field
++ * field 1 = odd field = top field
++ */
+ if (ilace && !fieldmode) {
+- accu0 = 0;
+- accu1 = fir_vinc / 2;
+- if (accu1 >= 1024/2) {
+- accu0 = 1024/2;
+- accu1 -= accu0;
++ accu1 = 0;
++ accu0 = fir_vinc / 2;
++ if (accu0 >= 1024/2) {
++ accu1 = 1024/2;
++ accu0 -= accu1;
+ }
+ }
+
+@@ -1266,34 +1270,38 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
+ fbh = width;
+ }
+
++ /*
++ * field 0 = even field = bottom field
++ * field 1 = odd field = top field
++ */
+ switch (rotation + mirror * 4) {
+ case 0:
+- *offset0 = 0;
++ *offset1 = 0;
+ if (fieldmode)
+- *offset1 = screen_width * ps;
++ *offset0 = screen_width * ps;
+ else
+- *offset1 = 0;
++ *offset0 = 0;
+ *row_inc = pixinc(1 + (screen_width - fbw) +
+ (fieldmode ? screen_width : 0),
+ ps);
+ *pix_inc = pixinc(1, ps);
+ break;
+ case 1:
+- *offset0 = screen_width * (fbh - 1) * ps;
++ *offset1 = screen_width * (fbh - 1) * ps;
+ if (fieldmode)
+- *offset1 = *offset0 + ps;
++ *offset0 = *offset1 + ps;
+ else
+- *offset1 = *offset0;
++ *offset0 = *offset1;
+ *row_inc = pixinc(screen_width * (fbh - 1) + 1 +
+ (fieldmode ? 1 : 0), ps);
+ *pix_inc = pixinc(-screen_width, ps);
+ break;
+ case 2:
+- *offset0 = (screen_width * (fbh - 1) + fbw - 1) * ps;
++ *offset1 = (screen_width * (fbh - 1) + fbw - 1) * ps;
+ if (fieldmode)
+- *offset1 = *offset0 - screen_width * ps;
++ *offset0 = *offset1 - screen_width * ps;
+ else
+- *offset1 = *offset0;
++ *offset0 = *offset1;
+ *row_inc = pixinc(-1 -
+ (screen_width - fbw) -
+ (fieldmode ? screen_width : 0),
+@@ -1301,11 +1309,11 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
+ *pix_inc = pixinc(-1, ps);
+ break;
+ case 3:
+- *offset0 = (fbw - 1) * ps;
++ *offset1 = (fbw - 1) * ps;
+ if (fieldmode)
+- *offset1 = *offset0 - ps;
++ *offset0 = *offset1 - ps;
+ else
+- *offset1 = *offset0;
++ *offset0 = *offset1;
+ *row_inc = pixinc(-screen_width * (fbh - 1) - 1 -
+ (fieldmode ? 1 : 0), ps);
+ *pix_inc = pixinc(screen_width, ps);
+@@ -1313,11 +1321,11 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
+
+ /* mirroring */
+ case 0 + 4:
+- *offset0 = (fbw - 1) * ps;
++ *offset1 = (fbw - 1) * ps;
+ if (fieldmode)
+- *offset1 = *offset0 + screen_width * ps;
++ *offset0 = *offset1 + screen_width * ps;
+ else
+- *offset1 = *offset0;
++ *offset0 = *offset1;
+ *row_inc = pixinc(screen_width * 2 - 1 +
+ (fieldmode ? screen_width : 0),
+ ps);
+@@ -1325,11 +1333,11 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
+ break;
+
+ case 1 + 4:
+- *offset0 = 0;
++ *offset1 = 0;
+ if (fieldmode)
+- *offset1 = *offset0 + screen_width * ps;
++ *offset0 = *offset1 + screen_width * ps;
+ else
+- *offset1 = *offset0;
++ *offset0 = *offset1;
+ *row_inc = pixinc(-screen_width * (fbh - 1) + 1 +
+ (fieldmode ? 1 : 0),
+ ps);
+@@ -1337,11 +1345,11 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
+ break;
+
+ case 2 + 4:
+- *offset0 = screen_width * (fbh - 1) * ps;
++ *offset1 = screen_width * (fbh - 1) * ps;
+ if (fieldmode)
+- *offset1 = *offset0 + screen_width * ps;
++ *offset0 = *offset1 + screen_width * ps;
+ else
+- *offset1 = *offset0;
++ *offset0 = *offset1;
+ *row_inc = pixinc(1 - screen_width * 2 -
+ (fieldmode ? screen_width : 0),
+ ps);
+@@ -1349,11 +1357,11 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
+ break;
+
+ case 3 + 4:
+- *offset0 = (screen_width * (fbh - 1) + fbw - 1) * ps;
++ *offset1 = (screen_width * (fbh - 1) + fbw - 1) * ps;
+ if (fieldmode)
+- *offset1 = *offset0 + screen_width * ps;
++ *offset0 = *offset1 + screen_width * ps;
+ else
+- *offset1 = *offset0;
++ *offset0 = *offset1;
+ *row_inc = pixinc(screen_width * (fbh - 1) - 1 -
+ (fieldmode ? 1 : 0),
+ ps);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch
new file mode 100644
index 0000000000..19d24c3a07
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch
@@ -0,0 +1,76 @@
+From a9b3500bd14609750a2337e866e1df62627c1bac Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Mon, 20 Apr 2009 14:55:33 +0200
+Subject: [PATCH 44/69] DSS2: add sysfs entry for seting the rotate type
+
+This can help in utilizing VRAM memory better. Since with VRFB rotation
+we waste a lot of physical memory due to the VRFB HW design, provide the
+possibility to turn it off and free the extra memory for the use by other
+planes for example.
+---
+ drivers/video/omap2/omapfb/omapfb-sysfs.c | 42 ++++++++++++++++++++++++++++-
+ 1 files changed, 41 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+index 2c88718..4e3da42 100644
+--- a/drivers/video/omap2/omapfb/omapfb-sysfs.c
++++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+@@ -43,6 +43,46 @@ static ssize_t show_rotate_type(struct device *dev,
+ return snprintf(buf, PAGE_SIZE, "%d\n", ofbi->rotation_type);
+ }
+
++static ssize_t store_rotate_type(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ struct fb_info *fbi = dev_get_drvdata(dev);
++ struct omapfb_info *ofbi = FB2OFB(fbi);
++ struct omapfb2_device *fbdev = ofbi->fbdev;
++ enum omap_dss_rotation_type rot_type;
++ int r;
++
++ rot_type = simple_strtoul(buf, NULL, 0);
++
++ if (rot_type != OMAP_DSS_ROT_DMA && rot_type != OMAP_DSS_ROT_VRFB)
++ return -EINVAL;
++
++ omapfb_lock(fbdev);
++
++ r = 0;
++ if (rot_type == ofbi->rotation_type)
++ goto out;
++
++ r = -EBUSY;
++ if (ofbi->region.size)
++ goto out;
++
++ ofbi->rotation_type = rot_type;
++
++ /*
++ * Since the VRAM for this FB is not allocated at the moment we don't need to
++ * do any further parameter checking at this point.
++ */
++
++ r = count;
++out:
++ omapfb_unlock(fbdev);
++
++ return r;
++}
++
++
+ static ssize_t show_mirror(struct device *dev,
+ struct device_attribute *attr, char *buf)
+ {
+@@ -327,7 +367,7 @@ static ssize_t show_virt(struct device *dev,
+ }
+
+ static struct device_attribute omapfb_attrs[] = {
+- __ATTR(rotate_type, S_IRUGO, show_rotate_type, NULL),
++ __ATTR(rotate_type, S_IRUGO | S_IWUSR, show_rotate_type, store_rotate_type),
+ __ATTR(mirror, S_IRUGO | S_IWUSR, show_mirror, store_mirror),
+ __ATTR(size, S_IRUGO | S_IWUSR, show_size, store_size),
+ __ATTR(overlays, S_IRUGO | S_IWUSR, show_overlays, store_overlays),
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch
new file mode 100644
index 0000000000..3206306cc7
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0045-DSS2-Fixed-line-endings-from-to.patch
@@ -0,0 +1,48 @@
+From b0e081456a9b094109c04467d041ff693843ca47 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Tue, 21 Apr 2009 09:25:16 +0300
+Subject: [PATCH 45/69] DSS2: Fixed line endings from , to ;
+
+---
+ drivers/video/omap2/dss/manager.c | 18 +++++++++---------
+ 1 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 108489c..bf059e0 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -599,22 +599,22 @@ int dss_init_overlay_managers(struct platform_device *pdev)
+ break;
+ }
+
+- mgr->set_display = &omap_dss_set_display,
+- mgr->unset_display = &omap_dss_unset_display,
+- mgr->apply = &omap_dss_mgr_apply,
+- mgr->set_default_color = &omap_dss_mgr_set_def_color,
++ mgr->set_display = &omap_dss_set_display;
++ mgr->unset_display = &omap_dss_unset_display;
++ mgr->apply = &omap_dss_mgr_apply;
++ mgr->set_default_color = &omap_dss_mgr_set_def_color;
+ mgr->set_trans_key_type_and_value =
+- &omap_dss_mgr_set_trans_key_type_and_value,
++ &omap_dss_mgr_set_trans_key_type_and_value;
+ mgr->get_trans_key_type_and_value =
+- &omap_dss_mgr_get_trans_key_type_and_value,
+- mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key,
+- mgr->get_trans_key_status = &omap_dss_mgr_get_trans_key_status,
++ &omap_dss_mgr_get_trans_key_type_and_value;
++ mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key;
++ mgr->get_trans_key_status = &omap_dss_mgr_get_trans_key_status;
+ mgr->enable_alpha_blending =
+ &omap_dss_mgr_enable_alpha_blending;
+ mgr->get_alpha_blending_status =
+ omap_dss_mgr_get_alpha_blending_status;
+ mgr->get_default_color = &omap_dss_mgr_get_default_color;
+- mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC,
++ mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC;
+
+ dss_overlay_setup_dispc_manager(mgr);
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch
new file mode 100644
index 0000000000..301db79267
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch
@@ -0,0 +1,26 @@
+From 0f88992b2681aed4f31dc7dd3926b357bbc95154 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Tue, 21 Apr 2009 10:11:55 +0300
+Subject: [PATCH 46/69] DSS2: DSI: decrease sync timeout from 60s to 2s
+
+The framedone-problem should be ok now, so we shouldn't get long waits.
+---
+ drivers/video/omap2/dss/dsi.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index 50af925..d59ad38 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -3216,7 +3216,7 @@ static void dsi_push_set_mirror(struct omap_display *display, int mirror)
+
+ static int dsi_wait_sync(struct omap_display *display)
+ {
+- long wait = msecs_to_jiffies(60000);
++ long wait = msecs_to_jiffies(2000);
+ struct completion compl;
+
+ DSSDBGF("");
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch
new file mode 100644
index 0000000000..fbc30b8858
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch
@@ -0,0 +1,44 @@
+From 7ddd5eaa7bc345c3719d613a46a95b7e8052ad2c Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 21 Apr 2009 15:18:36 +0200
+Subject: [PATCH 47/69] DSS2: fix return value for rotate_type sysfs function
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ drivers/video/omap2/omapfb/omapfb-sysfs.c | 9 ++++-----
+ 1 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+index 4e3da42..13028ae 100644
+--- a/drivers/video/omap2/omapfb/omapfb-sysfs.c
++++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+@@ -64,9 +64,10 @@ static ssize_t store_rotate_type(struct device *dev,
+ if (rot_type == ofbi->rotation_type)
+ goto out;
+
+- r = -EBUSY;
+- if (ofbi->region.size)
++ if (ofbi->region.size) {
++ r = -EBUSY;
+ goto out;
++ }
+
+ ofbi->rotation_type = rot_type;
+
+@@ -74,12 +75,10 @@ static ssize_t store_rotate_type(struct device *dev,
+ * Since the VRAM for this FB is not allocated at the moment we don't need to
+ * do any further parameter checking at this point.
+ */
+-
+- r = count;
+ out:
+ omapfb_unlock(fbdev);
+
+- return r;
++ return r ? r : count;
+ }
+
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch
new file mode 100644
index 0000000000..1097fedabf
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch
@@ -0,0 +1,123 @@
+From e34564db95627ad20e918b240c45e2bd5555f7e8 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 22 Apr 2009 10:06:08 +0300
+Subject: [PATCH 48/69] OMAP2/3: DMA: implement trans copy and const fill
+
+Implement transparent copy and constant fill features for OMAP2/3.
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ arch/arm/plat-omap/dma.c | 81 +++++++++++++++++++++------------
+ arch/arm/plat-omap/include/mach/dma.h | 1 +
+ 2 files changed, 52 insertions(+), 30 deletions(-)
+
+diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
+index 3fd0e77..060ac71 100755
+--- a/arch/arm/plat-omap/dma.c
++++ b/arch/arm/plat-omap/dma.c
+@@ -310,41 +310,62 @@ EXPORT_SYMBOL(omap_set_dma_transfer_params);
+
+ void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode, u32 color)
+ {
+- u16 w;
+-
+ BUG_ON(omap_dma_in_1510_mode());
+
+- if (cpu_class_is_omap2()) {
+- REVISIT_24XX();
+- return;
+- }
++ if (cpu_class_is_omap1()) {
++ u16 w;
+
+- w = dma_read(CCR2(lch));
+- w &= ~0x03;
++ w = dma_read(CCR2(lch));
++ w &= ~0x03;
+
+- switch (mode) {
+- case OMAP_DMA_CONSTANT_FILL:
+- w |= 0x01;
+- break;
+- case OMAP_DMA_TRANSPARENT_COPY:
+- w |= 0x02;
+- break;
+- case OMAP_DMA_COLOR_DIS:
+- break;
+- default:
+- BUG();
++ switch (mode) {
++ case OMAP_DMA_CONSTANT_FILL:
++ w |= 0x01;
++ break;
++ case OMAP_DMA_TRANSPARENT_COPY:
++ w |= 0x02;
++ break;
++ case OMAP_DMA_COLOR_DIS:
++ break;
++ default:
++ BUG();
++ }
++ dma_write(w, CCR2(lch));
++
++ w = dma_read(LCH_CTRL(lch));
++ w &= ~0x0f;
++ /* Default is channel type 2D */
++ if (mode) {
++ dma_write((u16)color, COLOR_L(lch));
++ dma_write((u16)(color >> 16), COLOR_U(lch));
++ w |= 1; /* Channel type G */
++ }
++ dma_write(w, LCH_CTRL(lch));
+ }
+- dma_write(w, CCR2(lch));
+
+- w = dma_read(LCH_CTRL(lch));
+- w &= ~0x0f;
+- /* Default is channel type 2D */
+- if (mode) {
+- dma_write((u16)color, COLOR_L(lch));
+- dma_write((u16)(color >> 16), COLOR_U(lch));
+- w |= 1; /* Channel type G */
++ if (cpu_class_is_omap2()) {
++ u32 val;
++
++ val = dma_read(CCR(lch));
++ val &= ~((1 << 17) | (1 << 16));
++
++ switch (mode) {
++ case OMAP_DMA_CONSTANT_FILL:
++ val |= 1 << 16;
++ break;
++ case OMAP_DMA_TRANSPARENT_COPY:
++ val |= 1 << 17;
++ break;
++ case OMAP_DMA_COLOR_DIS:
++ break;
++ default:
++ BUG();
++ }
++ dma_write(val, CCR(lch));
++
++ color &= 0xffffff;
++ dma_write(color, COLOR(lch));
+ }
+- dma_write(w, LCH_CTRL(lch));
+ }
+ EXPORT_SYMBOL(omap_set_dma_color_mode);
+
+diff --git a/arch/arm/plat-omap/include/mach/dma.h b/arch/arm/plat-omap/include/mach/dma.h
+index 224b077..4e34f47 100644
+--- a/arch/arm/plat-omap/include/mach/dma.h
++++ b/arch/arm/plat-omap/include/mach/dma.h
+@@ -144,6 +144,7 @@
+ #define OMAP_DMA4_CSSA_U(n) 0
+ #define OMAP_DMA4_CDSA_L(n) 0
+ #define OMAP_DMA4_CDSA_U(n) 0
++#define OMAP1_DMA_COLOR(n) 0
+
+ /*----------------------------------------------------------------------------*/
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch
new file mode 100644
index 0000000000..d9901f95d9
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch
@@ -0,0 +1,101 @@
+From 02034cc79f69512a6037f03ad1243c28f59fdd8a Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 22 Apr 2009 10:25:20 +0300
+Subject: [PATCH 49/69] DSS2: VRAM: clear allocated area with DMA
+
+Use DMA constant fill feature to clear VRAM area when
+someone allocates it.
+---
+ arch/arm/plat-omap/vram.c | 57 +++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 57 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index 8e9fe77..90276ac 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -31,11 +31,13 @@
+ #include <linux/seq_file.h>
+ #include <linux/bootmem.h>
+ #include <linux/omapfb.h>
++#include <linux/completion.h>
+
+ #include <asm/setup.h>
+
+ #include <mach/sram.h>
+ #include <mach/vram.h>
++#include <mach/dma.h>
+
+ #ifdef DEBUG
+ #define DBG(format, ...) printk(KERN_DEBUG "VRAM: " format, ## __VA_ARGS__)
+@@ -276,6 +278,59 @@ int omap_vram_reserve(unsigned long paddr, size_t size)
+ }
+ EXPORT_SYMBOL(omap_vram_reserve);
+
++static void _omap_vram_dma_cb(int lch, u16 ch_status, void *data)
++{
++ struct completion *compl = data;
++ complete(compl);
++}
++
++static int _omap_vram_clear(u32 paddr, unsigned pages)
++{
++ struct completion compl;
++ unsigned elem_count;
++ unsigned frame_count;
++ int r;
++ int lch;
++
++ init_completion(&compl);
++
++ r = omap_request_dma(OMAP_DMA_NO_DEVICE, "VRAM DMA",
++ _omap_vram_dma_cb,
++ &compl, &lch);
++ if (r) {
++ pr_err("VRAM: request_dma failed for memory clear\n");
++ return -EBUSY;
++ }
++
++ elem_count = pages * PAGE_SIZE / 4;
++ frame_count = 1;
++
++ omap_set_dma_transfer_params(lch, OMAP_DMA_DATA_TYPE_S32,
++ elem_count, frame_count,
++ OMAP_DMA_SYNC_ELEMENT,
++ 0, 0);
++
++ omap_set_dma_dest_params(lch, 0, OMAP_DMA_AMODE_POST_INC,
++ paddr, 0, 0);
++
++ omap_set_dma_color_mode(lch, OMAP_DMA_CONSTANT_FILL, 0x000000);
++
++ omap_start_dma(lch);
++
++ if (wait_for_completion_timeout(&compl, msecs_to_jiffies(1000)) == 0) {
++ omap_stop_dma(lch);
++ pr_err("VRAM: dma timeout while clearing memory\n");
++ r = -EIO;
++ goto err;
++ }
++
++ r = 0;
++err:
++ omap_free_dma(lch);
++
++ return r;
++}
++
+ static int _omap_vram_alloc(int mtype, unsigned pages, unsigned long *paddr)
+ {
+ struct vram_region *rm;
+@@ -313,6 +368,8 @@ found:
+
+ *paddr = start;
+
++ _omap_vram_clear(start, pages);
++
+ return 0;
+ }
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch
new file mode 100644
index 0000000000..4a0a078bc7
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch
@@ -0,0 +1,53 @@
+From 07482193cccdfe9ede1f47d72790dfbe54343505 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 22 Apr 2009 10:26:06 +0300
+Subject: [PATCH 50/69] DSS2: OMAPFB: remove fb clearing code
+
+VRAM manager does the clearing now when the area is allocated.
+---
+ drivers/video/omap2/omapfb/omapfb-main.c | 8 --------
+ 1 files changed, 0 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index cd63740..76e7c6c 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -1174,7 +1174,6 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
+ struct omapfb2_mem_region *rg;
+ void __iomem *vaddr;
+ int r;
+- int clear = 0;
+
+ rg = &ofbi->region;
+ memset(rg, 0, sizeof(*rg));
+@@ -1184,7 +1183,6 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
+ if (!paddr) {
+ DBG("allocating %lu bytes for fb %d\n", size, ofbi->id);
+ r = omap_vram_alloc(OMAPFB_MEMTYPE_SDRAM, size, &paddr);
+- clear = 1;
+ } else {
+ DBG("reserving %lu bytes at %lx for fb %d\n", size, paddr,
+ ofbi->id);
+@@ -1206,9 +1204,6 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
+ }
+
+ DBG("allocated VRAM paddr %lx, vaddr %p\n", paddr, vaddr);
+-
+- if (clear)
+- memset_io(vaddr, 0, size);
+ } else {
+ void __iomem *va;
+
+@@ -1232,9 +1227,6 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
+ rg->vrfb.vaddr[0] = va;
+
+ vaddr = NULL;
+-
+- if (clear)
+- memset_io(va, 0, size);
+ }
+
+ rg->paddr = paddr;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
new file mode 100644
index 0000000000..739d3cd1a6
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
@@ -0,0 +1,170 @@
+From b47aef28536f3c276d232c41cd3084c69389dca4 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 22 Apr 2009 14:11:52 +0300
+Subject: [PATCH 51/69] DSS2: VRAM: use debugfs, not procfs
+
+---
+ arch/arm/plat-omap/vram.c | 103 +++++++++++++++------------------------------
+ 1 files changed, 34 insertions(+), 69 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index 90276ac..e847579 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -27,11 +27,11 @@
+ #include <linux/mm.h>
+ #include <linux/list.h>
+ #include <linux/dma-mapping.h>
+-#include <linux/proc_fs.h>
+ #include <linux/seq_file.h>
+ #include <linux/bootmem.h>
+ #include <linux/omapfb.h>
+ #include <linux/completion.h>
++#include <linux/debugfs.h>
+
+ #include <asm/setup.h>
+
+@@ -398,88 +398,54 @@ int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr)
+ }
+ EXPORT_SYMBOL(omap_vram_alloc);
+
+-#ifdef CONFIG_PROC_FS
+-static void *r_next(struct seq_file *m, void *v, loff_t *pos)
+-{
+- struct list_head *l = v;
+-
+- (*pos)++;
+-
+- if (list_is_last(l, &region_list))
+- return NULL;
+-
+- return l->next;
+-}
+-
+-static void *r_start(struct seq_file *m, loff_t *pos)
+-{
+- loff_t p = *pos;
+- struct list_head *l = &region_list;
+-
+- mutex_lock(&region_mutex);
+-
+- do {
+- l = l->next;
+- if (l == &region_list)
+- return NULL;
+- } while (p--);
+-
+- return l;
+-}
+-
+-static void r_stop(struct seq_file *m, void *v)
+-{
+- mutex_unlock(&region_mutex);
+-}
+-
+-static int r_show(struct seq_file *m, void *v)
++#if defined(CONFIG_DEBUG_FS)
++static int vram_debug_show(struct seq_file *s, void *unused)
+ {
+ struct vram_region *vr;
+ struct vram_alloc *va;
+ unsigned size;
+
+- vr = list_entry(v, struct vram_region, list);
+-
+- size = vr->pages << PAGE_SHIFT;
+-
+- seq_printf(m, "%08lx-%08lx (%d bytes)\n",
+- vr->paddr, vr->paddr + size - 1,
+- size);
++ mutex_lock(&region_mutex);
+
+- list_for_each_entry(va, &vr->alloc_list, list) {
+- size = va->pages << PAGE_SHIFT;
+- seq_printf(m, " %08lx-%08lx (%d bytes)\n",
+- va->paddr, va->paddr + size - 1,
++ list_for_each_entry(vr, &region_list, list) {
++ size = vr->pages << PAGE_SHIFT;
++ seq_printf(s, "%08lx-%08lx (%d bytes)\n",
++ vr->paddr, vr->paddr + size - 1,
+ size);
+- }
+
++ list_for_each_entry(va, &vr->alloc_list, list) {
++ size = va->pages << PAGE_SHIFT;
++ seq_printf(s, " %08lx-%08lx (%d bytes)\n",
++ va->paddr, va->paddr + size - 1,
++ size);
++ }
++ }
+
++ mutex_unlock(&region_mutex);
+
+ return 0;
+ }
+
+-static const struct seq_operations resource_op = {
+- .start = r_start,
+- .next = r_next,
+- .stop = r_stop,
+- .show = r_show,
+-};
+-
+-static int vram_open(struct inode *inode, struct file *file)
++static int vram_debug_open(struct inode *inode, struct file *file)
+ {
+- return seq_open(file, &resource_op);
++ return single_open(file, vram_debug_show, inode->i_private);
+ }
+
+-static const struct file_operations proc_vram_operations = {
+- .open = vram_open,
+- .read = seq_read,
+- .llseek = seq_lseek,
+- .release = seq_release,
++static const struct file_operations vram_debug_fops = {
++ .open = vram_debug_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
+ };
+
+-static int __init omap_vram_create_proc(void)
++static int __init omap_vram_create_debugfs(void)
+ {
+- proc_create("omap-vram", 0, NULL, &proc_vram_operations);
++ struct dentry *d;
++
++ d = debugfs_create_file("vram", S_IRUGO, NULL,
++ NULL, &vram_debug_fops);
++ if (IS_ERR(d))
++ return PTR_ERR(d);
+
+ return 0;
+ }
+@@ -487,7 +453,7 @@ static int __init omap_vram_create_proc(void)
+
+ static __init int omap_vram_init(void)
+ {
+- int i, r;
++ int i;
+
+ vram_initialized = 1;
+
+@@ -495,10 +461,9 @@ static __init int omap_vram_init(void)
+ omap_vram_add_region(postponed_regions[i].paddr,
+ postponed_regions[i].size);
+
+-#ifdef CONFIG_PROC_FS
+- r = omap_vram_create_proc();
+- if (r)
+- return -ENOMEM;
++#ifdef CONFIG_DEBUG_FS
++ if (omap_vram_create_debugfs())
++ pr_err("VRAM: Failed to create debugfs file\n");
+ #endif
+
+ return 0;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch
new file mode 100644
index 0000000000..a28a96b23b
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch
@@ -0,0 +1,34 @@
+From 635fa66abe6e502c9b78b1dc66757bf67fd163e1 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Wed, 22 Apr 2009 14:40:48 +0200
+Subject: [PATCH 52/69] DSS2: VRAM: fix section mismatch warning
+
+postponed_regions are accessed from the non __init
+omap_vram_add_region().
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/vram.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index e847579..b126a64 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -63,11 +63,11 @@
+ #define MAX_POSTPONED_REGIONS 10
+
+ static bool vram_initialized;
+-static int postponed_cnt __initdata;
++static int postponed_cnt;
+ static struct {
+ unsigned long paddr;
+ size_t size;
+-} postponed_regions[MAX_POSTPONED_REGIONS] __initdata;
++} postponed_regions[MAX_POSTPONED_REGIONS];
+
+ struct vram_alloc {
+ struct list_head list;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch
new file mode 100644
index 0000000000..38d162d024
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch
@@ -0,0 +1,41 @@
+From c7ce3c5e9f7e28900b8ea9c3e1afe41dcdc0863d Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 23 Apr 2009 10:46:53 +0300
+Subject: [PATCH 53/69] DSS2: disable LCD & DIGIT before resetting DSS
+
+This seems to fix the synclost problem that we get, if the bootloader
+starts the DSS and the kernel resets it.
+---
+ drivers/video/omap2/dss/dss.c | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
+index adc1f34..aab9758 100644
+--- a/drivers/video/omap2/dss/dss.c
++++ b/drivers/video/omap2/dss/dss.c
+@@ -285,6 +285,11 @@ int dss_init(bool skip_init)
+ }
+
+ if (!skip_init) {
++ /* disable LCD and DIGIT output. This seems to fix the synclost
++ * problem that we get, if the bootloader starts the DSS and
++ * the kernel resets it */
++ omap_writel(omap_readl(0x48050440) & ~0x3, 0x48050440);
++
+ /* We need to wait here a bit, otherwise we sometimes start to
+ * get synclost errors, and after that only power cycle will
+ * restore DSS functionality. I have no idea why this happens.
+@@ -294,10 +299,7 @@ int dss_init(bool skip_init)
+ msleep(50);
+
+ _omap_dss_reset();
+-
+ }
+- else
+- printk("DSS SKIP RESET\n");
+
+ /* autoidle */
+ REG_FLD_MOD(DSS_SYSCONFIG, 1, 0, 0);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch
new file mode 100644
index 0000000000..5f4f155452
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0054-DSS2-DSI-more-error-handling.patch
@@ -0,0 +1,85 @@
+From 3b27a3c4f6b84e46c84509f610dfe1456c0d72d3 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Mon, 27 Apr 2009 11:06:16 +0300
+Subject: [PATCH 54/69] DSS2: DSI: more error handling
+
+---
+ drivers/video/omap2/dss/dsi.c | 27 +++++++++++++++++++++++++++
+ 1 files changed, 27 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index d59ad38..d8df353 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -289,6 +289,8 @@ static struct
+
+ bool autoupdate_setup;
+
++ u32 errors;
++ spinlock_t errors_lock;
+ #ifdef DEBUG
+ ktime_t perf_setup_time;
+ ktime_t perf_start_time;
+@@ -541,6 +543,9 @@ void dsi_irq_handler(void)
+ if (irqstatus & DSI_IRQ_ERROR_MASK) {
+ DSSERR("DSI error, irqstatus %x\n", irqstatus);
+ print_irq_status(irqstatus);
++ spin_lock(&dsi.errors_lock);
++ dsi.errors |= irqstatus & DSI_IRQ_ERROR_MASK;
++ spin_unlock(&dsi.errors_lock);
+ } else if (debug_irq) {
+ print_irq_status(irqstatus);
+ }
+@@ -616,6 +621,17 @@ static void _dsi_initialize_irq(void)
+ -1 & (~DSI_CIO_IRQ_ERRCONTROL2));
+ }
+
++static u32 dsi_get_errors(void)
++{
++ unsigned long flags;
++ u32 e;
++ spin_lock_irqsave(&dsi.errors_lock, flags);
++ e = dsi.errors;
++ dsi.errors = 0;
++ spin_unlock_irqrestore(&dsi.errors_lock, flags);
++ return e;
++}
++
+ static void dsi_vc_enable_bta_irq(int channel)
+ {
+ u32 l;
+@@ -1807,6 +1823,7 @@ static int dsi_vc_send_bta(int channel)
+ static int dsi_vc_send_bta_sync(int channel)
+ {
+ int r = 0;
++ u32 err;
+
+ init_completion(&dsi.bta_completion);
+
+@@ -1822,6 +1839,13 @@ static int dsi_vc_send_bta_sync(int channel)
+ r = -EIO;
+ goto err;
+ }
++
++ err = dsi_get_errors();
++ if (err) {
++ DSSERR("Error while sending BTA: %x\n", err);
++ r = -EIO;
++ goto err;
++ }
+ err:
+ dsi_vc_disable_bta_irq(channel);
+
+@@ -3720,6 +3744,9 @@ int dsi_init(void)
+ {
+ u32 rev;
+
++ spin_lock_init(&dsi.errors_lock);
++ dsi.errors = 0;
++
+ spin_lock_init(&dsi.cmd_lock);
+ dsi.cmd_fifo = kfifo_alloc(
+ DSI_CMD_FIFO_LEN * sizeof(struct dsi_cmd_item),
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch
new file mode 100644
index 0000000000..c545b648cc
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0055-DSS2-Added-global-alpha-support.patch
@@ -0,0 +1,230 @@
+From c8588370442424ac31e2392b07891615629eb999 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 24 Apr 2009 15:29:06 +0530
+Subject: [PATCH 55/69] DSS2: Added global alpha support.
+
+global_alpha sysfs entry for video1 plane will always show 255 as
+it does not support global_alpha.
+Initliazied the global alpha field for all the overlays
+to 255 (fully opaque).
+Documentation also updated.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ Documentation/arm/OMAP/DSS | 1 +
+ arch/arm/plat-omap/include/mach/display.h | 1 +
+ drivers/video/omap2/dss/dispc.c | 25 ++++++++++++++++---
+ drivers/video/omap2/dss/dss.h | 3 +-
+ drivers/video/omap2/dss/manager.c | 3 +-
+ drivers/video/omap2/dss/overlay.c | 37 +++++++++++++++++++++++++++++
+ 6 files changed, 64 insertions(+), 6 deletions(-)
+
+diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
+index 9e902a2..249e1a3 100644
+--- a/Documentation/arm/OMAP/DSS
++++ b/Documentation/arm/OMAP/DSS
+@@ -133,6 +133,7 @@ name
+ output_size width,height
+ position x,y
+ screen_width width
++global_alpha global alpha 0-255 0=transparent 255=opaque
+
+ /sys/devices/platform/omapdss/manager? directory:
+ display Destination display
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index d0b4c83..45b16ca 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -363,6 +363,7 @@ struct omap_overlay_info {
+ u16 pos_y;
+ u16 out_width; /* if 0, out_width == width */
+ u16 out_height; /* if 0, out_height == height */
++ u8 global_alpha;
+ };
+
+ enum omap_overlay_caps {
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 9bab6cf..b6a39f5 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -778,6 +778,17 @@ static void _dispc_set_vid_size(enum omap_plane plane, int width, int height)
+ dispc_write_reg(vsi_reg[plane-1], val);
+ }
+
++static void _dispc_setup_global_alpha(enum omap_plane plane, u8 global_alpha)
++{
++
++ BUG_ON(plane == OMAP_DSS_VIDEO1);
++
++ if (plane == OMAP_DSS_GFX)
++ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, global_alpha, 7, 0);
++ else if (plane == OMAP_DSS_VIDEO2)
++ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, global_alpha, 23, 16);
++}
++
+ static void _dispc_set_pix_inc(enum omap_plane plane, s32 inc)
+ {
+ const struct dispc_reg ri_reg[] = { DISPC_GFX_PIXEL_INC,
+@@ -1444,7 +1455,8 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ enum omap_color_mode color_mode,
+ bool ilace,
+ enum omap_dss_rotation_type rotation_type,
+- u8 rotation, int mirror)
++ u8 rotation, int mirror,
++ u8 global_alpha)
+ {
+ const int maxdownscale = cpu_is_omap34xx() ? 4 : 2;
+ bool five_taps = 0;
+@@ -1592,6 +1604,9 @@ static int _dispc_setup_plane(enum omap_plane plane,
+
+ _dispc_set_rotation_attrs(plane, rotation, mirror, color_mode);
+
++ if (plane != OMAP_DSS_VIDEO1)
++ _dispc_setup_global_alpha(plane, global_alpha);
++
+ return 0;
+ }
+
+@@ -3011,7 +3026,7 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ enum omap_color_mode color_mode,
+ bool ilace,
+ enum omap_dss_rotation_type rotation_type,
+- u8 rotation, bool mirror)
++ u8 rotation, bool mirror, u8 global_alpha)
+ {
+ int r = 0;
+
+@@ -3032,7 +3047,8 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ out_width, out_height,
+ color_mode, ilace,
+ rotation_type,
+- rotation, mirror);
++ rotation, mirror,
++ global_alpha);
+
+ enable_clocks(0);
+
+@@ -3247,7 +3263,8 @@ void dispc_setup_partial_planes(struct omap_display *display,
+ pi->color_mode, 0,
+ pi->rotation_type,
+ pi->rotation,
+- pi->mirror);
++ pi->mirror,
++ pi->global_alpha);
+
+ dispc_enable_plane(ovl->id, 1);
+ }
+diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
+index 1d01ff6..20cef0a 100644
+--- a/drivers/video/omap2/dss/dss.h
++++ b/drivers/video/omap2/dss/dss.h
+@@ -273,7 +273,8 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ enum omap_color_mode color_mode,
+ bool ilace,
+ enum omap_dss_rotation_type rotation_type,
+- u8 rotation, bool mirror);
++ u8 rotation, bool mirror,
++ u8 global_alpha);
+
+ void dispc_go(enum omap_channel channel);
+ void dispc_enable_lcd_out(bool enable);
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index bf059e0..1e6cd8d 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -464,7 +464,8 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
+ ilace,
+ ovl->info.rotation_type,
+ ovl->info.rotation,
+- ovl->info.mirror);
++ ovl->info.mirror,
++ ovl->info.global_alpha);
+
+ if (r) {
+ DSSERR("dispc_setup_plane failed for ovl %d\n",
+diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
+index c047206..035a57a 100644
+--- a/drivers/video/omap2/dss/overlay.c
++++ b/drivers/video/omap2/dss/overlay.c
+@@ -194,6 +194,37 @@ static ssize_t overlay_enabled_store(struct omap_overlay *ovl, const char *buf,
+ return size;
+ }
+
++static ssize_t overlay_global_alpha_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d\n",
++ ovl->info.global_alpha);
++}
++
++static ssize_t overlay_global_alpha_store(struct omap_overlay *ovl,
++ const char *buf, size_t size)
++{
++ int r;
++ struct omap_overlay_info info;
++
++ ovl->get_overlay_info(ovl, &info);
++
++ /* Video1 plane does not support global alpha
++ * to always make it 255 completely opaque
++ */
++ if (ovl->id == OMAP_DSS_VIDEO1)
++ info.global_alpha = 255;
++ else
++ info.global_alpha = simple_strtoul(buf, NULL, 10);
++
++ if ((r = ovl->set_overlay_info(ovl, &info)))
++ return r;
++
++ if (ovl->manager && (r = ovl->manager->apply(ovl->manager)))
++ return r;
++
++ return size;
++}
++
+ struct overlay_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct omap_overlay *, char *);
+@@ -215,6 +246,8 @@ static OVERLAY_ATTR(output_size, S_IRUGO|S_IWUSR,
+ overlay_output_size_show, overlay_output_size_store);
+ static OVERLAY_ATTR(enabled, S_IRUGO|S_IWUSR,
+ overlay_enabled_show, overlay_enabled_store);
++static OVERLAY_ATTR(global_alpha, S_IRUGO|S_IWUSR,
++ overlay_global_alpha_show, overlay_global_alpha_store);
+
+ static struct attribute *overlay_sysfs_attrs[] = {
+ &overlay_attr_name.attr,
+@@ -224,6 +257,7 @@ static struct attribute *overlay_sysfs_attrs[] = {
+ &overlay_attr_position.attr,
+ &overlay_attr_output_size.attr,
+ &overlay_attr_enabled.attr,
++ &overlay_attr_global_alpha.attr,
+ NULL
+ };
+
+@@ -444,6 +478,7 @@ void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
+ ovl->id = OMAP_DSS_GFX;
+ ovl->supported_modes = OMAP_DSS_COLOR_GFX_OMAP3;
+ ovl->caps = OMAP_DSS_OVL_CAP_DISPC;
++ ovl->info.global_alpha = 255;
+ break;
+ case 1:
+ ovl->name = "vid1";
+@@ -451,6 +486,7 @@ void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
+ ovl->supported_modes = OMAP_DSS_COLOR_VID_OMAP3;
+ ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
+ OMAP_DSS_OVL_CAP_DISPC;
++ ovl->info.global_alpha = 255;
+ break;
+ case 2:
+ ovl->name = "vid2";
+@@ -458,6 +494,7 @@ void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
+ ovl->supported_modes = OMAP_DSS_COLOR_VID_OMAP3;
+ ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
+ OMAP_DSS_OVL_CAP_DISPC;
++ ovl->info.global_alpha = 255;
+ break;
+ }
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch
new file mode 100644
index 0000000000..c46fda0d52
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch
@@ -0,0 +1,35 @@
+From 32cf39c92dfd28e18936c31eea90b4d43a3c0968 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 24 Apr 2009 14:33:48 +0530
+Subject: [PATCH 56/69] DSS2: Rotation attrs for YUV need not to be reversed for 90 and 270
+
+DSS2 supports horizontal mirroing. so only 180 and 0 degree attributes needs
+to be reversed for mirroring.
+Slight corrupt image is seen with 90 ad 270 degree rotation with mirroring
+when the image height and widht is not 32-pixels aligned. To be specific
+resolution is 168X192.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/dss/dispc.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b6a39f5..f79decb 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1110,9 +1110,9 @@ static void _dispc_set_rotation_attrs(enum omap_plane plane, u8 rotation,
+ if (mirroring) {
+ switch (rotation) {
+ case 0: vidrot = 2; break;
+- case 1: vidrot = 3; break;
++ case 1: vidrot = 1; break;
+ case 2: vidrot = 0; break;
+- case 3: vidrot = 1; break;
++ case 3: vidrot = 3; break;
+ }
+ } else {
+ switch (rotation) {
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch
new file mode 100644
index 0000000000..929f41b590
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch
@@ -0,0 +1,32 @@
+From bc67f1fce4472087014fdacd3f44ea732200533e Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Mon, 27 Apr 2009 13:15:07 +0530
+Subject: [PATCH 57/69] DSS2: Documentation update for new sysfs entries in omapdss/manager
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ Documentation/arm/OMAP/DSS | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
+index 249e1a3..751000b 100644
+--- a/Documentation/arm/OMAP/DSS
++++ b/Documentation/arm/OMAP/DSS
+@@ -136,8 +136,13 @@ screen_width width
+ global_alpha global alpha 0-255 0=transparent 255=opaque
+
+ /sys/devices/platform/omapdss/manager? directory:
+-display Destination display
++display Destination display
+ name
++alpha_blending_enabled 0=off 1=on
++color_key_enabled 0=off 1=on
++color_key_type gfx-destination video-source
++color_key_value 0 to 2^24
++default_color default background color RGB24 0 to 2^24
+
+ /sys/devices/platform/omapdss/display? directory:
+ ctrl_name Controller name
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch
new file mode 100644
index 0000000000..7a6f23b349
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch
@@ -0,0 +1,56 @@
+From 9500c899f05048d17ced4340ecfd377656a23934 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Fri, 17 Apr 2009 18:34:33 +0200
+Subject: [PATCH 58/69] DSS2: Don't touch plane coordinates when changing fb->ovl mapping
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+When attaching overlays to a framebuffer via the 'overlays' sysfs file
+do not touch the planes' coordinates. Without this change attaching
+VID2 to a framebuffer which already has VID1 attached would cause VID1
+to be reset to position 0,0 and scaled to 1:1 size. Also call
+omapfb_apply_changes() only once after all the overlays have been
+attached to avoid fiddling with all the overlays several times.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/omapfb/omapfb-sysfs.c | 13 ++++++-------
+ 1 files changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+index 13028ae..702199d 100644
+--- a/drivers/video/omap2/omapfb/omapfb-sysfs.c
++++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+@@ -183,6 +183,7 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
+ struct omap_overlay *ovl;
+ int num_ovls, r, i;
+ int len;
++ bool added = false;
+
+ num_ovls = 0;
+
+@@ -284,15 +285,13 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
+
+ ofbi->overlays[ofbi->num_overlays++] = ovl;
+
+- r = omapfb_apply_changes(fbi, 1);
++ added = true;
++ }
++
++ if (added) {
++ r = omapfb_apply_changes(fbi, 0);
+ if (r)
+ goto out;
+-
+- if (ovl->manager) {
+- r = ovl->manager->apply(ovl->manager);
+- if (r)
+- goto out;
+- }
+ }
+
+ r = count;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch
new file mode 100644
index 0000000000..9ca0f2eab1
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch
@@ -0,0 +1,97 @@
+From 750f7ddc0881834f3400c40e9a59d11f9427cf99 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 29 Apr 2009 17:26:30 +0300
+Subject: [PATCH 59/69] DSS2: DSI: configure ENTER/EXIT_HS_MODE_LATENCY
+
+---
+ drivers/video/omap2/dss/dsi.c | 49 ++++++++++++++++++++++++++++++++--------
+ 1 files changed, 39 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index d8df353..5225ed6 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -2309,15 +2309,26 @@ static int dsi_proto_config(struct omap_display *display)
+ return 0;
+ }
+
+-static void dsi_proto_timings(void)
+-{
+- int tlpx_half, tclk_zero, tclk_prepare, tclk_trail;
+- int tclk_pre, tclk_post;
+- int ddr_clk_pre, ddr_clk_post;
++static void dsi_proto_timings(struct omap_display *display)
++{
++ unsigned tlpx, tclk_zero, tclk_prepare, tclk_trail;
++ unsigned tclk_pre, tclk_post;
++ unsigned ths_prepare, ths_prepare_ths_zero, ths_zero;
++ unsigned ths_trail, ths_exit;
++ unsigned ddr_clk_pre, ddr_clk_post;
++ unsigned enter_hs_mode_lat, exit_hs_mode_lat;
++ unsigned ths_eot;
+ u32 r;
+
++ r = dsi_read_reg(DSI_DSIPHY_CFG0);
++ ths_prepare = FLD_GET(r, 31, 24);
++ ths_prepare_ths_zero = FLD_GET(r, 23, 16);
++ ths_zero = ths_prepare_ths_zero - ths_prepare;
++ ths_trail = FLD_GET(r, 15, 8);
++ ths_exit = FLD_GET(r, 7, 0);
++
+ r = dsi_read_reg(DSI_DSIPHY_CFG1);
+- tlpx_half = FLD_GET(r, 22, 16);
++ tlpx = FLD_GET(r, 22, 16) * 2;
+ tclk_trail = FLD_GET(r, 15, 8);
+ tclk_zero = FLD_GET(r, 7, 0);
+
+@@ -2329,17 +2340,35 @@ static void dsi_proto_timings(void)
+ /* min 60ns + 52*UI */
+ tclk_post = ns2ddr(60) + 26;
+
+- ddr_clk_pre = (tclk_pre + tlpx_half*2 + tclk_zero + tclk_prepare) / 4;
+- ddr_clk_post = (tclk_post + tclk_trail) / 4;
++ ddr_clk_pre = DIV_ROUND_UP(tclk_pre + tlpx + tclk_zero + tclk_prepare,
++ 4);
++ ddr_clk_post = DIV_ROUND_UP(tclk_post + tclk_trail, 4);
+
+ r = dsi_read_reg(DSI_CLK_TIMING);
+ r = FLD_MOD(r, ddr_clk_pre, 15, 8);
+ r = FLD_MOD(r, ddr_clk_post, 7, 0);
+ dsi_write_reg(DSI_CLK_TIMING, r);
+
+- DSSDBG("ddr_clk_pre %d, ddr_clk_post %d\n",
++ DSSDBG("ddr_clk_pre %u, ddr_clk_post %u\n",
+ ddr_clk_pre,
+ ddr_clk_post);
++
++ /* ths_eot is 2 for 2 datalanes and 4 for 1 datalane */
++ if (display->hw_config.u.dsi.data1_lane != 0 &&
++ display->hw_config.u.dsi.data2_lane != 0)
++ ths_eot = 2;
++ else
++ ths_eot = 4;
++
++ enter_hs_mode_lat = DIV_ROUND_UP(tlpx + ths_prepare + ths_zero, 4) + 4;
++ exit_hs_mode_lat = DIV_ROUND_UP(ths_trail + ths_exit, 4) + 1 + ths_eot;
++
++ r = FLD_VAL(enter_hs_mode_lat, 31, 16) |
++ FLD_VAL(exit_hs_mode_lat, 15, 0);
++ dsi_write_reg(DSI_VM_TIMING7, r);
++
++ DSSDBG("enter_hs_mode_lat %u, exit_hs_mode_lat %u\n",
++ enter_hs_mode_lat, exit_hs_mode_lat);
+ }
+
+
+@@ -3340,7 +3369,7 @@ static int dsi_display_init_dsi(struct omap_display *display)
+
+ _dsi_print_reset_status();
+
+- dsi_proto_timings();
++ dsi_proto_timings(display);
+ dsi_set_lp_clk_divisor();
+
+ if (1)
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch
new file mode 100644
index 0000000000..0ff2c7b1a6
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch
@@ -0,0 +1,34 @@
+From 233a6e4f4ccaf5827f04ab38c590397755e61ecb Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Mon, 4 May 2009 16:18:30 +0200
+Subject: [PATCH 60/69] DSS2: Avoid div by zero when calculating required fclk
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+When calculating the required fclk rate for five tap filtering if the
+display width and output width are equal div by zero could occur. The
+TRM doesn't actually specify how this case should be handled but for
+now just skip the calculation which would trigger the div by zero.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index f79decb..5fc9457 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1399,7 +1399,7 @@ static unsigned long calc_fclk_five_taps(u16 width, u16 height,
+ do_div(tmp, 2 * out_height * ppl);
+ fclk = tmp;
+
+- if (height > 2 * out_height) {
++ if (height > 2 * out_height && ppl != out_width) {
+ tmp = pclk * (height - 2 * out_height) * out_width;
+ do_div(tmp, 2 * out_height * (ppl - out_width));
+ fclk = max(fclk, (u32) tmp);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch
new file mode 100644
index 0000000000..a0b694736b
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0061-DSS2-VRFB-save-restore-context.patch
@@ -0,0 +1,106 @@
+From e58576ceca922bfe4c793e6f77a873c4ea14f768 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 09:05:12 +0300
+Subject: [PATCH 61/69] DSS2: VRFB: save / restore context
+
+The VRFB is part of the SMS and supplied by the core power domain; do
+the context saving while VRFB is configured and restore it along with
+the rest of the domain context.
+
+This patch only implements the restore functionality, but not the
+actual call to the restore. That belongs to PM functionality.
+---
+ arch/arm/plat-omap/include/mach/vrfb.h | 1 +
+ arch/arm/plat-omap/vrfb.c | 50 ++++++++++++++++++++++++++-----
+ 2 files changed, 43 insertions(+), 8 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/vrfb.h b/arch/arm/plat-omap/include/mach/vrfb.h
+index 12c7fab..ee6c062 100644
+--- a/arch/arm/plat-omap/include/mach/vrfb.h
++++ b/arch/arm/plat-omap/include/mach/vrfb.h
+@@ -44,5 +44,6 @@ extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u16 width, u16 height,
+ enum omap_color_mode color_mode);
++extern void omap_vrfb_restore_context(void);
+
+ #endif /* __VRFB_H */
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 2ae0d68..649803e 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -39,6 +39,33 @@
+ /* bitmap of reserved contexts */
+ static unsigned ctx_map;
+
++/*
++ * Access to this happens from client drivers or the PM core after wake-up.
++ * For the first case we require locking at the driver level, for the second
++ * we don't need locking, since no drivers will run until after the wake-up
++ * has finished.
++ */
++struct {
++ u32 physical_ba;
++ u32 control;
++ u32 size;
++} vrfb_hw_context[VRFB_NUM_CTXS];
++
++void omap_vrfb_restore_context(void)
++{
++ int i;
++
++ for (i = 0; i < VRFB_NUM_CTXS; i++) {
++ /* Restore only the active contexts */
++ if (!(ctx_map & (1 << i)))
++ continue;
++ omap_writel(vrfb_hw_context[i].control, SMS_ROT_CONTROL(i));
++ omap_writel(vrfb_hw_context[i].size, SMS_ROT_SIZE(i));
++ omap_writel(vrfb_hw_context[i].physical_ba,
++ SMS_ROT_PHYSICAL_BA(i));
++ }
++}
++
+ void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ u8 bytespp)
+ {
+@@ -56,6 +83,8 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u16 vrfb_height;
+ u8 ctx = vrfb->context;
+ u8 bytespp;
++ u32 size;
++ u32 control;
+
+ DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d)\n", ctx, paddr,
+ width, height, bytespp);
+@@ -100,15 +129,20 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+
+ DBG("vrfb w %u, h %u\n", vrfb_width, vrfb_height);
+
++ size = vrfb_width << SMS_IMAGEWIDTH_OFFSET;
++ size |= vrfb_height << SMS_IMAGEHEIGHT_OFFSET;
++
++ control = pixel_size_exp << SMS_PS_OFFSET;
++ control |= VRFB_PAGE_WIDTH_EXP << SMS_PW_OFFSET;
++ control |= VRFB_PAGE_HEIGHT_EXP << SMS_PH_OFFSET;
++
++ vrfb_hw_context[ctx].physical_ba = paddr;
++ vrfb_hw_context[ctx].size = size;
++ vrfb_hw_context[ctx].control = control;
++
+ omap_writel(paddr, SMS_ROT_PHYSICAL_BA(ctx));
+- omap_writel((vrfb_width << SMS_IMAGEWIDTH_OFFSET) |
+- (vrfb_height << SMS_IMAGEHEIGHT_OFFSET),
+- SMS_ROT_SIZE(ctx));
+-
+- omap_writel(pixel_size_exp << SMS_PS_OFFSET |
+- VRFB_PAGE_WIDTH_EXP << SMS_PW_OFFSET |
+- VRFB_PAGE_HEIGHT_EXP << SMS_PH_OFFSET,
+- SMS_ROT_CONTROL(ctx));
++ omap_writel(size, SMS_ROT_SIZE(ctx));
++ omap_writel(control, SMS_ROT_CONTROL(ctx));
+
+ DBG("vrfb offset pixels %d, %d\n",
+ vrfb_width - width, vrfb_height - height);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch
new file mode 100644
index 0000000000..8d5f57866d
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0062-DSS2-VRAM-Fix-indentation.patch
@@ -0,0 +1,65 @@
+From 0fb6754f996b5022e1d856fda3d3258382383596 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 6 May 2009 09:03:43 +0300
+Subject: [PATCH 62/69] DSS2: VRAM: Fix indentation
+
+---
+ arch/arm/plat-omap/vram.c | 26 +++++++++++++-------------
+ 1 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index b126a64..f3ce849 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -287,35 +287,35 @@ static void _omap_vram_dma_cb(int lch, u16 ch_status, void *data)
+ static int _omap_vram_clear(u32 paddr, unsigned pages)
+ {
+ struct completion compl;
+- unsigned elem_count;
+- unsigned frame_count;
++ unsigned elem_count;
++ unsigned frame_count;
+ int r;
+ int lch;
+
+ init_completion(&compl);
+
+- r = omap_request_dma(OMAP_DMA_NO_DEVICE, "VRAM DMA",
++ r = omap_request_dma(OMAP_DMA_NO_DEVICE, "VRAM DMA",
+ _omap_vram_dma_cb,
+- &compl, &lch);
+- if (r) {
++ &compl, &lch);
++ if (r) {
+ pr_err("VRAM: request_dma failed for memory clear\n");
+ return -EBUSY;
+ }
+
+- elem_count = pages * PAGE_SIZE / 4;
+- frame_count = 1;
++ elem_count = pages * PAGE_SIZE / 4;
++ frame_count = 1;
+
+- omap_set_dma_transfer_params(lch, OMAP_DMA_DATA_TYPE_S32,
+- elem_count, frame_count,
+- OMAP_DMA_SYNC_ELEMENT,
+- 0, 0);
++ omap_set_dma_transfer_params(lch, OMAP_DMA_DATA_TYPE_S32,
++ elem_count, frame_count,
++ OMAP_DMA_SYNC_ELEMENT,
++ 0, 0);
+
+- omap_set_dma_dest_params(lch, 0, OMAP_DMA_AMODE_POST_INC,
++ omap_set_dma_dest_params(lch, 0, OMAP_DMA_AMODE_POST_INC,
+ paddr, 0, 0);
+
+ omap_set_dma_color_mode(lch, OMAP_DMA_CONSTANT_FILL, 0x000000);
+
+- omap_start_dma(lch);
++ omap_start_dma(lch);
+
+ if (wait_for_completion_timeout(&compl, msecs_to_jiffies(1000)) == 0) {
+ omap_stop_dma(lch);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch
new file mode 100644
index 0000000000..8633921979
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch
@@ -0,0 +1,82 @@
+From 5d3426ae63c27b9405be8179beabe1e095b44a35 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 19:00:19 +0200
+Subject: [PATCH 63/69] DSS2: fix the usage of get_last_off_on_transaction_id
+
+The function returns int not unsigned since it can fail. Handle the
+failing case as if the context had been lost. So now:
+
+1. No get_last_off_on_transaction_id func in platform data->
+ never restore the context
+2. Return val < 0 -> force the restore
+3. Return val >= 0 do the restore only if the counter has changed.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 2 +-
+ drivers/video/omap2/dss/core.c | 18 ++++++++++++------
+ 2 files changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index 45b16ca..31ebb96 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -234,7 +234,7 @@ struct device;
+
+ /* Board specific data */
+ struct omap_dss_board_info {
+- unsigned (*get_last_off_on_transaction_id)(struct device *dev);
++ int (*get_last_off_on_transaction_id)(struct device *dev);
+ int (*dsi_power_up)(void);
+ void (*dsi_power_down)(void);
+ int num_displays;
+diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
+index ae7cd06..6d11b04 100644
+--- a/drivers/video/omap2/dss/core.c
++++ b/drivers/video/omap2/dss/core.c
+@@ -38,7 +38,7 @@
+
+ static struct {
+ struct platform_device *pdev;
+- unsigned ctx_id;
++ int ctx_id;
+
+ struct clk *dss_ick;
+ struct clk *dss1_fck;
+@@ -63,22 +63,28 @@ module_param_named(debug, dss_debug, bool, 0644);
+ #endif
+
+ /* CONTEXT */
+-static unsigned dss_get_ctx_id(void)
++static int dss_get_ctx_id(void)
+ {
+ struct omap_dss_board_info *pdata = core.pdev->dev.platform_data;
++ int r;
+
+ if (!pdata->get_last_off_on_transaction_id)
+ return 0;
+-
+- return pdata->get_last_off_on_transaction_id(&core.pdev->dev);
++ r = pdata->get_last_off_on_transaction_id(&core.pdev->dev);
++ if (r < 0) {
++ dev_err(&core.pdev->dev,
++ "getting transaction ID failed, will force context restore\n");
++ r = -1;
++ }
++ return r;
+ }
+
+ int dss_need_ctx_restore(void)
+ {
+ int id = dss_get_ctx_id();
+
+- if (id != core.ctx_id) {
+- DSSDBG("ctx id %u -> id %u\n",
++ if (id < 0 || id != core.ctx_id) {
++ DSSDBG("ctx id %d -> id %d\n",
+ core.ctx_id, id);
+ core.ctx_id = id;
+ return 1;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch
new file mode 100644
index 0000000000..2ba9b1b1a2
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0064-VRFB-fix-debug-messages.patch
@@ -0,0 +1,35 @@
+From 784271e9546844c5e69ec6d8f2fd3713847b6ab2 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 11:16:14 +0200
+Subject: [PATCH 64/69] VRFB: fix debug messages
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/vrfb.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 649803e..289fc8a 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -87,7 +87,7 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u32 control;
+
+ DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d)\n", ctx, paddr,
+- width, height, bytespp);
++ width, height, color_mode);
+
+ switch (color_mode) {
+ case OMAP_DSS_COLOR_RGB16:
+@@ -127,7 +127,7 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ vrfb_width = ALIGN(width * bytespp, VRFB_PAGE_WIDTH) / bytespp;
+ vrfb_height = ALIGN(height, VRFB_PAGE_HEIGHT);
+
+- DBG("vrfb w %u, h %u\n", vrfb_width, vrfb_height);
++ DBG("vrfb w %u, h %u bytespp %d\n", vrfb_width, vrfb_height, bytespp);
+
+ size = vrfb_width << SMS_IMAGEWIDTH_OFFSET;
+ size |= vrfb_height << SMS_IMAGEHEIGHT_OFFSET;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch
new file mode 100644
index 0000000000..17f959cb27
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0065-VRFB-add-suspend-resume-functionality.patch
@@ -0,0 +1,216 @@
+From 1269429fe6ddd6e5f15e3b4edb4fc2bcd6fc0410 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 11:16:13 +0200
+Subject: [PATCH 65/69] VRFB: add suspend/resume functionality
+
+At the moment the VRFB context is restored at each core power domain
+OFF->ON transition. This is not optimal since the VRFB might be unused
+temporarily for example when the screen is blanked. Add a suspend /
+resume function to mark these unused periods during which we'll avoid
+thea the context restore.
+
+Use atomic bitops for ctx_map for consistency.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/include/mach/vrfb.h | 2 +
+ arch/arm/plat-omap/vrfb.c | 75 ++++++++++++++++++++++++-----
+ drivers/video/omap2/omapfb/omapfb-main.c | 28 +++++++++++
+ 3 files changed, 92 insertions(+), 13 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/vrfb.h b/arch/arm/plat-omap/include/mach/vrfb.h
+index ee6c062..9647d82 100644
+--- a/arch/arm/plat-omap/include/mach/vrfb.h
++++ b/arch/arm/plat-omap/include/mach/vrfb.h
+@@ -39,6 +39,8 @@ struct vrfb
+
+ extern int omap_vrfb_request_ctx(struct vrfb *vrfb);
+ extern void omap_vrfb_release_ctx(struct vrfb *vrfb);
++extern void omap_vrfb_suspend_ctx(struct vrfb *vrfb);
++extern void omap_vrfb_resume_ctx(struct vrfb *vrfb);
+ extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ u8 bytespp);
+ extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 289fc8a..29f04e2 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -1,7 +1,9 @@
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/ioport.h>
++
+ #include <asm/io.h>
++#include <asm/bitops.h>
+
+ #include <mach/io.h>
+ #include <mach/vrfb.h>
+@@ -37,7 +39,9 @@
+
+ #define VRFB_NUM_CTXS 12
+ /* bitmap of reserved contexts */
+-static unsigned ctx_map;
++static unsigned long ctx_map;
++/* bitmap of contexts for which we have to keep the HW context valid */
++static unsigned long ctx_map_active;
+
+ /*
+ * Access to this happens from client drivers or the PM core after wake-up.
+@@ -51,18 +55,23 @@ struct {
+ u32 size;
+ } vrfb_hw_context[VRFB_NUM_CTXS];
+
++static void inline restore_hw_context(int ctx)
++{
++ omap_writel(vrfb_hw_context[ctx].control, SMS_ROT_CONTROL(ctx));
++ omap_writel(vrfb_hw_context[ctx].size, SMS_ROT_SIZE(ctx));
++ omap_writel(vrfb_hw_context[ctx].physical_ba, SMS_ROT_PHYSICAL_BA(ctx));
++}
++
+ void omap_vrfb_restore_context(void)
+ {
+ int i;
++ unsigned long map = ctx_map_active;
+
+- for (i = 0; i < VRFB_NUM_CTXS; i++) {
+- /* Restore only the active contexts */
+- if (!(ctx_map & (1 << i)))
+- continue;
+- omap_writel(vrfb_hw_context[i].control, SMS_ROT_CONTROL(i));
+- omap_writel(vrfb_hw_context[i].size, SMS_ROT_SIZE(i));
+- omap_writel(vrfb_hw_context[i].physical_ba,
+- SMS_ROT_PHYSICAL_BA(i));
++ for (i = ffs(map); i; i = ffs(map)) {
++ /* i=1..32 */
++ i--;
++ map &= ~(1 << i);
++ restore_hw_context(i);
+ }
+ }
+
+@@ -156,13 +165,20 @@ EXPORT_SYMBOL(omap_vrfb_setup);
+ void omap_vrfb_release_ctx(struct vrfb *vrfb)
+ {
+ int rot;
++ int ctx = vrfb->context;
+
+- if (vrfb->context == 0xff)
++ if (ctx == 0xff)
+ return;
+
+- DBG("release ctx %d\n", vrfb->context);
++ DBG("release ctx %d\n", ctx);
+
+- ctx_map &= ~(1 << vrfb->context);
++ if (!(ctx_map & (1 << ctx))) {
++ BUG();
++ return;
++ }
++ WARN_ON(!(ctx_map_active & (1 << ctx)));
++ clear_bit(ctx, &ctx_map_active);
++ clear_bit(ctx, &ctx_map);
+
+ for (rot = 0; rot < 4; ++rot) {
+ if(vrfb->paddr[rot]) {
+@@ -194,7 +210,9 @@ int omap_vrfb_request_ctx(struct vrfb *vrfb)
+
+ DBG("found free ctx %d\n", ctx);
+
+- ctx_map |= 1 << ctx;
++ set_bit(ctx, &ctx_map);
++ WARN_ON(ctx_map_active & (1 << ctx));
++ set_bit(ctx, &ctx_map_active);
+
+ memset(vrfb, 0, sizeof(*vrfb));
+
+@@ -219,3 +237,34 @@ int omap_vrfb_request_ctx(struct vrfb *vrfb)
+ }
+ EXPORT_SYMBOL(omap_vrfb_request_ctx);
+
++void omap_vrfb_suspend_ctx(struct vrfb *vrfb)
++{
++ DBG("suspend ctx %d\n", vrfb->context);
++ if (vrfb->context >= VRFB_NUM_CTXS ||
++ (!(1 << vrfb->context) & ctx_map_active)) {
++ BUG();
++ return;
++ }
++ clear_bit(vrfb->context, &ctx_map_active);
++}
++EXPORT_SYMBOL(omap_vrfb_suspend_ctx);
++
++void omap_vrfb_resume_ctx(struct vrfb *vrfb)
++{
++ DBG("resume ctx %d\n", vrfb->context);
++ if (vrfb->context >= VRFB_NUM_CTXS ||
++ ((1 << vrfb->context) & ctx_map_active)) {
++ BUG();
++ return;
++ }
++ /*
++ * omap_vrfb_restore_context is normally called by the core domain
++ * save / restore logic, but since this VRFB context was suspended
++ * those calls didn't actually restore the context and now we might
++ * have an invalid context. Do an explicit restore here.
++ */
++ restore_hw_context(vrfb->context);
++ set_bit(vrfb->context, &ctx_map_active);
++}
++EXPORT_SYMBOL(omap_vrfb_resume_ctx);
++
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index 76e7c6c..4bb74b7 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -1036,6 +1036,30 @@ static int omapfb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
+ return 0;
+ }
+
++static void omapfb_vrfb_suspend_all(struct omapfb2_device *fbdev)
++{
++ int i;
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
++
++ if (ofbi->region.vrfb.vaddr[0])
++ omap_vrfb_suspend_ctx(&ofbi->region.vrfb);
++ }
++}
++
++static void omapfb_vrfb_resume_all(struct omapfb2_device *fbdev)
++{
++ int i;
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
++
++ if (ofbi->region.vrfb.vaddr[0])
++ omap_vrfb_resume_ctx(&ofbi->region.vrfb);
++ }
++}
++
+ static int omapfb_blank(int blank, struct fb_info *fbi)
+ {
+ struct omapfb_info *ofbi = FB2OFB(fbi);
+@@ -1051,6 +1075,8 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
+ if (display->state != OMAP_DSS_DISPLAY_SUSPENDED)
+ goto exit;
+
++ omapfb_vrfb_resume_all(fbdev);
++
+ if (display->resume)
+ r = display->resume(display);
+
+@@ -1073,6 +1099,8 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
+ if (display->suspend)
+ r = display->suspend(display);
+
++ omapfb_vrfb_suspend_all(fbdev);
++
+ break;
+
+ default:
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch
new file mode 100644
index 0000000000..a3af90d959
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch
@@ -0,0 +1,92 @@
+From 0201b40018d9e264f8c4ea7871223c94e0de61b1 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 7 May 2009 14:32:55 +0300
+Subject: [PATCH 66/69] DSS2: DSI: tune the timings to be more relaxed
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ drivers/video/omap2/dss/dsi.c | 37 +++++++++++++++++++++----------------
+ 1 files changed, 21 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index 5225ed6..67ecfcf 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -1396,28 +1396,28 @@ static void dsi_complexio_timings(void)
+ /* 1 * DDR_CLK = 2 * UI */
+
+ /* min 40ns + 4*UI max 85ns + 6*UI */
+- ths_prepare = ns2ddr(59) + 2;
++ ths_prepare = ns2ddr(70) + 2;
+
+ /* min 145ns + 10*UI */
+- ths_prepare_ths_zero = ns2ddr(145) + 5;
++ ths_prepare_ths_zero = ns2ddr(175) + 2;
+
+ /* min max(8*UI, 60ns+4*UI) */
+- ths_trail = max((unsigned)4, ns2ddr(60) + 2);
++ ths_trail = ns2ddr(60) + 5;
+
+ /* min 100ns */
+- ths_exit = ns2ddr(100);
++ ths_exit = ns2ddr(145);
+
+ /* tlpx min 50n */
+ tlpx_half = ns2ddr(25);
+
+ /* min 60ns */
+- tclk_trail = ns2ddr(60);
++ tclk_trail = ns2ddr(60) + 2;
+
+ /* min 38ns, max 95ns */
+- tclk_prepare = ns2ddr(38);
++ tclk_prepare = ns2ddr(65);
+
+ /* min tclk-prepare + tclk-zero = 300ns */
+- tclk_zero = ns2ddr(300 - 38);
++ tclk_zero = ns2ddr(260);
+
+ DSSDBG("ths_prepare %u (%uns), ths_prepare_ths_zero %u (%uns)\n",
+ ths_prepare, ddr2ns(ths_prepare),
+@@ -2340,9 +2340,19 @@ static void dsi_proto_timings(struct omap_display *display)
+ /* min 60ns + 52*UI */
+ tclk_post = ns2ddr(60) + 26;
+
++ /* ths_eot is 2 for 2 datalanes and 4 for 1 datalane */
++ if (display->hw_config.u.dsi.data1_lane != 0 &&
++ display->hw_config.u.dsi.data2_lane != 0)
++ ths_eot = 2;
++ else
++ ths_eot = 4;
++
+ ddr_clk_pre = DIV_ROUND_UP(tclk_pre + tlpx + tclk_zero + tclk_prepare,
+ 4);
+- ddr_clk_post = DIV_ROUND_UP(tclk_post + tclk_trail, 4);
++ ddr_clk_post = DIV_ROUND_UP(tclk_post + tclk_trail, 4) + ths_eot;
++
++ BUG_ON(ddr_clk_pre == 0 || ddr_clk_pre > 255);
++ BUG_ON(ddr_clk_post == 0 || ddr_clk_post > 255);
+
+ r = dsi_read_reg(DSI_CLK_TIMING);
+ r = FLD_MOD(r, ddr_clk_pre, 15, 8);
+@@ -2353,14 +2363,9 @@ static void dsi_proto_timings(struct omap_display *display)
+ ddr_clk_pre,
+ ddr_clk_post);
+
+- /* ths_eot is 2 for 2 datalanes and 4 for 1 datalane */
+- if (display->hw_config.u.dsi.data1_lane != 0 &&
+- display->hw_config.u.dsi.data2_lane != 0)
+- ths_eot = 2;
+- else
+- ths_eot = 4;
+-
+- enter_hs_mode_lat = DIV_ROUND_UP(tlpx + ths_prepare + ths_zero, 4) + 4;
++ enter_hs_mode_lat = 1 + DIV_ROUND_UP(tlpx, 4) +
++ DIV_ROUND_UP(ths_prepare, 4) +
++ DIV_ROUND_UP(ths_zero + 3, 4);
+ exit_hs_mode_lat = DIV_ROUND_UP(ths_trail + ths_exit, 4) + 1 + ths_eot;
+
+ r = FLD_VAL(enter_hs_mode_lat, 31, 16) |
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch
new file mode 100644
index 0000000000..911fe79bfa
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch
@@ -0,0 +1,29 @@
+From c474849d7aff57d578c639f63a9c3cbdec0501dd Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Mon, 11 May 2009 15:15:52 +0200
+Subject: [PATCH 67/69] DSS2: VRFB: don't WARN when releasing inactive ctx
+
+Releasing an inactive context is valid, it can happen when
+the application first blanks the screen then frees the
+framebuffer.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/vrfb.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 29f04e2..34395c2 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -176,7 +176,6 @@ void omap_vrfb_release_ctx(struct vrfb *vrfb)
+ BUG();
+ return;
+ }
+- WARN_ON(!(ctx_map_active & (1 << ctx)));
+ clear_bit(ctx, &ctx_map_active);
+ clear_bit(ctx, &ctx_map);
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch
new file mode 100644
index 0000000000..fba2ebd5db
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch
@@ -0,0 +1,65 @@
+From 0db37fa025f0eac64f9fdad49e310d7660f48944 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Tue, 12 May 2009 14:38:05 +0200
+Subject: [PATCH 68/69] DSS2: Swap field offset values w/ VRFB rotation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+The field 0 and field 1 offset values were still incorrect when VRFB
+rotation is used. Swap them to put the fields into proper order.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 17 +++++++++++------
+ 1 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 5fc9457..b0e4960 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1182,6 +1182,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+
+ DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width,
+ width, height);
++
++ /*
++ * field 0 = even field = bottom field
++ * field 1 = odd field = top field
++ */
+ switch (rotation + mirror * 4) {
+ case 0:
+ case 2:
+@@ -1194,11 +1199,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+ width = width >> 1;
+ case 1:
+ case 3:
+- *offset0 = 0;
++ *offset1 = 0;
+ if (fieldmode)
+- *offset1 = screen_width * ps;
++ *offset0 = screen_width * ps;
+ else
+- *offset1 = 0;
++ *offset0 = 0;
+
+ *row_inc = pixinc(1 + (screen_width - width) +
+ (fieldmode ? screen_width : 0),
+@@ -1216,11 +1221,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+ width = width >> 1;
+ case 5:
+ case 7:
+- *offset0 = 0;
++ *offset1 = 0;
+ if (fieldmode)
+- *offset1 = screen_width * ps;
++ *offset0 = screen_width * ps;
+ else
+- *offset1 = 0;
++ *offset0 = 0;
+ *row_inc = pixinc(1 - (screen_width + width) -
+ (fieldmode ? screen_width : 0),
+ ps);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch b/recipes/linux/linux-omap-pm-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch
new file mode 100644
index 0000000000..c637c48602
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch
@@ -0,0 +1,125 @@
+From b06406f3e5c3958f69185314c969f7c1a3265f71 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Thu, 14 May 2009 15:04:17 +0530
+Subject: [PATCH 69/69] DSS2: OMAP3EVM: Added DSI powerup and powerdown functions
+
+Copied fom 3430sdp implementation.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/mach-omap2/board-omap3evm.c | 62 +++++++++++++++++++++-------------
+ 1 files changed, 38 insertions(+), 24 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
+index 6f5a866..57c4fc7 100644
+--- a/arch/arm/mach-omap2/board-omap3evm.c
++++ b/arch/arm/mach-omap2/board-omap3evm.c
+@@ -237,6 +237,38 @@ static int __init omap3_evm_i2c_init(void)
+ static int lcd_enabled;
+ static int dvi_enabled;
+
++static void enable_vpll2(int enable)
++{
++ u8 ded_val, grp_val;
++
++ if (enable) {
++ ded_val = ENABLE_VPLL2_DEDICATED;
++ grp_val = ENABLE_VPLL2_DEV_GRP;
++ } else {
++ ded_val = 0;
++ grp_val = 0;
++ }
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ded_val, TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ grp_val, TWL4030_VPLL2_DEV_GRP);
++}
++
++static int omap3evm_dsi_power_up(void)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0)
++ enable_vpll2(1);
++ return 0;
++}
++
++static void omap3evm_dsi_power_down(void)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0)
++ enable_vpll2(0);
++}
++
++
+ static void __init omap3_evm_display_init(void)
+ {
+ int r;
+@@ -306,12 +338,7 @@ static int omap3_evm_panel_enable_lcd(struct omap_display *display)
+ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
+ return -EINVAL;
+ }
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
+- }
++ omap3evm_dsi_power_up();
+ gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 0);
+ lcd_enabled = 1;
+ return 0;
+@@ -319,12 +346,7 @@ static int omap3_evm_panel_enable_lcd(struct omap_display *display)
+
+ static void omap3_evm_panel_disable_lcd(struct omap_display *display)
+ {
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEV_GRP);
+- }
++ omap3evm_dsi_power_down();
+ gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 1);
+ lcd_enabled = 0;
+ }
+@@ -370,13 +392,8 @@ static int omap3_evm_panel_enable_dvi(struct omap_display *display)
+ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
+ return -EINVAL;
+ }
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
+- }
+
++ omap3evm_dsi_power_up();
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
+ TWL4030_GPIODATA_IN3);
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
+@@ -388,13 +405,8 @@ static int omap3_evm_panel_enable_dvi(struct omap_display *display)
+
+ static void omap3_evm_panel_disable_dvi(struct omap_display *display)
+ {
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEV_GRP);
+- }
+
++ omap3evm_dsi_power_down();
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
+ TWL4030_GPIODATA_IN3);
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
+@@ -413,6 +425,8 @@ static struct omap_dss_display_config omap3_evm_display_data_dvi = {
+ };
+
+ static struct omap_dss_board_info omap3_evm_dss_data = {
++ .dsi_power_up = omap3evm_dsi_power_up,
++ .dsi_power_down = omap3evm_dsi_power_down,
+ .num_displays = 3,
+ .displays = {
+ &omap3_evm_display_data,
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0070-DSS2-fix-irq1.diff b/recipes/linux/linux-omap-pm-2.6.29/dss2/0070-DSS2-fix-irq1.diff
new file mode 100644
index 0000000000..8f384dfe2d
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0070-DSS2-fix-irq1.diff
@@ -0,0 +1,221 @@
+From 093988f36ffcb0201927f8b452e546e1141aa0fa Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Sat, 23 May 2009 15:00:21 +0000
+Subject: DSS2: DISPC: fix irq handling locking
+
+---
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b0e4960..b3685b2 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -154,23 +154,20 @@ static struct {
+
+ struct clk *dpll4_m4_ck;
+
+- spinlock_t irq_lock;
+-
+ unsigned long cache_req_pck;
+ unsigned long cache_prate;
+ struct dispc_clock_info cache_cinfo;
+
+- u32 irq_error_mask;
++ spinlock_t irq_lock;
++ u32 irq_error_mask;
+ struct omap_dispc_isr_data registered_isr[DISPC_MAX_NR_ISRS];
+-
+- spinlock_t error_lock;
+ u32 error_irqs;
+ struct work_struct error_work;
+
+ u32 ctx[DISPC_SZ_REGS / sizeof(u32)];
+ } dispc;
+
+-static void omap_dispc_set_irqs(void);
++static void _omap_dispc_set_irqs(void);
+
+ static inline void dispc_write_reg(const struct dispc_reg idx, u32 val)
+ {
+@@ -1691,10 +1688,13 @@ void dispc_enable_digit_out(bool enable)
+ }
+
+ if (enable) {
++ unsigned long flags;
+ /* When we enable digit output, we'll get an extra digit
+ * sync lost interrupt, that we need to ignore */
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ dispc.irq_error_mask &= ~DISPC_IRQ_SYNC_LOST_DIGIT;
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ /* When we disable digit output, we need to wait until fields are done.
+@@ -1728,9 +1728,12 @@ void dispc_enable_digit_out(bool enable)
+ DSSERR("failed to unregister EVSYNC isr\n");
+
+ if (enable) {
++ unsigned long flags;
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ dispc.irq_error_mask = DISPC_IRQ_MASK_ERROR;
+ dispc_write_reg(DISPC_IRQSTATUS, DISPC_IRQ_SYNC_LOST_DIGIT);
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ enable_clocks(0);
+@@ -2508,14 +2511,14 @@ int dispc_get_clock_div(struct dispc_clock_info *cinfo)
+ return 0;
+ }
+
+-static void omap_dispc_set_irqs(void)
++/* dispc.irq_lock has to be locked by the caller */
++static void _omap_dispc_set_irqs(void)
+ {
+- unsigned long flags;
+- u32 mask = dispc.irq_error_mask;
++ u32 mask;
+ int i;
+ struct omap_dispc_isr_data *isr_data;
+
+- spin_lock_irqsave(&dispc.irq_lock, flags);
++ mask = dispc.irq_error_mask;
+
+ for (i = 0; i < DISPC_MAX_NR_ISRS; i++) {
+ isr_data = &dispc.registered_isr[i];
+@@ -2528,9 +2531,8 @@ static void omap_dispc_set_irqs(void)
+
+ enable_clocks(1);
+ dispc_write_reg(DISPC_IRQENABLE, mask);
+- enable_clocks(0);
+
+- spin_unlock_irqrestore(&dispc.irq_lock, flags);
++ enable_clocks(0);
+ }
+
+ int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
+@@ -2571,11 +2573,14 @@ int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
+
+ break;
+ }
+-err:
++
++ _omap_dispc_set_irqs();
++
+ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+- if (ret == 0)
+- omap_dispc_set_irqs();
++ return 0;
++err:
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+ return ret;
+ }
+@@ -2606,10 +2611,10 @@ int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
+ break;
+ }
+
+- spin_unlock_irqrestore(&dispc.irq_lock, flags);
+-
+ if (ret == 0)
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+ return ret;
+ }
+@@ -2645,11 +2650,15 @@ static void print_irq_status(u32 status)
+ void dispc_irq_handler(void)
+ {
+ int i;
+- u32 irqstatus = dispc_read_reg(DISPC_IRQSTATUS);
++ u32 irqstatus;
+ u32 handledirqs = 0;
+ u32 unhandled_errors;
+ struct omap_dispc_isr_data *isr_data;
+
++ spin_lock(&dispc.irq_lock);
++
++ irqstatus = dispc_read_reg(DISPC_IRQSTATUS);
++
+ #ifdef DEBUG
+ if (dss_debug)
+ print_irq_status(irqstatus);
+@@ -2673,15 +2682,15 @@ void dispc_irq_handler(void)
+ unhandled_errors = irqstatus & ~handledirqs & dispc.irq_error_mask;
+
+ if (unhandled_errors) {
+- spin_lock(&dispc.error_lock);
+ dispc.error_irqs |= unhandled_errors;
+- spin_unlock(&dispc.error_lock);
+
+ dispc.irq_error_mask &= ~unhandled_errors;
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
+
+ schedule_work(&dispc.error_work);
+ }
++
++ spin_unlock(&dispc.irq_lock);
+ }
+
+ static void dispc_error_worker(struct work_struct *work)
+@@ -2690,10 +2699,10 @@ static void dispc_error_worker(struct work_struct *work)
+ u32 errors;
+ unsigned long flags;
+
+- spin_lock_irqsave(&dispc.error_lock, flags);
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ errors = dispc.error_irqs;
+ dispc.error_irqs = 0;
+- spin_unlock_irqrestore(&dispc.error_lock, flags);
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+ if (errors & DISPC_IRQ_GFX_FIFO_UNDERFLOW) {
+ DSSERR("GFX_FIFO_UNDERFLOW, disabling GFX\n");
+@@ -2836,8 +2845,10 @@ static void dispc_error_worker(struct work_struct *work)
+ }
+ }
+
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ dispc.irq_error_mask |= errors;
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout)
+@@ -2921,6 +2932,10 @@ void dispc_fake_vsync_irq(void)
+
+ static void _omap_dispc_initialize_irq(void)
+ {
++ unsigned long flags;
++
++ spin_lock_irqsave(&dispc.irq_lock, flags);
++
+ memset(dispc.registered_isr, 0, sizeof(dispc.registered_isr));
+
+ dispc.irq_error_mask = DISPC_IRQ_MASK_ERROR;
+@@ -2929,7 +2944,9 @@ static void _omap_dispc_initialize_irq(void)
+ * so clear it */
+ dispc_write_reg(DISPC_IRQSTATUS, dispc_read_reg(DISPC_IRQSTATUS));
+
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ void dispc_enable_sidle(void)
+@@ -2970,7 +2987,6 @@ int dispc_init(void)
+ u32 rev;
+
+ spin_lock_init(&dispc.irq_lock);
+- spin_lock_init(&dispc.error_lock);
+
+ INIT_WORK(&dispc.error_work, dispc_error_worker);
+
+--
+cgit v0.8.2.1-10-g45e7
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/0071-DSS2-fix-irq2.diff b/recipes/linux/linux-omap-pm-2.6.29/dss2/0071-DSS2-fix-irq2.diff
new file mode 100644
index 0000000000..cb8aaf1a28
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/0071-DSS2-fix-irq2.diff
@@ -0,0 +1,35 @@
+From 8af2f6550d6971875e4c5d3f93982f86f4bcf216 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Sat, 23 May 2009 15:00:00 +0000
+Subject: DSS2: DISPC: clear irqstatus for newly enabled irqs
+
+This fixes the problem that when requesting a new irq
+we could get the isr called too early in case irqstatus
+already had that irq flag on.
+---
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b3685b2..2471cfe 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -2515,6 +2515,7 @@ int dispc_get_clock_div(struct dispc_clock_info *cinfo)
+ static void _omap_dispc_set_irqs(void)
+ {
+ u32 mask;
++ u32 old_mask;
+ int i;
+ struct omap_dispc_isr_data *isr_data;
+
+@@ -2530,6 +2531,11 @@ static void _omap_dispc_set_irqs(void)
+ }
+
+ enable_clocks(1);
++
++ old_mask = dispc_read_reg(DISPC_IRQENABLE);
++ /* clear the irqstatus for newly enabled irqs */
++ dispc_write_reg(DISPC_IRQSTATUS, (mask ^ old_mask) & mask);
++
+ dispc_write_reg(DISPC_IRQENABLE, mask);
+
+ enable_clocks(0);
+--
+cgit v0.8.2.1-10-g45e7
diff --git a/recipes/linux/linux-omap-pm-2.6.29/dss2/merge-fixups.diff b/recipes/linux/linux-omap-pm-2.6.29/dss2/merge-fixups.diff
new file mode 100644
index 0000000000..94e663ce9e
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/dss2/merge-fixups.diff
@@ -0,0 +1,49 @@
+
+--- /tmp/io.c 2009-04-23 12:31:45.000000000 +0200
++++ git/arch/arm/mach-omap2/io.c 2009-04-23 12:32:35.000000000 +0200
+@@ -18,6 +18,7 @@
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <linux/init.h>
++#include <linux/omapfb.h>
+ #include <linux/io.h>
+ #include <linux/clk.h>
+
+@@ -25,7 +26,6 @@
+
+ #include <asm/mach/map.h>
+ #include <mach/mux.h>
+-#include <mach/omapfb.h>
+ #include <mach/sram.h>
+ #include <mach/sdrc.h>
+ #include <mach/gpmc.h>
+--- /tmp/board-3430sdp.c 2009-04-23 12:31:45.000000000 +0200
++++ git/arch/arm/mach-omap2/board-3430sdp.c 2009-04-23 12:32:51.000000000 +0200
+@@ -38,6 +38,7 @@
+ #include <mach/dma.h>
+ #include <mach/gpmc.h>
+ #include <mach/omap-pm.h>
++#include <mach/display.h>
+
+ #include <mach/control.h>
+ #include <mach/clock.h>
+--- /tmp/board-omap3beagle.c 2009-04-23 12:31:45.000000000 +0200
++++ git/arch/arm/mach-omap2/board-omap3beagle.c 2009-04-23 12:33:07.000000000 +0200
+@@ -46,6 +46,7 @@
+ #include <mach/mux.h>
+ #include <mach/omap-pm.h>
+ #include <mach/clock.h>
++#include <mach/display.h>
+
+ #include "twl4030-generic-scripts.h"
+ #include "mmc-twl4030.h"
+--- /tmp/board-omap3evm.c 2009-04-23 12:31:45.000000000 +0200
++++ git/arch/arm/mach-omap2/board-omap3evm.c 2009-04-23 12:33:22.000000000 +0200
+@@ -38,6 +38,7 @@
+ #include <mach/mcspi.h>
+ #include <mach/omap-pm.h>
+ #include <mach/clock.h>
++#include <mach/display.h>
+
+ #include "sdram-micron-mt46h32m32lf-6.h"
+ #include "twl4030-generic-scripts.h"
diff --git a/recipes/linux/linux-omap-pm-2.6.29/ehci.patch b/recipes/linux/linux-omap-pm-2.6.29/ehci.patch
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/ehci.patch
diff --git a/recipes/linux/linux-omap-pm-2.6.29/evm-mcspi-ts.diff b/recipes/linux/linux-omap-pm-2.6.29/evm-mcspi-ts.diff
new file mode 100644
index 0000000000..64d797cf96
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/evm-mcspi-ts.diff
@@ -0,0 +1,132 @@
+From linux-omap-owner@vger.kernel.org Sun Nov 02 21:08:25 2008
+Received: from localhost
+ ([127.0.0.1] helo=dominion ident=koen)
+ by dominion.dominion.void with esmtp (Exim 4.69)
+ (envelope-from <linux-omap-owner@vger.kernel.org>)
+ id 1KwjFJ-0008Hg-0T
+ for koen@localhost; Sun, 02 Nov 2008 21:08:25 +0100
+Received: from xs.service.utwente.nl [130.89.5.250]
+ by dominion with POP3 (fetchmail-6.3.9-rc2)
+ for <koen@localhost> (single-drop); Sun, 02 Nov 2008 21:08:25 +0100 (CET)
+Received: from mail.service.utwente.nl ([130.89.5.253]) by exchange.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Sun, 2 Nov 2008 20:57:16 +0100
+Received: from mx.utwente.nl ([130.89.2.13]) by mail.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Sun, 2 Nov 2008 20:57:16 +0100
+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 mA2JudEK010968
+ for <k.kooi@student.utwente.nl>; Sun, 2 Nov 2008 20:56:40 +0100
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+ id S1752819AbYKBT4i (ORCPT <rfc822;k.kooi@student.utwente.nl>);
+ Sun, 2 Nov 2008 14:56:38 -0500
+Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752829AbYKBT4i
+ (ORCPT <rfc822;linux-omap-outgoing>); Sun, 2 Nov 2008 14:56:38 -0500
+Received: from fg-out-1718.google.com ([72.14.220.153]:32481 "EHLO
+ fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+ with ESMTP id S1752819AbYKBT4h (ORCPT
+ <rfc822;linux-omap@vger.kernel.org>); Sun, 2 Nov 2008 14:56:37 -0500
+Received: by fg-out-1718.google.com with SMTP id 19so1869080fgg.17
+ for <linux-omap@vger.kernel.org>; Sun, 02 Nov 2008 11:56:33 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+ d=gmail.com; s=gamma;
+ h=domainkey-signature:received:received:from:to:cc:subject:date
+ :message-id:x-mailer:in-reply-to:references;
+ bh=Ftvoq8kE3ciPRy7pNy5VLkNnZD8o0HYWIrO1LMS/lAY=;
+ b=HpEcngDUbAObGNJuQmBIG3SoNHesUL57GluZGlYO7kxFxfH6N8zeHjKuRSk86+mT5s
+ gMhyCC07wjVp75HnqCtKbOJzNw/8F4ZGbL2lY1LC99+zxHW1JBQv5c3ZaoCVqTw6TuH0
+ bQ8Ew2BwHknT3wGA+QcGoMJJs5aw62AhPiyHY=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+ d=gmail.com; s=gamma;
+ h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
+ b=aio1APZhCIcYIrMY844QkdaQzKw0/yiuaVjqfv52fnft1kafGT2qAS3KfXAc61a9If
+ sXHbi2fr/r1a7YZJJVGqkJX0WmWTY0OqdhS1lmugP/dXEMHeqaArKATbvxrq9/svb1bV
+ Vzpkm6sOzLrr54uo+BcZNoxHWqb8W2UrRxuTk=
+Received: by 10.103.131.18 with SMTP id i18mr6668205mun.126.1225655793072;
+ Sun, 02 Nov 2008 11:56:33 -0800 (PST)
+Received: from localhost.localdomain ([78.59.134.74])
+ by mx.google.com with ESMTPS id g1sm23199635muf.8.2008.11.02.11.56.31
+ (version=TLSv1/SSLv3 cipher=RC4-MD5);
+ Sun, 02 Nov 2008 11:56:31 -0800 (PST)
+From: Grazvydas Ignotas <notasas@gmail.com>
+To: linux-omap@vger.kernel.org
+Cc: Grazvydas Ignotas <notasas@gmail.com>
+Subject: Re: omap3evm LCD red-tint workaround
+Date: Sun, 2 Nov 2008 21:56:19 +0200
+Message-Id: <1225655779-18934-1-git-send-email-notasas@gmail.com>
+X-Mailer: git-send-email 1.5.4.3
+In-Reply-To: <57322719-1A5A-45DC-9846-5C0A3B6EF346@student.utwente.nl>
+References: <57322719-1A5A-45DC-9846-5C0A3B6EF346@student.utwente.nl>
+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: 02 Nov 2008 19:57:16.0876 (UTC) FILETIME=[34FBA0C0:01C93D25]
+
+> PS: TS is still unusable with the 16x16 pixel resolution
+This is also the case for Pandora. The patch below fixes the problem,
+but as I have no other boards to test this on, I haven't sent it.
+See if it helps you.
+
+
+From 91f3af26bbf751b846e6265d86387e81be7c1364 Mon Sep 17 00:00:00 2001
+From: Grazvydas Ignotas <notasas@gmail.com>
+Date: Tue, 28 Oct 2008 22:01:42 +0200
+Subject: [PATCH] OMAP3: fix McSPI transfers
+
+Currently on OMAP3 if both write and read is set up for a transfer,
+the first byte returned on read is corrupted. Work around this by
+disabling channel between reads and writes, instead of transfers.
+---
+ drivers/spi/omap2_mcspi.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
+index 454a271..4890b6c 100644
+--- a/drivers/spi/omap2_mcspi.c
++++ b/drivers/spi/omap2_mcspi.c
+@@ -710,7 +710,6 @@ static void omap2_mcspi_work(struct work_struct *work)
+ spi = m->spi;
+ cs = spi->controller_state;
+
+- omap2_mcspi_set_enable(spi, 1);
+ list_for_each_entry(t, &m->transfers, transfer_list) {
+ if (t->tx_buf == NULL && t->rx_buf == NULL && t->len) {
+ status = -EINVAL;
+@@ -741,6 +740,8 @@ static void omap2_mcspi_work(struct work_struct *work)
+ if (t->len) {
+ unsigned count;
+
++ omap2_mcspi_set_enable(spi, 1);
++
+ /* RX_ONLY mode needs dummy data in TX reg */
+ if (t->tx_buf == NULL)
+ __raw_writel(0, cs->base
+@@ -752,6 +753,8 @@ static void omap2_mcspi_work(struct work_struct *work)
+ count = omap2_mcspi_txrx_pio(spi, t);
+ m->actual_length += count;
+
++ omap2_mcspi_set_enable(spi, 0);
++
+ if (count != t->len) {
+ status = -EIO;
+ break;
+@@ -777,8 +780,6 @@ static void omap2_mcspi_work(struct work_struct *work)
+ if (cs_active)
+ omap2_mcspi_force_cs(spi, 0);
+
+- omap2_mcspi_set_enable(spi, 0);
+-
+ m->status = status;
+ m->complete(m->context);
+
+--
+1.5.4.3
+
+--
+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/recipes/linux/linux-omap-pm-2.6.29/fix-audio-capture.patch b/recipes/linux/linux-omap-pm-2.6.29/fix-audio-capture.patch
new file mode 100644
index 0000000000..8aaac57b5f
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/fix-audio-capture.patch
@@ -0,0 +1,51 @@
+diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
+index ee2f0d3..8b4aafb 100644
+--- a/sound/soc/codecs/twl4030.c
++++ b/sound/soc/codecs/twl4030.c
+@@ -45,8 +45,8 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = {
+ 0xc3, /* REG_OPTION (0x2) */
+ 0x00, /* REG_UNKNOWN (0x3) */
+ 0x00, /* REG_MICBIAS_CTL (0x4) */
+- 0x20, /* REG_ANAMICL (0x5) */
+- 0x00, /* REG_ANAMICR (0x6) */
++ 0x34, /* REG_ANAMICL (0x5) */
++ 0x14, /* REG_ANAMICR (0x6) */
+ 0x00, /* REG_AVADC_CTL (0x7) */
+ 0x00, /* REG_ADCMICSEL (0x8) */
+ 0x00, /* REG_DIGMIXING (0x9) */
+
+--- /tmp/Kconfig 2009-06-20 13:13:21.000000000 +0200
++++ git/sound/soc/omap/Kconfig 2009-06-20 13:14:02.000000000 +0200
+@@ -15,6 +15,14 @@
+ help
+ Say Y if you want to add support for SoC audio on Nokia N810.
+
++config SND_OMAP_SOC_OMAP3_BEAGLE
++ 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 Beagleboard.
++
+ config SND_OMAP_SOC_OSK5912
+ tristate "SoC Audio support for omap osk5912"
+ depends on SND_OMAP_SOC && MACH_OMAP_OSK
+--- /tmp/Makefile 2009-06-23 08:37:40.000000000 +0200
++++ git/sound/soc/omap/Makefile 2009-06-23 08:38:38.000000000 +0200
+@@ -7,6 +7,7 @@
+
+ # OMAP Machine Support
+ snd-soc-n810-objs := n810.o
++snd-soc-omap3beagle-objs := omap3beagle.o
+ snd-soc-osk5912-objs := osk5912.o
+ snd-soc-overo-objs := overo.o
+ snd-soc-omap2evm-objs := omap2evm.o
+@@ -14,6 +15,7 @@
+ snd-soc-omap3pandora-objs := omap3pandora.o
+
+ obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
++obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
+ obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o
+ obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o
+ obj-$(CONFIG_MACH_OMAP2EVM) += snd-soc-omap2evm.o
diff --git a/recipes/linux/linux-omap-pm-2.6.29/fix-install.patch b/recipes/linux/linux-omap-pm-2.6.29/fix-install.patch
new file mode 100644
index 0000000000..46bc25a50b
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/fix-install.patch
@@ -0,0 +1,23 @@
+From: Steve Sakoman <steve@sakoman.com>
+Date: Mon, 18 Aug 2008 16:07:31 +0000 (-0700)
+Subject: scripts/Makefile.fwinst: add missing space when setting mode in cmd_install
+X-Git-Url: http://www.sakoman.net/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff_plain;h=f039944bdd491cde7327133e9976881d3133ae70
+
+scripts/Makefile.fwinst: add missing space when setting mode in cmd_install
+
+This was causing build failures on some machines
+---
+
+diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst
+index 6bf8e87..fb20532 100644
+--- a/scripts/Makefile.fwinst
++++ b/scripts/Makefile.fwinst
+@@ -37,7 +37,7 @@ install-all-dirs: $(installed-fw-dirs)
+ @true
+
+ quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@)
+- cmd_install = $(INSTALL) -m0644 $< $@
++ cmd_install = $(INSTALL) -m 0644 $< $@
+
+ $(installed-fw-dirs):
+ $(call cmd,mkdir)
diff --git a/recipes/linux/linux-omap-pm-2.6.29/no-cortex-deadlock.patch b/recipes/linux/linux-omap-pm-2.6.29/no-cortex-deadlock.patch
new file mode 100644
index 0000000000..78547c8969
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/no-cortex-deadlock.patch
@@ -0,0 +1,77 @@
+From: Mans Rullgard <mans@mansr.com>
+Date: Sat, 16 Aug 2008 23:03:06 +0000 (+0100)
+Subject: ARM: Workaround for erratum 451034
+X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=b84fa87873ffb68ad23930cf6cddeea8bec43ede
+
+ARM: Workaround for erratum 451034
+
+On Cortex-A8 r1p0 and r1p1, executing a NEON store with an integer
+store in the store buffer, can cause a processor deadlock under
+certain conditions.
+
+Executing a DMB instruction before saving NEON/VFP registers and before
+return to userspace makes it safe to run code which includes similar
+counter-measures. Userspace code can still trigger the deadlock, so
+a different workaround is required to safely run untrusted code.
+
+See ARM Cortex-A8 Errata Notice (PR120-PRDC-008070) for full details.
+
+Signed-off-by: Mans Rullgard <mans@mansr.com>
+---
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index aa475d9..41d536e 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -1117,6 +1117,22 @@ config NEON
+ Say Y to include support code for NEON, the ARMv7 Advanced SIMD
+ Extension.
+
++config ARM_ERRATUM_451034
++ bool "Enable workaround for ARM erratum 451034"
++ depends on VFPv3
++ help
++ On Cortex-A8 r1p0 and r1p1, executing a NEON store with an integer
++ store in the store buffer, can cause a processor deadlock under
++ certain conditions.
++
++ See ARM Cortex-A8 Errata Notice (PR120-PRDC-008070) for full details.
++
++ Say Y to include a partial workaround.
++
++ WARNING: Even with this option enabled, userspace code can trigger
++ the deadlock. To safely run untrusted code, a different fix is
++ required.
++
+ endmenu
+
+ menu "Userspace binary formats"
+diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h
+index 422f3cc..934798b 100644
+--- a/arch/arm/include/asm/vfpmacros.h
++++ b/arch/arm/include/asm/vfpmacros.h
+@@ -32,6 +32,9 @@
+
+ @ write all the working registers out of the VFP
+ .macro VFPFSTMIA, base, tmp
++#ifdef CONFIG_ARM_ERRATUM_451034
++ dmb
++#endif
+ #if __LINUX_ARM_ARCH__ < 6
+ STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15}
+ #else
+diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
+index 060d7e2..9799a35 100644
+--- a/arch/arm/kernel/entry-common.S
++++ b/arch/arm/kernel/entry-common.S
+@@ -69,6 +69,10 @@ no_work_pending:
+ /* perform architecture specific actions before user return */
+ arch_ret_to_user r1, lr
+
++#ifdef CONFIG_ARM_ERRATUM_451034
++ dmb
++#endif
++
+ @ slow_restore_user_regs
+ ldr r1, [sp, #S_PSR] @ get calling cpsr
+ ldr lr, [sp, #S_PC]! @ get pc
diff --git a/recipes/linux/linux-omap-pm-2.6.29/no-empty-flash-warnings.patch b/recipes/linux/linux-omap-pm-2.6.29/no-empty-flash-warnings.patch
new file mode 100644
index 0000000000..ab344b0449
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/no-empty-flash-warnings.patch
@@ -0,0 +1,15 @@
+diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
+index 1d437de..33b3feb 100644
+--- a/fs/jffs2/scan.c
++++ b/fs/jffs2/scan.c
+@@ -647,8 +647,8 @@ scan_more:
+ inbuf_ofs = ofs - buf_ofs;
+ while (inbuf_ofs < scan_end) {
+ if (unlikely(*(uint32_t *)(&buf[inbuf_ofs]) != 0xffffffff)) {
+- printk(KERN_WARNING "Empty flash at 0x%08x ends at 0x%08x\n",
+- empty_start, ofs);
++// printk(KERN_WARNING "Empty flash at 0x%08x ends at 0x%08x\n",
++// empty_start, ofs);
+ if ((err = jffs2_scan_dirty_space(c, jeb, ofs-empty_start)))
+ return err;
+ goto scan_more;
diff --git a/recipes/linux/linux-omap-pm-2.6.29/omap1710h3/defconfig b/recipes/linux/linux-omap-pm-2.6.29/omap1710h3/defconfig
new file mode 100644
index 0000000000..21f7c54e4e
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/omap1710h3/defconfig
@@ -0,0 +1,1224 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc2-omap1
+# Tue Aug 21 23:10:57 2007
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_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_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+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 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_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_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 is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA 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
+
+#
+# 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_RESET_CLOCKS is not set
+# 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_STI 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=y
+# CONFIG_OMAP_32K_TIMER is not set
+# 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
+# CONFIG_OMAP_DSP is not set
+
+#
+# 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=y
+# CONFIG_MACH_OMAP_OSK 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 is not set
+CONFIG_OMAP_ARM_168MHZ=y
+# CONFIG_OMAP_ARM_120MHZ is not set
+# CONFIG_OMAP_ARM_60MHZ is not set
+# CONFIG_OMAP_ARM_30MHZ is not set
+# CONFIG_MACH_OMAP_APOLLON_PLUS 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=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_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x10C08000
+CONFIG_ZBOOT_ROM_BSS=0x10200000
+# CONFIG_ZBOOT_ROM is not set
+CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 initrd=0x10A00000,8M root=/dev/ram0 rw ip=dhcp devfs=mount"
+# 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=y
+# 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_APM_EMULATION is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER 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=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_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=y
+
+#
+# IrDA protocols
+#
+# CONFIG_IRLAN is not set
+# CONFIG_IRNET is not set
+# CONFIG_IRCOMM is not set
+# 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
+
+#
+# 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_MCS_FIR is not set
+# CONFIG_OMAP_IR 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_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_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_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
+
+#
+# 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_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_NETDEV_1000=y
+CONFIG_NETDEV_10000=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=y
+# CONFIG_PPP_MULTILINK is not set
+# 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=y
+CONFIG_SLIP_COMPRESSED=y
+CONFIG_SLHC=y
+# CONFIG_SLIP_SMART is not set
+# CONFIG_SLIP_MODE_SLIP6 is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=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_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=y
+CONFIG_SERIO_SERPORT=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=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_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_OMAP_WATCHDOG is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_HW_RANDOM=m
+CONFIG_HW_RANDOM_OMAP=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_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
+
+#
+# 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_ISP1301_OMAP=m
+CONFIG_TPS65010=y
+# CONFIG_SENSORS_TLV320AIC23 is not set
+CONFIG_GPIOEXPANDER_OMAP=y
+# 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_OMAP_UWIRE=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_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_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_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_SENSORS_TSC210X 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_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_VIDEO_OMAP_CAMERA 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 is not set
+# 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=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX 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_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 is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+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_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG 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 is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=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
+
+#
+# Enable Host or Gadget support to see Inventra options
+#
+# CONFIG_USB_MUSB_HDRC 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_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 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
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_OMAP=y
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# 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_OMAP=y
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# CBUS support
+#
+# CONFIG_CBUS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+# CONFIG_EXT2_FS_POSIX_ACL is not set
+# CONFIG_EXT2_FS_SECURITY is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+CONFIG_ROMFS_FS=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# 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_SYSCTL=y
+CONFIG_SYSFS=y
+# CONFIG_TMPFS 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_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=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_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_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_LL 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=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_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-omap-pm-2.6.29/omap2420h4/defconfig b/recipes/linux/linux-omap-pm-2.6.29/omap2420h4/defconfig
new file mode 100644
index 0000000000..c1133eef9a
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/omap2420h4/defconfig
@@ -0,0 +1,1119 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc2-omap1
+# Tue Aug 21 22:58:34 2007
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_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_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+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_ALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_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_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA 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
+
+#
+# TI OMAP Implementations
+#
+CONFIG_ARCH_OMAP_OTG=y
+# CONFIG_ARCH_OMAP1 is not set
+CONFIG_ARCH_OMAP2=y
+# CONFIG_ARCH_OMAP3 is not set
+
+#
+# OMAP Feature Selections
+#
+CONFIG_OMAP_DEBUG_DEVICES=y
+# CONFIG_OMAP_RESET_CLOCKS is not set
+CONFIG_OMAP_BOOT_TAG=y
+# CONFIG_OMAP_BOOT_REASON is not set
+# CONFIG_OMAP_COMPONENT_VERSION is not set
+# CONFIG_OMAP_GPIO_SWITCH is not set
+CONFIG_OMAP_MUX=y
+CONFIG_OMAP_MUX_DEBUG=y
+CONFIG_OMAP_MUX_WARNINGS=y
+# CONFIG_OMAP_STI 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=y
+# CONFIG_OMAP_32K_TIMER is not set
+CONFIG_OMAP_DM_TIMER=y
+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
+# CONFIG_OMAP_DSP is not set
+# CONFIG_MACH_OMAP_GENERIC is not set
+
+#
+# OMAP Core Type
+#
+CONFIG_ARCH_OMAP24XX=y
+CONFIG_ARCH_OMAP2420=y
+# CONFIG_ARCH_OMAP2430 is not set
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_NOKIA_N800 is not set
+CONFIG_MACH_OMAP_H4=y
+# CONFIG_MACH_OMAP_H4_TUSB is not set
+# CONFIG_MACH_OMAP_H4_OTG is not set
+# CONFIG_MACH_OMAP2_H4_USB1 is not set
+# CONFIG_MACH_OMAP_APOLLON is not set
+# CONFIG_MACH_OMAP_APOLLON_PLUS is not set
+# CONFIG_MACH_OMAP_2430SDP is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_V6=y
+# CONFIG_CPU_32v6K is not set
+CONFIG_CPU_32v6=y
+CONFIG_CPU_ABRT_EV6=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_V6=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_TLB_V6=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_OUTER_CACHE 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=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=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="root=/dev/ram0 rw console=ttyS0,115200n8 initrd=0x80600000,8M ramdisk_size=8192"
+# 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=y
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+CONFIG_NET_KEY=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=y
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=y
+CONFIG_IRCOMM=y
+# 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
+#
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+CONFIG_OMAP_IR=y
+# 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_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
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_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=16384
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH 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_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_NETDEV_1000=y
+CONFIG_NETDEV_10000=y
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=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_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=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_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_OMAP_WATCHDOG=y
+CONFIG_HW_RANDOM=m
+CONFIG_HW_RANDOM_OMAP=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_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_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_ISP1301_OMAP is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_TLV320AIC23 is not set
+CONFIG_GPIOEXPANDER_OMAP=y
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+CONFIG_MENELAUS=y
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_HWMON is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_NEW_LEDS is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# 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_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_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 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 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'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_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_OMAP=y
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# 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_JBD_DEBUG is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=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 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 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS 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_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 is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS 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_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+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 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW 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 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+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/recipes/linux/linux-omap-pm-2.6.29/omap2430sdp/defconfig b/recipes/linux/linux-omap-pm-2.6.29/omap2430sdp/defconfig
new file mode 100644
index 0000000000..f3897e48a3
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/omap2430sdp/defconfig
@@ -0,0 +1,1303 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc2-omap1
+# Sun Aug 12 17:38:46 2007
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=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_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+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 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_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_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA 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
+
+#
+# TI OMAP Implementations
+#
+# CONFIG_ARCH_OMAP1 is not set
+CONFIG_ARCH_OMAP2=y
+# CONFIG_ARCH_OMAP3 is not set
+
+#
+# OMAP Feature Selections
+#
+# CONFIG_OMAP_RESET_CLOCKS is not set
+CONFIG_OMAP_BOOT_TAG=y
+# CONFIG_OMAP_BOOT_REASON is not set
+# CONFIG_OMAP_COMPONENT_VERSION 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 is not set
+# CONFIG_OMAP_STI 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=y
+# CONFIG_OMAP_32K_TIMER is not set
+CONFIG_OMAP_DM_TIMER=y
+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
+# CONFIG_OMAP_DSP is not set
+# CONFIG_MACH_OMAP_GENERIC is not set
+
+#
+# OMAP Core Type
+#
+CONFIG_ARCH_OMAP24XX=y
+# CONFIG_ARCH_OMAP2420 is not set
+CONFIG_ARCH_OMAP2430=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_NOKIA_N800 is not set
+# CONFIG_MACH_OMAP_H4 is not set
+# CONFIG_MACH_OMAP_APOLLON is not set
+# CONFIG_MACH_OMAP_APOLLON_PLUS is not set
+CONFIG_MACH_OMAP_2430SDP=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_V6=y
+# CONFIG_CPU_32v6K is not set
+CONFIG_CPU_32v6=y
+CONFIG_CPU_ABRT_EV6=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_V6=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_TLB_V6=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_OUTER_CACHE 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=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=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="root=/dev/ram0 rw console=ttyS0,115200n8 initrd=0x80600000,8M ramdisk_size=8192"
+# 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=y
+
+#
+# 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_APM_EMULATION is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+CONFIG_NET_KEY=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# 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
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_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
+
+#
+# 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_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH 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=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 is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+CONFIG_NETDEV_1000=y
+CONFIG_NETDEV_10000=y
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 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 is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=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 is not set
+CONFIG_KEYBOARD_TWL4030=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_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_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_TSC2102 is not set
+# CONFIG_TOUCHSCREEN_TSC210X 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_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_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
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_OMAP=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 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
+# 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_TPS65010 is not set
+# CONFIG_SENSORS_TLV320AIC23 is not set
+# CONFIG_GPIOEXPANDER_OMAP is not set
+# CONFIG_MENELAUS is not set
+CONFIG_TWL4030_CORE=y
+CONFIG_TWL4030_GPIO=y
+# 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 is not set
+# CONFIG_SPI_OMAP24XX is not set
+
+#
+# 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_W1 is not set
+# CONFIG_HWMON is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_NEW_LEDS is not set
+
+#
+# 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_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_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_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 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 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=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_PERSIST is not set
+CONFIG_USB_OTG=y
+CONFIG_USB_OTG_WHITELIST=y
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+CONFIG_USB_MUSB_HDRC=m
+CONFIG_USB_MUSB_SOC=y
+
+#
+# OMAP 243x high speed USB support
+#
+# CONFIG_USB_MUSB_HOST is not set
+# CONFIG_USB_MUSB_PERIPHERAL is not set
+CONFIG_USB_MUSB_OTG=y
+CONFIG_USB_GADGET_MUSB_HDRC=y
+CONFIG_USB_MUSB_HDRC_HCD=y
+# CONFIG_USB_INVENTRA_FIFO is not set
+CONFIG_USB_INVENTRA_DMA=y
+# CONFIG_USB_TI_CPPI_DMA is not set
+CONFIG_USB_INVENTRA_HCD_LOGGING=1
+
+#
+# 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_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
+#
+
+#
+# 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
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG is not set
+CONFIG_USB_GADGET_DEBUG_FILES=y
+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_ZERO_HNPTEST 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_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_OMAP=y
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# 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_JBD_DEBUG is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=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=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 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS 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=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=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 is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+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 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW 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 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+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/recipes/linux/linux-omap-pm-2.6.29/omap3-pandora/defconfig b/recipes/linux/linux-omap-pm-2.6.29/omap3-pandora/defconfig
new file mode 100644
index 0000000000..5db83f08da
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/omap3-pandora/defconfig
@@ -0,0 +1,2186 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.28-rc7-omap1
+# Fri Dec 12 19:50:40 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_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_OPROFILE_ARMV7=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=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=y
+CONFIG_IKCONFIG_PROC=y
+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=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+# CONFIG_COMPAT_BRK is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+CONFIG_TRACEPOINTS=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=y
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+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
+# CONFIG_BLK_DEV_INTEGRITY 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
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 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_MSM 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_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN 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 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=y
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_DSS_DEBUG=y
+# CONFIG_OMAP2_DSS_RFBI is not set
+CONFIG_OMAP2_DSS_VENC=y
+# CONFIG_OMAP2_DSS_SDI is not set
+CONFIG_OMAP2_DSS_DSI=y
+# CONFIG_OMAP2_DSS_USE_DSI_PLL is not set
+# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
+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 is not set
+# CONFIG_MACH_OMAP3_BEAGLE is not set
+# CONFIG_MACH_OVERO is not set
+CONFIG_MACH_OMAP3_PANDORA=y
+CONFIG_OMAP_TICK_GPTIMER=12
+
+#
+# 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=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_HAS_TLS_REG=y
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT=y
+CONFIG_HZ=128
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_LEDS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=" debug "
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+# CONFIG_CPU_IDLE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_NEON=y
+CONFIG_ARM_ERRATUM_451034=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=y
+
+#
+# Power management options
+#
+CONFIG_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
+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=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP 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 is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=y
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
+CONFIG_BT_RFCOMM=y
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=y
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=y
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=y
+CONFIG_BT_HCIUSB_SCO=y
+# CONFIG_BT_HCIBTUSB is not set
+CONFIG_BT_HCIBTSDIO=y
+# CONFIG_BT_HCIUART is not set
+CONFIG_BT_HCIBCM203X=y
+CONFIG_BT_HCIBPA10X=y
+# 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
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=y
+CONFIG_NL80211=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_MAC80211=y
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_PID=y
+# CONFIG_MAC80211_RC_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT="pid"
+# CONFIG_MAC80211_MESH is not set
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+CONFIG_IEEE80211=y
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=y
+CONFIG_IEEE80211_CRYPT_CCMP=y
+CONFIG_IEEE80211_CRYPT_TKIP=y
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_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 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=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_GPIO is not set
+CONFIG_MTD_NAND_OMAP2=y
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+CONFIG_MTD_NAND_PLATFORM=y
+# CONFIG_MTD_ALAUDA is not set
+CONFIG_MTD_ONENAND=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=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+# CONFIG_BLK_DEV_XIP is not set
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+CONFIG_EEPROM_93CX6=m
+# CONFIG_ICS932S401 is not set
+# CONFIG_OMAP_STI is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=m
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR 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_DH is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID5_RESHAPE=y
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_DELAY=m
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+# 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=y
+
+#
+# MII PHY device drivers
+#
+CONFIG_MARVELL_PHY=y
+CONFIG_DAVICOM_PHY=y
+CONFIG_QSEMI_PHY=y
+CONFIG_LXT_PHY=y
+CONFIG_CICADA_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_SMSC_PHY=y
+CONFIG_BROADCOM_PHY=y
+# CONFIG_ICPLUS_PHY is not set
+CONFIG_REALTEK_PHY=y
+CONFIG_FIXED_PHY=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# 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_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_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=m
+# CONFIG_LIBERTAS_SDIO is not set
+# CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_LIBERTAS_THINFIRM is not set
+CONFIG_USB_ZD1201=m
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_RTL8187 is not set
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_P54_COMMON 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=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_CDCETHER=y
+CONFIG_USB_NET_DM9601=m
+# CONFIG_USB_NET_SMSC95XX 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=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 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=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=m
+# 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_TWL4030=y
+# CONFIG_KEYBOARD_LM8323 is not set
+CONFIG_KEYBOARD_GPIO=m
+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_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_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_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_TSC2005 is not set
+# CONFIG_TOUCHSCREEN_TSC210X is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+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
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_OMAP=y
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
+CONFIG_SENSORS_EEPROM=y
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_ISP1301_OMAP is not set
+# CONFIG_TPS65010 is not set
+CONFIG_TWL4030_MADC=m
+CONFIG_TWL4030_USB=y
+CONFIG_TWL4030_PWRBUTTON=y
+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
+# 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_TSC210X is not set
+# CONFIG_SPI_TSC2301 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=m
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_TWL4030_BCI_BATTERY is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 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_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_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_THERMAL is not set
+# CONFIG_THERMAL_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
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+CONFIG_TWL4030_CORE=y
+CONFIG_TWL4030_POWER=y
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C 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=m
+CONFIG_VIDEO_MEDIA=m
+
+#
+# Multimedia drivers
+#
+CONFIG_MEDIA_ATTACH=y
+CONFIG_MEDIA_TUNER=m
+# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
+CONFIG_MEDIA_TUNER_SIMPLE=m
+CONFIG_MEDIA_TUNER_TDA8290=m
+CONFIG_MEDIA_TUNER_TDA827X=m
+CONFIG_MEDIA_TUNER_TDA18271=m
+CONFIG_MEDIA_TUNER_TDA9887=m
+CONFIG_MEDIA_TUNER_TEA5761=m
+CONFIG_MEDIA_TUNER_TEA5767=m
+CONFIG_MEDIA_TUNER_MT20XX=m
+CONFIG_MEDIA_TUNER_MT2060=m
+CONFIG_MEDIA_TUNER_MT2266=m
+CONFIG_MEDIA_TUNER_QT1010=m
+CONFIG_MEDIA_TUNER_XC2028=m
+CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_MEDIA_TUNER_MXL5005S=m
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEO_TVEEPROM=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+CONFIG_VIDEO_MSP3400=m
+CONFIG_VIDEO_CS53L32A=m
+CONFIG_VIDEO_WM8775=m
+CONFIG_VIDEO_SAA711X=m
+CONFIG_VIDEO_CX25840=m
+CONFIG_VIDEO_CX2341X=m
+# 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_VIDEO_AU0828 is not set
+# CONFIG_SOC_CAMERA is not set
+CONFIG_V4L_USB_DRIVERS=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
+# CONFIG_USB_GSPCA is not set
+CONFIG_VIDEO_PVRUSB2=m
+CONFIG_VIDEO_PVRUSB2_SYSFS=y
+CONFIG_VIDEO_PVRUSB2_DVB=y
+# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
+# CONFIG_VIDEO_EM28XX is not set
+CONFIG_VIDEO_USBVISION=m
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_QUICKCAM_MESSENGER=m
+# CONFIG_USB_ET61X251 is not set
+CONFIG_VIDEO_OVCAMCHIP=m
+CONFIG_USB_W9968CF=m
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+CONFIG_USB_PWC=m
+# CONFIG_USB_PWC_DEBUG is not set
+CONFIG_USB_ZR364XX=m
+# CONFIG_USB_STKWEBCAM is not set
+# CONFIG_USB_S2255 is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_USB_DSBR is not set
+# CONFIG_USB_SI470X is not set
+# CONFIG_USB_MR800 is not set
+CONFIG_DVB_CAPTURE_DRIVERS=y
+# CONFIG_TTPCI_EEPROM is not set
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_USB=m
+# CONFIG_DVB_USB_DEBUG is not set
+CONFIG_DVB_USB_A800=m
+CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
+CONFIG_DVB_USB_DIBUSB_MC=m
+CONFIG_DVB_USB_DIB0700=m
+CONFIG_DVB_USB_UMT_010=m
+CONFIG_DVB_USB_CXUSB=m
+CONFIG_DVB_USB_M920X=m
+CONFIG_DVB_USB_GL861=m
+CONFIG_DVB_USB_AU6610=m
+CONFIG_DVB_USB_DIGITV=m
+CONFIG_DVB_USB_VP7045=m
+CONFIG_DVB_USB_VP702X=m
+CONFIG_DVB_USB_GP8PSK=m
+CONFIG_DVB_USB_NOVA_T_USB2=m
+CONFIG_DVB_USB_TTUSB2=m
+CONFIG_DVB_USB_DTT200U=m
+CONFIG_DVB_USB_OPERA1=m
+CONFIG_DVB_USB_AF9005=m
+CONFIG_DVB_USB_AF9005_REMOTE=m
+# CONFIG_DVB_USB_DW2102 is not set
+# CONFIG_DVB_USB_CINERGY_T2 is not set
+# CONFIG_DVB_USB_ANYSEE is not set
+# CONFIG_DVB_USB_DTV5100 is not set
+# CONFIG_DVB_USB_AF9015 is not set
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+# CONFIG_DVB_SIANO_SMS1XXX is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+# CONFIG_DVB_B2C2_FLEXCOP is not set
+
+#
+# Supported DVB Frontends
+#
+
+#
+# Customise DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+
+#
+# DVB-S (satellite) frontends
+#
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_S5H1420=m
+# CONFIG_DVB_STV0288 is not set
+# CONFIG_DVB_STB6000 is not set
+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
+# CONFIG_DVB_CX24116 is not set
+# CONFIG_DVB_SI21XX is not set
+
+#
+# DVB-T (terrestrial) frontends
+#
+CONFIG_DVB_SP8870=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_CX22700=m
+CONFIG_DVB_CX22702=m
+# CONFIG_DVB_DRX397XD is not set
+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
+
+#
+# DVB-C (cable) frontends
+#
+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_DVB_LGS8GL5 is not set
+
+#
+# Tools to develop new frontends
+#
+# CONFIG_DVB_DUMMY_FE is not set
+# CONFIG_DVB_AF9013 is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=14
+CONFIG_FB_OMAP2=y
+# CONFIG_FB_OMAP2_DEBUG is not set
+# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
+CONFIG_FB_OMAP2_NUM_FBS=3
+
+#
+# OMAP2/3 Display Device Drivers
+#
+CONFIG_PANEL_DVI=y
+# CONFIG_PANEL_DVI_640X480 is not set
+# CONFIG_PANEL_DVI_800X600 is not set
+CONFIG_PANEL_DVI_1024X768=y
+# CONFIG_PANEL_DVI_1280X1024 is not set
+CONFIG_PANEL_SHARP_LS037V7DW01=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_LTV350QV=y
+CONFIG_LCD_ILI9320=y
+# CONFIG_LCD_TDO24M is not set
+CONFIG_LCD_VGG2432A4=y
+CONFIG_LCD_PLATFORM=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=y
+
+#
+# Display hardware drivers
+#
+
+#
+# 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
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+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=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 is not set
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+# CONFIG_SND_ARM is not set
+CONFIG_SND_SPI=y
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_USB_CAIAQ=m
+CONFIG_SND_USB_CAIAQ_INPUT=y
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+# 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_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_BRIGHT=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_DELL=y
+CONFIG_HID_EZKEY=y
+CONFIG_HID_GYRATION=y
+CONFIG_HID_LOGITECH=y
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
+CONFIG_HID_PANTHERLORD=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SONY=y
+CONFIG_HID_SUNPLUS=y
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF 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=y
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_EHCI_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SOC=y
+
+#
+# OMAP 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_DEBUG is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_WDM=m
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more 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_STORAGE_CYPRESS_ATACB is not set
+CONFIG_USB_LIBUSUAL=y
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_EZUSB=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_AIRCABLE=m
+CONFIG_USB_SERIAL_ARK3116=m
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_CH341=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_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=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_MOTOROLA=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_OTI6858=m
+CONFIG_USB_SERIAL_SPCP8X5=m
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_SERIAL_DEBUG=m
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# 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
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+CONFIG_USB_GADGET_M66592=y
+CONFIG_USB_M66592=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_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_USB_CDC_COMPOSITE is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+CONFIG_SDIO_UART=y
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+CONFIG_MMC_OMAP_HS=y
+CONFIG_MMC_SPI=y
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_OMAP_DEBUG is not set
+# CONFIG_LEDS_OMAP is not set
+# CONFIG_LEDS_OMAP_PWM is not set
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_PCA955X is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT 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_TWL4030=y
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# 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_EXT4_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
+# CONFIG_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=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+# CONFIG_NTFS_RW is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL 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=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=m
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS 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
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=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=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_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_STACKTRACE=y
+# 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_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_LATENCYTOP=y
+CONFIG_NOP_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACER_MAX_TRACE=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+CONFIG_PREEMPT_TRACER=y
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS 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_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_XOR_BLOCKS=m
+CONFIG_ASYNC_CORE=m
+CONFIG_ASYNC_MEMCPY=m
+CONFIG_ASYNC_XOR=m
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_CRYPTD=m
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_TEST=m
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_XCBC=m
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+# CONFIG_CRYPTO_SALSA20 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 is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC16=m
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+CONFIG_LIBCRC32C=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-omap-pm-2.6.29/omap3evm/defconfig b/recipes/linux/linux-omap-pm-2.6.29/omap3evm/defconfig
new file mode 100644
index 0000000000..7a90a53edb
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/omap3evm/defconfig
@@ -0,0 +1,2217 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.28-omap1
+# Fri Feb 27 17:50:51 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_OPROFILE_ARMV7=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=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=y
+CONFIG_IKCONFIG_PROC=y
+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=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+# CONFIG_COMPAT_BRK is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+CONFIG_TRACEPOINTS=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=y
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+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
+# CONFIG_BLK_DEV_INTEGRITY 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
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 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_MSM 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_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN 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 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_OMAP3_DEBOBS is not set
+CONFIG_OMAP_32K_TIMER_HZ=128
+CONFIG_OMAP_TICK_GPTIMER=12
+CONFIG_OMAP_DM_TIMER=y
+CONFIG_OMAP_LL_DEBUG_UART1=y
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+# CONFIG_OMAP_PM_NONE is not set
+CONFIG_OMAP_PM_NOOP=y
+# CONFIG_OMAP_PM_SRF is not set
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
+# CONFIG_OMAP2_DSS_RFBI is not set
+CONFIG_OMAP2_DSS_VENC=y
+# CONFIG_OMAP2_DSS_SDI is not set
+CONFIG_OMAP2_DSS_DSI=y
+CONFIG_OMAP2_DSS_USE_DSI_PLL=y
+# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
+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
+# CONFIG_MACH_OVERO is not set
+# CONFIG_MACH_OMAP3_PANDORA 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=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_HAS_TLS_REG=y
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PREEMPT=y
+CONFIG_HZ=128
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_LEDS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=" debug "
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_DEBUG=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_NEON=y
+CONFIG_ARM_ERRATUM_451034=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_HAVE_AOUT=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=y
+
+#
+# Power management options
+#
+CONFIG_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
+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=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP 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 is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=y
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
+CONFIG_BT_RFCOMM=y
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=y
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=y
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=y
+CONFIG_BT_HCIUSB_SCO=y
+# CONFIG_BT_HCIBTUSB is not set
+CONFIG_BT_HCIBTSDIO=y
+# CONFIG_BT_HCIUART is not set
+CONFIG_BT_HCIBCM203X=y
+CONFIG_BT_HCIBPA10X=y
+# 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
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=y
+CONFIG_NL80211=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_MAC80211=y
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_PID=y
+# CONFIG_MAC80211_RC_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT="pid"
+# CONFIG_MAC80211_MESH is not set
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+CONFIG_IEEE80211=y
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=y
+CONFIG_IEEE80211_CRYPT_CCMP=y
+CONFIG_IEEE80211_CRYPT_TKIP=y
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_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 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=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_GPIO is not set
+CONFIG_MTD_NAND_OMAP2=y
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+CONFIG_MTD_NAND_PLATFORM=y
+# CONFIG_MTD_ALAUDA is not set
+CONFIG_MTD_ONENAND=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=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+# CONFIG_MTD_UBI_GLUEBI is not set
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_DEBUG is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+# CONFIG_BLK_DEV_XIP is not set
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+CONFIG_EEPROM_93CX6=m
+# CONFIG_ICS932S401 is not set
+# CONFIG_OMAP_STI is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=m
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR 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_DH is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID5_RESHAPE=y
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_DELAY=m
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+# 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=y
+
+#
+# MII PHY device drivers
+#
+CONFIG_MARVELL_PHY=y
+CONFIG_DAVICOM_PHY=y
+CONFIG_QSEMI_PHY=y
+CONFIG_LXT_PHY=y
+CONFIG_CICADA_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_SMSC_PHY=y
+CONFIG_BROADCOM_PHY=y
+# CONFIG_ICPLUS_PHY is not set
+CONFIG_REALTEK_PHY=y
+CONFIG_FIXED_PHY=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# 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_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_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=m
+# CONFIG_LIBERTAS_SDIO is not set
+# CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_LIBERTAS_THINFIRM is not set
+CONFIG_USB_ZD1201=m
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_RTL8187 is not set
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_P54_COMMON 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=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_CDCETHER=y
+CONFIG_USB_NET_DM9601=m
+# CONFIG_USB_NET_SMSC95XX 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=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 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=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=m
+# 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_TWL4030=y
+# CONFIG_KEYBOARD_LM8323 is not set
+CONFIG_KEYBOARD_GPIO=m
+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_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_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_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_TSC2005 is not set
+# CONFIG_TOUCHSCREEN_TSC210X is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+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
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_OMAP=y
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
+CONFIG_SENSORS_EEPROM=y
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+CONFIG_TWL4030_MADC=m
+CONFIG_TWL4030_PWRBUTTON=y
+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
+# 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_TSC210X is not set
+# CONFIG_SPI_TSC2301 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=m
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_TWL4030_BCI_BATTERY is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 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_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_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_THERMAL is not set
+# CONFIG_THERMAL_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
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+CONFIG_TWL4030_CORE=y
+CONFIG_TWL4030_POWER=y
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C 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=m
+CONFIG_VIDEO_MEDIA=m
+
+#
+# Multimedia drivers
+#
+CONFIG_MEDIA_ATTACH=y
+CONFIG_MEDIA_TUNER=m
+# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
+CONFIG_MEDIA_TUNER_SIMPLE=m
+CONFIG_MEDIA_TUNER_TDA8290=m
+CONFIG_MEDIA_TUNER_TDA827X=m
+CONFIG_MEDIA_TUNER_TDA18271=m
+CONFIG_MEDIA_TUNER_TDA9887=m
+CONFIG_MEDIA_TUNER_TEA5761=m
+CONFIG_MEDIA_TUNER_TEA5767=m
+CONFIG_MEDIA_TUNER_MT20XX=m
+CONFIG_MEDIA_TUNER_MT2060=m
+CONFIG_MEDIA_TUNER_MT2266=m
+CONFIG_MEDIA_TUNER_QT1010=m
+CONFIG_MEDIA_TUNER_XC2028=m
+CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_MEDIA_TUNER_MXL5005S=m
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEO_TVEEPROM=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+CONFIG_VIDEO_MSP3400=m
+CONFIG_VIDEO_CS53L32A=m
+CONFIG_VIDEO_WM8775=m
+CONFIG_VIDEO_SAA711X=m
+CONFIG_VIDEO_CX25840=m
+CONFIG_VIDEO_CX2341X=m
+# 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_VIDEO_AU0828 is not set
+# CONFIG_SOC_CAMERA is not set
+CONFIG_V4L_USB_DRIVERS=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
+# CONFIG_USB_GSPCA is not set
+CONFIG_VIDEO_PVRUSB2=m
+CONFIG_VIDEO_PVRUSB2_SYSFS=y
+CONFIG_VIDEO_PVRUSB2_DVB=y
+# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
+# CONFIG_VIDEO_EM28XX is not set
+CONFIG_VIDEO_USBVISION=m
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_QUICKCAM_MESSENGER=m
+# CONFIG_USB_ET61X251 is not set
+CONFIG_VIDEO_OVCAMCHIP=m
+CONFIG_USB_W9968CF=m
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+CONFIG_USB_PWC=m
+# CONFIG_USB_PWC_DEBUG is not set
+CONFIG_USB_ZR364XX=m
+# CONFIG_USB_STKWEBCAM is not set
+# CONFIG_USB_S2255 is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_USB_DSBR is not set
+# CONFIG_USB_SI470X is not set
+# CONFIG_USB_MR800 is not set
+CONFIG_DVB_CAPTURE_DRIVERS=y
+# CONFIG_TTPCI_EEPROM is not set
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_USB=m
+# CONFIG_DVB_USB_DEBUG is not set
+CONFIG_DVB_USB_A800=m
+CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
+CONFIG_DVB_USB_DIBUSB_MC=m
+CONFIG_DVB_USB_DIB0700=m
+CONFIG_DVB_USB_UMT_010=m
+CONFIG_DVB_USB_CXUSB=m
+CONFIG_DVB_USB_M920X=m
+CONFIG_DVB_USB_GL861=m
+CONFIG_DVB_USB_AU6610=m
+CONFIG_DVB_USB_DIGITV=m
+CONFIG_DVB_USB_VP7045=m
+CONFIG_DVB_USB_VP702X=m
+CONFIG_DVB_USB_GP8PSK=m
+CONFIG_DVB_USB_NOVA_T_USB2=m
+CONFIG_DVB_USB_TTUSB2=m
+CONFIG_DVB_USB_DTT200U=m
+CONFIG_DVB_USB_OPERA1=m
+CONFIG_DVB_USB_AF9005=m
+CONFIG_DVB_USB_AF9005_REMOTE=m
+# CONFIG_DVB_USB_DW2102 is not set
+# CONFIG_DVB_USB_CINERGY_T2 is not set
+# CONFIG_DVB_USB_ANYSEE is not set
+# CONFIG_DVB_USB_DTV5100 is not set
+# CONFIG_DVB_USB_AF9015 is not set
+CONFIG_DVB_TTUSB_BUDGET=m
+CONFIG_DVB_TTUSB_DEC=m
+# CONFIG_DVB_SIANO_SMS1XXX is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+# CONFIG_DVB_B2C2_FLEXCOP is not set
+
+#
+# Supported DVB Frontends
+#
+
+#
+# Customise DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+
+#
+# DVB-S (satellite) frontends
+#
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_S5H1420=m
+# CONFIG_DVB_STV0288 is not set
+# CONFIG_DVB_STB6000 is not set
+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
+# CONFIG_DVB_CX24116 is not set
+# CONFIG_DVB_SI21XX is not set
+
+#
+# DVB-T (terrestrial) frontends
+#
+CONFIG_DVB_SP8870=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_CX22700=m
+CONFIG_DVB_CX22702=m
+# CONFIG_DVB_DRX397XD is not set
+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
+
+#
+# DVB-C (cable) frontends
+#
+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_DVB_LGS8GL5 is not set
+
+#
+# Tools to develop new frontends
+#
+# CONFIG_DVB_DUMMY_FE is not set
+# CONFIG_DVB_AF9013 is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=14
+CONFIG_FB_OMAP2=y
+CONFIG_FB_OMAP2_DEBUG=y
+# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
+CONFIG_FB_OMAP2_NUM_FBS=3
+
+#
+# OMAP2/3 Display Device Drivers
+#
+CONFIG_PANEL_GENERIC=y
+CONFIG_PANEL_SHARP_LS037V7DW01=y
+# CONFIG_PANEL_N800 is not set
+# CONFIG_CTRL_BLIZZARD is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_LTV350QV=y
+CONFIG_LCD_ILI9320=y
+# CONFIG_LCD_TDO24M is not set
+CONFIG_LCD_VGG2432A4=y
+CONFIG_LCD_PLATFORM=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=y
+
+#
+# Display hardware drivers
+#
+
+#
+# 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
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+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=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 is not set
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+# CONFIG_SND_ARM is not set
+CONFIG_SND_SPI=y
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_USB_CAIAQ=m
+CONFIG_SND_USB_CAIAQ_INPUT=y
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_OMAP_SOC_MCBSP=y
+CONFIG_SND_OMAP_SOC_OMAP3EVM=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_TWL4030=y
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_BRIGHT=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_DELL=y
+CONFIG_HID_EZKEY=y
+CONFIG_HID_GYRATION=y
+CONFIG_HID_LOGITECH=y
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
+CONFIG_HID_PANTHERLORD=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SONY=y
+CONFIG_HID_SUNPLUS=y
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF 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=y
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_EHCI_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SOC=y
+
+#
+# OMAP 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_DEBUG is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_WDM=m
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more 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_STORAGE_CYPRESS_ATACB is not set
+CONFIG_USB_LIBUSUAL=y
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_EZUSB=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_AIRCABLE=m
+CONFIG_USB_SERIAL_ARK3116=m
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_CH341=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_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=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_MOTOROLA=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_OTI6858=m
+CONFIG_USB_SERIAL_SPCP8X5=m
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_SERIAL_DEBUG=m
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# 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
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+CONFIG_USB_GADGET_M66592=y
+CONFIG_USB_M66592=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_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_USB_CDC_COMPOSITE is not set
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+CONFIG_USB_GPIO_VBUS=y
+# CONFIG_ISP1301_OMAP is not set
+CONFIG_TWL4030_USB=y
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+CONFIG_SDIO_UART=y
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+CONFIG_MMC_OMAP_HS=y
+CONFIG_MMC_SPI=y
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_OMAP_DEBUG is not set
+# CONFIG_LEDS_OMAP is not set
+# CONFIG_LEDS_OMAP_PWM is not set
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_PCA955X is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT 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_TWL4030=y
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+# 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_EXT4_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+CONFIG_XFS_FS=m
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_POSIX_ACL is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
+# CONFIG_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=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+# CONFIG_NTFS_RW is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL 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=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_UBIFS_FS=y
+CONFIG_UBIFS_FS_XATTR=y
+CONFIG_UBIFS_FS_ADVANCED_COMPR=y
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+CONFIG_CRAMFS=m
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS 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
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=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=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_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_STACKTRACE=y
+# 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_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_LATENCYTOP=y
+CONFIG_NOP_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_TRACER_MAX_TRACE=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+CONFIG_PREEMPT_TRACER=y
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS 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_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_XOR_BLOCKS=m
+CONFIG_ASYNC_CORE=m
+CONFIG_ASYNC_MEMCPY=m
+CONFIG_ASYNC_XOR=m
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_CRYPTD=m
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_TEST=m
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_XCBC=m
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+# CONFIG_CRYPTO_SALSA20 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=y
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC16=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+CONFIG_LIBCRC32C=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-omap-pm-2.6.29/omap3evm/omap3evm-dss2.diff b/recipes/linux/linux-omap-pm-2.6.29/omap3evm/omap3evm-dss2.diff
new file mode 100644
index 0000000000..60832e72ca
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/omap3evm/omap3evm-dss2.diff
@@ -0,0 +1,443 @@
+From: hvaibhav@ti.com
+To: linux-fbdev-devel@lists.sourceforge.net, linux-omap@vger.kernel.org
+Cc: Vaibhav Hiremath <hvaibhav@ti.com>
+Subject: [REVIEW PATCH] Added OMAP3EVM support on Tomis FBDEV/DSS Patches
+Date: Fri, 14 Nov 2008 12:02:32 +0530
+
+From: Vaibhav Hiremath <hvaibhav@ti.com>
+
+Tested LCD, TV, DVI (480P) out on OMAP3EVM board.
+
+Please make sure that you change the option
+CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=7 and apply the
+Mans Rullgard clock patches to support set_rate and round_rate API.
+
+Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
+---
+ arch/arm/mach-omap2/board-omap3evm.c | 224 ++++++++++++++++++++++++++++++++--
+ drivers/video/omap2/Kconfig | 5 +
+ drivers/video/omap2/Makefile | 1 +
+ drivers/video/omap2/panel-omap3evm.c | 110 +++++++++++++++++
+ 5 files changed, 341 insertions(+), 53 deletions(-)
+ create mode 100644 drivers/video/omap2/panel-omap3evm.c
+
+diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
+index 42ab826..e244fa7 100644
+--- a/arch/arm/mach-omap2/board-omap3evm.c
++++ b/arch/arm/mach-omap2/board-omap3evm.c
+@@ -37,6 +37,8 @@
+ #include <mach/usb-ehci.h>
+ #include <mach/common.h>
+ #include <mach/mcspi.h>
++#include <mach/omapfb.h>
++#include <mach/display.h>
+
+ #include "sdram-micron-mt46h32m32lf-6.h"
+ #include "twl4030-generic-scripts.h"
+@@ -161,14 +163,215 @@ static int __init omap3_evm_i2c_init(void)
+ omap_register_i2c_bus(3, 400, NULL, 0);
+ return 0;
+ }
++static struct omap_fbmem_config evm_fbmem0_config = {
++ .size = 480*720*4,
++ .start = OMAPFB_MEMTYPE_SDRAM,
++};
+
+-static struct platform_device omap3_evm_lcd_device = {
+- .name = "omap3evm_lcd",
+- .id = -1,
++static struct omap_fbmem_config evm_fbmem1_config = {
++ .size = 480*720*4,
++ .start = OMAPFB_MEMTYPE_SDRAM,
+ };
+
+-static struct omap_lcd_config omap3_evm_lcd_config __initdata = {
+- .ctrl_name = "internal",
++static struct omap_fbmem_config evm_fbmem2_config = {
++ .size = 480*720*4,
++ .start = OMAPFB_MEMTYPE_SDRAM,
++};
++#define LCD_PANEL_LR 2
++#define LCD_PANEL_UD 3
++#define LCD_PANEL_INI 152
++#define LCD_PANEL_ENABLE_GPIO 153
++#define LCD_PANEL_QVGA 154
++#define LCD_PANEL_RESB 155
++
++#define ENABLE_VDAC_DEDICATED 0x03
++#define ENABLE_VDAC_DEV_GRP 0x20
++#define ENABLE_VPLL2_DEDICATED 0x05
++#define ENABLE_VPLL2_DEV_GRP 0xE0
++
++#define TWL4030_GPIODATA_IN3 0x03
++#define TWL4030_GPIODATA_DIR3 0x06
++#define TWL4030_VPLL2_DEV_GRP 0x33
++#define TWL4030_VPLL2_DEDICATED 0x36
++
++static int lcd_enabled;
++static int dvi_enabled;
++
++static void __init evm_display_init(void)
++{
++ int r;
++ r = gpio_request(LCD_PANEL_LR, "lcd_panel_lr");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_LR\n");
++ return;
++ }
++ r = gpio_request(LCD_PANEL_UD, "lcd_panel_ud");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_UD\n");
++ goto err_1;
++ }
++
++ r = gpio_request(LCD_PANEL_INI, "lcd_panel_ini");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_INI\n");
++ goto err_2;
++ }
++ r = gpio_request(LCD_PANEL_RESB, "lcd_panel_resb");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_RESB\n");
++ goto err_3;
++ }
++ r = gpio_request(LCD_PANEL_QVGA, "lcd_panel_qvga");
++ if (r) {
++ printk(KERN_ERR "failed to get LCD_PANEL_QVGA\n");
++ goto err_4;
++ }
++
++ gpio_direction_output(LCD_PANEL_LR, 0);
++ gpio_direction_output(LCD_PANEL_UD, 0);
++ gpio_direction_output(LCD_PANEL_INI, 0);
++ gpio_direction_output(LCD_PANEL_RESB, 0);
++ gpio_direction_output(LCD_PANEL_QVGA, 0);
++
++#define TWL_LED_LEDEN 0x00
++#define TWL_PWMA_PWMAON 0x00
++#define TWL_PWMA_PWMAOFF 0x01
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_LEDEN);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
++
++ gpio_direction_output(LCD_PANEL_RESB, 1);
++ gpio_direction_output(LCD_PANEL_INI, 1);
++ gpio_direction_output(LCD_PANEL_QVGA, 0);
++ gpio_direction_output(LCD_PANEL_LR, 1);
++ gpio_direction_output(LCD_PANEL_UD, 1);
++
++ return;
++
++err_4:
++ gpio_free(LCD_PANEL_RESB);
++err_3:
++ gpio_free(LCD_PANEL_INI);
++err_2:
++ gpio_free(LCD_PANEL_UD);
++err_1:
++ gpio_free(LCD_PANEL_LR);
++
++}
++
++static int panel_enable_lcd(struct omap_display *display)
++{
++ if (dvi_enabled) {
++ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
++ return -EINVAL;
++ }
++ if (omap_rev() > OMAP3430_REV_ES1_0) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
++ }
++ gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 0);
++ lcd_enabled = 1;
++ return 0;
++}
++
++static void panel_disable_lcd(struct omap_display *display)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
++ TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
++ TWL4030_VPLL2_DEV_GRP);
++ }
++ gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1);
++ lcd_enabled = 0;
++}
++
++static struct omap_display_data evm_display_data = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "lcd",
++ .panel_name = "panel-sdp3430",
++ .u.dpi.data_lines = 16,
++ .panel_enable = panel_enable_lcd,
++ .panel_disable = panel_disable_lcd,
++};
++
++static int panel_enable_tv(struct omap_display *display)
++{
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VDAC_DEDICATED, TWL4030_VDAC_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VDAC_DEV_GRP, TWL4030_VDAC_DEV_GRP);
++ return 0;
++}
++
++static void panel_disable_tv(struct omap_display *display)
++{
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
++ TWL4030_VDAC_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x00,
++ TWL4030_VDAC_DEV_GRP);
++}
++
++static struct omap_display_data evm_display_data_tv = {
++ .type = OMAP_DISPLAY_TYPE_VENC,
++ .name = "tv",
++ .u.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
++ .panel_enable = panel_enable_tv,
++ .panel_disable = panel_disable_tv,
++};
++
++
++static int panel_enable_dvi(struct omap_display *display)
++{
++ if (lcd_enabled) {
++ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
++ return -EINVAL;
++ }
++ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
++ TWL4030_GPIODATA_IN3);
++ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
++ TWL4030_GPIODATA_DIR3);
++ dvi_enabled = 1;
++
++ return 0;
++}
++
++static void panel_disable_dvi(struct omap_display *display)
++{
++ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
++ TWL4030_GPIODATA_IN3);
++ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
++ TWL4030_GPIODATA_DIR3);
++ dvi_enabled = 0;
++}
++
++
++static struct omap_display_data evm_display_data_dvi = {
++ .type = OMAP_DISPLAY_TYPE_DPI,
++ .name = "dvi",
++ .panel_name = "panel-dvi",
++ .u.dpi.data_lines = 24,
++ .panel_enable = panel_enable_dvi,
++ .panel_disable = panel_disable_dvi,
++};
++
++static struct omap_dss_platform_data evm_dss_data = {
++ .num_displays = 3,
++ .displays = {
++ &evm_display_data,
++ &evm_display_data_dvi,
++ &evm_display_data_tv,
++ }
++};
++static struct platform_device evm_dss_device = {
++ .name = "omap-dss",
++ .id = -1,
++ .dev = {
++ .platform_data = &evm_dss_data,
++ },
+ };
+
+ static void ads7846_dev_init(void)
+@@ -227,11 +430,13 @@ static void __init omap3_evm_init_irq(void)
+
+ static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
+ { OMAP_TAG_UART, &omap3_evm_uart_config },
+- { OMAP_TAG_LCD, &omap3_evm_lcd_config },
++ { OMAP_TAG_FBMEM, &evm_fbmem0_config },
++ { OMAP_TAG_FBMEM, &evm_fbmem1_config },
++ { OMAP_TAG_FBMEM, &evm_fbmem2_config },
+ };
+
+ static struct platform_device *omap3_evm_devices[] __initdata = {
+- &omap3_evm_lcd_device,
++ &evm_dss_device,
+ &omap3evm_smc911x_device,
+ };
+
+@@ -250,8 +455,6 @@ static void __init omap3_evm_init(void)
+ omap3_evm_i2c_init();
+
+ platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));
+- omap_board_config = omap3_evm_config;
+- omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
+
+ spi_register_board_info(omap3evm_spi_board_info,
+ ARRAY_SIZE(omap3evm_spi_board_info));
+@@ -262,10 +465,13 @@ static void __init omap3_evm_init(void)
+ usb_ehci_init();
+ omap3evm_flash_init();
+ ads7846_dev_init();
++ evm_display_init();
+ }
+
+ static void __init omap3_evm_map_io(void)
+ {
++ omap_board_config = omap3_evm_config;
++ omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
+ omap2_set_globals_343x();
+ omap2_map_common_io();
+ }
+diff --git a/drivers/video/omap2/Kconfig b/drivers/video/omap2/Kconfig
+index 95691ad..8211ffd 100644
+--- a/drivers/video/omap2/Kconfig
++++ b/drivers/video/omap2/Kconfig
+@@ -51,4 +51,9 @@ config PANEL_SDP3430
+ help
+ SDP3430 LCD
+
++config PANEL_OMAP3EVM
++ tristate "OMAP3EVM Panel"
++ depends on OMAP2_DSS
++ help
++ OMAP3EVM LCD Panel
+ endmenu
+diff --git a/drivers/video/omap2/Makefile b/drivers/video/omap2/Makefile
+index 73ab1c0..668e8c6 100644
+--- a/drivers/video/omap2/Makefile
++++ b/drivers/video/omap2/Makefile
+@@ -3,3 +3,4 @@ omapfb-y := omapfb-main.o omapfb-sysfs.o omapfb-ioctl.o
+
+ obj-$(CONFIG_PANEL_DVI) += panel-dvi.o
+ obj-$(CONFIG_PANEL_SDP3430) += panel-sdp3430.o
++obj-$(CONFIG_PANEL_OMAP3EVM) += panel-omap3evm.o
+diff --git a/drivers/video/omap2/panel-omap3evm.c b/drivers/video/omap2/panel-omap3evm.c
+new file mode 100644
+index 0000000..4a00b02
+--- /dev/null
++++ b/drivers/video/omap2/panel-omap3evm.c
+@@ -0,0 +1,110 @@
++/*
++ * LCD panel support for the TI OMAP3EVM board
++ *
++ * Copyright (C) 2008 Texas Instruments, Inc.
++ * Author: Vaibhav Hiremath <hvaibhav@ti.com>
++ *
++ * Derived from drivers/video/omap2/panel-sdp3430.c
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published by
++ * the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
++ * more details.
++ *
++ * You should have received a copy of the GNU General Public License along with
++ * this program. If not, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <linux/module.h>
++#include <linux/delay.h>
++
++#include <mach/display.h>
++
++static int omap3evm_panel_init(struct omap_display *display)
++{
++ return 0;
++}
++
++static void omap3evm_panel_cleanup(struct omap_display *display)
++{
++}
++
++static int omap3evm_panel_enable(struct omap_display *display)
++{
++ int r = 0;
++
++ if (display->hw_config.panel_enable)
++ r = display->hw_config.panel_enable(display);
++
++ return r;
++}
++
++static void omap3evm_panel_disable(struct omap_display *display)
++{
++ if (display->hw_config.panel_disable)
++ display->hw_config.panel_disable(display);
++}
++
++static int omap3evm_panel_suspend(struct omap_display *display)
++{
++ omap3evm_panel_disable(display);
++ return 0;
++}
++
++static int omap3evm_panel_resume(struct omap_display *display)
++{
++ return omap3evm_panel_enable(display);
++}
++
++static struct omap_panel omap3evm_panel = {
++ .owner = THIS_MODULE,
++ .name = "panel-evm",
++ .init = omap3evm_panel_init,
++ .cleanup = omap3evm_panel_cleanup,
++ .enable = omap3evm_panel_enable,
++ .disable = omap3evm_panel_disable,
++ .suspend = omap3evm_panel_suspend,
++ .resume = omap3evm_panel_resume,
++ /*.set_mode = omap3evm_set_mode, */
++
++ .timings = {
++ .pixel_clock = 26000,
++
++ .hsw = 4,
++ .hfp = 4,
++ .hbp = 40,
++
++ .vsw = 2,
++ .vfp = 2,
++ .vbp = 7,
++ },
++
++ .acb = 0x28,
++
++ .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
++ OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
++
++ .x_res = 480,
++ .y_res = 640,
++ .bpp = 18,
++};
++
++
++static int __init omap3evm_panel_drv_init(void)
++{
++ omap_dss_register_panel(&omap3evm_panel);
++ return 0;
++}
++
++static void __exit omap3evm_panel_drv_exit(void)
++{
++ omap_dss_unregister_panel(&omap3evm_panel);
++}
++
++module_init(omap3evm_panel_drv_init);
++module_exit(omap3evm_panel_drv_exit);
++MODULE_LICENSE("GPL");
+--
+1.5.6
+
+--
+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/recipes/linux/linux-omap-pm-2.6.29/omap3evm/omap3evm-lcd-redtint.diff b/recipes/linux/linux-omap-pm-2.6.29/omap3evm/omap3evm-lcd-redtint.diff
new file mode 100644
index 0000000000..54ea3c9f68
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/omap3evm/omap3evm-lcd-redtint.diff
@@ -0,0 +1,66 @@
+Message-ID: <c656a4d20809270046u341aec27k6d896d4b42e799d4@mail.gmail.com>
+Date: Sat, 27 Sep 2008 03:46:18 -0400
+From: "arun c" <arun.edarath@gmail.com>
+To: "Daniel Schaeffer" <daniel.schaeffer@timesys.com>
+Subject: Re: OMAP3EVM LCD red tint
+
+Hi Daniel Schaeffer
+
+On Fri, Sep 26, 2008 at 4:20 PM, Daniel Schaeffer
+<daniel.schaeffer@timesys.com> wrote:
+> Has anyone looked into why the LCD display on the OMAP3EVM is always tinted
+> red? I created a couple of color test images that I cat'ed to /dev/fb and it
+> looks like the blue color channel is completely ignored. I was testing on
+> v2.6.26-omap2 but is doesn't look like there have been any changes to the fb
+> driver since then so I'm assuming the issue is also present in the head of
+> the git tree.
+>
+> Regards,
+>
+> Daniel Schaeffer
+>
+
+Try the patch below(Remember that you may have to manually edit because
+this patch is against current HEAD)
+
+
+diff --git a/drivers/video/omap/lcd_omap3evm.c
+b/drivers/video/omap/lcd_omap3evm.c
+index a564ca5..821bafe 100644
+--- a/drivers/video/omap/lcd_omap3evm.c
++++ b/drivers/video/omap/lcd_omap3evm.c
+@@ -44,6 +44,8 @@
+ #define ENABLE_VDAC_DEV_GRP 0x20
+ #define ENABLE_VPLL2_DEDICATED 0x05
+ #define ENABLE_VPLL2_DEV_GRP 0xE0
++#define TWL4030_VPLL2_DEV_GRP 0x33
++#define TWL4030_VPLL2_DEDICATED 0x36
+
+ #define TWL_LED_LEDEN 0x00
+ #define TWL_PWMA_PWMAON 0x00
+@@ -86,12 +88,24 @@ static void omap3evm_panel_cleanup(struct lcd_panel *panel)
+
+ static int omap3evm_panel_enable(struct lcd_panel *panel)
+ {
++ if (omap_rev > OMAP3430_REV_ES1_0) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
++ }
+ omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 0);
+ return 0;
+ }
+
+ static void omap3evm_panel_disable(struct lcd_panel *panel)
+ {
++ if (omap_rev > OMAP3430_REV_ES1_0) {
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
++ TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
++ TWL4030_VPLL2_DEV_GRP);
++ }
+ omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 1);
+ }
+
+
diff --git a/recipes/linux/linux-omap-pm-2.6.29/omap5912osk/defconfig b/recipes/linux/linux-omap-pm-2.6.29/omap5912osk/defconfig
new file mode 100644
index 0000000000..3c334868ea
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/omap5912osk/defconfig
@@ -0,0 +1,1098 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc2-omap1
+# Tue Aug 21 23:22:37 2007
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_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_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+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 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_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_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA 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
+
+#
+# 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_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_STI 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 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
+# CONFIG_OMAP_DSP is not set
+
+#
+# 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
+# CONFIG_MACH_OMAP_APOLLON_PLUS 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
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+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 is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+# 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_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_APM_EMULATION is not set
+
+#
+# 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_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_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=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_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_IDE=m
+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_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_IDE_GENERIC is not set
+# CONFIG_IDEPCI_PCIBUS_ORDER is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI 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_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_NETDEV_1000=y
+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_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_OMAP=y
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO 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_WATCHDOG 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_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_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_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_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ABITUGURU3 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_DME1737 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_NEW_LEDS is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# 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 is not set
+# 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=y
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX 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_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=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_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'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# 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 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_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=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_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=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
+
+#
+# Native Language Support
+#
+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
+
+#
+# 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_SLUB_DEBUG_ON is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_FRAME_POINTER=y
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-omap-pm-2.6.29/overo-cpufreq.diff b/recipes/linux/linux-omap-pm-2.6.29/overo-cpufreq.diff
new file mode 100644
index 0000000000..a51d8560e1
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/overo-cpufreq.diff
@@ -0,0 +1,25 @@
+--- /tmp/board-overo.c 2009-04-23 12:46:21.000000000 +0200
++++ git/arch/arm/mach-omap2/board-overo.c 2009-04-23 12:46:31.000000000 +0200
+@@ -48,6 +48,12 @@
+ #include <mach/nand.h>
+ #include <mach/usb.h>
+
++#include <mach/omap-pm.h>
++#include <mach/clock.h>
++
++#include "pm.h"
++#include "omap3-opp.h"
++
+ #include "sdram-micron-mt46h32m32lf-6.h"
+ #include "twl4030-generic-scripts.h"
+ #include "mmc-twl4030.h"
+@@ -359,7 +365,8 @@
+
+ static void __init overo_init_irq(void)
+ {
+- omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL, NULL, NULL);
++ omap2_init_common_hw(mt46h32m32lf6_sdrc_params, omap3_mpu_rate_table,
++ omap3_dsp_rate_table, omap3_l3_rate_table);
+ omap_init_irq();
+ omap_gpio_init();
+ }
diff --git a/recipes/linux/linux-omap-pm-2.6.29/overo/defconfig b/recipes/linux/linux-omap-pm-2.6.29/overo/defconfig
new file mode 100644
index 0000000000..3d025659e3
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/overo/defconfig
@@ -0,0 +1,2250 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.29-omap1
+# Tue Apr 28 18:41:30 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_OPROFILE_ARMV7=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 is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+# CONFIG_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+CONFIG_RELAY=y
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+CONFIG_TRACEPOINTS=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=y
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_IO_TRACE=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_FREEZER=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 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_POWERDOMAIN is not set
+# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
+CONFIG_OMAP_SMARTREFLEX=y
+# CONFIG_OMAP_SMARTREFLEX_TESTING 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_MBOX_FWK is not set
+# CONFIG_OMAP_MPU_TIMER is not set
+CONFIG_OMAP_32K_TIMER=y
+# CONFIG_OMAP3_DEBOBS is not set
+CONFIG_OMAP_32K_TIMER_HZ=128
+CONFIG_OMAP_TICK_GPTIMER=1
+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_PM_NONE is not set
+# CONFIG_OMAP_PM_NOOP is not set
+CONFIG_OMAP_PM_SRF=y
+CONFIG_ARCH_OMAP34XX=y
+CONFIG_ARCH_OMAP3430=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_NOKIA_RX51 is not set
+# CONFIG_MACH_OMAP_LDP is not set
+# CONFIG_MACH_OMAP_3430SDP is not set
+# CONFIG_MACH_OMAP3EVM is not set
+# CONFIG_MACH_OMAP3_BEAGLE is not set
+CONFIG_MACH_OVERO=y
+# CONFIG_MACH_OMAP3_PANDORA is not set
+
+#
+# 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=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_HAS_TLS_REG=y
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=128
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=" debug "
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# CPU Power Management
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_NEON=y
+# CONFIG_ARM_ERRATUM_451034 is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_HAVE_AOUT=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG 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
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_COMPAT_NET_DEV_OPS=y
+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=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=m
+# CONFIG_NET_IPGRE 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_STP=m
+CONFIG_GARP=m
+CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_VLAN_8021Q_GVRP=y
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=y
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
+CONFIG_BT_RFCOMM=y
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=y
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=y
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIBTUSB=y
+CONFIG_BT_HCIBTSDIO=y
+CONFIG_BT_HCIUART=y
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=y
+CONFIG_BT_HCIBPA10X=y
+# 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
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=y
+# CONFIG_CFG80211_REG_DEBUG is not set
+CONFIG_NL80211=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=m
+CONFIG_LIB80211_CRYPT_WEP=m
+CONFIG_LIB80211_CRYPT_CCMP=m
+CONFIG_LIB80211_CRYPT_TKIP=m
+# CONFIG_LIB80211_DEBUG is not set
+CONFIG_MAC80211=y
+
+#
+# Rate control algorithm selection
+#
+CONFIG_MAC80211_RC_PID=y
+# CONFIG_MAC80211_RC_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT_PID=y
+# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
+CONFIG_MAC80211_RC_DEFAULT="pid"
+# CONFIG_MAC80211_MESH is not set
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+# CONFIG_WIMAX 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_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_GPIO is not set
+CONFIG_MTD_NAND_OMAP2=y
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+CONFIG_MTD_UBI_GLUEBI=y
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_DEBUG is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+# CONFIG_BLK_DEV_XIP is not set
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_EEPROM_93CX6=m
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=m
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=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_LIBFC is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID5_RESHAPE=y
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_DELAY=m
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=m
+# 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=m
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
+# CONFIG_SMC911X is not set
+CONFIG_SMSC911X=m
+# CONFIG_DNET is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+# CONFIG_B44 is not set
+# CONFIG_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=m
+CONFIG_LIBERTAS_SDIO=m
+CONFIG_LIBERTAS_DEBUG=y
+# CONFIG_LIBERTAS_THINFIRM is not set
+CONFIG_USB_ZD1201=m
+CONFIG_USB_NET_RNDIS_WLAN=m
+CONFIG_RTL8187=m
+# CONFIG_MAC80211_HWSIM is not set
+CONFIG_P54_COMMON=m
+CONFIG_P54_USB=m
+# 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=m
+# CONFIG_ZD1211RW_DEBUG is not set
+CONFIG_RT2X00=m
+CONFIG_RT2500USB=m
+CONFIG_RT73USB=m
+CONFIG_RT2X00_LIB_USB=m
+CONFIG_RT2X00_LIB=m
+CONFIG_RT2X00_LIB_FIRMWARE=y
+CONFIG_RT2X00_LIB_CRYPTO=y
+CONFIG_RT2X00_LIB_LEDS=y
+# CONFIG_RT2X00_DEBUG is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_CDCETHER=y
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_SMSC95XX=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 is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+# 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=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD 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_TWL4030 is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=m
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_TSC2005 is not set
+# CONFIG_TOUCHSCREEN_TSC210X is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+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_DEVPTS_MULTIPLE_INSTANCES is not set
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# 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
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_OMAP=y
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+CONFIG_TWL4030_MADC=m
+CONFIG_TWL4030_POWEROFF=y
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_SENSORS_TSL2563 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_OMAP24XX=y
+
+#
+# SPI Protocol Masters
+#
+# 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_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_GPIO_SYSFS=y
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+CONFIG_GPIO_TWL4030=y
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=m
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_TWL4030_BCI_BATTERY is not set
+# CONFIG_BATTERY_BQ27x00 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 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_LTC4245 is not set
+# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_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_THERMAL is not set
+# CONFIG_THERMAL_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
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
+CONFIG_TWL4030_CORE=y
+# CONFIG_TWL4030_POWER is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+
+#
+# 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=m
+CONFIG_VIDEO_MEDIA=m
+
+#
+# Multimedia drivers
+#
+CONFIG_MEDIA_ATTACH=y
+CONFIG_MEDIA_TUNER=m
+# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
+CONFIG_MEDIA_TUNER_SIMPLE=m
+CONFIG_MEDIA_TUNER_TDA8290=m
+CONFIG_MEDIA_TUNER_TDA827X=m
+CONFIG_MEDIA_TUNER_TDA18271=m
+CONFIG_MEDIA_TUNER_TDA9887=m
+CONFIG_MEDIA_TUNER_TEA5761=m
+CONFIG_MEDIA_TUNER_TEA5767=m
+CONFIG_MEDIA_TUNER_MT20XX=m
+CONFIG_MEDIA_TUNER_MT2060=m
+CONFIG_MEDIA_TUNER_MT2266=m
+CONFIG_MEDIA_TUNER_QT1010=m
+CONFIG_MEDIA_TUNER_XC2028=m
+CONFIG_MEDIA_TUNER_XC5000=m
+CONFIG_MEDIA_TUNER_MXL5005S=m
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEO_TVEEPROM=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+CONFIG_VIDEO_MSP3400=m
+CONFIG_VIDEO_CS53L32A=m
+CONFIG_VIDEO_WM8775=m
+CONFIG_VIDEO_SAA711X=m
+CONFIG_VIDEO_CX25840=m
+CONFIG_VIDEO_CX2341X=m
+# 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_VIDEO_AU0828 is not set
+# CONFIG_SOC_CAMERA is not set
+CONFIG_V4L_USB_DRIVERS=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
+# CONFIG_USB_GSPCA is not set
+CONFIG_VIDEO_PVRUSB2=m
+CONFIG_VIDEO_PVRUSB2_SYSFS=y
+CONFIG_VIDEO_PVRUSB2_DVB=y
+# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
+# CONFIG_VIDEO_EM28XX is not set
+CONFIG_VIDEO_USBVISION=m
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_QUICKCAM_MESSENGER=m
+# CONFIG_USB_ET61X251 is not set
+CONFIG_VIDEO_OVCAMCHIP=m
+CONFIG_USB_W9968CF=m
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+CONFIG_USB_PWC=m
+# CONFIG_USB_PWC_DEBUG is not set
+CONFIG_USB_ZR364XX=m
+# CONFIG_USB_STKWEBCAM is not set
+# CONFIG_USB_S2255 is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_USB_DSBR is not set
+# CONFIG_USB_SI470X is not set
+# CONFIG_USB_MR800 is not set
+# CONFIG_RADIO_TEA5764 is not set
+# CONFIG_DVB_DYNAMIC_MINORS is not set
+CONFIG_DVB_CAPTURE_DRIVERS=y
+# CONFIG_TTPCI_EEPROM is not set
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_USB=m
+# CONFIG_DVB_USB_DEBUG is not set
+CONFIG_DVB_USB_A800=m
+CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
+CONFIG_DVB_USB_DIBUSB_MC=m
+CONFIG_DVB_USB_DIB0700=m
+CONFIG_DVB_USB_UMT_010=m
+CONFIG_DVB_USB_CXUSB=m
+CONFIG_DVB_USB_M920X=m
+CONFIG_DVB_USB_GL861=m
+CONFIG_DVB_USB_AU6610=m
+CONFIG_DVB_USB_DIGITV=m
+CONFIG_DVB_USB_VP7045=m
+CONFIG_DVB_USB_VP702X=m
+CONFIG_DVB_USB_GP8PSK=m
+CONFIG_DVB_USB_NOVA_T_USB2=m
+CONFIG_DVB_USB_TTUSB2=m
+CONFIG_DVB_USB_DTT200U=m
+CONFIG_DVB_USB_OPERA1=m
+CONFIG_DVB_USB_AF9005=m
+CONFIG_DVB_USB_AF9005_REMOTE=m
+# CONFIG_DVB_USB_DW2102 is not set
+# CONFIG_DVB_USB_CINERGY_T2 is not set
+# CONFIG_DVB_USB_ANYSEE is not set
+# CONFIG_DVB_USB_DTV5100 is not set
+# CONFIG_DVB_USB_AF9015 is not set
+# CONFIG_DVB_SIANO_SMS1XXX is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+# CONFIG_DVB_B2C2_FLEXCOP is not set
+
+#
+# Supported DVB Frontends
+#
+
+#
+# Customise DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+
+#
+# Multistandard (satellite) frontends
+#
+# CONFIG_DVB_STB0899 is not set
+# CONFIG_DVB_STB6100 is not set
+
+#
+# DVB-S (satellite) frontends
+#
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
+CONFIG_DVB_MT312=m
+CONFIG_DVB_S5H1420=m
+# CONFIG_DVB_STV0288 is not set
+# CONFIG_DVB_STB6000 is not set
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_TDA8083=m
+CONFIG_DVB_TDA10086=m
+# CONFIG_DVB_TDA8261 is not set
+CONFIG_DVB_VES1X93=m
+CONFIG_DVB_TUNER_ITD1000=m
+# CONFIG_DVB_TUNER_CX24113 is not set
+CONFIG_DVB_TDA826X=m
+CONFIG_DVB_TUA6100=m
+# CONFIG_DVB_CX24116 is not set
+# CONFIG_DVB_SI21XX is not set
+
+#
+# DVB-T (terrestrial) frontends
+#
+CONFIG_DVB_SP8870=m
+CONFIG_DVB_SP887X=m
+CONFIG_DVB_CX22700=m
+CONFIG_DVB_CX22702=m
+# CONFIG_DVB_DRX397XD is not set
+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
+
+#
+# DVB-C (cable) frontends
+#
+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_LGDT3304 is not set
+CONFIG_DVB_S5H1409=m
+CONFIG_DVB_AU8522=m
+CONFIG_DVB_S5H1411=m
+
+#
+# ISDB-T (terrestrial) frontends
+#
+# CONFIG_DVB_S921 is not set
+
+#
+# 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_DVB_LGS8GL5 is not set
+
+#
+# Tools to develop new frontends
+#
+# CONFIG_DVB_DUMMY_FE is not set
+# CONFIG_DVB_AF9013 is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_DSS_VRAM_SIZE=10
+CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
+# CONFIG_OMAP2_DSS_RFBI is not set
+CONFIG_OMAP2_DSS_VENC=y
+# CONFIG_OMAP2_DSS_SDI is not set
+CONFIG_OMAP2_DSS_DSI=y
+CONFIG_OMAP2_DSS_USE_DSI_PLL=y
+# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
+
+#
+# OMAP2/3 Display Device Drivers
+#
+CONFIG_PANEL_GENERIC=y
+CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C=y
+# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
+# CONFIG_PANEL_N800 is not set
+# CONFIG_CTRL_BLIZZARD is not set
+CONFIG_FB_OMAP2=y
+CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
+# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
+CONFIG_FB_OMAP2_NUM_FBS=3
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_LTV350QV is not set
+# CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_TDO24M is not set
+# CONFIG_LCD_VGG2432A4 is not set
+CONFIG_LCD_PLATFORM=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GENERIC=y
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=y
+
+#
+# Display hardware drivers
+#
+
+#
+# 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=y
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_HWDEP=y
+CONFIG_SND_RAWMIDI=y
+# 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_HRTIMER=m
+# 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_VERBOSE is not set
+# CONFIG_SND_PCM_XRUN_DEBUG is not set
+# CONFIG_SND_DRIVERS is not set
+# CONFIG_SND_ARM is not set
+# CONFIG_SND_SPI is not set
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_USB_CAIAQ=m
+CONFIG_SND_USB_CAIAQ_INPUT=y
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_OMAP_SOC_MCBSP=y
+CONFIG_SND_OMAP_SOC_OVERO=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_TWL4030=y
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_HID_PID is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# Special HID drivers
+#
+CONFIG_HID_COMPAT=y
+CONFIG_HID_A4TECH=y
+CONFIG_HID_APPLE=y
+CONFIG_HID_BELKIN=y
+CONFIG_HID_CHERRY=y
+CONFIG_HID_CHICONY=y
+CONFIG_HID_CYPRESS=y
+CONFIG_HID_EZKEY=y
+CONFIG_HID_GYRATION=y
+CONFIG_HID_LOGITECH=y
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_LOGIRUMBLEPAD2_FF is not set
+CONFIG_HID_MICROSOFT=y
+CONFIG_HID_MONTEREY=y
+# CONFIG_HID_NTRIG is not set
+CONFIG_HID_PANTHERLORD=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_HID_PETALYNX=y
+CONFIG_HID_SAMSUNG=y
+CONFIG_HID_SONY=y
+CONFIG_HID_SUNPLUS=y
+# CONFIG_GREENASIA_FF is not set
+# CONFIG_HID_TOPSEED is not set
+# CONFIG_THRUSTMASTER_FF is not set
+# CONFIG_ZEROPLUS_FF is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+CONFIG_USB_DEBUG=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_OMAP_EHCI_PHY_MODE=y
+# CONFIG_OMAP_EHCI_TLL_MODE is not set
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SOC=y
+
+#
+# OMAP 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_DEBUG=y
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+CONFIG_USB_WDM=y
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+
+#
+# see USB_STORAGE Help for more 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_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_EZUSB=y
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_CP2101 is not set
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+# CONFIG_USB_SERIAL_GARMIN is not set
+# CONFIG_USB_SERIAL_IPW is not set
+# CONFIG_USB_SERIAL_IUU is not set
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_MOTOROLA is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+# CONFIG_USB_SERIAL_PL2303 is not set
+# 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 is not set
+# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+# CONFIG_USB_SERIAL_TI is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+CONFIG_USB_SERIAL_OPTION=m
+# CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_SERIAL_OPTICON is not set
+# 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_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+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 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=m
+CONFIG_USB_SISUSBVGA_CON=y
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+CONFIG_USB_GADGET_OMAP=y
+CONFIG_USB_OMAP=y
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_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 is not set
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_USB_G_PRINTER=m
+CONFIG_USB_CDC_COMPOSITE=m
+
+#
+# OTG and related infrastructure
+#
+CONFIG_USB_OTG_UTILS=y
+# CONFIG_USB_GPIO_VBUS is not set
+# CONFIG_ISP1301_OMAP is not set
+CONFIG_TWL4030_USB=y
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+CONFIG_SDIO_UART=y
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+CONFIG_MMC_OMAP_HS=y
+# CONFIG_MMC_SPI is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_OMAP_DEBUG is not set
+# CONFIG_LEDS_OMAP is not set
+# CONFIG_LEDS_OMAP_PWM is not set
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_LP5521 is not set
+# CONFIG_LEDS_PCA955X is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_BACKLIGHT 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_TWL4030=y
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_DMADEVICES is not set
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_DEBUG=y
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+CONFIG_REGULATOR_TWL4030=y
+# CONFIG_UIO is not set
+# CONFIG_STAGING 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_EXT4_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_BTRFS_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
+CONFIG_PRINT_QUOTA_WARNING=y
+CONFIG_QUOTA_TREE=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=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_UBIFS_FS=y
+# CONFIG_UBIFS_FS_XATTR is not set
+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_ZLIB=y
+# CONFIG_UBIFS_FS_DEBUG is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS 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
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_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_STACKTRACE=y
+# 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_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_NOP_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_XOR_BLOCKS=m
+CONFIG_ASYNC_CORE=m
+CONFIG_ASYNC_MEMCPY=m
+CONFIG_ASYNC_XOR=m
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_CRYPTD=m
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_TEST=m
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_XCBC=m
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_WP512=m
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+# CONFIG_CRYPTO_SALSA20 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=y
+CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC16=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+CONFIG_LIBCRC32C=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/recipes/linux/linux-omap-pm-2.6.29/overo/ehci.patch b/recipes/linux/linux-omap-pm-2.6.29/overo/ehci.patch
new file mode 100644
index 0000000000..72c6b9bec3
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/overo/ehci.patch
@@ -0,0 +1,113 @@
+diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c
+index 489439d..2c6305b 100644
+--- a/arch/arm/mach-omap2/usb-ehci.c
++++ b/arch/arm/mach-omap2/usb-ehci.c
+@@ -152,9 +152,7 @@ static void setup_ehci_io_mux(void)
+
+ void __init usb_ehci_init(void)
+ {
+- /* Setup Pin IO MUX for EHCI */
+- if (cpu_is_omap34xx())
+- setup_ehci_io_mux();
++ /* TODO: Setup Pin IO MUX for EHCI - moved this temporarily to U-boot */
+
+ if (platform_device_register(&ehci_device) < 0) {
+ printk(KERN_ERR "Unable to register HS-USB (EHCI) device\n");
+
+diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
+index 1b3266c..8472996 100644
+--- a/drivers/usb/host/ehci-omap.c
++++ b/drivers/usb/host/ehci-omap.c
+@@ -48,16 +48,26 @@
+ * to get the PHY state machine in working state
+ */
+ #define EXTERNAL_PHY_RESET
++#ifdef CONFIG_MACH_OVERO
++#define EXT_PHY_RESET_GPIO_PORT2 (183)
++#else
+ #define EXT_PHY_RESET_GPIO_PORT1 (57)
+ #define EXT_PHY_RESET_GPIO_PORT2 (61)
++#endif
+ #define EXT_PHY_RESET_DELAY (10)
+
++#define PHY_STP_PULLUP_ENABLE (0x10)
++#define PHY_STP_PULLUP_DISABLE (0x90)
++
++
+ /* ISSUE2:
+ * USBHOST supports External charge pump PHYs only
+ * Use the VBUS from Port1 to power VBUS of Port2 externally
+ * So use Port2 as the working ULPI port
+ */
++#ifndef CONFIG_MACH_OVERO
+ #define VBUS_INTERNAL_CHARGEPUMP_HACK
++#endif
+
+ #endif /* CONFIG_OMAP_EHCI_PHY_MODE */
+
+@@ -225,14 +235,43 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
+
+ #ifdef EXTERNAL_PHY_RESET
+ /* Refer: ISSUE1 */
++#ifndef CONFIG_MACH_OVERO
+ gpio_request(EXT_PHY_RESET_GPIO_PORT1, "USB1 PHY reset");
+ gpio_direction_output(EXT_PHY_RESET_GPIO_PORT1, 0);
++#endif
+ gpio_request(EXT_PHY_RESET_GPIO_PORT2, "USB2 PHY reset");
+ gpio_direction_output(EXT_PHY_RESET_GPIO_PORT2, 0);
++ gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 0);
+ /* Hold the PHY in RESET for enough time till DIR is high */
+ udelay(EXT_PHY_RESET_DELAY);
+ #endif
+
++ /*
++ * The PHY register 0x7 - Interface Control register is
++ * configured to disable the integrated STP pull-up resistor
++ * used for interface protection.
++ *
++ * May not need to be here.
++ */
++ omap_writel((0x7 << EHCI_INSNREG05_ULPI_REGADD_SHIFT) |/* interface reg */
++ (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT) |/* Write */
++ (1 << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) |/* Port1 */
++ (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT) |/* Start */
++ (PHY_STP_PULLUP_DISABLE),
++ EHCI_INSNREG05_ULPI);
++
++ while (!(omap_readl(EHCI_INSNREG05_ULPI) & (1<<EHCI_INSNREG05_ULPI_CONTROL_SHIFT)));
++
++ /* Force PHY to HS */
++ omap_writel((0x4 << EHCI_INSNREG05_ULPI_REGADD_SHIFT) |/* function ctrl */
++ (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT) |/* Write */
++ (1 << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) |/* Port1 */
++ (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT) |/* Start */
++ (0x40),
++ EHCI_INSNREG05_ULPI);
++
++ while (!(omap_readl(EHCI_INSNREG05_ULPI) & (1<<EHCI_INSNREG05_ULPI_CONTROL_SHIFT)));
++
+ /* Configure TLL for 60Mhz clk for ULPI */
+ ehci_clocks->usbtll_fck_clk = clk_get(&dev->dev, USBHOST_TLL_FCLK);
+ if (IS_ERR(ehci_clocks->usbtll_fck_clk))
+@@ -307,7 +346,9 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
+ * Hold the PHY in RESET for enough time till PHY is settled and ready
+ */
+ udelay(EXT_PHY_RESET_DELAY);
++#ifndef CONFIG_MACH_OVERO
+ gpio_set_value(EXT_PHY_RESET_GPIO_PORT1, 1);
++#endif
+ gpio_set_value(EXT_PHY_RESET_GPIO_PORT2, 1);
+ #endif
+
+@@ -393,7 +434,9 @@ static void omap_stop_ehc(struct platform_device *dev, struct usb_hcd *hcd)
+
+
+ #ifdef EXTERNAL_PHY_RESET
++#ifndef CONFIG_MACH_OVERO
+ gpio_free(EXT_PHY_RESET_GPIO_PORT1);
++#endif
+ gpio_free(EXT_PHY_RESET_GPIO_PORT2);
+ #endif
+
+--
+1.6.0.4.790.gaa14a
diff --git a/recipes/linux/linux-omap-pm-2.6.29/read_die_ids.patch b/recipes/linux/linux-omap-pm-2.6.29/read_die_ids.patch
new file mode 100644
index 0000000000..3f6c930cc1
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/read_die_ids.patch
@@ -0,0 +1,23 @@
+OMAP2/3 TAP: enable debug messages
+
+From: Paul Walmsley <paul@pwsan.com>
+
+This patch causes the OMAP2/3 chip ID code to display the full DIE_ID registers at boot.
+
+---
+
+ arch/arm/mach-omap2/id.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
+index c7f9ab7..a154b5e 100644
+--- a/arch/arm/mach-omap2/id.c
++++ b/arch/arm/mach-omap2/id.c
+@@ -10,6 +10,7 @@
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
++#define DEBUG
+
+ #include <linux/module.h>
+ #include <linux/kernel.h>
diff --git a/recipes/linux/linux-omap-pm-2.6.29/register-all-OPPs.diff b/recipes/linux/linux-omap-pm-2.6.29/register-all-OPPs.diff
new file mode 100644
index 0000000000..95e6b9bfab
--- /dev/null
+++ b/recipes/linux/linux-omap-pm-2.6.29/register-all-OPPs.diff
@@ -0,0 +1,12 @@
+--- /tmp/clock34xx.c 2009-02-18 13:51:18.000000000 +0100
++++ git/arch/arm/mach-omap2/clock34xx.c 2009-02-18 13:51:51.000000000 +0100
+@@ -698,8 +698,7 @@
+ if (!mpu_opps)
+ return;
+
+- /* Avoid registering the 120% Overdrive with CPUFreq */
+- prcm = mpu_opps + MAX_VDD1_OPP - 1;
++ prcm = mpu_opps + MAX_VDD1_OPP;
+ for (; prcm->rate; prcm--) {
+ freq_table[i].index = i;
+ freq_table[i].frequency = prcm->rate / 1000;
diff --git a/recipes/linux/linux-omap-pm/beagleboard/defconfig b/recipes/linux/linux-omap-pm/beagleboard/defconfig
index 83327b444e..5e0a85a708 100644
--- a/recipes/linux/linux-omap-pm/beagleboard/defconfig
+++ b/recipes/linux/linux-omap-pm/beagleboard/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.28-omap1
-# Thu Mar 5 20:20:28 2009
+# Linux kernel version: 2.6.29-omap1
+# Fri Jun 19 15:20:15 2009
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -34,32 +34,44 @@ 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
# 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_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_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_CGROUPS is not set
+# CONFIG_SYSFS_DEPRECATED_V2 is not set
# CONFIG_RELAY is not set
# CONFIG_NAMESPACES is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
CONFIG_EMBEDDED=y
CONFIG_UID16=y
# CONFIG_SYSCTL_SYSCALL is not set
@@ -70,10 +82,8 @@ CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
# CONFIG_ELF_CORE is not set
-# CONFIG_COMPAT_BRK is not set
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
@@ -81,10 +91,12 @@ CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_VM_EVENT_COUNTERS=y
+# CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
CONFIG_PROFILING=y
+CONFIG_TRACEPOINTS=y
# CONFIG_MARKERS is not set
CONFIG_OPROFILE=y
CONFIG_HAVE_OPROFILE=y
@@ -95,7 +107,6 @@ CONFIG_HAVE_CLK=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
@@ -103,13 +114,11 @@ CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
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
-# CONFIG_BLK_DEV_INTEGRITY is not set
+CONFIG_BLK_DEV_INTEGRITY=y
#
# IO Schedulers
@@ -123,7 +132,6 @@ CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
-CONFIG_CLASSIC_RCU=y
CONFIG_FREEZER=y
#
@@ -134,7 +142,6 @@ CONFIG_FREEZER=y
# CONFIG_ARCH_REALVIEW is not set
# CONFIG_ARCH_VERSATILE is not set
# CONFIG_ARCH_AT91 is not set
-# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_EP93XX is not set
@@ -161,11 +168,13 @@ CONFIG_FREEZER=y
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_S3C64XX is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_DAVINCI is not set
CONFIG_ARCH_OMAP=y
# CONFIG_ARCH_MSM is not set
+# CONFIG_ARCH_W90X900 is not set
#
# TI OMAP Implementations
@@ -189,7 +198,6 @@ CONFIG_OMAP_BOOT_REASON=y
# 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
@@ -203,37 +211,21 @@ CONFIG_OMAP_LL_DEBUG_UART3=y
# CONFIG_OMAP_PM_NONE is not set
# CONFIG_OMAP_PM_NOOP is not set
CONFIG_OMAP_PM_SRF=y
-CONFIG_OMAP2_DSS=y
-CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
-# CONFIG_OMAP2_DSS_RFBI is not set
-CONFIG_OMAP2_DSS_VENC=y
-# CONFIG_OMAP2_DSS_SDI is not set
-CONFIG_OMAP2_DSS_DSI=y
-CONFIG_OMAP2_DSS_USE_DSI_PLL=y
-# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
-CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
CONFIG_ARCH_OMAP34XX=y
CONFIG_ARCH_OMAP3430=y
#
# OMAP Board Type
#
+# CONFIG_MACH_NOKIA_RX51 is not set
# CONFIG_MACH_OMAP_LDP is not set
# CONFIG_MACH_OMAP_3430SDP is not set
-CONFIG_MACH_OMAP3EVM=y
+# CONFIG_MACH_OMAP3EVM is not set
CONFIG_MACH_OMAP3_BEAGLE=y
# CONFIG_MACH_OVERO is not set
# CONFIG_MACH_OMAP3_PANDORA is not set
#
-# Boot options
-#
-
-#
-# Power management
-#
-
-#
# Processor Type
#
CONFIG_CPU_32=y
@@ -294,7 +286,6 @@ CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_RESOURCES_64BIT is not set
# CONFIG_PHYS_ADDR_T_64BIT is not set
CONFIG_ZONE_DMA_FLAG=0
CONFIG_VIRT_TO_BUS=y
@@ -350,7 +341,6 @@ CONFIG_NEON=y
# Userspace binary formats
#
CONFIG_BINFMT_ELF=y
-# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_HAVE_AOUT=y
CONFIG_BINFMT_AOUT=m
CONFIG_BINFMT_MISC=y
@@ -373,6 +363,7 @@ CONFIG_NET=y
#
# Networking options
#
+CONFIG_COMPAT_NET_DEV_OPS=y
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
@@ -381,55 +372,74 @@ CONFIG_XFRM=y
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
CONFIG_NET_KEY=y
# CONFIG_NET_KEY_MIGRATE is not set
CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
+# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
# 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_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
CONFIG_INET_TUNNEL=m
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_BEET=y
-# CONFIG_INET_LRO is not set
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_INET_LRO=m
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+CONFIG_TCP_CONG_HSTCP=m
+CONFIG_TCP_CONG_HYBLA=m
+CONFIG_TCP_CONG_VEGAS=m
+CONFIG_TCP_CONG_SCALABLE=m
+CONFIG_TCP_CONG_LP=m
+CONFIG_TCP_CONG_VENO=m
+CONFIG_TCP_CONG_YEAH=m
+CONFIG_TCP_CONG_ILLINOIS=m
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
CONFIG_IPV6=m
# CONFIG_IPV6_PRIVACY is not set
# CONFIG_IPV6_ROUTER_PREF is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
-# CONFIG_INET6_AH 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_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 is not set
+CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
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_IPV6_TUNNEL=m
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_IPV6_MROUTE=y
+# CONFIG_IPV6_PIMSM_V2 is not set
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
@@ -445,7 +455,7 @@ 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_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=m
CONFIG_NF_CT_PROTO_GRE=m
CONFIG_NF_CT_PROTO_SCTP=m
@@ -461,18 +471,18 @@ CONFIG_NF_CONNTRACK_SIP=m
CONFIG_NF_CONNTRACK_TFTP=m
CONFIG_NF_CT_NETLINK=m
# CONFIG_NETFILTER_TPROXY is not set
-CONFIG_NETFILTER_XTABLES=y
+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_DSCP is not set
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
CONFIG_NETFILTER_XT_TARGET_RATEEST=m
-CONFIG_NETFILTER_XT_TARGET_TRACE=m
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
-CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=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
@@ -491,7 +501,7 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
CONFIG_NETFILTER_XT_MATCH_OWNER=m
CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
CONFIG_NETFILTER_XT_MATCH_RATEEST=m
@@ -505,7 +515,38 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
CONFIG_NETFILTER_XT_MATCH_TIME=m
CONFIG_NETFILTER_XT_MATCH_U32=m
-# CONFIG_IP_VS is not set
+CONFIG_IP_VS=m
+CONFIG_IP_VS_IPV6=y
+CONFIG_IP_VS_DEBUG=y
+CONFIG_IP_VS_TAB_BITS=12
+
+#
+# IPVS transport protocol load balancing support
+#
+CONFIG_IP_VS_PROTO_TCP=y
+CONFIG_IP_VS_PROTO_UDP=y
+CONFIG_IP_VS_PROTO_AH_ESP=y
+CONFIG_IP_VS_PROTO_ESP=y
+CONFIG_IP_VS_PROTO_AH=y
+
+#
+# IPVS scheduler
+#
+CONFIG_IP_VS_RR=m
+CONFIG_IP_VS_WRR=m
+CONFIG_IP_VS_LC=m
+CONFIG_IP_VS_WLC=m
+CONFIG_IP_VS_LBLC=m
+CONFIG_IP_VS_LBLCR=m
+CONFIG_IP_VS_DH=m
+CONFIG_IP_VS_SH=m
+CONFIG_IP_VS_SED=m
+CONFIG_IP_VS_NQ=m
+
+#
+# IPVS application helper
+#
+CONFIG_IP_VS_FTP=m
#
# IP: Netfilter Configuration
@@ -570,46 +611,54 @@ CONFIG_IP6_NF_TARGET_REJECT=m
CONFIG_IP6_NF_MANGLE=m
CONFIG_IP6_NF_TARGET_HL=m
CONFIG_IP6_NF_RAW=m
-CONFIG_BRIDGE_NF_EBTABLES=y
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_IP6=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-CONFIG_BRIDGE_EBT_NFLOG=m
-# CONFIG_IP_DCCP is not set
-# CONFIG_IP_SCTP is not set
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-CONFIG_STP=y
-CONFIG_BRIDGE=y
+# CONFIG_BRIDGE_NF_EBTABLES is not set
+CONFIG_IP_DCCP=m
+CONFIG_INET_DCCP_DIAG=m
+
+#
+# DCCP CCIDs Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP_CCID2_DEBUG is not set
+CONFIG_IP_DCCP_CCID3=y
+# CONFIG_IP_DCCP_CCID3_DEBUG is not set
+CONFIG_IP_DCCP_CCID3_RTO=100
+CONFIG_IP_DCCP_TFRC_LIB=y
+
+#
+# DCCP Kernel Hacking
+#
+# CONFIG_IP_DCCP_DEBUG is not set
+CONFIG_IP_SCTP=m
+# CONFIG_SCTP_DBG_MSG is not set
+# CONFIG_SCTP_DBG_OBJCNT is not set
+# CONFIG_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+CONFIG_SCTP_HMAC_MD5=y
+CONFIG_TIPC=m
+# CONFIG_TIPC_ADVANCED is not set
+# CONFIG_TIPC_DEBUG is not set
+CONFIG_ATM=m
+CONFIG_ATM_CLIP=m
+# CONFIG_ATM_CLIP_NO_ICMP is not set
+CONFIG_ATM_LANE=m
+CONFIG_ATM_MPOA=m
+CONFIG_ATM_BR2684=m
+# CONFIG_ATM_BR2684_IPFILTER is not set
+CONFIG_STP=m
+CONFIG_GARP=m
+CONFIG_BRIDGE=m
# CONFIG_NET_DSA is not set
CONFIG_VLAN_8021Q=m
-# CONFIG_VLAN_8021Q_GVRP is not set
+CONFIG_VLAN_8021Q_GVRP=y
# CONFIG_DECNET is not set
-CONFIG_LLC=y
+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_WAN_ROUTER=m
CONFIG_NET_SCHED=y
#
@@ -618,6 +667,7 @@ CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_ATM=m
CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_MULTIQ=m
CONFIG_NET_SCH_RED=m
@@ -627,7 +677,7 @@ 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
+CONFIG_NET_SCH_DRR=m
#
# Classification
@@ -644,33 +694,77 @@ CONFIG_CLS_U32_MARK=y
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_FLOW=m
-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 is not set
-CONFIG_NET_ACT_NAT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_ACT_SKBEDIT=m
+# CONFIG_NET_EMATCH is not set
+# CONFIG_NET_CLS_ACT is not set
CONFIG_NET_CLS_IND=y
CONFIG_NET_SCH_FIFO=y
+# CONFIG_DCB is not set
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
-# CONFIG_CAN is not set
-# CONFIG_IRDA is not set
+CONFIG_CAN=m
+CONFIG_CAN_RAW=m
+CONFIG_CAN_BCM=m
+
+#
+# CAN Device Drivers
+#
+CONFIG_CAN_VCAN=m
+# CONFIG_CAN_DEBUG_DEVICES is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+CONFIG_IRDA_ULTRA=y
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+CONFIG_IRDA_DEBUG=y
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+CONFIG_IRTTY_SIR=m
+
+#
+# Dongle support
+#
+CONFIG_DONGLE=y
+CONFIG_ESI_DONGLE=m
+CONFIG_ACTISYS_DONGLE=m
+CONFIG_TEKRAM_DONGLE=m
+CONFIG_TOIM3232_DONGLE=m
+CONFIG_LITELINK_DONGLE=m
+CONFIG_MA600_DONGLE=m
+CONFIG_GIRBIL_DONGLE=m
+CONFIG_MCP2120_DONGLE=m
+CONFIG_OLD_BELKIN_DONGLE=m
+# CONFIG_ACT200L_DONGLE is not set
+CONFIG_KINGSUN_DONGLE=m
+CONFIG_KSDAZZLE_DONGLE=m
+CONFIG_KS959_DONGLE=m
+
+#
+# FIR device drivers
+#
+CONFIG_USB_IRDA=m
+CONFIG_SIGMATEL_FIR=m
+CONFIG_MCS_FIR=m
+# CONFIG_OMAP_IR is not set
CONFIG_BT=y
CONFIG_BT_L2CAP=y
CONFIG_BT_SCO=y
@@ -684,25 +778,35 @@ CONFIG_BT_HIDP=y
#
# Bluetooth device drivers
#
-CONFIG_BT_HCIUSB=y
-CONFIG_BT_HCIUSB_SCO=y
-# CONFIG_BT_HCIBTUSB is not set
+CONFIG_BT_HCIBTUSB=y
CONFIG_BT_HCIBTSDIO=y
-# CONFIG_BT_HCIUART is not set
+CONFIG_BT_HCIUART=y
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIBCM203X=y
CONFIG_BT_HCIBPA10X=y
-# CONFIG_BT_HCIBFUSB is not set
+CONFIG_BT_HCIBFUSB=y
# CONFIG_BT_HCIBRF6150 is not set
# CONFIG_BT_HCIH4P is not set
# CONFIG_BT_HCIVHCI is not set
-# CONFIG_AF_RXRPC is not set
+CONFIG_AF_RXRPC=m
+# CONFIG_AF_RXRPC_DEBUG is not set
+# CONFIG_RXKAD is not set
# CONFIG_PHONET is not set
+CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
CONFIG_CFG80211=y
+# CONFIG_CFG80211_REG_DEBUG is not set
CONFIG_NL80211=y
CONFIG_WIRELESS_OLD_REGULATORY=y
CONFIG_WIRELESS_EXT=y
CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_LIB80211=y
+CONFIG_LIB80211_CRYPT_WEP=y
+CONFIG_LIB80211_CRYPT_CCMP=y
+CONFIG_LIB80211_CRYPT_TKIP=y
+# CONFIG_LIB80211_DEBUG is not set
CONFIG_MAC80211=y
#
@@ -717,13 +821,11 @@ CONFIG_MAC80211_RC_DEFAULT="pid"
CONFIG_MAC80211_LEDS=y
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_DEBUG_MENU is not set
-CONFIG_IEEE80211=y
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=y
-CONFIG_IEEE80211_CRYPT_CCMP=y
-CONFIG_IEEE80211_CRYPT_TKIP=y
+CONFIG_WIMAX=m
+CONFIG_WIMAX_DEBUG_LEVEL=8
# CONFIG_RFKILL is not set
-# CONFIG_NET_9P is not set
+CONFIG_NET_9P=m
+# CONFIG_NET_9P_DEBUG is not set
#
# Device Drivers
@@ -746,6 +848,7 @@ CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
CONFIG_MTD_CONCAT=y
CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_AFS_PARTS is not set
@@ -819,6 +922,11 @@ CONFIG_MTD_NAND_PLATFORM=y
# CONFIG_MTD_ONENAND is not set
#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
# UBI - Unsorted block images
#
CONFIG_MTD_UBI=y
@@ -846,11 +954,18 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
# CONFIG_ATA_OVER_ETH is not set
CONFIG_MISC_DEVICES=y
-CONFIG_EEPROM_93CX6=y
# CONFIG_ICS932S401 is not set
# CONFIG_OMAP_STI is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+CONFIG_EEPROM_93CX6=y
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
@@ -894,6 +1009,7 @@ CONFIG_SCSI_ISCSI_ATTRS=m
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
CONFIG_ISCSI_TCP=m
+# CONFIG_LIBFC is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_DH is not set
# CONFIG_ATA is not set
@@ -917,13 +1033,12 @@ CONFIG_DM_MULTIPATH=m
CONFIG_DM_DELAY=m
# CONFIG_DM_UEVENT is not set
CONFIG_NETDEVICES=y
-# CONFIG_IFB is not set
CONFIG_DUMMY=m
-# CONFIG_BONDING is not set
-# CONFIG_MACVLAN is not set
-# CONFIG_EQUALIZER is not set
+CONFIG_BONDING=m
+CONFIG_MACVLAN=m
+CONFIG_EQUALIZER=m
CONFIG_TUN=m
-# CONFIG_VETH is not set
+CONFIG_VETH=m
# CONFIG_NET_ETHERNET is not set
CONFIG_MII=y
# CONFIG_NETDEV_1000 is not set
@@ -949,7 +1064,9 @@ CONFIG_P54_USB=y
CONFIG_HOSTAP=y
CONFIG_HOSTAP_FIRMWARE=y
CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-# CONFIG_B43 is not set
+CONFIG_B43=y
+CONFIG_B43_LEDS=y
+# CONFIG_B43_DEBUG is not set
# CONFIG_B43LEGACY is not set
CONFIG_ZD1211RW=y
# CONFIG_ZD1211RW_DEBUG is not set
@@ -964,31 +1081,40 @@ CONFIG_RT2X00_LIB_LEDS=y
# CONFIG_RT2X00_DEBUG is not set
#
+# WiMAX Wireless Broadband devices
+#
+# CONFIG_WIMAX_I2400M_USB is not set
+# CONFIG_WIMAX_I2400M_SDIO is not set
+
+#
# USB Network Adapters
#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
+CONFIG_USB_CATC=y
+CONFIG_USB_KAWETH=y
+CONFIG_USB_PEGASUS=y
+CONFIG_USB_RTL8150=y
CONFIG_USB_USBNET=y
CONFIG_USB_NET_AX8817X=y
CONFIG_USB_NET_CDCETHER=y
-CONFIG_USB_NET_DM9601=m
-# CONFIG_USB_NET_SMSC95XX 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_DM9601=y
+CONFIG_USB_NET_SMSC95XX=y
+CONFIG_USB_NET_GL620A=y
+CONFIG_USB_NET_NET1080=y
+CONFIG_USB_NET_PLUSB=y
+CONFIG_USB_NET_MCS7830=y
CONFIG_USB_NET_RNDIS_HOST=y
-CONFIG_USB_NET_CDC_SUBSET=m
+CONFIG_USB_NET_CDC_SUBSET=y
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
CONFIG_USB_EPSON2888=y
CONFIG_USB_KC2190=y
-CONFIG_USB_NET_ZAURUS=m
+CONFIG_USB_NET_ZAURUS=y
# CONFIG_WAN is not set
+CONFIG_ATM_DRIVERS=y
+# CONFIG_ATM_DUMMY is not set
+# CONFIG_ATM_TCP is not set
CONFIG_PPP=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
@@ -998,19 +1124,22 @@ CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_MPPE=m
CONFIG_PPPOE=m
+# CONFIG_PPPOATM is not set
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_NETCONSOLE=m
+CONFIG_NETCONSOLE_DYNAMIC=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_FF_MEMLESS=y
# CONFIG_INPUT_POLLDEV is not set
#
@@ -1042,7 +1171,6 @@ 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_ELANTECH is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
@@ -1054,7 +1182,15 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
-# CONFIG_INPUT_MISC is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_CM109 is not set
+CONFIG_INPUT_TWL4030_PWRBUTTON=y
+CONFIG_INPUT_UINPUT=y
#
# Hardware I/O ports
@@ -1095,10 +1231,10 @@ CONFIG_SERIAL_8250_RSA=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_IPMI_HANDLER is not set
CONFIG_HW_RANDOM=y
-# CONFIG_NVRAM is not set
# CONFIG_R3964 is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_TCG_TPM is not set
@@ -1117,7 +1253,6 @@ CONFIG_I2C_HELPER_AUTO=y
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_OCORES is not set
CONFIG_I2C_OMAP=y
-# CONFIG_I2C2_OMAP_BEAGLE is not set
# CONFIG_I2C_SIMTEC is not set
#
@@ -1137,20 +1272,15 @@ CONFIG_I2C_OMAP=y
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
-# CONFIG_AT24 is not set
-CONFIG_SENSORS_EEPROM=y
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCA9539 is not set
# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_TPS65010 is not set
CONFIG_TWL4030_MADC=m
-CONFIG_TWL4030_PWRBUTTON=y
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
# CONFIG_I2C_DEBUG_BUS is not set
@@ -1163,12 +1293,12 @@ CONFIG_SPI_MASTER=y
# SPI Master Controller Drivers
#
# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
# CONFIG_SPI_OMAP24XX is not set
#
# SPI Protocol Masters
#
-# CONFIG_SPI_AT25 is not set
# CONFIG_SPI_TSC210X is not set
# CONFIG_SPI_TSC2301 is not set
# CONFIG_SPI_SPIDEV is not set
@@ -1220,6 +1350,7 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_F71805F is not set
@@ -1240,6 +1371,7 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_MAX1111 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
@@ -1263,8 +1395,8 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_TSC210X is not set
CONFIG_SENSORS_OMAP34XX=y
# CONFIG_HWMON_DEBUG_CHIP is not set
-# CONFIG_THERMAL is not set
-# CONFIG_THERMAL_HWMON is not set
+CONFIG_THERMAL=y
+CONFIG_THERMAL_HWMON=y
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
@@ -1283,7 +1415,9 @@ CONFIG_SSB_POSSIBLE=y
#
# Sonics Silicon Backplane
#
-# CONFIG_SSB is not set
+CONFIG_SSB=y
+# CONFIG_SSB_SILENT is not set
+# CONFIG_SSB_DEBUG is not set
#
# Multifunction device drivers
@@ -1293,6 +1427,7 @@ CONFIG_SSB_POSSIBLE=y
# CONFIG_MFD_ASIC3 is not set
# CONFIG_HTC_EGPIO is not set
# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TPS65010 is not set
CONFIG_TWL4030_CORE=y
# CONFIG_TWL4030_POWER is not set
# CONFIG_MFD_TMIO is not set
@@ -1302,6 +1437,7 @@ CONFIG_TWL4030_CORE=y
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
#
# Multimedia devices
@@ -1339,19 +1475,25 @@ CONFIG_MEDIA_TUNER_XC5000=m
CONFIG_MEDIA_TUNER_MXL5005S=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEOBUF_VMALLOC=m
+CONFIG_VIDEOBUF_DVB=m
+CONFIG_VIDEO_IR=m
CONFIG_VIDEO_TVEEPROM=m
CONFIG_VIDEO_TUNER=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+CONFIG_VIDEO_IR_I2C=m
CONFIG_VIDEO_MSP3400=m
CONFIG_VIDEO_CS53L32A=m
CONFIG_VIDEO_WM8775=m
CONFIG_VIDEO_SAA711X=m
+CONFIG_VIDEO_TVP5150=m
CONFIG_VIDEO_CX25840=m
CONFIG_VIDEO_CX2341X=m
-# CONFIG_VIDEO_VIVI is not set
+CONFIG_VIDEO_VIVI=m
# CONFIG_VIDEO_CPIA is not set
# CONFIG_VIDEO_CPIA2 is not set
# CONFIG_VIDEO_SAA5246A is not set
@@ -1363,11 +1505,13 @@ CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
CONFIG_USB_M5602=m
+CONFIG_USB_STV06XX=m
CONFIG_USB_GSPCA_CONEX=m
CONFIG_USB_GSPCA_ETOMS=m
CONFIG_USB_GSPCA_FINEPIX=m
CONFIG_USB_GSPCA_MARS=m
CONFIG_USB_GSPCA_OV519=m
+CONFIG_USB_GSPCA_OV534=m
CONFIG_USB_GSPCA_PAC207=m
CONFIG_USB_GSPCA_PAC7311=m
CONFIG_USB_GSPCA_SONIXB=m
@@ -1388,30 +1532,34 @@ CONFIG_VIDEO_PVRUSB2=m
CONFIG_VIDEO_PVRUSB2_SYSFS=y
CONFIG_VIDEO_PVRUSB2_DVB=y
# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-# CONFIG_VIDEO_EM28XX is not set
+CONFIG_VIDEO_EM28XX=m
+CONFIG_VIDEO_EM28XX_ALSA=m
+CONFIG_VIDEO_EM28XX_DVB=m
CONFIG_VIDEO_USBVISION=m
CONFIG_VIDEO_USBVIDEO=m
CONFIG_USB_VICAM=m
CONFIG_USB_IBMCAM=m
CONFIG_USB_KONICAWC=m
CONFIG_USB_QUICKCAM_MESSENGER=m
-# CONFIG_USB_ET61X251 is not set
+CONFIG_USB_ET61X251=m
CONFIG_VIDEO_OVCAMCHIP=m
CONFIG_USB_W9968CF=m
CONFIG_USB_OV511=m
CONFIG_USB_SE401=m
CONFIG_USB_SN9C102=m
CONFIG_USB_STV680=m
-# CONFIG_USB_ZC0301 is not set
+CONFIG_USB_ZC0301=m
CONFIG_USB_PWC=m
# CONFIG_USB_PWC_DEBUG is not set
CONFIG_USB_ZR364XX=m
-# CONFIG_USB_STKWEBCAM is not set
-# CONFIG_USB_S2255 is not set
+CONFIG_USB_STKWEBCAM=m
+CONFIG_USB_S2255=m
CONFIG_RADIO_ADAPTERS=y
# CONFIG_USB_DSBR is not set
# CONFIG_USB_SI470X is not set
# CONFIG_USB_MR800 is not set
+# CONFIG_RADIO_TEA5764 is not set
+CONFIG_DVB_DYNAMIC_MINORS=y
CONFIG_DVB_CAPTURE_DRIVERS=y
# CONFIG_TTPCI_EEPROM is not set
@@ -1445,15 +1593,15 @@ CONFIG_DVB_USB_CINERGY_T2=m
CONFIG_DVB_USB_ANYSEE=m
CONFIG_DVB_USB_DTV5100=m
CONFIG_DVB_USB_AF9015=m
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
CONFIG_DVB_SIANO_SMS1XXX=m
CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
#
# Supported FlexCopII (B2C2) Adapters
#
-# CONFIG_DVB_B2C2_FLEXCOP is not set
+CONFIG_DVB_B2C2_FLEXCOP=m
+CONFIG_DVB_B2C2_FLEXCOP_USB=m
+# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
#
# Supported DVB Frontends
@@ -1465,6 +1613,12 @@ CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
# CONFIG_DVB_FE_CUSTOMISE is not set
#
+# Multistandard (satellite) frontends
+#
+CONFIG_DVB_STB0899=m
+CONFIG_DVB_STB6100=m
+
+#
# DVB-S (satellite) frontends
#
CONFIG_DVB_CX24110=m
@@ -1476,8 +1630,10 @@ CONFIG_DVB_STB6000=m
CONFIG_DVB_STV0299=m
CONFIG_DVB_TDA8083=m
CONFIG_DVB_TDA10086=m
+CONFIG_DVB_TDA8261=m
CONFIG_DVB_VES1X93=m
CONFIG_DVB_TUNER_ITD1000=m
+CONFIG_DVB_TUNER_CX24113=m
CONFIG_DVB_TDA826X=m
CONFIG_DVB_TUA6100=m
CONFIG_DVB_CX24116=m
@@ -1490,7 +1646,7 @@ CONFIG_DVB_SP8870=m
CONFIG_DVB_SP887X=m
CONFIG_DVB_CX22700=m
CONFIG_DVB_CX22702=m
-# CONFIG_DVB_DRX397XD is not set
+CONFIG_DVB_DRX397XD=m
CONFIG_DVB_L64781=m
CONFIG_DVB_TDA1004X=m
CONFIG_DVB_NXT6000=m
@@ -1514,15 +1670,21 @@ 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_OR51211=m
+CONFIG_DVB_OR51132=m
CONFIG_DVB_BCM3510=m
CONFIG_DVB_LGDT330X=m
+CONFIG_DVB_LGDT3304=m
CONFIG_DVB_S5H1409=m
CONFIG_DVB_AU8522=m
CONFIG_DVB_S5H1411=m
#
+# ISDB-T (terrestrial) frontends
+#
+CONFIG_DVB_S921=m
+
+#
# Digital terrestrial only tuners/PLL
#
CONFIG_DVB_PLL=m
@@ -1534,7 +1696,7 @@ CONFIG_DVB_TUNER_DIB0070=m
CONFIG_DVB_LNBP21=m
# CONFIG_DVB_ISL6405 is not set
CONFIG_DVB_ISL6421=m
-# CONFIG_DVB_LGS8GL5 is not set
+CONFIG_DVB_LGS8GL5=m
#
# Tools to develop new frontends
@@ -1574,19 +1736,30 @@ CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
-CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=14
-CONFIG_FB_OMAP2=y
-CONFIG_FB_OMAP2_DEBUG=y
-# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
-CONFIG_FB_OMAP2_NUM_FBS=3
+# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
+CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_DSS_VRAM_SIZE=14
+CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
+# CONFIG_OMAP2_DSS_RFBI is not set
+CONFIG_OMAP2_DSS_VENC=y
+# CONFIG_OMAP2_DSS_SDI is not set
+CONFIG_OMAP2_DSS_DSI=y
+CONFIG_OMAP2_DSS_USE_DSI_PLL=y
+# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
#
# OMAP2/3 Display Device Drivers
#
CONFIG_PANEL_GENERIC=y
-CONFIG_PANEL_SHARP_LS037V7DW01=y
+CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C=m
+# CONFIG_PANEL_SHARP_LS037V7DW01 is not set
# CONFIG_PANEL_N800 is not set
# CONFIG_CTRL_BLIZZARD is not set
+CONFIG_FB_OMAP2=y
+CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
+# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
+CONFIG_FB_OMAP2_NUM_FBS=3
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
@@ -1627,6 +1800,8 @@ CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_HRTIMER=m
+CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
# CONFIG_SND_DYNAMIC_MINORS is not set
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
@@ -1638,7 +1813,7 @@ CONFIG_SND_DRIVERS=y
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set
-CONFIG_SND_ARM=y
+# CONFIG_SND_ARM is not set
CONFIG_SND_SPI=y
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=y
@@ -1646,11 +1821,8 @@ CONFIG_SND_USB_CAIAQ=m
CONFIG_SND_USB_CAIAQ_INPUT=y
CONFIG_SND_SOC=y
CONFIG_SND_OMAP_SOC=y
-CONFIG_SND_OMAP_SOC_MCBSP=y
-CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y
-# CONFIG_SND_OMAP_SOC_OMAP3EVM is not set
+CONFIG_SND_SOC_I2C_AND_SPI=y
# CONFIG_SND_SOC_ALL_CODECS is not set
-CONFIG_SND_SOC_TWL4030=y
# CONFIG_SOUND_PRIME is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
@@ -1671,11 +1843,9 @@ CONFIG_HID_COMPAT=y
CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
-CONFIG_HID_BRIGHT=y
CONFIG_HID_CHERRY=y
CONFIG_HID_CHICONY=y
CONFIG_HID_CYPRESS=y
-CONFIG_HID_DELL=y
CONFIG_HID_EZKEY=y
CONFIG_HID_GYRATION=y
CONFIG_HID_LOGITECH=y
@@ -1683,12 +1853,15 @@ CONFIG_HID_LOGITECH=y
# CONFIG_LOGIRUMBLEPAD2_FF is not set
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MONTEREY=y
+CONFIG_HID_NTRIG=y
CONFIG_HID_PANTHERLORD=y
# CONFIG_PANTHERLORD_FF is not set
CONFIG_HID_PETALYNX=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SONY=y
CONFIG_HID_SUNPLUS=y
+CONFIG_GREENASIA_FF=y
+CONFIG_HID_TOPSEED=y
# CONFIG_THRUSTMASTER_FF is not set
# CONFIG_ZEROPLUS_FF is not set
CONFIG_USB_SUPPORT=y
@@ -1720,10 +1893,12 @@ CONFIG_USB_MON=y
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_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+CONFIG_USB_OXU210HP_HCD=y
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_U132_HCD is not set
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_HWA_HCD is not set
@@ -1749,7 +1924,7 @@ CONFIG_USB_INVENTRA_DMA=y
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_WDM=m
-# CONFIG_USB_TMC is not set
+CONFIG_USB_TMC=m
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
@@ -1763,7 +1938,6 @@ CONFIG_USB_STORAGE=y
# 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
@@ -1832,12 +2006,14 @@ CONFIG_USB_SERIAL_SPCP8X5=m
CONFIG_USB_SERIAL_HP4X=m
CONFIG_USB_SERIAL_SAFE=m
# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+CONFIG_USB_SERIAL_SIEMENS_MPI=m
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_OPTICON=m
CONFIG_USB_SERIAL_DEBUG=m
#
@@ -1850,21 +2026,30 @@ CONFIG_USB_EMI26=m
# CONFIG_USB_RIO500 is not set
CONFIG_USB_LEGOTOWER=m
CONFIG_USB_LCD=m
-# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_BERRY_CHARGE=m
CONFIG_USB_LED=m
-# 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_CYPRESS_CY7C63=m
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_PHIDGET=m
+CONFIG_USB_PHIDGETKIT=m
+CONFIG_USB_PHIDGETMOTORCONTROL=m
+CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_IDMOUSE=m
+CONFIG_USB_FTDI_ELAN=m
# CONFIG_USB_APPLEDISPLAY is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TRANCEVIBRATOR is not set
+CONFIG_USB_SISUSBVGA=m
+CONFIG_USB_SISUSBVGA_CON=y
+CONFIG_USB_LD=m
+CONFIG_USB_TRANCEVIBRATOR=m
# CONFIG_USB_IOWARRIOR is not set
-# CONFIG_USB_TEST is not set
+CONFIG_USB_TEST=m
# CONFIG_USB_ISIGHTFW is not set
-# CONFIG_USB_VST is not set
+CONFIG_USB_VST=m
+CONFIG_USB_ATM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_CXACRU=m
+CONFIG_USB_UEAGLEATM=m
+CONFIG_USB_XUSBATM=m
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
@@ -1879,22 +2064,26 @@ CONFIG_USB_GADGET_SELECTED=y
# CONFIG_USB_GADGET_PXA25X is not set
# CONFIG_USB_GADGET_PXA27X is not set
# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_IMX is not set
# CONFIG_USB_GADGET_M66592 is not set
# CONFIG_USB_GADGET_AMD5536UDC is not set
# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
# CONFIG_USB_GADGET_NET2280 is not set
# CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_DUMMY_HCD is not set
CONFIG_USB_GADGET_DUALSPEED=y
-# CONFIG_USB_ZERO is not set
-CONFIG_USB_ETH=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ZERO_HNPTEST=y
+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_USB_CDC_COMPOSITE is not set
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+CONFIG_USB_MIDI_GADGET=m
+CONFIG_USB_G_PRINTER=m
+CONFIG_USB_CDC_COMPOSITE=m
#
# OTG and related infrastructure
@@ -1930,20 +2119,21 @@ CONFIG_LEDS_CLASS=y
# LED drivers
#
# CONFIG_LEDS_OMAP_DEBUG is not set
-# CONFIG_LEDS_OMAP is not set
+CONFIG_LEDS_OMAP=y
# CONFIG_LEDS_OMAP_PWM is not set
# CONFIG_LEDS_PCA9532 is not set
CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_LP5521 is not set
# CONFIG_LEDS_PCA955X is not set
#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_TIMER=m
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
-# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
-# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+CONFIG_LEDS_TRIGGER_BACKLIGHT=m
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
@@ -2013,7 +2203,38 @@ CONFIG_REGULATOR=y
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_BQ24022 is not set
CONFIG_REGULATOR_TWL4030=y
-# CONFIG_UIO is not set
+CONFIG_UIO=m
+CONFIG_UIO_PDRV=m
+CONFIG_UIO_PDRV_GENIRQ=m
+# CONFIG_UIO_SMX is not set
+# CONFIG_UIO_SERCOS3 is not set
+CONFIG_STAGING=y
+# CONFIG_STAGING_EXCLUDE_BUILD is not set
+# CONFIG_MEILHAUS is not set
+# CONFIG_USB_IP_COMMON is not set
+CONFIG_W35UND=m
+CONFIG_PRISM2_USB=m
+# CONFIG_ECHO is not set
+CONFIG_USB_ATMEL=m
+# CONFIG_AGNX is not set
+CONFIG_OTUS=m
+# CONFIG_COMEDI is not set
+# CONFIG_ASUS_OLED is not set
+# CONFIG_INPUT_MIMIO is not set
+# CONFIG_TRANZPORT is not set
+
+#
+# Android
+#
+CONFIG_ANDROID=y
+CONFIG_ANDROID_BINDER_IPC=y
+CONFIG_ANDROID_LOGGER=m
+CONFIG_ANDROID_RAM_CONSOLE=y
+CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE=y
+# CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION is not set
+# CONFIG_ANDROID_RAM_CONSOLE_EARLY_INIT is not set
+CONFIG_ANDROID_TIMED_GPIO=m
+CONFIG_ANDROID_LOW_MEMORY_KILLER=y
#
# CBUS support
@@ -2038,8 +2259,17 @@ CONFIG_JBD=y
CONFIG_JBD2=m
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=m
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+CONFIG_REISERFS_PROC_INFO=y
+CONFIG_REISERFS_FS_XATTR=y
+# CONFIG_REISERFS_FS_POSIX_ACL is not set
+# CONFIG_REISERFS_FS_SECURITY is not set
+CONFIG_JFS_FS=m
+# CONFIG_JFS_POSIX_ACL is not set
+# CONFIG_JFS_SECURITY is not set
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_FILE_LOCKING=y
CONFIG_XFS_FS=m
@@ -2047,19 +2277,29 @@ CONFIG_XFS_FS=m
# 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_GFS2_FS=m
+CONFIG_GFS2_FS_LOCKING_DLM=m
+CONFIG_OCFS2_FS=m
+CONFIG_OCFS2_FS_O2CB=m
+CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
+CONFIG_OCFS2_FS_STATS=y
+CONFIG_OCFS2_DEBUG_MASKLOG=y
+# CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_FS_POSIX_ACL is not set
+CONFIG_BTRFS_FS=m
+# CONFIG_BTRFS_FS_POSIX_ACL 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_QUOTA_TREE=y
# CONFIG_QFMT_V1 is not set
CONFIG_QFMT_V2=y
CONFIG_QUOTACTL=y
# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
+CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
#
@@ -2079,7 +2319,9 @@ 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
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
#
# Pseudo filesystems
@@ -2091,18 +2333,18 @@ 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_CONFIGFS_FS=m
+CONFIG_MISC_FILESYSTEMS=y
+CONFIG_ADFS_FS=m
+# CONFIG_ADFS_FS_RW is not set
+CONFIG_AFFS_FS=m
+# CONFIG_ECRYPT_FS is not set
+CONFIG_HFS_FS=m
+CONFIG_HFSPLUS_FS=m
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
+CONFIG_BFS_FS=m
+CONFIG_EFS_FS=m
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -2121,40 +2363,70 @@ CONFIG_JFFS2_RUBIN=y
# CONFIG_JFFS2_CMODE_SIZE is not set
CONFIG_JFFS2_CMODE_FAVOURLZO=y
CONFIG_UBIFS_FS=y
-# CONFIG_UBIFS_FS_XATTR is not set
-# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+CONFIG_UBIFS_FS_XATTR=y
+CONFIG_UBIFS_FS_ADVANCED_COMPR=y
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
# CONFIG_UBIFS_FS_DEBUG is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_OMFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=y
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+CONFIG_VXFS_FS=m
+CONFIG_MINIX_FS=m
+CONFIG_OMFS_FS=m
+CONFIG_HPFS_FS=m
+CONFIG_QNX4FS_FS=m
+CONFIG_ROMFS_FS=m
+CONFIG_SYSV_FS=m
+CONFIG_UFS_FS=m
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_UFS_DEBUG is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
CONFIG_ROOT_NFS=y
-# CONFIG_NFSD is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V3_ACL=y
+CONFIG_NFSD_V4=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
# CONFIG_SUNRPC_REGISTER_V4 is not set
CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
-# CONFIG_SMB_FS 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_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+CONFIG_CIFS_STATS=y
+CONFIG_CIFS_STATS2=y
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_UPCALL is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+CONFIG_CIFS_EXPERIMENTAL=y
+# CONFIG_CIFS_DFS_UPCALL is not set
+CONFIG_NCP_FS=m
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+CONFIG_CODA_FS=m
+CONFIG_AFS_FS=m
+# CONFIG_AFS_DEBUG is not set
+CONFIG_9P_FS=m
#
# Partition Types
@@ -2164,65 +2436,67 @@ CONFIG_PARTITION_ADVANCED=y
# 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_MAC_PARTITION=y
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_BSD_DISKLABEL=y
+CONFIG_MINIX_SUBPARTITION=y
+CONFIG_SOLARIS_X86_PARTITION=y
+CONFIG_UNIXWARE_DISKLABEL=y
+CONFIG_LDM_PARTITION=y
+CONFIG_LDM_DEBUG=y
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
+CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-CONFIG_NLS_ISO8859_1=y
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-# CONFIG_DLM is not set
+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=y
+CONFIG_DLM=m
+# CONFIG_DLM_DEBUG is not set
#
# Kernel hacking
#
-# CONFIG_PRINTK_TIME is not set
+CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
@@ -2249,6 +2523,7 @@ CONFIG_DEBUG_MUTEXES=y
# CONFIG_LOCK_STAT 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 is not set
# CONFIG_DEBUG_INFO is not set
@@ -2257,6 +2532,7 @@ CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_MEMORY_INIT is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
@@ -2265,7 +2541,10 @@ CONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set
+CONFIG_NOP_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
#
# Tracers
@@ -2275,7 +2554,9 @@ CONFIG_HAVE_FUNCTION_TRACER=y
# CONFIG_SCHED_TRACER is not set
# CONFIG_CONTEXT_SWITCH_TRACER is not set
# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
# CONFIG_STACK_TRACER is not set
+# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
@@ -2288,7 +2569,8 @@ CONFIG_HAVE_ARCH_KGDB=y
#
# Security options
#
-# CONFIG_KEYS is not set
+CONFIG_KEYS=y
+# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
@@ -2301,40 +2583,42 @@ CONFIG_CRYPTO=y
#
# Crypto core or helper
#
-# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_FIPS=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
-CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_CRYPTD=m
-# CONFIG_CRYPTO_AUTHENC 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
+CONFIG_CRYPTO_CCM=m
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_SEQIV=m
#
# Block modes
#
CONFIG_CRYPTO_CBC=y
-# CONFIG_CRYPTO_CTR is not set
-# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_CTR=m
+CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_XTS is not set
+CONFIG_CRYPTO_XTS=m
#
# Hash modes
@@ -2345,14 +2629,14 @@ CONFIG_CRYPTO_XCBC=m
#
# Digest
#
-CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=y
-# CONFIG_CRYPTO_RMD128 is not set
-# CONFIG_CRYPTO_RMD160 is not set
-# CONFIG_CRYPTO_RMD256 is not set
-# CONFIG_CRYPTO_RMD320 is not set
+CONFIG_CRYPTO_RMD128=m
+CONFIG_CRYPTO_RMD160=m
+CONFIG_CRYPTO_RMD256=m
+CONFIG_CRYPTO_RMD320=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
@@ -2372,8 +2656,8 @@ CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_FCRYPT=m
CONFIG_CRYPTO_KHAZAD=m
-# CONFIG_CRYPTO_SALSA20 is not set
-# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
@@ -2388,13 +2672,14 @@ CONFIG_CRYPTO_LZO=y
#
# Random Number Generation
#
-# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_ANSI_CPRNG=m
CONFIG_CRYPTO_HW=y
#
# Library routines
#
CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_CRC_CCITT=y
CONFIG_CRC16=y
CONFIG_CRC_T10DIF=y
diff --git a/recipes/linux/linux-omap-pm/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch b/recipes/linux/linux-omap-pm/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch
index aeab62f105..ac26554845 100644
--- a/recipes/linux/linux-omap-pm/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch
@@ -1,7 +1,7 @@
From 26abf45ac80be4c54a63fecf1c3c1e1efb416e0a Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 1 Apr 2009 18:27:09 +0300
-Subject: [PATCH] Revert "gro: Fix legacy path napi_complete crash"
+Subject: [PATCH 01/69] Revert "gro: Fix legacy path napi_complete crash"
This reverts commit 303c6a0251852ecbdc5c15e466dcaff5971f7517.
@@ -35,5 +35,5 @@ index e3fe5c7..c1e9dc0 100644
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch b/recipes/linux/linux-omap-pm/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch
index c3523362c6..4610e28704 100644
--- a/recipes/linux/linux-omap-pm/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch
@@ -1,7 +1,7 @@
From 284deec412f9c6f15c971d8eaf4d0156a51a2f3b Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 10:23:42 +0300
-Subject: [PATCH] DSS2: OMAP2/3 Display Subsystem driver
+Subject: [PATCH 03/69] DSS2: OMAP2/3 Display Subsystem driver
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
---
@@ -14446,5 +14446,5 @@ index 0000000..aceed9f
+ display->check_timings = venc_check_timings;
+}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0004-DSS2-OMAP-framebuffer-driver.patch b/recipes/linux/linux-omap-pm/dss2/0004-DSS2-OMAP-framebuffer-driver.patch
index 09afa7e5be..877bb43c56 100644
--- a/recipes/linux/linux-omap-pm/dss2/0004-DSS2-OMAP-framebuffer-driver.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0004-DSS2-OMAP-framebuffer-driver.patch
@@ -1,7 +1,7 @@
From db9314f01a207e256d545244d3d00dc4ce535280 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 10:25:48 +0300
-Subject: [PATCH] DSS2: OMAP framebuffer driver
+Subject: [PATCH 04/69] DSS2: OMAP framebuffer driver
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
---
@@ -3399,5 +3399,5 @@ index b226bdf..96190b2 100644
extern void omapfb_register_panel(struct lcd_panel *panel);
extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0005-DSS2-Add-panel-drivers.patch b/recipes/linux/linux-omap-pm/dss2/0005-DSS2-Add-panel-drivers.patch
index d12586ca2f..c68c89e171 100644
--- a/recipes/linux/linux-omap-pm/dss2/0005-DSS2-Add-panel-drivers.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0005-DSS2-Add-panel-drivers.patch
@@ -1,7 +1,7 @@
From 4cc0368574f587f448231ccd121266bed4bf9729 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 10:29:56 +0300
-Subject: [PATCH] DSS2: Add panel drivers
+Subject: [PATCH 05/69] DSS2: Add panel drivers
- Generic panel
- Samsung LTE430WQ-F0C LCD Panel
@@ -254,7 +254,7 @@ index 0000000..e4bb781
+ .vfp = 4,
+ .vbp = 12-10,
+ },
-+ .recommended_bpp = 16,
++
+ .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IVS,
+};
+
@@ -392,5 +392,5 @@ index 0000000..1f99150
+module_exit(sharp_ls_panel_drv_exit);
+MODULE_LICENSE("GPL");
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch b/recipes/linux/linux-omap-pm/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch
index 0025f1aa8b..258b0b6531 100644
--- a/recipes/linux/linux-omap-pm/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch
@@ -1,7 +1,7 @@
From 18a25382e81c03230e022ca2eb7e0fce24479d6a Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 10:31:57 +0300
-Subject: [PATCH] DSS2: HACK: Add DSS2 support for N800
+Subject: [PATCH 06/69] DSS2: HACK: Add DSS2 support for N800
Works, but it an ugly quick hack.
@@ -1075,5 +1075,5 @@ index 0000000..91d3e37
+MODULE_DESCRIPTION("N800 LCD Driver");
+MODULE_LICENSE("GPL");
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch b/recipes/linux/linux-omap-pm/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch
index 4c8d432dd5..f4cd192bdd 100644
--- a/recipes/linux/linux-omap-pm/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch
@@ -1,7 +1,7 @@
From 4741076cae4f4284e1fff9a03f35475b8455af54 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Wed, 1 Apr 2009 14:36:39 +0200
-Subject: [PATCH] DSS2: Add function to display object to get the backlight level
+Subject: [PATCH 08/69] DSS2: Add function to display object to get the backlight level
This is needed by an upcoming patch that changes the backlight
initialization to use the backlight level set by the bootloader.
@@ -35,5 +35,5 @@ index 6288353..6b702c7 100644
struct device;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0009-DSS2-Add-acx565akm-panel.patch b/recipes/linux/linux-omap-pm/dss2/0009-DSS2-Add-acx565akm-panel.patch
index 3f55f04460..82a1474056 100644
--- a/recipes/linux/linux-omap-pm/dss2/0009-DSS2-Add-acx565akm-panel.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0009-DSS2-Add-acx565akm-panel.patch
@@ -1,7 +1,7 @@
From 66e16f86d3f4c5b34b37e965c65102b7192371de Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Thu, 2 Apr 2009 11:47:13 +0300
-Subject: [PATCH] DSS2: Add acx565akm panel
+Subject: [PATCH 09/69] DSS2: Add acx565akm panel
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
@@ -774,5 +774,5 @@ index 0000000..6d3727b
+#endif
+
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch b/recipes/linux/linux-omap-pm/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch
index c7efc58a05..f994327ec1 100644
--- a/recipes/linux/linux-omap-pm/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch
@@ -1,7 +1,7 @@
From 370510e24ddbf539392ebb6a1e43280965fcb19b Mon Sep 17 00:00:00 2001
From: Vaibhav Hiremath <hvaibhav@ti.com>
Date: Tue, 31 Mar 2009 18:47:32 +0530
-Subject: [PATCH] DSS2: Small VRFB context allocation bug fixed
+Subject: [PATCH 10/69] DSS2: Small VRFB context allocation bug fixed
This is minor bug while requesting and mapping memory for
VRFB space.
@@ -24,5 +24,5 @@ index 852abe5..44febef 100644
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch b/recipes/linux/linux-omap-pm/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch
index 1a82ed2a22..2dad1d337f 100644
--- a/recipes/linux/linux-omap-pm/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch
@@ -1,7 +1,7 @@
From 370d1f93a32e8fcaeac5c16574417e354af21d08 Mon Sep 17 00:00:00 2001
From: Vaibhav Hiremath <hvaibhav@ti.com>
Date: Tue, 31 Mar 2009 18:38:31 +0530
-Subject: [PATCH] DSS2: Allocated memory for Color Look-up-table
+Subject: [PATCH 11/69] DSS2: Allocated memory for Color Look-up-table
We were not allocating memory for CMAP buffer and due to that
G_CMAP was failing, since it does check for size of CMAP buffer.
@@ -33,5 +33,5 @@ index 44febef..afe40a9 100644
return r;
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0012-DSS2-Fix-DMA-rotation.patch b/recipes/linux/linux-omap-pm/dss2/0012-DSS2-Fix-DMA-rotation.patch
index 22add6efd2..8e1d139c72 100644
--- a/recipes/linux/linux-omap-pm/dss2/0012-DSS2-Fix-DMA-rotation.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0012-DSS2-Fix-DMA-rotation.patch
@@ -1,7 +1,7 @@
From 9c93bcab724b5935d745604773ed43825efefd87 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 13:47:11 +0300
-Subject: [PATCH] DSS2: Fix DMA rotation
+Subject: [PATCH 12/69] DSS2: Fix DMA rotation
u16 was not a good type for offsets. First, they need to be signed,
and second, 16 bits is not enough.
@@ -61,5 +61,5 @@ index ffb5648..6cea545 100644
if (plane == OMAP_DSS_GFX) {
if (width != out_width || height != out_height)
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch b/recipes/linux/linux-omap-pm/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch
index 76b8c73630..1abc7a8264 100644
--- a/recipes/linux/linux-omap-pm/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch
@@ -1,7 +1,7 @@
From 360a55ddd309e3a45b227a4a905ae7120dd16169 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 14:21:12 +0300
-Subject: [PATCH] DSS2: Verify that overlay paddr != 0
+Subject: [PATCH 13/69] DSS2: Verify that overlay paddr != 0
---
drivers/video/omap2/dss/dispc.c | 3 +++
@@ -37,5 +37,5 @@ index 968edbe..9209acf 100644
ovl->info = *info;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch b/recipes/linux/linux-omap-pm/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch
index 3b3fd77a9a..d8aa4eb893 100644
--- a/recipes/linux/linux-omap-pm/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch
@@ -1,7 +1,7 @@
From 832b763db235da8e62f7b6ab02bcb8ad6bcb7a01 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 16:48:41 +0300
-Subject: [PATCH] DSS2: Add function to get DSS logic clock rate
+Subject: [PATCH 14/69] DSS2: Add function to get DSS logic clock rate
---
drivers/video/omap2/dss/dispc.c | 15 +++++++++++++++
@@ -47,5 +47,5 @@ index bac5ece..0be42b6 100644
void dispc_set_pol_freq(struct omap_panel *panel);
void find_lck_pck_divs(bool is_tft, unsigned long req_pck, unsigned long fck,
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch b/recipes/linux/linux-omap-pm/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch
index d6b0cbbb41..a0f2b9f528 100644
--- a/recipes/linux/linux-omap-pm/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch
@@ -1,7 +1,7 @@
From a5c235a6f0094494ae1fc1a1ba4728e0d33dfd3b Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 16:49:27 +0300
-Subject: [PATCH] DSS2: DSI: calculate VP_CLK_RATIO properly
+Subject: [PATCH 15/69] DSS2: DSI: calculate VP_CLK_RATIO properly
---
drivers/video/omap2/dss/dsi.c | 17 +++++++++++------
@@ -64,5 +64,5 @@ index 4442931..aecb89d 100644
r = FLD_MOD(r, 0, 8, 8); /* VP_CLK_POL */
r = FLD_MOD(r, 2, 13, 12); /* LINE_BUFFER, 2 lines */
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch b/recipes/linux/linux-omap-pm/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch
index bca449f169..35d65a996d 100644
--- a/recipes/linux/linux-omap-pm/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch
@@ -1,7 +1,7 @@
From 6b2c9d84c7accdfe1067fcdc8a00e50674aab4bb Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 17:42:26 +0300
-Subject: [PATCH] DSS2: DSI: improve packet len calculation
+Subject: [PATCH 16/69] DSS2: DSI: improve packet len calculation
---
drivers/video/omap2/dss/dsi.c | 21 ++++++++++++++++-----
@@ -54,5 +54,5 @@ index aecb89d..66ac6ea 100644
if (dsi.use_te)
l = FLD_MOD(l, 1, 30, 30); /* TE_EN */
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch b/recipes/linux/linux-omap-pm/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch
index 5b68b57da9..e9a5dcc67a 100644
--- a/recipes/linux/linux-omap-pm/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch
@@ -1,7 +1,7 @@
From 85848d329ca3a2d6ee6841cdc11cc5951d187931 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Fri, 3 Apr 2009 19:09:20 +0200
-Subject: [PATCH] DSS2: Disable video planes on sync lost error
+Subject: [PATCH 17/69] DSS2: Disable video planes on sync lost error
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -99,5 +99,5 @@ index 1bc23f7..41734f3 100644
if (errors & DISPC_IRQ_OCP_ERR) {
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch b/recipes/linux/linux-omap-pm/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch
index 088135c0a8..0261db2bd4 100644
--- a/recipes/linux/linux-omap-pm/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch
@@ -1,7 +1,7 @@
From 63e15ba8d5f95b13d3abf359da718537d769f112 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Tue, 7 Apr 2009 10:01:58 +0300
-Subject: [PATCH] DSS2: check for ovl paddr only when enabling
+Subject: [PATCH 18/69] DSS2: check for ovl paddr only when enabling
It seems Xvideo uses SETUP_PLANE ioctl even when
the fb memory has not been allocated. Sigh.
@@ -36,5 +36,5 @@ index 9209acf..c047206 100644
ovl->info = *info;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch b/recipes/linux/linux-omap-pm/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch
index daa95ca50d..6569c71471 100644
--- a/recipes/linux/linux-omap-pm/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch
@@ -1,7 +1,7 @@
From 67f3fc050ab4e2006d5b7ec6ec341896627181ab Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 6 Apr 2009 17:32:04 +0200
-Subject: [PATCH] DSS2: Check fclk limits when configuring video planes
+Subject: [PATCH 19/69] DSS2: Check fclk limits when configuring video planes
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -179,5 +179,5 @@ index 41734f3..61861d8 100644
_dispc_set_vid_color_conv(plane, cconv);
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch b/recipes/linux/linux-omap-pm/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch
index b3248527e8..c6971ea452 100644
--- a/recipes/linux/linux-omap-pm/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch
@@ -1,7 +1,7 @@
From 9f8f1613253656f155b3844c8255a560f86e0acd Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 6 Apr 2009 17:32:05 +0200
-Subject: [PATCH] DSS2: Check scaling limits against proper values
+Subject: [PATCH 20/69] DSS2: Check scaling limits against proper values
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -75,5 +75,5 @@ index 61861d8..ae7be3d 100644
_dispc_set_color_mode(plane, color_mode);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0021-DSS2-Add-venc-register-dump.patch b/recipes/linux/linux-omap-pm/dss2/0021-DSS2-Add-venc-register-dump.patch
index 31ff180228..44f126e7a4 100644
--- a/recipes/linux/linux-omap-pm/dss2/0021-DSS2-Add-venc-register-dump.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0021-DSS2-Add-venc-register-dump.patch
@@ -1,7 +1,7 @@
From c5e71be877e71c7df329205307e830f158c403bf Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 6 Apr 2009 17:32:06 +0200
-Subject: [PATCH] DSS2: Add venc register dump
+Subject: [PATCH 21/69] DSS2: Add venc register dump
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -92,5 +92,5 @@ index aceed9f..b655df4 100644
+#undef DUMPREG
+}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0022-DSS2-FB-remove-unused-var-warning.patch b/recipes/linux/linux-omap-pm/dss2/0022-DSS2-FB-remove-unused-var-warning.patch
index d4fb327c76..207a85f115 100644
--- a/recipes/linux/linux-omap-pm/dss2/0022-DSS2-FB-remove-unused-var-warning.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0022-DSS2-FB-remove-unused-var-warning.patch
@@ -1,7 +1,7 @@
From facfd479bb6efad76eec1e74048cb7a31da7287d Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Mon, 6 Apr 2009 22:26:04 +0200
-Subject: [PATCH] DSS2: FB: remove unused var warning
+Subject: [PATCH 22/69] DSS2: FB: remove unused var warning
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
@@ -23,5 +23,5 @@ index afe40a9..12ce0c3 100644
omap_vrfb_adjust_size(&w, &h, bytespp);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch b/recipes/linux/linux-omap-pm/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch
index 6492905530..45045c4b4b 100644
--- a/recipes/linux/linux-omap-pm/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch
@@ -1,7 +1,7 @@
From c02b843c2732bc7b15a3e35b5dd715d68225bbd1 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Wed, 8 Apr 2009 12:51:46 +0200
-Subject: [PATCH] DSS2: pass the default FB color format through board info
+Subject: [PATCH 23/69] DSS2: pass the default FB color format through board info
Add a field to the FB memory region platform data, so that board
init code can pass a default color format to the driver. Set this
@@ -210,5 +210,5 @@ index 96190b2..7a34f22 100644
unsigned map:1; /* kernel mapped by the driver */
};
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch b/recipes/linux/linux-omap-pm/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch
index 559e49f40a..1a68d9425a 100644
--- a/recipes/linux/linux-omap-pm/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch
@@ -1,7 +1,7 @@
From 2710416c43572652cb5355a5eaf68038c95659e8 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 9 Apr 2009 12:10:46 +0300
-Subject: [PATCH] DSS2: Beagle: Use gpio_set_value
+Subject: [PATCH 24/69] DSS2: Beagle: Use gpio_set_value
---
arch/arm/mach-omap2/board-omap3beagle.c | 10 +++++++---
@@ -44,5 +44,5 @@ index b67e7a5..8c1961d 100644
static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch b/recipes/linux/linux-omap-pm/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch
index e81b1331bb..7f889d95d8 100644
--- a/recipes/linux/linux-omap-pm/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch
@@ -1,7 +1,7 @@
From 990f3160d33361c135ee72e91f202e05a8c378fc Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Mon, 13 Apr 2009 18:50:24 +0530
-Subject: [PATCH] DSS2: VRFB: Macro for calculating base address of the VRFB context was faulty
+Subject: [PATCH 25/69] DSS2: VRFB: Macro for calculating base address of the VRFB context was faulty
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -24,5 +24,5 @@ index 7e0f8fc..d68065f 100644
#define OMAP_VRFB_SIZE (2048 * 2048 * 4)
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch b/recipes/linux/linux-omap-pm/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch
index 6ee3908d10..f5c249e045 100644
--- a/recipes/linux/linux-omap-pm/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch
@@ -1,7 +1,7 @@
From a1e8018c0806a1a0579eda4b93b7d6764a2ff643 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 15 Apr 2009 14:06:54 +0300
-Subject: [PATCH] DSS2: DSI: sidlemode to noidle while sending frame
+Subject: [PATCH 26/69] DSS2: DSI: sidlemode to noidle while sending frame
DISPC interrupts are not wake-up capable. Smart-idle in DISPC_SIDLEMODE
causes DSS interface to go to idle at the end of the frame, and the
@@ -74,5 +74,5 @@ index 0be42b6..d0917a8 100644
void dispc_lcd_enable_signal(bool enable);
void dispc_pck_free_enable(bool enable);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch b/recipes/linux/linux-omap-pm/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch
index b56e32a11c..5265ae6b0a 100644
--- a/recipes/linux/linux-omap-pm/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch
@@ -1,7 +1,7 @@
From 77e848eeba461e9b55b09d39fd0d640caea13e19 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 9 Apr 2009 12:09:44 +0530
-Subject: [PATCH] DSS2: VRFB rotation and mirroring implemented.
+Subject: [PATCH 27/69] DSS2: VRFB rotation and mirroring implemented.
DSS2 modified to accept the rotation_type input
to get the dma or VRFB rotation.
@@ -320,5 +320,5 @@ index b0fee80..8ca0bbb 100644
ovl->info.mirror);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch b/recipes/linux/linux-omap-pm/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch
index 6400da3c24..178349ed2a 100644
--- a/recipes/linux/linux-omap-pm/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch
@@ -1,7 +1,7 @@
From c09f1a0642fd58a1b081594ea36dfd1bf71aec52 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 9 Apr 2009 12:13:07 +0530
-Subject: [PATCH] DSS2: OMAPFB: Added support for the YUV VRFB rotation and mirroring.
+Subject: [PATCH 28/69] DSS2: OMAPFB: Added support for the YUV VRFB rotation and mirroring.
DSS2 now requires roatation_type to be specified by driver.
Added support for that.
@@ -232,5 +232,5 @@ index 2607def..43f6922 100644
bool mirror;
};
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch b/recipes/linux/linux-omap-pm/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch
index 072978670b..e9f25dfef1 100644
--- a/recipes/linux/linux-omap-pm/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch
@@ -1,7 +1,7 @@
From a8a37babe4856170f4cba86c425a8f21975d9e9e Mon Sep 17 00:00:00 2001
From: Tim Yamin <plasm@roo.me.uk>
Date: Mon, 13 Apr 2009 13:57:42 -0700
-Subject: [PATCH] DSS2: OMAPFB: Set line_length correctly for YUV with VRFB.
+Subject: [PATCH 29/69] DSS2: OMAPFB: Set line_length correctly for YUV with VRFB.
Signed-off-by: Tim Yamin <plasm@roo.me.uk>
---
@@ -57,5 +57,5 @@ index 57f5900..cd63740 100644
ovl->get_overlay_info(ovl, &info);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch b/recipes/linux/linux-omap-pm/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch
index 7e2bb48938..63b3594ef5 100644
--- a/recipes/linux/linux-omap-pm/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch
@@ -1,7 +1,7 @@
From bda19b9359d9dc60f8b0beb5685e173e236ee30f Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Wed, 15 Apr 2009 17:05:18 +0530
-Subject: [PATCH] DSS2: dispc_get_trans_key was returning wrong key type
+Subject: [PATCH 30/69] DSS2: dispc_get_trans_key was returning wrong key type
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -25,5 +25,5 @@ index 23a8155..076d3d4 100644
BUG();
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch b/recipes/linux/linux-omap-pm/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch
index ae777ed04e..684857c15f 100644
--- a/recipes/linux/linux-omap-pm/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch
@@ -1,7 +1,7 @@
From 30c40f5e6b1794430f678bf23d3319354321cab7 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Tue, 14 Apr 2009 14:50:11 +0200
-Subject: [PATCH] DSS2: do bootmem reserve for exclusive access
+Subject: [PATCH 31/69] DSS2: do bootmem reserve for exclusive access
BOOTMEM_DEFAULT would allow multiple reservations for the same location,
we need to reserve the region for our exclusive use. Also check if the
@@ -29,5 +29,5 @@ index f24a110..520f260 100644
if (size > sdram_size) {
printk(KERN_ERR "Illegal SDRAM size for VRAM\n");
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch b/recipes/linux/linux-omap-pm/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch
index 4959a760b1..df3a7a9dd9 100644
--- a/recipes/linux/linux-omap-pm/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch
@@ -1,7 +1,7 @@
From ed7a9223f6785be03951c55f3b0695b0d5635c80 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Thu, 9 Apr 2009 15:04:44 +0200
-Subject: [PATCH] DSS2: Fix DISPC_VID_FIR value for omap34xx
+Subject: [PATCH 32/69] DSS2: Fix DISPC_VID_FIR value for omap34xx
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -31,5 +31,5 @@ index 076d3d4..b8a3329 100644
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0033-DSS2-Prefer-3-tap-filter.patch b/recipes/linux/linux-omap-pm/dss2/0033-DSS2-Prefer-3-tap-filter.patch
index f643ca64f3..6457a5b94a 100644
--- a/recipes/linux/linux-omap-pm/dss2/0033-DSS2-Prefer-3-tap-filter.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0033-DSS2-Prefer-3-tap-filter.patch
@@ -1,7 +1,7 @@
From 5390230ed12585a79683733209db34e9130b8e3b Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Thu, 9 Apr 2009 15:04:43 +0200
-Subject: [PATCH] DSS2: Prefer 3-tap filter
+Subject: [PATCH 33/69] DSS2: Prefer 3-tap filter
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -78,5 +78,5 @@ index b8a3329..b631dd8 100644
DSSDBG("required fclk rate = %lu Hz\n", fclk);
DSSDBG("current fclk rate = %lu Hz\n", dispc_fclk_rate());
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch b/recipes/linux/linux-omap-pm/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
index fdfc25fb47..dd01886406 100644
--- a/recipes/linux/linux-omap-pm/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
@@ -1,7 +1,7 @@
From 946eb774e95cdc2f2fa5cdc24aa69229f82814b8 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 16 Apr 2009 17:56:00 +0300
-Subject: [PATCH] DSS2: VRAM: improve omap_vram_add_region()
+Subject: [PATCH 34/69] DSS2: VRAM: improve omap_vram_add_region()
Combine postponed and non-posponed versions of omap_vram_add_region.
Make the func non-static, so it can be called from board files.
@@ -131,5 +131,5 @@ index 520f260..8e9fe77 100644
if (reserved)
pr_info("Reserving %lu bytes SRAM for VRAM\n", reserved);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch b/recipes/linux/linux-omap-pm/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
index b7b395458f..6b29d50dc0 100644
--- a/recipes/linux/linux-omap-pm/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
@@ -1,7 +1,7 @@
From f825cafd5ee5c600218740507f85594c825b0c00 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 16 Apr 2009 18:47:49 +0530
-Subject: [PATCH] DSS2: Added the function pointer for getting default color.
+Subject: [PATCH 35/69] DSS2: Added the function pointer for getting default color.
V4L2 Framework has a CID for getting/setting default color.
So added the function pointer for doing same.
@@ -62,5 +62,5 @@ index 8ca0bbb..12cf7b0 100644
dss_overlay_setup_dispc_manager(mgr);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch b/recipes/linux/linux-omap-pm/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
index c6e9f16b3a..ace5079234 100644
--- a/recipes/linux/linux-omap-pm/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
@@ -1,7 +1,7 @@
From 6c56dc10226c84f41917ac2117b0e654fa080d40 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Thu, 16 Apr 2009 19:00:11 +0530
-Subject: [PATCH] DSS2: Added support for setting and querying alpha blending.
+Subject: [PATCH 36/69] DSS2: Added support for setting and querying alpha blending.
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -114,5 +114,5 @@ index 12cf7b0..90acd28 100644
mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC,
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch b/recipes/linux/linux-omap-pm/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
index fc62b09512..e7f43ad83d 100644
--- a/recipes/linux/linux-omap-pm/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
@@ -1,7 +1,7 @@
From 2c9edd6af31a812a9487dd8bc12322e105a29f44 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Fri, 17 Apr 2009 09:42:36 +0530
-Subject: [PATCH] DSS2: Added support for querying color keying.
+Subject: [PATCH 37/69] DSS2: Added support for querying color keying.
V4L2 Framework has a ioctl for getting/setting color keying.
So added the function manager pointers for doing same.
@@ -146,5 +146,5 @@ index 90acd28..e0501c4 100644
&omap_dss_mgr_enable_alpha_blending;
mgr->get_alpha_blending_status =
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch b/recipes/linux/linux-omap-pm/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
index 65cb113574..096c976a70 100644
--- a/recipes/linux/linux-omap-pm/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
@@ -1,7 +1,7 @@
From 9e8877f0e5b17d3ddd101d6a63aa86fdb14d35d5 Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Fri, 17 Apr 2009 09:51:25 +0530
-Subject: [PATCH] DSS2:OMAPFB: Some color keying pointerd renamed in DSS2. Replicated in FB
+Subject: [PATCH 38/69] DSS2:OMAPFB: Some color keying pointerd renamed in DSS2. Replicated in FB
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -52,5 +52,5 @@ index 7f18d2a..79d8916 100644
r = -ENODEV;
goto err;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch b/recipes/linux/linux-omap-pm/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
index af8c2cd09b..d731b78008 100644
--- a/recipes/linux/linux-omap-pm/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
@@ -1,7 +1,7 @@
From 6f1f0c7b19ecb468824b79f9d181ef0da41b7d7d Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Fri, 17 Apr 2009 13:58:21 +0530
-Subject: [PATCH] DSS2: Add sysfs entry to for the alpha blending support.
+Subject: [PATCH 39/69] DSS2: Add sysfs entry to for the alpha blending support.
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
---
@@ -55,5 +55,5 @@ index e0501c4..7965a84 100644
};
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch b/recipes/linux/linux-omap-pm/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
index 66be75f3f7..471a2a7f6c 100644
--- a/recipes/linux/linux-omap-pm/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
@@ -1,7 +1,7 @@
From a5129f272a48aa22629137c9c31e60eddb8c3f5d Mon Sep 17 00:00:00 2001
From: Hardik Shah <hardik.shah@ti.com>
Date: Fri, 17 Apr 2009 14:24:46 +0530
-Subject: [PATCH] DSS2: Provided proper exclusion for destination color keying and alpha blending.
+Subject: [PATCH 40/69] DSS2: Provided proper exclusion for destination color keying and alpha blending.
OMAP does not support destination color key and alpha blending
simultaneously. So this patch does not allow the user
@@ -93,5 +93,5 @@ index 7965a84..108489c 100644
return size;
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch b/recipes/linux/linux-omap-pm/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch
index 6785ade279..2c90c0cc06 100644
--- a/recipes/linux/linux-omap-pm/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch
@@ -1,7 +1,7 @@
From 9bcac9b9e678f476c83b5679b1215b6bc946130a Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 20 Apr 2009 16:26:18 +0200
-Subject: [PATCH] DSS2: Disable vertical offset with fieldmode
+Subject: [PATCH 41/69] DSS2: Disable vertical offset with fieldmode
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -67,5 +67,5 @@ index 7e551c2..f15614b 100644
_dispc_set_vid_color_conv(plane, cconv);
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch b/recipes/linux/linux-omap-pm/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch
index 5264911b41..7e2e44d809 100644
--- a/recipes/linux/linux-omap-pm/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch
@@ -1,7 +1,7 @@
From 9c6de0fed6e8a598d026d348533fdf731b737d55 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 20 Apr 2009 16:26:19 +0200
-Subject: [PATCH] DSS2: Don't enable fieldmode automatically
+Subject: [PATCH 42/69] DSS2: Don't enable fieldmode automatically
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -30,5 +30,5 @@ index f15614b..1c036c1 100644
if (ilace) {
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch b/recipes/linux/linux-omap-pm/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch
index 76e37817c4..2e09335611 100644
--- a/recipes/linux/linux-omap-pm/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch
@@ -1,7 +1,7 @@
From 35e88797e93b107ba602dee1e2ac8ea761dccd4b Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
Date: Mon, 20 Apr 2009 16:26:20 +0200
-Subject: [PATCH] DSS2: Swap field 0 and field 1 registers
+Subject: [PATCH 43/69] DSS2: Swap field 0 and field 1 registers
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
@@ -166,5 +166,5 @@ index 1c036c1..9bab6cf 100644
(fieldmode ? 1 : 0),
ps);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch b/recipes/linux/linux-omap-pm/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch
index 32def9e8d5..19d24c3a07 100644
--- a/recipes/linux/linux-omap-pm/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch
@@ -1,7 +1,7 @@
From a9b3500bd14609750a2337e866e1df62627c1bac Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Mon, 20 Apr 2009 14:55:33 +0200
-Subject: [PATCH] DSS2: add sysfs entry for seting the rotate type
+Subject: [PATCH 44/69] DSS2: add sysfs entry for seting the rotate type
This can help in utilizing VRAM memory better. Since with VRFB rotation
we waste a lot of physical memory due to the VRFB HW design, provide the
@@ -72,5 +72,5 @@ index 2c88718..4e3da42 100644
__ATTR(size, S_IRUGO | S_IWUSR, show_size, store_size),
__ATTR(overlays, S_IRUGO | S_IWUSR, show_overlays, store_overlays),
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0045-DSS2-Fixed-line-endings-from-to.patch b/recipes/linux/linux-omap-pm/dss2/0045-DSS2-Fixed-line-endings-from-to.patch
index 9382469850..3206306cc7 100644
--- a/recipes/linux/linux-omap-pm/dss2/0045-DSS2-Fixed-line-endings-from-to.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0045-DSS2-Fixed-line-endings-from-to.patch
@@ -1,7 +1,7 @@
From b0e081456a9b094109c04467d041ff693843ca47 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Tue, 21 Apr 2009 09:25:16 +0300
-Subject: [PATCH] DSS2: Fixed line endings from , to ;
+Subject: [PATCH 45/69] DSS2: Fixed line endings from , to ;
---
drivers/video/omap2/dss/manager.c | 18 +++++++++---------
@@ -44,5 +44,5 @@ index 108489c..bf059e0 100644
dss_overlay_setup_dispc_manager(mgr);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch b/recipes/linux/linux-omap-pm/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch
index 4ae5fbdd9a..301db79267 100644
--- a/recipes/linux/linux-omap-pm/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch
@@ -1,7 +1,7 @@
From 0f88992b2681aed4f31dc7dd3926b357bbc95154 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Tue, 21 Apr 2009 10:11:55 +0300
-Subject: [PATCH] DSS2: DSI: decrease sync timeout from 60s to 2s
+Subject: [PATCH 46/69] DSS2: DSI: decrease sync timeout from 60s to 2s
The framedone-problem should be ok now, so we shouldn't get long waits.
---
@@ -22,5 +22,5 @@ index 50af925..d59ad38 100644
DSSDBGF("");
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch b/recipes/linux/linux-omap-pm/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch
index 0b0f104b30..fbc30b8858 100644
--- a/recipes/linux/linux-omap-pm/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch
@@ -1,7 +1,7 @@
From 7ddd5eaa7bc345c3719d613a46a95b7e8052ad2c Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Tue, 21 Apr 2009 15:18:36 +0200
-Subject: [PATCH] DSS2: fix return value for rotate_type sysfs function
+Subject: [PATCH 47/69] DSS2: fix return value for rotate_type sysfs function
Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
@@ -40,5 +40,5 @@ index 4e3da42..13028ae 100644
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch b/recipes/linux/linux-omap-pm/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch
index cc6663fa21..1097fedabf 100644
--- a/recipes/linux/linux-omap-pm/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch
@@ -1,7 +1,7 @@
From e34564db95627ad20e918b240c45e2bd5555f7e8 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 22 Apr 2009 10:06:08 +0300
-Subject: [PATCH] OMAP2/3: DMA: implement trans copy and const fill
+Subject: [PATCH 48/69] OMAP2/3: DMA: implement trans copy and const fill
Implement transparent copy and constant fill features for OMAP2/3.
@@ -119,5 +119,5 @@ index 224b077..4e34f47 100644
/*----------------------------------------------------------------------------*/
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch b/recipes/linux/linux-omap-pm/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch
index e9fc76ce15..d9901f95d9 100644
--- a/recipes/linux/linux-omap-pm/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch
@@ -1,7 +1,7 @@
From 02034cc79f69512a6037f03ad1243c28f59fdd8a Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 22 Apr 2009 10:25:20 +0300
-Subject: [PATCH] DSS2: VRAM: clear allocated area with DMA
+Subject: [PATCH 49/69] DSS2: VRAM: clear allocated area with DMA
Use DMA constant fill feature to clear VRAM area when
someone allocates it.
@@ -97,5 +97,5 @@ index 8e9fe77..90276ac 100644
}
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch b/recipes/linux/linux-omap-pm/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch
index 8c5edd0c3d..4a0a078bc7 100644
--- a/recipes/linux/linux-omap-pm/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch
@@ -1,7 +1,7 @@
From 07482193cccdfe9ede1f47d72790dfbe54343505 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 22 Apr 2009 10:26:06 +0300
-Subject: [PATCH] DSS2: OMAPFB: remove fb clearing code
+Subject: [PATCH 50/69] DSS2: OMAPFB: remove fb clearing code
VRAM manager does the clearing now when the area is allocated.
---
@@ -49,5 +49,5 @@ index cd63740..76e7c6c 100644
rg->paddr = paddr;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch b/recipes/linux/linux-omap-pm/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
index 93ff3205d3..739d3cd1a6 100644
--- a/recipes/linux/linux-omap-pm/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch
@@ -1,7 +1,7 @@
From b47aef28536f3c276d232c41cd3084c69389dca4 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Wed, 22 Apr 2009 14:11:52 +0300
-Subject: [PATCH] DSS2: VRAM: use debugfs, not procfs
+Subject: [PATCH 51/69] DSS2: VRAM: use debugfs, not procfs
---
arch/arm/plat-omap/vram.c | 103 +++++++++++++++------------------------------
@@ -166,5 +166,5 @@ index 90276ac..e847579 100644
return 0;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch b/recipes/linux/linux-omap-pm/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch
index b8f89b6239..a28a96b23b 100644
--- a/recipes/linux/linux-omap-pm/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch
@@ -1,7 +1,7 @@
From 635fa66abe6e502c9b78b1dc66757bf67fd163e1 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Wed, 22 Apr 2009 14:40:48 +0200
-Subject: [PATCH] DSS2: VRAM: fix section mismatch warning
+Subject: [PATCH 52/69] DSS2: VRAM: fix section mismatch warning
postponed_regions are accessed from the non __init
omap_vram_add_region().
@@ -30,5 +30,5 @@ index e847579..b126a64 100644
struct vram_alloc {
struct list_head list;
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch b/recipes/linux/linux-omap-pm/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch
index f591fb700a..38d162d024 100644
--- a/recipes/linux/linux-omap-pm/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch
+++ b/recipes/linux/linux-omap-pm/dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch
@@ -1,7 +1,7 @@
From c7ce3c5e9f7e28900b8ea9c3e1afe41dcdc0863d Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 23 Apr 2009 10:46:53 +0300
-Subject: [PATCH] DSS2: disable LCD & DIGIT before resetting DSS
+Subject: [PATCH 53/69] DSS2: disable LCD & DIGIT before resetting DSS
This seems to fix the synclost problem that we get, if the bootloader
starts the DSS and the kernel resets it.
@@ -37,5 +37,5 @@ index adc1f34..aab9758 100644
/* autoidle */
REG_FLD_MOD(DSS_SYSCONFIG, 1, 0, 0);
--
-1.5.6.5
+1.6.2.4
diff --git a/recipes/linux/linux-omap-pm/dss2/0054-DSS2-DSI-more-error-handling.patch b/recipes/linux/linux-omap-pm/dss2/0054-DSS2-DSI-more-error-handling.patch
new file mode 100644
index 0000000000..5f4f155452
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0054-DSS2-DSI-more-error-handling.patch
@@ -0,0 +1,85 @@
+From 3b27a3c4f6b84e46c84509f610dfe1456c0d72d3 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Mon, 27 Apr 2009 11:06:16 +0300
+Subject: [PATCH 54/69] DSS2: DSI: more error handling
+
+---
+ drivers/video/omap2/dss/dsi.c | 27 +++++++++++++++++++++++++++
+ 1 files changed, 27 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index d59ad38..d8df353 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -289,6 +289,8 @@ static struct
+
+ bool autoupdate_setup;
+
++ u32 errors;
++ spinlock_t errors_lock;
+ #ifdef DEBUG
+ ktime_t perf_setup_time;
+ ktime_t perf_start_time;
+@@ -541,6 +543,9 @@ void dsi_irq_handler(void)
+ if (irqstatus & DSI_IRQ_ERROR_MASK) {
+ DSSERR("DSI error, irqstatus %x\n", irqstatus);
+ print_irq_status(irqstatus);
++ spin_lock(&dsi.errors_lock);
++ dsi.errors |= irqstatus & DSI_IRQ_ERROR_MASK;
++ spin_unlock(&dsi.errors_lock);
+ } else if (debug_irq) {
+ print_irq_status(irqstatus);
+ }
+@@ -616,6 +621,17 @@ static void _dsi_initialize_irq(void)
+ -1 & (~DSI_CIO_IRQ_ERRCONTROL2));
+ }
+
++static u32 dsi_get_errors(void)
++{
++ unsigned long flags;
++ u32 e;
++ spin_lock_irqsave(&dsi.errors_lock, flags);
++ e = dsi.errors;
++ dsi.errors = 0;
++ spin_unlock_irqrestore(&dsi.errors_lock, flags);
++ return e;
++}
++
+ static void dsi_vc_enable_bta_irq(int channel)
+ {
+ u32 l;
+@@ -1807,6 +1823,7 @@ static int dsi_vc_send_bta(int channel)
+ static int dsi_vc_send_bta_sync(int channel)
+ {
+ int r = 0;
++ u32 err;
+
+ init_completion(&dsi.bta_completion);
+
+@@ -1822,6 +1839,13 @@ static int dsi_vc_send_bta_sync(int channel)
+ r = -EIO;
+ goto err;
+ }
++
++ err = dsi_get_errors();
++ if (err) {
++ DSSERR("Error while sending BTA: %x\n", err);
++ r = -EIO;
++ goto err;
++ }
+ err:
+ dsi_vc_disable_bta_irq(channel);
+
+@@ -3720,6 +3744,9 @@ int dsi_init(void)
+ {
+ u32 rev;
+
++ spin_lock_init(&dsi.errors_lock);
++ dsi.errors = 0;
++
+ spin_lock_init(&dsi.cmd_lock);
+ dsi.cmd_fifo = kfifo_alloc(
+ DSI_CMD_FIFO_LEN * sizeof(struct dsi_cmd_item),
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0055-DSS2-Added-global-alpha-support.patch b/recipes/linux/linux-omap-pm/dss2/0055-DSS2-Added-global-alpha-support.patch
new file mode 100644
index 0000000000..c545b648cc
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0055-DSS2-Added-global-alpha-support.patch
@@ -0,0 +1,230 @@
+From c8588370442424ac31e2392b07891615629eb999 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 24 Apr 2009 15:29:06 +0530
+Subject: [PATCH 55/69] DSS2: Added global alpha support.
+
+global_alpha sysfs entry for video1 plane will always show 255 as
+it does not support global_alpha.
+Initliazied the global alpha field for all the overlays
+to 255 (fully opaque).
+Documentation also updated.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ Documentation/arm/OMAP/DSS | 1 +
+ arch/arm/plat-omap/include/mach/display.h | 1 +
+ drivers/video/omap2/dss/dispc.c | 25 ++++++++++++++++---
+ drivers/video/omap2/dss/dss.h | 3 +-
+ drivers/video/omap2/dss/manager.c | 3 +-
+ drivers/video/omap2/dss/overlay.c | 37 +++++++++++++++++++++++++++++
+ 6 files changed, 64 insertions(+), 6 deletions(-)
+
+diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
+index 9e902a2..249e1a3 100644
+--- a/Documentation/arm/OMAP/DSS
++++ b/Documentation/arm/OMAP/DSS
+@@ -133,6 +133,7 @@ name
+ output_size width,height
+ position x,y
+ screen_width width
++global_alpha global alpha 0-255 0=transparent 255=opaque
+
+ /sys/devices/platform/omapdss/manager? directory:
+ display Destination display
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index d0b4c83..45b16ca 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -363,6 +363,7 @@ struct omap_overlay_info {
+ u16 pos_y;
+ u16 out_width; /* if 0, out_width == width */
+ u16 out_height; /* if 0, out_height == height */
++ u8 global_alpha;
+ };
+
+ enum omap_overlay_caps {
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 9bab6cf..b6a39f5 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -778,6 +778,17 @@ static void _dispc_set_vid_size(enum omap_plane plane, int width, int height)
+ dispc_write_reg(vsi_reg[plane-1], val);
+ }
+
++static void _dispc_setup_global_alpha(enum omap_plane plane, u8 global_alpha)
++{
++
++ BUG_ON(plane == OMAP_DSS_VIDEO1);
++
++ if (plane == OMAP_DSS_GFX)
++ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, global_alpha, 7, 0);
++ else if (plane == OMAP_DSS_VIDEO2)
++ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, global_alpha, 23, 16);
++}
++
+ static void _dispc_set_pix_inc(enum omap_plane plane, s32 inc)
+ {
+ const struct dispc_reg ri_reg[] = { DISPC_GFX_PIXEL_INC,
+@@ -1444,7 +1455,8 @@ static int _dispc_setup_plane(enum omap_plane plane,
+ enum omap_color_mode color_mode,
+ bool ilace,
+ enum omap_dss_rotation_type rotation_type,
+- u8 rotation, int mirror)
++ u8 rotation, int mirror,
++ u8 global_alpha)
+ {
+ const int maxdownscale = cpu_is_omap34xx() ? 4 : 2;
+ bool five_taps = 0;
+@@ -1592,6 +1604,9 @@ static int _dispc_setup_plane(enum omap_plane plane,
+
+ _dispc_set_rotation_attrs(plane, rotation, mirror, color_mode);
+
++ if (plane != OMAP_DSS_VIDEO1)
++ _dispc_setup_global_alpha(plane, global_alpha);
++
+ return 0;
+ }
+
+@@ -3011,7 +3026,7 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ enum omap_color_mode color_mode,
+ bool ilace,
+ enum omap_dss_rotation_type rotation_type,
+- u8 rotation, bool mirror)
++ u8 rotation, bool mirror, u8 global_alpha)
+ {
+ int r = 0;
+
+@@ -3032,7 +3047,8 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ out_width, out_height,
+ color_mode, ilace,
+ rotation_type,
+- rotation, mirror);
++ rotation, mirror,
++ global_alpha);
+
+ enable_clocks(0);
+
+@@ -3247,7 +3263,8 @@ void dispc_setup_partial_planes(struct omap_display *display,
+ pi->color_mode, 0,
+ pi->rotation_type,
+ pi->rotation,
+- pi->mirror);
++ pi->mirror,
++ pi->global_alpha);
+
+ dispc_enable_plane(ovl->id, 1);
+ }
+diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
+index 1d01ff6..20cef0a 100644
+--- a/drivers/video/omap2/dss/dss.h
++++ b/drivers/video/omap2/dss/dss.h
+@@ -273,7 +273,8 @@ int dispc_setup_plane(enum omap_plane plane, enum omap_channel channel_out,
+ enum omap_color_mode color_mode,
+ bool ilace,
+ enum omap_dss_rotation_type rotation_type,
+- u8 rotation, bool mirror);
++ u8 rotation, bool mirror,
++ u8 global_alpha);
+
+ void dispc_go(enum omap_channel channel);
+ void dispc_enable_lcd_out(bool enable);
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index bf059e0..1e6cd8d 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -464,7 +464,8 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
+ ilace,
+ ovl->info.rotation_type,
+ ovl->info.rotation,
+- ovl->info.mirror);
++ ovl->info.mirror,
++ ovl->info.global_alpha);
+
+ if (r) {
+ DSSERR("dispc_setup_plane failed for ovl %d\n",
+diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
+index c047206..035a57a 100644
+--- a/drivers/video/omap2/dss/overlay.c
++++ b/drivers/video/omap2/dss/overlay.c
+@@ -194,6 +194,37 @@ static ssize_t overlay_enabled_store(struct omap_overlay *ovl, const char *buf,
+ return size;
+ }
+
++static ssize_t overlay_global_alpha_show(struct omap_overlay *ovl, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d\n",
++ ovl->info.global_alpha);
++}
++
++static ssize_t overlay_global_alpha_store(struct omap_overlay *ovl,
++ const char *buf, size_t size)
++{
++ int r;
++ struct omap_overlay_info info;
++
++ ovl->get_overlay_info(ovl, &info);
++
++ /* Video1 plane does not support global alpha
++ * to always make it 255 completely opaque
++ */
++ if (ovl->id == OMAP_DSS_VIDEO1)
++ info.global_alpha = 255;
++ else
++ info.global_alpha = simple_strtoul(buf, NULL, 10);
++
++ if ((r = ovl->set_overlay_info(ovl, &info)))
++ return r;
++
++ if (ovl->manager && (r = ovl->manager->apply(ovl->manager)))
++ return r;
++
++ return size;
++}
++
+ struct overlay_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct omap_overlay *, char *);
+@@ -215,6 +246,8 @@ static OVERLAY_ATTR(output_size, S_IRUGO|S_IWUSR,
+ overlay_output_size_show, overlay_output_size_store);
+ static OVERLAY_ATTR(enabled, S_IRUGO|S_IWUSR,
+ overlay_enabled_show, overlay_enabled_store);
++static OVERLAY_ATTR(global_alpha, S_IRUGO|S_IWUSR,
++ overlay_global_alpha_show, overlay_global_alpha_store);
+
+ static struct attribute *overlay_sysfs_attrs[] = {
+ &overlay_attr_name.attr,
+@@ -224,6 +257,7 @@ static struct attribute *overlay_sysfs_attrs[] = {
+ &overlay_attr_position.attr,
+ &overlay_attr_output_size.attr,
+ &overlay_attr_enabled.attr,
++ &overlay_attr_global_alpha.attr,
+ NULL
+ };
+
+@@ -444,6 +478,7 @@ void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
+ ovl->id = OMAP_DSS_GFX;
+ ovl->supported_modes = OMAP_DSS_COLOR_GFX_OMAP3;
+ ovl->caps = OMAP_DSS_OVL_CAP_DISPC;
++ ovl->info.global_alpha = 255;
+ break;
+ case 1:
+ ovl->name = "vid1";
+@@ -451,6 +486,7 @@ void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
+ ovl->supported_modes = OMAP_DSS_COLOR_VID_OMAP3;
+ ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
+ OMAP_DSS_OVL_CAP_DISPC;
++ ovl->info.global_alpha = 255;
+ break;
+ case 2:
+ ovl->name = "vid2";
+@@ -458,6 +494,7 @@ void dss_init_overlays(struct platform_device *pdev, const char *def_disp_name)
+ ovl->supported_modes = OMAP_DSS_COLOR_VID_OMAP3;
+ ovl->caps = OMAP_DSS_OVL_CAP_SCALE |
+ OMAP_DSS_OVL_CAP_DISPC;
++ ovl->info.global_alpha = 255;
+ break;
+ }
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch b/recipes/linux/linux-omap-pm/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch
new file mode 100644
index 0000000000..c46fda0d52
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch
@@ -0,0 +1,35 @@
+From 32cf39c92dfd28e18936c31eea90b4d43a3c0968 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 24 Apr 2009 14:33:48 +0530
+Subject: [PATCH 56/69] DSS2: Rotation attrs for YUV need not to be reversed for 90 and 270
+
+DSS2 supports horizontal mirroing. so only 180 and 0 degree attributes needs
+to be reversed for mirroring.
+Slight corrupt image is seen with 90 ad 270 degree rotation with mirroring
+when the image height and widht is not 32-pixels aligned. To be specific
+resolution is 168X192.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/dss/dispc.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b6a39f5..f79decb 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1110,9 +1110,9 @@ static void _dispc_set_rotation_attrs(enum omap_plane plane, u8 rotation,
+ if (mirroring) {
+ switch (rotation) {
+ case 0: vidrot = 2; break;
+- case 1: vidrot = 3; break;
++ case 1: vidrot = 1; break;
+ case 2: vidrot = 0; break;
+- case 3: vidrot = 1; break;
++ case 3: vidrot = 3; break;
+ }
+ } else {
+ switch (rotation) {
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch b/recipes/linux/linux-omap-pm/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch
new file mode 100644
index 0000000000..929f41b590
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch
@@ -0,0 +1,32 @@
+From bc67f1fce4472087014fdacd3f44ea732200533e Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Mon, 27 Apr 2009 13:15:07 +0530
+Subject: [PATCH 57/69] DSS2: Documentation update for new sysfs entries in omapdss/manager
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ Documentation/arm/OMAP/DSS | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS
+index 249e1a3..751000b 100644
+--- a/Documentation/arm/OMAP/DSS
++++ b/Documentation/arm/OMAP/DSS
+@@ -136,8 +136,13 @@ screen_width width
+ global_alpha global alpha 0-255 0=transparent 255=opaque
+
+ /sys/devices/platform/omapdss/manager? directory:
+-display Destination display
++display Destination display
+ name
++alpha_blending_enabled 0=off 1=on
++color_key_enabled 0=off 1=on
++color_key_type gfx-destination video-source
++color_key_value 0 to 2^24
++default_color default background color RGB24 0 to 2^24
+
+ /sys/devices/platform/omapdss/display? directory:
+ ctrl_name Controller name
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch b/recipes/linux/linux-omap-pm/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch
new file mode 100644
index 0000000000..7a6f23b349
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch
@@ -0,0 +1,56 @@
+From 9500c899f05048d17ced4340ecfd377656a23934 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Fri, 17 Apr 2009 18:34:33 +0200
+Subject: [PATCH 58/69] DSS2: Don't touch plane coordinates when changing fb->ovl mapping
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+When attaching overlays to a framebuffer via the 'overlays' sysfs file
+do not touch the planes' coordinates. Without this change attaching
+VID2 to a framebuffer which already has VID1 attached would cause VID1
+to be reset to position 0,0 and scaled to 1:1 size. Also call
+omapfb_apply_changes() only once after all the overlays have been
+attached to avoid fiddling with all the overlays several times.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/omapfb/omapfb-sysfs.c | 13 ++++++-------
+ 1 files changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+index 13028ae..702199d 100644
+--- a/drivers/video/omap2/omapfb/omapfb-sysfs.c
++++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c
+@@ -183,6 +183,7 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
+ struct omap_overlay *ovl;
+ int num_ovls, r, i;
+ int len;
++ bool added = false;
+
+ num_ovls = 0;
+
+@@ -284,15 +285,13 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
+
+ ofbi->overlays[ofbi->num_overlays++] = ovl;
+
+- r = omapfb_apply_changes(fbi, 1);
++ added = true;
++ }
++
++ if (added) {
++ r = omapfb_apply_changes(fbi, 0);
+ if (r)
+ goto out;
+-
+- if (ovl->manager) {
+- r = ovl->manager->apply(ovl->manager);
+- if (r)
+- goto out;
+- }
+ }
+
+ r = count;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch b/recipes/linux/linux-omap-pm/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch
new file mode 100644
index 0000000000..9ca0f2eab1
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch
@@ -0,0 +1,97 @@
+From 750f7ddc0881834f3400c40e9a59d11f9427cf99 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 29 Apr 2009 17:26:30 +0300
+Subject: [PATCH 59/69] DSS2: DSI: configure ENTER/EXIT_HS_MODE_LATENCY
+
+---
+ drivers/video/omap2/dss/dsi.c | 49 ++++++++++++++++++++++++++++++++--------
+ 1 files changed, 39 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index d8df353..5225ed6 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -2309,15 +2309,26 @@ static int dsi_proto_config(struct omap_display *display)
+ return 0;
+ }
+
+-static void dsi_proto_timings(void)
+-{
+- int tlpx_half, tclk_zero, tclk_prepare, tclk_trail;
+- int tclk_pre, tclk_post;
+- int ddr_clk_pre, ddr_clk_post;
++static void dsi_proto_timings(struct omap_display *display)
++{
++ unsigned tlpx, tclk_zero, tclk_prepare, tclk_trail;
++ unsigned tclk_pre, tclk_post;
++ unsigned ths_prepare, ths_prepare_ths_zero, ths_zero;
++ unsigned ths_trail, ths_exit;
++ unsigned ddr_clk_pre, ddr_clk_post;
++ unsigned enter_hs_mode_lat, exit_hs_mode_lat;
++ unsigned ths_eot;
+ u32 r;
+
++ r = dsi_read_reg(DSI_DSIPHY_CFG0);
++ ths_prepare = FLD_GET(r, 31, 24);
++ ths_prepare_ths_zero = FLD_GET(r, 23, 16);
++ ths_zero = ths_prepare_ths_zero - ths_prepare;
++ ths_trail = FLD_GET(r, 15, 8);
++ ths_exit = FLD_GET(r, 7, 0);
++
+ r = dsi_read_reg(DSI_DSIPHY_CFG1);
+- tlpx_half = FLD_GET(r, 22, 16);
++ tlpx = FLD_GET(r, 22, 16) * 2;
+ tclk_trail = FLD_GET(r, 15, 8);
+ tclk_zero = FLD_GET(r, 7, 0);
+
+@@ -2329,17 +2340,35 @@ static void dsi_proto_timings(void)
+ /* min 60ns + 52*UI */
+ tclk_post = ns2ddr(60) + 26;
+
+- ddr_clk_pre = (tclk_pre + tlpx_half*2 + tclk_zero + tclk_prepare) / 4;
+- ddr_clk_post = (tclk_post + tclk_trail) / 4;
++ ddr_clk_pre = DIV_ROUND_UP(tclk_pre + tlpx + tclk_zero + tclk_prepare,
++ 4);
++ ddr_clk_post = DIV_ROUND_UP(tclk_post + tclk_trail, 4);
+
+ r = dsi_read_reg(DSI_CLK_TIMING);
+ r = FLD_MOD(r, ddr_clk_pre, 15, 8);
+ r = FLD_MOD(r, ddr_clk_post, 7, 0);
+ dsi_write_reg(DSI_CLK_TIMING, r);
+
+- DSSDBG("ddr_clk_pre %d, ddr_clk_post %d\n",
++ DSSDBG("ddr_clk_pre %u, ddr_clk_post %u\n",
+ ddr_clk_pre,
+ ddr_clk_post);
++
++ /* ths_eot is 2 for 2 datalanes and 4 for 1 datalane */
++ if (display->hw_config.u.dsi.data1_lane != 0 &&
++ display->hw_config.u.dsi.data2_lane != 0)
++ ths_eot = 2;
++ else
++ ths_eot = 4;
++
++ enter_hs_mode_lat = DIV_ROUND_UP(tlpx + ths_prepare + ths_zero, 4) + 4;
++ exit_hs_mode_lat = DIV_ROUND_UP(ths_trail + ths_exit, 4) + 1 + ths_eot;
++
++ r = FLD_VAL(enter_hs_mode_lat, 31, 16) |
++ FLD_VAL(exit_hs_mode_lat, 15, 0);
++ dsi_write_reg(DSI_VM_TIMING7, r);
++
++ DSSDBG("enter_hs_mode_lat %u, exit_hs_mode_lat %u\n",
++ enter_hs_mode_lat, exit_hs_mode_lat);
+ }
+
+
+@@ -3340,7 +3369,7 @@ static int dsi_display_init_dsi(struct omap_display *display)
+
+ _dsi_print_reset_status();
+
+- dsi_proto_timings();
++ dsi_proto_timings(display);
+ dsi_set_lp_clk_divisor();
+
+ if (1)
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch b/recipes/linux/linux-omap-pm/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch
new file mode 100644
index 0000000000..0ff2c7b1a6
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch
@@ -0,0 +1,34 @@
+From 233a6e4f4ccaf5827f04ab38c590397755e61ecb Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Mon, 4 May 2009 16:18:30 +0200
+Subject: [PATCH 60/69] DSS2: Avoid div by zero when calculating required fclk
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+When calculating the required fclk rate for five tap filtering if the
+display width and output width are equal div by zero could occur. The
+TRM doesn't actually specify how this case should be handled but for
+now just skip the calculation which would trigger the div by zero.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index f79decb..5fc9457 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1399,7 +1399,7 @@ static unsigned long calc_fclk_five_taps(u16 width, u16 height,
+ do_div(tmp, 2 * out_height * ppl);
+ fclk = tmp;
+
+- if (height > 2 * out_height) {
++ if (height > 2 * out_height && ppl != out_width) {
+ tmp = pclk * (height - 2 * out_height) * out_width;
+ do_div(tmp, 2 * out_height * (ppl - out_width));
+ fclk = max(fclk, (u32) tmp);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0061-DSS2-VRFB-save-restore-context.patch b/recipes/linux/linux-omap-pm/dss2/0061-DSS2-VRFB-save-restore-context.patch
new file mode 100644
index 0000000000..a0b694736b
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0061-DSS2-VRFB-save-restore-context.patch
@@ -0,0 +1,106 @@
+From e58576ceca922bfe4c793e6f77a873c4ea14f768 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 09:05:12 +0300
+Subject: [PATCH 61/69] DSS2: VRFB: save / restore context
+
+The VRFB is part of the SMS and supplied by the core power domain; do
+the context saving while VRFB is configured and restore it along with
+the rest of the domain context.
+
+This patch only implements the restore functionality, but not the
+actual call to the restore. That belongs to PM functionality.
+---
+ arch/arm/plat-omap/include/mach/vrfb.h | 1 +
+ arch/arm/plat-omap/vrfb.c | 50 ++++++++++++++++++++++++++-----
+ 2 files changed, 43 insertions(+), 8 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/vrfb.h b/arch/arm/plat-omap/include/mach/vrfb.h
+index 12c7fab..ee6c062 100644
+--- a/arch/arm/plat-omap/include/mach/vrfb.h
++++ b/arch/arm/plat-omap/include/mach/vrfb.h
+@@ -44,5 +44,6 @@ extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u16 width, u16 height,
+ enum omap_color_mode color_mode);
++extern void omap_vrfb_restore_context(void);
+
+ #endif /* __VRFB_H */
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 2ae0d68..649803e 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -39,6 +39,33 @@
+ /* bitmap of reserved contexts */
+ static unsigned ctx_map;
+
++/*
++ * Access to this happens from client drivers or the PM core after wake-up.
++ * For the first case we require locking at the driver level, for the second
++ * we don't need locking, since no drivers will run until after the wake-up
++ * has finished.
++ */
++struct {
++ u32 physical_ba;
++ u32 control;
++ u32 size;
++} vrfb_hw_context[VRFB_NUM_CTXS];
++
++void omap_vrfb_restore_context(void)
++{
++ int i;
++
++ for (i = 0; i < VRFB_NUM_CTXS; i++) {
++ /* Restore only the active contexts */
++ if (!(ctx_map & (1 << i)))
++ continue;
++ omap_writel(vrfb_hw_context[i].control, SMS_ROT_CONTROL(i));
++ omap_writel(vrfb_hw_context[i].size, SMS_ROT_SIZE(i));
++ omap_writel(vrfb_hw_context[i].physical_ba,
++ SMS_ROT_PHYSICAL_BA(i));
++ }
++}
++
+ void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ u8 bytespp)
+ {
+@@ -56,6 +83,8 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u16 vrfb_height;
+ u8 ctx = vrfb->context;
+ u8 bytespp;
++ u32 size;
++ u32 control;
+
+ DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d)\n", ctx, paddr,
+ width, height, bytespp);
+@@ -100,15 +129,20 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+
+ DBG("vrfb w %u, h %u\n", vrfb_width, vrfb_height);
+
++ size = vrfb_width << SMS_IMAGEWIDTH_OFFSET;
++ size |= vrfb_height << SMS_IMAGEHEIGHT_OFFSET;
++
++ control = pixel_size_exp << SMS_PS_OFFSET;
++ control |= VRFB_PAGE_WIDTH_EXP << SMS_PW_OFFSET;
++ control |= VRFB_PAGE_HEIGHT_EXP << SMS_PH_OFFSET;
++
++ vrfb_hw_context[ctx].physical_ba = paddr;
++ vrfb_hw_context[ctx].size = size;
++ vrfb_hw_context[ctx].control = control;
++
+ omap_writel(paddr, SMS_ROT_PHYSICAL_BA(ctx));
+- omap_writel((vrfb_width << SMS_IMAGEWIDTH_OFFSET) |
+- (vrfb_height << SMS_IMAGEHEIGHT_OFFSET),
+- SMS_ROT_SIZE(ctx));
+-
+- omap_writel(pixel_size_exp << SMS_PS_OFFSET |
+- VRFB_PAGE_WIDTH_EXP << SMS_PW_OFFSET |
+- VRFB_PAGE_HEIGHT_EXP << SMS_PH_OFFSET,
+- SMS_ROT_CONTROL(ctx));
++ omap_writel(size, SMS_ROT_SIZE(ctx));
++ omap_writel(control, SMS_ROT_CONTROL(ctx));
+
+ DBG("vrfb offset pixels %d, %d\n",
+ vrfb_width - width, vrfb_height - height);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0062-DSS2-VRAM-Fix-indentation.patch b/recipes/linux/linux-omap-pm/dss2/0062-DSS2-VRAM-Fix-indentation.patch
new file mode 100644
index 0000000000..8d5f57866d
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0062-DSS2-VRAM-Fix-indentation.patch
@@ -0,0 +1,65 @@
+From 0fb6754f996b5022e1d856fda3d3258382383596 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 6 May 2009 09:03:43 +0300
+Subject: [PATCH 62/69] DSS2: VRAM: Fix indentation
+
+---
+ arch/arm/plat-omap/vram.c | 26 +++++++++++++-------------
+ 1 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index b126a64..f3ce849 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -287,35 +287,35 @@ static void _omap_vram_dma_cb(int lch, u16 ch_status, void *data)
+ static int _omap_vram_clear(u32 paddr, unsigned pages)
+ {
+ struct completion compl;
+- unsigned elem_count;
+- unsigned frame_count;
++ unsigned elem_count;
++ unsigned frame_count;
+ int r;
+ int lch;
+
+ init_completion(&compl);
+
+- r = omap_request_dma(OMAP_DMA_NO_DEVICE, "VRAM DMA",
++ r = omap_request_dma(OMAP_DMA_NO_DEVICE, "VRAM DMA",
+ _omap_vram_dma_cb,
+- &compl, &lch);
+- if (r) {
++ &compl, &lch);
++ if (r) {
+ pr_err("VRAM: request_dma failed for memory clear\n");
+ return -EBUSY;
+ }
+
+- elem_count = pages * PAGE_SIZE / 4;
+- frame_count = 1;
++ elem_count = pages * PAGE_SIZE / 4;
++ frame_count = 1;
+
+- omap_set_dma_transfer_params(lch, OMAP_DMA_DATA_TYPE_S32,
+- elem_count, frame_count,
+- OMAP_DMA_SYNC_ELEMENT,
+- 0, 0);
++ omap_set_dma_transfer_params(lch, OMAP_DMA_DATA_TYPE_S32,
++ elem_count, frame_count,
++ OMAP_DMA_SYNC_ELEMENT,
++ 0, 0);
+
+- omap_set_dma_dest_params(lch, 0, OMAP_DMA_AMODE_POST_INC,
++ omap_set_dma_dest_params(lch, 0, OMAP_DMA_AMODE_POST_INC,
+ paddr, 0, 0);
+
+ omap_set_dma_color_mode(lch, OMAP_DMA_CONSTANT_FILL, 0x000000);
+
+- omap_start_dma(lch);
++ omap_start_dma(lch);
+
+ if (wait_for_completion_timeout(&compl, msecs_to_jiffies(1000)) == 0) {
+ omap_stop_dma(lch);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch b/recipes/linux/linux-omap-pm/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch
new file mode 100644
index 0000000000..8633921979
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch
@@ -0,0 +1,82 @@
+From 5d3426ae63c27b9405be8179beabe1e095b44a35 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 19:00:19 +0200
+Subject: [PATCH 63/69] DSS2: fix the usage of get_last_off_on_transaction_id
+
+The function returns int not unsigned since it can fail. Handle the
+failing case as if the context had been lost. So now:
+
+1. No get_last_off_on_transaction_id func in platform data->
+ never restore the context
+2. Return val < 0 -> force the restore
+3. Return val >= 0 do the restore only if the counter has changed.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 2 +-
+ drivers/video/omap2/dss/core.c | 18 ++++++++++++------
+ 2 files changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index 45b16ca..31ebb96 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -234,7 +234,7 @@ struct device;
+
+ /* Board specific data */
+ struct omap_dss_board_info {
+- unsigned (*get_last_off_on_transaction_id)(struct device *dev);
++ int (*get_last_off_on_transaction_id)(struct device *dev);
+ int (*dsi_power_up)(void);
+ void (*dsi_power_down)(void);
+ int num_displays;
+diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
+index ae7cd06..6d11b04 100644
+--- a/drivers/video/omap2/dss/core.c
++++ b/drivers/video/omap2/dss/core.c
+@@ -38,7 +38,7 @@
+
+ static struct {
+ struct platform_device *pdev;
+- unsigned ctx_id;
++ int ctx_id;
+
+ struct clk *dss_ick;
+ struct clk *dss1_fck;
+@@ -63,22 +63,28 @@ module_param_named(debug, dss_debug, bool, 0644);
+ #endif
+
+ /* CONTEXT */
+-static unsigned dss_get_ctx_id(void)
++static int dss_get_ctx_id(void)
+ {
+ struct omap_dss_board_info *pdata = core.pdev->dev.platform_data;
++ int r;
+
+ if (!pdata->get_last_off_on_transaction_id)
+ return 0;
+-
+- return pdata->get_last_off_on_transaction_id(&core.pdev->dev);
++ r = pdata->get_last_off_on_transaction_id(&core.pdev->dev);
++ if (r < 0) {
++ dev_err(&core.pdev->dev,
++ "getting transaction ID failed, will force context restore\n");
++ r = -1;
++ }
++ return r;
+ }
+
+ int dss_need_ctx_restore(void)
+ {
+ int id = dss_get_ctx_id();
+
+- if (id != core.ctx_id) {
+- DSSDBG("ctx id %u -> id %u\n",
++ if (id < 0 || id != core.ctx_id) {
++ DSSDBG("ctx id %d -> id %d\n",
+ core.ctx_id, id);
+ core.ctx_id = id;
+ return 1;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0064-VRFB-fix-debug-messages.patch b/recipes/linux/linux-omap-pm/dss2/0064-VRFB-fix-debug-messages.patch
new file mode 100644
index 0000000000..2ba9b1b1a2
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0064-VRFB-fix-debug-messages.patch
@@ -0,0 +1,35 @@
+From 784271e9546844c5e69ec6d8f2fd3713847b6ab2 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 11:16:14 +0200
+Subject: [PATCH 64/69] VRFB: fix debug messages
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/vrfb.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 649803e..289fc8a 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -87,7 +87,7 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ u32 control;
+
+ DBG("omapfb_set_vrfb(%d, %lx, %dx%d, %d)\n", ctx, paddr,
+- width, height, bytespp);
++ width, height, color_mode);
+
+ switch (color_mode) {
+ case OMAP_DSS_COLOR_RGB16:
+@@ -127,7 +127,7 @@ void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+ vrfb_width = ALIGN(width * bytespp, VRFB_PAGE_WIDTH) / bytespp;
+ vrfb_height = ALIGN(height, VRFB_PAGE_HEIGHT);
+
+- DBG("vrfb w %u, h %u\n", vrfb_width, vrfb_height);
++ DBG("vrfb w %u, h %u bytespp %d\n", vrfb_width, vrfb_height, bytespp);
+
+ size = vrfb_width << SMS_IMAGEWIDTH_OFFSET;
+ size |= vrfb_height << SMS_IMAGEHEIGHT_OFFSET;
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0065-VRFB-add-suspend-resume-functionality.patch b/recipes/linux/linux-omap-pm/dss2/0065-VRFB-add-suspend-resume-functionality.patch
new file mode 100644
index 0000000000..17f959cb27
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0065-VRFB-add-suspend-resume-functionality.patch
@@ -0,0 +1,216 @@
+From 1269429fe6ddd6e5f15e3b4edb4fc2bcd6fc0410 Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Tue, 5 May 2009 11:16:13 +0200
+Subject: [PATCH 65/69] VRFB: add suspend/resume functionality
+
+At the moment the VRFB context is restored at each core power domain
+OFF->ON transition. This is not optimal since the VRFB might be unused
+temporarily for example when the screen is blanked. Add a suspend /
+resume function to mark these unused periods during which we'll avoid
+thea the context restore.
+
+Use atomic bitops for ctx_map for consistency.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/include/mach/vrfb.h | 2 +
+ arch/arm/plat-omap/vrfb.c | 75 ++++++++++++++++++++++++-----
+ drivers/video/omap2/omapfb/omapfb-main.c | 28 +++++++++++
+ 3 files changed, 92 insertions(+), 13 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/vrfb.h b/arch/arm/plat-omap/include/mach/vrfb.h
+index ee6c062..9647d82 100644
+--- a/arch/arm/plat-omap/include/mach/vrfb.h
++++ b/arch/arm/plat-omap/include/mach/vrfb.h
+@@ -39,6 +39,8 @@ struct vrfb
+
+ extern int omap_vrfb_request_ctx(struct vrfb *vrfb);
+ extern void omap_vrfb_release_ctx(struct vrfb *vrfb);
++extern void omap_vrfb_suspend_ctx(struct vrfb *vrfb);
++extern void omap_vrfb_resume_ctx(struct vrfb *vrfb);
+ extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
+ u8 bytespp);
+ extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 289fc8a..29f04e2 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -1,7 +1,9 @@
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/ioport.h>
++
+ #include <asm/io.h>
++#include <asm/bitops.h>
+
+ #include <mach/io.h>
+ #include <mach/vrfb.h>
+@@ -37,7 +39,9 @@
+
+ #define VRFB_NUM_CTXS 12
+ /* bitmap of reserved contexts */
+-static unsigned ctx_map;
++static unsigned long ctx_map;
++/* bitmap of contexts for which we have to keep the HW context valid */
++static unsigned long ctx_map_active;
+
+ /*
+ * Access to this happens from client drivers or the PM core after wake-up.
+@@ -51,18 +55,23 @@ struct {
+ u32 size;
+ } vrfb_hw_context[VRFB_NUM_CTXS];
+
++static void inline restore_hw_context(int ctx)
++{
++ omap_writel(vrfb_hw_context[ctx].control, SMS_ROT_CONTROL(ctx));
++ omap_writel(vrfb_hw_context[ctx].size, SMS_ROT_SIZE(ctx));
++ omap_writel(vrfb_hw_context[ctx].physical_ba, SMS_ROT_PHYSICAL_BA(ctx));
++}
++
+ void omap_vrfb_restore_context(void)
+ {
+ int i;
++ unsigned long map = ctx_map_active;
+
+- for (i = 0; i < VRFB_NUM_CTXS; i++) {
+- /* Restore only the active contexts */
+- if (!(ctx_map & (1 << i)))
+- continue;
+- omap_writel(vrfb_hw_context[i].control, SMS_ROT_CONTROL(i));
+- omap_writel(vrfb_hw_context[i].size, SMS_ROT_SIZE(i));
+- omap_writel(vrfb_hw_context[i].physical_ba,
+- SMS_ROT_PHYSICAL_BA(i));
++ for (i = ffs(map); i; i = ffs(map)) {
++ /* i=1..32 */
++ i--;
++ map &= ~(1 << i);
++ restore_hw_context(i);
+ }
+ }
+
+@@ -156,13 +165,20 @@ EXPORT_SYMBOL(omap_vrfb_setup);
+ void omap_vrfb_release_ctx(struct vrfb *vrfb)
+ {
+ int rot;
++ int ctx = vrfb->context;
+
+- if (vrfb->context == 0xff)
++ if (ctx == 0xff)
+ return;
+
+- DBG("release ctx %d\n", vrfb->context);
++ DBG("release ctx %d\n", ctx);
+
+- ctx_map &= ~(1 << vrfb->context);
++ if (!(ctx_map & (1 << ctx))) {
++ BUG();
++ return;
++ }
++ WARN_ON(!(ctx_map_active & (1 << ctx)));
++ clear_bit(ctx, &ctx_map_active);
++ clear_bit(ctx, &ctx_map);
+
+ for (rot = 0; rot < 4; ++rot) {
+ if(vrfb->paddr[rot]) {
+@@ -194,7 +210,9 @@ int omap_vrfb_request_ctx(struct vrfb *vrfb)
+
+ DBG("found free ctx %d\n", ctx);
+
+- ctx_map |= 1 << ctx;
++ set_bit(ctx, &ctx_map);
++ WARN_ON(ctx_map_active & (1 << ctx));
++ set_bit(ctx, &ctx_map_active);
+
+ memset(vrfb, 0, sizeof(*vrfb));
+
+@@ -219,3 +237,34 @@ int omap_vrfb_request_ctx(struct vrfb *vrfb)
+ }
+ EXPORT_SYMBOL(omap_vrfb_request_ctx);
+
++void omap_vrfb_suspend_ctx(struct vrfb *vrfb)
++{
++ DBG("suspend ctx %d\n", vrfb->context);
++ if (vrfb->context >= VRFB_NUM_CTXS ||
++ (!(1 << vrfb->context) & ctx_map_active)) {
++ BUG();
++ return;
++ }
++ clear_bit(vrfb->context, &ctx_map_active);
++}
++EXPORT_SYMBOL(omap_vrfb_suspend_ctx);
++
++void omap_vrfb_resume_ctx(struct vrfb *vrfb)
++{
++ DBG("resume ctx %d\n", vrfb->context);
++ if (vrfb->context >= VRFB_NUM_CTXS ||
++ ((1 << vrfb->context) & ctx_map_active)) {
++ BUG();
++ return;
++ }
++ /*
++ * omap_vrfb_restore_context is normally called by the core domain
++ * save / restore logic, but since this VRFB context was suspended
++ * those calls didn't actually restore the context and now we might
++ * have an invalid context. Do an explicit restore here.
++ */
++ restore_hw_context(vrfb->context);
++ set_bit(vrfb->context, &ctx_map_active);
++}
++EXPORT_SYMBOL(omap_vrfb_resume_ctx);
++
+diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
+index 76e7c6c..4bb74b7 100644
+--- a/drivers/video/omap2/omapfb/omapfb-main.c
++++ b/drivers/video/omap2/omapfb/omapfb-main.c
+@@ -1036,6 +1036,30 @@ static int omapfb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
+ return 0;
+ }
+
++static void omapfb_vrfb_suspend_all(struct omapfb2_device *fbdev)
++{
++ int i;
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
++
++ if (ofbi->region.vrfb.vaddr[0])
++ omap_vrfb_suspend_ctx(&ofbi->region.vrfb);
++ }
++}
++
++static void omapfb_vrfb_resume_all(struct omapfb2_device *fbdev)
++{
++ int i;
++
++ for (i = 0; i < fbdev->num_fbs; i++) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
++
++ if (ofbi->region.vrfb.vaddr[0])
++ omap_vrfb_resume_ctx(&ofbi->region.vrfb);
++ }
++}
++
+ static int omapfb_blank(int blank, struct fb_info *fbi)
+ {
+ struct omapfb_info *ofbi = FB2OFB(fbi);
+@@ -1051,6 +1075,8 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
+ if (display->state != OMAP_DSS_DISPLAY_SUSPENDED)
+ goto exit;
+
++ omapfb_vrfb_resume_all(fbdev);
++
+ if (display->resume)
+ r = display->resume(display);
+
+@@ -1073,6 +1099,8 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
+ if (display->suspend)
+ r = display->suspend(display);
+
++ omapfb_vrfb_suspend_all(fbdev);
++
+ break;
+
+ default:
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch b/recipes/linux/linux-omap-pm/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch
new file mode 100644
index 0000000000..a3af90d959
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch
@@ -0,0 +1,92 @@
+From 0201b40018d9e264f8c4ea7871223c94e0de61b1 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 7 May 2009 14:32:55 +0300
+Subject: [PATCH 66/69] DSS2: DSI: tune the timings to be more relaxed
+
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+---
+ drivers/video/omap2/dss/dsi.c | 37 +++++++++++++++++++++----------------
+ 1 files changed, 21 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
+index 5225ed6..67ecfcf 100644
+--- a/drivers/video/omap2/dss/dsi.c
++++ b/drivers/video/omap2/dss/dsi.c
+@@ -1396,28 +1396,28 @@ static void dsi_complexio_timings(void)
+ /* 1 * DDR_CLK = 2 * UI */
+
+ /* min 40ns + 4*UI max 85ns + 6*UI */
+- ths_prepare = ns2ddr(59) + 2;
++ ths_prepare = ns2ddr(70) + 2;
+
+ /* min 145ns + 10*UI */
+- ths_prepare_ths_zero = ns2ddr(145) + 5;
++ ths_prepare_ths_zero = ns2ddr(175) + 2;
+
+ /* min max(8*UI, 60ns+4*UI) */
+- ths_trail = max((unsigned)4, ns2ddr(60) + 2);
++ ths_trail = ns2ddr(60) + 5;
+
+ /* min 100ns */
+- ths_exit = ns2ddr(100);
++ ths_exit = ns2ddr(145);
+
+ /* tlpx min 50n */
+ tlpx_half = ns2ddr(25);
+
+ /* min 60ns */
+- tclk_trail = ns2ddr(60);
++ tclk_trail = ns2ddr(60) + 2;
+
+ /* min 38ns, max 95ns */
+- tclk_prepare = ns2ddr(38);
++ tclk_prepare = ns2ddr(65);
+
+ /* min tclk-prepare + tclk-zero = 300ns */
+- tclk_zero = ns2ddr(300 - 38);
++ tclk_zero = ns2ddr(260);
+
+ DSSDBG("ths_prepare %u (%uns), ths_prepare_ths_zero %u (%uns)\n",
+ ths_prepare, ddr2ns(ths_prepare),
+@@ -2340,9 +2340,19 @@ static void dsi_proto_timings(struct omap_display *display)
+ /* min 60ns + 52*UI */
+ tclk_post = ns2ddr(60) + 26;
+
++ /* ths_eot is 2 for 2 datalanes and 4 for 1 datalane */
++ if (display->hw_config.u.dsi.data1_lane != 0 &&
++ display->hw_config.u.dsi.data2_lane != 0)
++ ths_eot = 2;
++ else
++ ths_eot = 4;
++
+ ddr_clk_pre = DIV_ROUND_UP(tclk_pre + tlpx + tclk_zero + tclk_prepare,
+ 4);
+- ddr_clk_post = DIV_ROUND_UP(tclk_post + tclk_trail, 4);
++ ddr_clk_post = DIV_ROUND_UP(tclk_post + tclk_trail, 4) + ths_eot;
++
++ BUG_ON(ddr_clk_pre == 0 || ddr_clk_pre > 255);
++ BUG_ON(ddr_clk_post == 0 || ddr_clk_post > 255);
+
+ r = dsi_read_reg(DSI_CLK_TIMING);
+ r = FLD_MOD(r, ddr_clk_pre, 15, 8);
+@@ -2353,14 +2363,9 @@ static void dsi_proto_timings(struct omap_display *display)
+ ddr_clk_pre,
+ ddr_clk_post);
+
+- /* ths_eot is 2 for 2 datalanes and 4 for 1 datalane */
+- if (display->hw_config.u.dsi.data1_lane != 0 &&
+- display->hw_config.u.dsi.data2_lane != 0)
+- ths_eot = 2;
+- else
+- ths_eot = 4;
+-
+- enter_hs_mode_lat = DIV_ROUND_UP(tlpx + ths_prepare + ths_zero, 4) + 4;
++ enter_hs_mode_lat = 1 + DIV_ROUND_UP(tlpx, 4) +
++ DIV_ROUND_UP(ths_prepare, 4) +
++ DIV_ROUND_UP(ths_zero + 3, 4);
+ exit_hs_mode_lat = DIV_ROUND_UP(ths_trail + ths_exit, 4) + 1 + ths_eot;
+
+ r = FLD_VAL(enter_hs_mode_lat, 31, 16) |
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch b/recipes/linux/linux-omap-pm/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch
new file mode 100644
index 0000000000..911fe79bfa
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch
@@ -0,0 +1,29 @@
+From c474849d7aff57d578c639f63a9c3cbdec0501dd Mon Sep 17 00:00:00 2001
+From: Imre Deak <imre.deak@nokia.com>
+Date: Mon, 11 May 2009 15:15:52 +0200
+Subject: [PATCH 67/69] DSS2: VRFB: don't WARN when releasing inactive ctx
+
+Releasing an inactive context is valid, it can happen when
+the application first blanks the screen then frees the
+framebuffer.
+
+Signed-off-by: Imre Deak <imre.deak@nokia.com>
+---
+ arch/arm/plat-omap/vrfb.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/plat-omap/vrfb.c b/arch/arm/plat-omap/vrfb.c
+index 29f04e2..34395c2 100644
+--- a/arch/arm/plat-omap/vrfb.c
++++ b/arch/arm/plat-omap/vrfb.c
+@@ -176,7 +176,6 @@ void omap_vrfb_release_ctx(struct vrfb *vrfb)
+ BUG();
+ return;
+ }
+- WARN_ON(!(ctx_map_active & (1 << ctx)));
+ clear_bit(ctx, &ctx_map_active);
+ clear_bit(ctx, &ctx_map);
+
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch b/recipes/linux/linux-omap-pm/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch
new file mode 100644
index 0000000000..fba2ebd5db
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch
@@ -0,0 +1,65 @@
+From 0db37fa025f0eac64f9fdad49e310d7660f48944 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
+Date: Tue, 12 May 2009 14:38:05 +0200
+Subject: [PATCH 68/69] DSS2: Swap field offset values w/ VRFB rotation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+The field 0 and field 1 offset values were still incorrect when VRFB
+rotation is used. Swap them to put the fields into proper order.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
+---
+ drivers/video/omap2/dss/dispc.c | 17 +++++++++++------
+ 1 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index 5fc9457..b0e4960 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1182,6 +1182,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+
+ DSSDBG("calc_rot(%d): scrw %d, %dx%d\n", rotation, screen_width,
+ width, height);
++
++ /*
++ * field 0 = even field = bottom field
++ * field 1 = odd field = top field
++ */
+ switch (rotation + mirror * 4) {
+ case 0:
+ case 2:
+@@ -1194,11 +1199,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+ width = width >> 1;
+ case 1:
+ case 3:
+- *offset0 = 0;
++ *offset1 = 0;
+ if (fieldmode)
+- *offset1 = screen_width * ps;
++ *offset0 = screen_width * ps;
+ else
+- *offset1 = 0;
++ *offset0 = 0;
+
+ *row_inc = pixinc(1 + (screen_width - width) +
+ (fieldmode ? screen_width : 0),
+@@ -1216,11 +1221,11 @@ static void calc_vrfb_rotation_offset(u8 rotation, bool mirror,
+ width = width >> 1;
+ case 5:
+ case 7:
+- *offset0 = 0;
++ *offset1 = 0;
+ if (fieldmode)
+- *offset1 = screen_width * ps;
++ *offset0 = screen_width * ps;
+ else
+- *offset1 = 0;
++ *offset0 = 0;
+ *row_inc = pixinc(1 - (screen_width + width) -
+ (fieldmode ? screen_width : 0),
+ ps);
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch b/recipes/linux/linux-omap-pm/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch
new file mode 100644
index 0000000000..c637c48602
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch
@@ -0,0 +1,125 @@
+From b06406f3e5c3958f69185314c969f7c1a3265f71 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Thu, 14 May 2009 15:04:17 +0530
+Subject: [PATCH 69/69] DSS2: OMAP3EVM: Added DSI powerup and powerdown functions
+
+Copied fom 3430sdp implementation.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/mach-omap2/board-omap3evm.c | 62 +++++++++++++++++++++-------------
+ 1 files changed, 38 insertions(+), 24 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
+index 6f5a866..57c4fc7 100644
+--- a/arch/arm/mach-omap2/board-omap3evm.c
++++ b/arch/arm/mach-omap2/board-omap3evm.c
+@@ -237,6 +237,38 @@ static int __init omap3_evm_i2c_init(void)
+ static int lcd_enabled;
+ static int dvi_enabled;
+
++static void enable_vpll2(int enable)
++{
++ u8 ded_val, grp_val;
++
++ if (enable) {
++ ded_val = ENABLE_VPLL2_DEDICATED;
++ grp_val = ENABLE_VPLL2_DEV_GRP;
++ } else {
++ ded_val = 0;
++ grp_val = 0;
++ }
++
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ ded_val, TWL4030_VPLL2_DEDICATED);
++ twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
++ grp_val, TWL4030_VPLL2_DEV_GRP);
++}
++
++static int omap3evm_dsi_power_up(void)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0)
++ enable_vpll2(1);
++ return 0;
++}
++
++static void omap3evm_dsi_power_down(void)
++{
++ if (omap_rev() > OMAP3430_REV_ES1_0)
++ enable_vpll2(0);
++}
++
++
+ static void __init omap3_evm_display_init(void)
+ {
+ int r;
+@@ -306,12 +338,7 @@ static int omap3_evm_panel_enable_lcd(struct omap_display *display)
+ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
+ return -EINVAL;
+ }
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
+- }
++ omap3evm_dsi_power_up();
+ gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 0);
+ lcd_enabled = 1;
+ return 0;
+@@ -319,12 +346,7 @@ static int omap3_evm_panel_enable_lcd(struct omap_display *display)
+
+ static void omap3_evm_panel_disable_lcd(struct omap_display *display)
+ {
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEV_GRP);
+- }
++ omap3evm_dsi_power_down();
+ gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 1);
+ lcd_enabled = 0;
+ }
+@@ -370,13 +392,8 @@ static int omap3_evm_panel_enable_dvi(struct omap_display *display)
+ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
+ return -EINVAL;
+ }
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+- ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
+- }
+
++ omap3evm_dsi_power_up();
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
+ TWL4030_GPIODATA_IN3);
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80,
+@@ -388,13 +405,8 @@ static int omap3_evm_panel_enable_dvi(struct omap_display *display)
+
+ static void omap3_evm_panel_disable_dvi(struct omap_display *display)
+ {
+- if (omap_rev() > OMAP3430_REV_ES1_0) {
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEDICATED);
+- twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+- TWL4030_VPLL2_DEV_GRP);
+- }
+
++ omap3evm_dsi_power_down();
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
+ TWL4030_GPIODATA_IN3);
+ twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0x00,
+@@ -413,6 +425,8 @@ static struct omap_dss_display_config omap3_evm_display_data_dvi = {
+ };
+
+ static struct omap_dss_board_info omap3_evm_dss_data = {
++ .dsi_power_up = omap3evm_dsi_power_up,
++ .dsi_power_down = omap3evm_dsi_power_down,
+ .num_displays = 3,
+ .displays = {
+ &omap3_evm_display_data,
+--
+1.6.2.4
+
diff --git a/recipes/linux/linux-omap-pm/dss2/0070-DSS2-fix-irq1.diff b/recipes/linux/linux-omap-pm/dss2/0070-DSS2-fix-irq1.diff
new file mode 100644
index 0000000000..8f384dfe2d
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0070-DSS2-fix-irq1.diff
@@ -0,0 +1,221 @@
+From 093988f36ffcb0201927f8b452e546e1141aa0fa Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Sat, 23 May 2009 15:00:21 +0000
+Subject: DSS2: DISPC: fix irq handling locking
+
+---
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b0e4960..b3685b2 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -154,23 +154,20 @@ static struct {
+
+ struct clk *dpll4_m4_ck;
+
+- spinlock_t irq_lock;
+-
+ unsigned long cache_req_pck;
+ unsigned long cache_prate;
+ struct dispc_clock_info cache_cinfo;
+
+- u32 irq_error_mask;
++ spinlock_t irq_lock;
++ u32 irq_error_mask;
+ struct omap_dispc_isr_data registered_isr[DISPC_MAX_NR_ISRS];
+-
+- spinlock_t error_lock;
+ u32 error_irqs;
+ struct work_struct error_work;
+
+ u32 ctx[DISPC_SZ_REGS / sizeof(u32)];
+ } dispc;
+
+-static void omap_dispc_set_irqs(void);
++static void _omap_dispc_set_irqs(void);
+
+ static inline void dispc_write_reg(const struct dispc_reg idx, u32 val)
+ {
+@@ -1691,10 +1688,13 @@ void dispc_enable_digit_out(bool enable)
+ }
+
+ if (enable) {
++ unsigned long flags;
+ /* When we enable digit output, we'll get an extra digit
+ * sync lost interrupt, that we need to ignore */
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ dispc.irq_error_mask &= ~DISPC_IRQ_SYNC_LOST_DIGIT;
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ /* When we disable digit output, we need to wait until fields are done.
+@@ -1728,9 +1728,12 @@ void dispc_enable_digit_out(bool enable)
+ DSSERR("failed to unregister EVSYNC isr\n");
+
+ if (enable) {
++ unsigned long flags;
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ dispc.irq_error_mask = DISPC_IRQ_MASK_ERROR;
+ dispc_write_reg(DISPC_IRQSTATUS, DISPC_IRQ_SYNC_LOST_DIGIT);
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ enable_clocks(0);
+@@ -2508,14 +2511,14 @@ int dispc_get_clock_div(struct dispc_clock_info *cinfo)
+ return 0;
+ }
+
+-static void omap_dispc_set_irqs(void)
++/* dispc.irq_lock has to be locked by the caller */
++static void _omap_dispc_set_irqs(void)
+ {
+- unsigned long flags;
+- u32 mask = dispc.irq_error_mask;
++ u32 mask;
+ int i;
+ struct omap_dispc_isr_data *isr_data;
+
+- spin_lock_irqsave(&dispc.irq_lock, flags);
++ mask = dispc.irq_error_mask;
+
+ for (i = 0; i < DISPC_MAX_NR_ISRS; i++) {
+ isr_data = &dispc.registered_isr[i];
+@@ -2528,9 +2531,8 @@ static void omap_dispc_set_irqs(void)
+
+ enable_clocks(1);
+ dispc_write_reg(DISPC_IRQENABLE, mask);
+- enable_clocks(0);
+
+- spin_unlock_irqrestore(&dispc.irq_lock, flags);
++ enable_clocks(0);
+ }
+
+ int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
+@@ -2571,11 +2573,14 @@ int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
+
+ break;
+ }
+-err:
++
++ _omap_dispc_set_irqs();
++
+ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+- if (ret == 0)
+- omap_dispc_set_irqs();
++ return 0;
++err:
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+ return ret;
+ }
+@@ -2606,10 +2611,10 @@ int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
+ break;
+ }
+
+- spin_unlock_irqrestore(&dispc.irq_lock, flags);
+-
+ if (ret == 0)
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+ return ret;
+ }
+@@ -2645,11 +2650,15 @@ static void print_irq_status(u32 status)
+ void dispc_irq_handler(void)
+ {
+ int i;
+- u32 irqstatus = dispc_read_reg(DISPC_IRQSTATUS);
++ u32 irqstatus;
+ u32 handledirqs = 0;
+ u32 unhandled_errors;
+ struct omap_dispc_isr_data *isr_data;
+
++ spin_lock(&dispc.irq_lock);
++
++ irqstatus = dispc_read_reg(DISPC_IRQSTATUS);
++
+ #ifdef DEBUG
+ if (dss_debug)
+ print_irq_status(irqstatus);
+@@ -2673,15 +2682,15 @@ void dispc_irq_handler(void)
+ unhandled_errors = irqstatus & ~handledirqs & dispc.irq_error_mask;
+
+ if (unhandled_errors) {
+- spin_lock(&dispc.error_lock);
+ dispc.error_irqs |= unhandled_errors;
+- spin_unlock(&dispc.error_lock);
+
+ dispc.irq_error_mask &= ~unhandled_errors;
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
+
+ schedule_work(&dispc.error_work);
+ }
++
++ spin_unlock(&dispc.irq_lock);
+ }
+
+ static void dispc_error_worker(struct work_struct *work)
+@@ -2690,10 +2699,10 @@ static void dispc_error_worker(struct work_struct *work)
+ u32 errors;
+ unsigned long flags;
+
+- spin_lock_irqsave(&dispc.error_lock, flags);
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ errors = dispc.error_irqs;
+ dispc.error_irqs = 0;
+- spin_unlock_irqrestore(&dispc.error_lock, flags);
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+
+ if (errors & DISPC_IRQ_GFX_FIFO_UNDERFLOW) {
+ DSSERR("GFX_FIFO_UNDERFLOW, disabling GFX\n");
+@@ -2836,8 +2845,10 @@ static void dispc_error_worker(struct work_struct *work)
+ }
+ }
+
++ spin_lock_irqsave(&dispc.irq_lock, flags);
+ dispc.irq_error_mask |= errors;
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout)
+@@ -2921,6 +2932,10 @@ void dispc_fake_vsync_irq(void)
+
+ static void _omap_dispc_initialize_irq(void)
+ {
++ unsigned long flags;
++
++ spin_lock_irqsave(&dispc.irq_lock, flags);
++
+ memset(dispc.registered_isr, 0, sizeof(dispc.registered_isr));
+
+ dispc.irq_error_mask = DISPC_IRQ_MASK_ERROR;
+@@ -2929,7 +2944,9 @@ static void _omap_dispc_initialize_irq(void)
+ * so clear it */
+ dispc_write_reg(DISPC_IRQSTATUS, dispc_read_reg(DISPC_IRQSTATUS));
+
+- omap_dispc_set_irqs();
++ _omap_dispc_set_irqs();
++
++ spin_unlock_irqrestore(&dispc.irq_lock, flags);
+ }
+
+ void dispc_enable_sidle(void)
+@@ -2970,7 +2987,6 @@ int dispc_init(void)
+ u32 rev;
+
+ spin_lock_init(&dispc.irq_lock);
+- spin_lock_init(&dispc.error_lock);
+
+ INIT_WORK(&dispc.error_work, dispc_error_worker);
+
+--
+cgit v0.8.2.1-10-g45e7
diff --git a/recipes/linux/linux-omap-pm/dss2/0071-DSS2-fix-irq2.diff b/recipes/linux/linux-omap-pm/dss2/0071-DSS2-fix-irq2.diff
new file mode 100644
index 0000000000..cb8aaf1a28
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0071-DSS2-fix-irq2.diff
@@ -0,0 +1,35 @@
+From 8af2f6550d6971875e4c5d3f93982f86f4bcf216 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Sat, 23 May 2009 15:00:00 +0000
+Subject: DSS2: DISPC: clear irqstatus for newly enabled irqs
+
+This fixes the problem that when requesting a new irq
+we could get the isr called too early in case irqstatus
+already had that irq flag on.
+---
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b3685b2..2471cfe 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -2515,6 +2515,7 @@ int dispc_get_clock_div(struct dispc_clock_info *cinfo)
+ static void _omap_dispc_set_irqs(void)
+ {
+ u32 mask;
++ u32 old_mask;
+ int i;
+ struct omap_dispc_isr_data *isr_data;
+
+@@ -2530,6 +2531,11 @@ static void _omap_dispc_set_irqs(void)
+ }
+
+ enable_clocks(1);
++
++ old_mask = dispc_read_reg(DISPC_IRQENABLE);
++ /* clear the irqstatus for newly enabled irqs */
++ dispc_write_reg(DISPC_IRQSTATUS, (mask ^ old_mask) & mask);
++
+ dispc_write_reg(DISPC_IRQENABLE, mask);
+
+ enable_clocks(0);
+--
+cgit v0.8.2.1-10-g45e7
diff --git a/recipes/linux/linux-omap-pm_2.6.29.bb b/recipes/linux/linux-omap-pm_2.6.29.bb
new file mode 100644
index 0000000000..5eebc1e8fb
--- /dev/null
+++ b/recipes/linux/linux-omap-pm_2.6.29.bb
@@ -0,0 +1,113 @@
+require linux.inc
+
+DESCRIPTION = "Linux kernel for OMAP processors"
+KERNEL_IMAGETYPE = "uImage"
+
+COMPATIBLE_MACHINE = "omap5912osk|omap1710h3|omap2430sdp|omap2420h4|beagleboard|omap3evm|omap3-pandora|overo"
+
+SRCREV = "9c133058b929e738e6f28cb99e99c7fb5b35c59a"
+
+PV = "2.6.29"
+MACHINE_KERNEL_PR_append = "-pm2+gitr${SRCREV}"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;protocol=git;branch=pm-2.6.29 \
+ file://defconfig"
+
+SRC_URI_append = " \
+ file://no-empty-flash-warnings.patch;patch=1 \
+ file://no-cortex-deadlock.patch;patch=1 \
+ file://read_die_ids.patch;patch=1 \
+ file://fix-install.patch;patch=1 \
+ file://0124-leds-gpio-broken-with-current-git.patch;patch=1 \
+ file://ehci.patch;patch=1 \
+ file://dss2/0001-Revert-gro-Fix-legacy-path-napi_complete-crash.patch;patch=1 \
+ file://dss2/0002-OMAPFB-move-omapfb.h-to-include-linux.patch;patch=1 \
+ file://dss2/0003-DSS2-OMAP2-3-Display-Subsystem-driver.patch;patch=1 \
+ file://dss2/0004-DSS2-OMAP-framebuffer-driver.patch;patch=1 \
+ file://dss2/0005-DSS2-Add-panel-drivers.patch;patch=1 \
+ file://dss2/0006-DSS2-HACK-Add-DSS2-support-for-N800.patch;patch=1 \
+ file://dss2/0007-DSS2-Add-DSS2-support-for-SDP-Beagle-Overo-EVM.patch;patch=1 \
+ file://dss2/0008-DSS2-Add-function-to-display-object-to-get-the-back.patch;patch=1 \
+ file://dss2/0009-DSS2-Add-acx565akm-panel.patch;patch=1 \
+ file://dss2/0010-DSS2-Small-VRFB-context-allocation-bug-fixed.patch;patch=1 \
+ file://dss2/0011-DSS2-Allocated-memory-for-Color-Look-up-table.patch;patch=1 \
+ file://dss2/0012-DSS2-Fix-DMA-rotation.patch;patch=1 \
+ file://dss2/0013-DSS2-Verify-that-overlay-paddr-0.patch;patch=1 \
+ file://dss2/0014-DSS2-Add-function-to-get-DSS-logic-clock-rate.patch;patch=1 \
+ file://dss2/0015-DSS2-DSI-calculate-VP_CLK_RATIO-properly.patch;patch=1 \
+ file://dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch;patch=1 \
+ file://dss2/0017-DSS2-Disable-video-planes-on-sync-lost-error.patch;patch=1 \
+ file://dss2/0018-DSS2-check-for-ovl-paddr-only-when-enabling.patch;patch=1 \
+ file://dss2/0019-DSS2-Check-fclk-limits-when-configuring-video-plane.patch;patch=1 \
+ file://dss2/0020-DSS2-Check-scaling-limits-against-proper-values.patch;patch=1 \
+ file://dss2/0021-DSS2-Add-venc-register-dump.patch;patch=1 \
+ file://dss2/0022-DSS2-FB-remove-unused-var-warning.patch;patch=1 \
+ file://dss2/0023-DSS2-pass-the-default-FB-color-format-through-board.patch;patch=1 \
+ file://dss2/0024-DSS2-Beagle-Use-gpio_set_value.patch;patch=1 \
+ file://dss2/0025-DSS2-VRFB-Macro-for-calculating-base-address-of-th.patch;patch=1 \
+ file://dss2/0026-DSS2-DSI-sidlemode-to-noidle-while-sending-frame.patch;patch=1 \
+ file://dss2/0027-DSS2-VRFB-rotation-and-mirroring-implemented.patch;patch=1 \
+ file://dss2/0028-DSS2-OMAPFB-Added-support-for-the-YUV-VRFB-rotatio.patch;patch=1 \
+ file://dss2/0029-DSS2-OMAPFB-Set-line_length-correctly-for-YUV-with.patch;patch=1 \
+ file://dss2/0030-DSS2-dispc_get_trans_key-was-returning-wrong-key-ty.patch;patch=1 \
+ file://dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch;patch=1 \
+ file://dss2/0032-DSS2-Fix-DISPC_VID_FIR-value-for-omap34xx.patch;patch=1 \
+ file://dss2/0033-DSS2-Prefer-3-tap-filter.patch;patch=1 \
+ file://dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch;patch=1 \
+ file://dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch;patch=1 \
+ file://dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch;patch=1 \
+ file://dss2/0037-DSS2-Added-support-for-querying-color-keying.patch;patch=1 \
+ file://dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch;patch=1 \
+ file://dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch;patch=1 \
+ file://dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch;patch=1 \
+ file://dss2/0041-DSS2-Disable-vertical-offset-with-fieldmode.patch;patch=1 \
+ file://dss2/0042-DSS2-Don-t-enable-fieldmode-automatically.patch;patch=1 \
+ file://dss2/0043-DSS2-Swap-field-0-and-field-1-registers.patch;patch=1 \
+ file://dss2/0044-DSS2-add-sysfs-entry-for-seting-the-rotate-type.patch;patch=1 \
+ file://dss2/0045-DSS2-Fixed-line-endings-from-to.patch;patch=1 \
+ file://dss2/0046-DSS2-DSI-decrease-sync-timeout-from-60s-to-2s.patch;patch=1 \
+ file://dss2/0047-DSS2-fix-return-value-for-rotate_type-sysfs-functio.patch;patch=1 \
+ file://dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch;patch=1 \
+ file://dss2/0049-DSS2-VRAM-clear-allocated-area-with-DMA.patch;patch=1 \
+ file://dss2/0050-DSS2-OMAPFB-remove-fb-clearing-code.patch;patch=1 \
+ file://dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch;patch=1 \
+ file://dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch;patch=1 \
+ file://dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch;patch=1 \
+ file://dss2/0054-DSS2-DSI-more-error-handling.patch;patch=1 \
+ file://dss2/0055-DSS2-Added-global-alpha-support.patch;patch=1 \
+ file://dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch;patch=1 \
+ file://dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch;patch=1 \
+ file://dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch;patch=1 \
+ file://dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch;patch=1 \
+ file://dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch;patch=1 \
+ file://dss2/0061-DSS2-VRFB-save-restore-context.patch;patch=1 \
+ file://dss2/0062-DSS2-VRAM-Fix-indentation.patch;patch=1 \
+ file://dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch;patch=1 \
+ file://dss2/0064-VRFB-fix-debug-messages.patch;patch=1 \
+ file://dss2/0065-VRFB-add-suspend-resume-functionality.patch;patch=1 \
+ file://dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch;patch=1 \
+ file://dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch;patch=1 \
+ file://dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch;patch=1 \
+ file://dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch;patch=1 \
+ file://dss2/0070-DSS2-fix-irq1.diff;patch=1 \
+ file://dss2/0071-DSS2-fix-irq2.diff;patch=1 \
+ file://dss2/merge-fixups.diff;patch=1 \
+ file://overo-cpufreq.diff;patch=1 \
+ file://register-all-OPPs.diff;patch=1 \
+ file://fix-audio-capture.patch;patch=1 \
+"
+
+
+SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \
+ "
+
+SRC_URI_append_omap3evm = " \
+ file://evm-mcspi-ts.diff;patch=1 \
+"
+
+S = "${WORKDIR}/git"
+
+
+module_autoload_ohci-hcd_omap5912osk = "ohci-hcd"
+
+
diff --git a/recipes/linux/linux-omap-pm_git.bb b/recipes/linux/linux-omap-pm_git.bb
index 11bfa4b087..0e42594168 100644
--- a/recipes/linux/linux-omap-pm_git.bb
+++ b/recipes/linux/linux-omap-pm_git.bb
@@ -7,11 +7,11 @@ COMPATIBLE_MACHINE = "omap5912osk|omap1710h3|omap2430sdp|omap2420h4|beagleboard|
DEFAULT_PREFERENCE = "-1"
-SRCREV = "9d76f46e79302058464b569dbad9af8c594dbe53"
+SRCREV = "cbfc461bd5c4d0aff8501dd82db18146a22f49cf"
-PV = "2.6.29-pm0+gitr${SRCREV}"
+PV = "2.6.29-pm1+gitr${SRCREV}"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;protocol=git;branch=pm \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;protocol=git;branch=pm-2.6.29 \
file://defconfig"
SRC_URI_append = " \
@@ -74,6 +74,24 @@ SRC_URI_append = " \
file://dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch;patch=1 \
file://dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch;patch=1 \
file://dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch;patch=1 \
+ file://dss2/0054-DSS2-DSI-more-error-handling.patch;patch=1 \
+ file://dss2/0055-DSS2-Added-global-alpha-support.patch;patch=1 \
+ file://dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch;patch=1 \
+ file://dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch;patch=1 \
+ file://dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch;patch=1 \
+ file://dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch;patch=1 \
+ file://dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch;patch=1 \
+ file://dss2/0061-DSS2-VRFB-save-restore-context.patch;patch=1 \
+ file://dss2/0062-DSS2-VRAM-Fix-indentation.patch;patch=1 \
+ file://dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch;patch=1 \
+ file://dss2/0064-VRFB-fix-debug-messages.patch;patch=1 \
+ file://dss2/0065-VRFB-add-suspend-resume-functionality.patch;patch=1 \
+ file://dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch;patch=1 \
+ file://dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch;patch=1 \
+ file://dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch;patch=1 \
+ file://dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch;patch=1 \
+ file://dss2/0070-DSS2-fix-irq1.diff;patch=1 \
+ file://dss2/0071-DSS2-fix-irq2.diff;patch=1 \
file://dss2/merge-fixups.diff;patch=1 \
file://overo-cpufreq.diff;patch=1 \
file://register-all-OPPs.diff;patch=1 \
diff --git a/recipes/linux/linux-omap_2.6.29.bb b/recipes/linux/linux-omap_2.6.29.bb
index f0769f8556..67a4803893 100644
--- a/recipes/linux/linux-omap_2.6.29.bb
+++ b/recipes/linux/linux-omap_2.6.29.bb
@@ -75,6 +75,24 @@ SRC_URI_append = " \
file://dss2/0051-DSS2-VRAM-use-debugfs-not-procfs.patch;patch=1 \
file://dss2/0052-DSS2-VRAM-fix-section-mismatch-warning.patch;patch=1 \
file://dss2/0053-DSS2-disable-LCD-DIGIT-before-resetting-DSS.patch;patch=1 \
+ file://dss2/0054-DSS2-DSI-more-error-handling.patch;patch=1 \
+ file://dss2/0055-DSS2-Added-global-alpha-support.patch;patch=1 \
+ file://dss2/0056-DSS2-Rotation-attrs-for-YUV-need-not-to-be-reversed.patch;patch=1 \
+ file://dss2/0057-DSS2-Documentation-update-for-new-sysfs-entries-in.patch;patch=1 \
+ file://dss2/0058-DSS2-Don-t-touch-plane-coordinates-when-changing-fb.patch;patch=1 \
+ file://dss2/0059-DSS2-DSI-configure-ENTER-EXIT_HS_MODE_LATENCY.patch;patch=1 \
+ file://dss2/0060-DSS2-Avoid-div-by-zero-when-calculating-required-fc.patch;patch=1 \
+ file://dss2/0061-DSS2-VRFB-save-restore-context.patch;patch=1 \
+ file://dss2/0062-DSS2-VRAM-Fix-indentation.patch;patch=1 \
+ file://dss2/0063-DSS2-fix-the-usage-of-get_last_off_on_transaction_i.patch;patch=1 \
+ file://dss2/0064-VRFB-fix-debug-messages.patch;patch=1 \
+ file://dss2/0065-VRFB-add-suspend-resume-functionality.patch;patch=1 \
+ file://dss2/0066-DSS2-DSI-tune-the-timings-to-be-more-relaxed.patch;patch=1 \
+ file://dss2/0067-DSS2-VRFB-don-t-WARN-when-releasing-inactive-ctx.patch;patch=1 \
+ file://dss2/0068-DSS2-Swap-field-offset-values-w-VRFB-rotation.patch;patch=1 \
+ file://dss2/0069-DSS2-OMAP3EVM-Added-DSI-powerup-and-powerdown-func.patch;patch=1 \
+ file://dss2/0070-DSS2-fix-irq1.diff;patch=1 \
+ file://dss2/0071-DSS2-fix-irq2.diff;patch=1 \
file://0001-board-ldp-add-regulator-info-to-get-the-microSD-slo.patch;patch=1 \
file://fix-unaligned-access.diff;patch=1 \
file://make-alignment-visible.diff;patch=1 \
@@ -138,6 +156,7 @@ SRC_URI_append = " \
# file://isp/standalone/0002-Resizer-bug-fixes-on-top-of-1.0.2-release.patch;patch=1 \
file://0124-leds-gpio-broken-with-current-git.patch;patch=1 \
file://modedb-hd720.patch;patch=1 \
+ file://0001-implement-TIF_RESTORE_SIGMASK-support-and-enable-the.patch;patch=1 \
"
diff --git a/recipes/linux/linux-powerpc-fsl-git/mpc8315e-rdb/defconfig b/recipes/linux/linux-powerpc-fsl-git/mpc8315e-rdb/defconfig
new file mode 100644
index 0000000000..84caff7550
--- /dev/null
+++ b/recipes/linux/linux-powerpc-fsl-git/mpc8315e-rdb/defconfig
@@ -0,0 +1,1766 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.30-rc6
+# Sat Jun 6 23:57:35 2009
+#
+# 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_BOOK3S=y
+CONFIG_PPC_FPU=y
+CONFIG_FSL_EMB_PERFMON=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_ARCH_PHYS_ADDR_T_64BIT is not set
+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_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=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_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_DTC=y
+CONFIG_DEFAULT_UIMAGE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
+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
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=17
+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_CGROUPS is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+# CONFIG_STRIP_ASM_SYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+# CONFIG_EPOLL is not set
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_AIO=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+CONFIG_SLUB_DEBUG=y
+CONFIG_COMPAT_BRK=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_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_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_IOREMAP_PROT=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+# CONFIG_SLOW_WORK is not set
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# 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"
+# CONFIG_FREEZER is not set
+CONFIG_PPC_MSI_BITMAP=y
+
+#
+# Platform support
+#
+# CONFIG_PPC_CHRP is not set
+# CONFIG_MPC5121_ADS is not set
+# CONFIG_MPC5121_GENERIC is not set
+# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_PMAC is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PPC_82xx is not set
+# CONFIG_PQ2ADS is not set
+CONFIG_PPC_83xx=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_MPC836x_RDK is not set
+# CONFIG_MPC837x_MDS is not set
+# CONFIG_MPC837x_RDB is not set
+# CONFIG_SBC834x is not set
+# CONFIG_ASP834x is not set
+CONFIG_PPC_MPC831x=y
+# CONFIG_PPC_86xx is not set
+# CONFIG_EMBEDDED6xx is not set
+# CONFIG_AMIGAONE is not set
+CONFIG_PPC_OF_BOOT_TRAMPOLINE=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_TAU is not set
+# CONFIG_QUICC_ENGINE is not set
+# CONFIG_FSL_ULI1575 is not set
+# CONFIG_MPC8xxx_GPIO is not set
+# CONFIG_SIMPLE_GPIO is not set
+# CONFIG_MCU_MPC8349EMITX 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=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_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_CRASH_DUMP 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_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_MIGRATION=y
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+CONFIG_PPC_4K_PAGES=y
+# CONFIG_PPC_16K_PAGES is not set
+# CONFIG_PPC_64K_PAGES is not set
+# CONFIG_PPC_256K_PAGES is not set
+CONFIG_FORCE_MAX_ZONEORDER=11
+CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+CONFIG_EXTRA_TARGETS=""
+# CONFIG_PM is not set
+CONFIG_SECCOMP=y
+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_FSL_PCI=y
+CONFIG_PPC_PCI_CHOICE=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
+# CONFIG_PCIEASPM is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+CONFIG_PCI_MSI=y
+# CONFIG_PCI_LEGACY is not set
+CONFIG_PCI_DEBUG=y
+# CONFIG_PCI_STUB is not set
+# CONFIG_PCI_IOV is not set
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+# CONFIG_HAS_RAPIDIO is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_PAGE_OFFSET=0xc0000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_PHYSICAL_START=0x00000000
+CONFIG_TASK_SIZE=0xc0000000
+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 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=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 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_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+CONFIG_WIRELESS=y
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_OLD_REGULATORY=y
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_LIB80211 is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# 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=1
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_OF_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 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 is not set
+CONFIG_MTD_PHYSMAP_OF=y
+# 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=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_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=y
+# CONFIG_MTD_NAND_FSL_UPM is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+CONFIG_MTD_UBI=m
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+# CONFIG_MTD_UBI_GLUEBI is not set
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_DEBUG is not set
+CONFIG_OF_DEVICE=y
+CONFIG_OF_I2C=y
+CONFIG_OF_SPI=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=32768
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_ISL29003 is not set
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=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=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_CXGB3_ISCSI 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_MPT2SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_LIBFC is not set
+# CONFIG_LIBFCOE is not set
+# CONFIG_FCOE 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_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
+CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_SATA_PMP=y
+# CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SIL24 is not set
+CONFIG_SATA_FSL=y
+CONFIG_ATA_SFF=y
+# 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_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_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_PATA_SCH is not set
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_AUTODETECT=y
+CONFIG_MD_LINEAR=y
+CONFIG_MD_RAID0=y
+CONFIG_MD_RAID1=y
+# CONFIG_MD_RAID10 is not set
+# CONFIG_MD_RAID456 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
+# CONFIG_BLK_DEV_DM is not set
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
+# 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_COMPAT_NET_DEV_OPS=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_STE10XP is not set
+# CONFIG_LSI_ET1011C_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_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_ETHOC is not set
+# CONFIG_DNET 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_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
+CONFIG_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_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_SMSC9420 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_ATL2 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_IP1000 is not set
+# CONFIG_IGB is not set
+# CONFIG_IGBVF is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+CONFIG_FSL_PQ_MDIO=y
+CONFIG_GIANFAR=y
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
+# CONFIG_ATL1E is not set
+# CONFIG_ATL1C is not set
+# CONFIG_JME is not set
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+CONFIG_CHELSIO_T3_DEPENDS=y
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_ENIC is not set
+# CONFIG_IXGBE is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+# CONFIG_VXGE is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
+# CONFIG_MLX4_EN is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
+# CONFIG_BNX2X is not set
+# CONFIG_QLGE is not set
+# CONFIG_SFC is not set
+# CONFIG_BE2NET is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# 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 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_DEVKMEM=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=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MAX3100 is not set
+# 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_DEVPTS_MULTIPLE_INSTANCES is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_ALTPCIESGDMA=m
+# CONFIG_HVC_UDBG is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
+# 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=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# PC SMBus host controller drivers
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_ISCH is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_MPC=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
+# CONFIG_I2C_VOODOO3 is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_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=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_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+# CONFIG_GPIOLIB is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7462 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ADT7475 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_G760A is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
+# CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
+# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_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_SENSORS_LIS3_SPI is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_ALIM7101_WDT is not set
+# CONFIG_8xxx_WDT is not set
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_TWL4030_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_PMIC_DA903X is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_MFD_PCF50633 is not set
+# CONFIG_REGULATOR 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_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# 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
+# CONFIG_HID_PID is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+
+#
+# Special HID drivers
+#
+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
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
+# CONFIG_USB_WUSB is not set
+# CONFIG_USB_WUSB_CBAF is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_EHCI_FSL=y
+CONFIG_USB_EHCI_HCD_PPC_OF=y
+# CONFIG_USB_OXU210HP_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_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
+# CONFIG_USB_WHCI_HCD is not set
+# CONFIG_USB_HWA_HCD is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+# CONFIG_USB_TMC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
+#
+
+#
+# also be needed; see USB_STORAGE Help for more info
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_SEVSEG is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_VST is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_IMX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_CI13XXX is not set
+CONFIG_USB_GADGET_NET2280=y
+CONFIG_USB_NET2280=y
+# CONFIG_USB_GADGET_GOKU 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=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_USB_G_PRINTER is not set
+# CONFIG_USB_CDC_COMPOSITE is not set
+
+#
+# OTG and related infrastructure
+#
+# CONFIG_NOP_USB_XCEIV is not set
+# CONFIG_UWB is not set
+# CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_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
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_RTC_DRV_GENERIC is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_XFS_FS=y
+# 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_BTRFS_FS=y
+# CONFIG_BTRFS_FS_POSIX_ACL 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
+
+#
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_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_PROC_PAGE_MONITOR=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_UBIFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_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_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=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 is not set
+# CONFIG_DLM is not set
+# CONFIG_BINARY_PRINTF is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_GENERIC_FIND_LAST_BIT=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_HAVE_LMB=y
+CONFIG_NLATTR=y
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_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_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_DETECT_HUNG_TASK=y
+# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_NOTIFIERS is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+# CONFIG_DEBUG_PAGEALLOC is not set
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_TRACING_SUPPORT=y
+
+#
+# Tracers
+#
+# CONFIG_FUNCTION_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_TRACE_BRANCH_PROFILING is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_PRINT_STACK_DEPTH=64
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_CODE_PATCHING_SELFTEST is not set
+# CONFIG_FTR_FIXUP_SELFTEST is not set
+# CONFIG_MSI_BITMAP_SELFTEST is not set
+# CONFIG_XMON is not set
+# CONFIG_IRQSTACKS is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_BOOTX_TEXT is not set
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_FIPS is not set
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_PCBC=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=y
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
+# CONFIG_CRYPTO_LZO is not set
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
+# CONFIG_CRYPTO_DEV_TALITOS is not set
+# CONFIG_PPC_CLOCK is not set
+# CONFIG_VIRTUALIZATION is not set
diff --git a/recipes/linux/linux-powerpc-fsl-git/mpc8315e-rdb/mpc8315erdb-add-msi-to-dts.patch b/recipes/linux/linux-powerpc-fsl-git/mpc8315e-rdb/mpc8315erdb-add-msi-to-dts.patch
new file mode 100644
index 0000000000..149ad3c1c5
--- /dev/null
+++ b/recipes/linux/linux-powerpc-fsl-git/mpc8315e-rdb/mpc8315erdb-add-msi-to-dts.patch
@@ -0,0 +1,29 @@
+Signed-off-by: Leon Woestenberg <leon@sidebranch.com>
+Tested-by: Leon Woestenberg <leon@sidebranch.com>
+
+diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts
+index 3f4c5fb..4f04667 100644
+--- a/arch/powerpc/boot/dts/mpc8315erdb.dts
++++ b/arch/powerpc/boot/dts/mpc8315erdb.dts
+@@ -322,6 +322,21 @@
+ reg = <0x700 0x100>;
+ device_type = "ipic";
+ };
++
++ ipic-msi@7c0 {
++ compatible = "fsl,ipic-msi";
++ reg = <0x7c0 0x40>;
++ msi-available-ranges = <0 0x100>;
++ interrupts = < 0x43 0x8
++ 0x4 0x8
++ 0x51 0x8
++ 0x52 0x8
++ 0x56 0x8
++ 0x57 0x8
++ 0x58 0x8
++ 0x59 0x8 >;
++ interrupt-parent = < &ipic >;
++ };
+ };
+
+ pci0: pci@e0008500 {
diff --git a/recipes/linux/linux-powerpc-fsl_git.bb b/recipes/linux/linux-powerpc-fsl_git.bb
new file mode 100644
index 0000000000..60b7b0e5d5
--- /dev/null
+++ b/recipes/linux/linux-powerpc-fsl_git.bb
@@ -0,0 +1,20 @@
+# This recipe builds the Linux kernel from the GIT tree for Freescale PowerPC
+# This tree is not upstream and should be used for bleeding-edge testing only.
+
+require linux.inc
+
+FILESPATHPKG =. "linux-powerpc-fsl-git/${MACHINE}:"
+
+SRCREV = "1406de8e11eb043681297adf86d6892ff8efc27a"
+
+PV = "2.6.30"
+PR = "r4"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git;protocol=git \
+ file://defconfig"
+
+SRC_URI_append_mpc8315e-rdb = " file://mpc8315erdb-add-msi-to-dts.patch;patch=1"
+
+COMPATIBLE_MACHINE = "mpc8315e-rdb"
+
+S = "${WORKDIR}/git"
diff --git a/recipes/linux/linux-rp-2.6.23/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch b/recipes/linux/linux-rp-2.6.23/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
new file mode 100644
index 0000000000..7e847d6a05
--- /dev/null
+++ b/recipes/linux/linux-rp-2.6.23/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
@@ -0,0 +1,15 @@
+Index: linux-2.6.23/include/linux/time.h
+===================================================================
+--- a/include/linux/time.h
++++ b/include/linux/time.h
+@@ -172,6 +172,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
+ {
+ 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/recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch b/recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
new file mode 100644
index 0000000000..9d7020d9f1
--- /dev/null
+++ b/recipes/linux/linux-rp-2.6.24/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch
@@ -0,0 +1,15 @@
+Index: linux-2.6.24/include/linux/time.h
+===================================================================
+--- a/include/linux/time.h
++++ b/include/linux/time.h
+@@ -172,6 +172,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
+ {
+ 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/recipes/linux/linux-rp.inc b/recipes/linux/linux-rp.inc
index bd08a6f3eb..bdeb9f364a 100644
--- a/recipes/linux/linux-rp.inc
+++ b/recipes/linux/linux-rp.inc
@@ -20,6 +20,9 @@ COMPATIBLE_MACHINE = '(collie|poodle|c7x0|akita|spitz|tosa|hx2000|qemuarm|qemux8
# Enable OABI compat for people stuck with obsolete userspace
ARM_KEEP_OABI ?= "1"
+# Quirk for udev greater or equal 141
+UDEV_GE_141 ?= "0"
+
KERNEL_DEFCONFIG ?= "defconfig-${MACHINE}"
CMDLINE_CON = "console=ttyS0,115200n8 console=tty1 noinitrd"
@@ -145,5 +148,21 @@ do_configure() {
-e '/CONFIG_LOGO_OZ640_CLUT224=/d' \
'${WORKDIR}/${KERNEL_DEFCONFIG}' >>'${S}/.config'
+ echo 'CONFIG_LOCALVERSION=""' >>${S}/.config
+ echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config
+
+ #
+ # Udev quirks
+ #
+
+ # Newer versions of udev mandate that sysfs doesn't have deprecated entries
+ if [ "${UDEV_GE_141}" = "1" ] ; then
+ sed -e /CONFIG_SYSFS_DEPRECATED/d \
+ -e /CONFIG_SYSFS_DEPRECATED_V2/d \
+ -i '${S}/.config'
+ echo '# CONFIG_SYSFS_DEPRECATED is not set' >> ${S}/.config
+ echo '# CONFIG_SYSFS_DEPRECATED_V2 is not set' >> ${S}/.config
+ fi
+
yes '' | oe_runmake oldconfig
}
diff --git a/recipes/linux/linux-rp_2.6.23.bb b/recipes/linux/linux-rp_2.6.23.bb
index 2293eea80e..460ac53012 100644
--- a/recipes/linux/linux-rp_2.6.23.bb
+++ b/recipes/linux/linux-rp_2.6.23.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r35"
+PR = "r36"
# Handy URLs
# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
@@ -14,6 +14,7 @@ PR = "r35"
# 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.23.tar.bz2 \
+ file://0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch;patch=1 \
${RPSRC}/pxa25x_suspend_fixes-r0.patch;patch=1;status=merged \
${RPSRC}/lzo_jffs2-r3.patch;patch=1;status=merged \
${RPSRC}/lzo_jffs2_lzomode-r1.patch;patch=1;status=merged \
diff --git a/recipes/linux/linux-rp_2.6.24.bb b/recipes/linux/linux-rp_2.6.24.bb
index 7b06916e1c..dd73738a3e 100644
--- a/recipes/linux/linux-rp_2.6.24.bb
+++ b/recipes/linux/linux-rp_2.6.24.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r22"
+PR = "r23"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_collie = "1"
@@ -23,6 +23,7 @@ DEFAULT_PREFERENCE_spitz = "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.24.tar.bz2 \
+ file://0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch;patch=1 \
${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 \
diff --git a/recipes/linux/linux.inc b/recipes/linux/linux.inc
index 5a4a11fecf..42fb56a22b 100644
--- a/recipes/linux/linux.inc
+++ b/recipes/linux/linux.inc
@@ -9,6 +9,9 @@ RPSRC = "http://www.rpsys.net/openzaurus/patches/archive"
# Enable OABI compat for people stuck with obsolete userspace
ARM_KEEP_OABI ?= "1"
+# Quirk for udev greater or equal 141
+UDEV_GE_141 ?= "0"
+
# Specify the commandline for your device
# Boot from mmc
@@ -103,6 +106,20 @@ do_configure_prepend() {
echo 'CONFIG_LOCALVERSION=""' >>${S}/.config
echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config
+
+ #
+ # Udev quirks
+ #
+
+ # Newer versions of udev mandate that sysfs doesn't have deprecated entries
+ if [ "${UDEV_GE_141}" = "1" ] ; then
+ sed -e /CONFIG_SYSFS_DEPRECATED/d \
+ -e /CONFIG_SYSFS_DEPRECATED_V2/d \
+ -i '${S}/.config'
+ echo '# CONFIG_SYSFS_DEPRECATED is not set' >> ${S}/.config
+ echo '# CONFIG_SYSFS_DEPRECATED_V2 is not set' >> ${S}/.config
+ fi
+
#
# root-over-nfs-over-usb-eth support. Limited, but should cover some cases.
# Enable this by setting a proper CMDLINE_NFSROOT_USB.
diff --git a/recipes/linux/linux_2.6.28.bb b/recipes/linux/linux_2.6.28.bb
index b11bf166c3..415f81a1cb 100644
--- a/recipes/linux/linux_2.6.28.bb
+++ b/recipes/linux/linux_2.6.28.bb
@@ -1,6 +1,6 @@
require linux.inc
-PR = "r8"
+PR = "r10"
# Mark archs/machines that this kernel supports
DEFAULT_PREFERENCE = "-1"
@@ -11,6 +11,7 @@ DEFAULT_PREFERENCE_stb225 = "28"
DEFAULT_PREFERENCE_collie = "1"
DEFAULT_PREFERENCE_gamecube = "1"
DEFAULT_PREFERENCE_wrap = "1"
+DEFAULT_PREFERENCE_tx27 = "1"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2 \
file://defconfig"
@@ -64,4 +65,9 @@ SRC_URI_append_gamecube = " \
file://patch-2.6.28-gc;patch=1 \
"
+SRC_URI_append_tx27 = " \
+ file://linux-2.6.28-karo4.diff;patch=1 \
+ "
+
+
S = "${WORKDIR}/linux-2.6.28/"
diff --git a/recipes/linux/linux_2.6.29.bb b/recipes/linux/linux_2.6.29.bb
index 4850fba9b8..dfed6f2a65 100644
--- a/recipes/linux/linux_2.6.29.bb
+++ b/recipes/linux/linux_2.6.29.bb
@@ -1,6 +1,6 @@
require linux.inc
-PR = "r4"
+PR = "r5"
S = "${WORKDIR}/linux-2.6.29"
@@ -14,6 +14,8 @@ DEFAULT_PREFERENCE_atngw100 = "1"
DEFAULT_PREFERENCE_micro2440 = "1"
DEFAULT_PREFERENCE_ep93xx = "1"
DEFAULT_PREFERENCE_cm-x270 = "1"
+DEFAULT_PREFERENCE_at2440evb = "1"
+DEFAULT_PREFERENCE_tqm8540 = "1"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.29.tar.bz2 \
file://defconfig"
diff --git a/recipes/linux/linux_2.6.30.bb b/recipes/linux/linux_2.6.30.bb
new file mode 100644
index 0000000000..900b3d95f1
--- /dev/null
+++ b/recipes/linux/linux_2.6.30.bb
@@ -0,0 +1,18 @@
+require linux.inc
+
+PR = "r0"
+
+S = "${WORKDIR}/linux-${PV}"
+
+# Mark archs/machines that this kernel supports
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_mpc8315e-rdb = "1"
+DEFAULT_PREFERENCE_tx25 = "1"
+DEFAULT_PREFERENCE_mx27ads = "1"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
+ file://defconfig"
+
+SRC_URI_append_mpc8315e-rdb = " file://mpc8315erdb-add-msi-to-dts.patch;patch=1"
+
+SRC_URI_append_tx25 = " file://linux-2.6.30-rc4-karo.diff;patch=1"
diff --git a/recipes/linux/openzaurus-pxa27x_2.4.20-rmk2-embedix20050602.bb b/recipes/linux/openzaurus-pxa27x_2.4.20-rmk2-embedix20050602.bb
index 5a90d415fb..e65f293de8 100644
--- a/recipes/linux/openzaurus-pxa27x_2.4.20-rmk2-embedix20050602.bb
+++ b/recipes/linux/openzaurus-pxa27x_2.4.20-rmk2-embedix20050602.bb
@@ -5,7 +5,6 @@ PV = "2.4.20-rmk2-embedix"
LICENSE = "GPL"
KV = "2.4.20"
PR = "r18"
-COMPATIBLE_MACHINE = "(akita|spitz)"
SRC_URI = "http://developer.ezaurus.com/sl_j/source/c3100/20050602/linux-c3100-20050602-rom1_01.tar.bz2 \
file://P01-C3000-clockup_050221.patch;pnum=2;patch=1 \
@@ -76,7 +75,11 @@ EXTRA_OEMAKE = "OPENZAURUS_RELEASE=-${DISTRO_VERSION}"
KERNEL_CCSUFFIX = "-2.95"
KERNEL_LDSUFFIX = "-2.11.2"
COMPATIBLE_HOST = "arm.*-linux"
-COMPATIBLE_MACHINE = '(akita|spitz|borzoi)'
+
+# For these old 2.4 kernels we override in sharprom-compatible.conf
+#COMPATIBLE_MACHINE = "(akita|spitz|borzoi)"
+COMPATIBLE_MACHINE = "none"
+
PARALLEL_MAKE = ""
#
diff --git a/recipes/linux/openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc b/recipes/linux/openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc
index 7b20b4fa99..6428629316 100644
--- a/recipes/linux/openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc
+++ b/recipes/linux/openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc
@@ -7,7 +7,6 @@ KV = "2.4.18"
RMKV = "7"
PXAV = "3"
SHARPV = "20031107"
-COMPATIBLE_MACHINE = "(poodle|corgi|shepherd|husky|poodle255|tosa)"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/openzaurus-pxa-${KV}-rmk${RMKV}-pxa${PXAV}-embedix${SHARPV}"
@@ -89,7 +88,11 @@ EXTRA_OEMAKE = " EMBEDIXRELEASE=-${DISTRO_VERSION}"
KERNEL_CCSUFFIX = "-2.95"
KERNEL_LDSUFFIX = "-2.11.2"
COMPATIBLE_HOST = "arm.*-linux"
-COMPATIBLE_MACHINE = '(corgi|husky|shepherd|poodle|poodle255)'
+
+# For these old 2.4 kernels we override in sharprom-compatible.conf
+#COMPATIBLE_MACHINE = "(poodle|corgi|shepherd|husky|poodle255|tosa)"
+COMPATIBLE_MACHINE = "none"
+
PARALLEL_MAKE = ""
#
diff --git a/recipes/linux/openzaurus-sa_2.4.18-rmk7-pxa3-embedix20030509.bb b/recipes/linux/openzaurus-sa_2.4.18-rmk7-pxa3-embedix20030509.bb
index b21a0c9328..4c9e9a1840 100644
--- a/recipes/linux/openzaurus-sa_2.4.18-rmk7-pxa3-embedix20030509.bb
+++ b/recipes/linux/openzaurus-sa_2.4.18-rmk7-pxa3-embedix20030509.bb
@@ -8,7 +8,6 @@ PXAV = "3"
SHARPV = "20030509"
PR = "r23"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/openzaurus-sa-${KV}-rmk${RMKV}-pxa${PXAV}-embedix${SHARPV}"
-COMPATIBLE_MACHINE = "collie"
SRC_URI = "http://www.openzaurus.org/mirror/linux-sl5500-${SHARPV}-rom3_10.tar.bz2 \
file://cacko.patch;patch=1 \
@@ -58,7 +57,11 @@ ALLOW_EMPTY = "1"
KERNEL_CCSUFFIX = "-2.95"
KERNEL_LDSUFFIX = "-2.11.2"
COMPATIBLE_HOST = "arm.*-linux"
-COMPATIBLE_MACHINE = "collie"
+
+# For these old 2.4 kernels we override in sharprom-compatible.conf
+#COMPATIBLE_MACHINE = "collie"
+COMPATIBLE_MACHINE = "none"
+
EXTRA_OEMAKE = " EMBEDIXRELEASE=-${DISTRO_VERSION}"
module_conf_usbdmonitor = "alias usbd0 usbdmonitor"
diff --git a/recipes/linux/poodle-kernel-2.4-embedix.bb b/recipes/linux/poodle-kernel-2.4-embedix.bb
index b3133f11ba..2f26cbc863 100644
--- a/recipes/linux/poodle-kernel-2.4-embedix.bb
+++ b/recipes/linux/poodle-kernel-2.4-embedix.bb
@@ -1,4 +1,4 @@
-COMPATIBLE_MACHINE = "poodle"
+MACHINE = "poodle"
COMPATIBLE_HOST = "arm.*-linux"
require openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc
diff --git a/recipes/linux/poodle-kernels-2.4-embedix.bb b/recipes/linux/poodle-kernels-2.4-embedix.bb
index 21d334fec3..256ef7125c 100644
--- a/recipes/linux/poodle-kernels-2.4-embedix.bb
+++ b/recipes/linux/poodle-kernels-2.4-embedix.bb
@@ -1,3 +1,7 @@
-COMPATIBLE_MACHINE = "poodle"
COMPATIBLE_HOST = "arm.*-linux"
+
+# For these old 2.4 kernels we override in sharprom-compatible.conf
+#COMPATIBLE_MACHINE = "(poodle|poodle255)"
+COMPATIBLE_MACHINE = "none"
+
DEPENDS = "poodle-kernel-2.4-embedix poodle255-kernel-2.4-embedix"
diff --git a/recipes/linux/poodle255-kernel-2.4-embedix.bb b/recipes/linux/poodle255-kernel-2.4-embedix.bb
index 28bb32d222..f3044f4e67 100644
--- a/recipes/linux/poodle255-kernel-2.4-embedix.bb
+++ b/recipes/linux/poodle255-kernel-2.4-embedix.bb
@@ -1,4 +1,4 @@
-COMPATIBLE_MACHINE = "poodle255"
+MACHINE = "poodle255"
COMPATIBLE_HOST = "arm.*-linux"
require openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc
diff --git a/recipes/linux/shepherd-kernel-2.4-embedix.bb b/recipes/linux/shepherd-kernel-2.4-embedix.bb
index ed1899a7ff..c52fb4767d 100644
--- a/recipes/linux/shepherd-kernel-2.4-embedix.bb
+++ b/recipes/linux/shepherd-kernel-2.4-embedix.bb
@@ -1,4 +1,4 @@
-COMPATIBLE_MACHINE = "shepherd"
+MACHINE = "shepherd"
COMPATIBLE_HOST = "arm.*-linux"
require openzaurus-pxa_2.4.18-rmk7-pxa3-embedix20031107.inc
diff --git a/recipes/log4cxx/log4cxx/log4cxx097.patch b/recipes/log4cxx/log4cxx/log4cxx097.patch
new file mode 100644
index 0000000000..86b6effdb0
--- /dev/null
+++ b/recipes/log4cxx/log4cxx/log4cxx097.patch
@@ -0,0 +1,48 @@
+--- log4cxx-0.9.7/src/socketoutputstream.cpp~ 2009-05-21 10:06:47.000000000 +0100
++++ log4cxx-0.9.7/src/socketoutputstream.cpp 2009-05-21 10:06:47.000000000 +0100
+@@ -13,7 +13,8 @@
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-
++
++#include <string.h>
+ #include <log4cxx/helpers/socketoutputstream.h>
+ #include <log4cxx/helpers/socket.h>
+ #include <log4cxx/helpers/loglog.h>
+
+--- log4cxx-0.9.7/src/stringtokenizer.cpp~ 2009-05-21 10:11:19.000000000 +0100
++++ log4cxx-0.9.7/src/stringtokenizer.cpp 2009-05-21 10:11:20.000000000 +0100
+@@ -13,7 +13,8 @@
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-
++
++#include <string.h>
+ #include <log4cxx/helpers/stringtokenizer.h>
+
+ using namespace log4cxx;
+
+--- log4cxx-0.9.7/src/timezone.cpp~ 2009-05-21 10:14:27.000000000 +0100
++++ log4cxx-0.9.7/src/timezone.cpp 2009-05-21 10:14:27.000000000 +0100
+@@ -13,7 +13,8 @@
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-
++
++#include <string.h>
+ #include <log4cxx/helpers/timezone.h>
+ #include <locale>
+
+--- log4cxx-0.9.7/src/xmlsocketappender.cpp~ 2009-05-21 10:16:24.000000000 +0100
++++ log4cxx-0.9.7/src/xmlsocketappender.cpp 2009-05-21 10:16:25.000000000 +0100
+@@ -14,6 +14,7 @@
+ * limitations under the License.
+ */
+
++#include <string.h>
+ #include <log4cxx/net/xmlsocketappender.h>
+ #include <log4cxx/helpers/loglog.h>
+ #include <log4cxx/helpers/socketoutputstream.h>
diff --git a/recipes/log4cxx/log4cxx_0.9.7.bb b/recipes/log4cxx/log4cxx_0.9.7.bb
new file mode 100644
index 0000000000..4817163e1f
--- /dev/null
+++ b/recipes/log4cxx/log4cxx_0.9.7.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Apache logging framework for C++ library"
+SECTION = "libs"
+DEPENDS = "apr apr-util expat gdbm"
+LICENSE = "Apache License, Version 2.0"
+HOMEPAGE = "http://logging.apache.org/log4cxx/"
+# PV = "0.10.0"
+PR = "r1"
+
+SRC_URI = "http://archive.apache.org/dist/logging/log4cxx/log4cxx-0.9.7.tar.gz \
+ file://log4cxx097.patch;patch=1"
+
+#build this:
+S = "${WORKDIR}/${PN}-${PV}"
+
+inherit autotools pkgconfig
+
+do_stage() {
+ autotools_stage_all
+}
diff --git a/recipes/logrotate-script/logrotate-script_cvs.bb b/recipes/logrotate-script/logrotate-script_cvs.bb
index a46b265e2f..2c6fd909b8 100644
--- a/recipes/logrotate-script/logrotate-script_cvs.bb
+++ b/recipes/logrotate-script/logrotate-script_cvs.bb
@@ -4,7 +4,7 @@ SECTION = "admin"
PRIORITY = "optional"
LICENSE = "GPL"
-SRC_URI = "http://meshcube.org/download/logrotate_${SRCDATE}.tgz"
+SRC_URI = "http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/logrotate_${SRCDATE}.tgz"
S = "${WORKDIR}/${PN}"
do_install() {
diff --git a/recipes/lowpan-utils/lowpan-utils_git.bb b/recipes/lowpan-tools/lowpan-tools_git.bb
index 89a5e438ab..307984498e 100644
--- a/recipes/lowpan-utils/lowpan-utils_git.bb
+++ b/recipes/lowpan-tools/lowpan-tools_git.bb
@@ -1,9 +1,9 @@
DESCRIPTION = "LoWPAN utilities (IEEE802.15.4)"
LICENSE = "GPL"
-SRCREV = "master"
-SRC_URI = "git://github.com/lumag/lowpan-utils.git;protocol=git"
+SRCREV = "28639544fa2496ae6f82ef300ffc9e6543c4bcd0"
+SRC_URI = "git://linux-zigbee.git.sourceforge.net/gitroot/linux-zigbee;protocol=git"
DEPENDS = "libnl bison-native flex-native"
-PR = "r4"
+PR = "r7"
S = "${WORKDIR}/git"
PACKAGES += "${PN}-tests-dbg"
@@ -11,11 +11,9 @@ PACKAGES += "${PN}-tests"
FILES_${PN} = "${sbindir}/iz ${sbindir}/izconfig \
${bindir}/izchat ${bindir}/izlisten ${sbindir}/izcoordinator \
${sbindir}/izattach"
-FILES_${PN}-tests = "${libexecdir}/zigbee ${libdir}/python*/site-packages"
-FILES_${PN}-tests-dbg = "${libexecdir}/zigbee/.debug"
+FILES_${PN}-tests = "${libexecdir}/lowpan-tools ${libdir}/python*/site-packages"
+FILES_${PN}-tests-dbg = "${libexecdir}/lowpan-tools/.debug"
-inherit autotools
+EXTRA_OECONF = "--disable-manpages"
-do_stage() {
- autotools_stage_all
-}
+inherit autotools_stage
diff --git a/recipes/madwifi/madwifi-ng_r.inc b/recipes/madwifi/madwifi-ng_r.inc
index 4eef55c636..219dfc4f46 100644
--- a/recipes/madwifi/madwifi-ng_r.inc
+++ b/recipes/madwifi/madwifi-ng_r.inc
@@ -11,7 +11,7 @@ WACKELF_SRC_URI_ixp4xx = " file://20-xscale-VFP-wackelf.patch;patch=1"
WACKELF_SRC_URI_compulab-pxa270 = " file://20-xscale-VFP-wackelf.patch;patch=1"
SRCNAME = "${PN}"
-SRC_URI = "http://snapshots.madwifi.org/madwifi-trunk/${SRCNAME}-${PV}.tar.gz \
+SRC_URI = "http://snapshots.madwifi-project.org/madwifi-trunk/${SRCNAME}-${PV}.tar.gz \
file://10-xscale-be-elf-copts.patch;patch=1 \
file://10-xscale-le-elf-copts.patch;patch=1 \
file://10-sh4-le-elf-copts.patch;patch=1 \
diff --git a/recipes/madwifi/madwifi-ng_r4029-20090525.bb b/recipes/madwifi/madwifi-ng_r4029-20090525.bb
new file mode 100644
index 0000000000..0c09a1c414
--- /dev/null
+++ b/recipes/madwifi/madwifi-ng_r4029-20090525.bb
@@ -0,0 +1,21 @@
+# Bitbake recipe for the madwifi-ng driver
+
+# Disable stripping of kernel modules, since this action strips too
+# much out, and the resulting module won't load.
+INHIBIT_PACKAGE_STRIP = "1"
+
+require madwifi-ng_r.inc
+
+# Due to a minor Makefile restructuring, newer versions require an updated
+# patch; this is really ugly and some alternate way to do this that's more
+# generic should be figured out.
+WACKELF_SRC_URI_ixp4xx = " file://20-xscale-VFP-wackelf-v2.patch;patch=1"
+WACKELF_SRC_URI_compulab-pxa270 = " file://20-xscale-VFP-wackelf-v2.patch;patch=1"
+
+SRC_URI = "http://snapshots.madwifi-project.org/madwifi-trunk/${SRCNAME}-${PV}.tar.gz \
+ file://respect-ldflags.patch;patch=1"
+
+SRCNAME = "madwifi-trunk"
+
+# PR set after the include, to override what's set in the included file.
+PR = "r0"
diff --git a/recipes/man-pages/man-pages_2.79.bb b/recipes/man-pages/man-pages_3.21.bb
index ab7da8c965..c7d94f0911 100644
--- a/recipes/man-pages/man-pages_2.79.bb
+++ b/recipes/man-pages/man-pages_3.21.bb
@@ -1,5 +1,5 @@
SECTION = "base"
-DESCRIPTION = "base set of man pages."
+DESCRIPTION = "base set of man pages"
LICENSE = "GPL"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/docs/man-pages/Archive/man-pages-${PV}.tar.bz2"
PR = "r1"
diff --git a/recipes/meta/canadian-sdk.bb b/recipes/meta/canadian-sdk.bb
index 809173b42f..86b645bb7f 100644
--- a/recipes/meta/canadian-sdk.bb
+++ b/recipes/meta/canadian-sdk.bb
@@ -56,7 +56,6 @@ do_populate_sdk() {
rm -rf ${SDK_OUTPUT}
mkdir -p ${SDK_OUTPUT}
- package_update_index_ipk
package_generate_ipkg_conf
for arch in ${PACKAGE_ARCHS}; do
@@ -170,5 +169,5 @@ do_populate_sdk() {
}
do_populate_sdk[nostamp] = "1"
-do_populate_sdk[recrdeptask] = "do_package_write"
+addtask package_update_index_ipk before do_populate_sdk
addtask populate_sdk before do_build after do_install
diff --git a/recipes/meta/meta-toolchain-qte.bb b/recipes/meta/meta-toolchain-qte.bb
new file mode 100644
index 0000000000..49ed35ee0f
--- /dev/null
+++ b/recipes/meta/meta-toolchain-qte.bb
@@ -0,0 +1,25 @@
+# Qt Embedded toolchain
+
+require meta-toolchain.bb
+
+TOOLCHAIN_HOST_TASK = "task-qte-toolchain-host"
+TOOLCHAIN_TARGET_TASK = "task-qte-toolchain-target"
+
+SDK_SUFFIX = "toolchain-qte"
+QT_DIR_NAME = "qtopia"
+
+do_populate_sdk_append() {
+ script = "${SDK_OUTPUT}/${prefix}/environment-setup"
+ touch $script
+ echo 'export OE_QMAKE_CC=${TARGET_SYS}-gcc' >> $script
+ echo 'export OE_QMAKE_CXX=${TARGET_SYS}-g++' >> $script
+ echo 'export OE_QMAKE_LINK=${TARGET_SYS}-g++' >> $script
+ echo 'export OE_QMAKE_LIBDIR_QT=${prefix}/${TARGET_SYS}/${layout_libdir}' >> $script
+ echo 'export OE_QMAKE_INCDIR_QT=${prefix}/${TARGET_SYS}/${layout_includedir}/${QT_DIR_NAME}' >> $script
+ echo 'export OE_QMAKE_MOC=${prefix}/${layout_bindir}/moc4' >> $script
+ echo 'export OE_QMAKE_UIC=${prefix}/${layout_bindir}/uic4' >> $script
+
+ # Repack SDK with new environment-setup
+ cd ${SDK_OUTPUT}
+ fakeroot tar cfj ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
+}
diff --git a/recipes/meta/meta-toolchain.bb b/recipes/meta/meta-toolchain.bb
index b641be1295..2e83b1d02f 100644
--- a/recipes/meta/meta-toolchain.bb
+++ b/recipes/meta/meta-toolchain.bb
@@ -56,24 +56,24 @@ do_populate_sdk() {
rm -rf ${SDK_OUTPUT}
mkdir -p ${SDK_OUTPUT}
- package_update_index_ipk
package_generate_ipkg_conf
for arch in ${PACKAGE_ARCHS}; do
revipkgarchs="$arch $revipkgarchs"
done
- mkdir -p ${SDK_OUTPUT}/usr/lib/opkg
+ mkdir -p ${SDK_OUTPUT}/${layout_libdir}/opkg
${IPKG_HOST} update
${IPKG_HOST} -force-depends install ${TOOLCHAIN_HOST_TASK}
- mkdir -p ${SDK_OUTPUT}/${SDK_PATH}/${TARGET_SYS}/usr/lib/opkg
+ mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/${layout_libdir}/opkg
${IPKG_TARGET} update
${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK}
- install -d ${SDK_OUTPUT}/${prefix}/usr/lib/opkg
- mv ${SDK_OUTPUT}/usr/lib/opkg/* ${SDK_OUTPUT}/${prefix}/usr/lib/opkg/
- rm -Rf ${SDK_OUTPUT}/usr/lib
+ install -d ${SDK_OUTPUT}/${prefix}/${layout_libdir}/opkg
+ mv ${SDK_OUTPUT}/${layout_libdir}/opkg/* \
+ ${SDK_OUTPUT}/${prefix}/${layout_libdir}/opkg/
+ rm -Rf ${SDK_OUTPUT}/${layout_libdir}
install -d ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/${layout_sysconfdir}
install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/${layout_sysconfdir}/
@@ -170,5 +170,5 @@ do_populate_sdk() {
}
do_populate_sdk[nostamp] = "1"
-do_populate_sdk[recrdeptask] = "do_package_write"
+addtask package_update_index_ipk before do_populate_sdk
addtask populate_sdk before do_build after do_install
diff --git a/recipes/meta/nylon-feed.inc b/recipes/meta/nylon-feed.inc
index d7b83e8edb..15f0b20881 100644
--- a/recipes/meta/nylon-feed.inc
+++ b/recipes/meta/nylon-feed.inc
@@ -36,6 +36,7 @@ ncurses \
netbase \
netperf \
ntp \
+nylon-config \
nylon-scripts \
nylon-statistics \
olsrd \
@@ -48,14 +49,13 @@ ppp \
pptp-linux \
rrdtool \
ser \
-shorewall \
+simple-firewall \
stunnel \
sysvinit \
tcl \
tcpdump \
tinc \
tzdata \
-usbutils \
vtun \
wireless-tools \
wpa-supplicant \
diff --git a/recipes/meta/package-index.bb b/recipes/meta/package-index.bb
index f52fb6c72b..ce8b999e16 100644
--- a/recipes/meta/package-index.bb
+++ b/recipes/meta/package-index.bb
@@ -23,8 +23,4 @@ do_stage() {
do_build[nostamp] = "1"
do_build[dirs] = "${DEPLOY_DIR_IPK}"
-do_build() {
- set -ex
- package_update_index_ipk
- set +ex
-}
+addtask package_update_index_ipk before do_build
diff --git a/recipes/mgetty/mgetty-1.1.30/faxqhelper_ldflags.patch b/recipes/mgetty/mgetty-1.1.30/faxqhelper_ldflags.patch
new file mode 100644
index 0000000000..4d3ea24b57
--- /dev/null
+++ b/recipes/mgetty/mgetty-1.1.30/faxqhelper_ldflags.patch
@@ -0,0 +1,13 @@
+Index: mgetty-1.1.30/fax/Makefile
+===================================================================
+--- mgetty-1.1.30.orig/fax/Makefile 2009-05-09 22:00:37.814162343 +0200
++++ mgetty-1.1.30/fax/Makefile 2009-05-09 22:01:04.209581406 +0200
+@@ -36,7 +36,7 @@
+ @cd .. ; $(MAKE) sedscript
+
+ faxq-helper: faxq-helper.o
+- $(CC) $(CFLAGS) -o faxq-helper faxq-helper.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o faxq-helper faxq-helper.o
+
+ faxq-helper.o: faxq-helper.c
+ $(CC) $(CFLAGS) -DFAX_SPOOL_OUT=\"$(FAX_SPOOL_OUT)\" \
diff --git a/recipes/mgetty/mgetty-1.1.30/newslock_ldflags.patch b/recipes/mgetty/mgetty-1.1.30/newslock_ldflags.patch
new file mode 100644
index 0000000000..a4fc814bd0
--- /dev/null
+++ b/recipes/mgetty/mgetty-1.1.30/newslock_ldflags.patch
@@ -0,0 +1,13 @@
+Index: mgetty-1.1.30/Makefile
+===================================================================
+--- mgetty-1.1.30.orig/Makefile 2009-05-09 21:55:50.072936310 +0200
++++ mgetty-1.1.30/Makefile 2009-05-09 21:56:09.401939481 +0200
+@@ -569,7 +569,7 @@
+ ./sedscript <sendfax.cfg.in >sendfax.config
+
+ newslock: compat/newslock.c
+- $(CC) $(CFLAGS) -o newslock compat/newslock.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o newslock compat/newslock.c
+
+ # internal: use this to create a "clean" mgetty+sendfax tree
+ bindist: all doc-all sedscript
diff --git a/recipes/mgetty/mgetty_1.1.30.bb b/recipes/mgetty/mgetty_1.1.30.bb
index 375ea90f0d..37a830f5a7 100644
--- a/recipes/mgetty/mgetty_1.1.30.bb
+++ b/recipes/mgetty/mgetty_1.1.30.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "The mgetty package contains an intelligent \
getty for allowing logins over a serial line (such as \
through a modem) and receiving incoming faxes."
LICENSE = "GPL"
-PR ="r3"
+PR ="r4"
# The source can no longer be found at ${DEBIAN_MIRROR}/main/m/mgetty/mgetty_${PV}.orig.tar.gz
# so the nslu2-linux project has mirrored it until someone updates this package to a newer version.
@@ -38,6 +38,8 @@ SRC_URI = "http://nslu.sf.net/downloads/mgetty_1.1.30.orig.tar.gz \
file://51-pending-faxq-time;patch=1 \
file://52-pending-metamail;patch=1 \
file://install.patch;patch=1 \
+ file://newslock_ldflags.patch;patch=1 \
+ file://faxqhelper_ldflags.patch;patch=1 \
file://policy.h \
file://voice-defs.h"
@@ -79,3 +81,7 @@ do_install () {
CONFFILES_${PN} = "${sysconfdir}/mgetty/mgetty.config \
${sysconfdir}/mgetty/login.config ${sysconfdir}/mgetty/sendfax.config"
+
+FILES_${PN} += "${libdir}/mgetty-fax"
+
+FILES_${PN}-dbg += "${libdir}/mgetty-fax/.debug"
diff --git a/recipes/mini-httpd/.mini-httpd_1.19.bb.swp b/recipes/mini-httpd/.mini-httpd_1.19.bb.swp
deleted file mode 100644
index d384577124..0000000000
--- a/recipes/mini-httpd/.mini-httpd_1.19.bb.swp
+++ /dev/null
Binary files differ
diff --git a/recipes/minicom/minicom-2.3/rename-conflicting-functions.patch b/recipes/minicom/minicom-2.3/rename-conflicting-functions.patch
new file mode 100644
index 0000000000..c344203267
--- /dev/null
+++ b/recipes/minicom/minicom-2.3/rename-conflicting-functions.patch
@@ -0,0 +1,13 @@
+--- minicom-2.3/src/minicom.c-orig 2009-06-08 14:49:07.000000000 +0200
++++ minicom-2.3/src/minicom.c 2009-06-08 14:50:23.000000000 +0200
+@@ -63,6 +63,10 @@
+ }
+ #endif /*DEBUG*/
+
++#ifdef __USE_GNU
++#define getline minicom_getline
++#endif
++
+ /*
+ * Sub - menu's.
+ */
diff --git a/recipes/minicom/minicom_2.3.bb b/recipes/minicom/minicom_2.3.bb
index 5b32401b1e..736ac84b70 100644
--- a/recipes/minicom/minicom_2.3.bb
+++ b/recipes/minicom/minicom_2.3.bb
@@ -2,6 +2,7 @@ SECTION = "console/network"
DEPENDS = "ncurses"
LICENSE = "GPL"
SRC_URI = "http://alioth.debian.org/frs/download.php/2332/minicom-${PV}.tar.gz \
+ file://rename-conflicting-functions.patch;patch=1 \
"
inherit autotools gettext
diff --git a/recipes/minilite/minilite.inc b/recipes/minilite/minilite.inc
new file mode 100644
index 0000000000..79f28e0da3
--- /dev/null
+++ b/recipes/minilite/minilite.inc
@@ -0,0 +1,12 @@
+inherit gpe
+LICENSE = "GPL"
+DEPENDS = "libgpewidget"
+SECTION = "gpe"
+
+DESCRIPTION = "GPE Screen light control dockapp"
+
+SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
+
+SRC_URI += "file://makefile-fix.patch;patch=1"
+
+export CVSBUILD="no"
diff --git a/recipes/minilite/minilite_0.41.bb b/recipes/minilite/minilite_0.41.bb
index 79f28e0da3..2824977232 100644
--- a/recipes/minilite/minilite_0.41.bb
+++ b/recipes/minilite/minilite_0.41.bb
@@ -1,12 +1 @@
-inherit gpe
-LICENSE = "GPL"
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Screen light control dockapp"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
-
-SRC_URI += "file://makefile-fix.patch;patch=1"
-
-export CVSBUILD="no"
+require minilite.inc
diff --git a/recipes/minilite/minilite_0.43.bb b/recipes/minilite/minilite_0.43.bb
index 79f28e0da3..2824977232 100644
--- a/recipes/minilite/minilite_0.43.bb
+++ b/recipes/minilite/minilite_0.43.bb
@@ -1,12 +1 @@
-inherit gpe
-LICENSE = "GPL"
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Screen light control dockapp"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
-
-SRC_URI += "file://makefile-fix.patch;patch=1"
-
-export CVSBUILD="no"
+require minilite.inc
diff --git a/recipes/minilite/minilite_0.44.bb b/recipes/minilite/minilite_0.44.bb
index 79f28e0da3..2824977232 100644
--- a/recipes/minilite/minilite_0.44.bb
+++ b/recipes/minilite/minilite_0.44.bb
@@ -1,12 +1 @@
-inherit gpe
-LICENSE = "GPL"
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Screen light control dockapp"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
-
-SRC_URI += "file://makefile-fix.patch;patch=1"
-
-export CVSBUILD="no"
+require minilite.inc
diff --git a/recipes/minilite/minilite_0.47.bb b/recipes/minilite/minilite_0.47.bb
index 79f28e0da3..2824977232 100644
--- a/recipes/minilite/minilite_0.47.bb
+++ b/recipes/minilite/minilite_0.47.bb
@@ -1,12 +1 @@
-inherit gpe
-LICENSE = "GPL"
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Screen light control dockapp"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
-
-SRC_URI += "file://makefile-fix.patch;patch=1"
-
-export CVSBUILD="no"
+require minilite.inc
diff --git a/recipes/minilite/minilite_0.48.bb b/recipes/minilite/minilite_0.48.bb
index 79f28e0da3..2824977232 100644
--- a/recipes/minilite/minilite_0.48.bb
+++ b/recipes/minilite/minilite_0.48.bb
@@ -1,12 +1 @@
-inherit gpe
-LICENSE = "GPL"
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Screen light control dockapp"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
-
-SRC_URI += "file://makefile-fix.patch;patch=1"
-
-export CVSBUILD="no"
+require minilite.inc
diff --git a/recipes/minilite/minilite_0.49.bb b/recipes/minilite/minilite_0.49.bb
index 79f28e0da3..2824977232 100644
--- a/recipes/minilite/minilite_0.49.bb
+++ b/recipes/minilite/minilite_0.49.bb
@@ -1,12 +1 @@
-inherit gpe
-LICENSE = "GPL"
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Screen light control dockapp"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
-
-SRC_URI += "file://makefile-fix.patch;patch=1"
-
-export CVSBUILD="no"
+require minilite.inc
diff --git a/recipes/minilite/minilite_0.50.bb b/recipes/minilite/minilite_0.50.bb
index 79f28e0da3..2824977232 100644
--- a/recipes/minilite/minilite_0.50.bb
+++ b/recipes/minilite/minilite_0.50.bb
@@ -1,12 +1 @@
-inherit gpe
-LICENSE = "GPL"
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Screen light control dockapp"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
-
-SRC_URI += "file://makefile-fix.patch;patch=1"
-
-export CVSBUILD="no"
+require minilite.inc
diff --git a/recipes/mobilemesh/mobilemesh_1.2.bb b/recipes/mobilemesh/mobilemesh_1.2.bb
index df8f2f98bb..4fdf2aba3b 100644
--- a/recipes/mobilemesh/mobilemesh_1.2.bb
+++ b/recipes/mobilemesh/mobilemesh_1.2.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "MobileMesh mobile ad-hoc routing protocol"
HOMEPAGE = "http://www.mitre.org/work/tech_transfer/mobilemesh/"
LICENSE = "GPL"
DEPENDS = "openssl"
-SRC_URI = "http://meshcube.org/download/mobilemesh_1.2.tgz"
+SRC_URI = "http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/mobilemesh_1.2.tgz"
PR = "r1"
S = "${WORKDIR}/mobilemesh"
@@ -34,4 +34,7 @@ do_install() {
install ${S}/mobilemesh.init ${D}${sysconfdir}/init.d/mobilemesh
}
+FILES_${PN}-dbg += "${sysconfdir}/mobilemesh/mmtodot.debug ${sysconfdir}/mobilemesh/mmborder.debug \
+ ${sysconfdir}/mobilemesh/mmrp.debug ${sysconfdir}/mobilemesh/mmdiscover.debug"
CONFFILES_${PN}_nylon = "${sysconfdir}/mobilemesh/mmrp.conf ${sysconfdir}/mobilemesh/mmdiscover.conf"
+
diff --git a/recipes/moblin/bickley_git.bb b/recipes/moblin/bickley_git.bb
new file mode 100644
index 0000000000..26bf40d32e
--- /dev/null
+++ b/recipes/moblin/bickley_git.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "A meta data manager API and framework (including Media)"
+SRC_URI = "git://git.moblin.org/${PN}.git;protocol=git"
+PV = "0.0"
+PR_append = "+git${SRCREV}"
+PR = "r3"
+
+DEPENDS = "redland gtk+ dbus-glib clutter-gst libexif taglib gupnp gupnp-av samba"
+RDEPENDS = "xdg-user-dirs"
+
+S = "${WORKDIR}/git"
+
+FILES_${PN} =+ "${datadir}/dbus-1/services/"
+
+inherit autotools_stage
+
+do_compile_prepend() {
+ sed -i -e '/# warn /d' src/bkl-investigator.c
+}
+
diff --git a/recipes/moblin/bognor-regis_git.bb b/recipes/moblin/bognor-regis_git.bb
new file mode 100644
index 0000000000..eae1b86320
--- /dev/null
+++ b/recipes/moblin/bognor-regis_git.bb
@@ -0,0 +1,15 @@
+LICENSE = "GPLv2"
+
+SRCREV = "7f3f5f46cc40f9012300aca66a25ca31511df897"
+PV = "0.4.1"
+PR_append = "+git${SRCREV}"
+
+DEPENDS = "dbus-glib gstreamer glib-2.0"
+
+SRC_URI = "git://git.moblin.org/${PN}.git;protocol=git"
+S = "${WORKDIR}/git"
+
+inherit autotools_stage
+
+FILES_${PN} =+ "${datadir}/dbus-1/services/"
+
diff --git a/recipes/moblin/hornsey/fix-api.patch b/recipes/moblin/hornsey/fix-api.patch
new file mode 100644
index 0000000000..512f138b6d
--- /dev/null
+++ b/recipes/moblin/hornsey/fix-api.patch
@@ -0,0 +1,2048 @@
+From 0139503d38f9df51b4f911712afa9e100501a153 Mon Sep 17 00:00:00 2001
+From: Øyvind Kolås <pippin@linux.intel.com>
+Date: Fri, 05 Jun 2009 12:52:37 +0000
+Subject: Changes to accomodate API changes in clutter master.
+
+---
+diff --git a/data/hrn-item-quick-play.png b/data/hrn-item-quick-play.png
+index 13b57dd..bcd5dcc 100644
+--- a/data/hrn-item-quick-play.png
++++ b/data/hrn-item-quick-play.png
+Binary files differ
+diff --git a/data/hrn-item-zoom.png b/data/hrn-item-zoom.png
+index a5e8568..093bdd2 100644
+--- a/data/hrn-item-zoom.png
++++ b/data/hrn-item-zoom.png
+Binary files differ
+diff --git a/src/hornsey.c b/src/hornsey.c
+index 07ceab5..9d4972c 100644
+--- a/src/hornsey.c
++++ b/src/hornsey.c
+@@ -790,8 +790,8 @@ main (gint argc,
+ {
+ UniqueApp *app;
+ ClutterColor stage_bg = {HRN_STAGE_COLOR};
+- guint stage_width = 0;
+- guint stage_height = 0;
++ gfloat stage_width = 0;
++ gfloat stage_height = 0;
+ gboolean stage_fullscreen = TRUE;
+ gboolean no_disclaimer = TRUE; /* change this to FALSE
+ and the annoying disclaimer
+diff --git a/src/hrn-cluster.c b/src/hrn-cluster.c
+index ef3b89d..48e7230 100644
+--- a/src/hrn-cluster.c
++++ b/src/hrn-cluster.c
+@@ -62,12 +62,12 @@ static void ensure_labels (HrnCluster *cluster,
+ static void
+ hrn_cluster_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean origin_changed)
++ ClutterAllocationFlags flags)
+ {
+ ClutterActorClass *parent_class;
+ parent_class = CLUTTER_ACTOR_CLASS (hrn_cluster_parent_class);
+
+- parent_class->allocate (self, box, origin_changed);
++ parent_class->allocate (self, box, flags);
+
+ if (hrn_switcher_get_state (HRN_SWITCHER (self))>0)
+ {
+@@ -85,17 +85,17 @@ hrn_cluster_allocate (ClutterActor *self,
+ }
+
+ if (CLUTTER_ACTOR(HRN_CLUSTER(self)->priv->frame))
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->priv->frame), origin_changed);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->priv->frame), flags);
+ #if HRN_USE_NORMAL_LABELS
+ if (HRN_CLUSTER(self)->title)
+ {
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->title), origin_changed);
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->meta), origin_changed);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->title), flags);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->meta), flags);
+ }
+ if (HRN_CLUSTER(self)->title2)
+ {
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->title2), origin_changed);
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->meta2), origin_changed);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->title2), flags);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_CLUSTER(self)->meta2), flags);
+ }
+ #endif
+ }
+@@ -226,6 +226,46 @@ hrn_cluster_pick (ClutterActor *actor,
+ in_pick--;
+ }
+
++static void
++hrn_cluster_map (ClutterActor *self)
++{
++ HrnCluster *cluster = HRN_CLUSTER (self);
++ HrnClusterPrivate *priv = cluster->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_cluster_parent_class)->map (self);
++
++ if (cluster->title)
++ clutter_actor_map (CLUTTER_ACTOR (cluster->title));
++ if (cluster->meta)
++ clutter_actor_map (CLUTTER_ACTOR (cluster->meta));
++ if (cluster->title2)
++ clutter_actor_map (CLUTTER_ACTOR (cluster->title2));
++ if (cluster->meta2)
++ clutter_actor_map (CLUTTER_ACTOR (cluster->meta2));
++ if (priv->frame)
++ clutter_actor_map (priv->frame);
++}
++
++static void
++hrn_cluster_unmap (ClutterActor *self)
++{
++ HrnCluster *cluster = HRN_CLUSTER (self);
++ HrnClusterPrivate *priv = cluster->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_cluster_parent_class)->unmap (self);
++
++ if (cluster->title)
++ clutter_actor_unmap (CLUTTER_ACTOR (cluster->title));
++ if (cluster->meta)
++ clutter_actor_unmap (CLUTTER_ACTOR (cluster->meta));
++ if (cluster->title2)
++ clutter_actor_unmap (CLUTTER_ACTOR (cluster->title2));
++ if (cluster->meta2)
++ clutter_actor_unmap (CLUTTER_ACTOR (cluster->meta2));
++ if (priv->frame)
++ clutter_actor_unmap (priv->frame);
++}
++
+
+ static void
+ hrn_cluster_class_init (HrnClusterClass *klass)
+@@ -238,6 +278,8 @@ hrn_cluster_class_init (HrnClusterClass *klass)
+ actor_class->paint = hrn_cluster_paint;
+ actor_class->pick = hrn_cluster_pick;
+ actor_class->allocate = hrn_cluster_allocate;
++ actor_class->map = hrn_cluster_map;
++ actor_class->unmap = hrn_cluster_unmap;
+
+ g_type_class_add_private (gobject_class, sizeof (HrnClusterPrivate));
+ }
+@@ -528,7 +570,7 @@ static void cluster_set_frame (HrnCluster *cluster,
+ }
+ hrn_texture_frame_set_draw_middle (frame, TRUE); /* this should be set only
+ for the modes that need it */
+- clutter_actor_queue_redraw (frame);
++ clutter_actor_queue_redraw (CLUTTER_ACTOR (frame));
+ }
+
+
+@@ -555,7 +597,7 @@ hrn_cluster_constructor (GType type,
+ if (front_handle == 0)
+ {
+ front_handle = cogl_texture_new_from_file (PKGDATADIR "hrn-stack-front.png",
+- 63, COGL_TEXTURE_NONE,
++ COGL_TEXTURE_NONE,
+ COGL_PIXEL_FORMAT_ANY,
+ NULL);
+ front_material = cogl_material_new ();
+@@ -583,14 +625,14 @@ hrn_cluster_dispose (GObject *object)
+ #if HRN_USE_NORMAL_LABELS
+ HrnCluster *cluster = HRN_CLUSTER (object);
+ if (cluster->title)
+- g_object_unref (cluster->title);
++ clutter_actor_destroy (CLUTTER_ACTOR (cluster->title));
+ if (cluster->meta)
+- g_object_unref (cluster->meta);
++ clutter_actor_destroy (CLUTTER_ACTOR (cluster->meta));
+ cluster->title = cluster->meta = NULL;
+ if (cluster->title2)
+- g_object_unref (cluster->title2);
++ clutter_actor_destroy (CLUTTER_ACTOR (cluster->title2));
+ if (cluster->meta2)
+- g_object_unref (cluster->meta2);
++ clutter_actor_destroy (CLUTTER_ACTOR (cluster->meta2));
+ cluster->title2 = cluster->meta2 = NULL;
+ #endif
+ G_OBJECT_CLASS (hrn_cluster_parent_class)->dispose (object);
+@@ -1000,8 +1042,8 @@ static gboolean cluster_enter (ClutterActor *actor,
+ if (child)
+ {
+ clutter_actor_animate (child, CLUTTER_EASE_IN_OUT_QUINT, 800,
+- "x", (gint)(hoverdata[num][i][0]+0),
+- "y", (gint)(hoverdata[num][i][1]+0),
++ "x", (gdouble)(hoverdata[num][i][0]+0),
++ "y", (gdouble)(hoverdata[num][i][1]+0),
+ "scale-x", hoverdata[num][i][2],
+ "scale-y", hoverdata[num][i][2],
+ "rotation-angle-z", 0.0,
+@@ -1048,8 +1090,8 @@ static gboolean cluster_leave (ClutterActor *actor,
+ child = g_list_nth_data (children, num-1-i);
+
+ clutter_actor_animate (child, CLUTTER_EASE_IN_OUT_QUINT, 800,
+- "x", (gint)clustered_x (i),
+- "y", (gint)clustered_y (i),
++ "x", (gdouble)clustered_x (i),
++ "y", (gdouble)clustered_y (i),
+ "scale-x", clustered_scale (i),
+ "scale-y", clustered_scale (i),
+ "rotation-angle-z", clustered_rotation (i, accum),
+@@ -1311,7 +1353,6 @@ static void cluster_alone_to_grouped_adapt (HrnSwitcher *switcher,
+ if (child)
+ {
+ clutter_actor_set_position (child, LIN(0.0, clustered_x (i)), LIN(0, clustered_y (i)));
+- if(0)clutter_actor_set_depthu (child, CLUTTER_UNITS_FROM_FLOAT (LIN( clustered_depth(i) * 0.1, clustered_depth(i))));
+ clutter_actor_set_scale (child, LIN(1.0, clustered_scale(i)), LIN(1.0, clustered_scale(i)));
+
+ if (i>0)clutter_actor_set_opacity (child, LIN(0.0, 255.0));
+@@ -1422,7 +1463,7 @@ static void cluster_eightlim_to_eight_adapt (HrnSwitcher *switcher,
+ g_list_free (children);
+ }
+
+-static gint xs[MAX_CLUSTER_SIZE];
++static gfloat xs[MAX_CLUSTER_SIZE];
+ static gint ys[MAX_CLUSTER_SIZE];
+
+ static void cluster_eight_to_four_adapt (HrnSwitcher *switcher,
+diff --git a/src/hrn-drag-n-drop.c b/src/hrn-drag-n-drop.c
+index 835f041..861e7d0 100644
+--- a/src/hrn-drag-n-drop.c
++++ b/src/hrn-drag-n-drop.c
+@@ -112,8 +112,8 @@ static gboolean drag_capture (ClutterActor *stage,
+
+ if (rel_x * rel_x + rel_y * rel_y > 16 && !drag->in_drag)
+ {
+- gint x0, y0;
+- guint w, h;
++ gfloat x0, y0;
++ gfloat w, h;
+ drag->in_drag = TRUE;
+
+ drag->ghost = clutter_clone_new (drag->drag_data->actor);
+diff --git a/src/hrn-element.c b/src/hrn-element.c
+index fe4f964..3a7b7da 100644
+--- a/src/hrn-element.c
++++ b/src/hrn-element.c
+@@ -58,7 +58,7 @@ static void sync_size (ClutterActor *actor,
+ gpointer unused,
+ HrnSwitcher *switcher)
+ {
+- guint w,h;
++ gfloat w,h;
+ clutter_actor_get_size (actor, &w, &h);
+
+ if (DIM/(w*1.0) > DIM / (h*1.0))
+@@ -104,7 +104,7 @@ static ClutterActor *element_square (BklItem *item)
+ {
+ if (g_str_equal (orientation, "right - top"))
+ {
+- guint w,h;
++ gfloat w,h;
+ clutter_actor_set_rotation (actor, CLUTTER_Z_AXIS, 90, 0,0,0);
+ clutter_actor_set_anchor_point_from_gravity (actor, CLUTTER_GRAVITY_SOUTH_WEST);
+ ClutterActor *group = clutter_group_new ();
+@@ -183,7 +183,7 @@ static ClutterActor *element_thumb (HrnSwitcher *switcher,
+ {
+ if (g_str_equal (orientation, "right - top"))
+ {
+- guint w,h;
++ gfloat w,h;
+ clutter_actor_set_rotation (actor, CLUTTER_Z_AXIS, 90, 0,0,0);
+ clutter_actor_set_anchor_point_from_gravity (actor, CLUTTER_GRAVITY_SOUTH_WEST);
+ ClutterActor *group = clutter_group_new ();
+@@ -243,7 +243,7 @@ static ClutterActor *element_original (HrnSwitcher *switcher,
+ g_print ("%s %s %s\n", uri, path, path);
+ if (path)
+ {
+- guint w,h;
++ gfloat w,h;
+ actor = hrn_texture_load (path);
+ clutter_actor_get_size (actor, &w, &h);
+
+diff --git a/src/hrn-image-player.c b/src/hrn-image-player.c
+index d46f941..1f1253a 100644
+--- a/src/hrn-image-player.c
++++ b/src/hrn-image-player.c
+@@ -68,17 +68,17 @@ hrn_image_player_get_property (GObject *object,
+ static void
+ hrn_image_player_allocate (ClutterActor *actor,
+ const ClutterActorBox *box,
+- gboolean origin_changed)
++ ClutterAllocationFlags flags)
+ {
+ HrnImagePlayer *player = (HrnImagePlayer *) actor;
+ HrnImagePlayerPrivate *priv = player->priv;
+
+ CLUTTER_ACTOR_CLASS (hrn_image_player_parent_class)->allocate
+- (actor, box, origin_changed);
++ (actor, box, flags);
+
+ if (priv->image_player) {
+ clutter_actor_allocate_preferred_size (priv->image_player,
+- origin_changed);
++ flags);
+ }
+ }
+
+@@ -101,6 +101,29 @@ hrn_image_player_pick (ClutterActor *actor,
+ }
+
+ static void
++hrn_image_player_map (ClutterActor *self)
++{
++ HrnImagePlayerPrivate *priv = HRN_IMAGE_PLAYER (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_image_player_parent_class)->map (self);
++
++ if (priv->image_player)
++ clutter_actor_map (CLUTTER_ACTOR (priv->image_player));
++}
++
++static void
++hrn_image_player_unmap (ClutterActor *self)
++{
++ HrnImagePlayerPrivate *priv = HRN_IMAGE_PLAYER (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_image_player_parent_class)->unmap (self);
++
++ if (priv->image_player)
++ clutter_actor_unmap (CLUTTER_ACTOR (priv->image_player));
++}
++
++
++static void
+ hrn_image_player_class_init (HrnImagePlayerClass *klass)
+ {
+ GObjectClass *o_class = (GObjectClass *) klass;
+@@ -114,6 +137,8 @@ hrn_image_player_class_init (HrnImagePlayerClass *klass)
+ a_class->allocate = hrn_image_player_allocate;
+ a_class->paint = hrn_image_player_paint;
+ a_class->pick = hrn_image_player_pick;
++ a_class->map = hrn_image_player_map;
++ a_class->unmap = hrn_image_player_unmap;
+
+ g_type_class_add_private (klass, sizeof (HrnImagePlayerPrivate));
+ }
+@@ -161,7 +186,7 @@ player_set_uri (HrnIfacePlayer *player,
+ BklItem *item;
+ const char *orient;
+ char *filename;
+- guint w, h, sw, sh;
++ gfloat w, h, sw, sh;
+ double xs, ys, scale;
+ int x, y;
+
+diff --git a/src/hrn-item-image.c b/src/hrn-item-image.c
+index 2cf15e7..2b36973 100644
+--- a/src/hrn-item-image.c
++++ b/src/hrn-item-image.c
+@@ -120,6 +120,10 @@ HrnItemImage *hrn_item_image_create (BklItem *item,
+ hrn_switcher_add_state_full (self, NULL, -1, 0.25,
+ item_image_alone, item,
+ NULL, NULL);
++
++#if 1
++
++
+ #if HRN_ITEM_USE_FRAME
+
+ hrn_switcher_add_state_full (self, NULL, -1, 0.55, hrn_item_element_framed, item,
+@@ -140,5 +144,7 @@ HrnItemImage *hrn_item_image_create (BklItem *item,
+ item_image_alone, item,
+ NULL, NULL);
+
++#endif
++
+ return HRN_ITEM_IMAGE (self);
+ }
+diff --git a/src/hrn-item.c b/src/hrn-item.c
+index 255bb80..275b35a 100644
+--- a/src/hrn-item.c
++++ b/src/hrn-item.c
+@@ -104,12 +104,12 @@ hrn_item_dispose (GObject *object);
+ static void
+ hrn_item_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean origin_changed)
++ ClutterAllocationFlags flags)
+ {
+ ClutterActorClass *parent_class;
+ parent_class = CLUTTER_ACTOR_CLASS (hrn_item_parent_class);
+
+- parent_class->allocate (self, box, origin_changed);
++ parent_class->allocate (self, box, flags);
+
+
+
+@@ -133,14 +133,14 @@ hrn_item_allocate (ClutterActor *self,
+
+ if (HRN_ITEM(self)->title)
+ {
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_ITEM(self)->title), origin_changed);
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_ITEM(self)->meta), origin_changed);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_ITEM(self)->title), flags);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_ITEM(self)->meta), flags);
+ }
+
+ if (HRN_ITEM(self)->title2)
+ {
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_ITEM(self)->title2), origin_changed);
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_ITEM(self)->meta2), origin_changed);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_ITEM(self)->title2), flags);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR(HRN_ITEM(self)->meta2), flags);
+ }
+
+
+@@ -163,6 +163,7 @@ static void
+ hrn_item_paint (ClutterActor *actor)
+ {
+ ClutterActorClass *parent_class;
++ HrnItem *item = HRN_ITEM (actor);
+
+ parent_class = CLUTTER_ACTOR_CLASS (hrn_item_parent_class);
+
+@@ -182,19 +183,27 @@ hrn_item_paint (ClutterActor *actor)
+
+ if (hrn_switcher_get_state (HRN_SWITCHER (actor))>0)
+ {
++ if (!hrn_item_get_view (actor))
++ return;
+ switch (hrn_view_labels_visible (hrn_item_get_view (actor)))
+ {
+ case ZOOM_ITEMS_8:
+- clutter_actor_paint (CLUTTER_ACTOR (HRN_ITEM (actor)->title));
+- clutter_actor_paint (CLUTTER_ACTOR (HRN_ITEM (actor)->meta));
++ if (item->title)
++ clutter_actor_paint (CLUTTER_ACTOR (item->title));
++ if (item->meta)
++ clutter_actor_paint (CLUTTER_ACTOR (item->meta));
+ break;
+ case ZOOM_ITEMS_4:
+- clutter_actor_paint (CLUTTER_ACTOR (HRN_ITEM (actor)->title2));
+- clutter_actor_paint (CLUTTER_ACTOR (HRN_ITEM (actor)->meta2));
++ if (item->title2)
++ clutter_actor_paint (CLUTTER_ACTOR (item->title2));
++ if (item->meta2)
++ clutter_actor_paint (CLUTTER_ACTOR (item->meta2));
+ break;
+ case ZOOM_ITEMS_3:
+- clutter_actor_paint (CLUTTER_ACTOR (HRN_ITEM (actor)->title2));
+- clutter_actor_paint (CLUTTER_ACTOR (HRN_ITEM (actor)->meta2));
++ if (item->title2)
++ clutter_actor_paint (CLUTTER_ACTOR (item->title2));
++ if (item->meta2)
++ clutter_actor_paint (CLUTTER_ACTOR (item->meta2));
+ }
+ }
+ }
+@@ -216,6 +225,41 @@ static void hrn_item_get_property (GObject *gobject,
+ GValue *value,
+ GParamSpec *pspec);
+
++static void
++hrn_item_map (ClutterActor *self)
++{
++ HrnItem *item = HRN_ITEM (self);
++
++ CLUTTER_ACTOR_CLASS (hrn_item_parent_class)->map (self);
++
++ if (item->title)
++ clutter_actor_map (CLUTTER_ACTOR (item->title));
++ if (item->meta)
++ clutter_actor_map (CLUTTER_ACTOR (item->meta));
++ if (item->title2)
++ clutter_actor_map (CLUTTER_ACTOR (item->title2));
++ if (item->meta2)
++ clutter_actor_map (CLUTTER_ACTOR (item->meta2));
++}
++
++static void
++hrn_item_unmap (ClutterActor *self)
++{
++ HrnItem *item = HRN_ITEM (self);
++
++ CLUTTER_ACTOR_CLASS (hrn_item_parent_class)->unmap (self);
++
++ if (item->title)
++ clutter_actor_unmap (CLUTTER_ACTOR (item->title));
++ if (item->meta)
++ clutter_actor_unmap (CLUTTER_ACTOR (item->meta));
++ if (item->title2)
++ clutter_actor_unmap (CLUTTER_ACTOR (item->title2));
++ if (item->meta2)
++ clutter_actor_unmap (CLUTTER_ACTOR (item->meta2));
++}
++
++
+
+ static void
+ hrn_item_class_init (HrnItemClass *klass)
+@@ -228,6 +272,8 @@ hrn_item_class_init (HrnItemClass *klass)
+ gobject_class->constructor = hrn_item_constructor;
+ actor_class->paint = hrn_item_paint;
+ actor_class->pick = hrn_item_pick;
++ actor_class->map = hrn_item_map;
++ actor_class->unmap = hrn_item_unmap;
+ actor_class->allocate = hrn_item_allocate;
+ gobject_class->set_property = hrn_item_set_property;
+ gobject_class->get_property = hrn_item_get_property;
+@@ -386,15 +432,14 @@ hrn_item_dispose (GObject *object)
+ {
+ HrnItem *item = HRN_ITEM (object);
+ if (item->title)
+- g_object_unref (item->title);
++ clutter_actor_destroy (CLUTTER_ACTOR (item->title));
+ if (item->meta)
+- g_object_unref (item->meta);
+- item->title = item->meta = NULL;
++ clutter_actor_destroy (CLUTTER_ACTOR (item->meta));
+ if (item->title2)
+- g_object_unref (item->title2);
++ clutter_actor_destroy (CLUTTER_ACTOR (item->title2));
+ if (item->meta2)
+- g_object_unref (item->meta2);
+- item->title2 = item->meta2 = NULL;
++ clutter_actor_destroy (CLUTTER_ACTOR (item->meta2));
++ item->title = item->meta = item->title2 = item->meta2 = NULL;
+ }
+ #endif
+ G_OBJECT_CLASS (hrn_item_parent_class)->dispose (object);
+@@ -1020,7 +1065,7 @@ ClutterActor *hrn_item_element_framed (HrnSwitcher *switcher,
+ ClutterActor *group = clutter_group_new ();
+ ClutterActor *item_image;
+
+- gint x;
++ gfloat x;
+ gint y;
+
+
+@@ -1028,8 +1073,8 @@ ClutterActor *hrn_item_element_framed (HrnSwitcher *switcher,
+ priv->frame = clutter_rectangle_new ();
+ #else
+ priv->frame = hrn_texture_frame_new (frame_tex(), 35,35,35,35);
+- hrn_texture_frame_set_draw_middle (priv->frame, TRUE);
+- hrn_texture_frame_set_can_pinch (priv->frame, TRUE);
++ hrn_texture_frame_set_draw_middle (HRN_TEXTURE_FRAME (priv->frame), TRUE);
++ hrn_texture_frame_set_can_pinch (HRN_TEXTURE_FRAME (priv->frame), TRUE);
+ #endif
+
+ switch (state_no) /* squareness will depend on these states ... */
+diff --git a/src/hrn-item.h b/src/hrn-item.h
+index 2767630..5a73b3d 100644
+--- a/src/hrn-item.h
++++ b/src/hrn-item.h
+@@ -89,12 +89,6 @@ hrn_item_drop (ClutterActor *actor,
+
+ GType hrn_item_get_type (void) G_GNUC_CONST;
+
+-/* this is a factory method that creates a hrn item of the correct class */
+-HrnItem *hrn_item_create (BklItem *item);
+-
+-
+-
+-
+
+
+
+diff --git a/src/hrn-popup.c b/src/hrn-popup.c
+index 6e00d4e..9c1bd81 100644
+--- a/src/hrn-popup.c
++++ b/src/hrn-popup.c
+@@ -89,7 +89,7 @@ void hrn_popup_actor (gint x,
+ gint y,
+ ClutterActor *actor)
+ {
+- guint w2,h2;
++ gfloat w2,h2;
+ gint w,h;
+ ClutterActor *stage = clutter_stage_get_default ();
+
+@@ -172,7 +172,7 @@ void hrn_popup_actor_fixed (gint x,
+ gint y,
+ ClutterActor *actor)
+ {
+- guint w2,h2;
++ gfloat w2,h2;
+ gint w,h;
+ ClutterActor *stage = clutter_stage_get_default ();
+
+@@ -196,13 +196,13 @@ ClutterActor *hrn_popup_actions (gpointer *actions,
+ gint i;
+ gint max_width = 0;
+ ClutterActor *group = CLUTTER_ACTOR (g_object_new (NBTK_TYPE_GRID,
+- "width", 0,
++ "width", 0.0,
+ NULL));
+ nbtk_widget_set_style_class_name (NBTK_WIDGET (group), "HrnPopup");
+
+ for (i=0; actions[i]; i+=2)
+ {
+- guint w,h;
++ gfloat w,h;
+ ClutterActor *label;
+
+ label = CLUTTER_ACTOR (nbtk_button_new_with_label (gettext (actions[i])));
+@@ -240,13 +240,13 @@ ClutterActor *hrn_popup_actions_bolded (gpointer *actions,
+ gint i;
+ gint max_width = 0;
+ ClutterActor *group = CLUTTER_ACTOR (g_object_new (NBTK_TYPE_GRID,
+- "width", 0,
++ "width", 0.0,
+ NULL));
+ nbtk_widget_set_style_class_name (NBTK_WIDGET (group), "HrnPopup");
+
+ for (i=0; actions[i]; i+=2)
+ {
+- guint w,h;
++ gfloat w,h;
+ ClutterActor *label;
+
+ label = CLUTTER_ACTOR (nbtk_button_new_with_label (gettext (actions[i])));
+diff --git a/src/hrn-queue.c b/src/hrn-queue.c
+index 818b413..1d9c019 100644
+--- a/src/hrn-queue.c
++++ b/src/hrn-queue.c
+@@ -99,7 +99,7 @@ hrn_queue_dispose (GObject *object);
+ static void
+ hrn_queue_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean origin_changed);
++ ClutterAllocationFlags flags);
+ static void hrn_queue_reposition (HrnQueue *queue);
+ static void
+ hrn_queue_paint (ClutterActor *actor);
+@@ -112,6 +112,28 @@ static void
+ hrn_queue_style_changed (NbtkWidget *widget);
+
+ static void
++hrn_queue_map (ClutterActor *self)
++{
++ HrnQueuePrivate *priv = HRN_QUEUE (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_queue_parent_class)->map (self);
++
++ if (priv->toptable)
++ clutter_actor_map (CLUTTER_ACTOR (priv->toptable));
++}
++
++static void
++hrn_queue_unmap (ClutterActor *self)
++{
++ HrnQueuePrivate *priv = HRN_QUEUE (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_queue_parent_class)->unmap (self);
++
++ if (priv->toptable)
++ clutter_actor_unmap (CLUTTER_ACTOR (priv->toptable));
++}
++
++static void
+ hrn_queue_class_init (HrnQueueClass *klass)
+ {
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+@@ -124,6 +146,8 @@ hrn_queue_class_init (HrnQueueClass *klass)
+ actor_class->allocate = hrn_queue_allocate;
+ actor_class->paint = hrn_queue_paint;
+ actor_class->pick = hrn_queue_pick;
++ actor_class->map = hrn_queue_map;
++ actor_class->unmap = hrn_queue_unmap;
+ widget_class->style_changed = hrn_queue_style_changed;
+
+ g_type_class_add_private (gobject_class, sizeof (HrnQueuePrivate));
+@@ -133,8 +157,8 @@ hrn_queue_class_init (HrnQueueClass *klass)
+ static void
+ hrn_queue_init (HrnQueue *self)
+ {
+- HrnQueuePrivate *priv = HRN_QUEUE_GET_PRIVATE (self);
+- memset (priv, 0, sizeof (priv));
++ self->priv = HRN_QUEUE_GET_PRIVATE (self);
++ memset (self->priv, 0, sizeof (self->priv));
+ }
+
+ static gboolean completed (ClutterAnimation *anim,
+@@ -151,14 +175,14 @@ static gboolean expanded_clicked_cb (NbtkButton *button,
+ if (nbtk_button_get_checked (button))
+ {
+ clutter_actor_animate (queue, CLUTTER_EASE_IN_OUT_CUBIC, 350,
+- "y", -300,
++ "y", -300.0,
+ NULL);
+ clutter_actor_show (CLUTTER_ACTOR (priv->scrollview));
+ }
+ else
+ {
+ clutter_actor_animate (queue, CLUTTER_EASE_IN_OUT_CUBIC, 350,
+- "y", 0,
++ "y", 0.0,
+ "signal::completed", completed, priv->scrollview,
+ NULL);
+ }
+@@ -617,15 +641,15 @@ NbtkAdjustment *hrn_queue_get_audio_adjustment (HrnQueue *queue)
+ static void
+ hrn_queue_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean origin_changed)
++ ClutterAllocationFlags flags)
+ {
+ HrnQueuePrivate *priv = HRN_QUEUE_GET_PRIVATE (self);
+ ClutterActorClass *parent_class;
+
+ parent_class = CLUTTER_ACTOR_CLASS (hrn_queue_parent_class);
+
+- parent_class->allocate (self, box, origin_changed);
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->toptable), origin_changed);
++ parent_class->allocate (self, box, flags);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->toptable), flags);
+ }
+
+ static void
+@@ -652,8 +676,8 @@ hrn_queue_pick (ClutterActor *actor,
+ const ClutterColor *color)
+ {
+ HrnQueuePrivate *priv = HRN_QUEUE_GET_PRIVATE (actor);
+- guint width;
+- guint height;
++ gfloat width;
++ gfloat height;
+ clutter_actor_get_size (CLUTTER_ACTOR (priv->toptable), &width, &height);
+
+ #if CLUTTER_MINOR_VERSION < 9
+@@ -897,17 +921,15 @@ hrn_item_can_drop (ClutterActor *actor,
+ priv = HRN_QUEUE_GET_PRIVATE (queue);
+
+ {
+- ClutterUnit xu, yu;
++ gfloat xu, yu;
+ gdouble foo;
+ NbtkScrollBar *scrollbar = NBTK_SCROLL_BAR (nbtk_scroll_view_get_vscroll_bar (NBTK_SCROLL_VIEW (priv->scrollview)));
+ foo = nbtk_adjustment_get_value (nbtk_scroll_bar_get_adjustment (scrollbar));
+
+- xu = CLUTTER_UNITS_FROM_INT (x);
+- yu = CLUTTER_UNITS_FROM_INT (y);
+ clutter_actor_transform_stage_point (CLUTTER_ACTOR (queue),
+- xu, yu, &xu, &yu);
++ x, y, &xu, &yu);
+
+- no=((CLUTTER_UNITS_TO_INT(yu) + (gint)foo)-ROW_OFFSET)/ROW_HEIGHT - 1;
++ no=((floor(yu) + (gint)foo)-ROW_OFFSET)/ROW_HEIGHT - 1;
+
+ if (no==-1)
+ return TRUE;
+@@ -952,17 +974,15 @@ hrn_item_drop (ClutterActor *actor,
+ priv = HRN_QUEUE_GET_PRIVATE (queue);
+
+ {
+- ClutterUnit xu, yu;
++ gfloat xu, yu;
+ gdouble foo;
+ NbtkScrollBar *scrollbar = NBTK_SCROLL_BAR (nbtk_scroll_view_get_vscroll_bar (NBTK_SCROLL_VIEW (priv->scrollview)));
+ foo = nbtk_adjustment_get_value (nbtk_scroll_bar_get_adjustment (scrollbar));
+
+- xu = CLUTTER_UNITS_FROM_INT (x);
+- yu = CLUTTER_UNITS_FROM_INT (y);
+ clutter_actor_transform_stage_point (CLUTTER_ACTOR (queue),
+- xu, yu, &xu, &yu);
++ x, y, &xu, &yu);
+
+- no=((CLUTTER_UNITS_TO_INT(yu) + (gint)foo)-ROW_OFFSET)/ROW_HEIGHT-1;
++ no=((floor(yu) + (gint)foo)-ROW_OFFSET)/ROW_HEIGHT-1;
+ if (yu < QUEUE_TIP_HEIGHT)
+ no = -1;
+ }
+@@ -1010,17 +1030,15 @@ gboolean hrn_cluster_dropped (ClutterActor *actor,
+ priv = HRN_QUEUE_GET_PRIVATE (queue);
+
+ {
+- ClutterUnit xu, yu;
++ gfloat xu, yu;
+ gdouble foo;
+ NbtkScrollBar *scrollbar = NBTK_SCROLL_BAR (nbtk_scroll_view_get_vscroll_bar (NBTK_SCROLL_VIEW (priv->scrollview)));
+ foo = nbtk_adjustment_get_value (nbtk_scroll_bar_get_adjustment (scrollbar));
+
+- xu = CLUTTER_UNITS_FROM_INT (x);
+- yu = CLUTTER_UNITS_FROM_INT (y);
+ clutter_actor_transform_stage_point (CLUTTER_ACTOR (queue),
+ xu, yu, &xu, &yu);
+
+- no=((CLUTTER_UNITS_TO_INT(yu) + (gint)foo)-ROW_OFFSET)/ROW_HEIGHT-1;
++ no=((floor (yu) + (gint)foo)-ROW_OFFSET)/ROW_HEIGHT-1;
+ if (yu < QUEUE_TIP_HEIGHT)
+ no = -1;
+ }
+@@ -1067,15 +1085,13 @@ static gboolean from_queue_drop (ClutterActor *actor,
+ }
+
+ {
+- ClutterUnit xu, yu;
++ gfloat xu, yu;
+ gdouble foo;
+ NbtkScrollBar *scrollbar = NBTK_SCROLL_BAR (nbtk_scroll_view_get_vscroll_bar (NBTK_SCROLL_VIEW (priv->scrollview)));
+ foo = nbtk_adjustment_get_value (nbtk_scroll_bar_get_adjustment (scrollbar));
+
+- xu = CLUTTER_UNITS_FROM_INT (x);
+- yu = CLUTTER_UNITS_FROM_INT (y);
+ clutter_actor_transform_stage_point (CLUTTER_ACTOR (queue_item->queue),
+- xu, yu, &xu, &yu);
++ x, y, &xu, &yu);
+
+ no=0;
+ {
+@@ -1096,7 +1112,7 @@ static gboolean from_queue_drop (ClutterActor *actor,
+ g_object_ref (item);
+ hrn_queue_remove (queue_item->queue, no);
+
+- no=((CLUTTER_UNITS_TO_INT(yu) + (gint)foo)-ROW_OFFSET)/ROW_HEIGHT-1;
++ no=((floor(yu) + (gint)foo)-ROW_OFFSET)/ROW_HEIGHT-1;
+ if (yu < QUEUE_TIP_HEIGHT)
+ no = -1;
+
+@@ -1126,9 +1142,10 @@ static void hrn_queue_reposition (HrnQueue *queue)
+ QueueItem *item = iter->data;
+ if (CLUTTER_ACTOR_IS_VISIBLE (item->actor))
+ {
+- gint x = 7;
+- gint y = no * ROW_HEIGHT + ROW_OFFSET;
+-
++ gfloat x = 7;
++ gfloat y = no * ROW_HEIGHT + ROW_OFFSET;
++#if 0
++#endif
+ if (clutter_actor_get_x(item->actor)==0&&
+ clutter_actor_get_y(item->actor)==0)
+
+@@ -1163,7 +1180,7 @@ static void add_item (HrnQueue *queue, QueueItem *queue_item)
+ gchar *meta = hrn_item_get_meta (item);
+ NbtkWidget *text = nbtk_label_new (title);
+ NbtkWidget *meta_text = nbtk_label_new (meta);
+- guint w,h;
++ gfloat w,h;
+ gdouble scale;
+
+ nbtk_widget_set_style_class_name (text, "HrnQueueItemLabel");
+diff --git a/src/hrn-searchbar.c b/src/hrn-searchbar.c
+index fe2c60c..63ba06b 100644
+--- a/src/hrn-searchbar.c
++++ b/src/hrn-searchbar.c
+@@ -47,7 +47,7 @@ hrn_search_bar_dispose (GObject *object);
+ static void
+ hrn_searchbar_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean origin_changed);
++ ClutterAllocationFlags flags);
+ static void
+ hrn_searchbar_paint (ClutterActor *actor);
+ static void
+@@ -55,7 +55,32 @@ hrn_searchbar_pick (ClutterActor *actor,
+ const ClutterColor *color);
+
+
++static void
++hrn_searchbar_map (ClutterActor *self)
++{
++ HrnSearchBarPrivate *priv = HRN_SEARCH_BAR (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_search_bar_parent_class)->map (self);
++
++ if (priv->pin_button)
++ clutter_actor_map (priv->pin_button);
++ if (priv->clear_button)
++ clutter_actor_map (priv->clear_button);
++}
++
+
++static void
++hrn_searchbar_unmap (ClutterActor *self)
++{
++ HrnSearchBarPrivate *priv = HRN_SEARCH_BAR (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_search_bar_parent_class)->unmap (self);
++
++ if (priv->pin_button)
++ clutter_actor_unmap (priv->pin_button);
++ if (priv->clear_button)
++ clutter_actor_unmap (priv->clear_button);
++}
+
+ static void
+ hrn_search_bar_style_changed (NbtkWidget *widget)
+@@ -78,6 +103,8 @@ hrn_search_bar_class_init (HrnSearchBarClass *klass)
+ gobject_class->constructor = hrn_search_bar_constructor;
+ actor_class->paint = hrn_searchbar_paint;
+ actor_class->pick = hrn_searchbar_pick;
++ actor_class->map = hrn_searchbar_map;
++ actor_class->unmap = hrn_searchbar_unmap;
+ actor_class->allocate = hrn_searchbar_allocate;
+ widget_class->style_changed = hrn_search_bar_style_changed;
+
+@@ -350,19 +377,19 @@ hrn_search_bar_dispose (GObject *object)
+ static void
+ hrn_searchbar_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean origin_changed)
++ ClutterAllocationFlags flags)
+ {
+ HrnSearchBarPrivate *priv = HRN_SEARCH_BAR_GET_PRIVATE (self);
+
+- CLUTTER_ACTOR_CLASS (hrn_search_bar_parent_class)->allocate (self, box, origin_changed);
++ CLUTTER_ACTOR_CLASS (hrn_search_bar_parent_class)->allocate (self, box, flags);
+
+ clutter_actor_set_x (CLUTTER_ACTOR (priv->pin_button),
+ clutter_actor_get_width (self));
+ clutter_actor_set_x (CLUTTER_ACTOR (priv->clear_button),
+ clutter_actor_get_x (priv->pin_button)-
+ 20);
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->pin_button), origin_changed);
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->clear_button), origin_changed);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->pin_button), flags);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->clear_button), flags);
+ }
+
+ static void
+diff --git a/src/hrn-sidebar-subitem.c b/src/hrn-sidebar-subitem.c
+index 50e1554..3760baf 100644
+--- a/src/hrn-sidebar-subitem.c
++++ b/src/hrn-sidebar-subitem.c
+@@ -222,9 +222,9 @@ static void rename_cb (gpointer button)
+ ClutterColor shade_color = {0x0,0x0,0x0,0xff};
+ ClutterStage *stage = CLUTTER_STAGE (clutter_stage_get_default ());
+ ClutterActor *text;
+- guint sw, sh;
+- gint x, y;
+- guint w, h;
++ gfloat sw, sh;
++ gfloat x, y;
++ gfloat w, h;
+ gint i;
+
+ data = g_new0 (struct _rename_data, 1);
+diff --git a/src/hrn-sidebar.c b/src/hrn-sidebar.c
+index 8533d22..77fb1e5 100644
+--- a/src/hrn-sidebar.c
++++ b/src/hrn-sidebar.c
+@@ -58,13 +58,38 @@ hrn_sidebar_dispose (GObject *object);
+ static void
+ hrn_sidebar_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean origin_changed);
++ ClutterAllocationFlags flags);
+ static void
+ hrn_sidebar_paint (ClutterActor *actor);
+ static void
+ hrn_sidebar_pick (ClutterActor *actor,
+ const ClutterColor *color);
+-
++
++static void
++hrn_sidebar_map (ClutterActor *self)
++{
++ HrnSidebarPrivate *priv = HRN_SIDEBAR (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_sidebar_parent_class)->map (self);
++
++ if (priv->scroll)
++ clutter_actor_map (CLUTTER_ACTOR (priv->scroll));
++ if (priv->expanded)
++ clutter_actor_map (CLUTTER_ACTOR (priv->expanded));
++}
++
++static void
++hrn_sidebar_unmap (ClutterActor *self)
++{
++ HrnSidebarPrivate *priv = HRN_SIDEBAR (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_sidebar_parent_class)->unmap (self);
++
++ if (priv->scroll)
++ clutter_actor_unmap (CLUTTER_ACTOR (priv->scroll));
++ if (priv->expanded)
++ clutter_actor_unmap (CLUTTER_ACTOR (priv->expanded));
++}
+
+
+ static void
+@@ -79,6 +104,8 @@ hrn_sidebar_class_init (HrnSidebarClass *klass)
+ actor_class->allocate = hrn_sidebar_allocate;
+ actor_class->paint = hrn_sidebar_paint;
+ actor_class->pick = hrn_sidebar_pick;
++ actor_class->map = hrn_sidebar_map;
++ actor_class->unmap = hrn_sidebar_unmap;
+
+ g_type_class_add_private (gobject_class, sizeof (HrnSidebarPrivate));
+
+@@ -209,7 +236,7 @@ void hrn_retrieve_query (const gchar *qname)
+
+ hrn_view_set_source (HRN_VIEW (hrn_view), source);
+
+- tb = hrn_toolbar_group_get_view_toolbar (hrn_toolbar);
++ tb = hrn_toolbar_group_get_view_toolbar (HRN_TOOLBAR_GROUP (hrn_toolbar));
+ hrn_toolbar_set_mode (tb, filter);
+ hrn_view_set_filter (HRN_VIEW (hrn_view), filter);
+
+@@ -323,7 +350,7 @@ static void add_source (HrnSidebar *sidebar,
+ HrnSource *source,
+ gboolean is_local)
+ {
+- HrnSidebarPrivate *priv = HRN_SIDEBAR_GET_PRIVATE (sidebar);
++ HrnSidebarPrivate *priv = sidebar->priv;
+
+ NbtkWidget *button;
+
+@@ -335,6 +362,8 @@ static void add_source (HrnSidebar *sidebar,
+ button = nbtk_button_new_with_label (name);
+ }
+
++ g_print ("%p %p %i\n", sidebar, source, is_local);
++
+ nbtk_widget_set_style_class_name (button, "HrnSidebarItem");
+ clutter_actor_set_reactive (CLUTTER_ACTOR (button), TRUE);
+
+@@ -456,9 +485,10 @@ static void add_source (HrnSidebar *sidebar,
+ void hrn_sidebar_update_sources (HrnSidebar *sidebar)
+ {
+ GList *sources, *s;
+- HrnSidebarPrivate *priv = HRN_SIDEBAR_GET_PRIVATE (sidebar);
++ HrnSidebarPrivate *priv = sidebar->priv;
+ HrnSource *source;
+
++
+ {
+ GList *c, *children = clutter_container_get_children (CLUTTER_CONTAINER (priv->flow));
+
+@@ -506,7 +536,12 @@ hrn_sidebar_constructor (GType type,
+ nbtk_widget_set_style_class_name (NBTK_WIDGET (sidebar), "HrnSidebar");
+ clutter_actor_set_name (CLUTTER_ACTOR (sidebar), "HrnSidebar");
+
++#if 1
+ clutter_actor_set_parent (CLUTTER_ACTOR (priv->scroll), CLUTTER_ACTOR (sidebar));
++#else
++ clutter_container_add_actor (CLUTTER_CONTAINER (object), priv->scroll);
++#endif
++
+ clutter_container_add_actor (CLUTTER_CONTAINER (priv->scroll), CLUTTER_ACTOR (priv->flow));
+ g_object_set_data (object, "HRN_DROP_MASK", GINT_TO_POINTER(HRN_DROP_MASK_SIDEBAR));
+ g_object_set_data (G_OBJECT(priv->flow), "HRN_DROP_MASK", GINT_TO_POINTER(HRN_DROP_MASK_SIDEBAR));
+@@ -529,7 +564,7 @@ hrn_sidebar_constructor (GType type,
+
+ /* hack to sync up size */
+ {
+- guint width = SIDEBAR_WIDTH_PADDED;
++ gfloat width = SIDEBAR_WIDTH_PADDED;
+ guint height = clutter_actor_get_height (clutter_stage_get_default())-61;
+
+ clutter_actor_set_size (CLUTTER_ACTOR (priv->flow), width - 40, height);
+@@ -546,17 +581,17 @@ hrn_sidebar_constructor (GType type,
+
+ static void
+ hrn_sidebar_allocate (ClutterActor *self,
+- const ClutterActorBox *box,
+- gboolean origin_changed)
++ const ClutterActorBox *box,
++ ClutterAllocationFlags flags)
+ {
+ HrnSidebarPrivate *priv = HRN_SIDEBAR_GET_PRIVATE (self);
+ ClutterActorClass *parent_class;
+
+ parent_class = CLUTTER_ACTOR_CLASS (hrn_sidebar_parent_class);
+
+- parent_class->allocate (self, box, origin_changed);
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->scroll), origin_changed);
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->expanded), origin_changed);
++ parent_class->allocate (self, box, flags);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->scroll), flags);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->expanded), flags);
+ }
+
+ static void
+@@ -583,21 +618,17 @@ static void
+ hrn_sidebar_pick (ClutterActor *actor,
+ const ClutterColor *color)
+ {
+- guint width;
+- guint height;
++ gfloat width;
++ gfloat height;
++ HrnSidebarPrivate *priv = HRN_SIDEBAR_GET_PRIVATE (actor);
+ clutter_actor_get_size (CLUTTER_ACTOR (actor), &width, &height);
+
+-#if CLUTTER_MINOR_VERSION < 9
+- cogl_color (color);
+-#else
+- cogl_set_source_color4ub (color->red,
+- color->green,
+- color->blue,
+- color->alpha);
+-#endif
++ cogl_set_source_color ((void*)color);
+ cogl_rectangle (0, 0, width, height);
+
+- hrn_sidebar_paint (actor);
++ clutter_actor_paint (CLUTTER_ACTOR (priv->scroll));
++ clutter_actor_paint (CLUTTER_ACTOR (priv->expanded));
++ /*hrn_sidebar_paint (actor);*/
+ }
+
+ HrnSidebar *hrn_sidebar_new (void)
+@@ -618,13 +649,13 @@ gboolean sidebar_hide_handler (gpointer foo)
+ nbtk_button_set_checked (NBTK_BUTTON (priv->expanded), FALSE);
+
+ clutter_actor_animate (hrn_sidebar, CLUTTER_EASE_IN_CUBIC, SIDEBAR_OUT_DURATION,
+- "x", -180,
++ "x", -180.0,
+ "opacity", 255,
+ NULL);
+
+ clutter_actor_animate (hrn_content_area, CLUTTER_EASE_IN_CUBIC, SIDEBAR_OUT_DURATION,
+- "depth", 0,
+- "x", 0,
++ "depth", 0.0,
++ "x", 0.0,
+ NULL);
+
+ sidebar_hide_handler_id = 0;
+@@ -645,7 +676,7 @@ void hrn_sidebar_wake (void)
+ }
+
+ clutter_actor_animate (hrn_sidebar, CLUTTER_EASE_IN_OUT_QUINT, SIDEBAR_IN_DURATION,
+- "x", 0,
++ "x", 0.0,
+ NULL);
+
+ if (hrn_theatre_get_active (HRN_THEATRE (hrn_theatre)))
+@@ -658,8 +689,8 @@ void hrn_sidebar_wake (void)
+ else
+ {
+ clutter_actor_animate (hrn_content_area, CLUTTER_EASE_IN_OUT_QUINT, SIDEBAR_IN_DURATION,
+- "depth", -200,
+- "x", 110,
++ "depth", -200.0,
++ "x", 110.0,
+ NULL);
+ }
+
+@@ -681,8 +712,9 @@ void hrn_sidebar_unpin (void)
+
+ void hrn_sidebar_hide (void)
+ {
+- if (sidebar_hide_handler_id == 0)
+- sidebar_hide_handler_id = g_idle_add (sidebar_hide_handler, NULL);
++ if (sidebar_hide_handler_id != 0)
++ g_source_remove (sidebar_hide_handler_id);
++ sidebar_hide_handler (NULL);
+ }
+
+
+diff --git a/src/hrn-square-clone.c b/src/hrn-square-clone.c
+index c2d388e..760b3f3 100644
+--- a/src/hrn-square-clone.c
++++ b/src/hrn-square-clone.c
+@@ -52,9 +52,9 @@ struct _HrnSquareClonePrivate
+
+ static void
+ hrn_square_clone_get_preferred_width (ClutterActor *self,
+- ClutterUnit for_height,
+- ClutterUnit *min_width_p,
+- ClutterUnit *natural_width_p)
++ gfloat for_height,
++ gfloat *min_width_p,
++ gfloat *natural_width_p)
+ {
+ HrnSquareClonePrivate *priv = HRN_SQUARE_CLONE (self)->priv;
+
+@@ -85,9 +85,9 @@ hrn_square_clone_get_preferred_width (ClutterActor *self,
+
+ static void
+ hrn_square_clone_get_preferred_height (ClutterActor *self,
+- ClutterUnit for_width,
+- ClutterUnit *min_height_p,
+- ClutterUnit *natural_height_p)
++ gfloat for_width,
++ gfloat *min_height_p,
++ gfloat *natural_height_p)
+ {
+ HrnSquareClonePrivate *priv = HRN_SQUARE_CLONE (self)->priv;
+
+@@ -186,8 +186,8 @@ hrn_square_clone_paint (ClutterActor *self)
+ bw = cogl_texture_get_width (tex); /* base texture width */
+ bh = cogl_texture_get_height (tex); /* base texture height */
+
+- aw = CLUTTER_UNITS_TO_INT (box.x2 - box.x1); /* allocation width */
+- ah = CLUTTER_UNITS_TO_INT (box.y2 - box.y1); /* allocation height */
++ aw = (box.x2 - box.x1); /* allocation width */
++ ah = (box.y2 - box.y1); /* allocation height */
+
+ /* no comment */
+ if ((float)bw/bh < (float)aw/ah)
+diff --git a/src/hrn-switcher.c b/src/hrn-switcher.c
+index 215d79b..b43f79b 100644
+--- a/src/hrn-switcher.c
++++ b/src/hrn-switcher.c
+@@ -105,8 +105,78 @@ hrn_switcher_pick (ClutterActor *actor,
+ static void
+ hrn_switcher_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean origin_changed);
++ ClutterAllocationFlags flags);
+
++static void
++hrn_switcher_map (ClutterActor *self)
++{
++ HrnSwitcher *switcher = HRN_SWITCHER (self);
++ HrnSwitcherPrivate *priv = HRN_SWITCHER_GET_PRIVATE (switcher);
++ gint i;
++
++ CLUTTER_ACTOR_CLASS (hrn_switcher_parent_class)->map (self);
++
++ for (i = 0; i < priv->state_count; i++)
++ {
++ if (priv->states[i].actor)
++ {
++ clutter_actor_map (priv->states[i].actor);
++ }
++ }
++}
++
++static void
++hrn_switcher_unmap (ClutterActor *self)
++{
++ HrnSwitcher *switcher = HRN_SWITCHER (self);
++ HrnSwitcherPrivate *priv = HRN_SWITCHER_GET_PRIVATE (switcher);
++ gint i;
++
++ CLUTTER_ACTOR_CLASS (hrn_switcher_parent_class)->unmap (self);
++
++ for (i = 0; i < priv->state_count; i++)
++ {
++ if (priv->states[i].actor)
++ {
++ clutter_actor_unmap (priv->states[i].actor);
++ }
++ }
++}
++
++static void
++hrn_switcher_realize (ClutterActor *self)
++{
++ HrnSwitcher *switcher = HRN_SWITCHER (self);
++ HrnSwitcherPrivate *priv = HRN_SWITCHER_GET_PRIVATE (switcher);
++ gint i;
++
++ for (i = 0; i < priv->state_count; i++)
++ {
++ if (priv->states[i].actor)
++ {
++ clutter_actor_realize (priv->states[i].actor);
++ }
++ }
++ /*CLUTTER_ACTOR_CLASS (hrn_switcher_parent_class)->realize (self);*/
++}
++
++static void
++hrn_switcher_unrealize (ClutterActor *self)
++{
++ HrnSwitcher *switcher = HRN_SWITCHER (self);
++ HrnSwitcherPrivate *priv = HRN_SWITCHER_GET_PRIVATE (switcher);
++ gint i;
++
++
++ for (i = 0; i < priv->state_count; i++)
++ {
++ if (priv->states[i].actor)
++ {
++ clutter_actor_unrealize (priv->states[i].actor);
++ }
++ }
++ CLUTTER_ACTOR_CLASS (hrn_switcher_parent_class)->unrealize (self);
++}
+
+ static void
+ hrn_switcher_class_init (HrnSwitcherClass *klass)
+@@ -118,6 +188,10 @@ hrn_switcher_class_init (HrnSwitcherClass *klass)
+ gobject_class->constructor = hrn_switcher_constructor;
+ actor_class->paint = hrn_switcher_paint;
+ actor_class->pick = hrn_switcher_pick;
++ actor_class->map = hrn_switcher_map;
++ actor_class->unmap = hrn_switcher_unmap;
++ actor_class->realize = hrn_switcher_realize;
++ actor_class->unrealize = hrn_switcher_unrealize;
+ actor_class->allocate = hrn_switcher_allocate;
+
+ g_type_class_add_private (gobject_class, sizeof (HrnSwitcherPrivate));
+@@ -166,19 +240,19 @@ hrn_switcher_constructor (GType type,
+ static void
+ hrn_switcher_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean origin_changed)
++ ClutterAllocationFlags flags)
+ {
+ HrnSwitcherPrivate *priv = HRN_SWITCHER_GET_PRIVATE (self);
+ ClutterActorClass *parent_class;
+
+ parent_class = CLUTTER_ACTOR_CLASS (hrn_switcher_parent_class);
+
+- parent_class->allocate (self, box, origin_changed);
++ parent_class->allocate (self, box, flags);
+
+ hrn_switcher_adapt (HRN_SWITCHER (self));
+
+ if (priv->states[priv->state].actor)
+- clutter_actor_allocate_preferred_size (priv->states[priv->state].actor, origin_changed);
++ clutter_actor_allocate_preferred_size (priv->states[priv->state].actor, flags);
+ }
+
+ void
+@@ -368,8 +442,8 @@ hrn_switcher_add_state (HrnSwitcher *self,
+
+ void
+ hrn_actor_get_geom (ClutterActor *actor,
+- gint *ox, gint *oy,
+- guint *owidth, guint *oheight,
++ gfloat *ox, gfloat *oy,
++ gfloat *owidth, gfloat *oheight,
+ gdouble *oscalex, gdouble *oscaley)
+ {
+ gfloat x, y;
+@@ -392,7 +466,7 @@ hrn_actor_get_geom (ClutterActor *actor,
+ parent = clutter_actor_get_parent (actor);
+ while (parent)
+ {
+- gint ax, ay;
++ gfloat ax, ay;
+ clutter_actor_get_anchor_point (parent, &ax, &ay);
+ clutter_actor_get_scale (parent, &scalex, &scaley);
+ x -= ax;
+@@ -412,7 +486,7 @@ hrn_actor_get_geom (ClutterActor *actor,
+ they are more expensive than the above as well
+ */
+ {
+- guint w,h;
++ gfloat w,h;
+ gint nx, ny;
+ clutter_actor_get_transformed_size (actor, &w, &h);
+ clutter_actor_get_transformed_position (actor, &nx, &ny);
+@@ -435,15 +509,15 @@ static gboolean
+ hrn_actor_is_off_stage (HrnSwitcher *switcher,
+ ClutterActor *actor)
+ {
+- gint x, y;
+- guint width, height;
++ gfloat x, y;
++ gfloat width, height;
+ gdouble scalex, scaley;
+ HrnSwitcherPrivate *priv = HRN_SWITCHER_GET_PRIVATE (switcher);
+
+ /*gint sw = CLUTTER_STAGE_WIDTH ();*/
+ gint sh = CLUTTER_STAGE_HEIGHT ();
+
+- hrn_actor_get_geom (actor, &x, &y, &width,&height,&scalex, &scaley);
++ hrn_actor_get_geom (actor, &x, &y, &width, &height, &scalex, &scaley);
+
+ if (
+ (gint)(y + height) < -sh * (HRN_OFF_STAGE_FUDGE) ||
+diff --git a/src/hrn-texture-cache.c b/src/hrn-texture-cache.c
+index d52101c..1f5995a 100755
+--- a/src/hrn-texture-cache.c
++++ b/src/hrn-texture-cache.c
+@@ -222,6 +222,11 @@ hrn_texture_cache_get_texture (HrnTextureCache *self,
+ ClutterActor *clone;
+ HrnCacheEntry *entry;
+
++ /* XXX: originally planned to use clones here, but it seems the square
++ * texture works well on its own when it is not forced to be square
++ */
++ return hrn_texture_cache_get_sq_texture (self, path_or_uri, load_async);
++
+ if (!path_or_uri)
+ return NULL;
+ file = g_file_new_for_commandline_arg (path_or_uri);
+@@ -278,7 +283,7 @@ hrn_texture_cache_get_texture (HrnTextureCache *self,
+ g_hash_table_insert (priv->cache, g_strdup (path), entry);
+
+ {
+- guint w,h;
++ gfloat w,h;
+ clutter_actor_get_size (original, &w, &h);
+ priv->sum_size += w*h * 4;
+ }
+@@ -329,7 +334,7 @@ hrn_texture_cache_get_texture (HrnTextureCache *self,
+ /*g_assert (G_OBJECT(nuke_entry->original)->ref_count == 1); not valid with anim */
+ clutter_actor_destroy (nuke_entry->original);
+ {
+- guint w,h;
++ gfloat w,h;
+ clutter_actor_get_size (nuke_entry->original, &w, &h);
+ priv->sum_size -= w*h * 4;
+ }
+@@ -414,7 +419,7 @@ hrn_texture_cache_get_sq_texture (HrnTextureCache *self,
+ g_hash_table_insert (priv->cache, g_strdup (path), entry);
+
+ {
+- guint w,h;
++ gfloat w,h;
+ clutter_actor_get_size (original, &w, &h);
+ priv->sum_size += w*h * 4;
+ }
+diff --git a/src/hrn-theatre.c b/src/hrn-theatre.c
+index 9fda276..51013be 100644
+--- a/src/hrn-theatre.c
++++ b/src/hrn-theatre.c
+@@ -75,17 +75,17 @@ hrn_theatre_get_property (GObject *object,
+ static void
+ hrn_theatre_allocate (ClutterActor *actor,
+ const ClutterActorBox *box,
+- gboolean origin_changed)
++ ClutterAllocationFlags flags)
+ {
+ HrnTheatre *theatre = (HrnTheatre *) actor;
+ HrnTheatrePrivate *priv = theatre->priv;
+
+ CLUTTER_ACTOR_CLASS (hrn_theatre_parent_class)->allocate (actor, box,
+- origin_changed);
++ flags);
+
+ if (priv->player) {
+ clutter_actor_allocate_preferred_size (priv->player,
+- origin_changed);
++ flags);
+ }
+ }
+
+@@ -304,7 +304,6 @@ br_player_show_uri (BrIfacePlayer *player,
+ HrnTheatre *theatre = (HrnTheatre *) player;
+ HrnTheatrePrivate *priv = theatre->priv;
+ gboolean new_player = FALSE;
+- int no;
+
+ if (uri == NULL || mimetype == NULL) {
+ return TRUE;
+@@ -425,7 +424,7 @@ hrn_theatre_show (HrnTheatre *theatre)
+ NULL);
+ clutter_actor_animate (hrn_scrollbar, CLUTTER_EASE_IN_OUT_CUBIC,
+ HRN_TO_THEATRE_DURATION,
+- "x", 30,
++ "x", 30.0,
+ NULL);
+
+ hrn_controls_can_has_fade = TRUE;
+@@ -433,8 +432,8 @@ hrn_theatre_show (HrnTheatre *theatre)
+
+ clutter_actor_animate (hrn_content_area, CLUTTER_EASE_IN_OUT_CUBIC,
+ SIDEBAR_OUT_DURATION,
+- "depth", 0,
+- "x", 0,
++ "depth", 0.0,
++ "x", 0.0,
+ NULL);
+
+ clutter_actor_animate (hrn_sidebar, CLUTTER_EASE_IN_OUT_CUBIC,
+@@ -491,7 +490,7 @@ hrn_theatre_hide (HrnTheatre *theatre)
+
+ clutter_actor_animate (hrn_scrollbar, CLUTTER_EASE_IN_OUT_CUBIC,
+ HRN_FROM_THEATRE_DURATION,
+- "x", 0,
++ "x", 0.0,
+ NULL);
+ clutter_actor_animate (hrn_controls_frame, CLUTTER_LINEAR,
+ HRN_FROM_THEATRE_DURATION,
+@@ -508,8 +507,8 @@ hrn_theatre_hide (HrnTheatre *theatre)
+ if (hrn_sidebar_visible ()) {
+ clutter_actor_animate (hrn_content_area, CLUTTER_EASE_IN_OUT_QUINT,
+ SIDEBAR_IN_DURATION,
+- "depth", -200,
+- "x", 110,
++ "depth", -200.0,
++ "x", 110.0,
+ NULL);
+ }
+
+diff --git a/src/hrn-toolbar-group.c b/src/hrn-toolbar-group.c
+index 35204de..ac2a796 100644
+--- a/src/hrn-toolbar-group.c
++++ b/src/hrn-toolbar-group.c
+@@ -97,7 +97,7 @@ hrn_toolbar_group_set_mode (HrnToolbarGroup *group,
+ NULL);
+
+ /* When switching to view mode, focus the toolbar */
+- hrn_toolbar_focused (priv->view_toolbar);
++ hrn_toolbar_focused (CLUTTER_ACTOR (priv->view_toolbar));
+ break;
+
+ case HRN_TOOLBAR_GROUP_MODE_THEATRE:
+diff --git a/src/hrn-toolbar.c b/src/hrn-toolbar.c
+index a90460e..f135b13 100644
+--- a/src/hrn-toolbar.c
++++ b/src/hrn-toolbar.c
+@@ -114,9 +114,36 @@ hrn_toolbar_set_query (HrnToolbar *toolbar,
+ }
+
+ static void
++hrn_toolbar_map (ClutterActor *self)
++{
++ HrnToolbarPrivate *priv = HRN_TOOLBAR (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_toolbar_parent_class)->map (self);
++
++ if (priv->zoom_bar_label)
++ clutter_actor_map (CLUTTER_ACTOR (priv->zoom_bar_label));
++}
++
++static void
++hrn_toolbar_unmap (ClutterActor *self)
++{
++ HrnToolbarPrivate *priv = HRN_TOOLBAR (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_toolbar_parent_class)->unmap (self);
++
++ if (priv->zoom_bar_label)
++ clutter_actor_unmap (CLUTTER_ACTOR (priv->zoom_bar_label));
++}
++
++
++static void
+ hrn_toolbar_class_init (HrnToolbarClass *klass)
+ {
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
++ ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
++
++ actor_class->map = hrn_toolbar_map;
++ actor_class->unmap = hrn_toolbar_unmap;
+
+ g_type_class_add_private (klass, sizeof (HrnToolbarPrivate));
+
+@@ -279,7 +306,7 @@ static gboolean sort_button_release (ClutterActor *actor,
+ {
+ if (event->button.button == 1)
+ {
+- gint x, y;
++ gfloat x, y;
+ const gchar *sortfunc;
+ gint selected;
+ clutter_actor_get_transformed_position (actor, &x, &y);
+@@ -315,7 +342,7 @@ static gboolean showbutton_release (ClutterActor *actor,
+ {
+ if (event->button.button == 1)
+ {
+- gint x, y;
++ gfloat x, y;
+ gint selected;
+ clutter_actor_get_transformed_position (actor, &x, &y);
+ x-=14; /* XXX: hardcoded offset to handle padding */
+@@ -421,7 +448,8 @@ hrn_toolbar_init (HrnToolbar *self)
+ "nbtk-zoom-bar");
+ clutter_actor_set_name (CLUTTER_ACTOR (priv->zoom_bar_label),
+ "hrn-zoom-bar-label");
+- clutter_actor_set_parent (priv->zoom_bar_label, CLUTTER_ACTOR (self));
++ clutter_actor_set_parent (CLUTTER_ACTOR (priv->zoom_bar_label),
++ CLUTTER_ACTOR (self));
+
+ g_signal_connect (priv->settings_button, "clicked",
+ G_CALLBACK (hrn_toolbar_settings_clicked_cb), self);
+diff --git a/src/hrn-video-player.c b/src/hrn-video-player.c
+index a1fe597..7c90169 100644
+--- a/src/hrn-video-player.c
++++ b/src/hrn-video-player.c
+@@ -70,17 +70,17 @@ hrn_video_player_get_property (GObject *object,
+ static void
+ hrn_video_player_allocate (ClutterActor *actor,
+ const ClutterActorBox *box,
+- gboolean origin_changed)
++ ClutterAllocationFlags flags)
+ {
+ HrnVideoPlayer *player = (HrnVideoPlayer *) actor;
+ HrnVideoPlayerPrivate *priv = player->priv;
+
+ CLUTTER_ACTOR_CLASS (hrn_video_player_parent_class)->allocate
+- (actor, box, origin_changed);
++ (actor, box, flags);
+
+ if (priv->video_player) {
+ clutter_actor_allocate_preferred_size (priv->video_player,
+- origin_changed);
++ flags);
+ }
+ }
+
+@@ -102,6 +102,30 @@ hrn_video_player_pick (ClutterActor *actor,
+ hrn_video_player_paint (actor);
+ }
+
++
++static void
++hrn_video_player_map (ClutterActor *self)
++{
++ HrnVideoPlayerPrivate *priv = HRN_VIDEO_PLAYER (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_video_player_parent_class)->map (self);
++
++ if (priv->video_player)
++ clutter_actor_map (CLUTTER_ACTOR (priv->video_player));
++}
++
++static void
++hrn_video_player_unmap (ClutterActor *self)
++{
++ HrnVideoPlayerPrivate *priv = HRN_VIDEO_PLAYER (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_video_player_parent_class)->unmap (self);
++
++ if (priv->video_player)
++ clutter_actor_unmap (CLUTTER_ACTOR (priv->video_player));
++}
++
++
+ static void
+ hrn_video_player_class_init (HrnVideoPlayerClass *klass)
+ {
+@@ -116,6 +140,8 @@ hrn_video_player_class_init (HrnVideoPlayerClass *klass)
+ a_class->allocate = hrn_video_player_allocate;
+ a_class->paint = hrn_video_player_paint;
+ a_class->pick = hrn_video_player_pick;
++ a_class->map = hrn_video_player_map;
++ a_class->unmap = hrn_video_player_unmap;
+
+ g_type_class_add_private (klass, sizeof (HrnVideoPlayerPrivate));
+ }
+diff --git a/src/hrn-view.c b/src/hrn-view.c
+index 87ce82f..52b2bc8 100644
+--- a/src/hrn-view.c
++++ b/src/hrn-view.c
+@@ -29,6 +29,8 @@
+ #include "hrn-switcher.h"
+
+
++static void hrn_view_pause (void);
++static void hrn_view_go (void);
+ static void
+ hrn_view_refilter (HrnView *view);
+ typedef struct _HrnViewActorData HrnViewActorData;
+@@ -78,19 +80,19 @@ static void hrn_view_pick (ClutterActor *actor,
+
+ static void
+ hrn_view_get_preferred_width (ClutterActor *self,
+- ClutterUnit for_height,
+- ClutterUnit *min_width_p,
+- ClutterUnit *natural_width_p);
++ gfloat for_height,
++ gfloat *min_width_p,
++ gfloat *natural_width_p);
+
+ static void
+ hrn_view_get_preferred_height (ClutterActor *self,
+- ClutterUnit for_width,
+- ClutterUnit *min_height_p,
+- ClutterUnit *natural_height_p);
++ gfloat for_width,
++ gfloat *min_height_p,
++ gfloat *natural_height_p);
+
+ static void hrn_view_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean absolute_origin_changed);
++ ClutterAllocationFlags flags);
+ void source_item_added (HrnSource *source,
+ BklItem *item,
+ gpointer userdata);
+@@ -113,9 +115,9 @@ G_DEFINE_TYPE_WITH_CODE (HrnView, hrn_view,
+
+ struct _HrnViewPrivate
+ {
+- ClutterUnit for_height, for_width;
+- ClutterUnit pref_width, pref_height;
+- ClutterUnit alloc_width, alloc_height;
++ gfloat for_height, for_width;
++ gfloat pref_width, pref_height;
++ gfloat alloc_width, alloc_height;
+ ClutterActor *group;
+
+
+@@ -131,14 +133,14 @@ struct _HrnViewPrivate
+
+ gdouble height;
+
+- gboolean absolute_origin_changed;
++ ClutterAllocationFlags flags;
+ GHashTable *hash_table;
+ GList *list;
+
+ gint labels_visible;
+
+ gboolean first_of_batch;
+- ClutterUnit a_current_sum, a_wrap;
++ gfloat a_current_sum, a_wrap;
+
+ HrnSource *current_source;
+ guint32 item_added_id;
+@@ -176,9 +178,38 @@ struct _HrnViewActorData
+ gint cells; /* the number of cells needed for item when
+ * expanded.
+ */
+- gint xmod; /* the position of the first item */
++ gfloat xmod; /* the position of the first item */
+ };
+
++
++static void
++hrn_view_map (ClutterActor *self)
++{
++ HrnViewPrivate *priv = HRN_VIEW (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_view_parent_class)->map (self);
++
++ if (priv->group)
++ clutter_actor_map (CLUTTER_ACTOR (priv->group));
++ if (priv->lasso)
++ clutter_actor_map (CLUTTER_ACTOR (priv->lasso));
++}
++
++static void
++hrn_view_unmap (ClutterActor *self)
++{
++ HrnViewPrivate *priv = HRN_VIEW (self)->priv;
++
++ CLUTTER_ACTOR_CLASS (hrn_view_parent_class)->unmap (self);
++
++ if (priv->group)
++ clutter_actor_unmap (CLUTTER_ACTOR (priv->group));
++ if (priv->lasso)
++ clutter_actor_map (CLUTTER_ACTOR (priv->lasso));
++}
++
++
++
+ static void
+ hrn_view_class_init (HrnViewClass *klass)
+ {
+@@ -193,6 +224,8 @@ hrn_view_class_init (HrnViewClass *klass)
+
+ actor_class->paint = hrn_view_paint;
+ actor_class->pick = hrn_view_pick;
++ actor_class->map = hrn_view_map;
++ actor_class->unmap = hrn_view_unmap;
+ actor_class->get_preferred_width = hrn_view_get_preferred_width;
+ actor_class->get_preferred_height = hrn_view_get_preferred_height;
+ actor_class->allocate = hrn_view_allocate;
+@@ -432,21 +465,12 @@ GList *hrn_view_get_selected (HrnView *view)
+ return g_hash_table_get_values (priv->selected);
+ }
+
+-static void destroy_when_done (ClutterAnimation *anim,
+- HrnViewPrivate *priv)
+-{
+- if (priv->lasso)
+- clutter_actor_destroy (priv->lasso);
+- priv->lasso = NULL;
+-}
+-
+-
+ static guint select_capture = 0;
+ static gboolean view_capture (ClutterActor *actor,
+ ClutterEvent *event,
+ gpointer view)
+ {
+- ClutterUnit x, y;
++ gfloat x, y;
+ HrnViewPrivate *priv = HRN_VIEW (view)->priv;
+ switch (clutter_event_type (event))
+ {
+@@ -457,7 +481,7 @@ static gboolean view_capture (ClutterActor *actor,
+ #if 1
+ clutter_actor_animate (priv->lasso, CLUTTER_LINEAR, 250,
+ "opacity", 0,
+- "signal::completed", destroy_when_done, priv,
++ /* "signal::completed", destroy_when_done, priv,*/
+ NULL);
+ #endif
+
+@@ -592,7 +616,7 @@ static gboolean view_pressed (ClutterActor *actor,
+ ClutterEvent *event,
+ gpointer data)
+ {
+- ClutterUnit x, y;
++ gfloat x, y;
+ HrnViewPrivate *priv = HRN_VIEW (actor)->priv;
+ ClutterModifierType state = event->button.modifier_state;
+ g_print ("pressed view\n");
+@@ -656,7 +680,7 @@ hrn_view_new (void)
+ g_signal_connect (self, "scroll-event", G_CALLBACK (handle_scroll), NULL);
+
+ {
+- guint w,h;
++ gfloat w,h;
+ clutter_actor_get_size (self, &w, &h);
+ }
+
+@@ -807,15 +831,15 @@ hrn_view_pick (ClutterActor *actor,
+
+ static void
+ hrn_view_get_preferred_width (ClutterActor *self,
+- ClutterUnit for_height,
+- ClutterUnit *min_width_p,
+- ClutterUnit *natural_width_p)
++ gfloat for_height,
++ gfloat *min_width_p,
++ gfloat *natural_width_p)
+ {
+ HrnView *layout = (HrnView *) self;
+ HrnViewPrivate *priv = layout->priv;
+- ClutterUnit natural_width;
++ gfloat natural_width;
+
+- natural_width = CLUTTER_UNITS_FROM_INT (1024 * 2);
++ natural_width = 1024 * 2;
+ if (min_width_p)
+ *min_width_p = natural_width;
+ if (natural_width_p)
+@@ -826,17 +850,15 @@ hrn_view_get_preferred_width (ClutterActor *self,
+
+ static void
+ hrn_view_get_preferred_height (ClutterActor *self,
+- ClutterUnit for_width,
+- ClutterUnit *min_height_p,
+- ClutterUnit *natural_height_p)
++ gfloat for_width,
++ gfloat *min_height_p,
++ gfloat *natural_height_p)
+ {
+ HrnView *layout = (HrnView *) self;
+ HrnViewPrivate *priv = layout->priv;
+- ClutterUnit natural_height;
++ gfloat natural_height;
+
+- natural_height = CLUTTER_UNITS_FROM_INT (600 * 2); /* XXX: making sure
+- it is large enough
+- for netbooks first */
++ natural_height = 600 * 2;
+
+ priv->for_width = for_width;
+ priv->pref_height = natural_height;
+@@ -1067,7 +1089,7 @@ hrn_view_center (ClutterActor *self,
+ static void
+ hrn_view_allocate (ClutterActor *self,
+ const ClutterActorBox *box,
+- gboolean absolute_origin_changed)
++ ClutterAllocationFlags flags)
+ {
+ HrnView *layout = (HrnView *) self;
+ HrnViewPrivate *priv = layout->priv;
+@@ -1078,22 +1100,22 @@ hrn_view_allocate (ClutterActor *self,
+
+ /* chain up to set actor->allocation */
+ CLUTTER_ACTOR_CLASS (hrn_view_parent_class)
+- ->allocate (self, box, absolute_origin_changed);
++ ->allocate (self, box, flags);
+
+ gdouble scale;
+ clutter_actor_get_scale (self, &scale, NULL);
+ scale = hrn_actor_get_abs_scale (self);
+ priv->alloc_width = box->x2 - box->x1;
+ priv->alloc_height = box->y2 - box->y1;
+- priv->absolute_origin_changed = absolute_origin_changed;
++ priv->flags = flags;
+
+ clutter_actor_get_preferred_size (self, NULL, NULL, NULL, NULL);
+ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->group),
+- absolute_origin_changed);
++ flags);
+
+ if (priv->lasso)
+ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (priv->lasso),
+- absolute_origin_changed);
++ flags);
+
+
+ priv->a_wrap = priv->alloc_width;
+@@ -1101,7 +1123,7 @@ hrn_view_allocate (ClutterActor *self,
+ for (i=0,iter = priv->list; iter; i++,iter=iter->next)
+ {
+ ClutterActor *child = iter->data;
+- clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (child), absolute_origin_changed);
++ clutter_actor_allocate_preferred_size (CLUTTER_ACTOR (child), flags);
+ }
+ }
+
+@@ -1270,10 +1292,10 @@ hrn_view_reposition (HrnView *self)
+
+ for (i=0,iter = priv->list; iter; i++,iter=iter->next)
+ {
+- ClutterActor *child = iter->data;
+- ClutterActorBox child_box;
+- ClutterUnit natural_a;
+- ClutterUnit natural_b;
++ ClutterActor *child = iter->data;
++ ClutterActorBox child_box;
++ gfloat natural_a;
++ gfloat natural_b;
+ HrnViewActorData *data;
+
+
+@@ -1301,10 +1323,10 @@ hrn_view_reposition (HrnView *self)
+ else if (y > BUG_THRESHOLD )
+ y = BUG_THRESHOLD ;
+ #endif
+- child_box.y1 = CLUTTER_UNITS_FROM_FLOAT (y);
++ child_box.y1 = y;
+ }
+- child_box.x1 = CLUTTER_UNITS_FROM_FLOAT (hrn_view_compute_x (data->num, data->accum_pos, scale));
+- clutter_actor_set_positionu (child, child_box.x1, child_box.y1);
++ child_box.x1 = hrn_view_compute_x (data->num, data->accum_pos, scale);
++ clutter_actor_set_position (child, child_box.x1, child_box.y1);
+
+ /* clamp the vertical position to avoid overflow (both on
+ * stage as well as in clutter functions
+@@ -1783,7 +1805,7 @@ hrn_view_set_source (HrnView *view,
+ static void
+ hrn_view_refilter (HrnView *view)
+ {
+- HrnViewPrivate *priv = HRN_VIEW_GET_PRIVATE (view);
++ HrnViewPrivate *priv = view->priv;
+ GList *children, *iter;
+
+ g_print ("[");
+@@ -1967,12 +1989,16 @@ extern gint desired_pos;
+
+ void hrn_set_zoom (gdouble zoom)
+ {
+- HrnViewPrivate *priv = hrn_view->priv;
++ HrnViewPrivate *priv = HRN_VIEW (hrn_view)->priv;
+ /* (hrn_target_zoom contains the old value in these checks) */
+
+ if (priv->zoom_lock) {
+ return;
+ }
++ if (zoom != hrn_target_zoom || zoom != scale)
++ {
++
++ }
+
+ priv->zoom_lock = TRUE;
+
+@@ -2056,6 +2082,7 @@ gdouble hrn_view_get_loc (void)
+ void hrn_view_set_loc (gdouble loc)
+ {
+ HrnViewPrivate *priv = HRN_VIEW_GET_PRIVATE (hrn_view);
++
+
+ priv->target_center_pos = priv->height * loc;
+
+@@ -2074,6 +2101,7 @@ gint hrn_view_center_pos (void)
+
+ void hrn_view_set_pos (gint pos)
+ {
++
+ hrn_target_loc = pos;
+ hrn_view_center (hrn_view, pos);
+ hrn_view_reposition (HRN_VIEW (hrn_view));
+@@ -2143,9 +2179,13 @@ static gboolean transition_iterate (ClutterTimeline *timeline,
+ else
+ scale = hrn_target_zoom;
+ }
++
+ }
+ else if (hrn_target_zoom != scale)
+- scale = hrn_target_zoom;
++ {
++ scale = hrn_target_zoom;
++
++ }
+ else
+ break;
+ }
+@@ -2154,10 +2194,11 @@ static gboolean transition_iterate (ClutterTimeline *timeline,
+ {
+ if (fabs (priv->target_center_pos - priv->center_pos) > 1)
+ {
+- #define RATE 0.02
++ #define RATE 0.012
+
+ priv->center_pos = priv->target_center_pos * (RATE) +
+ priv->center_pos * (1.0-RATE);
++
+ }
+ else if (priv->target_center_pos != priv->center_pos)
+ priv->center_pos = priv->target_center_pos;
+@@ -2450,7 +2509,7 @@ hrn_text_paint (gint x, gint y, const gchar *text)
+ if(0)clutter_actor_set_position (actor, x, y);
+ {
+ ClutterActorBox box;
+- ClutterUnit natural_x, natural_y;
++ gfloat natural_x, natural_y;
+ clutter_actor_get_preferred_size (actor,
+ NULL, NULL,
+ &natural_x, &natural_y);
+diff --git a/src/hrn-view.h b/src/hrn-view.h
+index 6cdf29e..f90fe52 100644
+--- a/src/hrn-view.h
++++ b/src/hrn-view.h
+@@ -57,10 +57,10 @@ struct _HrnView
+ ClutterActor parent;
+
+ HrnViewPrivate *priv;
+- gint bkl_item_type_mask;
+- gchar *search;
++ gint bkl_item_type_mask;
++ gchar *search;
+
+- gboolean dirty_frames;
++ gboolean dirty_frames;
+ };
+
+ GType hrn_view_get_type (void) G_GNUC_CONST;
+diff --git a/src/hrn.h b/src/hrn.h
+index 4d69b0b..08ab297 100644
+--- a/src/hrn.h
++++ b/src/hrn.h
+@@ -117,11 +117,11 @@ extern gint DIM;
+ #define HRN_FRAME_USE_RECTANGLE 0
+ #define HRN_STAGE_COLOR 0xff,0xff,0xff,0xff
+ /*#define HRN_STAGE_COLOR 0x00,0x00,0x00,0xff*/
+-#define HRN_VIEW_FPS 30
++#define HRN_VIEW_FPS 60
+
+ #define HRN_CACHE_MAX_SIZE (1024*1024*128) /* 128mb texture memory */
+
+-#define HRN_ZOOM_RATE 1.0011/* 1.0015 seems good the rate of zooming */
++#define HRN_ZOOM_RATE 1.0009/* 1.0015 seems good the rate of zooming */
+ #define HRN_OFF_STAGE_FUDGE 0.1 /* how many stage sizes to include above
+ 00 and below the stage to be considered
+ "on-stage" (this will act as a
+@@ -225,8 +225,8 @@ ClutterActor *hrn_texture_load (const gchar *path);
+
+ void
+ hrn_actor_get_geom (ClutterActor *actor,
+- gint *ox, gint *oy,
+- guint *owidth, guint *oheight, gdouble *oscalex, gdouble *oscaley);
++ gfloat *ox, gfloat *oy,
++ gfloat *owidth, gfloat *oheight, gdouble *oscalex, gdouble *oscaley);
+
+ void hrn_sidebar_hide (void);
+
+diff --git a/src/nbtk-texture-frame.c b/src/nbtk-texture-frame.c
+index 9cec8cf..2557ec5 100644
+--- a/src/nbtk-texture-frame.c
++++ b/src/nbtk-texture-frame.c
+@@ -68,9 +68,9 @@ struct _HrnTextureFramePrivate
+
+ static void
+ hrn_texture_frame_get_preferred_width (ClutterActor *self,
+- ClutterUnit for_height,
+- ClutterUnit *min_width_p,
+- ClutterUnit *natural_width_p)
++ gfloat for_height,
++ gfloat *min_width_p,
++ gfloat *natural_width_p)
+ {
+ HrnTextureFramePrivate *priv = HRN_TEXTURE_FRAME (self)->priv;
+
+@@ -101,9 +101,9 @@ hrn_texture_frame_get_preferred_width (ClutterActor *self,
+
+ static void
+ hrn_texture_frame_get_preferred_height (ClutterActor *self,
+- ClutterUnit for_width,
+- ClutterUnit *min_height_p,
+- ClutterUnit *natural_height_p)
++ gfloat for_width,
++ gfloat *min_height_p,
++ gfloat *natural_height_p)
+ {
+ HrnTextureFramePrivate *priv = HRN_TEXTURE_FRAME (self)->priv;
+
+--
+cgit v0.8.2
diff --git a/recipes/moblin/hornsey_git.bb b/recipes/moblin/hornsey_git.bb
new file mode 100644
index 0000000000..716c18d1a6
--- /dev/null
+++ b/recipes/moblin/hornsey_git.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "The Moblin mediaplayer"
+LICENSE = "LGPLv2.1"
+
+SRCREV = "125a1dea08d552ed2510ee762e1b54ca161915c1"
+PV = "0.0"
+PR = "r1"
+PR_append = "+git${SRCREV}"
+
+DEPENDS = "clutter clutter-gst-0.9 bickley nbtk bognor-regis libunique startup-notification gtk+"
+
+SRC_URI = "git://git.moblin.org/${PN}.git;protocol=git \
+ file://fix-api.patch;patch=1 \
+"
+S = "${WORKDIR}/git"
+
+inherit autotools_stage
+
+FILES_${PN} += "${datadir}/icons"
+
diff --git a/recipes/moblin/json-glib_0.6.2.bb b/recipes/moblin/json-glib_0.6.2.bb
new file mode 100644
index 0000000000..822ddad7e5
--- /dev/null
+++ b/recipes/moblin/json-glib_0.6.2.bb
@@ -0,0 +1,7 @@
+
+SRC_URI = "http://folks.o-hand.com/~ebassi/sources/json-glib-0.6.2.tar.gz"
+PR = "r0"
+
+DEPENDS = "glib-2.0"
+
+inherit autotools_stage
diff --git a/recipes/moblin/json-glib_git.bb b/recipes/moblin/json-glib_git.bb
new file mode 100644
index 0000000000..0522df1f1f
--- /dev/null
+++ b/recipes/moblin/json-glib_git.bb
@@ -0,0 +1,16 @@
+HOMEPAGE = "http://live.gnome.org/JsonGlib"
+SRC_URI = "git://github.com/ebassi/${PN}.git;protocol=git"
+PV = "0.6.2+git${SRCREV}"
+PR = "r0"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "glib-2.0"
+
+inherit autotools_stage
+
+acpaths = "-I ${S}/build/autotools "
+
+do_configure_prepend () {
+ touch ${S}/gtk-doc.make
+} \ No newline at end of file
diff --git a/recipes/moblin/libccss_git.bb b/recipes/moblin/libccss_git.bb
new file mode 100644
index 0000000000..e622d9f9bf
--- /dev/null
+++ b/recipes/moblin/libccss_git.bb
@@ -0,0 +1,14 @@
+SRC_URI = "git://anongit.freedesktop.org/git/ccss.git;protocol=git"
+PV = "0.0+git${SRCREV}"
+PR = "r0"
+
+DEPENDS = "glib-2.0 cairo librsvg libsoup-2.4"
+
+S = "${WORKDIR}/git"
+
+inherit autotools_stage
+
+do_configure_prepend () {
+ echo "EXTRA_DIST=" > ${S}/gtk-doc.make
+ echo "CLEANFILES=" >> ${S}/gtk-doc.make
+}
diff --git a/recipes/moblin/librest_git.bb b/recipes/moblin/librest_git.bb
new file mode 100644
index 0000000000..ec2d676fd5
--- /dev/null
+++ b/recipes/moblin/librest_git.bb
@@ -0,0 +1,14 @@
+
+SRC_URI = "git://git.moblin.org/${PN}.git;protocol=git"
+PV = "0.0+git${SRCREV}"
+PR = "r0"
+
+DEPENDS = "libsoup-2.4"
+
+S = "${WORKDIR}/git"
+
+inherit autotools_stage
+
+do_configure_prepend () {
+ echo "EXTRA_DIST=" > ${S}/gtk-doc.make
+}
diff --git a/recipes/moblin/moblin-menus/configurefix.patch b/recipes/moblin/moblin-menus/configurefix.patch
new file mode 100644
index 0000000000..288746aa66
--- /dev/null
+++ b/recipes/moblin/moblin-menus/configurefix.patch
@@ -0,0 +1,13 @@
+Index: git/configure.in
+===================================================================
+--- git.orig/configure.in 2009-01-17 18:57:24.000000000 +0000
++++ git/configure.in 2009-01-17 18:57:29.000000000 +0000
+@@ -11,8 +11,6 @@
+
+ AM_MAINTAINER_MODE
+
+-AM_DISABLE_STATIC
+-
+ changequote(,)dnl
+ if test "x$GCC" = "xyes"; then
+ case " $CFLAGS " in
diff --git a/recipes/moblin/moblin-menus_git.bb b/recipes/moblin/moblin-menus_git.bb
new file mode 100644
index 0000000000..ae60573649
--- /dev/null
+++ b/recipes/moblin/moblin-menus_git.bb
@@ -0,0 +1,11 @@
+
+SRC_URI = "git://git.moblin.org/${PN}.git;protocol=git \
+ file://configurefix.patch;patch=1"
+PV = "0.0+git${SRCREV}"
+PR = "r1"
+
+S = "${WORKDIR}/git"
+
+FILES_${PN} += "${datadir}/desktop-directories/*"
+
+inherit autotools_stage
diff --git a/recipes/moblin/mojito_git.bb b/recipes/moblin/mojito_git.bb
new file mode 100644
index 0000000000..b29aaed33d
--- /dev/null
+++ b/recipes/moblin/mojito_git.bb
@@ -0,0 +1,29 @@
+
+SRC_URI = "git://git.moblin.org/${PN}.git;protocol=git"
+PV = "0.0+git${SRCREV}"
+PR = "r2"
+
+DEPENDS = "libsoup-2.4 gconf-dbus librest glib-2.0 twitter-glib sqlite3 gnome-keyring"
+
+S = "${WORKDIR}/git"
+
+inherit autotools_stage
+
+FILES_${PN} += "${datadir}/dbus-1/services"
+FILES_${PN}-dbg += "${libdir}/mojito/sources/.debug/* ${libdir}/mojito/services/.debug/"
+
+PARALLEL_MAKE = ""
+
+pkg_postinst_${PN} () {
+#!/bin/sh -e
+if [ "x$D" != "x" ]; then
+ exit 1
+fi
+
+. ${sysconfdir}/init.d/functions
+
+gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type string -s /apps/mojito/sources/flickr/user 34402200@N07
+gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.default --direct --type string -s /apps/mojito/sources/twitter/user ross@linux.intel.com
+gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type string -s /apps/mojito/sources/twitter/password password
+
+}
diff --git a/recipes/moblin/nbtk_git.bb b/recipes/moblin/nbtk_git.bb
new file mode 100644
index 0000000000..0c0281d14a
--- /dev/null
+++ b/recipes/moblin/nbtk_git.bb
@@ -0,0 +1,19 @@
+LICENSE = "LGPLv2.1"
+
+SRCREV = "73958e79f0ad69dd4e63cb8e697bd80ecee1cc34"
+PV = "0.8.0"
+PR = "r1"
+PR_append = "+git${SRCREV}"
+
+DEPENDS = "glib-2.0 gtk+ libccss clutter-0.9"
+
+SRC_URI = "git://git.moblin.org/${PN}.git;protocol=git"
+S = "${WORKDIR}/git"
+
+inherit autotools_stage
+
+do_configure_prepend () {
+ echo "EXTRA_DIST=" > ${S}/gtk-doc.make
+ echo "CLEANFILES=" >> ${S}/gtk-doc.make
+}
+
diff --git a/recipes/moblin/twitter-glib_git.bb b/recipes/moblin/twitter-glib_git.bb
new file mode 100644
index 0000000000..791cace092
--- /dev/null
+++ b/recipes/moblin/twitter-glib_git.bb
@@ -0,0 +1,16 @@
+HOMEPAGE = "http://live.gnome.org/TwitterGlib"
+SRC_URI = "git://github.com/ebassi/${PN}.git;protocol=git"
+PV = "0.0+git${SRCREV}"
+PR = "r0"
+
+DEPENDS = "glib-2.0 gtk+ json-glib"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--disable-shave --disable-introspection"
+
+inherit autotools_stage
+
+do_configure_prepend () {
+ echo "EXTRA_DIST=" > ${S}/gtk-doc.make
+} \ No newline at end of file
diff --git a/recipes/mozilla/fennec/use-native-bpp.patch b/recipes/mozilla/fennec/use-native-bpp.patch
new file mode 100644
index 0000000000..fd3f9b71f8
--- /dev/null
+++ b/recipes/mozilla/fennec/use-native-bpp.patch
@@ -0,0 +1,81 @@
+diff -r f603fec24bf7 gfx/thebes/src/gfxPlatformGtk.cpp
+--- a/gfx/thebes/src/gfxPlatformGtk.cpp Tue Dec 02 16:05:36 2008 -0500
++++ b/gfx/thebes/src/gfxPlatformGtk.cpp Tue Dec 02 23:14:03 2008 -0500
+@@ -80,18 +80,23 @@
+
+ #define GDK_PIXMAP_SIZE_MAX 32767
+
+ #ifndef MOZ_PANGO
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+ #endif
+
++#include "nsIPrefService.h"
++#include "nsIPrefBranch.h"
++#include "nsServiceManagerUtils.h"
++
+ double gfxPlatformGtk::sDPI = -1.0;
+ gfxFontconfigUtils *gfxPlatformGtk::sFontconfigUtils = nsnull;
++static PRBool gUseSystemVisualFormat = PR_FALSE;
+
+ #ifndef MOZ_PANGO
+ typedef nsDataHashtable<nsStringHashKey, nsRefPtr<FontFamily> > FontTable;
+ static FontTable *gPlatformFonts = NULL;
+ static FontTable *gPlatformFontAliases = NULL;
+ static FT_Library gPlatformFTLibrary = NULL;
+ #endif
+
+@@ -113,16 +118,26 @@ gfxPlatformGtk::gfxPlatformGtk()
+ gPlatformFonts = new FontTable();
+ gPlatformFonts->Init(100);
+ gPlatformFontAliases = new FontTable();
+ gPlatformFontAliases->Init(100);
+ UpdateFontList();
+ #endif
+
+ InitDPI();
++
++ nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
++ if (!prefs)
++ return;
++
++ PRBool val = PR_FALSE;
++ nsresult rv;
++ rv = prefs->GetBoolPref("gfx.system.visual.format", &val);
++ if (NS_SUCCEEDED(rv))
++ gUseSystemVisualFormat = val;
+ }
+
+ gfxPlatformGtk::~gfxPlatformGtk()
+ {
+ gfxFontconfigUtils::Shutdown();
+ sFontconfigUtils = nsnull;
+
+ #ifdef MOZ_PANGO
+@@ -184,18 +199,24 @@ gfxPlatformGtk::CreateOffscreenSurface(c
+ // XXX we really need a different interface here, something that passes
+ // in more context, including the display and/or target surface type that
+ // we should try to match
+ Display* display = GDK_DISPLAY();
+ if (!display)
+ return nsnull;
+
+ GdkPixmap* pixmap = nsnull;
+- XRenderPictFormat* xrenderFormat =
+- XRenderFindStandardFormat(display, xrenderFormatID);
++ XRenderPictFormat* xrenderFormat = nsnull;
++
++ if (xrenderFormatID == PictStandardRGB24 && gUseSystemVisualFormat) {
++ // Actually we want not strictly RGB24, but the fastest non-alpha
++ // format (XXX to be verified if it is actually safe)
++ xrenderFormat = XRenderFindVisualFormat(display, GDK_VISUAL_XVISUAL(gdk_visual_get_system()));
++ }
++ if (!xrenderFormat) xrenderFormat = XRenderFindStandardFormat(display, xrenderFormatID);
+
+ if (xrenderFormat && sizeOk) {
+ pixmap = gdk_pixmap_new(nsnull, size.width, size.height,
+ xrenderFormat->depth);
+
+ if (pixmap) {
+ gdk_drawable_set_colormap(GDK_DRAWABLE(pixmap), nsnull);
+ newSurface = new gfxXlibSurface(display,
diff --git a/recipes/mozilla/fennec_hg.bb b/recipes/mozilla/fennec_hg.bb
index 3b236f138b..94996134fa 100644
--- a/recipes/mozilla/fennec_hg.bb
+++ b/recipes/mozilla/fennec_hg.bb
@@ -2,13 +2,14 @@ DESCRIPTION = "Mozilla Mobile browser"
PV = "0.9+1.0b2pre"
MOZPV = "1.0b2pre"
-PR = "r4"
+PR = "r5"
PE = "1"
SRC_URI = "hg://hg.mozilla.org/;module=mozilla-central;rev=8c9a6d851018 \
hg://hg.mozilla.org/;module=mobile-browser;rev=c24b8b4ade53 \
file://jsautocfg.h \
file://jsautocfg-dontoverwrite.patch;patch=1 \
+ file://use-native-bpp.patch;patch=1 \
"
S = "${WORKDIR}/mozilla-central"
diff --git a/recipes/mozilla/files/use-native-bpp.patch b/recipes/mozilla/files/use-native-bpp.patch
new file mode 100644
index 0000000000..4b0f0d1ddb
--- /dev/null
+++ b/recipes/mozilla/files/use-native-bpp.patch
@@ -0,0 +1,37 @@
+Subject: [PATCH] Use native format for storing non-transparent pictures.
+
+When using 16-bit color depth for desktop, it is preferable
+to also use 16bpp format for images to get better performance.
+As an additional bonus, the browser uses less memory when
+viewing pages with lots of images.
+
+Taken from https://bugzilla.mozilla.org/show_bug.cgi?id=386440
+---
+ gfx/thebes/src/gfxPlatformGtk.cpp | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/gfx/thebes/src/gfxPlatformGtk.cpp b/gfx/thebes/src/gfxPlatformGtk.cpp
+index 39e09e7..78e6002 100644
+--- a/gfx/thebes/src/gfxPlatformGtk.cpp
++++ b/gfx/thebes/src/gfxPlatformGtk.cpp
+@@ -142,8 +142,15 @@ gfxPlatformGtk::CreateOffscreenSurface(const gfxIntSize& size,
+
+ if (!UseGlitz()) {
+ GdkPixmap* pixmap = nsnull;
+- XRenderPictFormat* xrenderFormat =
+- XRenderFindStandardFormat(display, xrenderFormatID);
++ XRenderPictFormat* xrenderFormat = nsnull;
++
++ if (xrenderFormatID == PictStandardRGB24) {
++ // Actually we want not strictly RGB24, but the fastest non-alpha format
++ xrenderFormat = XRenderFindVisualFormat(display, GDK_VISUAL_XVISUAL(gdk_visual_get_system()));
++ }
++
++ if (!xrenderFormat)
++ xrenderFormat = XRenderFindStandardFormat(display, xrenderFormatID);
+
+ if (!xrenderFormat) {
+ // We don't have Render; see if we can just create a pixmap
+--
+1.5.6.5
+
diff --git a/recipes/mozilla/firefox_3.0.1.bb b/recipes/mozilla/firefox_3.0.1.bb
index 24927c7f3d..f3e52a0c3f 100644
--- a/recipes/mozilla/firefox_3.0.1.bb
+++ b/recipes/mozilla/firefox_3.0.1.bb
@@ -1,5 +1,5 @@
DEPENDS += "cairo"
-PR = "r8"
+PR = "r9"
SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/firefox-${PV}-source.tar.bz2 \
file://jsautocfg.h \
@@ -13,6 +13,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/
file://wchart.diff;patch=1 \
file://0001-Remove-Werror-from-build.patch;patch=1 \
file://0002-Fix-security-cross-compile-cpu-detection-error.patch;patch=1 \
+ file://use-native-bpp.patch;patch=1 \
"
S = "${WORKDIR}/mozilla"
diff --git a/recipes/mtools/files/no-x11.patch b/recipes/mtools/files/no-x11.patch
deleted file mode 100644
index 300f43f000..0000000000
--- a/recipes/mtools/files/no-x11.patch
+++ /dev/null
@@ -1,19 +0,0 @@
----
- Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- mtools-3.9.9.orig/Makefile.in
-+++ mtools-3.9.9/Makefile.in
-@@ -128,11 +128,11 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
- X_PRE_LIBS = @X_PRE_LIBS@
- CFLAGS = $(CPPFLAGS) $(DEFS) $(MYCFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
- CXXFLAGS = $(CPPFLAGS) $(DEFS) $(MYCXXFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
- LINK = $(CC) $(LDFLAGS) $(USERLDFLAGS) @extralibdir@
- ALLLIBS = $(USERLDLIBS) $(MACHDEPLIBS) $(SHLIB) $(LIBS)
--X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lXau -lX11 $(LIBS)
-+X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) $(LIBS)
- X_CCFLAGS = $(X_CFLAGS) $(CFLAGS)
-
- all: mtools $(LINKS) mkmanifest @FLOPPYD@
-
- %.o: %.c
diff --git a/recipes/mtools/files/plainio.patch b/recipes/mtools/files/plainio.patch
new file mode 100644
index 0000000000..b4bd1d6615
--- /dev/null
+++ b/recipes/mtools/files/plainio.patch
@@ -0,0 +1,13 @@
+01_plainio.dpatch by Martin Pitt <mpitt@debian.org>
+Fixes garbage output of mtype under certain circumstances; closes #217413
+
+--- mtools-3.9.9/plain_io.c 2003-02-16 17:18:58.000000000 +0100
++++ mtools-3.9.9/plain_io.c 2004-01-14 00:56:11.000000000 +0100
+@@ -524,6 +524,7 @@
+ printOom();
+ return 0;
+ }
++ memset((void*)This, 0, sizeof(SimpleFile_t));
+ This->scsi_sector_size = 512;
+ This->seekable = 1;
+ #ifdef OS_hpux
diff --git a/recipes/mtools/files/use-sg_io.patch b/recipes/mtools/files/use-sg_io.patch
new file mode 100644
index 0000000000..33867deb1a
--- /dev/null
+++ b/recipes/mtools/files/use-sg_io.patch
@@ -0,0 +1,80 @@
+08.scsi.c.dpatch by Thomas Richter <thor@mail.math.tu-berlin.de>
+#393878 mzip unreliable on 2.6.18
+
+--- mtools-3.9.10/scsi.c 2002-11-02 13:09:28.000000000 +0100
++++ mtools-3.9.10/scsi.c 2006-10-17 21:11:01.000000000 +0200
+@@ -37,12 +37,7 @@
+ #endif
+
+ #ifdef OS_linux
+-#define SCSI_IOCTL_SEND_COMMAND 1
+-struct scsi_ioctl_command {
+- int inlen;
+- int outlen;
+- char cmd[5008];
+-};
++#include <scsi/sg.h>
+ #endif
+
+ #ifdef _SCO_DS
+--- mtools-3.9.10/scsi.c 2007-05-26 19:02:56.000000000 +1000
++++ mtools-3.9.10/scsi.c 2008-04-08 20:30:16.000000000 +1000
+@@ -148,37 +148,33 @@ int scsi_cmd(int fd, unsigned char *cdb,
+ return 0;
+
+ #elif defined OS_linux
+- struct scsi_ioctl_command my_scsi_cmd;
++ struct sg_io_hdr scsi_cmd;
+
++ /*
++ ** Init the command
++ */
++ memset(&scsi_cmd,0,sizeof(scsi_cmd));
++ scsi_cmd.interface_id = 'S';
++ scsi_cmd.dxfer_direction = (mode == SCSI_IO_READ)?(SG_DXFER_FROM_DEV):(SG_DXFER_TO_DEV);
++ scsi_cmd.cmd_len = cmdlen;
++ scsi_cmd.mx_sb_len = 0;
++ scsi_cmd.dxfer_len = len;
++ scsi_cmd.dxferp = data;
++ scsi_cmd.cmdp = cdb;
++ scsi_cmd.timeout = ~0; /* where is MAX_UINT defined??? */
++
++#if DEBUG
++ printf("CMD(%d): %02x%02x%02x%02x%02x%02x %sdevice\n",cmdlen,cdb[0],cdb[1],cdb[2],cdb[3],cdb[4],cdb[5],
++ (mode==SCSI_IO_READ)?("<-"):("->"));
++ printf("DATA : len = %d\n",len);
++#endif
+
+- memcpy(my_scsi_cmd.cmd, cdb, cmdlen); /* copy command */
+-
+- switch (mode) {
+- case SCSI_IO_READ:
+- my_scsi_cmd.inlen = 0;
+- my_scsi_cmd.outlen = len;
+- break;
+- case SCSI_IO_WRITE:
+- my_scsi_cmd.inlen = len;
+- my_scsi_cmd.outlen = 0;
+- memcpy(my_scsi_cmd.cmd + cmdlen,data,len);
+- break;
+- }
+-
+- if (ioctl(fd, SCSI_IOCTL_SEND_COMMAND, &my_scsi_cmd) < 0) {
++ if (ioctl(fd, SG_IO,&scsi_cmd) < 0) {
+ perror("scsi_io");
+ return -1;
+ }
+
+- switch (mode) {
+- case SCSI_IO_READ:
+- memcpy(data, &my_scsi_cmd.cmd[0], len);
+- break;
+- case SCSI_IO_WRITE:
+- break;
+- }
+-
+- return 0; /* where to get scsi status? */
++ return 0;
+
+ #elif (defined _SCO_DS) && (defined SCSIUSERCMD)
+ struct scsicmd my_scsi_cmd;
diff --git a/recipes/mtools/mtools-native_3.9.11.bb b/recipes/mtools/mtools-native_4.0.10.bb
index c82f7404eb..c82f7404eb 100644
--- a/recipes/mtools/mtools-native_3.9.11.bb
+++ b/recipes/mtools/mtools-native_4.0.10.bb
diff --git a/recipes/mtools/mtools_3.9.11.bb b/recipes/mtools/mtools_4.0.10.bb
index 4d1822f0d7..b53306a517 100644
--- a/recipes/mtools/mtools_3.9.11.bb
+++ b/recipes/mtools/mtools_4.0.10.bb
@@ -1,19 +1,26 @@
# mtools OE build file
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Copyright (C) 2009, O.S. Systems Software Ltda. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
DESCRIPTION="Mtools is a collection of utilities for accessing MS-DOS disks from Unix without mounting them."
HOMEPAGE="http://mtools.linux.lu"
LICENSE="GPL"
-PR = "r4"
-SRC_URI="http://mtools.linux.lu/mtools-${PV}.tar.gz \
+SRC_URI="http://ftp.gnu.org/gnu/mtools/mtools-${PV}.tar.bz2 \
file://m486.patch;patch=1 \
file://mtools-makeinfo.patch;patch=1 \
- file://no-x11.patch;patch=1"
+ file://plainio.patch;patch=1 \
+ file://use-sg_io.patch;patch=1"
S = "${WORKDIR}/mtools-${PV}"
inherit autotools
EXTRA_OECONF = "--without-x"
+
+do_fix_perms() {
+ chmod 644 ${S}/*.c ${S}/*.h
+}
+
+addtask fix_perms after do_unpack before do_patch
diff --git a/recipes/musicbrainz/files/libmusicbrainz-2.1.5-gcc43.patch b/recipes/musicbrainz/files/libmusicbrainz-2.1.5-gcc43.patch
new file mode 100644
index 0000000000..c9685301b4
--- /dev/null
+++ b/recipes/musicbrainz/files/libmusicbrainz-2.1.5-gcc43.patch
@@ -0,0 +1,58 @@
+diff -Naur libmusicbrainz-2.1.5.org/lib/comhttpsocket.cpp libmusicbrainz-2.1.5/lib/comhttpsocket.cpp
+--- libmusicbrainz-2.1.5.org/lib/comhttpsocket.cpp 2008-01-07 11:36:10.105820000 +0100
++++ libmusicbrainz-2.1.5/lib/comhttpsocket.cpp 2008-01-07 11:38:45.794974000 +0100
+@@ -20,6 +20,7 @@
+ #endif
+ #include <stdlib.h>
+ #include <assert.h>
++#include <cstring>
+
+ const char* g_strCOMVer = "libmusicbrainz/"VERSION;
+
+diff -Naur libmusicbrainz-2.1.5.org/lib/comsocket.cpp libmusicbrainz-2.1.5/lib/comsocket.cpp
+--- libmusicbrainz-2.1.5.org/lib/comsocket.cpp 2008-01-07 11:36:10.145783000 +0100
++++ libmusicbrainz-2.1.5/lib/comsocket.cpp 2008-01-07 11:44:12.604854000 +0100
+@@ -34,6 +34,7 @@
+ #include "comsocket.h"
+ #ifndef WIN32
+
++#include <string.h>
+ #include <netinet/tcp.h>
+ #include <errno.h>
+ #include <stdio.h>
+diff -Naur libmusicbrainz-2.1.5.org/lib/c_wrapper.cpp libmusicbrainz-2.1.5/lib/c_wrapper.cpp
+--- libmusicbrainz-2.1.5.org/lib/c_wrapper.cpp 2008-01-07 11:36:10.083846000 +0100
++++ libmusicbrainz-2.1.5/lib/c_wrapper.cpp 2008-01-07 11:41:45.093496000 +0100
+@@ -21,6 +21,7 @@
+ $Id: c_wrapper.cpp 665 2003-10-16 22:21:10Z robert $
+
+ ----------------------------------------------------------------------------*/
++#include <cstring>
+ #include "musicbrainz.h"
+ #include "trm.h"
+ #include "mb_c.h"
+diff -Naur libmusicbrainz-2.1.5.org/lib/http.cpp libmusicbrainz-2.1.5/lib/http.cpp
+--- libmusicbrainz-2.1.5.org/lib/http.cpp 2008-01-07 11:36:10.210725000 +0100
++++ libmusicbrainz-2.1.5/lib/http.cpp 2008-01-07 11:46:38.053245000 +0100
+@@ -23,7 +23,8 @@
+
+ ----------------------------------------------------------------------------*/
+ #include <stdlib.h>
+-#include <stdio.h>
++#include <stdio.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <ctype.h>
+diff -Naur libmusicbrainz-2.1.5.org/lib/sigclient.cpp libmusicbrainz-2.1.5/lib/sigclient.cpp
+--- libmusicbrainz-2.1.5.org/lib/sigclient.cpp 2008-01-07 11:36:10.338589000 +0100
++++ libmusicbrainz-2.1.5/lib/sigclient.cpp 2008-01-07 11:48:42.883323000 +0100
+@@ -33,6 +33,8 @@
+ #pragma warning(disable:4786)
+ #endif
+
++#include <string.h>
++
+ #include "sigclient.h"
+ #include "comhttpsocket.h"
+
diff --git a/recipes/musicbrainz/libmusicbrainz_2.1.5.bb b/recipes/musicbrainz/libmusicbrainz_2.1.5.bb
index 7ab0997218..452e874e1f 100644
--- a/recipes/musicbrainz/libmusicbrainz_2.1.5.bb
+++ b/recipes/musicbrainz/libmusicbrainz_2.1.5.bb
@@ -4,7 +4,9 @@ HOMEPAGE = "http://musicbrainz.org"
LICENSE = "LGPL"
DEPENDS = "expat"
-SRC_URI = "http://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-${PV}.tar.gz"
+# gcc43.patch from openSUSE
+SRC_URI = "http://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-${PV}.tar.gz \
+ file://libmusicbrainz-2.1.5-gcc43.patch;patch=1"
inherit autotools pkgconfig
diff --git a/recipes/musicpd/mpd-alsa_0.14.2.bb b/recipes/musicpd/mpd-alsa_0.14.2.bb
index 87b59a1bcf..b3cdaf4208 100644
--- a/recipes/musicpd/mpd-alsa_0.14.2.bb
+++ b/recipes/musicpd/mpd-alsa_0.14.2.bb
@@ -24,8 +24,8 @@ INITSCRIPT_NAME = "mpd"
EXTRA_OECONF = "\
--enable-ogg \
--enable-oggvorbis \
---disable-oggflac \
---enable-flac \
+--disable-oggflac \
+--enable-flac \
--enable-faad \
--with-ao-libraries=${STAGING_LIBDIR} \
--with-ao-includes=${STAGING_INCDIR} \
@@ -41,14 +41,15 @@ EXTRA_OECONF = "\
--with-ogg-includes=${STAGING_INCDIR} \
--with-vorbis-libraries=${STAGING_LIBDIR} \
--with-vorbis-includes=${STAGING_INCDIR} \
---disable-aotest \
---disable-alsatest \
---disable-oggtest \
---disable-vorbistest \
---disable-libFLACtest \
---disable-libOggFLACtest \
---disable-audiofiletest \
+--disable-aotest \
+--disable-alsatest \
+--disable-oggtest \
+--disable-vorbistest \
+--disable-libFLACtest \
+--disable-libOggFLACtest \
+--disable-audiofiletest \
--disable-libmikmodtest \
+--with-lame-includes=${STAGING_INCDIR} \
"
do_configure_append() {
diff --git a/recipes/musicpd/mpd_0.14.2.bb b/recipes/musicpd/mpd_0.14.2.bb
index 97792365b9..261858d444 100644
--- a/recipes/musicpd/mpd_0.14.2.bb
+++ b/recipes/musicpd/mpd_0.14.2.bb
@@ -27,10 +27,13 @@ EXTRA_OECONF = "\
--with-mad-includes=${STAGING_INCDIR} \
--with-faad-libraries=${STAGING_LIBDIR} \
--with-faad-includes=${STAGING_INCDIR} \
+ --disable-curl \
+ --disable-ffmpeg \
--disable-jack \
--enable-pulse \
--enable-mod \
- --disable-oggflac"
+ --disable-oggflac \
+ --with-lame-includes=${STAGING_INCDIR}"
do_compile_prepend() {
find -name Makefile | xargs sed -i 's~-I/usr/include~-I${STAGING_INCDIR}~g'
diff --git a/recipes/mutt/mutt-1.5.19/makedoc.patch b/recipes/mutt/mutt-1.5.19/makedoc.patch
new file mode 100644
index 0000000000..379a8a15ed
--- /dev/null
+++ b/recipes/mutt/mutt-1.5.19/makedoc.patch
@@ -0,0 +1,26 @@
+Index: mutt-1.5.19/doc/Makefile.am
+===================================================================
+--- mutt-1.5.19.orig/doc/Makefile.am
++++ mutt-1.5.19/doc/Makefile.am
+@@ -7,7 +7,7 @@ AM_CPPFLAGS = -I. -I.. -I$(includedir) -
+
+ MAKEDOC_CPP = $(CPP) $(AM_CPPFLAGS) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C
+
+-noinst_PROGRAMS = makedoc
++makedoc : $(makedoc_SOURCES)
+
+ EXTRA_DIST = dotlock.man \
+ muttbug.man \
+Index: mutt-1.5.19/doc/makedoc.c
+===================================================================
+--- mutt-1.5.19.orig/doc/makedoc.c
++++ mutt-1.5.19/doc/makedoc.c
+@@ -51,7 +51,7 @@
+ #ifndef HAVE_STRERROR
+ #ifndef STDC_HEADERS
+ extern int sys_nerr;
+-extern char *sys_errlist[];
++/*extern char *sys_errlist[];*/
+ #endif
+
+ #define strerror(x) ((x) > 0 && (x) < sys_nerr) ? sys_errlist[(x)] : 0
diff --git a/recipes/mutt/mutt-1.5.19/patch-1.5.19.sidebar.20090522.txt b/recipes/mutt/mutt-1.5.19/patch-1.5.19.sidebar.20090522.txt
new file mode 100644
index 0000000000..27483501c6
--- /dev/null
+++ b/recipes/mutt/mutt-1.5.19/patch-1.5.19.sidebar.20090522.txt
@@ -0,0 +1,1792 @@
+*** mutt-1.5.19-orig/buffy.c 2008-08-29 18:39:48.000000000 -0500
+--- mutt-1.5.19-patched/buffy.c 2009-05-22 08:45:01.000000000 -0500
+***************
+*** 259,265 ****
+ char path[_POSIX_PATH_MAX];
+ struct stat contex_sb;
+ time_t t;
+!
+ #ifdef USE_IMAP
+ /* update postponed count as well, on force */
+ if (force)
+--- 259,265 ----
+ char path[_POSIX_PATH_MAX];
+ struct stat contex_sb;
+ time_t t;
+! CONTEXT *ctx;
+ #ifdef USE_IMAP
+ /* update postponed count as well, on force */
+ if (force)
+***************
+*** 294,299 ****
+--- 294,301 ----
+
+ for (tmp = Incoming; tmp; tmp = tmp->next)
+ {
++ if ( tmp->new == 1 )
++ tmp->has_new = 1;
+ #ifdef USE_IMAP
+ if (tmp->magic != M_IMAP)
+ #endif
+***************
+*** 350,359 ****
+ case M_MBOX:
+ case M_MMDF:
+
+! if (STAT_CHECK)
+ {
+! BuffyCount++;
+! tmp->new = 1;
+ }
+ else if (option(OPTCHECKMBOXSIZE))
+ {
+--- 352,378 ----
+ case M_MBOX:
+ case M_MMDF:
+
+! {
+! if (STAT_CHECK || tmp->msgcount == 0)
+ {
+! BUFFY b = *tmp;
+! int msgcount = 0;
+! int msg_unread = 0;
+! /* parse the mailbox, to see how much mail there is */
+! ctx = mx_open_mailbox( tmp->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL);
+! if(ctx)
+! {
+! msgcount = ctx->msgcount;
+! msg_unread = ctx->unread;
+! mx_close_mailbox(ctx, 0);
+! }
+! *tmp = b;
+! tmp->msgcount = msgcount;
+! tmp->msg_unread = msg_unread;
+! if(STAT_CHECK) {
+! tmp->has_new = tmp->new = 1;
+! BuffyCount++;
+! }
+ }
+ else if (option(OPTCHECKMBOXSIZE))
+ {
+***************
+*** 363,397 ****
+ if (tmp->newly_created &&
+ (sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime))
+ tmp->newly_created = 0;
+!
+ break;
+
+ case M_MAILDIR:
+
+ snprintf (path, sizeof (path), "%s/new", tmp->path);
+ if ((dirp = opendir (path)) == NULL)
+ {
+ tmp->magic = 0;
+ break;
+ }
+ while ((de = readdir (dirp)) != NULL)
+ {
+ char *p;
+ if (*de->d_name != '.' &&
+ (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')))
+ {
+! /* one new and undeleted message is enough */
+! BuffyCount++;
+! tmp->new = 1;
+! break;
+ }
+ }
+ closedir (dirp);
+ break;
+
+ case M_MH:
+ if ((tmp->new = mh_buffy (tmp->path)) > 0)
+ BuffyCount++;
+ break;
+ }
+ }
+--- 382,467 ----
+ if (tmp->newly_created &&
+ (sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime))
+ tmp->newly_created = 0;
+! }
+ break;
+
+ case M_MAILDIR:
+
++ /* count new message */
+ snprintf (path, sizeof (path), "%s/new", tmp->path);
+ if ((dirp = opendir (path)) == NULL)
+ {
+ tmp->magic = 0;
+ break;
+ }
++ tmp->msgcount = 0;
++ tmp->msg_unread = 0;
++ tmp->msg_flagged = 0;
+ while ((de = readdir (dirp)) != NULL)
+ {
+ char *p;
+ if (*de->d_name != '.' &&
+ (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')))
+ {
+! tmp->has_new = tmp->new = 1;
+! tmp->msgcount++;
+! tmp->msg_unread++;
+! }
+! }
+! if(tmp->msg_unread)
+! BuffyCount++;
+!
+! closedir (dirp);
+!
+! /*
+! * count read messages (for folderlist (sidebar) we also need to count
+! * messages in cur so that we the total number of messages
+! */
+! snprintf (path, sizeof (path), "%s/cur", tmp->path);
+! if ((dirp = opendir (path)) == NULL)
+! {
+! tmp->magic = 0;
+! break;
+! }
+! while ((de = readdir (dirp)) != NULL)
+! {
+! char *p;
+! if (*de->d_name != '.') {
+! if ((p = strstr (de->d_name, ":2,"))) {
+! if (!strchr (p + 3, 'T')) {
+! tmp->msgcount++;
+! if ( !strchr (p + 3, 'S'))
+! tmp->msg_unread++;
+! if (strchr(p + 3, 'F'))
+! tmp->msg_flagged++;
+! }
+! } else
+! tmp->msgcount++;
+ }
+ }
+ closedir (dirp);
+ break;
+
+ case M_MH:
++ {
++ DIR *dp;
++ struct dirent *de;
+ if ((tmp->new = mh_buffy (tmp->path)) > 0)
+ BuffyCount++;
++
++ if ((dp = opendir (path)) == NULL)
++ break;
++ tmp->msgcount = 0;
++ while ((de = readdir (dp)))
++ {
++ if (mh_valid_message (de->d_name))
++ {
++ tmp->msgcount++;
++ tmp->has_new = tmp->new = 1;
++ }
++ }
++ closedir (dp);
++ }
+ break;
+ }
+ }
+*** mutt-1.5.19-orig/buffy.h 2008-05-22 13:25:19.000000000 -0500
+--- mutt-1.5.19-patched/buffy.h 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 25,31 ****
+--- 25,36 ----
+ char *path;
+ off_t size;
+ struct buffy_t *next;
++ struct buffy_t *prev;
+ short new; /* mailbox has new mail */
++ short has_new; /* set it new if new and not read */
++ int msgcount; /* total number of messages */
++ int msg_unread; /* number of unread messages */
++ int msg_flagged; /* number of flagged messages */
+ short notified; /* user has been notified */
+ short magic; /* mailbox type */
+ short newly_created; /* mbox or mmdf just popped into existence */
+*** mutt-1.5.19-orig/color.c 2008-03-19 15:07:57.000000000 -0500
+--- mutt-1.5.19-patched/color.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 93,98 ****
+--- 93,100 ----
+ { "bold", MT_COLOR_BOLD },
+ { "underline", MT_COLOR_UNDERLINE },
+ { "index", MT_COLOR_INDEX },
++ { "sidebar_new", MT_COLOR_NEW },
++ { "sidebar_flagged", MT_COLOR_FLAGGED },
+ { NULL, 0 }
+ };
+
+*** mutt-1.5.19-orig/compose.c 2009-01-05 13:20:53.000000000 -0600
+--- mutt-1.5.19-patched/compose.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 72,78 ****
+
+ #define HDR_XOFFSET 10
+ #define TITLE_FMT "%10s" /* Used for Prompts, which are ASCII */
+! #define W (COLS - HDR_XOFFSET)
+
+ static char *Prompts[] =
+ {
+--- 72,78 ----
+
+ #define HDR_XOFFSET 10
+ #define TITLE_FMT "%10s" /* Used for Prompts, which are ASCII */
+! #define W (COLS - HDR_XOFFSET - SidebarWidth)
+
+ static char *Prompts[] =
+ {
+***************
+*** 115,130 ****
+ if ((WithCrypto & APPLICATION_PGP) && (WithCrypto & APPLICATION_SMIME))
+ {
+ if (!msg->security)
+! mvaddstr (HDR_CRYPT, 0, "Security: ");
+ else if (msg->security & APPLICATION_SMIME)
+! mvaddstr (HDR_CRYPT, 0, " S/MIME: ");
+ else if (msg->security & APPLICATION_PGP)
+! mvaddstr (HDR_CRYPT, 0, " PGP: ");
+ }
+ else if ((WithCrypto & APPLICATION_SMIME))
+! mvaddstr (HDR_CRYPT, 0, " S/MIME: ");
+ else if ((WithCrypto & APPLICATION_PGP))
+! mvaddstr (HDR_CRYPT, 0, " PGP: ");
+ else
+ return;
+
+--- 115,130 ----
+ if ((WithCrypto & APPLICATION_PGP) && (WithCrypto & APPLICATION_SMIME))
+ {
+ if (!msg->security)
+! mvaddstr (HDR_CRYPT, SidebarWidth, "Security: ");
+ else if (msg->security & APPLICATION_SMIME)
+! mvaddstr (HDR_CRYPT, SidebarWidth, " S/MIME: ");
+ else if (msg->security & APPLICATION_PGP)
+! mvaddstr (HDR_CRYPT, SidebarWidth, " PGP: ");
+ }
+ else if ((WithCrypto & APPLICATION_SMIME))
+! mvaddstr (HDR_CRYPT, SidebarWidth, " S/MIME: ");
+ else if ((WithCrypto & APPLICATION_PGP))
+! mvaddstr (HDR_CRYPT, SidebarWidth, " PGP: ");
+ else
+ return;
+
+***************
+*** 148,154 ****
+ }
+ clrtoeol ();
+
+! move (HDR_CRYPTINFO, 0);
+ clrtoeol ();
+ if ((WithCrypto & APPLICATION_PGP)
+ && msg->security & APPLICATION_PGP && msg->security & SIGN)
+--- 148,154 ----
+ }
+ clrtoeol ();
+
+! move (HDR_CRYPTINFO, SidebarWidth);
+ clrtoeol ();
+ if ((WithCrypto & APPLICATION_PGP)
+ && msg->security & APPLICATION_PGP && msg->security & SIGN)
+***************
+*** 164,170 ****
+ && (msg->security & ENCRYPT)
+ && SmimeCryptAlg
+ && *SmimeCryptAlg) {
+! mvprintw (HDR_CRYPTINFO, 40, "%s%s", _("Encrypt with: "),
+ NONULL(SmimeCryptAlg));
+ off = 20;
+ }
+--- 164,170 ----
+ && (msg->security & ENCRYPT)
+ && SmimeCryptAlg
+ && *SmimeCryptAlg) {
+! mvprintw (HDR_CRYPTINFO, SidebarWidth + 40, "%s%s", _("Encrypt with: "),
+ NONULL(SmimeCryptAlg));
+ off = 20;
+ }
+***************
+*** 178,184 ****
+ int c;
+ char *t;
+
+! mvaddstr (HDR_MIX, 0, " Mix: ");
+
+ if (!chain)
+ {
+--- 178,184 ----
+ int c;
+ char *t;
+
+! mvaddstr (HDR_MIX, SidebarWidth, " Mix: ");
+
+ if (!chain)
+ {
+***************
+*** 193,199 ****
+ if (t && t[0] == '0' && t[1] == '\0')
+ t = "<random>";
+
+! if (c + mutt_strlen (t) + 2 >= COLS)
+ break;
+
+ addstr (NONULL(t));
+--- 193,199 ----
+ if (t && t[0] == '0' && t[1] == '\0')
+ t = "<random>";
+
+! if (c + mutt_strlen (t) + 2 >= COLS - SidebarWidth)
+ break;
+
+ addstr (NONULL(t));
+***************
+*** 245,251 ****
+
+ buf[0] = 0;
+ rfc822_write_address (buf, sizeof (buf), addr, 1);
+! mvprintw (line, 0, TITLE_FMT, Prompts[line - 1]);
+ mutt_paddstr (W, buf);
+ }
+
+--- 245,251 ----
+
+ buf[0] = 0;
+ rfc822_write_address (buf, sizeof (buf), addr, 1);
+! mvprintw (line, SidebarWidth, TITLE_FMT, Prompts[line - 1]);
+ mutt_paddstr (W, buf);
+ }
+
+***************
+*** 255,264 ****
+ draw_envelope_addr (HDR_TO, msg->env->to);
+ draw_envelope_addr (HDR_CC, msg->env->cc);
+ draw_envelope_addr (HDR_BCC, msg->env->bcc);
+! mvprintw (HDR_SUBJECT, 0, TITLE_FMT, Prompts[HDR_SUBJECT - 1]);
+ mutt_paddstr (W, NONULL (msg->env->subject));
+ draw_envelope_addr (HDR_REPLYTO, msg->env->reply_to);
+! mvprintw (HDR_FCC, 0, TITLE_FMT, Prompts[HDR_FCC - 1]);
+ mutt_paddstr (W, fcc);
+
+ if (WithCrypto)
+--- 255,264 ----
+ draw_envelope_addr (HDR_TO, msg->env->to);
+ draw_envelope_addr (HDR_CC, msg->env->cc);
+ draw_envelope_addr (HDR_BCC, msg->env->bcc);
+! mvprintw (HDR_SUBJECT, SidebarWidth, TITLE_FMT, Prompts[HDR_SUBJECT - 1]);
+ mutt_paddstr (W, NONULL (msg->env->subject));
+ draw_envelope_addr (HDR_REPLYTO, msg->env->reply_to);
+! mvprintw (HDR_FCC, SidebarWidth, TITLE_FMT, Prompts[HDR_FCC - 1]);
+ mutt_paddstr (W, fcc);
+
+ if (WithCrypto)
+***************
+*** 269,275 ****
+ #endif
+
+ SETCOLOR (MT_COLOR_STATUS);
+! mvaddstr (HDR_ATTACH - 1, 0, _("-- Attachments"));
+ BKGDSET (MT_COLOR_STATUS);
+ clrtoeol ();
+
+--- 269,275 ----
+ #endif
+
+ SETCOLOR (MT_COLOR_STATUS);
+! mvaddstr (HDR_ATTACH - 1, SidebarWidth, _("-- Attachments"));
+ BKGDSET (MT_COLOR_STATUS);
+ clrtoeol ();
+
+***************
+*** 307,313 ****
+ /* redraw the expanded list so the user can see the result */
+ buf[0] = 0;
+ rfc822_write_address (buf, sizeof (buf), *addr, 1);
+! move (line, HDR_XOFFSET);
+ mutt_paddstr (W, buf);
+
+ return 0;
+--- 307,313 ----
+ /* redraw the expanded list so the user can see the result */
+ buf[0] = 0;
+ rfc822_write_address (buf, sizeof (buf), *addr, 1);
+! move (line, HDR_XOFFSET+SidebarWidth);
+ mutt_paddstr (W, buf);
+
+ return 0;
+***************
+*** 552,558 ****
+ if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0)
+ {
+ mutt_str_replace (&msg->env->subject, buf);
+! move (HDR_SUBJECT, HDR_XOFFSET);
+ clrtoeol ();
+ if (msg->env->subject)
+ mutt_paddstr (W, msg->env->subject);
+--- 552,558 ----
+ if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0)
+ {
+ mutt_str_replace (&msg->env->subject, buf);
+! move (HDR_SUBJECT, HDR_XOFFSET + SidebarWidth);
+ clrtoeol ();
+ if (msg->env->subject)
+ mutt_paddstr (W, msg->env->subject);
+***************
+*** 569,575 ****
+ {
+ strfcpy (fcc, buf, fcclen);
+ mutt_pretty_mailbox (fcc, fcclen);
+! move (HDR_FCC, HDR_XOFFSET);
+ mutt_paddstr (W, fcc);
+ fccSet = 1;
+ }
+--- 569,575 ----
+ {
+ strfcpy (fcc, buf, fcclen);
+ mutt_pretty_mailbox (fcc, fcclen);
+! move (HDR_FCC, HDR_XOFFSET + SidebarWidth);
+ mutt_paddstr (W, fcc);
+ fccSet = 1;
+ }
+*** mutt-1.5.19-orig/curs_main.c 2009-01-05 13:20:53.000000000 -0600
+--- mutt-1.5.19-patched/curs_main.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 26,32 ****
+--- 26,34 ----
+ #include "mailbox.h"
+ #include "mapping.h"
+ #include "sort.h"
++ #include "buffy.h"
+ #include "mx.h"
++ #include "sidebar.h"
+
+ #ifdef USE_POP
+ #include "pop.h"
+***************
+*** 523,530 ****
+ menu->redraw |= REDRAW_STATUS;
+ if (do_buffy_notify)
+ {
+! if (mutt_buffy_notify () && option (OPTBEEPNEW))
+! beep ();
+ }
+ else
+ do_buffy_notify = 1;
+--- 525,536 ----
+ menu->redraw |= REDRAW_STATUS;
+ if (do_buffy_notify)
+ {
+! if (mutt_buffy_notify ())
+! {
+! menu->redraw |= REDRAW_FULL;
+! if (option (OPTBEEPNEW))
+! beep ();
+! }
+ }
+ else
+ do_buffy_notify = 1;
+***************
+*** 536,541 ****
+--- 542,548 ----
+ if (menu->redraw & REDRAW_FULL)
+ {
+ menu_redraw_full (menu);
++ draw_sidebar(menu->menu);
+ mutt_show_error ();
+ }
+
+***************
+*** 558,567 ****
+--- 565,577 ----
+
+ if (menu->redraw & REDRAW_STATUS)
+ {
++ DrawFullLine = 1;
+ menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
++ DrawFullLine = 0;
+ CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES-2);
+ SETCOLOR (MT_COLOR_STATUS);
+ BKGDSET (MT_COLOR_STATUS);
++ set_buffystats(Context);
+ mutt_paddstr (COLS, buf);
+ SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
+***************
+*** 575,581 ****
+ menu->oldcurrent = -1;
+
+ if (option (OPTARROWCURSOR))
+! move (menu->current - menu->top + menu->offset, 2);
+ else if (option (OPTBRAILLEFRIENDLY))
+ move (menu->current - menu->top + menu->offset, 0);
+ else
+--- 585,591 ----
+ menu->oldcurrent = -1;
+
+ if (option (OPTARROWCURSOR))
+! move (menu->current - menu->top + menu->offset, SidebarWidth + 2);
+ else if (option (OPTBRAILLEFRIENDLY))
+ move (menu->current - menu->top + menu->offset, 0);
+ else
+***************
+*** 1048,1053 ****
+--- 1058,1064 ----
+ menu->redraw = REDRAW_FULL;
+ break;
+
++ case OP_SIDEBAR_OPEN:
+ case OP_MAIN_CHANGE_FOLDER:
+ case OP_MAIN_NEXT_UNREAD_MAILBOX:
+
+***************
+*** 1079,1085 ****
+ {
+ mutt_buffy (buf, sizeof (buf));
+
+! if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1)
+ {
+ if (menu->menu == MENU_PAGER)
+ {
+--- 1090,1100 ----
+ {
+ mutt_buffy (buf, sizeof (buf));
+
+! if ( op == OP_SIDEBAR_OPEN ) {
+! if(!CurBuffy)
+! break;
+! strncpy( buf, CurBuffy->path, sizeof(buf) );
+! } else if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1)
+ {
+ if (menu->menu == MENU_PAGER)
+ {
+***************
+*** 1097,1102 ****
+--- 1112,1118 ----
+ }
+
+ mutt_expand_path (buf, sizeof (buf));
++ set_curbuffy(buf);
+ if (mx_get_magic (buf) <= 0)
+ {
+ mutt_error (_("%s is not a mailbox."), buf);
+***************
+*** 2176,2181 ****
+--- 2192,2203 ----
+ mutt_what_key();
+ break;
+
++ case OP_SIDEBAR_SCROLL_UP:
++ case OP_SIDEBAR_SCROLL_DOWN:
++ case OP_SIDEBAR_NEXT:
++ case OP_SIDEBAR_PREV:
++ scroll_sidebar(op, menu->menu);
++ break;
+ default:
+ if (menu->menu == MENU_MAIN)
+ km_error_key (MENU_MAIN);
+*** mutt-1.5.19-orig/flags.c 2009-01-03 17:27:10.000000000 -0600
+--- mutt-1.5.19-patched/flags.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 22,29 ****
+--- 22,31 ----
+
+ #include "mutt.h"
+ #include "mutt_curses.h"
++ #include "mutt_menu.h"
+ #include "sort.h"
+ #include "mx.h"
++ #include "sidebar.h"
+
+ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx)
+ {
+***************
+*** 263,268 ****
+--- 265,271 ----
+ */
+ if (h->searched && (changed != h->changed || deleted != ctx->deleted || tagged != ctx->tagged || flagged != ctx->flagged))
+ h->searched = 0;
++ draw_sidebar(0);
+ }
+
+ void mutt_tag_set_flag (int flag, int bf)
+*** mutt-1.5.19-orig/functions.h 2009-01-05 13:20:53.000000000 -0600
+--- mutt-1.5.19-patched/functions.h 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 168,173 ****
+--- 168,178 ----
+ { "decrypt-save", OP_DECRYPT_SAVE, NULL },
+
+
++ { "sidebar-scroll-up", OP_SIDEBAR_SCROLL_UP, NULL },
++ { "sidebar-scroll-down", OP_SIDEBAR_SCROLL_DOWN, NULL },
++ { "sidebar-next", OP_SIDEBAR_NEXT, NULL },
++ { "sidebar-prev", OP_SIDEBAR_PREV, NULL },
++ { "sidebar-open", OP_SIDEBAR_OPEN, NULL },
+ { NULL, 0, NULL }
+ };
+
+***************
+*** 266,271 ****
+--- 271,281 ----
+
+ { "what-key", OP_WHAT_KEY, NULL },
+
++ { "sidebar-scroll-up", OP_SIDEBAR_SCROLL_UP, NULL },
++ { "sidebar-scroll-down", OP_SIDEBAR_SCROLL_DOWN, NULL },
++ { "sidebar-next", OP_SIDEBAR_NEXT, NULL },
++ { "sidebar-prev", OP_SIDEBAR_PREV, NULL },
++ { "sidebar-open", OP_SIDEBAR_OPEN, NULL },
+ { NULL, 0, NULL }
+ };
+
+*** mutt-1.5.19-orig/globals.h 2009-01-03 17:27:10.000000000 -0600
+--- mutt-1.5.19-patched/globals.h 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 116,121 ****
+--- 116,122 ----
+ WHERE char *SendCharset;
+ WHERE char *Sendmail;
+ WHERE char *Shell;
++ WHERE char *SidebarDelim;
+ WHERE char *Signature;
+ WHERE char *SimpleSearch;
+ #if USE_SMTP
+***************
+*** 205,210 ****
+--- 206,214 ----
+ WHERE short ScoreThresholdRead;
+ WHERE short ScoreThresholdFlag;
+
++ WHERE struct buffy_t *CurBuffy INITVAL(0);
++ WHERE short DrawFullLine INITVAL(0);
++ WHERE short SidebarWidth;
+ #ifdef USE_IMAP
+ WHERE short ImapKeepalive;
+ WHERE short ImapPipelineDepth;
+*** mutt-1.5.19-orig/init.h 2009-01-05 13:20:53.000000000 -0600
+--- mutt-1.5.19-patched/init.h 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 1572,1577 ****
+--- 1572,1593 ----
+ ** you may \fIunset\fP this setting.
+ ** (Crypto only)
+ */
++ {"sidebar_delim", DT_STR, R_BOTH, UL &SidebarDelim, "|"},
++ /*
++ ** .pp
++ ** This specifies the delimiter between the sidebar (if visible) and
++ ** other screens.
++ */
++ { "sidebar_visible", DT_BOOL, R_BOTH, OPTSIDEBAR, 0 },
++ /*
++ ** .pp
++ ** This specifies whether or not to show sidebar (left-side list of folders).
++ */
++ { "sidebar_width", DT_NUM, R_BOTH, UL &SidebarWidth, 0 },
++ /*
++ ** .pp
++ ** The width of the sidebar.
++ */
+ { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
+ /*
+ ** .pp
+*** mutt-1.5.19-orig/mailbox.h 2008-03-19 15:07:06.000000000 -0500
+--- mutt-1.5.19-patched/mailbox.h 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 27,32 ****
+--- 27,33 ----
+ #define M_NEWFOLDER (1<<4) /* create a new folder - same as M_APPEND, but uses
+ * safe_fopen() for mbox-style folders.
+ */
++ #define M_PEEK (1<<5) /* revert atime back after taking a look (if applicable) */
+
+ /* mx_open_new_message() */
+ #define M_ADD_FROM 1 /* add a From_ line */
+*** mutt-1.5.19-orig/Makefile.am 2009-01-05 13:20:53.000000000 -0600
+--- mutt-1.5.19-patched/Makefile.am 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 29,35 ****
+ score.c send.c sendlib.c signal.c sort.c \
+ status.c system.c thread.c charset.c history.c lib.c \
+ muttlib.c editmsg.c mbyte.c \
+! url.c ascii.c crypt-mod.c crypt-mod.h
+
+ nodist_mutt_SOURCES = $(BUILT_SOURCES)
+
+--- 29,36 ----
+ score.c send.c sendlib.c signal.c sort.c \
+ status.c system.c thread.c charset.c history.c lib.c \
+ muttlib.c editmsg.c mbyte.c \
+! url.c ascii.c crypt-mod.c crypt-mod.h \
+! sidebar.c
+
+ nodist_mutt_SOURCES = $(BUILT_SOURCES)
+
+*** mutt-1.5.19-orig/Makefile.in 2009-01-05 13:24:13.000000000 -0600
+--- mutt-1.5.19-patched/Makefile.in 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 83,89 ****
+ system.$(OBJEXT) thread.$(OBJEXT) charset.$(OBJEXT) \
+ history.$(OBJEXT) lib.$(OBJEXT) muttlib.$(OBJEXT) \
+ editmsg.$(OBJEXT) mbyte.$(OBJEXT) url.$(OBJEXT) \
+! ascii.$(OBJEXT) crypt-mod.$(OBJEXT)
+ am__objects_1 = patchlist.$(OBJEXT)
+ nodist_mutt_OBJECTS = $(am__objects_1)
+ mutt_OBJECTS = $(am_mutt_OBJECTS) $(nodist_mutt_OBJECTS)
+--- 83,90 ----
+ system.$(OBJEXT) thread.$(OBJEXT) charset.$(OBJEXT) \
+ history.$(OBJEXT) lib.$(OBJEXT) muttlib.$(OBJEXT) \
+ editmsg.$(OBJEXT) mbyte.$(OBJEXT) url.$(OBJEXT) \
+! ascii.$(OBJEXT) crypt-mod.$(OBJEXT) \
+! sidebar.$(OBJEXT)
+ am__objects_1 = patchlist.$(OBJEXT)
+ nodist_mutt_OBJECTS = $(am__objects_1)
+ mutt_OBJECTS = $(am_mutt_OBJECTS) $(nodist_mutt_OBJECTS)
+***************
+*** 307,313 ****
+ score.c send.c sendlib.c signal.c sort.c \
+ status.c system.c thread.c charset.c history.c lib.c \
+ muttlib.c editmsg.c mbyte.c \
+! url.c ascii.c crypt-mod.c crypt-mod.h
+
+ nodist_mutt_SOURCES = $(BUILT_SOURCES)
+ mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \
+--- 308,315 ----
+ score.c send.c sendlib.c signal.c sort.c \
+ status.c system.c thread.c charset.c history.c lib.c \
+ muttlib.c editmsg.c mbyte.c \
+! url.c ascii.c crypt-mod.c crypt-mod.h \
+! sidebar.c
+
+ nodist_mutt_SOURCES = $(BUILT_SOURCES)
+ mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \
+***************
+*** 339,345 ****
+ README.SSL smime.h \
+ muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \
+ ChangeLog mkchangelog.sh mutt_idna.h \
+! snprintf.c regex.c crypt-gpgme.h hcachever.sh.in
+
+ EXTRA_SCRIPTS = smime_keys
+ mutt_dotlock_SOURCES = mutt_dotlock.c
+--- 341,347 ----
+ README.SSL smime.h \
+ muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \
+ ChangeLog mkchangelog.sh mutt_idna.h \
+! snprintf.c regex.c crypt-gpgme.h sidebar.h hcachever.sh.in
+
+ EXTRA_SCRIPTS = smime_keys
+ mutt_dotlock_SOURCES = mutt_dotlock.c
+*** mutt-1.5.19-orig/mbox.c 2008-08-15 13:30:12.000000000 -0500
+--- mutt-1.5.19-patched/mbox.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 100,105 ****
+--- 100,106 ----
+ mutt_perror (ctx->path);
+ return (-1);
+ }
++ ctx->atime = sb.st_atime;
+ ctx->mtime = sb.st_mtime;
+ ctx->size = sb.st_size;
+
+***************
+*** 255,260 ****
+--- 256,262 ----
+
+ ctx->size = sb.st_size;
+ ctx->mtime = sb.st_mtime;
++ ctx->atime = sb.st_atime;
+
+ #ifdef NFS_ATTRIBUTE_HACK
+ if (sb.st_mtime > sb.st_atime)
+*** mutt-1.5.19-orig/menu.c 2009-01-05 13:20:53.000000000 -0600
+--- mutt-1.5.19-patched/menu.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 24,29 ****
+--- 24,30 ----
+ #include "mutt_curses.h"
+ #include "mutt_menu.h"
+ #include "mbyte.h"
++ #include "sidebar.h"
+
+ #include <string.h>
+ #include <stdlib.h>
+***************
+*** 156,162 ****
+ {
+ char *scratch = safe_strdup (s);
+ int shift = option (OPTARROWCURSOR) ? 3 : 0;
+! int cols = COLS - shift;
+
+ mutt_format_string (s, n, cols, cols, FMT_LEFT, ' ', scratch, mutt_strlen (scratch), 1);
+ s[n - 1] = 0;
+--- 157,163 ----
+ {
+ char *scratch = safe_strdup (s);
+ int shift = option (OPTARROWCURSOR) ? 3 : 0;
+! int cols = COLS - shift - SidebarWidth;
+
+ mutt_format_string (s, n, cols, cols, FMT_LEFT, ' ', scratch, mutt_strlen (scratch), 1);
+ s[n - 1] = 0;
+***************
+*** 207,212 ****
+--- 208,214 ----
+ char buf[LONG_STRING];
+ int i;
+
++ draw_sidebar(1);
+ for (i = menu->top; i < menu->top + menu->pagelen; i++)
+ {
+ if (i < menu->max)
+***************
+*** 217,223 ****
+ if (option (OPTARROWCURSOR))
+ {
+ attrset (menu->color (i));
+! CLEARLINE (i - menu->top + menu->offset);
+
+ if (i == menu->current)
+ {
+--- 219,225 ----
+ if (option (OPTARROWCURSOR))
+ {
+ attrset (menu->color (i));
+! CLEARLINE_WIN (i - menu->top + menu->offset);
+
+ if (i == menu->current)
+ {
+***************
+*** 246,259 ****
+ BKGDSET (MT_COLOR_INDICATOR);
+ }
+
+! CLEARLINE (i - menu->top + menu->offset);
+ print_enriched_string (menu->color(i), (unsigned char *) buf, i != menu->current);
+ SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
+ }
+ }
+ else
+! CLEARLINE (i - menu->top + menu->offset);
+ }
+ menu->redraw = 0;
+ }
+--- 248,261 ----
+ BKGDSET (MT_COLOR_INDICATOR);
+ }
+
+! CLEARLINE_WIN (i - menu->top + menu->offset);
+ print_enriched_string (menu->color(i), (unsigned char *) buf, i != menu->current);
+ SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
+ }
+ }
+ else
+! CLEARLINE_WIN (i - menu->top + menu->offset);
+ }
+ menu->redraw = 0;
+ }
+***************
+*** 268,274 ****
+ return;
+ }
+
+! move (menu->oldcurrent + menu->offset - menu->top, 0);
+ SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
+
+--- 270,276 ----
+ return;
+ }
+
+! move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth);
+ SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
+
+***************
+*** 283,295 ****
+ clrtoeol ();
+ menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
+ menu_pad_string (buf, sizeof (buf));
+! move (menu->oldcurrent + menu->offset - menu->top, 3);
+ print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
+ SETCOLOR (MT_COLOR_NORMAL);
+ }
+
+ /* now draw it in the new location */
+! move (menu->current + menu->offset - menu->top, 0);
+ attrset (menu->color (menu->current));
+ ADDCOLOR (MT_COLOR_INDICATOR);
+ addstr ("->");
+--- 285,297 ----
+ clrtoeol ();
+ menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
+ menu_pad_string (buf, sizeof (buf));
+! move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth + 3);
+ print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
+ SETCOLOR (MT_COLOR_NORMAL);
+ }
+
+ /* now draw it in the new location */
+! move (menu->current + menu->offset - menu->top, SidebarWidth);
+ attrset (menu->color (menu->current));
+ ADDCOLOR (MT_COLOR_INDICATOR);
+ addstr ("->");
+***************
+*** 310,316 ****
+ attrset (menu->color (menu->current));
+ ADDCOLOR (MT_COLOR_INDICATOR);
+ BKGDSET (MT_COLOR_INDICATOR);
+! CLEARLINE (menu->current - menu->top + menu->offset);
+ print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
+ SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
+--- 312,318 ----
+ attrset (menu->color (menu->current));
+ ADDCOLOR (MT_COLOR_INDICATOR);
+ BKGDSET (MT_COLOR_INDICATOR);
+! CLEARLINE_WIN (menu->current - menu->top + menu->offset);
+ print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
+ SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
+***************
+*** 322,328 ****
+ {
+ char buf[LONG_STRING];
+
+! move (menu->current + menu->offset - menu->top, 0);
+ menu_make_entry (buf, sizeof (buf), menu, menu->current);
+ menu_pad_string (buf, sizeof (buf));
+
+--- 324,330 ----
+ {
+ char buf[LONG_STRING];
+
+! move (menu->current + menu->offset - menu->top, SidebarWidth);
+ menu_make_entry (buf, sizeof (buf), menu, menu->current);
+ menu_pad_string (buf, sizeof (buf));
+
+***************
+*** 882,888 ****
+
+
+ if (option (OPTARROWCURSOR))
+! move (menu->current - menu->top + menu->offset, 2);
+ else if (option (OPTBRAILLEFRIENDLY))
+ move (menu->current - menu->top + menu->offset, 0);
+ else
+--- 884,890 ----
+
+
+ if (option (OPTARROWCURSOR))
+! move (menu->current - menu->top + menu->offset, SidebarWidth + 2);
+ else if (option (OPTBRAILLEFRIENDLY))
+ move (menu->current - menu->top + menu->offset, 0);
+ else
+*** mutt-1.5.19-orig/mutt_curses.h 2008-03-19 15:07:57.000000000 -0500
+--- mutt-1.5.19-patched/mutt_curses.h 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 64,69 ****
+--- 64,70 ----
+ #undef lines
+ #endif /* lines */
+
++ #define CLEARLINE_WIN(x) move(x,SidebarWidth), clrtoeol()
+ #define CLEARLINE(x) move(x,0), clrtoeol()
+ #define CENTERLINE(x,y) move(y, (COLS-strlen(x))/2), addstr(x)
+ #define BEEP() do { if (option (OPTBEEP)) beep(); } while (0)
+***************
+*** 126,131 ****
+--- 127,134 ----
+ MT_COLOR_BOLD,
+ MT_COLOR_UNDERLINE,
+ MT_COLOR_INDEX,
++ MT_COLOR_NEW,
++ MT_COLOR_FLAGGED,
+ MT_COLOR_MAX
+ };
+
+*** mutt-1.5.19-orig/mutt.h 2008-09-25 17:00:03.000000000 -0500
+--- mutt-1.5.19-patched/mutt.h 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 409,414 ****
+--- 409,415 ----
+ OPTSAVEEMPTY,
+ OPTSAVENAME,
+ OPTSCORE,
++ OPTSIDEBAR,
+ OPTSIGDASHES,
+ OPTSIGONTOP,
+ OPTSORTRE,
+***************
+*** 843,848 ****
+--- 844,850 ----
+ {
+ char *path;
+ FILE *fp;
++ time_t atime;
+ time_t mtime;
+ off_t size;
+ off_t vsize;
+***************
+*** 877,882 ****
+--- 879,885 ----
+ unsigned int quiet : 1; /* inhibit status messages? */
+ unsigned int collapsed : 1; /* are all threads collapsed? */
+ unsigned int closing : 1; /* mailbox is being closed */
++ unsigned int peekonly : 1; /* just taking a glance, revert atime */
+
+ /* driver hooks */
+ void *data; /* driver specific data */
+*** mutt-1.5.19-orig/muttlib.c 2009-01-05 13:20:53.000000000 -0600
+--- mutt-1.5.19-patched/muttlib.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 1217,1222 ****
+--- 1217,1224 ----
+ pl = pw = 1;
+
+ /* see if there's room to add content, else ignore */
++ if ( DrawFullLine )
++ {
+ if ((col < COLS && wlen < destlen) || soft)
+ {
+ int pad;
+***************
+*** 1259,1264 ****
+--- 1261,1312 ----
+ col += wid;
+ src += pl;
+ }
++ }
++ else
++ {
++ if ((col < COLS-SidebarWidth && wlen < destlen) || soft)
++ {
++ int pad;
++
++ /* get contents after padding */
++ mutt_FormatString (buf, sizeof (buf), 0, src + pl, callback, data, flags);
++ len = mutt_strlen (buf);
++ wid = mutt_strwidth (buf);
++
++ /* try to consume as many columns as we can, if we don't have
++ * memory for that, use as much memory as possible */
++ pad = (COLS - SidebarWidth - col - wid) / pw;
++ if (pad > 0 && wlen + (pad * pl) + len > destlen)
++ pad = ((signed)(destlen - wlen - len)) / pl;
++ if (pad > 0)
++ {
++ while (pad--)
++ {
++ memcpy (wptr, src, pl);
++ wptr += pl;
++ wlen += pl;
++ col += pw;
++ }
++ }
++ else if (soft && pad < 0)
++ {
++ /* \0-terminate dest for length computation in mutt_wstr_trunc() */
++ *wptr = 0;
++ /* make sure right part is at most as wide as display */
++ len = mutt_wstr_trunc (buf, destlen, COLS, &wid);
++ /* truncate left so that right part fits completely in */
++ wlen = mutt_wstr_trunc (dest, destlen - len, col + pad, &col);
++ wptr = dest + wlen;
++ }
++ if (len + wlen > destlen)
++ len = mutt_wstr_trunc (buf, destlen - wlen, COLS - SidebarWidth - col, NULL);
++ memcpy (wptr, buf, len);
++ wptr += len;
++ wlen += len;
++ col += wid;
++ src += pl;
++ }
++ }
+ break; /* skip rest of input */
+ }
+ else if (ch == '|')
+*** mutt-1.5.19-orig/mx.c 2009-01-05 13:20:53.000000000 -0600
+--- mutt-1.5.19-patched/mx.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 611,616 ****
+--- 611,617 ----
+ * M_APPEND open mailbox for appending
+ * M_READONLY open mailbox in read-only mode
+ * M_QUIET only print error messages
++ * M_PEEK revert atime where applicable
+ * ctx if non-null, context struct to use
+ */
+ CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT *pctx)
+***************
+*** 633,638 ****
+--- 634,641 ----
+ ctx->quiet = 1;
+ if (flags & M_READONLY)
+ ctx->readonly = 1;
++ if (flags & M_PEEK)
++ ctx->peekonly = 1;
+
+ if (flags & (M_APPEND|M_NEWFOLDER))
+ {
+***************
+*** 732,740 ****
+--- 735,755 ----
+ void mx_fastclose_mailbox (CONTEXT *ctx)
+ {
+ int i;
++ #ifndef BUFFY_SIZE
++ struct utimbuf ut;
++ #endif
+
+ if(!ctx)
+ return;
++ #ifndef BUFFY_SIZE
++ /* fix up the times so buffy won't get confused */
++ if (ctx->peekonly && ctx->path && ctx->mtime > ctx->atime)
++ {
++ ut.actime = ctx->atime;
++ ut.modtime = ctx->mtime;
++ utime (ctx->path, &ut);
++ }
++ #endif
+
+ if (ctx->mx_close)
+ ctx->mx_close (ctx);
+*** mutt-1.5.19-orig/OPS 2008-03-19 15:07:57.000000000 -0500
+--- mutt-1.5.19-patched/OPS 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 178,180 ****
+--- 178,185 ----
+ OP_MAIN_SHOW_LIMIT "show currently active limit pattern"
+ OP_MAIN_COLLAPSE_THREAD "collapse/uncollapse current thread"
+ OP_MAIN_COLLAPSE_ALL "collapse/uncollapse all threads"
++ OP_SIDEBAR_SCROLL_UP "scroll the mailbox pane up 1 page"
++ OP_SIDEBAR_SCROLL_DOWN "scroll the mailbox pane down 1 page"
++ OP_SIDEBAR_NEXT "go down to next mailbox"
++ OP_SIDEBAR_PREV "go to previous mailbox"
++ OP_SIDEBAR_OPEN "open hilighted mailbox"
+*** mutt-1.5.19-orig/pager.c 2009-01-05 13:20:53.000000000 -0600
+--- mutt-1.5.19-patched/pager.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 29,34 ****
+--- 29,35 ----
+ #include "pager.h"
+ #include "attach.h"
+ #include "mbyte.h"
++ #include "sidebar.h"
+
+ #include "mutt_crypt.h"
+
+***************
+*** 1060,1065 ****
+--- 1061,1068 ----
+ mbstate_t mbstate;
+
+ int wrap_cols = mutt_term_width ((flags & M_PAGER_NOWRAP) ? 0 : Wrap);
++
++ wrap_cols -= SidebarWidth;
+
+ /* FIXME: this should come from lineInfo */
+ memset(&mbstate, 0, sizeof(mbstate));
+***************
+*** 1694,1700 ****
+ if ((redraw & REDRAW_BODY) || topline != oldtopline)
+ {
+ do {
+! move (bodyoffset, 0);
+ curline = oldtopline = topline;
+ lines = 0;
+ force_redraw = 0;
+--- 1697,1703 ----
+ if ((redraw & REDRAW_BODY) || topline != oldtopline)
+ {
+ do {
+! move (bodyoffset, SidebarWidth);
+ curline = oldtopline = topline;
+ lines = 0;
+ force_redraw = 0;
+***************
+*** 1707,1712 ****
+--- 1710,1716 ----
+ &QuoteList, &q_level, &force_redraw, &SearchRE) > 0)
+ lines++;
+ curline++;
++ move(lines + bodyoffset, SidebarWidth);
+ }
+ last_offset = lineInfo[curline].offset;
+ } while (force_redraw);
+***************
+*** 1720,1725 ****
+--- 1724,1730 ----
+ addch ('~');
+ addch ('\n');
+ lines++;
++ move(lines + bodyoffset, SidebarWidth);
+ }
+ /* We are going to update the pager status bar, so it isn't
+ * necessary to reset to normal color now. */
+***************
+*** 1743,1764 ****
+ /* print out the pager status bar */
+ SETCOLOR (MT_COLOR_STATUS);
+ BKGDSET (MT_COLOR_STATUS);
+! CLEARLINE (statusoffset);
+ if (IsHeader (extra))
+ {
+! size_t l1 = COLS * MB_LEN_MAX;
+ size_t l2 = sizeof (buffer);
+ hfi.hdr = extra->hdr;
+ mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT);
+ }
+ else if (IsMsgAttach (extra))
+ {
+! size_t l1 = COLS * MB_LEN_MAX;
+ size_t l2 = sizeof (buffer);
+ hfi.hdr = extra->bdy->hdr;
+ mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT);
+ }
+! mutt_paddstr (COLS, IsHeader (extra) || IsMsgAttach (extra) ? buffer : banner);
+ BKGDSET (MT_COLOR_NORMAL);
+ SETCOLOR (MT_COLOR_NORMAL);
+ }
+--- 1748,1769 ----
+ /* print out the pager status bar */
+ SETCOLOR (MT_COLOR_STATUS);
+ BKGDSET (MT_COLOR_STATUS);
+! CLEARLINE_WIN (statusoffset);
+ if (IsHeader (extra))
+ {
+! size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX;
+ size_t l2 = sizeof (buffer);
+ hfi.hdr = extra->hdr;
+ mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT);
+ }
+ else if (IsMsgAttach (extra))
+ {
+! size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX;
+ size_t l2 = sizeof (buffer);
+ hfi.hdr = extra->bdy->hdr;
+ mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT);
+ }
+! mutt_paddstr (COLS-SidebarWidth, IsHeader (extra) || IsMsgAttach (extra) ? buffer : banner);
+ BKGDSET (MT_COLOR_NORMAL);
+ SETCOLOR (MT_COLOR_NORMAL);
+ }
+***************
+*** 1768,1785 ****
+ /* redraw the pager_index indicator, because the
+ * flags for this message might have changed. */
+ menu_redraw_current (index);
+
+ /* print out the index status bar */
+ menu_status_line (buffer, sizeof (buffer), index, NONULL(Status));
+
+! move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), 0);
+ SETCOLOR (MT_COLOR_STATUS);
+ BKGDSET (MT_COLOR_STATUS);
+! mutt_paddstr (COLS, buffer);
+ SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
+ }
+
+ redraw = 0;
+
+ if (option(OPTBRAILLEFRIENDLY)) {
+--- 1773,1795 ----
+ /* redraw the pager_index indicator, because the
+ * flags for this message might have changed. */
+ menu_redraw_current (index);
++ draw_sidebar(MENU_PAGER);
+
+ /* print out the index status bar */
+ menu_status_line (buffer, sizeof (buffer), index, NONULL(Status));
+
+! move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), SidebarWidth);
+ SETCOLOR (MT_COLOR_STATUS);
+ BKGDSET (MT_COLOR_STATUS);
+! mutt_paddstr (COLS-SidebarWidth, buffer);
+ SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
+ }
+
++ /* if we're not using the index, update every time */
++ if ( index == 0 )
++ draw_sidebar(MENU_PAGER);
++
+ redraw = 0;
+
+ if (option(OPTBRAILLEFRIENDLY)) {
+***************
+*** 2671,2676 ****
+--- 2681,2693 ----
+ mutt_what_key ();
+ break;
+
++ case OP_SIDEBAR_SCROLL_UP:
++ case OP_SIDEBAR_SCROLL_DOWN:
++ case OP_SIDEBAR_NEXT:
++ case OP_SIDEBAR_PREV:
++ scroll_sidebar(ch, MENU_PAGER);
++ break;
++
+ default:
+ ch = -1;
+ break;
+*** mutt-1.5.19-orig/PATCHES 2008-03-19 15:07:06.000000000 -0500
+--- mutt-1.5.19-patched/PATCHES 2009-05-22 08:45:39.000000000 -0500
+***************
+*** 0 ****
+--- 1 ----
++ patch-1.5.19.sidebar.20090522.txt
+*** mutt-1.5.19-orig/sidebar.c 1969-12-31 18:00:00.000000000 -0600
+--- mutt-1.5.19-patched/sidebar.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 0 ****
+--- 1,333 ----
++ /*
++ * Copyright (C) ????-2004 Justin Hibbits <jrh29@po.cwru.edu>
++ * Copyright (C) 2004 Thomer M. Gil <mutt@thomer.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, USA.
++ */
++
++
++ #if HAVE_CONFIG_H
++ # include "config.h"
++ #endif
++
++ #include "mutt.h"
++ #include "mutt_menu.h"
++ #include "mutt_curses.h"
++ #include "sidebar.h"
++ #include "buffy.h"
++ #include <libgen.h>
++ #include "keymap.h"
++ #include <stdbool.h>
++
++ /*BUFFY *CurBuffy = 0;*/
++ static BUFFY *TopBuffy = 0;
++ static BUFFY *BottomBuffy = 0;
++ static int known_lines = 0;
++
++ static int quick_log10(int n)
++ {
++ char string[32];
++ sprintf(string, "%d", n);
++ return strlen(string);
++ }
++
++ void calc_boundaries (int menu)
++ {
++ BUFFY *tmp = Incoming;
++
++ if ( known_lines != LINES ) {
++ TopBuffy = BottomBuffy = 0;
++ known_lines = LINES;
++ }
++ for ( ; tmp->next != 0; tmp = tmp->next )
++ tmp->next->prev = tmp;
++
++ if ( TopBuffy == 0 && BottomBuffy == 0 )
++ TopBuffy = Incoming;
++ if ( BottomBuffy == 0 ) {
++ int count = LINES - 2 - (menu != MENU_PAGER || option(OPTSTATUSONTOP));
++ BottomBuffy = TopBuffy;
++ while ( --count && BottomBuffy->next )
++ BottomBuffy = BottomBuffy->next;
++ }
++ else if ( TopBuffy == CurBuffy->next ) {
++ int count = LINES - 2 - (menu != MENU_PAGER);
++ BottomBuffy = CurBuffy;
++ tmp = BottomBuffy;
++ while ( --count && tmp->prev)
++ tmp = tmp->prev;
++ TopBuffy = tmp;
++ }
++ else if ( BottomBuffy == CurBuffy->prev ) {
++ int count = LINES - 2 - (menu != MENU_PAGER);
++ TopBuffy = CurBuffy;
++ tmp = TopBuffy;
++ while ( --count && tmp->next )
++ tmp = tmp->next;
++ BottomBuffy = tmp;
++ }
++ }
++
++ char *make_sidebar_entry(char *box, int size, int new, int flagged)
++ {
++ static char *entry = 0;
++ char *c;
++ int i = 0;
++ int delim_len = strlen(SidebarDelim);
++
++ c = realloc(entry, SidebarWidth - delim_len + 2);
++ if ( c ) entry = c;
++ entry[SidebarWidth - delim_len + 1] = 0;
++ for (; i < SidebarWidth - delim_len + 1; entry[i++] = ' ' );
++ i = strlen(box);
++ strncpy( entry, box, i < (SidebarWidth - delim_len + 1) ? i : (SidebarWidth - delim_len + 1) );
++
++ if (size == -1)
++ sprintf(entry + SidebarWidth - delim_len - 3, "?");
++ else if ( new ) {
++ if (flagged > 0) {
++ sprintf(
++ entry + SidebarWidth - delim_len - 5 - quick_log10(size) - quick_log10(new) - quick_log10(flagged),
++ "% d(%d)[%d]", size, new, flagged);
++ } else {
++ sprintf(
++ entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(new),
++ "% d(%d)", size, new);
++ }
++ } else if (flagged > 0) {
++ sprintf( entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(flagged), "% d[%d]", size, flagged);
++ } else {
++ sprintf( entry + SidebarWidth - delim_len - 1 - quick_log10(size), "% d", size);
++ }
++ return entry;
++ }
++
++ void set_curbuffy(char buf[LONG_STRING])
++ {
++ BUFFY* tmp = CurBuffy = Incoming;
++
++ if (!Incoming)
++ return;
++
++ while(1) {
++ if(!strcmp(tmp->path, buf)) {
++ CurBuffy = tmp;
++ break;
++ }
++
++ if(tmp->next)
++ tmp = tmp->next;
++ else
++ break;
++ }
++ }
++
++ int draw_sidebar(int menu) {
++
++ int lines = option(OPTHELP) ? 1 : 0;
++ BUFFY *tmp;
++ #ifndef USE_SLANG_CURSES
++ attr_t attrs;
++ #endif
++ short delim_len = strlen(SidebarDelim);
++ short color_pair;
++
++ static bool initialized = false;
++ static int prev_show_value;
++ static short saveSidebarWidth;
++
++ /* initialize first time */
++ if(!initialized) {
++ prev_show_value = option(OPTSIDEBAR);
++ saveSidebarWidth = SidebarWidth;
++ if(!option(OPTSIDEBAR)) SidebarWidth = 0;
++ initialized = true;
++ }
++
++ /* save or restore the value SidebarWidth */
++ if(prev_show_value != option(OPTSIDEBAR)) {
++ if(prev_show_value && !option(OPTSIDEBAR)) {
++ saveSidebarWidth = SidebarWidth;
++ SidebarWidth = 0;
++ } else if(!prev_show_value && option(OPTSIDEBAR)) {
++ SidebarWidth = saveSidebarWidth;
++ }
++ prev_show_value = option(OPTSIDEBAR);
++ }
++
++
++ // if ( SidebarWidth == 0 ) return 0;
++ if (SidebarWidth > 0 && option (OPTSIDEBAR)
++ && delim_len >= SidebarWidth) {
++ unset_option (OPTSIDEBAR);
++ /* saveSidebarWidth = SidebarWidth; */
++ if (saveSidebarWidth > delim_len) {
++ SidebarWidth = saveSidebarWidth;
++ mutt_error (_("Value for sidebar_delim is too long. Disabling sidebar."));
++ sleep (2);
++ } else {
++ SidebarWidth = 0;
++ mutt_error (_("Value for sidebar_delim is too long. Disabling sidebar. Please set your sidebar_width to a sane value."));
++ sleep (4); /* the advise to set a sane value should be seen long enough */
++ }
++ saveSidebarWidth = 0;
++ return (0);
++ }
++
++ if ( SidebarWidth == 0 || !option(OPTSIDEBAR)) {
++ if (SidebarWidth > 0) {
++ saveSidebarWidth = SidebarWidth;
++ SidebarWidth = 0;
++ }
++ unset_option(OPTSIDEBAR);
++ return 0;
++ }
++
++ /* get attributes for divider */
++ SETCOLOR(MT_COLOR_STATUS);
++ #ifndef USE_SLANG_CURSES
++ attr_get(&attrs, &color_pair, 0);
++ #else
++ color_pair = attr_get();
++ #endif
++ SETCOLOR(MT_COLOR_NORMAL);
++
++ /* draw the divider */
++
++ for ( ; lines < LINES-1-(menu != MENU_PAGER || option(OPTSTATUSONTOP)); lines++ ) {
++ move(lines, SidebarWidth - delim_len);
++ addstr(NONULL(SidebarDelim));
++ #ifndef USE_SLANG_CURSES
++ mvchgat(lines, SidebarWidth - delim_len, delim_len, 0, color_pair, NULL);
++ #endif
++ }
++
++ if ( Incoming == 0 ) return 0;
++ lines = option(OPTHELP) ? 1 : 0; /* go back to the top */
++
++ if ( known_lines != LINES || TopBuffy == 0 || BottomBuffy == 0 )
++ calc_boundaries(menu);
++ if ( CurBuffy == 0 ) CurBuffy = Incoming;
++
++ tmp = TopBuffy;
++
++ SETCOLOR(MT_COLOR_NORMAL);
++
++ for ( ; tmp && lines < LINES-1 - (menu != MENU_PAGER || option(OPTSTATUSONTOP)); tmp = tmp->next ) {
++ if ( tmp == CurBuffy )
++ SETCOLOR(MT_COLOR_INDICATOR);
++ else if ( tmp->msg_unread > 0 )
++ SETCOLOR(MT_COLOR_NEW);
++ else if ( tmp->msg_flagged > 0 )
++ SETCOLOR(MT_COLOR_FLAGGED);
++ else
++ SETCOLOR(MT_COLOR_NORMAL);
++
++ move( lines, 0 );
++ if ( Context && !strcmp( tmp->path, Context->path ) ) {
++ tmp->msg_unread = Context->unread;
++ tmp->msgcount = Context->msgcount;
++ tmp->msg_flagged = Context->flagged;
++ }
++ // check whether Maildir is a prefix of the current folder's path
++ short maildir_is_prefix = 0;
++ if ( (strlen(tmp->path) > strlen(Maildir)) &&
++ (strncmp(Maildir, tmp->path, strlen(Maildir)) == 0) )
++ maildir_is_prefix = 1;
++ // calculate depth of current folder and generate its display name with indented spaces
++ int sidebar_folder_depth = 0;
++ char *sidebar_folder_name;
++ sidebar_folder_name = basename(tmp->path);
++ if ( maildir_is_prefix ) {
++ char *tmp_folder_name;
++ int i;
++ tmp_folder_name = tmp->path + strlen(Maildir);
++ for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) {
++ if (tmp_folder_name[i] == '/') sidebar_folder_depth++;
++ }
++ if (sidebar_folder_depth > 0) {
++ sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1);
++ for (i=0; i < sidebar_folder_depth; i++)
++ sidebar_folder_name[i]=' ';
++ sidebar_folder_name[i]=0;
++ strncat(sidebar_folder_name, basename(tmp->path), strlen(basename(tmp->path)) + sidebar_folder_depth);
++ }
++ }
++ printw( "%.*s", SidebarWidth - delim_len + 1,
++ make_sidebar_entry(sidebar_folder_name, tmp->msgcount,
++ tmp->msg_unread, tmp->msg_flagged));
++ if (sidebar_folder_depth > 0)
++ free(sidebar_folder_name);
++ lines++;
++ }
++ SETCOLOR(MT_COLOR_NORMAL);
++ for ( ; lines < LINES-1 - (menu != MENU_PAGER || option(OPTSTATUSONTOP)); lines++ ) {
++ int i = 0;
++ move( lines, 0 );
++ for ( ; i < SidebarWidth - delim_len; i++ )
++ addch(' ');
++ }
++ return 0;
++ }
++
++
++ void set_buffystats(CONTEXT* Context)
++ {
++ BUFFY *tmp = Incoming;
++ while(tmp) {
++ if(Context && !strcmp(tmp->path, Context->path)) {
++ tmp->msg_unread = Context->unread;
++ tmp->msgcount = Context->msgcount;
++ break;
++ }
++ tmp = tmp->next;
++ }
++ }
++
++ void scroll_sidebar(int op, int menu)
++ {
++ if(!SidebarWidth) return;
++ if(!CurBuffy) return;
++
++ switch (op) {
++ case OP_SIDEBAR_NEXT:
++ if ( CurBuffy->next == NULL ) return;
++ CurBuffy = CurBuffy->next;
++ break;
++ case OP_SIDEBAR_PREV:
++ if ( CurBuffy->prev == NULL ) return;
++ CurBuffy = CurBuffy->prev;
++ break;
++ case OP_SIDEBAR_SCROLL_UP:
++ CurBuffy = TopBuffy;
++ if ( CurBuffy != Incoming ) {
++ calc_boundaries(menu);
++ CurBuffy = CurBuffy->prev;
++ }
++ break;
++ case OP_SIDEBAR_SCROLL_DOWN:
++ CurBuffy = BottomBuffy;
++ if ( CurBuffy->next ) {
++ calc_boundaries(menu);
++ CurBuffy = CurBuffy->next;
++ }
++ break;
++ default:
++ return;
++ }
++ calc_boundaries(menu);
++ draw_sidebar(menu);
++ }
++
+*** mutt-1.5.19-orig/sidebar.h 1969-12-31 18:00:00.000000000 -0600
+--- mutt-1.5.19-patched/sidebar.h 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 0 ****
+--- 1,36 ----
++ /*
++ * Copyright (C) ????-2004 Justin Hibbits <jrh29@po.cwru.edu>
++ * Copyright (C) 2004 Thomer M. Gil <mutt@thomer.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, USA.
++ */
++
++ #ifndef SIDEBAR_H
++ #define SIDEBAR_H
++
++ struct MBOX_LIST {
++ char *path;
++ int msgcount;
++ int new;
++ } MBLIST;
++
++ /* parameter is whether or not to go to the status line */
++ /* used for omitting the last | that covers up the status bar in the index */
++ int draw_sidebar(int);
++ void scroll_sidebar(int, int);
++ void set_curbuffy(char*);
++ void set_buffystats(CONTEXT*);
++
++ #endif /* SIDEBAR_H */
+*** mutt-1.5.19-orig/doc/Muttrc 2009-01-05 18:36:17.000000000 -0600
+--- mutt-1.5.19-patched/doc/Muttrc 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 2167,2172 ****
+--- 2167,2192 ----
+ # function.
+ #
+ #
++ # set sidebar_visible=no
++ #
++ # Name: sidebar_visible
++ # Type: boolean
++ # Default: no
++ #
++ #
++ # This specifies whether or not to show sidebar (left-side list of folders).
++ #
++ #
++ # set sidebar_width=0
++ #
++ # Name: sidebar_width
++ # Type: number
++ # Default: 0
++ #
++ #
++ # The width of the sidebar.
++ #
++ #
+ # set crypt_autosign=no
+ #
+ # Name: crypt_autosign
+*** mutt-1.5.19-orig/imap/imap.c 2009-01-05 17:50:39.000000000 -0600
+--- mutt-1.5.19-patched/imap/imap.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 1513,1519 ****
+
+ imap_munge_mbox_name (munged, sizeof (munged), name);
+ snprintf (command, sizeof (command),
+! "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT)", munged);
+
+ if (imap_exec (idata, command, IMAP_CMD_QUEUE) < 0)
+ {
+--- 1513,1519 ----
+
+ imap_munge_mbox_name (munged, sizeof (munged), name);
+ snprintf (command, sizeof (command),
+! "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT MESSAGES)", munged);
+
+ if (imap_exec (idata, command, IMAP_CMD_QUEUE) < 0)
+ {
+*** mutt-1.5.19-orig/imap/command.c 2009-01-05 17:57:30.000000000 -0600
+--- mutt-1.5.19-patched/imap/command.c 2009-05-21 23:08:38.000000000 -0500
+***************
+*** 1009,1014 ****
+--- 1009,1021 ----
+ opened */
+ status->uidnext = oldun;
+
++ /* Added to make the sidebar show the correct numbers */
++ if (status->messages)
++ {
++ inc->msgcount = status->messages;
++ inc->msg_unread = status->unseen;
++ }
++
+ FREE (&value);
+ return;
+ }
diff --git a/recipes/mutt/mutt_1.5.19.bb b/recipes/mutt/mutt_1.5.19.bb
new file mode 100644
index 0000000000..125e41b256
--- /dev/null
+++ b/recipes/mutt/mutt_1.5.19.bb
@@ -0,0 +1,25 @@
+SECTION = "console/network"
+DEPENDS = "ncurses gnutls gpgme"
+DESCRIPTION = "Mutt is a small but very powerful text-based \
+MIME mail client. It is highly configurable, and is well-suited \
+to the mail power user with advanced features like key \
+bindings, keyboard macros, mail threading, regular expression \
+searches, and a powerful pattern matching language for selecting \
+groups of messages."
+LICENSE = "GPL"
+PR = "r0"
+SRC_URI = "ftp://ftp.mutt.org/mutt/devel/mutt-${PV}.tar.gz \
+ file://patch-1.5.19.sidebar.20090522.txt;patch=1 \
+ file://makedoc.patch;patch=1"
+
+S = "${WORKDIR}/mutt-1.5.19"
+
+inherit autotools
+
+EXTRA_OECONF = "--enable-gpgme --with-curses=${STAGING_LIBDIR}/.. \
+ --enable-pop --enable-imap --with-gnutls --enable-nntp"
+
+do_compile_prepend () {
+ ${BUILD_CC} doc/makedoc.c -o doc/makedoc
+}
+
diff --git a/recipes/mysql/mysql_4.1.22.bb b/recipes/mysql/mysql_4.1.22.bb
index 7f32b4ddee..09c52ecbc2 100644
--- a/recipes/mysql/mysql_4.1.22.bb
+++ b/recipes/mysql/mysql_4.1.22.bb
@@ -14,8 +14,6 @@ SRC_URI = "http://downloads.mysql.com/archives/mysql-4.1/mysql-${PV}.tar.gz \
S = "${WORKDIR}/mysql-${PV}"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/mysql-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
BINCONFIG_GLOB = "mysql_config"
inherit autotools binconfig update-rc.d
diff --git a/recipes/nautilus/nautilus_2.26.1.bb b/recipes/nautilus/nautilus_2.26.1.bb
index 8eb5c80ed9..e3a551c76f 100644
--- a/recipes/nautilus/nautilus_2.26.1.bb
+++ b/recipes/nautilus/nautilus_2.26.1.bb
@@ -12,7 +12,7 @@ export SYSROOT = "${STAGING_DIR_HOST}"
LICENSE="GPL"
-DEPENDS += " gvfs tracker librsvg libexif eel esound gnome-desktop orbit2-native"
+DEPENDS += "libunique gvfs tracker librsvg libexif eel esound gnome-desktop orbit2-native"
RDEPENDS = "gvfs gvfsd-ftp gvfsd-sftp gvfsd-trash"
EXTRA_OECONF = " --disable-gtk-doc --disable-update-mimedb "
diff --git a/recipes/nbench-byte/nbench-byte/nbench_32bits.patch b/recipes/nbench-byte/nbench-byte/nbench_32bits.patch
new file mode 100644
index 0000000000..fa33d60e41
--- /dev/null
+++ b/recipes/nbench-byte/nbench-byte/nbench_32bits.patch
@@ -0,0 +1,18 @@
+diff -Nur nbench-byte-2.2.3_orig/Makefile nbench-byte-2.2.3/Makefile
+--- nbench-byte-2.2.3_orig/Makefile 2004-12-30 03:23:30.000000000 +0100
++++ nbench-byte-2.2.3/Makefile 2008-10-06 18:38:46.000000000 +0200
+@@ -119,12 +119,8 @@
+ $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+ -c emfloat.c
+
+-pointer.h: pointer Makefile
+- $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+- -o pointer pointer.c
+- rm -f pointer.h
+- if [ "4" = `./pointer` ] ; then touch pointer.h ;\
+- else echo "#define LONG64" >pointer.h ; fi
++pointer.h: Makefile
++ touch pointer.h ;
+
+ misc.o: misc.h misc.c Makefile
+ $(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
diff --git a/recipes/nbench-byte/nbench-byte_2.2.3.bb b/recipes/nbench-byte/nbench-byte_2.2.3.bb
new file mode 100644
index 0000000000..76699ba4ab
--- /dev/null
+++ b/recipes/nbench-byte/nbench-byte_2.2.3.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "BYTE Magazine's native benchmarks (also called BYTEmark) \
+designed to expose the capabilities of a system's CPU, FPU, \
+and memory system."
+HOMEPAGE = "http://www.tux.org/~mayer/linux/"
+LICENSE = "freely distributable"
+SECTION = "console/utils"
+
+SRC_URI = "http://www.tux.org/~mayer/linux/${PN}-${PV}.tar.gz \
+ file://nbench_32bits.patch;patch=1"
+
+PR = "r1"
+
+TARGET_CC_ARCH += "${CFLAGS} ${LDFLAGS}"
+do_compile() {
+ oe_runmake
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -m 0644 NNET.DAT ${D}${bindir}/
+ install -m 0755 nbench ${D}${bindir}/
+}
diff --git a/recipes/netbase/netbase/mtx-1/interfaces b/recipes/netbase/netbase/mtx-1/interfaces
index a7c6da5752..ae50a5cec3 100644
--- a/recipes/netbase/netbase/mtx-1/interfaces
+++ b/recipes/netbase/netbase/mtx-1/interfaces
@@ -1,24 +1,34 @@
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
-# The loopback interface
+# the loopback interface
auto lo
iface lo inet loopback
-# Ethernet
+# ethernet
auto eth0
iface eth0 inet dhcp
+ alias conf 192.168.0.250
-# wlan interface 1 for clients
-auto wlan0
+# auto is not needed for the wlan interfaces
+# - hotplug will ifup the interfaces automatically
+
+# first wlan interface for clients
iface wlan0 inet static
address 10.0.0.1
netmask 255.0.0.0
wireless_mode master
wireless_essid cube-ap
wireless_channel 1
-
-# wlan interface 2 for mesh
-auto wlan1
+
+iface ath0 inet static
+ address 10.0.0.1
+ netmask 255.0.0.0
+ wireless_standard g
+ wireless_mode master
+ wireless_essid cube-ap
+ wireless_channel 1
+
+# second wlan interface for mesh
iface wlan1 inet static
address 172.16.0.1
netmask 255.240.0.0
@@ -27,3 +37,12 @@ iface wlan1 inet static
wireless_essid cube-mesh
wireless_channel 11
wireless_rts 250
+
+iface ath1 inet static
+ address 172.16.0.1
+ netmask 255.240.0.0
+ broadcast 172.31.255.255
+ wireless_mode ad-hoc
+ wireless_essid cube-mesh
+ wireless_channel 11
+ wireless_rts 250
diff --git a/recipes/netbase/netbase/mtx-2/interfaces b/recipes/netbase/netbase/mtx-2/interfaces
index a7c6da5752..ae50a5cec3 100644
--- a/recipes/netbase/netbase/mtx-2/interfaces
+++ b/recipes/netbase/netbase/mtx-2/interfaces
@@ -1,24 +1,34 @@
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
-# The loopback interface
+# the loopback interface
auto lo
iface lo inet loopback
-# Ethernet
+# ethernet
auto eth0
iface eth0 inet dhcp
+ alias conf 192.168.0.250
-# wlan interface 1 for clients
-auto wlan0
+# auto is not needed for the wlan interfaces
+# - hotplug will ifup the interfaces automatically
+
+# first wlan interface for clients
iface wlan0 inet static
address 10.0.0.1
netmask 255.0.0.0
wireless_mode master
wireless_essid cube-ap
wireless_channel 1
-
-# wlan interface 2 for mesh
-auto wlan1
+
+iface ath0 inet static
+ address 10.0.0.1
+ netmask 255.0.0.0
+ wireless_standard g
+ wireless_mode master
+ wireless_essid cube-ap
+ wireless_channel 1
+
+# second wlan interface for mesh
iface wlan1 inet static
address 172.16.0.1
netmask 255.240.0.0
@@ -27,3 +37,12 @@ iface wlan1 inet static
wireless_essid cube-mesh
wireless_channel 11
wireless_rts 250
+
+iface ath1 inet static
+ address 172.16.0.1
+ netmask 255.240.0.0
+ broadcast 172.31.255.255
+ wireless_mode ad-hoc
+ wireless_essid cube-mesh
+ wireless_channel 11
+ wireless_rts 250
diff --git a/recipes/netbase/netbase_4.21.bb b/recipes/netbase/netbase_4.21.bb
index 4dfc18223a..c0c97b73bf 100644
--- a/recipes/netbase/netbase_4.21.bb
+++ b/recipes/netbase/netbase_4.21.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "This package provides the necessary \
infrastructure for basic TCP/IP based networking."
SECTION = "base"
LICENSE = "GPL"
-PR = "r35"
+PR = "r36"
inherit update-rc.d
@@ -51,8 +51,10 @@ do_install () {
install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
install -m 0644 etc-services ${D}${sysconfdir}/services
+ if [ "${ONLINE_PACKAGE_MANAGEMENT}" != "none" ]; then
install -m 0755 update-inetd ${D}${sbindir}/
install -m 0644 update-inetd.8 ${D}${mandir}/man8/
+ fi
install -m 0644 ${WORKDIR}/interfaces ${D}${sysconfdir}/network/interfaces
}
diff --git a/recipes/netcat/netcat_0.7.1.bb b/recipes/netcat/netcat_0.7.1.bb
index c7ceccddf2..7c4dfc5375 100644
--- a/recipes/netcat/netcat_0.7.1.bb
+++ b/recipes/netcat/netcat_0.7.1.bb
@@ -2,8 +2,17 @@ DESCRIPTION = "GNU Netcat"
HOMEPAGE = "http://netcat.sourceforge.net"
SECTION = "console/network"
LICENSE = "GPLv2"
-PR = "r1"
+PR = "r3"
SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2"
-inherit autotools
+inherit autotools update-alternatives
+
+do_install_append() {
+ mv ${D}${bindir}/nc ${D}${bindir}/nc.${PN}
+}
+
+ALTERNATIVE_NAME = "nc"
+ALTERNATIVE_LINK = "${bindir}/nc"
+ALTERNATIVE_PATH = "${bindir}/nc.${PN}"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/recipes/netperf/netperf_2.4.4.bb b/recipes/netperf/netperf_2.4.4.bb
index 0af225ffba..a0bac9bfb4 100644
--- a/recipes/netperf/netperf_2.4.4.bb
+++ b/recipes/netperf/netperf_2.4.4.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.netperf.org/"
LICENSE = "netperf"
PR = "r1"
-SRC_URI="ftp://ftp.netperf.org/netperf/netperf-${PV}.tar.bz2 \
+SRC_URI="ftp://ftp.netperf.org/netperf/archive/netperf-${PV}.tar.bz2 \
file://cpu_set.patch;patch=1 \
file://init"
diff --git a/recipes/netsurf/hubbub_0.0.1.bb b/recipes/netsurf/hubbub_0.0.1.bb
new file mode 100644
index 0000000000..0d70b4165d
--- /dev/null
+++ b/recipes/netsurf/hubbub_0.0.1.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "Hubbub is an HTML5 compliant parsing library"
+HOMEPAGE = "http://www.netsurf-browser.org/projects/hubbub/"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "MIT"
+DEPENDS = "libparserutils"
+
+SRC_URI = "http://www.netsurf-browser.org/projects/releases/hubbub-${PV}-src.tar.gz"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "CURDIR=${S} DESTDIR=${D} PREFIX=${prefix} BUILDDIR=build-OE"
+
+# NOTE: we're using default buildmode here, which results in building only
+# static libraries (.a) Not a problem as hubbub is only used by Netsurf
+# at the moment
+
+do_stage() {
+ oe_libinstall -a -C build-OE/ libhubbub ${STAGING_LIBDIR}
+
+ install -d ${STAGING_INCDIR}/hubbub
+ install -m 0644 include/hubbub/*.h ${STAGING_INCDIR}/hubbub
+}
+
+
+do_install() {
+ oe_runmake install
+}
diff --git a/recipes/netsurf/libnsbmp_0.0.1.bb b/recipes/netsurf/libnsbmp_0.0.1.bb
new file mode 100644
index 0000000000..a17cd31746
--- /dev/null
+++ b/recipes/netsurf/libnsbmp_0.0.1.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Libnsbmp is a decoding library for the BMP and ICO image file formats"
+HOMEPAGE = "http://www.netsurf-browser.org/projects/libnsbmp/"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "MIT"
+
+SRC_URI = "http://www.netsurf-browser.org/projects/releases/libnsbmp-${PV}-src.tar.gz"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "CURDIR=${S} DESTDIR=${D} PREFIX=${prefix} BUILDDIR=build-OE"
+
+# NOTE: we're using default buildmode here, which results in building only
+# static libraries (.a) Not a problem as libnsbmp is only used by Netsurf
+# at the moment
+
+do_stage() {
+ oe_libinstall -a -C build-OE/ libnsbmp ${STAGING_LIBDIR}
+ install -m 0644 include/*.h ${STAGING_INCDIR}/
+}
+
+do_install() {
+ oe_runmake install
+}
diff --git a/recipes/netsurf/libnsgif_0.0.1.bb b/recipes/netsurf/libnsgif_0.0.1.bb
new file mode 100644
index 0000000000..3b9cfc2930
--- /dev/null
+++ b/recipes/netsurf/libnsgif_0.0.1.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Libnsgif is a decoding library for the GIF image file format"
+HOMEPAGE = "http://www.netsurf-browser.org/projects/libnsgif/"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "MIT"
+
+SRC_URI = "http://www.netsurf-browser.org/projects/releases/libnsgif-${PV}-src.tar.gz"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "CURDIR=${S} DESTDIR=${D} PREFIX=${prefix} BUILDDIR=build-OE"
+
+# NOTE: we're using default buildmode here, which results in building only
+# static libraries (.a) Not a problem as libnsbmp is only used by Netsurf
+# at the moment
+
+do_stage() {
+ oe_libinstall -a -C build-OE/ libnsgif ${STAGING_LIBDIR}
+ install -m 0644 include/*.h ${STAGING_INCDIR}/
+}
+
+do_install() {
+ oe_runmake install
+}
diff --git a/recipes/netsurf/libparserutils_0.0.1.bb b/recipes/netsurf/libparserutils_0.0.1.bb
new file mode 100644
index 0000000000..5317364a84
--- /dev/null
+++ b/recipes/netsurf/libparserutils_0.0.1.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "LibParserUtils is a library for building efficient parsers"
+HOMEPAGE = "http://www.netsurf-browser.org/projects/libparserutils/"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "MIT"
+
+SRC_URI = "http://www.netsurf-browser.org/projects/releases/libparserutils-${PV}-src.tar.gz"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "CURDIR=${S} DESTDIR=${D} PREFIX=${prefix} BUILDDIR=build-OE"
+
+# NOTE: we're using default buildmode here, which results in building only
+# static libraries (.a) Not a problem as libparserutils is only used by Netsurf
+# at the moment
+
+do_stage () {
+ oe_libinstall -a -C build-OE/ libparserutils ${STAGING_LIBDIR}
+
+ install -d ${STAGING_INCDIR}/parserutils
+ install -d ${STAGING_INCDIR}/parserutils/charset
+ install -d ${STAGING_INCDIR}/parserutils/input
+ install -d ${STAGING_INCDIR}/parserutils/utils
+ install -m 0644 include/parserutils/*.h ${STAGING_INCDIR}/parserutils
+ install -m 0644 include/parserutils/charset/*.h \
+ ${STAGING_INCDIR}/parserutils/charset
+ install -m 0644 include/parserutils/input/*.h \
+ ${STAGING_INCDIR}/parserutils/input
+ install -m 0644 include/parserutils/utils/*.h \
+ ${STAGING_INCDIR}/parserutils/utils
+}
+
+
+do_install() {
+ oe_runmake install
+}
diff --git a/recipes/netsurf/netsurf-2.1/Makefile.config b/recipes/netsurf/netsurf-2.1/Makefile.config
new file mode 100644
index 0000000000..72c86003f5
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/Makefile.config
@@ -0,0 +1,9 @@
+override NETSURF_USE_BMP := YES
+override NETSURF_USE_GIF := YES
+override NETSURF_USE_JPEG := YES
+override NETSURF_USE_PNG := YES
+override NETSURF_USE_MNG := NO
+override NETSURF_USE_HARU_PDF := NO
+override NETSURF_USE_RSVG := NO
+override NETSURF_USE_ROSPRITE := NO
+
diff --git a/recipes/netsurf/netsurf-2.1/debugxml_fix.patch b/recipes/netsurf/netsurf-2.1/debugxml_fix.patch
new file mode 100644
index 0000000000..3a6626abe8
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/debugxml_fix.patch
@@ -0,0 +1,64 @@
+--- netsurf-2.0/gtk/gtk_scaffolding.c.orig 2009-05-15 01:18:44.000000000 +0400
++++ netsurf-2.0/gtk/gtk_scaffolding.c 2009-05-15 01:24:32.000000000 +0400
+@@ -22,7 +22,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <gtk/gtk.h>
+-#include <libxml/debugXML.h>
+ #include "content/content.h"
+ #include "desktop/browser.h"
+ #include "desktop/history_core.h"
+@@ -1040,52 +1039,7 @@
+
+ MENUHANDLER(save_dom_tree)
+ {
+- GtkWidget *save_dialog;
+- struct gtk_scaffolding *gw = (struct gtk_scaffolding *)g;
+-
+- save_dialog = gtk_file_chooser_dialog_new("Save File", gw->window,
+- GTK_FILE_CHOOSER_ACTION_SAVE,
+- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+- GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+- NULL);
+-
+- gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(save_dialog),
+- getenv("HOME") ? getenv("HOME") : "/");
+-
+- gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(save_dialog),
+- "domtree.txt");
+-
+- if (gtk_dialog_run(GTK_DIALOG(save_dialog)) == GTK_RESPONSE_ACCEPT) {
+- gchar *filename = gtk_file_chooser_get_filename(
+- GTK_FILE_CHOOSER(save_dialog));
+- FILE *fh;
+- LOG(("Saving dom tree to %s...\n", filename));
+-
+- fh = fopen((const char *) filename, "w");
+- if (fh == NULL) {
+- warn_user("Error saving box tree dump.",
+- "Unable to open file for writing.");
+- } else {
+- struct browser_window *bw;
+- bw = nsgtk_get_browser_window(gw->top_level);
+-
+- if (bw->current_content &&
+- bw->current_content->type ==
+- CONTENT_HTML) {
+- xmlDebugDumpDocument(fh,
+- bw->current_content->
+- data.html.document);
+- }
+-
+- fclose(fh);
+- }
+-
+- g_free(filename);
+- }
+-
+- gtk_widget_destroy(save_dialog);
+-
+- return TRUE;
++ return FALSE;
+ }
+
+
diff --git a/recipes/netsurf/netsurf-2.1/fix_makefile.patch b/recipes/netsurf/netsurf-2.1/fix_makefile.patch
new file mode 100644
index 0000000000..1783921d1e
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/fix_makefile.patch
@@ -0,0 +1,12 @@
+Index: Makefile
+===================================================================
+--- a/Makefile (revision 7536)
++++ b/Makefile (working copy)
+@@ -820,7 +820,6 @@
+ @cp -vRL gtk/res/netsurf-16x16.xpm $(DESTDIR)$(NETSURF_GTK_RESOURCES)
+ @cp -vRL gtk/res/throbber/*.png $(DESTDIR)$(NETSURF_GTK_RESOURCES)/throbber
+ @cp -vRL gtk/res/Aliases $(DESTDIR)$(NETSURF_GTK_RESOURCES)
+- @cp -vrL gtk/res/docs $(DESTDIR)/$(NETSURF_GTK_RESOURCES)
+ gzip -9v < gtk/res/messages > $(DESTDIR)$(NETSURF_GTK_RESOURCES)messages
+ gzip -9v < gtk/res/downloads.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)downloads.glade
+ gzip -9v < gtk/res/netsurf.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)netsurf.glade
diff --git a/recipes/netsurf/netsurf-2.1/netsurf.desktop b/recipes/netsurf/netsurf-2.1/netsurf.desktop
new file mode 100644
index 0000000000..4188d3019d
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/netsurf.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=NetSurf
+Comment=NetSurf Web Browser
+GenericName=Web Browser
+Icon=netsurf
+Exec=netsurf
+Terminal=false
+StartupNotify=false
+Categories=Network;WebBrowser;
diff --git a/recipes/netsurf/netsurf-2.1/netsurf.png b/recipes/netsurf/netsurf-2.1/netsurf.png
new file mode 100644
index 0000000000..3064e5d4f3
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/netsurf.png
Binary files differ
diff --git a/recipes/netsurf/netsurf_2.1.bb b/recipes/netsurf/netsurf_2.1.bb
new file mode 100644
index 0000000000..073f17f53b
--- /dev/null
+++ b/recipes/netsurf/netsurf_2.1.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "Lightweight web browser capable of handling many of the \
+web standards in use today."
+HOMEPAGE = "http://www.netsurf-browser.org/"
+SECTION = "x11/network"
+LICENSE = "GPLv2"
+
+SRC_URI = "http://www.netsurf-browser.org/downloads/releases/netsurf-${PV}-src.tar.gz \
+ file://fix_makefile.patch;patch=1 \
+ file://debugxml_fix.patch;patch=1 \
+ file://netsurf.png \
+ file://netsurf.desktop \
+ file://Makefile.config"
+
+# Workaround for 2.1 tarball (unpacks into netsurf/, not netsurf-2.1/ )
+S = "${WORKDIR}/netsurf"
+
+DEPENDS = "gtk+ lemon-native re2c-native jpeg openssl curl libxml2 \
+ libglade hubbub libnsgif libnsbmp lcms"
+
+EXTRA_OEMAKE = "CURDIR=${S} DESTDIR=${D} PREFIX=${prefix}"
+
+do_configure() {
+ cp ${WORKDIR}/Makefile.config ${S}/
+}
+
+do_install() {
+ oe_runmake install
+ install -d ${D}/${datadir}/applications
+ install -d ${D}/${datadir}/pixmaps
+ install -m 0644 ${WORKDIR}/netsurf.png ${D}/${datadir}/pixmaps/
+ install -m 0644 ${WORKDIR}/netsurf.desktop ${D}/${datadir}/applications/
+}
diff --git a/recipes/nilfs-utils/files/no-ldconfig-during-install.patch b/recipes/nilfs-utils/files/no-ldconfig-during-install.patch
new file mode 100644
index 0000000000..e69fcb143b
--- /dev/null
+++ b/recipes/nilfs-utils/files/no-ldconfig-during-install.patch
@@ -0,0 +1,10 @@
+Index: nilfs-utils-2.0.12/lib/Makefile.am
+===================================================================
+--- nilfs-utils-2.0.12.orig/lib/Makefile.am 2009-06-07 14:05:10.000000000 +0200
++++ nilfs-utils-2.0.12/lib/Makefile.am 2009-06-07 14:05:21.000000000 +0200
+@@ -24,5 +24,3 @@
+ libnilfs_la_LDFLAGS = -version-info $(VERSIONINFO)
+ libnilfs_la_LIBADD = libnilfsmisc.la
+
+-install-exec-hook:
+- $(LDCONFIG) $(DESTDIR)$(libdir)
diff --git a/recipes/nilfs-utils/nilfs-utils_2.0.12.bb b/recipes/nilfs-utils/nilfs-utils_2.0.12.bb
new file mode 100644
index 0000000000..37b3762113
--- /dev/null
+++ b/recipes/nilfs-utils/nilfs-utils_2.0.12.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "User-level tools for NILFS2 filesystems"
+SECTION = "base"
+LICENSE = "GPL"
+HOMEPAGE = "http://www.nilfs.org/"
+
+# required for libuuid
+DEPENDS = "e2fsprogs-libs"
+
+RRECOMMENDS_${PN} = "nilfs-utils-mkfs nilfs-utils-stats"
+
+PR = "r0"
+
+SRC_URI ="http://www.nilfs.org/download/nilfs-utils-2.0.12.tar.bz2 \
+file://no-ldconfig-during-install.patch;patch=1"
+
+S = "${WORKDIR}/nilfs-utils-${PV}"
+
+inherit autotools
+
+PACKAGES_prepend = "nilfs-utils-mkfs nilfs-utils-stats "
+
+FILES_nilfs-utils-mkfs = "${base_sbindir}/mkfs.nilfs2"
+FILES_nilfs-utils-stats = "${bindir}/dumpseg ${bindir}/lssu"
diff --git a/recipes/minisip/minisip-video_svn.bb b/recipes/nonworking/minisip/minisip-video_svn.bb
index 137f29f2d8..137f29f2d8 100644
--- a/recipes/minisip/minisip-video_svn.bb
+++ b/recipes/nonworking/minisip/minisip-video_svn.bb
diff --git a/recipes/nunome/nunome_1.0.2.bb b/recipes/nunome/nunome_1.0.2.bb
index bf297b0699..0997232065 100644
--- a/recipes/nunome/nunome_1.0.2.bb
+++ b/recipes/nunome/nunome_1.0.2.bb
@@ -3,8 +3,8 @@ HOMEPAGE = "http://www.sikigami.com/nunome-Qtopia-1.0/"
SECTION = "opie/inputmethods"
PRIORITY = "optional"
LICENSE = "GPL"
-RDEPENDS = "virtual/japanese-font"
-PR = "r3"
+RDEPENDS = "virtual-japanese-font"
+PR = "r4"
SRC_URI = "${SOURCEFORGE_MIRROR}/gakusei/nunome-${PV}.tar.bz2 \
file://timer.patch;patch=1 \
diff --git a/recipes/nylon/files/firewall-bash.diff b/recipes/nylon/files/firewall-bash.diff
new file mode 100644
index 0000000000..044f8d813c
--- /dev/null
+++ b/recipes/nylon/files/firewall-bash.diff
@@ -0,0 +1,8 @@
+--- nylon-scripts/etc/init.d/firewall-orig 2009-04-25 13:46:25.000000000 +0200
++++ nylon-scripts/etc/init.d/firewall 2009-04-25 13:46:28.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ # this is a meta firewall start script:
+ # it either starts a local firewall script or shorewall
diff --git a/recipes/nylon/files/simple-firewall-bash.diff b/recipes/nylon/files/simple-firewall-bash.diff
new file mode 100644
index 0000000000..dc6cf0dd87
--- /dev/null
+++ b/recipes/nylon/files/simple-firewall-bash.diff
@@ -0,0 +1,8 @@
+--- simple-firewall/etc/init.d/simple-firewall-orig 2009-04-25 13:42:10.000000000 +0200
++++ simple-firewall/etc/init.d/simple-firewall 2009-04-25 13:42:16.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #$HeadURL: http://gruen.4g/svn/branches/stable-1.0/application/simple-firewall/etc/init.d/simple-firewall $ $Rev: 2593 $
+
+ if [ -f /etc/firewall/firewall.conf ]; then
diff --git a/recipes/nylon/nylon-config.bb b/recipes/nylon/nylon-config.bb
new file mode 100644
index 0000000000..76f78a97f7
--- /dev/null
+++ b/recipes/nylon/nylon-config.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "nylon preliminary web configuration interface"
+SECTION = "base"
+PRIORITY = "optional"
+MAINTAINER = "Bruno Randolf <bruno.randolf@4g-systems.biz>"
+LICENSE = "closed"
+DEPENDS = "perl virtual/kernel hostap-daemon busybox"
+RDEPENDS = "perl perl-module-exporter perl-module-posix perl-module-autoloader perl-module-strict perl-module-xsloader perl-module-data-dumper perl-module-carp perl-module-bytes perl-module-overload perl-module-warnings-register perl-module-warnings kernel-module-aes madwifi-modules hostap-daemon simple-firewall wlan-ng-utils busybox-httpd"
+CVSDATE = "20051026"
+PV = "cvs${CVSDATE}"
+
+SRC_URI = "http://br1.einfach.org/nylon/stable/sources/nylon-config_gruen.4g__20051026.tar.gz"
+S = "${WORKDIR}/${PN}"
+
+do_install() {
+ (cd ${S}; tar -c --exclude .svn -f - . ) | tar -C ${D} -xpf -
+ # chmod 600 ${D}/etc/certs/stunnel.key
+ chmod a+x ${D}/srv/www/cgi-bin/*
+}
+
+pkg_postinst() {
+#!/bin/sh
+if test "x$D" != "x"; then
+ exit 1
+fi
+
+# Create resolv.conf-link to ppp-file
+rm /etc/resolv.conf
+ln -s /etc/ppp/resolv.conf /etc/resolv.conf
+
+# enable factorydefaults
+update-rc.d factorydefaults start 90 2 .
+
+# "fix" /etc/network/interfaces
+perl -I /srv/www/cgi-bin -MConfig::IFace -e '$w=new Config::IFace(); $v = $w->read(); $v->{auto} = {0=>"lo",1=>eth0,2=>"wlan0",3=>"wlan1",4=>"ath0",5=>"ath1"}; $w->write($v)'
+
+update-rc.d busybox-httpd start 40 2 3 4 5 .
+/etc/init.d/busybox-httpd restart
+}
+
+FILES_${PN} += "/srv"
+
diff --git a/recipes/nylon/nylon-scripts_cvs.bb b/recipes/nylon/nylon-scripts_cvs.bb
index 650bd1a8e8..d87e2c11e1 100644
--- a/recipes/nylon/nylon-scripts_cvs.bb
+++ b/recipes/nylon/nylon-scripts_cvs.bb
@@ -4,12 +4,14 @@ DEPENDS = "hostap-utils"
SECTION = "base"
PRIORITY = "optional"
LICENSE = "GPLv2"
-SRCDATE = "20060923"
+#SRCDATE = "20060923"
+SRCDATE = "20051022"
PV = "1.0.0+cvs${SRCDATE}"
PR = "r2"
RDEPENDS = "bash"
-SRC_URI = "http://meshcube.org/download/${PN}_${SRCDATE}.tgz"
+SRC_URI = "http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/${PN}_gruen.4g__${SRCDATE}.tar.gz \
+ file://firewall-bash.diff;patch=1"
S = "${WORKDIR}/${PN}"
INHIBIT_PACKAGE_STRIP = "1"
diff --git a/recipes/nylon/nylon-statistics.bb b/recipes/nylon/nylon-statistics.bb
index ef79bc6d31..c9b790cda0 100644
--- a/recipes/nylon/nylon-statistics.bb
+++ b/recipes/nylon/nylon-statistics.bb
@@ -3,11 +3,12 @@ RDEPENDS = "rrdtool"
SECTION = "base"
PRIORITY = "optional"
LICENSE = "GPLv2"
-SRCDATE = "20050909"
+#SRCDATE = "20050909"
+SRCDATE = "20051022"
PV = "1.0.0+cvs${SRCDATE}"
PR = "r1"
-SRC_URI = "http://meshcube.org/download/${PN}_${SRCDATE}.tgz"
+SRC_URI = "http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/${PN}_gruen.4g__${SRCDATE}.tar.gz"
S = "${WORKDIR}/${PN}"
INHIBIT_PACKAGE_STRIP = "1"
diff --git a/recipes/nylon/simple-firewall.bb b/recipes/nylon/simple-firewall.bb
new file mode 100644
index 0000000000..d9e6974480
--- /dev/null
+++ b/recipes/nylon/simple-firewall.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "simple firewall configuratiopn script"
+SECTION = "base"
+PRIORITY = "optional"
+MAINTAINER = "Bruno Randolf <br1@einfach.org>"
+LICENSE = "GPL"
+DEPENDS = "virtual/kernel"
+# these kernel modules are needed if the functionality is not hard-built into the kernel:
+# kernel-module-ip-tables kernel-module-iptable-filter kernel-module-iptable-nat kernel-module-ipt-state kernel-module-ipt-reject kernel-module-ipt-masquerade
+RDEPENDS = "kernel-module-ipt-limit kernel-module-ipt-tcpmss"
+PV = "cvs20051022"
+
+SRC_URI = "http://br1.einfach.org/nylon/stable/sources/simple-firewall_gruen.4g__20051022.tar.gz \
+ file://simple-firewall-bash.diff;patch=1"
+S = "${WORKDIR}/${PN}"
+
+do_install() {
+ (cd ${S}; tar -c --exclude .svn -f - . ) | tar -C ${D} -xpf -
+}
diff --git a/recipes/nylon/yamonenv.bb b/recipes/nylon/yamonenv.bb
index e963d913ee..1db737f042 100644
--- a/recipes/nylon/yamonenv.bb
+++ b/recipes/nylon/yamonenv.bb
@@ -2,10 +2,11 @@ DESCRIPTION = "Reads YAMON environment-variables"
SECTION = "base"
PRIORITY = "optional"
LICENSE = "GPL"
-SRCDATE = "20050909"
+#SRCDATE = "20050909"
+SRCDATE = "20051022"
PV = "1.0.0+cvs${SRCDATE}"
-SRC_URI = "http://meshcube.org/download/${PN}_${SRCDATE}.tgz"
+SRC_URI = "http://download.berlin.freifunk.net/meshcube.org/nylon/stable/sources/${PN}_gruen.4g__${SRCDATE}.tar.gz"
S = "${WORKDIR}/${PN}"
do_install() {
diff --git a/recipes/obexftp/obexftp_0.23.bb b/recipes/obexftp/obexftp_0.23.bb
index d3924f6039..037fbbfa67 100644
--- a/recipes/obexftp/obexftp_0.23.bb
+++ b/recipes/obexftp/obexftp_0.23.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "OBEX Ftp Client based on openobex."
SECTION = "console/network"
HOMEPAGE = "http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp"
LICENSE = "GPL"
-DEPENDS = "openobex bluez4 libusb-compat virtual/libiconv"
+DEPENDS = "openobex bluez-libs libusb-compat virtual/libiconv"
SRC_URI = "${SOURCEFORGE_MIRROR}/openobex/obexftp-${PV}.tar.bz2 \
"
diff --git a/recipes/opencv/opencv-samples_cvs.bb b/recipes/opencv/opencv-samples_svn.bb
index 0490f8b015..4eeb39486f 100644
--- a/recipes/opencv/opencv-samples_cvs.bb
+++ b/recipes/opencv/opencv-samples_svn.bb
@@ -4,14 +4,13 @@ SECTION = "libs"
PRIORITY = "optional"
LICENSE = "GPLv2"
-PR = "r2"
-
DEPENDS = "opencv"
-SRC_URI = "cvs://anonymous@opencvlibrary.cvs.sourceforge.net/cvsroot/opencvlibrary;module=opencv \
+SRC_URI = "svn://opencvlibrary.svn.sourceforge.net/svnroot/opencvlibrary/trunk;module=opencv;proto=https \
"
-SRCDATE = "20081115"
-PV = "1.0.0+cvs${SRCDATE}"
+
+SRCREV = "1820"
+PV = "1.0.0+svnr${SRCREV}"
S = "${WORKDIR}/opencv"
@@ -21,13 +20,13 @@ do_install() {
for i in *.c; do
echo "compiling $i"
- ${CXX} ${CFLAGS} ${LDFLAGS} -ggdb `pkg-config --cflags opencv` -o `basename $i .c` $i `pkg-config --libs opencv`;
- install -m 0755 `basename $i .c` ${D}/${bindir}
+ ${CXX} ${CFLAGS} ${LDFLAGS} -ggdb `pkg-config --cflags opencv` -o `basename $i .c` $i `pkg-config --libs opencv` || true
+ install -m 0755 `basename $i .c` ${D}/${bindir} || true
done
for i in *.cpp; do
echo "compiling $i"
- ${CXX} ${CFLAGS} ${LDFLAGS} -ggdb `pkg-config --cflags opencv` -o `basename $i .cpp` $i `pkg-config --libs opencv`;
- install -m 0755 `basename $i .cpp` ${D}/${bindir}
+ ${CXX} ${CFLAGS} ${LDFLAGS} -ggdb `pkg-config --cflags opencv` -o `basename $i .cpp` $i `pkg-config --libs opencv` || true
+ install -m 0755 `basename $i .cpp` ${D}/${bindir} || true
done
}
diff --git a/recipes/opencv/opencv_cvs.bb b/recipes/opencv/opencv_svn.bb
index ade12c10c2..3bfa33cd9d 100644
--- a/recipes/opencv/opencv_cvs.bb
+++ b/recipes/opencv/opencv_svn.bb
@@ -8,13 +8,13 @@ ARM_INSTRUCTION_SET = "arm"
PR = "r1"
-DEPENDS = "libtool swig swig-native python jpeg zlib libpng tiff glib-2.0"
+DEPENDS = "ffmpeg gtk+ libtool swig swig-native python jpeg zlib libpng tiff glib-2.0"
-SRC_URI = "cvs://anonymous@opencvlibrary.cvs.sourceforge.net/cvsroot/opencvlibrary;module=opencv \
+SRC_URI = "svn://opencvlibrary.svn.sourceforge.net/svnroot/opencvlibrary/trunk;module=opencv;proto=https \
file://acinclude.m4"
-SRCDATE = "20081115"
-PV = "1.0.0+cvs${SRCDATE}"
+SRCREV = "1820"
+PV = "1.0.0+svnr${SRCREV}"
S = "${WORKDIR}/opencv"
@@ -23,8 +23,14 @@ inherit distutils-base autotools pkgconfig
EXTRA_OECONF = " \
--disable-debug \
--with-gtk \
+ --without-quicktime \
+ --with-gthread \
+ --without-gstreamer \
+ --with-v4l \
--enable-apps \
- --with-python az_python_cspec=${STAGING_INCDIR}/${PYTHON_DIR} \
+ --enable-optimization \
+ --disable-sse \
+ --without-python az_python_cspec=${STAGING_INCDIR}/${PYTHON_DIR} \
"
export BUILD_SYS
@@ -36,6 +42,8 @@ do_configure_prepend() {
sed -i -e /AC_CONFIG_MACRO_DIR/d -e /AZ_PYTHON_CSPEC/d ${S}/configure.in
}
+TARGET_CC_ARCH += "-I${S}/include "
+
PACKAGES += "${PN}-apps python-opencv"
python populate_packages_prepend () {
diff --git a/recipes/openmoko2/libjana_svn.bb b/recipes/openmoko2/libjana_svn.bb
index 48779e50fe..49692b7465 100644
--- a/recipes/openmoko2/libjana_svn.bb
+++ b/recipes/openmoko2/libjana_svn.bb
@@ -1,11 +1,12 @@
DESCRIPTION = "O-Hand Jana Library"
-DEPENDS = "libmokojournal2 gtk+ eds-dbus gconf"
+DEPENDS = "libmokojournal2"
+DEPENDS = "gtk+ eds-dbus gconf"
PV = "0.1.0+svnr${SRCREV}"
PR = "r5"
-inherit autotools pkgconfig lib_package
+inherit autotools_stage pkgconfig lib_package
-SRC_URI = "svn://svn.o-hand.com/repos/jana/;module=trunk;proto=http"
+SRC_URI = "svn://svn.gnome.org/svn/jana/;module=trunk;proto=http"
S = "${WORKDIR}/trunk/"
EXTRA_OECONF = "--enable-examples "
@@ -14,10 +15,6 @@ do_configure_prepend() {
touch gtk-doc.make
}
-do_stage() {
- autotools_stage_all
-}
-
PACKAGES =+ "libjana-ecal libjana-ecal-dbg \
libjana-gtk libjana-gtk-dbg \
"
diff --git a/recipes/openobex/openobex_1.5.bb b/recipes/openobex/openobex_1.5.bb
index faa6c066ec..e692d4c0a4 100644
--- a/recipes/openobex/openobex_1.5.bb
+++ b/recipes/openobex/openobex_1.5.bb
@@ -3,7 +3,7 @@ Object Exchange (OBEX) protocol."
HOMEPAGE = "http://openobex.triq.net"
SECTION = "libs"
PROVIDES = "openobex-apps"
-DEPENDS = "libusb-compat bluez4"
+DEPENDS = "libusb-compat bluez-libs"
LICENSE = "GPL"
PR = "r1"
diff --git a/recipes/openssh/openssh-5.2p1/openssh-5.2-sftp-server-nolibcrypto.patch b/recipes/openssh/openssh-5.2p1/openssh-5.2-sftp-server-nolibcrypto.patch
new file mode 100644
index 0000000000..2d0cdd5cca
--- /dev/null
+++ b/recipes/openssh/openssh-5.2p1/openssh-5.2-sftp-server-nolibcrypto.patch
@@ -0,0 +1,13 @@
+Index: openssh-5.2p1/Makefile.in
+===================================================================
+--- openssh-5.2p1.orig/Makefile.in
++++ openssh-5.2p1/Makefile.in
+@@ -158,7 +158,7 @@ ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libss
+ $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
+
+ sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o sftp-server-main.o
+- $(LD) -o $@ sftp-server.o sftp-common.o sftp-server-main.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
++ $(LD) -o $@ sftp-server.o sftp-common.o sftp-server-main.o $(LDFLAGS) -lssh -lopenbsd-compat
+
+ sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o
+ $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT)
diff --git a/recipes/openssh/openssh-5.2p1/ssh_config b/recipes/openssh/openssh-5.2p1/ssh_config
new file mode 100644
index 0000000000..4a4a649ba8
--- /dev/null
+++ b/recipes/openssh/openssh-5.2p1/ssh_config
@@ -0,0 +1,46 @@
+# $OpenBSD: ssh_config,v 1.25 2009/02/17 01:28:32 djm Exp $
+
+# This is the ssh client system-wide configuration file. See
+# ssh_config(5) for more information. This file provides defaults for
+# users, and the values can be changed in per-user configuration files
+# or on the command line.
+
+# Configuration data is parsed as follows:
+# 1. command line options
+# 2. user-specific file
+# 3. system-wide file
+# Any configuration value is only changed the first time it is set.
+# Thus, host-specific definitions should be at the beginning of the
+# configuration file, and defaults at the end.
+
+# Site-wide defaults for some commonly used options. For a comprehensive
+# list of available options, their meanings and defaults, please see the
+# ssh_config(5) man page.
+
+Host *
+ ForwardAgent yes
+ ForwardX11 yes
+# RhostsRSAAuthentication no
+# RSAAuthentication yes
+# PasswordAuthentication yes
+# HostbasedAuthentication no
+# GSSAPIAuthentication no
+# GSSAPIDelegateCredentials no
+# BatchMode no
+# CheckHostIP yes
+# AddressFamily any
+# ConnectTimeout 0
+# StrictHostKeyChecking ask
+# IdentityFile ~/.ssh/identity
+# IdentityFile ~/.ssh/id_rsa
+# IdentityFile ~/.ssh/id_dsa
+# Port 22
+# Protocol 2,1
+# Cipher 3des
+# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
+# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
+# EscapeChar ~
+# Tunnel no
+# TunnelDevice any:any
+# PermitLocalCommand no
+# VisualHostKey no
diff --git a/recipes/openssh/openssh-5.2p1/sshd_config b/recipes/openssh/openssh-5.2p1/sshd_config
new file mode 100644
index 0000000000..4f9b626fbd
--- /dev/null
+++ b/recipes/openssh/openssh-5.2p1/sshd_config
@@ -0,0 +1,119 @@
+# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options change a
+# default value.
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+# Disable legacy (protocol version 1) support in the server for new
+# installations. In future the default will change to require explicit
+# activation of protocol 1
+Protocol 2
+
+# HostKey for protocol version 1
+#HostKey /etc/ssh/ssh_host_key
+# HostKeys for protocol version 2
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_dsa_key
+
+# Lifetime and size of ephemeral version 1 server key
+#KeyRegenerationInterval 1h
+#ServerKeyBits 1024
+
+# Logging
+# obsoletes QuietMode and FascistLogging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+#PermitRootLogin yes
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#RSAAuthentication yes
+#PubkeyAuthentication yes
+#AuthorizedKeysFile .ssh/authorized_keys
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#RhostsRSAAuthentication no
+# similar for protocol version 2
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# RhostsRSAAuthentication and HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+#PasswordAuthentication yes
+#PermitEmptyPasswords no
+
+# Change to no to disable s/key passwords
+#ChallengeResponseAuthentication yes
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+#UsePAM no
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+#X11Forwarding no
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PrintMotd yes
+#PrintLastLog yes
+#TCPKeepAlive yes
+#UseLogin no
+UsePrivilegeSeparation yes
+#PermitUserEnvironment no
+Compression no
+ClientAliveInterval 15
+ClientAliveCountMax 4
+#UseDNS yes
+#PidFile /var/run/sshd.pid
+#MaxStartups 10
+#PermitTunnel no
+#ChrootDirectory none
+
+# no default banner path
+#Banner none
+
+# override default of no subsystems
+Subsystem sftp /usr/libexec/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# ForceCommand cvs server
diff --git a/recipes/openssh/openssh.inc b/recipes/openssh/openssh.inc
new file mode 100644
index 0000000000..6c33142f0b
--- /dev/null
+++ b/recipes/openssh/openssh.inc
@@ -0,0 +1,106 @@
+DEPENDS = "zlib openssl"
+
+RCONFLICTS_openssh = "dropbear"
+RCONFLICTS_openssh-sshd = "dropbear"
+
+SECTION = "console/network"
+DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
+Ssh (Secure Shell) is a program for logging into a remote machine \
+and for executing commands on a remote machine. \
+It provides secure encrypted communications between two untrusted \
+hosts over an insecure network. X11 connections and arbitrary TCP/IP \
+ports can also be forwarded over the secure channel. \
+It is intended as a replacement for rlogin, rsh and rcp, and can be \
+used to provide applications with a secure communication channel."
+HOMEPAGE = "http://www.openssh.org/"
+LICENSE = "BSD"
+
+inherit autotools
+
+export ASKPASS_PROGRAM = "${bindir}/ssh-askpass"
+export LD = "${CC}"
+CFLAGS_prepend = "-I${S} "
+CFLAGS_append = " -D__FILE_OFFSET_BITS=64"
+LDFLAGS_prepend = "-L${S} -L${S}/openbsd-compat "
+EXTRA_OECONF = "--disable-suid-ssh --with-ssl=${STAGING_LIBDIR}/ssl \
+ --with-rand-helper=no --without-pam \
+ --without-zlib-version-check \
+ --with-privsep-path=/var/run/sshd \
+ --sysconfdir=${sysconfdir}/ssh \
+ --with-xauth=/usr/bin/xauth"
+
+EXTRA_OEMAKE = "'STRIP_OPT='"
+
+do_configure_prepend () {
+ if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
+ cp aclocal.m4 acinclude.m4
+ fi
+}
+
+do_compile_append () {
+ install -m 0644 ${WORKDIR}/sshd_config ${S}/
+ install -m 0644 ${WORKDIR}/ssh_config ${S}/
+}
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
+ mv ${D}${bindir}/scp ${D}${bindir}/scp.openssh
+ mv ${D}${bindir}/ssh ${D}${bindir}/ssh.openssh
+ rmdir ${D}/var/run/sshd ${D}/var/run ${D}/var
+}
+
+PACKAGES =+ " ssh-keygen openssh-scp openssh-ssh openssh-sshd openssh-sftp openssh-misc openssh-sftp-server"
+FILES_openssh-dbg +=${bindir}/.debug ${libdir}exec/.debug"
+FILES_openssh-scp = "${bindir}/scp.${PN}"
+FILES_openssh-ssh = "${bindir}/ssh.${PN} ${bindir}/slogin /${sysconfdir}/ssh/ssh_config"
+FILES_openssh-sshd = "${sbindir}/sshd /${sysconfdir}/init.d/sshd"
+FILES_openssh-sshd += " /${sysconfdir}/ssh/moduli /${sysconfdir}/ssh/sshd_config"
+FILES_openssh-sftp = "${bindir}/sftp"
+FILES_openssh-sftp-server = "${libdir}exec/sftp-server"
+FILES_openssh-misc = "${bindir}/ssh* ${libdir}exec/ssh*"
+FILES_ssh-keygen = "${bindir}/ssh-keygen"
+
+RDEPENDS_openssh += " openssh-scp openssh-ssh openssh-sshd ssh-keygen "
+DEPENDS_openssh-sshd += " update-rc.d"
+RDEPENDS_openssh-sshd += " update-rc.d ssh-keygen "
+
+pkg_postinst_openssh-sshd() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ addgroup sshd
+ adduser --system --home /var/run/sshd --no-create-home --disabled-password --ingroup sshd -s /bin/false sshd
+ update-rc.d sshd defaults 9
+fi
+}
+
+pkg_postinst_openssh-scp() {
+ update-alternatives --install ${bindir}/scp scp scp.${PN} 90
+}
+
+pkg_postinst_openssh-ssh() {
+ update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90
+}
+
+pkg_postrm_openssh-ssh() {
+ update-alternatives --remove ${bindir}/ssh ssh.${PN}
+}
+
+pkg_postrm_openssh-scp() {
+ update-alternatives --remove ${bindir}/scp scp.${PN}
+}
+
+pkg_postrm_openssh-sshd() {
+if test "x$D" != "x"; then
+ exit 1
+else
+ ${sysconfdir}/init.d/sshd stop
+ deluser sshd
+ delgroup sshd
+ update-rc.d -f sshd remove
+fi
+}
+
+CONFFILES_openssh-sshd = "${sysconfdir}/ssh/sshd_config"
+CONFFILES_openssh-ssh = "${sysconfdir}/ssh/ssh_config"
diff --git a/recipes/openssh/openssh_4.6p1.bb b/recipes/openssh/openssh_4.6p1.bb
index b1957bebac..f5ca4de159 100644
--- a/recipes/openssh/openssh_4.6p1.bb
+++ b/recipes/openssh/openssh_4.6p1.bb
@@ -1,113 +1,8 @@
-DEPENDS = "zlib openssl"
-
-RCONFLICTS_openssh = "dropbear"
-RCONFLICTS_openssh-sshd = "dropbear"
-
-SECTION = "console/network"
-DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
-Ssh (Secure Shell) is a program for logging into a remote machine \
-and for executing commands on a remote machine. \
-It provides secure encrypted communications between two untrusted \
-hosts over an insecure network. X11 connections and arbitrary TCP/IP \
-ports can also be forwarded over the secure channel. \
-It is intended as a replacement for rlogin, rsh and rcp, and can be \
-used to provide applications with a secure communication channel."
-HOMEPAGE = "http://www.openssh.org/"
-LICENSE = "BSD"
-PR = "r6"
-
+require openssh.inc
SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
file://sftp-server-nolibcrypto.patch;patch=1 \
file://sshd_config \
- file://ssh_config \
- file://init"
-
-inherit autotools
-
-export ASKPASS_PROGRAM = "${bindir}/ssh-askpass"
-export LD = "${CC}"
-CFLAGS_prepend = "-I${S} "
-CFLAGS_append = " -D__FILE_OFFSET_BITS=64"
-LDFLAGS_prepend = "-L${S} -L${S}/openbsd-compat "
-EXTRA_OECONF = "--disable-suid-ssh --with-ssl=${STAGING_LIBDIR}/ssl \
- --with-rand-helper=no --without-pam \
- --without-zlib-version-check \
- --with-privsep-path=/var/run/sshd \
- --sysconfdir=${sysconfdir}/ssh \
- --with-xauth=/usr/bin/xauth"
-
-EXTRA_OEMAKE = "'STRIP_OPT='"
-
-do_configure_prepend () {
- if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
- cp aclocal.m4 acinclude.m4
- fi
-}
-
-do_compile_append () {
- install -m 0644 ${WORKDIR}/sshd_config ${S}/
- install -m 0644 ${WORKDIR}/ssh_config ${S}/
-}
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
- mv ${D}${bindir}/scp ${D}${bindir}/scp.openssh
- mv ${D}${bindir}/ssh ${D}${bindir}/ssh.openssh
- rmdir ${D}/var/run/sshd ${D}/var/run ${D}/var
-}
-
-PACKAGES =+ " ssh-keygen openssh-scp openssh-ssh openssh-sshd openssh-sftp openssh-misc openssh-sftp-server"
-FILES_openssh-dbg +=${bindir}/.debug ${libdir}exec/.debug"
-FILES_openssh-scp = "${bindir}/scp.${PN}"
-FILES_openssh-ssh = "${bindir}/ssh.${PN} ${bindir}/slogin /${sysconfdir}/ssh/ssh_config"
-FILES_openssh-sshd = "${sbindir}/sshd /${sysconfdir}/init.d/sshd"
-FILES_openssh-sshd += " /${sysconfdir}/ssh/moduli /${sysconfdir}/ssh/sshd_config"
-FILES_openssh-sftp = "${bindir}/sftp"
-FILES_openssh-sftp-server = "${libdir}exec/sftp-server"
-FILES_openssh-misc = "${bindir}/ssh* ${libdir}exec/ssh*"
-FILES_ssh-keygen = "${bindir}/ssh-keygen"
-
-RDEPENDS_openssh += " openssh-scp openssh-ssh openssh-sshd ssh-keygen "
-DEPENDS_openssh-sshd += " update-rc.d"
-RDEPENDS_openssh-sshd += " update-rc.d ssh-keygen "
-
-pkg_postinst_openssh-sshd() {
-if test "x$D" != "x"; then
- exit 1
-else
- addgroup sshd
- adduser --system --home /var/run/sshd --no-create-home --disabled-password --ingroup sshd -s /bin/false sshd
- update-rc.d sshd defaults 9
-fi
-}
-
-pkg_postinst_openssh-scp() {
- update-alternatives --install ${bindir}/scp scp scp.${PN} 90
-}
-
-pkg_postinst_openssh-ssh() {
- update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90
-}
-
-pkg_postrm_openssh-ssh() {
- update-alternatives --remove ${bindir}/ssh ssh.${PN}
-}
-
-pkg_postrm_openssh-scp() {
- update-alternatives --remove ${bindir}/scp scp.${PN}
-}
-
-pkg_postrm_openssh-sshd() {
-if test "x$D" != "x"; then
- exit 1
-else
- ${sysconfdir}/init.d/sshd stop
- deluser sshd
- delgroup sshd
- update-rc.d -f sshd remove
-fi
-}
-
-CONFFILES_openssh-sshd = "${sysconfdir}/ssh/sshd_config"
-CONFFILES_openssh-ssh = "${sysconfdir}/ssh/ssh_config"
+ file://ssh_config \
+ file://init \
+ "
+PR = "r6"
diff --git a/recipes/openssh/openssh_5.2p1.bb b/recipes/openssh/openssh_5.2p1.bb
new file mode 100644
index 0000000000..55227ca8ee
--- /dev/null
+++ b/recipes/openssh/openssh_5.2p1.bb
@@ -0,0 +1,9 @@
+require openssh.inc
+DEFAULT_PREFERENCE = "-1"
+#not tested extensively(I tested only ssh) and it's an important recipe I'm afraid to broke
+SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
+ file://sshd_config \
+ file://ssh_config \
+ file://init \
+ file://openssh-5.2-sftp-server-nolibcrypto.patch;patch=1 \
+ "
diff --git a/recipes/openssl/openssl.inc b/recipes/openssl/openssl.inc
index 2ec1d91e7a..e6e345b43b 100644
--- a/recipes/openssl/openssl.inc
+++ b/recipes/openssl/openssl.inc
@@ -49,7 +49,7 @@ do_configure () {
linux-i486)
target=debian-i386-i486
;;
- linux-i586)
+ linux-i586 | linux-viac3)
target=debian-i386-i586
;;
linux-i686)
@@ -73,7 +73,11 @@ do_configure () {
esac
# inject machine-specific flags
sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure
- perl ./Configure shared --prefix=${prefix} --openssldir=${libdir}/ssl $target
+ useprefix=${prefix}
+ if [ "x$useprefix" == "x" ]; then
+ useprefix=/
+ fi
+ perl ./Configure shared --prefix=$useprefix --openssldir=${libdir}/ssl $target
}
do_compile () {
diff --git a/recipes/openswan/openswan_2.2.0.bb b/recipes/openswan/openswan_2.2.0.bb
index b1c5271b13..bcf5a28756 100644
--- a/recipes/openswan/openswan_2.2.0.bb
+++ b/recipes/openswan/openswan_2.2.0.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.openswan.org"
LICENSE = "GPLv2"
DEPENDS = "gmp flex-native"
RRECOMMENDS = "kernel-module-ipsec"
-RDEPENDS_nylon = "perl"
+RDEPENDS_append_nylon = "perl"
PR = "r5"
SRC_URI = "http://www.openswan.org/download/old/openswan-${PV}.tar.gz \
diff --git a/recipes/openswan/openswan_2.4.7.bb b/recipes/openswan/openswan_2.4.7.bb
index 353e0eacdd..28e599b282 100644
--- a/recipes/openswan/openswan_2.4.7.bb
+++ b/recipes/openswan/openswan_2.4.7.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.openswan.org"
LICENSE = "GPLv2"
DEPENDS = "gmp flex-native"
RRECOMMENDS = "kernel-module-ipsec"
-RDEPENDS_nylon = "perl"
+RDEPENDS_append_nylon = "perl"
PR = "r0"
SRC_URI = "http://www.openswan.org/download/openswan-${PV}.tar.gz \
diff --git a/recipes/opie-packagemanager/files/opkg.patch b/recipes/opie-packagemanager/files/opkg.patch
new file mode 100644
index 0000000000..bf6b18ab69
--- /dev/null
+++ b/recipes/opie-packagemanager/files/opkg.patch
@@ -0,0 +1,562 @@
+Index: packagemanager/installdlg.cpp
+===================================================================
+RCS file: /cvs/opie/noncore/settings/packagemanager/installdlg.cpp,v
+retrieving revision 1.16
+diff -u -d -r1.16 installdlg.cpp
+--- packagemanager/installdlg.cpp 5 Jun 2005 22:41:15 -0000 1.16
++++ packagemanager/installdlg.cpp 18 May 2009 21:03:02 -0000
+@@ -45,6 +45,7 @@
+ #include <qmap.h>
+ #include <qmultilineedit.h>
+ #include <qpushbutton.h>
++#include <qprogressbar.h>
+
+ #include <sys/vfs.h>
+
+@@ -130,16 +131,21 @@
+ groupBoxLayout->addWidget( m_output );
+ layout->addMultiCellWidget( groupBox, 2, 2, 0, 1 );
+
++ m_progressBar = new QProgressBar( this );
++ m_progressBar->setTotalSteps( 100 );
++ m_progressBar->hide();
++ layout->addMultiCellWidget( m_progressBar, 3, 3, 0, 1 );
++
+ m_btnStart = new QPushButton( Opie::Core::OResource::loadPixmap( "packagemanager/apply",
+ Opie::Core::OResource::SmallIcon ), tr( "Start" ), this );
+ m_btnStart->setMinimumHeight( AppLnk::smallIconSize() );
+- layout->addWidget( m_btnStart, 3, 0 );
++ layout->addWidget( m_btnStart, 4, 0 );
+ connect( m_btnStart, SIGNAL(clicked()), this, SLOT(slotBtnStart()) );
+
+ m_btnOptions = new QPushButton( Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ),
+ tr( "Options" ), this );
+ m_btnOptions->setMinimumHeight( AppLnk::smallIconSize() );
+- layout->addWidget( m_btnOptions, 3, 1 );
++ layout->addWidget( m_btnOptions, 4, 1 );
+ connect( m_btnOptions, SIGNAL( clicked() ), this, SLOT(slotBtnOptions()) );
+
+ // Display packages being acted upon in output widget
+@@ -251,13 +257,23 @@
+ m_btnStart->setEnabled( false );
+ }
+
++ connect( m_packman, SIGNAL(signalProgress(const QString &, int)), this, SLOT(slotProgress(const QString &, int)) );
++
++ m_progressBar->show();
++
+ for ( m_currCommand = 0; m_currCommand < m_numCommands; m_currCommand++ )
+ {
++ m_progressBar->reset();
+ // Execute next command
+ m_packman->executeCommand( m_command[ m_currCommand ], m_packages[ m_currCommand ], dest,
+ this, SLOT(slotOutput(const QString &)), true );
+ }
+
++ slotOutput( tr("Completed") );
++ m_progressBar->hide();
++
++ disconnect( m_packman, SIGNAL(signalProgress(const QString &, int)), this, SLOT(slotProgress(const QString &, int)) );
++
+ // All commands executed, allow user to close dialog
+ m_btnStart->setEnabled( true );
+ m_btnStart->setText( tr( "Close" ) );
+@@ -314,3 +330,15 @@
+ // Update available space
+ slotDisplayAvailSpace( QString::null );
+ }
++
++void InstallDlg::slotProgress( const QString &msg, int percentage )
++{
++ static QString lastmsg = "";
++ if( lastmsg != msg ) {
++ slotOutput( msg );
++ lastmsg = msg;
++ }
++
++ m_progressBar->setProgress( percentage );
++}
++
+Index: packagemanager/installdlg.h
+===================================================================
+RCS file: /cvs/opie/noncore/settings/packagemanager/installdlg.h,v
+retrieving revision 1.9
+diff -u -d -r1.9 installdlg.h
+--- packagemanager/installdlg.h 5 Jun 2005 22:18:10 -0000 1.9
++++ packagemanager/installdlg.h 18 May 2009 21:03:02 -0000
+@@ -39,6 +39,7 @@
+ class QLabel;
+ class QMultiLineEdit;
+ class QPushButton;
++class QProgressBar;
+
+ class OConfItem;
+ class OPackageManager;
+@@ -69,6 +70,7 @@
+ QMultiLineEdit *m_output; // Multi-line edit to display status
+ QPushButton *m_btnStart; // Start/abort/close button
+ QPushButton *m_btnOptions; // Installation options button
++ QProgressBar *m_progressBar;
+
+ // Commands and packages to execute
+ int m_numCommands; // Number of commands to be executed
+@@ -85,6 +87,7 @@
+
+ // Execution slots
+ void slotOutput( const QString &msg );
++ void slotProgress( const QString &msg, int percentage );
+
+ signals:
+ void closeInstallDlg();
+Index: packagemanager/mainwindow.cpp
+===================================================================
+RCS file: /cvs/opie/noncore/settings/packagemanager/mainwindow.cpp,v
+retrieving revision 1.18
+diff -u -d -r1.18 mainwindow.cpp
+--- packagemanager/mainwindow.cpp 5 Jun 2005 22:41:15 -0000 1.18
++++ packagemanager/mainwindow.cpp 18 May 2009 21:03:02 -0000
+@@ -178,8 +178,8 @@
+ QAction *actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 );
+ actionDownload->setWhatsThis( tr( "Tap here to download the currently selected package(s)." ) );
+ connect( actionDownload, SIGNAL(activated()), this, SLOT(slotDownload()) );
+- actionDownload->addTo( popup );
+- actionDownload->addTo( &m_toolBar );
++//X actionDownload->addTo( popup );
++//X actionDownload->addTo( &m_toolBar );
+
+ a = new QAction( tr( "Apply changes" ), Opie::Core::OResource::loadPixmap( "packagemanager/apply",
+ Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
+Index: packagemanager/oipkg.cpp
+===================================================================
+RCS file: /cvs/opie/noncore/settings/packagemanager/oipkg.cpp,v
+retrieving revision 1.25
+diff -u -d -r1.25 oipkg.cpp
+--- packagemanager/oipkg.cpp 11 May 2009 21:55:52 -0000 1.25
++++ packagemanager/oipkg.cpp 18 May 2009 21:03:03 -0000
+@@ -39,21 +39,60 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+
+-extern "C" {
+-#include <libipkg.h>
+-};
+-args_t m_ipkgArgs; // libipkg configuration arguments
+-
+-const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file
+-const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files
+-const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists
+-const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location
+-const QString IPKG_INFO_PATH = "usr/lib/ipkg/info"; // Package file lists location
++const QString IPKG_CONF = "/etc/opkg.conf"; // Fully-qualified name of Ipkg primary configuration file
++const QString IPKG_CONF_DIR = "/etc/opkg"; // Directory of secondary Ipkg configuration files
++const QString IPKG_PKG_PATH = "/usr/lib/opkg/lists"; // Directory containing server package lists
++const QString IPKG_STATUS_PATH = "usr/lib/opkg/status"; // Destination status file location
++const QString IPKG_INFO_PATH = "usr/lib/opkg/info"; // Package file lists location
+
+ OIpkg *oipkg;
+
+ // Ipkg callback functions
+
++
++void fsignalOpkgProgress (opkg_t *opkg, const opkg_progress_data_t *progress, void *user_data)
++{
++ QString msg;
++
++ QString pkginfo;
++ if( progress->package ) {
++ pkginfo = progress->package->name;
++ pkginfo += " ";
++ pkginfo += progress->package->version;
++ }
++ switch( progress->action ) {
++ case OPKG_INSTALL:
++ if( pkginfo != "" )
++ msg = QObject::tr("Installing %1").arg( pkginfo );
++ else
++ msg = QObject::tr("Installing");
++ break;
++ case OPKG_REMOVE:
++ if( pkginfo != "" )
++ msg = QObject::tr("Removing %1").arg( pkginfo );
++ else
++ msg = QObject::tr("Removing");
++ break;
++ case OPKG_DOWNLOAD:
++ if( pkginfo != "" )
++ msg = QObject::tr("Downloading %1").arg( pkginfo );
++ else
++ msg = QObject::tr("Downloading");
++ break;
++ default:
++ msg = QObject::tr("Processing");
++ }
++ msg += "...";
++ oipkg->progress( (const char *)msg, progress->percentage );
++}
++
++void fsignalOpkgPackage (opkg_t *opkg, opkg_package_t *package, void *user_data)
++{
++
++}
++
++
++/*X
+ int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg )
+ {
+ // Display message only if it is below the message level threshold
+@@ -64,6 +103,7 @@
+
+ return 0;
+ }
++*/
+
+ char *fIpkgResponse( char */*question*/ )
+ {
+@@ -76,13 +116,41 @@
+ return 0;
+ }
+
+-int fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_t /*status*/,
+- void */*userdata*/ )
++QString opkg_error_message( int err )
+ {
+- oipkg->ipkgList( desc );
+- return 0;
++ switch(err) {
++ case OPKG_NO_ERROR:
++ return "Success";
++ case OPKG_UNKNOWN_ERROR:
++ return "Unknown error";
++ case OPKG_DOWNLOAD_FAILED:
++ return "Download failed";
++ case OPKG_DEPENDENCIES_FAILED:
++ return "Unable to complete operation due to dependencies";
++ case OPKG_PACKAGE_ALREADY_INSTALLED:
++ return "Specified package is already installed";
++ case OPKG_PACKAGE_NOT_AVAILABLE:
++ return "Specified package is not available";
++ case OPKG_PACKAGE_NOT_FOUND:
++ return "Specified package could not be found";
++ case OPKG_PACKAGE_NOT_INSTALLED:
++ return "Specified package is not installed";
++ case OPKG_GPG_ERROR:
++ return "GPG verification failed";
++ case OPKG_MD5_ERROR:
++ return "MD5 verification failed";
++ default:
++ return "Unrecognised error code";
++ }
+ }
+
++//Xint fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_t /*status*/,
++//X void */*userdata*/ )
++//X{
++//X oipkg->ipkgList( desc );
++//X return 0;
++//X}
++
+ OIpkg::OIpkg( Config *config, QObject *parent, const char *name )
+ : QObject( parent, name )
+ , m_config( config )
+@@ -94,11 +162,7 @@
+ oipkg = this;
+
+ // Initialize libipkg
+- ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs );
+-
+- // Default ipkg run-time arguments
+- m_ipkgArgs.noaction = false;
+- m_ipkgArgs.force_defaults = true;
++ m_opkg = opkg_new();
+ }
+
+ OIpkg::~OIpkg()
+@@ -108,7 +172,7 @@
+ m_confInfo->setAutoDelete( true );
+
+ // Free up libipkg resources
+- ipkg_deinit( &m_ipkgArgs );
++ opkg_free( m_opkg );
+ }
+
+ OConfItemList *OIpkg::configItems()
+@@ -237,10 +301,7 @@
+ }
+
+ // Reinitialize libipkg to pick up new configuration
+- ipkg_deinit( &m_ipkgArgs );
+- ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs );
+- m_ipkgArgs.noaction = false;
+- m_ipkgArgs.force_defaults = true;
++ opkg_re_read_config_files( m_opkg );
+ }
+
+ void OIpkg::saveSettings()
+@@ -430,17 +491,29 @@
+ bool OIpkg::executeCommand( OPackage::Command command, const QStringList &parameters, const QString &destination,
+ const QObject *receiver, const char *slotOutput, bool rawOutput )
+ {
++ int optvalue;
++
+ if ( command == OPackage::NotDefined )
+ return false;
+
+ // Set ipkg run-time options/arguments
+- m_ipkgArgs.force_depends = ( m_ipkgExecOptions & FORCE_DEPENDS );
+- m_ipkgArgs.force_reinstall = ( m_ipkgExecOptions & FORCE_REINSTALL );
+- // TODO m_ipkgArgs.force_remove = ( m_ipkgExecOptions & FORCE_REMOVE );
+- m_ipkgArgs.force_overwrite = ( m_ipkgExecOptions & FORCE_OVERWRITE );
+- m_ipkgArgs.force_removal_of_dependent_packages = ( m_ipkgExecOptions & FORCE_RECURSIVE );
++ optvalue = ( m_ipkgExecOptions & FORCE_DEPENDS ) ? 1 : 0;
++ opkg_set_option( m_opkg, "force_depends", &optvalue );
++
++ optvalue = ( m_ipkgExecOptions & FORCE_REINSTALL ) ? 1 : 0;
++ opkg_set_option( m_opkg, "force_reinstall", &optvalue );
++
++ optvalue = ( m_ipkgExecOptions & FORCE_OVERWRITE ) ? 1 : 0;
++ opkg_set_option( m_opkg, "force_overwrite", &optvalue );
++
++ optvalue = ( m_ipkgExecOptions & FORCE_RECURSIVE ) ? 1 : 0;
++ opkg_set_option( m_opkg, "force_removal_of_dependent_packages", &optvalue );
++
++ optvalue = m_ipkgExecVerbosity;
++ opkg_set_option( m_opkg, "verbosity", &optvalue );
++
++/*X // TODO m_ipkgArgs.force_remove = ( m_ipkgExecOptions & FORCE_REMOVE );
+ m_ipkgArgs.verbose_wget = ( m_ipkgExecOptions & FORCE_VERBOSE_WGET );
+- m_ipkgArgs.verbosity = m_ipkgExecVerbosity;
+ if ( m_ipkgArgs.dest )
+ free( m_ipkgArgs.dest );
+ if ( !destination.isNull() )
+@@ -452,7 +525,7 @@
+ }
+ else
+ m_ipkgArgs.dest = 0l;
+-
++*/
+ // Connect output signal to widget
+
+ if ( !rawOutput )
+@@ -460,17 +533,29 @@
+ // TODO - connect to local slot and parse output before emitting signalIpkgMessage
+ }
+
++ int ret = 0;
++
+ switch( command )
+ {
+ case OPackage::Update : {
+ connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
+- ipkg_lists_update( &m_ipkgArgs );
++ ret = opkg_update_package_lists( m_opkg, &fsignalOpkgProgress, NULL );
+ disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
++
++ if( ret != OPKG_NO_ERROR ) {
++ emit signalIpkgMessage( tr("Update failed: ") + opkg_error_message( ret ) );
++ return false;
++ }
+ };
+ break;
+ case OPackage::Upgrade : {
+ connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
+- ipkg_packages_upgrade( &m_ipkgArgs );
++ ret = opkg_upgrade_all( m_opkg, &fsignalOpkgProgress, NULL );
++ if( ret != OPKG_NO_ERROR ) {
++ emit signalIpkgMessage( tr("Upgrade failed: ") + opkg_error_message( ret ) );
++ disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
++ return false;
++ }
+
+ // Re-link non-root destinations to make sure everything is in sync
+ OConfItemList *destList = destinations();
+@@ -489,7 +574,12 @@
+ connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
+ for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
+ {
+- ipkg_packages_install( &m_ipkgArgs, (*it) );
++ ret = opkg_install_package( m_opkg, (*it), &fsignalOpkgProgress, NULL );
++ if( ret != OPKG_NO_ERROR ) {
++ emit signalIpkgMessage( tr("Install failed: ") + opkg_error_message( ret ) );
++ disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
++ return false;
++ }
+ }
+ if ( destination != "root" )
+ linkPackageDir( destination );
+@@ -505,7 +595,18 @@
+ for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
+ {
+ unlinkPackage( (*it), destList );
+- ipkg_packages_remove( &m_ipkgArgs, (*it), true );
++ ret = opkg_remove_package( m_opkg, (*it), &fsignalOpkgProgress, NULL );
++ if( ret != OPKG_NO_ERROR ) {
++ if ( ret == OPKG_DEPENDENCIES_FAILED || ret == OPKG_UNKNOWN_ERROR ) {
++ emit signalIpkgMessage( tr("Remove failed: other package(s) depend on the specified package") );
++ }
++ else {
++ emit signalIpkgMessage( tr("Remove failed: ") + opkg_error_message( ret ) );
++ }
++ delete destList;
++ disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
++ return false;
++ }
+ }
+
+ delete destList;
+@@ -516,20 +617,38 @@
+ connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
+ for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
+ {
+- ipkg_packages_download( &m_ipkgArgs, (*it) );
++//X ipkg_packages_download( &m_ipkgArgs, (*it) );
+ }
+ disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
+ };
+ break;
+ case OPackage::Info : {
+ connect( this, SIGNAL(signalIpkgStatus(const QString &)), receiver, slotOutput );
+- ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0l );
++//X ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0l );
++ opkg_package_t *pkginfo = opkg_find_package( m_opkg, (*parameters.begin()), NULL, NULL, NULL );
++ if(pkginfo) {
++ QString msg = tr("Package: %1\n").arg( pkginfo->name );
++ msg += tr("Version: %1\n").arg( pkginfo->version );
++ msg += tr("Architecture: %1\n").arg( pkginfo->architecture );
++ if( pkginfo->repository )
++ msg += tr("Repository: %1\n").arg( pkginfo->repository );
++ if( pkginfo->description )
++ msg += tr("Description: %1\n\n").arg( pkginfo->description );
++ if( pkginfo->tags )
++ msg += tr("Tags: %1\n").arg( pkginfo->tags );
++ if( pkginfo->url )
++ msg += tr("URL: %1\n").arg( pkginfo->url );
++ if( pkginfo->size > 0 )
++ msg += tr("Size: %1\n").arg( pkginfo->size );
++ msg += tr("Status: %1").arg( pkginfo->installed ? tr("installed") : "" );
++ emit signalIpkgStatus( msg );
++ }
+ disconnect( this, SIGNAL(signalIpkgStatus(const QString &)), 0, 0 );
+ };
+ break;
+ case OPackage::Files : {
+ connect( this, SIGNAL(signalIpkgList(const QString &)), receiver, slotOutput );
+- ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0l );
++//X ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0l );
+ disconnect( this, SIGNAL(signalIpkgList(const QString &)), 0, 0 );
+ };
+ break;
+@@ -539,7 +658,7 @@
+ return true;
+ }
+
+-void OIpkg::ipkgMessage( char *msg )
++void OIpkg::ipkgMessage( const char *msg )
+ {
+ emit signalIpkgMessage( msg );
+ }
+@@ -554,6 +673,11 @@
+ emit signalIpkgList( filelist );
+ }
+
++void OIpkg::progress( const QString &msg, int percentage )
++{
++ emit signalProgress( msg, percentage );
++}
++
+ void OIpkg::loadConfiguration()
+ {
+ if ( m_confInfo )
+Index: packagemanager/oipkg.h
+===================================================================
+RCS file: /cvs/opie/noncore/settings/packagemanager/oipkg.h,v
+retrieving revision 1.10
+diff -u -d -r1.10 oipkg.h
+--- packagemanager/oipkg.h 17 May 2009 21:33:07 -0000 1.10
++++ packagemanager/oipkg.h 18 May 2009 21:03:03 -0000
+@@ -38,6 +38,10 @@
+
+ #include <qobject.h>
+
++extern "C" {
++#include <opkg.h>
++};
++
+ // Ipkg execution options (m_ipkgExecOptions)
+ #define FORCE_DEPENDS 0x0001
+ #define FORCE_REMOVE 0x0002
+@@ -86,9 +90,11 @@
+ bool rawOutput = true );
+ void abortCommand();
+
+- void ipkgMessage( char *msg );
++ void ipkgMessage( const char *msg );
+ void ipkgStatus( char *status );
+ void ipkgList( char *filelist );
++ void progressInit();
++ void progress( const QString &msg, int percentage );
+
+ private:
+ Config *m_config; // Pointer to application configuration file
+@@ -96,6 +102,7 @@
+ int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options
+ int m_ipkgExecVerbosity; // Ipkg execution verbosity level
+ QString m_rootPath; // Directory path where the 'root' destination is located
++ opkg_t *m_opkg;
+
+ void loadConfiguration();
+ OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined );
+@@ -108,6 +115,8 @@
+ void signalIpkgMessage( const QString &msg );
+ void signalIpkgStatus( const QString &status );
+ void signalIpkgList( const QString &filelist );
++ void signalProgressInit();
++ void signalProgress( const QString &msg, int percentage );
+ };
+
+ #endif
+Index: packagemanager/opackagemanager.cpp
+===================================================================
+RCS file: /cvs/opie/noncore/settings/packagemanager/opackagemanager.cpp,v
+retrieving revision 1.10
+diff -u -d -r1.10 opackagemanager.cpp
+--- packagemanager/opackagemanager.cpp 5 Jun 2005 22:18:10 -0000 1.10
++++ packagemanager/opackagemanager.cpp 18 May 2009 21:03:03 -0000
+@@ -43,6 +43,7 @@
+ , m_categories()
+ {
+ m_packages.setAutoDelete( true );
++ connect( &m_ipkg, SIGNAL(signalProgress(const QString &, int)), this, SIGNAL(signalProgress(const QString &, int)) );
+ }
+
+ void OPackageManager::loadAvailablePackages()
+Index: packagemanager/opackagemanager.h
+===================================================================
+RCS file: /cvs/opie/noncore/settings/packagemanager/opackagemanager.h,v
+retrieving revision 1.6
+diff -u -d -r1.6 opackagemanager.h
+--- packagemanager/opackagemanager.h 5 Jun 2005 22:18:10 -0000 1.6
++++ packagemanager/opackagemanager.h 18 May 2009 21:03:03 -0000
+@@ -89,6 +89,7 @@
+ void initStatus( int numSteps );
+ void statusText( const QString &status );
+ void statusBar( int currStep );
++ void signalProgress( const QString &msg, int percentage );
+ };
+
+ #endif
+Index: packagemanager/packagemanager.pro
+===================================================================
+RCS file: /cvs/opie/noncore/settings/packagemanager/packagemanager.pro,v
+retrieving revision 1.9
+diff -u -d -r1.9 packagemanager.pro
+--- packagemanager/packagemanager.pro 24 Dec 2004 20:13:38 -0000 1.9
++++ packagemanager/packagemanager.pro 18 May 2009 21:03:03 -0000
+@@ -29,7 +29,7 @@
+ TARGET = packagemanager
+ INCLUDEPATH += $(OPIEDIR)/include
+ DEPENDPATH += $(OPIEDIR)/include
+-LIBS += -lqpe -lopiecore2 -lopieui2 -lipkg
++LIBS += -lqpe -lopiecore2 -lopieui2 -lopkg
+
+ include( $(OPIEDIR)/include.pro )
+
diff --git a/recipes/opie-packagemanager/files/split-config.patch b/recipes/opie-packagemanager/files/split-config.patch
new file mode 100644
index 0000000000..5abe5433aa
--- /dev/null
+++ b/recipes/opie-packagemanager/files/split-config.patch
@@ -0,0 +1,334 @@
+# NOTE: This patch has been applied upstream and will be included in 1.2.5
+# - Paul Eggleton <bluelightning@bluelightning.org>
+--- packagemanager/oipkg.cpp 2009-05-11 23:06:48.000000000 +0100
++++ packagemanager/oipkg.cpp 2009-05-11 23:06:50.000000000 +0100
+@@ -30,6 +30,8 @@
+
+ #include "oipkg.h"
+
++#include <opie2/odebug.h>
++
+ #include <qdir.h>
+ #include <qfile.h>
+ #include <qtextstream.h>
+@@ -133,6 +135,26 @@
+ return filterConfItems( OConfItem::Option );
+ }
+
++void OIpkg::defaultConfItemFile( OConfItem *item )
++{
++ if( item->file().isNull() )
++ {
++ switch ( item->type() )
++ {
++ case OConfItem::Source :
++ case OConfItem::Destination :
++ item->setFile( IPKG_CONF_DIR + "/" + item->name() + ".conf" );
++ break;
++ case OConfItem::Arch :
++ item->setFile( IPKG_CONF_DIR + "/arch.conf" );
++ break;
++ default :
++ item->setFile( IPKG_CONF );
++ break;
++ };
++ }
++}
++
+ void OIpkg::setConfigItems( OConfItemList *configList )
+ {
+ if ( m_confInfo )
+@@ -140,84 +162,78 @@
+
+ m_confInfo = configList;
+
+- // Write out new /etc/ipkg.conf
+- QFile confFile( IPKG_CONF );
+- if ( confFile.open( IO_WriteOnly ) )
++ // Write out new config files
++ QString lastFile = "";
++ QFile *confFile = NULL;
++ QTextStream *confStream = NULL;
++ OConfItemListIterator it( *m_confInfo );
++ for ( ; it.current(); ++it )
+ {
+- QTextStream confStream( &confFile );
+- confStream << "# Generated by Opie Package Manager\n\n";
++ OConfItem *item = it.current();
+
+- OConfItemListIterator it( *m_confInfo );
+- for ( ; it.current(); ++it )
++ // Only write out valid conf items
++ if ( item->type() != OConfItem::NotDefined )
+ {
+- OConfItem *item = it.current();
++ if ( lastFile != item->file() ) {
++ if ( confFile ) {
++ confFile->close();
++ delete confStream;
++ delete confFile;
++ }
++ odebug << "Opening " << item->file() << oendl;
++ confFile = new QFile( item->file() );
++ if ( ! confFile->open( IO_WriteOnly ) ) {
++ owarn << "Failed to open " << item->file() << oendl;
++ delete confFile;
++ confFile = NULL;
++ break;
++ }
++ lastFile = item->file();
++
++ confStream = new QTextStream( confFile );
++// (*confStream) << "# Generated by Opie Package Manager\n\n";
++ }
+
+- // Only write out valid conf items
+- if ( item->type() != OConfItem::NotDefined )
+- {
+- QString confLine;
+- QString name = item->name();
+- if ( !item->active() )
+- confLine = "#";
++ QString confLine;
++ QString name = item->name();
++ if ( !item->active() )
++ confLine = "#";
+
+- switch ( item->type() )
++ switch ( item->type() )
++ {
++ case OConfItem::Source :
+ {
+- case OConfItem::Source :
+- {
+- if ( item->features().contains( "Compressed" ) )
+- confLine.append( "src/gz" );
+- else
+- confLine.append( "src" );
+- }
+- break;
+- case OConfItem::Destination : confLine.append( "dest" ); break;
+- case OConfItem::Option : confLine.append( "option" ); break;
+- case OConfItem::Arch : confLine.append( "arch" ); break;
+- case OConfItem::Other :
+- {
+- // For options w/type = Other, the mapping is as follows:
+- // name = typeStr (e.g. "lists_dir")
+- // value = value
+- // features = name (from configuration file)
+- confLine.append( item->name() );
+- name = item->features();
+- }
+- break;
+- default : break;
+- };
++ if ( item->features().contains( "Compressed" ) )
++ confLine.append( "src/gz" );
++ else
++ confLine.append( "src" );
++ }
++ break;
++ case OConfItem::Destination : confLine.append( "dest" ); break;
++ case OConfItem::Option : confLine.append( "option" ); break;
++ case OConfItem::Arch : confLine.append( "arch" ); break;
++ case OConfItem::Other :
++ {
++ // For options w/type = Other, the mapping is as follows:
++ // name = typeStr (e.g. "lists_dir")
++ // value = value
++ // features = name (from configuration file)
++ confLine.append( item->name() );
++ name = item->features();
++ }
++ break;
++ default : break;
++ };
+
+- confStream << confLine << " " << name << " " << item->value() << "\n";
+- }
++ (*confStream) << confLine << " " << name << " " << item->value() << "\n";
+ }
+
+- confFile.close();
+ }
+- else
+- {
+- // Problem writing to /etc/ipkg.conf, exit before removing other conf files
+- return;
+- }
+-
+- // Delete /etc/ipkg/*.conf files (/etc/ipkg.conf should now have all settings
+- QStringList confFiles;
+- QDir confDir( IPKG_CONF_DIR );
+- if ( confDir.exists() )
+- {
+- confDir.setNameFilter( "*.conf" );
+- confDir.setFilter( QDir::Files );
+- confFiles = confDir.entryList( "*.conf", QDir::Files );
+-
+- QStringList::Iterator lastFile = confFiles.end();
+- for ( QStringList::Iterator it = confFiles.begin(); it != lastFile; ++it )
+- {
+- // Create absolute file path if necessary
+- QString absFile = (*it);
+- if ( !absFile.startsWith( "/" ) )
+- absFile.prepend( QString( IPKG_CONF_DIR ) + "/" );
+
+- // Delete file
+- QFile::remove( absFile );
+- }
++ if ( confFile ) {
++ confFile->close();
++ delete confStream;
++ delete confFile;
+ }
+
+ // Reinitialize libipkg to pick up new configuration
+@@ -638,7 +654,7 @@
+
+ // Add to list
+ if ( recognizedOption )
+- m_confInfo->append( new OConfItem( type, name, value, features, active ) );
++ m_confInfo->append( new OConfItem( type, name, value, features, absFile, active ) );
+ }
+ }
+
+--- packagemanager/oconfitem.cpp 2009-05-11 23:09:00.000000000 +0100
++++ packagemanager/oconfitem.cpp 2009-05-11 23:09:02.000000000 +0100
+@@ -31,11 +31,12 @@
+ #include "oconfitem.h"
+
+ OConfItem::OConfItem( Type type, const QString &name, const QString &value,
+- const QString &features, bool active )
++ const QString &features, const QString &file, bool active )
+ : m_type( type )
+ , m_name( name )
+ , m_value( value )
+ , m_features( features )
++ , m_file( file )
+ , m_active( active )
+ {
+ }
+--- packagemanager/oconfitem.h 2009-05-11 23:08:43.000000000 +0100
++++ packagemanager/oconfitem.h 2009-05-11 23:08:45.000000000 +0100
+@@ -41,18 +41,20 @@
+
+ OConfItem( Type type = NotDefined, const QString &name = QString::null,
+ const QString &value = QString::null, const QString &features = QString::null,
+- bool active = true );
++ const QString &file = QString::null, bool active = true );
+
+ Type type() { return m_type; }
+ const QString &name() { return m_name; }
+ const QString &value() { return m_value; }
+ const QString &features() { return m_features; }
++ const QString &file() { return m_file; }
+ bool active() { return m_active; }
+
+ void setType( Type type ) { m_type = type; }
+ void setName( const QString &name ) { m_name = name; }
+ void setValue( const QString &value ) { m_value = value; }
+ void setFeatures( const QString &features ) { m_features = features; }
++ void setFile( const QString &file ) { m_file = file; }
+ void setActive( bool active ) { m_active = active; }
+
+ private:
+@@ -60,6 +62,7 @@
+ QString m_name; // Name of item
+ QString m_value; // Value of item
+ QString m_features; // Comma-deliminated list of features this item supports
++ QString m_file; // File this item came from
+ bool m_active; // Indicates whether item is currently active
+ };
+
+@@ -69,23 +72,32 @@
+
+ int compareItems( QCollection::Item item1, QCollection::Item item2 )
+ {
+- // Sort by OConfItem location then by type
+- OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type();
+- OConfItem::Type type2 = reinterpret_cast<OConfItem*>(item2)->type();
+- if ( type1 < type2 )
++ // Sort by OConfItem file, name, then by type
++ QString file1 = reinterpret_cast<OConfItem*>(item1)->file();
++ QString file2 = reinterpret_cast<OConfItem*>(item2)->file();
++ if ( file1 < file2 )
+ return -1;
+- else if ( type1 == type2 )
++ else if ( file1 == file2 )
+ {
+- QString name1 = reinterpret_cast<OConfItem*>(item1)->name();
+- QString name2 = reinterpret_cast<OConfItem*>(item2)->name();
+- if ( name1 < name2 )
++ OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type();
++ OConfItem::Type type2 = reinterpret_cast<OConfItem*>(item2)->type();
++ if ( type1 < type2 )
+ return -1;
+- else if ( name1 == name2 )
+- return 0;
+- else /*if ( name1 > name2 )*/
++ else if ( type1 == type2 )
++ {
++ QString name1 = reinterpret_cast<OConfItem*>(item1)->name();
++ QString name2 = reinterpret_cast<OConfItem*>(item2)->name();
++ if ( name1 < name2 )
++ return -1;
++ else if ( name1 == name2 )
++ return 0;
++ else /*if ( name1 > name2 )*/
++ return 1;
++ }
++ else /*if ( type1 > type2 )*/
+ return 1;
+ }
+- else /*if ( type1 > type2 )*/
++ else /*if ( file1 > file2 )*/
+ return 1;
+ }
+ };
+--- packagemanager/oipkgconfigdlg.cpp 2009-05-11 23:08:21.000000000 +0100
++++ packagemanager/oipkgconfigdlg.cpp 2009-05-11 23:08:23.000000000 +0100
+@@ -99,7 +99,7 @@
+ }
+ else
+ m_configs->append( new OConfItem( OConfItem::Option, "http_proxy",
+- m_proxyHttpServer->text(), QString::null,
++ m_proxyHttpServer->text(), QString::null, QString::null,
+ m_proxyHttpActive->isChecked() ) );
+
+ confItem = m_ipkg->findConfItem( OConfItem::Option, "ftp_proxy" );
+@@ -110,7 +110,7 @@
+ }
+ else
+ m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy",
+- m_proxyFtpServer->text(), QString::null,
++ m_proxyFtpServer->text(), QString::null, QString::null,
+ m_proxyFtpActive->isChecked() ) );
+
+ confItem = m_ipkg->findConfItem( OConfItem::Option, "proxy_username" );
+@@ -472,6 +472,7 @@
+ if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted )
+ {
+ // Add to configuration option list
++ m_ipkg->defaultConfItemFile( server );
+ m_configs->append( server );
+ m_configs->sort();
+
+@@ -532,6 +533,7 @@
+ if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted )
+ {
+ // Add to configuration option list
++ m_ipkg->defaultConfItemFile( dest );
+ m_configs->append( dest );
+ m_configs->sort();
+
+--- packagemanager/oipkg.h 16 Jan 2006 15:07:35 -0000 1.9
++++ packagemanager/oipkg.h 17 May 2009 21:26:55 -0000
+@@ -76,6 +76,7 @@
+
+ OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined,
+ const QString &name = QString::null );
++ void defaultConfItemFile( OConfItem *item );
+
+ bool executeCommand( OPackage::Command command = OPackage::NotDefined,
+ const QStringList &parameters = QStringList(),
diff --git a/recipes/opie-packagemanager/opie-packagemanager_1.2.4.bb b/recipes/opie-packagemanager/opie-packagemanager_1.2.4.bb
index 0b8f44981d..57c6ab5cfa 100644
--- a/recipes/opie-packagemanager/opie-packagemanager_1.2.4.bb
+++ b/recipes/opie-packagemanager/opie-packagemanager_1.2.4.bb
@@ -1,6 +1,13 @@
require ${PN}.inc
+PR = "r1"
+
+DEPENDS = "opkg"
+
+EXTRA_QMAKEVARS_PRE += "LIBIPK_INC_DIR=${STAGING_INCDIR}/libopkg"
SRC_URI = "${HANDHELDS_CVS};tag=${TAG};module=opie/noncore/settings/${APPNAME};cvsdate=${SRCDATE} \
${HANDHELDS_CVS};tag=${TAG};module=opie/pics;cvsdate=${SRCDATE} \
- ${HANDHELDS_CVS};tag=${TAG};module=opie/apps"
+ ${HANDHELDS_CVS};tag=${TAG};module=opie/apps \
+ file://split-config.patch;patch=1 \
+ file://opkg.patch;patch=1"
diff --git a/recipes/opie-sheet/opie-sheet/different-arg-names.patch b/recipes/opie-sheet/opie-sheet/different-arg-names.patch
new file mode 100644
index 0000000000..fa1a527cf6
--- /dev/null
+++ b/recipes/opie-sheet/opie-sheet/different-arg-names.patch
@@ -0,0 +1,13 @@
+# NOTE: This patch has been applied upstream and will be included in 1.2.5
+# - Paul Eggleton <bluelightning@bluelightning.org>
+--- opie-sheet/sheet.h 2009-05-25 07:47:12.042719009 +0200
++++ opie-sheet/sheet.h 2009-05-25 08:07:19.291516199 +0200
+@@ -209,7 +207,7 @@
+ void insertRows(int no=1, bool allColumns=TRUE);
+ void insertColumns(int no=1, bool allRows=TRUE);
+
+- void dataFindReplace(const QString &find, const QString &replace, bool matchCase=TRUE, bool allCells=TRUE, bool entireCell=FALSE, bool replace=FALSE, bool replaceAll=FALSE);
++ void dataFindReplace(const QString &find, const QString &replacestr, bool matchCase=TRUE, bool allCells=TRUE, bool entireCell=FALSE, bool replace=FALSE, bool replaceAll=FALSE);
+
+ // Static functions
+ static int getHeaderColumn(const QString &section);
diff --git a/recipes/opie-sheet/opie-sheet_1.2.4.bb b/recipes/opie-sheet/opie-sheet_1.2.4.bb
index ca0cdaff5a..b2cd1d213d 100644
--- a/recipes/opie-sheet/opie-sheet_1.2.4.bb
+++ b/recipes/opie-sheet/opie-sheet_1.2.4.bb
@@ -1,6 +1,8 @@
require ${PN}.inc
+PR = "r1"
SRC_URI = "${HANDHELDS_CVS};tag=${TAG};module=opie/noncore/apps/opie-sheet \
${HANDHELDS_CVS};tag=${TAG};module=opie/pics \
- ${HANDHELDS_CVS};tag=${TAG};module=opie/apps"
+ ${HANDHELDS_CVS};tag=${TAG};module=opie/apps \
+ file://different-arg-names.patch;patch=1 "
diff --git a/recipes/pango/pango-1.24.2/no-tests.patch b/recipes/pango/pango-1.24.2/no-tests.patch
new file mode 100644
index 0000000000..dafcb20c3b
--- /dev/null
+++ b/recipes/pango/pango-1.24.2/no-tests.patch
@@ -0,0 +1,10 @@
+--- /tmp/Makefile.am 2007-03-01 13:29:37.000000000 +0100
++++ pango-1.16.0/Makefile.am 2007-03-01 13:29:52.545251000 +0100
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to create Makefile.in.
+
+-SUBDIRS= pango modules pango-view examples docs tools tests
++SUBDIRS= pango modules pango-view examples docs tools
+
+ EXTRA_DIST = \
+ autogen.sh \
diff --git a/recipes/pango/pango_1.24.2.bb b/recipes/pango/pango_1.24.2.bb
new file mode 100644
index 0000000000..ce81d89263
--- /dev/null
+++ b/recipes/pango/pango_1.24.2.bb
@@ -0,0 +1,2 @@
+require pango.inc
+
diff --git a/recipes/pax-utils/pax-utils-native_0.1.13.bb b/recipes/pax-utils/pax-utils-native_0.1.13.bb
index 5a56c01aa4..633e0781f0 100644
--- a/recipes/pax-utils/pax-utils-native_0.1.13.bb
+++ b/recipes/pax-utils/pax-utils-native_0.1.13.bb
@@ -3,7 +3,7 @@ inherit native
require pax-utils_${PV}.bb
do_stage() {
- oe_runmake PREFIX=${STAGING_DIR_HOST}${layout_prefix} install
+ oe_runmake PREFIX=${STAGING_DIR_HOST}${layout_exec_prefix} install
}
do_install() {
diff --git a/recipes/pax-utils/pax-utils-native_0.1.19.bb b/recipes/pax-utils/pax-utils-native_0.1.19.bb
index 5a56c01aa4..633e0781f0 100644
--- a/recipes/pax-utils/pax-utils-native_0.1.19.bb
+++ b/recipes/pax-utils/pax-utils-native_0.1.19.bb
@@ -3,7 +3,7 @@ inherit native
require pax-utils_${PV}.bb
do_stage() {
- oe_runmake PREFIX=${STAGING_DIR_HOST}${layout_prefix} install
+ oe_runmake PREFIX=${STAGING_DIR_HOST}${layout_exec_prefix} install
}
do_install() {
diff --git a/recipes/pciutils/pciutils-3.1.2/gcc-3-compatibility.patch b/recipes/pciutils/pciutils-3.1.2/gcc-3-compatibility.patch
new file mode 100644
index 0000000000..3a10209323
--- /dev/null
+++ b/recipes/pciutils/pciutils-3.1.2/gcc-3-compatibility.patch
@@ -0,0 +1,11 @@
+--- pciutils-3.1.2/lib/Makefile-orig 2009-02-27 11:31:24.000000000 +0100
++++ pciutils-3.1.2/lib/Makefile 2009-02-27 11:31:32.000000000 +0100
+@@ -50,7 +50,7 @@
+ $(AR) rcs $@ $^
+ $(RANLIB) $@
+ else
+-CFLAGS += -fPIC -fvisibility=hidden
++CFLAGS += -fPIC
+ $(PCILIB): $(addsuffix .o,$(OBJS))
+ $(CC) -shared $(LDFLAGS) $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS)
+ endif
diff --git a/recipes/pciutils/pciutils_3.1.2.bb b/recipes/pciutils/pciutils_3.1.2.bb
index 25782a5549..d7458a1c7a 100644
--- a/recipes/pciutils/pciutils_3.1.2.bb
+++ b/recipes/pciutils/pciutils_3.1.2.bb
@@ -8,6 +8,7 @@ DEPENDS = "zlib"
SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.bz2 \
file://pciutils.patch;patch=1 "
+SRC_URI_append_nylon = "file://gcc-3-compatibility.patch;patch=1 "
PARALLEL_MAKE = ""
diff --git a/recipes/perl/perl-native_5.8.8.bb b/recipes/perl/perl-native_5.8.8.bb
index e3d73845fc..57e9e1c394 100644
--- a/recipes/perl/perl-native_5.8.8.bb
+++ b/recipes/perl/perl-native_5.8.8.bb
@@ -85,5 +85,11 @@ do_stage_append() {
install $i ${STAGING_LIBDIR_NATIVE}/perl/${PV}/CORE
done
}
+do_stage_append_nylon() {
+ # get rid of definitions not supported by the gcc version we use for nylon...
+ for i in ${STAGING_LIBDIR_NATIVE}/perl/${PV}/Config_heavy.pl ${STAGING_DIR_HOST}/perl/config.sh; do
+ perl -pi -e 's/-Wdeclaration-after-statement //g' ${i}
+ done
+}
PARALLEL_MAKE = ""
diff --git a/recipes/php/php_5.2.6.bb b/recipes/php/php_5.2.6.bb
index 2cf5e285e6..c6cb00fa0f 100644
--- a/recipes/php/php_5.2.6.bb
+++ b/recipes/php/php_5.2.6.bb
@@ -2,7 +2,7 @@ require php.inc
DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native"
-PR = "r4"
+PR = "r5"
SRC_URI += "file://pear-makefile.patch;patch=1 "
@@ -17,6 +17,7 @@ EXTRA_OECONF = " --without-iconv \
--enable-wddx \
--enable-embedded-mysqli \
--enable-magic-quotes \
+ --enable-fastcgi \
--with-zlib --with-zlib-dir=${STAGING_LIBDIR}/.. \
--with-libxml-dir=${STAGING_BINDIR_CROSS} \
# --with-mysql="${STAGING_DIR_TARGET}${layout_exec_prefix}" \
diff --git a/recipes/pidgin/pidgin.inc b/recipes/pidgin/pidgin.inc
index 913cf1c248..7b2f350ce2 100644
--- a/recipes/pidgin/pidgin.inc
+++ b/recipes/pidgin/pidgin.inc
@@ -52,11 +52,11 @@ FILES_${PN}-dev += "${libdir}/${PN}/*.la"
PACKAGES_DYNAMIC = "libpurple-protocol-* libpurple-plugin-* pidgin-plugin-* finch-plugin-*"
python populate_packages_prepend () {
- root = bb.data.expand('${libdir}/pidgin', d)
- purple = bb.data.expand('${libdir}/purple-2', d)
- finch = bb.data.expand('${libdir}/finch', d)
+ pidgroot = bb.data.expand('${libdir}/pidgin', d)
+ purple = bb.data.expand('${libdir}/purple-2', d)
+ finch = bb.data.expand('${libdir}/finch', d)
- do_split_packages(d, root, '^([^l][^i][^b].*)\.so$',
+ do_split_packages(d, pidgroot, '^([^l][^i][^b].*)\.so$',
output_pattern='pidgin-plugin-%s',
description='Pidgin plugin %s',
prepend=True, extra_depends='')
diff --git a/recipes/pkgconfig/pkgconfig-native_0.23.bb b/recipes/pkgconfig/pkgconfig-native_0.23.bb
index 24497a9866..da728d3c22 100644
--- a/recipes/pkgconfig/pkgconfig-native_0.23.bb
+++ b/recipes/pkgconfig/pkgconfig-native_0.23.bb
@@ -1,6 +1,8 @@
require pkgconfig.inc
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/pkgconfig-${PV}"
+PR = "${INC_PR}.1"
+
S = "${WORKDIR}/pkg-config-${PV}/"
inherit native
DEPENDS = ""
diff --git a/recipes/pkgconfig/pkgconfig-sdk_0.23.bb b/recipes/pkgconfig/pkgconfig-sdk_0.23.bb
index 3b20371777..47a5b46f0a 100644
--- a/recipes/pkgconfig/pkgconfig-sdk_0.23.bb
+++ b/recipes/pkgconfig/pkgconfig-sdk_0.23.bb
@@ -1,6 +1,8 @@
require pkgconfig.inc
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/pkgconfig-${PV}"
+PR = "${INC_PR}.1"
+
S = "${WORKDIR}/pkg-config-${PV}/"
inherit sdk
DEPENDS = ""
diff --git a/recipes/pkgconfig/pkgconfig.inc b/recipes/pkgconfig/pkgconfig.inc
index 939199bc37..495403eaf5 100644
--- a/recipes/pkgconfig/pkgconfig.inc
+++ b/recipes/pkgconfig/pkgconfig.inc
@@ -5,7 +5,7 @@ It replaces the ubiquitous *-config scripts you may have \
seen with a single tool."
HOMEPAGE = "http://pkg-config.freedesktop.org/wiki/"
LICENSE = "GPL"
-PR = "r7"
+INC_PR = "r7"
SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz \
file://autofoo.patch;patch=1 \
diff --git a/recipes/pkgconfig/pkgconfig_0.23.bb b/recipes/pkgconfig/pkgconfig_0.23.bb
index 10ce0fc9c3..8e75adc6cf 100644
--- a/recipes/pkgconfig/pkgconfig_0.23.bb
+++ b/recipes/pkgconfig/pkgconfig_0.23.bb
@@ -1,4 +1,6 @@
require pkgconfig.inc
+PR = "${INC_PR}.1"
+
DEPENDS += "glib-2.0"
EXTRA_OECONF = "--with-installed-glib"
diff --git a/recipes/poboxserver/qpobox_0.5.4.bb b/recipes/poboxserver/qpobox_0.5.4.bb
index 9bb8c34523..89f4ff00b6 100644
--- a/recipes/poboxserver/qpobox_0.5.4.bb
+++ b/recipes/poboxserver/qpobox_0.5.4.bb
@@ -1,9 +1,9 @@
DESCRIPTION = "A japanese inputmethod for Qt/Embedded based palmtop environments."
SECTION = "opie/inputmethods"
-RDEPENDS = "poboxserver virtual/japanese-font"
+RDEPENDS = "poboxserver virtual-japanese-font"
LICENSE = "GPL"
HOMEPAGE = "http://takahr.dhis.portside.net/cgi-bin/rwiki.cgi?cmd=view;name=QPOBox"
-PR = "r1"
+PR = "r2"
SRC_URI = "http://www.vanille.de/mirror/qpobox-${PV}.tar.gz \
file://qpobox-0.5.4-opie.patch;patch=1 \
diff --git a/recipes/pointercal/files/topas910/pointercal b/recipes/pointercal/files/topas910/pointercal
new file mode 100644
index 0000000000..e42ca8c46b
--- /dev/null
+++ b/recipes/pointercal/files/topas910/pointercal
@@ -0,0 +1 @@
+-23229 -326 22774732 -242 -18721 17089984 65536
diff --git a/recipes/pointercal/pointercal_0.0.bb b/recipes/pointercal/pointercal_0.0.bb
index 36aee53444..d292b893ed 100644
--- a/recipes/pointercal/pointercal_0.0.bb
+++ b/recipes/pointercal/pointercal_0.0.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "Touchscreen calibration data"
SECTION = "base"
-PR = "r13"
+PR = "r14"
SRC_URI = "file://pointercal"
S = "${WORKDIR}"
diff --git a/recipes/popt/popt_1.14.bb b/recipes/popt/popt_1.14.bb
index b3f8a89e91..bce74c6710 100644
--- a/recipes/popt/popt_1.14.bb
+++ b/recipes/popt/popt_1.14.bb
@@ -1,8 +1,7 @@
require popt.inc
-DEPENDS = "gettext virtual/libintl"
-PR = "r1"
+PR = "r2"
-inherit autotools_stage
+inherit autotools_stage gettext
SRC_URI = "\
http://rpm5.org/files/popt/popt-${PV}.tar.gz \
diff --git a/recipes/powervr-drivers/libgles-omap3.inc b/recipes/powervr-drivers/libgles-omap3.inc
index 632afbaf23..6813b71aab 100644
--- a/recipes/powervr-drivers/libgles-omap3.inc
+++ b/recipes/powervr-drivers/libgles-omap3.inc
@@ -4,7 +4,8 @@ LICENCE = "proprietary-binary"
#HACK! These are binaries, so we can't guarantee that LDFLAGS match :(
INSANE_SKIP_${PN} = True
INSANE_SKIP_${PN}-tests = True
-
+INSANE_SKIP_${PN}-demos = True
+INSANE_SKIP_xserver-kdrive-powervrsgx = True
PROVIDES += "virtual/egl"
@@ -25,16 +26,37 @@ PROVIDES += "virtual/egl"
SRC_URI = "file://OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin \
file://rc.pvr \
+ file://chameleonman.desktop \
+ file://evilskull.desktop \
+ file://fivespheres.desktop \
+ file://lighting.desktop \
+ file://mouse.desktop \
+ file://optimizemesh.desktop \
+ file://particles.desktop \
+ file://polybump.desktop \
+ file://shadowtechniques.desktop \
+ file://skybox.desktop \
+ file://trilinear.desktop \
+ file://userclipplanes.desktop \
+ file://vase.desktop \
+ file://shaders.desktop \
+ file://skybox2.desktop \
"
+
S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}"
BINLOCATION ?= "${S}/gfx_rel"
-PACKAGES += " xserver-kdrive-powervrsgx ${PN}-tests"
+PACKAGES += " xserver-kdrive-powervrsgx ${PN}-tests ${PN}-demos"
-FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${bindir}/pvrsrvinit"
+FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/*/*"
FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx"
-FILES_${PN}-tests = "${bindir}/*"
+FILES_${PN}-tests = "${bindir}"
+FILES_${PN}-demos = "${prefix}/demos ${prefix}/share/applications "
+FILES_${PN}-dbg = "${libdir}/.debug/* ${bindir}/.debug/* ${libdir}/ES*/.debug ${bindir}/*/.debug\
+ ${prefix}/demos/OGLES/*/.debug/* \
+ ${prefix}/demos/OGLES2/*/.debug/* \
+ "
RRECOMMENDS_${PN} = "${PN}-tests \
omap3-sgx-modules"
@@ -47,8 +69,9 @@ INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
do_accept_license() {
export HOME="${WORKDIR}"
echo "Y
+q
Y
-${S}" | ${WORKDIR}/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin
+${S}" | ${WORKDIR}/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin --mode console
}
addtask accept_license after do_unpack before do_configure
@@ -76,8 +99,7 @@ do_install () {
cp -pP ${BINLOCATION}/pvrsrvinit ${D}${bindir}/
cp -pP ${BINLOCATION}/xgles1test1 ${D}${bindir}/
- cp -pP ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx || true
- cp -pP ${BINLOCATION}/freedesktop/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/ || true
+ cp -pP ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/|| true
install -d ${D}${includedir}
cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/
@@ -91,6 +113,15 @@ do_install () {
install -d ${D}${sysconfdir}
echo "[default]" > ${D}${sysconfdir}/powervr.ini
echo "WindowSystem=libpvrPVR2D_FRONTWSEGL.so" >> ${D}${sysconfdir}/powervr.ini
+
+ install -d ${D}${prefix}/demos/OGLES/
+ cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Binaries/CommonX11/Demos/* ${D}${prefix}/demos/OGLES/
+
+ install -d ${D}${prefix}/demos/OGLES2
+ cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Binaries/X11/Demos/* ${D}${prefix}/demos/OGLES2
+
+ install -d ${D}${prefix}/share/applications
+ cp -pPR ${WORKDIR}/*.desktop ${D}${prefix}/share/applications
}
do_stage () {
diff --git a/recipes/powervr-drivers/libgles-omap3/chameleonman.desktop b/recipes/powervr-drivers/libgles-omap3/chameleonman.desktop
new file mode 100644
index 0000000000..23d4fc0b7d
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/chameleonman.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=ChameleonMan Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/ChameleonMan/OGLESChameleonMan
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/evilskull.desktop b/recipes/powervr-drivers/libgles-omap3/evilskull.desktop
new file mode 100644
index 0000000000..0590f7f7ff
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/evilskull.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=EvilSkull Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/EvilSkull/OGLESEvilSkull
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/fivespheres.desktop b/recipes/powervr-drivers/libgles-omap3/fivespheres.desktop
new file mode 100644
index 0000000000..569cad693c
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/fivespheres.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=FiveSpheres Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/FiveSpheres/OGLESFiveSpheres
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/lighting.desktop b/recipes/powervr-drivers/libgles-omap3/lighting.desktop
new file mode 100644
index 0000000000..39179b2408
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/lighting.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Lighting Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/Lighting/OGLESLighting
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/mouse.desktop b/recipes/powervr-drivers/libgles-omap3/mouse.desktop
new file mode 100644
index 0000000000..a56531014c
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/mouse.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Mouse Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/Mouse/OGLESMouse
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop b/recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop
new file mode 100644
index 0000000000..9d7194a586
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/optimizemesh.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=OptimizeMesh Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/OptimizeMesh/OGLESOptimizeMesh
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/particles.desktop b/recipes/powervr-drivers/libgles-omap3/particles.desktop
new file mode 100644
index 0000000000..1d71b9d25c
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/particles.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Particles Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/Particles/OGLESParticles
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/polybump.desktop b/recipes/powervr-drivers/libgles-omap3/polybump.desktop
new file mode 100644
index 0000000000..d7cf1af8bd
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/polybump.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=PolyBump Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/PolyBump/OGLESPolyBump
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/shaders.desktop b/recipes/powervr-drivers/libgles-omap3/shaders.desktop
new file mode 100644
index 0000000000..bee8c92fb9
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/shaders.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Shaders Demo
+Comment=OGLES2 Demo
+Exec=/usr/demos/OGLES2/Shaders/OGLES2Shaders
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop b/recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop
new file mode 100644
index 0000000000..0f228d5d27
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/shadowtechniques.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=ShadowTechniques Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/ShadowTechniques/OGLESShadowTechniques
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/skybox.desktop b/recipes/powervr-drivers/libgles-omap3/skybox.desktop
new file mode 100644
index 0000000000..69a7f9418b
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/skybox.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Skybox Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/Skybox/OGLESSkybox
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/skybox2.desktop b/recipes/powervr-drivers/libgles-omap3/skybox2.desktop
new file mode 100644
index 0000000000..a2b02f72f6
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/skybox2.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Skybox2 Demo
+Comment=OGLES2 Demo
+Exec=/usr/demos/OGLES2/Skybox2/OGLES2Skybox2
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/trilinear.desktop b/recipes/powervr-drivers/libgles-omap3/trilinear.desktop
new file mode 100644
index 0000000000..3e105ac182
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/trilinear.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Trilinear Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/Trilinear/OGLESTrilinear
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop b/recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop
new file mode 100644
index 0000000000..9bad690555
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/userclipplanes.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=UserClipPlanes Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/UserClipPlanes/OGLESUserClipPlanes
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3/vase.desktop b/recipes/powervr-drivers/libgles-omap3/vase.desktop
new file mode 100644
index 0000000000..06064349d6
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3/vase.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Vase Demo
+Comment=OGLES Demo
+Exec=/usr/demos/OGLES/Vase/OGLESVase
+Icon=star
+Type=Application
+Categories=Demos;
+
diff --git a/recipes/powervr-drivers/libgles-omap3_3.00.00.08.bb b/recipes/powervr-drivers/libgles-omap3_3.00.00.08.bb
new file mode 100644
index 0000000000..a5c0d99143
--- /dev/null
+++ b/recipes/powervr-drivers/libgles-omap3_3.00.00.08.bb
@@ -0,0 +1,11 @@
+require libgles-omap3.inc
+
+DEFAULT_PREFERENCE = "1"
+
+SGXPV = "3_00_00_08"
+IMGPV = "1.3.13.1607"
+
+# Quality control is really poor on these SDKs, so hack around the latest madness:
+FILES_${PN} += "${libdir}/*.so"
+FILES_${PN}-dev = "${includedir}"
+
diff --git a/recipes/ppp/ppp_2.4.3.bb b/recipes/ppp/ppp_2.4.3.bb
index 295a3fbe87..3b1f8ad28d 100644
--- a/recipes/ppp/ppp_2.4.3.bb
+++ b/recipes/ppp/ppp_2.4.3.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Point-to-Point Protocol (PPP) daemon"
HOMEPAGE = "http://samba.org/ppp/"
DEPENDS = "libpcap"
LICENSE = "BSD GPLv2"
-PR = "r5"
+PR = "r6"
SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
file://ppp-2.4.3-mppe-mppc-1.1.patch;patch=1 \
@@ -39,6 +39,7 @@ do_install_append () {
mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
+ mkdir -p ${D}${sysconfdir}/ppp/peers/
install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
diff --git a/recipes/procps/procps.inc b/recipes/procps/procps.inc
index ddc8030077..2de32d2c83 100644
--- a/recipes/procps/procps.inc
+++ b/recipes/procps/procps.inc
@@ -8,6 +8,8 @@ PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "ncurses"
+FILES_${PN} += "${base_libdir}/libproc-*.so"
+
SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
file://install.patch;patch=1"
diff --git a/recipes/psplash/files/bug/psplash-default b/recipes/psplash/files/bug/psplash-default
new file mode 100644
index 0000000000..16dad172a8
--- /dev/null
+++ b/recipes/psplash/files/bug/psplash-default
@@ -0,0 +1,4 @@
+# Parameters to pass to psplash
+PARAMS=""
+
+export FBDEV="/dev/fb1"
diff --git a/recipes/psplash/psplash-zap_1.0.bb b/recipes/psplash/psplash-zap_1.0.bb
index d6b281094e..0268b2015a 100644
--- a/recipes/psplash/psplash-zap_1.0.bb
+++ b/recipes/psplash/psplash-zap_1.0.bb
@@ -1,6 +1,5 @@
-
SRC_URI = "file://zzapsplash-init"
-PR = "r1"
+PR = "r2"
do_install_prepend() {
install -d "${D}${sysconfdir}/init.d/"
diff --git a/recipes/psplash/psplash.inc b/recipes/psplash/psplash.inc
index c1634de8c2..515c830ce1 100644
--- a/recipes/psplash/psplash.inc
+++ b/recipes/psplash/psplash.inc
@@ -4,11 +4,11 @@ SECTION = "base"
LICENSE = "GPL"
RDEPENDS = "initscripts"
PROVIDES = "virtual/psplash"
-RPROVIDES_${PN} = "virtual/psplash"
+RPROVIDES_${PN} = "virtual-psplash"
RCONFLICTS_${PN} = "exquisite"
PV = "0.0+svnr${SRCREV}"
-PR = "r21"
+PR = "r23"
# You can create your own pslash-hand-img.h by doing
# ./make-image-header.sh <file>.png HAND
diff --git a/recipes/psplash/psplash_svn.bb b/recipes/psplash/psplash_svn.bb
index 8119ccf1e7..584822e254 100644
--- a/recipes/psplash/psplash_svn.bb
+++ b/recipes/psplash/psplash_svn.bb
@@ -3,8 +3,6 @@ require psplash-ua.inc
ALTERNATIVE_PRIORITY = "10"
-PR = "r20"
-
SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=psplash;proto=http \
file://psplash-hand-img.h \
file://psplash-bar-img.h \
diff --git a/recipes/pulseaudio/libcanberra_0.12.bb b/recipes/pulseaudio/libcanberra_0.12.bb
index e6c71b8bc8..ee2a56bb8e 100644
--- a/recipes/pulseaudio/libcanberra_0.12.bb
+++ b/recipes/pulseaudio/libcanberra_0.12.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Libcanberra is an implementation of the XDG Sound Theme and Name
LICENSE = "LGPL"
DEPENDS = "gtk+ pulseaudio alsa-lib gstreamer"
-PR = "r1"
+PR = "r2"
inherit gnome
@@ -19,6 +19,8 @@ FILES_${PN} += "${libdir}/gtk-2.0/modules/ ${datadir}/gnome ${libdir}/*/*.so"
FILES_${PN}-dbg += "${libdir}/gtk-2.0/modules/.debug ${libdir}/*/.debug"
FILES_${PN}-dev += "${libdir}/*/*.a"
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
do_stage() {
autotools_stage_all
}
diff --git a/recipes/pulseaudio/pavucontrol_0.9.8.bb b/recipes/pulseaudio/pavucontrol_0.9.8.bb
new file mode 100644
index 0000000000..6766e916c7
--- /dev/null
+++ b/recipes/pulseaudio/pavucontrol_0.9.8.bb
@@ -0,0 +1,9 @@
+DESCRIPTION = "ulseAudio Volume Control (pavucontrol) is a simple GTK based volume control tool ("mixer") for the PulseAudio sound server."
+LICENSE = "GPLv2"
+DEPENDS = "libglademm libcanberra gtk+ libnotify gconf pulseaudio"
+
+inherit gnome
+
+SRC_URI = "http://0pointer.de/lennart/projects/${PN}/${PN}-${PV}.tar.gz"
+
+
diff --git a/recipes/pulseaudio/pulseaudio-0.9.15/alsaerror.patch b/recipes/pulseaudio/pulseaudio-0.9.15/alsaerror.patch
new file mode 100644
index 0000000000..2efa3e89b8
--- /dev/null
+++ b/recipes/pulseaudio/pulseaudio-0.9.15/alsaerror.patch
@@ -0,0 +1,525 @@
+From: Lennart Poettering <lennart@poettering.net>
+Date: Sun, 19 Apr 2009 17:22:51 +0000 (+0200)
+Subject: alsa: properly convert return values of snd_strerror() to utf8
+X-Git-Url: http://git.0pointer.de/?p=pulseaudio.git;a=commitdiff_plain;h=98a25c506e692ab091b4af7e1b37e8432fc08e8f
+
+alsa: properly convert return values of snd_strerror() to utf8
+---
+
+diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
+index 2fbcd7b..41e8b47 100644
+--- a/src/modules/alsa/alsa-sink.c
++++ b/src/modules/alsa/alsa-sink.c
+@@ -281,7 +281,7 @@ static int try_recover(struct userdata *u, const char *call, int err) {
+ pa_assert(call);
+ pa_assert(err < 0);
+
+- pa_log_debug("%s: %s", call, snd_strerror(err));
++ pa_log_debug("%s: %s", call, pa_alsa_strerror(err));
+
+ pa_assert(err != -EAGAIN);
+
+@@ -289,7 +289,7 @@ static int try_recover(struct userdata *u, const char *call, int err) {
+ pa_log_debug("%s: Buffer underrun!", call);
+
+ if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) < 0) {
+- pa_log("%s: %s", call, snd_strerror(err));
++ pa_log("%s: %s", call, pa_alsa_strerror(err));
+ return -1;
+ }
+
+@@ -636,12 +636,12 @@ static void update_smoother(struct userdata *u) {
+ /* Let's update the time smoother */
+
+ if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->sink->sample_spec)) < 0)) {
+- pa_log_warn("Failed to query DSP status data: %s", snd_strerror(err));
++ pa_log_warn("Failed to query DSP status data: %s", pa_alsa_strerror(err));
+ return;
+ }
+
+ if (PA_UNLIKELY((err = snd_pcm_status(u->pcm_handle, status)) < 0))
+- pa_log_warn("Failed to get timestamp: %s", snd_strerror(err));
++ pa_log_warn("Failed to get timestamp: %s", pa_alsa_strerror(err));
+ else {
+ snd_htimestamp_t htstamp = { 0, 0 };
+ snd_pcm_status_get_htstamp(status, &htstamp);
+@@ -764,7 +764,7 @@ static int update_sw_params(struct userdata *u) {
+ pa_log_debug("setting avail_min=%lu", (unsigned long) avail_min);
+
+ if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min)) < 0) {
+- pa_log("Failed to set software parameters: %s", snd_strerror(err));
++ pa_log("Failed to set software parameters: %s", pa_alsa_strerror(err));
+ return err;
+ }
+
+@@ -792,7 +792,7 @@ static int unsuspend(struct userdata *u) {
+ SND_PCM_NO_AUTO_RESAMPLE|
+ SND_PCM_NO_AUTO_CHANNELS|
+ SND_PCM_NO_AUTO_FORMAT)) < 0) {
+- pa_log("Error opening PCM device %s: %s", u->device_name, snd_strerror(err));
++ pa_log("Error opening PCM device %s: %s", u->device_name, pa_alsa_strerror(err));
+ goto fail;
+ }
+
+@@ -803,7 +803,7 @@ static int unsuspend(struct userdata *u) {
+ d = u->use_tsched;
+
+ if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &nfrags, &period_size, u->hwbuf_size / u->frame_size, &b, &d, TRUE)) < 0) {
+- pa_log("Failed to set hardware parameters: %s", snd_strerror(err));
++ pa_log("Failed to set hardware parameters: %s", pa_alsa_strerror(err));
+ goto fail;
+ }
+
+@@ -1030,7 +1030,7 @@ static void sink_get_volume_cb(pa_sink *s) {
+ return;
+
+ fail:
+- pa_log_error("Unable to read volume: %s", snd_strerror(err));
++ pa_log_error("Unable to read volume: %s", pa_alsa_strerror(err));
+ }
+
+ static void sink_set_volume_cb(pa_sink *s) {
+@@ -1141,7 +1141,7 @@ static void sink_set_volume_cb(pa_sink *s) {
+ return;
+
+ fail:
+- pa_log_error("Unable to set volume: %s", snd_strerror(err));
++ pa_log_error("Unable to set volume: %s", pa_alsa_strerror(err));
+ }
+
+ static void sink_get_mute_cb(pa_sink *s) {
+@@ -1152,7 +1152,7 @@ static void sink_get_mute_cb(pa_sink *s) {
+ pa_assert(u->mixer_elem);
+
+ if ((err = snd_mixer_selem_get_playback_switch(u->mixer_elem, 0, &sw)) < 0) {
+- pa_log_error("Unable to get switch: %s", snd_strerror(err));
++ pa_log_error("Unable to get switch: %s", pa_alsa_strerror(err));
+ return;
+ }
+
+@@ -1167,7 +1167,7 @@ static void sink_set_mute_cb(pa_sink *s) {
+ pa_assert(u->mixer_elem);
+
+ if ((err = snd_mixer_selem_set_playback_switch_all(u->mixer_elem, !s->muted)) < 0) {
+- pa_log_error("Unable to set switch: %s", snd_strerror(err));
++ pa_log_error("Unable to set switch: %s", pa_alsa_strerror(err));
+ return;
+ }
+ }
+@@ -1206,7 +1206,7 @@ static int process_rewind(struct userdata *u) {
+ pa_log_debug("Requested to rewind %lu bytes.", (unsigned long) rewind_nbytes);
+
+ if (PA_UNLIKELY((unused = pa_alsa_safe_avail(u->pcm_handle, u->hwbuf_size, &u->sink->sample_spec)) < 0)) {
+- pa_log("snd_pcm_avail() failed: %s", snd_strerror((int) unused));
++ pa_log("snd_pcm_avail() failed: %s", pa_alsa_strerror((int) unused));
+ return -1;
+ }
+
+@@ -1228,7 +1228,7 @@ static int process_rewind(struct userdata *u) {
+ in_frames = (snd_pcm_sframes_t) (rewind_nbytes / u->frame_size);
+ pa_log_debug("before: %lu", (unsigned long) in_frames);
+ if ((out_frames = snd_pcm_rewind(u->pcm_handle, (snd_pcm_uframes_t) in_frames)) < 0) {
+- pa_log("snd_pcm_rewind() failed: %s", snd_strerror((int) out_frames));
++ pa_log("snd_pcm_rewind() failed: %s", pa_alsa_strerror((int) out_frames));
+ return -1;
+ }
+ pa_log_debug("after: %lu", (unsigned long) out_frames);
+@@ -1359,7 +1359,7 @@ static void thread_func(void *userdata) {
+ pollfd = pa_rtpoll_item_get_pollfd(u->alsa_rtpoll_item, &n);
+
+ if ((err = snd_pcm_poll_descriptors_revents(u->pcm_handle, pollfd, n, &revents)) < 0) {
+- pa_log("snd_pcm_poll_descriptors_revents() failed: %s", snd_strerror(err));
++ pa_log("snd_pcm_poll_descriptors_revents() failed: %s", pa_alsa_strerror(err));
+ goto fail;
+ }
+
+diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
+index c59fc75..843f70b 100644
+--- a/src/modules/alsa/alsa-source.c
++++ b/src/modules/alsa/alsa-source.c
+@@ -278,7 +278,7 @@ static int try_recover(struct userdata *u, const char *call, int err) {
+ pa_assert(call);
+ pa_assert(err < 0);
+
+- pa_log_debug("%s: %s", call, snd_strerror(err));
++ pa_log_debug("%s: %s", call, pa_alsa_strerror(err));
+
+ pa_assert(err != -EAGAIN);
+
+@@ -286,7 +286,7 @@ static int try_recover(struct userdata *u, const char *call, int err) {
+ pa_log_debug("%s: Buffer overrun!", call);
+
+ if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) < 0) {
+- pa_log("%s: %s", call, snd_strerror(err));
++ pa_log("%s: %s", call, pa_alsa_strerror(err));
+ return -1;
+ }
+
+@@ -606,12 +606,12 @@ static void update_smoother(struct userdata *u) {
+ /* Let's update the time smoother */
+
+ if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->source->sample_spec)) < 0)) {
+- pa_log_warn("Failed to get delay: %s", snd_strerror(err));
++ pa_log_warn("Failed to get delay: %s", pa_alsa_strerror(err));
+ return;
+ }
+
+ if (PA_UNLIKELY((err = snd_pcm_status(u->pcm_handle, status)) < 0))
+- pa_log_warn("Failed to get timestamp: %s", snd_strerror(err));
++ pa_log_warn("Failed to get timestamp: %s", pa_alsa_strerror(err));
+ else {
+ snd_htimestamp_t htstamp = { 0, 0 };
+ snd_pcm_status_get_htstamp(status, &htstamp);
+@@ -721,7 +721,7 @@ static int update_sw_params(struct userdata *u) {
+ pa_log_debug("setting avail_min=%lu", (unsigned long) avail_min);
+
+ if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min)) < 0) {
+- pa_log("Failed to set software parameters: %s", snd_strerror(err));
++ pa_log("Failed to set software parameters: %s", pa_alsa_strerror(err));
+ return err;
+ }
+
+@@ -747,7 +747,7 @@ static int unsuspend(struct userdata *u) {
+ SND_PCM_NO_AUTO_RESAMPLE|
+ SND_PCM_NO_AUTO_CHANNELS|
+ SND_PCM_NO_AUTO_FORMAT)) < 0) {
+- pa_log("Error opening PCM device %s: %s", u->device_name, snd_strerror(err));
++ pa_log("Error opening PCM device %s: %s", u->device_name, pa_alsa_strerror(err));
+ goto fail;
+ }
+
+@@ -758,7 +758,7 @@ static int unsuspend(struct userdata *u) {
+ d = u->use_tsched;
+
+ if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &nfrags, &period_size, u->hwbuf_size / u->frame_size, &b, &d, TRUE)) < 0) {
+- pa_log("Failed to set hardware parameters: %s", snd_strerror(err));
++ pa_log("Failed to set hardware parameters: %s", pa_alsa_strerror(err));
+ goto fail;
+ }
+
+@@ -988,7 +988,7 @@ static void source_get_volume_cb(pa_source *s) {
+ return;
+
+ fail:
+- pa_log_error("Unable to read volume: %s", snd_strerror(err));
++ pa_log_error("Unable to read volume: %s", pa_alsa_strerror(err));
+ }
+
+ static void source_set_volume_cb(pa_source *s) {
+@@ -1100,7 +1100,7 @@ static void source_set_volume_cb(pa_source *s) {
+ return;
+
+ fail:
+- pa_log_error("Unable to set volume: %s", snd_strerror(err));
++ pa_log_error("Unable to set volume: %s", pa_alsa_strerror(err));
+ }
+
+ static void source_get_mute_cb(pa_source *s) {
+@@ -1111,7 +1111,7 @@ static void source_get_mute_cb(pa_source *s) {
+ pa_assert(u->mixer_elem);
+
+ if ((err = snd_mixer_selem_get_capture_switch(u->mixer_elem, 0, &sw)) < 0) {
+- pa_log_error("Unable to get switch: %s", snd_strerror(err));
++ pa_log_error("Unable to get switch: %s", pa_alsa_strerror(err));
+ return;
+ }
+
+@@ -1126,7 +1126,7 @@ static void source_set_mute_cb(pa_source *s) {
+ pa_assert(u->mixer_elem);
+
+ if ((err = snd_mixer_selem_set_capture_switch_all(u->mixer_elem, !s->muted)) < 0) {
+- pa_log_error("Unable to set switch: %s", snd_strerror(err));
++ pa_log_error("Unable to set switch: %s", pa_alsa_strerror(err));
+ return;
+ }
+ }
+@@ -1218,7 +1218,7 @@ static void thread_func(void *userdata) {
+ pollfd = pa_rtpoll_item_get_pollfd(u->alsa_rtpoll_item, &n);
+
+ if ((err = snd_pcm_poll_descriptors_revents(u->pcm_handle, pollfd, n, &revents)) < 0) {
+- pa_log("snd_pcm_poll_descriptors_revents() failed: %s", snd_strerror(err));
++ pa_log("snd_pcm_poll_descriptors_revents() failed: %s", pa_alsa_strerror(err));
+ goto fail;
+ }
+
+diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
+index d2dc6e8..ddc3c77 100644
+--- a/src/modules/alsa/alsa-util.c
++++ b/src/modules/alsa/alsa-util.c
+@@ -33,6 +33,7 @@
+ #include <pulse/timeval.h>
+ #include <pulse/util.h>
+ #include <pulse/i18n.h>
++#include <pulse/utf8.h>
+
+ #include <pulsecore/log.h>
+ #include <pulsecore/macro.h>
+@@ -40,6 +41,7 @@
+ #include <pulsecore/atomic.h>
+ #include <pulsecore/core-error.h>
+ #include <pulsecore/once.h>
++#include <pulsecore/thread.h>
+
+ #include "alsa-util.h"
+
+@@ -106,7 +108,7 @@ static void io_cb(pa_mainloop_api*a, pa_io_event* e, int fd, pa_io_event_flags_t
+ pa_assert(i != fdl->num_fds);
+
+ if ((err = snd_mixer_poll_descriptors_revents(fdl->mixer, fdl->work_fds, fdl->num_fds, &revents)) < 0) {
+- pa_log_error("Unable to get poll revent: %s", snd_strerror(err));
++ pa_log_error("Unable to get poll revent: %s", pa_alsa_strerror(err));
+ return;
+ }
+
+@@ -129,7 +131,7 @@ static void defer_cb(pa_mainloop_api*a, pa_defer_event* e, void *userdata) {
+ a->defer_enable(fdl->defer, 0);
+
+ if ((n = snd_mixer_poll_descriptors_count(fdl->mixer)) < 0) {
+- pa_log("snd_mixer_poll_descriptors_count() failed: %s", snd_strerror(n));
++ pa_log("snd_mixer_poll_descriptors_count() failed: %s", pa_alsa_strerror(n));
+ return;
+ }
+ num_fds = (unsigned) n;
+@@ -146,7 +148,7 @@ static void defer_cb(pa_mainloop_api*a, pa_defer_event* e, void *userdata) {
+ memset(fdl->work_fds, 0, sizeof(struct pollfd) * num_fds);
+
+ if ((err = snd_mixer_poll_descriptors(fdl->mixer, fdl->work_fds, num_fds)) < 0) {
+- pa_log_error("Unable to get poll descriptors: %s", snd_strerror(err));
++ pa_log_error("Unable to get poll descriptors: %s", pa_alsa_strerror(err));
+ return;
+ }
+
+@@ -482,42 +484,42 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min) {
+ snd_pcm_sw_params_alloca(&swparams);
+
+ if ((err = snd_pcm_sw_params_current(pcm, swparams) < 0)) {
+- pa_log_warn("Unable to determine current swparams: %s\n", snd_strerror(err));
++ pa_log_warn("Unable to determine current swparams: %s\n", pa_alsa_strerror(err));
+ return err;
+ }
+
+ if ((err = snd_pcm_sw_params_set_period_event(pcm, swparams, 0)) < 0) {
+- pa_log_warn("Unable to disable period event: %s\n", snd_strerror(err));
++ pa_log_warn("Unable to disable period event: %s\n", pa_alsa_strerror(err));
+ return err;
+ }
+
+ if ((err = snd_pcm_sw_params_set_tstamp_mode(pcm, swparams, SND_PCM_TSTAMP_ENABLE)) < 0) {
+- pa_log_warn("Unable to enable time stamping: %s\n", snd_strerror(err));
++ pa_log_warn("Unable to enable time stamping: %s\n", pa_alsa_strerror(err));
+ return err;
+ }
+
+ if ((err = snd_pcm_sw_params_get_boundary(swparams, &boundary)) < 0) {
+- pa_log_warn("Unable to get boundary: %s\n", snd_strerror(err));
++ pa_log_warn("Unable to get boundary: %s\n", pa_alsa_strerror(err));
+ return err;
+ }
+
+ if ((err = snd_pcm_sw_params_set_stop_threshold(pcm, swparams, boundary)) < 0) {
+- pa_log_warn("Unable to set stop threshold: %s\n", snd_strerror(err));
++ pa_log_warn("Unable to set stop threshold: %s\n", pa_alsa_strerror(err));
+ return err;
+ }
+
+ if ((err = snd_pcm_sw_params_set_start_threshold(pcm, swparams, (snd_pcm_uframes_t) -1)) < 0) {
+- pa_log_warn("Unable to set start threshold: %s\n", snd_strerror(err));
++ pa_log_warn("Unable to set start threshold: %s\n", pa_alsa_strerror(err));
+ return err;
+ }
+
+ if ((err = snd_pcm_sw_params_set_avail_min(pcm, swparams, avail_min)) < 0) {
+- pa_log_error("snd_pcm_sw_params_set_avail_min() failed: %s", snd_strerror(err));
++ pa_log_error("snd_pcm_sw_params_set_avail_min() failed: %s", pa_alsa_strerror(err));
+ return err;
+ }
+
+ if ((err = snd_pcm_sw_params(pcm, swparams)) < 0) {
+- pa_log_warn("Unable to set sw params: %s\n", snd_strerror(err));
++ pa_log_warn("Unable to set sw params: %s\n", pa_alsa_strerror(err));
+ return err;
+ }
+
+@@ -854,7 +856,7 @@ snd_pcm_t *pa_alsa_open_by_device_string(
+ SND_PCM_NO_AUTO_RESAMPLE|
+ SND_PCM_NO_AUTO_CHANNELS|
+ (reformat ? 0 : SND_PCM_NO_AUTO_FORMAT))) < 0) {
+- pa_log_info("Error opening PCM device %s: %s", d, snd_strerror(err));
++ pa_log_info("Error opening PCM device %s: %s", d, pa_alsa_strerror(err));
+ goto fail;
+ }
+
+@@ -882,7 +884,7 @@ snd_pcm_t *pa_alsa_open_by_device_string(
+ continue;
+ }
+
+- pa_log_info("Failed to set hardware parameters on %s: %s", d, snd_strerror(err));
++ pa_log_info("Failed to set hardware parameters on %s: %s", d, pa_alsa_strerror(err));
+ snd_pcm_close(pcm_handle);
+
+ goto fail;
+@@ -1000,17 +1002,17 @@ int pa_alsa_prepare_mixer(snd_mixer_t *mixer, const char *dev) {
+ pa_assert(dev);
+
+ if ((err = snd_mixer_attach(mixer, dev)) < 0) {
+- pa_log_info("Unable to attach to mixer %s: %s", dev, snd_strerror(err));
++ pa_log_info("Unable to attach to mixer %s: %s", dev, pa_alsa_strerror(err));
+ return -1;
+ }
+
+ if ((err = snd_mixer_selem_register(mixer, NULL, NULL)) < 0) {
+- pa_log_warn("Unable to register mixer: %s", snd_strerror(err));
++ pa_log_warn("Unable to register mixer: %s", pa_alsa_strerror(err));
+ return -1;
+ }
+
+ if ((err = snd_mixer_load(mixer)) < 0) {
+- pa_log_warn("Unable to load mixer: %s", snd_strerror(err));
++ pa_log_warn("Unable to load mixer: %s", pa_alsa_strerror(err));
+ return -1;
+ }
+
+@@ -1136,7 +1138,7 @@ int pa_alsa_find_mixer_and_elem(
+ }
+
+ if ((err = snd_mixer_open(&m, 0)) < 0) {
+- pa_log("Error opening mixer: %s", snd_strerror(err));
++ pa_log("Error opening mixer: %s", pa_alsa_strerror(err));
+ return -1;
+ }
+
+@@ -1338,7 +1340,7 @@ void pa_alsa_dump(pa_log_level_t level, snd_pcm_t *pcm) {
+ pa_assert_se(snd_output_buffer_open(&out) == 0);
+
+ if ((err = snd_pcm_dump(pcm, out)) < 0)
+- pa_logl(level, "snd_pcm_dump(): %s", snd_strerror(err));
++ pa_logl(level, "snd_pcm_dump(): %s", pa_alsa_strerror(err));
+ else {
+ char *s = NULL;
+ snd_output_buffer_string(out, &s);
+@@ -1362,7 +1364,7 @@ void pa_alsa_dump_status(snd_pcm_t *pcm) {
+ pa_assert_se(snd_pcm_status(pcm, status) == 0);
+
+ if ((err = snd_pcm_status_dump(status, out)) < 0)
+- pa_log_debug("snd_pcm_dump(): %s", snd_strerror(err));
++ pa_log_debug("snd_pcm_dump(): %s", pa_alsa_strerror(err));
+ else {
+ char *s = NULL;
+ snd_output_buffer_string(out, &s);
+@@ -1524,7 +1526,7 @@ void pa_alsa_init_proplist_pcm(pa_core *c, pa_proplist *p, snd_pcm_t *pcm, snd_m
+ snd_pcm_info_alloca(&info);
+
+ if ((err = snd_pcm_hw_params_current(pcm, hwparams)) < 0)
+- pa_log_warn("Error fetching hardware parameter info: %s", snd_strerror(err));
++ pa_log_warn("Error fetching hardware parameter info: %s", pa_alsa_strerror(err));
+ else {
+
+ if ((bits = snd_pcm_hw_params_get_sbits(hwparams)) >= 0)
+@@ -1535,7 +1537,7 @@ void pa_alsa_init_proplist_pcm(pa_core *c, pa_proplist *p, snd_pcm_t *pcm, snd_m
+ pa_proplist_sets(p, "alsa.mixer_element", snd_mixer_selem_get_name(elem));
+
+ if ((err = snd_pcm_info(pcm, info)) < 0)
+- pa_log_warn("Error fetching PCM info: %s", snd_strerror(err));
++ pa_log_warn("Error fetching PCM info: %s", pa_alsa_strerror(err));
+ else
+ pa_alsa_init_proplist_pcm_info(c, p, info);
+ }
+@@ -1568,14 +1570,14 @@ int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents) {
+
+ case SND_PCM_STATE_XRUN:
+ if ((err = snd_pcm_recover(pcm, -EPIPE, 1)) != 0) {
+- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and XRUN: %s", snd_strerror(err));
++ pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and XRUN: %s", pa_alsa_strerror(err));
+ return -1;
+ }
+ break;
+
+ case SND_PCM_STATE_SUSPENDED:
+ if ((err = snd_pcm_recover(pcm, -ESTRPIPE, 1)) != 0) {
+- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and SUSPENDED: %s", snd_strerror(err));
++ pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and SUSPENDED: %s", pa_alsa_strerror(err));
+ return -1;
+ }
+ break;
+@@ -1585,7 +1587,7 @@ int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents) {
+ snd_pcm_drop(pcm);
+
+ if ((err = snd_pcm_prepare(pcm)) < 0) {
+- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): %s", snd_strerror(err));
++ pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): %s", pa_alsa_strerror(err));
+ return -1;
+ }
+ break;
+@@ -1602,7 +1604,7 @@ pa_rtpoll_item* pa_alsa_build_pollfd(snd_pcm_t *pcm, pa_rtpoll *rtpoll) {
+ pa_assert(pcm);
+
+ if ((n = snd_pcm_poll_descriptors_count(pcm)) < 0) {
+- pa_log("snd_pcm_poll_descriptors_count() failed: %s", snd_strerror(n));
++ pa_log("snd_pcm_poll_descriptors_count() failed: %s", pa_alsa_strerror(n));
+ return NULL;
+ }
+
+@@ -1610,7 +1612,7 @@ pa_rtpoll_item* pa_alsa_build_pollfd(snd_pcm_t *pcm, pa_rtpoll *rtpoll) {
+ pollfd = pa_rtpoll_item_get_pollfd(item, NULL);
+
+ if ((err = snd_pcm_poll_descriptors(pcm, pollfd, (unsigned) n)) < 0) {
+- pa_log("snd_pcm_poll_descriptors() failed: %s", snd_strerror(err));
++ pa_log("snd_pcm_poll_descriptors() failed: %s", pa_alsa_strerror(err));
+ pa_rtpoll_item_free(item);
+ return NULL;
+ }
+@@ -1819,3 +1821,30 @@ pa_bool_t pa_alsa_pcm_is_modem(snd_pcm_t *pcm) {
+
+ return snd_pcm_info_get_class(info) == SND_PCM_CLASS_MODEM;
+ }
++
++PA_STATIC_TLS_DECLARE(cstrerror, pa_xfree);
++
++const char* pa_alsa_strerror(int errnum) {
++ const char *original = NULL;
++ char *translated, *t;
++ char errbuf[128];
++
++ if ((t = PA_STATIC_TLS_GET(cstrerror)))
++ pa_xfree(t);
++
++ original = snd_strerror(errnum);
++
++ if (!original) {
++ pa_snprintf(errbuf, sizeof(errbuf), "Unknown error %i", errnum);
++ original = errbuf;
++ }
++
++ if (!(translated = pa_locale_to_utf8(original))) {
++ pa_log_warn("Unable to convert error string to locale, filtering.");
++ translated = pa_utf8_filter(original);
++ }
++
++ PA_STATIC_TLS_SET(cstrerror, translated);
++
++ return translated;
++}
+diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
+index c8acc7c..77ac8a7 100644
+--- a/src/modules/alsa/alsa-util.h
++++ b/src/modules/alsa/alsa-util.h
+@@ -146,4 +146,6 @@ pa_bool_t pa_alsa_pcm_is_hw(snd_pcm_t *pcm);
+
+ pa_bool_t pa_alsa_pcm_is_modem(snd_pcm_t *pcm);
+
++const char* pa_alsa_strerror(int errnum);
++
+ #endif
+diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
+index fdc952d..51d466e 100644
+--- a/src/modules/alsa/module-alsa-card.c
++++ b/src/modules/alsa/module-alsa-card.c
+@@ -304,7 +304,7 @@ int pa__init(pa_module *m) {
+ u->modargs = ma;
+
+ if ((alsa_card_index = snd_card_get_index(u->device_id)) < 0) {
+- pa_log("Card '%s' doesn't exist: %s", u->device_id, snd_strerror(alsa_card_index));
++ pa_log("Card '%s' doesn't exist: %s", u->device_id, pa_alsa_strerror(alsa_card_index));
+ goto fail;
+ }
+
diff --git a/recipes/pulseaudio/pulseaudio-0.9.15/autoconf_version.patch b/recipes/pulseaudio/pulseaudio-0.9.15/autoconf_version.patch
new file mode 100644
index 0000000000..7a0759da13
--- /dev/null
+++ b/recipes/pulseaudio/pulseaudio-0.9.15/autoconf_version.patch
@@ -0,0 +1,13 @@
+Index: pulseaudio-0.9.15/configure.ac
+===================================================================
+--- pulseaudio-0.9.15.orig/configure.ac 2009-04-14 00:09:53.000000000 +0100
++++ pulseaudio-0.9.15/configure.ac 2009-05-22 11:32:50.000000000 +0100
+@@ -20,7 +20,7 @@
+ # along with PulseAudio; if not, write to the Free Software Foundation,
+ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+-AC_PREREQ(2.63)
++AC_PREREQ(2.61)
+
+ m4_define(pa_major, [0])
+ m4_define(pa_minor, [9])
diff --git a/recipes/pulseaudio/pulseaudio-0.9.15/buildfix.patch b/recipes/pulseaudio/pulseaudio-0.9.15/buildfix.patch
new file mode 100644
index 0000000000..ca01e0d80f
--- /dev/null
+++ b/recipes/pulseaudio/pulseaudio-0.9.15/buildfix.patch
@@ -0,0 +1,13 @@
+Index: pulseaudio-0.9.11/src/pulsecore/atomic.h
+===================================================================
+--- pulseaudio-0.9.11.orig/src/pulsecore/atomic.h
++++ pulseaudio-0.9.11/src/pulsecore/atomic.h
+@@ -40,6 +40,8 @@
+ #error "Please include config.h before including this file!"
+ #endif
+
++#include "macro.h"
++
+ #ifdef HAVE_ATOMIC_BUILTINS
+
+ /* __sync based implementation */
diff --git a/recipes/pulseaudio/pulseaudio-0.9.15/fallback.patch b/recipes/pulseaudio/pulseaudio-0.9.15/fallback.patch
new file mode 100644
index 0000000000..2fae0d4e78
--- /dev/null
+++ b/recipes/pulseaudio/pulseaudio-0.9.15/fallback.patch
@@ -0,0 +1,338 @@
+From: Lennart Poettering <lennart@poettering.net>
+Date: Tue, 28 Apr 2009 23:58:18 +0000 (+0200)
+Subject: alsa: allow configuration of fallback device strings in profiles
+X-Git-Url: http://git.0pointer.de/?p=pulseaudio.git;a=commitdiff_plain;h=d8710711fb0c74b4ad83ac99c2501218155b502b
+
+alsa: allow configuration of fallback device strings in profiles
+
+This has the benefit that we can properly support ALSA devices where
+only the raw 'hw' device exists but no 'front' although it's a proper
+2ch stereo device.
+---
+
+diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
+index 18d6880..a3a0450 100644
+--- a/src/modules/alsa/alsa-util.c
++++ b/src/modules/alsa/alsa-util.c
+@@ -528,7 +528,7 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min) {
+
+ static const struct pa_alsa_profile_info device_table[] = {
+ {{ 1, { PA_CHANNEL_POSITION_MONO }},
+- "hw",
++ "hw", NULL,
+ N_("Analog Mono"),
+ "analog-mono",
+ 1,
+@@ -536,7 +536,7 @@ static const struct pa_alsa_profile_info device_table[] = {
+ "Capture", "Mic" },
+
+ {{ 2, { PA_CHANNEL_POSITION_LEFT, PA_CHANNEL_POSITION_RIGHT }},
+- "front",
++ "front", "hw",
+ N_("Analog Stereo"),
+ "analog-stereo",
+ 10,
+@@ -544,7 +544,7 @@ static const struct pa_alsa_profile_info device_table[] = {
+ "Capture", "Mic" },
+
+ {{ 2, { PA_CHANNEL_POSITION_LEFT, PA_CHANNEL_POSITION_RIGHT }},
+- "iec958",
++ "iec958", NULL,
+ N_("Digital Stereo (IEC958)"),
+ "iec958-stereo",
+ 5,
+@@ -552,7 +552,7 @@ static const struct pa_alsa_profile_info device_table[] = {
+ "IEC958 In", NULL },
+
+ {{ 2, { PA_CHANNEL_POSITION_LEFT, PA_CHANNEL_POSITION_RIGHT }},
+- "hdmi",
++ "hdmi", NULL,
+ N_("Digital Stereo (HDMI)"),
+ "hdmi-stereo",
+ 4,
+@@ -561,7 +561,7 @@ static const struct pa_alsa_profile_info device_table[] = {
+
+ {{ 4, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
+ PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT }},
+- "surround40",
++ "surround40", NULL,
+ N_("Analog Surround 4.0"),
+ "analog-surround-40",
+ 7,
+@@ -570,7 +570,7 @@ static const struct pa_alsa_profile_info device_table[] = {
+
+ {{ 4, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
+ PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT }},
+- "a52",
++ "a52", NULL,
+ N_("Digital Surround 4.0 (IEC958/AC3)"),
+ "iec958-ac3-surround-40",
+ 2,
+@@ -580,7 +580,7 @@ static const struct pa_alsa_profile_info device_table[] = {
+ {{ 5, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
+ PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
+ PA_CHANNEL_POSITION_LFE }},
+- "surround41",
++ "surround41", NULL,
+ N_("Analog Surround 4.1"),
+ "analog-surround-41",
+ 7,
+@@ -590,7 +590,7 @@ static const struct pa_alsa_profile_info device_table[] = {
+ {{ 5, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
+ PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
+ PA_CHANNEL_POSITION_CENTER }},
+- "surround50",
++ "surround50", NULL,
+ N_("Analog Surround 5.0"),
+ "analog-surround-50",
+ 7,
+@@ -600,7 +600,7 @@ static const struct pa_alsa_profile_info device_table[] = {
+ {{ 6, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
+ PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
+ PA_CHANNEL_POSITION_CENTER, PA_CHANNEL_POSITION_LFE }},
+- "surround51",
++ "surround51", NULL,
+ N_("Analog Surround 5.1"),
+ "analog-surround-51",
+ 8,
+@@ -610,7 +610,7 @@ static const struct pa_alsa_profile_info device_table[] = {
+ {{ 6, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
+ PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
+ PA_CHANNEL_POSITION_FRONT_CENTER, PA_CHANNEL_POSITION_LFE}},
+- "a52",
++ "a52", NULL,
+ N_("Digital Surround 5.1 (IEC958/AC3)"),
+ "iec958-ac3-surround-51",
+ 3,
+@@ -621,16 +621,72 @@ static const struct pa_alsa_profile_info device_table[] = {
+ PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
+ PA_CHANNEL_POSITION_CENTER, PA_CHANNEL_POSITION_LFE,
+ PA_CHANNEL_POSITION_SIDE_LEFT, PA_CHANNEL_POSITION_SIDE_RIGHT }},
+- "surround71",
++ "surround71", NULL,
+ N_("Analog Surround 7.1"),
+ "analog-surround-71",
+ 7,
+ "Master", "PCM",
+ "Capture", "Mic" },
+
+- {{ 0, { 0 }}, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL }
++ {{ 0, { 0 }}, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL }
+ };
+
++static snd_pcm_t *open_by_device_string_with_fallback(
++ const char *prefix,
++ const char *prefix_fallback,
++ const char *dev_id,
++ char **dev,
++ pa_sample_spec *ss,
++ pa_channel_map* map,
++ int mode,
++ uint32_t *nfrags,
++ snd_pcm_uframes_t *period_size,
++ snd_pcm_uframes_t tsched_size,
++ pa_bool_t *use_mmap,
++ pa_bool_t *use_tsched,
++ pa_bool_t require_exact_channel_number) {
++
++ snd_pcm_t *pcm_handle;
++ char *d;
++
++ d = pa_sprintf_malloc("%s:%s", prefix, dev_id);
++
++ pcm_handle = pa_alsa_open_by_device_string(
++ d,
++ dev,
++ ss,
++ map,
++ mode,
++ nfrags,
++ period_size,
++ tsched_size,
++ use_mmap,
++ use_tsched,
++ require_exact_channel_number);
++ pa_xfree(d);
++
++ if (!pcm_handle && prefix_fallback) {
++
++ d = pa_sprintf_malloc("%s:%s", prefix_fallback, dev_id);
++
++ pcm_handle = pa_alsa_open_by_device_string(
++ d,
++ dev,
++ ss,
++ map,
++ mode,
++ nfrags,
++ period_size,
++ tsched_size,
++ use_mmap,
++ use_tsched,
++ require_exact_channel_number);
++ pa_xfree(d);
++ }
++
++ return pcm_handle;
++}
++
+ snd_pcm_t *pa_alsa_open_by_device_id_auto(
+ const char *dev_id,
+ char **dev,
+@@ -671,14 +727,14 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
+
+ pa_log_debug("Checking for %s (%s)", device_table[i].name, device_table[i].alsa_name);
+
+- d = pa_sprintf_malloc("%s:%s", device_table[i].alsa_name, dev_id);
+-
+ try_ss.channels = device_table[i].map.channels;
+ try_ss.rate = ss->rate;
+ try_ss.format = ss->format;
+
+- pcm_handle = pa_alsa_open_by_device_string(
+- d,
++ pcm_handle = open_by_device_string_with_fallback(
++ device_table[i].alsa_name,
++ device_table[i].alsa_name_fallback,
++ dev_id,
+ dev,
+ &try_ss,
+ map,
+@@ -690,8 +746,6 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
+ use_tsched,
+ TRUE);
+
+- pa_xfree(d);
+-
+ if (pcm_handle) {
+
+ *ss = try_ss;
+@@ -703,6 +757,7 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
+
+ return pcm_handle;
+ }
++
+ }
+
+ if (direction > 0) {
+@@ -775,7 +830,6 @@ snd_pcm_t *pa_alsa_open_by_device_id_profile(
+ pa_bool_t *use_tsched,
+ const pa_alsa_profile_info *profile) {
+
+- char *d;
+ snd_pcm_t *pcm_handle;
+ pa_sample_spec try_ss;
+
+@@ -787,14 +841,14 @@ snd_pcm_t *pa_alsa_open_by_device_id_profile(
+ pa_assert(period_size);
+ pa_assert(profile);
+
+- d = pa_sprintf_malloc("%s:%s", profile->alsa_name, dev_id);
+-
+ try_ss.channels = profile->map.channels;
+ try_ss.rate = ss->rate;
+ try_ss.format = ss->format;
+
+- pcm_handle = pa_alsa_open_by_device_string(
+- d,
++ pcm_handle = open_by_device_string_with_fallback(
++ profile->alsa_name,
++ profile->alsa_name_fallback,
++ dev_id,
+ dev,
+ &try_ss,
+ map,
+@@ -806,8 +860,6 @@ snd_pcm_t *pa_alsa_open_by_device_id_profile(
+ use_tsched,
+ TRUE);
+
+- pa_xfree(d);
+-
+ if (!pcm_handle)
+ return NULL;
+
+@@ -860,6 +912,8 @@ snd_pcm_t *pa_alsa_open_by_device_string(
+ goto fail;
+ }
+
++ pa_log_debug("Managed to open %s", d);
++
+ if ((err = pa_alsa_set_hw_params(pcm_handle, ss, nfrags, period_size, tsched_size, use_mmap, use_tsched, require_exact_channel_number)) < 0) {
+
+ if (!reformat) {
+@@ -928,26 +982,25 @@ int pa_alsa_probe_profiles(
+ snd_pcm_t *pcm_i = NULL;
+
+ if (i->alsa_name) {
+- char *id;
+ pa_sample_spec try_ss;
+ pa_channel_map try_map;
+
+ pa_log_debug("Checking for playback on %s (%s)", i->name, i->alsa_name);
+- id = pa_sprintf_malloc("%s:%s", i->alsa_name, dev_id);
+
+ try_ss = *ss;
+ try_ss.channels = i->map.channels;
+ try_map = i->map;
+
+- pcm_i = pa_alsa_open_by_device_string(
+- id, NULL,
++ pcm_i = open_by_device_string_with_fallback(
++ i->alsa_name,
++ i->alsa_name_fallback,
++ dev_id,
++ NULL,
+ &try_ss, &try_map,
+ SND_PCM_STREAM_PLAYBACK,
+ NULL, NULL, 0, NULL, NULL,
+ TRUE);
+
+- pa_xfree(id);
+-
+ if (!pcm_i)
+ continue;
+ }
+@@ -956,26 +1009,25 @@ int pa_alsa_probe_profiles(
+ snd_pcm_t *pcm_j = NULL;
+
+ if (j->alsa_name) {
+- char *jd;
+ pa_sample_spec try_ss;
+ pa_channel_map try_map;
+
+ pa_log_debug("Checking for capture on %s (%s)", j->name, j->alsa_name);
+- jd = pa_sprintf_malloc("%s:%s", j->alsa_name, dev_id);
+
+ try_ss = *ss;
+ try_ss.channels = j->map.channels;
+ try_map = j->map;
+
+- pcm_j = pa_alsa_open_by_device_string(
+- jd, NULL,
++ pcm_j = open_by_device_string_with_fallback(
++ j->alsa_name,
++ j->alsa_name_fallback,
++ dev_id,
++ NULL,
+ &try_ss, &try_map,
+ SND_PCM_STREAM_CAPTURE,
+ NULL, NULL, 0, NULL, NULL,
+ TRUE);
+
+- pa_xfree(jd);
+-
+ if (!pcm_j)
+ continue;
+ }
+diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
+index 77ac8a7..4c5d336 100644
+--- a/src/modules/alsa/alsa-util.h
++++ b/src/modules/alsa/alsa-util.h
+@@ -56,6 +56,7 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min);
+ typedef struct pa_alsa_profile_info {
+ pa_channel_map map;
+ const char *alsa_name;
++ const char *alsa_name_fallback;
+ const char *description; /* internationalized */
+ const char *name;
+ unsigned priority;
diff --git a/recipes/pulseaudio/pulseaudio-0.9.15/gcc4-compile-fix.patch b/recipes/pulseaudio/pulseaudio-0.9.15/gcc4-compile-fix.patch
new file mode 100644
index 0000000000..34ad026e4d
--- /dev/null
+++ b/recipes/pulseaudio/pulseaudio-0.9.15/gcc4-compile-fix.patch
@@ -0,0 +1,18 @@
+| fix for more strict syntax compliance in gcc4.x
+| pulsecore/core-util.c: In function 'pa_raise_priority':
+| pulsecore/core-util.c:547: error: label at end of compound statement
+| Signed off: mickey@openmoko.org
+|
+Index: pulseaudio-0.9.6/src/pulsecore/core-util.c
+===================================================================
+--- pulseaudio-0.9.6.orig/src/pulsecore/core-util.c
++++ pulseaudio-0.9.6/src/pulsecore/core-util.c
+@@ -535,7 +535,7 @@ void pa_raise_priority(void) {
+ pa_log_info("Successfully gained high priority class.");
+ #endif
+
+-fail:
++fail:;
+
+ #if defined(HAVE_SYS_CAPABILITY_H)
+ if (caps) {
diff --git a/recipes/pulseaudio/pulseaudio-0.9.15/periodfix.patch b/recipes/pulseaudio/pulseaudio-0.9.15/periodfix.patch
new file mode 100644
index 0000000000..3a1c605009
--- /dev/null
+++ b/recipes/pulseaudio/pulseaudio-0.9.15/periodfix.patch
@@ -0,0 +1,73 @@
+X-Git-Url: http://git.0pointer.de/?p=pulseaudio.git;a=blobdiff_plain;f=src%2Fmodules%2Falsa%2Falsa-util.c;h=107bec357c7889f0197853f5e5f1951a5a2f5be0;hp=a3a045080dac0e1b30e8671443ce73a03337cf14;hb=4bffc7849f7898fa85dd6ac8e735db86b57814b3;hpb=d2b5ae5525e9036c4f91b1615879a5a07aac5bf2
+
+diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
+index a3a0450..107bec3 100644
+--- a/src/modules/alsa/alsa-util.c
++++ b/src/modules/alsa/alsa-util.c
+@@ -334,7 +334,6 @@ int pa_alsa_set_hw_params(
+ int ret = -1;
+ snd_pcm_uframes_t _period_size = period_size ? *period_size : 0;
+ unsigned int _periods = periods ? *periods : 0;
+- snd_pcm_uframes_t buffer_size;
+ unsigned int r = ss->rate;
+ unsigned int c = ss->channels;
+ pa_sample_format_t f = ss->format;
+@@ -390,39 +389,47 @@ int pa_alsa_set_hw_params(
+ goto finish;
+
+ if (_period_size && tsched_size && _periods) {
++
+ /* Adjust the buffer sizes, if we didn't get the rate we were asking for */
+ _period_size = (snd_pcm_uframes_t) (((uint64_t) _period_size * r) / ss->rate);
+ tsched_size = (snd_pcm_uframes_t) (((uint64_t) tsched_size * r) / ss->rate);
+
+ if (_use_tsched) {
+- _period_size = tsched_size;
+- _periods = 1;
++ snd_pcm_uframes_t buffer_size;
+
+ pa_assert_se(snd_pcm_hw_params_get_buffer_size_max(hwparams, &buffer_size) == 0);
+ pa_log_debug("Maximum hw buffer size is %u ms", (unsigned) buffer_size * 1000 / r);
++
++ _period_size = tsched_size;
++ _periods = 1;
+ }
+
++ if (_period_size > 0 && _periods > 0) {
++ snd_pcm_uframes_t buffer_size;
++
+ buffer_size = _periods * _period_size;
+
++ if ((ret = snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hwparams, &buffer_size)) < 0)
++ pa_log_info("snd_pcm_hw_params_set_buffer_size_near() failed: %s", pa_alsa_strerror(ret));
++ }
++
+ if (_periods > 0) {
+
+- /* First we pass 0 as direction to get exactly what we asked
+- * for. That this is necessary is presumably a bug in ALSA */
++ /* First we pass 0 as direction to get exactly what we
++ * asked for. That this is necessary is presumably a bug
++ * in ALSA. All in all this is mostly a hint to ALSA, so
++ * we don't care if this fails. */
+
+ dir = 0;
+- if ((ret = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir)) < 0) {
++ if (snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir) < 0) {
+ dir = 1;
+- if ((ret = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir)) < 0) {
++ if (snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir) < 0) {
+ dir = -1;
+ if ((ret = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir)) < 0)
+- goto finish;
++ pa_log_info("snd_pcm_hw_params_set_periods_near() failed: %s", pa_alsa_strerror(ret));
+ }
+ }
+ }
+-
+- if (_period_size > 0)
+- if ((ret = snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hwparams, &buffer_size)) < 0)
+- goto finish;
+ }
+
+ if ((ret = snd_pcm_hw_params(pcm_handle, hwparams)) < 0)
diff --git a/recipes/pulseaudio/pulseaudio-0.9.15/volatiles.04_pulse b/recipes/pulseaudio/pulseaudio-0.9.15/volatiles.04_pulse
new file mode 100644
index 0000000000..5b1998032b
--- /dev/null
+++ b/recipes/pulseaudio/pulseaudio-0.9.15/volatiles.04_pulse
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d pulse pulse 0755 /var/run/pulse none
diff --git a/recipes/pulseaudio/pulseaudio.inc b/recipes/pulseaudio/pulseaudio.inc
index d625f872f9..912d5b9a79 100644
--- a/recipes/pulseaudio/pulseaudio.inc
+++ b/recipes/pulseaudio/pulseaudio.inc
@@ -3,9 +3,10 @@ HOMEPAGE = "http://www.pulseaudio.org"
AUTHOR = "Lennart Poettering"
SECTION = "libs/multimedia"
LICENSE = "LGPL"
-DEPENDS = "libatomics-ops liboil avahi libsamplerate0 libsndfile1 libtool hal"
+DEPENDS = "bluez4 libatomics-ops liboil avahi libsamplerate0 libsndfile1 libtool hal virtual/libx11"
# optional
-DEPENDS += "alsa-lib glib-2.0"
+DEPENDS += "alsa-lib glib-2.0 dbus consolekit hal openssl"
+INC_PR = "r8"
SRC_URI = "http://0pointer.de/lennart/projects/pulseaudio/pulseaudio-${PV}.tar.gz \
file://gcc4-compile-fix.patch;patch=1 \
@@ -15,7 +16,9 @@ inherit autotools pkgconfig
EXTRA_OECONF = "\
--disable-lynx \
- --without-x \
+ --enable-bluez \
+ --disable-polkit \
+ --with-x \
--without-jack \
--with-glib \
--with-alsa \
@@ -45,7 +48,7 @@ do_install_append() {
fi
}
-PACKAGES =+ "libpulsecore libpulse libpulse-simple libpulse-browse libpulse-mainloop-glib \
+PACKAGES =+ "libpulsecore libpulsecommon libpulsedsp libpulse libpulse-simple libpulse-browse libpulse-mainloop-glib \
pulseaudio-server pulseaudio-misc pulseaudio-gconf-helper"
#upgrade path:
@@ -53,23 +56,27 @@ RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf"
PACKAGES_DYNAMIC = "pulseaudio-lib* pulseaudio-module* libpulse-lib* libpulse-module* "
-FILES_libpulsecore = "${libdir}/libpulsecore.so.*"
+FILES_libpulsecore = "${libdir}/libpulsecore*.so"
+FILES_libpulsecommon = "${libdir}/libpulsecommon*.so"
+FILES_libpulsedsp = "${libdir}/libpulsedsp*.so"
FILES_libpulse = "${libdir}/libpulse.so.*"
FILES_libpulse-simple = "${libdir}/libpulse-simple.so.*"
FILES_libpulse-browse = "${libdir}/libpulse-browse.so.*"
FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*"
FILES_${PN}-dbg += "${libexecdir}/pulse/.debug \
- ${libdir}/pulse-0.9/modules/.debug"
-FILES_${PN}-dev += "${libdir}/pulse-0.9/modules/*.la"
+ ${libdir}/pulse-${PV}/modules/.debug"
+FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la"
FILES_${PN}-conf = "${sysconfdir}"
FILES_${PN}-bin = "${bindir}/* \
- ${sysconfdir}/default/volatiles/ \
- ${datadir}/PolicyKit"
-FILES_${PN}-server = "${bindir}/pulseaudio ${sysconfdir}"
+ ${sysconfdir}/default/volatiles/volatiles.04_pulse"
+FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl"
FILES_${PN}-gconf-helper = "${libexecdir}/pulse/gconf-helper"
FILES_${PN}-misc = "${bindir}/*"
+# Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it)
+ALLOW_EMPTY_${PN} = "1"
+
CONFFILES_pulseaudio-server = "\
${sysconfdir}/pulse/default.pa \
${sysconfdir}/pulse/daemon.conf \
@@ -96,7 +103,29 @@ pkg_postrm_${PN}-server() {
python populate_packages_prepend() {
#bb.data.setVar('PKG_pulseaudio', 'pulseaudio', d)
- plugindir = bb.data.expand('${libdir}/pulse-0.9/modules/', d)
+ plugindir = bb.data.expand('${libdir}/pulse-${PV}/modules/', d)
do_split_packages(d, plugindir, '^module-(.*)\.so$', 'pulseaudio-module-%s', 'PulseAudio module for %s', extra_depends='' )
do_split_packages(d, plugindir, '^lib(.*)\.so$', 'pulseaudio-lib-%s', 'PulseAudio library for %s', extra_depends='' )
}
+
+RDEPENDS_pulseaudio-module-console-kit =+ "consolekit"
+RDEPENDS_pulseaudio-module-hal_detect =+ "hal"
+RDEPENDS_pulseaudio-server = " \
+ pulseaudio-module-device-restore \
+ pulseaudio-module-stream-restore \
+ pulseaudio-module-card-restore \
+ pulseaudio-module-augment-properties \
+ pulseaudio-module-detect \
+ pulseaudio-module-alsa-sink \
+ pulseaudio-module-alsa-source \
+ pulseaudio-module-alsa-card \
+ pulseaudio-module-native-protocol-unix \
+ pulseaudio-module-hal-detect \
+ pulseaudio-module-default-device-restore \
+ pulseaudio-module-rescue-streams \
+ pulseaudio-module-always-sink \
+ pulseaudio-module-suspend-on-idle \
+ pulseaudio-module-console-kit \
+ pulseaudio-module-position-event-sounds \
+ pulseaudio-module-cork-music-on-phone "
+
diff --git a/recipes/pulseaudio/pulseaudio_0.9.10.bb b/recipes/pulseaudio/pulseaudio_0.9.10.bb
index f26d583fdb..ec190fa558 100644
--- a/recipes/pulseaudio/pulseaudio_0.9.10.bb
+++ b/recipes/pulseaudio/pulseaudio_0.9.10.bb
@@ -1,7 +1,6 @@
require pulseaudio.inc
-DEPENDS += "dbus"
-PR = "r5"
+PR = "${INC_PR}.1"
SRC_URI += "\
file://disable-using-glibc-tls.patch;patch=1 \
diff --git a/recipes/pulseaudio/pulseaudio_0.9.11.bb b/recipes/pulseaudio/pulseaudio_0.9.11.bb
index b0b5541713..9f91912177 100644
--- a/recipes/pulseaudio/pulseaudio_0.9.11.bb
+++ b/recipes/pulseaudio/pulseaudio_0.9.11.bb
@@ -1,7 +1,7 @@
require pulseaudio.inc
-DEPENDS += "dbus gdbm speex"
-PR = "r1"
+DEPENDS += "gdbm speex"
+PR = "${INC_PR}.1"
# work in progress
DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/pulseaudio/pulseaudio_0.9.15.bb b/recipes/pulseaudio/pulseaudio_0.9.15.bb
new file mode 100644
index 0000000000..4b16b474d2
--- /dev/null
+++ b/recipes/pulseaudio/pulseaudio_0.9.15.bb
@@ -0,0 +1,18 @@
+require pulseaudio.inc
+
+DEPENDS += "gdbm speex"
+PR = "${INC_PR}.1"
+
+SRC_URI += "\
+ file://buildfix.patch;patch=1 \
+ file://alsaerror.patch;patch=1 \
+ file://periodfix.patch;patch=1 \
+ file://fallback.patch;patch=1 \
+ file://autoconf_version.patch;patch=1 \
+"
+
+do_compile_prepend() {
+ cd ${S}
+ mkdir -p ${S}/libltdl
+ cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
+}
diff --git a/recipes/pulseaudio/pulseaudio_0.9.6.bb b/recipes/pulseaudio/pulseaudio_0.9.6.bb
index 8944b664c0..4d10af5561 100644
--- a/recipes/pulseaudio/pulseaudio_0.9.6.bb
+++ b/recipes/pulseaudio/pulseaudio_0.9.6.bb
@@ -1,4 +1,3 @@
require pulseaudio.inc
-PR = "r8"
-
+PR = "${INC_PR}.1"
diff --git a/recipes/pulseaudio/pulseaudio_0.9.9.bb b/recipes/pulseaudio/pulseaudio_0.9.9.bb
index 764f891654..0c36cd483f 100644
--- a/recipes/pulseaudio/pulseaudio_0.9.9.bb
+++ b/recipes/pulseaudio/pulseaudio_0.9.9.bb
@@ -1,7 +1,6 @@
require pulseaudio.inc
-DEPENDS += "dbus"
-PR = "r5"
+PR = "${INC_PR}.1"
# this is not correct (see below)
SRC_URI += "\
diff --git a/recipes/pwlib/pwlib.inc b/recipes/pwlib/pwlib.inc
new file mode 100644
index 0000000000..981becf42f
--- /dev/null
+++ b/recipes/pwlib/pwlib.inc
@@ -0,0 +1,31 @@
+HOMEPAGE = "http://openh323.sourceforge.net/"
+DESCRIPTION = "Portable Text and GUI C/C++ Class Libarary."
+LICENSE = "GPL"
+DEPENDS = "openssl openldap"
+
+INC_PR = "r1"
+
+# Somebody should teach these people about naming tarballs ;-)
+MIN_VER ?= "1"
+SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}_${@bb.data.getVar('PV',d,1).split('.')[1]}_${@bb.data.getVar('PV',d,1).split('.')[1]}"
+SRC_URI = "http://www.voxgratia.org/releases/${PN}-v1_${SHRT_VER}-${MIN_VER}src.tar.gz"
+
+inherit autotools
+
+EXTRA_OECONF="--enable-ipv6 --disable-sasl --disable-sdl \
+ --disable-video --enable-plugins --with-plugins=oss"
+
+# Use openSSL
+
+export OPENSSLFLAG="1"
+export OPENSSLDIR="${STAGING_LIBDIR}"
+export OPENSSLLIBS="-lssl -lcrypt"
+export MACHTYPE="x86"
+export OSTYPE="linux"
+export OSRELEASE="openembedded"
+
+export CPLUS="${CXX}"
+
+do_compile() {
+ oe_runmake opt
+}
diff --git a/recipes/pwlib/pwlib_1.5.2.bb b/recipes/pwlib/pwlib_1.5.2.bb
index a4ced1f35c..0963a82ba2 100644
--- a/recipes/pwlib/pwlib_1.5.2.bb
+++ b/recipes/pwlib/pwlib_1.5.2.bb
@@ -1,32 +1,6 @@
-# pwlib .bb build file
-# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved
-# Released under the MIT license (see /COPYING)
+require pwlib.inc
-HOMEPAGE="http://www.openh323.org/docs/PWLib/"
-DESCRIPTION="Portable Text and GUI C/C++ Class Libarary."
-LICENSE = "GPL"
+PR = "${INC_PR}.1"
-SRC_URI="http://www.openh323.org/bin/${PN}_${PV}.tar.gz"
-DEPENDS="openssl openldap"
-
-inherit autotools
-
-EXTRA_OECONF="--enable-ipv6 --disable-sasl --disable-sdl \
- --disable-video --enable-plugins --with-plugins=oss"
-
-S="${WORKDIR}/${PN}"
-
-# Use openSSL
-
-export OPENSSLFLAG="1"
-export OPENSSLDIR="${STAGING_LIBDIR}"
-export OPENSSLLIBS="-lssl -lcrypt"
-export MACHTYPE="x86"
-export OSTYPE="linux"
-export OSRELEASE="openembedded"
-
-export CPLUS="${CXX}"
-
-do_compile() {
- oe_runmake opt
-}
+#seems like this very old source has vanished upstream
+SRC_URI = "http://www.angstrom-distribution.org/unstable/sources/pwlib_1.5.2.tar.gz"
diff --git a/recipes/pwlib/pwlib_1.6.6.4.bb b/recipes/pwlib/pwlib_1.6.6.4.bb
index c41400c001..fdadb359e7 100644
--- a/recipes/pwlib/pwlib_1.6.6.4.bb
+++ b/recipes/pwlib/pwlib_1.6.6.4.bb
@@ -1,3 +1,7 @@
+# status as of 2009/05/21: This particular bb file is broken beyond what I
+# (Laibsch) care to fix. If you fix it, please base your changes on top
+# of pwlib.inc
+
# pwlib .bb build file
# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved
# Released under the MIT license (see /COPYING)
diff --git a/recipes/python/python-2.6.1/07-export-grammer.patch b/recipes/python/python-2.6.1/07-export-grammer.patch
new file mode 100644
index 0000000000..b7ec2bbc65
--- /dev/null
+++ b/recipes/python/python-2.6.1/07-export-grammer.patch
@@ -0,0 +1,10 @@
+--- Python-2.6.1.orig/Parser/printgrammar.c 2008-04-13 15:35:56.000000000 -0500
++++ Python-2.6.1/Parser/printgrammar.c 2008-12-28 00:01:28.675633800 -0600
+@@ -16,6 +16,7 @@
+ fprintf(fp, "/* Generated by Parser/pgen */\n\n");
+ fprintf(fp, "#include \"pgenheaders.h\"\n");
+ fprintf(fp, "#include \"grammar.h\"\n");
++ fprintf(fp, "PyAPI_DATA(grammar) _PyParser_Grammar;\n");
+ printdfas(g, fp);
+ printlabels(g, fp);
+ fprintf(fp, "grammar _PyParser_Grammar = {\n");
diff --git a/recipes/python/python-native_2.6.1.bb b/recipes/python/python-native_2.6.1.bb
index 3ae48285b1..00d87e6f59 100644
--- a/recipes/python/python-native_2.6.1.bb
+++ b/recipes/python/python-native_2.6.1.bb
@@ -1,5 +1,7 @@
require python.inc
-DEPENDS = "openssl-native bzip2-full-native"
+DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native"
+
+PR .= ".1"
SRC_URI = "\
http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
diff --git a/recipes/python/python-pycups_1.9.45.bb b/recipes/python/python-pycups_1.9.45.bb
new file mode 100644
index 0000000000..bd127d5559
--- /dev/null
+++ b/recipes/python/python-pycups_1.9.45.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "cups Python Bindings"
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+DEPENDS = "cups"
+SRCNAME = "pycups"
+
+SRC_URI = "http://cyberelk.net/tim/data/pycups/pycups-${PV}.tar.bz2"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit distutils
+
+# used during compilation
+CFLAGS += -DVERSION=\\"${PV}\\"
+
+RDEPENDS = "python-core cups"
diff --git a/recipes/python/python_2.6.1.bb b/recipes/python/python_2.6.1.bb
index e50ca43aab..8ca51ae3bf 100644
--- a/recipes/python/python_2.6.1.bb
+++ b/recipes/python/python_2.6.1.bb
@@ -12,6 +12,7 @@ SRC_URI = "\
file://04-default-is-optimized.patch;patch=1 \
file://05-enable-ctypes-cross-build.patch;patch=1 \
file://06-libffi-enable-default-mips.patch;patch=1 \
+ file://07-export-grammer.patch;patch=1 \
file://99-ignore-optimization-flag.patch;patch=1 \
\
# not yet pushed forward
diff --git a/recipes/qemu/qemu-0.10.3/06_exit_segfault.patch b/recipes/qemu/qemu-0.10.3/06_exit_segfault.patch
new file mode 100644
index 0000000000..bc02d31839
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/06_exit_segfault.patch
@@ -0,0 +1,45 @@
+#DPATCHLEVEL=0
+---
+# linux-user/main.c | 8 ++++----
+# 1 file changed, 4 insertions(+), 4 deletions(-)
+#
+Index: linux-user/main.c
+===================================================================
+--- linux-user/main.c.orig 2008-04-24 20:15:46.000000000 +0100
++++ linux-user/main.c 2008-04-24 20:15:53.000000000 +0100
+@@ -765,7 +765,7 @@
+ default:
+ printf ("Unhandled trap: 0x%x\n", trapnr);
+ cpu_dump_state(env, stderr, fprintf, 0);
+- exit (1);
++ _exit (1);
+ }
+ process_pending_signals (env);
+ }
+@@ -1697,7 +1697,7 @@
+ default:
+ printf ("Unhandled trap: 0x%x\n", trapnr);
+ cpu_dump_state(env, stderr, fprintf, 0);
+- exit (1);
++ _exit (1);
+ }
+ process_pending_signals (env);
+ }
+@@ -2026,7 +2026,7 @@
+ for(item = cpu_log_items; item->mask != 0; item++) {
+ printf("%-10s %s\n", item->name, item->help);
+ }
+- exit(1);
++ _exit(1);
+ }
+ cpu_set_log(mask);
+ } else if (!strcmp(r, "s")) {
+@@ -2045,7 +2045,7 @@
+ if (qemu_host_page_size == 0 ||
+ (qemu_host_page_size & (qemu_host_page_size - 1)) != 0) {
+ fprintf(stderr, "page size must be a power of two\n");
+- exit(1);
++ _exit(1);
+ }
+ } else if (!strcmp(r, "g")) {
+ gdbstub_port = atoi(argv[optind++]);
diff --git a/recipes/qemu/qemu-0.10.3/11_signal_sigaction.patch b/recipes/qemu/qemu-0.10.3/11_signal_sigaction.patch
new file mode 100644
index 0000000000..cd56541b71
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/11_signal_sigaction.patch
@@ -0,0 +1,21 @@
+#DPATCHLEVEL=0
+---
+# linux-user/signal.c | 5 +++++
+# 1 file changed, 5 insertions(+)
+#
+Index: linux-user/signal.c
+===================================================================
+--- linux-user/signal.c.orig 2008-04-24 20:15:55.000000000 +0100
++++ linux-user/signal.c 2008-04-24 20:15:57.000000000 +0100
+@@ -512,6 +512,11 @@
+
+ if (sig < 1 || sig > TARGET_NSIG || sig == SIGKILL || sig == SIGSTOP)
+ return -EINVAL;
++
++ /* no point doing the stuff as those are not allowed for sigaction */
++ if ((sig == TARGET_SIGKILL) || (sig == TARGET_SIGSTOP))
++ return -EINVAL;
++
+ k = &sigact_table[sig - 1];
+ #if defined(DEBUG_SIGNAL)
+ fprintf(stderr, "sigaction sig=%d act=0x%08x, oact=0x%08x\n",
diff --git a/recipes/qemu/qemu-0.10.3/22_net_tuntap_stall.patch b/recipes/qemu/qemu-0.10.3/22_net_tuntap_stall.patch
new file mode 100644
index 0000000000..993960be98
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/22_net_tuntap_stall.patch
@@ -0,0 +1,13 @@
+Index: qemu-0.10.3/net.c
+===================================================================
+--- qemu-0.10.3.orig/net.c 2009-05-19 17:46:54.650870195 +0400
++++ qemu-0.10.3/net.c 2009-05-19 17:47:05.612854521 +0400
+@@ -955,7 +955,7 @@
+ return -1;
+ }
+ memset(&ifr, 0, sizeof(ifr));
+- ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
++ ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE;
+ if (ifname[0] != '\0')
+ pstrcpy(ifr.ifr_name, IFNAMSIZ, ifname);
+ else
diff --git a/recipes/qemu/qemu-0.10.3/31_syscalls.patch b/recipes/qemu/qemu-0.10.3/31_syscalls.patch
new file mode 100644
index 0000000000..20a1499d18
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/31_syscalls.patch
@@ -0,0 +1,22 @@
+Index: linux-user/syscall.c
+===================================================================
+--- linux-user/syscall.c.orig 2008-04-24 20:15:46.000000000 +0100
++++ linux-user/syscall.c 2008-04-24 20:15:59.000000000 +0100
+@@ -250,6 +250,7 @@
+ extern int setresgid(gid_t, gid_t, gid_t);
+ extern int getresgid(gid_t *, gid_t *, gid_t *);
+ extern int setgroups(int, gid_t *);
++extern int uselib(const char*);
+
+ #define ERRNO_TABLE_SIZE 1200
+
+@@ -4041,7 +4042,8 @@
+ #endif
+ #ifdef TARGET_NR_uselib
+ case TARGET_NR_uselib:
+- goto unimplemented;
++ ret = get_errno(uselib(path((const char*)arg1)));
++ break;
+ #endif
+ #ifdef TARGET_NR_swapon
+ case TARGET_NR_swapon:
diff --git a/recipes/qemu/qemu-0.10.3/32_syscall_sysctl.patch b/recipes/qemu/qemu-0.10.3/32_syscall_sysctl.patch
new file mode 100644
index 0000000000..2a670c90be
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/32_syscall_sysctl.patch
@@ -0,0 +1,55 @@
+#DPATCHLEVEL=0
+---
+# linux-user/syscall.c | 32 +++++++++++++++++++++++++++++---
+# 1 file changed, 29 insertions(+), 3 deletions(-)
+#
+Index: linux-user/syscall.c
+===================================================================
+--- linux-user/syscall.c.orig 2009-05-19 17:50:28.000000000 +0400
++++ linux-user/syscall.c 2009-05-19 17:52:19.094103462 +0400
+@@ -55,6 +55,7 @@
+ #include <netinet/ip.h>
+ #include <netinet/tcp.h>
+ #include <qemu-common.h>
++#include <sys/sysctl.h>
+ #ifdef HAVE_GPROF
+ #include <sys/gmon.h>
+ #endif
+@@ -5193,9 +5194,34 @@
+ break;
+ #endif
+ case TARGET_NR__sysctl:
+- /* We don't implement this, but ENOTDIR is always a safe
+- return value. */
+- ret = -TARGET_ENOTDIR;
++ {
++ struct __sysctl_args *args = (struct __sysctl_args *) arg1;
++ int *name_target, *name, nlen, *oldlenp, oldlen, newlen, i;
++ void *oldval, *newval;
++
++ name_target = (int *) tswapl((long) args->name);
++ nlen = tswapl(args->nlen);
++ oldval = (void *) tswapl((long) args->oldval);
++ oldlenp = (int *) tswapl((long) args->oldlenp);
++ oldlen = tswapl(*oldlenp);
++ newval = (void *) tswapl((long) args->newval);
++ newlen = tswapl(args->newlen);
++
++ name = alloca(nlen * sizeof (int));
++ for (i = 0; i < nlen; i++)
++ name[i] = tswapl(name_target[i]);
++
++ if (nlen == 2 && name[0] == CTL_KERN && name[1] == KERN_VERSION) {
++ ret = get_errno(
++ sysctl(name, nlen, oldval, &oldlen, newval, newlen));
++ if (!is_error(ret)) {
++ *oldlenp = tswapl(oldlen);
++ }
++ } else {
++ gemu_log("qemu: Unsupported sysctl name\n");
++ ret = -ENOSYS;
++ }
++ }
+ break;
+ case TARGET_NR_sched_setparam:
+ {
diff --git a/recipes/qemu/qemu-0.10.3/52_ne2000_return.patch b/recipes/qemu/qemu-0.10.3/52_ne2000_return.patch
new file mode 100644
index 0000000000..e364bff731
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/52_ne2000_return.patch
@@ -0,0 +1,17 @@
+---
+ hw/ne2000.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: trunk/hw/ne2000.c
+===================================================================
+--- trunk.orig/hw/ne2000.c 2008-04-24 20:15:46.000000000 +0100
++++ trunk/hw/ne2000.c 2008-04-24 20:16:05.000000000 +0100
+@@ -217,7 +217,7 @@
+ NE2000State *s = opaque;
+
+ if (s->cmd & E8390_STOP)
+- return 1;
++ return 0;
+ return !ne2000_buffer_full(s);
+ }
+
diff --git a/recipes/qemu/qemu-0.10.3/61_safe_64bit_int.patch b/recipes/qemu/qemu-0.10.3/61_safe_64bit_int.patch
new file mode 100644
index 0000000000..80e7b22e27
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/61_safe_64bit_int.patch
@@ -0,0 +1,27 @@
+#DPATCHLEVEL=0
+---
+# dyngen-exec.h | 4 ++--
+# 1 file changed, 2 insertions(+), 2 deletions(-)
+#
+Index: dyngen-exec.h
+===================================================================
+--- dyngen-exec.h.orig 2009-05-01 21:02:44.000000000 +0400
++++ dyngen-exec.h 2009-05-19 17:56:28.164854448 +0400
+@@ -41,7 +41,7 @@
+ // Linux/Sparc64 defines uint64_t
+ #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__))
+ /* XXX may be done for all 64 bits targets ? */
+-#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64)
++#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) || defined(__sparc__)
+ typedef unsigned long uint64_t;
+ #else
+ typedef unsigned long long uint64_t;
+@@ -58,7 +58,7 @@
+ typedef signed int int32_t;
+ // Linux/Sparc64 defines int64_t
+ #if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__))
+-#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64)
++#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) || defined(__sparc__)
+ typedef signed long int64_t;
+ #else
+ typedef signed long long int64_t;
diff --git a/recipes/qemu/qemu-0.10.3/63_sparc_build.patch b/recipes/qemu/qemu-0.10.3/63_sparc_build.patch
new file mode 100644
index 0000000000..097f55a09e
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/63_sparc_build.patch
@@ -0,0 +1,18 @@
+#DPATCHLEVEL=0
+---
+# sparc.ld | 2 +-
+# 1 file changed, 1 insertion(+), 1 deletion(-)
+#
+Index: sparc.ld
+===================================================================
+--- sparc.ld.orig 2008-04-24 20:15:46.000000000 +0100
++++ sparc.ld 2008-04-24 20:16:07.000000000 +0100
+@@ -6,7 +6,7 @@
+ SECTIONS
+ {
+ /* Read-only sections, merged into text segment: */
+- . = 0x60000000 + SIZEOF_HEADERS;
++ . = 0x60000000 + 0x400;
+ .interp : { *(.interp) }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
diff --git a/recipes/qemu/qemu-0.10.3/64_ppc_asm_constraints.patch b/recipes/qemu/qemu-0.10.3/64_ppc_asm_constraints.patch
new file mode 100644
index 0000000000..7562daf77b
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/64_ppc_asm_constraints.patch
@@ -0,0 +1,18 @@
+#DPATCHLEVEL=1
+---
+# cpu-all.h | 2 +-
+# 1 file changed, 1 insertion(+), 1 deletion(-)
+#
+Index: qemu-0.10.3/cpu-all.h
+===================================================================
+--- qemu-0.10.3.orig/cpu-all.h 2009-05-01 21:02:44.000000000 +0400
++++ qemu-0.10.3/cpu-all.h 2009-05-19 17:59:28.357103179 +0400
+@@ -288,7 +288,7 @@
+ static inline void stl_le_p(void *ptr, int v)
+ {
+ #ifdef _ARCH_PPC
+- __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr));
++ __asm__ __volatile__ ("stwbrx %0,0,%1" : : "r" (v), "r" (ptr) : "memory");
+ #else
+ uint8_t *p = ptr;
+ p[0] = v;
diff --git a/recipes/qemu/qemu-0.10.3/66_tls_ld.patch b/recipes/qemu/qemu-0.10.3/66_tls_ld.patch
new file mode 100644
index 0000000000..cbd3f873d8
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/66_tls_ld.patch
@@ -0,0 +1,55 @@
+---
+ arm.ld | 7 +++++++
+ i386.ld | 7 +++++++
+ 2 files changed, 14 insertions(+)
+
+Index: arm.ld
+===================================================================
+--- arm.ld.orig 2008-04-24 20:15:45.000000000 +0100
++++ arm.ld 2008-04-24 20:16:11.000000000 +0100
+@@ -26,6 +26,10 @@
+ { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
+ .rela.rodata :
+ { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
++ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
++ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
++ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
++ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.ctors : { *(.rel.ctors) }
+@@ -58,6 +62,9 @@
+ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
+ __exidx_end = .;
+ .reginfo : { *(.reginfo) }
++ /* Thread Local Storage sections */
++ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
++ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
+ /* Adjust the address for the data segment. We want to adjust up to
+ the same address within the page on the next page up. */
+ . = ALIGN(0x100000) + (. & (0x100000 - 1));
+Index: i386.ld
+===================================================================
+--- i386.ld.orig 2008-04-24 20:15:45.000000000 +0100
++++ i386.ld 2008-04-24 20:16:11.000000000 +0100
+@@ -28,6 +28,10 @@
+ { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
+ .rela.rodata :
+ { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
++ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
++ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
++ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
++ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.ctors : { *(.rel.ctors) }
+@@ -53,6 +57,9 @@
+ _etext = .;
+ PROVIDE (etext = .);
+ .fini : { *(.fini) } =0x47ff041f
++ /* Thread Local Storage sections */
++ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
++ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
+ . = ALIGN(32 / 8);
+ PROVIDE (__preinit_array_start = .);
+ .preinit_array : { *(.preinit_array) }
diff --git a/recipes/qemu/qemu-0.10.3/91-oh-sdl-cursor.patch b/recipes/qemu/qemu-0.10.3/91-oh-sdl-cursor.patch
new file mode 100644
index 0000000000..b3d95a4534
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/91-oh-sdl-cursor.patch
@@ -0,0 +1,18 @@
+=== modified file 'sdl.c'
+---
+ sdl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: sdl.c
+===================================================================
+--- sdl.c.orig 2008-04-24 20:15:45.000000000 +0100
++++ sdl.c 2008-04-24 20:16:12.000000000 +0100
+@@ -247,7 +247,7 @@
+
+ if (kbd_mouse_is_absolute()) {
+ SDL_ShowCursor(1);
+- SDL_SetCursor(sdl_cursor_hidden);
++ /* SDL_SetCursor(sdl_cursor_hidden); */
+ } else {
+ SDL_ShowCursor(0);
+ }
diff --git a/recipes/qemu/qemu-0.10.3/fix_baum_c_compilation.patch b/recipes/qemu/qemu-0.10.3/fix_baum_c_compilation.patch
new file mode 100644
index 0000000000..a2eb438ed9
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/fix_baum_c_compilation.patch
@@ -0,0 +1,30 @@
+Index: trunk/hw/baum.c
+===================================================================
+--- trunk.orig/hw/baum.c 2008-11-29 05:12:40.418390606 +0300
++++ trunk/hw/baum.c 2008-11-29 05:13:11.498378426 +0300
+@@ -569,8 +569,10 @@ CharDriverState *chr_baum_init(void)
+ CharDriverState *chr;
+ brlapi_handle_t *handle;
+ #ifdef CONFIG_SDL
++#ifdef SDL_VIDEO_DRIVER_X11
+ SDL_SysWMinfo info;
+ #endif
++#endif
+ int tty;
+
+ baum = qemu_mallocz(sizeof(BaumDriverState));
+@@ -605,12 +607,14 @@ CharDriverState *chr_baum_init(void)
+ }
+
+ #ifdef CONFIG_SDL
++#ifdef SDL_VIDEO_DRIVER_X11
+ memset(&info, 0, sizeof(info));
+ SDL_VERSION(&info.version);
+ if (SDL_GetWMInfo(&info))
+ tty = info.info.x11.wmwindow;
+ else
+ #endif
++#endif
+ tty = BRLAPI_TTY_DEFAULT;
+
+ if (brlapi__enterTtyMode(handle, tty, NULL) == -1) {
diff --git a/recipes/qemu/qemu-0.10.3/fix_segfault.patch b/recipes/qemu/qemu-0.10.3/fix_segfault.patch
new file mode 100644
index 0000000000..32ca3c0b6b
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/fix_segfault.patch
@@ -0,0 +1,37 @@
+---
+ linux-user/syscall.c | 22 ----------------------
+ 1 file changed, 22 deletions(-)
+
+Index: qemu-0.10.3/linux-user/syscall.c
+===================================================================
+--- qemu-0.10.3.orig/linux-user/syscall.c 2009-05-19 18:18:04.000000000 +0400
++++ qemu-0.10.3/linux-user/syscall.c 2009-05-19 18:18:40.397103379 +0400
+@@ -6024,28 +6024,6 @@
+ goto unimplemented_nowarn;
+ #endif
+
+-#ifdef TARGET_NR_clock_gettime
+- case TARGET_NR_clock_gettime:
+- {
+- struct timespec ts;
+- ret = get_errno(clock_gettime(arg1, &ts));
+- if (!is_error(ret)) {
+- host_to_target_timespec(arg2, &ts);
+- }
+- break;
+- }
+-#endif
+-#ifdef TARGET_NR_clock_getres
+- case TARGET_NR_clock_getres:
+- {
+- struct timespec ts;
+- ret = get_errno(clock_getres(arg1, &ts));
+- if (!is_error(ret)) {
+- host_to_target_timespec(arg2, &ts);
+- }
+- break;
+- }
+-#endif
+ #ifdef TARGET_NR_clock_nanosleep
+ case TARGET_NR_clock_nanosleep:
+ {
diff --git a/recipes/qemu/qemu-0.10.3/no-strip.patch b/recipes/qemu/qemu-0.10.3/no-strip.patch
new file mode 100644
index 0000000000..4813dd4e2b
--- /dev/null
+++ b/recipes/qemu/qemu-0.10.3/no-strip.patch
@@ -0,0 +1,26 @@
+Index: trunk/Makefile
+===================================================================
+--- trunk.orig/Makefile 2008-04-24 20:15:37.000000000 +0100
++++ trunk/Makefile 2008-04-24 20:16:30.000000000 +0100
+@@ -196,7 +196,7 @@
+ install: all $(if $(BUILD_DOCS),install-doc)
+ mkdir -p "$(DESTDIR)$(bindir)"
+ ifneq ($(TOOLS),)
+- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
++ $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)"
+ endif
+ mkdir -p "$(DESTDIR)$(datadir)"
+ set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
+Index: trunk/Makefile.target
+===================================================================
+--- trunk.orig/Makefile.target 2008-04-24 20:15:37.000000000 +0100
++++ trunk/Makefile.target 2008-04-24 20:16:30.000000000 +0100
+@@ -685,7 +685,7 @@
+
+ install: all
+ ifneq ($(PROGS),)
+- $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
++ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)"
+ endif
+
+ # Include automatically generated dependency files
diff --git a/recipes/qemu/qemu-native.inc b/recipes/qemu/qemu-native.inc
index e4064a2f75..9edad6609d 100644
--- a/recipes/qemu/qemu-native.inc
+++ b/recipes/qemu/qemu-native.inc
@@ -1,3 +1,6 @@
inherit native
DEPENDS = "libsdl-native zlib-native"
+
+export OS_CFLAGS="${CFLAGS} ${LDFLAGS}"
+
diff --git a/recipes/qemu/qemu_0.10.3.bb b/recipes/qemu/qemu_0.10.3.bb
index d6ad1d7e4a..f65f60decd 100644
--- a/recipes/qemu/qemu_0.10.3.bb
+++ b/recipes/qemu/qemu_0.10.3.bb
@@ -1,14 +1,27 @@
LICENSE = "GPL"
DEPENDS = "zlib"
-# Need to port OE patches there
-DEFAULT_PREFERENCE = "-1"
+PR = "r1"
FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
FILESDIR = "${WORKDIR}"
SRC_URI = "\
http://download.savannah.gnu.org/releases/qemu/qemu-${PV}.tar.gz \
+ file://06_exit_segfault.patch;patch=1;pnum=0 \
+ file://11_signal_sigaction.patch;patch=1;pnum=0 \
+ file://22_net_tuntap_stall.patch;patch=1 \
+ file://31_syscalls.patch;patch=1;pnum=0 \
+ file://32_syscall_sysctl.patch;patch=1;pnum=0 \
+ file://52_ne2000_return.patch;patch=1 \
+ file://61_safe_64bit_int.patch;patch=1;pnum=0 \
+ file://63_sparc_build.patch;patch=1;pnum=0 \
+ file://64_ppc_asm_constraints.patch;patch=1 \
+ file://66_tls_ld.patch;patch=1;pnum=0 \
+ file://91-oh-sdl-cursor.patch;patch=1;pnum=0 \
+ file://fix_segfault.patch;patch=1 \
+ file://no-strip.patch;patch=1 \
+ file://fix_baum_c_compilation.patch;patch=1 \
"
S = "${WORKDIR}/qemu-${PV}"
diff --git a/recipes/qpf-fonts/qpf-qte_2.3.10.bb b/recipes/qpf-fonts/qpf-qte_2.3.10.bb
index a1a589f003..16f1563312 100644
--- a/recipes/qpf-fonts/qpf-qte_2.3.10.bb
+++ b/recipes/qpf-fonts/qpf-qte_2.3.10.bb
@@ -20,8 +20,8 @@ PROVIDES += "qte-font-smoothserif-140 qte-font-smoothserif-180 qte-font-smooths
PROVIDES += "qte-font-smoothtimes-100 qte-font-smoothtimes-160 qte-font-smoothtimes-170"
PROVIDES += "qte-font-smoothtimes-220 qte-font-smoothtimes-250 qte-font-smoothtimes-440"
PROVIDES += "qte-font-unifont"
-RPROVIDES_qte-font-unifont += "virtual/japanese-font"
-RPROVIDES_qte-font-japanese += "virtual/japanese-font"
+RPROVIDES_qte-font-unifont += "virtual-japanese-font"
+RPROVIDES_qte-font-japanese += "virtual-japanese-font"
SRC_URI = "ftp://ftp.trolltech.com/pub/qt/source/qt-embedded-${PV}-free.tar.gz"
S = "${WORKDIR}/qt-${PV}"
diff --git a/recipes/qpf-fonts/qpf-unifont_1.0.bb b/recipes/qpf-fonts/qpf-unifont_1.0.bb
index e91e762845..8928c83471 100644
--- a/recipes/qpf-fonts/qpf-unifont_1.0.bb
+++ b/recipes/qpf-fonts/qpf-unifont_1.0.bb
@@ -2,7 +2,7 @@ require qpf.inc
DESCRIPTION = "Unicode fonts - QPF Edition"
LICENSE = "GPL QPL"
-RPROVIDES = "virtual/japanese-font"
+RPROVIDES = "virtual-japanese-font"
PR = "r2"
SRC_URI = "http://www.openzaurus.org/mirror/qpf-unifont.tar.bz2"
diff --git a/recipes/qpf-fonts/qpf-unismall_1.0.0.bb b/recipes/qpf-fonts/qpf-unismall_1.0.0.bb
index 6298e2dfc4..8ec527f064 100644
--- a/recipes/qpf-fonts/qpf-unismall_1.0.0.bb
+++ b/recipes/qpf-fonts/qpf-unismall_1.0.0.bb
@@ -3,7 +3,7 @@ require qpf.inc
DESCRIPTION = "Lightweight Japanese font in 10 point suitable for 320x240 display"
HOMEPAGE = "http://sourceforge.jp/projects/zaurus-ja/"
LICENSE = "GPL"
-RPROVIDES = "virtual/japanese-font"
+RPROVIDES = "virtual-japanese-font"
PR = "r4"
SRC_URI = "http://osdn.dl.sourceforge.jp/zaurus-ja/773/unismall-${PV}.tar.gz"
diff --git a/recipes/qt4/files/0003-no-tools.patch b/recipes/qt4/qt4-embedded-4.4.3/0003-no-tools.patch
index bb36444f80..bb36444f80 100644
--- a/recipes/qt4/files/0003-no-tools.patch
+++ b/recipes/qt4/qt4-embedded-4.4.3/0003-no-tools.patch
diff --git a/recipes/qt4/files/0006-freetype-host-includes.patch b/recipes/qt4/qt4-embedded-4.4.3/0006-freetype-host-includes.patch
index cc8e115fee..cc8e115fee 100644
--- a/recipes/qt4/files/0006-freetype-host-includes.patch
+++ b/recipes/qt4/qt4-embedded-4.4.3/0006-freetype-host-includes.patch
diff --git a/recipes/qt4/files/0007-openssl-host-includes.patch b/recipes/qt4/qt4-embedded-4.4.3/0007-openssl-host-includes.patch
index 35b71d9694..35b71d9694 100644
--- a/recipes/qt4/files/0007-openssl-host-includes.patch
+++ b/recipes/qt4/qt4-embedded-4.4.3/0007-openssl-host-includes.patch
diff --git a/recipes/qt4/files/0008-qt-lib-infix.patch b/recipes/qt4/qt4-embedded-4.4.3/0008-qt-lib-infix.patch
index b1a443f24c..b1a443f24c 100644
--- a/recipes/qt4/files/0008-qt-lib-infix.patch
+++ b/recipes/qt4/qt4-embedded-4.4.3/0008-qt-lib-infix.patch
diff --git a/recipes/qt4/files/4.5.1/0003-no-tools.patch b/recipes/qt4/qt4-embedded-4.5.1/0003-no-tools.patch
index 3829ffcdc5..3829ffcdc5 100644
--- a/recipes/qt4/files/4.5.1/0003-no-tools.patch
+++ b/recipes/qt4/qt4-embedded-4.5.1/0003-no-tools.patch
diff --git a/recipes/qt4/files/4.5.1/0006-freetype-host-includes.patch b/recipes/qt4/qt4-embedded-4.5.1/0006-freetype-host-includes.patch
index 987c425138..987c425138 100644
--- a/recipes/qt4/files/4.5.1/0006-freetype-host-includes.patch
+++ b/recipes/qt4/qt4-embedded-4.5.1/0006-freetype-host-includes.patch
diff --git a/recipes/qt4/files/4.5.1/0007-openssl-host-includes.patch b/recipes/qt4/qt4-embedded-4.5.1/0007-openssl-host-includes.patch
index 3409cc0bf2..3409cc0bf2 100644
--- a/recipes/qt4/files/4.5.1/0007-openssl-host-includes.patch
+++ b/recipes/qt4/qt4-embedded-4.5.1/0007-openssl-host-includes.patch
diff --git a/recipes/qt4/files/4.5.1/0008-qt-lib-infix.patch b/recipes/qt4/qt4-embedded-4.5.1/0008-qt-lib-infix.patch
index 3efaff37d3..3efaff37d3 100644
--- a/recipes/qt4/files/4.5.1/0008-qt-lib-infix.patch
+++ b/recipes/qt4/qt4-embedded-4.5.1/0008-qt-lib-infix.patch
diff --git a/recipes/qt4/files/4.5.1/0010-no-simpledecoration-example.patch b/recipes/qt4/qt4-embedded-4.5.1/0010-no-simpledecoration-example.patch
index 070b4ac9c1..070b4ac9c1 100644
--- a/recipes/qt4/files/4.5.1/0010-no-simpledecoration-example.patch
+++ b/recipes/qt4/qt4-embedded-4.5.1/0010-no-simpledecoration-example.patch
diff --git a/recipes/qt4/qt4-embedded.inc b/recipes/qt4/qt4-embedded.inc
new file mode 100644
index 0000000000..26b4116f40
--- /dev/null
+++ b/recipes/qt4/qt4-embedded.inc
@@ -0,0 +1,40 @@
+SUMMARY = "Qt is a versatile cross-platform application framework -- this is the embedded version."
+SECTION = "libs"
+LICENSE = "GPL QPL"
+PRIORITY = "optional"
+HOMEPAGE = "http://www.trolltech.com"
+DEPENDS += "directfb tslib"
+INC_PR = "r11"
+
+QT_BASE_NAME = "qt4-embedded"
+QT_BASE_LIB = "libqt-embedded"
+QT_DIR_NAME = "qtopia"
+QT_LIBINFIX = "E"
+
+SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \
+ file://0001-cross-compile.patch;patch=1 \
+ file://0002-fix-resinit-declaration.patch;patch=1 \
+ file://0003-no-tools.patch;patch=1 \
+ file://0004-no-qmake.patch;patch=1 \
+ file://0006-freetype-host-includes.patch;patch=1 \
+ file://0007-openssl-host-includes.patch;patch=1 \
+ file://0008-qt-lib-infix.patch;patch=1 \
+ file://0009-support-2bpp.patch;patch=1 \
+ file://g++.conf \
+ file://linux.conf \
+ "
+S = "${WORKDIR}/qt-embedded-linux-opensource-src-${PV}"
+
+QT_CONFIG_FLAGS += " \
+ -qtlibinfix ${QT_LIBINFIX} \
+ -qt-decoration-styled -plugin-decoration-default -plugin-decoration-windows \
+ -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc -plugin-gfx-directfb \
+ -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb \
+ -qt-kbd-tty -qt-kbd-usb -qt-kbd-qvfb \
+ -DQT_KEYPAD_NAVIGATION \
+ "
+
+require qt4.inc
+
+inherit qt4e
+
diff --git a/recipes/qt4/qt4-embedded_4.4.3.bb b/recipes/qt4/qt4-embedded_4.4.3.bb
index c7685c3770..f5358a069e 100644
--- a/recipes/qt4/qt4-embedded_4.4.3.bb
+++ b/recipes/qt4/qt4-embedded_4.4.3.bb
@@ -1,39 +1,3 @@
-SUMMARY = "Qt is a versatile cross-platform application framework -- this is the embedded version."
-SECTION = "libs"
-LICENSE = "GPL QPL"
-PRIORITY = "optional"
-HOMEPAGE = "http://www.trolltech.com"
-DEPENDS += "tslib"
-PR = "r11"
+include qt4-embedded.inc
-SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \
- file://0001-cross-compile.patch;patch=1 \
- file://0002-fix-resinit-declaration.patch;patch=1 \
- file://0003-no-tools.patch;patch=1 \
- file://0004-no-qmake.patch;patch=1 \
- file://0006-freetype-host-includes.patch;patch=1 \
- file://0007-openssl-host-includes.patch;patch=1 \
- file://0008-qt-lib-infix.patch;patch=1 \
- file://0009-support-2bpp.patch;patch=1 \
- file://g++.conf \
- file://linux.conf \
- "
-S = "${WORKDIR}/qt-embedded-linux-opensource-src-${PV}"
-
-QT_CONFIG_FLAGS += " \
- -qtlibinfix E \
- -qt-decoration-styled -plugin-decoration-default -plugin-decoration-windows \
- -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc \
- -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb \
- -qt-kbd-tty -qt-kbd-usb -qt-kbd-qvfb \
- -DQT_KEYPAD_NAVIGATION \
- "
-
-QT_BASE_NAME = "qt4-embedded"
-QT_BASE_LIB = "libqt-embedded"
-QT_DIR_NAME = "qtopia"
-QT_LIBINFIX="E"
-
-require qt4.inc
-
-inherit qt4e
+PR = "${INC_PR}.1"
diff --git a/recipes/qt4/qt4-embedded_4.5.1.bb b/recipes/qt4/qt4-embedded_4.5.1.bb
index 3ec4b9aeb5..dff754c68c 100644
--- a/recipes/qt4/qt4-embedded_4.5.1.bb
+++ b/recipes/qt4/qt4-embedded_4.5.1.bb
@@ -1,39 +1,6 @@
-SUMMARY = "Qt is a versatile cross-platform application framework -- this is the embedded version."
-SECTION = "libs"
-LICENSE = "GPL LGPL QPL"
-PRIORITY = "optional"
-HOMEPAGE = "http://www.trolltech.com"
-DEPENDS += "tslib"
+include qt4-embedded.inc
-SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \
- file://0001-cross-compile.patch;patch=1 \
- file://0002-fix-resinit-declaration.patch;patch=1 \
- file://${PV}/0003-no-tools.patch;patch=1 \
- file://0004-no-qmake.patch;patch=1 \
- file://${PV}/0006-freetype-host-includes.patch;patch=1 \
- file://${PV}/0007-openssl-host-includes.patch;patch=1 \
- file://${PV}/0008-qt-lib-infix.patch;patch=1 \
- file://0009-support-2bpp.patch;patch=1 \
- file://${PV}/0010-no-simpledecoration-example.patch;patch=1 \
- file://g++.conf \
- file://linux.conf \
- "
-S = "${WORKDIR}/qt-embedded-linux-opensource-src-${PV}"
+PR = "${INC_PR}.1"
-QT_CONFIG_FLAGS += " \
- -qtlibinfix E \
- -qt-decoration-styled -plugin-decoration-default -plugin-decoration-windows \
- -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc \
- -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb \
- -qt-kbd-tty -qt-kbd-usb -qt-kbd-qvfb \
- -DQT_KEYPAD_NAVIGATION \
- "
-
-QT_BASE_NAME = "qt4-embedded"
-QT_BASE_LIB = "libqt-embedded"
-QT_DIR_NAME = "qtopia"
-QT_LIBINFIX="E"
-
-require qt4.inc
-
-inherit qt4e
+LICENSE += "LGPL"
+SRC_URI += "file://0010-no-simpledecoration-example.patch;patch=1"
diff --git a/recipes/qt4/qt4-tools-native.inc b/recipes/qt4/qt4-tools-native.inc
index a79eed4810..0fd4f9246f 100644
--- a/recipes/qt4/qt4-tools-native.inc
+++ b/recipes/qt4/qt4-tools-native.inc
@@ -5,6 +5,8 @@ HOMEPAGE = "http://www.trolltech.com"
PRIORITY = "optional"
LICENSE = "GPL"
+INC_PR = "r4"
+
inherit native
SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \
@@ -22,8 +24,8 @@ EXTRA_OECONF = "-prefix ${prefix} \
-no-exceptions \
-no-nas-sound \
-no-nis \
- -verbose -release -fast -static \
- -qt3support "
+ -verbose -release -fast -static \
+ -qt3support"
# yank default -e, otherwise we get the following error:
# moc_qbuffer.cpp: No such file or directory
@@ -57,7 +59,7 @@ do_compile() {
}
do_stage() {
- install -d ${STAGING_BINDIR_NATIVE}/
+ install -d ${STAGING_BINDIR_NATIVE}/
install -m 0755 bin/qmake ${STAGING_BINDIR_NATIVE}/qmake2
for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
install -m 0755 bin/${i} ${STAGING_BINDIR_NATIVE}/${i}4
diff --git a/recipes/qt4/qt4-tools-native_4.4.3.bb b/recipes/qt4/qt4-tools-native_4.4.3.bb
index e8fc316145..a734b6b936 100644
--- a/recipes/qt4/qt4-tools-native_4.4.3.bb
+++ b/recipes/qt4/qt4-tools-native_4.4.3.bb
@@ -1,2 +1,2 @@
require qt4-tools-native.inc
-PR = "r4"
+PR = "${INC_PR}.1"
diff --git a/recipes/qt4/qt4-tools-native_4.5.1.bb b/recipes/qt4/qt4-tools-native_4.5.1.bb
index adb341d465..d1962bf98f 100644
--- a/recipes/qt4/qt4-tools-native_4.5.1.bb
+++ b/recipes/qt4/qt4-tools-native_4.5.1.bb
@@ -1,4 +1,4 @@
require qt4-tools-native.inc
-PR = "r1"
+PR = "${INC_PR}.1"
TOBUILD := "src/tools/bootstrap ${TOBUILD}"
diff --git a/recipes/qt4/qt4-tools-sdk_4.5.1.bb b/recipes/qt4/qt4-tools-sdk_4.5.1.bb
new file mode 100644
index 0000000000..db919fd6df
--- /dev/null
+++ b/recipes/qt4/qt4-tools-sdk_4.5.1.bb
@@ -0,0 +1,72 @@
+DESCRIPTION = "SDK tools for Qt/[X11|Mac|Embedded] version 4.x"
+DEPENDS = "zlib-native dbus-native"
+SECTION = "libs"
+HOMEPAGE = "http://www.trolltech.com"
+PRIORITY = "optional"
+LICENSE = "GPL"
+
+inherit sdk
+
+SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \
+ file://configure-lflags.patch;patch=1 \
+ file://qt-config.patch;patch=1 \
+ file://g++.conf \
+ file://linux.conf"
+S = "${WORKDIR}/qt-embedded-linux-opensource-src-${PV}"
+
+# FIXME: make it work with "${STAGING_BINDIR_NATIVE}/pkg-config --cflags dbus-1"
+EXTRA_OECONF = "-prefix ${prefix} \
+ -qt-libjpeg -qt-gif -system-zlib \
+ -no-libjpeg -no-libpng \
+ -no-accessibility \
+ -no-cups \
+ -no-exceptions \
+ -no-nas-sound \
+ -no-nis \
+ -verbose -release -fast -static \
+ -qt3support \
+ -I${STAGING_DIR_NATIVE}/usr/include \
+ -I${STAGING_DIR_NATIVE}/usr/include/dbus-1.0 \
+ -I${STAGING_DIR_NATIVE}/usr/lib/dbus-1.0/include"
+
+# yank default -e, otherwise we get the following error:
+# moc_qbuffer.cpp: No such file or directory
+EXTRA_OEMAKE = " "
+
+do_configure() {
+ (echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
+}
+
+TOBUILD = "\
+ src/tools/bootstrap \
+ src/tools/moc \
+ src/corelib \
+ src/sql \
+ src/dbus \
+ src/qt3support \
+ src/xml \
+ src/tools/uic \
+ src/tools/rcc \
+ src/network \
+ src/gui \
+ src/tools/uic3 \
+ tools/linguist/lrelease \
+ tools/linguist/lupdate \
+ tools/qdbus \
+"
+
+do_compile() {
+ for i in ${TOBUILD}; do
+ cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
+ done
+}
+
+do_stage() {
+ install -d ${STAGING_BINDIR_NATIVE}/
+ install -m 0755 bin/qmake ${STAGING_BINDIR_NATIVE}/qmake2
+ for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
+ install -m 0755 bin/${i} ${STAGING_BINDIR_NATIVE}/${i}4
+ done
+}
+
+
diff --git a/recipes/qt4/qt4-x11-free.inc b/recipes/qt4/qt4-x11-free.inc
new file mode 100644
index 0000000000..23fa33f118
--- /dev/null
+++ b/recipes/qt4/qt4-x11-free.inc
@@ -0,0 +1,34 @@
+DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is the X11 version."
+SECTION = "x11/libs"
+PRIORITY = "optional"
+HOMEPAGE = "http://www.trolltech.com"
+LICENSE = "GPL QPL"
+DEPENDS += "virtual/libx11 fontconfig xft libxext libxrender libxrandr libxcursor"
+PROVIDES = "qt4x11"
+
+INC_PR = "r10"
+
+SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \
+ file://0001-cross-compile.patch;patch=1 \
+ file://0002-fix-resinit-declaration.patch;patch=1 \
+ file://0003-no-tools.patch;patch=1 \
+ file://0004-no-qmake.patch;patch=1 \
+ file://0006-freetype-host-includes.patch;patch=1 \
+ file://0007-openssl-host-includes.patch;patch=1 \
+ file://0008-qt-lib-infix.patch;patch=1 \
+ file://g++.conf \
+ file://linux.conf \
+ "
+S = "${WORKDIR}/qt-x11-opensource-src-${PV}"
+
+
+QT_CONFIG_FLAGS += "-no-xinerama -no-xkb -no-opengl"
+QT_BASE_NAME = "qt4"
+QT_BASE_LIB = "libqt"
+QT_DIR_NAME = "qt4"
+QT_LIBINFIX = ""
+
+require qt4.inc
+
+inherit qt4x11
+
diff --git a/recipes/qt4/qt4-x11-free/0003-no-tools.patch b/recipes/qt4/qt4-x11-free/0003-no-tools.patch
new file mode 100644
index 0000000000..3829ffcdc5
--- /dev/null
+++ b/recipes/qt4/qt4-x11-free/0003-no-tools.patch
@@ -0,0 +1,18 @@
+Index: qt-embedded-linux-opensource-src-4.5.0/src/src.pro
+===================================================================
+--- qt-embedded-linux-opensource-src-4.5.0.orig/src/src.pro 2009-02-25 22:32:41.000000000 +0100
++++ qt-embedded-linux-opensource-src-4.5.0/src/src.pro 2009-03-26 17:11:07.000000000 +0100
+@@ -6,12 +6,9 @@
+ wince*:{
+ SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_script src_testlib
+ } else {
+- SRC_SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic src_corelib src_xml src_network src_gui src_sql src_script src_testlib
++ SRC_SUBDIRS += src_corelib src_xml src_network src_gui src_sql src_script src_testlib
+ contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support
+ contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
+- !cross_compile {
+- contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_tools_uic3
+- }
+ }
+ win32:!contains(QT_EDITION, OpenSource|Console): {
+ SRC_SUBDIRS += src_activeqt
diff --git a/recipes/qt4/qt4-x11-free/0006-freetype-host-includes.patch b/recipes/qt4/qt4-x11-free/0006-freetype-host-includes.patch
new file mode 100644
index 0000000000..987c425138
--- /dev/null
+++ b/recipes/qt4/qt4-x11-free/0006-freetype-host-includes.patch
@@ -0,0 +1,20 @@
+From c9ab62bd9a56643574b3ae6e59e0ca776d4860d2 Mon Sep 17 00:00:00 2001
+From: Michael Krelin <hacker@klever.net>
+Date: Mon, 4 Jun 2007 14:48:50 +0200
+Subject: [PATCH] freetype host includes
+
+---
+ config.tests/unix/freetype/freetype.pri | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+Index: qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/freetype/freetype.pri
+===================================================================
+--- qt-embedded-linux-opensource-src-4.5.0.orig/config.tests/unix/freetype/freetype.pri 2009-02-25 22:32:32.000000000 +0100
++++ qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/freetype/freetype.pri 2009-03-26 17:14:16.000000000 +0100
+@@ -1,5 +1,5 @@
+ !cross_compile {
+- TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
++ TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
+ # LSB doesn't allow using headers from /include or /usr/include
+ linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
+ for(p, TRY_INCLUDEPATHS) {
diff --git a/recipes/qt4/qt4-x11-free/0007-openssl-host-includes.patch b/recipes/qt4/qt4-x11-free/0007-openssl-host-includes.patch
new file mode 100644
index 0000000000..3409cc0bf2
--- /dev/null
+++ b/recipes/qt4/qt4-x11-free/0007-openssl-host-includes.patch
@@ -0,0 +1,20 @@
+From d45943adb443ad4b85ca4504952dee743c675e1e Mon Sep 17 00:00:00 2001
+From: Michael Krelin <hacker@klever.net>
+Date: Mon, 4 Jun 2007 14:58:34 +0200
+Subject: [PATCH] openssl host includes
+
+---
+ config.tests/unix/openssl/openssl.pri | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+Index: qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/openssl/openssl.pri
+===================================================================
+--- qt-embedded-linux-opensource-src-4.5.0.orig/config.tests/unix/openssl/openssl.pri 2009-02-25 22:32:32.000000000 +0100
++++ qt-embedded-linux-opensource-src-4.5.0/config.tests/unix/openssl/openssl.pri 2009-03-26 17:16:28.000000000 +0100
+@@ -1,5 +1,5 @@
+ !cross_compile {
+- TRY_INCLUDEPATHS = /include /usr/include /usr/local/include $$QMAKE_INCDIR $$INCLUDEPATH
++ TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$INCLUDEPATH
+ # LSB doesn't allow using headers from /include or /usr/include
+ linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$INCLUDEPATH
+ for(p, TRY_INCLUDEPATHS) {
diff --git a/recipes/qt4/qt4-x11-free/0008-qt-lib-infix.patch b/recipes/qt4/qt4-x11-free/0008-qt-lib-infix.patch
new file mode 100644
index 0000000000..3efaff37d3
--- /dev/null
+++ b/recipes/qt4/qt4-x11-free/0008-qt-lib-infix.patch
@@ -0,0 +1,34 @@
+Index: qt-embedded-linux-opensource-src-4.5.0/mkspecs/features/uitools.prf
+===================================================================
+--- qt-embedded-linux-opensource-src-4.5.0.orig/mkspecs/features/uitools.prf 2009-02-25 22:32:34.000000000 +0100
++++ qt-embedded-linux-opensource-src-4.5.0/mkspecs/features/uitools.prf 2009-03-26 17:17:27.000000000 +0100
+@@ -2,10 +2,10 @@
+ qt:load(qt)
+
+ # Include the correct version of the UiLoader library
+-QTUITOOLS_LINKAGE = -lQtUiTools
++QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}
+ CONFIG(debug, debug|release) {
+- mac: QTUITOOLS_LINKAGE = -lQtUiTools_debug
+- win32: QTUITOOLS_LINKAGE = -lQtUiToolsd
++ mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug
++ win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d
+ }
+ LIBS += $$QTUITOOLS_LINKAGE
+
+Index: qt-embedded-linux-opensource-src-4.5.0/tools/designer/src/uitools/uitools.pro
+===================================================================
+--- qt-embedded-linux-opensource-src-4.5.0.orig/tools/designer/src/uitools/uitools.pro 2009-02-25 22:32:42.000000000 +0100
++++ qt-embedded-linux-opensource-src-4.5.0/tools/designer/src/uitools/uitools.pro 2009-03-26 17:17:27.000000000 +0100
+@@ -1,5 +1,5 @@
+ TEMPLATE = lib
+-TARGET = $$qtLibraryTarget(QtUiTools)
++TARGET = QtUiTools
+ QT += xml
+ CONFIG += qt staticlib
+ DESTDIR = ../../../../lib
+@@ -39,3 +39,4 @@
+ QMAKE_PKGCONFIG_REQUIRES += QtXml
+ }
+
++TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
diff --git a/recipes/qt4/qt4-x11-free_4.4.3.bb b/recipes/qt4/qt4-x11-free_4.4.3.bb
index 08a56a47c3..a3538c9199 100644
--- a/recipes/qt4/qt4-x11-free_4.4.3.bb
+++ b/recipes/qt4/qt4-x11-free_4.4.3.bb
@@ -1,32 +1,3 @@
-DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is the X11 version."
-SECTION = "x11/libs"
-PRIORITY = "optional"
-HOMEPAGE = "http://www.trolltech.com"
-LICENSE = "GPL QPL"
-DEPENDS += "virtual/libx11 fontconfig xft libxext libxrender libxrandr libxcursor"
-PROVIDES = "qt4x11"
-PR = "r10"
-
-SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \
- file://0001-cross-compile.patch;patch=1 \
- file://0002-fix-resinit-declaration.patch;patch=1 \
- file://0003-no-tools.patch;patch=1 \
- file://0004-no-qmake.patch;patch=1 \
- file://0006-freetype-host-includes.patch;patch=1 \
- file://0007-openssl-host-includes.patch;patch=1 \
- file://0008-qt-lib-infix.patch;patch=1 \
- file://g++.conf \
- file://linux.conf \
- "
-S = "${WORKDIR}/qt-x11-opensource-src-${PV}"
-
-
-QT_CONFIG_FLAGS += "-no-xinerama -no-tablet -no-xkb -no-opengl"
-QT_BASE_NAME = "qt4"
-QT_BASE_LIB = "libqt"
-QT_DIR_NAME = "qt4"
-QT_LIBINFIX = ""
-
-require qt4.inc
-
-inherit qt4x11
+include qt4-x11-free.inc
+PR = "${INC_PR}.1"
+QT_CONFIG_FLAGS += "-no-tablet"
diff --git a/recipes/qt4/qt4-x11-free_4.5.1.bb b/recipes/qt4/qt4-x11-free_4.5.1.bb
index af3a7c702c..1cc637a548 100644
--- a/recipes/qt4/qt4-x11-free_4.5.1.bb
+++ b/recipes/qt4/qt4-x11-free_4.5.1.bb
@@ -1,31 +1,4 @@
-DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is the X11 version."
-SECTION = "x11/libs"
-PRIORITY = "optional"
-HOMEPAGE = "http://www.trolltech.com"
-LICENSE = "GPL LGPL QPL"
-DEPENDS += "virtual/libx11 fontconfig xft libxext libxrender libxrandr libxcursor"
-PROVIDES = "qt4x11"
+include qt4-x11-free.inc
+LICENSE += "LGPL"
+PR = "${INC_PR}.1"
-SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \
- file://0001-cross-compile.patch;patch=1 \
- file://0002-fix-resinit-declaration.patch;patch=1 \
- file://${PV}/0003-no-tools.patch;patch=1 \
- file://0004-no-qmake.patch;patch=1 \
- file://${PV}/0006-freetype-host-includes.patch;patch=1 \
- file://${PV}/0007-openssl-host-includes.patch;patch=1 \
- file://${PV}/0008-qt-lib-infix.patch;patch=1 \
- file://g++.conf \
- file://linux.conf \
- "
-S = "${WORKDIR}/qt-x11-opensource-src-${PV}"
-
-
-QT_CONFIG_FLAGS += "-no-xinerama -no-xkb -no-opengl"
-QT_BASE_NAME = "qt4"
-QT_BASE_LIB = "libqt"
-QT_DIR_NAME = "qt4"
-QT_LIBINFIX = ""
-
-require qt4.inc
-
-inherit qt4x11
diff --git a/recipes/qt4/qt4.inc b/recipes/qt4/qt4.inc
index 3deffa6617..f5da6527f0 100644
--- a/recipes/qt4/qt4.inc
+++ b/recipes/qt4/qt4.inc
@@ -1,6 +1,6 @@
inherit qmake_base
-DEPENDS += " qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base"
+DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base"
require qt4_arch.inc
QT_ARCH := "${@qt_arch(d)}"
@@ -31,10 +31,10 @@ python __anonymous () {
dev_packages = []
dbg_packages = []
for name in bb.data.getVar("QT_LIB_NAMES", d, 1).split():
- pkg = "${QT_BASE_LIB}"+ name.lower().replace("qt", "") + "4"
+ pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "") + "4"
# NOTE: the headers for QtAssistantClient are different
incname = name.replace("QtAssistantClient", "QtAssistant")
- bb.data.setVar("FILES_%s" % pkg, "%(pkg)s ${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d)
+ bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d)
bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s${QT_LIBINFIX}.prl
${libdir}/lib%(name)s${QT_LIBINFIX}.a
${libdir}/lib%(name)s${QT_LIBINFIX}.la
@@ -45,6 +45,9 @@ python __anonymous () {
lib_packages.append(pkg)
dev_packages.append("%s-dev" % pkg)
dbg_packages.append("%s-dbg" % pkg)
+ for name in bb.data.getVar("OTHER_PACKAGES", d, 1).split():
+ dbg_packages.append("%s-dbg" % name)
+
bb.data.setVar("LIB_PACKAGES", " ".join(lib_packages), d)
bb.data.setVar("DEV_PACKAGES", " ".join(dev_packages), d)
bb.data.setVar("DBG_PACKAGES", " ".join(dbg_packages), d)
@@ -59,28 +62,44 @@ OTHER_PACKAGES = "\
${QT_BASE_NAME}-examples \
${QT_BASE_NAME}-fonts \
${QT_BASE_NAME}-linguist \
- ${QT_BASE_NAME}-pixeltool"
+ ${QT_BASE_NAME}-makeqpf \
+ ${QT_BASE_NAME}-mkspecs \
+ ${QT_BASE_NAME}-pixeltool \
+ ${QT_BASE_NAME}-qt3to4"
PACKAGES += "${LIB_PACKAGES} ${DEV_PACKAGES} ${DBG_PACKAGES} ${OTHER_PACKAGES}"
PACKAGES_DYNAMIC = "${QT_BASE_NAME}-plugin-* ${QT_BASE_NAME}-translation-*"
ALLOW_EMPTY_${PN} = "1"
FILES_${PN} = ""
-FILES_${PN}-dev = " ${includedir}/${QT_DIR_NAME}/Qt/*"
-FILES_${PN}-dbg = "${bindir}/*/.debug "
+FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
+FILES_${PN}-dbg = ""
RRECOMMENDS_${PN} = "${LIB_PACKAGES} ${OTHER_PACKAGES}"
RRECOMMENDS_${PN}-dev = "${DEV_PACKAGES}"
RRECOMMENDS_${PN}-dbg = "${DBG_PACKAGES}"
-FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant*"
+FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator"
+FILES_${QT_BASE_NAME}-assistant-dbg = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator"
FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig"
+FILES_${QT_BASE_NAME}-common-dbg = "${bindir}/.debug/qtconfig"
FILES_${QT_BASE_NAME}-dbus = "${bindir}/qdbus ${bindir}/qdbusxml2cpp ${bindir}/qdbuscpp2xml ${bindir}/qdbusviewer"
+FILES_${QT_BASE_NAME}-dbus-dbg = "${bindir}/.debug/qdbus ${bindir}/.debug/qdbusxml2cpp ${bindir}/.debug/qdbuscpp2xml ${bindir}/.debug/qdbusviewer"
FILES_${QT_BASE_NAME}-demos = "${bindir}/qtdemo ${bindir}/${QT_DIR_NAME}/demos/*"
+FILES_${QT_BASE_NAME}-demos-dbg = "${bindir}/.debug/qtdemo ${bindir}/${QT_DIR_NAME}/demos/.debug/*"
FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*"
+FILES_${QT_BASE_NAME}-designer-dbg = "${bindir}/.debug/*designer*"
FILES_${QT_BASE_NAME}-examples = "${bindir}/${QT_DIR_NAME}/examples/*"
+FILES_${QT_BASE_NAME}-examples-dbg = "${bindir}/${QT_DIR_NAME}/examples/.debug/*"
FILES_${QT_BASE_NAME}-fonts = "${libdir}/fonts"
-FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/qm2ts"
+FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/lconvert ${bindir}/qm2ts"
+FILES_${QT_BASE_NAME}-linguist-dbg = "${bindir}/.debug/*linguist* ${bindir}/.debug/lrelease ${bindir}/.debug/lupdate ${bindir}/.debug/lconvert ${bindir}/.debug/qm2ts"
FILES_${QT_BASE_NAME}-pixeltool = "${bindir}/pixeltool"
+FILES_${QT_BASE_NAME}-pixeltool-dbg = "${bindir}/.debug/pixeltool"
+FILES_${QT_BASE_NAME}-qt3to4 = "${bindir}/qt3to4 ${datadir}/${QT_DIR_NAME}/q3porting.xml"
+FILES_${QT_BASE_NAME}-qt3to4-dbg = "${bindir}/.debug/qt3to4"
+FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf"
+FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf"
+FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*"
do_configure() {
@@ -134,54 +153,54 @@ do_compile() {
}
python populate_packages_prepend() {
- translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d)
- translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d)
- do_split_packages(d, translation_dir, '^qt_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' )
-
- phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d)
- phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d)
- do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' )
-
- # Package all the plugins and their -dbg version and create a meta package
- import os
- def qtopia_split(path, name, glob):
- """
- Split the package into a normal and -dbg package and then add the
- new packages to the meta package.
- """
- plugin_dir = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path, d)
- if not os.path.exists("%s%s" % (bb.data.expand('${D}',d), plugin_dir)):
- bb.note("The path does not exist:", bb.data.expand('${D}', d), plugin_dir)
- return
-
- plugin_name = bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name, d)
- dev_packages = []
- dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg))
- do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook)
- # Create a -dbg package as well
- plugin_dir_dbg = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path, d)
- packages = bb.data.getVar('PACKAGES',d)
- for (file,package) in dev_packages:
- packages = "%s %s-dbg" % (packages, package)
- file_name = os.path.join(plugin_dir_dbg, os.path.basename(file))
- bb.data.setVar("FILES_%s-dbg" % package, file_name, d)
- bb.data.setVar("DESCRIPTION_%s-dbg" % package, "${PN} %s for %s" % (name, package), d)
-
- bb.data.setVar('PACKAGES', packages, d)
-
- qtopia_split('accessible', 'accessible', '^libq(.*)\.so$')
- qtopia_split('codecs', 'codec', '^libq(.*)\.so$')
- qtopia_split('decorations', 'decoration', '^libqdecoration(.*)\.so$')
- qtopia_split('designer', 'designer', '^lib(.*)\.so$')
- qtopia_split('gfxdrivers', 'gfxdriver', '^libqgfx(.*)\.so$')
- qtopia_split('mousedrivers','mousedriver', '^libq(.*)mousedriver\.so$')
- qtopia_split('iconengines', 'iconengine', '^libq(.*)\.so$')
- qtopia_split('imageformats','imageformat', '^libq(.*)\.so$')
- qtopia_split('inputmethods','inputmethod', '^libq(.*)\.so$')
- qtopia_split('sqldrivers', 'sqldriver', '^libq(.*)\.so$')
- qtopia_split('script', 'script', '^libqtscript(.*)\.so$')
- qtopia_split('styles', 'style', '^libq(.*)\.so$')
- qtopia_split('phonon_backend', 'phonon-backend', '^libphonon_(.*)\.so$')
+ translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d)
+ translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d)
+ do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' )
+
+ phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d)
+ phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d)
+ do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' )
+
+ # Package all the plugins and their -dbg version and create a meta package
+ import os
+ def qtopia_split(path, name, glob):
+ """
+ Split the package into a normal and -dbg package and then add the
+ new packages to the meta package.
+ """
+ plugin_dir = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path, d)
+ if not os.path.exists("%s%s" % (bb.data.expand('${D}',d), plugin_dir)):
+ bb.note("The path does not exist:", bb.data.expand('${D}', d), plugin_dir)
+ return
+
+ plugin_name = bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name, d)
+ dev_packages = []
+ dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg))
+ do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook)
+ # Create a -dbg package as well
+ plugin_dir_dbg = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path, d)
+ packages = bb.data.getVar('PACKAGES',d)
+ for (file,package) in dev_packages:
+ packages = "%s %s-dbg" % (packages, package)
+ file_name = os.path.join(plugin_dir_dbg, os.path.basename(file))
+ bb.data.setVar("FILES_%s-dbg" % package, file_name, d)
+ bb.data.setVar("DESCRIPTION_%s-dbg" % package, "${PN} %s for %s" % (name, package), d)
+
+ bb.data.setVar('PACKAGES', packages, d)
+
+ qtopia_split('accessible', 'accessible', '^libq(.*)\.so$')
+ qtopia_split('codecs', 'codec', '^libq(.*)\.so$')
+ qtopia_split('decorations', 'decoration', '^libqdecoration(.*)\.so$')
+ qtopia_split('designer', 'designer', '^lib(.*)\.so$')
+ qtopia_split('gfxdrivers', 'gfxdriver', '^libq(.*)\.so$')
+ qtopia_split('mousedrivers', 'mousedriver', '^libq(.*)mousedriver\.so$')
+ qtopia_split('iconengines', 'iconengine', '^libq(.*)\.so$')
+ qtopia_split('imageformats', 'imageformat', '^libq(.*)\.so$')
+ qtopia_split('inputmethods', 'inputmethod', '^libq(.*)\.so$')
+ qtopia_split('sqldrivers', 'sqldriver', '^libq(.*)\.so$')
+ qtopia_split('script', 'script', '^libqtscript(.*)\.so$')
+ qtopia_split('styles', 'style', '^libq(.*)\.so$')
+ qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$')
}
do_install() {
@@ -192,7 +211,6 @@ do_install() {
# XXX, FIXME, TODO: package the demos and examples properly
rm -rf ${D}/${bindir}/${QT_DIR_NAME}
- rm -rf ${D}/${datadir}/${QT_DIR_NAME}/mkspecs
# fix pkgconfig, libtool and prl files
sed -i -e s#-L${S}/lib##g \
@@ -205,6 +223,9 @@ do_install() {
sed -i -e s#"moc_location=.*$"#"moc_location=${bindir}/moc4"# \
-e s#"uic_location=.*$"#"uic_location=${bindir}/uic4"# \
${D}${libdir}/pkgconfig/*.pc
+ for name in ${QT_LIB_NAMES}; do
+ sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc
+ done
install -d ${D}/${libdir}/fonts
touch ${D}/${libdir}/fonts/fontdir
@@ -227,6 +248,9 @@ do_stage() {
sed -i -e s#"moc_location=.*$"## \
-e s#"uic_location=.*$"## \
${STAGE_TEMP}/${libdir}/pkgconfig/*.pc
+ for name in ${QT_LIB_NAMES}; do
+ sed -i -e "/Requires/s#${name}#${name}${QT_LIBINFIX}#"g ${D}${libdir}/pkgconfig/*.pc
+ done
# fix libtool files
sed -i -e s#installed=yes#installed=no#g ${STAGE_TEMP}/${libdir}/*.la
diff --git a/recipes/qte/qte-2.3.10/disable-dup-rotation.patch b/recipes/qte/qte-2.3.10/disable-dup-rotation.patch
index 8a2a02240d..6874ba5ac4 100644
--- a/recipes/qte/qte-2.3.10/disable-dup-rotation.patch
+++ b/recipes/qte/qte-2.3.10/disable-dup-rotation.patch
@@ -4,7 +4,7 @@
case Qt::Key_Down:
unicode = 0xffff;
mod_key = false;
-+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
++#if 0
if (qt_screen->isTransformed())
qtKeyCode = static_cast<Qt::Key>( xform_dirkey(static_cast<int>( qtKeyCode ) ) );
+#endif
diff --git a/recipes/qte/qte-mt_2.3.10.bb b/recipes/qte/qte-mt_2.3.10.bb
index 32afeda271..71873dc51a 100644
--- a/recipes/qte/qte-mt_2.3.10.bb
+++ b/recipes/qte/qte-mt_2.3.10.bb
@@ -1,5 +1,5 @@
require qte-common_${PV}.inc
-PR = "r27"
+PR = "r28"
EXTRA_OECONF += "-thread"
diff --git a/recipes/qte/qte_2.3.10.bb b/recipes/qte/qte_2.3.10.bb
index 68825b6ce8..1183bc29bf 100644
--- a/recipes/qte/qte_2.3.10.bb
+++ b/recipes/qte/qte_2.3.10.bb
@@ -1,3 +1,3 @@
require qte-common_${PV}.inc
-PR = "r52"
+PR = "r53"
diff --git a/recipes/quake/files/quake3_makefile.patch b/recipes/quake/files/quake3_makefile.patch
new file mode 100644
index 0000000000..b9e94577b2
--- /dev/null
+++ b/recipes/quake/files/quake3_makefile.patch
@@ -0,0 +1,29 @@
+--- /tmp/Makefile 2009-05-25 14:59:16.000000000 +0530
++++ git/pandora/Makefile 2009-05-25 15:07:46.000000000 +0530
+@@ -64,14 +64,14 @@ ARFLAGS=ar rv
+ DLL_ONLY=true
+ ARCH=arm
+ VENDOR=dec
+- BASE_CFLAGS = -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a -mfloat-abi=softfp \
+- -mfpu=neon -ftree-vectorize -ffast-math -fomit-frame-pointer \
++ BASE_CFLAGS = -O3 -mtune=cortex-a8 -march=armv7-a -mfloat-abi=softfp \
++ -mfpu=neon -ffast-math -fomit-frame-pointer \
+ -fno-strict-aliasing -fsingle-precision-constant \
+ -I$(PNDSDK)/usr/include -DIPHONE -DBOTLIB -DDLL_ONLY -DC_ONLY -D__arm__ -DSHLIB_SUFFIX="\"so\"" -D_PANDORA_
+
+ THREAD_LDFLAGS=-lpthread
+
+-LDFLAGS=-L$(PNDSDK)/usr/lib -ldl -lm -lX11 -lXau -lXdmcp -lXxf86vm -lXext
++LDFLAGS+=-L$(PNDSDK)/usr/lib -ldl -lm -lX11 -lXau -lXdmcp -lXxf86vm -lXext
+
+ GL_CFAGS = -I$(PNDSDK)/usr/X11R6/include
+
+@@ -126,7 +126,7 @@ DO_NASM=nasm -f elf -o $@ $<
+ DO_DED_CC=$(CC) -DDEDICATED -DC_ONLY $(CFLAGS) -o $@ -c $<
+
+ #### DEFAULT TARGET
+-default:build_debug
++default:build_release
+
+ debug: build_debug
+ release: build_release
diff --git a/recipes/quake/quake3-pandora-gles_git.bb b/recipes/quake/quake3-pandora-gles_git.bb
new file mode 100644
index 0000000000..d468d34a44
--- /dev/null
+++ b/recipes/quake/quake3-pandora-gles_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "OpenGL ES quake3 port to the omap3-pandora"
+LICENSE = "GPL"
+
+SRCREV = "39d08bf6e81f7cdc29380858dfe671b0722332a3"
+PR_append = "+gitr${SRCREV}"
+PV = "0.0"
+
+DEPENDS = "virtual/libsdl libgles-omap3"
+
+SRC_URI = "git://github.com/Cpasjuste/quake3_pandora_gles.git;branch=master;protocol=git \
+ file://quake3_makefile.patch;patch=1 \
+"
+S = "${WORKDIR}/git"
+
+export PNDSDK="${STAGING_DIR}"
+
+do_compile() {
+ cd pandora
+ sed -i -e s:=arm-none-linux-gnueabi-:=${TARGET_PREFIX}:g Makefile
+ oe_runmake
+}
+
+do_install() {
+ install -d ${D}/${bindir}
+ install -d ${D}/${libdir}/quake3/baseq3/
+
+ install -m 0755 ${S}/pandora/release${TARGET_ARCH}/baseq3/*.so ${D}/${libdir}/quake3/baseq3
+ install -m 0755 ${S}/pandora/release${TARGET_ARCH}/quake3 ${D}/${libdir}/quake3
+
+ install -m 0755 ${S}/pandora/autoexec.cfg ${D}/${libdir}/quake3/baseq3
+ install -m 0755 ${S}/pandora/autoexec_high_detail.cfg ${D}/${libdir}/quake3
+ install -m 0755 ${S}/pandora/autoexec_medium_detail.cfg ${D}/${libdir}/quake3
+ install -m 0755 ${S}/pandora/autoexec_low_detail.cfg ${D}/${libdir}/quake3
+ install -m 0755 ${S}/pandora/run.sh ${D}/${libdir}/quake3
+}
+
+FILES_${PN} += "${libdir}"
+FILES_${PN}-dbg += "${libdir}/quake3/.debug ${libdir}/quake3/baseq3/.debug"
+
diff --git a/recipes/recode/recode_3.6.bb b/recipes/recode/recode_3.6.bb
index 6fd60ae399..37e3b2a8aa 100644
--- a/recipes/recode/recode_3.6.bb
+++ b/recipes/recode/recode_3.6.bb
@@ -3,11 +3,8 @@ SECTION = "console/utils"
LICENSE = "GPL"
PR = "r1"
-SRC_URI = "${GNU_MIRROR}/recode/recode-${PV}.tar.gz"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/recode-${PV}', '${FILE_DIRNAME}' ], d)}"
-
-SRC_URI += "file://recode-bitfield-width.patch;patch=1 \
- "
+SRC_URI = "${GNU_MIRROR}/recode/recode-${PV}.tar.gz \
+ file://recode-bitfield-width.patch;patch=1"
inherit autotools
diff --git a/recipes/redland/files/crosscompile.patch b/recipes/redland/files/crosscompile.patch
new file mode 100644
index 0000000000..281007a791
--- /dev/null
+++ b/recipes/redland/files/crosscompile.patch
@@ -0,0 +1,29 @@
+Index: redland-1.0.8/raptor/configure.ac
+===================================================================
+--- redland-1.0.8.orig/raptor/configure.ac 2008-12-16 17:26:58.000000000 +0000
++++ redland-1.0.8/raptor/configure.ac 2008-12-16 17:27:41.000000000 +0000
+@@ -279,23 +279,7 @@
+
+ if test $ac_cv_func_vsnprintf = yes; then
+ AC_MSG_CHECKING(vsnprintf has C99 compatible return value)
+- AC_TRY_RUN([#include <stdarg.h>
+-int is_c99(char *s, ...) {
+- char buffer[32];
+- va_list args;
+- int r;
+- va_start(args, s);
+- r = vsnprintf(buffer, 5, s, args);
+- va_end(args);
+-
+- return (r == 7);
+-}
+-
+-int main(int argc, char* argv) {
+- return is_c99("1234567");
+-}], AC_MSG_RESULT(no),
+- AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [vsnprint has C99 compatible return value])
+- AC_MSG_RESULT(yes))
++ AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [vsnprint has C99 compatible return value])
+ fi
+
+ need_libm=no
diff --git a/recipes/redland/files/sane_pkgconfig.patch b/recipes/redland/files/sane_pkgconfig.patch
new file mode 100644
index 0000000000..32742e2b29
--- /dev/null
+++ b/recipes/redland/files/sane_pkgconfig.patch
@@ -0,0 +1,126 @@
+Index: redland-1.0.8/configure.ac
+===================================================================
+--- redland-1.0.8.orig/configure.ac 2008-07-04 07:56:25.000000000 +0100
++++ redland-1.0.8/configure.ac 2008-12-17 23:04:25.000000000 +0000
+@@ -404,7 +404,7 @@
+
+ if test "$have_libdb" = yes; then
+ bdb_available="Version $bdb_version (library $bdb_dbname in $bdb_lib_dir)"
+- LIBRDF_LIBS="$LIBRDF_LIBS $nLDFLAGS -l$bdb_dbname"
++ LIBRDF_LIBS="$LIBRDF_LIBS -l$bdb_dbname"
+ LIBRDF_CPPFLAGS="$LIBRDF_CPPFLAGS $nCPPFLAGS"
+ fi
+
+Index: redland-1.0.8/raptor/configure.ac
+===================================================================
+--- redland-1.0.8.orig/raptor/configure.ac 2008-12-17 23:04:25.000000000 +0000
++++ redland-1.0.8/raptor/configure.ac 2008-12-18 11:18:36.000000000 +0000
+@@ -304,9 +304,12 @@
+ AC_DEFINE(HAVE_ROUND, 1, [have round() in libm]),
+ AC_MSG_RESULT(no))
+ LIBS="$oLIBS"
++PRIV_PC_LIBS=""
++PRIV_PC_REQS=""
+
+ if test "X$need_libm" = Xyes; then
+ LIBS="$LIBS -lm"
++ PRIV_PC_LIBS="$PRIV_PC_LIBS -lm"
+ fi
+
+
+@@ -369,6 +372,7 @@
+ AC_MSG_CHECKING(for working expat in libxmlparse and libxmltok)
+ if test $xmlp = 1 -a $xmlt = 1 -a $ac_cv_header_xmlparse_h = yes; then
+ LIBS="$LIBS -lxmlparse -lxmltok"
++ PRIV_PC_LIBS="$PRIV_PC_LIBS -lxmlparse -lxmltok"
+ AC_TRY_RUN([#include <stdio.h>
+ main() {XML_ParserCreate(NULL); return(0);}],
+ worked=yes, worked=no, worked=no)
+@@ -391,6 +395,7 @@
+ AC_MSG_CHECKING(for working expat in libexpat)
+ if test $libexpat = 1 -a $ac_cv_header_expat_h = yes ; then
+ LIBS="$LIBS -lexpat"
++ PRIV_PC_LIBS="$PRIV_PC_LIBS -lexpat"
+ AC_TRY_RUN([#include <stdio.h>
+ main() {XML_ParserCreate(NULL); return(0);}],
+ worked=yes, worked=no, worked=no)
+@@ -531,6 +536,7 @@
+ oLIBS="$LIBS"
+ if test "X$XML_CONFIG" != X; then
+ LIBS="$LIBS `$XML_CONFIG --libs`"
++ PRIV_PC_REQS="$PRIV_PC_REQS libxml-2.0"
+ AC_CHECK_FUNC(xmlCreatePushParserCtxt, have_xmlCreatePushParserCtxt=yes, have_xmlCreatePushParserCtxt=no)
+ AC_MSG_CHECKING(for system (GNOME) libxml library)
+ if test $have_xmlCreatePushParserCtxt = yes; then
+@@ -637,6 +643,7 @@
+ oLIBS="$LIBS"
+ if test "X$XSLT_CONFIG" != X; then
+ LIBS="$LIBS `$XSLT_CONFIG --libs`"
++ PRIV_PC_REQS="$PRIV_PC_REQS libxslt"
+ AC_CHECK_FUNC(xsltSaveResultToString, have_xsltSaveResultToString=yes, have_xsltSaveResultToString=no)
+ AC_MSG_CHECKING(for system libxslt library)
+ if test $have_xsltSaveResultToString = yes; then
+@@ -1034,6 +1041,7 @@
+ if test $need_libcurl = 1; then
+ CPPFLAGS="$CPPFLAGS `$CURL_CONFIG --cflags`"
+ LIBS="$LIBS `$CURL_CONFIG --libs`"
++ PRIV_PC_REQS="$PRIV_PC_REQS libcurl"
+ AC_LIBOBJ(raptor_www_curl)
+
+ fi
+@@ -1054,6 +1062,7 @@
+ if test $ac_cv_header_libinn_h = yes; then
+ CPPFLAGS="$CPPFLAGS -I/usr/include/inn"
+ LIBS="$LIBS -L/usr/lib/news -linn"
++ PRIV_PC_LIBS="$PRIV_PC_LIBS -linn"
+ AC_CHECK_LIB(inn, HashMessageID, have_libinn=yes)
+
+ AC_MSG_CHECKING(parsedate in libinn)
+@@ -1102,6 +1111,7 @@
+
+ if test $need_libfetch = 1; then
+ LIBS="$LIBS -lfetch"
++ PRIV_PC_LIBS="$PRIV_PC_REQS -lfetch"
+ AC_LIBOBJ(raptor_www_libfetch)
+ fi
+
+@@ -1120,6 +1130,7 @@
+ else
+ LIBS="$LIBS `$XML_CONFIG --libs`"
+ CPPFLAGS="`$XML_CONFIG --cflags` $CPPFLAGS"
++ PRIV_PC_REQS="$PRIV_PC_REQS libxml-2.0"
+ fi
+ RAPTOR_XML_PARSER=libxml
+ fi
+@@ -1147,6 +1158,7 @@
+ if test $need_libxslt = 1; then
+ LIBS="$LIBS `$XSLT_CONFIG --libs`"
+ CPPFLAGS="`$XSLT_CONFIG --cflags` $CPPFLAGS"
++ PRIV_PC_REQS="$PRIV_PC_REQS libxslt"
+ fi
+
+ RAPTOR_LIBTOOLLIBS=libraptor.la
+@@ -1214,6 +1226,9 @@
+ AC_SUBST(MEM_LIBS)
+ AC_SUBST(STANDARD_CFLAGS)
+
++AC_SUBST(PRIV_PC_LIBS)
++AC_SUBST(PRIV_PC_REQS)
++
+ ECHO_N="$ECHO_N"
+ ECHO_C="$ECHO_C"
+ AC_SUBST(ECHO_N)
+Index: redland-1.0.8/raptor/raptor.pc.in
+===================================================================
+--- redland-1.0.8.orig/raptor/raptor.pc.in 2008-12-17 23:06:47.000000000 +0000
++++ redland-1.0.8/raptor/raptor.pc.in 2008-12-17 23:07:20.000000000 +0000
+@@ -6,7 +6,8 @@
+ Name: Raptor
+ Description: RDF Parser Toolkit Library
+ Version: @VERSION@
++Requires.private: @PRIV_PC_REQS@
+ Libs: -L${libdir} -lraptor
+-Libs.private: @LIBS@
++Libs.private: @PRIV_PC_LIBS@@
+ Cflags: -I${includedir}
+
diff --git a/recipes/redland/redland_1.0.8.bb b/recipes/redland/redland_1.0.8.bb
new file mode 100644
index 0000000000..34e4bbc09a
--- /dev/null
+++ b/recipes/redland/redland_1.0.8.bb
@@ -0,0 +1,19 @@
+LICENSE = "GPLv2"
+SRC_URI = "http://download.librdf.org/source/redland-1.0.8.tar.gz \
+ file://crosscompile.patch;patch=1 \
+ file://sane_pkgconfig.patch;patch=1"
+
+PR = "r3"
+
+inherit autotools_stage
+
+EXTRA_OECONF = "--with-bdb-lib=${STAGING_LIBDIR} --with-bdb-include=${STAGING_INCDIR} --with-sqlite=no"
+
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+do_compile_append() {
+for i in `find ${S}/ -name "*.pc" -type f` ; do \
+ sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:${STAGING_LIBDIR}:\$\{libdir\}:g' $i
+ done
+}
+
diff --git a/recipes/rhythmbox/rhythmbox/ogg.m4 b/recipes/rhythmbox/rhythmbox/ogg.m4
deleted file mode 100644
index 1f643f1204..0000000000
--- a/recipes/rhythmbox/rhythmbox/ogg.m4
+++ /dev/null
@@ -1,102 +0,0 @@
-# Configure paths for libogg
-# Jack Moffitt <jack@icecast.org> 10-21-2000
-# Shamelessly stolen from Owen Taylor and Manish Singh
-define(arch-tag)
-# arch-tag: Autoconf macro for checking libogg
-
-dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
-dnl
-AC_DEFUN(MM_PATH_OGG,
-[dnl
-dnl Get the cflags and libraries
-dnl
-AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
-AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
-AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
-AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
-
- if test "x$ogg_libraries" != "x" ; then
- OGG_LIBS="-L$ogg_libraries"
- elif test "x$ogg_prefix" != "x" ; then
- OGG_LIBS="-L$ogg_prefix/lib"
- elif test "x$prefix" != "xNONE" ; then
- OGG_LIBS="-L$prefix/lib"
- fi
-
- OGG_LIBS="$OGG_LIBS -logg"
-
- if test "x$ogg_includes" != "x" ; then
- OGG_CFLAGS="-I$ogg_includes"
- elif test "x$ogg_prefix" != "x" ; then
- OGG_CFLAGS="-I$ogg_prefix/include"
- fi
-
- AC_MSG_CHECKING(for Ogg)
- no_ogg=""
-
-
- if test "x$enable_oggtest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $OGG_CFLAGS"
- LIBS="$LIBS $OGG_LIBS"
-dnl
-dnl Now check if the installed Ogg is sufficiently new.
-dnl
- rm -f conf.oggtest
- AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ogg/ogg.h>
-
-int main ()
-{
- system("touch conf.oggtest");
- return 0;
-}
-
-],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
-
- if test "x$no_ogg" = "x" ; then
- AC_MSG_RESULT(yes)
- ifelse([$1], , :, [$1])
- else
- AC_MSG_RESULT(no)
- if test -f conf.oggtest ; then
- :
- else
- echo "*** Could not run Ogg test program, checking why..."
- CFLAGS="$CFLAGS $OGG_CFLAGS"
- LIBS="$LIBS $OGG_LIBS"
- AC_TRY_LINK([
-#include <stdio.h>
-#include <ogg/ogg.h>
-], [ return 0; ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding Ogg or finding the wrong"
- echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
- echo "*** or that you have moved Ogg since it was installed." ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- OGG_CFLAGS=""
- OGG_LIBS=""
- ifelse([$2], , :, [$2])
- fi
- AC_SUBST(OGG_CFLAGS)
- AC_SUBST(OGG_LIBS)
- rm -f conf.oggtest
-])
diff --git a/recipes/rhythmbox/rhythmbox/omfmake.patch b/recipes/rhythmbox/rhythmbox/omfmake.patch
deleted file mode 100644
index 8950a7b66f..0000000000
--- a/recipes/rhythmbox/rhythmbox/omfmake.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- rhythmbox-0.8.4/omf.make 2004-04-15 12:30:20.000000000 -0700
-+++ rhythmbox-0.8.4.new/omf.make 2004-06-08 16:11:06.130981816 -0700
-@@ -41,7 +41,9 @@
- install-data-hook-omf:
- $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
- for file in $(omffile); do \
-- $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
-+ if [ -f $$file.out ]; then \
-+ $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
-+ fi; \
- done
- -scrollkeeper-update -o $(DESTDIR)$(omf_dest_dir)
-
diff --git a/recipes/rhythmbox/rhythmbox/vorbis.m4 b/recipes/rhythmbox/rhythmbox/vorbis.m4
deleted file mode 100644
index 4761b32661..0000000000
--- a/recipes/rhythmbox/rhythmbox/vorbis.m4
+++ /dev/null
@@ -1,122 +0,0 @@
-# Configure paths for libvorbis
-# Jack Moffitt <jack@icecast.org> 10-21-2000
-# Shamelessly stolen from Owen Taylor and Manish Singh
-# thomasvs added check for vorbis_bitrate_addblock which is new in rc3
-define(arch-tag)
-# arch-tag: Autoconf macro for checking libvorbis
-
-dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
-dnl
-AC_DEFUN(MM_PATH_VORBIS,
-[dnl
-dnl Get the cflags and libraries
-dnl
-AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
-AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
-AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
-AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
-
- if test "x$vorbis_libraries" != "x" ; then
- VORBIS_LIBS="-L$vorbis_libraries"
- elif test "x$vorbis_prefix" != "x" ; then
- VORBIS_LIBS="-L$vorbis_prefix/lib"
- elif test "x$prefix" != "xNONE"; then
- VORBIS_LIBS="-L$prefix/lib"
- fi
-
- VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
- VORBISFILE_LIBS="-lvorbisfile"
- VORBISENC_LIBS="-lvorbisenc"
-
- if test "x$vorbis_includes" != "x" ; then
- VORBIS_CFLAGS="-I$vorbis_includes"
- elif test "x$vorbis_prefix" != "x" ; then
- VORBIS_CFLAGS="-I$vorbis_prefix/include"
- fi
-
-
- AC_MSG_CHECKING(for Vorbis)
- no_vorbis=""
-
-
- if test "x$enable_vorbistest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
- LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
-dnl
-dnl Now check if the installed Vorbis is sufficiently new.
-dnl
- rm -f conf.vorbistest
- AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <vorbis/codec.h>
-#include <vorbis/vorbisenc.h>
-
-int main ()
-{
- vorbis_block vb;
- vorbis_dsp_state vd;
- vorbis_info vi;
-
- vorbis_info_init (&vi);
- vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
- vorbis_analysis_init (&vd, &vi);
- vorbis_block_init (&vd, &vb);
- /* this function was added in 1.0rc3, so this is what we're testing for */
- vorbis_bitrate_addblock (&vb);
-
- system("touch conf.vorbistest");
- return 0;
-}
-
-],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
-
- if test "x$no_vorbis" = "x" ; then
- AC_MSG_RESULT(yes)
- ifelse([$1], , :, [$1])
- else
- AC_MSG_RESULT(no)
- if test -f conf.vorbistest ; then
- :
- else
- echo "*** Could not run Vorbis test program, checking why..."
- CFLAGS="$CFLAGS $VORBIS_CFLAGS"
- LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
- AC_TRY_LINK([
-#include <stdio.h>
-#include <vorbis/codec.h>
-], [ return 0; ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
- echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
- echo "*** or that you have moved Vorbis since it was installed." ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- VORBIS_CFLAGS=""
- VORBIS_LIBS=""
- VORBISFILE_LIBS=""
- VORBISENC_LIBS=""
- ifelse([$2], , :, [$2])
- fi
- AC_SUBST(VORBIS_CFLAGS)
- AC_SUBST(VORBIS_LIBS)
- AC_SUBST(VORBISFILE_LIBS)
- AC_SUBST(VORBISENC_LIBS)
- rm -f conf.vorbistest
-])
diff --git a/recipes/rhythmbox/rhythmbox_0.12.1.bb b/recipes/rhythmbox/rhythmbox_0.12.1.bb
new file mode 100644
index 0000000000..da2ad63e26
--- /dev/null
+++ b/recipes/rhythmbox/rhythmbox_0.12.1.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "Integrated music management application for GNOME"
+LICENSE = "GPL"
+DEPENDS = "dbus-glib-native gtk+ glib-2.0 gnome-doc-utils gnome-media gstreamer gst-plugins-base libgnomeui libglade libnotify libsoup totem-pl-parser"
+# optional dependencies:
+DEPENDS += "avahi gnome-keyring hal libgpod libmusicbrainz nautilus-cd-burner python-pygtk vala"
+#DEPENDS += "brasero mtp"
+
+inherit gnome
+
+# FIXME: Native doc processing with xsltproc using docbook needs additional work:
+do_configure_prepend() {
+ sed -i '/^SUBDIRS/,/^$/s/help//' Makefile.am
+}
+
+EXTRA_OECONF = "--disable-static --disable-scrollkeeper ac_cv_strftime_supports_E_O=yes"
+# FIXME: Verify that in uclibc:
+EXTRA_OECONF_linux-uclibc += "ac_cv_strftime_supports_E_O=no"
+
+EXTRA_OEMAKE = "DBUS_GLIB_BIN=${STAGING_BINDIR_NATIVE} VALAC=${STAGING_BINDIR_NATIVE}/valac"
+
+FILES_${PN}-dbg += "${libdir}/rhythmbox/plugins/.debug ${libdir}/rhythmbox/plugins/*/.debug"
+
+do_install_append () {
+ rm -f ${D}${libdir}/rhythmbox/plugins/*.la
+ rm -f ${D}${libdir}/rhythmbox/plugins/*/*.la
+}
diff --git a/recipes/rhythmbox/rhythmbox_0.8.5.bb b/recipes/rhythmbox/rhythmbox_0.8.5.bb
deleted file mode 100644
index 8a6f3a8905..0000000000
--- a/recipes/rhythmbox/rhythmbox_0.8.5.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-LICENSE = "GPL"
-SECTION = "unknown"
-PR = "r4"
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/rhythmbox/0.8/rhythmbox-${PV}.tar.gz \
- file://ogg.m4 file://vorbis.m4 \
- file://omfmake.patch;patch=1"
-
-DEPENDS = "gstreamer gst-plugins libgnomeui"
-
-EXTRA_OECONF = "--disable-schemas-install"
-
-FILES_${PN} += " ${libdir}/bonobo/servers ${libdir}/bonobo/*.so ${datadir}/omf ${datadir}/mime-info \
- ${datadir}/application-registry ${datadir}/gnome-2.0 ${datadir}/idl"
-FILES_${PN}-doc += " ${datadir}/gnome/help"
-FILES_${PN}-dev += " ${libdir}/bonobo/*.la ${libdir}/bonobo/*.a"
-
-RDEPENDS_${PN} = "gst-plugin-gnomevfs gst-plugin-esd gst-plugin-mad gst-plugin-ivorbis"
-
-do_configure_prepend() {
- mkdir -p ${S}/m4
- cp ${WORKDIR}/ogg.m4 ${S}/m4/
- cp ${WORKDIR}/vorbis.m4 ${S}/m4/
-}
-
-inherit autotools gconf
-
-do_compile() {
- oe_runmake ORBIT_IDL=`which orbit-idl-2`
-}
diff --git a/recipes/rhythmbox/rhythmbox_0.8.7.bb b/recipes/rhythmbox/rhythmbox_0.8.7.bb
deleted file mode 100644
index 2adb11fb8d..0000000000
--- a/recipes/rhythmbox/rhythmbox_0.8.7.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-LICENSE = "GPL"
-SECTION = "unknown"
-PR = "r0"
-
-inherit gnome
-
-SRC_URI += "file://ogg.m4 file://vorbis.m4"
-
-DEPENDS = "gstreamer gst-plugins libgnomeui"
-
-EXTRA_OECONF = "--disable-schemas-install"
-
-FILES_${PN} += " ${libdir}/bonobo/servers ${libdir}/bonobo/*.so ${datadir}/omf ${datadir}/mime-info \
- ${datadir}/application-registry ${datadir}/gnome-2.0 ${datadir}/idl"
-FILES_${PN}-doc += " ${datadir}/gnome/help"
-FILES_${PN}-dev += " ${libdir}/bonobo/*.la ${libdir}/bonobo/*.a"
-
-RDEPENDS_${PN} = "gst-plugin-gnomevfs gst-plugin-esd gst-plugin-mad gst-plugin-ivorbis"
-
-do_configure_prepend() {
- mkdir -p ${S}/m4
- cp ${WORKDIR}/ogg.m4 ${S}/m4/
- cp ${WORKDIR}/vorbis.m4 ${S}/m4/
-}
-
-do_compile() {
- oe_runmake ORBIT_IDL=`which orbit-idl-2`
-}
diff --git a/recipes/rrdtool/rrdtool_1.0.49.bb b/recipes/rrdtool/rrdtool_1.0.49.bb
index 11968ea609..f4216487df 100644
--- a/recipes/rrdtool/rrdtool_1.0.49.bb
+++ b/recipes/rrdtool/rrdtool_1.0.49.bb
@@ -5,13 +5,17 @@ LICENSE = "GPLv2"
DEPENDS = "libpng zlib"
DEPENDS_rddtool-perl = "perl-module-lib perl-module-dynaloader"
PR = "r2"
-SRC_URI = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.0.x/rdtool-${PV}.tar.gz \
+SRC_URI = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.0.x/rrdtool-${PV}.tar.gz \
file://perl-make-options.diff;patch=1;pnum=0"
inherit autotools
EXTRA_OECONF = "--enable-shared --enable-local-libpng --enable-local-zlib --program-prefix=''"
+do_configure_append_nylon() {
+ perl -pi -e 's/-Wdeclaration-after-statement //g' ${S}/perl-shared/Makefile
+}
+
do_install_append() {
install -d ${D}${docdir}/rrdtool/
mv ${D}/usr/html ${D}${docdir}/rrdtool/
@@ -24,4 +28,5 @@ do_stage () {
autotools_stage_all
}
-FILES_${PN} += "${libdir}/perl"
+FILES_${PN} += "${libdir}/perl/auto/RRDs/RRDs.bs ${libdir}/perl/auto/RRDs/RRDs.so ${libdir}/perl/RRDs.pm ${libdir}/perl/RRDp.pm"
+
diff --git a/recipes/rt2x00/rt61-firmware_1.2.bb b/recipes/rt2x00/rt61-firmware_1.2.bb
index ae683c8060..9fad60d906 100644
--- a/recipes/rt2x00/rt61-firmware_1.2.bb
+++ b/recipes/rt2x00/rt61-firmware_1.2.bb
@@ -7,7 +7,7 @@ S = "${WORKDIR}/RT61_Firmware_V${PV}"
do_install() {
install -d ${D}/${base_libdir}/firmware
- install -m 0644 rt61.bin ${D}/${base_libdir}/firmware/
+ install -m 0644 *.bin ${D}/${base_libdir}/firmware/
}
FILES_${PN} = "${base_libdir}/firmware/"
diff --git a/recipes/ruby/ruby.inc b/recipes/ruby/ruby.inc
index 978bf4b229..4fdfdca976 100644
--- a/recipes/ruby/ruby.inc
+++ b/recipes/ruby/ruby.inc
@@ -4,7 +4,8 @@ SECTION = "devel/ruby"
PRIORITY = "optional"
LICENSE = "GPL"
-SRC_URI = "ftp://ftp.ruby-lang.org/pub/ruby/ruby-${PV}.tar.gz \
+SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
+SRC_URI = "ftp://ftp.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
file://extmk_run.patch;patch=1 \
file://openssl.patch;patch=1 \
file://disable_wide_getaddrinfo_check.patch;patch=1"
diff --git a/recipes/samba/files/tdb.pc b/recipes/samba/files/tdb.pc
new file mode 100644
index 0000000000..6307a20a03
--- /dev/null
+++ b/recipes/samba/files/tdb.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: tdb
+Description: A trivial database
+Version: 1.1.2
+Libs: -L${libdir} -ltdb
+Cflags: -I${includedir}
+URL: http://tdb.samba.org/
diff --git a/recipes/samba/files/tdbheaderfix.patch b/recipes/samba/files/tdbheaderfix.patch
new file mode 100644
index 0000000000..e37c9b0d5c
--- /dev/null
+++ b/recipes/samba/files/tdbheaderfix.patch
@@ -0,0 +1,14 @@
+Index: source/lib/tdb/include/tdb.h
+===================================================================
+--- source.orig/lib/tdb/include/tdb.h 2009-05-17 17:42:41.000000000 +0100
++++ source/lib/tdb/include/tdb.h 2009-05-17 17:42:46.000000000 +0100
+@@ -1,6 +1,9 @@
+ #ifndef __TDB_H__
+ #define __TDB_H__
+
++#include <signal.h>
++
++
+ /*
+ Unix SMB/CIFS implementation.
+
diff --git a/recipes/samba/samba.inc b/recipes/samba/samba.inc
index 36de08beca..ec21ed70b0 100644
--- a/recipes/samba/samba.inc
+++ b/recipes/samba/samba.inc
@@ -6,6 +6,7 @@ SRC_URI = "http://samba.org/samba/ftp/stable/samba-${PV}.tar.gz \
file://volatiles.03_samba \
file://smb.conf \
file://init \
+ file://tdb.pc \
"
S = "${WORKDIR}/samba-${PV}/source"
@@ -55,6 +56,8 @@ do_compile () {
}
do_install_append() {
+ install -d ${D}${libdir}/pkgconfig/
+ cp ${WORKDIR}/tdb.pc ${D}${libdir}/pkgconfig/
mv ${D}${libdir}/libsmbclient.so ${D}${libdir}/libsmbclient.so.0 || true
ln -sf libsmbclient.so.0 ${D}${libdir}/libsmbclient.so
mkdir -p ${D}${base_sbindir}
@@ -83,4 +86,7 @@ do_stage() {
oe_libinstall -C bin -a -so libtdb ${STAGING_LIBDIR}
oe_libinstall -C bin -a -so libtalloc ${STAGING_LIBDIR}
oe_libinstall -C bin -so libwbclient ${STAGING_LIBDIR}
+ install -d ${STAGING_LIBDIR}/pkgconfig/
+ install -m 0644 ${WORKDIR}/tdb.pc ${STAGING_LIBDIR}/pkgconfig/
+ install -m 0644 ${S}/lib/tdb/include/*.h ${STAGING_INCDIR}/
}
diff --git a/recipes/samba/samba_3.3.0.bb b/recipes/samba/samba_3.3.0.bb
index c561d95524..87a7c5e7f7 100644
--- a/recipes/samba/samba_3.3.0.bb
+++ b/recipes/samba/samba_3.3.0.bb
@@ -11,9 +11,9 @@ DEFAULT_PREFERENCE = "-1"
SRC_URI += "file://configure-3.3.0.patch;patch=1 \
file://config-h.patch;patch=1 \
file://mtab.patch;patch=1 \
- "
+ file://tdbheaderfix.patch;patch=1 "
-PR = "r2"
+PR = "r3"
EXTRA_OECONF += "\
SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \
diff --git a/recipes/schroedinger/gst-plugin-schroedinger_1.0.5.bb b/recipes/schroedinger/gst-plugin-schroedinger_1.0.5.bb
new file mode 100644
index 0000000000..64660bb7f2
--- /dev/null
+++ b/recipes/schroedinger/gst-plugin-schroedinger_1.0.5.bb
@@ -0,0 +1,14 @@
+require schroedinger.inc
+PR = "r2"
+
+DEPENDS += "gstreamer gst-plugins-base"
+
+SRC_URI = "http://www.diracvideo.org/download/schroedinger/schroedinger-${PV}.tar.gz"
+
+S = "${WORKDIR}/schroedinger-${PV}"
+
+PACKAGES = "gst-plugin-schroedinger gst-plugin-schroedinger-dev gst-plugin-schroedinger-dbg"
+FILES_gst-plugin-schroedinger += "${libdir}/gstreamer-0.10/libgstschro.so"
+FILES_gst-plugin-schroedinger-dev += "${libdir}/gstreamer-0.10/libgstschro.*"
+FILES_gst-plugin-schroedinger-dbg += "${libdir}/gstreamer-0.10/.debug/libgstschro.so"
+
diff --git a/recipes/schroedinger/schroedinger.inc b/recipes/schroedinger/schroedinger.inc
new file mode 100644
index 0000000000..f907613fd1
--- /dev/null
+++ b/recipes/schroedinger/schroedinger.inc
@@ -0,0 +1,10 @@
+HOMEPAGE = "http://schrodinger.sourceforge.net/"
+LICENSE = "MPL GPL LGPL MIT"
+DEPENDS = "liboil"
+
+PR = "r2"
+
+SRC_URI = "http://www.diracvideo.org/download/schroedinger/${P}.tar.gz"
+
+inherit autotools
+
diff --git a/recipes/schroedinger/schroedinger_1.0.5.bb b/recipes/schroedinger/schroedinger_1.0.5.bb
index defb758046..66d24c1d97 100644
--- a/recipes/schroedinger/schroedinger_1.0.5.bb
+++ b/recipes/schroedinger/schroedinger_1.0.5.bb
@@ -1,22 +1,8 @@
-HOMEPAGE = "http://schrodinger.sourceforge.net/"
-LICENSE = "MPL GPL LGPL MIT"
-DEPENDS = "liboil gstreamer gst-plugins-base"
+require schroedinger.inc
-PR = "r1"
+PR = "r2"
-SRC_URI = "http://www.diracvideo.org/download/schroedinger/${P}.tar.gz"
-
-inherit autotools
-
-PACKAGES =+ "gst-plugin-schroedinger gst-plugin-schroedinger-dev gst-plugin-schroedinger-dbg"
-FILES_gst-plugin-schroedinger += "${libdir}/gstreamer-0.10/libgstschro.so"
-FILES_gst-plugin-schroedinger-dev += "${libdir}/gstreamer-0.10/libgstschro.*"
-FILES_gst-plugin-schroedinger-dbg += "${libdir}/gstreamer-0.10/.debug/libgstschro.so"
+inherit autotools_stage
AUTOTOOLS_STAGE_PKGCONFIG = "1"
-do_stage() {
- autotools_stage_all
-}
-
-
diff --git a/recipes/sdr/dttsp_svn.bb b/recipes/sdr/dttsp_svn.bb
new file mode 100644
index 0000000000..ac49779a76
--- /dev/null
+++ b/recipes/sdr/dttsp_svn.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Software Radio Core"
+LICENSE = "GPLv3"
+DEPENDS = "fftwf jack"
+
+PV = "${SRCREV}"
+SRCREV = "241"
+
+SRC_URI = "svn://206.216.146.154/svn/repos_sdr_linux/branches/ab2kt;module=dttsp-ng"
+S = "${WORKDIR}/dttsp-ng/src"
+
+inherit autotools_stage
+
+
diff --git a/recipes/sdr/fldigi_3.11.4.bb b/recipes/sdr/fldigi_3.11.4.bb
new file mode 100644
index 0000000000..f301ae1481
--- /dev/null
+++ b/recipes/sdr/fldigi_3.11.4.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "Digital modem program for Linux"
+LICENSE = "GPLv2"
+
+DEPENDS = "libsndfile1 portaudio-v19 hamlib jpeg fltk libsamplerate0 pulseaudio"
+
+inherit autotools_stage
+
+SRC_URI = "http://www.w1hkj.com/fldigi-distro/fldigi-${PV}.tar.gz"
+
+EXTRA_OECONF = " --enable-static --without-jpeg"
+
+
diff --git a/recipes/sdr/hamlib_1.2.9.bb b/recipes/sdr/hamlib_1.2.9.bb
new file mode 100644
index 0000000000..8815c622e6
--- /dev/null
+++ b/recipes/sdr/hamlib_1.2.9.bb
@@ -0,0 +1,47 @@
+DESCRIPTION = "The Ham Radio Control Libraries, Hamlib for short, is a development effort to provide a consistent interface for programmers wanting to incorporate radio control in their programs"
+LICENSE = "GPLv2"
+
+DEPENDS = "swig-native perl python libusb-compat tcl gnuradio"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/hamlib/hamlib-${PV}.tar.gz"
+
+PR = "r1"
+
+inherit autotools_stage
+
+EXTRA_OECONF = "--with-perl-inc=${STAGING_LIBDIR}/perl/5.8.8/CORE"
+# This is a hack, someone with some more time should fix the autofoo
+do_configure() {
+ oe_runconf
+}
+
+PARALLEL_MAKE = ""
+
+do_compile_prepend() {
+ mkdir -p ${STAGING_LIBDIR}/.libs
+ ln -sf ${STAGING_LIBDIR}/libusb* ${STAGING_LIBDIR}/.libs/
+ for i in $(find ${S} -name "Makefile") ; do
+ sed -i -e 's:${STAGING_LIBDIR_NATIVE}:${STAGING_LIBDIR}:g' \
+ -e s:-L/usr/local/lib::g \
+ -e 's:\"$(CC)\":\"${CC}\" LD=\"${LD}\" LDFLAGS=\"${LDFLAGS}\":g' \
+ -e s:${STAGING_INCDIR_NATIVE}/python2.6:${STAGING_INCDIR}/python2.6:g $i
+ done
+}
+
+# There's one perl module that doesn't honour CFLAGS :(
+INSANE_SKIP_${PN} = True
+FILES_${PN} = "${bindir} ${sbindir} ${libdir}/hamlib* ${libdir}/p*/ ${libdir}/tcl"
+FILES_${PN}-dbg += "${libdir}/perl/*/auto/Hamlib/.debug/"
+
+python populate_packages_prepend () {
+ hamlib_libdir = bb.data.expand('${libdir}', d)
+ hamlib_libdir_dbg = bb.data.expand('${libdir}/.debug', d)
+ do_split_packages(d, hamlib_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'hamlib %s development package', extra_depends='${PN}-dev', allow_links=True)
+ do_split_packages(d, hamlib_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'hamlib %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, hamlib_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'hamlib %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, hamlib_libdir, '^lib(.*)\.so\.*', 'lib%s', 'hamlib %s library', extra_depends='', allow_links=True)
+}
+
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+
diff --git a/recipes/sdr/sdrshell/gcc-43-fix.patch b/recipes/sdr/sdrshell/gcc-43-fix.patch
new file mode 100644
index 0000000000..1870ea6ac0
--- /dev/null
+++ b/recipes/sdr/sdrshell/gcc-43-fix.patch
@@ -0,0 +1,10 @@
+Index: main_widget.cpp
+===================================================================
+--- main_widget.cpp (revision 57)
++++ main_widget.cpp (working copy)
+@@ -1,3 +1,5 @@
++#include <cstdlib>
++
+ #include "main_widget.h"
+ #include "switches.h"
+ #include "modes.h"
diff --git a/recipes/sdr/sdrshell_svn.bb b/recipes/sdr/sdrshell_svn.bb
new file mode 100644
index 0000000000..1641aa5668
--- /dev/null
+++ b/recipes/sdr/sdrshell_svn.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "SDR-Shell is Qt GUI for the sdr-core (DttSP) Software Defined Radio"
+LICENSE = "GPLv2"
+
+DEPENDS = "dttsp"
+
+inherit qmake qt3x11
+
+SRCREV = "57"
+PV = "${SRCREV}"
+
+SRC_URI = "svn://sdr-shell.googlecode.com/svn/branches;module=sdr-shell-v2;proto=http \
+ file://gcc-43-fix.patch;patch=1;pnum=0"
+S = "${WORKDIR}/sdr-shell-v2"
+
+PARALLEL_MAKE = ""
+
+do_configure_prepend() {
+ rm -f ${S}/sdr-shell
+}
+
+do_compile_prepend() {
+ sed -i -e s:OE_QMAKE_LINK:CXX:g ${S}/Makefile
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/sdr-shell ${D}${bindir}
+}
+
+
diff --git a/recipes/ser/ser_0.9.0.bb b/recipes/ser/ser_0.9.0.bb
index 25e5936248..010b1528fb 100644
--- a/recipes/ser/ser_0.9.0.bb
+++ b/recipes/ser/ser_0.9.0.bb
@@ -21,3 +21,5 @@ do_install() {
install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/ser
oe_runmake bin-target=${sbindir} doc-target=${docdir}/ser modules-target=${libdir}/ser/modules/ cfg-target=${sysconfdir}/ser/ prefix=${D}/usr cfg-prefix=${D} LD='${CC}' install
}
+
+FILES_${PN}-dbg += "${libdir}/ser/modules/.debug ${sbindir}/.debug"
diff --git a/recipes/slugimage/slugimage-native.bb b/recipes/slugimage/slugimage-native.bb
index 8b60ff1b59..f8408a150a 100644
--- a/recipes/slugimage/slugimage-native.bb
+++ b/recipes/slugimage/slugimage-native.bb
@@ -6,8 +6,6 @@ RDEPENDS = ""
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/slugimage-${PV}', '${FILE_DIRNAME}/slugimage', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
do_stage () {
install -m 0755 slugimage ${STAGING_BINDIR}/
}
diff --git a/recipes/slugtool/slugtool-native.bb b/recipes/slugtool/slugtool-native.bb
index 2d1fe918de..088839cf80 100644
--- a/recipes/slugtool/slugtool-native.bb
+++ b/recipes/slugtool/slugtool-native.bb
@@ -2,7 +2,6 @@ SECTION = "unknown"
require slugtool.bb
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/slugtool-${PV}', '${FILE_DIRNAME}/slugtool', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
do_stage () {
diff --git a/recipes/snes9x/snes9x/configure.patch b/recipes/snes9x/snes9x/configure.patch
new file mode 100644
index 0000000000..e9fb685399
--- /dev/null
+++ b/recipes/snes9x/snes9x/configure.patch
@@ -0,0 +1,12 @@
+--- configure 2009-05-21 15:48:14.000000000 +0100
++++ configure 2009-05-21 15:48:14.000000000 +0100
+@@ -4474,9 +4474,6 @@
+ LIBS="-lX11 -lXext"
+ SYSLIBS="$SYSLIBS -L$x_libraries -lX11 -lXext"
+ fi
+-if test x$x_includes != x ; then
+- XINCLUDES="-I$x_includes"
+-fi
+ echo $ac_n "checking for XDGAQueryVersion in -lXxf86dga""... $ac_c" 1>&6
+ echo "configure:4482: checking for XDGAQueryVersion in -lXxf86dga" >&5
+ ac_lib_var=`echo Xxf86dga'_'XDGAQueryVersion | sed 'y%./+-%__p_%'`
diff --git a/recipes/snes9x/snes9x/linkage.patch b/recipes/snes9x/snes9x/linkage.patch
new file mode 100644
index 0000000000..cc007b5fe7
--- /dev/null
+++ b/recipes/snes9x/snes9x/linkage.patch
@@ -0,0 +1,31 @@
+--- ppu.h~ 2004-07-11 22:50:59.000000000 +0100
++++ ppu.h 2009-05-21 15:54:06.000000000 +0100
+@@ -332,10 +332,14 @@
+ uint8 _5A22;
+ } SnesModel;
+
++START_EXTERN_C
++
+ extern SnesModel* Model;
+ extern SnesModel M1SNES;
+ extern SnesModel M2SNES;
+
++END_EXTERN_C
++
+ #define MAX_5C77_VERSION 0x01
+ #define MAX_5C78_VERSION 0x03
+ #define MAX_5A22_VERSION 0x02
+--- dsp1.h~ 2004-07-11 22:50:57.000000000 +0100
++++ dsp1.h 2009-05-21 15:53:46.000000000 +0100
+@@ -122,9 +122,10 @@
+ void S9xResetDSP1 ();
+ uint8 S9xGetDSP (uint16 Address);
+ void S9xSetDSP (uint8 Byte, uint16 Address);
+-END_EXTERN_C
+
+ extern struct SDSP1 DSP1;
+
++END_EXTERN_C
++
+ #endif
+
diff --git a/recipes/snes9x/snes9x_1.43-WIP1.bb b/recipes/snes9x/snes9x_1.43-WIP1.bb
index 0b746795f2..df623e591c 100644
--- a/recipes/snes9x/snes9x_1.43-WIP1.bb
+++ b/recipes/snes9x/snes9x_1.43-WIP1.bb
@@ -1,5 +1,5 @@
SECTION = "x11/games"
-PR = "r3"
+PR = "r4"
LICENSE = "snes9x"
DEPENDS = "libxxf86dga libxxf86vm"
DEPENDS_append_i686 = " nasm-native"
@@ -8,7 +8,9 @@ RDEPENDS_epia = "kernel-module-joydev"
SRC_URI = "http://www.lysator.liu.se/snes9x/1.43-WIP1/snes9x-1.43-WIP1-src.tar.gz \
file://makefile.patch;patch=1;pnum=2 \
file://private.patch;patch=1;pnum=0 \
- file://64bit.patch;patch=1"
+ file://64bit.patch;patch=1 \
+ file://configure.patch;patch=1;pnum=0 \
+ file://linkage.patch;patch=1;pnum=0"
S = "${WORKDIR}/snes9x-1.43-dev-src/snes9x"
diff --git a/recipes/squashfs-tools/squashfs-lzma-tools-native_3.1r2.bb b/recipes/squashfs-tools/squashfs-lzma-tools-native_3.1r2.bb
index 5520896a5a..8261ef55dc 100644
--- a/recipes/squashfs-tools/squashfs-lzma-tools-native_3.1r2.bb
+++ b/recipes/squashfs-tools/squashfs-lzma-tools-native_3.1r2.bb
@@ -4,7 +4,7 @@ DEPENDS = "lzma-native"
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/squashfs-tools-${PV}', '${FILE_DIRNAME}/squashfs-tools', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "squashfs-tools-${PV}:squashfs-tools:"
PACKAGES = ""
do_stage () {
diff --git a/recipes/squashfs-tools/squashfs-tools-native_2.0r2.bb b/recipes/squashfs-tools/squashfs-tools-native_2.0r2.bb
index 2423e47e77..9ba56844fd 100644
--- a/recipes/squashfs-tools/squashfs-tools-native_2.0r2.bb
+++ b/recipes/squashfs-tools/squashfs-tools-native_2.0r2.bb
@@ -1,11 +1,9 @@
require squashfs-tools_${PV}.bb
DEPENDS = "lzma-native"
-PN_BASE = "squashfs-tools"
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${PN_BASE}-${PV}', '${FILE_DIRNAME}/${PN_BASE}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
do_stage () {
diff --git a/recipes/squashfs-tools/squashfs-tools-native_2.2r2.bb b/recipes/squashfs-tools/squashfs-tools-native_2.2r2.bb
index b6ee6e7a22..9ba56844fd 100644
--- a/recipes/squashfs-tools/squashfs-tools-native_2.2r2.bb
+++ b/recipes/squashfs-tools/squashfs-tools-native_2.2r2.bb
@@ -4,7 +4,6 @@ DEPENDS = "lzma-native"
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/squashfs-tools-${PV}', '${FILE_DIRNAME}/squashfs-tools', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
do_stage () {
diff --git a/recipes/squashfs-tools/squashfs-tools-native_3.1r2.bb b/recipes/squashfs-tools/squashfs-tools-native_3.1r2.bb
index c35d183a08..c171e43f46 100644
--- a/recipes/squashfs-tools/squashfs-tools-native_3.1r2.bb
+++ b/recipes/squashfs-tools/squashfs-tools-native_3.1r2.bb
@@ -2,7 +2,6 @@ require squashfs-tools_${PV}.bb
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/squashfs-tools-${PV}', '${FILE_DIRNAME}/squashfs-tools', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
do_stage () {
diff --git a/recipes/squashfs-tools/squashfs-tools-native_3.3.bb b/recipes/squashfs-tools/squashfs-tools-native_3.3.bb
index 87ba761ce4..5858bb18d6 100644
--- a/recipes/squashfs-tools/squashfs-tools-native_3.3.bb
+++ b/recipes/squashfs-tools/squashfs-tools-native_3.3.bb
@@ -3,7 +3,6 @@ PR = "r0"
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/squashfs-tools-${PV}', '${FILE_DIRNAME}/squashfs-tools', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
do_stage () {
diff --git a/recipes/squashfs-tools/squashfs-tools-native_4.0.bb b/recipes/squashfs-tools/squashfs-tools-native_4.0.bb
index 87ba761ce4..5858bb18d6 100644
--- a/recipes/squashfs-tools/squashfs-tools-native_4.0.bb
+++ b/recipes/squashfs-tools/squashfs-tools-native_4.0.bb
@@ -3,7 +3,6 @@ PR = "r0"
inherit native
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/squashfs-tools-${PV}', '${FILE_DIRNAME}/squashfs-tools', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
do_stage () {
diff --git a/recipes/startup-notification/startup-notification_0.9.bb b/recipes/startup-notification/startup-notification_0.9.bb
new file mode 100644
index 0000000000..2b8725184b
--- /dev/null
+++ b/recipes/startup-notification/startup-notification_0.9.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Startup notification support"
+LICENSE = "LGPL"
+SECTION = "libs"
+PRIORITY = "optional"
+DEPENDS = "virtual/libx11 libsm"
+
+inherit autotools pkgconfig
+
+SRC_URI = "http://www.freedesktop.org/software/startup-notification/releases/startup-notification-${PV}.tar.gz"
+
+do_stage () {
+ autotools_stage_all
+}
diff --git a/recipes/swig/swig-native_1.3.39.bb b/recipes/swig/swig-native_1.3.39.bb
new file mode 100644
index 0000000000..8210bb9cfb
--- /dev/null
+++ b/recipes/swig/swig-native_1.3.39.bb
@@ -0,0 +1,7 @@
+require swig_${PV}.bb
+inherit native
+
+do_stage() {
+ oe_runmake install PREFIX=${STAGING_BINDIR}/..
+}
+
diff --git a/recipes/swig/swig_1.3.39.bb b/recipes/swig/swig_1.3.39.bb
new file mode 100644
index 0000000000..8a8138c21c
--- /dev/null
+++ b/recipes/swig/swig_1.3.39.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "SWIG - Simplified Wrapper and Interface Generator"
+HOMEPAGE = "http://swig.sourceforge.net/"
+LICENSE = "BSD"
+SECTION = "devel"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/swig/swig-${PV}.tar.gz"
+S = "${WORKDIR}/swig-${PV}"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-python=${STAGING_BINDIR_NATIVE} --with-swiglibdir=${STAGING_DIR_NATIVE}/swig"
+
+do_configure() {
+ oe_runconf
+}
+
diff --git a/recipes/sysklogd/sysklogd-1.5/no-strip-install.patch b/recipes/sysklogd/sysklogd-1.5/no-strip-install.patch
new file mode 100644
index 0000000000..5a78f01738
--- /dev/null
+++ b/recipes/sysklogd/sysklogd-1.5/no-strip-install.patch
@@ -0,0 +1,15 @@
+Index: sysklogd-1.5/Makefile
+===================================================================
+--- sysklogd-1.5.orig/Makefile 2009-06-09 13:02:41.000000000 +0200
++++ sysklogd-1.5/Makefile 2009-06-09 13:03:06.000000000 +0200
+@@ -127,8 +127,8 @@
+ rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd
+
+ install_exec: syslogd klogd
+- ${INSTALL} -m 500 -s syslogd ${BINDIR}/syslogd
+- ${INSTALL} -m 500 -s klogd ${BINDIR}/klogd
++ ${INSTALL} -m 500 syslogd ${BINDIR}/syslogd
++ ${INSTALL} -m 500 klogd ${BINDIR}/klogd
+
+ install_man:
+ ${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8
diff --git a/recipes/sysklogd/sysklogd.inc b/recipes/sysklogd/sysklogd.inc
index da05c0e02e..2fdc49c543 100644
--- a/recipes/sysklogd/sysklogd.inc
+++ b/recipes/sysklogd/sysklogd.inc
@@ -1,7 +1,6 @@
LICENSE = "GPL"
SECTION = "base"
-DESCRIPTION = "The sysklogd package implements \
-two system log daemons."
+DESCRIPTION = "The sysklogd package implements two system log daemons."
SRC_URI = "http://www.ibiblio.org/pub/Linux/system/daemons/sysklogd-${PV}.tar.gz \
file://nonrootinstall.patch;patch=1"
diff --git a/recipes/sysklogd/sysklogd_1.5.bb b/recipes/sysklogd/sysklogd_1.5.bb
index 31843d603f..37cfd7f28d 100644
--- a/recipes/sysklogd/sysklogd_1.5.bb
+++ b/recipes/sysklogd/sysklogd_1.5.bb
@@ -1 +1,4 @@
require sysklogd.inc
+PR = "r1"
+
+SRC_URI += "file://no-strip-install.patch;patch=1"
diff --git a/recipes/syslog-ng/syslog-ng_1.6.11.bb b/recipes/syslog-ng/syslog-ng_1.6.11.bb
index 794ad5335c..0ae0090da2 100644
--- a/recipes/syslog-ng/syslog-ng_1.6.11.bb
+++ b/recipes/syslog-ng/syslog-ng_1.6.11.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Alternative system logger daemon"
DEPENDS = "libol flex"
PR = "r0"
-SRC_URI = "http://www.balabit.com/downloads/syslog-ng/1.6/src/${PN}-${PV}.tar.gz \
+SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/1.6/src/${PN}-${PV}.tar.gz \
file://syslog-ng.conf \
file://initscript"
diff --git a/recipes/syslog-ng/syslog-ng_1.6.8.bb b/recipes/syslog-ng/syslog-ng_1.6.8.bb
index d8e02d0da2..95356565dc 100644
--- a/recipes/syslog-ng/syslog-ng_1.6.8.bb
+++ b/recipes/syslog-ng/syslog-ng_1.6.8.bb
@@ -2,7 +2,7 @@ PR = "r9"
DESCRIPTION = "Alternative system logger daemon"
DEPENDS = "libol flex"
-SRC_URI = "http://www.balabit.com/downloads/syslog-ng/1.6/src/${PN}-${PV}.tar.gz \
+SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/1.6/src/${PN}-${PV}.tar.gz \
file://syslog-ng.conf \
file://initscript"
diff --git a/recipes/syslog-ng/syslog-ng_2.0.5.bb b/recipes/syslog-ng/syslog-ng_2.0.5.bb
index 80f0fc59c6..5b3431c368 100644
--- a/recipes/syslog-ng/syslog-ng_2.0.5.bb
+++ b/recipes/syslog-ng/syslog-ng_2.0.5.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Alternative system logger daemon"
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 \
+SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/2.0/src/${P}.tar.gz \
file://syslog-ng.conf \
file://initscript"
diff --git a/recipes/system-config-printer/system-config-printer_1.1.7.bb b/recipes/system-config-printer/system-config-printer_1.1.7.bb
new file mode 100644
index 0000000000..5a6d6320ac
--- /dev/null
+++ b/recipes/system-config-printer/system-config-printer_1.1.7.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "cups Python Bindings"
+SECTION = "devel/python"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+DEPENDS = "cups"
+RDEPENDS_python-cupshelpers += "python-pprint python-netclient python-misc"
+PR = "r2"
+
+SRC_URI = "http://cyberelk.net/tim/data/${PN}/1.1/${PN}-${PV}.tar.bz2"
+S = "${WORKDIR}/${PN}-${PV}"
+
+inherit distutils
+
+do_configure_prepend() {
+ # disable xmlto usage since we won't use manpages
+ sed -i 's,xmlto,echo xmlto,g' ${S}/Makefile*
+}
+
+PACKAGES += "python-cupshelpers"
+
+FILES_${PN} = "" # we're not going to support it for now
+FILES_python-cupshelpers = "${libdir}"
diff --git a/recipes/sysvinit/sysvinit/rcS b/recipes/sysvinit/sysvinit/rcS
index e7a7e617d0..15b90f79c5 100755
--- a/recipes/sysvinit/sysvinit/rcS
+++ b/recipes/sysvinit/sysvinit/rcS
@@ -14,7 +14,10 @@ export PATH runlevel prevlevel
# Make sure proc is mounted
#
-[ -d "/proc/1" ] || mount /proc
+[ -d "/proc/1" ] || mount proc /proc -t proc
+
+# Make sure sys is mounted
+[ -d "/sys/kernel" ] || mount sysfs /sys -t sysfs
#
# See if system needs to be setup. This is ONLY meant to
diff --git a/recipes/sysvinit/sysvinit_2.86.bb b/recipes/sysvinit/sysvinit_2.86.bb
index e65391a6fd..e546726ab9 100644
--- a/recipes/sysvinit/sysvinit_2.86.bb
+++ b/recipes/sysvinit/sysvinit_2.86.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "System-V like init."
SECTION = "base"
LICENSE = "GPL"
HOMEPAGE = "http://freshmeat.net/projects/sysvinit/"
-PR = "r53"
+PR = "r57"
# USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
# Set PACKAGE_ARCH appropriately.
@@ -38,10 +38,13 @@ ALTERNATIVE_LINK = "${base_sbindir}/init"
ALTERNATIVE_PATH = "${base_sbindir}/init.sysvinit"
ALTERNATIVE_PRIORITY = "60"
-PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
+PACKAGES =+ "sysvinit-utils sysvinit-pidof sysvinit-sulogin"
FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit"
FILES_sysvinit-sulogin = "${base_sbindir}/sulogin"
+FILES_sysvinit-utils = "${bindir}/last.${PN} ${bindir}/mesg.${PN} ${bindir}/wall.${PN} ${base_sbindir}/shutdown.${PN} ${bindir}/lastb ${bindir}/utmpdump ${base_sbindir}/runlevel"
+RRECOMMENDS_${PN} = "sysvinit-utils"
+RRECOMMENDS_${PN}_micro = ""
CFLAGS_prepend = "-D_GNU_SOURCE "
export LCRYPT = "-lcrypt"
@@ -108,21 +111,29 @@ pkg_postinst_${PN} () {
#!/bin/sh
update-alternatives --install ${base_sbindir}/halt halt halt.${PN} 200
update-alternatives --install ${base_sbindir}/reboot reboot reboot.${PN} 200
-update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 200
update-alternatives --install ${base_sbindir}/poweroff poweroff poweroff.${PN} 200
+}
+
+pkg_postinst_sysvinit-utils () {
+#!/bin/sh
update-alternatives --install ${bindir}/last last last.${PN} 200
update-alternatives --install ${bindir}/mesg mesg mesg.${PN} 200
update-alternatives --install ${bindir}/wall wall wall.${PN} 200
+update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 200
}
pkg_prerm_${PN} () {
#!/bin/sh
update-alternatives --remove halt halt.${PN}
update-alternatives --remove reboot reboot.${PN}
-update-alternatives --remove shutdown shutdown.${PN}
+}
+
+pkg_prerm_sysvinit-utils () {
+#!/bin/sh
update-alternatives --remove last last.${PN}
update-alternatives --remove mesg mesg.${PN}
update-alternatives --remove wall wall.${PN}
+update-alternatives --remove shutdown shutdown.${PN}
}
pkg_postinst_sysvinit-pidof () {
diff --git a/recipes/tango/tango-icon-theme_0.8.90.bb b/recipes/tango/tango-icon-theme_0.8.90.bb
new file mode 100644
index 0000000000..4907833d3d
--- /dev/null
+++ b/recipes/tango/tango-icon-theme_0.8.90.bb
@@ -0,0 +1,11 @@
+SECTION = "unknown"
+LICENSE = "http://creativecommons.org/licenses/by-sa/2.5/"
+
+inherit gnome
+
+SRC_URI = "http://tango.freedesktop.org/releases/${PN}-${PV}.tar.gz \
+ file://no-icon-naming-utils.patch;patch=1"
+EXTRA_OECONF = "--disable-icon-framing"
+
+PACKAGE_ARCH = "all"
+FILES_${PN} += "${datadir}/icons"
diff --git a/recipes/tangogps/tangogps_0.9.3.bb b/recipes/tangogps/tangogps_0.9.6.bb
index 59020fd6bd..727179e5af 100644
--- a/recipes/tangogps/tangogps_0.9.3.bb
+++ b/recipes/tangogps/tangogps_0.9.6.bb
@@ -1,3 +1,3 @@
require tangogps.inc
-PR = "r3"
+PR = "r0"
diff --git a/recipes/tasks/task-beagleboard-demo.bb b/recipes/tasks/task-beagleboard-demo.bb
index 24123f0385..0f24dc9a23 100644
--- a/recipes/tasks/task-beagleboard-demo.bb
+++ b/recipes/tasks/task-beagleboard-demo.bb
@@ -1,10 +1,10 @@
DESCRIPTION = "Task for Beagleboard-demo-image"
-PR = "r8"
+PR = "r10"
inherit task
-ECONFIG ?= "places e-wm-config-angstrom e-wm-config-default"
+ECONFIG ?= "places e-wm-config-angstrom e-wm-config-angstrom-touchscreen e-wm-config-angstrom-widescreen e-wm-config-default"
RDEPENDS_${PN} = "\
task-proper-tools \
@@ -29,7 +29,6 @@ RDEPENDS_${PN} = "\
# irssi \
mplayer \
gnome-games \
- rt73-firmware zd1211-firmware \
stalonetray \
synergy \
x11vnc angstrom-x11vnc-xinit \
@@ -37,10 +36,15 @@ RDEPENDS_${PN} = "\
openssh-scp openssh-ssh \
picodlp-control \
connman-gnome \
+ gnome-bluetooth \
"
# Install all kernel modules
-RRECOMMENDS_${PN} += "kernel-modules"
+RRECOMMENDS_${PN} += " \
+ kernel-modules \
+ rt73-firmware \
+ zd1211-firmware \
+"
PACKAGE_ARCH = "${MACHINE_ARCH}"
RRECOMMENDS_${PN}_append_armv7a = " omapfbplay"
diff --git a/recipes/tasks/task-gpe-settings.bb b/recipes/tasks/task-gpe-settings.bb
index 84302fdf5a..6f8b8e6381 100644
--- a/recipes/tasks/task-gpe-settings.bb
+++ b/recipes/tasks/task-gpe-settings.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Settings task package for GPE Palmtop Environment"
-PR = "r6"
+PR = "r7"
LICENSE = "MIT"
inherit task
@@ -18,6 +18,5 @@ RDEPENDS_${PN} = "\
gpe-taskmanager \
keylaunch \
minilite \
- minimix \
- xmonobut"
+ minimix"
diff --git a/recipes/tasks/task-gpe.bb b/recipes/tasks/task-gpe.bb
index bc5105f6a8..0bf1325da0 100644
--- a/recipes/tasks/task-gpe.bb
+++ b/recipes/tasks/task-gpe.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Task packages for GPE Palmtop Environment"
-PR = "r6"
+PR = "r7"
LICENSE = "MIT"
inherit task
@@ -73,8 +73,9 @@ RDEPENDS_gpe-task-settings = "\
gpe-taskmanager \
keylaunch \
minilite \
- minimix \
- xmonobut"
+ minimix"
+
+# xmonobut unfetchable, removed
RDEPENDS_gpe-task-apps = "\
gpe-edit \
diff --git a/recipes/tasks/task-opie.bb b/recipes/tasks/task-opie.bb
index 41dd92ac7a..a1699ad785 100644
--- a/recipes/tasks/task-opie.bb
+++ b/recipes/tasks/task-opie.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Tasks for OPIE stuff"
SECTION = "opie/base"
LICENSE = "MIT"
-PR = "r12"
+PR = "r13"
inherit task
@@ -12,11 +12,11 @@ PACKAGES = "task-opie-base \
task-opie-base-applets task-opie-base-apps \
task-opie-base-decorations task-opie-base-inputmethods \
task-opie-base-pim task-opie-base-settings \
- task-opie-base-styles task-opie-bluetooth \
- task-opie-base-todayplugins \
+ task-opie-base-styles task-opie-base-todayplugins \
task-opie-extra-settings \
task-opie-extra-styles \
- task-opie-irda \
+ ${@base_contains("COMBINED_FEATURES", "bluetooth", "task-opie-bluetooth", "",d)} \
+ ${@base_contains("COMBINED_FEATURES", "irda", "task-opie-irda", "",d)} \
"
RDEPENDS_task-opie-everything := "${PACKAGES}"
diff --git a/recipes/tasks/task-proper-tools.bb b/recipes/tasks/task-proper-tools.bb
index c5045a13f5..056109ef86 100644
--- a/recipes/tasks/task-proper-tools.bb
+++ b/recipes/tasks/task-proper-tools.bb
@@ -1,31 +1,36 @@
DESCRIPTION = "Full versions of tools provided by busybox"
-PR = "r9"
+PR = "r10"
inherit task
RDEPENDS_${PN} = "\
+ binutils-symlinks \
coreutils \
+ cpio \
+ debianutils \
+ diffutils \
+ e2fsprogs \
+ e2fsprogs-fsck \
+ fbset \
findutils \
- util-linux-ng \
- grep \
gawk \
- sed \
- wget \
- patch \
- tar \
- diffutils \
+ grep \
+ gzip \
+ iproute2 \
+ iputils \
less \
- vim \
- e2fsprogs \
- binutils-symlinks \
module-init-tools \
+ netcat \
net-tools \
- iproute2 \
- iputils \
+ patch \
+ procps \
psmisc \
- debianutils \
+ sed \
+ tar \
tcptraceroute \
- fbset \
+ util-linux-ng \
+ vim \
+ wget \
"
#
# binutils-symlinks provide ar in a way which conflict with busybox - #1465 for more info
diff --git a/recipes/tasks/task-qte-toolchain-host.bb b/recipes/tasks/task-qte-toolchain-host.bb
new file mode 100644
index 0000000000..02c95a3cdf
--- /dev/null
+++ b/recipes/tasks/task-qte-toolchain-host.bb
@@ -0,0 +1,7 @@
+require task-sdk-host.bb
+
+DESCRIPTION = "Host packages for Qt Embedded SDK"
+LICENSE = "MIT"
+ALLOW_EMPTY = "1"
+
+RDEPENDS_${PN} += "qt4-tools-sdk"
diff --git a/recipes/tasks/task-qte-toolchain-target.bb b/recipes/tasks/task-qte-toolchain-target.bb
new file mode 100644
index 0000000000..82fa5d81d5
--- /dev/null
+++ b/recipes/tasks/task-qte-toolchain-target.bb
@@ -0,0 +1,8 @@
+DESCRIPTION = "Target packages for Qt Embedded SDK"
+LICENSE = "MIT"
+ALLOW_EMPTY = "1"
+
+RDEPENDS_${PN} += " \
+ task-sdk-bare \
+ qt4-embedded \
+ qt4-embedded-dev"
diff --git a/recipes/tasks/task-sdk-extra.bb b/recipes/tasks/task-sdk-extra.bb
index c4414dbcf8..98234cea1c 100644
--- a/recipes/tasks/task-sdk-extra.bb
+++ b/recipes/tasks/task-sdk-extra.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "SDK packages"
-PR = "r8"
+PR = "r10"
LICENSE = "MIT"
ALLOW_EMPTY = "1"
@@ -25,17 +25,14 @@ RDEPENDS_task-sdk-x11-ext = "\
libxcursor-dev \
libxdmcp-dev \
libxft-dev \
- libxrandr-dev \
- libxrender-dev \
libxsettings-client-dev \
randrproto-dev \
libxau-dev \
- xcalibrateext-dev \
- libxcomposite-dev \
- libxdamage-dev \
- libxext-dev \
+ calibrateproto-dev \
+ compositeproto-dev \
+ damageproto-dev \
xextproto-dev \
- libxfont-dev \
+ fontsproto-dev \
libxpm-dev \
xproto-dev \
libxt-dev \
@@ -52,5 +49,5 @@ RDEPENDS_task-sdk-gpe = "\
libgpelaunch-dev \
libgpewidget-dev \
libhandoff-dev \
+ libxi-dev \
gconf-dbus-dev"
-
diff --git a/recipes/tcpdump/tcpdump_3.9.7.bb b/recipes/tcpdump/tcpdump_3.9.7.bb
index ba9710d86a..163d74f2ca 100644
--- a/recipes/tcpdump/tcpdump_3.9.7.bb
+++ b/recipes/tcpdump/tcpdump_3.9.7.bb
@@ -5,8 +5,10 @@ SECTION = "console/network"
PRIORITY = "optional"
DEPENDS = "libpcap"
-SRC_URI = "http://www.tcpdump.org/release/tcpdump-${PV}.tar.gz \
- file://tcpdump_configure_no_-O2.patch;patch=1"
+SRC_URI = " \
+ http://www.tcpdump.org/release/tcpdump-${PV}.tar.gz \
+ file://tcpdump_configure_no_-O2.patch;patch=1 \
+"
inherit autotools
@@ -15,6 +17,6 @@ EXTRA_OECONF = "--without-crypto"
do_configure() {
gnu-configize
oe_runconf
- sed -i 's:/usr/lib:${STAGING_LIBDIR}:' ./Makefile
- sed -i 's:/usr/include:${STAGING_INCDIR}:' ./Makefile
+ sed -i 's:/usr/lib:${STAGING_LIBDIR}:' ./Makefile
+ sed -i 's:/usr/include:${STAGING_INCDIR}:' ./Makefile
}
diff --git a/recipes/tcpdump/tcpdump_4.0.0.bb b/recipes/tcpdump/tcpdump_4.0.0.bb
index 537cb36aed..f36cc0aafa 100644
--- a/recipes/tcpdump/tcpdump_4.0.0.bb
+++ b/recipes/tcpdump/tcpdump_4.0.0.bb
@@ -4,12 +4,14 @@ LICENSE = "BSD"
SECTION = "console/network"
PRIORITY = "optional"
DEPENDS = "libpcap"
-PR = "r1"
+PR = "r2"
-SRC_URI = "http://www.tcpdump.org/release/tcpdump-${PV}.tar.gz \
- file://tcpdump_configure_no_-O2.patch;patch=1 \
- file://no-ipv6-tcpdump4.patch;patch=1 \
- file://0001-minimal-IEEE802.15.4-allowed.patch;patch=1"
+SRC_URI = " \
+ http://www.tcpdump.org/release/tcpdump-${PV}.tar.gz \
+ file://tcpdump_configure_no_-O2.patch;patch=1 \
+ file://no-ipv6-tcpdump4.patch;patch=1 \
+ file://0001-minimal-IEEE802.15.4-allowed.patch;patch=1 \
+"
inherit autotools
# ac_cv_linux_vers=${ac_cv_linux_vers=2}
@@ -18,8 +20,13 @@ EXTRA_OECONF = "--without-crypto"
do_configure() {
gnu-configize
- autoconf
+ autoconf
oe_runconf
- sed -i 's:/usr/lib:${STAGING_LIBDIR}:' ./Makefile
- sed -i 's:/usr/include:${STAGING_INCDIR}:' ./Makefile
+ sed -i 's:/usr/lib:${STAGING_LIBDIR}:' ./Makefile
+ sed -i 's:/usr/include:${STAGING_INCDIR}:' ./Makefile
+}
+
+do_install_append() {
+ # tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0
+ rm -f ${D}${sbindir}/tcpdump.${PV}
}
diff --git a/recipes/tftp-hpa/files/default b/recipes/tftp-hpa/files/default
new file mode 100644
index 0000000000..de2ed18202
--- /dev/null
+++ b/recipes/tftp-hpa/files/default
@@ -0,0 +1,3 @@
+#Defaults for tftpd-hpa
+RUN_DAEMON="yes"
+OPTIONS="-l -s /srv/tftpboot"
diff --git a/recipes/tftp-hpa/files/init b/recipes/tftp-hpa/files/init
new file mode 100644
index 0000000000..5ad8c52cb8
--- /dev/null
+++ b/recipes/tftp-hpa/files/init
@@ -0,0 +1,104 @@
+#! /bin/sh
+#
+# Author: Jaakko Niemi <liiwi@iki.fi>
+# Modified from skeleton file in sarge
+
+### BEGIN INIT INFO
+# Provides: tftp-hpa
+# Required-Start: $local_fs $remote_fs $syslog $network
+# Required-Stop: $local_fs $remote_fs $syslog $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 1
+# Short-Description: HPA's tftp client
+# Description: tftp server to allow booting clients which support
+# the PXE protocol.
+### END INIT INFO
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="HPA's tftpd"
+NAME=in.tftpd
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/tftpd-hpa
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+# Read config file if it is present.
+if [ -r /etc/default/tftpd-hpa ]
+then
+ . /etc/default/tftpd-hpa
+fi
+
+if [ "$RUN_DAEMON" != "yes" ] ; then
+ echo "tftpd-hpa disabled in /etc/default/tftpd-hpa"
+ exit 0
+fi
+
+#
+# Function that starts the daemon/service.
+#
+d_start() {
+ start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS
+}
+
+#
+# Function that stops the daemon/service.
+#
+d_stop() {
+ start-stop-daemon --stop --quiet --name $NAME
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service.
+#
+d_reload() {
+ start-stop-daemon --stop --quiet --name $NAME --signal 1
+}
+
+case "$1" in
+ start)
+ echo "Starting $DESC: $NAME"
+ d_start
+ echo "."
+ ;;
+ stop)
+ echo "Stopping $DESC: $NAME"
+ d_stop
+ echo "."
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its configuration without
+ # restarting (for example, when it is sent a SIGHUP),
+ # then implement that here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this an "exit 0".
+ #
+ # echo -n "Reloading $DESC configuration..."
+ # d_reload
+ # echo "done."
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ echo "Restarting $DESC: $NAME"
+ d_stop
+ sleep 1
+ d_start
+ echo "."
+ ;;
+ *)
+ # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/recipes/tftp-hpa/tftp-hpa_5.0.bb b/recipes/tftp-hpa/tftp-hpa_5.0.bb
new file mode 100644
index 0000000000..9533e01670
--- /dev/null
+++ b/recipes/tftp-hpa/tftp-hpa_5.0.bb
@@ -0,0 +1,72 @@
+DESCRIPTION = "HPA's tftp server"
+DEPENDS = "tcp-wrappers readline"
+SECTION = "network"
+LICENSE = "BSD"
+PR = "r1"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/software/network/tftp/tftp-hpa-${PV}.tar.bz2 \
+ file://default \
+ file://init"
+
+inherit autotools update-alternatives
+
+# configure.in has errors
+do_configure() {
+ oe_runconf
+}
+
+do_install() {
+ oe_runmake install INSTALLROOT=${D}
+
+ mv ${D}${bindir}/tftp ${D}${bindir}/tftp.${PN}
+
+ install -d ${D}${sysconfdir}/default
+ install -d ${D}${sysconfdir}/init.d
+
+ install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftp-hpa
+}
+
+
+INITSCRIPT_NAME = "${PN}"
+INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ."
+
+PACKAGES += "tftpd-hpa"
+
+FILES_${PN} = "${bindir}"
+FILES_tftpd-hpa = "${sbindir} ${sysconfdir}"
+CONFFILES_tftpd-hpa = "${sysconfdir}/default/tftpd-hpa"
+
+ALTERNATIVE_NAME = "tftp"
+ALTERNATIVE_LINK = "${bindir}/tftp"
+ALTERNATIVE_PATH = "${bindir}/tftp.${PN}"
+ALTERNATIVE_PRIORITY = "50"
+
+
+# This is taken from update-rc.d.bbclass which works only for $PN package
+# so I had to do that way
+
+postinst_tftpd-hpa() {
+if test "x$D" != "x"; then
+ OPT="-r $D"
+else
+ OPT="-s"
+fi
+update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
+}
+
+prerm_tftpd-hpa() {
+if test "x$D" = "x"; then
+ ${sysconfdir}/init.d/${INITSCRIPT_NAME} stop
+fi
+}
+
+postrm_tftpd-hpa() {
+if test "x$D" != "x"; then
+ OPT="-r $D"
+else
+ OPT=""
+fi
+update-rc.d $OPT ${INITSCRIPT_NAME} remove
+}
+
diff --git a/recipes/totem/totem-pl-parser_2.26.2.bb b/recipes/totem/totem-pl-parser_2.26.2.bb
new file mode 100644
index 0000000000..f9694b05d8
--- /dev/null
+++ b/recipes/totem/totem-pl-parser_2.26.2.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Playlist parser for Totem, a GTK2 based media player"
+HOMEPAGE = "http://www.gnome.org/projects/totem/"
+LICENSE = "GPL"
+
+DEPENDS = "eds-dbus"
+
+inherit gnome
+
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
+do_stage() {
+ autotools_stage_all
+}
+
+# Build of documentation is not yet possible:
+do_configure_prepend() {
+ sed -i -e s:docs::g ${S}/Makefile.am
+}
diff --git a/recipes/transmission/files/init b/recipes/transmission/files/init
index 415a662f9f..85945a76a0 100755
--- a/recipes/transmission/files/init
+++ b/recipes/transmission/files/init
@@ -11,12 +11,12 @@
# Exit if the package is not installed
test -f /usr/bin/transmission-daemon || exit 0
-
+SSDOPTIONS="--chuid transmission:transmission"
case "$1" in
start)
echo "Starting transmission-daemon"
- /sbin/start-stop-daemon --start --quiet --exec /usr/bin/transmission-daemon -- -w /home/transmission -g /home/transmission/.config
+ /sbin/start-stop-daemon $SSDOPTIONS --start --quiet --exec /usr/bin/transmission-daemon -- -w /home/transmission -g /home/transmission/.config
;;
stop)
echo "Stopping transmission-daemon"
@@ -31,7 +31,7 @@ case "$1" in
echo -n "."
done
echo "Restarting transmission-daemon"
- /sbin/start-stop-daemon --start --quiet --exec /usr/bin/transmission-daemon -- -w /home/transmission -g /home/transmission/.config
+ /sbin/start-stop-daemon $SSDOPTIONS --start --quiet --exec /usr/bin/transmission-daemon -- -w /home/transmission -g /home/transmission/.config
;;
*)
echo "Usage: /etc/init.d/tranmission {start|stop|restart}"
diff --git a/recipes/transmission/files/webupload.patch b/recipes/transmission/files/webupload.patch
new file mode 100644
index 0000000000..66d80a1dc6
--- /dev/null
+++ b/recipes/transmission/files/webupload.patch
@@ -0,0 +1,325 @@
+Patch is extracted from transmission svn to already applied upstream
+
+Index: libtransmission/rpc-server.c
+===================================================================
+--- libtransmission/rpc-server.c (revision 8399)
++++ libtransmission/rpc-server.c (revision 8400)
+@@ -32,6 +32,7 @@
+ #include "crypto.h"
+ #include "list.h"
+ #include "platform.h"
++#include "ptrarray.h"
+ #include "rpcimpl.h"
+ #include "rpc-server.h"
+ #include "trevent.h"
+@@ -83,6 +84,36 @@
+ } while( 0 )
+
+
++/***
++****
++***/
++
++static char*
++get_current_session_id( struct tr_rpc_server * server )
++{
++ const time_t now = time( NULL );
++
++ if( !server->sessionId || ( now >= server->sessionIdExpiresAt ) )
++ {
++ int i;
++ const int n = 48;
++ const char * pool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
++ const size_t pool_size = strlen( pool );
++ char * buf = tr_new( char, n+1 );
++
++ for( i=0; i<n; ++i )
++ buf[i] = pool[ tr_cryptoRandInt( pool_size ) ];
++ buf[n] = '\0';
++
++ tr_free( server->sessionId );
++ server->sessionId = buf;
++ server->sessionIdExpiresAt = now + (60*60); /* expire in an hour */
++ }
++
++ return server->sessionId;
++}
++
++
+ /**
+ ***
+ **/
+@@ -104,10 +135,8 @@
+ }
+
+ static const char*
+-tr_memmem( const char * s1,
+- size_t l1,
+- const char * s2,
+- size_t l2 )
++tr_memmem( const char * s1, size_t l1, /* haystack */
++ const char * s2, size_t l2 ) /* needle */
+ {
+ if( !l2 ) return s1;
+ while( l1 >= l2 )
+@@ -121,7 +150,68 @@
+ return NULL;
+ }
+
++struct tr_mimepart
++{
++ char * headers;
++ int headers_len;
++ char * body;
++ int body_len;
++};
++
+ static void
++tr_mimepart_free( struct tr_mimepart * p )
++{
++ tr_free( p->body );
++ tr_free( p->headers );
++ tr_free( p );
++}
++
++static void
++extract_parts_from_multipart( const struct evkeyvalq * headers,
++ const struct evbuffer * body,
++ tr_ptrArray * setme_parts )
++{
++ const char * content_type = evhttp_find_header( headers, "Content-Type" );
++ const char * in = (const char*) EVBUFFER_DATA( body );
++ size_t inlen = EVBUFFER_LENGTH( body );
++
++ const char * boundary_key = "boundary=";
++ const char * boundary_key_begin = strstr( content_type, boundary_key );
++ const char * boundary_val = boundary_key_begin ? boundary_key_begin + strlen( boundary_key ) : "arglebargle";
++ char * boundary = tr_strdup_printf( "--%s", boundary_val );
++ const size_t boundary_len = strlen( boundary );
++
++ const char * delim = tr_memmem( in, inlen, boundary, boundary_len );
++ while( delim )
++ {
++ size_t part_len;
++ const char * part = delim + boundary_len;
++
++ inlen -= ( part - in );
++ in = part;
++
++ delim = tr_memmem( in, inlen, boundary, boundary_len );
++ part_len = delim ? (size_t)( delim - part ) : inlen;
++
++ if( part_len )
++ {
++ const char * rnrn = tr_memmem( part, part_len, "\r\n\r\n", 4 );
++ if( rnrn )
++ {
++ struct tr_mimepart * p = tr_new( struct tr_mimepart, 1 );
++ p->headers_len = rnrn - part;
++ p->headers = tr_strndup( part, p->headers_len );
++ p->body_len = (part+part_len) - (rnrn + 4);
++ p->body = tr_strndup( rnrn+4, p->body_len );
++ tr_ptrArrayAppend( setme_parts, p );
++ }
++ }
++ }
++
++ tr_free( boundary );
++}
++
++static void
+ handle_upload( struct evhttp_request * req,
+ struct tr_rpc_server * server )
+ {
+@@ -131,76 +221,67 @@
+ }
+ else
+ {
+- const char * content_type = evhttp_find_header( req->input_headers,
+- "Content-Type" );
++ int i;
++ int n;
++ tr_bool hasSessionId = FALSE;
++ tr_ptrArray parts = TR_PTR_ARRAY_INIT;
+
+ const char * query = strchr( req->uri, '?' );
+- const int paused = query && strstr( query + 1, "paused=true" );
++ const tr_bool paused = query && strstr( query + 1, "paused=true" );
+
+- const char * in = (const char *) EVBUFFER_DATA( req->input_buffer );
+- size_t inlen = EVBUFFER_LENGTH( req->input_buffer );
++ extract_parts_from_multipart( req->input_headers, req->input_buffer, &parts );
++ n = tr_ptrArraySize( &parts );
+
+- const char * boundary_key = "boundary=";
+- const char * boundary_key_begin = strstr( content_type,
+- boundary_key );
+- const char * boundary_val =
+- boundary_key_begin ? boundary_key_begin +
+- strlen( boundary_key ) : "arglebargle";
++ /* first look for the session id */
++ for( i=0; i<n; ++i ) {
++ struct tr_mimepart * p = tr_ptrArrayNth( &parts, i );
++ if( tr_memmem( p->headers, p->headers_len, TR_RPC_SESSION_ID_HEADER, strlen( TR_RPC_SESSION_ID_HEADER ) ) )
++ break;
++ }
++ if( i<n ) {
++ const struct tr_mimepart * p = tr_ptrArrayNth( &parts, i );
++ const char * ours = get_current_session_id( server );
++ const int ourlen = strlen( ours );
++ hasSessionId = ourlen<=p->body_len && !memcmp( p->body, ours, ourlen );
++ }
+
+- char * boundary = tr_strdup_printf( "--%s", boundary_val );
+- const size_t boundary_len = strlen( boundary );
+-
+- const char * delim = tr_memmem( in, inlen, boundary, boundary_len );
+- while( delim )
++ if( !hasSessionId )
+ {
+- size_t part_len;
+- const char * part = delim + boundary_len;
+- inlen -= ( part - in );
+- in = part;
+- delim = tr_memmem( in, inlen, boundary, boundary_len );
+- part_len = delim ? (size_t)( delim - part ) : inlen;
+-
+- if( part_len )
++ send_simple_response( req, 409, NULL );
++ }
++ else for( i=0; i<n; ++i )
++ {
++ struct tr_mimepart * p = tr_ptrArrayNth( &parts, i );
++ if( strstr( p->headers, "filename=\"" ) )
+ {
+- char * text = tr_strndup( part, part_len );
+- if( strstr( text, "filename=\"" ) )
+- {
+- const char * body = strstr( text, "\r\n\r\n" );
+- if( body )
+- {
+- char * b64;
+- size_t body_len;
+- tr_benc top, *args;
+- struct evbuffer * json = tr_getBuffer( );
++ char * b64;
++ int body_len = p->body_len;
++ tr_benc top, *args;
++ const char * body = p->body;
++ struct evbuffer * json = evbuffer_new( );
+
+- body += 4; /* walk past the \r\n\r\n */
+- body_len = part_len - ( body - text );
+- if( body_len >= 2
+- && !memcmp( &body[body_len - 2], "\r\n", 2 ) )
+- body_len -= 2;
++ if( body_len >= 2 && !memcmp( &body[body_len - 2], "\r\n", 2 ) )
++ body_len -= 2;
+
+- tr_bencInitDict( &top, 2 );
+- args = tr_bencDictAddDict( &top, "arguments", 2 );
+- tr_bencDictAddStr( &top, "method", "torrent-add" );
+- b64 = tr_base64_encode( body, body_len, NULL );
+- tr_bencDictAddStr( args, "metainfo", b64 );
+- tr_bencDictAddBool( args, "paused", paused );
+- tr_bencSaveAsJSON( &top, json );
+- tr_rpc_request_exec_json( server->session,
+- EVBUFFER_DATA( json ),
+- EVBUFFER_LENGTH( json ),
+- NULL, NULL );
++ tr_bencInitDict( &top, 2 );
++ args = tr_bencDictAddDict( &top, "arguments", 2 );
++ tr_bencDictAddStr( &top, "method", "torrent-add" );
++ b64 = tr_base64_encode( body, body_len, NULL );
++ tr_bencDictAddStr( args, "metainfo", b64 );
++ tr_bencDictAddBool( args, "paused", paused );
++ tr_bencSaveAsJSON( &top, json );
++ tr_rpc_request_exec_json( server->session,
++ EVBUFFER_DATA( json ),
++ EVBUFFER_LENGTH( json ),
++ NULL, NULL );
+
+- tr_releaseBuffer( json );
+- tr_free( b64 );
+- tr_bencFree( &top );
+- }
+- }
+- tr_free( text );
++ evbuffer_free( json );
++ tr_free( b64 );
++ tr_bencFree( &top );
+ }
+ }
+
+- tr_free( boundary );
++ tr_ptrArrayDestruct( &parts, (PtrArrayForeachFunc)tr_mimepart_free );
+
+ /* use xml here because json responses to file uploads is trouble.
+ * see http://www.malsup.com/jquery/form/#sample7 for details */
+@@ -473,32 +554,6 @@
+ return FALSE;
+ }
+
+-static char*
+-get_current_session_id( struct tr_rpc_server * server )
+-{
+- const time_t now = time( NULL );
+-
+- if( !server->sessionId || ( now >= server->sessionIdExpiresAt ) )
+- {
+- int i;
+- const int n = 48;
+- const char * pool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+- const size_t pool_size = strlen( pool );
+- char * buf = tr_new( char, n+1 );
+-
+- for( i=0; i<n; ++i )
+- buf[i] = pool[ tr_cryptoRandInt( pool_size ) ];
+- buf[n] = '\0';
+-
+- tr_free( server->sessionId );
+- server->sessionId = buf;
+- server->sessionIdExpiresAt = now + (60*60); /* expire in an hour */
+- }
+-
+- return server->sessionId;
+-}
+-
+-
+ static tr_bool
+ test_session_id( struct tr_rpc_server * server, struct evhttp_request * req )
+ {
+@@ -567,6 +622,10 @@
+ {
+ handle_clutch( req, server );
+ }
++ else if( !strncmp( req->uri, "/transmission/upload", 20 ) )
++ {
++ handle_upload( req, server );
++ }
+ #ifdef REQUIRE_SESSION_ID
+ else if( !test_session_id( server, req ) )
+ {
+@@ -593,10 +652,6 @@
+ {
+ handle_rpc( req, server );
+ }
+- else if( !strncmp( req->uri, "/transmission/upload", 20 ) )
+- {
+- handle_upload( req, server );
+- }
+ else
+ {
+ send_simple_response( req, HTTP_NOTFOUND, req->uri );
+Index: web/javascript/transmission.js
+===================================================================
+--- web/javascript/transmission.js (revision 8399)
++++ web/javascript/transmission.js (revision 8400)
+@@ -1247,6 +1247,7 @@
+ } else {
+ args.url = '/transmission/upload?paused=' + (this[Prefs._AutoStart] ? 'false' : 'true');
+ args.type = 'POST';
++ args.data = { 'X-Transmission-Session-Id' : tr.remote._token };
+ args.dataType = 'xml';
+ args.iframe = true;
+ args.success = function( data ) {
diff --git a/recipes/transmission/transmission_1.40.bb b/recipes/transmission/transmission_1.40.bb
index 52438efa4e..c40939fd3b 100644
--- a/recipes/transmission/transmission_1.40.bb
+++ b/recipes/transmission/transmission_1.40.bb
@@ -3,7 +3,7 @@ SECTION = "network"
HOMEPAGE = "www.transmissionbt.com/"
DEPENDS = "openssl gettext libtool intltool-native curl glib-2.0-native"
LICENSE = "GPLv2"
-PR = "r0"
+PR = "r2"
SRC_URI = "http://mirrors.m0k.org/transmission/files/transmission-${PV}.tar.bz2 \
file://init"
@@ -17,15 +17,16 @@ do_install_append() {
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/transmission
}
-pkg_postinst_append() {
-#!/bin/sh
-
-if [ "x$D" != "x" ] ; then
- exit 1
-fi
-
+# No need for online check, since update-rc.d will prepend it to here
+pkg_postinst_${PN}() {
grep -q transmission ${sysconfdir}/group || addgroup transmission
grep -q transmission ${sysconfdir}/passwd || adduser -h /home/transmission -S -D -G transmission -s ${base_bindir}/false transmission
mkdir -p /home/transmission/.config
chown transmission:transmission /home/transmission/.config
}
+
+pkg_postrm_${PN}() {
+delgroup transmission
+deluser transmission
+}
+
diff --git a/recipes/transmission/transmission_1.61.bb b/recipes/transmission/transmission_1.61.bb
new file mode 100644
index 0000000000..dd2b3a4dad
--- /dev/null
+++ b/recipes/transmission/transmission_1.61.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "Transmission is a BitTorrent client w/ a built-in Ajax-Powered Webif GUI."
+SECTION = "network"
+HOMEPAGE = "www.transmissionbt.com/"
+DEPENDS = "gtk+ gnutls openssl gettext libtool intltool-native curl glib-2.0-native"
+LICENSE = "GPLv2"
+PR = "r5"
+SRC_URI = "http://mirrors.m0k.org/transmission/files/transmission-${PV}.tar.bz2 \
+ file://webupload.patch;patch=1;pnum=0 \
+ file://init"
+
+INITSCRIPT_NAME = "transmission"
+INITSCRIPT_PARAMS = "defaults 60 "
+
+inherit autotools update-rc.d
+
+do_install_append() {
+ install -d -p ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/transmission
+}
+
+FILES_${PN} += "${datadir}/icons"
+
+# No need for online check, since update-rc.d will prepend it to here
+pkg_postinst_${PN}() {
+grep -q transmission ${sysconfdir}/group || addgroup transmission
+grep -q transmission ${sysconfdir}/passwd || adduser -h /home/transmission -S -D -G transmission -s ${base_bindir}/false transmission
+mkdir -p /home/transmission/.config
+chown transmission:transmission /home/transmission/.config
+}
+
+pkg_postrm_${PN}() {
+delgroup transmission
+deluser transmission
+}
+
diff --git a/recipes/tslib/tslib.inc b/recipes/tslib/tslib.inc
index 14576166a3..e10351b817 100644
--- a/recipes/tslib/tslib.inc
+++ b/recipes/tslib/tslib.inc
@@ -3,6 +3,7 @@ HOMEPAGE = "http://tslib.berlios.de/"
AUTHOR = "Russell King w/ plugins by Chris Larson et. al."
SECTION = "base"
LICENSE = "LGPL"
+INC_PR = "r22"
SRC_URI += "\
file://ts.conf \
@@ -69,7 +70,7 @@ DEBIAN_NOAUTONAME_tslib-calibrate = "1"
RDEPENDS_${PN} = "tslib-conf"
# Ship calibration data if it exists
-RRECOMMENDS_angstrom = " pointercal "
+RRECOMMENDS = " pointercal "
FILES_${PN}-dbg += "${libdir}/ts/.debug*"
FILES_tslib-conf = "${sysconfdir}/ts.conf ${sysconfdir}/profile.d/tslib.sh ${datadir}/tslib"
diff --git a/recipes/tslib/tslib_1.0.bb b/recipes/tslib/tslib_1.0.bb
index 8b3c35a9f7..c22256f4d2 100644
--- a/recipes/tslib/tslib_1.0.bb
+++ b/recipes/tslib/tslib_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "http://download.berlios.de/tslib/${BP}.tar.bz2 \
file://fix_version.patch;patch=1"
-PR = "r20"
+PR = "${INC_PR}.1"
include tslib.inc
diff --git a/recipes/tslib/tslib_svn.bb b/recipes/tslib/tslib_svn.bb
index ff4446ba7c..e65f715110 100644
--- a/recipes/tslib/tslib_svn.bb
+++ b/recipes/tslib/tslib_svn.bb
@@ -1,6 +1,8 @@
SRC_URI = "svn://svn.berlios.de/tslib/trunk;module=tslib"
S = "${WORKDIR}/tslib"
PV = "1.0+svnr${SRCREV}"
+PR = "${INC_PR}.1"
+
DEFAULT_PREFERENCE = "-1"
include tslib.inc
diff --git a/recipes/ttf-fonts/ttf-arphic-uming_20080216.bb b/recipes/ttf-fonts/ttf-arphic-uming_20080216.bb
index 172dba2db2..68e23cc2fa 100644
--- a/recipes/ttf-fonts/ttf-arphic-uming_20080216.bb
+++ b/recipes/ttf-fonts/ttf-arphic-uming_20080216.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Unicode Mingti (printed) TrueType Font"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/CJKUnifonts"
LICENSE = "${PN}"
SRC_DISTRIBUTE_LICENSES += "${PN}"
-RPROVIDES = "virtual/chinese-font"
+RPROVIDES = "virtual-chinese-font"
PR = "r1"
SRC_URI = \
diff --git a/recipes/ttf-fonts/ttf-sazanami_20040629.bb b/recipes/ttf-fonts/ttf-sazanami_20040629.bb
index 852966ac58..97fe0c6c94 100644
--- a/recipes/ttf-fonts/ttf-sazanami_20040629.bb
+++ b/recipes/ttf-fonts/ttf-sazanami_20040629.bb
@@ -7,7 +7,7 @@ AUTHOR = "Electronic Font Open Laboratory (/efont/)"
HOMEPAGE = "http://sourceforge.jp/projects/efont/"
LICENSE = "${PN}"
SRC_DISTRIBUTE_LICENSES += "${PN}"
-RPROVIDES = "virtual/japanese-font"
+RPROVIDES = "virtual-japanese-font"
PR = "r4"
SRC_URI = "http://download.sourceforge.jp/efont/10087/sazanami-20040629.tar.bz2"
diff --git a/recipes/tzdata/tzdata_2007k.bb b/recipes/tzdata/tzdata_2007k.bb
index b1d7d39e55..ed47039d74 100644
--- a/recipes/tzdata/tzdata_2007k.bb
+++ b/recipes/tzdata/tzdata_2007k.bb
@@ -24,24 +24,25 @@ TZONES= "africa antarctica asia australasia europe northamerica southamerica \
CONFFILES_${PN} = "${sysconfdir}/timezone ${sysconfdir}/localtime"
do_compile () {
+ mkdir -p build
for zone in ${TZONES}; do \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}/build${datadir}/zoneinfo -L /dev/null \
-y ${S}/yearistype.sh ${S}/${zone} ; \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}}/build${datadir}/zoneinfo/posix -L /dev/null \
-y ${S}/yearistype.sh ${S}/${zone} ; \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}}/build${datadir}/zoneinfo/right -L ${S}/leapseconds \
-y ${S}/yearistype.sh ${S}/${zone} ; \
done
}
do_install () {
- install -d ${D}/usr ${D}${datadir}/zoneinfo
- cp -pPR ${S}/usr ${D}/
+ install -d ${D}${prefix} ${D}${datadir}/zoneinfo
+ cp -pPR ${WORKDIR}/build${prefix}/* ${D}${prefix}
# Install a sane default for timezones
install -d ${D}${sysconfdir}
echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
- cp -pPR ${S}/usr/share/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
+ cp -pPR ${WORKDIR}/build${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
}
# Packages primarily organized by directory with a major city
diff --git a/recipes/u-boot/u-boot-git/leopardboard-support.patch b/recipes/u-boot/u-boot-git/leopardboard-support.patch
new file mode 100644
index 0000000000..fced0c10ea
--- /dev/null
+++ b/recipes/u-boot/u-boot-git/leopardboard-support.patch
@@ -0,0 +1,365 @@
+From: s-paulraj at ti.com (s-paulraj at ti.com)
+Date: Wed, 13 May 2009 10:32:40 -0400
+Subject: [U-Boot] [PATCH] ARM DaVinci Leopard Board Support
+Message-ID: <1242225160-26706-1-git-send-email-s-paulraj@ti.com>
+
+The patch applies to arm/next. It was tested on a leopard board.
+After testing had to change the MACH TYPE as this board is not present
+in the list of mach types at the moment. So the patch itself is going
+to give a compilation failure.
+
+Further details on this board can be found at www.leopardboard.org
+
+This patch does not do the NAND initialization yet. Will send an update
+to this patch after David Brownell's NAND updates get merged
+
+Jean-Christophe can you please do a new sync for this board
+
+Signed-off-by: Sandeep Paulraj <s-paulraj at ti.com>
+---
+ Makefile | 3 +
+ board/davinci/leopard/Makefile | 52 +++++++++++++++
+ board/davinci/leopard/config.mk | 11 +++
+ board/davinci/leopard/leopard.c | 36 ++++++++++
+ include/configs/davinci_leopard.h | 130 +++++++++++++++++++++++++++++++++++++
+ 5 files changed, 232 insertions(+), 0 deletions(-)
+ create mode 100644 board/davinci/leopard/Makefile
+ create mode 100644 board/davinci/leopard/config.mk
+ create mode 100644 board/davinci/leopard/leopard.c
+ create mode 100644 include/configs/davinci_leopard.h
+
+diff --git a/Makefile b/Makefile
+index b7d5bd9..5fb126a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2793,6 +2793,9 @@ davinci_sonata_config : unconfig
+ davinci_dm355evm_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm926ejs dm355evm davinci davinci
+
++davinci_leopard_config : unconfig
++ @$(MKCONFIG) $(@:_config=) arm arm926ejs leopard davinci davinci
++
+ lpd7a400_config \
+ lpd7a404_config: unconfig
+ @$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
+diff --git a/board/davinci/leopard/Makefile b/board/davinci/leopard/Makefile
+new file mode 100644
+index 0000000..26b0705
+--- /dev/null
++++ b/board/davinci/leopard/Makefile
+@@ -0,0 +1,52 @@
++#
++# (C) Copyright 2000, 2001, 2002
++# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
++#
++# Copyright (C) 2007 Sergey Kubushyn <ksi at koi8.net>
++#
++# 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 = $(obj)lib$(BOARD).a
++
++COBJS := $(BOARD).o
++SOBJS :=
++
++SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
++OBJS := $(addprefix $(obj),$(COBJS))
++SOBJS := $(addprefix $(obj),$(SOBJS))
++
++$(LIB): $(obj).depend $(OBJS) $(SOBJS)
++ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
++
++clean:
++ rm -f $(SOBJS) $(OBJS)
++
++distclean: clean
++ rm -f $(LIB) core *.bak $(obj).depend
++
++#########################################################################
++# This is for $(obj).depend target
++include $(SRCTREE)/rules.mk
++
++sinclude $(obj).depend
++
++#########################################################################
+diff --git a/board/davinci/leopard/config.mk b/board/davinci/leopard/config.mk
+new file mode 100644
+index 0000000..c4e6e07
+--- /dev/null
++++ b/board/davinci/leopard/config.mk
+@@ -0,0 +1,11 @@
++#
++# Spectrum Digital DM355 EVM board
++# dm355evm board has 1 bank of 128 MB DDR RAM
++# Physical Address: 8000'0000 to 8800'0000
++#
++# Linux Kernel is expected to be at 8000'8000, entry 8000'8000
++# (mem base + reserved)
++#
++
++#Provide at least 16MB spacing between us and the Linux Kernel image
++TEXT_BASE = 0x81080000
+diff --git a/board/davinci/leopard/leopard.c b/board/davinci/leopard/leopard.c
+new file mode 100644
+index 0000000..282368d
+--- /dev/null
++++ b/board/davinci/leopard/leopard.c
+@@ -0,0 +1,36 @@
++/*
++ * Copyright (C) 2009 Texas Instruments
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++#include <common.h>
++#include <nand.h>
++#include <asm/io.h>
++#include <asm/arch/hardware.h>
++#include <asm/arch/emif_defs.h>
++#include <asm/arch/nand_defs.h>
++#include "../common/misc.h"
++
++
++DECLARE_GLOBAL_DATA_PTR;
++
++int board_init(void)
++{
++ gd->bd->bi_arch_number = MACH_TYPE_DM355_LEOPARD;
++ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
++
++ return 0;
++}
+diff --git a/include/configs/davinci_leopard.h b/include/configs/davinci_leopard.h
+new file mode 100644
+index 0000000..87160f1
+--- /dev/null
++++ b/include/configs/davinci_leopard.h
+@@ -0,0 +1,130 @@
++/*
++ * Copyright (C) 2009 Texas Instruments
++ *
++ * 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>
++
++
++#define DAVINCI_LEOPARD
++
++#define CONFIG_SKIP_LOWLEVEL_INIT
++#define CONFIG_SKIP_RELOCATE_UBOOT
++#define CONFIG_SYS_NO_FLASH /* no *NOR* flash */
++#define CONFIG_SYS_CONSOLE_INFO_QUIET
++#define CONFIG_DISPLAY_CPUINFO
++
++/* SoC Configuration */
++#define CONFIG_ARM926EJS /* arm926ejs CPU */
++#define CONFIG_SYS_TIMERBASE 0x01c21400 /* use timer 0 */
++#define CONFIG_SYS_HZ_CLOCK 24000000 /* TIMER 0 */
++#define CONFIG_SYS_HZ 1000
++#define CONFIG_SOC_DM355
++
++/* Memory Info */
++#define CONFIG_NR_DRAM_BANKS 1
++#define PHYS_SDRAM_1 0x80000000
++#define PHYS_SDRAM_1_SIZE SZ_128M
++
++/* Serial Driver info: UART0 for console */
++#define CONFIG_SYS_NS16550
++#define CONFIG_SYS_NS16550_SERIAL
++#define CONFIG_SYS_NS16550_REG_SIZE -4
++#define CONFIG_SYS_NS16550_COM1 0x01c20000
++#define CONFIG_SYS_NS16550_CLK CONFIG_SYS_HZ_CLOCK
++#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
++#define CONFIG_CONS_INDEX 1
++#define CONFIG_BAUDRATE 115200
++
++/* Ethernet: external DM9000 just like DM355 EVM */
++#define CONFIG_DRIVER_DM9000 1
++#define CONFIG_DM9000_BASE 0x04000000
++#define DM9000_IO CONFIG_DM9000_BASE
++#define DM9000_DATA (CONFIG_DM9000_BASE + 16)
++
++/* I2C */
++#define CONFIG_HARD_I2C
++#define CONFIG_DRIVER_DAVINCI_I2C
++#define CONFIG_SYS_I2C_SPEED 400000
++#define CONFIG_SYS_I2C_SLAVE 0x10
++
++/* NYET -- #define CONFIG_NAND_DAVINCI */
++#define CONFIG_SYS_NAND_HW_ECC
++#define CONFIG_SYS_NAND_USE_FLASH_BBT
++
++#define CONFIG_SYS_NAND_SMALLPAGE
++#define CONFIG_SYS_NAND_BASE_LIST { 0x02000000, }
++#define CONFIG_SYS_MAX_NAND_DEVICE 1
++#define CONFIG_SYS_NAND_MAX_CHIPS 1
++
++/* U-Boot command configuration */
++#include <config_cmd_default.h>
++
++#undef CONFIG_CMD_BDI
++#undef CONFIG_CMD_FLASH
++#undef CONFIG_CMD_FPGA
++#undef CONFIG_CMD_SETGETDCR
++#define CONFIG_CMD_ASKENV
++#define CONFIG_CMD_DHCP
++#define CONFIG_CMD_I2C
++#define CONFIG_CMD_PING
++#define CONFIG_CMD_SAVES
++
++/* TEMPORARY -- no safe place to save env, yet */
++#define CONFIG_ENV_IS_NOWHERE
++#undef CONFIG_CMD_SAVEENV
++
++#define CONFIG_CRC32_VERIFY
++#define CONFIG_MX_CYCLIC
++
++/* U-Boot general configuration */
++#undef CONFIG_USE_IRQ /* No IRQ/FIQ in U-Boot */
++#define CONFIG_BOOTFILE "uImage" /* Boot file name */
++#define CONFIG_SYS_PROMPT "LEOPARD EVM # "
++#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
++#define CONFIG_SYS_PBSIZE /* Print buffer size */ \
++ (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
++#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
++#define CONFIG_SYS_HUSH_PARSER
++#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
++#define CONFIG_SYS_LONGHELP
++
++#define CONFIG_ENV_SIZE SZ_16K
++
++#define CONFIG_BOOTDELAY 3
++#define CONFIG_CMDLINE_EDITING
++#define CONFIG_VERSION_VARIABLE
++#define CONFIG_TIMESTAMP
++
++#define CONFIG_NET_RETRY_COUNT 10
++
++/* U-Boot memory configuration */
++#define CONFIG_STACKSIZE SZ_256K /* regular stack */
++#define CONFIG_SYS_MALLOC_LEN SZ_512K /* malloc() arena */
++#define CONFIG_SYS_GBL_DATA_SIZE 128 /* for initial data */
++#define CONFIG_SYS_MEMTEST_START 0x87000000 /* physical address */
++#define CONFIG_SYS_MEMTEST_END 0x88000000 /* test 16MB RAM */
++
++/* Linux interfacing */
++#define CONFIG_CMDLINE_TAG
++#define CONFIG_SETUP_MEMORY_TAGS
++#define CONFIG_SYS_BARGSIZE 1024 /* bootarg Size */
++#define CONFIG_SYS_LOAD_ADDR 0x80700000 /* kernel address */
++
++#endif /* __CONFIG_H */
+--- /tmp/mach-types.h 2009-05-19 15:48:59.000000000 +0200
++++ git/include/asm-arm/mach-types.h 2009-05-19 15:51:03.000000000 +0200
+@@ -2120,6 +2120,10 @@
+ #define MACH_TYPE_FMZWEBMODUL 2134
+ #define MACH_TYPE_RD78X00_MASA 2135
+ #define MACH_TYPE_SMALLOGGER 2136
++#define MACH_TYPE_CCW9P9215 2137
++#define MACH_TYPE_DM355_LEOPARD 2138
++#define MACH_TYPE_TS219 2139
++#define MACH_TYPE_TNY_A9263 2140
+
+ #ifdef CONFIG_ARCH_EBSA110
+ # ifdef machine_arch_type
+@@ -27417,6 +27421,54 @@
+ # define machine_is_smallogger() (0)
+ #endif
+
++#ifdef CONFIG_MACH_CCW9P9215
++# ifdef machine_arch_type
++# undef machine_arch_type
++# define machine_arch_type __machine_arch_type
++# else
++# define machine_arch_type MACH_TYPE_CCW9P9215
++# endif
++# define machine_is_ccw9p9215() (machine_arch_type == MACH_TYPE_CCW9P9215)
++#else
++# define machine_is_ccw9p9215() (0)
++#endif
++
++#ifdef CONFIG_MACH_DM355_LEOPARD
++# ifdef machine_arch_type
++# undef machine_arch_type
++# define machine_arch_type __machine_arch_type
++# else
++# define machine_arch_type MACH_TYPE_DM355_LEOPARD
++# endif
++# define machine_is_dm355_leopard() (machine_arch_type == MACH_TYPE_DM355_LEOPARD)
++#else
++# define machine_is_dm355_leopard() (0)
++#endif
++
++#ifdef CONFIG_MACH_TS219
++# ifdef machine_arch_type
++# undef machine_arch_type
++# define machine_arch_type __machine_arch_type
++# else
++# define machine_arch_type MACH_TYPE_TS219
++# endif
++# define machine_is_ts219() (machine_arch_type == MACH_TYPE_TS219)
++#else
++# define machine_is_ts219() (0)
++#endif
++
++#ifdef CONFIG_MACH_TNY_A9263
++# ifdef machine_arch_type
++# undef machine_arch_type
++# define machine_arch_type __machine_arch_type
++# else
++# define machine_arch_type MACH_TYPE_TNY_A9263
++# endif
++# define machine_is_tny_a9263() (machine_arch_type == MACH_TYPE_TNY_A9263)
++#else
++# define machine_is_tny_a9263() (0)
++#endif
++
+ /*
+ * These have not yet been registered
+ */
diff --git a/recipes/u-boot/u-boot-omap2430sdp_1.1.4.bb b/recipes/u-boot/u-boot-omap2430sdp_1.1.4.bb
index af0d0a14a7..d7b23e119b 100644
--- a/recipes/u-boot/u-boot-omap2430sdp_1.1.4.bb
+++ b/recipes/u-boot/u-boot-omap2430sdp_1.1.4.bb
@@ -8,6 +8,5 @@ SRC_URI = "http://linux.omap.com/pub/bootloader/2430sdp/source/u-boot-SEP1106.ta
S = "${WORKDIR}/u-boot"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
#inherit base
diff --git a/recipes/u-boot/u-boot-omap3_git.bb b/recipes/u-boot/u-boot-omap3_git.bb
index 714ca0b0f1..b8f95f5744 100644
--- a/recipes/u-boot/u-boot-omap3_git.bb
+++ b/recipes/u-boot/u-boot-omap3_git.bb
@@ -17,4 +17,3 @@ UBOOT_MACHINE_overo = "omap3_overo_config"
S = "${WORKDIR}/git"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes/u-boot/u-boot-omap3beagleboard_1.1.4.bb b/recipes/u-boot/u-boot-omap3beagleboard_1.1.4.bb
index f29292feb8..9817f0c4e1 100644
--- a/recipes/u-boot/u-boot-omap3beagleboard_1.1.4.bb
+++ b/recipes/u-boot/u-boot-omap3beagleboard_1.1.4.bb
@@ -12,5 +12,4 @@ SRC_URI = "http://www.sakoman.net/omap3/u-boot.tar.gz \
S = "${WORKDIR}/u-boot"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes/u-boot/u-boot.inc b/recipes/u-boot/u-boot.inc
index d3160367d7..294b4446c4 100644
--- a/recipes/u-boot/u-boot.inc
+++ b/recipes/u-boot/u-boot.inc
@@ -5,6 +5,7 @@ PRIORITY = "optional"
LICENSE = "GPL"
PROVIDES = "virtual/bootloader"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
PARALLEL_MAKE=""
EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
diff --git a/recipes/u-boot/u-boot_1.1.6.bb b/recipes/u-boot/u-boot_1.1.6.bb
index e003c69d7b..b8729d2179 100644
--- a/recipes/u-boot/u-boot_1.1.6.bb
+++ b/recipes/u-boot/u-boot_1.1.6.bb
@@ -20,6 +20,5 @@ SRC_URI_append_mpc8323e-rdb = " file://u-boot-1.1.6-fsl-1-mpc83xx-20061206.patc
-PACKAGE_ARCH = "${MACHINE_ARCH}"
UBOOT_MACHINE_sarge-at91 = "sarge_config"
diff --git a/recipes/u-boot/u-boot_1.2.0.bb b/recipes/u-boot/u-boot_1.2.0.bb
index edcb1b1415..f7e7446197 100644
--- a/recipes/u-boot/u-boot_1.2.0.bb
+++ b/recipes/u-boot/u-boot_1.2.0.bb
@@ -41,4 +41,3 @@ http://www.bitshrine.org/gpp/u-boot-1.2.0-mpc8315erdb-improve-ddr-performance.pa
http://www.bitshrine.org/gpp/u-boot-1.2.0-mpc8315erdb-fix-PCI-IO-base.patch;patch=1 \
"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes/u-boot/u-boot_1.3.0.bb b/recipes/u-boot/u-boot_1.3.0.bb
index 2886ddecc8..a0656baea6 100644
--- a/recipes/u-boot/u-boot_1.3.0.bb
+++ b/recipes/u-boot/u-boot_1.3.0.bb
@@ -4,4 +4,3 @@ DEFAULT_PREFERENCE = "-1"
SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes/u-boot/u-boot_1.3.1.bb b/recipes/u-boot/u-boot_1.3.1.bb
index 5c32b9a156..39a7b30771 100644
--- a/recipes/u-boot/u-boot_1.3.1.bb
+++ b/recipes/u-boot/u-boot_1.3.1.bb
@@ -9,4 +9,3 @@ SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
file://mpc8313e-rdb-mtdparts.patch;patch=1 \
file://mpc8313e-rdb-nand.patch;patch=1"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes/u-boot/u-boot_1.3.2.bb b/recipes/u-boot/u-boot_1.3.2.bb
index 59ebaecabd..d52ca1efb7 100644
--- a/recipes/u-boot/u-boot_1.3.2.bb
+++ b/recipes/u-boot/u-boot_1.3.2.bb
@@ -39,7 +39,6 @@ SRC_URI_append_boc01 = "\
file://016-090209-PM.patch;patch=1 \
"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
do_deploy_append_mpc8313e-rdb () {
install ${S}/examples/vsc7385_load/vsc7385_load.bin ${DEPLOY_DIR_IMAGE}/vsc7385_load.bin
diff --git a/recipes/u-boot/u-boot_2009.01.bb b/recipes/u-boot/u-boot_2009.01.bb
index e0839c923e..dfb3b3a767 100644
--- a/recipes/u-boot/u-boot_2009.01.bb
+++ b/recipes/u-boot/u-boot_2009.01.bb
@@ -8,7 +8,7 @@ DEFAULT_PREFERENCE_at91rm9200dk = "1"
DEFAULT_PREFERENCE_at91sam9rlek = "1"
DEFAULT_PREFERENCE_at91sam9260ek = "1"
DEFAULT_PREFERENCE_at91sam9261ek = "1"
-DEFAULT_PREFERENCE_at91sam9g20ek = "1"
+DEFAULT_PREFERENCE_at91sam9g20ek = "-1"
DEFAULT_PREFERENCE_at91sam9263ek = "1"
DEFAULT_PREFERENCE_at91cap9adk = "1"
DEFAULT_PREFERENCE_atngw100 = "1"
@@ -29,6 +29,3 @@ SRC_URI_append_at91sam9g20ek = "\
file://at91sam9g20-fix-config.patch;patch=1 \
"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-PARALLEL_MAKE = ""
-
diff --git a/recipes/u-boot/u-boot_2009.06.bb b/recipes/u-boot/u-boot_2009.06.bb
new file mode 100644
index 0000000000..cefbed21f8
--- /dev/null
+++ b/recipes/u-boot/u-boot_2009.06.bb
@@ -0,0 +1,17 @@
+PR = "r0"
+require u-boot.inc
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_mpc8315e-rdb = "1"
+DEFAULT_PREFERENCE_at91sam9g20ek = "1"
+
+SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 "
+
+TARGET_LDFLAGS = ""
+
+inherit base
+
+do_compile () {
+ oe_runmake ${UBOOT_MACHINE}
+ oe_runmake all
+}
diff --git a/recipes/u-boot/u-boot_git.bb b/recipes/u-boot/u-boot_git.bb
index 8e0eb2e6e9..8936cfbbc7 100644
--- a/recipes/u-boot/u-boot_git.bb
+++ b/recipes/u-boot/u-boot_git.bb
@@ -1,11 +1,10 @@
require u-boot.inc
-PR ="r24"
+PR ="r26"
FILESPATHPKG =. "u-boot-git:"
SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git "
SRCREV_davinci-sffsdr = "4b50cd12a3b3c644153c4cf393f4a4c12289e5aa"
-SRCREV_davinci-dvevm = "4b50cd12a3b3c644153c4cf393f4a4c12289e5aa"
SRCREV_akita = "9bf86baaa3b35b25baa2d664e2f7f6cafad689ee"
SRCREV_spitz = "9bf86baaa3b35b25baa2d664e2f7f6cafad689ee"
SRCREV_c7x0 = "9bf86baaa3b35b25baa2d664e2f7f6cafad689ee"
@@ -14,14 +13,12 @@ SRCREV_afeb9260-180 = "6b8edfde22acc574b5532e9f086e6a7287a9bc78"
SRC_URI_append_afeb9260 = " file://AFEB9260-network-fix.patch;patch=1"
SRC_URI_append_afeb9260-180 = " file://AFEB9260-network-fix.patch;patch=1"
-SRC_URI_beagleboard = "git://gitorious.org/u-boot-omap3/mainline.git;branch=omap3-dev-usb;protocol=git \
+SRC_URI_beagleboard = "git://gitorious.org/u-boot-omap3/mainline.git;branch=omap3-dev;protocol=git \
file://fw-env.patch;patch=1 \
file://dss2.patch;patch=1 \
- file://omap-usb-dev-dfu.patch;patch=1 \
- file://dfu-second-patch.patch;patch=1 \
"
-SRCREV_beagleboard = "715c646c0bd3e99d4f964f2b5539d2155ce8f87a"
-PV_beagleboard = "2009.03+${PR}+gitr${SRCREV}"
+SRCREV_beagleboard = "d363f9cb0918a1b6b92e2e20d01543d0c4f53274"
+PV_beagleboard = "2009.05+${PR}+gitr${SRCREV}"
SRC_URI_omap3evm = "git://gitorious.org/u-boot-omap3/mainline.git;branch=omap3-dev;protocol=git"
SRCREV_omap3evm = "2dea1db2a3b7c12ed70bbf8ee50755089c5e5170"
@@ -38,6 +35,28 @@ SRC_URI_overo = "git://gitorious.org/u-boot-omap3/mainline.git;branch=omap3-dev;
SRCREV_overo = "2dea1db2a3b7c12ed70bbf8ee50755089c5e5170"
PV_overo = "2009.03+${PR}+gitr${SRCREV}"
+SRC_URI_dm6446-evm = "git://arago-project.org/git/people/sandeep/u-boot-davinci.git;protocol=git"
+SRCREV_dm6446-evm = "6dc7c97635b46ed00117e326d16d092a963fb6d4"
+PV_dm6446-evm = "2009.05+2009.06-rc0+${PR}+gitr${SRCREV}"
+
+SRC_URI_dm6467-evm = "git://arago-project.org/git/people/sandeep/u-boot-davinci.git;protocol=git"
+SRCREV_dm6467-evm = "6dc7c97635b46ed00117e326d16d092a963fb6d4"
+PV_dm6467-evm = "2009.05+2009.06-rc0+${PR}+gitr${SRCREV}"
+
+SRC_URI_dm355-evm = "git://arago-project.org/git/people/sandeep/u-boot-davinci.git;protocol=git"
+SRCREV_dm355-evm = "6dc7c97635b46ed00117e326d16d092a963fb6d4"
+PV_dm355-evm = "2009.05+2009.06-rc0+${PR}+gitr${SRCREV}"
+
+SRC_URI_dm365-evm = "git://arago-project.org/git/people/sandeep/u-boot-davinci.git;protocol=git"
+SRCREV_dm365-evm = "6dc7c97635b46ed00117e326d16d092a963fb6d4"
+PV_dm365-evm = "2009.05+2009.06-rc0+${PR}+gitr${SRCREV}"
+
+SRC_URI_dm355-leopard = "git://www.denx.de/git/u-boot-arm.git;protocol=git;branch=next \
+ file://leopardboard-support.patch;patch=1 \
+"
+SRCREV_dm355-leopard = "86d5c98d3d97d631b1d3a5f5e6a17e87c99b42cf"
+PV_dm355-leopard = "2009.05+2009.06-rc2+gitr${SRCREV}"
+
SRC_URI_neuros-osd2 = "git://github.com/neuros/u-boot.git;protocol=git;branch=neuros"
SRCREV_neuros-osd2 = "8de979d346624c0e4cfe2e5c0f08ce20ca4b5d14"
@@ -47,6 +66,12 @@ SRCREV_sequoa = "cf3b41e0c1111dbb865b6e34e9f3c3d3145a6093"
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_mini2440 = "git://repo.or.cz/u-boot-openmoko/mini2440.git;protocol=git;branch=dev-mini2440-stable"
+SRCREV_mini2440 = "3516c35fb777ca959e5cadf2156a792ca10e1cff"
+
+SRC_URI_micro2440 = "git://repo.or.cz/u-boot-openmoko/mini2440.git;protocol=git;branch=dev-mini2440-stable"
+SRCREV_micro2440 = "3516c35fb777ca959e5cadf2156a792ca10e1cff"
+
SRC_URI_neuros-osd2 += "file://Makefile-fix.patch;patch=1"
SRC_URI_append_akita = "file://pdaXrom-u-boot.patch;patch=1 \
file://uboot-eabi-fix-HACK2.patch;patch=1 \
@@ -62,7 +87,6 @@ SRC_URI_append_c7x0 = "file://pdaXrom-u-boot.patch;patch=1 \
"
S = "${WORKDIR}/git"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
do_configure_prepend_akita() {
sed -i s:ROOT_FLASH_SIZE:${ROOT_FLASH_SIZE}:g ${S}/include/configs/akita.h
@@ -75,3 +99,11 @@ do_configure_prepend_spitz() {
do_configure_prepend_c7x0() {
sed -i s:ROOT_FLASH_SIZE:${ROOT_FLASH_SIZE}:g ${S}/include/configs/corgi.h
}
+
+do_deploy_prepend_mini2440() {
+ cp ${S}/u-boot-nand16k.bin ${S}/u-boot.bin
+}
+
+do_deploy_prepend_micro2440() {
+ cp ${S}/u-boot-nand16k.bin ${S}/u-boot.bin
+}
diff --git a/recipes/uclibc/bfin-uclibc_svn.bb b/recipes/uclibc/bfin-uclibc_svn.bb
index 9b438a25dc..93052452c5 100644
--- a/recipes/uclibc/bfin-uclibc_svn.bb
+++ b/recipes/uclibc/bfin-uclibc_svn.bb
@@ -25,7 +25,7 @@ KERNEL_SOURCE = "${CROSS_DIR}/${TARGET_SYS}"
SRC_URI = "svn://sources.blackfin.uclinux.org/toolchain/trunk;module=uClibc "
SRC_URI += "file://uClibc.machine file://uClibc.distro"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-${UCLIBC_BASE}', '${FILE_DIRNAME}/uclibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "uclibc-${UCLIBC_BASE}:uclibc:"
S = "${WORKDIR}/uClibc"
diff --git a/recipes/uclibc/uclibc-initial_0.9.26.bb b/recipes/uclibc/uclibc-initial_0.9.26.bb
index a6a83bdce9..d36a6478be 100644
--- a/recipes/uclibc/uclibc-initial_0.9.26.bb
+++ b/recipes/uclibc/uclibc-initial_0.9.26.bb
@@ -1,8 +1,6 @@
SECTION = "base"
require uclibc_${PV}.bb
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-${PV}', '${FILE_DIRNAME}/uclibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
diff --git a/recipes/uclibc/uclibc-initial_0.9.27.bb b/recipes/uclibc/uclibc-initial_0.9.27.bb
index 3aecd802af..f48e81dc41 100644
--- a/recipes/uclibc/uclibc-initial_0.9.27.bb
+++ b/recipes/uclibc/uclibc-initial_0.9.27.bb
@@ -1,8 +1,6 @@
SECTION = "base"
require uclibc_${PV}.bb
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-${PV}', '${FILE_DIRNAME}/uclibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
diff --git a/recipes/uclibc/uclibc-initial_0.9.28.bb b/recipes/uclibc/uclibc-initial_0.9.28.bb
index b996f64e75..dbd90fc862 100644
--- a/recipes/uclibc/uclibc-initial_0.9.28.bb
+++ b/recipes/uclibc/uclibc-initial_0.9.28.bb
@@ -1,8 +1,6 @@
SECTION = "base"
require uclibc_${PV}.bb
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-${PV}', '${FILE_DIRNAME}/uclibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
diff --git a/recipes/uclibc/uclibc-initial_0.9.29.bb b/recipes/uclibc/uclibc-initial_0.9.29.bb
index c56e5fb2f5..98ef7b291a 100644
--- a/recipes/uclibc/uclibc-initial_0.9.29.bb
+++ b/recipes/uclibc/uclibc-initial_0.9.29.bb
@@ -1,8 +1,6 @@
SECTION = "base"
require uclibc_${PV}.bb
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-${PV}', '${FILE_DIRNAME}/uclibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
diff --git a/recipes/uclibc/uclibc-initial_0.9.30.1.bb b/recipes/uclibc/uclibc-initial_0.9.30.1.bb
index c56e5fb2f5..d0edf93693 100644
--- a/recipes/uclibc/uclibc-initial_0.9.30.1.bb
+++ b/recipes/uclibc/uclibc-initial_0.9.30.1.bb
@@ -1,18 +1,16 @@
SECTION = "base"
require uclibc_${PV}.bb
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-${PV}', '${FILE_DIRNAME}/uclibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
do_stage() {
# Install initial headers into the cross dir
- make PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
+ make V=1 CC="${CC}" PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
pregen install_dev
- make PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
+ make V=1 CC="${CC}" PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
lib/crt1.o lib/crti.o lib/crtn.o
diff --git a/recipes/uclibc/uclibc-initial_0.9.30.bb b/recipes/uclibc/uclibc-initial_0.9.30.bb
index c56e5fb2f5..98ef7b291a 100644
--- a/recipes/uclibc/uclibc-initial_0.9.30.bb
+++ b/recipes/uclibc/uclibc-initial_0.9.30.bb
@@ -1,8 +1,6 @@
SECTION = "base"
require uclibc_${PV}.bb
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-${PV}', '${FILE_DIRNAME}/uclibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
diff --git a/recipes/uclibc/uclibc.inc b/recipes/uclibc/uclibc.inc
index f2f3e9b605..55cff83b7e 100644
--- a/recipes/uclibc/uclibc.inc
+++ b/recipes/uclibc/uclibc.inc
@@ -35,15 +35,18 @@ PACKAGES =+ "ldd uclibc-utils-dbg uclibc-utils uclibc-gconv uclibc-thread-db"
LEAD_SONAME = "libc.so"
# The last line (gdb and lib1) is for uclinux-uclibc builds
-uclibc_baselibs = "/lib/libcrypt*.so* /lib/libdl*.so \
- /lib/libintl*.so* /lib/libm*.so \
- /lib/libnsl*.so* /lib/libpthread*.so \
- /lib/libresolv*.so* /lib/libutil*.so \
- /lib/libuClibc*.so* /lib/ld*.so* \
- /lib/libc*.so* /lib/libdl*.so* \
- /lib/libm*.so* /lib/libutil*.so* \
- /lib/libpthread*.so* /lib/librt*.so* \
- /usr/lib/libc.gdb /usr/lib/libc /lib/lib1.so \
+uclibc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so \
+ ${base_libdir}/libintl*.so.* ${base_libdir}/libintl-*.so \
+ ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so \
+ ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so \
+ ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so \
+ ${base_libdir}/libc*.so.* ${base_libdir}/libuClibc-*.so \
+ ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so \
+ ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so \
+ ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so \
+ ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so \
+ ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so \
+ ${libdir}/libc.gdb ${libdir}/libc ${base_libdir}/lib1.so \
"
FILES_${PN} = "${sysconfdir} ${uclibc_baselibs} /sbin/ldconfig \
${libexecdir} ${datadir}/zoneinfo ${libdir}/locale"
@@ -76,7 +79,6 @@ OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}' \
'LOCALE_DATA_FILENAME=${UCLIBC_LOCALE_FILE}'"
EXTRA_OEMAKE = "${OEMAKE_NO_CC} 'CC=${CC}' \
'HOSTCFLAGS=-I${STAGING_INCDIR_NATIVE}'"
-EXTRA_OEMAKE_task_do_populate_staging = "${OEMAKE_NO_CC}"
EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"
KERNEL_SOURCE = "${STAGING_INCDIR}"
@@ -95,7 +97,7 @@ configmangle = 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE="${KERNEL_SOURCE}",g; \
s,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX="/lib",; \
s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \
${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][bb.data.getVar("USE_NLS", d, 1) == "yes"]} \
- ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][bb.data.getVar("TARGET_ARCH", d, 1) == "avr32"]} \
+ ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][bb.data.getVar("TARGET_ARCH", d, 1) in ['mips', 'mipsel', 'avr32']]} \
'
CFLAGS := "${@oe_filter_out('-I\S+', '${CFLAGS}', d)}"
@@ -202,17 +204,17 @@ do_install() {
rmdir ${D}${prefix}/lib
fi
- if [ "${bindir}" != "/usr/bin" ]; then
- install -d ${D}${bindir}
- mv ${D}/usr/bin/* ${D}${bindir}/
- rmdir ${D}/usr/bin
- fi
-
oe_runmake "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" utils
oe_runmake STRIPTOOL=true PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
install_utils
# oe_runstrip needs +x on files
chmod +x ${D}/${base_libdir}/*
+
+ if [ "${bindir}" != "/usr/bin" ]; then
+ install -d ${D}${bindir}
+ mv ${D}/usr/bin/* ${D}${bindir}/
+ rmdir ${D}/usr/bin
+ fi
}
diff --git a/recipes/uclibc/uclibc_0.9.30.1.bb b/recipes/uclibc/uclibc_0.9.30.1.bb
index ab6dcb9cf0..dbdcbb6740 100644
--- a/recipes/uclibc/uclibc_0.9.30.1.bb
+++ b/recipes/uclibc/uclibc_0.9.30.1.bb
@@ -7,7 +7,7 @@
# on whether the base patches apply to the selected (SRCDATE) svn release.
#
UCLIBC_BASE ?= "0.9.30.1"
-PR = "r2"
+PR = "r3"
DEFAULT_PREFERENCE = "1"
require uclibc.inc
diff --git a/recipes/uclibc/uclibc_nptl.bb b/recipes/uclibc/uclibc_nptl.bb
index 18c88c8055..ba46a50933 100644
--- a/recipes/uclibc/uclibc_nptl.bb
+++ b/recipes/uclibc/uclibc_nptl.bb
@@ -19,7 +19,7 @@ PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
#recent versions uclibc require real kernel headers
PACKAGE_ARCH = "${MACHINE_ARCH}"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-nptl', '${FILE_DIRNAME}/uclibc-${UCLIBC_BASE}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "uclibc-nptl:uclibc-${UCLIBC_BASE}:"
#as stated above, uclibc needs real kernel-headers
#however: we can't depend on virtual/kernel when nptl hits due to depends deadlocking ....
diff --git a/recipes/uclibc/uclibc_svn.bb b/recipes/uclibc/uclibc_svn.bb
index 127cea7cf0..d3f09737c8 100644
--- a/recipes/uclibc/uclibc_svn.bb
+++ b/recipes/uclibc/uclibc_svn.bb
@@ -19,7 +19,7 @@ PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
#recent versions uclibc require real kernel headers
PACKAGE_ARCH = "${MACHINE_ARCH}"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-svn', '${FILE_DIRNAME}/uclibc-${UCLIBC_BASE}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATHPKG =. "uclibc-svn:uclibc-${UCLIBC_BASE}:"
#as stated above, uclibc needs real kernel-headers
#however: we can't depend on virtual/kernel when nptl hits due to depends deadlocking ....
diff --git a/recipes/udev/udev-141/akita/default b/recipes/udev/udev-141/akita/default
new file mode 100644
index 0000000000..d0050b873c
--- /dev/null
+++ b/recipes/udev/udev-141/akita/default
@@ -0,0 +1,4 @@
+# Default for /etc/init.d/udev
+
+# Comment this out to disable device cache
+#DEVCACHE="/etc/dev.tar"
diff --git a/recipes/udev/udev-141/c7x0/default b/recipes/udev/udev-141/c7x0/default
new file mode 100644
index 0000000000..d0050b873c
--- /dev/null
+++ b/recipes/udev/udev-141/c7x0/default
@@ -0,0 +1,4 @@
+# Default for /etc/init.d/udev
+
+# Comment this out to disable device cache
+#DEVCACHE="/etc/dev.tar"
diff --git a/recipes/udev/udev-141/default b/recipes/udev/udev-141/default
new file mode 100644
index 0000000000..5c4937a9a0
--- /dev/null
+++ b/recipes/udev/udev-141/default
@@ -0,0 +1,4 @@
+# Default for /etc/init.d/udev
+
+# Comment this out to disable device cache
+DEVCACHE="/etc/dev.tar"
diff --git a/recipes/udev/udev-141/init b/recipes/udev/udev-141/init
index 9e11f08989..facc4ab652 100644
--- a/recipes/udev/udev-141/init
+++ b/recipes/udev/udev-141/init
@@ -14,6 +14,7 @@ export TZ=/etc/localtime
[ -d /sys/class ] || exit 1
[ -r /proc/mounts ] || exit 1
[ -x /sbin/udevd ] || exit 1
+[ -f /etc/default/udev ] && . /etc/default/udev
[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
kill_udevd() {
@@ -31,12 +32,21 @@ echo -n "Starting udev"
LANG=C awk "\$2 == \"/dev\" && \$4 == \"tmpfs\" { exit 1 }" /proc/mounts && {
mount -n -o mode=0755 -t tmpfs none "/dev"
mkdir -m 0755 /dev/pts
- mkdir -m 0755 /dev/shm
+ mkdir -m 1777 /dev/shm
}
-if [ -e /etc/dev.tar ]; then
- (cd /; tar xf /etc/dev.tar)
- not_first_boot=1
+if [ "$DEVCACHE" != "" ]; then
+ # Invalidate udev cache if the kernel or its bootargs/cmdline have changed
+ [ -x /bin/uname ] && /bin/uname -mrspv > /tmp/uname || touch /tmp/uname
+ [ -r /proc/cmdline ] && cat /proc/cmdline > /tmp/cmdline || touch /tmp/cmdline
+ [ -r /proc/atags ] && cat /proc/atags > /tmp/atags || touch /tmp/atags
+ if [ -e $DEVCACHE ] && \
+ cmp -s /tmp/uname /etc/udev/saved.uname && \
+ cmp -s /tmp/cmdline /etc/udev/saved.cmdline && \
+ cmp -s /tmp/atags /etc/udev/saved.atags; then
+ (cd /; tar xf $DEVCACHE)
+ not_first_boot=1
+ fi
fi
# make_extra_nodes
@@ -46,14 +56,25 @@ kill_udevd > "/dev/null" 2>&1
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
/sbin/udevd -d
- /sbin/udevadm control env STARTUP=1
+ /sbin/udevadm control --env STARTUP=1
if [ "$not_first_boot" != "" ];then
/sbin/udevadm trigger --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform
- (/sbin/udevadm settle --timeout=3; /sbin/udevadm control env STARTUP=)&
+ (/sbin/udevadm settle --timeout=3; /sbin/udevadm control --env STARTUP=)&
+ if [ "$DEVCACHE" != "" ]; then
+ rm -f /tmp/uname
+ rm -f /tmp/cmdline
+ rm -f /tmp/atags
+ fi
else
/sbin/udevadm trigger
/sbin/udevadm settle
- (cd /; tar cf /etc/dev.tar dev)
+ if [ "$DEVCACHE" != "" ]; then
+ echo -n " and populating dev cache"
+ (cd /; tar cf $DEVCACHE dev)
+ mv /tmp/uname /etc/udev/saved.uname
+ mv /tmp/cmdline /etc/udev/saved.cmdline
+ mv /tmp/atags /etc/udev/saved.atags
+ fi
fi
echo
diff --git a/recipes/udev/udev-141/local.rules b/recipes/udev/udev-141/local.rules
index a4866923fd..4e80a71d80 100644
--- a/recipes/udev/udev-141/local.rules
+++ b/recipes/udev/udev-141/local.rules
@@ -24,6 +24,9 @@ SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
# The first rtc device is symlinked to /dev/rtc
KERNEL=="rtc0", SYMLINK+="rtc"
+#The first framebuffer is symlinked to /dev/fb
+KERNEL=="fb0", SYMLINK+="fb"
+
# Try and modprobe for drivers for new hardware
ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
diff --git a/recipes/udev/udev-141/spitz/default b/recipes/udev/udev-141/spitz/default
new file mode 100644
index 0000000000..d0050b873c
--- /dev/null
+++ b/recipes/udev/udev-141/spitz/default
@@ -0,0 +1,4 @@
+# Default for /etc/init.d/udev
+
+# Comment this out to disable device cache
+#DEVCACHE="/etc/dev.tar"
diff --git a/recipes/udev/udev-141/tosa/default b/recipes/udev/udev-141/tosa/default
new file mode 100644
index 0000000000..d0050b873c
--- /dev/null
+++ b/recipes/udev/udev-141/tosa/default
@@ -0,0 +1,4 @@
+# Default for /etc/init.d/udev
+
+# Comment this out to disable device cache
+#DEVCACHE="/etc/dev.tar"
diff --git a/recipes/udev/udev_141.bb b/recipes/udev/udev_141.bb
index 2368cb9880..3f4256470f 100644
--- a/recipes/udev/udev_141.bb
+++ b/recipes/udev/udev_141.bb
@@ -3,10 +3,13 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod
the hotplug package and requires a kernel not older than 2.6.12."
LICENSE = "GPL"
-# Untested, fails to create shared libs
+# Untested
DEFAULT_PREFERENCE = "-1"
-PR = "r1"
+PR = "r11"
+
+# needed for init.d script
+RDEPENDS_${PN} += "udev-utils"
SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
file://mount.blacklist \
@@ -20,6 +23,7 @@ SRC_URI += " \
file://mount.sh \
file://network.sh \
file://local.rules \
+ file://default \
file://init"
SRC_URI_append_h2200 = " file://50-hostap_cs.rules "
@@ -27,6 +31,13 @@ PACKAGE_ARCH_h2200 = "h2200"
inherit update-rc.d autotools_stage
+# Put stuff in /lib and /sbin
+export sbindir="${base_sbindir}"
+export exec_prefix=""
+EXTRA_OECONF += " --with-udev-prefix= \
+ --with-libdir-name=${base_libdir} \
+"
+
INITSCRIPT_NAME = "udev"
INITSCRIPT_PARAMS = "start 03 S ."
@@ -40,7 +51,7 @@ RPROVIDES_${PN} = "hotplug"
FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd"
FILES_${PN}-dbg += "${usrbindir}/.debug ${usrsbindir}/.debug"
-FILES_${PN} += "${base_libdir}/udev/*"
+FILES_${PN} += "${libdir}/udev/* ${base_libdir}/udev/*"
FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
do_install () {
@@ -50,7 +61,14 @@ do_install () {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
- install -d ${D}${sysconfdir}/udev/rules.d/
+ install -d ${D}${sysconfdir}/default
+ install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/udev
+
+ mv ${D}${base_libdir}/udev/rules.d ${D}${sysconfdir}/udev/
+ ln -sf ${sysconfdir}/udev/rules.d ${D}${base_libdir}/udev/
+
+ cp ${S}/rules/rules.d/* ${D}${sysconfdir}/udev/rules.d/
+ cp ${S}/rules/packages/* ${D}${sysconfdir}/udev/rules.d/
install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/
install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
@@ -62,12 +80,14 @@ do_install () {
install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
fi
+ touch ${D}${sysconfdir}/udev/saved.uname
+ touch ${D}${sysconfdir}/udev/saved.cmdline
+ touch ${D}${sysconfdir}/udev/saved.atags
+
install -d ${D}${sysconfdir}/udev/scripts/
install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
-
- install -d ${D}${base_libdir}/udev/
}
do_install_append_h2200() {
@@ -78,6 +98,7 @@ do_install_append_h2200() {
do_stage_append() {
install -m 0644 ${S}/extras/volume_id/lib/libvolume_id.h ${STAGING_INCDIR}
oe_libinstall -C extras/volume_id/lib -so libvolume_id ${STAGING_LIBDIR}
+ oe_libinstall -C udev/lib -so libudev ${STAGING_LIBDIR}
}
diff --git a/recipes/uim/uim-native_1.3.1.bb b/recipes/uim/uim-native_1.3.1.bb
index f23f6bd945..3404a36ab5 100644
--- a/recipes/uim/uim-native_1.3.1.bb
+++ b/recipes/uim/uim-native_1.3.1.bb
@@ -3,6 +3,4 @@ DEPENDS = "gtk+ anthy intltool-native"
inherit native autotools pkgconfig
PR = "r2"
-S = "${WORKDIR}/uim-${PV}"
-
EXTRA_OECONF += "--disable-xim"
diff --git a/recipes/uim/uim_1.3.1.bb b/recipes/uim/uim_1.3.1.bb
index fce91c30e3..1811df9300 100644
--- a/recipes/uim/uim_1.3.1.bb
+++ b/recipes/uim/uim_1.3.1.bb
@@ -1,7 +1,7 @@
require uim.inc
DEPENDS = "gtk+ uim-native anthy fontconfig libxft xt glib-2.0 ncurses"
SECTION_uim-gtk2.0 = "x11/inputmethods"
-PR = "r2"
+PR = "r3"
SRC_URI += "file://uim-module-manager.patch;patch=1"
@@ -11,7 +11,7 @@ PACKAGES += "uim-xim uim-utils uim-skk uim-gtk2.0 uim-fep uim-common uim-anthy l
LEAD_SONAME = "libuim.so.1"
RDEPENDS_uim = "libuim0"
-RDEPENDS_uim-anthy = "virtual/japanese-font"
+RDEPENDS_uim-anthy = "virtual-japanese-font"
DESCRIPTION_libuim0 = "Simple and flexible input method collection and library"
SECTION_libuim0 = "libs/inputmethods"
diff --git a/recipes/upnp/gssdp_0.6.3.bb b/recipes/upnp/gssdp_0.6.3.bb
index 034d2f5fe3..09e12e2c63 100644
--- a/recipes/upnp/gssdp_0.6.3.bb
+++ b/recipes/upnp/gssdp_0.6.3.bb
@@ -3,12 +3,8 @@ DEPENDS = "glib-2.0 libsoup-2.4 libglade"
SRC_URI = "http://gupnp.org/sources/${PN}/${PN}-${PV}.tar.gz"
-inherit autotools pkgconfig
+inherit autotools_stage pkgconfig
PACKAGES =+ "gssdp-tools"
FILES_gssdp-tools = "${bindir}/gssdp* ${datadir}/gssdp/*.glade"
-
-do_stage() {
- autotools_stage_all
-}
diff --git a/recipes/upnp/gupnp-av_0.3.bb b/recipes/upnp/gupnp-av_0.3.bb
new file mode 100644
index 0000000000..5f52525b42
--- /dev/null
+++ b/recipes/upnp/gupnp-av_0.3.bb
@@ -0,0 +1,6 @@
+LICENSE = "LGPL"
+DEPENDS = "gupnp"
+
+SRC_URI = "http://gupnp.org/sources/${PN}/${PN}-${PV}.tar.gz"
+
+inherit autotools_stage pkgconfig
diff --git a/recipes/upnp/gupnp_0.12.5.bb b/recipes/upnp/gupnp_0.12.5.bb
new file mode 100644
index 0000000000..4fd75d8932
--- /dev/null
+++ b/recipes/upnp/gupnp_0.12.5.bb
@@ -0,0 +1,14 @@
+LICENSE = "LGPL"
+DEPENDS = "e2fsprogs gssdp libsoup-2.4 libxml2"
+
+SRC_URI = "http://gupnp.org/sources/${PN}/${PN}-${PV}.tar.gz"
+PR = "r1"
+
+inherit autotools_stage pkgconfig
+
+FILES_${PN} = "${libdir}/*.so.*"
+FILES_${PN}-dev += "${bindir}/gupnp-binding-tool"
+
+do_stage_append () {
+ install ${S}/tools/gupnp-binding-tool ${STAGING_BINDIR_NATIVE}
+} \ No newline at end of file
diff --git a/recipes/usb-gadget-mode/files/beagleboard/usb-gadget.conf b/recipes/usb-gadget-mode/files/beagleboard/usb-gadget.conf
new file mode 100644
index 0000000000..35ff0d4fa9
--- /dev/null
+++ b/recipes/usb-gadget-mode/files/beagleboard/usb-gadget.conf
@@ -0,0 +1,3 @@
+USB_MODE="composite"
+MODULE_OPTIONS=""
+
diff --git a/recipes/usb-gadget-mode/files/omap3-pandora/usb-gadget.conf b/recipes/usb-gadget-mode/files/omap3-pandora/usb-gadget.conf
new file mode 100644
index 0000000000..35ff0d4fa9
--- /dev/null
+++ b/recipes/usb-gadget-mode/files/omap3-pandora/usb-gadget.conf
@@ -0,0 +1,3 @@
+USB_MODE="composite"
+MODULE_OPTIONS=""
+
diff --git a/recipes/usb-gadget-mode/files/usb-gadget b/recipes/usb-gadget-mode/files/usb-gadget
index 6f957fd263..0e6b39f845 100755
--- a/recipes/usb-gadget-mode/files/usb-gadget
+++ b/recipes/usb-gadget-mode/files/usb-gadget
@@ -10,6 +10,7 @@
#
# 20070606 - v0.0.1 - Initial release
# 20070630 - v0.0.2 - Add forgotten host mode
+# 20090529 - add support for all gadgets in 2.6.29 (koen)
CONF_FILE="/etc/default/usb-gadget"
@@ -23,6 +24,11 @@ go() {
case "$USB_MODE" in
networking) setup_usb g_ether "$MODULE_OPTIONS" ;;
+ zero) setup_usb g_zero "$MODULE_OPTIONS" ;;
+ midi) setup_usb g_midi "$MODULE_OPTIONS" ;;
+ printer) setup_usb g_printer "$MODULE_OPTIONS" ;;
+ gadgetfs) setup_usb gadgetfs "$MODULE_OPTIONS" ;;
+ composite) setup_usb g_cdc "$MODULE_OPTIONS" ;;
storage) setup_usb g_file_storage "$MODULE_OPTIONS" ;;
hostmode) unload_usb_gadgets
setup_usb ohci_hcd "$MODULE_OPTIONS" ;;
diff --git a/recipes/usb-gadget-mode/usb-gadget-mode.bb b/recipes/usb-gadget-mode/usb-gadget-mode.bb
index daf7cfbe37..e6e8e51097 100644
--- a/recipes/usb-gadget-mode/usb-gadget-mode.bb
+++ b/recipes/usb-gadget-mode/usb-gadget-mode.bb
@@ -9,7 +9,7 @@ DESCRIPTION = "Manage the default USB gadget mode"
SECTION = "console/network"
LICENSE = "GPL"
PV = "0.0.2"
-PR = "r1"
+PR = "r3"
SRC_URI = "\
file://usb-gadget.conf \
diff --git a/recipes/usbutils/usbutils_0.82.bb b/recipes/usbutils/usbutils_0.82.bb
new file mode 100644
index 0000000000..c921a4a75e
--- /dev/null
+++ b/recipes/usbutils/usbutils_0.82.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Host side USB console utilities."
+SECTION = "base"
+DEPENDS += "libusb-compat"
+LICENSE = "GPL"
+PRIORITY = "optional"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/linux-usb/usbutils-${PV}.tar.gz \
+ "
+inherit autotools
+
+EXTRA_OECONF = "--program-prefix="
+sbindir = "/sbin"
+bindir = "/bin"
+
+FILES_${PN} += "${datadir}/usb*"
+
+do_configure_prepend() {
+ rm -rf ${S}/libusb
+}
diff --git a/recipes/util-linux-ng/files/fix-make-c.patch b/recipes/util-linux-ng/files/fix-make-c.patch
new file mode 100644
index 0000000000..bf1082e85c
--- /dev/null
+++ b/recipes/util-linux-ng/files/fix-make-c.patch
@@ -0,0 +1,41 @@
+From: Karel Zak <kzak@redhat.com>
+Date: Mon, 11 May 2009 09:49:00 +0000 (+0200)
+Subject: build-sys: fix "make -C" bug
+X-Git-Url: http://git.kernel.org/?p=utils%2Futil-linux-ng%2Futil-linux-ng.git;a=commitdiff_plain;h=2ef7d41e6bbb7c842c06e911ffc562335a467b5d
+
+build-sys: fix "make -C" bug
+
+Running:
+
+./configure --with-fsprobe=builtin
+make -C mount mount
+
+causes the following error:
+
+gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -include ../config.h
+-I../include -DLOCALEDIR=\"/home/matthew/util-linux-ng/share/locale\"
+-fsigned-char -I../libs/blkid/src -g -O2 -MT mount-setproctitle.o
+-MD -MP -MF .deps/mount-setproctitle.Tpo -c -o mount-setproctitle.o
+`test -f '../lib/setproctitle.c' || echo './'`../lib/setproctitle.c mv
+-f .deps/mount-setproctitle.Tpo .deps/mount-setproctitle.Po
+make -C
+make: option requires an argument -- 'C'
+Usage: make [options] [target] ...
+...
+
+Reported-by: Matthew Burgess <matthew@linuxfromscratch.org>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+
+diff --git a/config/include-Makefile.am b/config/include-Makefile.am
+index b42a0c3..d5da619 100644
+--- a/config/include-Makefile.am
++++ b/config/include-Makefile.am
+@@ -17,6 +17,7 @@ dist_noinst_DATA = $(dist_man_MANS)
+ # Paths to in-tree libraries (use ul_ prefix to avoid possible collisions)
+ #
+ ul_libblkid_srcdir = $(top_srcdir)/libs/blkid/src
++ul_libblkid_builddir = $(top_builddir)/libs/blkid/src
+ ul_libblkid_la = $(top_builddir)/libs/blkid/src/libblkid.la
+
+ $(ul_libblkid_la):
diff --git a/recipes/util-linux-ng/files/optional-uuid.patch b/recipes/util-linux-ng/files/optional-uuid.patch
new file mode 100644
index 0000000000..2d0ea43cd2
--- /dev/null
+++ b/recipes/util-linux-ng/files/optional-uuid.patch
@@ -0,0 +1,55 @@
+From: Karel Zak <kzak@redhat.com>
+Date: Tue, 12 May 2009 19:22:19 +0000 (+0200)
+Subject: blkid: make libuuid optional
+X-Git-Url: http://git.kernel.org/?p=utils%2Futil-linux-ng%2Futil-linux-ng.git;a=commitdiff_plain;h=cdd17c7a73cab10a34bf80616225b8215ac4e2ed
+
+blkid: make libuuid optional
+
+read.c:28:23: error: uuid/uuid.h: No such file or directory
+make[3]: *** [read.lo] Error 1
+make[3]: *** Waiting for unfinished jobs....
+
+Reported-by: Olaf <mailinglists@ban-solms.de>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+
+diff --git a/libs/blkid/src/config.c b/libs/blkid/src/config.c
+index 2e59218..9091736 100644
+--- a/libs/blkid/src/config.c
++++ b/libs/blkid/src/config.c
+@@ -24,9 +24,6 @@
+ #include <errno.h>
+ #endif
+ #include <stdint.h>
+-#ifdef HAVE_LIBUUID
+-#include <uuid/uuid.h>
+-#endif
+ #include <stdarg.h>
+
+ #include "blkdev.h"
+diff --git a/libs/blkid/src/evaluate.c b/libs/blkid/src/evaluate.c
+index a9c9fba..f0ae126 100644
+--- a/libs/blkid/src/evaluate.c
++++ b/libs/blkid/src/evaluate.c
+@@ -27,9 +27,6 @@
+ #include <errno.h>
+ #endif
+ #include <stdint.h>
+-#ifdef HAVE_LIBUUID
+-#include <uuid/uuid.h>
+-#endif
+ #include <stdarg.h>
+
+ #include "pathnames.h"
+diff --git a/libs/blkid/src/read.c b/libs/blkid/src/read.c
+index 4163874..b5e9cd0 100644
+--- a/libs/blkid/src/read.c
++++ b/libs/blkid/src/read.c
+@@ -25,7 +25,6 @@
+ #endif
+
+ #include "blkidP.h"
+-#include "uuid/uuid.h"
+
+ #ifdef HAVE_STRTOULL
+ #define STRTOULL strtoull /* defined in stdlib.h if you try hard enough */
diff --git a/recipes/util-linux-ng/util-linux-ng.inc b/recipes/util-linux-ng/util-linux-ng.inc
index 01e769eb6a..59d2f0818b 100644
--- a/recipes/util-linux-ng/util-linux-ng.inc
+++ b/recipes/util-linux-ng/util-linux-ng.inc
@@ -1,36 +1,46 @@
DESCRIPTION = "Util-linux-ng is a suite of essential utilities for any Linux system."
SECTION = "base"
LICENSE = "GPL"
-DEPENDS = "udev zlib ncurses e2fsprogs-libs virtual/libintl"
+DEPENDS = "udev zlib ncurses virtual/libintl e2fsprogs-libs"
-inherit autotools
+inherit autotools_stage
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
DEFAULT_PREFERENCE = "-1"
+INC_PR = "r6"
+
# allows for a release candidate
RC ?= ""
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v${PV}/util-linux-ng-${PV}${RC}.tar.bz2"
PACKAGES =+ "util-linux-ng-fdisk util-linux-ng-cfdisk util-linux-ng-sfdisk util-linux-ng-swaponoff util-linux-ng-losetup util-linux-ng-umount util-linux-ng-mount util-linux-ng-readprofile "
+PACKAGES_DYNAMIC = "libblkid*"
FILES_${PN}-doc += "/usr/share/misc/getopt/getopt-*.*"
+FILES_${PN} = "${bindir} ${sbindir} ${base_bindir} ${base_sbindir}"
+
+FILES_util-linux-ng-fdisk = "${base_sbindir}/fdisk.${PN}"
+FILES_util-linux-ng-cfdisk = "${base_sbindir}/cfdisk"
+FILES_util-linux-ng-sfdisk = "${base_sbindir}/sfdisk"
+FILES_util-linux-ng-swaponoff = "${base_sbindir}/swapon.${PN} ${base_sbindir}/swapoff.${PN}"
+FILES_util-linux-ng-losetup = "${base_sbindir}/losetup.${PN}"
+FILES_util-linux-ng-mount = "${base_bindir}/mount.${PN} ${sysconfdir}/default/mountall"
+FILES_util-linux-ng-umount = "${base_bindir}/umount.${PN}"
+FILES_util-linux-ng-readprofile = "${sbindir}/readprofile.${PN}"
-FILES_util-linux-ng-fdisk = "/sbin/fdisk.${PN}"
-FILES_util-linux-ng-cfdisk = "/sbin/cfdisk"
-FILES_util-linux-ng-sfdisk = "/sbin/sfdisk"
-FILES_util-linux-ng-swaponoff = "/sbin/swapon.${PN} /sbin/swapoff.${PN}"
-FILES_util-linux-ng-losetup = "/sbin/losetup.${PN}"
-FILES_util-linux-ng-mount = "/bin/mount.${PN} ${sysconfdir}/default/mountall"
-FILES_util-linux-ng-umount = "/bin/umount.${PN}"
-FILES_util-linux-ng-readprofile = "/usr/sbin/readprofile.${PN}"
+PACKAGES =+ "${PN}-mountall"
+FILES_${PN}-mountall = "${sysconfdir}/default/mountall"
+RREPLACES_${PN}-mountall = "busybox-mountall"
RRECOMMENDS_${PN} = "util-linux-ng-fdisk util-linux-ng-cfdisk util-linux-ng-sfdisk util-linux-ng-mount util-linux-ng-readprofile "
-RDEPENDS_${PN} = "util-linux-ng-umount util-linux-ng-swaponoff util-linux-ng-losetup"
+RDEPENDS_${PN} = "${PN}-mountall util-linux-ng-umount util-linux-ng-swaponoff util-linux-ng-losetup"
EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown \
--enable-kill --enable-last --enable-mesg --enable-raw --enable-login-utils \
---enable-arch --enable-init"
+--enable-arch --enable-init --enable-partx --enable-schedutils \
+--with-fsprobe=builtin"
S = "${WORKDIR}/util-linux-ng-${PV}${RC}"
@@ -75,49 +85,70 @@ do_install () {
oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \
'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install
- mkdir ${D}${base_bindir}
- mkdir ${D}${base_sbindir}
- test -f ${D}${sbindir}/pivot_root && \
- mv ${D}${sbindir}/pivot_root ${D}${base_sbindir}/pivot_root.${PN}
- mv ${D}${bindir}/dmesg ${D}${base_bindir}/dmesg.${PN}
- mv ${D}${bindir}/kill ${D}${base_bindir}/kill.${PN}
- mv ${D}${bindir}/more ${D}${base_bindir}/more.${PN}
- mv ${D}${sbindir}/hwclock ${D}${base_sbindir}/hwclock.${PN}
- mv ${D}${sbindir}/mkswap ${D}${base_sbindir}/mkswap.${PN}
- mv ${D}${sbindir}/shutdown ${D}${base_sbindir}/shutdown.${PN}
-# mv ${D}${sbindir}/sln ${D}${base_sbindir}/sln.${PN}
- mv ${D}${sbindir}/mkfs.minix ${D}${base_sbindir}/mkfs.minix.${PN}
- mv ${D}${sbindir}/fsck.minix ${D}${base_sbindir}/fsck.minix.${PN}
- mv ${D}${bindir}/hexdump ${D}${bindir}/hexdump.${PN}
- mv ${D}${bindir}/last ${D}${bindir}/last.${PN}
- mv ${D}${bindir}/logger ${D}${bindir}/logger.${PN}
- mv ${D}${bindir}/mesg ${D}${bindir}/mesg.${PN}
- mv ${D}${bindir}/renice ${D}${bindir}/renice.${PN}
- mv ${D}${bindir}/wall ${D}${bindir}/wall.${PN}
-
- mv ${D}${sbindir}/losetup ${D}${base_sbindir}/losetup.${PN}
- mv ${D}${sbindir}/swapon ${D}${base_sbindir}/swapon.${PN}
- mv ${D}${bindir}/umount ${D}${base_bindir}/umount.${PN}
- mv ${D}${bindir}/mount ${D}${base_bindir}/mount.${PN}
- mv ${D}${sbindir}/fdisk ${D}${base_sbindir}/fdisk.${PN}
-
- mv ${D}${sbindir}/agetty ${D}${base_sbindir}/
- mv ${D}${sbindir}/blockdev ${D}${base_sbindir}/
- mv ${D}${sbindir}/cfdisk ${D}${base_sbindir}/
- mv ${D}${sbindir}/ctrlaltdel ${D}${base_sbindir}/
-
- mv ${D}${sbindir}/readprofile ${D}${sbindir}/readprofile.${PN}
-
+ mkdir -p ${D}${base_bindir}
+
+ sbinprogs="agetty blockdev ctrlaltdel cfdisk"
+ sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile"
+ usrbinprogs_a="hexdump last logger mesg renice wall"
+ binprogs_a="dmesg kill more umount mount"
+
+ if [ "${base_sbindir}" != "${sbindir}" ]; then
+ mkdir -p ${D}${base_sbindir}
+ for p in $sbinprogs $sbinprogs_a; do
+ if [ -f "${D}${sbindir}/$p" ]; then
+ mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p"
+ fi
+ done
+ fi
+
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ mkdir -p ${D}${base_bindir}
+ for p in $binprogs_a; do
+ if [ -f "${D}${bindir}/$p" ]; then
+ mv "${D}${bindir}/$p" "${D}${base_bindir}/$p"
+ fi
+ done
+ fi
+
+ for p in $usrbinprogs_a; do
+ if [ -f "${D}${bindir}/$p" ]; then
+ mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}"
+ fi
+ done
+
+ for p in $binprogs_a; do
+ if [ -f "${D}${base_bindir}/$p" ]; then
+ mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}"
+ fi
+ done
+
+ for p in $sbinprogs_a; do
+ if [ -f "${D}${base_sbindir}/$p" ]; then
+ mv "${D}${base_sbindir}/$p" "${D}${base_sbindir}/$p.${PN}"
+ fi
+ done
+
install -d ${D}${sysconfdir}/default/
echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
- ln -sf ${sbindir}/swapon ${D}${sbindir}/swapoff.${PN}
+ rm ${D}${sbindir}/swapoff -f
+ ln -sf ${base_sbindir}/swapon.${PN} ${D}${base_sbindir}/swapoff.${PN}
ln -sf ${sbindir}/shutdown ${D}${sbindir}/reboot.${PN}
ln -sf ${sbindir}/shutdown ${D}${sbindir}/halt.${PN}
ln -sf ${sbindir}/shutdown ${D}${sbindir}/fastboot
ln -sf ${sbindir}/shutdown ${D}${sbindir}/fasthalt
}
+python populate_packages_prepend () {
+ ulinxng_libdir = bb.data.expand('${libdir}', d)
+ ulinxng_libdir_dbg = bb.data.expand('${libdir}/.debug', d)
+ do_split_packages(d, ulinxng_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'util-linux-ng %s development package', extra_depends='${PN}-dev', allow_links=True)
+ do_split_packages(d, ulinxng_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'util-linux-ng %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, ulinxng_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'util-linux-ng %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, ulinxng_libdir, '^lib(.*)\.so\.*', 'lib%s', 'util-linux-ng %s library', extra_depends='', allow_links=True)
+}
+
+
pkg_postinst_${PN} () {
update-alternatives --install ${base_bindir}/dmesg dmesg dmesg.${PN} 100
update-alternatives --install ${base_bindir}/kill kill kill.${PN} 100
diff --git a/recipes/util-linux-ng/util-linux-ng_2.13.1.bb b/recipes/util-linux-ng/util-linux-ng_2.13.1.bb
index 8fded14fbe..c239b15226 100644
--- a/recipes/util-linux-ng/util-linux-ng_2.13.1.bb
+++ b/recipes/util-linux-ng/util-linux-ng_2.13.1.bb
@@ -5,4 +5,4 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v2.13/util-linux-ng
#SRC_URI += "file://glibc-fix.patch;patch=1"
#SRC_URI += "file://glibc-umount2.patch;patch=1"
-PR = "r1"
+PR = "${INC_PR}"
diff --git a/recipes/util-linux-ng/util-linux-ng_2.14.bb b/recipes/util-linux-ng/util-linux-ng_2.14.bb
index fdd911a07a..d7eafd3602 100644
--- a/recipes/util-linux-ng/util-linux-ng_2.14.bb
+++ b/recipes/util-linux-ng/util-linux-ng_2.14.bb
@@ -1,7 +1,6 @@
require util-linux-ng.inc
-PR = "r5"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/util-linux-ng-2.14', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+PR = "${INC_PR}"
SRC_URI += "file://util-linux-ng-uclibc-versionsort.patch;patch=1 \
file://util-linux-ng-replace-siginterrupt.patch;patch=1 \
diff --git a/recipes/util-linux-ng/util-linux-ng_2.15.bb b/recipes/util-linux-ng/util-linux-ng_2.15.bb
new file mode 100644
index 0000000000..1e36dd3ffc
--- /dev/null
+++ b/recipes/util-linux-ng/util-linux-ng_2.15.bb
@@ -0,0 +1,14 @@
+require util-linux-ng.inc
+
+PR = "${INC_PR}"
+
+SRC_URI += "file://fix-make-c.patch;patch=1 \
+ file://optional-uuid.patch;patch=1 \
+"
+
+LDFLAGS_append = " -luuid"
+LDFLAGS_append_libc-uclibc = " -luuid -lintl"
+
+do_compile_prepend() {
+ sed -i /am__append_1/d ${S}/libs/blkid/src/Makefile
+}
diff --git a/recipes/vim/gvim_7.0.bb b/recipes/vim/gvim_7.0.bb
index 78a0c54f9d..60aa04127e 100644
--- a/recipes/vim/gvim_7.0.bb
+++ b/recipes/vim/gvim_7.0.bb
@@ -3,8 +3,8 @@ VIMVER = "70"
require vim.inc
DEPENDS += "gtk+ xt"
-PR = "r1"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/vim-7.0', '${FILE_DIRNAME}/vim', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+PR = "${INC_PR}.1"
+FILESPATHPKG =. "vim-${PV}:vim:"
EXTRA_OECONF = "--enable-gui=gtk2 --enable-gtk2-test --disable-gtktest \
--disable-xim --with-features=big \
diff --git a/recipes/vim/vim.inc b/recipes/vim/vim.inc
index f675ce839f..c160448a5e 100644
--- a/recipes/vim/vim.inc
+++ b/recipes/vim/vim.inc
@@ -3,12 +3,14 @@ SECTION = "console/utils"
DEPENDS = "ncurses"
LICENSE = "vim"
+INC_PR = "r3"
+
SRC_URI = "ftp://ftp.vim.org/pub/vim/unix/vim-${PV}.tar.bz2 \
file://configure.patch;patch=1"
S = "${WORKDIR}/vim${VIMVER}/src"
-inherit autotools
+inherit autotools update-alternatives
do_configure () {
rm -f auto/*
@@ -28,3 +30,8 @@ FILES_vim-tutor = "${datadir}/vim/vim${VIMVER}/tutor ${bindir}/vimtutor"
#FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* \
# ${libdir}/*/ ${sysconfdir} ${sharedstatedir} ${localstatedir} \
# /bin /sbin /lib/*/ /lib/*.so* ${datadir}/vim"
+
+ALTERNATIVE_NAME = "vi"
+ALTERNATIVE_PATH = "${bindir}/vim"
+ALTERNATIVE_LINK = "${base_bindir}/vi"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/recipes/vim/vim_6.4.bb b/recipes/vim/vim_6.4.bb
index 4cf6591a66..d062bc5236 100644
--- a/recipes/vim/vim_6.4.bb
+++ b/recipes/vim/vim_6.4.bb
@@ -2,6 +2,8 @@ VIMVER = "64"
require vim.inc
+PR = "${INC_PR}.1"
+
EXTRA_OECONF = "--enable-gui=none --disable-gtktest \
--disable-xim --with-features=normal \
--disable-gpm --without-x --disable-netbeans \
diff --git a/recipes/vim/vim_7.0.bb b/recipes/vim/vim_7.0.bb
index c821f6e974..e3fa7ab1e9 100644
--- a/recipes/vim/vim_7.0.bb
+++ b/recipes/vim/vim_7.0.bb
@@ -2,7 +2,7 @@ VIMVER = "70"
require vim.inc
-PR = "r1"
+PR = "${INC_PR}.1"
EXTRA_OECONF = "--enable-gui=none --disable-gtktest \
--disable-xim --with-features=big \
diff --git a/recipes/vnc/x11vnc_0.9.7.bb b/recipes/vnc/x11vnc_0.9.7.bb
new file mode 100644
index 0000000000..f3d706be5b
--- /dev/null
+++ b/recipes/vnc/x11vnc_0.9.7.bb
@@ -0,0 +1,10 @@
+DESCRIPTION = "Export your X session on-the-fly via VNC"
+HOMEPAGE = "http://www.karlrunge.com/x11vnc/"
+AUTHOR = "Karl Runge"
+SECTION = "x11/utils"
+LICENSE = "GPL"
+DEPENDS = "openssl virtual/libx11 libxtst libxext avahi jpeg zlib"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/x11vnc-${PV}.tar.gz"
+
+inherit autotools
diff --git a/recipes/webkit/webkit-gtk/GNUmakefile.am b/recipes/webkit/webkit-gtk/GNUmakefile.am
index 957078fb12..c87ee49c14 100644
--- a/recipes/webkit/webkit-gtk/GNUmakefile.am
+++ b/recipes/webkit/webkit-gtk/GNUmakefile.am
@@ -36,47 +36,93 @@ GENPROGRAMS := $(top_builddir)/Programs
# Script for creating hash tables
CREATE_HASH_TABLE = $(srcdir)/JavaScriptCore/create_hash_table
+# Programs to run the WebKitGtk unit tests
+GTESTER = gtester
+GTESTER_REPORT = gtester-report
+
# Libraries and support components
bin_PROGRAMS :=
-
noinst_PROGRAMS :=
-
noinst_HEADERS :=
-
lib_LIBRARIES :=
-
IDL_BINDINGS :=
-
TEST_PROGS :=
-
-# Gettext stuff
POFILES :=
-
MOFILES :=
-
-# Global flags to CPP
+javascriptcore_h_api :=
+javascriptcore_cppflags:=
+javascriptcore_sources :=
+javascriptcore_built_sources :=
+javascriptcore_built_nosources :=
+javascriptcore_dist :=
+webcore_cppflags :=
+webcore_sources :=
+webcore_libadd :=
+webcore_built_sources :=
+webcore_built_nosources :=
+webcore_dist :=
+webcoregtk_cppflags :=
+webcoregtk_sources :=
+webkitgtk_h_api :=
+webkitgtk_sources :=
+webkitgtk_cppflags :=
+webkitgtk_built_sources :=
+webkitgtk_built_nosources :=
+webkitgtk_cleanfiles :=
global_cppflags :=
+global_cflags :=
+global_cxxflags :=
+corekit_cflags :=
+corekit_cppflags :=
-global_cppflags += \
- -DWTF_USE_ICU_UNICODE=1
+# CFLAGS/CXXFLAGS used by WebCore and WebKit
+#
+# gtk+.pc already include glib, cairo, freetype and pango CFLAGS
+# Don't include them for now to reduce the noise when compiling
+# $(GLIB_CFLAGS) $(CAIRO_CFLAGS) $(PANGO_CFLAGS) $(FREETYPE_CFLAGS)
+corekit_cflags += \
+ -fno-strict-aliasing \
+ $(COVERAGE_CFLAGS) \
+ $(ENCHANT_CFLAGS) \
+ $(GEOCLUE_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ $(GNOMEKEYRING_CFLAGS) \
+ $(GSTREAMER_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(HILDON_CFLAGS) \
+ $(LIBSOUP_CFLAGS) \
+ $(LIBXML_CFLAGS) \
+ $(LIBXSLT_CFLAGS) \
+ $(SQLITE3_CFLAGS) \
+ $(UNICODE_CFLAGS) \
+ $(XT_CFLAGS)
+
+# When building webcore/webkit, we want WebCore/config.h and NOT
+# JavaScriptCore/config.h, hence, it's important that WebCore/ should come first
+# before JavaScriptCore in the include path.
+corekit_cppflags += \
+ $(global_cppflags) \
+ $(webcore_cppflags) \
+ $(webcoregtk_cppflags) \
+ $(javascriptcore_cppflags)
+
+if TARGET_X11
+corekit_cppflags += -DXP_UNIX
+endif
# Default compiler flags
-global_cflags := \
+global_cflags += \
-Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type \
-Wformat -Wformat-security -Wno-format-y2k -Wundef \
-Wmissing-format-attribute -Wpointer-arith -Wwrite-strings \
-Wno-unused-parameter -Wno-parentheses \
-fno-exceptions
-global_cxxflags := \
+global_cxxflags += \
+ $(global_cflags) \
$(SYMBOL_VISIBILITY_INLINES) \
-fno-rtti
-if !ENABLE_DEBUG
-global_cflags += \
- $(SYMBOL_VISIBILITY)
-endif
-
# -no-undefined required for building DLLs on Windows
# It breaks the build on other platforms, so we use it conditionally
if OS_WIN32
@@ -96,24 +142,13 @@ noinst_LTLIBRARIES = \
libJavaScriptCore.la \
libWebCore.la
-#
# JavaScriptCore
-javascriptcore_h_api :=
-javascriptcore_cppflags:=
-javascriptcore_sources :=
-javascriptcore_built_sources :=
-javascriptcore_built_nosources :=
-javascriptcore_dist :=
-
javascriptcore_cppflags += \
- -I$(srcdir)/JavaScriptCore \
-I$(srcdir)/JavaScriptCore/ForwardingHeaders \
-I$(srcdir)/JavaScriptCore/parser \
-I$(srcdir)/JavaScriptCore/wtf \
-I$(top_builddir)/DerivedSources
-# The variables above are already included below so no need to touch
-# these variables unless you really have to
nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
$(javascriptcore_built_nosources)
@@ -146,17 +181,7 @@ libJavaScriptCore_la_CPPFLAGS = \
$(global_cppflags) \
$(javascriptcore_cppflags)
-#
# WebCore
-webcore_cppflags :=
-webcore_sources :=
-webcore_libadd :=
-webcore_built_sources :=
-webcore_built_nosources :=
-webcore_dist :=
-webcoregtk_cppflags :=
-webcoregtk_sources :=
-
nodist_EXTRA_libWebCore_la_SOURCES = \
$(webcore_built_nosources)
@@ -169,65 +194,16 @@ libWebCore_la_SOURCES = \
libWebCore_la_CXXFLAGS = \
$(global_cxxflags) \
- $(libWebCore_la_CFLAGS)
+ $(corekit_cflags)
libWebCore_la_CFLAGS = \
- -fno-strict-aliasing \
$(global_cflags) \
- $(GLIB_CFLAGS) \
- $(UNICODE_CFLAGS) \
- $(LIBXML_CFLAGS) \
- $(CAIRO_CFLAGS) \
- $(PANGO_CFLAGS) \
- $(GTK_CFLAGS) \
- $(XT_CFLAGS) \
- $(LIBSOUP_CFLAGS) \
- $(FREETYPE_CFLAGS) \
- $(SQLITE3_CFLAGS) \
- $(GSTREAMER_CFLAGS) \
- $(LIBXSLT_CFLAGS) \
- $(COVERAGE_CFLAGS) \
- $(HILDON_CFLAGS) \
- $(ENCHANT_CFLAGS) \
- $(GEOCLUE_CFLAGS)
+ $(corekit_cflags)
libWebCore_la_CPPFLAGS = \
- $(global_cppflags) \
- $(webcore_cppflags) \
- $(javascriptcore_cppflags) \
- $(webcoregtk_cppflags) \
- $(HILDON_CPPFLAGS)
-
-libWebCore_la_LIBADD = \
- libJavaScriptCore.la \
- libWebCoreJS.la \
- $(webcore_libadd) \
- $(GLIB_LIBS) \
- $(LIBXML_LIBS) \
- $(CAIRO_LIBS) \
- $(PANGO_LIBS) \
- $(GTK_LIBS) \
- $(XT_LIBS) \
- $(LIBSOUP_LIBS) \
- $(FREETYPE_LIBS) \
- $(UNICODE_LIBS) \
- $(SQLITE3_LIBS) \
- $(GSTREAMER_LIBS) \
- $(LIBXSLT_LIBS) \
- $(HILDON_LIBS) \
- $(JPEG_LIBS) \
- $(PNG_LIBS) \
- $(GEOCLUE_LIBS) \
- -lpthread
+ $(corekit_cppflags)
# WebKit
-webkitgtk_h_api :=
-webkitgtk_sources :=
-webkitgtk_cppflags :=
-webkitgtk_built_sources :=
-webkitgtk_built_nosources :=
-webkitgtk_cleanfiles :=
-
nodist_libwebkit_1_0_la_SOURCES = \
$(webkitgtk_built_sources)
@@ -240,46 +216,83 @@ libwebkit_1_0_la_SOURCES = \
$(webkitgtk_sources)
libwebkit_1_0_la_CXXFLAGS = \
- $(libWebCore_la_CXXFLAGS)
+ $(global_cxxflags) \
+ $(corekit_cflags)
libwebkit_1_0_la_CFLAGS = \
- $(libWebCore_la_CFLAGS) \
- $(GNOMEKEYRING_CFLAGS)
+ $(global_cflags) \
+ $(corekit_cflags)
libwebkit_1_0_la_CPPFLAGS = \
- $(libWebCore_la_CPPFLAGS) \
- $(webkitgtk_cppflags)
+ $(corekit_cppflags) \
+ $(webkitgtk_cppflags) \
+ $(HILDON_CPPFLAGS)
libwebkit_1_0_la_LDFLAGS = \
- $(COVERAGE_LDFLAGS) \
-version-info @LIBWEBKITGTK_VERSION@ \
$(version_script) \
$(no_undefined)
libwebkit_1_0_la_LIBADD = \
+ -lpthread \
+ libJavaScriptCore.la \
libWebCore.la \
+ libWebCoreJS.la \
+ $(webcore_ldflags) \
+ $(CAIRO_LIBS) \
+ $(COVERAGE_LDFLAGS) \
$(ENCHANT_LIBS) \
- $(GNOMEKEYRING_LIBS)
+ $(FREETYPE_LIBS) \
+ $(GEOCLUE_LIBS) \
+ $(GLIB_LIBS) \
+ $(GNOMEKEYRING_LIBS) \
+ $(GSTREAMER_LIBS) \
+ $(GTK_LIBS) \
+ $(HILDON_LIBS) \
+ $(JPEG_LIBS) \
+ $(LIBSOUP_LIBS) \
+ $(LIBXML_LIBS) \
+ $(LIBXSLT_LIBS) \
+ $(PANGO_LIBS) \
+ $(PNG_LIBS) \
+ $(SQLITE3_LIBS) \
+ $(UNICODE_LIBS) \
+ $(XT_LIBS)
#
# Extra checks and flags
global_cppflags += \
-DBUILDING_CAIRO__=1 \
-DBUILDING_GTK__=1 \
- -DWTF_CHANGES \
- -DPACKAGE_LOCALE_DIR=\"$(localedir)\"
+ -DWTF_CHANGES
-if !ENABLE_FAST_MALLOC
+if USE_ICU_UNICODE
global_cppflags += \
- -DUSE_SYSTEM_MALLOC
+ -DWTF_USE_ICU_UNICODE=1
endif
-if TARGET_X11
-global_cppflags += -DXP_UNIX
+if USE_GLIB_UNICODE
+# https://bugs.webkit.org/show_bug.cgi?id=15914
+# In patch 1/4 we are compiling a hybrid version of GLib WTF Unicode
+# functionality mixed with ICU-based text codecs and TextBreakIterator.
+# For the transition, introducing an interim HYBRID macro.
+# This macro is required for compiling WTF with GLib Unicode backend,
+# but at the same time keeping ICU dependency for codecs and break iterator.
+# It will be removed with patch 3/4 of the above bug.
+global_cppflags += \
+ -DWTF_USE_GLIB_UNICODE=1 \
+ -DWTF_USE_GLIB_ICU_UNICODE_HYBRID=1
+endif
+
+if !ENABLE_FAST_MALLOC
+global_cppflags += \
+ -DUSE_SYSTEM_MALLOC
endif
if !ENABLE_DEBUG
global_cppflags += -DNDEBUG
+global_cflags += $(SYMBOL_VISIBILITY)
+
else
webcoregtk_cppflags += \
-DG_DISABLE_DEPRECATED \
@@ -293,24 +306,12 @@ webcoregtk_cppflags += \
# -DGTK_MULTIHEAD_SAFE
endif
-if !ENABLE_DATABASE
-global_cppflags += -DENABLE_DATABASE=0
-endif
-
-if !ENABLE_ICONDATABASE
-global_cppflags += -DENABLE_ICONDATABASE=0
-endif
-
if ENABLE_COVERAGE
global_cppflags += \
-DGCC_GENERATE_TEST_COVERAGE_FILES \
-DGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
endif
-if ENABLE_VIDEO
-webcore_libadd += -lgstinterfaces-0.10 -lgstvideo-0.10
-endif
-
webkitgtk_h_api += \
WebKit/gtk/webkit/webkit.h \
WebKit/gtk/webkit/webkitdefines.h \
@@ -369,15 +370,25 @@ webkitgtk_sources += \
webkitgtk_cppflags += \
-DBUILDING_WEBKIT \
+ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+ -DDATA_DIR=\"${datadir}\" \
-I$(srcdir)/WebKit/gtk \
-I$(srcdir)/WebKit/gtk/WebCoreSupport \
-I$(srcdir)/WebKit/gtk/webkit \
-I$(top_builddir)/WebKit/gtk/webkit
+if USE_GNOMEKEYRING
+webkitgtk_cppflags += \
+ -DWTF_USE_GNOMEKEYRING=1
+endif
+
webkitgtk_cleanfiles += \
+ $(top_builddir)/WebKit/gtk/docs/version.xml \
+ $(top_builddir)/WebKit/gtk/docs/GNUmakefile \
$(top_builddir)/Programs/GtkLauncher \
$(top_builddir)/WebKit/gtk/webkit-1.0.pc \
- $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h
+ $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h \
+ $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
@@ -479,9 +490,9 @@ dist_resources_DATA = \
# END WEBKIT GTK+
# Files that will be cleaned
-MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool WebKit/gtk/docs/version.xml WebKit/gtk/docs/GNUmakefile
-DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool WebKit/gtk/docs/version.xml WebKit/gtk/docs/GNUmakefile
-CLEANFILES := $(stamp_files) $(BUILT_SOURCES) WebKit/gtk/docs/GNUmakefile
+MAINTAINERCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
+DISTCLEANFILES := $(stamp_files) $(BUILT_SOURCES) doltcompile doltlibtool
+CLEANFILES := $(stamp_files) $(BUILT_SOURCES)
# Include module makefiles
include JavaScriptCore/GNUmakefile.am
@@ -494,7 +505,6 @@ noinst_PROGRAMS += $(TEST_PROGS)
webkit_tests_cflags = \
-fno-strict-aliasing \
- -O2 \
-I$(srcdir)/JavaScriptCore/ForwardingHeaders \
-I$(srcdir)/WebKit/gtk \
-I$(top_builddir)/WebKit/gtk \
@@ -509,27 +519,47 @@ webkit_tests_ldadd = \
$(GLIB_LIBS) \
$(LIBSOUP_LIBS)
-TEST_PROGS += Programs/unittests/testwebframe \
+webkit_tests_ldflags = \
+ -no-install \
+ -no-fast-install
+
+TEST_PROGS += Programs/unittests/testhttpbackend \
+ Programs/unittests/testwebframe \
Programs/unittests/testwebbackforwardlist \
Programs/unittests/testwebhistoryitem \
- Programs/unittests/testdownload
+ Programs/unittests/testdownload \
+ Programs/unittests/testatk
# Add additional tests here
+Programs_unittests_testhttpbackend_SOURCES = WebKit/gtk/tests/testhttpbackend.c
+Programs_unittests_testhttpbackend_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testhttpbackend_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testhttpbackend_LDFLAGS = $(webkit_tests_ldflags)
+
Programs_unittests_testwebframe_SOURCES = WebKit/gtk/tests/testwebframe.c
Programs_unittests_testwebframe_CFLAGS = $(webkit_tests_cflags)
Programs_unittests_testwebframe_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testwebframe_LDFLAGS = $(webkit_tests_ldflags)
Programs_unittests_testwebbackforwardlist_SOURCES = WebKit/gtk/tests/testwebbackforwardlist.c
Programs_unittests_testwebbackforwardlist_CFLAGS = $(webkit_tests_cflags)
Programs_unittests_testwebbackforwardlist_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testwebbackforwardlist_LDFLAGS = $(webkit_tests_ldflags)
Programs_unittests_testwebhistoryitem_SOURCES = WebKit/gtk/tests/testwebhistoryitem.c
Programs_unittests_testwebhistoryitem_CFLAGS = $(webkit_tests_cflags)
Programs_unittests_testwebhistoryitem_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testwebhistoryitem_LDFLAGS = $(webkit_tests_ldflags)
Programs_unittests_testdownload_SOURCES = WebKit/gtk/tests/testdownload.c
Programs_unittests_testdownload_CFLAGS = $(webkit_tests_cflags)
Programs_unittests_testdownload_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testdownload_LDFLAGS = $(webkit_tests_ldflags)
+
+Programs_unittests_testatk_SOURCES = WebKit/gtk/tests/testatk.c
+Programs_unittests_testatk_CFLAGS = $(webkit_tests_cflags)
+Programs_unittests_testatk_LDADD = $(webkit_tests_ldadd)
+Programs_unittests_testatk_LDFLAGS = $(webkit_tests_ldflags)
# Autogenerated sources
BUILT_SOURCES := \
@@ -576,3 +606,23 @@ install-data-local: po-install-data-local
installdirs-data-local: po-installdirs-data-local
uninstall-local: po-uninstall-local
+
+# Run all tests in cwd
+# FIXME: we should run this under xvfb
+test: $(TEST_PROGS)
+ $(GTESTER) --verbose $(TEST_PROGS);
+
+# test-report: run tests in cwd and generate report
+# full-report: run tests in cwd with -m perf and -m slow and generate report
+# perf-report: run tests in cwd with -m perf and generate report
+test-report full-report perf-report: $(TEST_PROGS)
+ @ case $@ in \
+ test-report) test_options="-k";; \
+ full-report) test_options="-k -m=perf";; \
+ perf-report) test_options="-k -m=perf -m=slow";; \
+ esac ; \
+ $(GTESTER) --verbose $$test_options -o test-report.xml $(TEST_PROGS); \
+ $(GTESTER_REPORT) test-report.xml > test-report.html ;
+
+.PHONY: test test-report perf-report full-report
+check-local: test
diff --git a/recipes/webkit/webkit-gtk/autogen.sh b/recipes/webkit/webkit-gtk/autogen.sh
index d32b73eb61..97beb209d2 100644
--- a/recipes/webkit/webkit-gtk/autogen.sh
+++ b/recipes/webkit/webkit-gtk/autogen.sh
@@ -15,14 +15,6 @@ AUTOMAKE_FLAGS="--foreign --add-missing"
DIE=0
-(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have gtkdocize installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
- DIE=1
-}
-
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
@@ -59,7 +51,7 @@ rm -rf $top_srcdir/autom4te.cache
touch README INSTALL
-gtkdocize $GTKDOCIZE_FLAGS || exit $?
+gtkdocize $GTKDOCIZE_FLAGS > /dev/null 2>&1 || echo "Warning: not running gtk-docize."
aclocal $ACLOCAL_FLAGS || exit $?
$LIBTOOLIZE $LIBTOOLIZE_FLAGS || exit $?
autoheader || exit $?
diff --git a/recipes/webkit/webkit-gtk/configure.ac b/recipes/webkit/webkit-gtk/configure.ac
index ffd36afd0d..19ce1eb553 100644
--- a/recipes/webkit/webkit-gtk/configure.ac
+++ b/recipes/webkit/webkit-gtk/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ(2.59)
m4_define([webkit_major_version], [1])
m4_define([webkit_minor_version], [1])
-m4_define([webkit_micro_version], [7])
+m4_define([webkit_micro_version], [8])
AC_INIT([WebKit],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/])
@@ -11,7 +11,7 @@ AC_CONFIG_AUX_DIR([autotools])
AC_SUBST(ACLOCAL_AMFLAGS, "-I autotools")
AC_CONFIG_HEADERS([autotoolsconfig.h])
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
WEBKIT_MAJOR_VERSION=webkit_major_version
WEBKIT_MINOR_VERSION=webkit_minor_version
@@ -24,7 +24,7 @@ AC_CONFIG_SRCDIR([WebCore/config.h])
dnl # Libtool library version, not to confuse with API version
dnl # see http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html#Libtool-versioning
-LIBWEBKITGTK_VERSION=7:0:5
+LIBWEBKITGTK_VERSION=8:0:6
AC_SUBST([LIBWEBKITGTK_VERSION])
AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar])
@@ -404,7 +404,6 @@ AC_MSG_RESULT([$enable_web_workers])
# turn off svg features if --disable-svg is requested
if test "$enable_svg" = "no"; then
enable_svg_animation=no
- enable_svg_filters=no
enable_svg_fonts=no
enable_svg_foreign_object=no
enable_svg_as_image=no
@@ -419,13 +418,13 @@ AC_ARG_ENABLE(svg_animation,
[],[enable_svg_animation="yes"])
AC_MSG_RESULT([$enable_svg_animation])
-# check whether to enable support for SVG filters
-AC_MSG_CHECKING([whether to enable support for SVG filters])
-AC_ARG_ENABLE(svg_filters,
- AC_HELP_STRING([--enable-svg-filters],
- [enable support for SVG filters (experimental) [default=no]]),
- [],[enable_svg_filters="no"])
-AC_MSG_RESULT([$enable_svg_filters])
+# check whether to enable support for filters
+AC_MSG_CHECKING([whether to enable support for filters])
+AC_ARG_ENABLE(filters,
+ AC_HELP_STRING([--enable-filters],
+ [enable support for filters (experimental) [default=no]]),
+ [],[enable_filters="no"])
+AC_MSG_RESULT([$enable_filters])
# check whether to enable support for SVG fonts
AC_MSG_CHECKING([whether to enable support for SVG fonts])
@@ -461,7 +460,6 @@ AC_MSG_RESULT([$enable_svg_use_element])
# check for SVG features, enabling SVG if necessary
if test "$enable_svg_animation" = "yes" || \
- test "$enable_svg_filters" = "yes" || \
test "$enable_svg_fonts" = "yes" || \
test "$enable_svg_foreign_object" = "yes" || \
test "$enable_svg_as_image" = "yes" || \
@@ -495,14 +493,19 @@ AC_ARG_ENABLE([jit],
[Enable JIT compilation default=yes]),
[],[enable_jit="yes"])
if test "$enable_jit" = "yes"; then
- case "$target_cpu" in
+ case "$host_cpu" in
+ arm)
+ AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
+ AC_DEFINE([ENABLE_JIT_OPTIMIZE_METHOD_CALLS], [1], [Define to enable optimizing method calls])
+ ;;
i*86|x86_64)
AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
- AC_DEFINE([ENABLE_WREC], [1], [Define to enable WREC])
+ AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
+ AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
- case "$target_cpu" in
+ case "$host_cpu" in
i*86)
AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
;;
@@ -513,7 +516,7 @@ if test "$enable_jit" = "yes"; then
esac
;;
*)
- enable_jit="no (CPU '$target_cpu' not supported)"
+ enable_jit="no (CPU '$host_cpu' not supported)"
;;
esac
fi
@@ -606,7 +609,8 @@ if test "$enable_video" = "yes"; then
PKG_CHECK_MODULES([GSTREAMER],
[gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
gstreamer-base-0.10,
- gstreamer-plugins-base-0.10])
+ gstreamer-plugins-base-0.10,
+ gstreamer-video-0.10])
AC_SUBST([GSTREAMER_CFLAGS])
AC_SUBST([GSTREAMER_LIBS])
fi
@@ -639,6 +643,10 @@ AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
+# Unicode backend conditionals
+AM_CONDITIONAL([USE_ICU_UNICODE], [test "$with_unicode_backend" = "icu"])
+AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"])
+
# Auth backend conditionals
AM_CONDITIONAL([USE_GNOMEKEYRING], [test "$enable_gnomekeyring" = "yes"])
@@ -658,11 +666,11 @@ AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
+AM_CONDITIONAL([ENABLE_FILTERS],[test "$enable_filters" = "yes"])
AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"])
-AM_CONDITIONAL([ENABLE_SVG_FILTERS],[test "$enable_svg_filters" = "yes"])
AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
AM_CONDITIONAL([ENABLE_SVG_FOREIGN_OBJECT],[test "$enable_svg_foreign_object" = "yes"])
AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"])
@@ -692,13 +700,14 @@ Build configuration:
Enable debugging (slow) : $enable_debug
Enable GCC build optimization : $enable_optimizations
Code coverage support : $enable_coverage
- Unicode backend : $unicode_backend
+ Unicode backend : $with_unicode_backend
Font backend : $with_font_backend
Optimized memory allocator : $enable_fast_malloc
Features:
3D Transforms : $enable_3D_transforms
JIT compilation : $enable_jit
Dashboard support : $enable_dashboard_support
+ Filters support : $enable_filters
Geolocation support : $enable_geolocation
GNOME Keyring support : $enable_gnomekeyring
JavaScript debugger/profiler support : $enable_javascript_debugger
@@ -710,7 +719,6 @@ Features:
Icon database support : $enable_icon_database
SVG support : $enable_svg
SVG animation support : $enable_svg_animation
- SVG filters support : $enable_svg_filters
SVG fonts support : $enable_svg_fonts
SVG foreign object support : $enable_svg_foreign_object
SVG as image support : $enable_svg_as_image
@@ -723,3 +731,8 @@ GTK+ configuration:
GDK target : $with_target
Hildon UI extensions : $with_hildon
"
+if test "$with_unicode_backend" = "glib"; then
+ echo " >> WARNING: the glib-based unicode backend is slow and incomplete <<"
+ echo
+ echo
+fi
diff --git a/recipes/webkit/webkit-gtk/unicode-fixes.diff b/recipes/webkit/webkit-gtk/unicode-fixes.diff
new file mode 100644
index 0000000000..03dbc0f3d1
--- /dev/null
+++ b/recipes/webkit/webkit-gtk/unicode-fixes.diff
@@ -0,0 +1,22 @@
+Index: wtf/unicode/glib/UnicodeMacrosFromICU.h
+===================================================================
+--- a/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h (revision 44458)
++++ b/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h (working copy)
+@@ -41,6 +41,17 @@
+ #define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
+ #define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
+
++#define U16_PREV(s, start, i, c) { \
++ (c)=(s)[--(i)]; \
++ if(U16_IS_TRAIL(c)) { \
++ uint16_t __c2; \
++ if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
++ --(i); \
++ (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \
++ } \
++ } \
++}
++
+ #define U16_NEXT(s, i, length, c) { \
+ (c)=(s)[(i)++]; \
+ if(U16_IS_LEAD(c)) { \
diff --git a/recipes/webkit/webkit-gtk_svn.bb b/recipes/webkit/webkit-gtk_svn.bb
index ec76d23ceb..f36671c494 100644
--- a/recipes/webkit/webkit-gtk_svn.bb
+++ b/recipes/webkit/webkit-gtk_svn.bb
@@ -20,6 +20,7 @@ SRC_URI = "\
file://symbols.filter \
file://GNUmakefile.am \
file://gtk-doc.make \
+ file://unicode-fixes.diff;patch=1;maxrev=44459 \
"
S = "${WORKDIR}/"
@@ -33,7 +34,9 @@ EXTRA_OECONF = "\
--enable-svg \
--enable-icon-database=yes \
--with-http-backend=soup \
- "
+# --with-unicode-backend=glib \
+ --with-libsoup-gnome=yes \
+"
EXTRA_AUTORECONF = " -I autotools "
@@ -67,5 +70,5 @@ FILES_${PN}launcher = "${bindir}/GtkLauncher"
FILES_${PN}launcher-dbg = "${bindir}/.debug/GtkLauncher"
FILES_libjavascriptcore = "${libdir}/libJavaScriptCore.so.*"
FILES_${PN}-webinspector = "${datadir}/webkit-1.0/webinspector/"
-FILES_${PN} += "${datadir}/webkit-1.0/resources/error.html"
+FILES_${PN} += "${datadir}/webkit-1.0/resources/error.html ${datadir}/webkit-1.0/images"
diff --git a/recipes/wget/wget.inc b/recipes/wget/wget.inc
new file mode 100644
index 0000000000..21814c8d66
--- /dev/null
+++ b/recipes/wget/wget.inc
@@ -0,0 +1,34 @@
+DESCRIPTION = "A console URL download utility featuring HTTP, FTP, and more."
+SECTION = "console/network"
+DEPENDS = ""
+INC_PR = "r7"
+LICENSE = "GPL"
+
+S = "${WORKDIR}/wget-${PV}"
+
+inherit autotools gettext
+
+# Disable checking for SSL since that searches the system paths
+EXTRA_OECONF = "--enable-ipv6 --without-ssl"
+
+# The unslung kernel does not support ipv6
+EXTRA_OECONF_unslung = "--without-ssl"
+# SlugOS kernels do not support ipv6. Can be loaded as a module.
+EXTRA_OECONF_slugos = "--without-ssl"
+
+do_configure() {
+ autotools_do_configure
+}
+
+do_install () {
+ autotools_do_install
+ mv ${D}${bindir}/wget ${D}${bindir}/wget.${PN}
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${bindir}/wget wget wget.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove wget wget.${PN}
+}
diff --git a/recipes/wget/wget_1.11.4.bb b/recipes/wget/wget_1.11.4.bb
new file mode 100644
index 0000000000..4a20bab4e8
--- /dev/null
+++ b/recipes/wget/wget_1.11.4.bb
@@ -0,0 +1,8 @@
+PR="${INC_PR}.1"
+
+DEFAULT_PREFERENCE="-1"
+SRC_URI = " \
+ ${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+"
+
+require wget.inc
diff --git a/recipes/wget/wget_1.9.1.bb b/recipes/wget/wget_1.9.1.bb
index b1e9404c01..50974ed87b 100644
--- a/recipes/wget/wget_1.9.1.bb
+++ b/recipes/wget/wget_1.9.1.bb
@@ -1,40 +1,19 @@
-DESCRIPTION = "A console URL download utility featuring HTTP, FTP, and more."
-SECTION = "console/network"
-DEPENDS = ""
-PR = "r7"
-LICENSE = "GPL"
+PR = "${INC_PR}.1"
-SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
- file://m4macros.patch;patch=1 \
- file://autotools.patch;patch=1 \
- file://ipv6-fix.patch;patch=1"
-S = "${WORKDIR}/wget-${PV}"
-
-inherit autotools gettext
-
-# Disable checking for SSL since that searches the system paths
-EXTRA_OECONF = "--enable-ipv6 --without-ssl"
+SRC_URI = " \
+ ${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+ file://m4macros.patch;patch=1 \
+ file://autotools.patch;patch=1 \
+ file://ipv6-fix.patch;patch=1 \
+"
-# SlugOS kernels do not support ipv6. Can be loaded as a module.
-EXTRA_OECONF_slugos = "--without-ssl"
+S = "${WORKDIR}/wget-${PV}"
-do_configure () {
+do_configure_prepend () {
if [ ! -e acinclude.m4 ]; then
mv aclocal.m4 acinclude.m4
fi
rm -f libtool.m4
- autotools_do_configure
}
-do_install () {
- autotools_do_install
- mv ${D}${bindir}/wget ${D}${bindir}/wget.${PN}
-}
-
-pkg_postinst_${PN} () {
- update-alternatives --install ${bindir}/wget wget wget.${PN} 100
-}
-
-pkg_prerm_${PN} () {
- update-alternatives --remove wget wget.${PN}
-}
+require wget.inc
diff --git a/recipes/wlan-ng/wlan-ng-utils.inc b/recipes/wlan-ng/wlan-ng-utils.inc
index 3dd25d9d7f..736e12b942 100644
--- a/recipes/wlan-ng/wlan-ng-utils.inc
+++ b/recipes/wlan-ng/wlan-ng-utils.inc
@@ -10,11 +10,11 @@ DEPENDS = "virtual/kernel"
SRC_URI = "file://only-the-utils.patch;patch=1 \
file://wlan-ng.modutils \
file://wlan.agent \
- file://usbctl \
file://resume \
file://pre-up \
file://post-down \
file://config.in"
+SRC_URI_append_arm = " file://usbctl"
# yeah, it's kind of backwards, but otherwise the config step will fail
inherit module
@@ -59,11 +59,14 @@ do_install() {
install -m 0755 ${WORKDIR}/post-down ${D}${sysconfdir}/network/if-post-down.d/wlan-ng
install -d ${D}${sysconfdir}/apm/resume.d
install -m 0755 ${WORKDIR}/resume ${D}${sysconfdir}/apm/resume.d/wlan-ng
- install -m 0755 ${WORKDIR}/usbctl ${D}${base_sbindir}/usbctl
install -d ${D}${mandir}/man1
install -m 0644 ${S}/man/*.1 ${D}${mandir}/man1/
rm -rf ${D}/usr/local/man
}
+do_install_append_arm() {
+ install -m 0755 ${WORKDIR}/usbctl ${D}${base_sbindir}/usbctl
+}
+
FILES_${PN}-dbg += "/sbin/.debug"
FILES_${PN} = "/etc /sbin"
diff --git a/recipes/xcb/libxcb.inc b/recipes/xcb/libxcb.inc
index 6e7bd5edec..4029decb05 100644
--- a/recipes/xcb/libxcb.inc
+++ b/recipes/xcb/libxcb.inc
@@ -7,7 +7,8 @@ PARALLEL_MAKE = ""
DEPENDS = "xcb-proto xproto libxau libxslt-native"
# DEPENDS += "xsltproc-native gperf-native"
-SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2"
+SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
+ file://configure.patch;patch=1;pnum=0"
PACKAGES =+ "libxcb-composite libxcb-damage libxcb-dpms libxcb-glx \
libxcb-randr libxcb-record libxcb-render libxcb-res \
@@ -41,6 +42,8 @@ FILES_libxcb-xvmc = "${libdir}/libxcb-xvmc.so.*"
inherit autotools pkgconfig
+EXTRA_OECONF = "STAGING_DIR=${STAGING_DIR_HOST}"
+
do_stage() {
autotools_stage_all
}
diff --git a/recipes/xcb/libxcb/configure.patch b/recipes/xcb/libxcb/configure.patch
new file mode 100644
index 0000000000..8c7ac16461
--- /dev/null
+++ b/recipes/xcb/libxcb/configure.patch
@@ -0,0 +1,13 @@
+upstream: oe-only
+
+--- configure.ac~ 2006-11-23 15:33:01.000000000 +0000
++++ configure.ac 2009-06-12 19:10:47.000000000 +0100
+@@ -50,7 +50,7 @@
+
+ # Find the xcb-proto protocol descriptions
+ AC_MSG_CHECKING(XCBPROTO_XCBINCLUDEDIR)
+-XCBPROTO_XCBINCLUDEDIR=`$PKG_CONFIG --variable=xcbincludedir xcb-proto`
++XCBPROTO_XCBINCLUDEDIR=${STAGING_DIR}`$PKG_CONFIG --variable=xcbincludedir xcb-proto`
+ AC_MSG_RESULT($XCBPROTO_XCBINCLUDEDIR)
+ AC_SUBST(XCBPROTO_XCBINCLUDEDIR)
+
diff --git a/recipes/xdg-user-dirs/xdg-user-dirs/configurefix.patch b/recipes/xdg-user-dirs/xdg-user-dirs/configurefix.patch
new file mode 100644
index 0000000000..576cdde752
--- /dev/null
+++ b/recipes/xdg-user-dirs/xdg-user-dirs/configurefix.patch
@@ -0,0 +1,18 @@
+The AM_DISABLE_STATIC appears to pull in strange libtool junk so just remove it.
+
+RP - 27/5/09
+
+Index: xdg-user-dirs-0.10/configure.ac
+===================================================================
+--- xdg-user-dirs-0.10.orig/configure.ac 2009-05-27 22:27:20.000000000 +0100
++++ xdg-user-dirs-0.10/configure.ac 2009-05-27 22:27:28.000000000 +0100
+@@ -13,8 +13,7 @@
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+-AM_PROG_MKDIR_P
+-AM_DISABLE_STATIC
++AM_PROG_MKDIR_P
+ AM_ICONV
+
+ GETTEXT_PACKAGE=xdg-user-dirs
diff --git a/recipes/xdg-user-dirs/xdg-user-dirs_0.10.bb b/recipes/xdg-user-dirs/xdg-user-dirs_0.10.bb
new file mode 100644
index 0000000000..2ea08b6b01
--- /dev/null
+++ b/recipes/xdg-user-dirs/xdg-user-dirs_0.10.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "xdg-user-dirs is a tool to help manage user directories like the desktop folder and the music folder"
+SRC_URI = "http://user-dirs.freedesktop.org/releases/xdg-user-dirs-0.10.tar.gz \
+ file://configurefix.patch;patch=1 "
+PR = "r1"
+
+inherit autotools_stage
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/skel/.config/
+ mv ${D}${sysconfdir}/xdg/user-dirs.defaults ${D}${sysconfdir}/skel/.config/user-dirs.dirs
+}
diff --git a/recipes/xmms-embedded/xmms-embedded_20040327.bb b/recipes/xmms-embedded/xmms-embedded_20040327.bb
index a8b24e709a..48c543948c 100644
--- a/recipes/xmms-embedded/xmms-embedded_20040327.bb
+++ b/recipes/xmms-embedded/xmms-embedded_20040327.bb
@@ -63,4 +63,4 @@ do_install() {
done
}
-FILES-${PN}-dbg += "${palmtopdir}/lib/xmms/Input/.debug"
+FILES_${PN}-dbg += "${palmtopdir}/lib/xmms/Input/.debug"
diff --git a/recipes/xorg-driver/xf86-input-evdev_2.2.2.bb b/recipes/xorg-driver/xf86-input-evdev_2.2.2.bb
new file mode 100644
index 0000000000..792909621a
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-evdev_2.2.2.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- evdev input driver"
+PE = "1"
diff --git a/recipes/xorg-driver/xf86-input-evtouch_0.8.8.bb b/recipes/xorg-driver/xf86-input-evtouch_0.8.8.bb
new file mode 100644
index 0000000000..bf3a5a6f00
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-evtouch_0.8.8.bb
@@ -0,0 +1,7 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- evtouch input driver"
+
+
+SRC_URI = "http://www.conan.de/touchscreen/xf86-input-evtouch-0.8.8.tar.bz2 \
+"
diff --git a/recipes/xorg-driver/xf86-input-keyboard_1.3.2.bb b/recipes/xorg-driver/xf86-input-keyboard_1.3.2.bb
new file mode 100644
index 0000000000..28a834a274
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-keyboard_1.3.2.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/recipes/xorg-driver/xf86-input-mouse_1.4.0.bb b/recipes/xorg-driver/xf86-input-mouse_1.4.0.bb
new file mode 100644
index 0000000000..e6325675f8
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-mouse_1.4.0.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- mouse input driver"
+PE = "1"
diff --git a/recipes/xorg-driver/xf86-input-tslib/xserver16.patch b/recipes/xorg-driver/xf86-input-tslib/xserver16.patch
new file mode 100644
index 0000000000..c3108b645a
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-tslib/xserver16.patch
@@ -0,0 +1,26 @@
+XServer 1.6.x introduced XInput3. Official drivers were fixed by X.org
+developers. This change is based on xf86-input-citron:
+
+http://cgit.freedesktop.org/xorg/driver/xf86-input-citron/commit/?id=591674bee43061f1169ebeede653fb6d98147724
+
+Signed-off-by: Marcin Juszkiewicz <marcin@buglabs.net>
+---
+ src/tslib.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- xf86-input-tslib-0.0.5.orig/src/tslib.c
++++ xf86-input-tslib-0.0.5/src/tslib.c
+@@ -199,11 +199,13 @@ xf86TslibControlProc(DeviceIntPtr device
+ return !Success;
+ }
+
+ if (InitValuatorClassDeviceStruct(device,
+ 2,
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
+ xf86GetMotionEvents,
++#endif
+ 0, Absolute) == FALSE) {
+ ErrorF("unable to allocate Valuator class device\n");
+ return !Success;
+ }
+
diff --git a/recipes/xorg-driver/xf86-input-tslib_0.0.5.bb b/recipes/xorg-driver/xf86-input-tslib_0.0.5.bb
index f5c0186565..7e8e2e52d1 100644
--- a/recipes/xorg-driver/xf86-input-tslib_0.0.5.bb
+++ b/recipes/xorg-driver/xf86-input-tslib_0.0.5.bb
@@ -4,12 +4,12 @@ DESCRIPTION = "X.Org X server -- tslib input driver"
RRECOMMENDS += "hal"
DEPENDS += "tslib"
-PR = "r6"
SRC_URI = "http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-${PV}.tar.bz2 \
file://use-hal-for-device.diff;patch=1 \
file://01_fix-wrong-value-range-for-the-axises.diff;patch=1 \
file://dynamic-xy.patch;patch=1 \
+ file://xserver16.patch;patch=1 \
file://10-x11-input-tslib.fdi"
do_configure_prepend() {
diff --git a/recipes/xorg-driver/xf86-video-displaylink_0.3.bb b/recipes/xorg-driver/xf86-video-displaylink_0.3.bb
new file mode 100644
index 0000000000..5df8e9503d
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-displaylink_0.3.bb
@@ -0,0 +1,9 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.Org X server -- displaylink driver"
+
+RRECOMMENDS_${PN} = "kernel-module-udlfb"
+
+SRC_URI = "http://projects.unbit.it/downloads/udlfb-0.2.3_and_xf86-video-displaylink-${PV}.tar.gz"
+
+S = "${WORKDIR}/${PN}"
diff --git a/recipes/xorg-driver/xf86-video-geode/0001-probe-GPIO-device-before-asking-for-base_addr.patch b/recipes/xorg-driver/xf86-video-geode/0001-probe-GPIO-device-before-asking-for-base_addr.patch
new file mode 100644
index 0000000000..af267ba269
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-geode/0001-probe-GPIO-device-before-asking-for-base_addr.patch
@@ -0,0 +1,30 @@
+From 1c70b4d2b70155558a9b5edb79a172696c16e129 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Fri, 22 May 2009 18:02:04 -0300
+Subject: [PATCH] probe GPIO device before asking for base_addr
+
+After finding the PCI ISA device it is required to ask for the
+resources to be read, before we use the base_addr for GPIO.
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ src/geode_ddc.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/src/geode_ddc.c b/src/geode_ddc.c
+index 2533488..086dbb1 100644
+--- a/src/geode_ddc.c
++++ b/src/geode_ddc.c
+@@ -72,6 +72,9 @@ geode_gpio_iobase(void)
+ if (pci == NULL)
+ return 0;
+
++ if (pci_device_probe(pci) != 0)
++ return 0;
++
+ /* The GPIO I/O address is in resource 1 */
+ return (unsigned short)pci->regions[1].base_addr;
+ #else
+--
+1.6.3.1.54.g99dd
+
diff --git a/recipes/xorg-driver/xf86-video-geode/0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch b/recipes/xorg-driver/xf86-video-geode/0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch
new file mode 100644
index 0000000000..7408473063
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-geode/0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch
@@ -0,0 +1,56 @@
+From 312b5ad7a3e1f92abaa113c3e72c8da5cb3e6cb0 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Fri, 22 May 2009 20:40:16 -0300
+Subject: [PATCH 2/2] [GX] fix RandR to properly use dixSetPrivate
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ src/gx_randr.c | 13 +++----------
+ 1 files changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/src/gx_randr.c b/src/gx_randr.c
+index 6cdd244..68e1dbd 100644
+--- a/src/gx_randr.c
++++ b/src/gx_randr.c
+@@ -57,18 +57,13 @@ typedef struct _GXRandRInfo
+
+ #define AMD_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
+
+-#if AMD_OLDPRIV
+-
+ static int GXRandRIndex;
+
++#if AMD_OLDPRIV
+ #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[GXRandRIndex].ptr)
+ #else
+-
+-static DevPrivateKey GXRandRKey;
+-
+ #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
+- dixLookupPrivate(&(p)->devPrivates, GXRandRKey));
+-
++ dixLookupPrivate(&(p)->devPrivates, GXRandRIndex));
+ #endif
+
+ static int
+@@ -333,8 +328,6 @@ GXRandRInit(ScreenPtr pScreen, int rotation)
+ }
+ #if AMD_OLDPRIV
+ GXRandRIndex = AllocateScreenPrivateIndex();
+-#else
+- GXRandRKey = &GXRandRKey;
+ #endif
+
+ pRandr = xcalloc(sizeof(XF86RandRInfoRec), 1);
+@@ -363,7 +356,7 @@ GXRandRInit(ScreenPtr pScreen, int rotation)
+ #if AMD_OLDPRIV
+ pScreen->devPrivates[GXRandRIndex].ptr = pRandr;
+ #else
+- dixSetPrivate(&pScreen->devPrivates, GXRandRKey, pRandr);
++ dixSetPrivate(&pScreen->devPrivates, &GXRandRIndex, pRandr);
+ #endif
+ return TRUE;
+ }
+--
+1.6.3.1.54.g99dd
+
diff --git a/recipes/xorg-driver/xf86-video-geode_2.11.2.bb b/recipes/xorg-driver/xf86-video-geode_2.11.2.bb
new file mode 100644
index 0000000000..e98c4fce09
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-geode_2.11.2.bb
@@ -0,0 +1,9 @@
+require xorg-driver-video.inc
+PE = "1"
+
+COMPATIBLE_HOST = 'i.86.*-linux'
+DESCRIPTION = "X.org server -- Geode GX2/LX display driver"
+
+SRC_URI += "file://0001-probe-GPIO-device-before-asking-for-base_addr.patch;patch=1 \
+ file://0002-GX-fix-RandR-to-properly-use-dixSetPrivate.patch;patch=1 \
+ "
diff --git a/recipes/xorg-driver/xf86-video-nsc_2.8.2.bb b/recipes/xorg-driver/xf86-video-nsc_2.8.2.bb
index bf50e87839..d317223db3 100644
--- a/recipes/xorg-driver/xf86-video-nsc_2.8.2.bb
+++ b/recipes/xorg-driver/xf86-video-nsc_2.8.2.bb
@@ -1,6 +1,5 @@
require xorg-driver-video.inc
PE = "1"
-PR = "r2"
DEPENDS += " xf86dgaproto"
diff --git a/recipes/xorg-driver/xf86-video-omapfb_git.bb b/recipes/xorg-driver/xf86-video-omapfb_git.bb
index f718e7684e..cc68163df4 100644
--- a/recipes/xorg-driver/xf86-video-omapfb_git.bb
+++ b/recipes/xorg-driver/xf86-video-omapfb_git.bb
@@ -2,17 +2,20 @@ require xorg-driver-video.inc
DESCRIPTION = "X.Org X server -- OMAP display driver"
-PR ="r20"
-
-SRCREV = "ef0b41c332a710fb33f996df77bd4a96b56878da"
-PV = "0.0.1+${PR}+gitr${SRCREV}"
+SRCREV = "5317aae587a2bf48f07a8c06bfaf7bcbfd23bafc"
+PV = "0.1.1+${PR}+gitr${SRCREV}"
PE = "1"
SRC_URI = "git://git.pingu.fi/xf86-video-omapfb.git;protocol=http \
"
-SRC_URI_append_armv7a = " file://omapfb-neon.diff;patch=1"
-
S = "${WORKDIR}/git"
+EXTRA_OECONF_armv7a = " --enable-neon "
CFLAGS += " -I${STAGING_INCDIR}/xorg "
+
+# Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay)
+do_compile_prepend_armv7a () {
+ sed -i -e s:fb1:fb2:g ${S}/src/omapfb-xv.c
+}
+
diff --git a/recipes/xorg-driver/xf86-video-sisusb_0.9.1.bb b/recipes/xorg-driver/xf86-video-sisusb_0.9.1.bb
new file mode 100644
index 0000000000..8f6dfae1f6
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-sisusb_0.9.1.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/recipes/xorg-driver/xorg-driver-common.inc b/recipes/xorg-driver/xorg-driver-common.inc
index 0f24dd5e30..36c0ddf3b3 100644
--- a/recipes/xorg-driver/xorg-driver-common.inc
+++ b/recipes/xorg-driver/xorg-driver-common.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "X driver"
HOMEPAGE = "http://www.x.org"
SECTION = "x11/drivers"
LICENSE = "MIT-X"
-PR = "r2"
+PR = "r7"
DEPENDS = "randrproto xorg-server xproto"
diff --git a/recipes/xorg-lib/libx11-1.2/x11_disable_makekeys.patch b/recipes/xorg-lib/libx11-1.2/x11_disable_makekeys.patch
new file mode 100644
index 0000000000..9e9e75ea43
--- /dev/null
+++ b/recipes/xorg-lib/libx11-1.2/x11_disable_makekeys.patch
@@ -0,0 +1,23 @@
+--- /tmp/Makefile.am 2009-05-27 22:19:39.000000000 +0200
++++ libX11-1.2/src/util/Makefile.am 2009-05-27 22:21:31.000000000 +0200
+@@ -1,20 +1 @@
+-# $XdotOrg: lib/X11/src/util/Makefile.am,v 1.4 2006-02-19 02:14:12 jamey Exp $
+-
+-noinst_PROGRAMS=makekeys
+-
+-makekeys_CFLAGS=$(X11_CFLAGS)
+-
+-CC = @CC_FOR_BUILD@
+-
+ EXTRA_DIST = mkks.sh
+-
+-if LINT
+-# Check source code with tools like lint & sparse
+-
+-ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
+-
+-lint:
+- $(LINT) $(ALL_LINT_FLAGS) makekeys.c
+-
+-endif LINT
diff --git a/recipes/xorg-lib/libx11-native_1.1.5.bb b/recipes/xorg-lib/libx11-native_1.1.5.bb
new file mode 100644
index 0000000000..71b45afdf4
--- /dev/null
+++ b/recipes/xorg-lib/libx11-native_1.1.5.bb
@@ -0,0 +1,8 @@
+require libx11_${PV}.bb
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libx11"
+
+DEPENDS = "xproto-native xextproto-native libxau-native xtrans-native libxdmcp-native xcmiscproto-native xf86bigfontproto-native kbproto-native inputproto-native bigreqsproto-native util-macros-native"
+PROVIDES = ""
+
+inherit native
diff --git a/recipes/xorg-lib/libx11_1.1.4.bb b/recipes/xorg-lib/libx11_1.1.4.bb
index 7ab3a7bb94..d238c70714 100644
--- a/recipes/xorg-lib/libx11_1.1.4.bb
+++ b/recipes/xorg-lib/libx11_1.1.4.bb
@@ -19,6 +19,7 @@ do_compile() {
unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS
cd src/util;
mv makekeys.c.orig makekeys.c || true
+ sed -i -e 's:MIN_REHASH 15:MIN_REHASH 16:g' makekeys.c
touch makekeys-makekeys.o ; ${BUILD_CC} ${BUILD_CFLAGS} -I${STAGING_INCDIR_NATIVE} makekeys.c -o makekeys
# mv to stop it getting rebuilt
mv makekeys.c makekeys.c.orig
diff --git a/recipes/xorg-lib/libx11_1.1.5.bb b/recipes/xorg-lib/libx11_1.1.5.bb
index a22b7a0158..31b42eb058 100644
--- a/recipes/xorg-lib/libx11_1.1.5.bb
+++ b/recipes/xorg-lib/libx11_1.1.5.bb
@@ -5,7 +5,7 @@ DEPENDS += "bigreqsproto xproto xextproto xtrans libxau xcmiscproto \
libxdmcp xf86bigfontproto kbproto inputproto xproto-native"
PROVIDES = "virtual/libx11"
PE = "1"
-PR = "r3"
+PR = "r4"
XORG_PN = "libX11"
@@ -19,6 +19,7 @@ do_compile() {
unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS
cd src/util;
mv makekeys.c.orig makekeys.c || true
+ sed -i -e 's:MIN_REHASH 15:MIN_REHASH 16:g' makekeys.c
touch makekeys-makekeys.o ; ${BUILD_CC} ${BUILD_CFLAGS} -I${STAGING_INCDIR_NATIVE} makekeys.c -o makekeys
# mv to stop it getting rebuilt
mv makekeys.c makekeys.c.orig
diff --git a/recipes/xorg-lib/libx11_1.2.bb b/recipes/xorg-lib/libx11_1.2.bb
new file mode 100644
index 0000000000..e9665bcc2f
--- /dev/null
+++ b/recipes/xorg-lib/libx11_1.2.bb
@@ -0,0 +1,36 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "Base X libs."
+DEPENDS += "bigreqsproto xproto xextproto xtrans libxau xcmiscproto \
+ libxdmcp xf86bigfontproto kbproto inputproto xproto-native"
+PROVIDES = "virtual/libx11"
+PE = "1"
+
+XORG_PN = "libX11"
+
+SRC_URI += "file://x11_disable_makekeys.patch;patch=1 \
+ file://keysymdef_include.patch;patch=1"
+
+EXTRA_OECONF += "--without-xcb --with-keysymdef=${STAGING_INCDIR}/X11/keysymdef.h"
+
+# Dolt gets used on x86 and ppc and hardcodes 'libtool'
+do_configure_append() {
+ cp ${TARGET_PREFIX}libtool libtool || true
+}
+
+do_compile() {
+ (
+ unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS
+ cd src/util;
+ mv makekeys.c.orig makekeys.c || true
+ sed -i -e 's:MIN_REHASH 15:MIN_REHASH 16:g' makekeys.c
+ touch makekeys-makekeys.o ; ${BUILD_CC} ${BUILD_CFLAGS} -I${STAGING_INCDIR_NATIVE} makekeys.c -o makekeys
+ # mv to stop it getting rebuilt
+ mv makekeys.c makekeys.c.orig
+ cd ../../
+ ) || exit 1
+ oe_runmake
+}
+
+FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${libdir}/X11/Xcms.txt"
+FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale"
diff --git a/recipes/xorg-lib/libx11_git.bb b/recipes/xorg-lib/libx11_git.bb
index f2929624e8..6f6eae5205 100644
--- a/recipes/xorg-lib/libx11_git.bb
+++ b/recipes/xorg-lib/libx11_git.bb
@@ -5,8 +5,8 @@ SECTION = "x11/libs"
LICENSE = "XFree86"
DEPENDS = "libxcb xproto xextproto libxau xtrans libxdmcp xcmiscproto xf86bigfontproto kbproto inputproto bigreqsproto util-macros"
PROVIDES = "virtual/libx11"
-RPROVIDES = "virtual/libx11"
-PR = "r1"
+RPROVIDES = "virtual-libx11"
+PR = "r2"
FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB"
FILES_${PN}-locale += "${datadir}/X11/locale"
diff --git a/recipes/xorg-lib/libxext_1.0.5.bb b/recipes/xorg-lib/libxext_1.0.5.bb
new file mode 100644
index 0000000000..3e8aa50f7c
--- /dev/null
+++ b/recipes/xorg-lib/libxext_1.0.5.bb
@@ -0,0 +1,8 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "X11 miscellaneous extension library"
+DEPENDS += "xproto virtual/libx11 xextproto libxau"
+PROVIDES = "xext"
+PE = "1"
+
+XORG_PN = "libXext"
diff --git a/recipes/xorg-lib/pixman/0041-Fix-filler-bug.patch b/recipes/xorg-lib/pixman/0041-Fix-filler-bug.patch
new file mode 100644
index 0000000000..02bd13a0db
--- /dev/null
+++ b/recipes/xorg-lib/pixman/0041-Fix-filler-bug.patch
@@ -0,0 +1,25 @@
+From 82ea3295e435b49478cf7943100b22286baf47dc Mon Sep 17 00:00:00 2001
+From: Jonathan Morton <jmorton@sd070.hel.movial.fi>
+Date: Thu, 4 Jun 2009 10:43:41 +0300
+Subject: [PATCH] Fix filler bug.
+
+---
+ pixman/pixman-arm-neon.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
+index 18e9a16..67f0b63 100644
+--- a/pixman/pixman-arm-neon.c
++++ b/pixman/pixman-arm-neon.c
+@@ -1377,7 +1377,7 @@ pixman_fill_neon (uint32_t *bits,
+ "beq 2f\n"
+ "strh %[color], [r4]!\n"
+ "2:\n"
+- "tst r5, #1\n"
++ "tst %[width], #1\n"
+ "beq 2f\n"
+ "strb %[color], [r4]!\n"
+ "2:\n"
+--
+1.5.6.3
+
diff --git a/recipes/xorg-lib/pixman/0042-Really-fix-filler-bug.patch b/recipes/xorg-lib/pixman/0042-Really-fix-filler-bug.patch
new file mode 100644
index 0000000000..e23b9cd133
--- /dev/null
+++ b/recipes/xorg-lib/pixman/0042-Really-fix-filler-bug.patch
@@ -0,0 +1,35 @@
+From 5cdd43ac753780ef2cfd6adde822af5dcba6091f Mon Sep 17 00:00:00 2001
+From: Jonathan Morton <jmorton@sd070.hel.movial.fi>
+Date: Thu, 4 Jun 2009 15:11:40 +0300
+Subject: [PATCH] Really fix filler bug.
+
+---
+ pixman/pixman-arm-neon.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
+index cfb69f4..0c05f64 100644
+--- a/pixman/pixman-arm-neon.c
++++ b/pixman/pixman-arm-neon.c
+@@ -1369,15 +1369,15 @@ pixman_fill_neon (uint32_t *bits,
+ "2:\n"
+ "tst %[width], #4\n"
+ "beq 2f\n"
+- "str %[color], [r4]!\n"
++ "str %[color], [r4], #4\n"
+ "2:\n"
+ "tst %[width], #2\n"
+ "beq 2f\n"
+- "strh %[color], [r4]!\n"
++ "strh %[color], [r4], #2\n"
+ "2:\n"
+ "tst %[width], #1\n"
+ "beq 2f\n"
+- "strb %[color], [r4]!\n"
++ "strb %[color], [r4], #1\n"
+ "2:\n"
+
+ "subs %[height], %[height], #1\n"
+--
+1.5.6.3
+
diff --git a/recipes/xorg-lib/pixman_0.15.6.bb b/recipes/xorg-lib/pixman_0.15.6.bb
new file mode 100644
index 0000000000..2517f8f354
--- /dev/null
+++ b/recipes/xorg-lib/pixman_0.15.6.bb
@@ -0,0 +1,13 @@
+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_stage
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
diff --git a/recipes/xorg-lib/pixman_git.bb b/recipes/xorg-lib/pixman_git.bb
index 3850f086c3..6c05c0ca53 100644
--- a/recipes/xorg-lib/pixman_git.bb
+++ b/recipes/xorg-lib/pixman_git.bb
@@ -3,14 +3,18 @@ PRIORITY = "optional"
DESCRIPTION = "Low-level pixel manipulation library."
LICENSE = "X11"
-PV = "0.15.2"
+PV = "0.15.8"
+PR = "r1"
PR_append = "+gitr${SRCREV}"
-SRCREV = "e74a2847ddcb3b4c1675efaaa923e78556277dff"
+SRCREV = "3c570a815afb282df01f41acad385ff0e3e33899"
DEFAULT_PREFERENCE = "-1"
-SRC_URI = "git://anongit.freedesktop.org/pixman;protocol=git"
+SRC_URI = "git://anongit.freedesktop.org/pixman;protocol=git \
+file://0041-Fix-filler-bug.patch;patch=1 \
+file://0042-Really-fix-filler-bug.patch;patch=1 \
+"
S = "${WORKDIR}/git"
diff --git a/recipes/xorg-lib/xtrans-native_1.2.1.bb b/recipes/xorg-lib/xtrans-native_1.2.1.bb
new file mode 100644
index 0000000000..c7988c7264
--- /dev/null
+++ b/recipes/xorg-lib/xtrans-native_1.2.1.bb
@@ -0,0 +1,5 @@
+require xtrans_${PV}.bb
+
+DEPENDS = "util-macros-native"
+
+inherit native
diff --git a/recipes/xorg-lib/xtrans-native_1.2.3.bb b/recipes/xorg-lib/xtrans-native_1.2.3.bb
new file mode 100644
index 0000000000..c7988c7264
--- /dev/null
+++ b/recipes/xorg-lib/xtrans-native_1.2.3.bb
@@ -0,0 +1,5 @@
+require xtrans_${PV}.bb
+
+DEPENDS = "util-macros-native"
+
+inherit native
diff --git a/recipes/xorg-lib/xtrans-sdk_1.2.3.bb b/recipes/xorg-lib/xtrans-sdk_1.2.3.bb
new file mode 100644
index 0000000000..9f671180b2
--- /dev/null
+++ b/recipes/xorg-lib/xtrans-sdk_1.2.3.bb
@@ -0,0 +1,5 @@
+require xtrans_${PV}.bb
+
+DEPENDS = "util-macros-sdk"
+
+inherit sdk
diff --git a/recipes/xorg-lib/xtrans_1.2.3.bb b/recipes/xorg-lib/xtrans_1.2.3.bb
new file mode 100644
index 0000000000..81464f49bc
--- /dev/null
+++ b/recipes/xorg-lib/xtrans_1.2.3.bb
@@ -0,0 +1,14 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "network API translation layer to insulate X applications and \
+libraries from OS network vageries."
+PE = "1"
+PR = "r0"
+
+ALLOW_EMPTY = "1"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/xtrans"
+
+RDEPENDS_${PN}-dev = ""
+
+XORG_PN = "xtrans"
diff --git a/recipes/xorg-proto/applewmproto_1.2.0.bb b/recipes/xorg-proto/applewmproto_1.2.0.bb
new file mode 100644
index 0000000000..9f09fff7b7
--- /dev/null
+++ b/recipes/xorg-proto/applewmproto_1.2.0.bb
@@ -0,0 +1,4 @@
+require xorg-proto-common.inc
+
+PR = "r1"
+PE = "1"
diff --git a/recipes/xorg-proto/dri2proto_2.0.bb b/recipes/xorg-proto/dri2proto_2.0.bb
new file mode 100644
index 0000000000..a0e1fd3989
--- /dev/null
+++ b/recipes/xorg-proto/dri2proto_2.0.bb
@@ -0,0 +1,3 @@
+DESCRIPTION = "DRI2 extension headers"
+
+require xorg-proto-common.inc
diff --git a/recipes/xorg-proto/inputproto-native_1.5.0.bb b/recipes/xorg-proto/inputproto-native_1.5.0.bb
new file mode 100644
index 0000000000..11e0dae601
--- /dev/null
+++ b/recipes/xorg-proto/inputproto-native_1.5.0.bb
@@ -0,0 +1,7 @@
+require inputproto_${PV}.bb
+
+PR = "r1"
+
+XORG_PN = "inputproto"
+
+inherit native
diff --git a/recipes/xorg-proto/inputproto-sdk_1.5.0.bb b/recipes/xorg-proto/inputproto-sdk_1.5.0.bb
new file mode 100644
index 0000000000..f0e1985bf9
--- /dev/null
+++ b/recipes/xorg-proto/inputproto-sdk_1.5.0.bb
@@ -0,0 +1,3 @@
+require inputproto_${PV}.bb
+
+inherit sdk
diff --git a/recipes/xorg-proto/randrproto_1.3.0.bb b/recipes/xorg-proto/randrproto_1.3.0.bb
new file mode 100644
index 0000000000..85000cc900
--- /dev/null
+++ b/recipes/xorg-proto/randrproto_1.3.0.bb
@@ -0,0 +1,7 @@
+require xorg-proto-common.inc
+
+CONFLICTS = "randrext"
+PR = "r1"
+PE = "1"
+
+XORG_PN = "randrproto"
diff --git a/recipes/xorg-proto/xextproto-native_7.0.3.bb b/recipes/xorg-proto/xextproto-native_7.0.3.bb
new file mode 100644
index 0000000000..ff2bc4ffd3
--- /dev/null
+++ b/recipes/xorg-proto/xextproto-native_7.0.3.bb
@@ -0,0 +1,7 @@
+require xextproto_${PV}.bb
+
+PR = "r1"
+
+XORG_PN = "xextproto"
+
+inherit native
diff --git a/recipes/xorg-proto/xextproto-native_7.0.5.bb b/recipes/xorg-proto/xextproto-native_7.0.5.bb
new file mode 100644
index 0000000000..cdf1f09e61
--- /dev/null
+++ b/recipes/xorg-proto/xextproto-native_7.0.5.bb
@@ -0,0 +1,9 @@
+require xextproto_${PV}.bb
+
+PR = "r1"
+
+XORG_PN = "xextproto"
+
+inherit native
+
+DEPENDS += "util-macros-native"
diff --git a/recipes/xorg-proto/xextproto-sdk_7.0.5.bb b/recipes/xorg-proto/xextproto-sdk_7.0.5.bb
new file mode 100644
index 0000000000..3b182a02ff
--- /dev/null
+++ b/recipes/xorg-proto/xextproto-sdk_7.0.5.bb
@@ -0,0 +1,3 @@
+require xextproto_${PV}.bb
+
+inherit sdk
diff --git a/recipes/xorg-proto/xextproto_7.0.5.bb b/recipes/xorg-proto/xextproto_7.0.5.bb
new file mode 100644
index 0000000000..3637929316
--- /dev/null
+++ b/recipes/xorg-proto/xextproto_7.0.5.bb
@@ -0,0 +1,3 @@
+require xorg-proto-common.inc
+
+PE = "1"
diff --git a/recipes/xorg-proto/xorg-proto-common.inc b/recipes/xorg-proto/xorg-proto-common.inc
index c2b47572cf..1ab4ad91d1 100644
--- a/recipes/xorg-proto/xorg-proto-common.inc
+++ b/recipes/xorg-proto/xorg-proto-common.inc
@@ -3,6 +3,8 @@ HOMEPAGE = "http://www.x.org"
SECTION = "x11/libs"
LICENSE = "MIT-X"
+DEPENDS = "util-macros"
+
XORG_PN = "${PN}"
ALLOW_EMPTY = "1"
diff --git a/recipes/xorg-proto/xproto-native_7.0.15.bb b/recipes/xorg-proto/xproto-native_7.0.15.bb
new file mode 100644
index 0000000000..baecb29fc8
--- /dev/null
+++ b/recipes/xorg-proto/xproto-native_7.0.15.bb
@@ -0,0 +1,5 @@
+require xproto_${PV}.bb
+
+inherit native
+
+DEPENDS += "util-macros-native"
diff --git a/recipes/xorg-proto/xproto-sdk_7.0.15.bb b/recipes/xorg-proto/xproto-sdk_7.0.15.bb
new file mode 100644
index 0000000000..1c1a934bb0
--- /dev/null
+++ b/recipes/xorg-proto/xproto-sdk_7.0.15.bb
@@ -0,0 +1,3 @@
+require xproto_${PV}.bb
+
+inherit sdk
diff --git a/recipes/xorg-proto/xproto_7.0.15.bb b/recipes/xorg-proto/xproto_7.0.15.bb
new file mode 100644
index 0000000000..b403ff5615
--- /dev/null
+++ b/recipes/xorg-proto/xproto_7.0.15.bb
@@ -0,0 +1,6 @@
+require xorg-proto-common.inc
+
+PR = "r0"
+PE = "1"
+
+XORG_PN = "xproto"
diff --git a/recipes/xorg-util/util-macros-1.2.1/cross-compiler-for-checking.patch b/recipes/xorg-util/util-macros-1.2.1/cross-compiler-for-checking.patch
new file mode 100644
index 0000000000..c646ffff5b
--- /dev/null
+++ b/recipes/xorg-util/util-macros-1.2.1/cross-compiler-for-checking.patch
@@ -0,0 +1,11 @@
+--- util-macros-1.2.1/xorg-macros.m4.in-orig 2009-06-08 13:49:09.000000000 +0200
++++ util-macros-1.2.1/xorg-macros.m4.in 2009-06-08 13:51:28.000000000 +0200
+@@ -445,7 +445,7 @@
+ CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+ -Wbad-function-cast"
+- case `gcc -dumpversion` in
++ case `$CC -dumpversion 2>/dev/null` in
+ 3.4.* | 4.*)
+ CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
+ ;;
diff --git a/recipes/xorg-util/util-macros-native_1.2.1.bb b/recipes/xorg-util/util-macros-native_1.2.1.bb
new file mode 100644
index 0000000000..618e78f116
--- /dev/null
+++ b/recipes/xorg-util/util-macros-native_1.2.1.bb
@@ -0,0 +1,7 @@
+require util-macros_${PV}.bb
+
+inherit native
+
+XORG_PN = "util-macros"
+
+S = "${WORKDIR}/util-macros-${PV}"
diff --git a/recipes/xorg-util/util-macros_1.2.1.bb b/recipes/xorg-util/util-macros_1.2.1.bb
new file mode 100644
index 0000000000..ddf8874a3b
--- /dev/null
+++ b/recipes/xorg-util/util-macros_1.2.1.bb
@@ -0,0 +1,12 @@
+require xorg-util-common.inc
+
+# Version 1.2.1 uses plain `gcc' for checking the compiler version.
+# Instead, the cross compiler must be used. Whenever upgrading to
+# a new version, please recheck for this problem, otherwise it breaks
+# builds with older gcc versions!
+SRC_URI += " file://cross-compiler-for-checking.patch;patch=1"
+
+DESCRIPTION = "X autotools macros"
+PE = "1"
+
+ALLOW_EMPTY = "1"
diff --git a/recipes/xorg-xserver/files/xorg-avr32-support.diff b/recipes/xorg-xserver/files/xorg-avr32-support.diff
index dd7d379010..583191e84f 100644
--- a/recipes/xorg-xserver/files/xorg-avr32-support.diff
+++ b/recipes/xorg-xserver/files/xorg-avr32-support.diff
@@ -1,3 +1,5 @@
+upstream: applied in 82b37d35af13a9f402755e167493ab256b664b9c (2008-04-22)
+
--- /tmp/servermd.h 2007-09-30 17:27:22.310911628 +0200
+++ xorg-server-1.4/include/servermd.h 2007-09-30 17:28:25.297799199 +0200
@@ -130,6 +130,16 @@
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.2.0/split_multiple_AC_SUBST.patch b/recipes/xorg-xserver/xserver-kdrive-1.2.0/split_multiple_AC_SUBST.patch
new file mode 100644
index 0000000000..dfbe730613
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-kdrive-1.2.0/split_multiple_AC_SUBST.patch
@@ -0,0 +1,15 @@
+Index: xorg-server-1.2.0/configure.ac
+===================================================================
+--- xorg-server-1.2.0.orig/configure.ac 2007-12-12 20:57:37.000000000 +0100
++++ xorg-server-1.2.0/configure.ac 2009-06-06 23:47:54.000000000 +0200
+@@ -1667,7 +1667,9 @@
+ DIX_CFLAGS="-DHAVE_DIX_CONFIG_H"
+ AC_SUBST([DIX_CFLAGS])
+
+-AC_SUBST([libdir exec_prefix prefix])
++AC_SUBST([libdir])
++AC_SUBST([exec_prefix])
++AC_SUBST([prefix])
+
+ # Man page sections - used in config utils & generating man pages
+ XORG_MANPAGE_SECTIONS
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.3.0.0/autotools.patch b/recipes/xorg-xserver/xserver-kdrive-1.3.0.0/autotools.patch
new file mode 100644
index 0000000000..e23b89d153
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-kdrive-1.3.0.0/autotools.patch
@@ -0,0 +1,13 @@
+Index: xorg-server-1.3.0.0/configure.ac
+===================================================================
+--- xorg-server-1.3.0.0.orig/configure.ac 2009-06-11 17:04:51.000000000 +0000
++++ xorg-server-1.3.0.0/configure.ac 2009-06-11 17:05:58.000000000 +0000
+@@ -1699,8 +1699,6 @@
+ DIX_CFLAGS="-DHAVE_DIX_CONFIG_H"
+ AC_SUBST([DIX_CFLAGS])
+
+-AC_SUBST([libdir exec_prefix prefix])
+-
+ # Man page sections - used in config utils & generating man pages
+ XORG_MANPAGE_SECTIONS
+
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.4.0.90/split_multiple_AC_SUBST.patch b/recipes/xorg-xserver/xserver-kdrive-1.4.0.90/split_multiple_AC_SUBST.patch
new file mode 100644
index 0000000000..110a2a5df1
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-kdrive-1.4.0.90/split_multiple_AC_SUBST.patch
@@ -0,0 +1,15 @@
+Index: xorg-server-1.4.0.90/configure.ac
+===================================================================
+--- xorg-server-1.4.0.90.orig/configure.ac 2007-12-12 20:57:37.000000000 +0100
++++ xorg-server-1.4.0.90/configure.ac 2009-06-06 23:47:54.000000000 +0200
+@@ -1962,7 +1962,9 @@
+
+ AC_SUBST([DIX_CFLAGS])
+
+-AC_SUBST([libdir exec_prefix prefix])
++AC_SUBST([libdir])
++AC_SUBST([exec_prefix])
++AC_SUBST([prefix])
+
+ # Man page sections - used in config utils & generating man pages
+ XORG_MANPAGE_SECTIONS
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.4.0.90/w100-autofoo.patch b/recipes/xorg-xserver/xserver-kdrive-1.4.0.90/w100-autofoo.patch
index 0812a2e856..6102dadaa1 100644
--- a/recipes/xorg-xserver/xserver-kdrive-1.4.0.90/w100-autofoo.patch
+++ b/recipes/xorg-xserver/xserver-kdrive-1.4.0.90/w100-autofoo.patch
@@ -1,3 +1,5 @@
+upstream: http://bugs.freedesktop.org/show_bug.cgi?id=15882
+
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
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch b/recipes/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch
index 0812a2e856..6102dadaa1 100644
--- a/recipes/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch
+++ b/recipes/xorg-xserver/xserver-kdrive-1.4.2/w100-autofoo.patch
@@ -1,3 +1,5 @@
+upstream: http://bugs.freedesktop.org/show_bug.cgi?id=15882
+
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
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.4.99.901/w100-autofoo.patch b/recipes/xorg-xserver/xserver-kdrive-1.4.99.901/w100-autofoo.patch
index 0812a2e856..6102dadaa1 100644
--- a/recipes/xorg-xserver/xserver-kdrive-1.4.99.901/w100-autofoo.patch
+++ b/recipes/xorg-xserver/xserver-kdrive-1.4.99.901/w100-autofoo.patch
@@ -1,3 +1,5 @@
+upstream: http://bugs.freedesktop.org/show_bug.cgi?id=15882
+
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
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.4/w100-autofoo.patch b/recipes/xorg-xserver/xserver-kdrive-1.4/w100-autofoo.patch
index 0812a2e856..6102dadaa1 100644
--- a/recipes/xorg-xserver/xserver-kdrive-1.4/w100-autofoo.patch
+++ b/recipes/xorg-xserver/xserver-kdrive-1.4/w100-autofoo.patch
@@ -1,3 +1,5 @@
+upstream: http://bugs.freedesktop.org/show_bug.cgi?id=15882
+
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
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.5.3/drmfix.patch b/recipes/xorg-xserver/xserver-kdrive-1.5.3/drmfix.patch
index e0f633bc24..8ebda98975 100644
--- a/recipes/xorg-xserver/xserver-kdrive-1.5.3/drmfix.patch
+++ b/recipes/xorg-xserver/xserver-kdrive-1.5.3/drmfix.patch
@@ -1,3 +1,5 @@
+upstream: applied in b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff (2008-07-28)
+
Index: xorg-server-1.5.1/hw/xfree86/os-support/linux/Makefile.am
===================================================================
--- xorg-server-1.5.1.orig/hw/xfree86/os-support/linux/Makefile.am 2008-09-23 19:24:59.000000000 +0100
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.5.3/w100-autofoo.patch b/recipes/xorg-xserver/xserver-kdrive-1.5.3/w100-autofoo.patch
index 0812a2e856..6102dadaa1 100644
--- a/recipes/xorg-xserver/xserver-kdrive-1.5.3/w100-autofoo.patch
+++ b/recipes/xorg-xserver/xserver-kdrive-1.5.3/w100-autofoo.patch
@@ -1,3 +1,5 @@
+upstream: http://bugs.freedesktop.org/show_bug.cgi?id=15882
+
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
diff --git a/recipes/xorg-xserver/xserver-kdrive-1300_1.3.0.0.bb b/recipes/xorg-xserver/xserver-kdrive-1300_1.3.0.0.bb
new file mode 100644
index 0000000000..36ea30955d
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-kdrive-1300_1.3.0.0.bb
@@ -0,0 +1,10 @@
+# Build xserver-kdrive as xserver-kdrive-1300 to allow them to co-exist in feeds.
+# akita and spitz needs them:
+FILESPATH = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/xserver-kdrive-1.3.0.0:${@os.path.dirname(bb.data.getVar('FILE',d,1))}/xserver-kdrive:${@os.path.dirname(bb.data.getVar('FILE',d,1))}/files"
+
+PKGN = xserver-kdrive-1300
+require xserver-kdrive_1.3.0.0.bb
+
+RPROVIDES_${PN} += xserver-kdrive
+RPROVIDES_${PN}-dev += xserver-kdrive-dev
+RPROVIDES_${PN}-doc += xserver-kdrive-doc
diff --git a/recipes/xorg-xserver/xserver-kdrive-common.inc b/recipes/xorg-xserver/xserver-kdrive-common.inc
index dadfbbb5e7..b00893da6d 100644
--- a/recipes/xorg-xserver/xserver-kdrive-common.inc
+++ b/recipes/xorg-xserver/xserver-kdrive-common.inc
@@ -2,77 +2,80 @@ LICENSE = "MIT"
DEPENDS = "compositeproto damageproto fixesproto recordproto resourceproto scrnsaverproto xineramaproto videoproto xextproto xproto \
libxau libxext libxdmcp libxfont libxrandr tslib virtual/libx11 xtrans"
+PKGN ?= "xserver-kdrive"
+
PROVIDES = "virtual/xserver"
-PACKAGES =+ "xserver-kdrive-fbdev \
- xserver-kdrive-sdl \
- xserver-kdrive-fake \
- xserver-kdrive-xephyr \
- xserver-kdrive-epson \
- xserver-kdrive-ati \
- xserver-kdrive-chips \
- xserver-kdrive-i810 \
- xserver-kdrive-mach64 \
- xserver-kdrive-mga \
- xserver-kdrive-neomagic \
- xserver-kdrive-nvidia \
- xserver-kdrive-pm2 \
- xserver-kdrive-r128 \
- xserver-kdrive-smi \
- xserver-kdrive-vesa \
- xserver-kdrive-via \
- xserver-kdrive-w100 \
- "
+PACKAGES =+ "${PKGN}-fbdev \
+ ${PKGN}-sdl \
+ ${PKGN}-fake \
+ ${PKGN}-xephyr \
+ ${PKGN}-epson \
+ ${PKGN}-ati \
+ ${PKGN}-chips \
+ ${PKGN}-i810 \
+ ${PKGN}-mach64 \
+ ${PKGN}-mga \
+ ${PKGN}-neomagic \
+ ${PKGN}-nvidia \
+ ${PKGN}-pm2 \
+ ${PKGN}-r128 \
+ ${PKGN}-smi \
+ ${PKGN}-vesa \
+ ${PKGN}-via \
+ ${PKGN}-w100 \
+ "
SECTION = "x11/base"
DESCRIPTION = "X server from freedesktop.org"
-DESCRIPTION_xserver-kdrive-fbdev = "X server from freedesktop.org, supporting generic framebuffer devices"
-DESCRIPTION_xserver-kdrive-fake = "Fake X server"
-DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window"
-DESCRIPTION_xserver-kdrive-epson = "X server from freedesktop.org, supporting Epson S1D13806 devices"
-DESCRIPTION_xserver-kdrive-sdl = "X server from freedesktop.org, SDL version"
-DESCRIPTION_xserver-kdrive-w100 = "X server from freedesktop.org, supporting the ATI imageon w100 chipset"
-DESCRIPTION_xserver-kdrive-ati = "X server from freedesktop.org, supporting ATI devices"
-DESCRIPTION_xserver-kdrive-chips = "X server from freedesktop.org, supporting Chips chipsets"
-DESCRIPTION_xserver-kdrive-i810 = "X server from freedesktop.org, supporting Intel chipsets"
-DESCRIPTION_xserver-kdrive-imageon = "X server from freedesktop.org, supporting the ATI imageon 100 chipset"
-DESCRIPTION_xserver-kdrive-mach64 = "X server from freedesktop.org, supporting mach64 chipsets"
-DESCRIPTION_xserver-kdrive-mga = "X server from freedesktop.org, supporting mga chipsets"
-DESCRIPTION_xserver-kdrive-neomagic = "X server from freedesktop.org, supporting neomagic chipsets"
-DESCRIPTION_xserver-kdrive-nvidia = "X server from freedesktop.org, supporting nvidia devices"
-DESCRIPTION_xserver-kdrive-pm2 = "X server from freedesktop.org, supporting Permedia2 chipsets"
-DESCRIPTION_xserver-kdrive-r128 = "X server from freedesktop.org, supporting rage128 chipsets"
-DESCRIPTION_xserver-kdrive-smi = "X server from freedesktop.org, supporting Silicon Motion devices"
-DESCRIPTION_xserver-kdrive-vesa = "X server from freedesktop.org, supporting any card with a VESA, VGA or even EGA BIOS. x86 hardware only"
-DESCRIPTION_xserver-kdrive-via = "X server from freedesktop.org, supporting VIA chipsets"
+DESCRIPTION_${PKGN}-fbdev = "X server from freedesktop.org, supporting generic framebuffer devices"
+DESCRIPTION_${PKGN}-fake = "Fake X server"
+DESCRIPTION_${PKGN}-xephyr = "X server in an X window"
+DESCRIPTION_${PKGN}-epson = "X server from freedesktop.org, supporting Epson S1D13806 devices"
+DESCRIPTION_${PKGN}-sdl = "X server from freedesktop.org, SDL version"
+DESCRIPTION_${PKGN}-w100 = "X server from freedesktop.org, supporting the ATI imageon w100 chipset"
+DESCRIPTION_${PKGN}-ati = "X server from freedesktop.org, supporting ATI devices"
+DESCRIPTION_${PKGN}-chips = "X server from freedesktop.org, supporting Chips chipsets"
+DESCRIPTION_${PKGN}-i810 = "X server from freedesktop.org, supporting Intel chipsets"
+DESCRIPTION_${PKGN}-imageon = "X server from freedesktop.org, supporting the ATI imageon 100 chipset"
+DESCRIPTION_${PKGN}-mach64 = "X server from freedesktop.org, supporting mach64 chipsets"
+DESCRIPTION_${PKGN}-mga = "X server from freedesktop.org, supporting mga chipsets"
+DESCRIPTION_${PKGN}-neomagic = "X server from freedesktop.org, supporting neomagic chipsets"
+DESCRIPTION_${PKGN}-nvidia = "X server from freedesktop.org, supporting nvidia devices"
+DESCRIPTION_${PKGN}-pm2 = "X server from freedesktop.org, supporting Permedia2 chipsets"
+DESCRIPTION_${PKGN}-r128 = "X server from freedesktop.org, supporting rage128 chipsets"
+DESCRIPTION_${PKGN}-smi = "X server from freedesktop.org, supporting Silicon Motion devices"
+DESCRIPTION_${PKGN}-vesa = "X server from freedesktop.org, supporting any card with a VESA, VGA or even EGA BIOS. x86 hardware only"
+DESCRIPTION_${PKGN}-via = "X server from freedesktop.org, supporting VIA chipsets"
PACKAGES =+ "xserver-security-policy"
FILES_xserver-security-policy += "${libdir}/xserver/SecurityPolicy"
RRECOMMENDS_${PN} += "xserver-security-policy"
-FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev"
-FILES_xserver-kdrive-fake = "${bindir}/Xfake"
-FILES_xserver-kdrive-xephyr = "${bindir}/Xephyr"
-FILES_xserver-kdrive-epson = "${bindir}/Xepson"
-FILES_xserver-kdrive-sdl = "${bindir}/Xsdl"
-FILES_xserver-kdrive-w100 = "${bindir}/Xw100"
-FILES_xserver-kdrive-ati = "${bindir}/Xati"
-FILES_xserver-kdrive-chips = "${bindir}/Xchips"
-FILES_xserver-kdrive-i810 = "${bindir}/Xi810"
-FILES_xserver-kdrive-imageon = "${bindir}/Ximageon"
-FILES_xserver-kdrive-mach64 = "${bindir}/Xmach64"
-FILES_xserver-kdrive-mga = "${bindir}/Xmga"
-FILES_xserver-kdrive-neomagic = "${bindir}/Xneomagic"
-FILES_xserver-kdrive-nvidia = "${bindir}/Xnvidia"
-FILES_xserver-kdrive-pm2 = "${bindir}/Xpm2"
-FILES_xserver-kdrive-r128 = "${bindir}/Xr128"
-FILES_xserver-kdrive-smi = "${bindir}/Xsmi"
-FILES_xserver-kdrive-vesa = "${bindir}/Xvesa"
-FILES_xserver-kdrive-via = "${bindir}/Xvia"
+FILES_${PKGN}-fbdev = "${bindir}/Xfbdev"
+FILES_${PKGN}-fake = "${bindir}/Xfake"
+FILES_${PKGN}-xephyr = "${bindir}/Xephyr"
+FILES_${PKGN}-epson = "${bindir}/Xepson"
+FILES_${PKGN}-sdl = "${bindir}/Xsdl"
+FILES_${PKGN}-w100 = "${bindir}/Xw100"
+FILES_${PKGN}-ati = "${bindir}/Xati"
+FILES_${PKGN}-chips = "${bindir}/Xchips"
+FILES_${PKGN}-i810 = "${bindir}/Xi810"
+FILES_${PKGN}-imageon = "${bindir}/Ximageon"
+FILES_${PKGN}-mach64 = "${bindir}/Xmach64"
+FILES_${PKGN}-mga = "${bindir}/Xmga"
+FILES_${PKGN}-neomagic = "${bindir}/Xneomagic"
+FILES_${PKGN}-nvidia = "${bindir}/Xnvidia"
+FILES_${PKGN}-pm2 = "${bindir}/Xpm2"
+FILES_${PKGN}-r128 = "${bindir}/Xr128"
+FILES_${PKGN}-smi = "${bindir}/Xsmi"
+FILES_${PKGN}-vesa = "${bindir}/Xvesa"
+FILES_${PKGN}-via = "${bindir}/Xvia"
SRC_URI ?= "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
${KDRIVE_COMMON_PATCHES}"
KDRIVE_COMMON_PATCHES = " \
file://kmode.patch;patch=1 \
+ file://kmode-800_480.patch;patch=1 \
file://disable-apm.patch;patch=1 \
file://no-serial-probing.patch;patch=1 \
file://fbdev-not-fix.patch;patch=1 \
diff --git a/recipes/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb b/recipes/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb
index 3a042db0d1..18b85fdcb0 100644
--- a/recipes/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb
+++ b/recipes/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb
@@ -7,7 +7,7 @@ DEPENDS += "libxkbfile libxcalibrate"
PROVIDES = "virtual/xserver"
PE = "1"
-PR = "r6"
+PR = "r7"
FILESPATH = "${FILE_DIRNAME}/xserver-kdrive-${PV}:${FILE_DIRNAME}/xserver-kdrive:${FILE_DIRNAME}/files"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
@@ -22,7 +22,8 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://xcalibrate_coords.patch;patch=1 \
file://enable-builtin-fonts.patch;patch=1 \
file://fix-picturestr-include-order.patch;patch=1 \
- "
+ file://split_multiple_AC_SUBST.patch;patch=1 \
+ "
S = "${WORKDIR}/xorg-server-${PV}"
diff --git a/recipes/xorg-xserver/xserver-kdrive/kmode-800_480.patch b/recipes/xorg-xserver/xserver-kdrive/kmode-800_480.patch
new file mode 100644
index 0000000000..61c2ec4afc
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-kdrive/kmode-800_480.patch
@@ -0,0 +1,24 @@
+--- a/hw/kdrive/src/kmode.c~ 2009-05-28 16:30:24.000000000 +0200
++++ b/hw/kdrive/src/kmode.c 2009-05-28 16:30:24.000000000 +0200
+@@ -112,10 +112,18 @@
+ },
+
+
+- { 480, 640, 60, 0, /* VESA */
+- 0, 0, 0, KdSyncNegative, /* 31.469 */
++ { 480, 640, 60, 0, /* VESA */
++ 0, 0, 0, KdSyncNegative, /* 31.469 */
+ 0, 0, 0, KdSyncNegative, /* 59.940 */
+- },
++ },
++ { 800, 480, 51, 0,
++ 0, 0, 0, KdSyncNegative,
++ 0, 0, 0, KdSyncNegative,
++ },
++ { 480, 800, 51, 0,
++ 0, 0, 0, KdSyncNegative,
++ 0, 0, 0, KdSyncNegative,
++ },
+
+
+ /* 800x600 modes */
diff --git a/recipes/xorg-xserver/xserver-kdrive/w100-autofoo.patch b/recipes/xorg-xserver/xserver-kdrive/w100-autofoo.patch
index b53e327dae..61d0a971ac 100644
--- a/recipes/xorg-xserver/xserver-kdrive/w100-autofoo.patch
+++ b/recipes/xorg-xserver/xserver-kdrive/w100-autofoo.patch
@@ -1,3 +1,5 @@
+upstream: http://bugs.freedesktop.org/show_bug.cgi?id=15882
+
Index: git/hw/kdrive/Makefile.am
===================================================================
--- git.orig/hw/kdrive/Makefile.am 2006-09-02 12:12:13.000000000 +0200
diff --git a/recipes/xorg-xserver/xserver-kdrive_1.3.0.0.bb b/recipes/xorg-xserver/xserver-kdrive_1.3.0.0.bb
index 19669e4d89..1faa0e7990 100644
--- a/recipes/xorg-xserver/xserver-kdrive_1.3.0.0.bb
+++ b/recipes/xorg-xserver/xserver-kdrive_1.3.0.0.bb
@@ -23,6 +23,7 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://linux-keyboard-mediumraw.patch;patch=1 \
file://gumstix-kmode.patch;patch=1 \
file://fix-picturestr-include-order.patch;patch=1 \
+ file://autotools.patch;patch=1 \
"
SRC_URI_append_avr32 = " \
diff --git a/recipes/xorg-xserver/xserver-kdrive_1.4.0.90.bb b/recipes/xorg-xserver/xserver-kdrive_1.4.0.90.bb
index 70503d749c..0b347aad7b 100644
--- a/recipes/xorg-xserver/xserver-kdrive_1.4.0.90.bb
+++ b/recipes/xorg-xserver/xserver-kdrive_1.4.0.90.bb
@@ -4,7 +4,7 @@ DEPENDS += "hal libxkbfile libxcalibrate pixman"
RDEPENDS += "hal"
PE = "1"
-PR = "r5"
+PR = "r7"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
${KDRIVE_COMMON_PATCHES} \
@@ -26,6 +26,7 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://pkgconfig_fix.patch;patch=1 \
file://no_xkb.patch;patch=1;pnum=0 \
file://xorg-1.4-kdrive-rotation.patch;patch=1 \
+ file://split_multiple_AC_SUBST.patch;patch=1 \
"
S = "${WORKDIR}/xorg-server-${PV}"
diff --git a/recipes/xorg-xserver/xserver-xorg-1.3.0.0/drmfix.patch b/recipes/xorg-xserver/xserver-xorg-1.3.0.0/drmfix.patch
index 96924484af..72bdcda358 100644
--- a/recipes/xorg-xserver/xserver-xorg-1.3.0.0/drmfix.patch
+++ b/recipes/xorg-xserver/xserver-xorg-1.3.0.0/drmfix.patch
@@ -1,3 +1,5 @@
+upstream: applied in b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff (2008-07-28)
+
--- xorg-server-1.3.0.0.orig/hw/xfree86/os-support/linux/Makefile.am
+++ xorg-server-1.3.0.0/hw/xfree86/os-support/linux/Makefile.am
@@ -38,7 +38,7 @@
diff --git a/recipes/xorg-xserver/xserver-xorg-1.3.0.0/glyphstr.patch b/recipes/xorg-xserver/xserver-xorg-1.3.0.0/glyphstr.patch
index 6955727405..6dfe7baeb5 100644
--- a/recipes/xorg-xserver/xserver-xorg-1.3.0.0/glyphstr.patch
+++ b/recipes/xorg-xserver/xserver-xorg-1.3.0.0/glyphstr.patch
@@ -1,3 +1,8 @@
+upstream: https://bugs.freedesktop.org/show_bug.cgi?id=22133
+status: Rejected
+comment: It's a bit unclear if this patch was ever needed, but recent versions seem
+ to work fine without it.
+
--- xorg-server-1.3.0.0/render/glyphstr.h~ 2006-09-18 03:04:18.000000000 -0300
+++ xorg-server-1.3.0.0/render/glyphstr.h 2008-02-03 22:14:23.187159732 -0200
@@ -25,6 +25,7 @@
diff --git a/recipes/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch b/recipes/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch
index a62a767f23..dde76376f3 100644
--- a/recipes/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch
+++ b/recipes/xorg-xserver/xserver-xorg-1.4.2/drmfix.patch
@@ -1,3 +1,5 @@
+upstream: applied in b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff (2008-07-28)
+
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
diff --git a/recipes/xorg-xserver/xserver-xorg-1.4/drmfix.patch b/recipes/xorg-xserver/xserver-xorg-1.4/drmfix.patch
index a62a767f23..dde76376f3 100644
--- a/recipes/xorg-xserver/xserver-xorg-1.4/drmfix.patch
+++ b/recipes/xorg-xserver/xserver-xorg-1.4/drmfix.patch
@@ -1,3 +1,5 @@
+upstream: applied in b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff (2008-07-28)
+
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
diff --git a/recipes/xorg-xserver/xserver-xorg-1.5.1/drmfix.patch b/recipes/xorg-xserver/xserver-xorg-1.5.1/drmfix.patch
index e0f633bc24..8ebda98975 100644
--- a/recipes/xorg-xserver/xserver-xorg-1.5.1/drmfix.patch
+++ b/recipes/xorg-xserver/xserver-xorg-1.5.1/drmfix.patch
@@ -1,3 +1,5 @@
+upstream: applied in b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff (2008-07-28)
+
Index: xorg-server-1.5.1/hw/xfree86/os-support/linux/Makefile.am
===================================================================
--- xorg-server-1.5.1.orig/hw/xfree86/os-support/linux/Makefile.am 2008-09-23 19:24:59.000000000 +0100
diff --git a/recipes/xorg-xserver/xserver-xorg-1.5.3/drmfix.patch b/recipes/xorg-xserver/xserver-xorg-1.5.3/drmfix.patch
index e0f633bc24..8ebda98975 100644
--- a/recipes/xorg-xserver/xserver-xorg-1.5.3/drmfix.patch
+++ b/recipes/xorg-xserver/xserver-xorg-1.5.3/drmfix.patch
@@ -1,3 +1,5 @@
+upstream: applied in b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff (2008-07-28)
+
Index: xorg-server-1.5.1/hw/xfree86/os-support/linux/Makefile.am
===================================================================
--- xorg-server-1.5.1.orig/hw/xfree86/os-support/linux/Makefile.am 2008-09-23 19:24:59.000000000 +0100
diff --git a/recipes/xorg-xserver/xserver-xorg-1.6.1/drmfix.patch b/recipes/xorg-xserver/xserver-xorg-1.6.1/drmfix.patch
new file mode 100644
index 0000000000..8ebda98975
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-xorg-1.6.1/drmfix.patch
@@ -0,0 +1,15 @@
+upstream: applied in b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff (2008-07-28)
+
+Index: xorg-server-1.5.1/hw/xfree86/os-support/linux/Makefile.am
+===================================================================
+--- xorg-server-1.5.1.orig/hw/xfree86/os-support/linux/Makefile.am 2008-09-23 19:24:59.000000000 +0100
++++ xorg-server-1.5.1/hw/xfree86/os-support/linux/Makefile.am 2008-10-27 13:27:40.000000000 +0000
+@@ -40,7 +40,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/recipes/xorg-xserver/xserver-xorg/dri.patch b/recipes/xorg-xserver/xserver-xorg/dri.patch
index 37d0407fe4..dd94bdf6b2 100644
--- a/recipes/xorg-xserver/xserver-xorg/dri.patch
+++ b/recipes/xorg-xserver/xserver-xorg/dri.patch
@@ -1,3 +1,7 @@
+upstream: not applicable upstream. The relevant code seems to have been dropped
+ within the last three years. the outdated cvs recipe is the only bb that uses
+ this patch.
+
--- xc/extras/drm/shared/drm.h.old 2004-09-14 21:42:45.000000000 +0100
+++ xc/extras/drm/shared/drm.h 2004-09-14 21:42:47.000000000 +0100
@@ -38,7 +38,6 @@
diff --git a/recipes/xorg-xserver/xserver-xorg/drmfix.patch b/recipes/xorg-xserver/xserver-xorg/drmfix.patch
index 04b0c1ae4f..fcbeac097c 100644
--- a/recipes/xorg-xserver/xserver-xorg/drmfix.patch
+++ b/recipes/xorg-xserver/xserver-xorg/drmfix.patch
@@ -1,3 +1,5 @@
+upstream: applied in b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff (2008-07-28)
+
Index: xorg-server-X11R7.0-1.0.1/hw/xfree86/os-support/linux/Makefile.am
===================================================================
--- xorg-server-X11R7.0-1.0.1.orig/hw/xfree86/os-support/linux/Makefile.am
diff --git a/recipes/xorg-xserver/xserver-xorg/miext_layer_shadow_h.patch b/recipes/xorg-xserver/xserver-xorg/miext_layer_shadow_h.patch
deleted file mode 100644
index fbade4319a..0000000000
--- a/recipes/xorg-xserver/xserver-xorg/miext_layer_shadow_h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- temp/xorg-server-X11R7.0-1.0.1/miext/layer/Makefile.am 2005-12-01 23:02:44.000000000 -0700
-+++ xorg-server-X11R7.0-1.0.1/miext/layer/Makefile.am 2006-04-18 23:16:04.315823560 -0600
-@@ -2,7 +2,7 @@
-
- AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@
-
--INCLUDES = -I$(top_srcdir)/hw/xfree86/os-support
-+INCLUDES = -I$(top_srcdir)/miext/shadow -I$(top_srcdir)/hw/xfree86/os-support
-
- liblayer_la_SOURCES = \
- layer.h \
diff --git a/recipes/xorg-xserver/xserver-xorg/no-screen-blanking.patch b/recipes/xorg-xserver/xserver-xorg/no-screen-blanking.patch
index 021ba6cded..cd7cbe371c 100644
--- a/recipes/xorg-xserver/xserver-xorg/no-screen-blanking.patch
+++ b/recipes/xorg-xserver/xserver-xorg/no-screen-blanking.patch
@@ -1,3 +1,5 @@
+upstream: not applicable to upstream
+
--- xserver/include/site.h-orig 2006-11-02 10:37:14.000000000 +0000
+++ xserver/include/site.h 2006-11-02 10:37:14.000000000 +0000
@@ -117,8 +117,8 @@
diff --git a/recipes/xorg-xserver/xserver-xorg_1.6.1.bb b/recipes/xorg-xserver/xserver-xorg_1.6.1.bb
new file mode 100644
index 0000000000..a177b19e6a
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-xorg_1.6.1.bb
@@ -0,0 +1,13 @@
+require xorg-xserver-common.inc
+
+DESCRIPTION = "the X.Org X server"
+DEPENDS += "pixman libpciaccess openssl xineramaproto libxinerama"
+RDEPENDS += "hal"
+PE = "2"
+PR = "r1"
+
+SRC_URI += "file://sysroot_fix.patch;patch=1"
+
+MESA_VER = "7.2"
+
+export LDFLAGS += " -ldl "
diff --git a/recipes/xserver-common/files/89xdgautostart.sh b/recipes/xserver-common/files/89xdgautostart.sh
new file mode 100644
index 0000000000..9886f9fee1
--- /dev/null
+++ b/recipes/xserver-common/files/89xdgautostart.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+XDGAUTOSTART=/etc/xdg/autostart
+if [ -d $XDGAUTOSTART ] ; then
+ for SCRIPT in $XDGAUTOSTART/*; do
+ CMD=`grep ^Exec= $SCRIPT | cut -d '=' -f 2`
+ $CMD &
+ done
+fi
diff --git a/recipes/xserver-common/files/avoid-rotated-server.patch b/recipes/xserver-common/files/avoid-rotated-server.patch
new file mode 100644
index 0000000000..7511ed9acd
--- /dev/null
+++ b/recipes/xserver-common/files/avoid-rotated-server.patch
@@ -0,0 +1,72 @@
+Index: xserver-common-1.25/X11/Xserver
+===================================================================
+--- xserver-common-1.25.orig/X11/Xserver 2009-06-18 20:48:31.000000000 +0000
++++ xserver-common-1.25/X11/Xserver 2009-06-18 20:49:36.000000000 +0000
+@@ -48,6 +48,7 @@
+
+ SCREEN_SIZE=`fallback_screen_arg`
+ export USER=root
++export XSERVER_DEFAULT_ORIENTATION=normal
+
+ ARGS="-br -pn $INPUT_EXTRA_ARGS"
+
+@@ -88,7 +89,9 @@
+ "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi")
+ ARGS="$ARGS -dpi 200 -rgba rgb" ;;
+ "SHARP Spitz" | "SHARP Akita" | "SHARP Borzoi")
+- ARGS="$ARGS -dpi 200 -rgba rgb -screen 480x640@270" ;;
++ ARGS="$ARGS -dpi 200 -rgba rgb -screen 480x640"
++ export XSERVER_DEFAULT_ORIENTATION=normal
++ ;;
+ "Simpad")
+ ARGS="$ARGS -dpi 100 -rgba rgb" ;;
+ "Generic OMAP1510/1610/1710")
+Index: xserver-common-1.25/X11/Xinit.d/11zaurus
+===================================================================
+--- xserver-common-1.25.orig/X11/Xinit.d/11zaurus 2009-06-18 20:48:31.000000000 +0000
++++ xserver-common-1.25/X11/Xinit.d/11zaurus 2009-06-18 21:07:14.000000000 +0000
+@@ -1,23 +1,35 @@
+ #!/bin/sh
+
+-if [ -z "`which chkhinge`" ]; then
+- # probably not a clamshell zaurus
+- exit 0
++if [ -z "`which chkhinge 2>/dev/null`" ]; then
++ # not a clamshell zaurus or we have kernel 2.6
++ # no rotation status check available
++ CHCK=true
++else
++ CHCK=chkhinge
+ fi
+
+ module_id() {
+ # Get model name
+- echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//" | tr a-z A-Z`
++ echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//"`
+ }
+
+-chkhinge -e
++$CHCK -e
+ if [ $? = 12 ]; then
+ case `module_id` in
+- *SPITZ | *AKITA | *BORZOI)
+- DIRECTION="left" ;;
+- default)
++ *Spitz | *Akita | *Borzoi)
++ DIRECTION="normal" ;;
++ *)
+ DIRECTION="right" ;;
+ esac
+- xrandr -o $DIRECTION
++else
++ case `module_id` in
++ *Spitz | *Akita | *Borzoi)
++ # Xfbdev needs to settle
++ sleep 2
++ DIRECTION="right" ;;
++ *)
++ DIRECTION="normal" ;;
++ esac
+ fi
+
++xrandr -o $DIRECTION
diff --git a/recipes/xserver-common/xserver-common_1.24.bb b/recipes/xserver-common/xserver-common_1.24.bb
index a30a37c893..105916018f 100644
--- a/recipes/xserver-common/xserver-common_1.24.bb
+++ b/recipes/xserver-common/xserver-common_1.24.bb
@@ -2,15 +2,18 @@ DESCRIPTION = "Common X11 scripts and support files"
LICENSE = "GPL"
SECTION = "x11"
RDEPENDS_${PN} = "xmodmap xrandr xdpyinfo"
-PR = "r0"
+PR = "r3"
PACKAGE_ARCH = "all"
# we are using a gpe-style Makefile
inherit gpe
-SRC_URI_append = " file://setDPI.sh "
+SRC_URI_append = " file://setDPI.sh \
+ file://89xdgautostart.sh \
+"
do_install_append() {
install -m 0755 "${WORKDIR}/setDPI.sh" "${D}/etc/X11/Xinit.d/50setdpi"
+ install -m 0755 "${WORKDIR}/89xdgautostart.sh" "${D}/etc/X11/Xsession.d/89xdgautostart"
}
diff --git a/recipes/xserver-common/xserver-common_1.25.bb b/recipes/xserver-common/xserver-common_1.25.bb
new file mode 100644
index 0000000000..9db0c2a8d2
--- /dev/null
+++ b/recipes/xserver-common/xserver-common_1.25.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Common X11 scripts and support files"
+LICENSE = "GPL"
+SECTION = "x11"
+RDEPENDS_${PN} = "xmodmap xrandr xdpyinfo"
+PR = "r1"
+
+PACKAGE_ARCH = "all"
+
+# we are using a gpe-style Makefile
+inherit gpe
+
+SRC_URI_append = " file://setDPI.sh \
+ file://89xdgautostart.sh \
+ file://avoid-rotated-server.patch;patch=1 \
+"
+
+do_install_append() {
+ install -m 0755 "${WORKDIR}/setDPI.sh" "${D}/etc/X11/Xinit.d/50setdpi"
+ install -m 0755 "${WORKDIR}/89xdgautostart.sh" "${D}/etc/X11/Xsession.d/89xdgautostart"
+ sed -i 's:^BINDIR=.*$:BINDIR=${bindir}:' ${D}/etc/X11/Xserver
+}
diff --git a/recipes/xserver-kdrive-common/xserver-kdrive-common/98xTs_Calibrate b/recipes/xserver-kdrive-common/xserver-kdrive-common/89xTs_Calibrate
index 70786908b6..70786908b6 100644
--- a/recipes/xserver-kdrive-common/xserver-kdrive-common/98xTs_Calibrate
+++ b/recipes/xserver-kdrive-common/xserver-kdrive-common/89xTs_Calibrate
diff --git a/recipes/xserver-kdrive-common/xserver-kdrive-common_0.1.bb b/recipes/xserver-kdrive-common/xserver-kdrive-common_0.1.bb
index 33c0a401e4..1bc3b98794 100644
--- a/recipes/xserver-kdrive-common/xserver-kdrive-common_0.1.bb
+++ b/recipes/xserver-kdrive-common/xserver-kdrive-common_0.1.bb
@@ -9,7 +9,7 @@ SRC_URI = "\
file://Xserver \
file://Xsession \
\
- file://30xTs_Calibrate \
+ file://89xTs_Calibrate \
file://60xXDefaults \
file://90xXWindowManager \
"
@@ -22,7 +22,7 @@ etcFiles = "\
Xsession \
"
sessionFiles = "\
- 30xTs_Calibrate \
+ 89xTs_Calibrate \
60xXDefaults \
90xXWindowManager \
"
diff --git a/recipes/zaurus-updater/zaurus-installer.bb b/recipes/zaurus-updater/zaurus-installer.bb
index 098110b969..e24f2aafaf 100644
--- a/recipes/zaurus-updater/zaurus-installer.bb
+++ b/recipes/zaurus-updater/zaurus-installer.bb
@@ -1,10 +1,11 @@
DESCRIPTION = "Installkit for kexecboot-kernel"
-DEPENDS = "zaurus-updater linux-kexecboot"
-PR = "r0"
+DEPENDS = "${@base_conditional('MACHINE', 'collie', 'linux-kexecboot', 'zaurus-updater linux-kexecboot', d)}"
+LICENSE = "zaurus-installer"
+PR = "r1"
PACKAGES = ""
PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = '(poodle|c7x0|spitz|akita|tosa)'
+COMPATIBLE_MACHINE = '(collie|poodle|c7x0|spitz|akita|tosa)'
S = "${WORKDIR}"
@@ -22,7 +23,9 @@ do_deploy() {
[ -f "${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}.bin" ] && cp ${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}.bin installkit-${MACHINE}/${KERNEL_IMAGETYPE}
- cp updater.sh.${MACHINE} installkit-${MACHINE}/updater.sh
+ if [ ! "${MACHINE}" = "collie" ]; then
+ cp updater.sh.${MACHINE} installkit-${MACHINE}/updater.sh
+ fi
tar czf ${DEPLOY_DIR_IMAGE}/installkit-${MACHINE}.tar.gz installkit-${MACHINE}/
md5sum ${DEPLOY_DIR_IMAGE}/installkit-${MACHINE}.tar.gz > ${DEPLOY_DIR_IMAGE}/installkit-${MACHINE}.tar.gz.md5
diff --git a/recipes/zaurusd/files/add-poodle.patch b/recipes/zaurusd/files/add-poodle.patch
index 4f91413668..3793fafa0a 100644
--- a/recipes/zaurusd/files/add-poodle.patch
+++ b/recipes/zaurusd/files/add-poodle.patch
@@ -1,16 +1,10 @@
-diff -Nur zaurusd.orig/config/mach-config/mach-poodle-functions zaurusd/config/mach-config/mach-poodle-functions
---- zaurusd.orig/config/mach-config/mach-poodle-functions 1970-01-01 01:00:00.000000000 +0100
-+++ zaurusd/config/mach-config/mach-poodle-functions 2006-05-14 12:43:01.000000000 +0200
-@@ -0,0 +1,3 @@
-+#HAVE_INPUT_SWITCHES=1
-+#HAVE_ALSA_MIXER=1
-+
-diff -Nur zaurusd.orig/config/mach-config/mach-poodle-vars zaurusd/config/mach-config/mach-poodle-vars
---- zaurusd.orig/config/mach-config/mach-poodle-vars 1970-01-01 01:00:00.000000000 +0100
-+++ zaurusd/config/mach-config/mach-poodle-vars 2006-05-14 12:42:42.000000000 +0200
-@@ -0,0 +1,9 @@
-+MACHINE=poodle
-+
+--- zaurusd/config/mach-config/mach-poodle-vars.in (revision 418)
++++ zaurusd/config/mach-config/mach-poodle-vars.in (working copy)
+@@ -1,3 +1,9 @@
+ MACHINE=poodle
+
+-ALSA_MIXER_INIT=@appconfdir@/alsa/5600-default.state
+\ No newline at end of file
+export SWITCH_EVENT_ZMIXER=1
+SWITCH_EVENT_DEVICE=/dev/input/event0
+
@@ -18,17 +12,4 @@ diff -Nur zaurusd.orig/config/mach-config/mach-poodle-vars zaurusd/config/mach-c
+#TSKEYS_DEVICE=/dev/input/event1
+
+ALSA_MIXER_INIT=@appconfdir@/alsa/poodle-default.state
-\ Kein Zeilenumbruch am Dateiende.
-diff -Nur zaurusd.orig/scripts/detect-machine zaurusd/scripts/detect-machine
---- zaurusd.orig/scripts/detect-machine 2006-05-07 13:39:11.000000000 +0200
-+++ zaurusd/scripts/detect-machine 2006-05-14 12:40:38.000000000 +0200
-@@ -27,6 +27,9 @@
- "SHARP Tosa")
- MACHINE=tosa
- ;;
-+ "SHARP Poodle")
-+ MACHINE=poodle
-+ ;;
- "Simpad")
- ;;
- "HP iPAQ H2200")
+\ No newline at end of file
diff --git a/recipes/zaurusd/files/alsa-6000x-default.state.patch b/recipes/zaurusd/files/alsa-6000x-default.state.patch
index 857b8c8b62..29c98f7879 100644
--- a/recipes/zaurusd/files/alsa-6000x-default.state.patch
+++ b/recipes/zaurusd/files/alsa-6000x-default.state.patch
@@ -1,6 +1,28 @@
---- zaurusd/config/alsa/6000x-default.state.old 2008-03-21 02:21:47.000000000 -0500
-+++ zaurusd/config/alsa/6000x-default.state 2008-03-30 07:48:06.000000000 -0500
-@@ -37,13 +37,23 @@ state.Tosa {
+--- zaurusd/config/alsa/6000x-default.state 2009-04-25 22:57:30.000000000 +0100
++++ zaurusd/config/alsa/6000x-default.state 2009-05-14 10:41:29.000000000 +0100
+@@ -6,8 +6,8 @@
+ comment.range '0 - 31'
+ iface MIXER
+ name 'Speaker Playback Volume'
+- value.0 27
+- value.1 27
++ value.0 25
++ value.1 25
+ }
+ control.2 {
+ comment.access 'read write'
+@@ -24,8 +24,8 @@
+ comment.range '0 - 31'
+ iface MIXER
+ name 'Headphone Playback Volume'
+- value.0 26
+- value.1 26
++ value.0 20
++ value.1 20
+ }
+ control.4 {
+ comment.access 'read write'
+@@ -37,13 +37,23 @@
}
control.5 {
comment.access 'read write'
@@ -25,7 +47,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -51,7 +61,7 @@ state.Tosa {
+@@ -51,7 +61,7 @@
name 'Speaker Playback Invert Switch'
value true
}
@@ -34,7 +56,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -59,7 +69,7 @@ state.Tosa {
+@@ -59,7 +69,7 @@
name 'Headphone Playback ZC Switch'
value true
}
@@ -43,7 +65,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -67,7 +77,7 @@ state.Tosa {
+@@ -67,7 +77,7 @@
name 'Mono Playback ZC Switch'
value false
}
@@ -52,7 +74,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -76,7 +86,7 @@ state.Tosa {
+@@ -76,7 +86,7 @@
name 'Mono Playback Volume'
value 0
}
@@ -61,7 +83,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -85,16 +95,16 @@ state.Tosa {
+@@ -85,16 +95,16 @@
name 'ALC Target Volume'
value 11
}
@@ -81,7 +103,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -103,7 +113,7 @@ state.Tosa {
+@@ -103,7 +113,7 @@
name 'ALC Decay Time'
value 3
}
@@ -90,7 +112,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -112,7 +122,7 @@ state.Tosa {
+@@ -112,7 +122,7 @@
name 'ALC Attack Time'
value 2
}
@@ -99,7 +121,7 @@
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -124,7 +134,7 @@ state.Tosa {
+@@ -124,7 +134,7 @@
name 'ALC Function'
value None
}
@@ -108,7 +130,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -133,7 +143,7 @@ state.Tosa {
+@@ -133,16 +143,16 @@
name 'ALC Max Volume'
value 7
}
@@ -117,16 +139,18 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -142,7 +152,7 @@ state.Tosa {
+ comment.range '0 - 3'
+ iface MIXER
name 'ALC ZC Timeout'
- value 0
+- value 1
++ value 0
}
- control.17 {
+ control.18 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -150,7 +160,7 @@ state.Tosa {
+@@ -150,7 +160,7 @@
name 'ALC ZC Switch'
value false
}
@@ -135,7 +159,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -158,7 +168,7 @@ state.Tosa {
+@@ -158,7 +168,7 @@
name 'ALC NG Switch'
value false
}
@@ -144,7 +168,7 @@
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -168,7 +178,7 @@ state.Tosa {
+@@ -168,7 +178,7 @@
name 'ALC NG Type'
value 'Constant Gain'
}
@@ -153,7 +177,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -177,16 +187,16 @@ state.Tosa {
+@@ -177,16 +187,16 @@
name 'ALC NG Threshold'
value 31
}
@@ -173,7 +197,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -195,7 +205,7 @@ state.Tosa {
+@@ -195,7 +205,7 @@
name 'ALC Headphone Volume'
value 5
}
@@ -182,7 +206,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -203,7 +213,7 @@ state.Tosa {
+@@ -203,7 +213,7 @@
name 'Out3 Switch'
value false
}
@@ -191,7 +215,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -211,7 +221,7 @@ state.Tosa {
+@@ -211,7 +221,7 @@
name 'Out3 ZC Switch'
value true
}
@@ -200,7 +224,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -220,7 +230,7 @@ state.Tosa {
+@@ -220,7 +230,7 @@
name 'Out3 Volume'
value 0
}
@@ -209,7 +233,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -229,7 +239,7 @@ state.Tosa {
+@@ -229,7 +239,7 @@
name 'PCBeep Bypass Headphone Volume'
value 0
}
@@ -218,7 +242,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -238,7 +248,7 @@ state.Tosa {
+@@ -238,7 +248,7 @@
name 'PCBeep Bypass Speaker Volume'
value 0
}
@@ -227,7 +251,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -247,16 +257,16 @@ state.Tosa {
+@@ -247,16 +257,16 @@
name 'PCBeep Bypass Phone Volume'
value 0
}
@@ -247,7 +271,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -265,7 +275,7 @@ state.Tosa {
+@@ -265,7 +275,7 @@
name 'Aux Playback Speaker Volume'
value 0
}
@@ -256,7 +280,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -274,7 +284,7 @@ state.Tosa {
+@@ -274,7 +284,7 @@
name 'Aux Playback Phone Volume'
value 0
}
@@ -265,7 +289,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -283,7 +293,7 @@ state.Tosa {
+@@ -283,7 +293,7 @@
name 'Phone Volume'
value 0
}
@@ -274,7 +298,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 2
-@@ -293,7 +303,7 @@ state.Tosa {
+@@ -293,7 +303,7 @@
value.0 23
value.1 23
}
@@ -283,7 +307,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -301,7 +311,7 @@ state.Tosa {
+@@ -301,7 +311,7 @@
name 'Capture 20dB Boost Switch'
value true
}
@@ -292,7 +316,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -309,7 +319,7 @@ state.Tosa {
+@@ -309,7 +319,7 @@
name 'Capture to Phone 20dB Boost Switch'
value true
}
@@ -301,7 +325,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -317,7 +327,7 @@ state.Tosa {
+@@ -317,7 +327,7 @@
name '3D Upper Cut-off Switch'
value false
}
@@ -310,7 +334,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -325,7 +335,7 @@ state.Tosa {
+@@ -325,7 +335,7 @@
name '3D Lower Cut-off Switch'
value false
}
@@ -319,7 +343,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -334,7 +344,7 @@ state.Tosa {
+@@ -334,7 +344,7 @@
name '3D Playback Volume'
value 0
}
@@ -328,7 +352,7 @@
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -344,7 +354,7 @@ state.Tosa {
+@@ -344,7 +354,7 @@
name 'Bass Control'
value 'Adaptive Boost'
}
@@ -337,7 +361,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -352,7 +362,7 @@ state.Tosa {
+@@ -352,7 +362,7 @@
name 'Bass Cut-off Switch'
value true
}
@@ -346,7 +370,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -360,7 +370,7 @@ state.Tosa {
+@@ -360,7 +370,7 @@
name 'Tone Cut-off Switch'
value false
}
@@ -355,7 +379,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -368,7 +378,7 @@ state.Tosa {
+@@ -368,7 +378,7 @@
name 'Playback Attenuate (-6dB) Switch'
value false
}
@@ -364,7 +388,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -377,7 +387,7 @@ state.Tosa {
+@@ -377,7 +387,7 @@
name 'Bass Volume'
value 8
}
@@ -373,7 +397,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -386,7 +396,7 @@ state.Tosa {
+@@ -386,7 +396,7 @@
name 'Treble Volume'
value 5
}
@@ -382,7 +406,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -394,7 +404,7 @@ state.Tosa {
+@@ -394,7 +404,7 @@
name 'Capture ADC Switch'
value false
}
@@ -391,7 +415,7 @@
comment.access 'read write'
comment.type ENUMERATED
comment.count 2
-@@ -405,17 +415,17 @@ state.Tosa {
+@@ -405,17 +415,17 @@
value.0 '+0.75dB Steps'
value.1 '+0.75dB Steps'
}
@@ -413,7 +437,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -423,7 +433,7 @@ state.Tosa {
+@@ -423,7 +433,7 @@
name 'Capture ZC Switch'
value false
}
@@ -422,7 +446,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -432,7 +442,7 @@ state.Tosa {
+@@ -432,7 +442,7 @@
name 'Mic 1 Volume'
value 23
}
@@ -431,7 +455,7 @@
comment.access 'read write'
comment.type INTEGER
comment.count 1
-@@ -441,7 +451,7 @@ state.Tosa {
+@@ -441,7 +451,7 @@
name 'Mic 2 Volume'
value 23
}
@@ -440,7 +464,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -449,7 +459,7 @@ state.Tosa {
+@@ -449,7 +459,7 @@
name 'Mic 20dB Boost Switch'
value false
}
@@ -449,7 +473,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -457,7 +467,7 @@ state.Tosa {
+@@ -457,7 +467,7 @@
name 'Speaker Mixer PCBeep Bypass Swi'
value false
}
@@ -458,7 +482,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -465,7 +475,7 @@ state.Tosa {
+@@ -465,7 +475,7 @@
name 'Speaker Mixer Aux Playback Swit'
value false
}
@@ -467,7 +491,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -473,7 +483,7 @@ state.Tosa {
+@@ -473,7 +483,7 @@
name 'Speaker Mixer Phone Bypass Swit'
value false
}
@@ -476,7 +500,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -481,7 +491,7 @@ state.Tosa {
+@@ -481,7 +491,7 @@
name 'Speaker Mixer Line Bypass Switc'
value false
}
@@ -485,7 +509,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -489,7 +499,7 @@ state.Tosa {
+@@ -489,7 +499,7 @@
name 'Speaker Mixer PCM Playback Swit'
value true
}
@@ -494,7 +518,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -497,7 +507,7 @@ state.Tosa {
+@@ -497,7 +507,7 @@
name 'Phone Mixer PCBeep Bypass Switc'
value false
}
@@ -503,7 +527,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -505,7 +515,7 @@ state.Tosa {
+@@ -505,7 +515,7 @@
name 'Phone Mixer Aux Playback Switch'
value false
}
@@ -512,7 +536,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -513,7 +523,7 @@ state.Tosa {
+@@ -513,7 +523,7 @@
name 'Phone Mixer Line Bypass Switch'
value false
}
@@ -521,7 +545,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -521,7 +531,7 @@ state.Tosa {
+@@ -521,7 +531,7 @@
name 'Phone Mixer PCM Playback Switch'
value false
}
@@ -530,7 +554,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -529,7 +539,7 @@ state.Tosa {
+@@ -529,7 +539,7 @@
name 'Phone Mixer Mic 1 Sidetone Swit'
value false
}
@@ -539,7 +563,7 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
-@@ -537,55 +547,103 @@ state.Tosa {
+@@ -537,7 +547,7 @@
name 'Phone Mixer Mic 2 Sidetone Swit'
value false
}
@@ -548,9 +572,8 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
- iface MIXER
-- name 'HP Mixer PCBeep Bypass Switch'
-+ name 'Right HP Mixer PCBeep Bypass Sw'
+@@ -545,7 +555,7 @@
+ name 'Right HP Mixer PCBeep Bypass Sw'
value false
}
- control.64 {
@@ -558,9 +581,8 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
- iface MIXER
-- name 'HP Mixer Aux Playback Switch'
-+ name 'Right HP Mixer Aux Playback Swi'
+@@ -553,7 +563,7 @@
+ name 'Right HP Mixer Aux Playback Swi'
value false
}
- control.65 {
@@ -568,9 +590,8 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
- iface MIXER
-- name 'HP Mixer Phone Bypass Switch'
-+ name 'Right HP Mixer Phone Bypass Swi'
+@@ -561,7 +571,7 @@
+ name 'Right HP Mixer Phone Bypass Swi'
value false
}
- control.66 {
@@ -578,9 +599,8 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
- iface MIXER
-- name 'HP Mixer Line Bypass Switch'
-+ name 'Right HP Mixer Line Bypass Swit'
+@@ -569,7 +579,7 @@
+ name 'Right HP Mixer Line Bypass Swit'
value false
}
- control.67 {
@@ -588,9 +608,8 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
- iface MIXER
-- name 'HP Mixer PCM Playback Switch'
-+ name 'Right HP Mixer PCM Playback Swi'
+@@ -577,7 +587,7 @@
+ name 'Right HP Mixer PCM Playback Swi'
value true
}
- control.68 {
@@ -598,159 +617,153 @@
comment.access 'read write'
comment.type BOOLEAN
comment.count 1
- iface MIXER
-- name 'HP Mixer Mic Sidetone Switch'
-+ name 'Right HP Mixer Mic Sidetone Swi'
+@@ -585,7 +595,7 @@
+ name 'Right HP Mixer Mic Sidetone Swi'
value false
}
- control.69 {
+ control.70 {
-+ comment.access 'read write'
-+ comment.type BOOLEAN
-+ comment.count 1
-+ iface MIXER
-+ name 'Left HP Mixer PCBeep Bypass Swi'
-+ value false
-+ }
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+@@ -593,7 +603,7 @@
+ name 'Left HP Mixer PCBeep Bypass Swi'
+ value false
+ }
+- control.70 {
+ control.71 {
-+ comment.access 'read write'
-+ comment.type BOOLEAN
-+ comment.count 1
-+ iface MIXER
-+ name 'Left HP Mixer Aux Playback Swit'
-+ value false
-+ }
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+@@ -601,7 +611,7 @@
+ name 'Left HP Mixer Aux Playback Swit'
+ value false
+ }
+- control.71 {
+ control.72 {
-+ comment.access 'read write'
-+ comment.type BOOLEAN
-+ comment.count 1
-+ iface MIXER
-+ name 'Left HP Mixer Phone Bypass Swit'
-+ value false
-+ }
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+@@ -609,7 +619,7 @@
+ name 'Left HP Mixer Phone Bypass Swit'
+ value false
+ }
+- control.72 {
+ control.73 {
-+ comment.access 'read write'
-+ comment.type BOOLEAN
-+ comment.count 1
-+ iface MIXER
-+ name 'Left HP Mixer Line Bypass Switc'
-+ value false
-+ }
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+@@ -617,7 +627,7 @@
+ name 'Left HP Mixer Line Bypass Switc'
+ value false
+ }
+- control.73 {
+ control.74 {
-+ comment.access 'read write'
-+ comment.type BOOLEAN
-+ comment.count 1
-+ iface MIXER
-+ name 'Left HP Mixer PCM Playback Swit'
-+ value true
-+ }
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+@@ -625,7 +635,7 @@
+ name 'Left HP Mixer PCM Playback Swit'
+ value true
+ }
+- control.74 {
+ control.75 {
-+ comment.access 'read write'
-+ comment.type BOOLEAN
-+ comment.count 1
-+ iface MIXER
-+ name 'Left HP Mixer Mic Sidetone Swit'
-+ value false
-+ }
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+@@ -633,7 +643,7 @@
+ name 'Left HP Mixer Mic Sidetone Swit'
+ value false
+ }
+- control.75 {
+ control.76 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -595,7 +653,7 @@ state.Tosa {
+@@ -641,9 +651,9 @@
+ comment.item.1 Line
+ iface MIXER
name 'Differential Source'
- value Mic
+- value Line
++ value Mic
}
-- control.70 {
+- control.76 {
+ control.77 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -607,7 +665,7 @@ state.Tosa {
+@@ -653,9 +663,9 @@
+ comment.item.3 Stereo
+ iface MIXER
name 'Mic Select Source'
- value Differential
+- value 'Mic 1'
++ value Differential
}
-- control.71 {
+- control.77 {
+ control.78 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -623,7 +681,7 @@ state.Tosa {
+@@ -671,7 +681,7 @@
name 'Right Capture Select'
value Mic
}
-- control.72 {
+- control.78 {
+ control.79 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -639,7 +697,7 @@ state.Tosa {
+@@ -687,7 +697,7 @@
name 'Left Capture Select'
value Mic
}
-- control.73 {
+- control.79 {
+ control.80 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -651,7 +709,7 @@ state.Tosa {
+@@ -699,7 +709,7 @@
name 'Capture Phone Mux'
value Mute
}
-- control.74 {
+- control.80 {
+ control.81 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -659,9 +717,9 @@ state.Tosa {
- comment.item.1 'Headphone Mix'
- iface MIXER
+@@ -709,7 +719,7 @@
name 'Speaker Mux'
-- value 'Headphone Mix'
-+ value 'Speaker Mix'
+ value 'Speaker Mix'
}
-- control.75 {
+- control.81 {
+ control.82 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -673,7 +731,7 @@ state.Tosa {
+@@ -721,7 +731,7 @@
name 'Out3 Mux'
value Left
}
-- control.76 {
+- control.82 {
+ control.83 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -685,7 +743,7 @@ state.Tosa {
+@@ -733,7 +743,7 @@
name 'ALC Sidetone Mux'
value Stereo
}
-- control.77 {
+- control.83 {
+ control.84 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-@@ -696,17 +754,16 @@ state.Tosa {
- comment.item.4 Off
- iface MIXER
+@@ -746,7 +756,7 @@
name 'Jack Function'
-- value Headphone
-+ value Off
+ value Off
}
-- control.78 {
+- control.84 {
+ control.85 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
-- comment.item.0 Auto
-- comment.item.1 On
-- comment.item.2 Off
-+ comment.item.0 On
-+ comment.item.1 Off
- iface MIXER
- name 'Speaker Function'
-- value Auto
-+ value On
- }
- }
diff --git a/recipes/zaurusd/files/alsa-cxx00-default.state.patch b/recipes/zaurusd/files/alsa-cxx00-default.state.patch
index b7a149be00..d65ed4a5b9 100644
--- a/recipes/zaurusd/files/alsa-cxx00-default.state.patch
+++ b/recipes/zaurusd/files/alsa-cxx00-default.state.patch
@@ -1,3 +1,6 @@
+NOTE: Patch slightly modified from original; unmodified comments from
+original patch copied below.
+=============================================================================
http://bugs.openembedded.net/show_bug.cgi?id=2617
- Fixes default ALSA state for SL-Cxx00.
* Treble level reflects kernel fix alsa-wm8750-treble.patch (>2.6.24).
@@ -13,10 +16,8 @@ http://bugs.openembedded.net/show_bug.cgi?id=2617
* Enabled Zero Cross volume changes.
- Do not alter incorrect mixer levels by zaurus-mixer-callback.
-Index: zaurusd/config/alsa/cxx00-default.state
-===================================================================
---- zaurusd.orig/config/alsa/cxx00-default.state 2006-06-28 08:45:07.000000000 +0000
-+++ zaurusd/config/alsa/cxx00-default.state 2007-11-27 23:06:43.000000000 +0000
+--- zaurusd/config/alsa/cxx00-default.state 2009-04-25 22:57:30.000000000 +0100
++++ zaurusd/config/alsa/cxx00-default.state 2009-05-14 10:41:29.000000000 +0100
@@ -6,8 +6,8 @@
comment.range '0 - 63'
iface MIXER
@@ -39,7 +40,7 @@ Index: zaurusd/config/alsa/cxx00-default.state
}
control.3 {
comment.access 'read write'
-@@ -24,26 +24,26 @@
+@@ -24,8 +24,8 @@
comment.count 2
iface MIXER
name 'Capture Switch'
@@ -50,25 +51,23 @@ Index: zaurusd/config/alsa/cxx00-default.state
}
control.4 {
comment.access 'read write'
- comment.type BOOLEAN
+@@ -33,8 +33,8 @@
comment.count 2
iface MIXER
-- name 'Out1 Playback ZC Switch'
+ name 'Headphone Playback ZC Switch'
- value.0 false
- value.1 false
-+ name 'Headphone Playback ZC Switch'
+ value.0 true
+ value.1 true
}
control.5 {
comment.access 'read write'
- comment.type BOOLEAN
+@@ -42,8 +42,8 @@
comment.count 2
iface MIXER
-- name 'Out2 Playback ZC Switch'
+ name 'Speaker Playback ZC Switch'
- value.0 false
- value.1 false
-+ name 'Speaker Playback ZC Switch'
+ value.0 true
+ value.1 true
}
@@ -148,15 +147,6 @@ Index: zaurusd/config/alsa/cxx00-default.state
}
control.34 {
comment.access 'read write'
-@@ -321,7 +321,7 @@
- comment.type BOOLEAN
- comment.count 1
- iface MIXER
-- name 'Right Out2 Playback Invert Switch'
-+ name 'Right Speaker Playback Invert Switch'
- value true
- }
- control.36 {
@@ -331,8 +331,8 @@
comment.range '0 - 3'
iface MIXER
@@ -190,27 +180,23 @@ Index: zaurusd/config/alsa/cxx00-default.state
}
control.40 {
comment.access 'read write'
-@@ -378,9 +378,9 @@
- comment.count 2
+@@ -379,8 +379,8 @@
comment.range '0 - 127'
iface MIXER
-- name 'Out1 Playback Volume'
-- value.0 120
-- value.1 120
-+ name 'Headphone Playback Volume'
+ name 'Headphone Playback Volume'
+- value.0 70
+- value.1 70
+ value.0 105
+ value.1 105
}
control.42 {
comment.access 'read write'
-@@ -388,9 +388,9 @@
- comment.count 2
+@@ -389,8 +389,8 @@
comment.range '0 - 127'
iface MIXER
-- name 'Out2 Playback Volume'
-- value.0 119
-- value.1 119
-+ name 'Speaker Playback Volume'
+ name 'Speaker Playback Volume'
+- value.0 70
+- value.1 70
+ value.0 127
+ value.1 127
}
@@ -252,50 +238,3 @@ Index: zaurusd/config/alsa/cxx00-default.state
}
control.50 {
comment.access 'read write'
-@@ -610,9 +610,8 @@
- comment.access 'read write'
- comment.type ENUMERATED
- comment.count 1
-- comment.item.0 Auto
-- comment.item.1 On
-- comment.item.2 Off
-+ comment.item.0 On
-+ comment.item.1 Off
- iface MIXER
- name 'Speaker Function'
- value On
-Index: zaurusd/scripts/zaurus-mixer-callback.in
-===================================================================
---- zaurusd.orig/scripts/zaurus-mixer-callback.in 2007-11-27 23:32:45.000000000 +0000
-+++ zaurusd/scripts/zaurus-mixer-callback.in 2007-11-27 23:36:54.000000000 +0000
-@@ -16,8 +16,6 @@
- JACK="$1"
- SPK="$2"
- LEFT="true"
--RLPLAYBACK="false"
--RLBYPASS="false"
-
- case $SPK in
- "On")
-@@ -37,8 +35,6 @@
- ;;
- "Headset" | "Mic" | "Line")
- LEFT="false"
-- RLPLAYBACK="true"
-- RLBYPASS="true"
- SPK="Off"
- ;;
- *)
-@@ -58,12 +54,6 @@
- }; /Speaker Function/ {
- N
- s:\(Speaker Function.*\n.*value \).*$:\1$SPK:
--}; /Right Mixer Left Playback/ {
--N
--s:\(Right Mixer Left Playback.*\n.*value \).*$:\1$RLPLAYBACK:
--}; /Right Mixer Left Bypass/ {
--N
--s:\(Right Mixer Left Bypass.*\n.*value \).*$:\1$RLBYPASS:
- }; /Left Mixer Playback/ {
- N
- s:\(Left Mixer Playback.*\n.*value \).*$:\1$LEFT:
diff --git a/recipes/zaurusd/files/avoid-rotated-server.patch b/recipes/zaurusd/files/avoid-rotated-server.patch
new file mode 100644
index 0000000000..0ee601222e
--- /dev/null
+++ b/recipes/zaurusd/files/avoid-rotated-server.patch
@@ -0,0 +1,126 @@
+Index: zaurusd/config/mach-config/mach-akita-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-akita-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-akita-vars.in 2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-cxx00.conf
+ TSKEYS_DEVICE=/dev/input/event1
+
+-ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
++
++export XRANDR_LANDSCAPE=right
++export XRANDR_PORTRAIT=normal
+Index: zaurusd/config/mach-config/mach-borzoi-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-borzoi-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-borzoi-vars.in 2009-06-22 20:51:00.000000000 +0000
+@@ -5,6 +5,9 @@
+ SWITCH_EVENT_DEVICE=/dev/input/event0
+
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-cxx00.conf
+-TSKEYS_DEVICE=/dev/input/event1
++TSKEYS_DEVICE=/dev/input/touchscreen0
+
+-ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
++
++export XRANDR_LANDSCAPE=right
++export XRANDR_PORTRAIT=normal
+Index: zaurusd/config/mach-config/mach-corgi-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-corgi-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-corgi-vars.in 2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-c7x0.conf
+ TSKEYS_DEVICE=/dev/input/event1
+
+-ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-htcuniversal-vars
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-htcuniversal-vars 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-htcuniversal-vars 2009-06-22 20:49:01.000000000 +0000
+@@ -2,3 +2,6 @@
+
+ export SWITCH_EVENT_ZHINGE=1
+ SWITCH_EVENT_DEVICE=/dev/input/event3
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-husky-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-husky-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-husky-vars.in 2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-c7x0.conf
+ TSKEYS_DEVICE=/dev/input/event1
+
+-ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-poodle-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-poodle-vars.in 2009-06-22 20:49:01.000000000 +0000
++++ zaurusd/config/mach-config/mach-poodle-vars.in 2009-06-22 20:51:47.000000000 +0000
+@@ -6,4 +6,7 @@
+ #TSKEYS_CONF=@appconfdir@/tskeys/zaurus-clamshell.conf
+ #TSKEYS_DEVICE=/dev/input/event1
+
+-ALSA_MIXER_INIT=@appconfdir@/alsa/poodle-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/poodle-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-shepherd-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-shepherd-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-shepherd-vars.in 2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-c7x0.conf
+ TSKEYS_DEVICE=/dev/input/event1
+
+-ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
+Index: zaurusd/config/mach-config/mach-spitz-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-spitz-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-spitz-vars.in 2009-06-22 20:51:47.000000000 +0000
+@@ -7,4 +7,7 @@
+ TSKEYS_CONF=@appconfdir@/tskeys/zaurus-cxx00.conf
+ TSKEYS_DEVICE=/dev/input/event1
+
+-ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state
++
++export XRANDR_LANDSCAPE=right
++export XRANDR_PORTRAIT=normal
+Index: zaurusd/config/mach-config/mach-tosa-vars.in
+===================================================================
+--- zaurusd.orig/config/mach-config/mach-tosa-vars.in 2009-03-07 11:04:43.000000000 +0000
++++ zaurusd/config/mach-config/mach-tosa-vars.in 2009-06-22 20:51:47.000000000 +0000
+@@ -6,4 +6,7 @@
+ #TSKEYS_CONF=@appconfdir@/tskeys/zaurus-clamshell.conf
+ #TSKEYS_DEVICE=/dev/input/event1
+
+-ALSA_MIXER_INIT=@appconfdir@/alsa/6000x-default.state
+\ No newline at end of file
++ALSA_MIXER_INIT=@appconfdir@/alsa/6000x-default.state
++
++export XRANDR_LANDSCAPE=normal
++export XRANDR_PORTRAIT=left
diff --git a/recipes/zaurusd/files/tslib-1.diff b/recipes/zaurusd/files/tslib-1.diff
deleted file mode 100644
index 8df1b83b3a..0000000000
--- a/recipes/zaurusd/files/tslib-1.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- /tmp/configure.ac 2007-08-04 10:09:46.000000000 +0200
-+++ zaurusd/configure.ac 2007-08-04 10:10:35.308400000 +0200
-@@ -45,7 +45,7 @@
- #
- # Checks for tslib
- #
-- PKG_CHECK_MODULES(TSLIB, "tslib-0.0", :, AC_MSG_ERROR([TSKeys requires tslib.]))
-+ PKG_CHECK_MODULES(TSLIB, "tslib-1.0", :, AC_MSG_ERROR([TSKeys requires tslib.]))
- AC_SUBST(TSLIB_CFLAGS)
- AC_SUBST(TSLIB_LIBS)
- fi
diff --git a/recipes/zaurusd/files/use-ts-symlink-instead-of-hardcoding.diff b/recipes/zaurusd/files/use-ts-symlink-instead-of-hardcoding.diff
index b49a21fe61..9c418ec5f9 100644
--- a/recipes/zaurusd/files/use-ts-symlink-instead-of-hardcoding.diff
+++ b/recipes/zaurusd/files/use-ts-symlink-instead-of-hardcoding.diff
@@ -42,8 +42,8 @@
ALSA_MIXER_INIT=@appconfdir@/alsa/c7x0-default.state
\ No newline at end of file
---- /tmp/mach-poodle-vars 2009-04-28 16:39:58.000000000 +0200
-+++ zaurusd/config/mach-config/mach-poodle-vars 2009-04-28 16:40:06.000000000 +0200
+--- /tmp/mach-poodle-vars.in 2009-04-28 16:39:58.000000000 +0200
++++ zaurusd/config/mach-config/mach-poodle-vars.in 2009-04-28 16:40:06.000000000 +0200
@@ -4,6 +4,6 @@
SWITCH_EVENT_DEVICE=/dev/input/event0
diff --git a/recipes/zaurusd/files/zaurus-hinge.matchbox-landscape b/recipes/zaurusd/files/zaurus-hinge.matchbox-landscape
index a048769f7d..32710b2a67 100644
--- a/recipes/zaurusd/files/zaurus-hinge.matchbox-landscape
+++ b/recipes/zaurusd/files/zaurus-hinge.matchbox-landscape
@@ -18,8 +18,8 @@
killproc ${ZD_BINDIR}/matchbox-stroke
if [ -x ${ZD_BINDIR}/xrandr ]; then
- if ! ( xrandr | awk '{print $4}' | grep -q normal )
+ if ! ( xrandr | awk '{print $4}' | grep -q $XRANDR_LANDSCAPE )
then
- ${ZD_BINDIR}/xrandr -o normal
+ ${ZD_BINDIR}/xrandr -o $XRANDR_LANDSCAPE
fi
fi
diff --git a/recipes/zaurusd/files/zaurus-hinge.matchbox-portrait b/recipes/zaurusd/files/zaurus-hinge.matchbox-portrait
index 291617cd02..e540e66906 100644
--- a/recipes/zaurusd/files/zaurus-hinge.matchbox-portrait
+++ b/recipes/zaurusd/files/zaurus-hinge.matchbox-portrait
@@ -1,9 +1,9 @@
#!/bin/sh
if [ -x ${ZD_BINDIR}/xrandr ]; then
- if ! ( xrandr | awk '{print $4}' | grep -q left )
+ if ! ( xrandr | awk '{print $4}' | grep -q $XRANDR_PORTRAIT )
then
- ${ZD_BINDIR}/xrandr -o left
+ ${ZD_BINDIR}/xrandr -o $XRANDR_PORTRAIT
fi
fi
# just to be extra safe
diff --git a/recipes/zaurusd/zaurusd_svn.bb b/recipes/zaurusd/zaurusd_svn.bb
index b2b16224fa..681ed2cd38 100644
--- a/recipes/zaurusd/zaurusd_svn.bb
+++ b/recipes/zaurusd/zaurusd_svn.bb
@@ -1,10 +1,10 @@
-DESCRIPTION = "Daemon to handle device specifc features."
+DESCRIPTION = "Daemon to handle device specific features."
SECTION = "base"
LICENSE = "GPL"
DEPENDS = "tslib"
RDEPENDS = "procps"
PV = "0.0+svn${SRCDATE}"
-PR = "r19"
+PR = "r22"
SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=zaurusd;proto=http \
file://zaurus-hinge.in \
@@ -12,9 +12,9 @@ SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=zaurusd;proto=http \
file://alsa-cxx00-default.state.patch;patch=1 \
file://alsa-6000x-default.state.patch;patch=1 \
file://disable-alsa-handling.patch;patch=1 \
- file://zaurus-hinge.matchbox-portrait \
+ file://avoid-rotated-server.patch;patch=1 \
+ file://zaurus-hinge.matchbox-portrait \
file://zaurus-hinge.matchbox-landscape \
- file://tslib-1.diff;patch=1 \
file://zaurus-hinge.bl-on \
file://zaurus-hinge.bl-off \
file://01-check-toggle-landscape \
diff --git a/recipes/zbar/zbar_0.8.bb b/recipes/zbar/zbar_0.8.bb
new file mode 100644
index 0000000000..f971bc3f2b
--- /dev/null
+++ b/recipes/zbar/zbar_0.8.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "2D barcode scanner toolkit."
+SECTION = "graphics"
+LICENSE = "GPL"
+DEPENDS = "intltool-native gtk+ libpng jpeg"
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.bz2"
+
+inherit autotools pkgconfig
+
+do_stage () {
+ autotools_stage_all
+}
+
+EXTRA_OECONF = " --without-imagemagick --without-qt --without-python"
+
+PACKAGES += "libzbar libzbargtk"
+
+FILES_${PN} = "${bindir}/zbar*"
+FILES_${PN}-doc = "${datadir}/doc ${datadir}/man "
+FILES_${PN}-dbg += " ${bindir}/.debug"
+FILES_libzbar = "${libdir}/libzbar.so.*"
+FILES_libzbar-dev = "${libdir}/libzbar.so ${libdir}/libzbar.*a ${includedir}/zbar* "
+FILES_libzbargtk = "${libdir}/libzbargtk.so.*"
+FILES_libzbargtk-dev = "${libdir}/libzbargtk.so ${libdir}/libzbargtk.*a"
diff --git a/recipes/zd1211/zd1211-firmware_1.3.bb b/recipes/zd1211/zd1211-firmware_1.3.bb
deleted file mode 100644
index 372135d471..0000000000
--- a/recipes/zd1211/zd1211-firmware_1.3.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-DESCRIPTION = "ZyDAS ZD1211 Firmware"
-HOMEPAGE = "http://zd1211.ath.cx/"
-SECTION = "net"
-PRIORITY = "optional"
-LICENSE = "GPL"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/zd1211/zd1211-firmware${PV}.tar.bz2"
-
-S = "${WORKDIR}/${PN}"
-
-do_install() {
- install -d -m 0755 ${D}/lib/firmware/zd1211
- install -m 0644 ${S}/zd1211* ${D}/lib/firmware/zd1211/
-}
-
-FILES_${PN} = "/lib/firmware"
diff --git a/recipes/zd1211/zd1211-firmware_1.4.bb b/recipes/zd1211/zd1211-firmware_1.4.bb
deleted file mode 100644
index b32ff2101b..0000000000
--- a/recipes/zd1211/zd1211-firmware_1.4.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-DESCRIPTION = "ZyDAS ZD1211 Firmware"
-HOMEPAGE = "http://zd1211.ath.cx/"
-SECTION = "net"
-PRIORITY = "optional"
-LICENSE = "GPL"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/zd1211/zd1211-firmware-${PV}.tar.bz2"
-
-S = "${WORKDIR}/${PN}"
-
-do_install() {
- install -d -m 0755 ${D}/lib/firmware/zd1211
- install -m 0644 ${S}/zd1211* ${D}/lib/firmware/zd1211/
-}
-
-FILES_${PN} = "/lib/firmware"
diff --git a/recipes/zip/zip.inc b/recipes/zip/zip.inc
index 8d04bd5f61..b1154251b6 100644
--- a/recipes/zip/zip.inc
+++ b/recipes/zip/zip.inc
@@ -4,8 +4,8 @@ LICENSE = "Info-ZIP"
SRC_URI = "http://ftp.info-zip.org/pub/infozip/src/zip${@bb.data.getVar('PV',d,1).replace('.', '')}.tar.gz"
-EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \
- 'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \
+EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC} ${LDFLAGS}' 'AS=${CC} -c' 'CPP=${CPP}' \
+ 'CFLAGS=-I. -DUNIX ${CFLAGS} ${LDFLAGS}' 'LFLAGS1=${LDFLAGS}' 'INSTALL=install' \
'BINFLAGS=0755' 'INSTALL_D=install -d'"
do_compile() {
diff --git a/recipes/zip/zip_2.32.bb b/recipes/zip/zip_2.32.bb
index 0c57235c2f..54d52e0957 100644
--- a/recipes/zip/zip_2.32.bb
+++ b/recipes/zip/zip_2.32.bb
@@ -1,3 +1,3 @@
require zip.inc
-PR ="r1"
+PR ="r2"
diff --git a/recipes/zten/zten_1.6.2.bb b/recipes/zten/zten_1.6.2.bb
index 33feae0911..e45fcef4fc 100644
--- a/recipes/zten/zten_1.6.2.bb
+++ b/recipes/zten/zten_1.6.2.bb
@@ -5,8 +5,9 @@ SECTION = "opie/applications"
PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "eb kakasi"
-RDEPENDS = "virtual/japanese-font"
+RDEPENDS = "virtual-japanese-font"
RCONFLICTS = "ztenv"
+PR = "r1"
SRC_URI = "http://www.gohome.org/cgi-bin/viewcvs.cgi/zten.tar.gz;md5sum=d24f03c8df5c98d510590bd9a63dc932 \
file://zten.patch;patch=1"
diff --git a/recipes/zuc/zuc/fixed-include.patch b/recipes/zuc/zuc/fixed-include.patch
new file mode 100644
index 0000000000..fc4b80967a
--- /dev/null
+++ b/recipes/zuc/zuc/fixed-include.patch
@@ -0,0 +1,11 @@
+--- a/conv_matrix.cpp 2003-01-27 21:18:45.000000000 +0100
++++ b/conv_matrix.cpp 2009-05-30 00:57:23.311764092 +0200
+@@ -27,7 +27,7 @@
+ #include <qmap.h>
+ #include <qcombobox.h>
+ #include <qpopupmenu.h>
+-#include <iostream.h>
++#include <iostream>
+ #include <stdlib.h>
+
+
diff --git a/recipes/zuc/zuc_1.1.2ern.bb b/recipes/zuc/zuc_1.1.2ern.bb
index 32c8f9848d..67a1aca4c5 100644
--- a/recipes/zuc/zuc_1.1.2ern.bb
+++ b/recipes/zuc/zuc_1.1.2ern.bb
@@ -5,10 +5,12 @@ LICENSE = "GPL"
APPTYPE = "binary"
APPNAME = "zuc"
APPDESKTOP = "${S}"
-PR = "r3"
+PR = "r4"
SRC_URI = "http://www.linux-solutions.at/projects/zaurus/source/zuc_V${PV}.tar.gz \
- http://nick.kreucher.net/zuc/zuc_units"
+ http://nick.kreucher.net/zuc/zuc_units \
+ file://fixed-include.patch;patch=1"
+
S = "${WORKDIR}/zuc_V${PV}"
inherit opie